@namch/agent-assistant 1.1.0 → 1.2.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 (239) hide show
  1. package/CHANGELOG.md +51 -1
  2. package/README.md +6 -1
  3. package/agents/teams/backend-team/executor.md +188 -0
  4. package/agents/teams/backend-team/reviewer.md +328 -0
  5. package/agents/teams/backend-team/techlead.md +166 -0
  6. package/agents/teams/database-team/executor.md +189 -0
  7. package/agents/teams/database-team/reviewer.md +333 -0
  8. package/agents/teams/database-team/techlead.md +168 -0
  9. package/agents/teams/debug-team/executor.md +195 -0
  10. package/agents/teams/debug-team/reviewer.md +324 -0
  11. package/agents/teams/debug-team/techlead.md +173 -0
  12. package/agents/teams/design-team/executor.md +196 -0
  13. package/agents/teams/design-team/reviewer.md +405 -0
  14. package/agents/teams/design-team/techlead.md +170 -0
  15. package/agents/teams/devops-team/executor.md +199 -0
  16. package/agents/teams/devops-team/reviewer.md +332 -0
  17. package/agents/teams/devops-team/techlead.md +168 -0
  18. package/agents/teams/docs-team/executor.md +196 -0
  19. package/agents/teams/docs-team/reviewer.md +331 -0
  20. package/agents/teams/docs-team/techlead.md +168 -0
  21. package/agents/teams/frontend-team/executor.md +190 -0
  22. package/agents/teams/frontend-team/reviewer.md +333 -0
  23. package/agents/teams/frontend-team/techlead.md +169 -0
  24. package/agents/teams/fullstack-team/executor.md +290 -0
  25. package/agents/teams/fullstack-team/reviewer.md +365 -0
  26. package/agents/teams/fullstack-team/techlead.md +254 -0
  27. package/agents/teams/game-team/executor.md +193 -0
  28. package/agents/teams/game-team/reviewer.md +331 -0
  29. package/agents/teams/game-team/techlead.md +167 -0
  30. package/agents/teams/mobile-team/executor.md +192 -0
  31. package/agents/teams/mobile-team/reviewer.md +328 -0
  32. package/agents/teams/mobile-team/techlead.md +168 -0
  33. package/agents/teams/performance-team/executor.md +192 -0
  34. package/agents/teams/performance-team/reviewer.md +322 -0
  35. package/agents/teams/performance-team/techlead.md +175 -0
  36. package/agents/teams/planning-team/executor.md +197 -0
  37. package/agents/teams/planning-team/reviewer.md +279 -0
  38. package/agents/teams/planning-team/techlead.md +169 -0
  39. package/agents/teams/project-team/executor.md +190 -0
  40. package/agents/teams/project-team/reviewer.md +328 -0
  41. package/agents/teams/project-team/techlead.md +168 -0
  42. package/agents/teams/qa-team/executor.md +198 -0
  43. package/agents/teams/qa-team/reviewer.md +271 -0
  44. package/agents/teams/qa-team/techlead.md +175 -0
  45. package/agents/teams/report-team/executor.md +195 -0
  46. package/agents/teams/report-team/reviewer.md +328 -0
  47. package/agents/teams/report-team/techlead.md +168 -0
  48. package/agents/teams/research-team/executor.md +200 -0
  49. package/agents/teams/research-team/reviewer.md +272 -0
  50. package/agents/teams/research-team/techlead.md +168 -0
  51. package/agents/teams/security-team/executor.md +193 -0
  52. package/agents/teams/security-team/reviewer.md +338 -0
  53. package/agents/teams/security-team/techlead.md +178 -0
  54. package/cli/README.md +19 -2
  55. package/cli/install.js +300 -9
  56. package/cli/install.test.js.example +1 -1
  57. package/code-assistants/antigravity-assistant/AntigravityGlobal.agent.md +86 -39
  58. package/code-assistants/antigravity-assistant/GEMINI.md +105 -30
  59. package/code-assistants/claude-assistant/CLAUDE.md +4 -4
  60. package/code-assistants/codex-assistant/CODEX.md +235 -0
  61. package/code-assistants/codex-assistant/agents/backend-engineer.toml +26 -0
  62. package/code-assistants/codex-assistant/agents/brainstormer.toml +26 -0
  63. package/code-assistants/codex-assistant/agents/business-analyst.toml +26 -0
  64. package/code-assistants/codex-assistant/agents/database-architect.toml +26 -0
  65. package/code-assistants/codex-assistant/agents/debugger.toml +26 -0
  66. package/code-assistants/codex-assistant/agents/designer.toml +26 -0
  67. package/code-assistants/codex-assistant/agents/devops-engineer.toml +26 -0
  68. package/code-assistants/codex-assistant/agents/docs-manager.toml +26 -0
  69. package/code-assistants/codex-assistant/agents/frontend-engineer.toml +26 -0
  70. package/code-assistants/codex-assistant/agents/game-engineer.toml +26 -0
  71. package/code-assistants/codex-assistant/agents/mobile-engineer.toml +26 -0
  72. package/code-assistants/codex-assistant/agents/performance-engineer.toml +26 -0
  73. package/code-assistants/codex-assistant/agents/planner.toml +26 -0
  74. package/code-assistants/codex-assistant/agents/project-manager.toml +26 -0
  75. package/code-assistants/codex-assistant/agents/reporter.toml +26 -0
  76. package/code-assistants/codex-assistant/agents/researcher.toml +26 -0
  77. package/code-assistants/codex-assistant/agents/reviewer.toml +26 -0
  78. package/code-assistants/codex-assistant/agents/scouter.toml +26 -0
  79. package/code-assistants/codex-assistant/agents/security-engineer.toml +26 -0
  80. package/code-assistants/codex-assistant/agents/tech-lead.toml +26 -0
  81. package/code-assistants/codex-assistant/agents/tester.toml +26 -0
  82. package/code-assistants/codex-assistant/config.toml +109 -0
  83. package/code-assistants/codex-assistant/skills/agent-assistant-ask/SKILL.md +18 -0
  84. package/code-assistants/codex-assistant/skills/agent-assistant-ask/agents/openai.yaml +4 -0
  85. package/code-assistants/codex-assistant/skills/agent-assistant-ask-fast/SKILL.md +18 -0
  86. package/code-assistants/codex-assistant/skills/agent-assistant-ask-fast/agents/openai.yaml +4 -0
  87. package/code-assistants/codex-assistant/skills/agent-assistant-ask-hard/SKILL.md +18 -0
  88. package/code-assistants/codex-assistant/skills/agent-assistant-ask-hard/agents/openai.yaml +4 -0
  89. package/code-assistants/codex-assistant/skills/agent-assistant-auto/SKILL.md +18 -0
  90. package/code-assistants/codex-assistant/skills/agent-assistant-auto/agents/openai.yaml +4 -0
  91. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm/SKILL.md +18 -0
  92. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm/agents/openai.yaml +4 -0
  93. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm-fast/SKILL.md +18 -0
  94. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm-fast/agents/openai.yaml +4 -0
  95. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm-hard/SKILL.md +18 -0
  96. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm-hard/agents/openai.yaml +4 -0
  97. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm-team/SKILL.md +18 -0
  98. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm-team/agents/openai.yaml +4 -0
  99. package/code-assistants/codex-assistant/skills/agent-assistant-code/SKILL.md +18 -0
  100. package/code-assistants/codex-assistant/skills/agent-assistant-code/agents/openai.yaml +4 -0
  101. package/code-assistants/codex-assistant/skills/agent-assistant-code-fast/SKILL.md +18 -0
  102. package/code-assistants/codex-assistant/skills/agent-assistant-code-fast/agents/openai.yaml +4 -0
  103. package/code-assistants/codex-assistant/skills/agent-assistant-code-focus/SKILL.md +18 -0
  104. package/code-assistants/codex-assistant/skills/agent-assistant-code-focus/agents/openai.yaml +4 -0
  105. package/code-assistants/codex-assistant/skills/agent-assistant-code-hard/SKILL.md +18 -0
  106. package/code-assistants/codex-assistant/skills/agent-assistant-code-hard/agents/openai.yaml +4 -0
  107. package/code-assistants/codex-assistant/skills/agent-assistant-code-team/SKILL.md +18 -0
  108. package/code-assistants/codex-assistant/skills/agent-assistant-code-team/agents/openai.yaml +4 -0
  109. package/code-assistants/codex-assistant/skills/agent-assistant-cook/SKILL.md +18 -0
  110. package/code-assistants/codex-assistant/skills/agent-assistant-cook/agents/openai.yaml +4 -0
  111. package/code-assistants/codex-assistant/skills/agent-assistant-cook-fast/SKILL.md +18 -0
  112. package/code-assistants/codex-assistant/skills/agent-assistant-cook-fast/agents/openai.yaml +4 -0
  113. package/code-assistants/codex-assistant/skills/agent-assistant-cook-focus/SKILL.md +18 -0
  114. package/code-assistants/codex-assistant/skills/agent-assistant-cook-focus/agents/openai.yaml +4 -0
  115. package/code-assistants/codex-assistant/skills/agent-assistant-cook-hard/SKILL.md +18 -0
  116. package/code-assistants/codex-assistant/skills/agent-assistant-cook-hard/agents/openai.yaml +4 -0
  117. package/code-assistants/codex-assistant/skills/agent-assistant-cook-team/SKILL.md +18 -0
  118. package/code-assistants/codex-assistant/skills/agent-assistant-cook-team/agents/openai.yaml +4 -0
  119. package/code-assistants/codex-assistant/skills/agent-assistant-debug/SKILL.md +18 -0
  120. package/code-assistants/codex-assistant/skills/agent-assistant-debug/agents/openai.yaml +4 -0
  121. package/code-assistants/codex-assistant/skills/agent-assistant-debug-fast/SKILL.md +18 -0
  122. package/code-assistants/codex-assistant/skills/agent-assistant-debug-fast/agents/openai.yaml +4 -0
  123. package/code-assistants/codex-assistant/skills/agent-assistant-debug-focus/SKILL.md +18 -0
  124. package/code-assistants/codex-assistant/skills/agent-assistant-debug-focus/agents/openai.yaml +4 -0
  125. package/code-assistants/codex-assistant/skills/agent-assistant-debug-hard/SKILL.md +18 -0
  126. package/code-assistants/codex-assistant/skills/agent-assistant-debug-hard/agents/openai.yaml +4 -0
  127. package/code-assistants/codex-assistant/skills/agent-assistant-debug-team/SKILL.md +18 -0
  128. package/code-assistants/codex-assistant/skills/agent-assistant-debug-team/agents/openai.yaml +4 -0
  129. package/code-assistants/codex-assistant/skills/agent-assistant-deploy/SKILL.md +18 -0
  130. package/code-assistants/codex-assistant/skills/agent-assistant-deploy/agents/openai.yaml +4 -0
  131. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-check/SKILL.md +18 -0
  132. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-check/agents/openai.yaml +4 -0
  133. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-preview/SKILL.md +18 -0
  134. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-preview/agents/openai.yaml +4 -0
  135. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-production/SKILL.md +18 -0
  136. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-production/agents/openai.yaml +4 -0
  137. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-rollback/SKILL.md +18 -0
  138. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-rollback/agents/openai.yaml +4 -0
  139. package/code-assistants/codex-assistant/skills/agent-assistant-design/SKILL.md +18 -0
  140. package/code-assistants/codex-assistant/skills/agent-assistant-design/agents/openai.yaml +4 -0
  141. package/code-assistants/codex-assistant/skills/agent-assistant-design-fast/SKILL.md +18 -0
  142. package/code-assistants/codex-assistant/skills/agent-assistant-design-fast/agents/openai.yaml +4 -0
  143. package/code-assistants/codex-assistant/skills/agent-assistant-design-focus/SKILL.md +18 -0
  144. package/code-assistants/codex-assistant/skills/agent-assistant-design-focus/agents/openai.yaml +4 -0
  145. package/code-assistants/codex-assistant/skills/agent-assistant-design-hard/SKILL.md +18 -0
  146. package/code-assistants/codex-assistant/skills/agent-assistant-design-hard/agents/openai.yaml +4 -0
  147. package/code-assistants/codex-assistant/skills/agent-assistant-design-team/SKILL.md +18 -0
  148. package/code-assistants/codex-assistant/skills/agent-assistant-design-team/agents/openai.yaml +4 -0
  149. package/code-assistants/codex-assistant/skills/agent-assistant-docs/SKILL.md +18 -0
  150. package/code-assistants/codex-assistant/skills/agent-assistant-docs/agents/openai.yaml +4 -0
  151. package/code-assistants/codex-assistant/skills/agent-assistant-docs-audit/SKILL.md +18 -0
  152. package/code-assistants/codex-assistant/skills/agent-assistant-docs-audit/agents/openai.yaml +4 -0
  153. package/code-assistants/codex-assistant/skills/agent-assistant-docs-business/SKILL.md +18 -0
  154. package/code-assistants/codex-assistant/skills/agent-assistant-docs-business/agents/openai.yaml +4 -0
  155. package/code-assistants/codex-assistant/skills/agent-assistant-docs-core/SKILL.md +18 -0
  156. package/code-assistants/codex-assistant/skills/agent-assistant-docs-core/agents/openai.yaml +4 -0
  157. package/code-assistants/codex-assistant/skills/agent-assistant-fix/SKILL.md +18 -0
  158. package/code-assistants/codex-assistant/skills/agent-assistant-fix/agents/openai.yaml +4 -0
  159. package/code-assistants/codex-assistant/skills/agent-assistant-fix-fast/SKILL.md +18 -0
  160. package/code-assistants/codex-assistant/skills/agent-assistant-fix-fast/agents/openai.yaml +4 -0
  161. package/code-assistants/codex-assistant/skills/agent-assistant-fix-focus/SKILL.md +18 -0
  162. package/code-assistants/codex-assistant/skills/agent-assistant-fix-focus/agents/openai.yaml +4 -0
  163. package/code-assistants/codex-assistant/skills/agent-assistant-fix-hard/SKILL.md +18 -0
  164. package/code-assistants/codex-assistant/skills/agent-assistant-fix-hard/agents/openai.yaml +4 -0
  165. package/code-assistants/codex-assistant/skills/agent-assistant-fix-team/SKILL.md +18 -0
  166. package/code-assistants/codex-assistant/skills/agent-assistant-fix-team/agents/openai.yaml +4 -0
  167. package/code-assistants/codex-assistant/skills/agent-assistant-plan/SKILL.md +18 -0
  168. package/code-assistants/codex-assistant/skills/agent-assistant-plan/agents/openai.yaml +4 -0
  169. package/code-assistants/codex-assistant/skills/agent-assistant-plan-fast/SKILL.md +18 -0
  170. package/code-assistants/codex-assistant/skills/agent-assistant-plan-fast/agents/openai.yaml +4 -0
  171. package/code-assistants/codex-assistant/skills/agent-assistant-plan-focus/SKILL.md +18 -0
  172. package/code-assistants/codex-assistant/skills/agent-assistant-plan-focus/agents/openai.yaml +4 -0
  173. package/code-assistants/codex-assistant/skills/agent-assistant-plan-hard/SKILL.md +18 -0
  174. package/code-assistants/codex-assistant/skills/agent-assistant-plan-hard/agents/openai.yaml +4 -0
  175. package/code-assistants/codex-assistant/skills/agent-assistant-plan-team/SKILL.md +18 -0
  176. package/code-assistants/codex-assistant/skills/agent-assistant-plan-team/agents/openai.yaml +4 -0
  177. package/code-assistants/codex-assistant/skills/agent-assistant-report/SKILL.md +18 -0
  178. package/code-assistants/codex-assistant/skills/agent-assistant-report/agents/openai.yaml +4 -0
  179. package/code-assistants/codex-assistant/skills/agent-assistant-report-fast/SKILL.md +18 -0
  180. package/code-assistants/codex-assistant/skills/agent-assistant-report-fast/agents/openai.yaml +4 -0
  181. package/code-assistants/codex-assistant/skills/agent-assistant-report-focus/SKILL.md +18 -0
  182. package/code-assistants/codex-assistant/skills/agent-assistant-report-focus/agents/openai.yaml +4 -0
  183. package/code-assistants/codex-assistant/skills/agent-assistant-report-hard/SKILL.md +18 -0
  184. package/code-assistants/codex-assistant/skills/agent-assistant-report-hard/agents/openai.yaml +4 -0
  185. package/code-assistants/codex-assistant/skills/agent-assistant-report-team/SKILL.md +18 -0
  186. package/code-assistants/codex-assistant/skills/agent-assistant-report-team/agents/openai.yaml +4 -0
  187. package/code-assistants/codex-assistant/skills/agent-assistant-review/SKILL.md +18 -0
  188. package/code-assistants/codex-assistant/skills/agent-assistant-review/agents/openai.yaml +4 -0
  189. package/code-assistants/codex-assistant/skills/agent-assistant-review-fast/SKILL.md +18 -0
  190. package/code-assistants/codex-assistant/skills/agent-assistant-review-fast/agents/openai.yaml +4 -0
  191. package/code-assistants/codex-assistant/skills/agent-assistant-review-hard/SKILL.md +18 -0
  192. package/code-assistants/codex-assistant/skills/agent-assistant-review-hard/agents/openai.yaml +4 -0
  193. package/code-assistants/codex-assistant/skills/agent-assistant-review-team/SKILL.md +18 -0
  194. package/code-assistants/codex-assistant/skills/agent-assistant-review-team/agents/openai.yaml +4 -0
  195. package/code-assistants/codex-assistant/skills/agent-assistant-test/SKILL.md +18 -0
  196. package/code-assistants/codex-assistant/skills/agent-assistant-test/agents/openai.yaml +4 -0
  197. package/code-assistants/codex-assistant/skills/agent-assistant-test-fast/SKILL.md +18 -0
  198. package/code-assistants/codex-assistant/skills/agent-assistant-test-fast/agents/openai.yaml +4 -0
  199. package/code-assistants/codex-assistant/skills/agent-assistant-test-focus/SKILL.md +18 -0
  200. package/code-assistants/codex-assistant/skills/agent-assistant-test-focus/agents/openai.yaml +4 -0
  201. package/code-assistants/codex-assistant/skills/agent-assistant-test-hard/SKILL.md +18 -0
  202. package/code-assistants/codex-assistant/skills/agent-assistant-test-hard/agents/openai.yaml +4 -0
  203. package/code-assistants/codex-assistant/skills/agent-assistant-test-team/SKILL.md +18 -0
  204. package/code-assistants/codex-assistant/skills/agent-assistant-test-team/agents/openai.yaml +4 -0
  205. package/code-assistants/copilot-assistant/agent-assistant.agent.md +149 -51
  206. package/code-assistants/cursor-assistant/.cursorrules +5 -5
  207. package/code-assistants/cursor-assistant/rules/agent-assistant.mdc +5 -5
  208. package/commands/brainstorm/team.md +295 -0
  209. package/commands/brainstorm.md +5 -0
  210. package/commands/code/team.md +456 -0
  211. package/commands/code.md +5 -0
  212. package/commands/cook/team.md +609 -0
  213. package/commands/cook.md +5 -0
  214. package/commands/debug/team.md +396 -0
  215. package/commands/debug.md +5 -0
  216. package/commands/design/team.md +567 -0
  217. package/commands/design.md +5 -0
  218. package/commands/fix/team.md +596 -0
  219. package/commands/fix.md +5 -0
  220. package/commands/plan/team.md +358 -0
  221. package/commands/plan.md +5 -0
  222. package/commands/report/team.md +502 -0
  223. package/commands/report.md +5 -0
  224. package/commands/review/team.md +353 -0
  225. package/commands/review.md +5 -0
  226. package/commands/test/team.md +303 -0
  227. package/commands/test.md +5 -0
  228. package/documents/SMART-SKILL-ORCHESTRATION-BLUEPRINT.md +4 -2
  229. package/documents/business/business-prd.md +2 -1
  230. package/documents/business/business-workflows.md +2 -2
  231. package/documents/knowledge-architecture.md +13 -12
  232. package/documents/knowledge-domain.md +2 -2
  233. package/documents/knowledge-overview.md +2 -2
  234. package/documents/knowledge-source-base.md +11 -7
  235. package/package.json +5 -2
  236. package/rules/AGENTS.md +55 -0
  237. package/rules/CORE.md +27 -13
  238. package/rules/PHASES.md +58 -0
  239. package/rules/TEAMS.md +530 -0
