@haposoft/cafekit 0.16.0-rc.3 → 0.16.0-rc.4

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.
Files changed (91) hide show
  1. package/bin/__tests__/codex-hooks.test.js +444 -14
  2. package/bin/__tests__/codex-native.test.js +228 -7
  3. package/bin/__tests__/develop-contract.test.js +615 -185
  4. package/bin/__tests__/installer-safety.test.js +39 -0
  5. package/bin/__tests__/opencode-spec-gate.test.js +24 -16
  6. package/bin/__tests__/package-inventory.test.js +687 -13
  7. package/bin/__tests__/specs-v2-execution-closeout.test.js +421 -0
  8. package/bin/__tests__/specs-v2-policy-and-scaffold.test.js +601 -0
  9. package/bin/__tests__/specs-v2-validator-grounder-contract.test.js +952 -0
  10. package/bin/__tests__/test-runtime-dependency-closure.cjs +182 -0
  11. package/bin/__tests__/validator-grounding.test.js +1914 -221
  12. package/bin/lib/managed-writer.js +12 -3
  13. package/bin/phases/codex-runtime.js +17 -1
  14. package/package.json +1 -1
  15. package/src/claude/CLAUDE.md +6 -0
  16. package/src/claude/agents/code-auditor.md +20 -0
  17. package/src/claude/agents/spec-maker.md +143 -99
  18. package/src/claude/hooks/__tests__/completion-authority.test.js +291 -58
  19. package/src/claude/hooks/__tests__/privacy-block.test.js +172 -0
  20. package/src/claude/hooks/__tests__/semantic-review-authority.test.js +257 -0
  21. package/src/claude/hooks/__tests__/spec-gate.test.js +115 -40
  22. package/src/claude/hooks/completion-authority-check.cjs +37 -288
  23. package/src/claude/hooks/completion-authority-state.cjs +10 -8
  24. package/src/claude/hooks/completion-authority.cjs +13 -7
  25. package/src/claude/hooks/docs-sync.cjs +5 -2
  26. package/src/claude/hooks/lib/privacy-command-analysis.cjs +393 -0
  27. package/src/claude/hooks/lib/runtime-path-safety.cjs +119 -0
  28. package/src/claude/hooks/privacy-block.cjs +77 -30
  29. package/src/claude/hooks/semantic-review-authority.cjs +152 -0
  30. package/src/claude/hooks/spec-gate.cjs +47 -117
  31. package/src/claude/hooks/spec-state.cjs +8 -2
  32. package/src/claude/migration-manifest.json +9 -1
  33. package/src/claude/rules/state-sync.md +52 -21
  34. package/src/claude/rules/workflow.md +17 -9
  35. package/src/claude/scripts/spec-final-state.cjs +244 -0
  36. package/src/claude/scripts/spec-ground.cjs +535 -173
  37. package/src/claude/scripts/spec-readiness.cjs +118 -0
  38. package/src/claude/scripts/spec-receipt.cjs +162 -0
  39. package/src/claude/scripts/spec-resolver.cjs +67 -16
  40. package/src/claude/scripts/spec-scaffold.cjs +1354 -139
  41. package/src/claude/scripts/spec-semantic-model.cjs +396 -0
  42. package/src/claude/scripts/validate-spec-output.cjs +2782 -142
  43. package/src/claude/scripts/workflow-policy.cjs +501 -183
  44. package/src/claude/settings/settings.json +4 -0
  45. package/src/claude/skills/code-review/SKILL.md +12 -3
  46. package/src/claude/skills/code-review/references/spec-compliance-review.md +10 -2
  47. package/src/claude/skills/code-review/references/verification-gate.md +13 -0
  48. package/src/claude/skills/develop/SKILL.md +47 -60
  49. package/src/claude/skills/develop/references/parallel-waves.md +9 -6
  50. package/src/claude/skills/develop/references/quality-gate.md +19 -12
  51. package/src/claude/skills/specs/SKILL.md +183 -177
  52. package/src/claude/skills/specs/references/ask-user-question-gates.md +27 -18
  53. package/src/claude/skills/specs/references/cross-spec-dependency.md +8 -4
  54. package/src/claude/skills/specs/references/research-strategy.md +4 -1
  55. package/src/claude/skills/specs/references/review.md +200 -260
  56. package/src/claude/skills/specs/references/scope-inquiry.md +18 -5
  57. package/src/claude/skills/specs/rules/design-discovery-full.md +33 -81
  58. package/src/claude/skills/specs/rules/design-discovery-light.md +21 -42
  59. package/src/claude/skills/specs/rules/design-principles.md +136 -180
  60. package/src/claude/skills/specs/rules/design-review.md +42 -97
  61. package/src/claude/skills/specs/rules/ears-format.md +42 -50
  62. package/src/claude/skills/specs/rules/phase-decision-matrix.md +42 -41
  63. package/src/claude/skills/specs/rules/task-scoring-rubric.md +2 -1
  64. package/src/claude/skills/specs/rules/tasks-generation.md +189 -300
  65. package/src/claude/skills/specs/templates/design.md +49 -263
  66. package/src/claude/skills/specs/templates/requirements.md +26 -36
  67. package/src/claude/skills/specs/templates/research.md +9 -98
  68. package/src/claude/skills/specs/templates/spec-state.json +23 -85
  69. package/src/claude/skills/specs/templates/task.md +30 -102
  70. package/src/claude/skills/sync/SKILL.md +33 -10
  71. package/src/claude/skills/sync/references/sync-protocols.md +31 -13
  72. package/src/claude/skills/test/SKILL.md +17 -7
  73. package/src/codex/AGENTS.md +6 -0
  74. package/src/codex/hooks/completion-authority-check.cjs +43 -240
  75. package/src/codex/hooks/completion-authority-state.cjs +10 -8
  76. package/src/codex/hooks/completion-authority.cjs +13 -7
  77. package/src/codex/hooks/lib/hook-context.cjs +16 -2
  78. package/src/codex/hooks/lib/privacy-command-analysis.cjs +3 -0
  79. package/src/codex/hooks/lib/privacy-state.cjs +38 -16
  80. package/src/codex/hooks/lib/runtime-path-safety.cjs +3 -0
  81. package/src/codex/hooks/lib/spec-receipt.cjs +72 -134
  82. package/src/codex/hooks/lib/spec-utils.cjs +56 -5
  83. package/src/codex/hooks/privacy-approval.cjs +1 -1
  84. package/src/codex/hooks/privacy-block.cjs +67 -11
  85. package/src/codex/hooks/semantic-review-authority.cjs +130 -0
  86. package/src/codex/hooks/spec-gate.cjs +49 -34
  87. package/src/codex/hooks/spec-state.cjs +10 -3
  88. package/src/codex/hooks/state.cjs +2 -0
  89. package/src/codex/hooks.json +6 -1
  90. package/src/codex/rules/state-sync.md +47 -27
  91. package/src/common/AGENTS.md +1 -1
