@qball-inc/the-bulwark 1.0.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.
Files changed (175) hide show
  1. package/.claude-plugin/plugin.json +43 -0
  2. package/agents/bulwark-fix-validator.md +633 -0
  3. package/agents/bulwark-implementer.md +391 -0
  4. package/agents/bulwark-issue-analyzer.md +308 -0
  5. package/agents/bulwark-standards-reviewer.md +221 -0
  6. package/agents/plan-creation-architect.md +323 -0
  7. package/agents/plan-creation-eng-lead.md +352 -0
  8. package/agents/plan-creation-po.md +300 -0
  9. package/agents/plan-creation-qa-critic.md +334 -0
  10. package/agents/product-ideation-competitive-analyzer.md +298 -0
  11. package/agents/product-ideation-idea-validator.md +268 -0
  12. package/agents/product-ideation-market-researcher.md +292 -0
  13. package/agents/product-ideation-pattern-documenter.md +308 -0
  14. package/agents/product-ideation-segment-analyzer.md +303 -0
  15. package/agents/product-ideation-strategist.md +259 -0
  16. package/agents/statusline-setup.md +97 -0
  17. package/hooks/hooks.json +59 -0
  18. package/package.json +45 -0
  19. package/scripts/hooks/cleanup-stale.sh +13 -0
  20. package/scripts/hooks/enforce-quality.sh +166 -0
  21. package/scripts/hooks/implementer-quality.sh +256 -0
  22. package/scripts/hooks/inject-protocol.sh +52 -0
  23. package/scripts/hooks/suggest-pipeline.sh +175 -0
  24. package/scripts/hooks/track-pipeline-start.sh +37 -0
  25. package/scripts/hooks/track-pipeline-stop.sh +52 -0
  26. package/scripts/init-rules.sh +35 -0
  27. package/scripts/init.sh +151 -0
  28. package/skills/anthropic-validator/SKILL.md +607 -0
  29. package/skills/anthropic-validator/references/agents-checklist.md +131 -0
  30. package/skills/anthropic-validator/references/commands-checklist.md +102 -0
  31. package/skills/anthropic-validator/references/hooks-checklist.md +151 -0
  32. package/skills/anthropic-validator/references/mcp-checklist.md +136 -0
  33. package/skills/anthropic-validator/references/plugins-checklist.md +148 -0
  34. package/skills/anthropic-validator/references/skills-checklist.md +85 -0
  35. package/skills/assertion-patterns/SKILL.md +296 -0
  36. package/skills/bug-magnet-data/SKILL.md +284 -0
  37. package/skills/bug-magnet-data/context/cli-args.md +91 -0
  38. package/skills/bug-magnet-data/context/db-query.md +104 -0
  39. package/skills/bug-magnet-data/context/file-contents.md +103 -0
  40. package/skills/bug-magnet-data/context/http-body.md +91 -0
  41. package/skills/bug-magnet-data/context/process-spawn.md +123 -0
  42. package/skills/bug-magnet-data/data/booleans/boundaries.yaml +143 -0
  43. package/skills/bug-magnet-data/data/collections/arrays.yaml +114 -0
  44. package/skills/bug-magnet-data/data/collections/objects.yaml +123 -0
  45. package/skills/bug-magnet-data/data/concurrency/race-conditions.yaml +118 -0
  46. package/skills/bug-magnet-data/data/concurrency/state-machines.yaml +115 -0
  47. package/skills/bug-magnet-data/data/dates/boundaries.yaml +137 -0
  48. package/skills/bug-magnet-data/data/dates/invalid.yaml +132 -0
  49. package/skills/bug-magnet-data/data/dates/timezone.yaml +118 -0
  50. package/skills/bug-magnet-data/data/encoding/charset.yaml +79 -0
  51. package/skills/bug-magnet-data/data/encoding/normalization.yaml +105 -0
  52. package/skills/bug-magnet-data/data/formats/email.yaml +154 -0
  53. package/skills/bug-magnet-data/data/formats/json.yaml +187 -0
  54. package/skills/bug-magnet-data/data/formats/url.yaml +165 -0
  55. package/skills/bug-magnet-data/data/language-specific/javascript.yaml +182 -0
  56. package/skills/bug-magnet-data/data/language-specific/python.yaml +174 -0
  57. package/skills/bug-magnet-data/data/language-specific/rust.yaml +148 -0
  58. package/skills/bug-magnet-data/data/numbers/boundaries.yaml +161 -0
  59. package/skills/bug-magnet-data/data/numbers/precision.yaml +89 -0
  60. package/skills/bug-magnet-data/data/numbers/special.yaml +69 -0
  61. package/skills/bug-magnet-data/data/strings/boundaries.yaml +109 -0
  62. package/skills/bug-magnet-data/data/strings/injection.yaml +208 -0
  63. package/skills/bug-magnet-data/data/strings/special-chars.yaml +190 -0
  64. package/skills/bug-magnet-data/data/strings/unicode.yaml +139 -0
  65. package/skills/bug-magnet-data/references/external-lists.md +115 -0
  66. package/skills/bulwark-brainstorm/SKILL.md +563 -0
  67. package/skills/bulwark-brainstorm/references/at-teammate-prompts.md +60 -0
  68. package/skills/bulwark-brainstorm/references/role-critical-analyst.md +78 -0
  69. package/skills/bulwark-brainstorm/references/role-development-lead.md +66 -0
  70. package/skills/bulwark-brainstorm/references/role-product-delivery-lead.md +79 -0
  71. package/skills/bulwark-brainstorm/references/role-product-manager.md +62 -0
  72. package/skills/bulwark-brainstorm/references/role-project-sme.md +59 -0
  73. package/skills/bulwark-brainstorm/references/role-technical-architect.md +66 -0
  74. package/skills/bulwark-research/SKILL.md +298 -0
  75. package/skills/bulwark-research/references/viewpoint-contrarian.md +63 -0
  76. package/skills/bulwark-research/references/viewpoint-direct-investigation.md +62 -0
  77. package/skills/bulwark-research/references/viewpoint-first-principles.md +65 -0
  78. package/skills/bulwark-research/references/viewpoint-practitioner.md +62 -0
  79. package/skills/bulwark-research/references/viewpoint-prior-art.md +66 -0
  80. package/skills/bulwark-scaffold/SKILL.md +330 -0
  81. package/skills/bulwark-statusline/SKILL.md +161 -0
  82. package/skills/bulwark-statusline/scripts/statusline.sh +144 -0
  83. package/skills/bulwark-verify/SKILL.md +519 -0
  84. package/skills/code-review/SKILL.md +428 -0
  85. package/skills/code-review/examples/anti-patterns/linting.ts +181 -0
  86. package/skills/code-review/examples/anti-patterns/security.ts +91 -0
  87. package/skills/code-review/examples/anti-patterns/standards.ts +195 -0
  88. package/skills/code-review/examples/anti-patterns/type-safety.ts +108 -0
  89. package/skills/code-review/examples/recommended/linting.ts +195 -0
  90. package/skills/code-review/examples/recommended/security.ts +154 -0
  91. package/skills/code-review/examples/recommended/standards.ts +231 -0
  92. package/skills/code-review/examples/recommended/type-safety.ts +181 -0
  93. package/skills/code-review/frameworks/angular.md +218 -0
  94. package/skills/code-review/frameworks/django.md +235 -0
  95. package/skills/code-review/frameworks/express.md +207 -0
  96. package/skills/code-review/frameworks/flask.md +298 -0
  97. package/skills/code-review/frameworks/generic.md +146 -0
  98. package/skills/code-review/frameworks/react.md +152 -0
  99. package/skills/code-review/frameworks/vue.md +244 -0
  100. package/skills/code-review/references/linting-patterns.md +221 -0
  101. package/skills/code-review/references/security-patterns.md +125 -0
  102. package/skills/code-review/references/standards-patterns.md +246 -0
  103. package/skills/code-review/references/type-safety-patterns.md +130 -0
  104. package/skills/component-patterns/SKILL.md +131 -0
  105. package/skills/component-patterns/references/pattern-cli-command.md +118 -0
  106. package/skills/component-patterns/references/pattern-database.md +166 -0
  107. package/skills/component-patterns/references/pattern-external-api.md +139 -0
  108. package/skills/component-patterns/references/pattern-file-parser.md +168 -0
  109. package/skills/component-patterns/references/pattern-http-server.md +162 -0
  110. package/skills/component-patterns/references/pattern-process-spawner.md +133 -0
  111. package/skills/continuous-feedback/SKILL.md +327 -0
  112. package/skills/continuous-feedback/references/collect-instructions.md +81 -0
  113. package/skills/continuous-feedback/references/specialize-code-review.md +82 -0
  114. package/skills/continuous-feedback/references/specialize-general.md +98 -0
  115. package/skills/continuous-feedback/references/specialize-test-audit.md +81 -0
  116. package/skills/create-skill/SKILL.md +359 -0
  117. package/skills/create-skill/references/agent-conventions.md +194 -0
  118. package/skills/create-skill/references/agent-template.md +195 -0
  119. package/skills/create-skill/references/content-guidance.md +291 -0
  120. package/skills/create-skill/references/decision-framework.md +124 -0
  121. package/skills/create-skill/references/template-pipeline.md +217 -0
  122. package/skills/create-skill/references/template-reference-heavy.md +111 -0
  123. package/skills/create-skill/references/template-research.md +210 -0
  124. package/skills/create-skill/references/template-script-driven.md +172 -0
  125. package/skills/create-skill/references/template-simple.md +80 -0
  126. package/skills/create-subagent/SKILL.md +353 -0
  127. package/skills/create-subagent/references/agent-conventions.md +268 -0
  128. package/skills/create-subagent/references/content-guidance.md +232 -0
  129. package/skills/create-subagent/references/decision-framework.md +134 -0
  130. package/skills/create-subagent/references/template-single-agent.md +192 -0
  131. package/skills/fix-bug/SKILL.md +241 -0
  132. package/skills/governance-protocol/SKILL.md +116 -0
  133. package/skills/init/SKILL.md +341 -0
  134. package/skills/issue-debugging/SKILL.md +385 -0
  135. package/skills/issue-debugging/references/anti-patterns.md +245 -0
  136. package/skills/issue-debugging/references/debug-report-schema.md +227 -0
  137. package/skills/mock-detection/SKILL.md +511 -0
  138. package/skills/mock-detection/references/false-positive-prevention.md +402 -0
  139. package/skills/mock-detection/references/stub-patterns.md +236 -0
  140. package/skills/pipeline-templates/SKILL.md +215 -0
  141. package/skills/pipeline-templates/references/code-change-workflow.md +277 -0
  142. package/skills/pipeline-templates/references/code-review.md +336 -0
  143. package/skills/pipeline-templates/references/fix-validation.md +421 -0
  144. package/skills/pipeline-templates/references/new-feature.md +335 -0
  145. package/skills/pipeline-templates/references/research-brainstorm.md +161 -0
  146. package/skills/pipeline-templates/references/research-planning.md +257 -0
  147. package/skills/pipeline-templates/references/test-audit.md +389 -0
  148. package/skills/pipeline-templates/references/test-execution-fix.md +238 -0
  149. package/skills/plan-creation/SKILL.md +497 -0
  150. package/skills/product-ideation/SKILL.md +372 -0
  151. package/skills/product-ideation/references/analysis-frameworks.md +161 -0
  152. package/skills/session-handoff/SKILL.md +139 -0
  153. package/skills/session-handoff/references/examples.md +223 -0
  154. package/skills/setup-lsp/SKILL.md +312 -0
  155. package/skills/setup-lsp/references/server-registry.md +85 -0
  156. package/skills/setup-lsp/references/troubleshooting.md +135 -0
  157. package/skills/subagent-output-templating/SKILL.md +415 -0
  158. package/skills/subagent-output-templating/references/examples.md +440 -0
  159. package/skills/subagent-prompting/SKILL.md +364 -0
  160. package/skills/subagent-prompting/references/examples.md +342 -0
  161. package/skills/test-audit/SKILL.md +531 -0
  162. package/skills/test-audit/references/known-limitations.md +41 -0
  163. package/skills/test-audit/references/priority-classification.md +30 -0
  164. package/skills/test-audit/references/prompts/deep-mode-detection.md +83 -0
  165. package/skills/test-audit/references/prompts/synthesis.md +57 -0
  166. package/skills/test-audit/references/rewrite-instructions.md +46 -0
  167. package/skills/test-audit/references/schemas/audit-output.yaml +100 -0
  168. package/skills/test-audit/references/schemas/diagnostic-output.yaml +49 -0
  169. package/skills/test-audit/scripts/data-flow-analyzer.ts +509 -0
  170. package/skills/test-audit/scripts/integration-mock-detector.ts +462 -0
  171. package/skills/test-audit/scripts/package.json +20 -0
  172. package/skills/test-audit/scripts/skip-detector.ts +211 -0
  173. package/skills/test-audit/scripts/verification-counter.ts +295 -0
  174. package/skills/test-classification/SKILL.md +310 -0
  175. package/skills/test-fixture-creation/SKILL.md +295 -0
