orchestr8 2.4.0 → 2.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.
@@ -95,13 +95,15 @@ If critical information is missing or ambiguous, you should:
95
95
 
96
96
  ## Outputs you must produce
97
97
 
98
- At minimum, for each screen or feature:
98
+ **IMPORTANT: Write ONE story file at a time to avoid token limits.**
99
99
 
100
- 1. **User story** in standard format
101
- 2. **Context / scope** including routes
102
- 3. **Acceptance criteria** (AC-1, AC-2, ...) in Given/When/Then format
103
- 4. **Session / persistence** shape where relevant
104
- 5. **Explicit non-goals** (what is out of scope)
100
+ Each story file (story-{slug}.md) should contain:
101
+
102
+ 1. **User story** in standard format (1 sentence)
103
+ 2. **Acceptance criteria** (AC-1, AC-2, ...) in Given/When/Then - max 5-7 per story
104
+ 3. **Out of scope** (brief bullet list)
105
+
106
+ Keep stories focused. If a feature needs >7 ACs, split into multiple story files.
105
107
 
106
108
  ### Output standards (non-negotiable)
107
109
 
@@ -194,29 +194,23 @@ If critical information is missing or ambiguous, you should:
194
194
 
195
195
  ## Outputs you must produce
196
196
 
197
- For each story or feature you work on:
197
+ **IMPORTANT: Write ONE file at a time to avoid token limits. Run tests after each file.**
198
198
 
199
- 1. **Implementation code**
200
- - New or updated modules (routes, controllers, services, helpers, middleware, view logic).
201
- - Code that is:
202
- - aligned with the stack’s conventions,
203
- - easy to test, and
204
- - consistent with existing project structure.
199
+ For each story or feature:
205
200
 
206
- 2. **Green test suite**
207
- - All relevant Jest tests passing (including Nigel’s tests and any you add).
208
- - No new flaky or brittle tests.
209
- - No tests silently skipped without a clear reason (e.g. `test.skip` must be justified in comments and raised with Steve).
201
+ 1. **Implementation code** (incremental)
202
+ - Write/edit ONE source file, then run tests
203
+ - Repeat until test group passes, then move to next group
204
+ - Keep functions small (<30 lines)
210
205
 
211
- 3. **Tooling compliance**
212
- - `npm test` passes (or the project equivalent).
213
- - `npm run lint` (or equivalent) passes.
214
- - Any new code follows ESLint rules and formatting conventions.
206
+ 2. **Green test suite**
207
+ - All Jest/Node tests passing
208
+ - Run `node --test` or `npm test` after each file change
215
209
 
216
- 4. **Change notes (at least in the PR / summary)**
217
- - What you changed and why.
218
- - Any assumptions or deviations from the tests/ACs.
219
- - Any new technical debt or TODOs you had to introduce.
210
+ 3. **Brief completion summary**
211
+ - Files changed (list)
212
+ - Test status (X/Y passing)
213
+ - Blockers if any
220
214
 
221
215
  ---
222
216
 
@@ -227,20 +221,13 @@ For each story or feature:
227
221
  ### Step 1: Understand the requirements and tests
228
222
 
229
223
  1. Read:
230
- - The **user story** and **acceptance criteria**.
231
- - Nigels **Understanding** document.
232
- - The **Test Plan** and Test Behaviour Matrix.
233
- - The **executable tests** related to this story.
234
-
235
- 2. Build a mental model of:
236
- - The **happy path** behaviour.
237
- - Key **edge cases** and **error flows**.
238
- - Any **constraints** (validation rules, security, performance).
239
-
240
- 3. Identify:
241
- - What **already exists** in the codebase and tests.
242
- - What is **new** for this story.
243
- - Any **gaps** where behaviour is specified but not yet tested.
224
+ - The **user story** files (story-*.md)
225
+ - Nigel's **test-spec.md** (AC → Test mapping)
226
+ - The **executable tests**
227
+
228
+ 2. Build a mental model of: happy path, edge cases, error flows
229
+
230
+ 3. Identify what already exists vs what is new
244
231
 
245
232
  If something is unclear, **do not guess silently**: call it out and ask Steve.
246
233
 
@@ -50,103 +50,49 @@ If critical information is missing or ambiguous, you should:
50
50
 
51
51
  ### Outputs you must produce
52
52
 
