@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,596 @@
1
+ ---
2
+ description: "🔺 Team Fix — Golden Triangle adversarial collaboration for maximum quality issue resolution"
3
+ version: "2.0"
4
+ category: debugging
5
+ execution-mode: execute
6
+ ---
7
+
8
+ # /fix:team — Golden Triangle Issue Resolution
9
+
10
+ > **MISSION**: Maximum quality issue resolution through adversarial collaboration.
11
+ > Each phase spawns a **Golden Triangle** of 3 agents: Tech Lead (coordinator),
12
+ > Executor (implementer), Reviewer (devil's advocate). Output is released ONLY
13
+ > upon consensus after debate.
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 task → produce Shared Task List → dispatch
48
+ 2. EMBODY Executor → implement assigned tasks → post SUBMISSION to Mailbox
49
+ 3. EMBODY Reviewer → review submissions → post REVIEW to Mailbox
50
+ 4. IF FAIL → EMBODY Executor again → fix/defend → EMBODY Reviewer → re-check
51
+ 5. Repeat steps 3–4 max 3 rounds
52
+ 6. EMBODY Tech Lead → arbitrate if needed → post DECISION → synthesize output
53
+ ```
54
+
55
+ ---
56
+
57
+ ## 📬 MAILBOX — Central Communication Hub
58
+
59
+ **Location**: `./reports/MAILBOX-{date}.md`
60
+
61
+ All 3 triangle agents READ from and APPEND to this file. Never overwrite — append only.
62
+
63
+ **Message Format**:
64
+ ```markdown
65
+ ---
66
+ ## [{TIMESTAMP}] {MESSAGE_TYPE} | {AGENT} → {TARGET}
67
+ **Phase**: {phase number}
68
+ **Task**: {task ID from Shared Task List}
69
+ **Content**:
70
+ {message body}
71
+ ---
72
+ ```
73
+
74
+ **Message Types**:
75
+
76
+ | Type | Sender | Receiver | Purpose |
77
+ | ----------------- | --------- | --------- | ---------------------------------------------- |
78
+ | TASK_ASSIGNMENT | Tech Lead | Executor | Assign task with requirements and context |
79
+ | SUBMISSION | Executor | Reviewer | Submit completed work for review |
80
+ | REVIEW | Reviewer | Executor | Review result: PASS or FAIL with findings |
81
+ | DEFENSE | Executor | Reviewer | Defend implementation against FAIL findings |
82
+ | RESUBMISSION | Executor | Reviewer | Resubmit after fixing FAIL findings |
83
+ | APPROVAL | Reviewer | Tech Lead | Confirm task passes all review criteria |
84
+ | ESCALATION | Any | Tech Lead | Escalate unresolvable disagreement |
85
+ | ARBITRATION | Tech Lead | All | Tech Lead resolves dispute with binding decision|
86
+ | DECISION | Tech Lead | All | Final phase decision with consensus stamp |
87
+
88
+ ---
89
+
90
+ ## 📁 DELIVERABLE FILES
91
+
92
+ | Phase / Team | Output |
93
+ | ------------------ | ---------------------------------------------- |
94
+ | Phase 1 (Invest.) | `./reports/debugs/INVESTIGATION-{issue}.md` |
95
+ | Phase 2 (RCA) | `./reports/debugs/DEBUG-{issue}.md` |
96
+ | Phase 3 (Plan) | `./reports/plans/PLAN-{issue}.md` |
97
+ | Phase 5 (Test) | `./reports/qa/QA-{issue}.md` |
98
+ | ALL Phases | `./reports/MAILBOX-{date}.md` |
99
+
100
+ All files in `./reports/` → English only.
101
+
102
+ ---
103
+
104
+ ## 🔗 PHASE DEPENDENCIES
105
+
106
+ | Phase | Requires | Blocking |
107
+ | ---------------------------- | -------------------------------- | ----------- |
108
+ | P1: Investigation | User issue report | No |
109
+ | P2: Root Cause Analysis | P1 investigation findings | **YES** |
110
+ | P3: Fix Planning | P2 confirmed root cause | **YES** |
111
+ | 🛡️ CHECKPOINT | PLAN file + User approval | **YES** |
112
+ | P4: Implementation | **PLAN file + User approval** | **YES** |
113
+ | P5: Testing & Verification | PLAN + Code changes | **YES** |
114
+
115
+ **⛔ Blocking**: If input missing → STOP → Create it first → Resume
116
+
117
+ ---
118
+
119
+ ## ⛔ INCREMENTAL EXECUTION (MANDATORY)
120
+
121
+ One phase at a time. Within each phase:
122
+
123
+ ```
124
+ 1. Spawn Golden Triangle (Tech Lead + Executor + Reviewer)
125
+ 2. Tech Lead decomposes → publishes Shared Task List
126
+ 3. Executor implements → posts SUBMISSION to Mailbox
127
+ 4. Reviewer critiques → posts REVIEW to Mailbox
128
+ 5. Debate loop: fix/defend → re-review (max 3 rounds)
129
+ 6. Consensus reached → Tech Lead posts DECISION → Phase output released
130
+ ```
131
+
132
+ **Consensus Stamp Format** (required to close each phase):
133
+ ```
134
+ ✅ CONSENSUS: {TechLead} ✓ | {Executor} ✓ | {Reviewer} ✓
135
+ ```
136
+
137
+ Format: rules/PHASES.md § Phase output structure + rules/TEAMS.md § Golden Triangle Phase Output Format.
138
+
139
+ ---
140
+
141
+ ## 🔺 GOLDEN TRIANGLE LOOP — Universal Protocol
142
+
143
+ > Every phase below follows this exact loop. Deviations are PROHIBITED.
144
+
145
+ ```
146
+ ┌─────────────────────────────────────────────────────────────────────┐
147
+ │ GOLDEN TRIANGLE LOOP │
148
+ │ │
149
+ │ 1. Tech Lead decomposes phase goal into tasks │
150
+ │ → Publishes Shared Task List │
151
+ │ → Posts TASK_ASSIGNMENT to Mailbox for each task │
152
+ │ │
153
+ │ 2. Executor works each task │
154
+ │ → Posts SUBMISSION to Mailbox per task │
155
+ │ → Includes: what was done, files/artifacts, approach, notes │
156
+ │ │
157
+ │ 3. Reviewer reviews each SUBMISSION │
158
+ │ → Posts REVIEW to Mailbox: PASS or FAIL │
159
+ │ → FAIL includes: findings table, severity, required actions │
160
+ │ │
161
+ │ 4. IF FAIL (debate loop, max 3 rounds): │
162
+ │ → Executor reads findings │
163
+ │ → For each finding: Fix (if valid) or DEFENSE (if disputed) │
164
+ │ → Posts RESUBMISSION or DEFENSE to Mailbox │
165
+ │ → Reviewer re-reviews → back to step 3 │
166
+ │ → After 3 rounds without resolution → ESCALATION to Tech Lead │
167
+ │ │
168
+ │ 5. IF PASS: │
169
+ │ → Reviewer posts APPROVAL to Mailbox │
170
+ │ → Task marked ✅ in Shared Task List │
171
+ │ │
172
+ │ 6. After ALL tasks complete: │
173
+ │ → Tech Lead verifies integration/coherence │
174
+ │ → Tech Lead posts DECISION with consensus stamp │
175
+ │ → Phase output released │
176
+ │ │
177
+ │ OUTPUT: ✅ CONSENSUS: TechLead ✓ | Executor ✓ | Reviewer ✓ │
178
+ └─────────────────────────────────────────────────────────────────────┘
179
+ ```
180
+
181
+ ---
182
+
183
+ ## 🎭 Phase 1: INVESTIGATION — 🔺 GOLDEN TRIANGLE
184
+
185
+ | Role | Agent | Mission |
186
+ | --------- | ------------------------------------ | ---------------------------------------------------------- |
187
+ | Tech Lead | `debugger` | Decompose: triage bug, define investigation areas, coordinate |
188
+ | Executor | `scouter` | Execute: codebase analysis, trace error paths, identify root cause candidates |
189
+ | Reviewer | `researcher` (Devil's Advocate) | Challenge: question root cause hypotheses, find alternative explanations |
190
+
191
+ **Triangle Loop**:
192
+ 1. `debugger` triages the issue → decomposes into investigation areas: reproduction steps, error tracing, code path analysis, environmental factors
193
+ 2. `debugger` posts TASK_ASSIGNMENT to Mailbox for each area → dispatches to `scouter`
194
+ 3. `scouter` investigates each area deeply → posts SUBMISSION to Mailbox with per-area findings:
195
+ - Reproduction results (consistent? intermittent?)
196
+ - Error trace with call stack analysis
197
+ - Code paths traversed and fault candidates
198
+ - Recent changes near fault zone (git blame, recent commits)
199
+ - Environmental variables (config, dependencies, state)
200
+ 4. `researcher` reviews each SUBMISSION → posts REVIEW to Mailbox:
201
+ - Are the root cause candidates plausible or is correlation confused with causation?
202
+ - Are there alternative explanations not yet explored?
203
+ - Is the evidence chain complete or are there gaps?
204
+ - Could the symptoms mask a deeper systemic issue?
205
+ 5. If REVIEW = FAIL → `scouter` addresses gaps or defends findings → posts RESUBMISSION/DEFENSE
206
+ 6. `researcher` re-reviews → max 3 rounds → ESCALATION to `debugger` if unresolved
207
+ 7. `debugger` synthesizes all approved findings into unified investigation report
208
+
209
+ **Deliverable**: `./reports/debugs/INVESTIGATION-{issue}.md`
210
+ **Exit Criteria**: Bug reproduced, error paths traced, root cause candidates identified, hypotheses challenged, evidence chain documented
211
+ **Consensus**: ✅ CONSENSUS: debugger ✓ | scouter ✓ | researcher ✓
212
+
213
+ ---
214
+
215
+ ## 🎭 Phase 2: ROOT CAUSE ANALYSIS — 🔺 GOLDEN TRIANGLE
216
+
217
+ | Role | Agent | Mission |
218
+ | --------- | -------------------------------------------------------- | ---------------------------------------------------------- |
219
+ | Tech Lead | `debugger` | Synthesize investigation → confirm root cause → plan fix approach |
220
+ | Executor | `backend-engineer` / `frontend-engineer` (context-dependent) | Execute: deep-dive into root cause, validate hypothesis with code evidence |
221
+ | Reviewer | `reviewer` | Challenge: verify root cause is correct, check for related issues, regression risk |
222
+
223
+ **Executor Selection**:
224
+ ```
225
+ IF bug is in server logic, API, database, middleware → backend-engineer
226
+ IF bug is in UI rendering, state, events, client logic → frontend-engineer
227
+ IF unclear → debugger (Tech Lead) decides based on P1 investigation findings
228
+ ```
229
+
230
+ **Prerequisite**: **READ** `./reports/debugs/INVESTIGATION-{issue}.md`
231
+
232
+ **Triangle Loop**:
233
+ 1. `debugger` reads investigation report → selects top root cause candidate(s) → decomposes validation tasks:
234
+ - Hypothesis validation with code evidence
235
+ - Impact scope analysis (what else does this affect?)
236
+ - Related issue scan (is this a symptom of a larger pattern?)
237
+ 2. `debugger` posts TASK_ASSIGNMENT to Mailbox → dispatches to executor
238
+ 3. Executor deep-dives into each root cause candidate → posts SUBMISSION with:
239
+ - Code evidence proving/disproving each hypothesis
240
+ - Exact lines of code causing the fault
241
+ - Trigger conditions (what input/state causes the fault)
242
+ - Impact scope: all affected components, endpoints, or flows
243
+ - Related issues discovered during analysis
244
+ 4. `reviewer` reviews each SUBMISSION → posts REVIEW:
245
+ - Is the root cause truly confirmed or just the most obvious suspect?
246
+ - Are there related issues that share the same root cause?
247
+ - What is the regression risk of fixing this area?
248
+ - Could fixing this break something else?
249
+ - Is the impact assessment complete?
250
+ 5. Debate loop if FAIL → executor defends or deepens analysis → max 3 rounds
251
+ 6. `debugger` synthesizes confirmed root cause into authoritative debug report
252
+
253
+ **Deliverable**: `./reports/debugs/DEBUG-{issue}.md`
254
+ **Exit Criteria**: Root cause confirmed with code evidence, impact scope documented, regression risk assessed, related issues cataloged
255
+ **Consensus**: ✅ CONSENSUS: debugger ✓ | {executor} ✓ | reviewer ✓
256
+
257
+ ---
258
+
259
+ ## 🎭 Phase 3: FIX PLANNING — 🔺 GOLDEN TRIANGLE
260
+
261
+ | Role | Agent | Mission |
262
+ | --------- | ------------------------------------ | ---------------------------------------------------------- |
263
+ | Tech Lead | `planner` | Decompose: plan fix steps, define acceptance criteria, rollback strategy |
264
+ | Executor | `researcher` | Execute: research fix approaches, evaluate trade-offs, draft plan sections |
265
+ | Reviewer | `tech-lead` (feasibility critic) | Challenge: question approach, verify no side effects, check regression risk |
266
+
267
+ **Prerequisite**: **READ** `./reports/debugs/DEBUG-{issue}.md`
268
+
269
+ **Triangle Loop**:
270
+ 1. `planner` reads debug report → decomposes fix planning into sections:
271
+ - Fix approach evaluation (multiple strategies)
272
+ - Implementation task breakdown
273
+ - Rollback strategy
274
+ - Acceptance criteria derived from root cause
275
+ - Risk matrix
276
+ 2. `planner` posts TASK_ASSIGNMENT to Mailbox → dispatches to `researcher`
277
+ 3. `researcher` researches and drafts each plan section → posts SUBMISSION per section:
278
+ - Fix approaches compared (minimal patch vs. refactor vs. redesign)
279
+ - Trade-off analysis: risk, effort, long-term maintainability
280
+ - Implementation tasks with ordering and dependencies
281
+ - Rollback steps with verification criteria
282
+ - Acceptance criteria: how to prove the bug is fixed
283
+ 4. `tech-lead` reviews each plan section → posts REVIEW:
284
+ - Is the fix approach proportional to the bug severity?
285
+ - Are there side effects not accounted for?
286
+ - Is the rollback strategy actually viable under failure?
287
+ - Are estimates realistic?
288
+ - Does the fix address root cause or just symptoms?
289
+ - Will the fix introduce new technical debt?
290
+ 5. Debate loop if FAIL → `researcher` adjusts or defends → max 3 rounds
291
+ 6. `planner` synthesizes all approved sections into final fix plan
292
+
293
+ **Deliverable**: `./reports/plans/PLAN-{issue}.md`
294
+ **Exit Criteria**: Fix approach selected, implementation steps defined, rollback strategy verified, acceptance criteria set, risks mitigated
295
+ **Consensus**: ✅ CONSENSUS: planner ✓ | researcher ✓ | tech-lead ✓
296
+
297
+ ---
298
+
299
+ ## 🛡️ VERIFICATION CHECKPOINT
300
+
301
+ > **⛔ BLOCKING**: Load Context Gate protocol NOW before proceeding.
302
+ >
303
+ > **LOAD**: `rules/CONTEXT-GATE.md` — Execute HARD MODE protocol
304
+ >
305
+ > This is a MANDATORY checkpoint. Cannot skip or bypass.
306
+
307
+ ### ⚡ EXECUTION
308
+
309
+ ```yaml
310
+ context_gate_execution:
311
+ mode: "HARD (User Choice)"
312
+ trigger: "After Phase 3 (Fix Planning) completes"
313
+ protocol: "Follow rules/CONTEXT-GATE.md § HARD MODE"
314
+
315
+ variant_adjustments:
316
+ plan_type: "Fix plan with rollback strategy"
317
+ plan_file: "PLAN-{issue}.md"
318
+ remaining_phases: "Phase 4 → 5"
319
+ mailbox: "MAILBOX-{date}.md contains full debate history"
320
+ ```
321
+
322
+ **DO NOT proceed to Phase 4 until user selects option.**
323
+
324
+ ---
325
+
326
+ ## 🎭 Phase 4: IMPLEMENTATION — 🔺 GOLDEN TRIANGLE
327
+
328
+ > **THIS IS THE MOST CRITICAL PHASE.** Every step is detailed. No shortcuts.
329
+
330
+ ### Team Selection
331
+
332
+ ```
333
+ IF fix spans frontend + backend →
334
+ Tech Lead: tech-lead
335
+ Executor: backend-engineer (then frontend-engineer, sequential)
336
+ Reviewer: reviewer
337
+
338
+ IF fix is backend-only →
339
+ Tech Lead: tech-lead
340
+ Executor: backend-engineer
341
+ Reviewer: reviewer
342
+
343
+ IF fix is frontend-only →
344
+ Tech Lead: tech-lead
345
+ Executor: frontend-engineer
346
+ Reviewer: reviewer
347
+
348
+ IF fix is game-related →
349
+ Tech Lead: tech-lead
350
+ Executor: game-engineer
351
+ Reviewer: reviewer
352
+
353
+ IF fix is mobile-related →
354
+ Tech Lead: tech-lead
355
+ Executor: mobile-engineer
356
+ Reviewer: reviewer
357
+
358
+ IF other domain → Consult TEAMS.md roster for correct triangle
359
+ ```
360
+
361
+ | Role | Agent | Mission |
362
+ | --------- | ---------------------------------------- | ---------------------------------------------------------- |
363
+ | Tech Lead | `tech-lead` | Load fix plan → decompose into implementation tasks → coordinate all work |
364
+ | Executor | `backend-engineer` / `frontend-engineer` / `game-engineer` / `mobile-engineer` | Implement fix EXACTLY per plan → submit via Mailbox |
365
+ | Reviewer | `reviewer` | Review EVERY change: correctness, no regression, security, plan compliance |
366
+
367
+ **Prerequisite**: **READ and FOLLOW** `./reports/plans/PLAN-{issue}.md`
368
+
369
+ ### GOLDEN TRIANGLE IMPLEMENTATION LOOP (CRITICAL — Step by Step)
370
+
371
+ ```
372
+ ╔══════════════════════════════════════════════════════════════════════╗
373
+ ║ PHASE 4: FIX IMPLEMENTATION LOOP — FOLLOW EXACTLY ║
374
+ ╠══════════════════════════════════════════════════════════════════════╣
375
+ ║ ║
376
+ ║ STEP 1: Tech Lead reads PLAN-{issue}.md ║
377
+ ║ ───────────────────────────────────────── ║
378
+ ║ - Load full fix plan into working context ║
379
+ ║ - Identify all implementation tasks from plan ║
380
+ ║ - Determine task ordering and dependencies ║
381
+ ║ - Cross-reference with DEBUG-{issue}.md root cause ║
382
+ ║ ║
383
+ ║ STEP 2: Tech Lead creates Shared Task List ║
384
+ ║ ───────────────────────────────────────── ║
385
+ ║ - Break plan into atomic fix tasks ║
386
+ ║ - Order by priority and dependency ║
387
+ ║ - Format: [ID] [Status] [Description] [Files] [Acceptance] ║
388
+ ║ - Post Shared Task List in Mailbox as TASK_ASSIGNMENT ║
389
+ ║ ║
390
+ ║ STEP 3: Tech Lead dispatches ALL tasks to Executor ║
391
+ ║ ───────────────────────────────────────── ║
392
+ ║ - Posts TASK_ASSIGNMENT to Mailbox for each task ║
393
+ ║ - Each assignment includes: ║
394
+ ║ • Task ID and description ║
395
+ ║ • Exact files to create/modify ║
396
+ ║ • Root cause reference from DEBUG report ║
397
+ ║ • Acceptance criteria from plan ║
398
+ ║ • Dependencies on other tasks ║
399
+ ║ ║
400
+ ║ STEP 4: FOR EACH TASK — Executor implements ║
401
+ ║ ───────────────────────────────────────── ║
402
+ ║ a. Executor reads TASK_ASSIGNMENT from Mailbox ║
403
+ ║ b. Executor implements fix EXACTLY as plan specifies ║
404
+ ║ c. Executor posts SUBMISSION to Mailbox: ║
405
+ ║ ┌──────────────────────────────────────┐ ║
406
+ ║ │ SUBMISSION │ ║
407
+ ║ │ Task: {task ID} │ ║
408
+ ║ │ What was fixed: {description} │ ║
409
+ ║ │ Files changed: {list of files} │ ║
410
+ ║ │ Root cause addressed: {reference} │ ║
411
+ ║ │ Approach taken: {rationale} │ ║
412
+ ║ │ Self-review notes: {any concerns} │ ║
413
+ ║ │ Plan step reference: {which plan step}│ ║
414
+ ║ └──────────────────────────────────────┘ ║
415
+ ║ ║
416
+ ║ STEP 5: Reviewer reviews each SUBMISSION ║
417
+ ║ ───────────────────────────────────────── ║
418
+ ║ d. Reviewer reads SUBMISSION from Mailbox ║
419
+ ║ e. Reviewer checks against ALL 6 dimensions: ║
420
+ ║ ┌──────────────────────────────────────────────────────┐ ║
421
+ ║ │ 1. CORRECTNESS — Does fix resolve the root cause? │ ║
422
+ ║ │ 2. REGRESSION — Could this break adjacent features? │ ║
423
+ ║ │ 3. SECURITY — Injection, auth, input validation? │ ║
424
+ ║ │ 4. PLAN COMPLIANCE — Matches plan spec exactly? │ ║
425
+ ║ │ 5. CODE QUALITY — Naming, structure, DRY, SOLID? │ ║
426
+ ║ │ 6. ROLLBACK SAFETY — Can this change be safely undone?│ ║
427
+ ║ └──────────────────────────────────────────────────────┘ ║
428
+ ║ f. Reviewer posts REVIEW to Mailbox: ║
429
+ ║ ┌──────────────────────────────────────┐ ║
430
+ ║ │ REVIEW │ ║
431
+ ║ │ Task: {task ID} │ ║
432
+ ║ │ Status: PASS or FAIL │ ║
433
+ ║ │ Findings: │ ║
434
+ ║ │ | # | Finding | Severity | Action | │ ║
435
+ ║ │ |---|---------|----------|--------| │ ║
436
+ ║ │ | 1 | ... | CRITICAL | Fix | │ ║
437
+ ║ │ | 2 | ... | MINOR | Suggest| │ ║
438
+ ║ │ Required actions: {list} │ ║
439
+ ║ └──────────────────────────────────────┘ ║
440
+ ║ ║
441
+ ║ STEP 6: IF FAIL — Debate Loop (max 3 rounds) ║
442
+ ║ ───────────────────────────────────────── ║
443
+ ║ g. Executor reads REVIEW findings from Mailbox ║
444
+ ║ h. For EACH finding: ║
445
+ ║ - If VALID → Fix the code → Note what was fixed ║
446
+ ║ - If DISPUTED → Write DEFENSE with evidence: ║
447
+ ║ "Finding #2 is invalid because [evidence/reasoning]" ║
448
+ ║ i. Executor posts RESUBMISSION or DEFENSE to Mailbox: ║
449
+ ║ ┌──────────────────────────────────────┐ ║
450
+ ║ │ RESUBMISSION / DEFENSE │ ║
451
+ ║ │ Task: {task ID} │ ║
452
+ ║ │ Round: {1/2/3} │ ║
453
+ ║ │ Fixes applied: {list} │ ║
454
+ ║ │ Defended findings: {list + evidence} │ ║
455
+ ║ └──────────────────────────────────────┘ ║
456
+ ║ j. Reviewer re-reviews → posts new REVIEW → back to step (e) ║
457
+ ║ k. After round 3 without resolution: ║
458
+ ║ → Reviewer posts ESCALATION to Mailbox ║
459
+ ║ → Tech Lead reads all debate history ║
460
+ ║ → Tech Lead posts ARBITRATION with binding resolution ║
461
+ ║ ║
462
+ ║ STEP 7: IF PASS ║
463
+ ║ ───────────────── ║
464
+ ║ l. Reviewer posts APPROVAL to Mailbox ║
465
+ ║ m. Tech Lead marks task ✅ in Shared Task List ║
466
+ ║ n. Move to next task → back to step (a) ║
467
+ ║ ║
468
+ ║ STEP 8: After ALL tasks complete ║
469
+ ║ ───────────────────────────── ║
470
+ ║ o. Tech Lead verifies full integration: ║
471
+ ║ - All tasks ✅ in Shared Task List ║
472
+ ║ - No cross-task conflicts ║
473
+ ║ - Fix addresses root cause (not just symptoms) ║
474
+ ║ - Rollback path remains viable ║
475
+ ║ p. Tech Lead posts DECISION to Mailbox: ║
476
+ ║ ┌──────────────────────────────────────┐ ║
477
+ ║ │ DECISION │ ║
478
+ ║ │ Phase: 4 — Implementation │ ║
479
+ ║ │ Status: COMPLETE │ ║
480
+ ║ │ Tasks completed: {count}/{total} │ ║
481
+ ║ │ Disputes resolved: {count} │ ║
482
+ ║ │ Arbitrations needed: {count} │ ║
483
+ ║ │ ✅ CONSENSUS: tech-lead ✓ | │ ║
484
+ ║ │ {executor} ✓ | reviewer ✓ │ ║
485
+ ║ └──────────────────────────────────────┘ ║
486
+ ║ q. Phase output released ║
487
+ ╚══════════════════════════════════════════════════════════════════════╝
488
+ ```
489
+
490
+ ### STRICT PLAN ADHERENCE (ENFORCED BY REVIEWER)
491
+
492
+ ```
493
+ 1. READ PLAN FIRST — every task MUST trace to a plan step
494
+ 2. IF step seems wrong → STOP → Executor posts ESCALATION to Mailbox
495
+ → Tech Lead evaluates → Request Re-Planning or Override
496
+ 3. NO unauthorized deviations — Reviewer explicitly checks for this:
497
+ "Does this SUBMISSION match the plan step? Any additions not in plan?"
498
+ 4. Deviations found by Reviewer → automatic FAIL with:
499
+ Severity: CRITICAL | Action: "Remove unauthorized code or get plan amended"
500
+ ```
501
+
502
+ **Exit Criteria**: All fix tasks implemented, all reviews passed, no unauthorized deviations, root cause addressed, integration verified
503
+ **Consensus**: ✅ CONSENSUS: tech-lead ✓ | {executor} ✓ | reviewer ✓
504
+
505
+ ---
506
+
507
+ ## 🎭 Phase 5: TESTING & VERIFICATION — 🔺 GOLDEN TRIANGLE
508
+
509
+ | Role | Agent | Mission |
510
+ | --------- | ------------------------------------ | ---------------------------------------------------------- |
511
+ | Tech Lead | `tester` | Decompose: test strategy for fix verification + regression testing |
512
+ | Executor | `tester` (self-implements tests) | Execute: write tests proving fix, run regression suite, generate coverage |
513
+ | Reviewer | `security-engineer` | Challenge: edge cases, security implications, verify no regressions introduced |
514
+
515
+ **Prerequisite**: **READ** `PLAN-{issue}.md` + `DEBUG-{issue}.md` + implementation changes
516
+
517
+ **Triangle Loop**:
518
+ 1. `tester` (as Tech Lead) reads plan + debug report + code changes → decomposes into test strategy:
519
+ - Fix verification tests (prove the bug is fixed)
520
+ - Regression tests (prove nothing else broke)
521
+ - Edge case tests (boundary conditions near the fault)
522
+ - Security test cases (if fix touches auth, input, or data flow)
523
+ - Performance baseline assertions (if fix touches hot paths)
524
+ 2. `tester` (as Tech Lead) posts TASK_ASSIGNMENT to Mailbox with test plan
525
+ 3. `tester` (as Executor) writes and runs all tests → posts SUBMISSION per test category:
526
+ - Tests written (file list)
527
+ - Tests passed / failed
528
+ - Coverage percentage for changed files
529
+ - Root cause verification results
530
+ 4. `security-engineer` reviews test submissions → posts REVIEW:
531
+ - Does the fix verification test actually prove the root cause is resolved?
532
+ - Are regression tests covering adjacent functionality?
533
+ - Edge cases: what inputs/states near the fault boundary are untested?
534
+ - Security: if the fix area handles user input or auth, are security tests present?
535
+ - Could the fix be bypassed or cause a new vulnerability?
536
+ 5. Debate loop if FAIL → fix gaps or defend → max 3 rounds
537
+ 6. `tester` (as Tech Lead) synthesizes final QA report
538
+
539
+ **ROOT CAUSE VERIFICATION** (MANDATORY):
540
+ ```
541
+ FOR EACH symptom in DEBUG-{issue}.md:
542
+ → tester: Write test reproducing original bug (must FAIL without fix, PASS with fix)
543
+ → security-engineer: Confirm test truly validates root cause fix (not a trivial pass)
544
+ → Document: "Symptom X → Test: {test name} → Root Cause Y → Verified: {pass/fail}"
545
+ ```
546
+
547
+ **REGRESSION VERIFICATION** (MANDATORY):
548
+ ```
549
+ FOR EACH affected component in DEBUG-{issue}.md:
550
+ → tester: Write regression test for adjacent functionality
551
+ → security-engineer: Verify no new attack surface introduced
552
+ → Document: "Component X → Regression Test: {test name} → Status: {pass/fail}"
553
+ ```
554
+
555
+ **Deliverable**: `./reports/qa/QA-{issue}.md`
556
+ **Exit Criteria**: Fix verified against root cause, regression tests pass, security validated, edge cases covered, no new vulnerabilities
557
+ **Consensus**: ✅ CONSENSUS: tester ✓ | tester(exec) ✓ | security-engineer ✓
558
+
559
+ ---
560
+
561
+ ## ✅ COMPLETION
562
+
563
+ Present final issue resolution report with consensus stamps from ALL phases:
564
+
565
+ ```markdown
566
+ # 🔺 Golden Triangle Issue Resolution Report: {issue}
567
+
568
+ ## Phase Results
569
+ | Phase | Triangle | Consensus | Rounds |
570
+ |-------|----------|-----------|--------|
571
+ | P1: Investigation | debugger / scouter / researcher | ✅ | {n} |
572
+ | P2: Root Cause Analysis | debugger / {executor} / reviewer | ✅ | {n} |
573
+ | P3: Fix Planning | planner / researcher / tech-lead | ✅ | {n} |
574
+ | P4: Implementation | tech-lead / {executor} / reviewer | ✅ | {n} |
575
+ | P5: Testing & Verification | tester / tester / security-engineer | ✅ | {n} |
576
+
577
+ ## Root Cause Summary
578
+ - **Root Cause**: {confirmed root cause from DEBUG report}
579
+ - **Fix Applied**: {fix approach from PLAN}
580
+ - **Verification**: {test proving fix from QA}
581
+
582
+ ## Debate Summary
583
+ - Total submissions: {count}
584
+ - First-pass approvals: {count}
585
+ - Debates triggered: {count}
586
+ - Arbitrations needed: {count}
587
+
588
+ ## Mailbox Reference
589
+ Full debate history: `./reports/MAILBOX-{date}.md`
590
+
591
+ ## Next Actions
592
+ 1. ✅ **Fixed** — Issue resolved (triangle-validated across all phases)
593
+ 2. 🔄 **Rollback** — Rollback plan verified and documented
594
+ 3. 🚀 **Deploy** → `/deploy:preview`
595
+ 4. 📝 **Docs** → `/docs:core`
596
+ ```
package/commands/fix.md CHANGED
@@ -37,6 +37,9 @@ IF issue is complex (research needed, multi-file):
37
37
  IF issue is complex AND context optimization is critical:
38
38
  → Route to /fix:focus
39
39
 
40
+ IF issue is complex AND maximum quality with team collaboration needed:
41
+ → Route to /fix:team
42
+
40
43
  IF unsure:
41
44
  → Default to /fix:fast (escalate if needed)
42
45
  ```
@@ -50,6 +53,7 @@ IF unsure:
50
53
  | `/fix:fast` | Quick fixes, clear issues |
51
54
  | `/fix:hard` | Complex issues, research needed |
52
55
  | `/fix:focus` | Complex issues with **enforced context optimization** |
56
+ | `/fix:team` | Maximum quality with parallel agent team collaboration |
53
57
 
54
58
  ---
55
59
 
@@ -65,6 +69,7 @@ IF unsure:
65
69
  1. ⚡ **Fast** → `/fix:fast` — Quick fix
66
70
  2. ⚡⚡⚡ **Hard** → `/fix:hard` — Full resolution
67
71
  3. 🎯 **Focus** → `/fix:focus` — Full resolution with **automatic context clearing** (prevents hallucination)
72
+ 4. 👥 **Team** → `/fix:team` — Full team collaboration (parallel agents, maximum quality)
68
73
 
69
74
  ⏳ Awaiting selection...
70
75
  ```