contract-driven-delivery 2.0.17 → 2.0.19
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.
- package/CHANGELOG.md +57 -0
- package/README.md +111 -15
- package/assets/AGENTS.template.md +1 -0
- package/assets/CLAUDE.template.md +4 -0
- package/assets/CODEX.template.md +4 -0
- package/assets/agents/backend-engineer.md +3 -1
- package/assets/agents/change-classifier.md +32 -4
- package/assets/agents/ci-cd-gatekeeper.md +4 -0
- package/assets/agents/e2e-resilience-engineer.md +6 -1
- package/assets/agents/frontend-engineer.md +3 -1
- package/assets/agents/implementation-planner.md +144 -0
- package/assets/agents/monkey-test-engineer.md +7 -0
- package/assets/agents/qa-reviewer.md +8 -0
- package/assets/agents/spec-architect.md +1 -1
- package/assets/agents/spec-drift-auditor.md +8 -0
- package/assets/agents/stress-soak-engineer.md +12 -1
- package/assets/agents/test-strategist.md +1 -0
- package/assets/agents/ui-ux-reviewer.md +7 -0
- package/assets/agents/visual-reviewer.md +9 -0
- package/assets/cdd/model-policy.json +1 -0
- package/assets/skills/cdd-new/SKILL.md +75 -22
- package/assets/skills/cdd-resume/SKILL.md +9 -0
- package/assets/skills/contract-driven-delivery/SKILL.md +31 -6
- package/assets/skills/contract-driven-delivery/references/qa-gates.md +5 -1
- package/assets/skills/contract-driven-delivery/references/spec-drift-policy.md +4 -1
- package/assets/skills/contract-driven-delivery/references/stress-soak-standard.md +4 -0
- package/assets/skills/contract-driven-delivery/references/visual-review-standard.md +4 -1
- package/assets/skills/contract-driven-delivery/references/workflow-router.md +3 -2
- package/assets/skills/contract-driven-delivery/scripts/generate_change_scaffold.py +14 -4
- package/assets/skills/contract-driven-delivery/scripts/validate_spec_traceability.py +1 -1
- package/assets/skills/contract-driven-delivery/templates/change-classification.md +12 -2
- package/assets/skills/contract-driven-delivery/templates/ci-gates.md +4 -0
- package/assets/skills/contract-driven-delivery/templates/implementation-plan.md +65 -0
- package/assets/skills/contract-driven-delivery/templates/tasks.yml +3 -1
- package/assets/skills/contract-driven-delivery/templates/test-plan.md +1 -1
- package/assets/specs-templates/change-classification.md +12 -2
- package/assets/specs-templates/ci-gates.md +4 -0
- package/assets/specs-templates/implementation-plan.md +65 -0
- package/assets/specs-templates/tasks.yml +3 -1
- package/assets/specs-templates/test-plan.md +1 -1
- package/dist/cli/index.js +19 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,62 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.19] - 2026-05-15
|
|
4
|
+
|
|
5
|
+
Design ownership patch for the implementation-planning flow.
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- **`design.md` now has an explicit owner and task**: `spec-architect` owns
|
|
10
|
+
`specs/changes/<change-id>/design.md`; `tasks.yml` now tracks required
|
|
11
|
+
design confirmation separately from CI gate planning and implementation
|
|
12
|
+
planning.
|
|
13
|
+
- **Optional report artifacts are now minimized**: routine reviewer evidence
|
|
14
|
+
should use concise `agent-log/*.yml` pointers; report markdown is reserved for
|
|
15
|
+
blocking findings, approved-with-risk decisions, excluded pre-existing
|
|
16
|
+
failures, visual evidence bundles, or high-risk stress/soak results.
|
|
17
|
+
- **Execution artifacts now reference instead of duplicate**:
|
|
18
|
+
`implementation-plan.md`, `test-plan.md`, and `ci-gates.md` now instruct
|
|
19
|
+
agents to reference source artifacts by path/section/id instead of copying
|
|
20
|
+
full design, test, CI, or contract prose.
|
|
21
|
+
- **Planner no longer backfills design**: `implementation-planner` now blocks
|
|
22
|
+
and routes back to `spec-architect` if classification requires design but
|
|
23
|
+
`design.md` is missing or still scaffolded.
|
|
24
|
+
- **Classifier and resume routing are stricter**: classification now keeps
|
|
25
|
+
`Architecture Review Required`, Optional Artifacts `design.md`, Required
|
|
26
|
+
Agents, and task `1.3` consistent; `/cdd-resume` resumes from
|
|
27
|
+
`spec-architect` before planning when required design is missing.
|
|
28
|
+
|
|
29
|
+
## [2.0.18] - 2026-05-15
|
|
30
|
+
|
|
31
|
+
Implementation planning handoff release. This adds a senior planning step so
|
|
32
|
+
implementation agents receive a concise execution packet instead of inferring
|
|
33
|
+
scope from chat history.
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- **`implementation-planner` agent**: writes
|
|
38
|
+
`specs/changes/<change-id>/implementation-plan.md` after classification,
|
|
39
|
+
contracts, test plan, design, and CI gate plan are known.
|
|
40
|
+
- **Required `implementation-plan.md` template**: new changes scaffold it by
|
|
41
|
+
default, `cdd-kit gate` validates it, and `cdd-kit migrate` adds a scaffold
|
|
42
|
+
for existing active changes.
|
|
43
|
+
- **Upgrade documentation**: README now explains how to sync npm package
|
|
44
|
+
updates into global agents/skills, repo templates, `.cdd/model-policy.json`,
|
|
45
|
+
hooks, code-map, and existing change directories.
|
|
46
|
+
|
|
47
|
+
### Changed
|
|
48
|
+
|
|
49
|
+
- **Implementation agents now consume the plan**: backend, frontend, E2E,
|
|
50
|
+
monkey, and stress/soak agents must read `implementation-plan.md` and report
|
|
51
|
+
`blocked` instead of inferring missing scope.
|
|
52
|
+
- **`/cdd-new` ordering now plans before implementation**: contracts, test
|
|
53
|
+
plan, design if needed, and CI gate plan come before `implementation-planner`;
|
|
54
|
+
backend/frontend/test implementation agents start only after task `1.4`
|
|
55
|
+
confirms the implementation plan.
|
|
56
|
+
- **Traceability helpers include implementation plan**:
|
|
57
|
+
`generate_change_scaffold.py` copies the new template and
|
|
58
|
+
`validate_spec_traceability.py` treats it as required.
|
|
59
|
+
|
|
3
60
|
## [2.0.17] - 2026-05-07
|
|
4
61
|
|
|
5
62
|
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
|
|
98
|
-
7.
|
|
99
|
-
8.
|
|
100
|
-
9.
|
|
97
|
+
6. Agents run in order: contracts ??test plan ??`spec-architect` writes `design.md` if required ??CI/CD gates ??implementation plan ??backend engineer ??frontend engineer ??QA
|
|
98
|
+
7. `implementation-planner` reads the confirmed artifacts and writes `implementation-plan.md`, the concise execution packet implementation agents follow. It does not create `design.md`; missing required design routes back to `spec-architect`.
|
|
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
|
|
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 owned artifacts directly: for example, `spec-architect` owns `design.md`, while `implementation-planner` owns `implementation-plan.md`.
|
|
123
124
|
|
|
124
125
|
This split is deliberate:
|
|
125
126
|
|
|
@@ -127,9 +128,28 @@ This split is deliberate:
|
|
|
127
128
|
- Implementation and planning agents write directly so large artifacts and code edits do not have to be relayed back through the main orchestrator, which reduces token waste and preserves clearer ownership.
|
|
128
129
|
- `tasks.yml` remains owned by main Claude so task state changes stay centralized even when multiple agents contribute files.
|
|
129
130
|
|
|
131
|
+
### Artifact Minimization
|
|
132
|
+
|
|
133
|
+
CDD keeps the authoritative artifact set small. Routine reviewer findings should
|
|
134
|
+
not become new markdown files.
|
|
135
|
+
|
|
136
|
+
| artifact class | files | rule |
|
|
137
|
+
|---|---|---|
|
|
138
|
+
| Core decision and planning | `change-classification.md`, `context-manifest.md`, `test-plan.md`, `ci-gates.md`, `implementation-plan.md`, `tasks.yml` | required for implementation changes |
|
|
139
|
+
| Conditional design | `design.md` | only when `spec-architect` is required |
|
|
140
|
+
| Durable evidence reports | `qa-report.md`, `visual-review-report.md`, `regression-report.md`, `monkey-test-report.md`, `stress-soak-report.md` | only for blocking findings, approved-with-risk, excluded pre-existing failures, visual evidence bundles, or high-risk load/soak results |
|
|
141
|
+
| Lightweight traces | `agent-log/*.yml` | optional concise pointers for routine evidence and resume/debugging |
|
|
142
|
+
|
|
143
|
+
Later artifacts should reference earlier artifacts by path, section, acceptance
|
|
144
|
+
criterion, decision id, or gate name. They should not copy full test strategy,
|
|
145
|
+
CI policy, design rationale, or contract prose. This keeps token use bounded
|
|
146
|
+
and prevents multiple markdown files from becoming conflicting sources of
|
|
147
|
+
truth.
|
|
148
|
+
|
|
130
149
|
**You stay in control by:**
|
|
131
150
|
- Reviewing the `change-classification.md` before implementation starts
|
|
132
151
|
- Checking the `test-plan.md` to confirm the right test families are planned
|
|
152
|
+
- Checking `implementation-plan.md` when you want to review the exact execution packet before code changes
|
|
133
153
|
- Reading the final QA summary for the release-readiness verdict
|
|
134
154
|
|
|
135
155
|
---
|
|
@@ -271,6 +291,48 @@ Codex currently has no global assets to update, so Codex-only projects report th
|
|
|
271
291
|
|
|
272
292
|
---
|
|
273
293
|
|
|
294
|
+
### After Updating the npm Package
|
|
295
|
+
|
|
296
|
+
Updating npm only replaces the `cdd-kit` CLI package. Existing repos and
|
|
297
|
+
global Claude Code assets keep their previously copied agents, skills,
|
|
298
|
+
templates, hooks, and `.cdd/model-policy.json` until you sync them.
|
|
299
|
+
|
|
300
|
+
Recommended one-command sync after `npm update -g contract-driven-delivery`:
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
cdd-kit refresh # dry-run preview
|
|
304
|
+
cdd-kit refresh --yes # apply agents, skills, templates, model policy, hook, code-map
|
|
305
|
+
cdd-kit migrate --all # add new per-change scaffolds such as implementation-plan.md
|
|
306
|
+
cdd-kit doctor --strict
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
What gets updated:
|
|
310
|
+
|
|
311
|
+
| command | updates | preserves |
|
|
312
|
+
|---|---|---|
|
|
313
|
+
| `cdd-kit update --yes` | `~/.claude/agents/` and `~/.claude/skills/` for Claude provider projects | project files |
|
|
314
|
+
| `cdd-kit upgrade --yes` | missing repo files only: contracts, templates, `.cdd/`, guidance, workflows | existing files and project guidance |
|
|
315
|
+
| `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 |
|
|
316
|
+
| `cdd-kit migrate --all` | existing `specs/changes/*` metadata and new required scaffolds | implementation code and completed archive history |
|
|
317
|
+
|
|
318
|
+
For releases 2.0.18 and newer, run `cdd-kit refresh --yes` so the
|
|
319
|
+
`implementation-planner` agent, updated `/cdd-new` and `/cdd-resume` skills,
|
|
320
|
+
fresh `specs/templates/`, and `.cdd/model-policy.json` role binding are all in
|
|
321
|
+
place. Then run `cdd-kit migrate --all` so existing active change directories
|
|
322
|
+
receive `implementation-plan.md`; fill required `design.md` with
|
|
323
|
+
`spec-architect` before resuming the planner or implementation agents.
|
|
324
|
+
|
|
325
|
+
If you do not want template overwrites, run the narrower path:
|
|
326
|
+
|
|
327
|
+
```bash
|
|
328
|
+
cdd-kit update --yes
|
|
329
|
+
cdd-kit upgrade --yes
|
|
330
|
+
cdd-kit migrate --all
|
|
331
|
+
cdd-kit doctor --strict
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
274
336
|
### `cdd-kit doctor`
|
|
275
337
|
|
|
276
338
|
Inspects repo-level cdd-kit health. Default mode is read-only; `--fix` applies only the safe auto-remediations.
|
|
@@ -304,6 +366,33 @@ Use this for old repos that already have `contracts/` or `specs/` but are missin
|
|
|
304
366
|
|
|
305
367
|
---
|
|
306
368
|
|
|
369
|
+
### `cdd-kit refresh`
|
|
370
|
+
|
|
371
|
+
Complete sync after upgrading the npm package. Default mode is a dry run.
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
cdd-kit refresh
|
|
375
|
+
cdd-kit refresh --yes
|
|
376
|
+
cdd-kit refresh --yes --provider both
|
|
377
|
+
cdd-kit refresh --yes --no-templates
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
`refresh --yes` runs the practical upgrade sequence:
|
|
381
|
+
|
|
382
|
+
1. `cdd-kit update --yes` for global Claude agents and skills.
|
|
383
|
+
2. `cdd-kit upgrade --yes` for missing project files.
|
|
384
|
+
3. Force-refreshes kit-shipped `specs/templates/`, `tests/templates/`,
|
|
385
|
+
`ci-templates/`, and `.github/workflows/` with backup under
|
|
386
|
+
`.cdd/.refresh-backup/`.
|
|
387
|
+
4. Re-installs the code-map hook if the project marker exists.
|
|
388
|
+
5. Resyncs `.cdd/model-policy.json` roles from installed agent frontmatter.
|
|
389
|
+
6. Regenerates `.cdd/code-map.yml`.
|
|
390
|
+
|
|
391
|
+
Run `cdd-kit migrate --all` separately when you need existing
|
|
392
|
+
`specs/changes/*` directories to gain new required artifacts.
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
307
396
|
### `cdd-kit gate <change-id>`
|
|
308
397
|
|
|
309
398
|
The single quality gate for a change. Blocks merge if anything is missing or incomplete.
|
|
@@ -314,7 +403,7 @@ cdd-kit gate add-jwt-auth --strict
|
|
|
314
403
|
```
|
|
315
404
|
|
|
316
405
|
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`)
|
|
406
|
+
- 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
407
|
- Each artifact has sufficient content and is not a stub.
|
|
319
408
|
- `change-classification.md` contains a tier or risk marker.
|
|
320
409
|
- Atomic `depends-on` upstream changes are completed or archived before dependent work gates.
|
|
@@ -392,6 +481,7 @@ cdd-kit migrate --all --enable-context-governance
|
|
|
392
481
|
What it upgrades:
|
|
393
482
|
- `tasks.yml`: converts legacy `tasks.md` checklist/frontmatter into structured YAML task records
|
|
394
483
|
- `change-classification.md`: detects old `**Tier:** Tier N` format and appends the new `## Tier\n- N` section so tier-based gate checks activate
|
|
484
|
+
- `implementation-plan.md`: adds the execution-plan scaffold required before backend/frontend/test implementation agents continue
|
|
395
485
|
- `context-manifest.md`: adds a legacy manifest scaffold by default so old changes can use the same pre-read planning layer
|
|
396
486
|
- `--enable-context-governance`: explicitly adds `context-governance: v1` and a context-governed manifest scaffold for pre-read planning
|
|
397
487
|
|
|
@@ -507,6 +597,10 @@ cdd-kit new add-user-api --depends-on add-user-db
|
|
|
507
597
|
cdd-kit new add-user-auth --skip-scan
|
|
508
598
|
```
|
|
509
599
|
|
|
600
|
+
Prefer the default scaffold. `--all` is mainly for template inspection or
|
|
601
|
+
manual workflows; `/cdd-new` should create optional markdown only when
|
|
602
|
+
classification requires it or review evidence needs durable prose.
|
|
603
|
+
|
|
510
604
|
By default, `cdd-kit new` auto-runs `cdd-kit context-scan` when `specs/context/` indexes are missing or stale. Use `--skip-scan` only if you intentionally want a bare scaffold without refreshing classifier indexes first.
|
|
511
605
|
|
|
512
606
|
For larger requests, split the work into atomic changes on the same feature branch and use `--depends-on` to record upstream order. `cdd-kit gate` blocks a dependent change until each upstream change is either archived or has `status: completed` in its `tasks.yml`.
|
|
@@ -583,8 +677,8 @@ The classifier should read these two files before proposing `context-manifest.md
|
|
|
583
677
|
|
|
584
678
|
```bash
|
|
585
679
|
npm update -g contract-driven-delivery
|
|
586
|
-
cdd-kit
|
|
587
|
-
cdd-kit
|
|
680
|
+
cdd-kit refresh --yes
|
|
681
|
+
cdd-kit migrate --all
|
|
588
682
|
cdd-kit doctor --strict
|
|
589
683
|
```
|
|
590
684
|
|
|
@@ -598,7 +692,9 @@ git add specs/changes/
|
|
|
598
692
|
git commit -m "chore: migrate changes to current cdd-kit format"
|
|
599
693
|
```
|
|
600
694
|
|
|
601
|
-
This gives those legacy specs a new `tasks.yml`, tier markers,
|
|
695
|
+
This gives those legacy specs a new `tasks.yml`, tier markers,
|
|
696
|
+
`implementation-plan.md`, and a warning-mode `context-manifest.md` without
|
|
697
|
+
forcing strict context governance on closed work.
|
|
602
698
|
|
|
603
699
|
### Old in-progress specs
|
|
604
700
|
|
|
@@ -613,14 +709,14 @@ cdd-kit doctor --strict
|
|
|
613
709
|
Then choose one path per active change:
|
|
614
710
|
|
|
615
711
|
- 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.
|
|
712
|
+
- 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
713
|
|
|
618
714
|
### Recommended rollout for production repos already burned by token overuse
|
|
619
715
|
|
|
620
|
-
1. Run `cdd-kit
|
|
621
|
-
2. Run `cdd-kit
|
|
622
|
-
3.
|
|
623
|
-
4.
|
|
716
|
+
1. Run `cdd-kit refresh --yes` once per repo after updating the npm package.
|
|
717
|
+
2. Run `cdd-kit migrate --all` so existing active changes receive the current required artifact set.
|
|
718
|
+
3. Review and fill `implementation-plan.md` before resuming implementation agents on active changes.
|
|
719
|
+
4. Run `cdd-kit doctor --strict` in CI.
|
|
624
720
|
5. Migrate active specs with `cdd-kit migrate --enable-context-governance` only after reviewing the generated manifest.
|
|
625
721
|
6. Teach agents to use `cdd-kit context request/approve/reject/list` instead of silently widening context.
|
|
626
722
|
|
|
@@ -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.
|
package/assets/CODEX.template.md
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
|
@@ -152,9 +152,32 @@ The following 5 artifacts are always required for implementation changes:
|
|
|
152
152
|
| design.md | no | |
|
|
153
153
|
| qa-report.md | no | |
|
|
154
154
|
| regression-report.md | no | |
|
|
155
|
+
| visual-review-report.md | no | |
|
|
156
|
+
| monkey-test-report.md | no | |
|
|
157
|
+
| stress-soak-report.md | no | |
|
|
155
158
|
|
|
156
159
|
Note: `archive.md` is created during change close-out, not at classification time.
|
|
157
160
|
|
|
161
|
+
Artifact minimization rule:
|
|
162
|
+
- Do not create optional markdown just because an agent can write or review it.
|
|
163
|
+
- Prefer short `agent-log/*.yml` pointers for routine evidence, reviewer notes,
|
|
164
|
+
and pass/fail summaries.
|
|
165
|
+
- Set `qa-report.md`, `visual-review-report.md`, `regression-report.md`,
|
|
166
|
+
`monkey-test-report.md`, or `stress-soak-report.md` to `yes` only when the
|
|
167
|
+
change needs durable prose evidence: blocking findings, approved-with-risk,
|
|
168
|
+
pre-existing failures excluded from the gate, visual evidence bundles, or
|
|
169
|
+
high-risk load/soak results.
|
|
170
|
+
- Set `current-behavior.md`, `proposal.md`, or `spec.md` to `yes` only when the
|
|
171
|
+
request needs a separate product investigation or user-facing behavior
|
|
172
|
+
decision that does not fit in classification, design, or implementation plan.
|
|
173
|
+
- Later artifacts should reference earlier artifacts by path/section/id instead
|
|
174
|
+
of copying full rationale, tests, CI gates, or design decisions.
|
|
175
|
+
|
|
176
|
+
Design consistency rule:
|
|
177
|
+
- If `Architecture Review Required` is `yes`, set `design.md` to `yes` and include `spec-architect` in `## Required Agents`.
|
|
178
|
+
- If `design.md` is `yes`, `Architecture Review Required` must also be `yes` and `spec-architect` must be listed.
|
|
179
|
+
- If no design review is needed, include task `1.3` in `## Tasks Not Applicable`.
|
|
180
|
+
|
|
158
181
|
## Required Contracts
|
|
159
182
|
- API:
|
|
160
183
|
- CSS/UI:
|
|
@@ -251,7 +274,7 @@ concrete pointer (path:line-range, test-id, URL, or pass/fail string):
|
|
|
251
274
|
artifacts:
|
|
252
275
|
- { type: tier, pointer: "Tier 2" }
|
|
253
276
|
- { type: risk, pointer: "medium" }
|
|
254
|
-
- { type: required-artifacts, pointer: "change-request, classification, test-plan, ci-gates, tasks" }
|
|
277
|
+
- { type: required-artifacts, pointer: "change-request, classification, context-manifest, test-plan, ci-gates, implementation-plan, tasks" }
|
|
255
278
|
- { type: required-reviewers, pointer: "contract-reviewer, qa-reviewer" }
|
|
256
279
|
- { type: context-manifest-draft, pointer: "specs/changes/<id>/context-manifest.md#allowed-paths" }
|
|
257
280
|
```
|
|
@@ -263,7 +286,10 @@ If a recommended `type` does not apply to your run, either omit it or use `point
|
|
|
263
286
|
- A single request can be both `ui-only-change` and `api-only-change` ??list both as primary; require both UI/UX-visual review AND contract tests.
|
|
264
287
|
- `bug-fix` that requires a contract change is no longer just a bug-fix ??promote to `feature-enhancement` or `business-logic-change` to force the contract path.
|
|
265
288
|
- `refactor` that touches CI gates is also a `ci-cd-change`.
|
|
266
|
-
- When uncertain, classify upward
|
|
289
|
+
- When uncertain, classify upward for risk and required agents, but keep optional
|
|
290
|
+
artifacts minimal. The cost of a skipped required artifact is high; the cost
|
|
291
|
+
of unnecessary optional markdown is also high because it increases token load
|
|
292
|
+
and creates duplicate sources of truth.
|
|
267
293
|
|
|
268
294
|
## Routing rules
|
|
269
295
|
|
|
@@ -274,3 +300,5 @@ If a recommended `type` does not apply to your run, either omit it or use `point
|
|
|
274
300
|
- High-load, auto-refresh, queue, cache, report, or long-running job change requires stress or soak consideration.
|
|
275
301
|
- Existing behavior changes require current behavior and regression scope.
|
|
276
302
|
- Bug fixes require reproduction, root cause, failing test, and regression test whenever feasible.
|
|
303
|
+
- Architecture review, non-obvious design decisions, module-boundary changes, data-flow changes, migration/rollback decisions, compatibility trade-offs, or operational-risk decisions require `spec-architect` to write `design.md` before `implementation-planner` runs.
|
|
304
|
+
- 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,10 @@ You are the CI/CD gatekeeper.
|
|
|
9
9
|
|
|
10
10
|
CI/CD is mandatory. Every change must have a `ci-gates.md` plan, even if the plan states that existing gates are sufficient. You both design the gate plan and apply the required workflow changes.
|
|
11
11
|
|
|
12
|
+
Keep `ci-gates.md` as the authority for gate policy only. Reference
|
|
13
|
+
`test-plan.md` rows, acceptance criteria, or test commands; do not duplicate the
|
|
14
|
+
full test strategy or implementation plan.
|
|
15
|
+
|
|
12
16
|
## Responsibilities
|
|
13
17
|
|
|
14
18
|
- Design the gate plan (`ci-gates.md`) for every change.
|
|
@@ -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
|
|
@@ -31,7 +33,10 @@ Your tests must prove that real user journeys and realistic failure modes behave
|
|
|
31
33
|
|
|
32
34
|
## Output
|
|
33
35
|
|
|
34
|
-
Record test files, scenarios, fixtures/mocks, commands, screenshots/videos, and
|
|
36
|
+
Record test files, scenarios, fixtures/mocks, commands, screenshots/videos, and
|
|
37
|
+
mutation checks in concise response text plus optional `agent-log/*.yml`
|
|
38
|
+
evidence pointers. Do not create separate markdown reports unless
|
|
39
|
+
classification explicitly requires one or failures need durable prose.
|
|
35
40
|
|
|
36
41
|
## Read scope
|
|
37
42
|
|
|
@@ -7,7 +7,7 @@ model: sonnet
|
|
|
7
7
|
|
|
8
8
|
You are the frontend engineer.
|
|
9
9
|
|
|
10
|
-
Before editing, read
|
|
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,144 @@
|
|
|
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
|
+
You have the Edit tool and should write that file directly. If the runtime
|
|
15
|
+
denies file writes, report `blocked` with the exact target path and do not
|
|
16
|
+
continue as if the plan were written.
|
|
17
|
+
|
|
18
|
+
## Inputs
|
|
19
|
+
|
|
20
|
+
Read these change artifacts first:
|
|
21
|
+
|
|
22
|
+
- `specs/changes/<change-id>/change-request.md`
|
|
23
|
+
- `specs/changes/<change-id>/change-classification.md`
|
|
24
|
+
- `specs/changes/<change-id>/context-manifest.md`
|
|
25
|
+
- `specs/changes/<change-id>/test-plan.md`
|
|
26
|
+
- `specs/changes/<change-id>/ci-gates.md`
|
|
27
|
+
- `specs/changes/<change-id>/design.md` if present
|
|
28
|
+
- `specs/changes/<change-id>/current-behavior.md` if present
|
|
29
|
+
- `specs/changes/<change-id>/proposal.md` if present
|
|
30
|
+
- relevant contract paths listed in the context manifest
|
|
31
|
+
|
|
32
|
+
Use the context manifest as the read boundary. If required context is missing, add a Context Expansion Request and report `blocked` instead of guessing.
|
|
33
|
+
|
|
34
|
+
If `change-classification.md` says `Architecture Review Required: yes`, marks
|
|
35
|
+
Optional Artifacts `design.md` as `yes`, or lists `spec-architect` in
|
|
36
|
+
`## Required Agents`, then `specs/changes/<change-id>/design.md` must already
|
|
37
|
+
exist and be filled before you plan. If it is missing or still a scaffold,
|
|
38
|
+
report `blocked` and route back to `spec-architect`. Do not create or repair
|
|
39
|
+
`design.md` yourself.
|
|
40
|
+
|
|
41
|
+
## Planning Rules
|
|
42
|
+
|
|
43
|
+
- Write an execution plan, not a rationale document.
|
|
44
|
+
- Include only the background needed to execute safely.
|
|
45
|
+
- Name concrete files, directories, contracts, and tests whenever known.
|
|
46
|
+
- Reference `test-plan.md`, `ci-gates.md`, `design.md`, and contract files by
|
|
47
|
+
path, section, criterion id, decision id, or gate name. Do not copy their full
|
|
48
|
+
prose into this plan.
|
|
49
|
+
- State non-goals clearly so implementation agents do not opportunistically refactor.
|
|
50
|
+
- Map every required change to an owner agent.
|
|
51
|
+
- Map acceptance criteria to tests or verification commands.
|
|
52
|
+
- If the chosen approach is not clear from the artifacts, stop and report `blocked`.
|
|
53
|
+
- If a bug fix lacks reproduction, root cause, or regression coverage and the classification says those are required, stop and report `blocked`.
|
|
54
|
+
- Never write `design.md`; design decisions are owned by `spec-architect`.
|
|
55
|
+
|
|
56
|
+
## Output
|
|
57
|
+
|
|
58
|
+
Write `specs/changes/<change-id>/implementation-plan.md` with this structure:
|
|
59
|
+
|
|
60
|
+
```md
|
|
61
|
+
# Implementation Plan: <change-id>
|
|
62
|
+
|
|
63
|
+
## Objective
|
|
64
|
+
(Concrete outcome the implementation agents must deliver.)
|
|
65
|
+
|
|
66
|
+
## Execution Scope
|
|
67
|
+
|
|
68
|
+
### In Scope
|
|
69
|
+
- ...
|
|
70
|
+
|
|
71
|
+
### Out of Scope
|
|
72
|
+
- ...
|
|
73
|
+
|
|
74
|
+
## Required Changes
|
|
75
|
+
| id | area | required action | owner agent |
|
|
76
|
+
|---|---|---|---|
|
|
77
|
+
| IP-1 | ... | ... | backend-engineer |
|
|
78
|
+
|
|
79
|
+
## Source Artifact Pointers
|
|
80
|
+
| source | relevant pointer | used for |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| test-plan.md | AC-1 | tests to run/write |
|
|
83
|
+
| ci-gates.md | required gates table | verification commands |
|
|
84
|
+
| design.md | Decision: ... | implementation constraint |
|
|
85
|
+
|
|
86
|
+
## File-Level Plan
|
|
87
|
+
| path or glob | action | notes |
|
|
88
|
+
|---|---|---|
|
|
89
|
+
|
|
90
|
+
## Contract Updates
|
|
91
|
+
- API:
|
|
92
|
+
- CSS/UI:
|
|
93
|
+
- Env:
|
|
94
|
+
- Data shape:
|
|
95
|
+
- Business logic:
|
|
96
|
+
- CI/CD:
|
|
97
|
+
|
|
98
|
+
## Test Execution Plan
|
|
99
|
+
| acceptance criterion | test file / command | expected signal |
|
|
100
|
+
|---|---|---|
|
|
101
|
+
|
|
102
|
+
## Handoff Constraints
|
|
103
|
+
- Implementation agents must not infer missing requirements from chat history.
|
|
104
|
+
- Do not re-copy full design, test strategy, CI policy, or contract prose into this plan; follow the source pointers above.
|
|
105
|
+
- If this plan omits a required file, behavior, contract, or test, stop and report `blocked`.
|
|
106
|
+
- Keep implementation within the file-level plan unless a Context Expansion Request is approved.
|
|
107
|
+
|
|
108
|
+
## Known Risks
|
|
109
|
+
- ...
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Read scope
|
|
113
|
+
|
|
114
|
+
Source of truth: `specs/changes/<change-id>/context-manifest.md` -> `## Allowed Paths`.
|
|
115
|
+
Read it first. Read only paths it lists or paths under `## Approved Expansions`.
|
|
116
|
+
|
|
117
|
+
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>`.
|
|
118
|
+
|
|
119
|
+
Forbidden by default: `specs/archive/`, sibling `specs/changes/*`, `assets/`, `node_modules/`, `dist/`, `build/`, `.git/`, `.claude/worktrees/`.
|
|
120
|
+
|
|
121
|
+
## Optional Handoff Evidence
|
|
122
|
+
|
|
123
|
+
If a short handoff note is useful, write or append to
|
|
124
|
+
`specs/changes/<change-id>/agent-log/<your-agent-name>.yml`.
|
|
125
|
+
Optional fields and field rules are defined once in
|
|
126
|
+
`references/agent-log-protocol.md`.
|
|
127
|
+
|
|
128
|
+
### Suggested artifacts for this agent
|
|
129
|
+
|
|
130
|
+
`artifacts` is a YAML array of `{type, pointer}` items in your agent log.
|
|
131
|
+
|
|
132
|
+
Recommended artifact types:
|
|
133
|
+
|
|
134
|
+
- `plan-written`: implementation plan path
|
|
135
|
+
- `owner-map`: implementation owners covered
|
|
136
|
+
- `blocked-reason`: concrete blocker, if blocked
|
|
137
|
+
- `scope-summary`: concise in-scope / out-of-scope summary
|
|
138
|
+
|
|
139
|
+
```yaml
|
|
140
|
+
artifacts:
|
|
141
|
+
- { type: plan-written, pointer: "specs/changes/<id>/implementation-plan.md" }
|
|
142
|
+
- { type: owner-map, pointer: "backend-engineer, frontend-engineer" }
|
|
143
|
+
- { type: scope-summary, pointer: "3 in scope, 2 out of scope" }
|
|
144
|
+
```
|
|
@@ -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:
|
|
@@ -35,6 +37,11 @@ id, seed/input, baseline commit or prior evidence, and whether this change
|
|
|
35
37
|
touched the failing surface. Mark it as a follow-up when it is outside this
|
|
36
38
|
change's scope; keep new or regressed failures blocking.
|
|
37
39
|
|
|
40
|
+
Default reporting should be concise response text plus optional
|
|
41
|
+
`agent-log/*.yml` evidence pointers. Create `monkey-test-report.md` only when
|
|
42
|
+
classification explicitly requires it, when failures or excluded pre-existing
|
|
43
|
+
issues need durable prose, or when QA needs approved-with-risk evidence.
|
|
44
|
+
|
|
38
45
|
## Tools
|
|
39
46
|
|
|
40
47
|
- Property-based ??fast-check (JS/TS), hypothesis (Python), proptest (Rust) for state machine invariants.
|
|
@@ -53,6 +53,14 @@ Invoke `spec-drift-auditor` at the following points (do not wait for issues to s
|
|
|
53
53
|
|
|
54
54
|
## Output
|
|
55
55
|
|
|
56
|
+
Default output is a concise QA verdict in your response plus an optional
|
|
57
|
+
`Agent Log` YAML block. Do not ask main Claude to create `qa-report.md` for a
|
|
58
|
+
routine approved change.
|
|
59
|
+
|
|
60
|
+
Emit a full `# QA Report` body only when `change-classification.md` explicitly
|
|
61
|
+
requires `qa-report.md`, or when the decision is `blocked` /
|
|
62
|
+
`approved-with-risk`, or when pre-existing failures are excluded from this gate.
|
|
63
|
+
|
|
56
64
|
```md
|
|
57
65
|
# QA Report
|
|
58
66
|
|
|
@@ -7,7 +7,7 @@ model: opus
|
|
|
7
7
|
|
|
8
8
|
You are the architecture reviewer.
|
|
9
9
|
|
|
10
|
-
Do not implement or modify production code, tests, configs, or contracts. Your
|
|
10
|
+
Do not implement or modify production code, tests, configs, or contracts. You are the owner for `specs/changes/<change-id>/design.md`. Your primary write target is `specs/changes/<change-id>/design.md`. You may also write an ADR under `docs/adr/` when the ADR rule below applies. Evaluate whether the proposed change affects architecture, contracts, module boundaries, performance, data flow, compatibility, deployment, or operational risk.
|
|
11
11
|
|
|
12
12
|
## ADR rule
|
|
13
13
|
|