@@ -0,0 +1,563 @@
1
+ ---
2
+ name: bulwark-brainstorm
3
+ description: "Role-based brainstorming with dual modes: --scoped (sequential Task tool, 5 roles) and --exploratory (Agent Teams peer debate, 4 roles). Use for feasibility assessment and idea validation."
4
+ user-invocable: true
5
+ argument-hint: "<topic, filepath, or directory> [--research <synthesis-file>] [--scoped | --exploratory]"
6
+ skills:
7
+ - subagent-prompting
8
+ ---
9
+
10
+ # Bulwark Brainstorm
11
+
12
+ Role-based brainstorming on a given topic with two execution modes:
13
+
14
+ - **`--scoped`** (default): Sequential Task tool pipeline — Project SME first, 3 role agents in parallel, Critical Analyst last. Best when the problem statement is well understood and you need focused implementation brainstorming.
15
+ - **`--exploratory`**: Agent Teams peer debate — Project SME first, then 3 AT teammates (Product & Delivery Lead, Architect, Critical Analyst) debating collaboratively. Best when validating whether an idea has merit and the problem framing is uncertain.
16
+
17
+ Both modes synthesize into a single brainstorm document with actionable recommendations.
18
+
19
+ **Invocation arguments:** $ARGUMENTS
20
+
21
+ ---
22
+
23
+ ## When to Use This Skill
24
+
25
+ **Load this skill when the user request matches ANY of these patterns:**
26
+
27
+ | Trigger Pattern | Example User Request |
28
+ |-----------------|---------------------|
29
+ | Implementation evaluation | "Should we build X?", "Evaluate this approach" |
30
+ | Feasibility assessment | "Is this feasible?", "How would we implement X?" |
31
+ | Architecture brainstorm | "Design the approach for X", "How should X fit into our system?" |
32
+ | Post-research planning | "We've researched X, now plan the implementation" |
33
+ | Role-based analysis | "Get PM/architect/dev perspectives on X" |
34
+
35
+ **DO NOT use for:**
36
+ - Initial topic research (use `bulwark-research` first)
37
+ - Quick technical questions (ask directly)
38
+ - Code review (use `code-review`)
39
+ - Debugging (use `issue-debugging`)
40
+
41
+ ---
42
+
43
+ ## Dependencies
44
+
45
+ | Category | Files | Requirement | When to Load |
46
+ |----------|-------|-------------|--------------|
47
+ | **Role definitions** | `references/role-*.md` | **REQUIRED** | Load each before spawning its agent |
48
+ | **Role output template** | `templates/role-output.md` | **REQUIRED** | Include in PM, Architect, Dev Lead prompts |
49
+ | **Critic output template** | `templates/critic-output.md` | **REQUIRED** | Include in Critical Analyst prompt |
50
+ | **Synthesis template** | `templates/synthesis-output.md` | **REQUIRED** | Use when writing synthesis |
51
+ | **Subagent prompting** | `subagent-prompting` skill | **REQUIRED** | Load at Stage 1 for 4-part prompt template |
52
+ | **AT teammate prompts** | `references/at-teammate-prompts.md` | **REQUIRED** (--exploratory only) | Load at Stage 3B for AT prompt structure |
53
+ | **Research synthesis** | `--research <file>` | OPTIONAL | If provided, include in all agent prompts |
54
+
55
+ **Fallback behavior:**
56
+ - If a role reference file is missing: Note in diagnostic log, skip that role, continue with remaining agents
57
+ - If output template is missing: Use the schema from this SKILL.md directly
58
+ - If research synthesis not provided: Agents work from problem statement alone (warn user that quality may be lower)
59
+
60
+ ---
61
+
62
+ ## Mandatory Execution Checklist (BINDING)
63
+
64
+ **Every item below is mandatory. No deviations. No substitutions. No skipping.**
65
+
66
+ This skill uses a multi-stage pipeline. You are the orchestrator. Follow every item in order. Do NOT return to the user until all applicable items are checked.
67
+
68
+ - [ ] **Stage 1 — Pre-Flight**: Topic parsed (from argument, --doc, or AskUserQuestion)
69
+ - [ ] **Stage 1 — Pre-Flight**: subagent-prompting skill loaded
70
+ - [ ] **Stage 1 — Pre-Flight**: If topic is ambiguous or under-specified, AskUserQuestion interview conducted (2-3 questions per round)
71
+ - [ ] **Stage 1 — Pre-Flight**: If --research not provided, user warned via displayed message AND asked to confirm proceeding
72
+ - [ ] **Stage 1 — Mode Detection**: `$CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` env var checked — you MUST check this, no exceptions
73
+ - [ ] **Stage 1 — Mode Detection**: If `--exploratory` requested AND env var NOT SET: notify user ("Agent Teams requires CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1. Using --scoped mode.") and fall back to `--scoped`
74
+ - [ ] **Stage 1 — Mode Detection**: If env var IS SET AND user requests `--exploratory`: AT Confirmation Flow executed (token cost warning + model class choice)
75
+ - [ ] **Stage 1 — Mode Detection**: If no mode flag provided: default to `--scoped` (do NOT auto-select AT even if env var is set)
76
+ - [ ] **Stage 2 — Project SME**: SME spawned via Task tool (general-purpose, Opus) and output read
77
+ - [ ] **Stage 3A (--scoped)**: PM + Architect + Dev Lead spawned in parallel (3 Task tool calls), all outputs read
78
+ - [ ] **Stage 3B (--exploratory)**: 3 AT teammates spawned in delegate mode with correct model class, all outputs read
79
+ - [ ] **Stage 4 (--scoped only)**: Critical Analyst spawned with ALL prior outputs, output read
80
+ - [ ] **Stage 5 — Synthesis**: ALL role outputs read, synthesis written using template, AskUserQuestion for post-synthesis review
81
+ - [ ] **Stage 5 — Evaluation Gate**: Critical Evaluation Gate applied to all user responses
82
+ - [ ] **Stage 6 — Diagnostics**: Diagnostic YAML written to `$PROJECT_DIR/logs/diagnostics/`
83
+
84
+ ---
85
+
86
+ ## Usage
87
+
88
+ ```
89
+ /bulwark-brainstorm <topic-or-prompt> [--research <synthesis-file>] [--scoped | --exploratory]
90
+ /bulwark-brainstorm --doc <path-to-document> [--research <synthesis-file>] [--scoped | --exploratory]
91
+ ```
92
+
93
+ **Arguments:**
94
+ - `<topic-or-prompt>` - Free-text topic description or problem statement
95
+ - `--doc <path>` - Use a document as the topic source
96
+ - `--research <synthesis-file>` - Path to Phase 1 research synthesis (from bulwark-research). Strongly recommended.
97
+ - `--scoped` - (default) Sequential Task tool mode with 5 roles. Use when the problem statement is well understood.
98
+ - `--exploratory` - Agent Teams peer debate with 4 roles. Use when validating whether an idea has merit. Requires `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`.
99
+
100
+ **Examples:**
101
+ - `/bulwark-brainstorm "agent teams" --research artifacts/research/agent-teams/synthesis.md` - Scoped brainstorm with research (default mode)
102
+ - `/bulwark-brainstorm --scoped "loop detection"` - Explicit scoped mode
103
+ - `/bulwark-brainstorm --exploratory "new plugin architecture"` - Exploratory mode with AT peer debate
104
+ - `/bulwark-brainstorm --doc plans/proposal.md --exploratory` - Exploratory from a document
105
+
106
+ ---
107
+
108
+ ## Stages
109
+
110
+ ### Stage 1: Pre-Flight
111
+
112
+ ```
113
+ Stage 1: Pre-Flight
114
+ ├── Read problem statement / document
115
+ ├── Load research synthesis if --research provided
116
+ ├── Parse mode flag: --scoped (default) or --exploratory
117
+ ├── Mode detection (see below)
118
+ ├── AskUserQuestion if ambiguous (iterative, 2-3 questions per round)
119
+ ├── Slugify topic for output directory
120
+ ├── Create output directories: $PROJECT_DIR/logs/brainstorm/{topic-slug}/ and $PROJECT_DIR/artifacts/brainstorm/{topic-slug}/
121
+ ├── Load subagent-prompting skill
122
+ ├── Load references/role-project-sme.md (needed for Stage 2)
123
+ └── Token budget check (warn if >30% for --scoped, >25% for --exploratory)
124
+ ```
125
+
126
+ **Mode Detection (MANDATORY — do NOT skip):**
127
+
128
+ 1. Check `$CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` env var
129
+ 2. Apply this decision matrix:
130
+
131
+ | Env Var | User Flag | Action |
132
+ |---------|-----------|--------|
133
+ | NOT SET | No flag | `--scoped` (default) |
134
+ | NOT SET | `--scoped` | `--scoped` |
135
+ | NOT SET | `--exploratory` | Notify user: "Agent Teams requires CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1. Using --scoped mode." Fall back to `--scoped`. |
136
+ | SET | No flag | `--scoped` (do NOT auto-select AT) |
137
+ | SET | `--scoped` | `--scoped` |
138
+ | SET | `--exploratory` | Execute AT Confirmation Flow (see below) |
139
+
140
+ **AT Confirmation Flow (when --exploratory is selected and env var is set):**
141
+
142
+ Display to user:
143
+
144
+ > **Exploratory mode uses Agent Teams peer debate and consumes ~2x tokens compared to --scoped mode.**
145
+ >
146
+ > 3 AT teammates will debate collaboratively after the SME phase.
147
+ >
148
+ > **Model class for AT teammates:**
149
+ > - **Opus** — highest quality, higher token cost
150
+ > - **Sonnet** — high quality, lower token cost (empirically validated)
151
+ >
152
+ > [Proceed with Opus / Proceed with Sonnet / Switch to --scoped]
153
+
154
+ Record the user's model choice for Stage 3B teammate spawning.
155
+
156
+ **AskUserQuestion Protocol (Pre-Spawn):**
157
+
158
+ If the problem statement is ambiguous, under-specified, or could benefit from scope boundaries:
159
+
160
+ 1. Ask 2-3 clarifying questions using AskUserQuestion
161
+ 2. Assess whether the answers provide sufficient clarity to construct high-quality prompts
162
+ 3. If not, ask up to 3 more questions in a follow-up round
163
+ 4. Repeat until clarity is achieved (no hard cap on rounds, but each round is 2-3 questions max)
164
+ 5. If the problem statement is clear and well-scoped from the start, skip this step and note in diagnostics: `pre_flight_interview: skipped (problem statement sufficient)`
165
+
166
+ If `--research` was not provided, warn the user: "No research synthesis provided. Brainstorm quality is significantly higher when preceded by `/bulwark-research`. Proceed without research?"
167
+
168
+ ### Stage 2: Project SME (Opus, Sequential — First)
169
+
170
+ ```
171
+ Stage 2: Project SME
172
+ ├── Load references/role-project-sme.md
173
+ ├── Construct prompt using 4-part template
174
+ │ ├── GOAL: Establish project context relevant to the topic
175
+ │ ├── CONTEXT: Problem statement + research synthesis (if available)
176
+ │ └── OUTPUT: $PROJECT_DIR/logs/brainstorm/{topic-slug}/01-project-sme.md
177
+ ├── Spawn general-purpose Opus agent
178
+ │ ├── Agent autonomously explores codebase (Glob, Grep, Read)
179
+ │ ├── NO hardcoded document paths — agent discovers what's relevant
180
+ │ └── Output documents which files were read and why
181
+ ├── Read SME output
182
+ └── Token budget check
183
+ ```
184
+
185
+ **CRITICAL — SME Autonomy**: The SME agent MUST NOT receive hardcoded project document paths. Instead:
186
+
187
+ - SME receives the problem statement and (optionally) research synthesis
188
+ - SME is spawned as `general-purpose` subagent type with Opus model
189
+ - SME autonomously explores the codebase using Glob, Grep, Read
190
+ - Instruct the SME: "Identify the MINIMUM files needed to answer: What exists relevant to this topic? Where are the integration points? What constraints apply? What must not be disrupted? Do NOT attempt to read the entire codebase."
191
+ - SME output documents which files it read and why
192
+
193
+ This makes the skill portable across any project.
194
+
195
+ ### Stage 3A: Role Analysis — Task Tool Mode (`--scoped`)
196
+
197
+ **Execute this stage ONLY in `--scoped` mode. Skip entirely in `--exploratory` mode.**
198
+
199
+ ```
200
+ Stage 3A: Role Analysis (--scoped)
201
+ ├── Load references/role-product-manager.md
202
+ ├── Load references/role-technical-architect.md
203
+ ├── Load references/role-development-lead.md
204
+ ├── Load templates/role-output.md
205
+ ├── Construct 3 prompts using 4-part template
206
+ │ ├── Each receives: problem statement + research synthesis + SME output
207
+ │ └── Each writes to: $PROJECT_DIR/logs/brainstorm/{topic-slug}/{NN}-{role-slug}.md
208
+ ├── Spawn all 3 agents in parallel via Task tool
209
+ │ ├── subagent_type: general-purpose
210
+ │ ├── model: opus
211
+ │ └── All 3 in a single message (parallel)
212
+ ├── Read all 3 outputs
213
+ └── Token budget check (checkpoint if >55%)
214
+ ```
215
+
216
+ **Output files (--scoped):** `02-product-manager.md`, `03-technical-architect.md`, `04-development-lead.md`
217
+
218
+ **CRITICAL**: Spawn all 3 agents in a single message with 3 Task tool calls. Do NOT spawn sequentially.
219
+
220
+ ### Stage 3B: Role Analysis — Agent Teams Mode (`--exploratory`)
221
+
222
+ **Execute this stage ONLY in `--exploratory` mode. Skip entirely in `--scoped` mode.**
223
+
224
+ In `--exploratory` mode, 5 roles collapse to 4. The PM and Dev Lead merge into a Product & Delivery Lead. The Critical Analyst joins as an active AT teammate (not a sequential gatekeeper), challenging positions in real time throughout the debate.
225
+
226
+ ```
227
+ Stage 3B: Role Analysis (--exploratory)
228
+ ├── Load references/role-product-delivery-lead.md
229
+ ├── Load references/role-technical-architect.md
230
+ ├── Load references/role-critical-analyst.md
231
+ ├── Load templates/role-output.md
232
+ ├── Load templates/critic-output.md
233
+ ├── Enter delegate mode as lead
234
+ ├── Spawn 3 AT teammates with user's chosen model class (Opus or Sonnet)
235
+ │ ├── Product & Delivery Lead
236
+ │ ├── Technical Architect
237
+ │ └── Critical Analyst
238
+ ├── Each teammate prompt includes:
239
+ │ ├── Role reference content
240
+ │ ├── SME output (from Stage 2)
241
+ │ ├── Problem statement + research synthesis
242
+ │ ├── Dual-output contract (SA2)
243
+ │ ├── Peer debate directives
244
+ │ └── AT mitigation patterns (3 mandatory)
245
+ ├── Wait for all teammates to complete
246
+ ├── Read all 3 output files from logs/
247
+ └── Token budget check (checkpoint if >45%)
248
+ ```
249
+
250
+ **Output files (--exploratory):** `02-product-delivery-lead.md`, `03-technical-architect.md`, `04-critical-analyst.md`
251
+
252
+ #### AT Teammate Prompt Structure, Configuration, and Failure Recovery
253
+
254
+ **MANDATORY**: Load `references/at-teammate-prompts.md` before constructing Stage 3B teammate prompts. It contains the full prompt structure (6 sections including dual-output contract, peer debate directives, 3 AT mitigation patterns, and Critic deferred-verdict directive), AT configuration (hardcoded settings), and failure recovery procedures.
255
+
256
+ ### Stage 4: Critical Analyst — `--scoped` Mode ONLY (Opus, Sequential — Last)
257
+
258
+ **Execute this stage ONLY in `--scoped` mode. In `--exploratory` mode, the Critical Analyst is a Stage 3B teammate — skip Stage 4 entirely.**
259
+
260
+ ```
261
+ Stage 4: Critical Analyst (--scoped only)
262
+ ├── Load references/role-critical-analyst.md
263
+ ├── Load templates/critic-output.md
264
+ ├── Construct prompt using 4-part template
265
+ │ ├── CONTEXT includes ALL prior outputs:
266
+ │ │ ├── Problem statement + research synthesis
267
+ │ │ ├── SME output (01-project-sme.md)
268
+ │ │ ├── PM output (02-product-manager.md)
269
+ │ │ ├── Architect output (03-technical-architect.md)
270
+ │ │ └── Dev Lead output (04-development-lead.md)
271
+ │ └── OUTPUT: $PROJECT_DIR/logs/brainstorm/{topic-slug}/05-critical-analyst.md
272
+ ├── Spawn general-purpose Opus agent
273
+ ├── Read Critical Analyst output
274
+ └── Token budget check
275
+ ```
276
+
277
+ **CRITICAL**: The Critical Analyst MUST receive ALL 4 prior outputs. This is the whole point — the Critic synthesizes and challenges everything.
278
+
279
+ ### Stage 5: Synthesis (SHARED — mode-aware)
280
+
281
+ ```
282
+ Stage 5: Synthesis
283
+ ├── Read ALL agent output files from logs/brainstorm/{topic-slug}/
284
+ │ ├── --scoped: expect 5 files (01-project-sme, 02-product-manager, 03-technical-architect, 04-development-lead, 05-critical-analyst)
285
+ │ └── --exploratory: expect 4 files (01-project-sme, 02-product-delivery-lead, 03-technical-architect, 04-critical-analyst)
286
+ ├── Verify expected file count matches mode (5 for --scoped, 4 for --exploratory)
287
+ ├── If any output is missing or empty → re-spawn that agent once (max 1 retry)
288
+ ├── If retry fails → document gap in synthesis under "Incomplete Coverage"
289
+ ├── Load templates/synthesis-output.md
290
+ ├── Write synthesis to $PROJECT_DIR/artifacts/brainstorm/{topic-slug}/synthesis.md
291
+ │ └── Include mode field in YAML header (mode: scoped | exploratory)
292
+ ├── AskUserQuestion for user on open questions (iterative, 2-3 per round)
293
+ ├── Critical Evaluation Gate (see below)
294
+ └── Token budget check (must be <65% after synthesis)
295
+ ```
296
+
297
+ **Enforcement**: Do NOT begin writing synthesis until ALL available agent outputs have been read. The orchestrator must reference every agent's output at least once in the synthesis.
298
+
299
+ **Mode-specific synthesis notes:**
300
+ - In `--exploratory` mode, the synthesis should capture debate dynamics — where teammates disagreed, what challenges were raised, and how positions evolved. Check for "Post-Debate Update" sections in agent outputs.
301
+ - In `--scoped` mode, synthesis follows the existing pattern (consensus areas, divergence areas, implementation outline).
302
+
303
+ #### Critical Evaluation Gate (Post-User Q&A)
304
+
305
+ After each AskUserQuestion round, do NOT blindly incorporate user responses. Instead:
306
+
307
+ **Step 1 — Classify each user response:**
308
+
309
+ | Classification | Definition | Action |
310
+ |---------------|------------|--------|
311
+ | **Preference** | Scope, priority, or UX choice (e.g., "I'd prefer v1 to focus on X", "Let's defer Y") | Incorporate directly. These are user decisions — no validation needed. |
312
+ | **Technical Claim** | Assertion about a technology, library, or API (e.g., "Library X supports this", "That API has rate limits") | **Do NOT incorporate.** Trigger Step 2. |
313
+ | **Architectural Suggestion** | Proposed structural approach (e.g., "What if we structure it as a plugin?", "We could use event sourcing") | **Do NOT incorporate.** Trigger Step 2. |
314
+
315
+ **Step 2 — For Technical Claims and Architectural Suggestions, present to user:**
316
+
317
+ > "Your suggestion about [X] involves a technical claim / architectural approach that hasn't been validated against the codebase and research. I recommend a targeted follow-up with 2 focused agents (Technical Architect + Critical Analyst) to verify feasibility and stress-test the approach.
318
+ >
319
+ > This will spawn 2 Opus agents and consume additional token budget.
320
+ >
321
+ > [Run follow-up validation / Incorporate as-is with LOW confidence caveat]"
322
+
323
+ **Step 3 — If follow-up validation approved:**
324
+
325
+ 1. Spawn 2 Opus agents in parallel (single message, 2 Task tool calls):
326
+ - **Technical Architect** — validates the suggestion against the codebase and research:
327
+ GOAL: Validate whether [{user_suggestion}] is technically feasible for this project.
328
+ Include the Propose-Challenge-Refine reasoning depth instructions.
329
+ Agent has access to Glob, Grep, Read for codebase exploration.
330
+ - **Critical Analyst** — stress-tests the suggestion:
331
+ GOAL: Challenge [{user_suggestion}]. Is this the simplest approach? What assumptions does it introduce? What would change the verdict?
332
+ Include the Highest-Risk Assumption Focus reasoning depth instructions.
333
+ 2. Use the same 4-part prompt template (GOAL/CONSTRAINTS/CONTEXT/OUTPUT)
334
+ 3. Provide both agents with: original research synthesis, SME output, and the specific user suggestion
335
+ 4. Output to: `$PROJECT_DIR/logs/brainstorm/{topic-slug}/followup-{NN}-architect.md` and `followup-{NN}-critic.md`
336
+ 5. Read both outputs, then update synthesis with validated findings
337
+ 6. Tag follow-up findings in synthesis with: `[Follow-up: validated]` or `[Follow-up: refuted]` or `[Follow-up: mixed — see details]`
338
+
339
+ **Step 4 — If user declines follow-up:**
340
+
341
+ Incorporate the user's suggestion into synthesis with an explicit caveat:
342
+ > **[Unvalidated — user suggestion, not verified against codebase or research]**: {suggestion}
343
+
344
+ **Repeat**: After updating synthesis, ask if user has additional questions or input. Apply the same classification gate to each round. There is no limit on follow-up rounds, but each round with Technical Claim / Architectural Suggestion input that triggers validation consumes ~15-20% token budget (2 Opus agents) — warn user if approaching 55%.
345
+
346
+ ### Stage 6: Diagnostics (REQUIRED)
347
+
348
+ ```
349
+ Stage 6: Diagnostics
350
+ ├── Write diagnostic YAML to $PROJECT_DIR/logs/diagnostics/bulwark-brainstorm-{YYYYMMDD-HHMMSS}.yaml
351
+ └── Verify completion checklist
352
+ ```
353
+
354
+ ---
355
+
356
+ ## Roles (Sections)
357
+
358
+ Each role brings a distinct professional perspective. Role availability depends on the execution mode.
359
+
360
+ ### Role Mapping by Mode
361
+
362
+ | Role | `--scoped` | `--exploratory` |
363
+ |------|-----------|----------------|
364
+ | **Project SME** | Stage 2: Solo first (Task tool) | Stage 2: Solo first (Task tool) — identical |
365
+ | **Senior Product Manager** | Stage 3A: Parallel (Task tool) | Merged into Product & Delivery Lead |
366
+ | **Senior Technical Architect** | Stage 3A: Parallel (Task tool) | Stage 3B: AT teammate |
367
+ | **Senior Development Lead** | Stage 3A: Parallel (Task tool) | Merged into Product & Delivery Lead |
368
+ | **Product & Delivery Lead** | N/A | Stage 3B: AT teammate (combined PM + Dev Lead) |
369
+ | **Critical Analyst** | Stage 4: Sequential last (Task tool) | Stage 3B: AT teammate — active from start |
370
+
371
+ ### Role 1: Project SME (Both Modes — Sequential First)
372
+
373
+ **Purpose**: Establish what exists, what has been built, and where the topic fits in the current architecture.
374
+
375
+ **Focus Areas**:
376
+ - Current project architecture relevant to the topic
377
+ - Existing assets that relate to or would be affected
378
+ - Integration points — where does this connect?
379
+ - Constraints imposed by current design decisions
380
+ - What the project already does well that must not be disrupted
381
+
382
+ **Execution**: Solo, first. Output feeds all subsequent agents. Identical in both modes.
383
+
384
+ **Reference**: `references/role-project-sme.md`
385
+
386
+ ### Role 2: Senior Product Manager (`--scoped` only)
387
+
388
+ **Purpose**: Evaluate user value, prioritization, and scope boundaries.
389
+
390
+ **Focus Areas**:
391
+ - User value proposition — who benefits and how?
392
+ - Prioritization — what delivers the most value soonest?
393
+ - Scope boundaries — what is v1 vs. deferred?
394
+ - Success criteria — how do we know this works?
395
+ - Risk to user experience if implemented poorly
396
+
397
+ **Execution**: Parallel with Architect and Dev Lead (Stage 3A). Receives SME output.
398
+
399
+ **Reference**: `references/role-product-manager.md`
400
+
401
+ ### Role 3: Senior Technical Architect (Both Modes)
402
+
403
+ **Purpose**: Define system design, patterns, and technical trade-offs.
404
+
405
+ **Focus Areas**:
406
+ - Architectural approach — how should this be structured?
407
+ - Design patterns that apply (and which to avoid)
408
+ - Technical trade-offs and their implications
409
+ - Integration architecture — how it connects to existing systems
410
+ - Extensibility and future-proofing considerations
411
+
412
+ **Execution**:
413
+ - `--scoped`: Parallel with PM and Dev Lead (Stage 3A). Receives SME output.
414
+ - `--exploratory`: AT teammate (Stage 3B). Receives SME output + peer debate.
415
+
416
+ **Reference**: `references/role-technical-architect.md`
417
+
418
+ ### Role 4: Senior Development Lead (`--scoped` only)
419
+
420
+ **Purpose**: Assess implementation feasibility, effort, and practical risks.
421
+
422
+ **Focus Areas**:
423
+ - Implementation feasibility — can this be built with available tools?
424
+ - Effort estimation — complexity and session count
425
+ - Implementation risks — what could go wrong during building?
426
+ - Testing strategy — how do we verify this works?
427
+ - Dependencies and ordering — what must be built first?
428
+
429
+ **Execution**: Parallel with PM and Architect (Stage 3A). Receives SME output.
430
+
431
+ **Reference**: `references/role-development-lead.md`
432
+
433
+ ### Role 5: Product & Delivery Lead (`--exploratory` only)
434
+
435
+ **Purpose**: Evaluate user value, scope boundaries, implementation feasibility, and delivery planning. Combines PM's value/prioritization lens with Dev Lead's feasibility/effort lens.
436
+
437
+ **Focus Areas**:
438
+ - User value proposition and prioritization
439
+ - Scope boundaries — v1 vs. deferred
440
+ - Implementation feasibility and effort estimation
441
+ - Build order, dependencies, testing strategy
442
+ - Value-effort trade-offs — which features have the best ROI?
443
+
444
+ **Execution**: AT teammate (Stage 3B). Receives SME output + peer debate.
445
+
446
+ **Reference**: `references/role-product-delivery-lead.md`
447
+
448
+ ### Role 6: Critical Analyst (Both Modes — Different Execution)
449
+
450
+ **Purpose**: Perform cost-benefit analysis, challenge assumptions, validate the problem itself, poke holes.
451
+
452
+ **Focus Areas**:
453
+ - Problem validation — should this problem be solved at all?
454
+ - Cost-benefit analysis — is the investment justified?
455
+ - Assumption challenges — what might be wrong?
456
+ - Gaps in the proposals — what has been overlooked?
457
+ - Simpler alternatives — could a less ambitious approach work?
458
+ - Kill criteria — under what conditions should this be abandoned?
459
+ - Final verdict: proceed / modify / defer / kill
460
+
461
+ **Execution**:
462
+ - `--scoped`: Solo, last (Stage 4). Receives ALL prior outputs. Maximum information, zero influence on the analysis process.
463
+ - `--exploratory`: AT teammate (Stage 3B). Active from start. Challenges in real time. Partial information early, maximum influence on debate. Deferred verdict.
464
+
465
+ **Reference**: `references/role-critical-analyst.md`
466
+ **Output template**: `templates/critic-output.md` (has verdict + problem validation sections)
467
+
468
+ ---
469
+
470
+ ## Execution Flow (F# Pipeline)
471
+
472
+ ```fsharp
473
+ // --scoped mode (default, unchanged)
474
+ ProjectSME(topic, research?) // Stage 2: Opus, solo
475
+ |> [ProductManager, TechArchitect, DevLead](sme_output) // Stage 3A: 3 Opus, parallel
476
+ |> CriticalAnalyst(all_prior_outputs) // Stage 4: Opus, solo
477
+ |> Synthesis // Stage 5: Orchestrator
478
+
479
+ // --exploratory mode (new)
480
+ ProjectSME(topic, research?) // Stage 2: Opus, solo (Task tool)
481
+ |> AgentTeam[ProductDeliveryLead, TechArchitect, CriticalAnalyst](sme_output) // Stage 3B: AT peer debate
482
+ |> Synthesis // Stage 5: Orchestrator
483
+ ```
484
+
485
+ ---
486
+
487
+ ## Token Budget Management
488
+
489
+ | Checkpoint | `--scoped` Threshold | `--exploratory` Threshold | Action |
490
+ |------------|---------------------|--------------------------|--------|
491
+ | After constructing SME prompt | >30% consumed | >25% consumed | Warn user about agent token cost |
492
+ | After reading Stage 3A/3B outputs | >55% | >45% | Checkpoint with user |
493
+ | After synthesis | Must be <65% | Must be <65% | Leave room for session closing |
494
+ | Synthesis complete at >65% | Immediate | Immediate | Create handoff, do not start additional work |
495
+
496
+ **`--exploratory` costs ~2x tokens** due to AT peer debate overhead. The lower thresholds account for this.
497
+
498
+ If token budget is insufficient to complete all agents + synthesis, inform the user and suggest splitting (e.g., "SME + role analysis this session, synthesis next session").
499
+
500
+ ---
501
+
502
+ ## Error Handling
503
+
504
+ | Scenario | Action |
505
+ |----------|--------|
506
+ | Agent returns empty output | Re-spawn once. If still empty, document gap in synthesis. |
507
+ | Agent returns truncated output | Accept as-is, note in diagnostics. |
508
+ | Agent fails to spawn | Re-spawn once. If still fails, skip role, document. |
509
+ | SME fails | STOP — subsequent agents depend on SME. Inform user. |
510
+ | Token budget exceeded mid-session | Stop spawning, synthesize from available outputs, note incomplete. |
511
+ | Research synthesis not provided | Warn user, proceed with lower quality. |
512
+ | AT teammate fails mid-debate (`--exploratory`) | Fall back to Stage 3A for failed role only. Partial AT output from successful teammates feeds into fallback as additional context. |
513
+ | All AT teammates fail (`--exploratory`) | Fall back to full Stage 3A (--scoped pipeline). Document in diagnostics. |
514
+ | AT lead context compaction (`--exploratory`) | Known platform limitation. SME running before AT is the structural mitigation. Document in diagnostics if observed. |
515
+ | `--exploratory` requested, env var not set | Notify user, fall back to `--scoped`. Not an error — graceful degradation. |
516
+
517
+ ---
518
+
519
+ ## Diagnostic Output (REQUIRED)
520
+
521
+ **MANDATORY**: You MUST write diagnostic output after every invocation. This is Stage 6 and cannot be skipped.
522
+
523
+ Write to: `$PROJECT_DIR/logs/diagnostics/bulwark-brainstorm-{YYYYMMDD-HHMMSS}.yaml`
524
+
525
+ **Template**: Use `templates/diagnostic-output.yaml` for the schema. Fill in actual values from the session.
526
+
527
+ ---
528
+
529
+ ## Completion Checklist
530
+
531
+ **IMPORTANT**: Before returning to the user, verify ALL applicable items are complete:
532
+
533
+ ### Shared (both modes)
534
+
535
+ - [ ] Stage 1: Pre-flight complete (topic defined, directories created, skills loaded)
536
+ - [ ] Stage 1: Mode detection performed (env var checked, mode selected)
537
+ - [ ] Stage 1: AskUserQuestion used if topic was ambiguous
538
+ - [ ] Stage 1: User warned if --research not provided
539
+ - [ ] Stage 2: Project SME spawned (Opus) and output read
540
+ - [ ] Stage 2: SME explored codebase autonomously (no hardcoded paths)
541
+ - [ ] Stage 5: ALL outputs read before writing synthesis
542
+ - [ ] Stage 5: Synthesis written using `templates/synthesis-output.md` with mode field in YAML header
543
+ - [ ] Stage 5: AskUserQuestion used for post-synthesis review
544
+ - [ ] Stage 5: Critical Evaluation Gate applied to all user responses
545
+ - [ ] Stage 5: Synthesis written to `$PROJECT_DIR/artifacts/brainstorm/{topic-slug}/synthesis.md`
546
+ - [ ] Stage 6: Diagnostic YAML written to `$PROJECT_DIR/logs/diagnostics/`
547
+
548
+ ### `--scoped` mode only
549
+
550
+ - [ ] Stage 3A: All 3 role agents spawned in parallel (Opus)
551
+ - [ ] Stage 3A: All role outputs written to `$PROJECT_DIR/logs/brainstorm/{topic-slug}/`
552
+ - [ ] Stage 4: Critical Analyst spawned with ALL prior outputs
553
+ - [ ] Stage 4: Critic output read
554
+
555
+ ### `--exploratory` mode only
556
+
557
+ - [ ] Stage 1: AT Confirmation Flow completed (token warning + model class choice)
558
+ - [ ] Stage 3B: Delegate mode entered, 3 AT teammates spawned with correct model class
559
+ - [ ] Stage 3B: All teammate outputs written to `$PROJECT_DIR/logs/brainstorm/{topic-slug}/`
560
+ - [ ] Stage 3B: AT mitigation patterns included in all teammate prompts (CC-to-lead, task list, completion signal)
561
+ - [ ] Stage 6: AT-specific metrics captured in diagnostic YAML
562
+
563
+ **Do NOT return to user until all applicable checkboxes can be marked complete.**
@@ -0,0 +1,60 @@
1
+ # AT Teammate Prompt Structure (--exploratory mode)
2
+
3
+ This reference defines the mandatory prompt sections for Agent Teams teammates in `--exploratory` mode. Load this file at Stage 3B only.
4
+
5
+ ---
6
+
7
+ ## Prompt Sections
8
+
9
+ Each teammate prompt MUST include these sections:
10
+
11
+ **1. Role instructions** — from the corresponding `references/role-*.md` file
12
+
13
+ **2. Input context** — problem statement, research synthesis (if available), SME output
14
+
15
+ **3. Dual-Output Contract (SA2 — MANDATORY in every teammate prompt):**
16
+
17
+ > You MUST produce TWO outputs:
18
+ >
19
+ > **Output 1 — Full analysis (SA2 artifact):** Write your complete analysis to `$PROJECT_DIR/logs/brainstorm/{topic-slug}/{NN}-{role-slug}.md` using the output template provided. This is the permanent record.
20
+ >
21
+ > **Output 2 — Coordination summary (mailbox):** After writing your full analysis, send a 3-5 sentence summary to other teammates via sendMessage. Include: your recommendation (proceed/modify/defer/kill), your top finding, and your strongest concern.
22
+
23
+ **4. Peer Debate Directives:**
24
+
25
+ > **Selective challenge protocol:** After receiving summaries from other teammates:
26
+ > - Read each teammate's summary
27
+ > - If you DISAGREE with a position, send a targeted challenge via sendMessage explaining WHY you disagree with evidence
28
+ > - If you AGREE, do NOT send a message (avoid noise)
29
+ > - You may update your log file after the debate if your position changed — append a "## Post-Debate Update" section
30
+
31
+ **5. AT Mitigation Patterns (ALL 3 MANDATORY in every teammate prompt):**
32
+
33
+ > **CC-to-lead:** After any peer message exchange, also send a 1-line summary to the lead so the lead can track debate progress.
34
+ >
35
+ > **Task list coordination:** Update your task status to mark progress. Set to completed when your full analysis is written AND you have reviewed all peer summaries.
36
+ >
37
+ > **Completion signal:** When you have finished all work (analysis written, peer summaries reviewed, challenges sent if any), send a final message to the lead: "WORK COMPLETE — [role name]"
38
+
39
+ **6. Critical Analyst — special AT directive (in addition to standard Critic prompt):**
40
+
41
+ > **Deferred verdict:** You are active from the start of the debate, not a sequential gatekeeper. Challenge early findings from other teammates as they arrive. However, do NOT form your final verdict until all teammates have shared their summaries. Your formal verdict belongs in your log artifact, not in peer messages. In your log file, include a "## Debate Influence" section documenting which peer positions you challenged and how the debate shaped your final verdict.
42
+
43
+ ---
44
+
45
+ ## AT Configuration (Hardcoded)
46
+
47
+ | Setting | Value | Rationale |
48
+ |---------|-------|-----------|
49
+ | Display mode | In-process | WSL2 safe default |
50
+ | Lead mode | Delegate | Coordination only — lead does not do analysis |
51
+ | Communication | Selective challenge | Broadcast summary once, respond only to disagreements |
52
+ | Teammate count | 3 | Fixed for v1 |
53
+
54
+ ---
55
+
56
+ ## AT Failure Recovery
57
+
58
+ - **Teammate fails mid-debate**: Fall back to Stage 3A for the failed role only. Partial AT output from successful teammates feeds into fallback as additional context.
59
+ - **All teammates fail**: Fall back to full Stage 3A (--scoped pipeline).
60
+ - **Lead context compaction**: Known platform limitation. Structural mitigation: SME runs before AT (reduces lead context pressure). Document in diagnostics if observed.