@haposoft/cafekit 0.7.23 → 0.7.24
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/README.md +81 -862
- package/bin/install.js +4 -3
- package/package.json +2 -3
- package/src/claude/agents/code-auditor.md +25 -1
- package/src/claude/agents/spec-maker.md +17 -2
- package/src/claude/agents/test-runner.md +22 -3
- package/src/claude/hooks/spec-state.cjs +4 -4
- package/src/claude/migration-manifest.json +1 -1
- package/src/claude/rules/state-sync.md +7 -5
- package/src/claude/skills/code-review/references/spec-compliance-review.md +8 -1
- package/src/claude/skills/develop/SKILL.md +25 -4
- package/src/claude/skills/develop/references/quality-gate.md +23 -13
- package/src/claude/skills/generate-graph/LICENSE +21 -0
- package/src/claude/skills/generate-graph/README.md +523 -0
- package/src/claude/skills/generate-graph/SKILL.md +427 -0
- package/src/claude/skills/generate-graph/agentloop-core.svg +101 -0
- package/src/claude/skills/generate-graph/agents/openai.yaml +4 -0
- package/src/claude/skills/generate-graph/assets/samples/sample-style1-flat.png +0 -0
- package/src/claude/skills/generate-graph/assets/samples/sample-style2-dark.png +0 -0
- package/src/claude/skills/generate-graph/assets/samples/sample-style3-blueprint.png +0 -0
- package/src/claude/skills/generate-graph/assets/samples/sample-style4-notion.png +0 -0
- package/src/claude/skills/generate-graph/assets/samples/sample-style5-glass.png +0 -0
- package/src/claude/skills/generate-graph/assets/samples/sample-style6-claude.png +0 -0
- package/src/claude/skills/generate-graph/assets/samples/sample-style7-openai.png +0 -0
- package/src/claude/skills/generate-graph/fixtures/agent-memory-types-style4.json +181 -0
- package/src/claude/skills/generate-graph/fixtures/api-flow-style7.json +40 -0
- package/src/claude/skills/generate-graph/fixtures/mem0-style1.json +297 -0
- package/src/claude/skills/generate-graph/fixtures/microservices-style3.json +64 -0
- package/src/claude/skills/generate-graph/fixtures/multi-agent-style5.json +45 -0
- package/src/claude/skills/generate-graph/fixtures/system-architecture-style6.json +48 -0
- package/src/claude/skills/generate-graph/fixtures/tool-call-style2.json +182 -0
- package/src/claude/skills/generate-graph/package.json +42 -0
- package/src/claude/skills/generate-graph/references/icons.md +281 -0
- package/src/claude/skills/generate-graph/references/style-1-flat-icon.md +108 -0
- package/src/claude/skills/generate-graph/references/style-2-dark-terminal.md +107 -0
- package/src/claude/skills/generate-graph/references/style-3-blueprint.md +113 -0
- package/src/claude/skills/generate-graph/references/style-4-notion-clean.md +94 -0
- package/src/claude/skills/generate-graph/references/style-5-glassmorphism.md +125 -0
- package/src/claude/skills/generate-graph/references/style-6-claude-official.md +209 -0
- package/src/claude/skills/generate-graph/references/style-7-openai.md +215 -0
- package/src/claude/skills/generate-graph/references/style-diagram-matrix.md +135 -0
- package/src/claude/skills/generate-graph/references/svg-layout-best-practices.md +100 -0
- package/src/claude/skills/generate-graph/scripts/generate-diagram.sh +157 -0
- package/src/claude/skills/generate-graph/scripts/generate-from-template.py +1556 -0
- package/src/claude/skills/generate-graph/scripts/test-all-styles.sh +135 -0
- package/src/claude/skills/generate-graph/scripts/validate-svg.sh +292 -0
- package/src/claude/skills/generate-graph/templates/agent-architecture.svg +28 -0
- package/src/claude/skills/generate-graph/templates/architecture.svg +23 -0
- package/src/claude/skills/generate-graph/templates/comparison-matrix.svg +14 -0
- package/src/claude/skills/generate-graph/templates/data-flow.svg +28 -0
- package/src/claude/skills/generate-graph/templates/er-diagram.svg +21 -0
- package/src/claude/skills/generate-graph/templates/flowchart.svg +21 -0
- package/src/claude/skills/generate-graph/templates/sequence.svg +20 -0
- package/src/claude/skills/generate-graph/templates/state-machine.svg +20 -0
- package/src/claude/skills/generate-graph/templates/timeline.svg +19 -0
- package/src/claude/skills/generate-graph/templates/use-case.svg +21 -0
- package/src/claude/skills/specs/SKILL.md +35 -5
- package/src/claude/skills/specs/references/review.md +1 -1
- package/src/claude/skills/specs/rules/tasks-generation.md +17 -0
- package/src/claude/skills/specs/templates/design.md +13 -0
- package/src/claude/skills/specs/templates/init.json +4 -1
- package/src/claude/skills/specs/templates/requirements.md +21 -8
- package/src/claude/skills/specs/templates/task.md +16 -3
|
@@ -19,7 +19,7 @@ Analyze → Dependency Scan → Complexity Assessment → Init → Requirements
|
|
|
19
19
|
|
|
20
20
|
**CRITICAL:** Before starting, the system MUST:
|
|
21
21
|
1. Scan `specs/` directory for incomplete specs
|
|
22
|
-
2. If any spec is `in-progress` → ask user whether to continue or create new
|
|
22
|
+
2. If any spec is `in_progress` (accept legacy `in-progress` when reading) → ask user whether to continue or create new
|
|
23
23
|
3. Detect cross-spec dependencies (see `references/cross-spec-dependency.md`)
|
|
24
24
|
|
|
25
25
|
## Core Responsibilities & Rules
|
|
@@ -40,6 +40,12 @@ Analyze → Dependency Scan → Complexity Assessment → Init → Requirements
|
|
|
40
40
|
- Never silently expand or shrink scope
|
|
41
41
|
- If scope change needed → ask user, record reason in `spec.json`
|
|
42
42
|
|
|
43
|
+
### State & Integrity Rules
|
|
44
|
+
- Canonical active status string is `in_progress`. Legacy `in-progress` may be READ for compatibility but MUST NOT be generated in new specs.
|
|
45
|
+
- `current_phase` is required for live work and must track the active phase (`init`, `requirements`, `design`, `tasks`, `develop`, `test`, `review`).
|
|
46
|
+
- `task_files` in `spec.json` MUST exactly match the real files under `tasks/` after Step 7.
|
|
47
|
+
- `ready_for_implementation` is a hard gate, not a convenience flag. Never set it before the finalization audit passes.
|
|
48
|
+
|
|
43
49
|
### Output Criteria
|
|
44
50
|
- Never implement code — only create spec documents
|
|
45
51
|
- Return file paths and a brief summary
|
|
@@ -66,7 +72,7 @@ Display selection menu via `AskUserQuestion`:
|
|
|
66
72
|
"options": [
|
|
67
73
|
{ "label": "Create new spec", "description": "Initialize spec from a feature description" },
|
|
68
74
|
{ "label": "status", "description": "View status of all specs in specs/" },
|
|
69
|
-
{ "label": "resume", "description": "Continue an
|
|
75
|
+
{ "label": "resume", "description": "Continue an active spec" },
|
|
70
76
|
{ "label": "--validate", "description": "Review spec (auto-decides: red team or validation)" },
|
|
71
77
|
{ "label": "archive", "description": "Archive completed specs + write journal" }
|
|
72
78
|
],
|
|
@@ -202,6 +208,7 @@ Load: `references/scope-inquiry.md`
|
|
|
202
208
|
- Record findings in `research.md` before finalizing design
|
|
203
209
|
- Write `design.md` from template `templates/design.md` (see `rules/design-principles.md`)
|
|
204
210
|
- Add diagrams only when design has multi-step or cross-boundary flows
|
|
211
|
+
- For auth/session, transport/entrypoint, persistence/schema, generated-artifact, or runtime-sensitive work, the design MUST fill the `Canonical Contracts & Invariants` section and tasks MUST inherit the same decisions verbatim.
|
|
205
212
|
- Update `spec.json` phase, timestamps, discovery mode
|
|
206
213
|
|
|
207
214
|
### Step 7: Task Breakdown
|
|
@@ -210,6 +217,7 @@ Load: `references/scope-inquiry.md`
|
|
|
210
217
|
- Load `rules/tasks-generation.md` for core principles
|
|
211
218
|
- Load `rules/tasks-parallel-analysis.md` for parallel markers (default: enabled)
|
|
212
219
|
- Each task file follows template `templates/task.md`
|
|
220
|
+
- Each task file MUST include `Completion Criteria` and `Verification & Evidence` sections detailed enough that a downstream quality gate can prove the task is truly done.
|
|
213
221
|
- Update `spec.json` phase + task metadata
|
|
214
222
|
|
|
215
223
|
#### Requirement-Driven Task Grouping (MANDATORY)
|
|
@@ -279,10 +287,20 @@ Load: `references/review.md` + `rules/design-review.md`
|
|
|
279
287
|
- **< 3 task files, no security concerns** → Validate only (lightweight interview)
|
|
280
288
|
- **>= 5 task files OR security/migration keywords** → Red Team first, then Validate
|
|
281
289
|
- **User explicit request** → respect user's intent
|
|
290
|
+
- Set `design_context.validation_recommended = true` if the spec includes any of: auth/session, privacy, deletion, migration, schema change, external AI/provider switching, browser extension permissions, or 5+ task files.
|
|
282
291
|
- When both run: Red Team ALWAYS before Validate (red team may change the spec)
|
|
283
292
|
- **PROHIBITION:** The system MUST NOT skip Red Team because of a prior code-auditor review. Code review ≠ Spec review.
|
|
284
293
|
- **PROHIBITION:** The system MUST NOT create `.ts`, `.js`, `.py` or any implementation files during validation. Spec-only outputs.
|
|
285
294
|
|
|
295
|
+
### Step 9.5: Finalization Audit (MANDATORY)
|
|
296
|
+
- Re-scan the `tasks/` directory and rebuild `spec.json.task_files` from the real filesystem (sorted, relative paths)
|
|
297
|
+
- FAIL if any task file exists on disk but is missing from `task_files`
|
|
298
|
+
- FAIL if any path in `task_files` does not exist on disk
|
|
299
|
+
- FAIL if any requirement or NFR mapping uses non-numeric labels (`NFR-1`, `SEC-1`, etc.)
|
|
300
|
+
- FAIL if a task lacks `Completion Criteria` or `Verification & Evidence`
|
|
301
|
+
- If `validation_recommended = true` and `validation.status` is not `completed` (or an explicit accepted-risk state recorded by the user), `ready_for_implementation` MUST remain `false`
|
|
302
|
+
- Only after this audit passes may the system mark `progress.tasks = "done"` and `ready_for_implementation = true`
|
|
303
|
+
|
|
286
304
|
### Step 10: Completion — Context Reminder (MANDATORY)
|
|
287
305
|
After completing the spec, output a short summary of what was generated, then you MUST output the following block EXACTLY as written. DO NOT use awkward translations like "Điểm đã phản ánh đúng quyết định của bạn", keep it professional or just output the block directly:
|
|
288
306
|
|
|
@@ -300,7 +318,7 @@ When user calls `hapo:specs`, system checks `specs/`:
|
|
|
300
318
|
|
|
301
319
|
| Situation | Action |
|
|
302
320
|
|---|---|
|
|
303
|
-
| A spec is `
|
|
321
|
+
| A spec is `in_progress` | Ask: "You have spec `<name>` at phase `<phase>`. Continue? [Y/n]" |
|
|
304
322
|
| A spec matches current git branch | Ask: "Branch `feature/X` has spec `X`. Activate or create new?" |
|
|
305
323
|
| Nothing found | Create new spec or show menu |
|
|
306
324
|
|
|
@@ -318,17 +336,25 @@ When user calls `hapo:specs`, system checks `specs/`:
|
|
|
318
336
|
|
|
319
337
|
### spec.json Update Rules (MANDATORY)
|
|
320
338
|
|
|
339
|
+
**Canonical status vocabulary:** Use `in_progress`, `blocked`, `done`, and `archived`. New specs MUST NOT emit `in-progress`.
|
|
340
|
+
|
|
321
341
|
**Timestamps:** Each `timestamps.*_done` field MUST use the **actual current time** (ISO 8601 with timezone) when that specific phase completes. Do NOT reuse the `init` timestamp for later phases. If running the full pipeline end-to-end, capture a fresh timestamp at each phase transition.
|
|
322
342
|
|
|
323
343
|
**Approvals (auto-approval behavior):**
|
|
324
344
|
- When running the **full pipeline end-to-end** (init → tasks in one session): set `approvals.{phase}.generated = true` AND `approvals.{phase}.approved = true` for each completed phase before proceeding to the next.
|
|
325
345
|
- When running a **single phase**: set `generated = true` but leave `approved = false` — user must explicitly approve before continuing.
|
|
326
346
|
|
|
347
|
+
**Task inventory:** `task_files` MUST be present and MUST list every real task file exactly once using relative paths like `tasks/task-R1-01-example.md`.
|
|
348
|
+
|
|
349
|
+
**Validation recommendation:** `design_context.validation_recommended` MUST be `true` for auth, privacy, delete-data, migration, schema-change, browser-extension-permission, external-provider, or 5+ task file specs.
|
|
350
|
+
|
|
327
351
|
**`ready_for_implementation`:** This field MUST only be set to `true` when ALL of the following conditions are met:
|
|
328
352
|
1. `approvals.requirements.approved = true`
|
|
329
353
|
2. `approvals.design.approved = true`
|
|
330
354
|
3. `approvals.tasks.approved = true`
|
|
331
355
|
4. `progress.tasks = "done"`
|
|
356
|
+
5. `task_files` matches the real filesystem
|
|
357
|
+
6. If `design_context.validation_recommended = true`, `validation.status = "completed"` (or another explicit user-accepted risk state that is recorded)
|
|
332
358
|
|
|
333
359
|
If any approval is `false`, `ready_for_implementation` MUST remain `false`.
|
|
334
360
|
|
|
@@ -359,7 +385,7 @@ specs/
|
|
|
359
385
|
| Command | Purpose | Reference |
|
|
360
386
|
|---|---|---|
|
|
361
387
|
| `/hapo:specs status` | View status of all specs | — |
|
|
362
|
-
| `/hapo:specs resume <feature>` | Continue an
|
|
388
|
+
| `/hapo:specs resume <feature>` | Continue an active spec | — |
|
|
363
389
|
| `/hapo:specs --validate <feature>` | Validate spec (auto: red team + validate based on complexity) | `references/review.md` |
|
|
364
390
|
| `/hapo:specs archive` | Archive completed specs + write journal | `references/archive-workflow.md` |
|
|
365
391
|
|
|
@@ -393,12 +419,16 @@ Before finalizing any specification, assert all the following:
|
|
|
393
419
|
- [ ] **Numeric requirement IDs** assigned to every requirement
|
|
394
420
|
- [ ] **Discovery mode** selected and recorded in spec.json.design_context
|
|
395
421
|
- [ ] **Requirements traceability** matrix present in design.md
|
|
422
|
+
- [ ] **Canonical Contracts & Invariants** filled for auth/transport/persistence/artifact-sensitive work
|
|
396
423
|
- [ ] **Every task file** maps to at least 1 valid in-scope requirement ID
|
|
424
|
+
- [ ] **Every task file** includes `Verification & Evidence` with executable or inspectable proof
|
|
397
425
|
- [ ] **State Machine Blueprint:** design.md contains Mermaid diagrams for non-trivial flows
|
|
398
426
|
- [ ] **Dependency graph complete**: no task can start before its blockers are listed
|
|
399
427
|
- [ ] **Risk matrix filled**: likelihood × impact, with mitigation for High items
|
|
400
428
|
- [ ] **Test strategy defined**: what gets unit tested, integration tested, e2e validated
|
|
401
|
-
- [ ] **
|
|
429
|
+
- [ ] **task_files inventory synced**: no missing or orphaned task references
|
|
430
|
+
- [ ] **Validation gate consistent**: validation_recommended and validation.status agree with spec risk
|
|
431
|
+
- [ ] **spec.json fully updated**: phase, current_phase, progress, timestamps, approvals, design_context
|
|
402
432
|
|
|
403
433
|
## When TO Use
|
|
404
434
|
|
|
@@ -7,7 +7,7 @@ Review a spec before implementation. The system auto-decides the review depth ba
|
|
|
7
7
|
## Spec Resolution
|
|
8
8
|
|
|
9
9
|
1. If `<feature>` argument provided → use `specs/<feature>/`
|
|
10
|
-
2. If not → check active spec (spec with `in-progress`
|
|
10
|
+
2. If not → check active spec (spec with `in_progress` status; accept legacy `in-progress` when reading existing files)
|
|
11
11
|
3. If nothing found → ask user to specify path
|
|
12
12
|
|
|
13
13
|
## Auto-Decision: When to Red Team vs Validate
|
|
@@ -32,6 +32,7 @@ Detail bullets must include:
|
|
|
32
32
|
- Validate core functionality early in sequence
|
|
33
33
|
- Respect architecture boundaries defined in design.md (Architecture Pattern & Boundary Map)
|
|
34
34
|
- Honor interface contracts documented in design.md
|
|
35
|
+
- Translate completion criteria into concrete proof (commands, artifacts, routes, manifests, schema objects, UI states)
|
|
35
36
|
- Use major task summaries sparingly—omit detail bullets if the work is fully captured by child tasks.
|
|
36
37
|
|
|
37
38
|
**End with integration tasks** to wire everything together.
|
|
@@ -131,6 +132,22 @@ Every task file MUST contain the Risk Assessment table, even if no risks are ide
|
|
|
131
132
|
- When the design already guarantees functional coverage and rapid MVP delivery is prioritized, mark purely test-oriented follow-up work (e.g., baseline rendering/unit tests) as **optional** using the `- [ ]*` checkbox form.
|
|
132
133
|
- Only apply the optional marker when the sub-task directly references acceptance criteria from requirements.md in its detail bullets.
|
|
133
134
|
- Never mark implementation work or integration-critical verification as optional—reserve `*` for auxiliary/deferrable test coverage that can be revisited post-MVP.
|
|
135
|
+
- Never mark auth, permissions, privacy, data deletion, migration, schema, or contract verification work as optional.
|
|
136
|
+
|
|
137
|
+
### Mandatory Verification & Evidence
|
|
138
|
+
|
|
139
|
+
Every task file MUST include a `## Verification & Evidence` section.
|
|
140
|
+
|
|
141
|
+
That section MUST contain:
|
|
142
|
+
1. **Automated proof** — exact command(s) for typecheck, tests, build, or explicit `N/A`
|
|
143
|
+
2. **Artifact/runtime proof** — exact files, routes, UI surfaces, generated outputs, or persisted state to inspect
|
|
144
|
+
3. **Contract/negative-path proof** — at least one contract-preserving check for unauthorized, invalid, missing-permission, rollback, or failure-path behavior when relevant
|
|
145
|
+
|
|
146
|
+
Rules:
|
|
147
|
+
- If the task produces a build artifact or generated file, name the exact artifact path to inspect.
|
|
148
|
+
- If the task wires entrypoints (popup, content script, route, worker, CLI command), name the exact runtime surface that must exist after implementation.
|
|
149
|
+
- If verification depends on environment or manual setup, document the blocker explicitly instead of implying success.
|
|
150
|
+
- Build success alone is NEVER enough evidence for a completed task.
|
|
134
151
|
|
|
135
152
|
## Task Hierarchy Rules
|
|
136
153
|
|
|
@@ -65,6 +65,19 @@ When modifying existing systems:
|
|
|
65
65
|
|
|
66
66
|
> Keep rationale concise here and, when more depth is required (trade-offs, benchmarks), add a short summary plus pointer to the Supporting References section and `research.md` for raw investigation notes.
|
|
67
67
|
|
|
68
|
+
## Canonical Contracts & Invariants
|
|
69
|
+
|
|
70
|
+
Capture only the contracts whose inconsistency would break downstream implementation or verification. If the feature touches auth/session, transport/entrypoints, persistence/schema, generated artifacts, or runtime outputs, this section is mandatory.
|
|
71
|
+
|
|
72
|
+
| Contract Area | Canonical Decision | Applies To | Must Stay Consistent In |
|
|
73
|
+
|---------------|--------------------|------------|-------------------------|
|
|
74
|
+
| Auth / session | | | |
|
|
75
|
+
| Transport / entrypoints | | | |
|
|
76
|
+
| Data / persistence | | | |
|
|
77
|
+
| Generated artifacts / runtime outputs | | | |
|
|
78
|
+
|
|
79
|
+
> Task files must reuse the same contract wording. If implementation later needs a different contract, update this section first before generating or editing tasks.
|
|
80
|
+
|
|
68
81
|
## System Flows
|
|
69
82
|
|
|
70
83
|
Provide only the diagrams needed to explain non-trivial flows. Use pure Mermaid syntax. Common patterns:
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
"created_at": "{{TIMESTAMP}}",
|
|
4
4
|
"updated_at": "{{TIMESTAMP}}",
|
|
5
5
|
"language": "vi",
|
|
6
|
-
"status": "
|
|
6
|
+
"status": "in_progress",
|
|
7
7
|
"phase": "initialized",
|
|
8
|
+
"current_phase": "init",
|
|
8
9
|
"priority": "P2",
|
|
9
10
|
"effort": null,
|
|
10
11
|
"tags": [],
|
|
@@ -32,6 +33,8 @@
|
|
|
32
33
|
"blockedBy": [],
|
|
33
34
|
"blocks": []
|
|
34
35
|
},
|
|
36
|
+
"task_files": [],
|
|
37
|
+
"blocker": null,
|
|
35
38
|
"progress": {
|
|
36
39
|
"init": "done",
|
|
37
40
|
"requirements": "pending",
|
|
@@ -25,14 +25,27 @@
|
|
|
25
25
|
|
|
26
26
|
<!-- Additional requirements follow the same pattern -->
|
|
27
27
|
|
|
28
|
-
## Non-Functional Requirements
|
|
28
|
+
## Non-Functional Requirements
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
- The [system] shall [measurable performance metric, e.g. "respond within 500ms"]
|
|
32
|
-
- The [system] shall [measurable scale metric, e.g. "support 100 concurrent users"]
|
|
30
|
+
<!-- Continue the SAME numeric sequence as functional requirements. Do NOT switch to labels like NFR-1, SEC-1, PERF-1. -->
|
|
33
31
|
|
|
34
|
-
###
|
|
35
|
-
|
|
32
|
+
### Requirement {{NEXT_REQ_NUMBER}}: Performance & Scalability
|
|
33
|
+
**Objective:** As a system owner, I want predictable performance characteristics, so that the feature remains usable under expected load.
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
#### Acceptance Criteria
|
|
36
|
+
{{NEXT_REQ_NUMBER}}.1 The [system] shall [measurable performance metric, e.g. "respond within 500ms"]
|
|
37
|
+
{{NEXT_REQ_NUMBER}}.2 The [system] shall [measurable scale metric, e.g. "support 100 concurrent users"]
|
|
38
|
+
|
|
39
|
+
### Requirement {{NEXT_REQ_NUMBER_PLUS_ONE}}: Security & Privacy
|
|
40
|
+
**Objective:** As a security/compliance stakeholder, I want the feature to protect sensitive data and enforce access boundaries, so that the system is safe to ship.
|
|
41
|
+
|
|
42
|
+
#### Acceptance Criteria
|
|
43
|
+
{{NEXT_REQ_NUMBER_PLUS_ONE}}.1 The [system] shall [measurable security behavior, e.g. "encrypt data at rest using AES-256"]
|
|
44
|
+
{{NEXT_REQ_NUMBER_PLUS_ONE}}.2 If [unauthorized or invalid condition], the [system] shall [deny or recover with explicit behavior]
|
|
45
|
+
|
|
46
|
+
### Requirement {{NEXT_REQ_NUMBER_PLUS_TWO}}: Reliability & Availability
|
|
47
|
+
**Objective:** As an operator, I want predictable failure handling, so that incidents remain diagnosable and recoverable.
|
|
48
|
+
|
|
49
|
+
#### Acceptance Criteria
|
|
50
|
+
{{NEXT_REQ_NUMBER_PLUS_TWO}}.1 If [failure condition], the [system] shall [recovery behavior]
|
|
51
|
+
{{NEXT_REQ_NUMBER_PLUS_TWO}}.2 The [system] shall [durability / retry / fallback expectation]
|
|
@@ -54,9 +54,21 @@
|
|
|
54
54
|
|
|
55
55
|
## Completion Criteria
|
|
56
56
|
|
|
57
|
-
- [ ] {{Criteria 1 — observable
|
|
58
|
-
- [ ] {{Criteria 2 — measurable
|
|
59
|
-
- [ ] {{Criteria 3 — maps directly to acceptance criteria from requirements.md}}
|
|
57
|
+
- [ ] {{Criteria 1 — observable output or artifact, maps to acceptance criteria R{{REQ_NUMBER}}}}
|
|
58
|
+
- [ ] {{Criteria 2 — measurable behavior or negative-path outcome}}
|
|
59
|
+
- [ ] {{Criteria 3 — maps directly to acceptance criteria from requirements.md and can be proven below}}
|
|
60
|
+
|
|
61
|
+
## Verification & Evidence
|
|
62
|
+
|
|
63
|
+
- [ ] Automated verification
|
|
64
|
+
- Command(s): `{{TYPECHECK / TEST / BUILD COMMANDS OR N/A}}`
|
|
65
|
+
- Expected proof: {{What output, exit code, or report proves success}}
|
|
66
|
+
- [ ] Artifact / runtime verification
|
|
67
|
+
- Inspect: `{{artifact path | route | UI state | DB object | manifest entry}}`
|
|
68
|
+
- Expect: {{Observable result that proves the task is really wired}}
|
|
69
|
+
- [ ] Contract / negative-path verification
|
|
70
|
+
- Check: {{Unauthorized path, validation error, permission omission, missing env behavior, deletion effect, etc.}}
|
|
71
|
+
- Expect: {{Concrete failure mode or contract-preserving behavior}}
|
|
60
72
|
|
|
61
73
|
## Risk Assessment
|
|
62
74
|
|
|
@@ -70,3 +82,4 @@
|
|
|
70
82
|
> **Parallel marker**: Append `(P)` to the title if this task can run concurrently with another (usually when serving different requirements).
|
|
71
83
|
> **Test note**: If a test coverage sub-task can be deferred post-MVP, mark it with `- [ ]*`.
|
|
72
84
|
> **Requirement mapping**: Every sub-task MUST end with `_Requirements: X.X_`. No mapping = invalid task file.
|
|
85
|
+
> **Verification rule**: No `## Verification & Evidence` section = invalid task file.
|