@@ -1,110 +1,55 @@
1
- # Design Review Process
1
+ # Design review contract
2
2
 
3
- ## Objective
4
- Conduct interactive quality review of technical design documents to ensure they are solid enough to proceed to implementation with acceptable risk.
3
+ Review the complete routed artifact graph for implementation-blocking semantic
4
+ gaps. Concise presentation is encouraged; inventory size is never capped.
5
5
 
6
- ## Review Philosophy
7
- - **Quality assurance, not perfection seeking**
8
- - **Critical focus**: Limit to 3 most important concerns
9
- - **Interactive dialogue**: Engage with designer, not one-way evaluation
10
- - **Balanced assessment**: Recognize strengths and weaknesses
11
- - **Clear decision**: Definitive GO/NO-GO with rationale
6
+ ## Coverage
12
7
 
13
- ## Scope & Non-Goals
8
+ For every `RN.M` criterion:
14
9
 
15
- - Scope: Evaluate the quality of the design document against project context and standards to decide GO/NO-GO.
16
- - Non-Goals: Do not perform implementation-level design, deep technology research, or finalize technology choices. Defer such items to the design phase iteration.
10
+ 1. trace the exact implementation owner, boundary, applicable `D`/`I`/`C`
11
+ definitions, and canonical `V` definition;
12
+ 2. construct a concrete counterexample or failure scenario;
13
+ 3. confirm the expected result rejects or handles that scenario;
14
+ 4. confirm referenced anchors are reachable and grounded; and
15
+ 5. record every unresolved contradiction, ambiguity, missing owner, broken
16
+ dependency, unreachable proof, or scope violation as a blocker.
17
17
 