@@ -0,0 +1,396 @@
1
+ ---
2
+ description: "🔺 Team Debug — Golden Triangle adversarial collaboration for maximum quality investigation"
3
+ version: "2.0"
4
+ category: debugging
5
+ execution-mode: execute
6
+ ---
7
+
8
+ # /debug:team — Golden Triangle Bug Investigation
9
+
10
+ > **MISSION**: Maximum quality debugging through adversarial collaboration.
11
+ > Each phase spawns a **Golden Triangle** of 3 agents: Tech Lead (coordinator),
12
+ > Executor (investigator), Reviewer (devil's advocate). Findings are released ONLY
13
+ > upon consensus after debate. Investigation only — no fixing.
14
+
15
+ <issue>$ARGUMENTS</issue>
16
+
17
+ ---
18
+
19
+ ## 🛑 PRE-FLIGHT (DO FIRST — BLOCKS PHASE 1)
20
+
21
+ **LOAD now** (in order; path `./rules/` or `~/.{TOOL}/skills/agent-assistant/rules/`):
22
+
23
+ 1. CORE.md — Identity, Laws, Routing
24
+ 2. PHASES.md — Phase Execution
25
+ 3. AGENTS.md — Tiered Execution
26
+ 4. **TEAMS.md** — Golden Triangle protocol (MANDATORY)
27
+
28
+ **⛔ Do not run Phase 1 until all are loaded.** Follow **all** rules in those files; they override any conflicting instructions in this file.
29
+
30
+ **Skills Resolution**: Load `SKILLS.md` on-demand for fitness calculation and dynamic discovery.
31
+
32
+ ---
33
+
34
+ ## 🔀 TIERED EXECUTION
35
+
36
+ > Reference: AGENTS.md (Tiered Execution) + TEAMS.md (Golden Triangle Protocol)
37
+
38
+ | Tier | When | Action |
39
+ | ---------- | ----------------------------- | ------------------------------------------------------------------------- |
40
+ | **TIER 1** | runSubagent/Agent Tool EXISTS | Orchestrator spawns Tech Lead → Tech Lead spawns Executor + Reviewer |
41
+ | **TIER 2** | Tool MISSING or SYSTEM error | EMBODY Tech Lead → EMBODY Executor → EMBODY Reviewer → EMBODY Tech Lead |
42
+
43
+ **❌ Anti-Lazy**: Never use TIER 2 when TIER 1 tool available.
44
+
45
+ **TIER 2 Golden Triangle Embodiment** (per TEAMS.md):
46
+ ```
47
+ 1. EMBODY Tech Lead → decompose → Shared Task List → dispatch
48
+ 2. EMBODY Executor → investigate → post SUBMISSION to Mailbox
49
+ 3. EMBODY Reviewer → review → post REVIEW to Mailbox
50
+ 4. IF FAIL → EMBODY Executor → fix/defend → EMBODY Reviewer → re-check (max 3 rounds)
51
+ 5. EMBODY Tech Lead → arbitrate if needed → post DECISION → synthesize
52
+ ```
53
+
54
+ ---
55
+
56
+ ## 📬 MAILBOX & DELIVERABLES
57
+
58
+ **Mailbox Location**: `./reports/MAILBOX-{date}.md` — All agents APPEND only, never overwrite.
59
+ **Message Types**: TASK_ASSIGNMENT | SUBMISSION | REVIEW | DEFENSE | RESUBMISSION | APPROVAL | ESCALATION | ARBITRATION | DECISION
60
+ **Full protocol**: See TEAMS.md § Mailbox Protocol
61
+
62
+ **Deliverable Files**:
63
+
64
+ | Phase | Output |
65
+ | ------------------ | ---------------------------------------------- |
66
+ | P1: Symptoms | `./reports/debugs/SYMPTOMS-{issue}.md` |
67
+ | P2: Hypotheses | `./reports/debugs/HYPOTHESES-{issue}.md` |
68
+ | P3: Evidence | `./reports/debugs/EVIDENCE-{issue}.md` |
69
+ | P4: Final Report | `./reports/debugs/DEBUG-REPORT-{issue}.md` |
70
+ | ALL Phases | `./reports/MAILBOX-{date}.md` |
71
+
72
+ All files in `./reports/` → English only.
73
+
74
+ ---
75
+
76
+ ## 🔗 PHASE DEPENDENCIES
77
+
78
+ | Phase | Requires | Blocking |
79
+ | ------------------------------ | --------------------------------- | ----------- |
80
+ | P1: Symptom Collection | User issue description | No |
81
+ | P2: Hypothesis Generation | Symptoms from P1 | **YES** |
82
+ | P3: Hypothesis Testing | Hypotheses from P2 | **YES** |
83
+ | P4: Root Cause Report | Evidence from P3 | **YES** |
84
+
85
+ **⛔ Blocking**: If input missing → STOP → Create it first → Resume
86
+
87
+ ---
88
+
89
+ ## ⛔ INCREMENTAL EXECUTION (MANDATORY)
90
+
91
+ One phase at a time. Within each phase follow the **Golden Triangle Loop** (per TEAMS.md):
92
+
93
+ ```
94
+ 1. Tech Lead decomposes → Shared Task List → TASK_ASSIGNMENT to Mailbox
95
+ 2. Executor investigates → SUBMISSION to Mailbox (evidence, confidence, reasoning)
96
+ 3. Reviewer critiques → REVIEW to Mailbox (PASS or FAIL with findings)
97
+ 4. IF FAIL → debate loop: fix/defend → re-review (max 3 rounds → ESCALATION)
98
+ 5. IF PASS → APPROVAL → Tech Lead posts DECISION with consensus stamp
99
+ ```
100
+
101
+ **Consensus Stamp** (required to close each phase):
102
+ ```
103
+ ✅ CONSENSUS: {TechLead} ✓ | {Executor} ✓ | {Reviewer} ✓
104
+ ```
105
+
106
+ ---
107
+
108
+ ## 🎭 Phase 1: SYMPTOM COLLECTION — 🔺 GOLDEN TRIANGLE
109
+
110
+ | Role | Agent | Mission |
111
+ | --------- | ------------------------------------ | ----------------------------------------------------------------- |
112
+ | Tech Lead | `debugger` | Decompose: categorize symptoms, define investigation areas |
113
+ | Executor | `scouter` | Execute: collect error logs, stack traces, reproduction steps, environment data |
114
+ | Reviewer | `researcher` (Devil's Advocate) | Challenge: are symptoms complete? Are we looking at the right system? Missing data? |
115
+
116
+ **Triangle Loop**:
117
+ 1. `debugger` decomposes into areas: error logs, stack traces, reproduction steps, environment data, user-reported behavior, recent changes
118
+ 2. `debugger` posts TASK_ASSIGNMENT → dispatches to `scouter`
119
+ 3. `scouter` collects evidence → posts SUBMISSION per area:
120
+ - Exact error messages and stack traces
121
+ - Steps to reproduce (confirmed or attempted)
122
+ - Environment details (OS, runtime versions, config)
123
+ - Recent code changes in affected area (git log)
124
+ - Related log entries and monitoring data
125
+ 4. `researcher` reviews each SUBMISSION → posts REVIEW:
126
+ - Are we looking at the right system/component?
127
+ - Are symptoms complete or are we missing data sources?
128
+ - Could these symptoms indicate a different system entirely?
129
+ - Are reproduction steps reliable and deterministic?
130
+ 5. If FAIL → `scouter` collects additional data or defends → RESUBMISSION/DEFENSE → max 3 rounds
131
+ 6. `debugger` synthesizes approved symptom data into unified symptom catalog
132
+
133
+ **Deliverable**: `./reports/debugs/SYMPTOMS-{issue}.md`
134
+ **Exit Criteria**: All symptoms documented, reproduction confirmed, environment captured, data sources exhausted
135
+ **Consensus**: ✅ CONSENSUS: debugger ✓ | scouter ✓ | researcher ✓
136
+
137
+ ---
138
+
139
+ ## 🎭 Phase 2: HYPOTHESIS GENERATION — 🔺 GOLDEN TRIANGLE
140
+
141
+ | Role | Agent | Mission |
142
+ | --------- | ------------------------------------ | ----------------------------------------------------------------- |
143
+ | Tech Lead | `debugger` | Coordinate: generate hypothesis tree, prioritize investigation paths |
144
+ | Executor | `researcher` | Execute: research similar issues, known bugs, pattern matching |
145
+ | Reviewer | `brainstormer` (Devil's Advocate) | Challenge: are hypotheses sufficient? What if root cause is elsewhere? Propose alternatives |
146
+
147
+ **Prerequisite**: **READ** `./reports/debugs/SYMPTOMS-{issue}.md`
148
+
149
+ **Triangle Loop**:
150
+ 1. `debugger` reads symptoms → decomposes into areas: primary suspects, secondary suspects, environmental causes, interaction effects, known bug patterns
151
+ 2. `debugger` posts TASK_ASSIGNMENT → dispatches to `researcher`
152
+ 3. `researcher` researches each area → posts SUBMISSION:
153
+ - Similar issues in issue trackers, forums, CVE databases
154
+ - Known bugs in dependencies matching symptom pattern
155
+ - Historical incidents with similar symptoms in this codebase
156
+ - Ranked hypothesis list with confidence levels and reasoning
157
+ 4. `brainstormer` reviews each SUBMISSION → posts REVIEW:
158
+ - Are we anchored on the obvious? What if root cause is completely elsewhere?
159
+ - Are there hypotheses that explain ALL symptoms, not just some?
160
+ - What about timing-related causes (race conditions, timeouts)?
161
+ - Could this be a combination of multiple smaller issues?
162
+ - Are confidence levels justified or wishful thinking?
163
+ - **MUST propose at least 2 alternative hypotheses not yet considered**
164
+ 5. If FAIL → `researcher` expands research or defends → RESUBMISSION/DEFENSE → max 3 rounds
165
+ 6. `debugger` synthesizes approved hypotheses into prioritized hypothesis tree
166
+
167
+ **Deliverable**: `./reports/debugs/HYPOTHESES-{issue}.md`
168
+ **Exit Criteria**: Hypothesis tree complete, alternatives explored, priorities assigned, investigation paths defined
169
+ **Consensus**: ✅ CONSENSUS: debugger ✓ | researcher ✓ | brainstormer ✓
170
+
171
+ ---
172
+
173
+ ## 🎭 Phase 3: HYPOTHESIS TESTING — 🔺 GOLDEN TRIANGLE (CRITICAL)
174
+
175
+ > **THIS IS THE MOST CRITICAL PHASE.** Every piece of evidence is debated. No conclusions without proof.
176
+
177
+ | Role | Agent | Mission |
178
+ | --------- | ----------------------------------------------- | ------------------------------------------------------------ |
179
+ | Tech Lead | `debugger` | Decompose: assign hypothesis validation tasks, track progress|
180
+ | Executor | `scouter` + `backend-engineer` | Execute: trace code paths, add logging, test hypotheses with evidence |
181
+ | Reviewer | `reviewer` | Challenge: is evidence conclusive? Correlation vs causation? Solving the right problem? |
182
+
183
+ **Prerequisite**: **READ** `./reports/debugs/HYPOTHESES-{issue}.md`
184
+
185
+ ### GOLDEN TRIANGLE EVIDENCE LOOP (CRITICAL — Step by Step)
186
+
187
+ ```
188
+ ╔══════════════════════════════════════════════════════════════════════╗
189
+ ║ PHASE 3: EVIDENCE LOOP — FOLLOW EXACTLY ║
190
+ ╠══════════════════════════════════════════════════════════════════════╣
191
+ ║ ║
192
+ ║ STEP 1: Tech Lead reads HYPOTHESES-{issue}.md ║
193
+ ║ ────────────────────────────────────────────── ║
194
+ ║ - Load hypothesis tree, identify all needing validation ║
195
+ ║ - Determine ordering (highest priority first) ║
196
+ ║ ║
197
+ ║ STEP 2: Tech Lead creates Shared Task List ║
198
+ ║ ────────────────────────────────────────────── ║
199
+ ║ - One task per hypothesis ║
200
+ ║ - Each specifies: what evidence would CONFIRM or REFUTE ║
201
+ ║ - Format: [ID] [Status] [Hypothesis] [Evidence Needed] [Method] ║
202
+ ║ - Post as TASK_ASSIGNMENT to Mailbox ║
203
+ ║ ║
204
+ ║ STEP 3: FOR EACH HYPOTHESIS — Executor investigates ║
205
+ ║ ────────────────────────────────────────────── ║
206
+ ║ a. Executor reads TASK_ASSIGNMENT from Mailbox ║
207
+ ║ b. scouter traces code paths, maps execution flow ║
208
+ ║ c. backend-engineer inspects logic, adds diagnostic logging ║
209
+ ║ d. Executor posts SUBMISSION to Mailbox: ║
210
+ ║ ┌──────────────────────────────────────────┐ ║
211
+ ║ │ SUBMISSION │ ║
212
+ ║ │ Hypothesis: {ID} — {statement} │ ║
213
+ ║ │ Verdict: CONFIRMED / REFUTED / INCONCLUSIVE│ ║
214
+ ║ │ Evidence collected: │ ║
215
+ ║ │ - {evidence item 1 with source} │ ║
216
+ ║ │ - {evidence item 2 with source} │ ║
217
+ ║ │ Code paths examined: {list of files:lines}│ ║
218
+ ║ │ Reproduction result: {what happened} │ ║
219
+ ║ │ Confidence: {HIGH/MEDIUM/LOW} │ ║
220
+ ║ │ Reasoning: {why this verdict} │ ║
221
+ ║ └──────────────────────────────────────────┘ ║
222
+ ║ ║
223
+ ║ STEP 4: Reviewer reviews each SUBMISSION ║
224
+ ║ ────────────────────────────────────────────── ║
225
+ ║ e. Reviewer checks against ALL 5 evidence dimensions: ║
226
+ ║ ┌──────────────────────────────────────────────────────┐ ║
227
+ ║ │ 1. CAUSATION — Is this cause or just correlation? │ ║
228
+ ║ │ 2. COMPLETENESS — Does evidence cover all symptoms? │ ║
229
+ ║ │ 3. REPRODUCIBILITY — Can findings be independently │ ║
230
+ ║ │ reproduced? Or one-off observation? │ ║
231
+ ║ │ 4. ALTERNATIVE EXPLANATIONS — Could something else │ ║
232
+ ║ │ explain the same evidence? │ ║
233
+ ║ │ 5. CONFIDENCE CALIBRATION — Is stated confidence │ ║
234
+ ║ │ justified by evidence strength? │ ║
235
+ ║ └──────────────────────────────────────────────────────┘ ║
236
+ ║ f. Reviewer posts REVIEW: PASS or FAIL with findings table ║
237
+ ║ ║
238
+ ║ STEP 5: IF FAIL — Evidence Debate Loop (max 3 rounds) ║
239
+ ║ ────────────────────────────────────────────── ║
240
+ ║ g. Executor reads findings from Mailbox ║
241
+ ║ h. For EACH finding: ║
242
+ ║ - If VALID → Collect additional evidence ║
243
+ ║ - If DISPUTED → DEFENSE with counter-evidence ║
244
+ ║ i. Executor posts RESUBMISSION / DEFENSE: ║
245
+ ║ ┌──────────────────────────────────────────┐ ║
246
+ ║ │ RESUBMISSION / DEFENSE │ ║
247
+ ║ │ Hypothesis: {ID} | Round: {1/2/3} │ ║
248
+ ║ │ New evidence collected: {list} │ ║
249
+ ║ │ Defended findings: {list + counter-evidence}│ ║
250
+ ║ │ Updated verdict: {CONFIRMED/REFUTED/INCONCLUSIVE}│ ║
251
+ ║ └──────────────────────────────────────────┘ ║
252
+ ║ j. Reviewer re-reviews → back to step (e) ║
253
+ ║ k. After round 3 → ESCALATION → Tech Lead ARBITRATION ║
254
+ ║ ║
255
+ ║ STEP 6: IF PASS → APPROVAL → mark ✅ → next hypothesis ║
256
+ ║ ║
257
+ ║ STEP 7: After ALL hypotheses tested ║
258
+ ║ ───────────────────────────────── ║
259
+ ║ l. Tech Lead verifies coherence: ║
260
+ ║ - Do confirmed hypotheses explain ALL symptoms? ║
261
+ ║ - Are refuted hypotheses truly eliminated? ║
262
+ ║ - Any contradictions between evidence sets? ║
263
+ ║ m. Tech Lead posts DECISION: ║
264
+ ║ ┌──────────────────────────────────────────┐ ║
265
+ ║ │ DECISION — Phase 3: Hypothesis Testing │ ║
266
+ ║ │ Hypotheses tested: {count}/{total} │ ║
267
+ ║ │ Confirmed: {list} | Refuted: {list} │ ║
268
+ ║ │ Inconclusive: {list} │ ║
269
+ ║ │ Debates: {count} | Arbitrations: {count} │ ║
270
+ ║ │ ✅ CONSENSUS: debugger ✓ | │ ║
271
+ ║ │ scouter/backend-engineer ✓ | reviewer ✓│ ║
272
+ ║ └──────────────────────────────────────────┘ ║
273
+ ╚══════════════════════════════════════════════════════════════════════╝
274
+ ```
275
+
276
+ ### STRICT EVIDENCE STANDARDS (ENFORCED BY REVIEWER)
277
+
278
+ ```
279
+ 1. NO CONCLUSIONS WITHOUT EVIDENCE — every verdict MUST cite specific evidence
280
+ 2. CORRELATION ≠ CAUSATION — Reviewer explicitly challenges:
281
+ "Does this evidence PROVE causation or just show correlation?"
282
+ 3. REPRODUCTION REQUIRED — CONFIRMED hypotheses must be reproducible
283
+ 4. ALTERNATIVE EXPLANATIONS — Reviewer must propose at least one alternative
284
+ for each CONFIRMED hypothesis. Executor must address it.
285
+ 5. Unsupported claims → automatic FAIL:
286
+ Severity: CRITICAL | Action: "Provide evidence or downgrade to INCONCLUSIVE"
287
+ ```
288
+
289
+ **Deliverable**: `./reports/debugs/EVIDENCE-{issue}.md`
290
+ **Exit Criteria**: All hypotheses tested with evidence, verdicts debated and consensus-approved, root cause identified or narrowed
291
+ **Consensus**: ✅ CONSENSUS: debugger ✓ | scouter/backend-engineer ✓ | reviewer ✓
292
+
293
+ ---
294
+
295
+ ## 🎭 Phase 4: ROOT CAUSE REPORT — 🔺 GOLDEN TRIANGLE
296
+
297
+ | Role | Agent | Mission |
298
+ | --------- | ------------------------------------ | ----------------------------------------------------------------- |
299
+ | Tech Lead | `debugger` | Synthesize: compile root cause analysis, recommend fix approaches |
300
+ | Executor | `reporter` | Execute: write formal DEBUG-REPORT-{issue}.md |
301
+ | Reviewer | `tech-lead` | Challenge: is analysis complete? Is fix recommendation sensible? Impact assessment? |
302
+
303
+ **Prerequisite**: **READ** SYMPTOMS + HYPOTHESES + EVIDENCE files
304
+
305
+ **Triangle Loop**:
306
+ 1. `debugger` reads all prior deliverables → decomposes into: executive summary, symptom timeline, hypothesis tree results, root cause chain, impact analysis, fix recommendations, prevention recommendations
307
+ 2. `debugger` posts TASK_ASSIGNMENT → dispatches to `reporter`
308
+ 3. `reporter` writes formal report → posts SUBMISSION per section:
309
+ - Executive summary (2-3 sentences, non-technical)
310
+ - Symptom timeline (chronological, with evidence links)
311
+ - Hypothesis tree (tested, confirmed/refuted, with evidence)
312
+ - Root cause chain (trigger → system propagation → visible symptom)
313
+ - Impact analysis (affected users, data integrity, stability)
314
+ - Recommended fix approaches (ranked by risk/effort/impact)
315
+ - Prevention recommendations (how to avoid recurrence)
316
+ 4. `tech-lead` reviews each section → posts REVIEW:
317
+ - Is root cause analysis technically sound?
318
+ - Does causal chain account for all observed symptoms?
319
+ - Are fix recommendations feasible within existing architecture?
320
+ - Is impact assessment accurate — not understated or overstated?
321
+ - Would a new engineer understand this without prior context?
322
+ 5. Debate loop if FAIL → `reporter` revises or defends → max 3 rounds
323
+ 6. `debugger` synthesizes approved sections into final report
324
+
325
+ **Deliverable**: `./reports/debugs/DEBUG-REPORT-{issue}.md`
326
+ **Exit Criteria**: Root cause documented, evidence chain complete, fix approaches recommended, impact assessed, report validated
327
+ **Consensus**: ✅ CONSENSUS: debugger ✓ | reporter ✓ | tech-lead ✓
328
+
329
+ ---
330
+
331
+ ## 🛡️ VERIFICATION CHECKPOINT
332
+
333
+ > **⛔ BLOCKING**: Load Context Gate protocol NOW before proceeding.
334
+ >
335
+ > **LOAD**: `rules/CONTEXT-GATE.md` — Execute HARD MODE (Debug variant)
336
+
337
+ ```yaml
338
+ context_gate_execution:
339
+ mode: "HARD (User Choice)"
340
+ trigger: "After Phase 4 (Root Cause Report) completes"
341
+ protocol: "Follow rules/CONTEXT-GATE.md § HARD MODE § debug_hard_variant"
342
+ variant_adjustments:
343
+ report_file: "DEBUG-REPORT-{issue}.md"
344
+ handoff_to: "/fix:team OR /fix:hard"
345
+ ```
346
+
347
+ ### ⚡ OPTIONS (Present to User)
348
+
349
+ ```markdown
350
+ ## 🛡️ Context Optimization Checkpoint
351
+
352
+ **Team Debug Investigation Complete** — Root cause identified, fix approaches recommended.
353
+
354
+ | Option | Action | Description |
355
+ |--------|--------|-------------|
356
+ | **1. 🚀 Clear context & Fix** | `RECOMMENDED` | Fresh start with debug report → `/fix:team` or `/fix:hard` |
357
+ | **2. ⏸️ Review First** | `SAFE` | Show report summary, wait for approval before proceeding |
358
+ | **3. ⚠️ Continue (No Clear)** | `RISKY` | Keep debug history (may cause fix drift from noisy context) |
359
+
360
+ ⏳ Awaiting selection...
361
+ ```
362
+
363
+ **DO NOT proceed past this checkpoint until user selects option.**
364
+
365
+ ---
366
+
367
+ ## ✅ COMPLETION
368
+
369
+ Present final investigation report with consensus stamps from ALL phases:
370
+
371
+ ```markdown
372
+ # 🔺 Golden Triangle Debug Report: {issue}
373
+
374
+ ## Phase Results
375
+ | Phase | Triangle | Consensus | Rounds |
376
+ |-------|----------|-----------|--------|
377
+ | P1: Symptom Collection | debugger / scouter / researcher | ✅ | {n} |
378
+ | P2: Hypothesis Generation | debugger / researcher / brainstormer | ✅ | {n} |
379
+ | P3: Hypothesis Testing | debugger / scouter+backend-engineer / reviewer | ✅ | {n} |
380
+ | P4: Root Cause Report | debugger / reporter / tech-lead | ✅ | {n} |
381
+
382
+ ## Debate Summary
383
+ - Total submissions: {count}
384
+ - First-pass approvals: {count}
385
+ - Debates triggered: {count}
386
+ - Arbitrations needed: {count}
387
+
388
+ ## Mailbox Reference
389
+ Full debate history: `./reports/MAILBOX-{date}.md`
390
+
391
+ ## Next Actions
392
+ 1. ✅ **Root Cause** — Identified (triangle-validated across all phases)
393
+ 2. 📊 **Report** — `./reports/debugs/DEBUG-REPORT-{issue}.md`
394
+ 3. 🔧 **Fix** → `/fix:team` or `/fix:hard`
395
+ 4. 📝 **Document** → `/docs:core`
396
+ ```
package/commands/debug.md CHANGED
@@ -36,6 +36,9 @@ IF issue is complex (intermittent, unclear cause):
36
36
  IF issue is complex AND clean fix handoff is critical:
37
37
  → Route to /debug:focus
38
38
 
39
+ IF issue is complex AND maximum quality with team collaboration needed:
40
+ → Route to /debug:team
41
+
39
42
  IF unsure:
40
43
  → Default to /debug:fast (escalate if needed)
41
44
  ```
@@ -49,6 +52,7 @@ IF unsure:
49
52
  | `/debug:fast` | Quick diagnosis for simple bugs |
50
53
  | `/debug:hard` | Deep investigation for complex issues |
51
54
  | `/debug:focus` | Deep investigation with **enforced context optimization** |
55
+ | `/debug:team` | Maximum quality with parallel agent team collaboration |
52
56
 
53
57
  ---
54
58
 
@@ -64,6 +68,7 @@ IF unsure:
64
68
  1. ⚡ **Fast** → `/debug:fast` — Quick diagnosis
65
69
  2. ⚡⚡⚡ **Hard** → `/debug:hard` — Deep investigation
66
70
  3. 🔒 **Focus** → `/debug:focus` — Deep investigation with **automatic context clearing** (clean fix handoff)
71
+ 4. 👥 **Team** → `/debug:team` — Full team collaboration (parallel agents, maximum quality)
67
72
 
68
73
  ⏳ Awaiting selection...
69
74
  ```