@bradygaster/squad-sdk 0.9.0 → 0.9.1

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 (76) hide show
  1. package/README.md +296 -296
  2. package/dist/agents/history-shadow.js +30 -30
  3. package/dist/build/github-dist.js +42 -42
  4. package/dist/config/init.js +173 -173
  5. package/dist/sharing/consult.js +78 -78
  6. package/package.json +1 -1
  7. package/templates/casting/Futurama.json +9 -9
  8. package/templates/casting-history.json +4 -4
  9. package/templates/casting-policy.json +37 -37
  10. package/templates/casting-reference.md +104 -104
  11. package/templates/casting-registry.json +3 -3
  12. package/templates/ceremonies.md +41 -41
  13. package/templates/charter.md +53 -53
  14. package/templates/constraint-tracking.md +38 -38
  15. package/templates/cooperative-rate-limiting.md +229 -229
  16. package/templates/copilot-instructions.md +46 -46
  17. package/templates/history.md +10 -10
  18. package/templates/identity/now.md +9 -9
  19. package/templates/identity/wisdom.md +15 -15
  20. package/templates/issue-lifecycle.md +412 -412
  21. package/templates/keda-scaler.md +164 -164
  22. package/templates/machine-capabilities.md +74 -74
  23. package/templates/mcp-config.md +90 -90
  24. package/templates/multi-agent-format.md +28 -28
  25. package/templates/plugin-marketplace.md +49 -49
  26. package/templates/ralph-circuit-breaker.md +313 -313
  27. package/templates/raw-agent-output.md +37 -37
  28. package/templates/roster.md +60 -60
  29. package/templates/routing.md +39 -39
  30. package/templates/run-output.md +50 -50
  31. package/templates/schedule.json +19 -19
  32. package/templates/scribe-charter.md +119 -119
  33. package/templates/skill.md +24 -24
  34. package/templates/skills/agent-collaboration/SKILL.md +42 -42
  35. package/templates/skills/agent-conduct/SKILL.md +24 -24
  36. package/templates/skills/architectural-proposals/SKILL.md +151 -151
  37. package/templates/skills/ci-validation-gates/SKILL.md +84 -84
  38. package/templates/skills/cli-wiring/SKILL.md +47 -47
  39. package/templates/skills/client-compatibility/SKILL.md +89 -89
  40. package/templates/skills/cross-squad/SKILL.md +114 -114
  41. package/templates/skills/distributed-mesh/SKILL.md +287 -287
  42. package/templates/skills/distributed-mesh/mesh.json.example +30 -30
  43. package/templates/skills/distributed-mesh/sync-mesh.ps1 +111 -111
  44. package/templates/skills/distributed-mesh/sync-mesh.sh +104 -104
  45. package/templates/skills/docs-standards/SKILL.md +71 -71
  46. package/templates/skills/economy-mode/SKILL.md +114 -114
  47. package/templates/skills/external-comms/SKILL.md +329 -329
  48. package/templates/skills/gh-auth-isolation/SKILL.md +183 -183
  49. package/templates/skills/git-workflow/SKILL.md +204 -204
  50. package/templates/skills/github-multi-account/SKILL.md +95 -95
  51. package/templates/skills/history-hygiene/SKILL.md +36 -36
  52. package/templates/skills/humanizer/SKILL.md +105 -105
  53. package/templates/skills/init-mode/SKILL.md +102 -102
  54. package/templates/skills/model-selection/SKILL.md +117 -117
  55. package/templates/skills/nap/SKILL.md +24 -24
  56. package/templates/skills/personal-squad/SKILL.md +57 -57
  57. package/templates/skills/project-conventions/SKILL.md +56 -56
  58. package/templates/skills/release-process/SKILL.md +423 -423
  59. package/templates/skills/reskill/SKILL.md +92 -92
  60. package/templates/skills/reviewer-protocol/SKILL.md +79 -79
  61. package/templates/skills/secret-handling/SKILL.md +200 -200
  62. package/templates/skills/session-recovery/SKILL.md +155 -155
  63. package/templates/skills/squad-conventions/SKILL.md +69 -69
  64. package/templates/skills/test-discipline/SKILL.md +37 -37
  65. package/templates/skills/windows-compatibility/SKILL.md +74 -74
  66. package/templates/workflows/squad-ci.yml +24 -24
  67. package/templates/workflows/squad-docs.yml +54 -54
  68. package/templates/workflows/squad-heartbeat.yml +171 -171
  69. package/templates/workflows/squad-insider-release.yml +61 -61
  70. package/templates/workflows/squad-issue-assign.yml +161 -161
  71. package/templates/workflows/squad-label-enforce.yml +181 -181
  72. package/templates/workflows/squad-preview.yml +55 -55
  73. package/templates/workflows/squad-promote.yml +120 -120
  74. package/templates/workflows/squad-release.yml +77 -77
  75. package/templates/workflows/squad-triage.yml +260 -260
  76. package/templates/workflows/sync-squad-labels.yml +169 -169
