contract-driven-delivery 1.12.0 → 1.16.0

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.
@@ -44,37 +44,16 @@ Use fuzz payloads, Playwright action sequences, property-based tests, and target
44
44
 
45
45
  ## Machine-Verifiable Evidence
46
46
 
47
- After completing your task, write or append to `specs/changes/<change-id>/agent-log/<your-agent-name>.md`
48
- with this exact structure (lines starting with `- ` are required):
49
-
50
- ```
51
- # Monkey Test Engineer Log
52
- - change-id: <id>
53
- - timestamp: <ISO 8601, e.g. 2026-04-27T14:30:00Z>
54
- - status: complete | needs-review | blocked
55
- - files-read:
56
- - <repo-relative path read through tools>
57
- - artifacts:
58
- - <evidence-type>: <concrete pointer>
59
- - <evidence-type>: <concrete pointer>
60
- - next-action: <one line, or "none">
61
- ```
47
+ After completing your task, write or append to
48
+ `specs/changes/<change-id>/agent-log/<your-agent-name>.md`. Required fields,
49
+ field rules, and gate-enforcement behavior are defined once in
50
+ `references/agent-log-protocol.md` — do not duplicate them in this prompt.
62
51
 
63
52
  ### Required artifacts for this agent
64
53
  - `test-files`: list of paths under `tests/monkey/`
65
54
  - `failure-modes-mapped`: list of `<scenario> → <expected-safe-outcome>`
66
55
  - `seeds-recorded`: list of `<test-name>: seed-value` or "deterministic"
67
56
 
68
- ### Rules
69
- - NEVER omit this log file. `cdd-kit gate` rejects changes whose agent-log
70
- is missing the `status:` line or has an invalid status.
71
- - If you cannot complete the task, set `status: blocked` and write a
72
- concrete `next-action` (NOT "investigate further" — write the actual
73
- next step a human can act on).
74
- - Evidence must be concrete: file:line, command name + last-10-line stdout,
75
- contract path + section, test name, etc. NEVER write "verified" or "OK"
76
- without a pointer.
77
-
78
57
  ## Read scope
79
58
 
80
59
  - Allowed: `contracts/`, `tests/`, `src/`, `specs/changes/<current-change-id>/`
@@ -75,21 +75,10 @@ approved / blocked / approved-with-risk
75
75
 
76
76
  ## Machine-Verifiable Evidence
77
77
 
78
- After completing your task, include an **## Agent Log** section at the end of your response with this exact structure (lines starting with `- ` are required). The calling skill will write this block to `specs/changes/<change-id>/agent-log/qa-reviewer.md`.
79
-
80
- ```
81
- ## Agent Log
82
- # QA Reviewer Log
83
- - change-id: <id>
84
- - timestamp: <ISO 8601, e.g. 2026-04-27T14:30:00Z>
85
- - status: complete | needs-review | blocked
86
- - files-read:
87
- - <repo-relative path read through tools>
88
- - artifacts:
89
- - <evidence-type>: <concrete pointer>
90
- - <evidence-type>: <concrete pointer>
91
- - next-action: <one line, or "none">
92
- ```
78
+ After completing your task, write or append to
79
+ `specs/changes/<change-id>/agent-log/<your-agent-name>.md`. Required fields,
80
+ field rules, and gate-enforcement behavior are defined once in
81
+ `references/agent-log-protocol.md` do not duplicate them in this prompt.
93
82
 
94
83
  ### Required artifacts for this agent
95
84
  - `gate-results`: list of `<gate-name>: pass|fail`
@@ -98,16 +87,6 @@ After completing your task, include an **## Agent Log** section at the end of yo
98
87
  - `decision`: approved | blocked | approved-with-risk
99
88
  - `failure-routing`: list of `<failure-type> → <agent>` or "none"
100
89
 
