dev-ready 0.2.2__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. dev_ready-0.3.0/.agents/skills/handoff/SKILL.md +140 -0
  2. dev_ready-0.3.0/.agents/skills/handoff/references/templates.md +420 -0
  3. dev_ready-0.3.0/.agents/skills/planning/SKILL.md +76 -0
  4. dev_ready-0.3.0/.agents/skills/release/SKILL.md +115 -0
  5. dev_ready-0.3.0/.agents/skills/review/SKILL.md +79 -0
  6. {dev_ready-0.2.2/.bob → dev_ready-0.3.0/.agents/skills/review/references}/qa.md +1 -1
  7. {dev_ready-0.2.2/.bob → dev_ready-0.3.0/.agents/skills/review/references}/security.md +1 -1
  8. {dev_ready-0.2.2/.bob → dev_ready-0.3.0/.agents/skills/review/references}/sre.md +1 -1
  9. dev_ready-0.3.0/.claude/skills/handoff/SKILL.md +13 -0
  10. dev_ready-0.3.0/.claude/skills/planning/SKILL.md +12 -0
  11. dev_ready-0.3.0/.claude/skills/release/SKILL.md +12 -0
  12. dev_ready-0.3.0/.claude/skills/review/SKILL.md +13 -0
  13. {dev_ready-0.2.2 → dev_ready-0.3.0}/.github/workflows/ci.yml +8 -0
  14. {dev_ready-0.2.2 → dev_ready-0.3.0}/.gitignore +1 -1
  15. dev_ready-0.3.0/AGENTS.md +56 -0
  16. dev_ready-0.3.0/CLAUDE.md +1 -0
  17. {dev_ready-0.2.2 → dev_ready-0.3.0}/PKG-INFO +11 -6
  18. {dev_ready-0.2.2 → dev_ready-0.3.0}/README-pypi.md +10 -5
  19. dev_ready-0.3.0/docs/architecture.md +148 -0
  20. dev_ready-0.3.0/docs/catalog-candidates.md +101 -0
  21. {dev_ready-0.2.2 → dev_ready-0.3.0}/docs/cli-spec.md +14 -7
  22. dev_ready-0.3.0/docs/decisions/adr-001-two-stage-generation-no-fork.md +6 -0
  23. dev_ready-0.3.0/docs/decisions/adr-002-manifest-pinned-upstream.md +6 -0
  24. dev_ready-0.3.0/docs/decisions/adr-003-distribution-via-uvx.md +7 -0
  25. dev_ready-0.3.0/docs/decisions/adr-004-interactive-prompts-escape-hatch.md +6 -0
  26. dev_ready-0.3.0/docs/decisions/adr-005-consume-upstream-via-copier.md +11 -0
  27. dev_ready-0.3.0/docs/decisions/adr-006-manifest-prune-list.md +6 -0
  28. dev_ready-0.3.0/docs/decisions/adr-007-multi-agent-handoff-protocol.md +13 -0
  29. dev_ready-0.3.0/docs/decisions/adr-008-integration-modes-vendor-vs-pinned.md +8 -0
  30. dev_ready-0.3.0/docs/decisions/adr-009-manifest-vendored-provenance.md +6 -0
  31. dev_ready-0.3.0/docs/decisions/adr-010-item-level-catalog-selection.md +10 -0
  32. dev_ready-0.3.0/docs/decisions/adr-011-agent-config-restructure.md +13 -0
  33. dev_ready-0.3.0/docs/pin-maintenance.md +38 -0
  34. {dev_ready-0.2.2 → dev_ready-0.3.0}/docs/requirements.md +27 -5
  35. {dev_ready-0.2.2 → dev_ready-0.3.0}/docs/v0.2-overview.md +2 -1
  36. dev_ready-0.3.0/docs/v0.3-overview.md +75 -0
  37. dev_ready-0.3.0/docs/version-plan.md +367 -0
  38. {dev_ready-0.2.2 → dev_ready-0.3.0}/pyproject.toml +1 -1
  39. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/__init__.py +1 -1
  40. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/cli.py +107 -12
  41. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/generate.py +17 -4
  42. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/manifest/__init__.py +5 -1
  43. dev_ready-0.3.0/src/dev_ready/manifest/loader.py +388 -0
  44. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/manifest/models.py +29 -0
  45. dev_ready-0.3.0/src/dev_ready/manifest.json +105 -0
  46. dev_ready-0.3.0/src/dev_ready/overlay/__init__.py +276 -0
  47. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/prompts/answers.py +5 -0
  48. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/prompts/collect.py +72 -16
  49. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/templates/agents/README.md +6 -6
  50. dev_ready-0.3.0/src/dev_ready/templates/claude/skills/react-doctor/SKILL.md +29 -0
  51. dev_ready-0.3.0/src/dev_ready/verify.py +147 -0
  52. {dev_ready-0.2.2 → dev_ready-0.3.0}/tests/unit/test_cli.py +72 -11
  53. {dev_ready-0.2.2 → dev_ready-0.3.0}/tests/unit/test_generate.py +31 -14
  54. dev_ready-0.3.0/tests/unit/test_manifest.py +564 -0
  55. dev_ready-0.3.0/tests/unit/test_overlay.py +476 -0
  56. {dev_ready-0.2.2 → dev_ready-0.3.0}/tests/unit/test_prompts.py +89 -1
  57. dev_ready-0.3.0/tests/unit/test_verify.py +217 -0
  58. {dev_ready-0.2.2 → dev_ready-0.3.0}/uv.lock +1 -1
  59. dev_ready-0.2.2/CLAUDE.md +0 -44
  60. dev_ready-0.2.2/docs/architecture.md +0 -193
  61. dev_ready-0.2.2/src/dev_ready/manifest/loader.py +0 -165
  62. dev_ready-0.2.2/src/dev_ready/manifest.json +0 -41
  63. dev_ready-0.2.2/src/dev_ready/overlay/__init__.py +0 -141
  64. dev_ready-0.2.2/src/dev_ready/verify.py +0 -55
  65. dev_ready-0.2.2/tests/unit/test_manifest.py +0 -227
  66. dev_ready-0.2.2/tests/unit/test_overlay.py +0 -247
  67. dev_ready-0.2.2/tests/unit/test_verify.py +0 -76
  68. {dev_ready-0.2.2 → dev_ready-0.3.0}/.github/dependabot.yml +0 -0
  69. {dev_ready-0.2.2 → dev_ready-0.3.0}/.github/workflows/release.yml +0 -0
  70. {dev_ready-0.2.2 → dev_ready-0.3.0}/.github/workflows/upstream-bump.yml +0 -0
  71. {dev_ready-0.2.2 → dev_ready-0.3.0}/.python-version +0 -0
  72. {dev_ready-0.2.2 → dev_ready-0.3.0}/LICENSE +0 -0
  73. {dev_ready-0.2.2 → dev_ready-0.3.0}/README.md +0 -0
  74. {dev_ready-0.2.2 → dev_ready-0.3.0}/THIRD_PARTY_NOTICES.md +0 -0
  75. {dev_ready-0.2.2 → dev_ready-0.3.0}/docs/releasing.md +0 -0
  76. {dev_ready-0.2.2 → dev_ready-0.3.0}/docs/v0.1-overview.md +0 -0
  77. {dev_ready-0.2.2 → dev_ready-0.3.0}/scripts/bump_upstream.py +0 -0
  78. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/README.md +0 -0
  79. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/__main__.py +0 -0
  80. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/errors.py +0 -0
  81. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/fetch/__init__.py +0 -0
  82. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/fetch/snapshot.py +0 -0
  83. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/prompts/__init__.py +0 -0
  84. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/prompts/_questionary_asker.py +0 -0
  85. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/prompts/asker.py +0 -0
  86. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/report/__init__.py +0 -0
  87. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/report/render.py +0 -0
  88. /dev_ready-0.2.2/src/dev_ready/templates/agents/phase-N/01-opus-plan.md → /dev_ready-0.3.0/src/dev_ready/templates/agents/phase-N/01-plan.md +0 -0
  89. /dev_ready-0.2.2/src/dev_ready/templates/agents/phase-N/02-gemini-implementation.md → /dev_ready-0.3.0/src/dev_ready/templates/agents/phase-N/02-implementation.md +0 -0
  90. /dev_ready-0.2.2/src/dev_ready/templates/agents/phase-N/03-opus-review.md → /dev_ready-0.3.0/src/dev_ready/templates/agents/phase-N/03-review.md +0 -0
  91. /dev_ready-0.2.2/src/dev_ready/templates/agents/phase-N/04-bob-qa.md → /dev_ready-0.3.0/src/dev_ready/templates/agents/phase-N/04-qa-review.md +0 -0
  92. /dev_ready-0.2.2/src/dev_ready/templates/agents/phase-N/05-bob-security.md → /dev_ready-0.3.0/src/dev_ready/templates/agents/phase-N/05-security-review.md +0 -0
  93. /dev_ready-0.2.2/src/dev_ready/templates/agents/phase-N/06-bob-sre.md → /dev_ready-0.3.0/src/dev_ready/templates/agents/phase-N/06-sre-review.md +0 -0
  94. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/templates/claude/CLAUDE.md.tmpl +0 -0
  95. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/templates/claude/skills/project-orientation/SKILL.md +0 -0
  96. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/templates/docs/architecture.md.tmpl +0 -0
  97. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/templates/docs/requirements.md.tmpl +0 -0
  98. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/templates/mcp/mcp.json +0 -0
  99. {dev_ready-0.2.2 → dev_ready-0.3.0}/src/dev_ready/templates/readme/README.md.tmpl +0 -0
  100. {dev_ready-0.2.2 → dev_ready-0.3.0}/templates/README.md +0 -0
  101. {dev_ready-0.2.2 → dev_ready-0.3.0}/tests/README.md +0 -0
  102. {dev_ready-0.2.2 → dev_ready-0.3.0}/tests/e2e/.gitkeep +0 -0
  103. {dev_ready-0.2.2 → dev_ready-0.3.0}/tests/e2e/test_init_real.py +0 -0
  104. {dev_ready-0.2.2 → dev_ready-0.3.0}/tests/integration/.gitkeep +0 -0
  105. {dev_ready-0.2.2 → dev_ready-0.3.0}/tests/integration/test_fetch_real.py +0 -0
  106. {dev_ready-0.2.2 → dev_ready-0.3.0}/tests/unit/test_bump_upstream.py +0 -0
  107. {dev_ready-0.2.2 → dev_ready-0.3.0}/tests/unit/test_fetch.py +0 -0
  108. {dev_ready-0.2.2 → dev_ready-0.3.0}/tests/unit/test_report.py +0 -0
