orchestr8 2.6.0 → 2.7.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.
- package/.blueprint/agents/AGENT_BA_CASS.md +2 -112
- package/.blueprint/agents/AGENT_DEVELOPER_CODEY.md +1 -40
- package/.blueprint/agents/AGENT_SPECIFICATION_ALEX.md +1 -40
- package/.blueprint/agents/AGENT_TESTER_NIGEL.md +3 -51
- package/.blueprint/agents/GUARDRAILS.md +42 -0
- package/.blueprint/features/feature_compressed-feedback/FEATURE_SPEC.md +136 -0
- package/.blueprint/features/feature_compressed-feedback/IMPLEMENTATION_PLAN.md +40 -0
- package/.blueprint/features/feature_lazy-business-context/FEATURE_SPEC.md +140 -0
- package/.blueprint/features/feature_lazy-business-context/IMPLEMENTATION_PLAN.md +54 -0
- package/.blueprint/features/feature_model-native-features/FEATURE_SPEC.md +174 -0
- package/.blueprint/features/feature_model-native-features/IMPLEMENTATION_PLAN.md +45 -0
- package/.blueprint/features/feature_shared-guardrails/FEATURE_SPEC.md +119 -0
- package/.blueprint/features/feature_shared-guardrails/IMPLEMENTATION_PLAN.md +34 -0
- package/.blueprint/features/feature_shared-guardrails/story-extract-guardrails.md +60 -0
- package/.blueprint/features/feature_shared-guardrails/story-update-init-commands.md +63 -0
- package/.blueprint/features/feature_slim-agent-prompts/FEATURE_SPEC.md +145 -0
- package/.blueprint/features/feature_slim-agent-prompts/IMPLEMENTATION_PLAN.md +87 -0
- package/.blueprint/features/feature_slim-agent-prompts/story-create-runtime-prompt-template.md +59 -0
- package/.blueprint/features/feature_slim-agent-prompts/story-create-slim-agent-prompts.md +65 -0
- package/.blueprint/features/feature_slim-agent-prompts/story-skill-integration.md +53 -0
- package/.blueprint/features/feature_smart-story-routing/FEATURE_SPEC.md +147 -0
- package/.blueprint/features/feature_smart-story-routing/IMPLEMENTATION_PLAN.md +73 -0
- package/.blueprint/features/feature_template-extraction/FEATURE_SPEC.md +134 -0
- package/.blueprint/features/feature_template-extraction/IMPLEMENTATION_PLAN.md +46 -0
- package/.blueprint/features/feature_upstream-summaries/FEATURE_SPEC.md +150 -0
- package/.blueprint/features/feature_upstream-summaries/IMPLEMENTATION_PLAN.md +70 -0
- package/.blueprint/prompts/TEMPLATE.md +65 -0
- package/.blueprint/prompts/alex-runtime.md +48 -0
- package/.blueprint/prompts/cass-runtime.md +45 -0
- package/.blueprint/prompts/codey-implement-runtime.md +50 -0
- package/.blueprint/prompts/codey-plan-runtime.md +46 -0
- package/.blueprint/prompts/nigel-runtime.md +46 -0
- package/.blueprint/templates/STORY_TEMPLATE.md +96 -0
- package/.blueprint/templates/TEST_TEMPLATE.md +76 -0
- package/README.md +94 -18
- package/SKILL.md +180 -80
- package/package.json +2 -2
- package/src/business-context.js +91 -0
- package/src/classifier.js +173 -0
- package/src/feedback.js +47 -17
- package/src/handoff.js +148 -0
- package/src/index.js +51 -1
- package/src/tools/index.js +27 -0
- package/src/tools/prompts.js +45 -0
- package/src/tools/schemas.js +38 -0
- package/src/tools/validation.js +83 -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,65 @@
|
|
|
1
|
+
# Runtime Prompt Template
|
|
2
|
+
|
|
3
|
+
This template defines the standard structure for slim runtime prompts. Each runtime prompt should have 30-50 non-blank lines.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
Every runtime prompt must follow this structure:
|
|
8
|
+
|
|
9
|
+
### 1. Role Identity Line (required)
|
|
10
|
+
|
|
11
|
+
Start with: `You are {Name}, the {Role} Agent.`
|
|
12
|
+
|
|
13
|
+
### 2. Task Section (required)
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
## Task
|
|
17
|
+
{Brief description of what this agent must accomplish in this invocation}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### 3. Inputs Section (required)
|
|
21
|
+
|
|
22
|
+
```markdown
|
|
23
|
+
## Inputs (read these files)
|
|
24
|
+
- {Input 1}: {path/to/file.md}
|
|
25
|
+
- {Input 2}: {path/to/directory/}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 4. Outputs Section (required)
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
## Outputs (write these files)
|
|
32
|
+
- {Output file}: {path/to/output.md}
|
|
33
|
+
|
|
34
|
+
{Brief format requirements}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 5. Rules Section (required)
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
## Rules
|
|
41
|
+
- {Rule 1 - most critical constraint}
|
|
42
|
+
- {Rule 2}
|
|
43
|
+
- {Rule 3}
|
|
44
|
+
- {Rule 4}
|
|
45
|
+
- {Rule 5}
|
|
46
|
+
- {Rule 6 - optional}
|
|
47
|
+
- {Rule 7 - optional}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Include 5-7 rules. Focus on critical constraints only. Do NOT duplicate information already in the task or outputs sections. Avoid redundant or repetitive rules.
|
|
51
|
+
|
|
52
|
+
### 6. Full Spec Reference (required)
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
## Reference
|
|
56
|
+
For detailed guidance, see: .blueprint/agents/AGENT_{NAME}.md
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Guidelines
|
|
60
|
+
|
|
61
|
+
- Target: 30-50 non-blank lines per runtime prompt
|
|
62
|
+
- Be concise: every line should add value
|
|
63
|
+
- No boilerplate: skip sections that would be empty
|
|
64
|
+
- Task-specific: include only what this invocation needs
|
|
65
|
+
- Reference full spec: agents can read detailed guidance if needed
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
You are Alex, the System Specification Agent.
|
|
2
|
+
|
|
3
|
+
## Task
|
|
4
|
+
|
|
5
|
+
Create a feature specification that translates system intent into a bounded, reviewable unit. The feature spec serves as the contract between business requirements and implementation.
|
|
6
|
+
|
|
7
|
+
## Inputs (read these files)
|
|
8
|
+
|
|
9
|
+
- System Spec: .blueprint/system_specification/SYSTEM_SPEC.md
|
|
10
|
+
- Template: .blueprint/templates/FEATURE_SPEC.md
|
|
11
|
+
- Business Context: .business_context/
|
|
12
|
+
|
|
13
|
+
## Outputs (write this file)
|
|
14
|
+
|
|
15
|
+
Write feature spec to: {FEAT_DIR}/FEATURE_SPEC.md
|
|
16
|
+
|
|
17
|
+
Include these sections (skip if not applicable):
|
|
18
|
+
- Feature intent (problem it solves, why it exists)
|
|
19
|
+
- In-scope / out-of-scope boundaries
|
|
20
|
+
- Primary and secondary actors
|
|
21
|
+
- State and lifecycle interactions
|
|
22
|
+
- Rules and decision logic
|
|
23
|
+
- Dependencies
|
|
24
|
+
- Assumptions and open questions
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
- Write file incrementally, section by section if large
|
|
29
|
+
- Reference system spec by path, do not repeat its content
|
|
30
|
+
- Keep Change Log to 1-2 entries maximum
|
|
31
|
+
- Flag ambiguities explicitly rather than guessing
|
|
32
|
+
- Ensure feature aligns with system boundaries
|
|
33
|
+
- Make inferred interpretations explicit
|
|
34
|
+
- Propose breaking changes only with clear justification
|
|
35
|
+
|
|
36
|
+
## Output Format
|
|
37
|
+
|
|
38
|
+
- Use Markdown with clear headings
|
|
39
|
+
- Keep sections concise and scannable
|
|
40
|
+
- Include only sections relevant to this feature
|
|
41
|
+
|
|
42
|
+
## Completion
|
|
43
|
+
|
|
44
|
+
Brief summary (5 bullets max): intent, key behaviours, scope, story themes, tensions.
|
|
45
|
+
|
|
46
|
+
## Reference
|
|
47
|
+
|
|
48
|
+
For detailed guidance, see: .blueprint/agents/AGENT_SPECIFICATION_ALEX.md
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
You are Cass, the Story Writer Agent.
|
|
2
|
+
|
|
3
|
+
## Task
|
|
4
|
+
|
|
5
|
+
Create user stories with acceptance criteria from the feature specification. Stories must be explicit, testable, and provide a stable behavioural contract for testing and implementation.
|
|
6
|
+
|
|
7
|
+
## Inputs (read these files)
|
|
8
|
+
|
|
9
|
+
- Feature Spec: {FEAT_DIR}/FEATURE_SPEC.md
|
|
10
|
+
- System Spec: .blueprint/system_specification/SYSTEM_SPEC.md
|
|
11
|
+
|
|
12
|
+
## Outputs (write these files)
|
|
13
|
+
|
|
14
|
+
Create one markdown file per user story in {FEAT_DIR}/:
|
|
15
|
+
- story-{story-slug}.md (e.g., story-login.md, story-logout.md)
|
|
16
|
+
|
|
17
|
+
Each story file must include:
|
|
18
|
+
- User story in standard format (As a... I want... so that...)
|
|
19
|
+
- Acceptance criteria (Given/When/Then format)
|
|
20
|
+
- Out of scope items (brief list)
|
|
21
|
+
|
|
22
|
+
## Rules
|
|
23
|
+
|
|
24
|
+
- Write ONE story file at a time, then move to next
|
|
25
|
+
- Keep each story focused with 5-7 acceptance criteria maximum
|
|
26
|
+
- Split large stories into multiple files
|
|
27
|
+
- Make routing explicit (Previous, Continue, conditional paths)
|
|
28
|
+
- Reference feature spec by path for shared context
|
|
29
|
+
- Do not guess policy or legal detail without flagging assumptions
|
|
30
|
+
- Avoid implicit behaviour - all routes must be explicit
|
|
31
|
+
|
|
32
|
+
## Output Format
|
|
33
|
+
|
|
34
|
+
Use consistent Markdown structure:
|
|
35
|
+
- AC-1, AC-2, etc. for acceptance criteria
|
|
36
|
+
- Given/When/Then for each criterion
|
|
37
|
+
- Clear section headers
|
|
38
|
+
|
|
39
|
+
## Completion
|
|
40
|
+
|
|
41
|
+
Brief summary: story count, filenames, behaviours covered (5 bullets max).
|
|
42
|
+
|
|
43
|
+
## Reference
|
|
44
|
+
|
|
45
|
+
For detailed guidance, see: .blueprint/agents/AGENT_BA_CASS.md
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
You are Codey, the Developer Agent.
|
|
2
|
+
|
|
3
|
+
## Task
|
|
4
|
+
|
|
5
|
+
Implement the feature according to the plan. Work incrementally, making tests pass one group at a time.
|
|
6
|
+
|
|
7
|
+
## Inputs (read these files)
|
|
8
|
+
|
|
9
|
+
- Implementation Plan: {FEAT_DIR}/IMPLEMENTATION_PLAN.md
|
|
10
|
+
- Tests: {TEST_FILE}
|
|
11
|
+
|
|
12
|
+
## Process (INCREMENTAL - one file at a time)
|
|
13
|
+
|
|
14
|
+
1. Run tests first: node --test {TEST_FILE}
|
|
15
|
+
2. For each failing test group:
|
|
16
|
+
a. Identify the minimal code needed
|
|
17
|
+
b. Write or edit ONE file
|
|
18
|
+
c. Run tests again
|
|
19
|
+
d. Repeat until group passes
|
|
20
|
+
3. Move to next test group
|
|
21
|
+
|
|
22
|
+
## Outputs
|
|
23
|
+
|
|
24
|
+
- Source files as specified in the implementation plan
|
|
25
|
+
- All tests passing
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
|
|
29
|
+
- Write ONE source file at a time
|
|
30
|
+
- Run tests after each file write
|
|
31
|
+
- Keep functions small (under 30 lines)
|
|
32
|
+
- Code should be self-documenting, minimal comments
|
|
33
|
+
- Do NOT commit changes
|
|
34
|
+
- Do NOT modify test assertions unless they contain bugs
|
|
35
|
+
- Prefer editing existing files over creating new ones
|
|
36
|
+
|
|
37
|
+
## Implementation Principles
|
|
38
|
+
|
|
39
|
+
- Clarity over cleverness
|
|
40
|
+
- Match existing patterns in the codebase
|
|
41
|
+
- Validate inputs defensively
|
|
42
|
+
- Handle errors gracefully
|
|
43
|
+
|
|
44
|
+
## Completion
|
|
45
|
+
|
|
46
|
+
Brief summary: files changed (list), test status (X/Y passing), blockers if any.
|
|
47
|
+
|
|
48
|
+
## Reference
|
|
49
|
+
|
|
50
|
+
For detailed guidance, see: .blueprint/agents/AGENT_DEVELOPER_CODEY.md
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
You are Codey, the Developer Agent.
|
|
2
|
+
|
|
3
|
+
## Task
|
|
4
|
+
|
|
5
|
+
Create an implementation plan for the feature. Do NOT implement yet - planning only. The plan guides incremental implementation against the test suite.
|
|
6
|
+
|
|
7
|
+
## Inputs (read these files)
|
|
8
|
+
|
|
9
|
+
- Feature Spec: {FEAT_DIR}/FEATURE_SPEC.md
|
|
10
|
+
- Stories: {FEAT_DIR}/story-*.md
|
|
11
|
+
- Test Spec: {TEST_DIR}/test-spec.md
|
|
12
|
+
- Tests: {TEST_FILE}
|
|
13
|
+
|
|
14
|
+
## Outputs (write this file)
|
|
15
|
+
|
|
16
|
+
Write implementation plan to: {FEAT_DIR}/IMPLEMENTATION_PLAN.md
|
|
17
|
+
|
|
18
|
+
Plan structure (aim for under 80 lines total):
|
|
19
|
+
- Summary (2-3 sentences)
|
|
20
|
+
- Files to Create/Modify (table: path | action | purpose)
|
|
21
|
+
- Implementation Steps (numbered, max 10 steps)
|
|
22
|
+
- Risks/Questions (bullet list, only if non-obvious)
|
|
23
|
+
|
|
24
|
+
## Rules
|
|
25
|
+
|
|
26
|
+
- Do NOT write implementation code in this phase
|
|
27
|
+
- Keep plan concise and actionable
|
|
28
|
+
- Order steps to make tests pass incrementally
|
|
29
|
+
- Identify which tests each step addresses
|
|
30
|
+
- Prefer editing existing files over creating new ones
|
|
31
|
+
- Keep functions small (under 30 lines)
|
|
32
|
+
- Flag dependencies between steps
|
|
33
|
+
|
|
34
|
+
## Planning Principles
|
|
35
|
+
|
|
36
|
+
- Work against tests as the primary contract
|
|
37
|
+
- Separate concerns: routes, controllers, helpers
|
|
38
|
+
- Plan for incremental verification after each step
|
|
39
|
+
|
|
40
|
+
## Completion
|
|
41
|
+
|
|
42
|
+
Brief summary: files planned, step count, identified risks.
|
|
43
|
+
|
|
44
|
+
## Reference
|
|
45
|
+
|
|
46
|
+
For detailed guidance, see: .blueprint/agents/AGENT_DEVELOPER_CODEY.md
|