101
- ### Rules
102
- - NEVER omit this log file. `cdd-kit gate` rejects changes whose agent-log
103
- is missing the `status:` line or has an invalid status.
104
- - If you cannot complete the task, set `status: blocked` and write a
105
- concrete `next-action` (NOT "investigate further" — write the actual
106
- next step a human can act on).
107
- - Evidence must be concrete: file:line, command name + last-10-line stdout,
108
- contract path + section, test name, etc. NEVER write "verified" or "OK"
109
- without a pointer.
110
-
111
90
  ## Read scope
112
91
 
113
92
  - Allowed: `contracts/`, `tests/`, `src/`, `specs/changes/<current-change-id>/`
@@ -84,33 +84,13 @@ frontend / backend / fullstack / monorepo / library / tool
84
84
 
85
85
  ## Machine-Verifiable Evidence
86
86
 
87
- After completing your task, include an **## Agent Log** section at the end of your response with this exact structure (lines starting with `- ` are required). The calling skill will write this block to `specs/changes/<change-id>/agent-log/repo-context-scanner.md`.
88
-
89
- ```
90
- ## Agent Log
91
- # Repo Context Scanner Log
92
- - change-id: <id>
93
- - timestamp: <ISO 8601, e.g. 2026-04-27T14:30:00Z>
94
- - status: complete | needs-review | blocked
95
- - files-read:
96
- - <repo-relative path read through tools>
97
- - artifacts:
98
- - <evidence-type>: <concrete pointer>
99
- - <evidence-type>: <concrete pointer>
100
- - next-action: <one line, or "none">
101
- ```
87
+ After completing your task, write or append to
88
+ `specs/changes/<change-id>/agent-log/<your-agent-name>.md`. Required fields,
89
+ field rules, and gate-enforcement behavior are defined once in
90
+ `references/agent-log-protocol.md` do not duplicate them in this prompt.
102
91
 
103
92
  ### Required artifacts for this agent
104
93
  - `profile-path`: `project-profile.generated.md`
105
94
  - `stack-detected`: from cdd-kit detect-stack
106
95
  - `surfaces-flagged`: list of missing standardization surfaces
107
96
 
108
- ### Rules
109
- - NEVER omit this log file. `cdd-kit gate` rejects changes whose agent-log
110
- is missing the `status:` line or has an invalid status.
111
- - If you cannot complete the task, set `status: blocked` and write a
112
- concrete `next-action` (NOT "investigate further" — write the actual
113
- next step a human can act on).
114
- - Evidence must be concrete: file:line, command name + last-10-line stdout,
115
- contract path + section, test name, etc. NEVER write "verified" or "OK"
116
- without a pointer.
@@ -93,21 +93,10 @@ Target: `design.md` ≤ 150 lines.
93
93
 
94
94
  ## Machine-Verifiable Evidence
95
95
 
96
- After completing your task, write or append to `specs/changes/<change-id>/agent-log/<your-agent-name>.md`
97
- with this exact structure (lines starting with `- ` are required):
98
-
99
- ```
100
- # Spec Architect Log
101
- - change-id: <id>
102
- - timestamp: <ISO 8601, e.g. 2026-04-27T14:30:00Z>
103
- - status: complete | needs-review | blocked
104
- - files-read:
105
- - <repo-relative path read through tools>
106
- - artifacts:
107
- - <evidence-type>: <concrete pointer>
108
- - <evidence-type>: <concrete pointer>
109
- - next-action: <one line, or "none">
110
- ```
96
+ After completing your task, write or append to
97
+ `specs/changes/<change-id>/agent-log/<your-agent-name>.md`. Required fields,
98
+ field rules, and gate-enforcement behavior are defined once in
99
+ `references/agent-log-protocol.md` — do not duplicate them in this prompt.
111
100
 
112
101
  ### Required artifacts for this agent
113
102
  - `adr-written`: ADR file path under `docs/adr/` or "no ADR required"
@@ -115,16 +104,6 @@ with this exact structure (lines starting with `- ` are required):
115
104
  - `decision-summary`: one-line decision
116
105
  - `risks-noted`: count + severity buckets
117
106
 
118
- ### Rules
119
- - NEVER omit this log file. `cdd-kit gate` rejects changes whose agent-log
120
- is missing the `status:` line or has an invalid status.
121
- - If you cannot complete the task, set `status: blocked` and write a
122
- concrete `next-action` (NOT "investigate further" — write the actual
123
- next step a human can act on).
124
- - Evidence must be concrete: file:line, command name + last-10-line stdout,
125
- contract path + section, test name, etc. NEVER write "verified" or "OK"
126
- without a pointer.
127
-
128
107
  ## Read scope
129
108
 
130
109
  - Allowed: `contracts/`, `tests/`, `src/`, `specs/changes/<current-change-id>/`
@@ -52,22 +52,10 @@ By default, do NOT read `specs/changes/` history. Only read historical change re
52
52
 
53
53
  ## Machine-Verifiable Evidence
54
54
 
55
- Write this block to `specs/audits/<YYYY-MM-DD>-drift-audit.md` (create the file yourself).
56
- Use this exact structure (lines starting with `- ` are required):
57
-
58
- ```
59
- ## Agent Log
60
- # Spec Drift Auditor Log
61
- - audit-id: <YYYY-MM-DD>-drift
62
- - timestamp: <ISO 8601, e.g. 2026-04-27T14:30:00Z>
63
- - status: complete | needs-review | blocked
64
- - files-read:
65
- - <repo-relative path read through tools>
66
- - artifacts:
67
- - <evidence-type>: <concrete pointer>
68
- - <evidence-type>: <concrete pointer>
69
- - next-action: <one line, or "none">
70
- ```
55
+ After completing your task, write or append to
56
+ `specs/changes/<change-id>/agent-log/<your-agent-name>.md`. Required fields,
57
+ field rules, and gate-enforcement behavior are defined once in
58
+ `references/agent-log-protocol.md` — do not duplicate them in this prompt.
71
59
 
72
60
  ### Required artifacts for this agent
73
61
  - `surfaces-audited`: list (specs/contracts/code/tests/CI/tasks/archive)
@@ -75,11 +63,3 @@ Use this exact structure (lines starting with `- ` are required):
75
63
  - `drift-summary-path`: `specs/audits/<YYYY-MM-DD>-drift-audit.md`
76
64
  - `next-audit-due`: ISO date
77
65
 
78
- ### Rules
79
- - NEVER omit this audit summary file. The drift-audit cadence (release / weekly / ad-hoc) requires this file as its persistence record; missing `status:` voids the audit.
80
- - If you cannot complete the task, set `status: blocked` and write a
81
- concrete `next-action` (NOT "investigate further" — write the actual
82
- next step a human can act on).
83
- - Evidence must be concrete: file:line, command name + last-10-line stdout,
84
- contract path + section, test name, etc. NEVER write "verified" or "OK"
85
- without a pointer.
@@ -68,21 +68,10 @@ Use realistic load profiles rather than arbitrary request loops.
68
68
 
69
69
  ## Machine-Verifiable Evidence
70
70
 
71
- After completing your task, write or append to `specs/changes/<change-id>/agent-log/<your-agent-name>.md`
72
- with this exact structure (lines starting with `- ` are required):
73
-
74
- ```
75
- # Stress Soak Engineer Log
76
- - change-id: <id>
77
- - timestamp: <ISO 8601, e.g. 2026-04-27T14:30:00Z>
78
- - status: complete | needs-review | blocked
79
- - files-read:
80
- - <repo-relative path read through tools>
81
- - artifacts:
82
- - <evidence-type>: <concrete pointer>
83
- - <evidence-type>: <concrete pointer>
84
- - next-action: <one line, or "none">
85
- ```
71
+ After completing your task, write or append to
72
+ `specs/changes/<change-id>/agent-log/<your-agent-name>.md`. Required fields,
73
+ field rules, and gate-enforcement behavior are defined once in
74
+ `references/agent-log-protocol.md` — do not duplicate them in this prompt.
86
75
 