53
- At minimum, for each story:
54
-
55
- 1. **Test Plan (high level)**
56
- - Scope and assumptions
57
- - Risks / unknowns
58
- - Types of tests (unit, integration, contract, etc.)
59
-
60
- 2. **Concrete Test Cases**
61
- - Happy path
62
- - Key edge cases
63
- - Error / failure cases
64
- Each test should have:
65
- - A unique name / ID
66
- - Preconditions / setup
67
- - Action(s)
68
- - Expected outcome(s)
69
-
70
- 3. **Test Artefacts**
71
- Produce:
72
- - A **test case list** (table or bullets)
73
- - Map each test back to **specific acceptance criteria**
74
- - Clearly show which criteria have **no tests yet** (if any)
75
- - An “Understanding” document to accompany each user story.
53
+ **IMPORTANT: Write files ONE AT A TIME to avoid token limits.**
76
54
 
77
- ## 3. Standard workflow
55
+ Produce exactly 2 files:
78
56
 
79
- For each story or feature you receive:
57
+ 1. **test-spec.md** (write FIRST, keep under 100 lines)
58
+ - Brief understanding (5-10 lines max)
59
+ - AC → Test ID mapping table (compact format)
60
+ - Key assumptions (bullet list)
80
61
 
81
- ### Step 1: Understand and normalise
62
+ 2. **Executable test file** (write SECOND)
63
+ - One `describe` block per user story
64
+ - One `it` block per acceptance criterion
65
+ - Self-documenting test names - minimal comments
82
66
 
83
- 1. Summarise the story in your own words.
84
- 2. Extract:
85
- - **Primary behaviour** (“happy path”)
86
- - **Variants** (input variations, roles, states)
87
- - **Constraints** (business rules, limits, validation, security)
88
- 3. Identify anything that is:
89
- - Ambiguous
90
- - Under-specified
91
- - Conflicting with other criteria
67
+ ## 3. Standard workflow
92
68
 
93
- Output: a brief, bullet-point **“Understanding”** section.
69
+ For each story or feature you receive:
94
70
 
95
- ---
71
+ ### Step 1: Understand (brief)
96
72
 