@@ -1,24 +1,24 @@
1
- ---
2
- name: "{skill-name}"
3
- description: "{what this skill teaches agents}"
4
- domain: "{e.g., testing, api-design, error-handling}"
5
- confidence: "low|medium|high"
6
- source: "{how this was learned: manual, observed, earned}"
7
- tools:
8
- # Optional — declare MCP tools relevant to this skill's patterns
9
- # - name: "{tool-name}"
10
- # description: "{what this tool does}"
11
- # when: "{when to use this tool}"
12
- ---
13
-
14
- ## Context
15
- {When and why this skill applies}
16
-
17
- ## Patterns
18
- {Specific patterns, conventions, or approaches}
19
-
20
- ## Examples
21
- {Code examples or references}
22
-
23
- ## Anti-Patterns
24
- {What to avoid}
1
+ ---
2
+ name: "{skill-name}"
3
+ description: "{what this skill teaches agents}"
4
+ domain: "{e.g., testing, api-design, error-handling}"
5
+ confidence: "low|medium|high"
6
+ source: "{how this was learned: manual, observed, earned}"
7
+ tools:
8
+ # Optional — declare MCP tools relevant to this skill's patterns
9
+ # - name: "{tool-name}"
10
+ # description: "{what this tool does}"
11
+ # when: "{when to use this tool}"
12
+ ---
13
+
14
+ ## Context
15
+ {When and why this skill applies}
16
+
17
+ ## Patterns
18
+ {Specific patterns, conventions, or approaches}
19
+
20
+ ## Examples
21
+ {Code examples or references}
22
+
23
+ ## Anti-Patterns
24
+ {What to avoid}
@@ -1,42 +1,42 @@
1
- ---
2
- name: "agent-collaboration"
3
- description: "Standard collaboration patterns for all squad agents — worktree awareness, decisions, cross-agent communication"
4
- domain: "team-workflow"
5
- confidence: "high"
6
- source: "extracted from charter boilerplate — identical content in 18+ agent charters"
7
- ---
8
-
9
- ## Context
10
-
11
- Every agent on the team follows identical collaboration patterns for worktree awareness, decision recording, and cross-agent communication. These were previously duplicated in every charter's Collaboration section (~300 bytes × 18 agents = ~5.4KB of redundant context). Now centralized here.
12
-
13
- The coordinator's spawn prompt already instructs agents to read decisions.md and their history.md. This skill adds the patterns for WRITING decisions and requesting help.
14
-
15
- ## Patterns
16
-
17
- ### Worktree Awareness
18
- Use the `TEAM ROOT` path provided in your spawn prompt. All `.squad/` paths are relative to this root. If TEAM ROOT is not provided (rare), run `git rev-parse --show-toplevel` as fallback. Never assume CWD is the repo root.
19
-
20
- ### Decision Recording
21
- After making a decision that affects other team members, write it to:
22
- `.squad/decisions/inbox/{your-name}-{brief-slug}.md`
23
-
24
- Format:
25
- ```
26
- ### {date}: {decision title}
27
- **By:** {Your Name}
28
- **What:** {the decision}
29
- **Why:** {rationale}
30
- ```
31
-
32
- ### Cross-Agent Communication
33
- If you need another team member's input, say so in your response. The coordinator will bring them in. Don't try to do work outside your domain.
34
-
35
- ### Reviewer Protocol
36
- If you have reviewer authority and reject work: the original author is locked out from revising that artifact. A different agent must own the revision. State who should revise in your rejection response.
37
-
38
- ## Anti-Patterns
39
- - Don't read all agent charters — you only need your own context + decisions.md
40
- - Don't write directly to `.squad/decisions.md` — always use the inbox drop-box
41
- - Don't modify other agents' history.md files — that's Scribe's job
42
- - Don't assume CWD is the repo root — always use TEAM ROOT
1
+ ---
2
+ name: "agent-collaboration"
3
+ description: "Standard collaboration patterns for all squad agents — worktree awareness, decisions, cross-agent communication"
4
+ domain: "team-workflow"
5
+ confidence: "high"
6
+ source: "extracted from charter boilerplate — identical content in 18+ agent charters"
7
+ ---
8
+
9
+ ## Context
10
+
11
+ Every agent on the team follows identical collaboration patterns for worktree awareness, decision recording, and cross-agent communication. These were previously duplicated in every charter's Collaboration section (~300 bytes × 18 agents = ~5.4KB of redundant context). Now centralized here.
12
+
13
+ The coordinator's spawn prompt already instructs agents to read decisions.md and their history.md. This skill adds the patterns for WRITING decisions and requesting help.
14
+
15
+ ## Patterns
16
+
17
+ ### Worktree Awareness
18
+ Use the `TEAM ROOT` path provided in your spawn prompt. All `.squad/` paths are relative to this root. If TEAM ROOT is not provided (rare), run `git rev-parse --show-toplevel` as fallback. Never assume CWD is the repo root.
19
+
20
+ ### Decision Recording
21
+ After making a decision that affects other team members, write it to:
22
+ `.squad/decisions/inbox/{your-name}-{brief-slug}.md`
23
+
24
+ Format:
25
+ ```
26
+ ### {date}: {decision title}
27
+ **By:** {Your Name}
28
+ **What:** {the decision}
29
+ **Why:** {rationale}
30
+ ```
31
+
32
+ ### Cross-Agent Communication
33
+ If you need another team member's input, say so in your response. The coordinator will bring them in. Don't try to do work outside your domain.
34
+
35
+ ### Reviewer Protocol
36
+ If you have reviewer authority and reject work: the original author is locked out from revising that artifact. A different agent must own the revision. State who should revise in your rejection response.
37
+
38
+ ## Anti-Patterns
39
+ - Don't read all agent charters — you only need your own context + decisions.md
40
+ - Don't write directly to `.squad/decisions.md` — always use the inbox drop-box
41
+ - Don't modify other agents' history.md files — that's Scribe's job
42
+ - Don't assume CWD is the repo root — always use TEAM ROOT
@@ -1,24 +1,24 @@
1
- ---
2
- name: "agent-conduct"
3
- description: "Shared hard rules enforced across all squad agents"
4
- domain: "team-governance"
5
- confidence: "high"
6
- source: "reskill extraction — Product Isolation Rule and Peer Quality Check appeared in all 20 agent charters"
7
- ---
8
-
9
- ## Context
10
-
11
- Every squad agent must follow these two hard rules. They were previously duplicated in every charter. Now they live here as a shared skill, loaded once.
12
-
13
- ## Patterns
14
-
15
- ### Product Isolation Rule (hard rule)
16
- Tests, CI workflows, and product code must NEVER depend on specific agent names from any particular squad. "Our squad" must not impact "the squad." No hardcoded references to agent names (Flight, EECOM, FIDO, etc.) in test assertions, CI configs, or product logic. Use generic/parameterized values. If a test needs agent names, use obviously-fake test fixtures (e.g., "test-agent-1", "TestBot").
17
-
18
- ### Peer Quality Check (hard rule)
19
- Before finishing work, verify your changes don't break existing tests. Run the test suite for files you touched. If CI has been failing, check your changes aren't contributing to the problem. When you learn from mistakes, update your history.md.
20
-
21
- ## Anti-Patterns
22
- - Don't hardcode dev team agent names in product code or tests
23
- - Don't skip test verification before declaring work done
24
- - Don't ignore pre-existing CI failures that your changes may worsen
1
+ ---
2
+ name: "agent-conduct"
3
+ description: "Shared hard rules enforced across all squad agents"
4
+ domain: "team-governance"
5
+ confidence: "high"
6
+ source: "reskill extraction — Product Isolation Rule and Peer Quality Check appeared in all 20 agent charters"
7
+ ---
8
+
9
+ ## Context
10
+
11
+ Every squad agent must follow these two hard rules. They were previously duplicated in every charter. Now they live here as a shared skill, loaded once.
12
+
13
+ ## Patterns
14
+
15
+ ### Product Isolation Rule (hard rule)
16
+ Tests, CI workflows, and product code must NEVER depend on specific agent names from any particular squad. "Our squad" must not impact "the squad." No hardcoded references to agent names (Flight, EECOM, FIDO, etc.) in test assertions, CI configs, or product logic. Use generic/parameterized values. If a test needs agent names, use obviously-fake test fixtures (e.g., "test-agent-1", "TestBot").
17
+
18
+ ### Peer Quality Check (hard rule)
19
+ Before finishing work, verify your changes don't break existing tests. Run the test suite for files you touched. If CI has been failing, check your changes aren't contributing to the problem. When you learn from mistakes, update your history.md.
20
+
21
+ ## Anti-Patterns
22
+ - Don't hardcode dev team agent names in product code or tests
23
+ - Don't skip test verification before declaring work done
24
+ - Don't ignore pre-existing CI failures that your changes may worsen
@@ -1,151 +1,151 @@
1
- ---
2
- name: "architectural-proposals"
3
- description: "How to write comprehensive architectural proposals that drive alignment before code is written"
4
- domain: "architecture, product-direction"
5
- confidence: "high"
6
- source: "earned (2026-02-21 interactive shell proposal)"
7
- tools:
8
- - name: "view"
9
- description: "Read existing codebase, prior decisions, and team context before proposing changes"
10
- when: "Always read .squad/decisions.md, relevant PRDs, and current architecture docs before writing proposal"
11
- - name: "create"
12
- description: "Create proposal in docs/proposals/ with structured format"
13
- when: "After gathering context, before any implementation work begins"
14
- ---
15
-
16
- ## Context
17
-
18
- Proposals create alignment before code is written. Cheaper to change a doc than refactor code. Use this pattern when:
19
- - Architecture shifts invalidate existing assumptions
20
- - Product direction changes require new foundation
21
- - Multiple waves/milestones will be affected by a decision
22
- - External dependencies (Copilot CLI, SDK APIs) change
23
-
24
- ## Patterns
25
-
26
- ### Proposal Structure (docs/proposals/)
27
-
28
- **Required sections:**
29
- 1. **Problem Statement** — Why current state is broken (specific, measurable evidence)
30
- 2. **Proposed Architecture** — Solution with technical specifics (not hand-waving)
31
- 3. **What Changes** — Impact on existing work (waves, milestones, modules)
32
- 4. **What Stays the Same** — Preserve existing functionality (no regression)
33
- 5. **Key Decisions Needed** — Explicit choices with recommendations
34
- 6. **Risks and Mitigations** — Likelihood + impact + mitigation strategy
35
- 7. **Scope** — What's in v1, what's deferred (timeline clarity)
36
-
37
- **Optional sections:**
38
- - Implementation Plan (high-level milestones)
39
- - Success Criteria (measurable outcomes)
40
- - Open Questions (unresolved items)
41
- - Appendix (prior art, alternatives considered)
42
-
43
- ### Tone Ceiling Enforcement
44
-
45
- **Always:**
46
- - Cite specific evidence (user reports, performance data, failure modes)
47
- - Justify recommendations with technical rationale
48
- - Acknowledge trade-offs (no perfect solutions)
49
- - Be specific about APIs, libraries, file paths
50
-
51
- **Never:**
52
- - Hype ("revolutionary", "game-changing")
53
- - Hand-waving ("we'll figure it out later")
54
- - Unsubstantiated claims ("users will love this")
55
- - Vague timelines ("soon", "eventually")
56
-
57
- ### Wave Restructuring Pattern
58
-
59
- When a proposal invalidates existing wave structure:
60
- 1. **Acknowledge the shift:** "This becomes Wave 0 (Foundation)"
61
- 2. **Cascade impacts:** Adjust downstream waves (Wave 1, Wave 2, Wave 3)
62
- 3. **Preserve non-blocking work:** Identify what can proceed in parallel
63
- 4. **Update dependencies:** Document new blocking relationships
64
-
65
- **Example (Interactive Shell):**
66
- - Wave 0 (NEW): Interactive Shell — blocks all other waves
67
- - Wave 1 (ADJUSTED): npm Distribution — shell bundled in cli.js
68
- - Wave 2 (DEFERRED): SquadUI — waits for shell foundation
69
- - Wave 3 (ADJUSTED): Public Docs — now documents shell as primary interface
70
-
71
- ### Decision Framing
72
-
73
- **Format:** "Recommendation: X (recommended) or alternatives?"
74
-
75
- **Components:**
76
- - Recommendation (pick one, justify)
77
- - Alternatives (what else was considered)
78
- - Decision rationale (why recommended option wins)
79
- - Needs sign-off from (which agents/roles must approve)
80
-
81
- **Example:**
82
- ```
83
- ### 1. Terminal UI Library: `ink` (recommended) or alternatives?
84
-
85
- **Recommendation:** `ink`
86
- **Alternatives:** `blessed`, raw readline
87
- **Decision rationale:** Component model enables testable UI. Battle-tested ecosystem.
88
-
89
- **Needs sign-off from:** Brady (product direction), Fortier (runtime performance)
90
- ```
91
-
92
- ### Risk Documentation
93
-
94
- **Format per risk:**
95
- - **Risk:** Specific failure mode
96
- - **Likelihood:** Low / Medium / High (not percentages)
97
- - **Impact:** Low / Medium / High
98
- - **Mitigation:** Concrete actions (measurable)
99
-
100
- **Example:**
101
- ```
102
- ### Risk 2: SDK Streaming Reliability
103
-
104
- **Risk:** SDK streaming events might drop messages or arrive out of order.
105
- **Likelihood:** Low (SDK is production-grade).
106
- **Impact:** High — broken streaming makes shell unusable.
107
-
108
- **Mitigation:**
109
- - Add integration test: Send 1000-message stream, verify all deltas arrive in order
110
- - Implement fallback: If streaming fails, fall back to polling session state
111
- - Log all SDK events to `.squad/orchestration-log/sdk-events.jsonl` for debugging
112
- ```
113
-
114
- ## Examples
115
-
116
- **File references from interactive shell proposal:**
117
- - Full proposal: `docs/proposals/squad-interactive-shell.md`
118
- - User directive: `.squad/decisions/inbox/copilot-directive-2026-02-21T202535Z.md`
119
- - Team decisions: `.squad/decisions.md`
120
- - Current architecture: `docs/architecture/module-map.md`, `docs/prd-23-release-readiness.md`
121
-
122
- **Key patterns demonstrated:**
123
- 1. Read user directive first (understand the "why")
124
- 2. Survey current architecture (module map, existing waves)
125
- 3. Research SDK APIs (exploration task to validate feasibility)
126
- 4. Document problem with specific evidence (unreliable handoffs, zero visibility, UX mismatch)
127
- 5. Propose solution with technical specifics (ink components, SDK session management, spawn.ts module)
128
- 6. Restructure waves when foundation shifts (Wave 0 becomes blocker)
129
- 7. Preserve backward compatibility (squad.agent.md still works, VS Code mode unchanged)
130
- 8. Frame decisions explicitly (5 key decisions with recommendations)
131
- 9. Document risks with mitigations (5 risks, each with concrete actions)
132
- 10. Define scope (what's in v1 vs. deferred)
133
-
134
- ## Anti-Patterns
135
-
136
- **Avoid:**
137
- - ❌ Proposals without problem statements (solution-first thinking)
138
- - ❌ Vague architecture ("we'll use a shell") — be specific (ink components, session registry, spawn.ts)
139
- - ❌ Ignoring existing work — always document impact on waves/milestones
140
- - ❌ No risk analysis — every architecture has risks, document them
141
- - ❌ Unbounded scope — draw the v1 line explicitly
142
- - ❌ Missing decision ownership — always say "needs sign-off from X"
143
- - ❌ No backward compatibility plan — users don't care about your replatform
144
- - ❌ Hand-waving timelines ("a few weeks") — be specific (2-3 weeks, 1 engineer full-time)
145
-
146
- **Red flags in proposal reviews:**
147
- - "Users will love this" (citation needed)
148
- - "We'll figure out X later" (scope creep incoming)
149
- - "This is revolutionary" (tone ceiling violation)
150
- - No section on "What Stays the Same" (regression risk)
151
- - No risks documented (wishful thinking)
1
+ ---
2
+ name: "architectural-proposals"
3
+ description: "How to write comprehensive architectural proposals that drive alignment before code is written"
4
+ domain: "architecture, product-direction"
5
+ confidence: "high"
6
+ source: "earned (2026-02-21 interactive shell proposal)"
7
+ tools:
8
+ - name: "view"
9
+ description: "Read existing codebase, prior decisions, and team context before proposing changes"
10
+ when: "Always read .squad/decisions.md, relevant PRDs, and current architecture docs before writing proposal"
11
+ - name: "create"
12
+ description: "Create proposal in docs/proposals/ with structured format"
13
+ when: "After gathering context, before any implementation work begins"
14
+ ---
15
+
16
+ ## Context
17
+
18
+ Proposals create alignment before code is written. Cheaper to change a doc than refactor code. Use this pattern when:
19
+ - Architecture shifts invalidate existing assumptions
20
+ - Product direction changes require new foundation
21
+ - Multiple waves/milestones will be affected by a decision
22
+ - External dependencies (Copilot CLI, SDK APIs) change
23
+
24
+ ## Patterns
25
+
26
+ ### Proposal Structure (docs/proposals/)
27
+
28
+ **Required sections:**
29
+ 1. **Problem Statement** — Why current state is broken (specific, measurable evidence)
30
+ 2. **Proposed Architecture** — Solution with technical specifics (not hand-waving)
31
+ 3. **What Changes** — Impact on existing work (waves, milestones, modules)
32
+ 4. **What Stays the Same** — Preserve existing functionality (no regression)
33
+ 5. **Key Decisions Needed** — Explicit choices with recommendations
34
+ 6. **Risks and Mitigations** — Likelihood + impact + mitigation strategy
35
+ 7. **Scope** — What's in v1, what's deferred (timeline clarity)
36
+
37
+ **Optional sections:**
38
+ - Implementation Plan (high-level milestones)
39
+ - Success Criteria (measurable outcomes)
40
+ - Open Questions (unresolved items)
41
+ - Appendix (prior art, alternatives considered)
42
+
43
+ ### Tone Ceiling Enforcement
44
+
45
+ **Always:**
46
+ - Cite specific evidence (user reports, performance data, failure modes)
47
+ - Justify recommendations with technical rationale
48
+ - Acknowledge trade-offs (no perfect solutions)
49
+ - Be specific about APIs, libraries, file paths
50
+
51
+ **Never:**
52
+ - Hype ("revolutionary", "game-changing")
53
+ - Hand-waving ("we'll figure it out later")
54
+ - Unsubstantiated claims ("users will love this")
55
+ - Vague timelines ("soon", "eventually")
56
+
57
+ ### Wave Restructuring Pattern
58
+
59
+ When a proposal invalidates existing wave structure:
60
+ 1. **Acknowledge the shift:** "This becomes Wave 0 (Foundation)"
61
+ 2. **Cascade impacts:** Adjust downstream waves (Wave 1, Wave 2, Wave 3)
62
+ 3. **Preserve non-blocking work:** Identify what can proceed in parallel
63
+ 4. **Update dependencies:** Document new blocking relationships
64
+
65
+ **Example (Interactive Shell):**
66
+ - Wave 0 (NEW): Interactive Shell — blocks all other waves
67
+ - Wave 1 (ADJUSTED): npm Distribution — shell bundled in cli.js
68
+ - Wave 2 (DEFERRED): SquadUI — waits for shell foundation
69
+ - Wave 3 (ADJUSTED): Public Docs — now documents shell as primary interface
70
+
71
+ ### Decision Framing
72
+
73
+ **Format:** "Recommendation: X (recommended) or alternatives?"
74
+
75
+ **Components:**
76
+ - Recommendation (pick one, justify)
77
+ - Alternatives (what else was considered)
78
+ - Decision rationale (why recommended option wins)
79
+ - Needs sign-off from (which agents/roles must approve)
80
+
81
+ **Example:**
82
+ ```
83
+ ### 1. Terminal UI Library: `ink` (recommended) or alternatives?
84
+
85
+ **Recommendation:** `ink`
86
+ **Alternatives:** `blessed`, raw readline
87
+ **Decision rationale:** Component model enables testable UI. Battle-tested ecosystem.
88
+
89
+ **Needs sign-off from:** Brady (product direction), Fortier (runtime performance)
90
+ ```
91
+
92
+ ### Risk Documentation
93
+
94
+ **Format per risk:**
95
+ - **Risk:** Specific failure mode
96
+ - **Likelihood:** Low / Medium / High (not percentages)
97
+ - **Impact:** Low / Medium / High
98
+ - **Mitigation:** Concrete actions (measurable)
99
+
100
+ **Example:**
101
+ ```
102
+ ### Risk 2: SDK Streaming Reliability
103
+
104
+ **Risk:** SDK streaming events might drop messages or arrive out of order.
105
+ **Likelihood:** Low (SDK is production-grade).
106
+ **Impact:** High — broken streaming makes shell unusable.
107
+
108
+ **Mitigation:**
109
+ - Add integration test: Send 1000-message stream, verify all deltas arrive in order
110
+ - Implement fallback: If streaming fails, fall back to polling session state
111
+ - Log all SDK events to `.squad/orchestration-log/sdk-events.jsonl` for debugging
112
+ ```
113
+
114
+ ## Examples
115
+
116
+ **File references from interactive shell proposal:**
117
+ - Full proposal: `docs/proposals/squad-interactive-shell.md`
118
+ - User directive: `.squad/decisions/inbox/copilot-directive-2026-02-21T202535Z.md`
119
+ - Team decisions: `.squad/decisions.md`
120
+ - Current architecture: `docs/architecture/module-map.md`, `docs/prd-23-release-readiness.md`
121
+
122
+ **Key patterns demonstrated:**
123
+ 1. Read user directive first (understand the "why")
124
+ 2. Survey current architecture (module map, existing waves)
125
+ 3. Research SDK APIs (exploration task to validate feasibility)
126
+ 4. Document problem with specific evidence (unreliable handoffs, zero visibility, UX mismatch)
127
+ 5. Propose solution with technical specifics (ink components, SDK session management, spawn.ts module)
128
+ 6. Restructure waves when foundation shifts (Wave 0 becomes blocker)
129
+ 7. Preserve backward compatibility (squad.agent.md still works, VS Code mode unchanged)
130
+ 8. Frame decisions explicitly (5 key decisions with recommendations)
131
+ 9. Document risks with mitigations (5 risks, each with concrete actions)
132
+ 10. Define scope (what's in v1 vs. deferred)
133
+
134
+ ## Anti-Patterns
135
+
136
+ **Avoid:**
137
+ - ❌ Proposals without problem statements (solution-first thinking)
138
+ - ❌ Vague architecture ("we'll use a shell") — be specific (ink components, session registry, spawn.ts)
139
+ - ❌ Ignoring existing work — always document impact on waves/milestones
140
+ - ❌ No risk analysis — every architecture has risks, document them
141
+ - ❌ Unbounded scope — draw the v1 line explicitly
142
+ - ❌ Missing decision ownership — always say "needs sign-off from X"
143
+ - ❌ No backward compatibility plan — users don't care about your replatform
144
+ - ❌ Hand-waving timelines ("a few weeks") — be specific (2-3 weeks, 1 engineer full-time)
145
+
146
+ **Red flags in proposal reviews:**
147
+ - "Users will love this" (citation needed)
148
+ - "We'll figure out X later" (scope creep incoming)
149
+ - "This is revolutionary" (tone ceiling violation)
150
+ - No section on "What Stays the Same" (regression risk)
151
+ - No risks documented (wishful thinking)