87
76
  ### Required artifacts for this agent
88
77
  - `runner-config-path`: e.g. `tests/stress/<scenario>.js`
@@ -90,16 +79,6 @@ with this exact structure (lines starting with `- ` are required):
90
79
  - `pass-criteria-cited`: SLO references (must include p95 / error-rate / leak-signal numbers)
91
80
  - `artifacts-location`: path
92
81
 
93
- ### Rules
94
- - NEVER omit this log file. `cdd-kit gate` rejects changes whose agent-log
95
- is missing the `status:` line or has an invalid status.
96
- - If you cannot complete the task, set `status: blocked` and write a
97
- concrete `next-action` (NOT "investigate further" — write the actual
98
- next step a human can act on).
99
- - Evidence must be concrete: file:line, command name + last-10-line stdout,
100
- contract path + section, test name, etc. NEVER write "verified" or "OK"
101
- without a pointer.
102
-
103
82
  ## Read scope
104
83
 
105
84
  - Allowed: `contracts/`, `tests/`, `src/`, `specs/changes/<current-change-id>/`
@@ -72,21 +72,10 @@ Target: `test-plan.md` ≤ 100 lines.
72
72
 
73
73
  ## Machine-Verifiable Evidence
74
74
 
75
- After completing your task, write or append to `specs/changes/<change-id>/agent-log/<your-agent-name>.md`
76
- with this exact structure (lines starting with `- ` are required):
77
-
78
- ```
79
- # Test Strategist Log
80
- - change-id: <id>
81
- - timestamp: <ISO 8601, e.g. 2026-04-27T14:30:00Z>
82
- - status: complete | needs-review | blocked
83
- - files-read:
84
- - <repo-relative path read through tools>
85
- - artifacts:
86
- - <evidence-type>: <concrete pointer>
87
- - <evidence-type>: <concrete pointer>
88
- - next-action: <one line, or "none">
89
- ```
75
+ After completing your task, write or append to
76
+ `specs/changes/<change-id>/agent-log/<your-agent-name>.md`. Required fields,
77
+ field rules, and gate-enforcement behavior are defined once in
78
+ `references/agent-log-protocol.md` — do not duplicate them in this prompt.
90
79
 
91
80
  ### Required artifacts for this agent
92
81
  - `test-plan-path`: `specs/changes/<id>/test-plan.md`
@@ -94,16 +83,6 @@ with this exact structure (lines starting with `- ` are required):
94
83
  - `coverage-tiers`: list of tiers covered (unit/contract/integration/E2E/resilience/monkey/stress/soak)
95
84
  - `mapping-completeness`: percentage or "all requirements covered"
96
85
 
97
- ### Rules
98
- - NEVER omit this log file. `cdd-kit gate` rejects changes whose agent-log
99
- is missing the `status:` line or has an invalid status.
100
- - If you cannot complete the task, set `status: blocked` and write a
101
- concrete `next-action` (NOT "investigate further" — write the actual
102
- next step a human can act on).
103
- - Evidence must be concrete: file:line, command name + last-10-line stdout,
104
- contract path + section, test name, etc. NEVER write "verified" or "OK"
105
- without a pointer.
106
-
107
86
  ## Read scope
108
87
 
109
88
  - Allowed: `contracts/`, `tests/`, `src/`, `specs/changes/<current-change-id>/`
@@ -51,21 +51,10 @@ approved / changes-required
51
51
 
52
52
  ## Machine-Verifiable Evidence
53
53
 
