Skip to content

Commit d615a14

Browse files
nolrmclaude
andcommitted
feat(squad): architect split signal — recommend task splits via po-clarify (0.12.21)
- Architect evaluates complexity before writing the plan (step 5.5): flags tasks with >~7 files or multiple independent concerns via ### Recommended Split + status: po-clarify, stopping before any dev work - /squad Clarification Mode detects split recommendation and guides PO through approve (run /squad as batch) or proceed-as-is options - /squad-auto po-clarify message updated to cover split scenario - Tests: 203 passed; added sync parity test (commands/ == .contextkit/commands/) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1b08a8d commit d615a14

7 files changed

Lines changed: 93 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## [0.12.21] - 2026-03-06
4+
5+
### Added
6+
- **Architect split signal** — the Architect now evaluates task complexity before writing the plan. If a task is too large (>~7 files, multiple independent concerns, or significant wasted effort risk), it writes a `### Recommended Split` with proposed sub-tasks and sets `status: po-clarify`. The PO then approves the split (running `/squad` as a batch) or dismisses it and proceeds as-is — no code is written until the PO decides.
7+
8+
### Changed
9+
- **`/squad` Clarification Mode** — detects `### Recommended Split` in the Architect Plan block and guides the PO through the two response options (approve split or proceed as-is), separate from the standard spec Q&A flow.
10+
- **`/squad-auto` `po-clarify` message** — updated to mention the split recommendation scenario so users understand what to expect when running `/squad`.
11+
12+
---
13+
314
## [0.12.20] - 2026-03-06
415

516
### Added

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
This project uses [ContextKit](https://github.com/nolrm/contextkit) for AI development standards.
55

66
## ContextKit
7-
Version: 0.12.19
7+
Version: 0.12.20
88

99
## Project Standards
1010

__tests__/integration/download-manifest.test.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,36 @@ describe('Download manifest validation', () => {
9494
expect(content).toContain('`doc`');
9595
expect(content).toContain('## 7. Doc');
9696
});
97+
98+
it('7. commands/squad-architect.md contains the complexity check step and split signal', () => {
99+
const content = fs.readFileSync(path.join(ROOT, 'commands/squad-architect.md'), 'utf8');
100+
expect(content).toContain('Evaluate complexity');
101+
expect(content).toContain('### Recommended Split');
102+
expect(content).toContain('po-clarify');
103+
expect(content).toContain('7 files');
104+
});
105+
106+
it('8. commands/squad.md Clarification Mode handles split recommendation', () => {
107+
const content = fs.readFileSync(path.join(ROOT, 'commands/squad.md'), 'utf8');
108+
expect(content).toContain('### Recommended Split');
109+
expect(content).toContain('Approve split');
110+
expect(content).toContain('Proceed as-is');
111+
});
112+
113+
it('9. commands/squad-auto.md po-clarify message covers split scenario', () => {
114+
const content = fs.readFileSync(path.join(ROOT, 'commands/squad-auto.md'), 'utf8');
115+
expect(content).toContain('split recommendation');
116+
});
117+
118+
it('10. every file in commands/ has an identical copy in .contextkit/commands/', () => {
119+
const commandFiles = listRepoFiles('commands');
120+
const outOfSync = commandFiles.filter((f) => {
121+
const contextKitCopy = path.join(ROOT, '.contextkit', f);
122+
if (!fs.existsSync(contextKitCopy)) return true;
123+
const src = fs.readFileSync(path.join(ROOT, f), 'utf8');
124+
const dst = fs.readFileSync(contextKitCopy, 'utf8');
125+
return src !== dst;
126+
});
127+
expect(outOfSync).toEqual([]);
128+
});
97129
});

