contract-driven-delivery 2.0.17 → 2.0.18

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 (27) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +89 -15
  3. package/assets/AGENTS.template.md +1 -0
  4. package/assets/CLAUDE.template.md +4 -0
  5. package/assets/CODEX.template.md +4 -0
  6. package/assets/agents/backend-engineer.md +3 -1
  7. package/assets/agents/change-classifier.md +3 -2
  8. package/assets/agents/e2e-resilience-engineer.md +2 -0
  9. package/assets/agents/frontend-engineer.md +3 -1
  10. package/assets/agents/implementation-planner.md +121 -0
  11. package/assets/agents/monkey-test-engineer.md +2 -0
  12. package/assets/agents/stress-soak-engineer.md +2 -0
  13. package/assets/cdd/model-policy.json +1 -0
  14. package/assets/skills/cdd-new/SKILL.md +19 -11
  15. package/assets/skills/cdd-resume/SKILL.md +5 -0
  16. package/assets/skills/contract-driven-delivery/SKILL.md +12 -4
  17. package/assets/skills/contract-driven-delivery/references/workflow-router.md +3 -2
  18. package/assets/skills/contract-driven-delivery/scripts/generate_change_scaffold.py +1 -0
  19. package/assets/skills/contract-driven-delivery/scripts/validate_spec_traceability.py +1 -1
  20. package/assets/skills/contract-driven-delivery/templates/change-classification.md +1 -1
  21. package/assets/skills/contract-driven-delivery/templates/implementation-plan.md +56 -0
  22. package/assets/skills/contract-driven-delivery/templates/tasks.yml +1 -0
  23. package/assets/specs-templates/change-classification.md +1 -1
  24. package/assets/specs-templates/implementation-plan.md +56 -0
  25. package/assets/specs-templates/tasks.yml +1 -0
  26. package/dist/cli/index.js +19 -0
  27. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.18] - 2026-05-15
4
+
5
+ Implementation planning handoff release. This adds a senior planning step so
6
+ implementation agents receive a concise execution packet instead of inferring
7
+ scope from chat history.
8
+
9
+ ### Added
10
+
11
+ - **`implementation-planner` agent**: writes
12
+ `specs/changes/<change-id>/implementation-plan.md` after classification,
13
+ contracts, test plan, design, and CI gate plan are known.
14
+ - **Required `implementation-plan.md` template**: new changes scaffold it by
15
+ default, `cdd-kit gate` validates it, and `cdd-kit migrate` adds a scaffold
16
+ for existing active changes.
17
+ - **Upgrade documentation**: README now explains how to sync npm package
18
+ updates into global agents/skills, repo templates, `.cdd/model-policy.json`,
19
+ hooks, code-map, and existing change directories.
20
+
21
+ ### Changed
22
+
23
+ - **Implementation agents now consume the plan**: backend, frontend, E2E,
24
+ monkey, and stress/soak agents must read `implementation-plan.md` and report
25
+ `blocked` instead of inferring missing scope.
26
+ - **`/cdd-new` ordering now plans before implementation**: contracts, test
27
+ plan, design if needed, and CI gate plan come before `implementation-planner`;
28
+ backend/frontend/test implementation agents start only after task `1.4`
29
+ confirms the implementation plan.
30
+ - **Traceability helpers include implementation plan**:
31
+ `generate_change_scaffold.py` copies the new template and
32
+ `validate_spec_traceability.py` treats it as required.
33
+
3
34
  ## [2.0.17] - 2026-05-07
4
35
 
5
36
  Focused index-assisted development release. Agents now get a smaller, more
package/README.md CHANGED
@@ -94,10 +94,11 @@ or
94
94
  3. The `change-classifier` agent (Opus) reads the request, classifies risk and tier, decides which agents are needed
95
95
  4. If the request is too broad, the classifier can return an atomic split proposal instead of forcing one Tier 0/1 monolith
96
96
  5. For Tier 0-1 work, Claude's narration uses stage badges so users can tell whether the flow is deciding, implementing, testing, or reviewing
97
- 6. Agents run in order: contracts ??test plan ??spec/architecture review (if needed) ??backend engineer ??frontend engineer ??CI/CD gates ??QA
98
- 7. Agents write implementation artifacts and optional concise handoff notes
99
- 8. `cdd-kit gate <change-id>` runs automatically to confirm all artifacts are complete
100
- 9. Claude reports a summary and the suggested git commit
97
+ 6. Agents run in order: contracts ??test plan ??spec/architecture review (if needed) ??CI/CD gates ??implementation plan ??backend engineer ??frontend engineer ??QA
98
+ 7. `implementation-planner` writes `implementation-plan.md`, the concise execution packet implementation agents follow
99
+ 8. Implementation agents write code/tests from that plan and optional concise handoff notes
100
+ 9. `cdd-kit gate <change-id>` runs automatically to confirm all artifacts are complete
101
+ 10. Claude reports a summary and the suggested git commit
101
102
 
102
103
  ### Workflow Lanes: Avoiding Ceremony for Small Fixes
103
104
 
@@ -108,7 +109,7 @@ Use a lightweight maintenance lane for small corrections where the intent is alr
108
109
  | Lane | Examples | Required record |
109
110
  |---|---|---|
110
111
  | maintenance / micro-change | typo fixes, comment updates, README cleanup, formatting, lint-only fixes, tiny local test repair | normal commit message and test output if applicable |
111
- | tracked CDD change | behavior changes, contract updates, API/data/env/security/CI changes, cross-module refactors, high-risk bug fixes | `specs/changes/<id>/`, `tasks.yml`, `context-manifest.md`, and `cdd-kit gate` |
112
+ | tracked CDD change | behavior changes, contract updates, API/data/env/security/CI changes, cross-module refactors, high-risk bug fixes | `specs/changes/<id>/`, `implementation-plan.md`, `tasks.yml`, `context-manifest.md`, and `cdd-kit gate` |
112
113
 
113
114
  Do not add hard pre-commit rules that block every `src/`, `tests/`, or `contracts/` edit unless your team explicitly wants that policy. The default kit favors low-friction traceability: make risky changes reviewable, but let obvious maintenance edits stay small.
114
115
 
@@ -119,7 +120,7 @@ Machine-readable metadata such as future `change.yml` / `trace.yml` should follo
119
120
  CDD uses two agent classes on purpose:
120
121
 
121
122
  - `change-classifier`, `contract-reviewer`, `qa-reviewer`, `visual-reviewer`, `dependency-security-reviewer`, `ui-ux-reviewer`, `repo-context-scanner`, and `spec-drift-auditor` are read-only. They return analysis, verdicts, or optional handoff notes; main Claude writes the corresponding files.
122
- - `backend-engineer`, `frontend-engineer`, `e2e-resilience-engineer`, `monkey-test-engineer`, `stress-soak-engineer`, `ci-cd-gatekeeper`, `test-strategist`, and `spec-architect` are write-capable. They write their own implementation artifacts directly.
123
+ - `implementation-planner`, `backend-engineer`, `frontend-engineer`, `e2e-resilience-engineer`, `monkey-test-engineer`, `stress-soak-engineer`, `ci-cd-gatekeeper`, `test-strategist`, and `spec-architect` are write-capable. They write their own implementation artifacts directly.
123
124
 
124
125
  This split is deliberate:
125
126
 
@@ -130,6 +131,7 @@ This split is deliberate:
130
131
  **You stay in control by:**
131
132
  - Reviewing the `change-classification.md` before implementation starts
132
133
  - Checking the `test-plan.md` to confirm the right test families are planned
134
+ - Checking `implementation-plan.md` when you want to review the exact execution packet before code changes
133
135
  - Reading the final QA summary for the release-readiness verdict
134
136
 
135
137
  ---
@@ -271,6 +273,48 @@ Codex currently has no global assets to update, so Codex-only projects report th
271
273
 
272
274
  ---
273
275
 
276
+ ### After Updating the npm Package
277
+
278
+ Updating npm only replaces the `cdd-kit` CLI package. Existing repos and
279
+ global Claude Code assets keep their previously copied agents, skills,
280
+ templates, hooks, and `.cdd/model-policy.json` until you sync them.
281
+
282
+ Recommended one-command sync after `npm update -g contract-driven-delivery`:
283
+
284
+ ```bash
285
+ cdd-kit refresh # dry-run preview
286
+ cdd-kit refresh --yes # apply agents, skills, templates, model policy, hook, code-map
287
+ cdd-kit migrate --all # add new per-change scaffolds such as implementation-plan.md
288
+ cdd-kit doctor --strict
289
+ ```
290
+
291
+ What gets updated:
292
+
293
+ | command | updates | preserves |
294
+ |---|---|---|
295
+ | `cdd-kit update --yes` | `~/.claude/agents/` and `~/.claude/skills/` for Claude provider projects | project files |
296
+ | `cdd-kit upgrade --yes` | missing repo files only: contracts, templates, `.cdd/`, guidance, workflows | existing files and project guidance |
297
+ | `cdd-kit refresh --yes` | global agents/skills, missing project files, kit-shipped templates with backup, model policy roles, hooks, `.cdd/code-map.yml` | user source, contracts content, active change content |
298
+ | `cdd-kit migrate --all` | existing `specs/changes/*` metadata and new required scaffolds | implementation code and completed archive history |
299
+
300
+ For this release, run `cdd-kit refresh --yes` so the new
301
+ `implementation-planner` agent, updated `/cdd-new` and `/cdd-resume` skills,
302
+ fresh `specs/templates/`, and `.cdd/model-policy.json` role binding are all in
303
+ place. Then run `cdd-kit migrate --all` so existing active change directories
304
+ receive `implementation-plan.md`; fill that plan before resuming implementation
305
+ agents.
306
+
307
+ If you do not want template overwrites, run the narrower path:
308
+
309
+ ```bash
310
+ cdd-kit update --yes
311
+ cdd-kit upgrade --yes
312
+ cdd-kit migrate --all
313
+ cdd-kit doctor --strict
314
+ ```
315
+
316
+ ---
317
+
274
318
  ### `cdd-kit doctor`
275
319
 
276
320
  Inspects repo-level cdd-kit health. Default mode is read-only; `--fix` applies only the safe auto-remediations.
@@ -304,6 +348,33 @@ Use this for old repos that already have `contracts/` or `specs/` but are missin
304
348
 
305
349
  ---
306
350
 
351
+ ### `cdd-kit refresh`
352
+
353
+ Complete sync after upgrading the npm package. Default mode is a dry run.
354
+
355
+ ```bash
356
+ cdd-kit refresh
357
+ cdd-kit refresh --yes
358
+ cdd-kit refresh --yes --provider both
359
+ cdd-kit refresh --yes --no-templates
360
+ ```
361
+
362
+ `refresh --yes` runs the practical upgrade sequence:
363
+
364
+ 1. `cdd-kit update --yes` for global Claude agents and skills.
365
+ 2. `cdd-kit upgrade --yes` for missing project files.
366
+ 3. Force-refreshes kit-shipped `specs/templates/`, `tests/templates/`,
367
+ `ci-templates/`, and `.github/workflows/` with backup under
368
+ `.cdd/.refresh-backup/`.
369
+ 4. Re-installs the code-map hook if the project marker exists.
370
+ 5. Resyncs `.cdd/model-policy.json` roles from installed agent frontmatter.
371
+ 6. Regenerates `.cdd/code-map.yml`.
372
+
373
+ Run `cdd-kit migrate --all` separately when you need existing
374
+ `specs/changes/*` directories to gain new required artifacts.
375
+
376
+ ---
377
+
307
378
  ### `cdd-kit gate <change-id>`
308
379
 
309
380
  The single quality gate for a change. Blocks merge if anything is missing or incomplete.
@@ -314,7 +385,7 @@ cdd-kit gate add-jwt-auth --strict
314
385
  ```
315
386
 
316
387
  Checks:
317
- - All required artifacts exist (`change-request.md`, `change-classification.md`, `test-plan.md`, `ci-gates.md`, `tasks.yml`; new context-governed changes also require `context-manifest.md`)
388
+ - All required artifacts exist (`change-request.md`, `change-classification.md`, `implementation-plan.md`, `test-plan.md`, `ci-gates.md`, `tasks.yml`; new context-governed changes also require `context-manifest.md`)
318
389
  - Each artifact has sufficient content and is not a stub.
319
390
  - `change-classification.md` contains a tier or risk marker.
320
391
  - Atomic `depends-on` upstream changes are completed or archived before dependent work gates.
@@ -392,6 +463,7 @@ cdd-kit migrate --all --enable-context-governance
392
463
  What it upgrades:
393
464
  - `tasks.yml`: converts legacy `tasks.md` checklist/frontmatter into structured YAML task records
394
465
  - `change-classification.md`: detects old `**Tier:** Tier N` format and appends the new `## Tier\n- N` section so tier-based gate checks activate
466
+ - `implementation-plan.md`: adds the execution-plan scaffold required before backend/frontend/test implementation agents continue
395
467
  - `context-manifest.md`: adds a legacy manifest scaffold by default so old changes can use the same pre-read planning layer
396
468
  - `--enable-context-governance`: explicitly adds `context-governance: v1` and a context-governed manifest scaffold for pre-read planning
397
469
 
@@ -583,8 +655,8 @@ The classifier should read these two files before proposing `context-manifest.md
583
655
 
584
656
  ```bash
585
657
  npm update -g contract-driven-delivery
586
- cdd-kit upgrade --yes
587
- cdd-kit context-scan
658
+ cdd-kit refresh --yes
659
+ cdd-kit migrate --all
588
660
  cdd-kit doctor --strict
589
661
  ```
590
662
 
@@ -598,7 +670,9 @@ git add specs/changes/
598
670
  git commit -m "chore: migrate changes to current cdd-kit format"
599
671
  ```
600
672
 
601
- This gives those legacy specs a new `tasks.yml`, tier markers, and a warning-mode `context-manifest.md` without forcing strict context governance on closed work.
673
+ This gives those legacy specs a new `tasks.yml`, tier markers,
674
+ `implementation-plan.md`, and a warning-mode `context-manifest.md` without
675
+ forcing strict context governance on closed work.
602
676
 
603
677
  ### Old in-progress specs
604
678
 
@@ -613,14 +687,14 @@ cdd-kit doctor --strict
613
687
  Then choose one path per active change:
614
688
 
615
689
  - Conservative path: keep the migrated legacy manifest and resume work; use `context check` before invoking agents.
616
- - Tight context path: run `cdd-kit migrate <change-id> --enable-context-governance`, review `context-manifest.md`, narrow `Allowed Paths`, and use `cdd-kit context check` before invoking agents.
690
+ - Tight context path: run `cdd-kit migrate <change-id> --enable-context-governance`, review `context-manifest.md`, narrow `Allowed Paths`, fill `implementation-plan.md`, and use `cdd-kit context check` before invoking agents.
617
691
 
618
692
  ### Recommended rollout for production repos already burned by token overuse
619
693
 
620
- 1. Run `cdd-kit upgrade --yes` once per repo after updating the npm package.
621
- 2. Run `cdd-kit context-scan` so classifiers can read `specs/context/project-map.md` and `specs/context/contracts-index.md` instead of broad repo searches.
622
- 3. Run `cdd-kit doctor --strict` in CI.
623
- 4. Migrate old completed specs with plain `cdd-kit migrate`.
694
+ 1. Run `cdd-kit refresh --yes` once per repo after updating the npm package.
695
+ 2. Run `cdd-kit migrate --all` so existing active changes receive the current required artifact set.
696
+ 3. Review and fill `implementation-plan.md` before resuming implementation agents on active changes.
697
+ 4. Run `cdd-kit doctor --strict` in CI.
624
698
  5. Migrate active specs with `cdd-kit migrate --enable-context-governance` only after reviewing the generated manifest.
625
699
  6. Teach agents to use `cdd-kit context request/approve/reject/list` instead of silently widening context.
626
700
 
@@ -6,6 +6,7 @@ Use these agents as reusable Claude Code subagents. Project-level agents may be
6
6
 
7
7
  - `change-classifier`: routes requests into change types and required artifacts.
8
8
  - `repo-context-scanner`: detects tech stack, commands, contracts, tests, and CI/CD.
9
+ - `implementation-planner`: writes the execution plan that implementation agents follow.
9
10
  - `spec-architect`: evaluates architectural impact and produces design constraints.
10
11
  - `contract-reviewer`: owns API, CSS, env, data, business, and CI contract consistency.
11
12
  - `test-strategist`: maps acceptance criteria to test families.
@@ -60,6 +60,10 @@ For context-governed changes, read `specs/changes/<change-id>/context-manifest.m
60
60
 
61
61
  - After each agent returns, tick the related `tasks.yml` items immediately,
62
62
  and only then move to the next agent.
63
+ - Do not start backend/frontend/test implementation agents until
64
+ `implementation-plan.md` is ready; implementation agents should follow that
65
+ plan and report `blocked` instead of inferring missing scope from chat
66
+ history.
63
67
  - Pre-existing test failures may be excluded from the current gate only when
64
68
  `qa-report.md` records the failing test, baseline evidence, why it is outside
65
69
  scope, owner, and follow-up.
@@ -46,6 +46,10 @@ Cold historical data is evidence, not current requirements.
46
46
 
47
47
  - After each agent returns, tick the related `tasks.yml` items immediately,
48
48
  then move to the next agent.
49
+ - Do not start backend/frontend/test implementation agents until
50
+ `implementation-plan.md` is ready; implementation agents should follow that
51
+ plan and report `blocked` instead of inferring missing scope from chat
52
+ history.
49
53
  - Pre-existing test failures may be excluded from the current gate only when
50
54
  `qa-report.md` records the failing test, baseline evidence, why it is outside
51
55
  scope, owner, and follow-up.
@@ -7,7 +7,7 @@ model: sonnet
7
7
 
8
8
  You are the backend engineer.
9
9
 
10
- Before editing production code, read the change artifacts, API/env/data/business contracts, and test plan.
10
+ Before editing production code, read `specs/changes/<change-id>/implementation-plan.md`, the API/env/data/business contracts, and the test plan. Treat the implementation plan as the execution packet. If it is missing, still a scaffold, or lacks the backend file/test scope needed for your work, report `blocked` instead of inferring requirements from chat history.
11
11
 
12
12
  ## Code map (READ FIRST)
13
13
 
@@ -37,6 +37,8 @@ See `references/code-map-protocol.md` for the full protocol.
37
37
  - Validate input at the boundary.
38
38
  - Return standardized errors, not raw exceptions.
39
39
  - Preserve backward compatibility unless the spec explicitly marks a breaking change.
40
+ - Follow `implementation-plan.md` for scope, non-goals, required changes, and file-level plan.
41
+ - Do not expand scope beyond the implementation plan unless a Context Expansion Request is approved and the plan is updated.
40
42
  - **TDD**: Read `specs/changes/<id>/test-plan.md` first. Write failing unit, contract, and integration tests BEFORE writing feature code. Tests in `tasks.yml` items 3.1??.2 are your responsibility.
41
43
  - Update CI/CD workflows when required by `ci-gates.md`.
42
44
 
@@ -139,8 +139,8 @@ Use this structure:
139
139
 
140
140
  ## Required Artifacts
141
141
 
142
- The following 5 artifacts are always required for implementation changes:
143
- `change-request.md`, `change-classification.md`, `test-plan.md`, `ci-gates.md`, `tasks.yml`
142
+ The following 7 artifacts are always required for implementation changes:
143
+ `change-request.md`, `change-classification.md`, `implementation-plan.md`, `test-plan.md`, `ci-gates.md`, `tasks.yml`, `context-manifest.md`
144
144
 
145
145
  ## Optional Artifacts (default: no ??set yes only with explicit reason)
146
146
 
@@ -274,3 +274,4 @@ If a recommended `type` does not apply to your run, either omit it or use `point
274
274
  - High-load, auto-refresh, queue, cache, report, or long-running job change requires stress or soak consideration.
275
275
  - Existing behavior changes require current behavior and regression scope.
276
276
  - Bug fixes require reproduction, root cause, failing test, and regression test whenever feasible.
277
+ - Any implementation change requires `implementation-planner` before backend/frontend/test implementation agents. The planner turns decisions, contracts, and tests into the execution packet; implementation agents should not infer missing scope from chat history.
@@ -9,6 +9,8 @@ You are the E2E and resilience engineer.
9
9
 
10
10
  Your tests must prove that real user journeys and realistic failure modes behave correctly.
11
11
 
12
+ Before editing tests, read `specs/changes/<change-id>/implementation-plan.md` and `test-plan.md`. Treat the implementation plan as the execution packet. If it is missing, still a scaffold, or lacks the user journey / failure-mode scope needed for your work, report `blocked` instead of inferring requirements from chat history.
13
+
12
14
  ## Cover
13
15
 
14
16
  - happy path critical journeys
@@ -7,7 +7,7 @@ model: sonnet
7
7
 
8
8
  You are the frontend engineer.
9
9
 
10
- Before editing, read the change artifacts, API contract, CSS/UI contract, component contracts, visual review requirements, and test plan.
10
+ Before editing, read `specs/changes/<change-id>/implementation-plan.md`, API contract, CSS/UI contract, component contracts, visual review requirements, and test plan. Treat the implementation plan as the execution packet. If it is missing, still a scaffold, or lacks the frontend file/state/test scope needed for your work, report `blocked` instead of inferring requirements from chat history.
11
11
 
12
12
  ## Code map (READ FIRST)
13
13
 
@@ -32,6 +32,8 @@ See `references/code-map-protocol.md` for the full protocol.
32
32
  ## Rules
33
33
 
34
34
  - Do not assume backend response shape; use the API contract.
35
+ - Follow `implementation-plan.md` for scope, non-goals, required changes, and file-level plan.
36
+ - Do not expand scope beyond the implementation plan unless a Context Expansion Request is approved and the plan is updated.
35
37
  - Do not hard-code visual tokens when token system exists.
36
38
  - Do not bypass shared component rules.
37
39
  - Handle loading, empty, error, disabled, long text, no permission, and slow network states when applicable.
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: implementation-planner
3
+ description: Convert classified requirements, contracts, design decisions, and test strategy into a concise execution plan for implementation agents. Does not implement code.
4
+ tools: Read, Grep, Glob, Edit
5
+ model: opus
6
+ ---
7
+
8
+ You are the implementation planner for Contract-Driven Delivery.
9
+
10
+ Your job is to give implementation agents a complete, low-ambiguity execution packet. Do not explain the full history unless it affects execution. Do not implement production code, tests, contracts, or CI. Your only write target is:
11
+
12
+ `specs/changes/<change-id>/implementation-plan.md`
13
+
14
+ ## Inputs
15
+
16
+ Read these change artifacts first:
17
+
18
+ - `specs/changes/<change-id>/change-request.md`
19
+ - `specs/changes/<change-id>/change-classification.md`
20
+ - `specs/changes/<change-id>/context-manifest.md`
21
+ - `specs/changes/<change-id>/test-plan.md`
22
+ - `specs/changes/<change-id>/ci-gates.md`
23
+ - `specs/changes/<change-id>/design.md` if present
24
+ - `specs/changes/<change-id>/current-behavior.md` if present
25
+ - `specs/changes/<change-id>/proposal.md` if present
26
+ - relevant contract paths listed in the context manifest
27
+
28
+ Use the context manifest as the read boundary. If required context is missing, add a Context Expansion Request and report `blocked` instead of guessing.
29
+
30
+ ## Planning Rules
31
+
32
+ - Write an execution plan, not a rationale document.
33
+ - Include only the background needed to execute safely.
34
+ - Name concrete files, directories, contracts, and tests whenever known.
35
+ - State non-goals clearly so implementation agents do not opportunistically refactor.
36
+ - Map every required change to an owner agent.
37
+ - Map acceptance criteria to tests or verification commands.
38
+ - If the chosen approach is not clear from the artifacts, stop and report `blocked`.
39
+ - If a bug fix lacks reproduction, root cause, or regression coverage and the classification says those are required, stop and report `blocked`.
40
+
41
+ ## Output
42
+
43
+ Write `specs/changes/<change-id>/implementation-plan.md` with this structure:
44
+
45
+ ```md
46
+ # Implementation Plan: <change-id>
47
+
48
+ ## Objective
49
+ (Concrete outcome the implementation agents must deliver.)
50
+
51
+ ## Execution Scope
52
+
53
+ ### In Scope
54
+ - ...
55
+
56
+ ### Out of Scope
57
+ - ...
58
+
59
+ ## Required Changes
60
+ | id | area | required action | owner agent |
61
+ |---|---|---|---|
62
+ | IP-1 | ... | ... | backend-engineer |
63
+
64
+ ## File-Level Plan
65
+ | path or glob | action | notes |
66
+ |---|---|---|
67
+
68
+ ## Contract Updates
69
+ - API:
70
+ - CSS/UI:
71
+ - Env:
72
+ - Data shape:
73
+ - Business logic:
74
+ - CI/CD:
75
+
76
+ ## Test Execution Plan
77
+ | acceptance criterion | test file / command | expected signal |
78
+ |---|---|---|
79
+
80
+ ## Handoff Constraints
81
+ - Implementation agents must not infer missing requirements from chat history.
82
+ - If this plan omits a required file, behavior, contract, or test, stop and report `blocked`.
83
+ - Keep implementation within the file-level plan unless a Context Expansion Request is approved.
84
+
85
+ ## Known Risks
86
+ - ...
87
+ ```
88
+
89
+ ## Read scope
90
+
91
+ Source of truth: `specs/changes/<change-id>/context-manifest.md` -> `## Allowed Paths`.
92
+ Read it first. Read only paths it lists or paths under `## Approved Expansions`.
93
+
94
+ Need a path not listed? File a `## Context Expansion Requests` entry with `status: pending` and stop until the user approves via `cdd-kit context approve <change-id> <CER-id>`.
95
+
96
+ Forbidden by default: `specs/archive/`, sibling `specs/changes/*`, `assets/`, `node_modules/`, `dist/`, `build/`, `.git/`, `.claude/worktrees/`.
97
+
98
+ ## Optional Handoff Evidence
99
+
100
+ If a short handoff note is useful, write or append to
101
+ `specs/changes/<change-id>/agent-log/<your-agent-name>.yml`.
102
+ Optional fields and field rules are defined once in
103
+ `references/agent-log-protocol.md`.
104
+
105
+ ### Suggested artifacts for this agent
106
+
107
+ `artifacts` is a YAML array of `{type, pointer}` items in your agent log.
108
+
109
+ Recommended artifact types:
110
+
111
+ - `plan-written`: implementation plan path
112
+ - `owner-map`: implementation owners covered
113
+ - `blocked-reason`: concrete blocker, if blocked
114
+ - `scope-summary`: concise in-scope / out-of-scope summary
115
+
116
+ ```yaml
117
+ artifacts:
118
+ - { type: plan-written, pointer: "specs/changes/<id>/implementation-plan.md" }
119
+ - { type: owner-map, pointer: "backend-engineer, frontend-engineer" }
120
+ - { type: scope-summary, pointer: "3 in scope, 2 out of scope" }
121
+ ```
@@ -9,6 +9,8 @@ You are the monkey operation engineer.
9
9
 
10
10
  Your job is not random chaos. Your job is structured misuse discovery and prevention.
11
11
 
12
+ Before editing tests, read `specs/changes/<change-id>/implementation-plan.md` and `test-plan.md`. Treat the implementation plan as the execution packet. If it is missing, still a scaffold, or lacks the invalid-operation/adversarial scope needed for your work, report `blocked` instead of inferring requirements from chat history.
13
+
12
14
  ## Preventive monkey spec
13
15
 
14
16
  Before implementation, ensure the spec says what should happen for:
@@ -9,6 +9,8 @@ You are the stress and soak engineer.
9
9
 
10
10
  Use realistic load profiles rather than arbitrary request loops.
11
11
 
12
+ Before editing tests or load profiles, read `specs/changes/<change-id>/implementation-plan.md` and `test-plan.md`. Treat the implementation plan as the execution packet. If it is missing, still a scaffold, or lacks the workload/threshold scope needed for your work, report `blocked` instead of inferring requirements from chat history.
13
+
12
14
  ## Design dimensions
13
15
 
14
16
  - user concurrency
@@ -4,6 +4,7 @@
4
4
  "schema-version": "0.2.0",
5
5
  "roles": {
6
6
  "change-classifier": "opus",
7
+ "implementation-planner": "opus",
7
8
  "spec-architect": "opus",
8
9
  "qa-reviewer": "opus",
9
10
  "contract-reviewer": "sonnet",
@@ -92,7 +92,7 @@ inevitable re-classification when the agents discover the ambiguity.
92
92
  | Agent type | Who writes artifact files | Who writes optional handoff notes | Who updates tasks.yml |
93
93
  |------------|--------------------------|----------------------------------|----------------------|
94
94
  | Read-only agents (no Edit tool): `change-classifier`, `contract-reviewer`, `qa-reviewer`, `visual-reviewer`, `dependency-security-reviewer`, `ui-ux-reviewer` | YOU (main Claude) | YOU, only when useful | YOU (main Claude) |
95
- | Write-capable agents (have Edit): `backend-engineer`, `frontend-engineer`, `e2e-resilience-engineer`, `monkey-test-engineer`, `stress-soak-engineer`, `ci-cd-gatekeeper`, `test-strategist`, `spec-architect` | The agent itself | The agent itself, only when useful | YOU (main Claude) |
95
+ | Write-capable agents (have Edit): `implementation-planner`, `backend-engineer`, `frontend-engineer`, `e2e-resilience-engineer`, `monkey-test-engineer`, `stress-soak-engineer`, `ci-cd-gatekeeper`, `test-strategist`, `spec-architect` | The agent itself | The agent itself, only when useful | YOU (main Claude) |
96
96
 
97
97
  **Rule**: After EVERY agent completes (whether it writes itself or you write for it), YOU must update the relevant `tasks.yml` task `status:` from `pending` to `done`.
98
98
 
@@ -118,7 +118,7 @@ Note: `archive.md` is created during `/cdd-close`, not during `/cdd-new` ??it is
118
118
 
119
119
  If the classifier marks an artifact as `no` or leaves it blank, **do not create the file** ??even if a review agent could contribute to it.
120
120
 
121
- The 6 always-required artifacts are: `change-request.md`, `change-classification.md`, `test-plan.md`, `ci-gates.md`, `tasks.yml`, and `context-manifest.md`.
121
+ The 7 always-required artifacts are: `change-request.md`, `change-classification.md`, `implementation-plan.md`, `test-plan.md`, `ci-gates.md`, `tasks.yml`, and `context-manifest.md`.
122
122
 
123
123
  ## Step 1: Generate change-id, scaffold, and scan context
124
124
 
@@ -158,6 +158,7 @@ the kit and is bundled into every install.
158
158
  |---|---|---|
159
159
  | `change-request.md` | `specs/templates/change-request.md` | Fill the `## Original Request` section with the user's exact description before invoking the classifier; leave the rest blank |
160
160
  | `change-classification.md` | `specs/templates/change-classification.md` | Replace blank template with classifier output (Step 2) |
161
+ | `implementation-plan.md` | `specs/templates/implementation-plan.md` | `implementation-planner` writes this directly after contracts, tests, design, and CI gate plan are known |
161
162
  | `test-plan.md` | `specs/templates/test-plan.md` | `test-strategist` writes this directly |
162
163
  | `ci-gates.md` | `specs/templates/ci-gates.md` | `ci-cd-gatekeeper` writes this directly |
163
164
  | `tasks.yml` | `specs/templates/tasks.yml` | Tick checkboxes as agents complete; backfill `tier:` frontmatter from classifier (Step 2.4) |
@@ -283,6 +284,7 @@ the user; do not put them inside the prompt sent to the agent.
283
284
  |---|---|---|
284
285
  | Decision | `change-classifier` | ? `[classifier]` |
285
286
  | Decision | `spec-architect` | ? `[architect]` |
287
+ | Decision | `implementation-planner` | ? `[plan]` |
286
288
  | Implementation | `backend-engineer` | ? `[backend]` |
287
289
  | Implementation | `frontend-engineer` | ? `[frontend]` |
288
290
  | Implementation | `ci-cd-gatekeeper` | ? `[ci-cd]` |
@@ -349,32 +351,37 @@ prompt; the agent's behavior is defined by the agent prompt files in
349
351
  3. **`spec-architect`** (write-capable) ??only if `change-classification.md` contains `Architecture Review Required: yes`.
350
352
  - YOU tick: `1.3` (if it produced a gate plan)
351
353
 
352
- 4. **`backend-engineer`** (write-capable) ??if the change touches server, API, data, or business logic. Writes implementation directly; may write an optional handoff note.
354
+ 4. **`ci-cd-gatekeeper`** (write-capable) ??writes `specs/changes/<change-id>/ci-gates.md` directly before implementation planning.
355
+ - YOU tick: `1.3`, `4.4`, applicable items in section 6
356
+
357
+ 5. **`implementation-planner`** (write-capable) ??writes `specs/changes/<change-id>/implementation-plan.md` directly after classification, contracts, test plan, design, and CI gate plan are available.
358
+ - This is the handoff packet for implementation agents. It should contain execution scope, non-goals, required changes, file-level plan, contract updates, test execution plan, and constraints.
359
+ - If it reports `blocked`, halt and surface the missing decision/context to the user.
360
+ - YOU tick: `1.4`
361
+
362
+ 6. **`backend-engineer`** (write-capable) ??if the change touches server, API, data, or business logic. Writes implementation directly; may write an optional handoff note.
353
363
  - YOU tick: `4.1` and/or `4.3` based on scope
354
364
  - Note: `tasks.yml` items 3.1??.2 (unit/contract/integration tests) are written by `backend-engineer` and/or `frontend-engineer` in TDD fashion ??failing tests first, implementation second. Items 3.3??.5 are written by dedicated test engineers (Tier 0?? only or when classifier explicitly requires them).
355
365
 
356
- 5. **`frontend-engineer`** (write-capable) ??if the change touches UI, components, or client-side behavior. Writes implementation directly; may write an optional handoff note.
366
+ 7. **`frontend-engineer`** (write-capable) ??if the change touches UI, components, or client-side behavior. Writes implementation directly; may write an optional handoff note.
357
367
  - YOU tick: `4.2`
358
368
 
359
- 6. **`dependency-security-reviewer`** (read-only) ??if the change touches lockfiles, package manifests, or DB migrations.
369
+ 8. **`dependency-security-reviewer`** (read-only) ??if the change touches lockfiles, package manifests, or DB migrations.
360
370
  - **Only invoke if** `change-classification.md` lists lockfiles, package manifests, or DB migrations as affected.
361
371
  - Optional handoff note: `agent-log/dependency-security-reviewer.yml`
362
372
  - YOU tick: applicable security-related items
363
373
 
364
- 7. **`ui-ux-reviewer`** (read-only) ??if any UI change (run alongside or after frontend-engineer).
374
+ 9. **`ui-ux-reviewer`** (read-only) ??if any UI change (run alongside or after frontend-engineer).
365
375
  - **Only invoke if** classifier marks UI/CSS as affected.
366
376
  - Optional handoff note: `agent-log/ui-ux-reviewer.yml`
367
377
  - YOU tick: `5.1`
368
378
 
369
- 8. **`visual-reviewer`** (read-only) ??if any UI change (run after ui-ux-reviewer).
379
+ 10. **`visual-reviewer`** (read-only) ??if any UI change (run after ui-ux-reviewer).
370
380
  - **Only invoke if** classifier marks UI/CSS as affected.
371
381
  - Optional handoff note: `agent-log/visual-reviewer.yml`
372
382
  - YOU tick: `5.2`
373
383
 
374
- 9. **`ci-cd-gatekeeper`** (write-capable) ??writes `specs/changes/<change-id>/ci-gates.md` directly.
375
- - YOU tick: `1.3`, `4.4`, applicable items in section 6
376
-
377
- 10. **`qa-reviewer`** (read-only) ??release readiness decision (always last).
384
+ 11. **`qa-reviewer`** (read-only) ??release readiness decision (always last).
378
385
  - Optional handoff note: `agent-log/qa-reviewer.yml`
379
386
  - YOU tick: `5.4`
380
387
 
@@ -511,6 +518,7 @@ Please review the above items and re-run: cdd-kit gate <change-id>
511
518
  ## Rules
512
519
 
513
520
  - Never start implementation (backend/frontend-engineer) before `contract-reviewer` has completed for Tier 0?? changes
521
+ - Never start implementation (backend/frontend-engineer or dedicated test engineers) before `implementation-plan.md` exists and `tasks.yml` item `1.4` is done
514
522
  - Never skip `test-plan.md` for Tier 0?? changes
515
523
  - Never skip `ci-gates.md` for any implementation change
516
524
  - Agent logs are optional; do not create them just to satisfy a gate.
@@ -42,6 +42,7 @@ Read only these state files first:
42
42
  - `specs/changes/<change-id>/context-manifest.md` if present
43
43
  - `specs/changes/<change-id>/agent-log/*.yml`
44
44
  - `specs/changes/<change-id>/change-classification.md`
45
+ - `specs/changes/<change-id>/implementation-plan.md` if present
45
46
 
46
47
  Do not run broad repository search during resume. Do not read `src/`, `tests/`, or `contracts/` unless the current `context-manifest.md` authorizes that path or an approved expansion lists it.
47
48
 
@@ -54,6 +55,8 @@ Read `specs/changes/<change-id>/agent-log/` to list which agents have already ru
54
55
 
55
56
  Read `specs/changes/<change-id>/change-classification.md` to recall the tier and required agents.
56
57
 
58
+ Read `specs/changes/<change-id>/implementation-plan.md` if it exists. If implementation tasks are still pending and the plan is missing or still a scaffold, resume from `implementation-planner` before invoking backend/frontend/test implementation agents.
59
+
57
60
  Read `specs/changes/<change-id>/context-manifest.md`:
58
61
  - Identify allowed paths and approved expansions.
59
62
  - Identify pending Context Expansion Requests.
@@ -76,6 +79,7 @@ Completed agents: <list from agent-log/>
76
79
  Pending tasks: <list of status: pending items>
77
80
  Pending context expansions: <none | list request ids and paths>
78
81
  Allowed context: <short summary from context-manifest.md>
82
+ Implementation plan: <ready | missing | scaffold | blocked>
79
83
 
80
84
  Next agent to run: <agent-name> (based on tier flow and what's missing)
81
85
  ```
@@ -110,5 +114,6 @@ Continue until all required agents are done, then run `cdd-kit gate <change-id>`
110
114
  - Never start from Step 1 of `/cdd-new` — only resume from the next pending agent
111
115
  - Never use broad search to reconstruct state; resume from `tasks.yml`, `context-manifest.md`, and `agent-log/`
112
116
  - Never continue past pending Context Expansion Requests
117
+ - Never resume backend/frontend/test implementation agents before `implementation-plan.md` is ready
113
118
  - If tasks.yml has `status: abandoned`, report to user and stop
114
119
  - If tasks.yml has `status: gate-blocked`, go directly to gate retry (max 3)
@@ -21,7 +21,7 @@ Use this skill to turn software requests into traceable, testable, CI/CD-gated c
21
21
  - Invoke repo-context-scanner to capture project profile and standardization gaps.
22
22
  3. Select required artifacts.
23
23
  - Use templates in `templates/`.
24
- - Do not force every artifact for tiny changes, but do require `change-classification.md`, `test-plan.md`, and `ci-gates.md` for implementation changes.
24
+ - Do not force every artifact for tiny changes, but do require `change-classification.md`, `implementation-plan.md`, `test-plan.md`, and `ci-gates.md` for implementation changes.
25
25
  4. Update contracts before or alongside implementation. Invoke contract-reviewer to validate API/CSS/env/data/business/CI-CD contracts before or alongside implementation.
26
26
  - API: `references/api-contract-standard.md`
27
27
  - CSS/UI: `references/css-contract-standard.md`
@@ -39,8 +39,14 @@ Use this skill to turn software requests into traceable, testable, CI/CD-gated c
39
39
  - `stress-soak-engineer` implements load, soak, and long-running stability tests.
40
40
  - Invoke the relevant test engineer(s) before or alongside implementation based on the risk tier.
41
41
  - Each engineer must read the matching standard before authoring tests: e2e-resilience-engineer → references/e2e-standard.md, monkey-test-engineer → references/monkey-operation-standard.md, stress-soak-engineer → references/stress-soak-standard.md.
42
- 6. Implement through the right role.
42
+ 6. Produce the implementation plan.
43
+ - Invoke `implementation-planner` after classification, contracts, test-plan, design (if any), and CI gate plan are known.
44
+ - `implementation-plan.md` is the execution packet for implementation agents: scope, non-goals, file-level plan, contract updates, tests, acceptance criteria, and constraints.
45
+ - Keep the plan concise. It should not duplicate the full investigation history or user discussion.
46
+ - If the planner reports missing decisions or context, stop before implementation and resolve that gap.
47
+ 7. Implement through the right role.
43
48
  - Backend/frontend work must follow contracts and tests.
49
+ - Backend/frontend/test implementation agents must read `implementation-plan.md` and should report `blocked` instead of inferring missing requirements from chat history.
44
50
  - Before invoking an agent with known concrete read paths, run
45
51
  `cdd-kit context check <change-id> --path <paths...>` and expand the
46
52
  manifest before the agent reads legitimate missing paths.
@@ -50,12 +56,12 @@ Use this skill to turn software requests into traceable, testable, CI/CD-gated c
50
56
  - Invoke ui-ux-reviewer for interaction, copy, accessibility, and information hierarchy review whenever UI changes.
51
57
  - Invoke visual-reviewer for layout, responsive, CSS contract, and screenshot diff review whenever UI changes.
52
58
  - If implementation reveals an unexpected boundary or architectural constraint, halt and re-invoke `spec-architect` before continuing.
53
- 7. Run quality gates.
59
+ 8. Run quality gates.
54
60
  - Use `references/qa-gates.md`.
55
61
  - CI/CD gate plan is mandatory.
56
62
  - `qa-reviewer` decides release readiness; Tier 1 gates must be green; Tier 3+ gates must be green or explicitly deferred with a recorded promotion policy.
57
63
  - Invoke ci-cd-gatekeeper to design and enforce the gate plan.
58
- 8. Archive and audit drift.
64
+ 9. Archive and audit drift.
59
65
  - Use `references/spec-drift-policy.md`.
60
66
  - General agents record evidence and findings only; durable learning
61
67
  promotion happens only during `/cdd-close` Step 3.
@@ -76,6 +82,7 @@ Use this skill to turn software requests into traceable, testable, CI/CD-gated c
76
82
  - classification
77
83
  - current behavior if modifying existing feature
78
84
  - proposal/spec/design as needed
85
+ - implementation-plan
79
86
  - contracts
80
87
  - test-plan
81
88
  - ci-gates
@@ -129,4 +136,5 @@ Run scripts with Python 3 from the repository root.
129
136
 
130
137
  - `tasks.yml`: structured YAML, validated by `src/schemas/tasks.schema.ts`.
131
138
  - `agent-log/<agent>.yml`: optional structured handoff note per `references/agent-log-protocol.md`.
139
+ - `implementation-plan.md`: required execution handoff for implementation agents.
132
140
  - All other change artifacts remain markdown prose.
@@ -6,8 +6,8 @@ Classify every request before implementation. A request may have more than one t
6
6
 
7
7
  | Change type | Required path |
8
8
  |---|---|
9
- | new-feature | proposal, spec, design, contracts, test-plan, ci-gates, tasks |
10
- | feature-enhancement | current-behavior, diff spec, regression scope, contracts, test-plan, ci-gates |
9
+ | new-feature | proposal, spec, design, contracts, test-plan, ci-gates, implementation-plan, tasks |
10
+ | feature-enhancement | current-behavior, diff spec, regression scope, contracts, test-plan, ci-gates, implementation-plan |
11
11
  | business-logic-change | current rule, new rule, decision table, examples, edge cases, regression tests |
12
12
  | bug-fix | reproduction, root cause, failing test, fix, regression test, QA evidence |
13
13
  | regression-fix | broken prior behavior, regression source, failing test, rollback or forward fix |
@@ -28,6 +28,7 @@ Do not create heavyweight artifacts when a tiny change does not need them. Howev
28
28
  - which contracts are affected
29
29
  - which tests prove it
30
30
  - which CI/CD gates must run
31
+ - what execution packet implementation agents should follow
31
32
 
32
33
  ## Iteration rule
33
34
 
@@ -17,6 +17,7 @@ def main():
17
17
  mapping={
18
18
  'change-request.md':'change-request.md',
19
19
  'change-classification.md':'change-classification.md',
20
+ 'implementation-plan.md':'implementation-plan.md',
20
21
  'current-behavior.md':'current-behavior.md',
21
22
  'proposal.md':'proposal.md',
22
23
  'spec.md':'spec.md',
@@ -2,7 +2,7 @@
2
2
  """Coarse traceability check for a change folder."""
3
3
  from pathlib import Path
4
4
  import argparse, sys
5
- REQUIRED=['change-classification.md','test-plan.md','ci-gates.md','tasks.yml']
5
+ REQUIRED=['change-classification.md','implementation-plan.md','test-plan.md','ci-gates.md','tasks.yml']
6
6
  def check_change_dir(d):
7
7
  """Check one change directory. Returns list of error strings (empty = pass)."""
8
8
  errors=[]
@@ -18,7 +18,7 @@
18
18
  - reason: (fill only if yes)
19
19
 
20
20
  ## Required Artifacts
21
- Always required: change-request.md, change-classification.md, test-plan.md, ci-gates.md, tasks.yml
21
+ Always required: change-request.md, change-classification.md, implementation-plan.md, test-plan.md, ci-gates.md, tasks.yml, context-manifest.md
22
22
 
23
23
  ## Optional Artifacts (default: no — set yes only with explicit reason)
24
24
  | artifact | create? | reason |
@@ -0,0 +1,56 @@
1
+ ---
2
+ change-id: <id>
3
+ schema-version: 0.1.0
4
+ last-changed: <date>
5
+ ---
6
+
7
+ # Implementation Plan: <change-id>
8
+
9
+ ## Objective
10
+
11
+ (Concrete outcome the implementation agents must deliver.)
12
+
13
+ ## Execution Scope
14
+
15
+ ### In Scope
16
+ -
17
+
18
+ ### Out of Scope
19
+ -
20
+
21
+ ## Required Changes
22
+
23
+ | id | area | required action | owner agent |
24
+ |---|---|---|---|
25
+ | IP-1 | | | |
26
+
27
+ ## File-Level Plan
28
+
29
+ | path or glob | action | notes |
30
+ |---|---|---|
31
+ | | | |
32
+
33
+ ## Contract Updates
34
+
35
+ - API:
36
+ - CSS/UI:
37
+ - Env:
38
+ - Data shape:
39
+ - Business logic:
40
+ - CI/CD:
41
+
42
+ ## Test Execution Plan
43
+
44
+ | acceptance criterion | test file / command | expected signal |
45
+ |---|---|---|
46
+ | AC-1 | | |
47
+
48
+ ## Handoff Constraints
49
+
50
+ - Implementation agents must not infer missing requirements from chat history.
51
+ - If this plan omits a required file, behavior, contract, or test, stop and report `blocked`.
52
+ - Keep implementation within the file-level plan unless a Context Expansion Request is approved.
53
+
54
+ ## Known Risks
55
+
56
+ -
@@ -12,6 +12,7 @@ tasks:
12
12
  - { id: "1.1", section: Preparation, title: "Confirm classification and required artifacts", status: pending }
13
13
  - { id: "1.2", section: Preparation, title: "Confirm contracts to update", status: pending }
14
14
  - { id: "1.3", section: Preparation, title: "Confirm CI/CD gate plan", status: pending }
15
+ - { id: "1.4", section: Preparation, title: "Confirm implementation plan", status: pending }
15
16
  - { id: "2.1", section: "Contract Updates", title: "API contract", status: pending }
16
17
  - { id: "2.2", section: "Contract Updates", title: "CSS/UI contract", status: pending }
17
18
  - { id: "2.3", section: "Contract Updates", title: "Env contract", status: pending }
@@ -18,7 +18,7 @@
18
18
  - reason: (fill only if yes)
19
19
 
20
20
  ## Required Artifacts
21
- Always required: change-request.md, change-classification.md, test-plan.md, ci-gates.md, tasks.yml
21
+ Always required: change-request.md, change-classification.md, implementation-plan.md, test-plan.md, ci-gates.md, tasks.yml, context-manifest.md
22
22
 
23
23
  ## Optional Artifacts (default: no — set yes only with explicit reason)
24
24
  | artifact | create? | reason |
@@ -0,0 +1,56 @@
1
+ ---
2
+ change-id: <id>
3
+ schema-version: 0.1.0
4
+ last-changed: <date>
5
+ ---
6
+
7
+ # Implementation Plan: <change-id>
8
+
9
+ ## Objective
10
+
11
+ (Concrete outcome the implementation agents must deliver.)
12
+
13
+ ## Execution Scope
14
+
15
+ ### In Scope
16
+ -
17
+
18
+ ### Out of Scope
19
+ -
20
+
21
+ ## Required Changes
22
+
23
+ | id | area | required action | owner agent |
24
+ |---|---|---|---|
25
+ | IP-1 | | | |
26
+
27
+ ## File-Level Plan
28
+
29
+ | path or glob | action | notes |
30
+ |---|---|---|
31
+ | | | |
32
+
33
+ ## Contract Updates
34
+
35
+ - API:
36
+ - CSS/UI:
37
+ - Env:
38
+ - Data shape:
39
+ - Business logic:
40
+ - CI/CD:
41
+
42
+ ## Test Execution Plan
43
+
44
+ | acceptance criterion | test file / command | expected signal |
45
+ |---|---|---|
46
+ | AC-1 | | |
47
+
48
+ ## Handoff Constraints
49
+
50
+ - Implementation agents must not infer missing requirements from chat history.
51
+ - If this plan omits a required file, behavior, contract, or test, stop and report `blocked`.
52
+ - Keep implementation within the file-level plan unless a Context Expansion Request is approved.
53
+
54
+ ## Known Risks
55
+
56
+ -
@@ -12,6 +12,7 @@ tasks:
12
12
  - { id: "1.1", section: Preparation, title: "Confirm classification and required artifacts", status: pending }
13
13
  - { id: "1.2", section: Preparation, title: "Confirm contracts to update", status: pending }
14
14
  - { id: "1.3", section: Preparation, title: "Confirm CI/CD gate plan", status: pending }
15
+ - { id: "1.4", section: Preparation, title: "Confirm implementation plan", status: pending }
15
16
  - { id: "2.1", section: "Contract Updates", title: "API contract", status: pending }
16
17
  - { id: "2.2", section: "Contract Updates", title: "CSS/UI contract", status: pending }
17
18
  - { id: "2.3", section: "Contract Updates", title: "Env contract", status: pending }
package/dist/cli/index.js CHANGED
@@ -7756,6 +7756,20 @@ function migrateAgentLogs(changeDir, changed, pendingWrites, pendingDeletes) {
7756
7756
  changed.push(`agent-log/${f} -> agent-log/${yamlName}`);
7757
7757
  }
7758
7758
  }
7759
+ function ensureImplementationPlanScaffold(changeId, changeDir, changed, warnings, pendingWrites) {
7760
+ const planPath = join13(changeDir, "implementation-plan.md");
7761
+ if (existsSync12(planPath))
7762
+ return;
7763
+ const templatePath = join13(ASSET.specsTemplates, "implementation-plan.md");
7764
+ if (!existsSync12(templatePath)) {
7765
+ warnings.push("implementation-plan.md template not found; run cdd-kit upgrade --yes after updating cdd-kit");
7766
+ return;
7767
+ }
7768
+ const template = readFileSync11(templatePath, "utf8").replace(/<change-id>/g, changeId).replace(/<id>/g, changeId);
7769
+ pendingWrites.push({ path: planPath, content: template });
7770
+ changed.push("implementation-plan.md: added scaffold");
7771
+ warnings.push("implementation-plan.md scaffold added; fill it before implementation agents continue");
7772
+ }
7759
7773
  function migrateOne(changeId, changeDir, enableContextGovernance) {
7760
7774
  const changed = [];
7761
7775
  const warnings = [];
@@ -7793,6 +7807,7 @@ function migrateOne(changeId, changeDir, enableContextGovernance) {
7793
7807
  }
7794
7808
  }
7795
7809
  migrateTasksFile(changeId, changeDir, enableContextGovernance, detectedTier, changed, warnings, pending, deletes);
7810
+ ensureImplementationPlanScaffold(changeId, changeDir, changed, warnings, pending);
7796
7811
  migrateAgentLogs(changeDir, changed, pending, deletes);
7797
7812
  const manifestPath = join13(changeDir, "context-manifest.md");
7798
7813
  if (!existsSync12(manifestPath)) {
@@ -7946,6 +7961,7 @@ var init_migrate = __esm({
7946
7961
  "src/commands/migrate.ts"() {
7947
7962
  "use strict";
7948
7963
  init_logger();
7964
+ init_paths();
7949
7965
  }
7950
7966
  });
7951
7967
 
@@ -11668,6 +11684,7 @@ async function ensureFreshContextIndexes(cwd) {
11668
11684
  var REQUIRED_TEMPLATES = [
11669
11685
  "change-request.md",
11670
11686
  "change-classification.md",
11687
+ "implementation-plan.md",
11671
11688
  "test-plan.md",
11672
11689
  "ci-gates.md",
11673
11690
  "tasks.yml",
@@ -11917,6 +11934,7 @@ var TASKS_STATUS_ENUM = /* @__PURE__ */ new Set([
11917
11934
  var REQUIRED_FILES = [
11918
11935
  "change-request.md",
11919
11936
  "change-classification.md",
11937
+ "implementation-plan.md",
11920
11938
  "test-plan.md",
11921
11939
  "ci-gates.md",
11922
11940
  "tasks.yml",
@@ -11925,6 +11943,7 @@ var REQUIRED_FILES = [
11925
11943
  var TIER_PATTERN = /\b(tier\s*[0-5]|low|medium|high|critical)\b/i;
11926
11944
  var MIN_CHARS = {
11927
11945
  "change-classification.md": 200,
11946
+ "implementation-plan.md": 200,
11928
11947
  "test-plan.md": 200,
11929
11948
  "ci-gates.md": 150,
11930
11949
  "change-request.md": 100,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contract-driven-delivery",
3
- "version": "2.0.17",
3
+ "version": "2.0.18",
4
4
  "description": "Contract-driven delivery kit for AI coding agents with deterministic context indexes, manifest-backed read-scope governance, and orchestrated contracts-first delivery.",
5
5
  "keywords": [
6
6
  "contract-driven",