@haposoft/cafekit 0.18.0 → 0.18.1
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 +1 -1
- package/bin/__tests__/codex-hooks.test.js +169 -236
- package/bin/__tests__/codex-native.test.js +54 -114
- package/bin/__tests__/develop-contract.test.js +101 -1361
- package/bin/__tests__/legacy-authority-decoupled.test.js +14 -19
- package/bin/__tests__/package-inventory.test.js +1 -395
- package/bin/__tests__/spec-narrowing.test.js +30 -134
- package/bin/__tests__/specs-v2-execution-closeout.test.js +0 -372
- package/bin/__tests__/test-runtime-dependency-closure.cjs +1 -2
- package/bin/__tests__/validator-grounding.test.js +17 -2929
- package/bin/lib/managed-writer.js +2 -3
- package/bin/phases/codex-runtime.js +6 -3
- package/bin/phases/copy-payload.js +13 -28
- package/bin/phases/omp-runtime.js +6 -3
- package/package.json +2 -3
- package/src/claude/agents/code-auditor.md +9 -6
- package/src/claude/agents/debugger.md +3 -9
- package/src/claude/agents/docs-keeper.md +4 -7
- package/src/claude/agents/git-ops.md +2 -4
- package/src/claude/agents/implementer.md +6 -7
- package/src/claude/agents/inspector.md +2 -0
- package/src/claude/agents/project-manager.md +2 -2
- package/src/claude/agents/spec-maker.md +4 -4
- package/src/claude/agents/test-runner.md +8 -11
- package/src/claude/agents/ui-ux-designer.md +0 -1
- package/src/claude/hooks/__tests__/spec-gate.test.js +170 -330
- package/src/claude/hooks/__tests__/spec-state-touched.test.js +26 -0
- package/src/claude/hooks/spec-gate.cjs +8 -63
- package/src/claude/hooks/spec-state.cjs +47 -38
- package/src/claude/migration-manifest.json +12 -7
- package/src/claude/output-styles/coding-level-0-eli5.md +9 -9
- package/src/claude/output-styles/coding-level-1-junior.md +3 -3
- package/src/claude/output-styles/coding-level-2-mid.md +3 -3
- package/src/claude/output-styles/coding-level-3-senior.md +2 -2
- package/src/claude/output-styles/coding-level-4-lead.md +5 -5
- package/src/claude/output-styles/coding-level-5-god.md +6 -6
- package/src/claude/rules/ai-dev-rules.md +1 -2
- package/src/claude/rules/workflow.md +1 -1
- package/src/claude/scripts/spec-receipt.cjs +0 -114
- package/src/claude/scripts/spec-resolver.cjs +41 -457
- package/src/claude/scripts/workflow-policy.cjs +3 -1801
- package/src/claude/skills/agent-browser/SKILL.md +1 -1
- package/src/claude/skills/chrome-devtools/SKILL.md +14 -31
- package/src/claude/skills/code-review/SKILL.md +25 -108
- package/src/claude/skills/code-review/references/spec-compliance-review.md +4 -7
- package/src/claude/skills/develop/SKILL.md +22 -70
- package/src/claude/skills/develop/references/subagent-patterns.md +0 -6
- package/src/claude/skills/research/SKILL.md +24 -55
- package/src/claude/skills/sync/SKILL.md +12 -34
- package/src/claude/skills/sync/references/rebind-and-audit.md +2 -2
- package/src/claude/skills/test/SKILL.md +39 -123
- package/src/claude/skills/test/references/execution-strategy.md +11 -22
- package/src/claude/skills/ui-ux/SKILL.md +1 -1
- package/src/claude/skills/ui-ux-pro-max/SKILL.md +24 -79
- package/src/claude/skills/web-testing/SKILL.md +2 -20
- package/src/codex/hooks/lib/spec-receipt.cjs +2 -30
- package/src/codex/hooks/lib/spec-utils.cjs +6 -45
- package/src/codex/hooks/spec-gate.cjs +11 -68
- package/src/codex/hooks/spec-state.cjs +37 -41
- package/src/common/AGENTS.md +4 -10
- package/bin/__tests__/change-firewall.semantic-firewall.test.js +0 -2133
- package/bin/__tests__/finalizer-pass-gate.semantic-firewall.test.js +0 -342
- package/bin/__tests__/release-preflight.semantic-firewall.test.js +0 -586
- package/bin/__tests__/review-receipt-c2.semantic-firewall.test.js +0 -378
- package/bin/__tests__/specs-v2-policy-and-scaffold.test.js +0 -665
- package/bin/__tests__/specs-v2-validator-grounder-contract.test.js +0 -1132
- package/src/claude/hooks/lib/context.cjs +0 -527
- package/src/claude/hooks/lib/detect.cjs +0 -474
- package/src/claude/scripts/change-firewall.cjs +0 -1748
- package/src/claude/scripts/spec-authoring-digest.cjs +0 -151
- package/src/claude/scripts/spec-authoring-validation.cjs +0 -126
- package/src/claude/scripts/spec-final-state.cjs +0 -290
- package/src/claude/scripts/spec-ground.cjs +0 -650
- package/src/claude/scripts/spec-readiness.cjs +0 -425
- package/src/claude/scripts/spec-scaffold.cjs +0 -2317
- package/src/claude/scripts/spec-semantic-model.cjs +0 -396
- package/src/claude/scripts/validate-spec-output.cjs +0 -3914
- package/src/claude/skills/code-review/references/verification-gate.md +0 -41
- package/src/claude/skills/specs/templates/design.md +0 -82
- package/src/claude/skills/specs/templates/requirements-init.md +0 -8
- package/src/claude/skills/specs/templates/requirements.md +0 -42
- package/src/claude/skills/specs/templates/spec-state.json +0 -56
- package/src/claude/skills/specs/templates/task.md +0 -47
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: verification-gate
|
|
3
|
-
description: Legacy proof consumption. Defines what supplied execution proof contains when a review of a legacy packet consumes it; the reviewer never produces that proof.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Verification Gate: legacy proof consumption
|
|
7
|
-
|
|
8
|
-
This reference applies only to a legacy packet. A
|
|
9
|
-
review never runs tests, builds, or linters to produce proof; `cf:test` owns
|
|
10
|
-
execution, and the test-run boundary in `SKILL.md` applies here as well.
|
|
11
|
-
|
|
12
|
-
## 1. What supplied proof contains
|
|
13
|
-
|
|
14
|
-
Proof reaches the review from the test owner, never from the review itself. It
|
|
15
|
-
may be:
|
|
16
|
-
|
|
17
|
-
- **Test suite logs:** output showing which tests ran and their result.
|
|
18
|
-
- **Compilation or build status:** compiler or bundler output with its exit code.
|
|
19
|
-
- **Linter completion:** output showing the lint run and its result.
|
|
20
|
-
- **Multimodal visual evidence:** `cf:ai-multimodal` when installed, or another
|
|
21
|
-
available runtime visual capability; otherwise visual parity is `UNPROVEN`.
|
|
22
|
-
|
|
23
|
-
For Specs v2, accepted proof must be persisted by the test owner at
|
|
24
|
-
`receipts/<task-basename>.md`; legacy `## Evidence` remains fallback-only. The
|
|
25
|
-
receipt includes identity/path, exact command, exit/result, expected versus
|
|
26
|
-
observed behavior, applicable negative/reachability/artifact proof, and bound
|
|
27
|
-
Base/Head. Closing a legacy `spec.json` packet that has no `schema_version` still
|
|
28
|
-
requires `feature-receipt.md`. A receipt never grants approval, readiness, audit
|
|
29
|
-
status, or product semantics.
|
|
30
|
-
|
|
31
|
-
For v2.1, the semantic receipt is reviewed input, not execution proof. It binds
|
|
32
|
-
exact criteria and counterexamples shaped as `criterion`, `case_kind`,
|
|
33
|
-
`scenario`, `expected`, `decision_refs`, and `verification_ref`. Deterministic
|
|
34
|
-
validator success is never a semantic-review verdict.
|
|
35
|
-
|
|
36
|
-
## 2. When supplied proof is missing or failed
|
|
37
|
-
|
|
38
|
-
A missing legacy receipt leaves the closeout unfinished: the review still
|
|
39
|
-
returns its correctness verdict and states execution proof as unavailable (owned
|
|
40
|
-
by `cf:test`). Supplied proof that failed is a finding the review reports. Never
|
|
41
|
-
rerun or retry anything to fill the gap.
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# Design
|
|
2
|
-
|
|
3
|
-
<!-- Delete every optional section that is not relevant. Compact keeps only the four core sections. -->
|
|
4
|
-
|
|
5
|
-
## Boundary
|
|
6
|
-
|
|
7
|
-
- **Owns:** {{Behavior/state this design owns}}
|
|
8
|
-
- **Reads:** {{Relevant inputs or existing state, or none}}
|
|
9
|
-
- **Writes/exposes:** {{Outputs, state, route, artifact, or none}}
|
|
10
|
-
- **Outside boundary:** {{Explicit non-goal or delegated responsibility}}
|
|
11
|
-
|
|
12
|
-
## Typed Anchors
|
|
13
|
-
|
|
14
|
-
<!-- Files-first. IDs are unique across the whole spec. Design-owned anchors use A-D-NN. Access/Action are machine authority; Role never implies lifecycle. -->
|
|
15
|
-
|
|
16
|
-
| ID | Type | Target | Role | Access | Action |
|
|
17
|
-
|---|---|---|---|---|---|
|
|
18
|
-
| A-D-01 | file | `{{path/to/existing-or-planned-file}}` | {{owner / consumer / entrypoint / proof / constraint}} | {{read / write}} | {{read / create / modify / delete}} |
|
|
19
|
-
<!-- For a typed proof boundary, add: | A-D-02 | artifact | `{{path/to/proof-artifact}}` | proof evidence owner | write | create | -->
|
|
20
|
-
|
|
21
|
-
## Decisions and Invariants
|
|
22
|
-
|
|
23
|
-
<!-- Keep stable D/I/C IDs: every RN.M semantic-review counterexample cites one exact design reference. -->
|
|
24
|
-
|
|
25
|
-
### D1 — {{Decision name}}
|
|
26
|
-
|
|
27
|
-
- **Decision:** {{Canonical behavior or boundary}}
|
|
28
|
-
- **Rejects ambiguity:** {{Alternative interpretation implementers must not choose}}
|
|
29
|
-
- **Negative path:** {{Failure/error behavior when relevant}}
|
|
30
|
-
- **Anchors:** A-D-01
|
|
31
|
-
|
|
32
|
-
### I1 — {{Invariant name}}
|
|
33
|
-
|
|
34
|
-
{{Property that must remain true across implementation and verification.}}
|
|
35
|
-
|
|
36
|
-
### Named Contracts (conditional)
|
|
37
|
-
|
|
38
|
-
<!-- Define each implementation-significant contract once. Tasks reference IDs and never copy bodies. For any public, replay, or operator API contract, include method, route, auth, required headers, request schema, success response, error semantics, and idempotency/concurrency behavior. -->
|
|
39
|
-
|
|
40
|
-
#### C1 — {{Contract name}}
|
|
41
|
-
|
|
42
|
-
- **Owner:** {{boundary or future owner task}}
|
|
43
|
-
- **Consumers:** {{boundaries or future consumer tasks}}
|
|
44
|
-
- **Shape/behavior:** {{typed request, response, event, schema, state, or error contract}}
|
|
45
|
-
- **Compatibility:** {{versioning or migration constraint when relevant}}
|
|
46
|
-
|
|
47
|
-
## Verification Definitions
|
|
48
|
-
|
|
49
|
-
<!--
|
|
50
|
-
Canonical parser syntax is one single-line definition per V ID. Keep every
|
|
51
|
-
label on the same line; do not replace this with a table or a V heading.
|
|
52
|
-
-->
|
|
53
|
-
|
|
54
|
-
- **V1**: Criteria R{{SUBJECT_REQ}}.{{X}}; Owner A-D-01; Decision refs D1, I1, C1; Method command `{{exact command}}`; Expected {{concrete observable result}}; Negative/failure {{concrete rejected or recovery case}}; Reachability/grounding entrypoint `{{exact/repository/entrypoint}}` via A-D-01.
|
|
55
|
-
|
|
56
|
-
<!-- Only for a typed proof boundary, insert after Owner: Proof criteria Rn.m; Proof owner <distinct owner>; Evidence anchor <proof-owned anchor>; -->
|
|
57
|
-
|
|
58
|
-
<!-- Full-only conditional sections follow. Keep only those relevant to this feature. -->
|
|
59
|
-
|
|
60
|
-
## Flow (Full, conditional)
|
|
61
|
-
|
|
62
|
-
{{Only multi-step, branching, asynchronous, or cross-boundary flow decisions.}}
|
|
63
|
-
|
|
64
|
-
## Data and Consistency (Full, conditional)
|
|
65
|
-
|
|
66
|
-
{{Ownership, schema, constraints, concurrency, lifecycle, or idempotency. For any retention/lifecycle policy, state clock anchor, clock source, timezone/precision, cutoff comparator/inclusivity, enforcement boundary, and a wrong-clock/boundary counterexample.}}
|
|
67
|
-
|
|
68
|
-
## Errors and Recovery (Full, conditional)
|
|
69
|
-
|
|
70
|
-
{{Trigger, error contract, retry/rollback/reconciliation, and terminal state.}}
|
|
71
|
-
|
|
72
|
-
## Security and Privacy (Full, conditional)
|
|
73
|
-
|
|
74
|
-
{{Trust boundary, authorization, sensitive data, deletion, and retention decisions.}}
|
|
75
|
-
|
|
76
|
-
## Migration and Compatibility (Full, conditional)
|
|
77
|
-
|
|
78
|
-
{{Ordering, compatibility window, rollback trigger, and migration proof.}}
|
|
79
|
-
|
|
80
|
-
## Unresolved Questions
|
|
81
|
-
|
|
82
|
-
- None.
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# Requirements
|
|
2
|
-
|
|
3
|
-
## Outcomes
|
|
4
|
-
|
|
5
|
-
- {{Observable product or system outcome}}
|
|
6
|
-
|
|
7
|
-
## Scope
|
|
8
|
-
|
|
9
|
-
### In scope
|
|
10
|
-
|
|
11
|
-
- {{Approved behavior or boundary}}
|
|
12
|
-
|
|
13
|
-
### Non-goals
|
|
14
|
-
|
|
15
|
-
- {{Explicit exclusion that prevents scope inference}}
|
|
16
|
-
|
|
17
|
-
## Requirements
|
|
18
|
-
|
|
19
|
-
### Requirement 1: {{Outcome area}}
|
|
20
|
-
|
|
21
|
-
<!-- Keep Objective/User Story only when role and benefit remove ambiguity. -->
|
|
22
|
-
{{Optional: **Objective:** As a <role>, I want <capability>, so that <benefit>.}}
|
|
23
|
-
|
|
24
|
-
#### Acceptance Criteria
|
|
25
|
-
|
|
26
|
-
- **R1.1** When {{event}}, the {{system}} shall {{measurable subject response}}.
|
|
27
|
-
|
|
28
|
-
<!-- Add a separate proof criterion only when a typed proof boundary exists. -->
|
|
29
|
-
|
|
30
|
-
<!-- Add state, optional-feature, or ubiquitous EARS criteria only when relevant. -->
|
|
31
|
-
<!-- Add a concrete example only when values, order, boundaries, or transformation could be interpreted differently. -->
|
|
32
|
-
|
|
33
|
-
#### Examples (conditional)
|
|
34
|
-
|
|
35
|
-
- {{Input/state}} → {{expected output/state}}
|
|
36
|
-
|
|
37
|
-
<!-- Repeat Requirement N with literal RN.M acceptance IDs. -->
|
|
38
|
-
<!-- Add feature-specific NFRs in the same numeric sequence only when measurable and relevant. -->
|
|
39
|
-
|
|
40
|
-
## Unresolved Questions
|
|
41
|
-
|
|
42
|
-
- None.
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schema_version": "2.1",
|
|
3
|
-
"feature_name": "{{FEATURE_NAME}}",
|
|
4
|
-
"created_at": "{{TIMESTAMP}}",
|
|
5
|
-
"updated_at": "{{TIMESTAMP}}",
|
|
6
|
-
"language": "en",
|
|
7
|
-
"status": "in_progress",
|
|
8
|
-
"scope_lock": {
|
|
9
|
-
"source": "{{PROJECT_DESCRIPTION}}",
|
|
10
|
-
"in_scope": [],
|
|
11
|
-
"out_of_scope": [],
|
|
12
|
-
"expansion_policy": "requires-user-approval"
|
|
13
|
-
},
|
|
14
|
-
"authoring": {
|
|
15
|
-
"requirements": "draft",
|
|
16
|
-
"design": "draft",
|
|
17
|
-
"research": "absent",
|
|
18
|
-
"tasks": "absent"
|
|
19
|
-
},
|
|
20
|
-
"coordination": {
|
|
21
|
-
"boundaries": []
|
|
22
|
-
},
|
|
23
|
-
"validation": {
|
|
24
|
-
"status": "not-run",
|
|
25
|
-
"semantic_review": {
|
|
26
|
-
"status": "not-run",
|
|
27
|
-
"semantic_digest": null,
|
|
28
|
-
"verdict": null,
|
|
29
|
-
"lifecycle_disposition": null,
|
|
30
|
-
"findings": [],
|
|
31
|
-
"unresolved_decisions": [],
|
|
32
|
-
"graph_coverage": [],
|
|
33
|
-
"repair_round": 0,
|
|
34
|
-
"reviewed_criteria": [],
|
|
35
|
-
"counterexamples": [],
|
|
36
|
-
"reviewer_evidence": null
|
|
37
|
-
},
|
|
38
|
-
"semantic_review_history": {
|
|
39
|
-
"lineage_id": "{{LINEAGE_ID}}",
|
|
40
|
-
"entries": []
|
|
41
|
-
},
|
|
42
|
-
"authoring_validation": null
|
|
43
|
-
},
|
|
44
|
-
"semantic_model": null,
|
|
45
|
-
"ready_for_implementation": false,
|
|
46
|
-
"workflow_policy": {
|
|
47
|
-
"version": "2.1",
|
|
48
|
-
"planning_depth": "Compact",
|
|
49
|
-
"assurance_level": "Routine",
|
|
50
|
-
"classified_minimum": {
|
|
51
|
-
"planning_depth": "Compact",
|
|
52
|
-
"assurance_level": "Routine"
|
|
53
|
-
},
|
|
54
|
-
"risks": []
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Task R{{REQ_NUMBER}}-{{SEQ}}: {{TITLE}}
|
|
2
|
-
**Status:** pending
|
|
3
|
-
|
|
4
|
-
## Outcome
|
|
5
|
-
|
|
6
|
-
{{Concrete observable vertical outcome, named entrypoint, and resulting state delivered by this task.}}
|
|
7
|
-
|
|
8
|
-
## Scope
|
|
9
|
-
|
|
10
|
-
- **In scope:** {{Exact behavior owned by this task}}
|
|
11
|
-
- **Out of scope:** {{Explicit exclusions or delegated behavior}}
|
|
12
|
-
|
|
13
|
-
## Anchors and Ownership
|
|
14
|
-
|
|
15
|
-
<!-- Compact core: one owned anchor is enough; proof artifact/owner exists only for a typed proof boundary (see Verification Plan). -->
|
|
16
|
-
| ID | Type | Target | Role | Access | Action |
|
|
17
|
-
|---|---|---|---|---|---|
|
|
18
|
-
| A-R{{REQ_NUMBER}}-{{SEQ}}-01 | file | `{{exact/path/to/file}}` | owner | write | modify |
|
|
19
|
-
<!-- For a typed proof boundary, add: | A-R{{REQ_NUMBER}}-{{SEQ}}-02 | file | `{{exact/path/to/test-file}}` | proof | write | create | and set Task role accordingly; otherwise omit. Every executable task must own a concrete test file/artifact anchor or share proof via that typed boundary; bare command is not ownership. -->
|
|
20
|
-
|
|
21
|
-
## Changes
|
|
22
|
-
|
|
23
|
-
<!-- Every checkbox maps exact RN.M IDs; the set must equal Acceptance below. -->
|
|
24
|
-
- [ ] {{Implement behavior at the exact owned boundary.}} _Requirements: {{REQ_NUMBER}}.{{X}}_
|
|
25
|
-
- [ ] {{Handle the concrete negative or recovery path.}} _Requirements: {{REQ_NUMBER}}.{{Y}}_
|
|
26
|
-
|
|
27
|
-
## Acceptance
|
|
28
|
-
|
|
29
|
-
<!-- Declare each mapped RN.M once with a measurable output/state and negative behavior. -->
|
|
30
|
-
- **R{{REQ_NUMBER}}.{{X}}:** {{Measurable observable outcome}}
|
|
31
|
-
- **R{{REQ_NUMBER}}.{{Y}}:** {{Concrete negative or recovery outcome}}
|
|
32
|
-
|
|
33
|
-
## Dependencies
|
|
34
|
-
|
|
35
|
-
- {{DEPENDENCIES}}
|
|
36
|
-
|
|
37
|
-
## Verification Plan
|
|
38
|
-
|
|
39
|
-
<!-- Ownership invariant: a bare npm test command without a concrete file/artifact anchor is not ownership; shared proof must use a typed proof boundary. -->
|
|
40
|
-
- **Verification ref:** {{V reference whose structured subject/proof owner matches this task}}
|
|
41
|
-
- **Task role:** {{subject | verifier}}
|
|
42
|
-
- **Command:** `{{Exact project command}}`
|
|
43
|
-
- **Expected:** {{Exit, output, state, artifact, or UI result}}
|
|
44
|
-
- **Negative path:** {{Contract-preserving failure check}}
|
|
45
|
-
- **Reachability:** `{{Real entrypoint/caller or generated artifact}}`
|
|
46
|
-
|
|
47
|
-
<!-- The table above is the only task anchor/ownership table. Access read requires Action read. Access write requires create, modify, or delete. Targets are exact; globs and parent-directory claims are invalid. A verifier must not repeat the subject's Acceptance criterion. Specs-only never creates or updates docs and never fabricates execution proof; record doc impact as a brief recommendation only. -->
|