murmur8 3.5.0

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 (120) hide show
  1. package/.blueprint/agents/AGENT_BA_CASS.md +239 -0
  2. package/.blueprint/agents/AGENT_DEVELOPER_CODEY.md +308 -0
  3. package/.blueprint/agents/AGENT_SPECIFICATION_ALEX.md +183 -0
  4. package/.blueprint/agents/AGENT_TESTER_NIGEL.md +159 -0
  5. package/.blueprint/agents/GUARDRAILS.md +83 -0
  6. package/.blueprint/agents/TEAM_MANIFESTO.md +91 -0
  7. package/.blueprint/features/.gitkeep +0 -0
  8. package/.blueprint/features/feature_adaptive-retry/FEATURE_SPEC.md +239 -0
  9. package/.blueprint/features/feature_adaptive-retry/IMPLEMENTATION_PLAN.md +48 -0
  10. package/.blueprint/features/feature_adaptive-retry/story-prompt-modification.md +85 -0
  11. package/.blueprint/features/feature_adaptive-retry/story-retry-config.md +89 -0
  12. package/.blueprint/features/feature_adaptive-retry/story-should-retry.md +98 -0
  13. package/.blueprint/features/feature_adaptive-retry/story-strategy-recommendation.md +85 -0
  14. package/.blueprint/features/feature_agent-guardrails/FEATURE_SPEC.md +328 -0
  15. package/.blueprint/features/feature_agent-guardrails/IMPLEMENTATION_PLAN.md +90 -0
  16. package/.blueprint/features/feature_agent-guardrails/story-citation-requirements.md +50 -0
  17. package/.blueprint/features/feature_agent-guardrails/story-confidentiality.md +50 -0
  18. package/.blueprint/features/feature_agent-guardrails/story-escalation-protocol.md +55 -0
  19. package/.blueprint/features/feature_agent-guardrails/story-source-restrictions.md +50 -0
  20. package/.blueprint/features/feature_compressed-feedback/FEATURE_SPEC.md +136 -0
  21. package/.blueprint/features/feature_compressed-feedback/IMPLEMENTATION_PLAN.md +40 -0
  22. package/.blueprint/features/feature_feedback-loop/FEATURE_SPEC.md +347 -0
  23. package/.blueprint/features/feature_feedback-loop/IMPLEMENTATION_PLAN.md +71 -0
  24. package/.blueprint/features/feature_feedback-loop/story-feedback-collection.md +63 -0
  25. package/.blueprint/features/feature_feedback-loop/story-feedback-config.md +61 -0
  26. package/.blueprint/features/feature_feedback-loop/story-feedback-insights.md +63 -0
  27. package/.blueprint/features/feature_feedback-loop/story-quality-gates.md +57 -0
  28. package/.blueprint/features/feature_interactive-alex/FEATURE_SPEC.md +263 -0
  29. package/.blueprint/features/feature_interactive-alex/IMPLEMENTATION_PLAN.md +69 -0
  30. package/.blueprint/features/feature_interactive-alex/handoff-alex.md +19 -0
  31. package/.blueprint/features/feature_interactive-alex/handoff-cass.md +21 -0
  32. package/.blueprint/features/feature_interactive-alex/handoff-nigel.md +19 -0
  33. package/.blueprint/features/feature_interactive-alex/story-flag-routing.md +54 -0
  34. package/.blueprint/features/feature_interactive-alex/story-iterative-drafting.md +65 -0
  35. package/.blueprint/features/feature_interactive-alex/story-pipeline-integration.md +66 -0
  36. package/.blueprint/features/feature_interactive-alex/story-session-lifecycle.md +75 -0
  37. package/.blueprint/features/feature_interactive-alex/story-system-spec-creation.md +57 -0
  38. package/.blueprint/features/feature_lazy-business-context/FEATURE_SPEC.md +140 -0
  39. package/.blueprint/features/feature_lazy-business-context/IMPLEMENTATION_PLAN.md +54 -0
  40. package/.blueprint/features/feature_model-native-features/FEATURE_SPEC.md +174 -0
  41. package/.blueprint/features/feature_model-native-features/IMPLEMENTATION_PLAN.md +45 -0
  42. package/.blueprint/features/feature_parallel-abort/FEATURE_SPEC.md +117 -0
  43. package/.blueprint/features/feature_parallel-confirm/FEATURE_SPEC.md +90 -0
  44. package/.blueprint/features/feature_parallel-features/FEATURE_SPEC.md +291 -0
  45. package/.blueprint/features/feature_parallel-features/IMPLEMENTATION_PLAN.md +73 -0
  46. package/.blueprint/features/feature_parallel-lock/FEATURE_SPEC.md +119 -0
  47. package/.blueprint/features/feature_parallel-logging/FEATURE_SPEC.md +105 -0
  48. package/.blueprint/features/feature_parallel-preflight/FEATURE_SPEC.md +141 -0
  49. package/.blueprint/features/feature_pipeline-history/FEATURE_SPEC.md +239 -0
  50. package/.blueprint/features/feature_pipeline-history/IMPLEMENTATION_PLAN.md +71 -0
  51. package/.blueprint/features/feature_pipeline-history/story-clear-history.md +73 -0
  52. package/.blueprint/features/feature_pipeline-history/story-display-history.md +75 -0
  53. package/.blueprint/features/feature_pipeline-history/story-record-execution.md +76 -0
  54. package/.blueprint/features/feature_pipeline-history/story-show-statistics.md +85 -0
  55. package/.blueprint/features/feature_pipeline-insights/FEATURE_SPEC.md +288 -0
  56. package/.blueprint/features/feature_pipeline-insights/IMPLEMENTATION_PLAN.md +65 -0
  57. package/.blueprint/features/feature_pipeline-insights/story-anomaly-detection.md +71 -0
  58. package/.blueprint/features/feature_pipeline-insights/story-bottleneck-analysis.md +75 -0
  59. package/.blueprint/features/feature_pipeline-insights/story-failure-patterns.md +75 -0
  60. package/.blueprint/features/feature_pipeline-insights/story-json-output.md +75 -0
  61. package/.blueprint/features/feature_pipeline-insights/story-trend-analysis.md +78 -0
  62. package/.blueprint/features/feature_shared-guardrails/FEATURE_SPEC.md +119 -0
  63. package/.blueprint/features/feature_shared-guardrails/IMPLEMENTATION_PLAN.md +34 -0
  64. package/.blueprint/features/feature_shared-guardrails/story-extract-guardrails.md +60 -0
  65. package/.blueprint/features/feature_shared-guardrails/story-update-init-commands.md +63 -0
  66. package/.blueprint/features/feature_slim-agent-prompts/FEATURE_SPEC.md +145 -0
  67. package/.blueprint/features/feature_slim-agent-prompts/IMPLEMENTATION_PLAN.md +87 -0
  68. package/.blueprint/features/feature_slim-agent-prompts/story-create-runtime-prompt-template.md +59 -0
  69. package/.blueprint/features/feature_slim-agent-prompts/story-create-slim-agent-prompts.md +65 -0
  70. package/.blueprint/features/feature_slim-agent-prompts/story-skill-integration.md +53 -0
  71. package/.blueprint/features/feature_smart-story-routing/FEATURE_SPEC.md +147 -0
  72. package/.blueprint/features/feature_smart-story-routing/IMPLEMENTATION_PLAN.md +73 -0
  73. package/.blueprint/features/feature_template-extraction/FEATURE_SPEC.md +134 -0
  74. package/.blueprint/features/feature_template-extraction/IMPLEMENTATION_PLAN.md +46 -0
  75. package/.blueprint/features/feature_upstream-summaries/FEATURE_SPEC.md +150 -0
  76. package/.blueprint/features/feature_upstream-summaries/IMPLEMENTATION_PLAN.md +70 -0
  77. package/.blueprint/features/feature_validate-command/FEATURE_SPEC.md +209 -0
  78. package/.blueprint/features/feature_validate-command/IMPLEMENTATION_PLAN.md +59 -0
  79. package/.blueprint/features/feature_validate-command/story-failure-output.md +61 -0
  80. package/.blueprint/features/feature_validate-command/story-node-version-check.md +52 -0
  81. package/.blueprint/features/feature_validate-command/story-run-validation.md +59 -0
  82. package/.blueprint/features/feature_validate-command/story-success-output.md +50 -0
  83. package/.blueprint/prompts/TEMPLATE.md +65 -0
  84. package/.blueprint/prompts/alex-runtime.md +49 -0
  85. package/.blueprint/prompts/cass-runtime.md +46 -0
  86. package/.blueprint/prompts/codey-implement-runtime.md +52 -0
  87. package/.blueprint/prompts/codey-plan-runtime.md +47 -0
  88. package/.blueprint/prompts/nigel-runtime.md +47 -0
  89. package/.blueprint/system_specification/.gitkeep +0 -0
  90. package/.blueprint/system_specification/SYSTEM_SPEC.md +248 -0
  91. package/.blueprint/templates/FEATURE_SPEC.md +125 -0
  92. package/.blueprint/templates/STORY_TEMPLATE.md +96 -0
  93. package/.blueprint/templates/SYSTEM_SPEC.md +128 -0
  94. package/.blueprint/templates/TEST_TEMPLATE.md +76 -0
  95. package/.blueprint/ways_of_working/DEVELOPMENT_RITUAL.md +178 -0
  96. package/.business_context/README.md +27 -0
  97. package/LICENSE +21 -0
  98. package/README.md +564 -0
  99. package/SKILL.md +840 -0
  100. package/bin/cli.js +388 -0
  101. package/package.json +36 -0
  102. package/src/business-context.js +91 -0
  103. package/src/classifier.js +173 -0
  104. package/src/feedback.js +201 -0
  105. package/src/handoff.js +148 -0
  106. package/src/history.js +306 -0
  107. package/src/index.js +170 -0
  108. package/src/init.js +139 -0
  109. package/src/insights.js +504 -0
  110. package/src/interactive.js +338 -0
  111. package/src/orchestrator.js +217 -0
  112. package/src/parallel.js +1544 -0
  113. package/src/retry.js +274 -0
  114. package/src/stack.js +320 -0
  115. package/src/tools/index.js +27 -0
  116. package/src/tools/prompts.js +45 -0
  117. package/src/tools/schemas.js +38 -0
  118. package/src/tools/validation.js +83 -0
  119. package/src/update.js +112 -0
  120. package/src/validate.js +172 -0
@@ -0,0 +1,134 @@
1
+ # Feature Specification — Template Extraction
2
+
3
+ ## 1. Feature Intent
4
+ **Why this feature exists.**
5
+
6
+ - Agent specs contain verbose template sections and examples (~70-100 lines each)
7
+ - Templates are reference material, not needed for every invocation
8
+ - Extracting templates to separate files reduces base agent spec size
9
+ - Agents can read templates only when creating new artifacts
10
+
11
+ ---
12
+
13
+ ## 2. Scope
14
+ ### In Scope
15
+ - Extract user story template from Cass spec → `.blueprint/templates/STORY_TEMPLATE.md`
16
+ - Extract test template from Nigel spec → `.blueprint/templates/TEST_TEMPLATE.md`
17
+ - Extract interaction templates from agent specs
18
+ - Trim workflow sections to concise bullet points
19
+ - Update agent specs to reference templates by path
20
+
21
+ ### Out of Scope
22
+ - Changing template content
23
+ - Removing templates entirely
24
+ - Creating new templates
25
+
26
+ ---
27
+
28
+ ## 3. Actors Involved
29
+
30
+ | Actor | Template Used | When |
31
+ |-------|--------------|------|
32
+ | Cass | STORY_TEMPLATE.md | When writing new stories |
33
+ | Nigel | TEST_TEMPLATE.md | When writing new tests |
34
+ | Codey | None extracted | Workflow condensed only |
35
+ | Alex | FEATURE_SPEC.md (existing) | When writing feature specs |
36
+
37
+ ---
38
+
39
+ ## 4. Behaviour Overview
40
+
41
+ **Happy path:**
42
+ 1. Agent receives task prompt
43
+ 2. Agent reads slim spec (templates removed)
44
+ 3. When creating artifact, agent reads relevant template file
45
+ 4. Agent uses template structure for output
46
+
47
+ **Content to extract:**
48
+
49
+ | From | Content | To |
50
+ |------|---------|-----|
51
+ | AGENT_BA_CASS.md | User story template (~70 lines) | STORY_TEMPLATE.md |
52
+ | AGENT_TESTER_NIGEL.md | Test output format (~30 lines) | TEST_TEMPLATE.md |
53
+ | All agents | Verbose workflow steps | Condensed to ~10 bullets each |
54
+
55
+ **Key outcomes:**
56
+ - ~800 fewer tokens in agent specs
57
+ - Templates still available when needed
58
+ - Specs more focused on behaviour, less on format
59
+
60
+ ---
61
+
62
+ ## 5. State & Lifecycle Interactions
63
+
64
+ - No state changes
65
+ - Templates are static reference files
66
+ - No pipeline flow changes
67
+
68
+ ---
69
+
70
+ ## 6. Rules & Decision Logic
71
+
72
+ | Rule | Description |
73
+ |------|-------------|
74
+ | Reference not inline | Agent specs reference templates, don't inline them |
75
+ | Read when needed | Agents read templates only when creating that artifact type |
76
+ | Templates are examples | Templates show structure, not mandatory content |
77
+
78
+ ---
79
+
80
+ ## 7. Dependencies
81
+
82
+ - `.blueprint/templates/` directory (already exists)
83
+ - Agent spec files updated
84
+ - SKILL.md prompts may need to specify "read template from X"
85
+
86
+ ---
87
+
88
+ ## 8. Non-Functional Considerations
89
+
90
+ - **Performance:** ~800 token reduction in agent specs
91
+ - **Maintainability:** Templates can be updated independently of agent specs
92
+ - **Clarity:** Agent specs focus on behaviour, templates on format
93
+
94
+ ---
95
+
96
+ ## 9. Assumptions & Open Questions
97
+
98
+ **Assumptions:**
99
+ - Agents can follow references to read template files
100
+ - Templates are used infrequently enough that lazy loading is beneficial
101
+ - Condensed workflow bullets provide sufficient guidance
102
+
103
+ **Open Questions:**
104
+ - Should templates be versioned separately from agent specs?
105
+ - How much can workflow sections be condensed without losing clarity?
106
+
107
+ ---
108
+
109
+ ## 10. Impact on System Specification
110
+
111
+ - Reinforces separation of concerns (behaviour vs format)
112
+ - No contradiction with system spec
113
+ - No system spec change required
114
+
115
+ ---
116
+
117
+ ## 11. Handover to BA (Cass)
118
+
119
+ **Story themes:**
120
+ - Extract Cass story template to separate file
121
+ - Extract Nigel test template to separate file
122
+ - Condense workflow sections in all agent specs
123
+ - Update agent specs to reference templates
124
+
125
+ **Expected story boundaries:**
126
+ - One story for template extraction
127
+ - One story for workflow condensation
128
+
129
+ ---
130
+
131
+ ## 12. Change Log (Feature-Level)
132
+ | Date | Change | Reason | Raised By |
133
+ |-----|------|--------|-----------|
134
+ | 2026-02-25 | Initial spec | Token efficiency improvement | Claude |
@@ -0,0 +1,46 @@
1
+ # Implementation Plan: Template Extraction
2
+
3
+ ## Summary
4
+
5
+ Extract verbose template sections from AGENT_BA_CASS.md and AGENT_TESTER_NIGEL.md into standalone template files (STORY_TEMPLATE.md and TEST_TEMPLATE.md) in `.blueprint/templates/`. Update agent specs to reference templates by path and condense workflow sections to ~10 bullet points each. This reduces agent spec token count by ~800 tokens while keeping templates accessible when needed.
6
+
7
+ ## Files to Create/Modify
8
+
9
+ | Action | File | Description |
10
+ |--------|------|-------------|
11
+ | Create | `.blueprint/templates/STORY_TEMPLATE.md` | User story template extracted from Cass spec (lines 180-252) |
12
+ | Create | `.blueprint/templates/TEST_TEMPLATE.md` | Test output format guidance extracted from Nigel spec |
13
+ | Modify | `.blueprint/agents/AGENT_BA_CASS.md` | Remove inline template, add reference, condense workflow |
14
+ | Modify | `.blueprint/agents/AGENT_TESTER_NIGEL.md` | Add template reference, condense workflow section |
15
+
16
+ ## Implementation Steps
17
+
18
+ 1. **Create STORY_TEMPLATE.md** - Extract the user story template block (lines 180-252) from AGENT_BA_CASS.md into `.blueprint/templates/STORY_TEMPLATE.md`. Include the full markdown template with Screen [N], User story, Context/scope, Acceptance criteria, Session persistence, and Out of scope sections.
19
+
20
+ 2. **Create TEST_TEMPLATE.md** - Extract test output format guidance from AGENT_TESTER_NIGEL.md sections 3-5 (test design principles, AC mapping table format, traceability table format) into a standalone template.
21
+
22
+ 3. **Update Cass spec - Remove template** - Replace the inline user story template (lines 180-252) with a reference: `Read the user story template from: .blueprint/templates/STORY_TEMPLATE.md`
23
+
24
+ 4. **Update Cass spec - Condense workflow** - Simplify "Standard workflow" section (lines 127-177) from 5 detailed steps with sub-bullets to ~10 concise top-level bullets covering: understand, clarify, write story, document session, flag deferrals.
25
+
26
+ 5. **Update Nigel spec - Add template reference** - Add reference to TEST_TEMPLATE.md in the "Outputs you must produce" section for detailed format guidance.
27
+
28
+ 6. **Update Nigel spec - Condense workflow** - Simplify section 3 "Standard workflow" (lines 69-109) to ~10 concise bullets covering: understand, map ACs, write spec, write tests, traceability.
29
+
30
+ 7. **Preserve required sections** - Ensure both specs retain: YAML frontmatter, identity sections, job descriptions, input/output sections, collaboration notes, anti-patterns, GUARDRAILS.md reference.
31
+
32
+ 8. **Verify existing templates preserved** - Confirm FEATURE_SPEC.md and SYSTEM_SPEC.md remain unchanged in `.blueprint/templates/`.
33
+
34
+ 9. **Run tests** - Execute `node --test test/feature_template-extraction.test.js` to verify all 16 tests pass.
35
+
36
+ 10. **Manual verification** - Check that condensed workflow sections remain actionable and template references are clear paths.
37
+
38
+ ## Risks/Questions
39
+
40
+ | Risk | Mitigation |
41
+ |------|------------|
42
+ | Condensed workflows lose critical guidance | Keep essential steps, move details to templates |
43
+ | Test regex patterns may be too strict | Review test patterns if failures occur, adjust template content to match expected patterns |
44
+ | Token savings may vary | Actual reduction depends on final content; ~800 is estimate |
45
+
46
+ **Open question from spec:** Should templates be versioned separately? Recommendation: No, keep in same repo for now. Templates change rarely and should stay in sync with agent specs.
@@ -0,0 +1,150 @@
1
+ # Feature Specification — Upstream Summaries
2
+
3
+ ## 1. Feature Intent
4
+ **Why this feature exists.**
5
+
6
+ - Currently, downstream agents read full upstream artifacts (feature specs, stories, test specs)
7
+ - Codey reads: feature spec + all stories + test spec + plan = potentially 1,000+ lines
8
+ - Much of this content is not needed for the downstream task
9
+ - Structured handoff summaries reduce input tokens by 30-50% for later stages
10
+
11
+ ---
12
+
13
+ ## 2. Scope
14
+ ### In Scope
15
+ - Each agent produces a structured "Handoff Summary" at end of output
16
+ - Downstream agents read summary + their direct inputs only
17
+ - Summary format standardized across all agents
18
+
19
+ ### Out of Scope
20
+ - Changing what agents produce (full artifacts still created)
21
+ - Removing ability to read full upstream files if needed
22
+ - Automated summary generation (agents write summaries manually)
23
+
24
+ ---
25
+
26
+ ## 3. Actors Involved
27
+
28
+ | Actor | Produces Summary For | Reads Summary From |
29
+ |-------|---------------------|-------------------|
30
+ | Alex | Cass | N/A (first in chain) |
31
+ | Cass | Nigel | Alex |
32
+ | Nigel | Codey | Cass |
33
+ | Codey | N/A (last in chain) | Nigel |
34
+
35
+ ---
36
+
37
+ ## 4. Behaviour Overview
38
+
39
+ **Happy path:**
40
+ 1. Alex creates feature spec + writes handoff summary
41
+ 2. Cass reads Alex's summary (not full spec), writes stories + handoff summary
42
+ 3. Nigel reads Cass's summary + stories, writes tests + handoff summary
43
+ 4. Codey reads Nigel's summary + tests + plan, implements
44
+
45
+ **Handoff summary format:**
46
+ ```markdown
47
+ ## Handoff Summary
48
+ **For:** {Next Agent}
49
+ **Feature:** {slug}
50
+
51
+ ### Key Decisions
52
+ - {Decision 1}
53
+ - {Decision 2}
54
+ - {Decision 3}
55
+
56
+ ### Files Created
57
+ - {path/to/file1.md}
58
+ - {path/to/file2.md}
59
+
60
+ ### Open Questions
61
+ - {Question if any, or "None"}
62
+
63
+ ### Critical Context
64
+ {1-2 sentences of must-know information}
65
+ ```
66
+
67
+ **Key outcomes:**
68
+ - ~2,000-4,000 fewer tokens for Nigel and Codey stages
69
+ - Faster downstream processing
70
+ - Clearer handoffs between agents
71
+
72
+ ---
73
+
74
+ ## 5. State & Lifecycle Interactions
75
+
76
+ - Summaries are written to the feature directory
77
+ - New file per stage: `{FEAT_DIR}/handoff-{agent}.md`
78
+ - Pipeline reads summary file paths from queue
79
+
80
+ ---
81
+
82
+ ## 6. Rules & Decision Logic
83
+
84
+ | Rule | Description |
85
+ |------|-------------|
86
+ | Summary required | Every agent (except Codey-implement) must produce a handoff summary |
87
+ | Max length | Summaries must be <30 lines |
88
+ | No duplication | Don't repeat content that's in the main artifact |
89
+ | Actionable | Focus on what downstream agent needs to know |
90
+
91
+ ---
92
+
93
+ ## 7. Dependencies
94
+
95
+ - SKILL.md prompts updated to require summaries
96
+ - SKILL.md prompts updated to read summaries instead of full upstream files
97
+ - Queue may need to track summary file paths
98
+
99
+ ---
100
+
101
+ ## 8. Non-Functional Considerations
102
+
103
+ - **Performance:** 30-50% reduction in downstream agent input tokens
104
+ - **Clarity:** Explicit handoffs improve traceability
105
+ - **Overhead:** Small increase in upstream agent output (~30 lines)
106
+
107
+ ---
108
+
109
+ ## 9. Assumptions & Open Questions
110
+
111
+ **Assumptions:**
112
+ - Agents can write useful summaries
113
+ - Summaries capture enough context for downstream success
114
+ - Full files remain available if summary is insufficient
115
+
116
+ **Open Questions:**
117
+ - Should summaries be separate files or appended to main artifacts?
118
+ - What happens if an agent needs info not in the summary?
119
+ - Should the pipeline validate summary quality?
120
+
121
+ ---
122
+
123
+ ## 10. Impact on System Specification
124
+
125
+ - Reinforces principle of explicit handoffs between agents
126
+ - Adds new artifact type (handoff summaries) to pipeline
127
+ - No contradiction with system spec
128
+
129
+ ---
130
+
131
+ ## 11. Handover to BA (Cass)
132
+
133
+ **Story themes:**
134
+ - Define handoff summary format
135
+ - Update Alex to produce summary
136
+ - Update Cass to read summary + produce summary
137
+ - Update Nigel to read summary + produce summary
138
+ - Update Codey to read summary
139
+ - Update SKILL.md with new prompt structure
140
+
141
+ **Expected story boundaries:**
142
+ - One story for summary format definition
143
+ - One story per agent update
144
+
145
+ ---
146
+
147
+ ## 12. Change Log (Feature-Level)
148
+ | Date | Change | Reason | Raised By |
149
+ |-----|------|--------|-----------|
150
+ | 2026-02-25 | Initial spec | Token efficiency improvement | Claude |
@@ -0,0 +1,70 @@
1
+ # Implementation Plan: Upstream Summaries
2
+
3
+ ## Summary
4
+
5
+ Add structured "Handoff Summary" artifacts to the agent pipeline. Each agent (Alex, Cass, Nigel) will produce a `handoff-{agent}.md` file containing key decisions, files created, open questions, and critical context. SKILL.md prompts will be updated to instruct agents to write summaries and read upstream summaries instead of full artifacts.
6
+
7
+ ---
8
+
9
+ ## Files to Create/Modify
10
+
11
+ | Path | Action | Purpose |
12
+ |------|--------|---------|
13
+ | `SKILL.md` | Modify | Update Alex/Cass/Nigel prompts to require handoff summary output |
14
+ | `SKILL.md` | Modify | Update Cass/Nigel/Codey prompts to read upstream handoff summary |
15
+ | `SKILL.md` | Modify | Add `{HANDOFF_*}` path variables to Paths table |
16
+ | `src/handoff.js` | Create | Helper functions to parse/validate handoff summary format |
17
+
18
+ ---
19
+
20
+ ## Implementation Steps
21
+
22
+ 1. **Add handoff path variables to SKILL.md**
23
+ - Add `{HANDOFF_ALEX}`, `{HANDOFF_CASS}`, `{HANDOFF_NIGEL}` to Paths table
24
+ - Pattern: `{FEAT_DIR}/handoff-{agent}.md`
25
+ - Tests: T-3.4, T-4.2
26
+
27
+ 2. **Create src/handoff.js helper module**
28
+ - Export `parseHandoffSummary(content)` function matching test implementation
29
+ - Export `validateHandoffSummary(content)` for line count and format checks
30
+ - Export `extractSection(content, sectionName)` for parsing sections
31
+ - Tests: T-1.1 through T-1.7, T-2.1 through T-2.3
32
+
33
+ 3. **Update Alex prompt in SKILL.md (Step 6)**
34
+ - Add output: write `{FEAT_DIR}/handoff-alex.md`
35
+ - Add summary format template to prompt
36
+ - Specify: `**For:** Cass`, feature slug, key decisions, files created
37
+ - Tests: T-3.1
38
+
39
+ 4. **Update Cass prompt in SKILL.md (Step 7)**
40
+ - Add input: read `{FEAT_DIR}/handoff-alex.md` instead of full feature spec
41
+ - Add output: write `{FEAT_DIR}/handoff-cass.md`
42
+ - Specify: `**For:** Nigel`
43
+ - Tests: T-3.2
44
+
45
+ 5. **Update Nigel prompt in SKILL.md (Step 8)**
46
+ - Add input: read `{FEAT_DIR}/handoff-cass.md` instead of full stories
47
+ - Add output: write `{FEAT_DIR}/handoff-nigel.md`
48
+ - Specify: `**For:** Codey`
49
+ - Tests: T-3.3
50
+
51
+ 6. **Update Codey prompts in SKILL.md (Steps 9, 10)**
52
+ - Add input: read `{FEAT_DIR}/handoff-nigel.md` instead of full test spec
53
+ - No output summary (last in chain)
54
+ - Tests: T-4.1
55
+
56
+ 7. **Update queue structure for handoff paths (optional)**
57
+ - Add `upstreamSummary` field to queue entries if needed for recovery
58
+ - Tests: T-4.1
59
+
60
+ 8. **Run tests and verify**
61
+ - Execute `node --test test/feature_upstream-summaries.test.js`
62
+ - All 15 tests should pass
63
+
64
+ ---
65
+
66
+ ## Risks/Questions
67
+
68
+ - **Backward compatibility**: Existing features without handoff files may break if prompts strictly require them. Mitigation: Add "if exists" fallback in prompts.
69
+ - **Token savings**: Actual savings depend on how well agents write concise summaries. May need guidance on brevity.
70
+ - **Full file access**: Spec says full files remain available. Consider adding "For additional context, see: {path}" to summaries.
@@ -0,0 +1,209 @@
1
+ # Feature Specification — Validate Command
2
+
3
+ ## 1. Feature Intent
4
+ **Why this feature exists.**
5
+
6
+ The `murmur8 validate` command provides pre-flight checks to ensure the environment is correctly configured before running the `/implement-feature` pipeline. This addresses a common failure mode where users invoke the pipeline without required artifacts in place, leading to mid-pipeline failures that are harder to diagnose and recover from.
7
+
8
+ **Problem being addressed:**
9
+ - Pipeline failures mid-execution due to missing system spec, agent files, or skills
10
+ - Poor developer experience when prerequisites are unclear
11
+ - No visibility into "readiness" state before committing to a full pipeline run
12
+
13
+ **User need:**
14
+ - Developers need confidence that their project is correctly set up before invoking the pipeline
15
+ - Teams need actionable guidance when setup is incomplete
16
+
17
+ **How this supports the system purpose:**
18
+ - Aligns with the system's goal of reducing ambiguity and drift by enforcing explicit prerequisites
19
+ - Supports the "System spec gate" rule defined in the system specification (Section 7)
20
+ - Reduces failed pipeline runs by catching issues early
21
+
22
+ ---
23
+
24
+ ## 2. Scope
25
+
26
+ ### In Scope
27
+ - New CLI command `murmur8 validate` accessible via `bin/cli.js`
28
+ - Check: System spec exists at `.blueprint/system_specification/SYSTEM_SPEC.md`
29
+ - Check: Required directories exist (`.blueprint/`, `.business_context/`, `.claude/commands/`)
30
+ - Check: Agent spec files exist in `.blueprint/agents/` (AGENT_SPECIFICATION_ALEX.md, AGENT_BA_CASS.md, AGENT_TESTER_NIGEL.md, AGENT_DEVELOPER_CODEY.md)
31
+ - Check: Business context directory has at least one file (not empty)
32
+ - Check: Skills installed (`.claude/commands/implement-feature.md` exists)
33
+ - Check: Node.js version meets requirements (>=18)
34
+ - Success output: Print success message with checkmarks for each passed check
35
+ - Failure output: Print what is missing with actionable fix suggestions for each failed check
36
+ - Exit code: 0 on all checks pass, non-zero on any failure
37
+
38
+ ### Out of Scope
39
+ - Validation of file contents (e.g., SYSTEM_SPEC.md is well-formed)
40
+ - Validation of business context quality or completeness
41
+ - Automatic remediation (the command reports issues, not fixes them)
42
+ - Network checks (e.g., can reach skills.sh)
43
+ - Validation of queue state or in-progress features
44
+
45
+ ---
46
+
47
+ ## 3. Actors Involved
48
+
49
+ ### Human User (Developer)
50
+ - **Can do:** Invoke `murmur8 validate` to check project readiness
51
+ - **Can do:** Review validation output to understand what is missing
52
+ - **Cannot do:** Auto-fix issues via this command (must run `init` or manually create files)
53
+
54
+ ---
55
+
56
+ ## 4. Behaviour Overview
57
+
58
+ **Happy-path behaviour:**
59
+ 1. User runs `murmur8 validate` in a project directory
60
+ 2. Command performs all checks in sequence
61
+ 3. Each check prints a status line (checkmark for pass, X for fail)
62
+ 4. If all checks pass, prints overall success message and exits with code 0
63
+
64
+ **Failure behaviour:**
65
+ 1. User runs `murmur8 validate` in an incomplete project
66
+ 2. Command performs all checks in sequence
67
+ 3. Failed checks print X with a description of what is missing
68
+ 4. After all checks, failed items include actionable fix suggestions (e.g., "Run `murmur8 init` to create .blueprint directory")
69
+ 5. Command exits with non-zero exit code
70
+
71
+ **User-visible outcomes:**
72
+ - Clear, scannable output showing pass/fail status for each prerequisite
73
+ - Actionable guidance for resolving failures
74
+ - Machine-parseable exit code for scripting/CI integration
75
+
76
+ ---
77
+
78
+ ## 5. State & Lifecycle Interactions
79
+
80
+ This feature is **state-inspecting only**. It does not create, transition, or modify any system state.
81
+
82
+ - **States inspected:** File system state (existence of files/directories), Node.js runtime version
83
+ - **States entered:** None
84
+ - **States exited:** None
85
+ - **States modified:** None
86
+
87
+ The command is idempotent and safe to run repeatedly without side effects.
88
+
89
+ ---
90
+
91
+ ## 6. Rules & Decision Logic
92
+
93
+ ### R1: Directory Existence Check
94
+ - **Description:** Verify required directories exist
95
+ - **Inputs:** Directory paths (`.blueprint/`, `.business_context/`, `.claude/commands/`)
96
+ - **Outputs:** Pass/fail for each directory
97
+ - **Deterministic:** Yes
98
+
99
+ ### R2: System Spec Existence Check
100
+ - **Description:** Verify SYSTEM_SPEC.md exists at expected path
101
+ - **Inputs:** Path `.blueprint/system_specification/SYSTEM_SPEC.md`
102
+ - **Outputs:** Pass/fail
103
+ - **Deterministic:** Yes
104
+
105
+ ### R3: Agent Specs Existence Check
106
+ - **Description:** Verify all four agent specification files exist
107
+ - **Inputs:** Paths in `.blueprint/agents/` (AGENT_SPECIFICATION_ALEX.md, AGENT_BA_CASS.md, AGENT_TESTER_NIGEL.md, AGENT_DEVELOPER_CODEY.md)
108
+ - **Outputs:** Pass/fail, listing any missing files
109
+ - **Deterministic:** Yes
110
+
111
+ ### R4: Business Context Non-Empty Check
112
+ - **Description:** Verify `.business_context/` contains at least one file
113
+ - **Inputs:** Directory listing of `.business_context/`
114
+ - **Outputs:** Pass/fail
115
+ - **Deterministic:** Yes
116
+
117
+ ### R5: Skills Installed Check
118
+ - **Description:** Verify implement-feature skill is installed
119
+ - **Inputs:** Path `.claude/commands/implement-feature.md`
120
+ - **Outputs:** Pass/fail
121
+ - **Deterministic:** Yes
122
+
123
+ ### R6: Node.js Version Check
124
+ - **Description:** Verify Node.js version is 18 or higher
125
+ - **Inputs:** `process.version`
126
+ - **Outputs:** Pass/fail with current version
127
+ - **Deterministic:** Yes
128
+
129
+ ### R7: Exit Code Logic
130
+ - **Description:** Return exit code based on overall result
131
+ - **Inputs:** All check results
132
+ - **Outputs:** Exit code 0 if all pass, exit code 1 if any fail
133
+ - **Deterministic:** Yes
134
+
135
+ ---
136
+
137
+ ## 7. Dependencies
138
+
139
+ ### System Components
140
+ - `fs` module for file system checks
141
+ - `process.version` for Node.js version check
142
+ - CLI routing in `bin/cli.js`
143
+
144
+ ### Technical Dependencies
145
+ - Node.js >= 18 (the check itself should work on lower versions to report the failure)
146
+
147
+ ---
148
+
149
+ ## 8. Non-Functional Considerations
150
+
151
+ ### Performance
152
+ - All checks are local file system operations; should complete in < 100ms
153
+
154
+ ### Error Tolerance
155
+ - Command should not throw exceptions; all checks should be wrapped to handle missing paths gracefully
156
+
157
+ ### User Experience
158
+ - Output should be colorized if terminal supports it (green checkmarks, red X marks)
159
+ - Output should be readable in non-color terminals (using ASCII fallback)
160
+
161
+ ---
162
+
163
+ ## 9. Assumptions & Open Questions
164
+
165
+ ### Assumptions
166
+ - The four agent spec files have fixed names matching current convention
167
+ - `.business_context/` having any file (including README.md) counts as non-empty
168
+ - The Node.js version check should report failure but not crash on old versions
169
+
170
+ ### Open Questions
171
+ - Should there be a `--json` flag for machine-readable output?
172
+ - Should there be a `--fix` flag that runs `init` if missing? (Deferred - out of scope)
173
+
174
+ ---
175
+
176
+ ## 10. Impact on System Specification
177
+
178
+ This feature **reinforces** existing system assumptions:
179
+ - Validates the prerequisites implied by "System spec gate" rule in Section 7
180
+ - Aligns with system boundary definition (CLI tooling in scope)
181
+ - Consistent with existing command patterns (`init`, `update`, `queue`)
182
+
183
+ No contradictions or tensions with the current system specification.
184
+
185
+ ---
186
+
187
+ ## 11. Handover to BA (Cass)
188
+
189
+ ### Story Themes
190
+ 1. **Core validation flow** - User runs validate and sees results
191
+ 2. **Success path** - All checks pass, user sees green checkmarks
192
+ 3. **Failure path with guidance** - Checks fail, user sees actionable fixes
193
+ 4. **Node.js version edge case** - Running on unsupported Node version
194
+
195
+ ### Expected Story Boundaries
196
+ - Each check type could be a separate acceptance criterion within a single story
197
+ - Success/failure output formatting is a story concern
198
+ - Exit codes are a story concern (affects CI integration)
199
+
200
+ ### Areas Needing Careful Story Framing
201
+ - The distinction between "check failed" and "command error" (the command itself should not fail/throw, even if checks fail)
202
+ - How to phrase fix suggestions to be helpful without being prescriptive
203
+
204
+ ---
205
+
206
+ ## 12. Change Log (Feature-Level)
207
+ | Date | Change | Reason | Raised By |
208
+ |------|--------|--------|-----------|
209
+ | 2026-02-24 | Initial feature specification | New feature request for pre-flight validation | Alex |
@@ -0,0 +1,59 @@
1
+ # Implementation Plan — Validate Command
2
+
3
+ ## Summary
4
+
5
+ Implement a new `murmur8 validate` CLI command that performs pre-flight checks for directory existence, file presence, and Node.js version. The command outputs pass/fail status for each check with colorized indicators, provides actionable fix suggestions for failures, and returns appropriate exit codes (0 for success, 1 for failure).
6
+
7
+ ---
8
+
9
+ ## Files to Create/Modify
10
+
11
+ | Path | Action | Purpose |
12
+ |------|--------|---------|
13
+ | `src/validate.js` | Create | Core validation logic with `validate()`, `formatOutput()`, and `checkNodeVersion()` exports |
14
+ | `src/index.js` | Modify | Export validate module for library consumers |
15
+ | `bin/cli.js` | Modify | Add `validate` command routing |
16
+
17
+ ---
18
+
19
+ ## Implementation Steps
20
+
21
+ 1. **Create `src/validate.js` with check functions**
22
+ - Implement `checkDirectories()` for `.blueprint/`, `.business_context/`, `.claude/commands/`
23
+ - Implement `checkSystemSpec()` for `.blueprint/system_specification/SYSTEM_SPEC.md`
24
+ - Implement `checkAgentSpecs()` for the four agent files in `.blueprint/agents/`
25
+ - Implement `checkBusinessContext()` to verify directory is non-empty
26
+ - Implement `checkSkillsInstalled()` for `.claude/commands/implement-feature.md`
27
+ - Implement `checkNodeVersion()` exported separately for tests, parsing `process.version`
28
+
29
+ 2. **Implement main `validate()` function**
30
+ - Run all checks sequentially, collecting results in an array
31
+ - Each check returns `{ name, passed, message, fix?, detectedVersion? }`
32
+ - Compute `success` (all passed) and `exitCode` (0 or 1)
33
+ - Return `{ success, exitCode, checks }`
34
+
35
+ 3. **Implement `formatOutput()` function**
36
+ - Accept result object and color flag (detect via `process.stdout.isTTY`)
37
+ - Use `✓`/`✗` for color terminals, `[PASS]`/`[FAIL]` for ASCII fallback
38
+ - Apply green/red ANSI codes when color is enabled
39
+ - Include fix suggestions after failed checks
40
+ - Print overall success/failure summary at end
41
+
42
+ 4. **Add CLI routing in `bin/cli.js`**
43
+ - Import `validate` and `formatOutput` from `src/validate.js`
44
+ - Add `validate` command that runs validation, prints output, and calls `process.exit(result.exitCode)`
45
+
46
+ 5. **Export from `src/index.js`**
47
+ - Add `validate` to module exports for programmatic usage
48
+
49
+ 6. **Run tests and iterate**
50
+ - Execute `node --test test/feature_validate-command.test.js`
51
+ - Fix any failing assertions
52
+
53
+ ---
54
+
55
+ ## Risks/Questions
56
+
57
+ - **Color detection**: Tests mock TTY state; implementation should use `process.stdout.isTTY` or accept a parameter for testability
58
+ - **Agent file names**: Tests expect exact names (AGENT_SPECIFICATION_ALEX.md, AGENT_BA_CASS.md, AGENT_TESTER_NIGEL.md, AGENT_DEVELOPER_CODEY.md) - verify these match production
59
+ - **Node version parsing**: Use `parseInt(process.version.slice(1).split('.')[0], 10)` to extract major version safely