backlog-template
Backlog — epics, sprints, tasks, DoD, dependencies, estimates.
SKILL.mdskills/shared/backlog-template/SKILL.md
GitHubBacklog Template
Document Structure
The structure below is the development layout. In the gated layout (bash .dev-team-agents/scripts/doc-path.sh --layout) it is replaced where § Gated Layout says so — everything that section does not name stays as written here.
Generate under docs/backlog/:
overview-<scope-slug>.md— business requirements document, one per planned scope (the planning deliverable).<scope-slug>is the scope name in kebab-case, 2–4 words (checkout-coupons). Re-planning the same scope updates its file; a second planned scope gets its own file; it never overwrites or merges into another scope's overview.epics-<scope-slug>.md— epics of that scopedod.md— Definition of Done, shared by every scopesprints/— one file per sprint, named after its scope, plus one status index for all scopes (see below)
Every per-scope file carries the same <scope-slug> as its overview. Legacy unscoped files (overview.md, epics.md, sprints/sprint-<n>.md) are kept as is and read as one more scope — never renamed or deleted.
Sprint files live in the sprints/ subfolder, never at the backlog root:
docs/backlog/
├── overview-<scope-slug>.md
├── epics-<scope-slug>.md
├── dod.md
└── sprints/
├── sprints.md ← index: every sprint of every scope + status
├── <scope-slug>-sprint-1.md
├── <scope-slug>-sprint-2.md
└── ...
overview-<scope-slug>.md
# Scope: [Name]
## Objective
[One paragraph: what problem this solves, for whom, and the expected outcome]
## Stakeholders
| Role | Name / Team | Responsibility |
|------|------------|----------------|
| Product Owner | ... | Prioritization, acceptance |
| Tech Lead | ... | Architecture, code quality |
| Dev Team | ... | Implementation |
## Constraints
- **Deadline**: [date or "not defined"]
- **Budget**: [if relevant]
- **Tech restrictions**: [e.g., "must integrate with legacy X"]
- **Compliance**: [LGPD, GDPR, PCI, etc.]
## Out of Scope
- [Explicit list of what will NOT be built in this phase]
dod.md — Definition of Done
# Definition of Done
A task is DONE when ALL of the following are true:
## Code
- [ ] Implements the acceptance criteria completely — the `Covers` scenarios of the linked spec, or the task's own criteria when it has no spec
- [ ] No known bugs introduced
- [ ] Code reviewed and approved
- [ ] Linters pass (no errors)
- [ ] No hardcoded secrets or sensitive data
## Tests (if project requires)
- [ ] Unit/integration tests written for new logic
- [ ] All existing tests pass
- [ ] Coverage does not decrease
## Documentation
- [ ] Public APIs documented (if applicable)
- [ ] README updated if setup steps changed
- [ ] ADR written if an architectural decision was made
## Deployment
- [ ] Works in the target environment
- [ ] No regressions in adjacent features
epics-<scope-slug>.md
# Epics
## Epic 1 — [Name]
**Goal**: [What this epic delivers]
**Specs**: [`docs/specs/<feature>.md`, … — the epic's criteria live there, never restated here]
**Priority**: [High / Medium / Low]
**Dependencies**: [Epic X, external system Y]
---
## Epic 2 — [Name]
...
sprints/<scope-slug>-sprint-<n>.md
One file per sprint, in the sprints/ subfolder: sprints/<scope-slug>-sprint-1.md, sprints/<scope-slug>-sprint-2.md, etc. Numbering restarts at 1 for each scope. Never merge multiple sprints into one file.
# Sprint <n> — [Theme]
**Goal**: [What should be achievable at the end of this sprint]
**Started**: — <!-- § Time Tracking: set when the sprint's first task starts -->
**Finished**: — <!-- set when the sprint is set Done -->
**Time spent**: —
**Runs with**: [other sprints that may run at the same time as this one, or "none" — § Sprint Parallelism]
**Agents**: [list of agents that will act in this sprint — see Agent Assignment table below]
## Parallel Execution Plan
Tasks are grouped into **waves**: the order they run in. Every task in the same
wave is mutually independent; a wave starts only after every task in the
previous wave is done. By default the sprint runs its tasks one at a time, in
wave order; the waves are also what lets the per-task strategy of
`/devteam:sprint` build a wave's tasks in parallel.
| Wave | Tasks (parallel) | Blocks (why the next wave waits) |
|------|------------------|----------------------------------|
| A | TASK-001, TASK-002 | Wave B needs the schema from TASK-001 |
| B | TASK-003, TASK-004 | — |
**Isolation model:**
- **Worktree per sprint** — always. The whole sprint runs in its own
integration worktree on `sprint/<scope-slug>-<n>`, so sprints running at the
same time never touch the same working tree.
- **Isolated infra per worktree** — **only when the project uses Docker**
(a compose file exists). Then the sprint's worktree runs its own namespaced
Docker Compose stack (isolated containers, volumes, networks, host ports), so
parallel sprints don't collide on services or ports. **No Docker → skip this;
isolation is achieved by worktree alone.**
## Tasks
### TASK-001 — [Name]
**Epic**: Epic 1
**Type**: [Feature | Fix | Chore | Spike]
**Agent**: [agent name — see Agent Assignment table]
**Wave**: A
**Worktree branch**: [suggested `<context>/<brief-title>`, e.g. `feat/user-schema` — used only by the per-task strategy]
**Spec**: [`docs/specs/<feature>.md` (+ `-contract.md` if the gate fired), or "none — see spec-gate skip reason"]
**Covers**: [scenario IDs from the spec this task delivers, e.g. `S1, S3` — omit when Spec is "none"]
**Refs**: [optional — ADRs, wiki entries or doc sections that already decide details of this task, e.g. `docs/development/architecture.md § Queues`; omit when none]
**Depends on**: [TASK-XXX or "none"]
**Status**: [ ] Pending <!-- [ ] Pending → [~] In progress → [x] Done; the executing command updates it -->
**Started**: — <!-- § Time Tracking: set with [~] In progress -->
**Finished**: — <!-- set with [x] Done -->
**Time spent**: —
**Description**:
[What needs to be done — technical enough for a developer to start]
**Acceptance Criteria**: [only when Spec is "none" — a spec-linked task's criteria are its `Covers` scenarios, never a second copy]
- [ ] ...
---
### TASK-002 — [Name]
...
## Sprint Summary
| Tasks | Count |
|-------|-------|
| Total | N |
| Feature | N |
| Fix | N |
| Chore | N |
| Waves | N |
| Max parallelism | N tasks (largest wave) |
Covers rule: every scenario of a linked spec is cited by at least one task's Covers — a scenario no task covers is a planning gap, not an implicit extra. Status flips are owned by the executing command (skills/shared/spec-gate/SKILL.md § Task Resolution).
sprints/sprints.md — status index
A single index at docs/backlog/sprints/sprints.md summarizing every sprint of every scope and its status. An existing index without the Scope column gets it added in place, with legacy on the rows already there; one without the Started, Finished and Time spent columns gets them added in place before Status, with — on the rows already there — never a rewritten table. Status stays the last column: devteam backlog reads it from there. Create it when the first sprint is generated and keep it current — flip a sprint's status as it moves forward, and set it to Done in the same pass that finalizes the sprint.
# Sprints
| Scope | Sprint | Theme | Goal (one line) | Started | Finished | Time spent | Status |
|-------|--------|-------|-----------------|---------|----------|------------|--------|
| [scope-slug] | [sprint-1]([scope-slug]-sprint-1.md) | [Theme] | [What it delivers] | — | — | — | Planned |
| [scope-slug] | [sprint-2]([scope-slug]-sprint-2.md) | [Theme] | [What it delivers] | — | — | — | Planned |
Status values: Planned → In progress → Done. The three time columns mirror the sprint file's header fields (§ Time Tracking).
Agent Assignment Table
When generating sprint files, use this table to assign agents to tasks. Multiple agents can be listed when tasks require collaboration.
| Task type | Primary agent | Secondary agent |
|---|---|---|
| API endpoint / service / business rule | backend-developer |
database-specialist (if schema involved) |
| Frontend screen / component / UI flow | frontend-developer |
ui-ux-designer (if new UI pattern) |
| Database schema / migration / query optimization | database-specialist |
backend-developer |
| Design system / UX flow / visual spec | ui-ux-designer |
— |
| CI/CD / Docker / infra / deploy | devops-specialist |
— |
| Backend tests | backend-test-specialist |
— |
| Frontend tests | frontend-test-specialist |
— |
| Security audit / vulnerability fix | security-specialist |
software-architect |
| Architecture decision / refactor | software-architect |
relevant developer |
| Documentation / changelog / runbook | technical-writer |
— |
| Full-stack feature | backend-developer + frontend-developer |
database-specialist (if schema) · ui-ux-designer (if UI) |
At the top of each sprint file, list all agents that will be active in that sprint under the **Agents**: field.
Gated Layout
Applies only when the layout is gated (skills/shared/doc-flow/SKILL.md § Doc Layout); the
development layout above is unchanged. Sprint file names and the task block format stay as above,
so the devteam backlog CLI reads both layouts the same way.
docs/
├── backlog.md ← the `backlog-index` doc: global DoD + DoR + sprint index
└── backlog/
├── overview-<scope-slug>.md ← deliveries + links only
├── epics-<scope-slug>.md
└── sprints/
└── <scope-slug>-sprint-<n>.md
| Development file | Gated layout |
|---|---|
backlog/README.md |
Not written — docs/backlog.md is the single index |
backlog/sprints/sprints.md |
Not written — its table is the ## Sprints section of docs/backlog.md |
backlog/dod.md |
Not written — the global DoD is the ## Definition of Done section of docs/backlog.md |
overview-<scope-slug>.md |
Reduced to deliveries + links: the rules live in docs/prd.md, docs/glossary.md, docs/nfr.md |
| Sprint file (no DoD section) | Adds ## Definition of Done: a link to docs/backlog.md plus only this sprint's additions |
docs/backlog.md
# Backlog
## Tracker
[Local markdown, or the issue tracker setup-assistant configured]
## Definition of Done
[The `dod.md` checklist above, plus the items of doc-flow § Definition of Done Additions]
## Definition of Ready
A task enters a wave only when every item of `skills/shared/doc-flow/SKILL.md` § Definition of
Ready holds — the list lives there, never copied here.
### Project additions
- [Project-specific readiness items, or "none"]
## Sprints
| Scope | Sprint | Theme | Goal (one line) | Started | Finished | Time spent | Status |
|-------|--------|-------|-----------------|---------|----------|------------|--------|
| [scope-slug] | [sprint-1](backlog/sprints/[scope-slug]-sprint-1.md) | [Theme] | [What it delivers] | — | — | — | Planned |
Status values and the keep-it-current rule are those of the sprints.md index above.
overview-<scope-slug>.md (gated)
# Scope: [Name]
## Deliveries
| Delivery | PRD rules | Specs |
|----------|-----------|-------|
| [What the user gets] | [PRD-<section>-R<n>, …] | [`docs/specs/<feature>.md`, …] |
## Links
- PRD: `docs/prd.md` · Glossary: `docs/glossary.md` · NFR: `docs/nfr.md`
Sprint file additions (gated)
Below the header fields, a ## Definition of Done section holds See [docs/backlog.md](../../backlog.md#definition-of-done)
followed by this sprint's own additions, or none. Each task block adds two fields after **Covers**::
**Flow**: [`docs/design/flows/<feature>.md`, or "none — <reason>"]
**ADRs**: [ADR paths this task must follow, or "none"]
Every task cites spec, contract (when the gate fired), flow and ADRs — a path or none each, never
blank — and must pass doc-flow § Definition of Ready before its wave starts.
Time Tracking
Every task and every sprint records when it actually ran. The command that flips a status writes the time in the same edit — never a guess, never back-filled from memory.
| Event | Task fields | Sprint (file header + index row) |
|---|---|---|
Task → [~] In progress |
Started — only when it is —; a reopened task keeps its first start and resets Finished and Time spent to — |
Started and index In progress — only on the sprint's first started task; a reopened Done sprint resets Finished and Time spent to — |
Task → [x] Done |
Finished and Time spent |
— |
Sprint → Done in the index |
— | Finished and Time spent |
- Timestamp: the machine's local time as
YYYY-MM-DD HH:MM, read from the shell at the moment of the flip (e.g.date '+%Y-%m-%d %H:%M'). - Unknown start: a task or sprint reaching Done with
Startedstill—(marked Done without running, or a legacy entry) getsFinishedandTime spent: —— a start time is never invented. - Time spent: wall-clock
Finished−Started, written asNd Nh Nm(0d 3h 12m). It includes waits — a question left open overnight counts. - A sprint stopped early keeps
FinishedandTime spentat—; a resumed run never rewritesStarted. - A sprint or task created before these fields existed gets them added in place when it is next flipped, with
—for what is unknown — and so does the index row, insprints.mdor the gateddocs/backlog.md## Sprintstable alike. - Sprint summaries and status reports show these real times — never a projection.
Estimates
Never produce, show or store time estimates — hours, story points, effort sizes, buffers or margins, delivery forecasts, duration or end-date projections — in a backlog file, sprint file, index or summary. Only when the user explicitly asks for one in the current conversation, give it in the chat and do not write it to any file.
Sprint Parallelism
The sprint is the unit that runs in parallel: each one in its own worktree and infra, its tasks in sequence. Plan sprints so as many as possible can run at the same time:
- No cross-sprint waits inside a group. Two sprints run together only when no task of one depends on a task of the other, directly or through another task. A real dependency puts the sprints in sequence.
- No shared ground. Sprints that run together touch disjoint files, schema and migrations, so their branches merge without conflict. Splitting the work by area beats serializing it.
**Runs with**:names the group. List every other sprint, by file stem (<scope-slug>-sprint-<n>), that may run at the same time as this one — symmetric: each sprint of a group lists all the others.nonewhen the sprint must run alone.- Check before presenting the sprints: every sprint a
Runs withlists lists this one back, and no task of a group depends on a task of another sprint in it. /devteam:sprintruns several sprints in parallel only when theirRuns withlists agree; otherwise it recommends running one.
Dependency Notation
In task descriptions, always call out upstream dependencies:
Depends on: TASK-003— cannot start until TASK-003 is doneDepends on: external API contract— blocked by third partyParallel with: TASK-005— can run concurrently
devteam backlog lint checks this graph mechanically, and devteam backlog ready derives the ready frontier and the waves it implies. A prose dependency (external API contract) cannot be evaluated: it is reported as the task's external_note and never holds the task back — whoever starts the task checks it.
Design for parallelism. Keep the dependency graph as flat as possible so
each wave holds as many tasks as it can. A task with Depends on: none belongs
to Wave A; a task moves to a later wave only when it truly cannot start before
another task finishes. When two tasks would collide (same file, same schema),
prefer splitting the work so they land in the same wave over serializing them —
only serialize when the dependency is real.