commands/squad-architect.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,37 @@ You are the **Architect** in a squad workflow.
4444
- Tell the user: "The Architect has questions for the PO. Run `/squad` to address them."
4545
- **Stop here** — do not write the plan yet.
4646
47-
**If the spec is clear**: Continue to step 6.
47+
**If the spec is clear**: Continue to step 5.5.
48+
49+
5.5. **Evaluate complexity** before exploring the codebase:
50+
- Count the approximate number of files that would need to change.
51+
- Identify whether the task contains multiple independent concerns with no shared implementation dependency.
52+
- Ask: if this dev phase fails or goes wrong, is the wasted effort significant?
53+
54+
**A split is warranted if any of these are true:**
55+
- More than ~7 files would need to change
56+
- Two or more concerns that could ship independently
57+
- Scope large enough that a failed dev phase would waste significant effort
58+
59+
**If a split is warranted:**
60+
- Write a `### Recommended Split` section in the Architect Plan block:
61+
```
62+
### Recommended Split
63+
Reason: [one sentence explaining why this task should be split]
64+
65+
Proposed sub-tasks:
66+
1. [sub-task A description]
67+
2. [sub-task B description]
68+
3. [sub-task C description] (if applicable)
69+
70+
Note: Run `/squad "sub-task A" "sub-task B" ...` to start a new batch with these tasks.
71+
The current handoff will be superseded.
72+
```
73+
- Set the top-level `status:` to `po-clarify`
74+
- Tell the user: "This task is too large to implement safely as one unit. A split is recommended. Run `/squad` to review the recommendation and decide."
75+
- **Stop here** — do not explore the codebase or write the full plan.
76+
77+
**If none apply**: Continue to step 6.
4878
4979
6. Explore the codebase to understand the current architecture, patterns, and conventions.
5080

commands/squad-auto.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ You are the **Pipeline Runner** for a squad batch workflow. Your job is to read
1717
If any task has a clarify status:
1818
- **Pause the pipeline for that task** — do not advance it further.
1919
- Tell the user which task needs clarification, which role raised questions, and which command to run. For example:
20-
- `po-clarify`: "Task #N needs PO clarification. Run `/squad` to address the Architect's questions, then run `/squad-auto` again."
20+
- `po-clarify`: "Task #N needs PO input. Run `/squad` — if the Architect flagged a split recommendation, you'll be guided through approving or dismissing it; otherwise you'll answer the Architect's spec questions. Then run `/squad-auto` again."
2121
- `arch-clarify`: "Task #N needs Architect clarification. Run `/squad-architect` to address the Dev's questions, then run `/squad-auto` again."
2222
- `dev-clarify`: "Task #N needs Dev clarification. Run `/squad-dev` to address the Tester's questions, then run `/squad-auto` again."
2323
- `test-clarify`: "Task #N needs Tester clarification. Run `/squad-test` to address the Reviewer's questions, then run `/squad-auto` again."

commands/squad.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,28 @@ created: [TIMESTAMP]
175175
### Single-task clarification (`handoff.md`)
176176

177177
1. Read `handoff.md`.
178-
2. Find `### Questions for PO` in any role's block.
179-
3. Update the PO Spec to address the questions (update User Story, Acceptance Criteria, Edge Cases, Out of Scope as needed).
180-
4. Add answers under `### Answers` in the PO Spec block:
178+
2. Find `### Questions for PO` in any role's block (Architect Plan, Review, etc.).
179+
3. **Check for a split recommendation**: Look for `### Recommended Split` in the Architect Plan block.
180+
181+
**If `### Recommended Split` exists** (Architect flagged task as too complex):
182+
- Read the recommended sub-tasks and reason.
183+
- Present the two options to the user:
184+
- **Option A — Approve split**: Run `/squad "sub-task A" "sub-task B" ...` with the proposed sub-tasks. The current handoff will be superseded by the new batch.
185+
- **Option B — Proceed as-is**: Add a note in the PO Spec `### Answers` block: `- Split recommendation from Architect → "Proceed as one task"`. Set the top-level `status:` back to `architect`. Tell the user: "Noted. Run `/squad-architect` to continue — the Architect will write the full plan."
186+
- **Stop here** — do not run the standard Q&A answer flow below.
187+
188+
**If no `### Recommended Split`**: Continue to step 4.
189+
190+
4. Update the PO Spec to address the questions (update User Story, Acceptance Criteria, Edge Cases, Out of Scope as needed).
191+
5. Add answers under `### Answers` in the PO Spec block:
181192
```
182193
- Q1 from [Role]: "[question]" → "[answer]"
183194
- Q2 from [Role]: "[question]" → "[answer]"
184195
```
185-
5. Set top-level `status:` back to the asking role:
196+
6. Set top-level `status:` back to the asking role:
186197
- Questions from Architect → `architect`
187198
- Questions from Reviewer → `review`
188-
6. Tell the user which command to run next.
199+
7. Tell the user which command to run next.
189200

190201
### Batch clarification (`handoff-[N].md`)
191202

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nolrm/contextkit",
3-
"version": "0.12.20",
3+
"version": "0.12.21",
44
"description": "ContextKit - Context Engineering for AI Development. Provide rich context to AI through structured MD files with standards, code guides, and documentation. Works with Cursor, Claude, Aider, VS Code Copilot, and more.",
55
"main": "lib/index.js",
66
"bin": {

0 commit comments

Comments
 (0)