18
- ## Core Review Criteria
18
+ Also review cross-criterion contracts, state transitions, concurrency,
19
+ authorization, recovery, compatibility, and rollback where scope activates
20
+ them. Do not perform broad technology research during review; return an exact
21
+ uncertainty to the artifact router when new material uncertainty is discovered.
19
22
 
20
- ### 1. Existing Architecture Alignment (Critical)
21
- - Integration with existing system boundaries and layers
22
- - Consistency with established architectural patterns
23
- - Proper dependency direction and coupling management
24
- - Alignment with current module organization
23
+ ## Finding shape
25
24
 
26
- ### 2. Design Consistency & Standards
27
- - Adherence to project naming conventions and code standards
28
- - Consistent error handling and logging strategies
29
- - Uniform configuration and dependency management
30
- - Alignment with established data modeling patterns
25
+ Each blocker states:
31
26
 
32
- ### 3. Extensibility & Maintainability
33
- - Design flexibility for future requirements
34
- - Clear separation of concerns and single responsibility
35
- - Testability and debugging considerations
36
- - Appropriate complexity for requirements
27
+ - affected criterion and design/verification refs;
28
+ - concrete counterexample;
29
+ - observed conflicting or missing artifact content;
30
+ - impact on implementation or proof; and
31
+ - smallest semantic decision or correction required.
37
32
 
38
- ### 4. Type Safety & Interface Design
39
- - Proper type definitions and interface contracts
40
- - Avoidance of unsafe patterns (e.g., `any` in TypeScript)
41
- - Clear API boundaries and data structures
42
- - Input validation and error handling coverage
33
+ Group duplicates for readability without dropping distinct blockers. Positive
34
+ observations are optional and never displace a blocker.
43
35
 
44
- ## Review Process
36
+ ## Decision
45
37
 
46
- ### Step 1: Analyze
47
- Analyze design against all review criteria, focusing on critical issues impacting integration, maintainability, complexity, and requirements fulfillment.
38
+ - `PASS`: the full routed graph is coherent, grounded, and every criterion's
39
+ counterexample is resolved.
40
+ - `FAIL`: at least one semantic or structural blocker is actionable now.
41
+ - `BLOCKED`: required product input, trusted capability, or external evidence
42
+ is unavailable.
48
43
 
49
- ### Step 2: Identify Critical Issues (≤3)
50
- For each issue:
51
- ```
52
- 🔴 **Critical Issue [1-3]**: [Brief title]
53
- **Concern**: [Specific problem]
54
- **Impact**: [Why it matters]
55
- **Suggestion**: [Concrete improvement]
56
- **Traceability**: [Requirement ID/section from requirements.md]
57
- **Evidence**: [Design doc section/heading]
58
- ```
44
+ Routine and Elevated require semantic review but no reviewer ceremony. Strict
45
+ requires an independent allowlisted reviewer capability observed by the host
46
+ hook. An author, task marker, receipt text, or claimed role cannot self-attest
47
+ that capability. Risk alone has an Elevated floor; Strict is opt-in only for an
48
+ explicit user/project audit requirement or a user-confirmed, scope-specific
49
+ audit decision. If the host event is unavailable, pause once rather than retry,
50
+ downgrade, or simulate authority. Deterministic validation checks implemented
51
+ structure and grounding; it never replaces this semantic judgment.
59
52
 
