@haposoft/cafekit 0.16.0-rc.3 → 0.16.0-rc.5
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/bin/__tests__/change-firewall.semantic-firewall.test.js +2134 -0
- package/bin/__tests__/codex-hooks.test.js +531 -29
- package/bin/__tests__/codex-native.test.js +228 -7
- package/bin/__tests__/develop-contract.test.js +653 -185
- package/bin/__tests__/finalizer-pass-gate.semantic-firewall.test.js +342 -0
- package/bin/__tests__/installer-safety.test.js +39 -0
- package/bin/__tests__/opencode-spec-gate.test.js +24 -16
- package/bin/__tests__/package-inventory.test.js +705 -13
- package/bin/__tests__/release-preflight.semantic-firewall.test.js +578 -0
- package/bin/__tests__/review-receipt-c2.semantic-firewall.test.js +378 -0
- package/bin/__tests__/specs-v2-execution-closeout.test.js +468 -0
- package/bin/__tests__/specs-v2-policy-and-scaffold.test.js +665 -0
- package/bin/__tests__/specs-v2-validator-grounder-contract.test.js +1132 -0
- package/bin/__tests__/test-runtime-dependency-closure.cjs +182 -0
- package/bin/__tests__/validator-grounding.test.js +2013 -221
- package/bin/lib/managed-writer.js +12 -3
- package/bin/phases/codex-runtime.js +17 -1
- package/package.json +5 -2
- package/src/claude/CLAUDE.md +6 -0
- package/src/claude/agents/code-auditor.md +20 -0
- package/src/claude/agents/spec-maker.md +143 -99
- package/src/claude/hooks/__tests__/completion-authority.test.js +321 -58
- package/src/claude/hooks/__tests__/privacy-block.test.js +254 -0
- package/src/claude/hooks/__tests__/semantic-review-authority.test.js +257 -0
- package/src/claude/hooks/__tests__/spec-gate.test.js +115 -40
- package/src/claude/hooks/completion-authority-check.cjs +37 -288
- package/src/claude/hooks/completion-authority-state.cjs +10 -8
- package/src/claude/hooks/completion-authority.cjs +13 -7
- package/src/claude/hooks/docs-sync.cjs +5 -2
- package/src/claude/hooks/lib/privacy-command-analysis.cjs +393 -0
- package/src/claude/hooks/lib/runtime-path-safety.cjs +119 -0
- package/src/claude/hooks/privacy-block.cjs +99 -28
- package/src/claude/hooks/semantic-review-authority.cjs +152 -0
- package/src/claude/hooks/spec-gate.cjs +47 -117
- package/src/claude/hooks/spec-state.cjs +8 -2
- package/src/claude/migration-manifest.json +9 -1
- package/src/claude/rules/state-sync.md +52 -21
- package/src/claude/rules/workflow.md +17 -9
- package/src/claude/scripts/change-firewall.cjs +1748 -0
- package/src/claude/scripts/spec-authoring-digest.cjs +151 -0
- package/src/claude/scripts/spec-authoring-validation.cjs +126 -0
- package/src/claude/scripts/spec-final-state.cjs +290 -0
- package/src/claude/scripts/spec-ground.cjs +571 -173
- package/src/claude/scripts/spec-readiness.cjs +425 -0
- package/src/claude/scripts/spec-receipt.cjs +162 -0
- package/src/claude/scripts/spec-resolver.cjs +67 -16
- package/src/claude/scripts/spec-scaffold.cjs +1594 -139
- package/src/claude/scripts/spec-semantic-model.cjs +396 -0
- package/src/claude/scripts/validate-spec-output.cjs +3110 -218
- package/src/claude/scripts/workflow-policy.cjs +501 -183
- package/src/claude/settings/settings.json +4 -0
- package/src/claude/skills/code-review/SKILL.md +12 -3
- package/src/claude/skills/code-review/references/spec-compliance-review.md +10 -2
- package/src/claude/skills/code-review/references/verification-gate.md +13 -0
- package/src/claude/skills/develop/SKILL.md +47 -60
- package/src/claude/skills/develop/references/parallel-waves.md +9 -6
- package/src/claude/skills/develop/references/quality-gate.md +19 -12
- package/src/claude/skills/specs/SKILL.md +183 -177
- package/src/claude/skills/specs/references/ask-user-question-gates.md +27 -18
- package/src/claude/skills/specs/references/cross-spec-dependency.md +8 -4
- package/src/claude/skills/specs/references/research-strategy.md +4 -1
- package/src/claude/skills/specs/references/review.md +214 -262
- package/src/claude/skills/specs/references/scope-inquiry.md +18 -5
- package/src/claude/skills/specs/rules/design-discovery-full.md +33 -81
- package/src/claude/skills/specs/rules/design-discovery-light.md +21 -42
- package/src/claude/skills/specs/rules/design-principles.md +136 -180
- package/src/claude/skills/specs/rules/design-review.md +42 -97
- package/src/claude/skills/specs/rules/ears-format.md +42 -50
- package/src/claude/skills/specs/rules/phase-decision-matrix.md +42 -41
- package/src/claude/skills/specs/rules/task-scoring-rubric.md +2 -1
- package/src/claude/skills/specs/rules/tasks-generation.md +189 -300
- package/src/claude/skills/specs/templates/design.md +49 -263
- package/src/claude/skills/specs/templates/requirements.md +26 -36
- package/src/claude/skills/specs/templates/research.md +9 -98
- package/src/claude/skills/specs/templates/spec-state.json +35 -85
- package/src/claude/skills/specs/templates/task.md +30 -102
- package/src/claude/skills/sync/SKILL.md +33 -10
- package/src/claude/skills/sync/references/sync-protocols.md +31 -13
- package/src/claude/skills/test/SKILL.md +17 -7
- package/src/codex/AGENTS.md +6 -0
- package/src/codex/hooks/completion-authority-check.cjs +43 -240
- package/src/codex/hooks/completion-authority-state.cjs +10 -8
- package/src/codex/hooks/completion-authority.cjs +13 -7
- package/src/codex/hooks/lib/hook-context.cjs +16 -2
- package/src/codex/hooks/lib/privacy-command-analysis.cjs +3 -0
- package/src/codex/hooks/lib/privacy-state.cjs +61 -38
- package/src/codex/hooks/lib/runtime-path-safety.cjs +3 -0
- package/src/codex/hooks/lib/spec-receipt.cjs +72 -134
- package/src/codex/hooks/lib/spec-utils.cjs +56 -5
- package/src/codex/hooks/privacy-approval.cjs +6 -2
- package/src/codex/hooks/privacy-block.cjs +94 -15
- package/src/codex/hooks/semantic-review-authority.cjs +130 -0
- package/src/codex/hooks/spec-gate.cjs +49 -34
- package/src/codex/hooks/spec-state.cjs +10 -3
- package/src/codex/hooks/state.cjs +2 -0
- package/src/codex/hooks.json +6 -1
- package/src/codex/rules/state-sync.md +47 -27
- package/src/common/AGENTS.md +1 -1
|
@@ -1,300 +1,189 @@
|
|
|
1
|
-
# Task
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
**
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
4. **Reachability proof** — when the task creates a runtime-facing artifact, name the upstream entrypoint or caller that reaches it; if reachability is deferred, name the exact later integration task responsible
|
|
191
|
-
|
|
192
|
-
Rules:
|
|
193
|
-
- If the task produces a build artifact or generated file, name the exact artifact path to inspect.
|
|
194
|
-
- If the task wires entrypoints (popup, content script, route, worker, CLI command), name the exact runtime surface that must exist after implementation.
|
|
195
|
-
- If the task creates a UI component, service, hook, reducer, route handler, worker, command, or data loader, the evidence MUST prove it is either reachable from the declared runtime surface or intentionally internal support for a named later task.
|
|
196
|
-
- If verification depends on environment or manual setup, document the blocker explicitly instead of implying success.
|
|
197
|
-
- Build success alone is NEVER enough evidence for a completed task.
|
|
198
|
-
- For provider-sensitive work, use provider-neutral wording unless the scope lock explicitly names a vendor.
|
|
199
|
-
- For delete-data/privacy work, task text MUST match the single deletion/retention policy chosen in `design.md`. Mixed policies are invalid.
|
|
200
|
-
|
|
201
|
-
### Test Type Selection
|
|
202
|
-
|
|
203
|
-
Choose verification by task risk and touched surface. Do not force every task to include every test type, but do not omit the test type that proves the task's actual behavior.
|
|
204
|
-
|
|
205
|
-
| Task kind | Required / expected proof |
|
|
206
|
-
|---|---|
|
|
207
|
-
| Pure logic, data transform, parser, sorting, filtering, validator | Unit test plus negative-path case |
|
|
208
|
-
| Stateful UI component or user interaction | Component test or integration test; add runtime UI check if the component must be mounted |
|
|
209
|
-
| Cross-module state, API, persistence, provider, or service boundary | Integration test that proves real contract/state handoff |
|
|
210
|
-
| User-facing workflow across screens/components | E2E or UI flow verification after the vertical slice exists |
|
|
211
|
-
| Layout, theme, responsive, visual style | Runtime/visual viewport checks; screenshot proof when practical |
|
|
212
|
-
| Keyboard/focus/form/modal/table interaction | Accessibility check for focus, labels, roles, and keyboard behavior |
|
|
213
|
-
| Scaffolding/config/release plumbing | Smoke checks: typecheck/build/test/dev-server or equivalent |
|
|
214
|
-
| Bug fix/regression | Regression test reproducing the old failure, then passing |
|
|
215
|
-
| Performance/security-sensitive requirement or touched surface | Performance/security check only when specified by requirements, design risk, or changed boundary |
|
|
216
|
-
|
|
217
|
-
`hapo:specs` writes the expected proof into each task. `hapo:test` is the sole
|
|
218
|
-
execution-proof owner and emits the canonical receipt. `hapo:develop` consumes
|
|
219
|
-
that proof at closeout; it does not create a second execution receipt.
|
|
220
|
-
|
|
221
|
-
### Frontend Fidelity Rule (when a visual reference is provided)
|
|
222
|
-
|
|
223
|
-
If the user/spec provides ANY visual reference for a frontend task — design image, Figma frame, screenshot, mockup, brand palette, design tokens, or a style guide — the task MUST reproduce it faithfully, not approximate it. Concretely, the task file MUST:
|
|
224
|
-
|
|
225
|
-
1. **Extract concrete values into the task** (do NOT paraphrase as "make it look nice"): exact colors (`#DAF1EE`), font family + sizes, spacing/radius/shadow when the reference shows them, and verbatim UI text/labels (especially non-English copy, e.g. `「投稿を削除しました」`).
|
|
226
|
-
2. **State a `MUST: match <reference>` constraint** naming the exact reference (e.g. `image_4.png` / Figma node / `tokens.css`), so fidelity is a requirement, not a suggestion.
|
|
227
|
-
3. **Prove fidelity in Evidence**: a visual/runtime check that compares the rendered UI against the named reference (screenshot diff or side-by-side inspection), plus accessibility/contrast if interactive.
|
|
228
|
-
|
|
229
|
-
Reuse vs new component:
|
|
230
|
-
- **Reuse** an existing component → reference it by path; it carries the design system's style (no need to restate pixels).
|
|
231
|
-
- **New** component (`Create`) WITH a reference → the task MUST cite the concrete tokens/values from the reference (this is the gap that lets new components drift from the design).
|
|
232
|
-
- **New** component WITHOUT any reference → derive from a named sibling component or explicitly flag it as an open design question; never invent un-grounded styling silently.
|
|
233
|
-
|
|
234
|
-
> Rationale: a spec that says "build the list screen" but omits the provided palette/text/spacing forces the implementer to guess, and the result drifts from what the user actually showed. When a reference exists, "looks roughly similar" is a failure — the task must carry the real values so the build matches the design.
|
|
235
|
-
|
|
236
|
-
## Task Hierarchy Rules
|
|
237
|
-
|
|
238
|
-
### Maximum 2 Levels
|
|
239
|
-
- Prefer one actionable checkbox per real implementation step.
|
|
240
|
-
- Use sub-tasks (`1.1`, `1.2`) only when a step has multiple separately verifiable units.
|
|
241
|
-
- **No deeper nesting** (no `1.1.1`).
|
|
242
|
-
- If a major task would contain only a single actionable item, collapse the structure and promote the sub-task to the major level.
|
|
243
|
-
- When a major task exists purely as a container, keep the checkbox description concise and avoid duplicating detailed bullets.
|
|
244
|
-
|
|
245
|
-
### Sequential Numbering
|
|
246
|
-
- Major tasks MUST increment: 1, 2, 3, 4, 5...
|
|
247
|
-
- Sub-tasks reset per major task: 1.1, 1.2, then 2.1, 2.2...
|
|
248
|
-
- Never repeat major task numbers
|
|
249
|
-
|
|
250
|
-
### Parallel Analysis (default)
|
|
251
|
-
- Assume parallel analysis is enabled unless explicitly disabled (e.g. `--sequential` flag).
|
|
252
|
-
- Identify tasks that can run concurrently when **all** conditions hold:
|
|
253
|
-
- No data dependency on other pending tasks
|
|
254
|
-
- No shared file or resource contention
|
|
255
|
-
- No prerequisite review/approval from another task
|
|
256
|
-
- Environment/setup work needed by the task is already satisfied or covered within the task itself
|
|
257
|
-
- Validate that identified parallel tasks operate within separate boundaries defined in the Architecture Pattern & Boundary Map.
|
|
258
|
-
- Confirm API/event contracts from design.md do not overlap in ways that cause conflicts.
|
|
259
|
-
- Append `(P)` immediately after the task number for each parallel-capable task, kept **outside** the checkbox brackets:
|
|
260
|
-
- Example: `- [ ] 2.1 (P) Build background worker`
|
|
261
|
-
- Apply to both major tasks and sub-tasks when appropriate.
|
|
262
|
-
- If sequential mode is requested, omit `(P)` markers entirely.
|
|
263
|
-
- Group parallel tasks logically (same parent when possible) and highlight any ordering caveats in detail bullets.
|
|
264
|
-
- Do not mark container-only major tasks (no own actionable bullets) with `(P)` — evaluate parallelism at the sub-task level.
|
|
265
|
-
- Explicitly call out dependencies that prevent `(P)` even when tasks look similar.
|
|
266
|
-
|
|
267
|
-
### Checkbox Format
|
|
268
|
-
```markdown
|
|
269
|
-
- [ ] 1. Major task description
|
|
270
|
-
- [ ] 1.1 Sub-task description
|
|
271
|
-
- Detail item 1
|
|
272
|
-
- Detail item 2
|
|
273
|
-
- _Requirements: X.X_
|
|
274
|
-
|
|
275
|
-
- [ ] 1.2 Sub-task description
|
|
276
|
-
- Detail items...
|
|
277
|
-
- _Requirements: Y.Y_
|
|
278
|
-
|
|
279
|
-
- [ ] 1.3 Sub-task description
|
|
280
|
-
- Detail items...
|
|
281
|
-
- _Requirements: Z.Z, W.W_
|
|
282
|
-
|
|
283
|
-
- [ ] 2. Next major task (NOT 1 again!)
|
|
284
|
-
- [ ] 2.1 Sub-task...
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
## Requirements Coverage
|
|
288
|
-
|
|
289
|
-
**Check when a task bundle exists**:
|
|
290
|
-
- ALL requirements assigned to the task bundle MUST be covered
|
|
291
|
-
- Cross-reference every requirement ID with task mappings
|
|
292
|
-
- If gaps found: Return to requirements or design phase
|
|
293
|
-
- No requirement should be left without corresponding tasks
|
|
294
|
-
|
|
295
|
-
Use the requirement ID style already present in `requirements.md` (`R1`,
|
|
296
|
-
`REQ-01`, or `N.M`). The task filename cluster (`task-R1-01-*`) does not have
|
|
297
|
-
to mirror every requirement ID exactly, but every requirement represented by
|
|
298
|
-
the bundle MUST be listed in at least one task's `## Requirements` section.
|
|
299
|
-
|
|
300
|
-
Document any intentionally deferred requirements with rationale.
|
|
1
|
+
# Task generation rules
|
|
2
|
+
|
|
3
|
+
Load this file only after the task gate passes. Compact durable specs are
|
|
4
|
+
taskless by default, but may have a task bundle and matching registry when a real
|
|
5
|
+
ownership, dependency, durable transition, separate proof, or parallel
|
|
6
|
+
coordination boundary activates the same gate used by Full specs. Full depth
|
|
7
|
+
does not activate the gate by itself.
|
|
8
|
+
|
|
9
|
+
## Generation gate
|
|
10
|
+
|
|
11
|
+
A task must represent at least one real boundary: distinct ownership, a durable
|
|
12
|
+
dependency, a state transition, separate proof, or parallel coordination. If no
|
|
13
|
+
boundary exists, keep behavior in requirements/design and generate no task.
|
|
14
|
+
|
|
15
|
+
Persist the audited topology only in typed `spec.json.coordination.boundaries`:
|
|
16
|
+
|
|
17
|
+
- `ownership`: disjoint task write sets;
|
|
18
|
+
- `dependency`: producer, consumer, and exact deliverable;
|
|
19
|
+
- `transition`: owner/consumers plus pre/post/failure/recovery semantics;
|
|
20
|
+
- `proof`: subject, verifier, verification ref, and verifier-owned artifact anchor;
|
|
21
|
+
- `parallel`: independent tasks and exact resources.
|
|
22
|
+
|
|
23
|
+
A task bundle requires at least one complete boundary. Legacy trigger fields,
|
|
24
|
+
coordination flags, artifact flags, priority markers, and prose labels are
|
|
25
|
+
read compatibility inputs and forbidden in schema 2.1 authoring. Optional
|
|
26
|
+
phases may group task IDs but must reference a typed owner boundary.
|
|
27
|
+
|
|
28
|
+
Use `phase-decision-matrix.md` only when split/merge boundaries remain unclear.
|
|
29
|
+
Use the scoring rubric only as advisory input; scores, effort estimates, risk
|
|
30
|
+
labels, and requirement count never make a task mandatory.
|
|
31
|
+
|
|
32
|
+
## Default decomposition
|
|
33
|
+
|
|
34
|
+
Prefer a vertical outcome slice that implements behavior through its real
|
|
35
|
+
runtime entrypoint and proves the result. Split horizontally only when:
|
|
36
|
+
|
|
37
|
+
- one owner must produce a contract, schema, or transition before consumers;
|
|
38
|
+
- file or contract ownership must be disjoint;
|
|
39
|
+
- a proof surface has a different durable owner; or
|
|
40
|
+
- parallel work has no dependency or shared resource contention.
|
|
41
|
+
|
|
42
|
+
Do not create foundation, integration, spike, testing, or release tasks by
|
|
43
|
+
habit. A support output must be consumed by a named later task or identified as
|
|
44
|
+
internal to the same vertical slice.
|
|
45
|
+
|
|
46
|
+
## Task shape
|
|
47
|
+
|
|
48
|
+
Each task contains exactly the information an implementer needs:
|
|
49
|
+
|
|
50
|
+
1. **Outcome** — observable behavior delivered by the task.
|
|
51
|
+
2. **Scope** — exact in/out behavior boundary.
|
|
52
|
+
3. **Anchors and Ownership** — one six-column ownership projection.
|
|
53
|
+
4. **Changes** — behavior and code changes, including relevant negative paths.
|
|
54
|
+
5. **Acceptance** — measurable requirement IDs and task-local outcomes.
|
|
55
|
+
6. **Dependencies** — projection of typed dependency boundaries or `none`.
|
|
56
|
+
7. **Verification Plan** — command/inspection, expected result, negative path,
|
|
57
|
+
runtime reachability, exact design `V` ID, and task role when applicable.
|
|
58
|
+
|
|
59
|
+
Do not add estimated effort, empty risk tables, receipt fields, Base/Head,
|
|
60
|
+
verdicts, provenance, agent chains, or generic completion ceremony.
|
|
61
|
+
|
|
62
|
+
`**Status:**` is the canonical files-first lifecycle projection for each task.
|
|
63
|
+
Its value must stay byte-for-byte equivalent in meaning to
|
|
64
|
+
`spec.json.task_registry[path].status`; use the same exact canonical token in
|
|
65
|
+
both places. Allowed values are `pending`, `in_progress`, `blocked`, and `done`.
|
|
66
|
+
Authoring initializes tasks as `pending`. A later lifecycle transition updates
|
|
67
|
+
the task Markdown and registry together. `done` proof remains owned by execution
|
|
68
|
+
closeout; do not add receipts, Evidence sections, Base/Head bindings, verdicts,
|
|
69
|
+
or provenance to the task plan.
|
|
70
|
+
|
|
71
|
+
## Typed anchors
|
|
72
|
+
|
|
73
|
+
The task's only ownership table is `ID | Type | Target | Role | Access |
|
|
74
|
+
Action`. IDs are unique across the spec. `Access` is `read` or `write`; read
|
|
75
|
+
requires `Action=read`, while write requires `create`, `modify`, or `delete`.
|
|
76
|
+
Targets are exact and grounded, never globs or parent-directory claims. Allowed
|
|
77
|
+
types are `file`, `symbol`, `command`, `route`, `schema`, `contract`, `artifact`,
|
|
78
|
+
and `external`.
|
|
79
|
+
|
|
80
|
+
- Files-first: list exact `file` anchors before anchors contained by those files.
|
|
81
|
+
- Task-owned anchors use `A-R{requirement}-{sequence}-NN`, populated from the
|
|
82
|
+
canonical task ID; their counter is local to that namespace, not globally
|
|
83
|
+
reused as an unnamespaced counter.
|
|
84
|
+
- When the task only consumes a target already anchored by design, reference the
|
|
85
|
+
canonical `A-D-NN` anchor instead of creating another anchor for that target.
|
|
86
|
+
- `Modify`, `Delete`, and `Read` paths must exist when authored; `Create` paths
|
|
87
|
+
need a grounded parent/boundary.
|
|
88
|
+
- A symbol target names or references its containing file.
|
|
89
|
+
- A command target is copied from real project tooling, not invented.
|
|
90
|
+
- A contract anchor references its stable design ID; never copy the contract
|
|
91
|
+
body into the task.
|
|
92
|
+
- Duplicate IDs anywhere in design or tasks block readiness.
|
|
93
|
+
|
|
94
|
+
## Contracts, ownership, and dependencies
|
|
95
|
+
|
|
96
|
+
Each cross-task contract, invariant, schema transition, or recovery authority
|
|
97
|
+
has exactly one owner task. Every consumer:
|
|
98
|
+
|
|
99
|
+
- references the named contract/invariant ID;
|
|
100
|
+
- depends directly or transitively on the owner; and
|
|
101
|
+
- does not redefine the canonical body.
|
|
102
|
+
|
|
103
|
+
Each `RN.M` has exactly one implementation owner. A proof boundary means its
|
|
104
|
+
subject implements the product criterion and its verifier verifies the referenced
|
|
105
|
+
`V` definition through a separately owned proof criterion/artifact. The verifier
|
|
106
|
+
must not repeat the subject's criterion in `Acceptance`; sharing a proof boundary
|
|
107
|
+
does not create a second implementation owner. Their shared V definition names
|
|
108
|
+
both exact criteria so subject, verifier, and proof boundary resolve to one
|
|
109
|
+
verification contract.
|
|
110
|
+
|
|
111
|
+
Task Markdown and `spec.json.task_registry[path]` must keep both `status` and
|
|
112
|
+
`dependencies` synchronized. Derive task ID from
|
|
113
|
+
`tasks/task-R{N}-{SEQ}-<slug>.md`; use two-digit `SEQ`. Do not create shorthand
|
|
114
|
+
filenames.
|
|
115
|
+
|
|
116
|
+
Parallel eligibility exists only when a typed `parallel` boundary proves exact
|
|
117
|
+
disjoint resources, no dependency path, and no shared transition/proof
|
|
118
|
+
authority. Do not author a parallel-priority marker.
|
|
119
|
+
|
|
120
|
+
## Changes and acceptance
|
|
121
|
+
|
|
122
|
+
Describe product behavior and the code boundary together. Name exact validation,
|
|
123
|
+
state, route, schema, error, and integration behavior only when relevant. Keep
|
|
124
|
+
all work inside `scope_lock`; an expansion pauses for explicit user approval.
|
|
125
|
+
|
|
126
|
+
Map acceptance to numeric `N.M` IDs from `requirements.md`. Include negative or
|
|
127
|
+
error outcomes where invalid input, missing permission, failure, conflict,
|
|
128
|
+
timeout, retry, rollback, or recovery is relevant. Do not add vague acceptance
|
|
129
|
+
such as “works”, “safe”, or “performant”.
|
|
130
|
+
|
|
131
|
+
## Verification plan
|
|
132
|
+
|
|
133
|
+
Choose proportional proof for the changed surface:
|
|
134
|
+
|
|
135
|
+
- exact command-shaped invocation or justified `N/A`;
|
|
136
|
+
- expected exit, output, state, artifact, or UI result;
|
|
137
|
+
- contract-preserving negative-path check when relevant; and
|
|
138
|
+
- real entrypoint/caller for runtime-facing work, or the exact dependent task
|
|
139
|
+
that will establish reachability.
|
|
140
|
+
|
|
141
|
+
Declare exactly `Verification ref: Vn` and `Task role: subject` or `Task role:
|
|
142
|
+
verifier`. The V definition lives once in `design.md` using the canonical
|
|
143
|
+
single-line bold-ID syntax. The task references it and does not copy its body.
|
|
144
|
+
|
|
145
|
+
Every executable implementation task must declare concrete test ownership: at
|
|
146
|
+
least one `file` or `artifact` anchor with `write` `create` or `modify` that is
|
|
147
|
+
the focused test, or share proof through a typed `proof` boundary whose
|
|
148
|
+
verifier owns the separate proof artifact. A generic `npm test` string alone
|
|
149
|
+
is not ownership; shared proof without a typed boundary is not ownership.
|
|
150
|
+
|
|
151
|
+
Access/action reachability is deterministic:
|
|
152
|
+
|
|
153
|
+
| Access | Allowed Action | Grounding meaning |
|
|
154
|
+
|---|---|---|
|
|
155
|
+
| `read` | `read` | Exact target already exists and is inspected/consumed. |
|
|
156
|
+
| `write` | `modify` or `delete` | Exact target already exists and is owned by this task. |
|
|
157
|
+
| `write` | `create` | Exact target is absent and its parent/boundary is grounded. |
|
|
158
|
+
|
|
159
|
+
Commands, symbols, contracts, routes, schemas, artifacts, and external targets
|
|
160
|
+
also receive their type-specific grounding check. Grounding is mandatory before
|
|
161
|
+
readiness; the deterministic validator/grounder recompute facts and never create
|
|
162
|
+
an extra receipt or claim semantic judgment.
|
|
163
|
+
|
|
164
|
+
Build success alone is not behavior proof. Static validation may check command
|
|
165
|
+
shape and anchors, but execution owns actual runtime proof.
|
|
166
|
+
|
|
167
|
+
`feature-receipt.md` is created only during execution closeout. Never create or
|
|
168
|
+
reference it as a spec-ready requirement.
|
|
169
|
+
|
|
170
|
+
Every physical task participates in at least one justified typed boundary.
|
|
171
|
+
Ownership and parallel resource maps are keyed exactly by their participants,
|
|
172
|
+
contain non-empty unique exact targets, and equal the task write anchors they
|
|
173
|
+
claim. An ownership boundary is truthful only when at least two physical tasks
|
|
174
|
+
have distinct, non-overlapping exact write anchors. A dependency boundary must match
|
|
175
|
+
the registry DAG and producer-write/consumer-read anchors. Proof, transition,
|
|
176
|
+
and parallel boundaries must satisfy their typed fields; labels never suffice.
|
|
177
|
+
|
|
178
|
+
## Task graph and phases
|
|
179
|
+
|
|
180
|
+
When a task bundle exists:
|
|
181
|
+
|
|
182
|
+
- cover every scoped acceptance criterion exactly where it is implemented or
|
|
183
|
+
proven;
|
|
184
|
+
- keep owner-before-consumer ordering explicit;
|
|
185
|
+
- rebuild registry inventory from physical task files before readiness; and
|
|
186
|
+
- use optional phases only as compact task-ID groups in `spec.json` for a
|
|
187
|
+
complex Full graph.
|
|
188
|
+
|
|
189
|
+
Never create phase files or repeat task prose in phase metadata.
|