@@ -0,0 +1,140 @@
1
+ ---
2
+ name: handoff
3
+ description: Generate the multi-agent handoff documents for a dev-ready development phase (Tech Lead -> Senior -> Junior -> Reviewer workflow, ADR-007/ADR-011) - six docs per phase, plus a seventh release handoff (07-release) when the phase ships a version. Use when asked to create, generate, or regenerate handoff docs for a version/phase - e.g. "generate v0.3 phase 2 handoffs", "open a new phase", "this phase releases, add the release handoff".
4
+ ---
5
+
6
+ # dev-ready Handoff Generator
7
+
8
+ Generate the complete handoff document set for one dev-ready phase, under
9
+ `docs/handoff/<version>/phase-<N>/` in the dev-ready repo:
10
+
11
+ ```
12
+ docs/handoff/<version>/phase-<N>/
13
+ ├── 01-plan.md # brief to the Senior Engineer
14
+ ├── 02-implementation.md # the ONLY file the Junior receives
15
+ ├── 03-review.md # Senior's review brief (state machine entry)
16
+ ├── 04-qa-review.md # QA reviewer brief
17
+ ├── 05-security-review.md # Security reviewer brief
18
+ ├── 06-sre-review.md # SRE reviewer brief
19
+ ├── 07-release.md # Release Engineer brief — RELEASE PHASES ONLY
20
+ └── reports/README.md # explains execution-report.md / problems.md
21
+ ```
22
+
23
+ ## Why the documents look the way they do
24
+
25
+ The CEO (Moofon) runs a file-triggered state machine: handing an agent one
26
+ file must be enough for that agent to know its role and act, with zero chat
27
+ context from anyone else. Every design rule below exists to keep that true:
28
+
29
+ - Self-contained: each doc restates the agent's role, inputs, outputs.
30
+ - `02` is single-trigger: it carries the Tech Lead's working rules on top
31
+ AND a section "Task Breakdown & Implementation Details (Senior writes here)"
32
+ that the Senior fills. The Junior gets `02` and nothing else.
33
+ - problems.md state machine: the Junior ALWAYS writes
34
+ `reports/execution-report.md`; hard bugs additionally go to
35
+ `reports/problems.md` whose header carries its own fix protocol for the
36
+ Senior (fix all -> delete file + update report; unfixable -> mark
37
+ `STATUS: ESCALATED-TO-CEO`). `03`'s entry check routes on the presence of
38
+ problems.md: present = FIX mode, absent = review mode. After review the
39
+ Senior ALWAYS appends a "Senior Review Addendum" to
40
+ `reports/execution-report.md` (diff summary vs the breakdown, fixes made
41
+ or "none") — the report is the phase's single on-disk record.
42
+ - All phase outputs land in `reports/`: the reviewer's three reports are
43
+ written to `docs/handoff/<version>/phase-<N>/reports/{qa,security,sre}-review.md`;
44
+ role definitions live in `.agents/skills/review/references/`.
45
+ - NO GIT for agents: all agents edit the working tree only. No commit,
46
+ branch, push, reset, merge — read-only git (`status`/`diff`/`log`) is
47
+ fine. Task headings carry Conventional Commit messages used at commit
48
+ time. (History: an agent once committed straight to main; this rule is
49
+ the countermeasure.)
50
+ - The ONE exemption — `07-release.md`: a phase that ships a version
51
+ ends with `07`, which delegates the ENTIRE release to the Senior acting
52
+ as Release Engineer — version bump, verification, phase overview report,
53
+ staged commits, push, CI wait, tag, PyPI (see `.agents/skills/release/`).
54
+ The exemption travels with the document, not the agent: the Senior holding
55
+ `01`/`03` still must not touch git state; only the agent holding `07` may
56
+ run state-changing git, and only for the release steps `07` lists. This
57
+ is safe because `07`'s entry check requires every review gate to already
58
+ be on disk: Senior verdict in `03`, three reviewer APPROVE reports, no
59
+ `problems.md`.
60
+ - `docs/handoff/` is gitignored: handoffs are working files, never
61
+ committed (ADR-011).
62
+ - Real-run checks generate into a scratch dir OUTSIDE the repo, once,
63
+ deleted afterwards.
64
+ - Final verification loop in BOTH `02` and `03`: each ends with the same
65
+ four-command suite, run in order — `uv sync --dev`, `uv run pytest`,
66
+ `uv run ruff check .`, `uv run pytest -m network` — with fix-and-rerun
67
+ from step 1 on any failure. The loop is bounded by the existing STOP
68
+ rules (a failure surviving 2 real fix attempts is a hard bug →
69
+ problems.md), so it cannot thrash tokens. The Senior reruns the suite
70
+ himself in `03` Step 2 rather than trusting the Junior's report. This
71
+ lives in the handoff docs, not in editor hooks, because the Junior runs in
72
+ Antigravity where hooks do not reach — the doc is the only channel that
73
+ reaches every agent.
74
+
75
+ ## Steps
76
+
77
+ 1. Read the phase scope. Sources, in order:
78
+ `docs/handoff/<version>/<version>-plan.md` (the phase section +
79
+ "Standing constraints"), `docs/version-plan.md` (roadmap context),
80
+ `docs/requirements.md` (the FRs the phase cites), `docs/architecture.md`
81
+ (Module Boundary + Dependency Rules), `docs/decisions/` (the ADRs the
82
+ phase cites), `docs/cli-spec.md` (exit codes), `AGENTS.md` (hard rules),
83
+ `.agents/skills/review/references/{qa,security,sre}.md` (the reviewer's
84
+ standing role definitions). Extract: scope items (with concrete `src/dev_ready/...`
85
+ file paths), acceptance criteria, known traps the plan calls out, and
86
+ cross-phase couplings (things this phase must NOT do because a later
87
+ phase owns them).
88
+
89
+ 2. Determine whether this phase ships a release. Check the plan: does this
90
+ phase close out a version (version bump / release / tag mentioned in the
91
+ phase section or close-out notes)? Not every phase releases. If it does,
92
+ extract the release version `X.Y.Z` (must be greater than the current
93
+ `version` in `pyproject.toml`) and which phase(s) the release covers. If
94
+ the plan is ambiguous, ask the CEO instead of guessing — `07` grants git
95
+ authority, so generating it for a non-release phase is exactly the
96
+ failure mode to avoid.
97
+
98
+ 3. Read `references/templates.md` (next to this file) and instantiate the
99
+ seven base files, replacing every `{{...}}` placeholder. For a release
100
+ phase, additionally instantiate `07-release.md`. Do not weaken
101
+ protocol wording (STOP rules, NO GIT, the `07` git-exemption scoping,
102
+ problems.md template) — phase-specific content goes in the marked slots
103
+ only.
104
+
105
+ 4. Derive the reviewer's phase-specific "Verify specifically" lists from the phase's
106
+ change surface: QA = test-tier coverage of each new behavior + error
107
+ paths + regressions; Security = untrusted input paths, leak/bypass
108
+ surface, pins/deps/workflow-permission deltas; SRE = new failure modes,
109
+ all-or-nothing preservation, message/exit-code quality, added
110
+ maintenance load.
111
+
112
+ 5. Sanity checklist before finishing:
113
+ - All paths use `docs/handoff/<version>/phase-<N>/` (no root-level
114
+ `handoff/`, no `docs/handoffs` — that name is the PRODUCT overlay
115
+ scaffold shipped to generated projects, FR-10, an entirely different
116
+ thing).
117
+ - Reviewer reports go to `<phase>/reports/{qa,security,sre}-review.md`.
118
+ - `03` contains the ALWAYS-update-execution-report step before the verdict.
119
+ - No instruction telling any agent to commit, branch, or merge — EXCEPT
120
+ inside `07`, whose git authority is explicitly scoped to its own
121
+ release steps. No other file may grant or imply git authority.
122
+ - `07` exists if and only if this phase ships a release; its `X.Y.Z` is
123
+ consistent everywhere in the file and greater than the current
124
+ pyproject version; its entry check names the Senior verdict, all three
125
+ reviewer APPROVE reports, and the absence of `problems.md`.
126
+ - Version/phase strings consistent across all files.
127
+ - Couplings stated (e.g. "Do NOT include README.md — that is Phase 2").
128
+ - `01` Status says AWAITING TASK BREAKDOWN; `02` Senior section says
129
+ it is empty until the Senior fills it.
130
+ - `02` and `03` both carry the four-command final verification sequence
131
+ (`uv sync --dev` → `uv run pytest` → `uv run ruff check .` →
132
+ `uv run pytest -m network`) with the fix-and-rerun loop, and `02`'s
133
+ loop explicitly defers to the STOP rules.
134
+
135
+ 6. Tell the CEO the trigger sequence: give `01` to the Senior -> give `02` to
136
+ the Junior -> if `reports/problems.md` appears give it + `02` to the Senior ->
137
+ otherwise give `03` to the Senior -> then `04`–`06` to the Reviewer -> non-release
138
+ phase: CEO commits using the Conventional Commit messages from the task
139
+ headings; release phase: give `07` to the Senior, who runs the whole release
140
+ (commits, push, CI, tag, PyPI) and reports back.
@@ -0,0 +1,420 @@
1
+ # Handoff templates
2
+
3
+ Placeholders: `{{VERSION}}` (e.g. v0.2), `{{N}}` (phase number), `{{TITLE}}`
4
+ (short phase title, e.g. "prune list + leak guard"), `{{FRS}}` (e.g. "FR-7,
5
+ FR-9"), `{{DATE}}` (today), plus content slots described inline. `{{DIR}}` =
6
+ `docs/handoff/{{VERSION}}/phase-{{N}}`. Release-only placeholders (`07`):
7
+ `{{RELEASE_VERSION}}` (X.Y.Z, no leading v) and `{{PHASES_COVERED}}` (the
8
+ phase(s) the release completes, e.g. "Phase 1–2"). Keep protocol wording
9
+ intact; fill slots.
10
+
11
+ ---
12
+
13
+ ## 01-plan.md
14
+
15
+ ```markdown
16
+ # Phase {{N}} Handoff — 01: Senior Engineer Plan
17
+
18
+ - From: Tech Lead (ADR-007)
19
+ - To: Senior Engineer
20
+ - Phase: {{VERSION}} Phase {{N}} — {{TITLE}} ({{FRS}})
21
+ - Date: {{DATE}}
22
+ - Status: AWAITING TASK BREAKDOWN (write it into 02-implementation.md, then update this line)
23
+
24
+ ## Your role
25
+
26
+ You are the Senior Engineer. In this handoff you do NOT write code. You read the phase scope below and write an ordered task breakdown WITH implementation details directly into `02-implementation.md`, in the section "Task Breakdown & Implementation Details (Senior writes here)" — and only in that section; everything above its divider is the Tech Lead's protocol and read-only. `02` is the single file the Junior (running in Antigravity) receives, so it must be self-contained: assume the Junior has no chat context.
27
+
28
+ ## Precondition
29
+
30
+ {{PRECONDITION: what must be true before this phase starts (previous phase closed, release tagged, etc.) and what to do if it is not — usually "stop and flag it to the Tech Lead".}}
31
+
32
+ ## Read before planning
33
+
34
+ 1. `AGENTS.md` — hard rules and role table (binding)
35
+ 2. `docs/handoff/{{VERSION}}/{{VERSION}}-plan.md` — Phase {{N}} section + Standing constraints
36
+ 3. `docs/requirements.md` — {{FRS}}
37
+ 4. `docs/architecture.md` + `docs/decisions/` — relevant ADRs, Module Boundary and Dependency Rules
38
+ 5. `docs/cli-spec.md` — exit codes
39
+
40
+ ## Phase {{N}} scope (fixed — do not expand or shrink)
41
+
42
+ {{SCOPE: numbered list from the plan, each item naming concrete files (src/dev_ready/...) and exact required behavior, plus the tests item. State cross-phase couplings as explicit DO NOTs.}}
43
+
44
+ ## Known trap — call it out explicitly in the Junior's tasks
45
+
46
+ {{TRAP: anything the plan flags as needing empirical verification or easy to get wrong. If none: "None flagged by the plan — still list per-task acceptance checks."}}
47
+
48
+ ## Constraints every task must respect
49
+
50
+ - Hard rules in AGENTS.md: pins only in `manifest.json`; network only in `fetch/`; all-or-nothing generation; unit tests use no network and no filesystem outside `tmp_path`; Conventional Commits (used by the CEO at commit time).
51
+ - Nobody but the CEO touches git state: the Junior (and you, when fixing) edit the working tree only; the CEO commits after 03–06 pass, using the Conventional Commit messages from the task headings.
52
+ - No new runtime dependencies.
53
+ - Module boundaries per `docs/architecture.md`. A task that seems to need crossing one is escalated to the Tech Lead, not crossed.
54
+
55
+ ## Acceptance criteria for the phase (verbatim from the plan)
56
+
57
+ {{ACCEPTANCE: bullet list copied from the plan's acceptance line.}}
58
+
59
+ ## Breakdown requirements
60
+
61
+ - 4–6 ordered tasks, each with a Conventional Commit message in its heading (used later by the CEO — agents never commit).
62
+ - Per task: files touched, what "done" means (testable), required tests.
63
+ - Include any real-run verification as its own step with instructions (ONE generation into a scratch dir OUTSIDE the repo, deleted afterwards).
64
+ - Keep it executable by an agent with no chat history — the Junior gets `02` and nothing else.
65
+ - Remind the Junior of the problems.md flow (already templated in `02`): hard bugs go to `reports/problems.md`; the execution report is written no matter what.
66
+ ```
67
+
68
+ ---
69
+
70
+ ## 02-implementation.md
71
+
72
+ ```markdown
73
+ # Phase {{N}} Handoff — 02: Junior Engineer Implementation Brief
74
+
75
+ - From: Tech Lead (ADR-007)
76
+ - To: Junior Engineer
77
+ - Phase: {{VERSION}} Phase {{N}} — {{TITLE}} ({{FRS}})
78
+ - Date: {{DATE}}
79
+
80
+ ## Your role
81
+
82
+ You are the Junior Engineer. You write the code for this phase. This file is self-contained: the working rules are here at the top (Tech Lead), and your task list with implementation details is in the "Task Breakdown & Implementation Details" section below (Senior Engineer). If that section is empty, stop — the phase has not been planned yet.
83
+
84
+ ## Read before writing code
85
+
86
+ 1. `AGENTS.md` — hard rules (binding)
87
+ 2. This file, top to bottom
88
+ 3. `docs/architecture.md` — Module Boundary, Dependency Rules, Coding Standards
89
+ 4. `docs/cli-spec.md` — exit codes
90
+ 5. `tests/README.md` — test tiers
91
+
92
+ ## Execution protocol
93
+
94
+ - NO GIT (binding): you edit files in the working tree directly and NEVER run any git command that changes state — no commit, no branch, no checkout, no push, no reset, no stash. Read-only git (`git status`, `git diff`, `git log`) is fine. The CEO commits after the Senior's review (03) and the reviewer's passes (04–06) pass, using the Conventional Commit messages attached to each task as guidance.
95
+ - Work the tasks strictly in order.
96
+ - After every task: `uv run pytest` and `uv run ruff check .` must both pass before you move to the next task.
97
+ - Unit tests: no network, no filesystem outside `tmp_path`.
98
+ - Fully type-annotate public functions. No business logic in `__init__.py`.
99
+
100
+ ## STOP rules (binding — token discipline per ADR-007)
101
+
102
+ On a hard bug or a task you cannot implement:
103
+
104
+ 1. STOP generating code for that task immediately. Do not thrash — a hard bug is: more than 2 failed fix attempts, a failure you cannot localize to a cause, or anything that seems to require crossing a module boundary or changing a documented decision.
105
+ 2. Add an entry to `reports/problems.md` (create it from the template below if it does not exist): where (file/test), what happened (exact error output), suspected cause, what you already tried.
106
+ 3. Move on to the next task if it does not depend on the blocked one; otherwise stop the phase.
107
+
108
+ ## Never do
109
+
110
+ - Run any state-changing git command (see NO GIT rule above).
111
+ - Change the upstream pin (`repo`/`ref`/`commit`) in `manifest.json`.
112
+ - Add dependencies (runtime or dev).
113
+ - Make network calls outside `src/dev_ready/fetch/`.
114
+ - Weaken or delete existing tests to make them pass.
115
+ - Edit anything in this file outside your own reports. The breakdown section below is the Senior's; the protocol above is the Tech Lead's.
116
+
117
+ ## Final verification (after the last task, before writing the report)
118
+
119
+ The per-task `pytest` + `ruff` runs above only cover the state after each
120
+ task; a later task can break an earlier one, and the network tier is never
121
+ exercised along the way. So when all tasks are DONE (or the remaining ones
122
+ are BLOCKED in problems.md), run the full suite once, in order, from the
123
+ repo root:
124
+
125
+ 1. `uv sync --dev`
126
+ 2. `uv run pytest`
127
+ 3. `uv run ruff check .`
128
+ 4. `uv run pytest -m network`
129
+
130
+ If any step fails: fix the cause, then rerun the sequence from step 1 — a
131
+ fix can invalidate a step that already passed. Failures here are subject to
132
+ the same STOP rules as any other bug: a failure that survives 2 real fix
133
+ attempts, or that you cannot localize, is a hard bug — log it in
134
+ `reports/problems.md` and stop fixing it rather than thrashing. The test
135
+ evidence in your report must come from the final run of this sequence.
136
+
137
+ ## Output when done (ALWAYS, hard bugs or not)
138
+
139
+ Write `{{DIR}}/reports/execution-report.md`:
140
+
141
+ - Per-task status table: task id, files changed, status (DONE / PROBLEM / BLOCKED).
142
+ - Test evidence: output summary of the final verification sequence (all four commands, from its last full run).
143
+ - {{REPORT_EXTRAS: phase-specific evidence the report must contain, e.g. real-run checklists.}}
144
+ - Files changed, and any deviation from the breakdown with one-line justification.
145
+
146
+ If you hit any hard bugs, ALSO write `{{DIR}}/reports/problems.md` using exactly this template (one `##` entry per bug):
147
+
148
+ # Problems — {{VERSION}} Phase {{N}}
149
+ STATUS: OPEN
150
+
151
+ Senior Engineer: reproduce and fix each bug below. Code fixes go
152
+ directly into the working tree (no git). When ALL bugs are fixed: update
153
+ reports/execution-report.md with what changed, then DELETE this file.
154
+ If a bug cannot be fixed after a real attempt: set STATUS: ESCALATED-TO-CEO
155
+ at the top and stop — the CEO and Tech Lead take over from there.
156
+
157
+ ## <task-id> — <one-line summary>
158
+ - Where: <file / test>
159
+ - What happened: <exact error output>
160
+ - Suspected cause: <your hypothesis>
161
+ - What was tried: <attempts so far>
162
+
163
+ Save both files. The presence of `reports/problems.md` means the phase is blocked on the Senior; its absence plus your execution report means the phase moves to review (`03-review.md`). Nothing is committed at this stage — code stays in the working tree until the CEO commits after all reviews pass.
164
+
165
+ ---
166
+
167
+ ## Task Breakdown & Implementation Details (Senior writes here)
168
+
169
+ This section is written and maintained by the Senior Engineer only. Everything above the divider is the Tech Lead's protocol and is read-only for all agents. Junior: if anything here conflicts with the protocol above, the protocol wins — record it in `reports/problems.md` instead of guessing.
170
+
171
+ _Empty — the Senior Engineer fills this section per `01-plan.md`._
172
+ ```
173
+
174
+ ---
175
+
176
+ ## 03-review.md
177
+
178
+ ```markdown
179
+ # Phase {{N}} Handoff — 03: Senior Engineer Review & Close
180
+
181
+ - From: Tech Lead (ADR-007)
182
+ - To: Senior Engineer
183
+ - Phase: {{VERSION}} Phase {{N}} — {{TITLE}} ({{FRS}})
184
+ - Date: {{DATE}}
185
+
186
+ ## Entry check (do this first)
187
+
188
+ 1. `{{DIR}}/reports/execution-report.md` must exist. If not, stop — the Junior has not finished; nothing to review.
189
+ 2. `{{DIR}}/reports/problems.md` must NOT exist. If it exists, the phase is in FIX mode, not review mode: work from `problems.md` (its header tells you the fix protocol) together with the breakdown in `02-implementation.md`. Come back to this file only after `problems.md` is resolved and deleted.
190
+
191
+ ## Your role
192
+
193
+ Review the Junior's Phase {{N}} work and close the phase. All Phase {{N}} work lives as UNCOMMITTED working-tree changes on top of main — nobody commits until the CEO does, after all reviews pass. You are the only agent who fixes bugs directly (also straight into the working tree). Start from files on disk — the Junior's chat context does not exist for you.
194
+
195
+ ## Read first
196
+
197
+ 1. `{{DIR}}/reports/execution-report.md`
198
+ 2. The breakdown you wrote in `02-implementation.md`
199
+ 3. The actual diff: `git status` and `git diff` (read-only git is allowed; state-changing git is not)
200
+
201
+ ## Step 1 — code review (logic and architecture)
202
+
203
+ {{REVIEW_FOCUS: bullets derived from the phase scope — one per scope item stating what correct looks like, plus cross-phase DO NOT checks, plus:}}
204
+ - Tests exist at the right tier and unit tests touch no network and nothing outside `tmp_path`.
205
+ - Nothing was committed: `git log --oneline -3` shows no new commits on main; all changes are working-tree only, confined to {{ALLOWED_PATHS}}.
206
+
207
+ ## Step 2 — gates
208
+
209
+ Run the full verification suite yourself on the working tree, in order,
210
+ from the repo root — do not trust the Junior's report as evidence that it
211
+ passes now:
212
+
213
+ 1. `uv sync --dev`
214
+ 2. `uv run pytest`
215
+ 3. `uv run ruff check .`
216
+ 4. `uv run pytest -m network`
217
+
218
+ If any step fails, fix and rerun the whole sequence from step 1 until all
219
+ four pass: a trivial cause (typo-level, no design judgment) you fix directly
220
+ in the working tree; anything beyond trivial goes to `reports/problems.md`
221
+ and the phase enters FIX mode (Step 3) — this review restarts from the
222
+ entry check afterwards.
223
+
224
+ All must pass before you close:
225
+
226
+ - The four-command sequence above, green end to end on its final run.
227
+ - Acceptance: {{ACCEPTANCE_INLINE}}. (CI generate-and-verify runs after the CEO commits and pushes — local real-run checks are its pre-commit stand-in.)
228
+
229
+ ## Step 3 — findings
230
+
231
+ - Trivial defects (typo-level, no design judgment): fix directly in the working tree (no commits), note it for the verdict.
232
+ - Anything beyond trivial: write `{{DIR}}/reports/problems.md` (same template the Junior uses — its header carries the fix protocol), one `##` entry per issue, and STOP. The phase re-enters FIX mode; this review restarts from the entry check afterwards.
233
+ - If, during FIX mode, a problem survives a real fix attempt: set `STATUS: ESCALATED-TO-CEO` at the top of `problems.md` and stop — the CEO and Tech Lead take over.
234
+
235
+ ## Step 4 — update the execution report (ALWAYS, findings or not)
236
+
237
+ Append a "## Senior Review Addendum" section to `{{DIR}}/reports/execution-report.md` and save. Do this on every review pass — even a clean one — because the execution report is the single on-disk record of the phase: the reviewer (04–06) and the CEO read it instead of your chat context, so anything that lives only in this file is invisible to them. Include:
238
+
239
+ - What actually changed: summarize `git status` / `git diff` (read-only) against the previous phase's state — files touched and what changed, compared against what the breakdown in `02` promised. Note any drift.
240
+ - Fixes made during review or FIX mode: what was broken, what you changed. If none: state "no fixes needed".
241
+ - Gate evidence: the summary lines from your own final run of the four-command verification sequence (Step 2) — the reviewer and the CEO rely on this, not on rerunning it themselves.
242
+ - Anything the Junior's report missed, misstated, or that you verified independently.
243
+
244
+ ## Step 5 — verdict (only when Step 2 gates pass and no problems.md exists)
245
+
246
+ Append "## Review Verdict" to this file and save (docs/handoff/ is gitignored — do not commit it):
247
+
248
+ - PASS/FAIL per acceptance criterion.
249
+ - Problems fixed along the way: what was broken, what you changed.
250
+ - Review findings you fixed vs. accepted as-is.
251
+ - Statement that the phase is ready for review (04–06) — or what blocks it.
252
+ - Suggested Conventional Commit message(s) for the CEO (one per task, or a sensible squash), taken from the task headings in `02`.
253
+
254
+ You do not commit, merge, or release under THIS document. For a non-release phase, the CEO commits and pushes after the reviewer passes; CI generate-and-verify on that push is the final backstop. For a release phase, git authority arrives only with `07-release.md`, which the CEO hands over after the reviewer's three APPROVE reports are on disk.
255
+ ```
256
+
257
+ ---
258
+
259
+ ## 04-qa-review.md / 05-security-review.md / 06-sre-review.md
260
+
261
+ Common shape — instantiate three times with role = QA / Security / SRE:
262
+
263
+ ```markdown
264
+ # Phase {{N}} Handoff — 0X: {{ROLE}} Review
265
+
266
+ - From: Tech Lead (ADR-007)
267
+ - To: Reviewer ({{ROLE}})
268
+ - Phase: {{VERSION}} Phase {{N}} — {{TITLE}} ({{FRS}})
269
+ - Precondition: `03-review.md` contains a Review Verdict marked ready for review
270
+
271
+ Your role definition is `.agents/skills/review/references/{{qa|security|sre}}.md` — read and follow it. The change under review is UNCOMMITTED working-tree changes on top of main: inspect with `git status` / `git diff` (read-only git only). Context docs: `docs/handoff/{{VERSION}}/{{VERSION}}-plan.md` (Phase {{N}}), `docs/requirements.md` {{FRS}}, {{ROLE_CONTEXT_DOCS}}.
272
+
273
+ ## Verify specifically
274
+
275
+ {{ROLE_SPECIFIC_NUMBERED_LIST}}
276
+
277
+ ## Output
278
+
279
+ Write `{{DIR}}/reports/{{qa|security|sre}}-review.md` (NOT any separate reviews directory — all phase records live together in `{{DIR}}/reports/`; if your role file says otherwise, this path wins): Verdict (`APPROVE` / `REQUEST CHANGES`), blocking issues (file:line, what, why, suggested fix), non-blocking suggestions in a separate section. Do not modify code. Report only.
280
+ ```
281
+
282
+ Role-specific list guidance:
283
+
284
+ - QA: each new behavior has tests at the right tier (unit = no network, tmp_path only); every invalid-input shape asserted with the typed error, not bare exceptions; error paths assert exit codes per `docs/cli-spec.md`; regressions (existing tests untouched and green, `uv run pytest -q` + `uv run ruff check .` pass); evidence in the execution report for anything only verifiable by a real run; scope confined to the phase's allowed paths.
285
+ - Security: trace every new untrusted input path to its validation; leak/bypass surface of any new guard (does it run before finalize? can callers skip it?); pins unchanged — flag ANY pin change as blocking; no new dependencies; no workflow permission expansion; secrets absent from new content.
286
+ - SRE: all-or-nothing generation preserved end-to-end for each new failure mode; failure messages state what failed + likely cause + user action, correct exit codes, no silent failures; no new manual maintenance outside the weekly bump loop; false-positive risk of new checks.
287
+
288
+ ---
289
+
290
+ ## 07-release.md — RELEASE PHASES ONLY
291
+
292
+ Generate this file only when the phase ships a release (SKILL.md Step 2).
293
+ It is the single document that grants git authority; every other handoff
294
+ doc's NO GIT rule stays binding.
295
+
296
+ ```markdown
297
+ # Phase {{N}} Handoff — 07: Release Engineer — Ship v{{RELEASE_VERSION}}
298
+
299
+ - From: Tech Lead (ADR-007)
300
+ - To: Senior Engineer acting as Release Engineer
301
+ - Release: v{{RELEASE_VERSION}}, completing {{PHASES_COVERED}}
302
+ - Date: {{DATE}}
303
+
304
+ ## Entry check (do this first — touch NOTHING until all four hold)
305
+
306
+ 1. `{{DIR}}/03-review.md` ends with a Review Verdict stating the phase is ready for review.
307
+ 2. `{{DIR}}/reports/qa-review.md`, `security-review.md`, and `sre-review.md` all exist with Verdict `APPROVE`.
308
+ 3. `{{DIR}}/reports/problems.md` does NOT exist.
309
+ 4. `git log --oneline -5` shows no commits you cannot account for — the phase's work must still be uncommitted working-tree changes on top of main.
310
+
311
+ If any check fails, STOP and report to the CEO. Do not "release anyway": these checks are the reason it is safe to hand you git at all.
312
+
313
+ ## Your role and your git authority
314
+
315
+ You are the Release Engineer. You run the ENTIRE release yourself — version bump, verification, phase overview report, staged commits, push, CI wait, tag, and post-release checks. This document is the ONLY exemption from the repo's NO-GIT-for-agents rule, and the exemption is scoped: exactly the git operations listed in the steps below, on this repo, for this release. Still forbidden: force-push, rebase, reset, amend, deleting commits, branch operations, and touching any tag other than `v{{RELEASE_VERSION}}` (except the re-tag flow in Troubleshooting). If a situation seems to need a forbidden operation, STOP and escalate to the CEO.
316
+
317
+ Why the discipline matters: the steps up to and including CI are reversible; the tag push triggers publication to PyPI, which can NEVER be unpublished. Treat the tag as the point of no return and front-load all verification before it.
318
+
319
+ ## Repo facts this release depends on
320
+
321
+ - The version lives in BOTH `src/dev_ready/__init__.py` (`__version__`) and `pyproject.toml` (`version`). `release.yml` refuses to publish if the pushed tag does not match `pyproject.toml`; the CLI prints `__version__`. A mismatch ships a CLI that reports the wrong version.
322
+ - `docs/handoff/` is gitignored — never stage or commit anything under it.
323
+ - Conventional Commits are mandatory; the commit messages come from the task headings in `02-implementation.md`.
324
+ - Run every command from the dev-ready repo root.
325
+
326
+ ## Step 1 — bump the version in two files
327
+
328
+ 1. `src/dev_ready/__init__.py`: `__version__ = "{{RELEASE_VERSION}}"`
329
+ 2. `pyproject.toml`: `version = "{{RELEASE_VERSION}}"`
330
+
331
+ Sanity: `{{RELEASE_VERSION}}` must be greater than the version currently in `pyproject.toml`. If it is not, the handoff is stale — STOP and ask the CEO.
332
+
333
+ ## Step 2 — local verification (all four must pass)
334
+
335
+ 1. `uv sync --dev` (also refreshes `uv.lock` with the new version — include it in the chore commit later)
336
+ 2. `uv run pytest`
337
+ 3. `uv run ruff check .`
338
+ 4. `uv run pytest -m network`
339
+
340
+ If any step fails: a trivial cause (typo-level, no design judgment) you fix in the working tree and rerun from step 1. Anything beyond trivial means something changed under the reviewer's approvals — STOP the release, write `{{DIR}}/reports/problems.md` (standard template), and escalate to the CEO, who decides whether the phase re-enters the ADR-007 fix loop. Never "release now, fix later": the pipeline ends at PyPI, which cannot be unpublished.
341
+
342
+ ## Step 3 — phase overview report
343
+
344
+ Only after Step 2 is green. For each phase in {{PHASES_COVERED}}, read everything under `docs/handoff/{{VERSION}}/phase-<N>/` (the handoff docs plus `reports/`) and write `docs/handoff/{{VERSION}}/reports/phase-<N>-overview.md` with:
345
+
346
+ - **Scope**: which FRs/ADRs the phase implemented (cite requirements.md / architecture.md numbers)
347
+ - **What was built**: modules touched, behavior changes, from the execution report
348
+ - **Problems encountered**: from problems.md history and escalations — what happened, how it was resolved, by whom (junior / senior)
349
+ - **Review outcomes**: verdicts from the Senior review and the reviewer's QA / Security / SRE reports
350
+ - **Test evidence**: the Step 2 results you just produced
351
+
352
+ These files stay in the gitignored handoff tree — they are the CEO's record, not repo docs. Do not commit them.
353
+
354
+ ## Step 4 — staged commits
355
+
356
+ Group the working-tree changes into separate Conventional Commits, in this order (each commit must leave the tree in a working state):
357
+
358
+ 1. `feat:` / `fix:` — implementation changes (one commit per coherent change, not per file)
359
+ 2. `docs:` — documentation-only changes
360
+ 3. `chore: bump version to {{RELEASE_VERSION}}` — the two version files + `uv.lock`, ALWAYS the last commit before tagging
361
+
362
+ Never `git add .` blindly: run `git status` first and confirm nothing from `docs/handoff/` or scratch files is staged. Use the commit messages from the task headings in `02`.
363
+
364
+ ## Step 5 — push and wait for CI green
365
+
366
+ git push
367
+
368
+ Both jobs on main must pass: `test` (lint + unit) and `generate-and-verify` (real generation + docker compose health check — takes several minutes). Watch with `gh run watch` if `gh` is available, otherwise poll `gh run list`. Do NOT tag until CI is green — the tag is what publishes.
369
+
370
+ ## Step 6 — tag and release (point of no return)
371
+
372
+ git tag v{{RELEASE_VERSION}}
373
+ git push origin v{{RELEASE_VERSION}}
374
+
375
+ `release.yml` then verifies the tag matches the pyproject version, builds, smoke-tests the wheel, publishes to PyPI (trusted publishing), and creates the GitHub Release.
376
+
377
+ ## Step 7 — post-release verification
378
+
379
+ - `uvx dev-ready@{{RELEASE_VERSION}} --version` reports the new version.
380
+ - `uvx dev-ready@{{RELEASE_VERSION}} init smoke-test --yes` in a scratch dir OUTSIDE the repo generates a clean project (in particular: no `.git`, no `copier.yml` in the output). Delete the scratch dir afterwards.
381
+
382
+ ## Step 8 — release report (ALWAYS, success or not)
383
+
384
+ Append a "## Release Report (v{{RELEASE_VERSION}})" section to `{{DIR}}/reports/execution-report.md`: commits made (hash + message), CI run result, tag pushed, PyPI publish + GitHub Release status, Step 7 evidence, and anything that deviated from this document. This is the CEO's on-disk record of the release — your chat context does not exist for anyone else.
385
+
386
+ ## Troubleshooting
387
+
388
+ **CI fails after the tag was pushed** — fix the problem (Step 2 discipline applies: trivial = fix, beyond trivial = STOP + escalate), commit and push (Steps 4–5), then move the tag and re-push to re-trigger the pipeline:
389
+
390
+ git tag -d v{{RELEASE_VERSION}}
391
+ git push origin :refs/tags/v{{RELEASE_VERSION}}
392
+ git tag v{{RELEASE_VERSION}}
393
+ git push origin v{{RELEASE_VERSION}}
394
+
395
+ Only safe while the PyPI publish has NOT succeeded — PyPI rejects re-uploading a published version. If PyPI already has {{RELEASE_VERSION}}, do NOT fight it and do NOT pick a new version yourself: releasing the next patch version is a new release decision — STOP and escalate to the CEO.
396
+
397
+ **`fatal: Unable to create ... index.lock: File exists`** — a previous git process died. Confirm no git process is running, then delete the leftover lock (`rm -f .git/index.lock`, or `del .git\index.lock` on Windows).
398
+
399
+ **Tag/version mismatch error in release.yml** — the tag and `pyproject.toml` disagree. Fix the version files (Step 1), commit, and re-tag per the flow above.
400
+
401
+ **Release published to PyPI but no GitHub Release** — the last workflow step failed after publish. Do NOT re-tag (PyPI already has the version); create the release manually: `gh release create v{{RELEASE_VERSION}} --generate-notes`.
402
+
403
+ ## STOP rules (binding, same spirit as ADR-007)
404
+
405
+ - Any failure that survives 2 real fix attempts: stop, log it in `{{DIR}}/reports/problems.md`, write the Step 8 report with current status, and escalate to the CEO.
406
+ - Never force-push, never rewrite history, never re-tag after a successful PyPI publish, never pick a different version number on your own.
407
+ ```
408
+
409
+ ---
410
+
411
+ ## reports/README.md
412
+
413
+ ```markdown
414
+ Phase {{N}} reports (gitignored — nothing here is committed).
415
+
416
+ - execution-report.md — written by the Junior when implementation ends, ALWAYS (bugs or not). The Senior ALWAYS appends a "Senior Review Addendum" after review — diff summary, fixes, corrections — so this file is the complete phase record. For a release phase, the Release Engineer (07) also appends a "Release Report" here.
417
+ - qa-review.md / security-review.md / sre-review.md — the reviewer's review reports (04–06), written here.
418
+ - problems.md — open hard bugs. Presence = phase blocked on the Senior (FIX mode); the Senior deletes it when all bugs are fixed. STATUS: ESCALATED-TO-CEO at its top = CEO + Tech Lead take over.
419
+ - Release phases only: the phase overview report lives one level up, at `docs/handoff/{{VERSION}}/reports/phase-{{N}}-overview.md`, written by the Release Engineer (07) before committing.
420
+ ```
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: planning
3
+ description: Cut a dev-ready version into an ordered set of implementation phases and write the version plan (docs/handoff/<version>/<version>-plan.md) that the handoff skill consumes. Use when starting a new version, breaking a version's FRs into phases, or writing/updating a <version>-plan.md - e.g. "plan v0.4", "break v0.4 into phases", "start the v0.4 plan".
4
+ ---
5
+
6
+ # dev-ready Version Planner
7
+
8
+ Produce `docs/handoff/<version>/<version>-plan.md`: the Tech Lead's authoritative
9
+ breakdown of a version into ordered phases. This file is the source of truth the
10
+ `handoff` skill reads when generating each phase's document set, so it must name
11
+ concrete FRs, ADRs, `src/dev_ready/...` paths, and acceptance criteria — not
12
+ intentions. The Tech Lead writes it and never writes code (ADR-007).
13
+
14
+ `docs/handoff/` is gitignored (ADR-011) — the plan is a working artifact, not a
15
+ committed repo doc. The committed roadmap it draws from is `docs/version-plan.md`.
16
+
17
+ ## Inputs to read first
18
+
19
+ 1. `docs/version-plan.md` — the roadmap: which FRs belong to this version, the
20
+ end goal, integration modes, curation principles.
21
+ 2. `docs/requirements.md` — the exact FR text for every FR this version claims;
22
+ copy the FR numbers, do not paraphrase scope.
23
+ 3. `docs/architecture.md` + `docs/decisions/` — the ADRs this version implements
24
+ or is bound by; Module Boundary and Dependency Rules the phases must respect.
25
+ 4. `docs/cli-spec.md` — current vs planned flags/exit codes this version changes.
26
+ 5. `pyproject.toml` — the current baseline version (the plan states it explicitly).
27
+ 6. The previous version's plan under `docs/handoff/<prev>/` — for format and for
28
+ what was deferred into this version.
29
+
30
+ ## How to cut phases
31
+
32
+ - One phase = one coherent, independently reviewable slice that leaves `main`
33
+ releasable-in-principle (tests green), sized to a focused evening. The CEO has
34
+ limited time; prefer fewer, cohesive phases over many thin ones.
35
+ - Order by dependency: foundational infrastructure (models, catalog, flags)
36
+ before the features that consume it. Later phases may depend on earlier ones;
37
+ never the reverse.
38
+ - Exactly one phase per version ships the release, and it is the LAST phase. Its
39
+ section must say so and name the version bump (e.g. "bump 0.2.2 → 0.3.0"); this
40
+ is what tells the `handoff` skill to emit `07-release.md` for that phase
41
+ and nothing else (07 grants scoped git authority — never on a non-release
42
+ phase).
43
+ - State cross-phase couplings explicitly as "do NOT do X here — phase N owns it",
44
+ so each generated handoff can carry the exclusion.
45
+
46
+ ## What each phase section must contain
47
+
48
+ Per phase (see the v0.3 plan for the reference shape):
49
+
50
+ - A title line `## Phase <N> — <summary> (FR-…)` and, if done, a `— COMPLETED
51
+ <date>` marker with a pointer to its execution report.
52
+ - The concrete change surface: catalog/manifest entries, `src/dev_ready/...`
53
+ files touched, overlay/verify behavior, with the SENIOR-VERIFIES markers for
54
+ anything that must be checked against a real registry/API at implementation
55
+ time (name the intent, not an unverified string).
56
+ - Tests expected (tiers, tmp_path/no-network constraint).
57
+ - Acceptance criteria: concrete, checkable generation outcomes.
58
+
59
+ ## Standing constraints block
60
+
61
+ End the plan with a "Standing constraints (binding for every phase)" section:
62
+ the hard rules from `AGENTS.md` restated for this version (pins only in
63
+ `manifest.json`, network only in `fetch/`, all-or-nothing generation, no-network
64
+ unit tests, Conventional Commits, agents never run state-changing git except the
65
+ 07-release exemption), any "no new runtime dependencies" rule, module-boundary
66
+ discipline, explicit out-of-scope items deferred to later versions, and the
67
+ four-command phase-end verification (`uv sync --dev` → `uv run pytest` →
68
+ `uv run ruff check .` → `uv run pytest -m network`).
69
+
70
+ ## Finish
71
+
72
+ - Header: `Status: Accepted (<date>). Written by the Tech Lead (ADR-007). Source
73
+ of truth for phase handoff generation.` plus the scope line (FR range + ADRs)
74
+ and the ship-as/baseline line.
75
+ - Tell the CEO the next step: for each phase in order, run the `handoff` skill to
76
+ generate `docs/handoff/<version>/phase-<N>/`, starting with Phase 1.