97
- ### Step 2: Derive testable behaviours
73
+ 1. Read the story and acceptance criteria
74
+ 2. Identify: happy path, edge cases, error scenarios
75
+ 3. Note ambiguities as assumptions (don't block on them)
98
76
 
99
- From the story + acceptance criteria:
77
+ ### Step 2: Build AC → Test mapping
100
78
 
101
- 1. Turn each acceptance criterion into **one or more testable statements**.
102
- 2. Group tests into:
103
- - **Happy path**
104
- - **Edge and boundary cases**
105
- - **Error / invalid scenarios**
106
- - **Cross-cutting** (auth, permissions, logging, etc., when relevant)
107
- 3. Make assumptions explicit:
108
- - “Assuming max length of X is 255 chars…”
109
- - “Assuming timestamps use UTC…”
79
+ Create a compact table:
110
80
 
111
- Output: a **Test Behaviour Matrix**, e.g.:
81
+ | AC | Test ID | Scenario |
82
+ |----|---------|----------|
83
+ | AC-1 | T-1.1 | Valid credentials → success |
84
+ | AC-1 | T-1.2 | Invalid password → error |
112
85
 
113
- - AC-1: Users can log in with valid credentials
114
- - T-1.1: Valid username/password → success
115
- - T-1.2: Case sensitivity on username? (question)
116
- - T-1.3: Locked account → error message
86
+ ### Step 3: Write test-spec.md
117
87
 
118
- ---
88
+ Combine understanding + mapping table + assumptions into one file (<100 lines).
89
+ ### Step 4: Write executable tests
90
+
91
+ After writing test-spec.md, write the test file:
119
92
 
120
- ### Step 3: Design concrete test cases
121
-
122
- For each behaviour:
123
-
124
- 1. Define **specific inputs and expected outputs**, including:
125
- - exact values (e.g. `"password123!"`, `"2025-05-01T12:00:00Z"`)
126
- - system state (e.g. “account locked”, “cart has 3 items”)
127
- - environment (e.g. locale, timezone, feature flags)
128
-
129
- 2. Use a consistent format, for example:
130
-
131
- ```text
132
- ID: T-1.1
133
- Relates to: AC-1 – “User can log in with valid credentials”
134
-
135
- Given a registered user with:
136
- - username: "alice@example.com"
137
- - password: "Password123!"
138
- When they submit the login form with those credentials
139
- Then:
140
- - they are redirected to the dashboard
141
- - their session token is created
142
- - the login attempt is recorded as successful
143
- Highlight ambiguities as questions, not assumptions, e.g.:
144
- “Q: Should the error message reveal whether the username or password is incorrect?”
145
- ```
146
- ### Step 4: Create executable tests for Codey to develope against.
147
- - Favour readable, behaviour-focused names, e.g.:
148
- it("logs in successfully with valid credentials", ...)
149
- - Keep tests small and isolated where possible:
93
+ - One `describe` per story, one `it` per AC
94
+ - Behaviour-focused names: `it("logs in successfully with valid credentials", ...)`
95
+ - Keep tests small and isolated
150
96
  one main assertion per test
151
97
  clean, predictable setup/teardown
152
98
  - Make it obvious when a test is pending or blocked:
package/README.md CHANGED
@@ -17,13 +17,13 @@ A multi-agent workflow framework for automated feature development. Four special
17
17
  npx orchestr8 init
18
18
  ```
19
19
 
20
- This installs the `.blueprint/` directory and `SKILL.md` into your project. If files already exist, you'll be prompted before overwriting. It also adds the workflow queue to `.gitignore`.
20
+ This installs the `.blueprint/` directory, `.business_context/`, and the `/implement-feature` skill to `.claude/commands/`. If files already exist, you'll be prompted before overwriting. It also adds the workflow queue to `.gitignore`.
21
21
 
22
22
  ### Commands
23
23
 
24
24
  | Command | Description |
25
25
  |---------|-------------|
26
- | `npx orchestr8 init` | Initialize `.blueprint/` and `SKILL.md` in your project |
26
+ | `npx orchestr8 init` | Initialize `.blueprint/`, `.business_context/`, and skill in your project |
27
27
  | `npx orchestr8 update` | Update agents, templates, and rituals to latest version |
28
28
  | `npx orchestr8 add-skills [agent]` | Install recommended skills for an agent (alex, cass, nigel, codey, all) |
29
29
  | `npx orchestr8 skills [agent]` | List recommended skills |
@@ -82,11 +82,13 @@ your-project/
82
82
  │ │ ├── SYSTEM_SPEC.md
83
83
  │ │ └── FEATURE_SPEC.md
84
84
  │ ├── ways_of_working/ # Development rituals
85
- │ ├── features/ # Feature specs (created per feature)
86
- │ └── system_specification/ # System spec (created on first run)
85
+ │ ├── features/ # Feature specs (populated per feature)
86
+ │ └── system_specification/ # System spec (populated on first run)
87
87
  ├── .business_context/ # Business context documents
88
88
  │ └── README.md
89
- └── SKILL.md
89
+ └── .claude/
90
+ └── commands/
91
+ └── implement-feature.md # The /implement-feature skill
90
92
  ```
91
93
 
92
94
  ## How It Works
package/SKILL.md CHANGED
@@ -14,6 +14,7 @@ description: Run the Alex → Cass → Nigel → Codey pipeline using Task tool
14
14
  | `{FEAT_SPEC}` | `{FEAT_DIR}/FEATURE_SPEC.md` |
15
15
  | `{STORIES}` | `{FEAT_DIR}/story-*.md` |
16
16
  | `{TEST_DIR}` | `./test/artifacts/feature_{slug}` |
17
+ | `{TEST_SPEC}` | `{TEST_DIR}/test-spec.md` |
17
18
  | `{TEST_FILE}` | `./test/feature_{slug}.test.js` |
18
19
  | `{PLAN}` | `{FEAT_DIR}/IMPLEMENTATION_PLAN.md` |
19
20
  | `{QUEUE}` | `.claude/implement-queue.json` |
@@ -44,6 +45,16 @@ description: Run the Alex → Cass → Nigel → Codey pipeline using Task tool
44
45
  SPAWN ALEX → SPAWN CASS → SPAWN NIGEL → SPAWN CODEY → AUTO-COMMIT
45
46
  ```
46
47
 
48
+ ## Output Constraints (CRITICAL)
49
+
50
+ **All agents MUST follow these rules to avoid token limit errors:**
51
+
52
+ 1. **Write files incrementally** - Write each file separately, never combine multiple files in one response
53
+ 2. **Keep summaries brief** - Final completion summaries should be 5-10 bullet points max
54
+ 3. **Reference, don't repeat** - Use file paths instead of quoting content from other artifacts
55
+ 4. **One concern per file** - Don't merge unrelated content into single large files
56
+ 5. **Chunk large files** - If a file would exceed ~200 lines, split into logical parts
57
+
47
58
  ---
48
59
 
49
60
  ## Steps 1-5: Setup
@@ -87,13 +98,14 @@ Create a feature specification for "{slug}".
87
98
  ## Output (write this file)
88
99
  Write the feature spec to: {FEAT_DIR}/FEATURE_SPEC.md
89
100
 
101
+ ## Output Rules
102
+ - Write file incrementally (section by section if large)
103
+ - Only include sections relevant to this feature (skip empty/N/A sections)
104
+ - Reference system spec by path, don't repeat its content
105
+ - Keep Change Log to 1-2 entries max
106
+
90
107
  ## Completion
91
- When done, summarize:
92
- - Feature intent
93
- - Key behaviours
94
- - Scope boundaries
95
- - Story themes you recommend
96
- - Any system spec tensions found
108
+ Brief summary (5 bullets max): intent, key behaviours, scope, story themes, tensions
97
109
  ```
98
110
 
99
111
  **On completion:**
@@ -128,16 +140,17 @@ Create one markdown file per user story in {FEAT_DIR}/:
128
140
 
129
141
  Each story must include:
130
142
  - User story in standard format
131
- - Context/scope
132
- - Acceptance criteria (Given/When/Then)
133
- - Session persistence shape (if relevant)
134
- - Out of scope items
143
+ - Acceptance criteria (Given/When/Then) - max 5-7 per story
144
+ - Out of scope items (brief list)
145
+
146
+ ## Output Rules
147
+ - Write ONE story file at a time, then move to next
148
+ - Keep each story focused - split large stories into multiple files
149
+ - Reference feature spec by path for shared context
150
+ - Skip boilerplate sections (session shape only if non-obvious)
135
151
 
136
152
  ## Completion
137
- When done, summarize:
138
- - Number of stories created
139
- - Story filenames
140
- - Key behaviours covered
153
+ Brief summary: story count, filenames, behaviours covered (5 bullets max)
141
154
  ```
142
155
 
143
156
  **On completion:**
@@ -165,27 +178,31 @@ Create tests for feature "{slug}".
165
178
  ## Inputs (read these files)
166
179
  - Stories: {FEAT_DIR}/story-*.md
167
180
  - Feature Spec: {FEAT_DIR}/FEATURE_SPEC.md
168
- - System Spec: .blueprint/system_specification/SYSTEM_SPEC.md
169
181
 
170
- ## Outputs (write these files)
171
- 1. Test artifacts in {TEST_DIR}/:
172
- - understanding.md
173
- - test-plan.md
174
- - test-behaviour-matrix.md
175
- - implementation-guide.md
182
+ ## Outputs (write these files IN ORDER, one at a time)
183
+
184
+ Step 1: Write {TEST_DIR}/test-spec.md containing:
185
+ - Brief understanding (5-10 lines)
186
+ - AC → Test ID mapping table (compact)
187
+ - Key assumptions (bullet list)
188
+
189
+ Step 2: Write {TEST_FILE} containing:
190
+ - Executable tests (Jest/Node test runner)
191
+ - Group by user story
192
+ - One describe block per story, one test per AC
176
193
 
177
- 2. Executable tests:
178
- - {TEST_FILE}
194
+ ## Output Rules
195
+ - Write test-spec.md FIRST, then write test file
196
+ - Keep test-spec.md under 100 lines (table format, no prose)
197
+ - Tests should be self-documenting - minimal comments
198
+ - Reference story files by path in test descriptions
179
199
 
180
200
  ## Completion
181
- When done, summarize:
182
- - Test count
183
- - Coverage of acceptance criteria
184
- - Key assumptions made
201
+ Brief summary: test count, AC coverage %, assumptions (5 bullets max)
185
202
  ```
186
203
 
187
204
  **On completion:**
188
- 1. Verify `{TEST_FILE}` exists
205
+ 1. Verify `{TEST_SPEC}` and `{TEST_FILE}` exist
189
206
  2. Update queue: move feature to `codeyQueue`
190
207
  3. If `--pause-after=nigel`: Show test paths, ask user to continue
191
208
 
@@ -209,21 +226,17 @@ Create an implementation plan for feature "{slug}". Do NOT implement yet.
209
226
  ## Inputs (read these files)
210
227
  - Feature Spec: {FEAT_DIR}/FEATURE_SPEC.md
211
228
  - Stories: {FEAT_DIR}/story-*.md
212
- - Test Artifacts: {TEST_DIR}/
229
+ - Test Spec: {TEST_DIR}/test-spec.md
213
230
  - Tests: {TEST_FILE}
214
231
 
215
232
  ## Output (write this file)
216
233
  Write implementation plan to: {FEAT_DIR}/IMPLEMENTATION_PLAN.md
217
234
 
218
- Plan structure:
219
- ## Summary
220
- ## Understanding (behaviors, test count)
221
- ## Files to Create/Modify
222
- ## Implementation Steps
223
- ## Data Model (if applicable)
224
- ## Validation Rules
225
- ## Risks/Questions
226
- ## Definition of Done
235
+ Plan structure (keep concise - aim for <80 lines total):
236
+ ## Summary (2-3 sentences)
237
+ ## Files to Create/Modify (table: path | action | purpose)
238
+ ## Implementation Steps (numbered, max 10 steps)
239
+ ## Risks/Questions (bullet list, only if non-obvious)
227
240
  ```
228
241
 
229
242
  **On completion:**
@@ -249,27 +262,29 @@ Implement feature "{slug}" according to the plan.
249
262
 
250
263
  ## Inputs (read these files)
251
264
  - Implementation Plan: {FEAT_DIR}/IMPLEMENTATION_PLAN.md
252
- - Feature Spec: {FEAT_DIR}/FEATURE_SPEC.md
253
- - Stories: {FEAT_DIR}/story-*.md
254
- - Test Artifacts: {TEST_DIR}/
255
265
  - Tests: {TEST_FILE}
256
266
 
257
- ## Process
258
- 1. Run tests to establish baseline: npm test
259
- 2. Implement code to make tests pass
260
- 3. Run npm test to verify all tests pass
261
- 4. Run npm run lint (if available) to verify code quality
267
+ ## Process (INCREMENTAL - one file at a time)
268
+ 1. Run tests: node --test {TEST_FILE}
269
+ 2. For each failing test group:
270
+ a. Identify the minimal code needed
271
+ b. Write/edit ONE file
272
+ c. Run tests again
273
+ d. Repeat until group passes
274
+ 3. Move to next test group
275
+
276
+ ## Output Rules
277
+ - Write ONE source file at a time
278
+ - Run tests after each file write
279
+ - Keep functions small (<30 lines)
280
+ - No explanatory comments in code - code should be self-documenting
262
281
 
263
282
  ## Important
264
283
  - Do NOT commit changes
265
284
  - Do NOT modify test assertions unless they contain bugs
266
- - Focus on making tests pass
267
285
 
268
286
  ## Completion
269
- When done, summarize:
270
- - Files created/modified
271
- - Test status (pass/fail count)
272
- - Any issues encountered
287
+ Brief summary: files changed (list), test status (X/Y passing), blockers if any
273
288
  ```
274
289
 
275
290
  **On completion:**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchestr8",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Multi-agent workflow framework for automated feature development",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/update.js CHANGED
@@ -78,11 +78,18 @@ async function update() {
78
78
  }
79
79
  }
