MCPcopy Create free account
hub / github.com/driangle/taskmd / idStrategySpecSection

Function idStrategySpecSection

apps/cli/internal/cli/project_init.go:508–547  ·  view source on GitHub ↗

idStrategySpecSection returns a markdown section documenting the chosen ID strategy.

(cfg idStrategyConfig)

Source from the content-addressed store, hash-verified

506
507// idStrategySpecSection returns a markdown section documenting the chosen ID strategy.
508func idStrategySpecSection(cfg idStrategyConfig) string {
509 switch cfg.strategy {
510 case "prefixed":
511 return fmt.Sprintf(`
512
513## ID Generation
514
515This project uses **prefixed sequential** IDs with the prefix **%q**.
516
517- Format: `+"`%s-NNN`"+`
518- IDs are zero-padded sequential numbers with a prefix (e.g., `+"`%s-001`"+`, `+"`%s-002`"+`)
519- The prefix groups tasks by team, area, or project
520`, cfg.prefix, cfg.prefix, cfg.prefix, cfg.prefix)
521 case "random":
522 return `
523
524## ID Generation
525
526This project uses **random** IDs.
527
528- Format: alphanumeric strings (e.g., ` + "`a3f9x2`" + `, ` + "`b7k2m1`" + `)
529- Generated automatically by ` + "`taskmd add`" + `
530- Default length: 6 characters
531`
532 case "ulid":
533 return `
534
535## ID Generation
536
537This project uses **ULID** (Universally Unique Lexicographically Sortable Identifier) IDs.
538
539- Format: lowercase ULID strings (e.g., ` + "`01h5a3mpk`" + `)
540- Generated automatically by ` + "`taskmd add`" + `
541- ULIDs are time-ordered, so tasks sort chronologically by creation
542- Default length: 9 characters
543`
544 default: // sequential
545 return "" // sequential is the default, no extra section needed
546 }
547}
548
549// collectInitFiles returns files split into root and task dir.
550// Agent configs and spec are both placed in the task directory.

Callers 1

collectInitFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected