Skip to content

refactor(aidd-pm): migrate ticket-info, prd and spec to the router contract #564

Description

@blafourcade

Problem

Eight aidd-pm skills follow the router contract. Three never migrated: 01-ticket-info, 03-prd, 04-spec. They are the only ones with no mermaid flow, and 01-ticket-info and 03-prd are the only ones with no argument-hint.

None of the three has a references/ folder, which is the root cause: their rules have nowhere to live except the router, so the router carries business logic and repeats its own actions.

  • 01-ticket-info/SKILL.md:20-22 restates, near-verbatim, steps 1/2/3 of actions/01-ticket-info.md:15-17. :23 repeats the frontmatter Not for list and the intent line.
  • 03-prd/SKILL.md:23 repeats actions/01-prd.md:11; :24 repeats :28 and actions/01-prd.md:16; :22 repeats actions/01-prd.md:17.
  • 04-spec: the literal TBD: <precise question> lives in SKILL.md:23, actions/01-build.md:16 and actions/02-refine.md:18, with no owner. It has already drifted: actions/02-refine.md:24 writes TBD: <question>, :11 writes a bare TBD.
  • The eight PRD sections are enumerated three times: assets/prd-template.md (lines 7,11,15,19,23,27,31,35), actions/01-prd.md:16 in prose, :23 again as Test headings, while SKILL.md:24 declares the template the source of truth.
  • 03-prd/assets/task-template.md is dead: nothing fills it, actions/01-prd.md:15-18 only fills prd-template.md. It also carries a skill manifest as its frontmatter (name: task) and collides by name with 10-task/assets/task-template.md, the real backlog Task.
  • All three use | # | Action | Role | Input | and "Before running an action, read its file", against the | Action | Does | table and "Run the flow above" of the other eight.
  • 03-prd/SKILL.md:26-29 and 04-spec/SKILL.md:29-32 carry a ## Assets section no other skill has.
  • Their four actions use a prose bullet list for ## Test; the other 35 actions in the plugin use a | Case | Pass | table.

Scope

  • Give each of the three a references/ folder and move every rule out of its router.
  • Migrate the three routers to the contract: mermaid flow, | Action | Does | table, argument-hint, no ## Assets section.
  • Give the TBD: marker one home and point the three sites at it.
  • Stop enumerating the PRD sections outside the template.
  • Delete 03-prd/assets/task-template.md and the line announcing it.
  • Convert the four ## Test sections to | Case | Pass |.

Acceptance criteria

  • The eleven aidd-pm routers have the same shape, sections and section order
  • No router states a rule an action or a reference could hold
  • TBD: has one spelling, in one file
  • Adding a section to prd-template.md requires no other edit
  • Every asset in the plugin is filled by an action
  • Every action carries a | Case | Pass | table

Prior art in this repo

  • The eight migrated skills, 07-epic being the smallest complete example (router, three actions, five references).
  • aidd_docs/CONTRIBUTING.md states the action and test contract.
  • scripts/__tests__/check-backlog.test.js already guards reference reachability and skill isolation; it does not check router shape, which is why this drift is invisible in CI.

Out of scope

  • Any behaviour change. The three skills keep what they do; only where their rules live changes.
  • A CI test for router shape. Worth doing, but it should follow the migration rather than block it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

None yet

Projects

Status
Ideation

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions