Context
Proposals create alignment before code is written. Cheaper to change a doc than refactor code. Use this pattern when:
- Architecture shifts invalidate existing assumptions
- Product direction changes require new foundation
- Multiple waves/milestones will be affected by a decision
- External dependencies (Copilot CLI, SDK APIs) change
Patterns
Proposal Structure (docs/proposals/)
Required sections:
- Problem Statement — Why current state is broken (specific, measurable evidence)
- Proposed Architecture — Solution with technical specifics (not hand-waving)
- What Changes — Impact on existing work (waves, milestones, modules)
- What Stays the Same — Preserve existing functionality (no regression)
- Key Decisions Needed — Explicit choices with recommendations
- Risks and Mitigations — Likelihood + impact + mitigation strategy
- Scope — What's in v1, what's deferred (timeline clarity)
Optional sections:
- Implementation Plan (high-level milestones)
- Success Criteria (measurable outcomes)
- Open Questions (unresolved items)
- Appendix (prior art, alternatives considered)
Tone Ceiling Enforcement
Always:
- Cite specific evidence (user reports, performance data, failure modes)
- Justify recommendations with technical rationale
- Acknowledge trade-offs (no perfect solutions)
- Be specific about APIs, libraries, file paths
Never:
- Hype ("revolutionary", "game-changing")
- Hand-waving ("we'll figure it out later")
- Unsubstantiated claims ("users will love this")
- Vague timelines ("soon", "eventually")
Wave Restructuring Pattern
When a proposal invalidates existing wave structure:
- Acknowledge the shift: "This becomes Wave 0 (Foundation)"
- Cascade impacts: Adjust downstream waves (Wave 1, Wave 2, Wave 3)
- Preserve non-blocking work: Identify what can proceed in parallel
- Update dependencies: Document new blocking relationships
Example (Interactive Shell):
- Wave 0 (NEW): Interactive Shell — blocks all other waves
- Wave 1 (ADJUSTED): npm Distribution — shell bundled in cli.js
- Wave 2 (DEFERRED): SquadUI — waits for shell foundation
- Wave 3 (ADJUSTED): Public Docs — now documents shell as primary interface
Decision Framing
Format: "Recommendation: X (recommended) or alternatives?"
Components:
- Recommendation (pick one, justify)
- Alternatives (what else was considered)
- Decision rationale (why recommended option wins)
- Needs sign-off from (which agents/roles must approve)
Example:
### 1. Terminal UI Library: `ink` (recommended) or alternatives?
**Recommendation:** `ink`
**Alternatives:** `blessed`, raw readline
**Decision rationale:** Component model enables testable UI. Battle-tested ecosystem.
**Needs sign-off from:** Brady (product direction), Fortier (runtime performance)
Risk Documentation
Format per risk:
- Risk: Specific failure mode
- Likelihood: Low / Medium / High (not percentages)
- Impact: Low / Medium / High
- Mitigation: Concrete actions (measurable)
Example:
### Risk 2: SDK Streaming Reliability
**Risk:** SDK streaming events might drop messages or arrive out of order.
**Likelihood:** Low (SDK is production-grade).
**Impact:** High — broken streaming makes shell unusable.
**Mitigation:**
- Add integration test: Send 1000-message stream, verify all deltas arrive in order
- Implement fallback: If streaming fails, fall back to polling session state
- Log all SDK events to `.squad/orchestration-log/sdk-events.jsonl` for debugging
Examples
File references from interactive shell proposal:
- Full proposal:
docs/proposals/squad-interactive-shell.md
- User directive:
.squad/decisions/inbox/copilot-directive-2026-02-21T202535Z.md
- Team decisions:
.squad/decisions.md
- Current architecture:
docs/architecture/module-map.md, docs/prd-23-release-readiness.md
Key patterns demonstrated:
- Read user directive first (understand the "why")
- Survey current architecture (module map, existing waves)
- Research SDK APIs (exploration task to validate feasibility)
- Document problem with specific evidence (unreliable handoffs, zero visibility, UX mismatch)
- Propose solution with technical specifics (ink components, SDK session management, spawn.ts module)
- Restructure waves when foundation shifts (Wave 0 becomes blocker)
- Preserve backward compatibility (squad.agent.md still works, VS Code mode unchanged)
- Frame decisions explicitly (5 key decisions with recommendations)
- Document risks with mitigations (5 risks, each with concrete actions)
- Define scope (what's in v1 vs. deferred)
Anti-Patterns
Avoid:
- ❌ Proposals without problem statements (solution-first thinking)
- ❌ Vague architecture ("we'll use a shell") — be specific (ink components, session registry, spawn.ts)
- ❌ Ignoring existing work — always document impact on waves/milestones
- ❌ No risk analysis — every architecture has risks, document them
- ❌ Unbounded scope — draw the v1 line explicitly
- ❌ Missing decision ownership — always say "needs sign-off from X"
- ❌ No backward compatibility plan — users don't care about your replatform
- ❌ Hand-waving timelines ("a few weeks") — be specific (2-3 weeks, 1 engineer full-time)
Red flags in proposal reviews:
- "Users will love this" (citation needed)
- "We'll figure out X later" (scope creep incoming)
- "This is revolutionary" (tone ceiling violation)
- No section on "What Stays the Same" (regression risk)
- No risks documented (wishful thinking)
1---2name: architectural-proposals3description: How to write comprehensive architectural proposals that drive alignment before code is written4---5
6## Context
7
8Proposals create alignment before code is written. Cheaper to change a doc than refactor code. Use this pattern when:
9- Architecture shifts invalidate existing assumptions
10- Product direction changes require new foundation
11- Multiple waves/milestones will be affected by a decision
12- External dependencies (Copilot CLI, SDK APIs) change
13
14## Patterns
15
16### Proposal Structure (docs/proposals/)
17
18**Required sections:**
191. **Problem Statement** — Why current state is broken (specific, measurable evidence)
202. **Proposed Architecture** — Solution with technical specifics (not hand-waving)
213. **What Changes** — Impact on existing work (waves, milestones, modules)
224. **What Stays the Same** — Preserve existing functionality (no regression)
235. **Key Decisions Needed** — Explicit choices with recommendations
246. **Risks and Mitigations** — Likelihood + impact + mitigation strategy
257. **Scope** — What's in v1, what's deferred (timeline clarity)
26
27**Optional sections:**
28- Implementation Plan (high-level milestones)
29- Success Criteria (measurable outcomes)
30- Open Questions (unresolved items)
31- Appendix (prior art, alternatives considered)
32
33### Tone Ceiling Enforcement
34
35**Always:**
36- Cite specific evidence (user reports, performance data, failure modes)
37- Justify recommendations with technical rationale
38- Acknowledge trade-offs (no perfect solutions)
39- Be specific about APIs, libraries, file paths
40
41**Never:**
42- Hype ("revolutionary", "game-changing")
43- Hand-waving ("we'll figure it out later")
44- Unsubstantiated claims ("users will love this")
45- Vague timelines ("soon", "eventually")
46
47### Wave Restructuring Pattern
48
49When a proposal invalidates existing wave structure:
501. **Acknowledge the shift:** "This becomes Wave 0 (Foundation)"
512. **Cascade impacts:** Adjust downstream waves (Wave 1, Wave 2, Wave 3)
523. **Preserve non-blocking work:** Identify what can proceed in parallel
534. **Update dependencies:** Document new blocking relationships
54
55**Example (Interactive Shell):**
56- Wave 0 (NEW): Interactive Shell — blocks all other waves
57- Wave 1 (ADJUSTED): npm Distribution — shell bundled in cli.js
58- Wave 2 (DEFERRED): SquadUI — waits for shell foundation
59- Wave 3 (ADJUSTED): Public Docs — now documents shell as primary interface
60
61### Decision Framing
62
63**Format:** "Recommendation: X (recommended) or alternatives?"
64
65**Components:**
66- Recommendation (pick one, justify)
67- Alternatives (what else was considered)
68- Decision rationale (why recommended option wins)
69- Needs sign-off from (which agents/roles must approve)
70
71**Example:**
72```
73### 1. Terminal UI Library: `ink` (recommended) or alternatives?
74
75**Recommendation:** `ink`
76**Alternatives:** `blessed`, raw readline
77**Decision rationale:** Component model enables testable UI. Battle-tested ecosystem.
78
79**Needs sign-off from:** Brady (product direction), Fortier (runtime performance)
80```
81
82### Risk Documentation
83
84**Format per risk:**
85- **Risk:** Specific failure mode
86- **Likelihood:** Low / Medium / High (not percentages)
87- **Impact:** Low / Medium / High
88- **Mitigation:** Concrete actions (measurable)
89
90**Example:**
91```
92### Risk 2: SDK Streaming Reliability
93
94**Risk:** SDK streaming events might drop messages or arrive out of order.
95**Likelihood:** Low (SDK is production-grade).
96**Impact:** High — broken streaming makes shell unusable.
97
98**Mitigation:**
99- Add integration test: Send 1000-message stream, verify all deltas arrive in order
100- Implement fallback: If streaming fails, fall back to polling session state
101- Log all SDK events to `.squad/orchestration-log/sdk-events.jsonl` for debugging
102```
103
104## Examples
105
106**File references from interactive shell proposal:**
107- Full proposal: `docs/proposals/squad-interactive-shell.md`
108- User directive: `.squad/decisions/inbox/copilot-directive-2026-02-21T202535Z.md`
109- Team decisions: `.squad/decisions.md`
110- Current architecture: `docs/architecture/module-map.md`, `docs/prd-23-release-readiness.md`
111
112**Key patterns demonstrated:**
1131. Read user directive first (understand the "why")
1142. Survey current architecture (module map, existing waves)
1153. Research SDK APIs (exploration task to validate feasibility)
1164. Document problem with specific evidence (unreliable handoffs, zero visibility, UX mismatch)
1175. Propose solution with technical specifics (ink components, SDK session management, spawn.ts module)
1186. Restructure waves when foundation shifts (Wave 0 becomes blocker)
1197. Preserve backward compatibility (squad.agent.md still works, VS Code mode unchanged)
1208. Frame decisions explicitly (5 key decisions with recommendations)
1219. Document risks with mitigations (5 risks, each with concrete actions)
12210. Define scope (what's in v1 vs. deferred)
123
124## Anti-Patterns
125
126**Avoid:**
127- ❌ Proposals without problem statements (solution-first thinking)
128- ❌ Vague architecture ("we'll use a shell") — be specific (ink components, session registry, spawn.ts)
129- ❌ Ignoring existing work — always document impact on waves/milestones
130- ❌ No risk analysis — every architecture has risks, document them
131- ❌ Unbounded scope — draw the v1 line explicitly
132- ❌ Missing decision ownership — always say "needs sign-off from X"
133- ❌ No backward compatibility plan — users don't care about your replatform
134- ❌ Hand-waving timelines ("a few weeks") — be specific (2-3 weeks, 1 engineer full-time)
135
136**Red flags in proposal reviews:**
137- "Users will love this" (citation needed)
138- "We'll figure out X later" (scope creep incoming)
139- "This is revolutionary" (tone ceiling violation)
140- No section on "What Stays the Same" (regression risk)
141- No risks documented (wishful thinking)