@haposoft/cafekit 0.8.4 → 0.8.6
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/package.json +1 -1
- package/src/claude/agents/spec-maker.md +9 -6
- package/src/claude/archive-command/spec-init.md +4 -2
- package/src/claude/skills/specs/SKILL.md +6 -1
- package/src/claude/skills/specs/references/review.md +3 -0
- package/src/claude/skills/specs/templates/requirements-init.md +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haposoft/cafekit",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "Claude Code-first spec-driven workflow for AI coding assistants. Bundles CafeKit hapo: skills, runtime hooks, agents, and installer scaffolding.",
|
|
5
5
|
"author": "Haposoft <nghialt@haposoft.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,6 +41,8 @@ Init → Requirements → Design → Tasks
|
|
|
41
41
|
### Auto-Approval Behavior
|
|
42
42
|
- When running the full pipeline end-to-end, follow the auto-approval rules defined in `SKILL.md`.
|
|
43
43
|
- When running a single phase, stop and report status after completion.
|
|
44
|
+
- Normal `/hapo:specs <feature-description>` requests are full pipeline requests.
|
|
45
|
+
- If a pause is required after user review, tell the user to continue with `/hapo:specs resume <feature>` or `/hapo:specs <feature>`.
|
|
44
46
|
|
|
45
47
|
## Scope Lock Protocol (MANDATORY)
|
|
46
48
|
|
|
@@ -152,12 +154,13 @@ Before marking the spec ready:
|
|
|
152
154
|
3. Fail if any on-disk task file is missing from `task_files`
|
|
153
155
|
4. Fail if any path in `task_files` does not exist
|
|
154
156
|
5. Fail if any on-disk task file is missing from `task_registry` or any registry path does not exist
|
|
155
|
-
6.
|
|
156
|
-
7.
|
|
157
|
-
8.
|
|
158
|
-
9.
|
|
159
|
-
10.
|
|
160
|
-
11.
|
|
157
|
+
6. Fail if any task file path does not match `tasks/task-R{N}-{SEQ}-<slug>.md` with two-digit `SEQ` (for example `tasks/task-R0-01-project-scaffolding.md`)
|
|
158
|
+
7. Infer `design_context.validation_recommended = true` for auth, privacy, delete-data, migration, schema-change, browser-extension-permission, external-provider, or 5+ task file specs
|
|
159
|
+
8. If the spec scope switched away from Claude/Anthropic, fail if `requirements.md`, `design.md`, or `tasks/*.md` still contain stale provider strings like `Claude API`, `Haiku`, or `haiku_reachable`. `research.md` may mention old providers only as historical comparison.
|
|
160
|
+
9. For delete/privacy specs, fail if requirements/design/tasks mix multiple deletion policies (for example `email_hash` in one place and `deleted-<uuid>` in another) without one canonical design decision.
|
|
161
|
+
10. If `validation_recommended = true` and validation has not completed (or the user did not explicitly accept risk), keep `ready_for_implementation = false`
|
|
162
|
+
11. Reject task files that use legacy non-numeric mappings like `NFR-1`
|
|
163
|
+
12. If validation decisions were accepted, fail unless they are reflected in implementation-facing sections of affected artifacts and `spec.json.updated_at` / review timestamps reflect the reviewed state
|
|
161
164
|
|
|
162
165
|
## Execution Workflow Summary
|
|
163
166
|
|
|
@@ -102,8 +102,10 @@ Provide output in the language specified in `spec.json` with the following struc
|
|
|
102
102
|
1. **Generated Feature Name**: `feature-name` format with 1-2 sentence rationale
|
|
103
103
|
2. **Project Summary**: Brief summary (1 sentence)
|
|
104
104
|
3. **Created Files**: Bullet list with full paths
|
|
105
|
-
4. **Next Step**: Command block showing `/
|
|
106
|
-
5. **Notes**: Explain
|
|
105
|
+
4. **Next Step**: Command block showing `/hapo:specs resume <feature-name>`
|
|
106
|
+
5. **Notes**: Explain this legacy init command only initialized files. Recommend using `/hapo:specs <feature-description>` for the normal end-to-end CafeKit flow.
|
|
107
|
+
|
|
108
|
+
**Command integrity:** CafeKit continuation uses `/hapo:specs resume <feature-name>`.
|
|
107
109
|
|
|
108
110
|
**Format Requirements**:
|
|
109
111
|
- Use Markdown headings (##, ###)
|
|
@@ -34,6 +34,7 @@ Analyze → Dependency Scan → Complexity Assessment → Init → Evidence Gate
|
|
|
34
34
|
- Each phase (Init → Requirements → Design → Tasks) must complete before the next begins
|
|
35
35
|
- No skipping — don't write design without requirements
|
|
36
36
|
- Exception: simple tasks may merge requirements + design into one step
|
|
37
|
+
- A normal `/hapo:specs <feature-description>` run is an end-to-end spec creation workflow. Do not stop after Init unless the user explicitly asks for init-only behavior.
|
|
37
38
|
|
|
38
39
|
### Scope Rules
|
|
39
40
|
- Respect `scope_lock` absolutely once user has confirmed
|
|
@@ -91,6 +92,8 @@ System auto-analyzes the description:
|
|
|
91
92
|
- If task is simple (small bugfix, config change) → suggest "A spec may not be needed for this. Continue anyway?"
|
|
92
93
|
- If task is complex (multi-module, security/migration related) → auto-activate deep research, ask user 3 scope questions
|
|
93
94
|
- For non-trivial specs, execute the Step 5 Evidence Gate before writing final requirements. Do not design from memory when codebase or current external evidence can answer the question.
|
|
95
|
+
- After user confirms scope, continue through Init → Evidence/Requirements → Design → Tasks → Finalization in the same workflow unless the user explicitly asks for "init only" or "pause after init".
|
|
96
|
+
- If the workflow must pause for manual approval, the continuation command is `/hapo:specs resume <feature>` or `/hapo:specs <feature>`.
|
|
94
97
|
|
|
95
98
|
### When called WITH `--validate` argument
|
|
96
99
|
|
|
@@ -194,7 +197,7 @@ Load: `references/scope-inquiry.md`
|
|
|
194
197
|
- `in_scope`: confirmed scope items
|
|
195
198
|
- `out_of_scope`: excluded items
|
|
196
199
|
- `expansion_policy`: `requires-user-approval`
|
|
197
|
-
-
|
|
200
|
+
- Step 4 itself only initializes files. In a normal `/hapo:specs <feature-description>` run, immediately continue to Step 5 after Init. Stop here only when the user explicitly requested init-only behavior.
|
|
198
201
|
|
|
199
202
|
### Step 5: Evidence Gate, Requirements & Research
|
|
200
203
|
- Read `spec.json` — stop if init hasn't completed
|
|
@@ -330,6 +333,7 @@ Load: `references/review.md` + `rules/design-review.md`
|
|
|
330
333
|
- FAIL if any path in `task_files` does not exist on disk
|
|
331
334
|
- FAIL if any task file exists on disk but is missing from `task_registry`
|
|
332
335
|
- FAIL if any path in `task_registry` does not exist on disk
|
|
336
|
+
- FAIL if any task file path does not match `tasks/task-R{N}-{SEQ}-<slug>.md` with two-digit `SEQ` (for example `tasks/task-R0-01-project-scaffolding.md`)
|
|
333
337
|
- FAIL if a newly generated non-trivial spec lacks a `research.md` Evidence Summary with codebase scout result, external research result or skip rationale, selected decision, rejected alternatives, and downstream task/test implications.
|
|
334
338
|
- FAIL if any requirement or NFR mapping uses non-numeric labels (`NFR-1`, `SEC-1`, etc.)
|
|
335
339
|
- FAIL if a task lacks `Completion Criteria` or `Task Test Plan & Verification Evidence` (legacy `Verification & Evidence` is accepted only for pre-existing task files)
|
|
@@ -390,6 +394,7 @@ When user calls `hapo:specs`, system checks `specs/`:
|
|
|
390
394
|
- When running a **single phase**: set `generated = true` but leave `approved = false` — user must explicitly approve before continuing.
|
|
391
395
|
|
|
392
396
|
**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`.
|
|
397
|
+
Task paths that omit the `task-` prefix or use non-padded sequence numbers (for example `tasks/R1-1-example.md`) are invalid for new CafeKit specs.
|
|
393
398
|
|
|
394
399
|
**Task machine-state:** `task_registry` MUST be present after Step 7. Each key is a relative task path, and each value MUST contain `id`, `title`, `status`, `dependencies`, `blocker`, `started_at`, `completed_at`, and `last_updated_at`.
|
|
395
400
|
|
|
@@ -43,6 +43,8 @@ These rules override any self-reasoning or optimization the system may attempt:
|
|
|
43
43
|
5. **No false completion.** You MUST NOT set `validation.status = "completed"` or `ready_for_implementation = true` until a reconciliation audit proves the accepted findings and validation decisions are reflected in the physical spec artifacts.
|
|
44
44
|
6. **Provider drift is a real defect.** If the scope changed away from Claude/Anthropic, stale strings like `Claude API`, `Haiku`, or `haiku_reachable` in `requirements.md`, `design.md`, or `tasks/*.md` are validation failures. `research.md` may mention them only as historical comparison.
|
|
45
45
|
7. **Implementation-facing propagation is mandatory.** A decision that affects implementation is NOT considered applied if it only appears in `Risk Assessment`, `validate-log.md`, or `red-team-report.md`. It must update at least one of: `requirements.md`, `Canonical Contracts & Invariants`, `Objective`, `Constraints`, `Implementation Steps`, `Completion Criteria`, or `Task Test Plan & Verification Evidence`.
|
|
46
|
+
8. **CafeKit command dialect only.** Validation output MUST use `/hapo:develop <feature>` as the implementation handoff.
|
|
47
|
+
9. **CafeKit task filename convention only.** Task files MUST use `tasks/task-R{N}-{SEQ}-<slug>.md` with two-digit `SEQ` (for example `tasks/task-R0-01-project-scaffolding.md`). Files like `tasks/R0-1-project-scaffolding.md` are legacy/foreign format; rename them and update `spec.json.task_files`, `spec.json.task_registry`, and dependency references before passing validation.
|
|
46
48
|
|
|
47
49
|
---
|
|
48
50
|
|
|
@@ -228,6 +230,7 @@ Before declaring validation complete:
|
|
|
228
230
|
- a report says "applied" but the file still contains the old text
|
|
229
231
|
- stale provider strings remain after a provider change
|
|
230
232
|
- delete-data/privacy artifacts mix multiple canonical policies
|
|
233
|
+
- any task path fails the CafeKit `tasks/task-R{N}-{SEQ}-<slug>.md` naming convention
|
|
231
234
|
- `spec.json.updated_at`, `timestamps.review_done`, or `timestamps.validation_done` do not reflect the final reviewed state
|
|
232
235
|
4. Only after the audit passes may you:
|
|
233
236
|
- set `spec.json.validation.status = "completed"`
|