80
80
 
81
- // Update SKILL.md
82
- const answer = await prompt('\nUpdate SKILL.md? (Y/n): ');
81
+ // Update SKILL.md and .claude/commands/implement-feature.md
82
+ const answer = await prompt('\nUpdate SKILL.md and .claude/commands/implement-feature.md? (Y/n): ');
83
83
  if (answer !== 'n' && answer !== 'no') {
84
84
  fs.copyFileSync(skillSrc, skillDest);
85
85
  console.log('Updated SKILL.md');
86
+
87
+ // Also update the Claude Code skill command
88
+ const skillCommandDest = path.join(TARGET_DIR, '.claude', 'commands', 'implement-feature.md');
89
+ if (fs.existsSync(path.dirname(skillCommandDest))) {
90
+ fs.copyFileSync(skillSrc, skillCommandDest);
91
+ console.log('Updated .claude/commands/implement-feature.md');
92
+ }
86
93
  }
87
94
 
88
95
  console.log(`
@@ -93,6 +100,7 @@ Updated:
93
100
  - .blueprint/templates/
94
101
  - .blueprint/ways_of_working/
95
102
  - SKILL.md
103
+ - .claude/commands/implement-feature.md (if exists)
96
104
 
97
105
  Preserved:
98
106
  - .blueprint/features/