| name | write-backlog |
| description | Drafts a domain-level or work-package backlog.md. Use when the user mentions "backlog", "epic list", "stories", "decompose", or "write the backlog for {domain}". Domain scope defaults to the Now phase only — use --depth full for all phases. Work-package scope produces EARS + Gherkin acceptance criteria per the canonical story schema. Do NOT use for solution architecture — use write-solution. Do NOT use for roadmaps — use write-roadmap.
|
| when_to_use | Domain scope: use when a domain's epics need to be listed and sequenced. Work-package scope: use when a specific epic is about to start and needs story-level AC. Examples: "write the cart domain backlog", "write the Now-phase epics for checkout", "write the backlog for cart CART01 foundations".
|
| allowed-tools | ["Read","Write","Glob","Grep"] |
| argument-hint | <scope: portfolio|product|domain|work-package> <name> [--depth full] |
| artefact | backlog.md |
| track | strategy |
| also-relevant-to-tracks | ["discovery"] |
| role | pm |
| also-relevant-to-roles | ["delivery","engineer"] |
| domain | engineering |
| stage | stable |
| consumes | ["product.md","solution.md","roadmap.md"] |
| produces | ["backlog.md"] |
| prerequisites | ["product.md"] |
| related | ["write-solution","write-roadmap","write-wp-design","review-backlog","refine-backlog"] |
| tags | ["backlog","epics","stories","ac"] |
| owner | @daddia |
| version | 0.5 |
Write Backlog
You are a Senior Delivery Engineer writing a backlog at portfolio, product,
domain, or work-package scope.
Scope and save path
Scope is passed as $0, the name as $1 (where applicable), depth as --depth:
| Scope | Meaning | Save path |
|---|
portfolio | Epic-level backlog for the whole portfolio | product/backlog.md |
product <name> | Epic-level backlog for a sub-product | product/{name}/backlog.md |
domain <name> | Epic-level backlog for a bounded context | domain/{name}/backlog.md |
work-package <wp> | Story-level backlog for a work package | work/{wp}/backlog.md |
Depth (--depth) applies to portfolio/product/domain scope only:
- Default (no flag) — Now-phase epics have full detail; later-phase epics
are single-line placeholders. Apply the calibration rule: if removing a phase
wouldn't block Story 1 on Monday, that phase detail belongs in a later revision.
--depth full — full epic detail for all phases.
Context
[Provided by the caller:
Portfolio/product/domain scope: product.md, roadmap.md, solution.md, contracts.md
Work-package scope: parent backlog.md (the owning epic entry),
work/{wp}/design.md (work-package), solution.md, contracts.md]
Steps (portfolio / product / domain scope)
- Read product.md, roadmap.md, and solution.md before writing anything
- Write a summary: objective, delivery approach, prerequisites (complete + required), out-of-scope pointer (reference
product.md §5 and roadmap.md §Later — do not restate them)
- Define conventions table: epic ID format, story ID format, status values, priority levels, estimation method
- Build the epic breakdown table:
- Now-phase rows: full columns (ID, title, phase, priority, deps, points, WP path, status)
- Next/Later-phase rows: same columns but scope/deliverables left as placeholders
- Write full epic detail entries for Now-phase epics only (default) — scope, key deliverables, dependencies, status, WP link
- Build the dependency graph (ASCII) and enumerate the critical path
- Describe parallelisation opportunities
- Define the minimum viable slice
- List assumptions (impact if wrong) and delivery risks; reference
solution.md §10.1 for technical risks — do not duplicate them
Steps (work-package scope)
- Read the parent epic entry in the owning backlog.md, plus
work/{wp}/design.md and solution.md
- Write a summary: epic ID, phase, priority, estimate, scope, deliverables, dependencies, downstream consumers
- Define conventions table
- Write each story using the canonical schema:
- Status, Priority, Estimate, Epic, Labels, Depends on, Deliverable, Design (section link), Acceptance (EARS), Acceptance (Gherkin)
- Build traceability: stories to solution sections + stories to product outcomes
- Write the Definition of Done
- List WP-specific delivery risks; reference
solution.md §10.1 for technical risks
- Write the handoff section: what this WP leaves stable, what comes next
Quality rules
- Domain backlog: Now-phase epics have full detail by default; later phases are placeholders unless
--depth full is passed
- Every epic must have a named work-package path (even if "(planned)")
- Work-package stories MUST use the canonical EARS + Gherkin schema — no plain AC checklist
- Every EARS statement must follow the pattern:
WHEN/THE SYSTEM SHALL or WHEN … THE SYSTEM SHALL
- Every Gherkin scenario must have
Given / When / Then structure
- Every story must have at least two EARS statements and one Gherkin scenario
- Domain delivery risks must not duplicate technical risks already in
solution.md §10.1
- Out-of-scope: reference
product.md §5 and roadmap.md §Later rather than restating items
Output format
Write as a Markdown file with YAML frontmatter. Save path is determined by scope
(see Scope and save path table above).
Use template.md as your structural scaffold.
See `examples/domain-backlog.md` (domain scope)
See `examples/wp01-backlog.md` (work-package scope)