54
- After completing your task, include an **## Agent Log** section at the end of your response with this exact structure (lines starting with `- ` are required). The calling skill will write this block to `specs/changes/<change-id>/agent-log/ui-ux-reviewer.md`.
55
-
56
- ```
57
- ## Agent Log
58
- # UI/UX Reviewer Log
59
- - change-id: <id>
60
- - timestamp: <ISO 8601, e.g. 2026-04-27T14:30:00Z>
61
- - status: complete | needs-review | blocked
62
- - files-read:
63
- - <repo-relative path read through tools>
64
- - artifacts:
65
- - <evidence-type>: <concrete pointer>
66
- - <evidence-type>: <concrete pointer>
67
- - next-action: <one line, or "none">
68
- ```
54
+ After completing your task, write or append to
55
+ `specs/changes/<change-id>/agent-log/<your-agent-name>.md`. Required fields,
56
+ field rules, and gate-enforcement behavior are defined once in
57
+ `references/agent-log-protocol.md` do not duplicate them in this prompt.
69
58
 
70
59
  ### Required artifacts for this agent
71
60
  - `journeys-reviewed`: list of journey names
@@ -73,12 +62,3 @@ After completing your task, include an **## Agent Log** section at the end of yo
73
62
  - `copy-issues`: count + severity
74
63
  - `accessibility-findings`: count + severity
75
64
 
76
- ### Rules
77
- - NEVER omit this log file. `cdd-kit gate` rejects changes whose agent-log
78
- is missing the `status:` line or has an invalid status.
79
- - If you cannot complete the task, set `status: blocked` and write a
80
- concrete `next-action` (NOT "investigate further" — write the actual
81
- next step a human can act on).
82
- - Evidence must be concrete: file:line, command name + last-10-line stdout,
83
- contract path + section, test name, etc. NEVER write "verified" or "OK"
84
- without a pointer.
@@ -53,21 +53,10 @@ approved / changes-required
53
53
 
54
54
  ## Machine-Verifiable Evidence
55
55
 
56
- After completing your task, include an **## Agent Log** section at the end of your response with this exact structure (lines starting with `- ` are required). The calling skill will write this block to `specs/changes/<change-id>/agent-log/visual-reviewer.md`.
57
-
58
- ```
59
- ## Agent Log
60
- # Visual Reviewer Log
61
- - change-id: <id>
62
- - timestamp: <ISO 8601, e.g. 2026-04-27T14:30:00Z>
63
- - status: complete | needs-review | blocked
64
- - files-read:
65
- - <repo-relative path read through tools>
66
- - artifacts:
67
- - <evidence-type>: <concrete pointer>
68
- - <evidence-type>: <concrete pointer>
69
- - next-action: <one line, or "none">
70
- ```
56
+ After completing your task, write or append to
57
+ `specs/changes/<change-id>/agent-log/<your-agent-name>.md`. Required fields,
58
+ field rules, and gate-enforcement behavior are defined once in
59
+ `references/agent-log-protocol.md` do not duplicate them in this prompt.
71
60
 
72
61
  ### Required artifacts for this agent
73
62
  - `screenshots-compared`: list of `<screen>: baseline → current`
@@ -75,12 +64,3 @@ After completing your task, include an **## Agent Log** section at the end of yo
75
64
  - `state-coverage`: matrix
76
65
  - `tokens-violated`: list of CSS contract violations or "none"
77
66
 
