feat(collections): seed onboarding items + explicit prefixes for scrum + product templates (TASK-1149) (#408)

* feat(collections): seed onboarding items + add explicit prefixes for scrum + product templates (TASK-1149)

Mirrors TASK-1133's pattern (PR #402) for the remaining software-category
templates. After this lands:

  - fresh `pad workspace init --template scrum`   → BACK-1 / SPRINT-2 / BUG-3 / DOC-4
  - fresh `pad workspace init --template product` → FEAT-1 / FB-2 / ROAD-3 / DOC-4

Each is a first-person note from the workspace owner's future self —
agent-invocable via `/pad let's discuss <REF>`, schema-aware terminal
verbs ("mark me done" / "completed" / "shipped" / "archived"), no
"tutorial" / "lesson" language. Bodies pulled verbatim from
DOC-1152 (scrum) and DOC-1153 (product).

Precondition fix: explicit Prefix set on five collections so DerivePrefix
doesn't yield awkward refs:

  Backlog       BACKL  → BACK
  Sprints       SPRIN  → SPRINT
  Features      FEATU  → FEAT
  Feedback      FEEDB  → FB
  Roadmap Items RI     → ROAD

Mirrors hiring template's pattern of explicit prefixes on its custom
collections. Existing scrum/product workspaces (forward-only fix) keep
their derived prefixes — the seeder doesn't migrate.

New tests:

  internal/collections/templates_test.go
    - TestScrumOnboardingItemsOrderAndShape
    - TestProductOnboardingItemsOrderAndShape
    - TestScrumProductTemplatesShipOnboardingSeedItems
    - TestScrumProductTemplatesUseExplicitFriendlyPrefixes (locks
      the prefix-fix precondition)

  internal/store/items_test.go
    - TestSeedCollectionsFromTemplateScrumRefSequence
    - TestSeedCollectionsFromTemplateProductRefSequence
      (Both also assert the prefix lands on each seeded item — drift
       in templates.go would surface here as a test failure pointing
       at the PLAN-1146 prefix precondition.)

Existing onboarding test (TestSeedCollectionsFromTemplateStartupRefSequence)
still passes — startup template untouched.

Parent: PLAN-1146. Source content: DOC-1152, DOC-1153.

* docs(comments): clarify the post-signup hint is wired in TASK-1150, not this PR (Codex review round 1)

Codex flagged that the helper-file + templates.go comments said things
like "the post-signup hint will name BACK-1" — which read as "it does
today" but actually means "it will once TASK-1150 lands." Until that
ships, the dashboard banner and CLI hint still hardcode IDEA-1 from
PR #403, so a fresh scrum/product workspace gets the seeded items but
no UI prompt that names them.

Comments now explicitly call out the in-flight state so readers
between this PR and TASK-1150 know what's wired and what isn't.

No behavior change.
This commit is contained in:
xarmian
2026-05-04 11:45:33 -04:00
committed by GitHub
parent 8fc0cb3b8b
commit 278d051eb0

Diff Content Not Available