60
- ### Step 3: Recognize Strengths
61
- Acknowledge 1-2 strong aspects to maintain balanced feedback.
62
-
63
- ### Step 4: Decide GO/NO-GO
64
- - **GO**: No critical architectural misalignment, requirements addressed, clear implementation path, acceptable risks
65
- - **NO-GO**: Fundamental conflicts, critical gaps, high failure risk, disproportionate complexity
66
-
67
- ## Traceability & Evidence
68
-
69
- - Link each critical issue to the relevant requirement(s) from `requirements.md` (ID or section).
70
- - Cite evidence locations in the design document (section/heading, diagram, or artifact) to support the assessment.
71
- - When applicable, reference constraints from steering context to justify the issue.
72
-
73
- ## Output Format
74
-
75
- ### Design Review Summary
76
- 2-3 sentences on overall quality and readiness.
77
-
78
- ### Critical Issues (≤3)
79
- For each: Issue, Impact, Recommendation, Traceability (e.g., 1.1, 1.2), Evidence (design.md section).
80
-
81
- ### Design Strengths
82
- 1-2 positive aspects.
83
-
84
- ### Final Assessment
85
- Decision (GO/NO-GO), Rationale (1-2 sentences), Next Steps.
86
-
87
- ### Interactive Discussion
88
- Engage on designer's perspective, alternatives, clarifications, and necessary changes.
89
-
90
- ## Length & Focus
91
-
92
- - Summary: 2–3 sentences
93
- - Each critical issue: 5–7 lines total (including Issue/Impact/Recommendation/Traceability/Evidence)
94
- - Overall review: keep concise (~400 words guideline)
95
-
96
- ## Review Guidelines
97
-
98
- 1. **Critical Focus**: Only flag issues that significantly impact success
99
- 2. **Constructive Tone**: Provide solutions, not just criticism
100
- 3. **Interactive Approach**: Engage in dialogue rather than one-way evaluation
101
- 4. **Balanced Assessment**: Recognize both strengths and weaknesses
102
- 5. **Clear Decision**: Make definitive GO/NO-GO recommendation
103
- 6. **Actionable Feedback**: Ensure all suggestions are implementable
104
-
105
- ## Final Checklist
106
-
107
- - **Critical Issues ≤ 3** and each includes Impact and Recommendation
108
- - **Traceability**: Each issue references requirement ID/section
109
- - **Evidence**: Each issue cites design doc location
110
- - **Decision**: GO/NO-GO with clear rationale and next steps
53
+ Readiness stays false until the complete blocker inventory is resolved and all
54
+ required machine gates pass. Review does not claim implementation execution,
55
+ approval, closeout, or lifecycle completion.
@@ -1,50 +1,42 @@
1
- # EARS Format Guidelines
2
-
3
- ## Overview
4
- EARS (Easy Approach to Requirements Syntax) is the standard format for acceptance criteria in spec-driven development.
5
-
6
- EARS patterns describe the logical structure of a requirement (condition + subject + response) and are not tied to any particular natural language.
7
- Canonical acceptance criteria are written in **English** (`spec.json.language` is `en`). A non-English rendering only appears in the optional translation mirror (`i18n/<lang>/`, see `references/translation-mirror.md`), never in the canonical files.
8
- Keep EARS trigger keywords and fixed phrases in English (`When`, `If`, `While`, `Where`, `The system shall`, `The [system] shall`). In the mirror, localize only the variable parts (`[event]`, `[precondition]`, `[trigger]`, `[feature is included]`, `[response/action]`); do not interleave translated text inside the trigger or fixed English phrases themselves.
9
-
10
- ## Primary EARS Patterns
11
-
12
- ### 1. Event-Driven Requirements
13
- - **Pattern**: When [event], the [system] shall [response/action]
14
- - **Use Case**: Responses to specific events or triggers
15
- - **Example**: When user clicks checkout button, the Checkout Service shall validate cart contents
16
-
17
- ### 2. State-Driven Requirements
18
- - **Pattern**: While [precondition], the [system] shall [response/action]
19
- - **Use Case**: Behavior dependent on system state or preconditions
20
- - **Example**: While payment is processing, the Checkout Service shall display loading indicator
21
-
22
- ### 3. Unwanted Behavior Requirements
23
- - **Pattern**: If [trigger], the [system] shall [response/action]
24
- - **Use Case**: System response to errors, failures, or undesired situations
25
- - **Example**: If invalid credit card number is entered, then the website shall display error message
26
-
27
- ### 4. Optional Feature Requirements
28
- - **Pattern**: Where [feature is included], the [system] shall [response/action]
29
- - **Use Case**: Requirements for optional or conditional features
30
- - **Example**: Where the car has a sunroof, the car shall have a sunroof control panel
31
-
32
- ### 5. Ubiquitous Requirements
33
- - **Pattern**: The [system] shall [response/action]
34
- - **Use Case**: Always-active requirements and fundamental system properties
35
- - **Example**: The mobile phone shall have a mass of less than 100 grams
36
-
37
- ## Combined Patterns
38
- - While [precondition], when [event], the [system] shall [response/action]
39
- - When [event] and [additional condition], the [system] shall [response/action]
40
-
41
- ## Subject Selection Guidelines
42
- - **Software Projects**: Use concrete system/service name (e.g., "Checkout Service", "User Auth Module")
43
- - **Process/Workflow**: Use responsible team/role (e.g., "Support Team", "Review Process")
44
- - **Non-Software**: Use appropriate subject (e.g., "Marketing Campaign", "Documentation")
45
-
46
- ## Quality Criteria
47
- - Requirements must be testable, verifiable, and describe a single behavior.
48
- - **Measurability:** Avoid qualitative terms (e.g. "safe state", "fast", "some coverage"). Replace with measurable thresholds (e.g., "HTTP 400 error", "< 500ms response", ">= 80% coverage").
49
- - Use objective language: "shall" for mandatory behavior, "should" for recommendations; avoid ambiguous terms.
50
- - Follow EARS syntax: [condition], the [system] shall [response/action].
1
+ # EARS authoring rules
2
+
3
+ Use EARS to make behavior testable, not to fill a template.
4
+
5
+ ## Canonical IDs
6
+
7
+ - Top-level headings: `Requirement N: <outcome>`.
8
+ - Acceptance criteria: literal `RN.M` (`R1.1`, `R1.2`, ...).
9
+ - Task mappings: numeric `N.M` only.
10
+ - Do not emit `REQ-01`, `NFR-1`, alphabetic IDs, or bare numbered criteria.
11
+
12
+ ## Patterns
13
+
14
+ | Need | Pattern |
15
+ |---|---|
16
+ | Event | `When <event>, the <system> shall <observable response>.` |
17
+ | State | `While <state>, the <system> shall <observable response>.` |
18
+ | Negative/error | `If <invalid or failure condition>, the <system> shall <observable response or recovery>.` |
19
+ | Optional scope | `Where <feature is enabled>, the <system> shall <observable response>.` |
20
+ | Always true | `The <system> shall <observable property>.` |
21
+
22
+ Combine conditions only when they describe one behavior. Split criteria that
23
+ have independent triggers, outcomes, or proof.
24
+
25
+ ## Quality gate
26
+
27
+ Every criterion must be singular, unambiguous, observable, and testable. Name a
28
+ concrete subject and replace words such as “fast”, “safe”, “graceful”, or “some”
29
+ with an observable result or threshold. Use `shall` for mandatory behavior.
30
+
31
+ Add a negative/error criterion when invalid input, missing permission,
32
+ unavailable dependency, conflict, timeout, retry, rollback, or partial failure
33
+ is relevant. Add a concrete example when values, ordering, boundaries, or
34
+ transformation rules would otherwise admit multiple interpretations.
35
+
36
+ User Story, rationale, scenario narrative, and role framing are optional. Keep
37
+ them only when they explain a product decision not already clear from the
38
+ outcome and criteria.
39
+
40
+ Non-functional requirements are not a standard appendix. Add one only for a
41
+ feature-specific measurable performance, security, privacy, accessibility,
42
+ reliability, or compatibility constraint, continuing the same numeric sequence.
@@ -1,55 +1,56 @@
1
- # Phase Decision Matrix
1
+ # Task and phase decision matrix
2
2
 
3
- CafeKit does not create `phase-XX.md` files. In `hapo:specs`, "phase" means an implementation slice or task cluster that becomes one or more `tasks/task-R*.md` files.
3
+ Tasks and phases are conditional structure, not mandatory planning ceremony.
4
4
 
5
- Use this matrix after `requirements.md` and `design.md` exist, before generating task files.
5
+ ## Task gate
6
6
 
7
- ## Slice Types
7
+ Create a task only when at least one boundary is real:
8
8
 
9
- | Slice | Use when | Output pattern | Must prove |
10
- |---|---|---|---|
11
- | R0 Foundation | Shared setup, contracts, schema, config, base runtime, permissions, package wiring | `task-R0-01-<slug>.md` | Later tasks depend on it or explicitly consume it |
12
- | Risk Spike | Risk = Complex, API/platform behavior uncertain, or feasibility not proven by evidence | `task-R{N}-00-spike-<slug>.md` | Go/no-go, findings, time-box <= 4h |
13
- | Vertical Slice | User-visible behavior crosses multiple layers but can be delivered end-to-end | `task-R{N}-01-<feature-slice>.md` | Runtime entrypoint reaches the behavior |
14
- | Layer Slice | Work naturally splits by layer and dependencies are clear | `task-R{N}-01-api.md`, `task-R{N}-02-ui.md` | Contract handoff between layers |
15
- | Cross-Cutting Slice | One concern affects many requirements, e.g. language handling, privacy, error policy | One primary task plus secondary requirement refs in related tasks | No duplicated implementation across tasks |
16
- | Integration Gate | Prior outputs must be wired into a route, app, command, worker, extension manifest, or runtime surface | Final task in dependency chain | No orphaned services/components/files |
17
- | Verification Gate | Security/performance/migration/critical path needs dedicated proof | Dedicated task only when proof cannot live inside related task | Exact command/artifact/negative-path evidence |
18
- | Release/Packaging | Store/package/release behavior is explicitly in scope | Last task | Build artifact and release-specific checks |
9
+ | Boundary | Create a separate task when |
10
+ |---|---|
11
+ | Ownership | A distinct owner can change the files or contract without overlap. |
12
+ | Dependency | One durable output must exist before another consumer can begin. |
13
+ | Transition | Stateful, migration, async, retry, or recovery behavior needs one named owner. |
14
+ | Proof | The outcome needs proof that cannot coherently live with the implementation slice. |
15
+ | Parallel coordination | Independent work can proceed with disjoint ownership and no hidden shared resource. |
19
16
 
20
- ## Selection Rules
17
+ Do not create tasks from estimated effort, requirement count, architectural
18
+ layers, risk labels, or a desire for uniform files.
21
19
 
22
- 1. Start with requirement IDs and design contracts.
23
- 2. Extract shared infrastructure into R0 only when 2+ later tasks consume it or a contract must exist first.
24
- 3. Prefer vertical slices for user-facing workflows because they prove reachability early.
25
- 4. Use layer slices when one layer blocks another or file ownership would conflict.
26
- 5. Add a spike before implementation when evidence says the outcome is uncertain.
27
- 6. Add an integration gate for every feature with runtime-facing outputs.
28
- 7. Add a verification gate only when the required proof is too broad for a single implementation task.
29
- 8. Do not create a slice just because the plan "feels large"; every slice needs a deliverable boundary.
20
+ When the gate passes, encode the real reason as one or more typed
21
+ `coordination.boundaries` entries. Legacy trigger fields, priority markers,
22
+ related-file lists, and free-form declarations are not authority.
30
23
 
31
- ## Split / Merge Signals
24
+ ## Split preference
32
25
 
33
- Split into separate task files when:
26
+ Start with one vertical outcome slice that reaches a real user or runtime
27
+ entrypoint. Split horizontally only because dependency, ownership, or proof
28
+ requires it.
34
29
 
35
- - Acceptance criteria span multiple architectural layers.
36
- - Effort exceeds 4 hours.
37
- - A task would modify unrelated files or contracts.
38
- - One part can be verified independently before the next part starts.
39
- - Different agents could own the work without touching the same files.
30
+ - Foundation: only when two or more consumers need the same owned prerequisite.
31
+ - Spike: only for a named uncertainty with a time-box and go/no-go output.
32
+ - Integration: only when earlier outputs are not already proven reachable.
33
+ - Verification: only when separate ownership or evidence is genuinely required.
34
+ - Release/packaging: only when explicitly in `scope_lock`.
40
35
 
41
- Merge when:
36
+ Merge slices that touch the same files, share one proof, or would otherwise
37
+ produce an orphaned intermediate output.
42
38
 
43
- - Work touches the same files and cannot be verified separately.
44
- - A task would only wrap another task with no independent deliverable.
45
- - Splitting would create orphaned support code before integration.
39
+ ## Owner-before-consumer
46
40
 
47
- ## Output Requirements
41
+ Every cross-task contract, invariant, schema transition, or recovery authority
42
+ has exactly one owner task. All consumers reference its stable ID and depend
43
+ directly or transitively on the owner. The typed dependency boundary is machine
44
+ authority; Markdown and `task_registry.dependencies` are projections that must
45
+ agree with it.
48
46
 
49
- Before writing task files, capture the chosen slices in working notes and ensure:
47
+ ## Lightweight phases
50
48
 
51
- - Every slice maps to at least one requirement ID or R0 foundation rationale.
52
- - Every runtime-facing slice names its entrypoint or later integration task.
53
- - Every dependency is explicit.
54
- - Every parallel-capable slice has no shared file ownership with sibling tasks.
55
- - Scope additions route through `references/ask-user-question-gates.md`.
49
+ Use phases only for a complex `Full` task graph where grouping materially helps
50
+ navigation or sequencing. Persist them as lightweight task-ID groups in
51
+ `spec.json`.
52
+
53
+ - Never create `phase-*.md` files.
54
+ - Never copy requirement, design, or task prose into a phase.
55
+ - A phase does not replace dependency edges or ownership.
56
+ - Compact specs and simple Full graphs omit phases.
@@ -30,7 +30,8 @@ independent proof path.
30
30
  - Low evidence plus risk ≥2: consider a time-boxed spike, but do not create one
31
31
  solely because a Cynefin label says `Complex`.
32
32
  - Blast radius 3: include rollback/negative-path proof.
33
- - File conflict ≥2: remove `(P)` unless ownership is isolated.
33
+ - File conflict ≥2: parallel eligibility remains false unless a typed parallel
34
+ boundary proves isolated ownership and disjoint resources.
34
35
  - High value plus dependency ≥2: schedule early only after real prerequisites.
35
36
 
36
37
  Cynefin is advisory discovery language. It may suggest a spike or research