78
- ### Rules
79
- - NEVER omit this log file. `cdd-kit gate` rejects changes whose agent-log
80
- is missing the `status:` line or has an invalid status.
81
- - If you cannot complete the task, set `status: blocked` and write a
82
- concrete `next-action` (NOT "investigate further" — write the actual
83
- next step a human can act on).
84
- - Evidence must be concrete: file:line, command name + last-10-line stdout,
85
- contract path + section, test name, etc. NEVER write "verified" or "OK"
86
- without a pointer.
@@ -1,5 +1,24 @@
1
1
  {
2
2
  "provider": "claude",
3
3
  "generated_at": null,
4
- "roles": {}
4
+ "schema-version": "0.2.0",
5
+ "roles": {
6
+ "change-classifier": "claude-opus-4-7",
7
+ "spec-architect": "claude-opus-4-7",
8
+ "qa-reviewer": "claude-opus-4-7",
9
+ "contract-reviewer": "claude-sonnet-4-6",
10
+ "test-strategist": "claude-sonnet-4-6",
11
+ "backend-engineer": "claude-sonnet-4-6",
12
+ "frontend-engineer": "claude-sonnet-4-6",
13
+ "ci-cd-gatekeeper": "claude-sonnet-4-6",
14
+ "e2e-resilience-engineer": "claude-sonnet-4-6",
15
+ "monkey-test-engineer": "claude-sonnet-4-6",
16
+ "stress-soak-engineer": "claude-sonnet-4-6",
17
+ "ui-ux-reviewer": "claude-sonnet-4-6",
18
+ "visual-reviewer": "claude-sonnet-4-6",
19
+ "dependency-security-reviewer": "claude-sonnet-4-6",
20
+ "spec-drift-auditor": "claude-sonnet-4-6",
21
+ "repo-context-scanner": "claude-haiku-4-5"
22
+ },
23
+ "_notes": "Roles map agent name -> model ID. Override per-project as needed. cdd-kit doctor warns when an installed agent's frontmatter `model:` does not match this policy."
5
24
  }
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ # cdd-kit PostToolUse hook (B3): append actual Read/Grep/Glob targets to a
3
+ # runtime audit log so `cdd-kit gate` can reconcile them against the agent-log
4
+ # self-report. This turns Context Governance from a trust contract into a
5
+ # verified contract.
6
+ #
7
+ # Wire into Claude Code (~/.claude/settings.json):
8
+ #
9
+ # {
10
+ # "hooks": {
11
+ # "PostToolUse": [
12
+ # { "matcher": "Read|Grep|Glob", "command": "/path/to/hooks/post-tool-use-files-read.sh" }
13
+ # ]
14
+ # }
15
+ # }
16
+ #
17
+ # The hook receives the tool-call payload as JSON on stdin. We extract the
18
+ # best-effort path candidate and append `<change-id>\t<path>` to a JSONL audit
19
+ # file. CURRENT_CHANGE_ID is read from environment (cdd-new sets it on every
20
+ # agent invocation as of v1.10.0+).
21
+
22
+ set -eu
23
+
24
+ CDD_RUNTIME_DIR="${CDD_RUNTIME_DIR:-./.cdd/runtime}"
25
+ CHANGE_ID="${CURRENT_CHANGE_ID:-unknown}"
26
+
27
+ mkdir -p "$CDD_RUNTIME_DIR"
28
+ LOG_FILE="$CDD_RUNTIME_DIR/${CHANGE_ID}-files-read.jsonl"
29
+
30
+ # Read JSON payload from stdin without choking if jq is missing.
31
+ payload="$(cat || true)"
32
+ [ -z "$payload" ] && exit 0
33
+
34
+ # Try to extract the path field. Common Claude Code tool inputs:
35
+ # Read → tool_input.file_path
36
+ # Grep → tool_input.path / glob / pattern
37
+ # Glob → tool_input.path / pattern
38
+ # We grep first then fall back to jq when available.
39
+ path_value=""
40
+ if command -v jq >/dev/null 2>&1; then
41
+ path_value="$(printf '%s' "$payload" | jq -r '
42
+ .tool_input.file_path
43
+ // .tool_input.path
44
+ // .tool_input.pattern
45
+ // empty
46
+ ' 2>/dev/null || true)"
47
+ fi
48
+ if [ -z "$path_value" ]; then
49
+ path_value="$(printf '%s' "$payload" | grep -oE '"file_path"[[:space:]]*:[[:space:]]*"[^"]+"' | head -n1 | sed -E 's/.*"file_path"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/')"
50
+ fi
51
+
52
+ [ -z "$path_value" ] && exit 0
53
+
54
+ timestamp="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
55
+ printf '{"ts":"%s","change":"%s","path":"%s"}\n' "$timestamp" "$CHANGE_ID" "$path_value" >> "$LOG_FILE"