@namch/agent-assistant 1.1.1 → 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 (233) hide show
  1. package/CHANGELOG.md +29 -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 +282 -7
  56. package/cli/install.test.js.example +1 -1
  57. package/code-assistants/codex-assistant/CODEX.md +235 -0
  58. package/code-assistants/codex-assistant/agents/backend-engineer.toml +26 -0
  59. package/code-assistants/codex-assistant/agents/brainstormer.toml +26 -0
  60. package/code-assistants/codex-assistant/agents/business-analyst.toml +26 -0
  61. package/code-assistants/codex-assistant/agents/database-architect.toml +26 -0
  62. package/code-assistants/codex-assistant/agents/debugger.toml +26 -0
  63. package/code-assistants/codex-assistant/agents/designer.toml +26 -0
  64. package/code-assistants/codex-assistant/agents/devops-engineer.toml +26 -0
  65. package/code-assistants/codex-assistant/agents/docs-manager.toml +26 -0
  66. package/code-assistants/codex-assistant/agents/frontend-engineer.toml +26 -0
  67. package/code-assistants/codex-assistant/agents/game-engineer.toml +26 -0
  68. package/code-assistants/codex-assistant/agents/mobile-engineer.toml +26 -0
  69. package/code-assistants/codex-assistant/agents/performance-engineer.toml +26 -0
  70. package/code-assistants/codex-assistant/agents/planner.toml +26 -0
  71. package/code-assistants/codex-assistant/agents/project-manager.toml +26 -0
  72. package/code-assistants/codex-assistant/agents/reporter.toml +26 -0
  73. package/code-assistants/codex-assistant/agents/researcher.toml +26 -0
  74. package/code-assistants/codex-assistant/agents/reviewer.toml +26 -0
  75. package/code-assistants/codex-assistant/agents/scouter.toml +26 -0
  76. package/code-assistants/codex-assistant/agents/security-engineer.toml +26 -0
  77. package/code-assistants/codex-assistant/agents/tech-lead.toml +26 -0
  78. package/code-assistants/codex-assistant/agents/tester.toml +26 -0
  79. package/code-assistants/codex-assistant/config.toml +109 -0
  80. package/code-assistants/codex-assistant/skills/agent-assistant-ask/SKILL.md +18 -0
  81. package/code-assistants/codex-assistant/skills/agent-assistant-ask/agents/openai.yaml +4 -0
  82. package/code-assistants/codex-assistant/skills/agent-assistant-ask-fast/SKILL.md +18 -0
  83. package/code-assistants/codex-assistant/skills/agent-assistant-ask-fast/agents/openai.yaml +4 -0
  84. package/code-assistants/codex-assistant/skills/agent-assistant-ask-hard/SKILL.md +18 -0
  85. package/code-assistants/codex-assistant/skills/agent-assistant-ask-hard/agents/openai.yaml +4 -0
  86. package/code-assistants/codex-assistant/skills/agent-assistant-auto/SKILL.md +18 -0
  87. package/code-assistants/codex-assistant/skills/agent-assistant-auto/agents/openai.yaml +4 -0
  88. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm/SKILL.md +18 -0
  89. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm/agents/openai.yaml +4 -0
  90. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm-fast/SKILL.md +18 -0
  91. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm-fast/agents/openai.yaml +4 -0
  92. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm-hard/SKILL.md +18 -0
  93. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm-hard/agents/openai.yaml +4 -0
  94. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm-team/SKILL.md +18 -0
  95. package/code-assistants/codex-assistant/skills/agent-assistant-brainstorm-team/agents/openai.yaml +4 -0
  96. package/code-assistants/codex-assistant/skills/agent-assistant-code/SKILL.md +18 -0
  97. package/code-assistants/codex-assistant/skills/agent-assistant-code/agents/openai.yaml +4 -0
  98. package/code-assistants/codex-assistant/skills/agent-assistant-code-fast/SKILL.md +18 -0
  99. package/code-assistants/codex-assistant/skills/agent-assistant-code-fast/agents/openai.yaml +4 -0
  100. package/code-assistants/codex-assistant/skills/agent-assistant-code-focus/SKILL.md +18 -0
  101. package/code-assistants/codex-assistant/skills/agent-assistant-code-focus/agents/openai.yaml +4 -0
  102. package/code-assistants/codex-assistant/skills/agent-assistant-code-hard/SKILL.md +18 -0
  103. package/code-assistants/codex-assistant/skills/agent-assistant-code-hard/agents/openai.yaml +4 -0
  104. package/code-assistants/codex-assistant/skills/agent-assistant-code-team/SKILL.md +18 -0
  105. package/code-assistants/codex-assistant/skills/agent-assistant-code-team/agents/openai.yaml +4 -0
  106. package/code-assistants/codex-assistant/skills/agent-assistant-cook/SKILL.md +18 -0
  107. package/code-assistants/codex-assistant/skills/agent-assistant-cook/agents/openai.yaml +4 -0
  108. package/code-assistants/codex-assistant/skills/agent-assistant-cook-fast/SKILL.md +18 -0
  109. package/code-assistants/codex-assistant/skills/agent-assistant-cook-fast/agents/openai.yaml +4 -0
  110. package/code-assistants/codex-assistant/skills/agent-assistant-cook-focus/SKILL.md +18 -0
  111. package/code-assistants/codex-assistant/skills/agent-assistant-cook-focus/agents/openai.yaml +4 -0
  112. package/code-assistants/codex-assistant/skills/agent-assistant-cook-hard/SKILL.md +18 -0
  113. package/code-assistants/codex-assistant/skills/agent-assistant-cook-hard/agents/openai.yaml +4 -0
  114. package/code-assistants/codex-assistant/skills/agent-assistant-cook-team/SKILL.md +18 -0
  115. package/code-assistants/codex-assistant/skills/agent-assistant-cook-team/agents/openai.yaml +4 -0
  116. package/code-assistants/codex-assistant/skills/agent-assistant-debug/SKILL.md +18 -0
  117. package/code-assistants/codex-assistant/skills/agent-assistant-debug/agents/openai.yaml +4 -0
  118. package/code-assistants/codex-assistant/skills/agent-assistant-debug-fast/SKILL.md +18 -0
  119. package/code-assistants/codex-assistant/skills/agent-assistant-debug-fast/agents/openai.yaml +4 -0
  120. package/code-assistants/codex-assistant/skills/agent-assistant-debug-focus/SKILL.md +18 -0
  121. package/code-assistants/codex-assistant/skills/agent-assistant-debug-focus/agents/openai.yaml +4 -0
  122. package/code-assistants/codex-assistant/skills/agent-assistant-debug-hard/SKILL.md +18 -0
  123. package/code-assistants/codex-assistant/skills/agent-assistant-debug-hard/agents/openai.yaml +4 -0
  124. package/code-assistants/codex-assistant/skills/agent-assistant-debug-team/SKILL.md +18 -0
  125. package/code-assistants/codex-assistant/skills/agent-assistant-debug-team/agents/openai.yaml +4 -0
  126. package/code-assistants/codex-assistant/skills/agent-assistant-deploy/SKILL.md +18 -0
  127. package/code-assistants/codex-assistant/skills/agent-assistant-deploy/agents/openai.yaml +4 -0
  128. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-check/SKILL.md +18 -0
  129. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-check/agents/openai.yaml +4 -0
  130. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-preview/SKILL.md +18 -0
  131. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-preview/agents/openai.yaml +4 -0
  132. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-production/SKILL.md +18 -0
  133. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-production/agents/openai.yaml +4 -0
  134. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-rollback/SKILL.md +18 -0
  135. package/code-assistants/codex-assistant/skills/agent-assistant-deploy-rollback/agents/openai.yaml +4 -0
  136. package/code-assistants/codex-assistant/skills/agent-assistant-design/SKILL.md +18 -0
  137. package/code-assistants/codex-assistant/skills/agent-assistant-design/agents/openai.yaml +4 -0
  138. package/code-assistants/codex-assistant/skills/agent-assistant-design-fast/SKILL.md +18 -0
  139. package/code-assistants/codex-assistant/skills/agent-assistant-design-fast/agents/openai.yaml +4 -0
  140. package/code-assistants/codex-assistant/skills/agent-assistant-design-focus/SKILL.md +18 -0
  141. package/code-assistants/codex-assistant/skills/agent-assistant-design-focus/agents/openai.yaml +4 -0
  142. package/code-assistants/codex-assistant/skills/agent-assistant-design-hard/SKILL.md +18 -0
  143. package/code-assistants/codex-assistant/skills/agent-assistant-design-hard/agents/openai.yaml +4 -0
  144. package/code-assistants/codex-assistant/skills/agent-assistant-design-team/SKILL.md +18 -0
  145. package/code-assistants/codex-assistant/skills/agent-assistant-design-team/agents/openai.yaml +4 -0
  146. package/code-assistants/codex-assistant/skills/agent-assistant-docs/SKILL.md +18 -0
  147. package/code-assistants/codex-assistant/skills/agent-assistant-docs/agents/openai.yaml +4 -0
  148. package/code-assistants/codex-assistant/skills/agent-assistant-docs-audit/SKILL.md +18 -0
  149. package/code-assistants/codex-assistant/skills/agent-assistant-docs-audit/agents/openai.yaml +4 -0
  150. package/code-assistants/codex-assistant/skills/agent-assistant-docs-business/SKILL.md +18 -0
  151. package/code-assistants/codex-assistant/skills/agent-assistant-docs-business/agents/openai.yaml +4 -0
  152. package/code-assistants/codex-assistant/skills/agent-assistant-docs-core/SKILL.md +18 -0
  153. package/code-assistants/codex-assistant/skills/agent-assistant-docs-core/agents/openai.yaml +4 -0
  154. package/code-assistants/codex-assistant/skills/agent-assistant-fix/SKILL.md +18 -0
  155. package/code-assistants/codex-assistant/skills/agent-assistant-fix/agents/openai.yaml +4 -0
  156. package/code-assistants/codex-assistant/skills/agent-assistant-fix-fast/SKILL.md +18 -0
  157. package/code-assistants/codex-assistant/skills/agent-assistant-fix-fast/agents/openai.yaml +4 -0
  158. package/code-assistants/codex-assistant/skills/agent-assistant-fix-focus/SKILL.md +18 -0
  159. package/code-assistants/codex-assistant/skills/agent-assistant-fix-focus/agents/openai.yaml +4 -0
  160. package/code-assistants/codex-assistant/skills/agent-assistant-fix-hard/SKILL.md +18 -0
  161. package/code-assistants/codex-assistant/skills/agent-assistant-fix-hard/agents/openai.yaml +4 -0
  162. package/code-assistants/codex-assistant/skills/agent-assistant-fix-team/SKILL.md +18 -0
  163. package/code-assistants/codex-assistant/skills/agent-assistant-fix-team/agents/openai.yaml +4 -0
  164. package/code-assistants/codex-assistant/skills/agent-assistant-plan/SKILL.md +18 -0
  165. package/code-assistants/codex-assistant/skills/agent-assistant-plan/agents/openai.yaml +4 -0
  166. package/code-assistants/codex-assistant/skills/agent-assistant-plan-fast/SKILL.md +18 -0
  167. package/code-assistants/codex-assistant/skills/agent-assistant-plan-fast/agents/openai.yaml +4 -0
  168. package/code-assistants/codex-assistant/skills/agent-assistant-plan-focus/SKILL.md +18 -0
  169. package/code-assistants/codex-assistant/skills/agent-assistant-plan-focus/agents/openai.yaml +4 -0
  170. package/code-assistants/codex-assistant/skills/agent-assistant-plan-hard/SKILL.md +18 -0
  171. package/code-assistants/codex-assistant/skills/agent-assistant-plan-hard/agents/openai.yaml +4 -0
  172. package/code-assistants/codex-assistant/skills/agent-assistant-plan-team/SKILL.md +18 -0
  173. package/code-assistants/codex-assistant/skills/agent-assistant-plan-team/agents/openai.yaml +4 -0
  174. package/code-assistants/codex-assistant/skills/agent-assistant-report/SKILL.md +18 -0
  175. package/code-assistants/codex-assistant/skills/agent-assistant-report/agents/openai.yaml +4 -0
  176. package/code-assistants/codex-assistant/skills/agent-assistant-report-fast/SKILL.md +18 -0
  177. package/code-assistants/codex-assistant/skills/agent-assistant-report-fast/agents/openai.yaml +4 -0
  178. package/code-assistants/codex-assistant/skills/agent-assistant-report-focus/SKILL.md +18 -0
  179. package/code-assistants/codex-assistant/skills/agent-assistant-report-focus/agents/openai.yaml +4 -0
  180. package/code-assistants/codex-assistant/skills/agent-assistant-report-hard/SKILL.md +18 -0
  181. package/code-assistants/codex-assistant/skills/agent-assistant-report-hard/agents/openai.yaml +4 -0
  182. package/code-assistants/codex-assistant/skills/agent-assistant-report-team/SKILL.md +18 -0
  183. package/code-assistants/codex-assistant/skills/agent-assistant-report-team/agents/openai.yaml +4 -0
  184. package/code-assistants/codex-assistant/skills/agent-assistant-review/SKILL.md +18 -0
  185. package/code-assistants/codex-assistant/skills/agent-assistant-review/agents/openai.yaml +4 -0
  186. package/code-assistants/codex-assistant/skills/agent-assistant-review-fast/SKILL.md +18 -0
  187. package/code-assistants/codex-assistant/skills/agent-assistant-review-fast/agents/openai.yaml +4 -0
  188. package/code-assistants/codex-assistant/skills/agent-assistant-review-hard/SKILL.md +18 -0
  189. package/code-assistants/codex-assistant/skills/agent-assistant-review-hard/agents/openai.yaml +4 -0
  190. package/code-assistants/codex-assistant/skills/agent-assistant-review-team/SKILL.md +18 -0
  191. package/code-assistants/codex-assistant/skills/agent-assistant-review-team/agents/openai.yaml +4 -0
  192. package/code-assistants/codex-assistant/skills/agent-assistant-test/SKILL.md +18 -0
  193. package/code-assistants/codex-assistant/skills/agent-assistant-test/agents/openai.yaml +4 -0
  194. package/code-assistants/codex-assistant/skills/agent-assistant-test-fast/SKILL.md +18 -0
  195. package/code-assistants/codex-assistant/skills/agent-assistant-test-fast/agents/openai.yaml +4 -0
  196. package/code-assistants/codex-assistant/skills/agent-assistant-test-focus/SKILL.md +18 -0
  197. package/code-assistants/codex-assistant/skills/agent-assistant-test-focus/agents/openai.yaml +4 -0
  198. package/code-assistants/codex-assistant/skills/agent-assistant-test-hard/SKILL.md +18 -0
  199. package/code-assistants/codex-assistant/skills/agent-assistant-test-hard/agents/openai.yaml +4 -0
  200. package/code-assistants/codex-assistant/skills/agent-assistant-test-team/SKILL.md +18 -0
  201. package/code-assistants/codex-assistant/skills/agent-assistant-test-team/agents/openai.yaml +4 -0
  202. package/commands/brainstorm/team.md +295 -0
  203. package/commands/brainstorm.md +5 -0
  204. package/commands/code/team.md +456 -0
  205. package/commands/code.md +5 -0
  206. package/commands/cook/team.md +609 -0
  207. package/commands/cook.md +5 -0
  208. package/commands/debug/team.md +396 -0
  209. package/commands/debug.md +5 -0
  210. package/commands/design/team.md +567 -0
  211. package/commands/design.md +5 -0
  212. package/commands/fix/team.md +596 -0
  213. package/commands/fix.md +5 -0
  214. package/commands/plan/team.md +358 -0
  215. package/commands/plan.md +5 -0
  216. package/commands/report/team.md +502 -0
  217. package/commands/report.md +5 -0
  218. package/commands/review/team.md +353 -0
  219. package/commands/review.md +5 -0
  220. package/commands/test/team.md +303 -0
  221. package/commands/test.md +5 -0
  222. package/documents/SMART-SKILL-ORCHESTRATION-BLUEPRINT.md +4 -2
  223. package/documents/business/business-prd.md +2 -1
  224. package/documents/business/business-workflows.md +2 -2
  225. package/documents/knowledge-architecture.md +13 -12
  226. package/documents/knowledge-domain.md +2 -2
  227. package/documents/knowledge-overview.md +2 -2
  228. package/documents/knowledge-source-base.md +4 -0
  229. package/package.json +5 -2
  230. package/rules/AGENTS.md +55 -0
  231. package/rules/CORE.md +1 -0
  232. package/rules/PHASES.md +58 -0
  233. package/rules/TEAMS.md +530 -0
@@ -0,0 +1,456 @@
1
+ ---
2
+ description: "🔺 Team Code — Golden Triangle adversarial collaboration for maximum quality coding"
3
+ version: "2.0"
4
+ category: engineering
5
+ execution-mode: execute
6
+ ---
7
+
8
+ # /code:team — Golden Triangle Code Implementation
9
+
10
+ > **MISSION**: Maximum quality code implementation 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
+ > **KEY DIFFERENCE FROM /cook:team**: No research, no design, no planning phases.
16
+ > Pure coding: scope → implement → verify. Use when you know WHAT to build and just need it BUILT RIGHT.
17
+
18
+ <task>$ARGUMENTS</task>
19
+
20
+ ---
21
+
22
+ ## 🛑 PRE-FLIGHT (DO FIRST — BLOCKS PHASE 1)
23
+
24
+ **LOAD now** (in order; path `./rules/` or `~/.{TOOL}/skills/agent-assistant/rules/`):
25
+
26
+ 1. CORE.md — Identity, Laws, Routing
27
+ 2. PHASES.md — Phase Execution
28
+ 3. AGENTS.md — Tiered Execution
29
+ 4. **TEAMS.md** — Golden Triangle protocol (MANDATORY)
30
+
31
+ **⛔ Do not run Phase 1 until all are loaded.** Follow **all** rules in those files; they override any conflicting instructions in this file.
32
+
33
+ **Skills Resolution**: Load `SKILLS.md` on-demand for fitness calculation and dynamic discovery.
34
+
35
+ ---
36
+
37
+ ## 🔀 TIERED EXECUTION
38
+
39
+ > Reference: AGENTS.md (Tiered Execution) + TEAMS.md (Golden Triangle Protocol)
40
+
41
+ | Tier | When | Action |
42
+ | ---------- | ----------------------------- | ------------------------------------------------------------------------- |
43
+ | **TIER 1** | runSubagent/Agent Tool EXISTS | Orchestrator spawns Tech Lead → Tech Lead spawns Executor + Reviewer |
44
+ | **TIER 2** | Tool MISSING or SYSTEM error | EMBODY Tech Lead → EMBODY Executor → EMBODY Reviewer → EMBODY Tech Lead |
45
+
46
+ **❌ Anti-Lazy**: Never use TIER 2 when TIER 1 tool available.
47
+
48
+ **TIER 2 Golden Triangle Embodiment** (per TEAMS.md):
49
+ ```
50
+ 1. EMBODY Tech Lead → decompose task → produce Shared Task List → dispatch
51
+ 2. EMBODY Executor → implement assigned tasks → post SUBMISSION to Mailbox
52
+ 3. EMBODY Reviewer → review submissions → post REVIEW to Mailbox
53
+ 4. IF FAIL → EMBODY Executor again → fix/defend → EMBODY Reviewer → re-check
54
+ 5. Repeat steps 3–4 max 3 rounds
55
+ 6. EMBODY Tech Lead → arbitrate if needed → post DECISION → synthesize output
56
+ ```
57
+
58
+ ---
59
+
60
+ ## 📬 MAILBOX — Central Communication Hub
61
+
62
+ **Location**: `./reports/MAILBOX-{date}.md`
63
+
64
+ All 3 triangle agents READ from and APPEND to this file. Never overwrite — append only.
65
+
66
+ **Message Format**:
67
+ ```markdown
68
+ ---
69
+ ## [{TIMESTAMP}] {MESSAGE_TYPE} | {AGENT} → {TARGET}
70
+ **Phase**: {phase number}
71
+ **Task**: {task ID from Shared Task List}
72
+ **Content**:
73
+ {message body}
74
+ ---
75
+ ```
76
+
77
+ **Message Types**:
78
+
79
+ | Type | Sender | Receiver | Purpose |
80
+ | ----------------- | --------- | --------- | ---------------------------------------------- |
81
+ | TASK_ASSIGNMENT | Tech Lead | Executor | Assign task with requirements and context |
82
+ | SUBMISSION | Executor | Reviewer | Submit completed work for review |
83
+ | REVIEW | Reviewer | Executor | Review result: PASS or FAIL with findings |
84
+ | DEFENSE | Executor | Reviewer | Defend implementation against FAIL findings |
85
+ | RESUBMISSION | Executor | Reviewer | Resubmit after fixing FAIL findings |
86
+ | APPROVAL | Reviewer | Tech Lead | Confirm task passes all review criteria |
87
+ | ESCALATION | Any | Tech Lead | Escalate unresolvable disagreement |
88
+ | ARBITRATION | Tech Lead | All | Tech Lead resolves dispute with binding decision|
89
+ | DECISION | Tech Lead | All | Final phase decision with consensus stamp |
90
+
91
+ ---
92
+
93
+ ## 📁 DELIVERABLE FILES
94
+
95
+ | Phase / Team | Output |
96
+ | ----------------- | ----------------------------------------------- |
97
+ | Phase 1 (Scope) | Shared Task List in Mailbox |
98
+ | Phase 2 (Impl.) | Code changes + review trail in Mailbox |
99
+ | Phase 3 (Verify) | `./reports/reviews/REVIEW-{task}.md` |
100
+ | ALL Phases | `./reports/MAILBOX-{date}.md` |
101
+
102
+ All files in `./reports/` → English only.
103
+
104
+ ---
105
+
106
+ ## 🔗 PHASE DEPENDENCIES
107
+
108
+ | Phase | Requires | Blocking |
109
+ | ------------------------- | -------------------------------- | ----------- |
110
+ | P1: Scope Analysis | User request | No |
111
+ | P2: Implementation | Scope + Task List from P1 | **YES** |
112
+ | P3: Verification | Code changes from P2 | **YES** |
113
+
114
+ **⛔ Blocking**: If input missing → STOP → Create it first → Resume
115
+
116
+ ---
117
+
118
+ ## ⛔ INCREMENTAL EXECUTION (MANDATORY)
119
+
120
+ One phase at a time. Within each phase:
121
+
122
+ ```
123
+ 1. Spawn Golden Triangle (Tech Lead + Executor + Reviewer)
124
+ 2. Tech Lead decomposes → publishes Shared Task List
125
+ 3. Executor implements → posts SUBMISSION to Mailbox
126
+ 4. Reviewer critiques → posts REVIEW to Mailbox
127
+ 5. Debate loop: fix/defend → re-review (max 3 rounds)
128
+ 6. Consensus reached → Tech Lead posts DECISION → Phase output released
129
+ ```
130
+
131
+ **Consensus Stamp Format** (required to close each phase):
132
+ ```
133
+ ✅ CONSENSUS: {TechLead} ✓ | {Executor} ✓ | {Reviewer} ✓
134
+ ```
135
+
136
+ Format: rules/PHASES.md § Phase output structure + rules/TEAMS.md § Golden Triangle Phase Output Format.
137
+
138
+ ---
139
+
140
+ ## 🔺 GOLDEN TRIANGLE LOOP — Universal Protocol
141
+
142
+ > Every phase below follows this exact loop. Deviations are PROHIBITED.
143
+
144
+ ```
145
+ ┌─────────────────────────────────────────────────────────────────────┐
146
+ │ GOLDEN TRIANGLE LOOP │
147
+ │ │
148
+ │ 1. Tech Lead decomposes phase goal into tasks │
149
+ │ → Publishes Shared Task List │
150
+ │ → Posts TASK_ASSIGNMENT to Mailbox for each task │
151
+ │ │
152
+ │ 2. Executor works each task │
153
+ │ → Posts SUBMISSION to Mailbox per task │
154
+ │ → Includes: what was done, files/artifacts, approach, notes │
155
+ │ │
156
+ │ 3. Reviewer reviews each SUBMISSION │
157
+ │ → Posts REVIEW to Mailbox: PASS or FAIL │
158
+ │ → FAIL includes: findings table, severity, required actions │
159
+ │ │
160
+ │ 4. IF FAIL (debate loop, max 3 rounds): │
161
+ │ → Executor reads findings │
162
+ │ → For each finding: Fix (if valid) or DEFENSE (if disputed) │
163
+ │ → Posts RESUBMISSION or DEFENSE to Mailbox │
164
+ │ → Reviewer re-reviews → back to step 3 │
165
+ │ → After 3 rounds without resolution → ESCALATION to Tech Lead │
166
+ │ │
167
+ │ 5. IF PASS: │
168
+ │ → Reviewer posts APPROVAL to Mailbox │
169
+ │ → Task marked ✅ in Shared Task List │
170
+ │ │
171
+ │ 6. After ALL tasks complete: │
172
+ │ → Tech Lead verifies integration/coherence │
173
+ │ → Tech Lead posts DECISION with consensus stamp │
174
+ │ → Phase output released │
175
+ │ │
176
+ │ OUTPUT: ✅ CONSENSUS: TechLead ✓ | Executor ✓ | Reviewer ✓ │
177
+ └─────────────────────────────────────────────────────────────────────┘
178
+ ```
179
+
180
+ ---
181
+
182
+ ## 🎭 Phase 1: SCOPE ANALYSIS — 🔺 GOLDEN TRIANGLE
183
+
184
+ | Role | Agent | Mission |
185
+ | --------- | ------------------------------------ | ---------------------------------------------------------- |
186
+ | Tech Lead | `tech-lead` | Decompose: analyze scope, identify affected files, define task list |
187
+ | Executor | `scouter` | Execute: scan codebase, map dependencies, identify integration points |
188
+ | Reviewer | `reviewer` (Devil's Advocate) | Challenge: scope correct? Missing dependencies? Breaking changes? |
189
+
190
+ **Triangle Loop**:
191
+ 1. `tech-lead` reads user request → decomposes into scope areas: affected modules, files to change, dependencies, risks
192
+ 2. `tech-lead` posts TASK_ASSIGNMENT to Mailbox → dispatches to `scouter`
193
+ 3. `scouter` scans codebase deeply → posts SUBMISSION to Mailbox with:
194
+ - Files to create/modify (exact paths)
195
+ - Dependency map (what depends on what)
196
+ - Integration points (APIs, imports, shared state)
197
+ - Existing patterns to follow
198
+ - Potential side effects
199
+ 4. `reviewer` reviews SUBMISSION → posts REVIEW to Mailbox:
200
+ - Is the scope complete or are files missing?
201
+ - Are there hidden dependencies not mapped?
202
+ - Will these changes break existing functionality?
203
+ - Are there cross-cutting concerns (auth, logging, error handling)?
204
+ 5. If REVIEW = FAIL → `scouter` addresses gaps or defends → posts RESUBMISSION/DEFENSE
205
+ 6. `reviewer` re-reviews → max 3 rounds → ESCALATION to `tech-lead` if unresolved
206
+ 7. `tech-lead` synthesizes into final Shared Task List for Phase 2
207
+
208
+ **Deliverable**: Scoped task list with affected files, dependencies, and integration points
209
+ **Exit Criteria**: All affected files identified, dependencies mapped, risks surfaced, task list ready
210
+ **Consensus**: ✅ CONSENSUS: tech-lead ✓ | scouter ✓ | reviewer ✓
211
+
212
+ ---
213
+
214
+ ## 🎭 Phase 2: IMPLEMENTATION — 🔺 GOLDEN TRIANGLE
215
+
216
+ > **THIS IS THE MOST CRITICAL PHASE.** Every step is detailed. No shortcuts.
217
+
218
+ ### Team Selection
219
+
220
+ ```
221
+ IF fullstack (frontend + backend changes) →
222
+ Tech Lead: tech-lead
223
+ Executor: backend-engineer (then frontend-engineer, sequential)
224
+ Reviewer: reviewer
225
+
226
+ IF backend-only →
227
+ Tech Lead: tech-lead
228
+ Executor: backend-engineer
229
+ Reviewer: reviewer
230
+
231
+ IF frontend-only →
232
+ Tech Lead: tech-lead
233
+ Executor: frontend-engineer
234
+ Reviewer: reviewer
235
+
236
+ IF game development →
237
+ Tech Lead: tech-lead
238
+ Executor: game-engineer
239
+ Reviewer: reviewer
240
+
241
+ IF mobile development →
242
+ Tech Lead: tech-lead
243
+ Executor: mobile-engineer
244
+ Reviewer: reviewer
245
+
246
+ IF other domain → Consult TEAMS.md roster for correct triangle
247
+ ```
248
+
249
+ | Role | Agent | Mission |
250
+ | --------- | ---------------------------------------- | ---------------------------------------------------------- |
251
+ | Tech Lead | `tech-lead` | Load scope → decompose into coding tasks → coordinate all work |
252
+ | Executor | `backend-engineer` / `frontend-engineer` / `game-engineer` / `mobile-engineer` | Implement code changes → submit via Mailbox |
253
+ | Reviewer | `reviewer` | Review EVERY submission: correctness, security, performance, style |
254
+
255
+ **Prerequisite**: **READ** Phase 1 scope output (task list + dependency map) before starting.
256
+
257
+ ### GOLDEN TRIANGLE IMPLEMENTATION LOOP (CRITICAL — Step by Step)
258
+
259
+ ```
260
+ ╔══════════════════════════════════════════════════════════════════════╗
261
+ ║ PHASE 2: IMPLEMENTATION LOOP — FOLLOW EXACTLY ║
262
+ ╠══════════════════════════════════════════════════════════════════════╣
263
+ ║ ║
264
+ ║ STEP 1: Tech Lead reads Phase 1 scope output ║
265
+ ║ ───────────────────────────────────────── ║
266
+ ║ - Load full task list from Phase 1 ║
267
+ ║ - Identify all coding tasks ║
268
+ ║ - Determine task ordering and dependencies ║
269
+ ║ ║
270
+ ║ STEP 2: Tech Lead creates Implementation Task List ║
271
+ ║ ───────────────────────────────────────── ║
272
+ ║ - Break scope into atomic coding tasks ║
273
+ ║ - Order by dependency (foundations first, then consumers) ║
274
+ ║ - Format: [ID] [Status] [Description] [Files] [Acceptance] ║
275
+ ║ - Post Task List in Mailbox as TASK_ASSIGNMENT ║
276
+ ║ ║
277
+ ║ STEP 3: Tech Lead dispatches ALL tasks to Executor ║
278
+ ║ ───────────────────────────────────────── ║
279
+ ║ - Posts TASK_ASSIGNMENT to Mailbox for each task ║
280
+ ║ - Each assignment includes: ║
281
+ ║ • Task ID and description ║
282
+ ║ • Exact files to create/modify ║
283
+ ║ • Acceptance criteria ║
284
+ ║ • Dependencies on other tasks ║
285
+ ║ • Patterns to follow (from Phase 1 codebase scan) ║
286
+ ║ ║
287
+ ║ STEP 4: FOR EACH TASK — Executor implements ║
288
+ ║ ───────────────────────────────────────── ║
289
+ ║ a. Executor reads TASK_ASSIGNMENT from Mailbox ║
290
+ ║ b. Executor implements task following existing patterns ║
291
+ ║ c. Executor posts SUBMISSION to Mailbox: ║
292
+ ║ ┌──────────────────────────────────────┐ ║
293
+ ║ │ SUBMISSION │ ║
294
+ ║ │ Task: {task ID} │ ║
295
+ ║ │ What was implemented: {description} │ ║
296
+ ║ │ Files changed: {list of files} │ ║
297
+ ║ │ Approach taken: {rationale} │ ║
298
+ ║ │ Self-review notes: {any concerns} │ ║
299
+ ║ └──────────────────────────────────────┘ ║
300
+ ║ ║
301
+ ║ STEP 5: Reviewer reviews each SUBMISSION ║
302
+ ║ ───────────────────────────────────────── ║
303
+ ║ d. Reviewer reads SUBMISSION from Mailbox ║
304
+ ║ e. Reviewer checks against ALL 5 dimensions: ║
305
+ ║ ┌──────────────────────────────────────────────────────┐ ║
306
+ ║ │ 1. CORRECTNESS — Does it work? Edge cases handled? │ ║
307
+ ║ │ 2. SECURITY — Injection, auth, input validation? │ ║
308
+ ║ │ 3. PERFORMANCE — N+1 queries, unnecessary loops? │ ║
309
+ ║ │ 4. SCOPE COMPLIANCE — Matches scoped task exactly? │ ║
310
+ ║ │ 5. CODE QUALITY — Naming, structure, DRY, SOLID? │ ║
311
+ ║ └──────────────────────────────────────────────────────┘ ║
312
+ ║ f. Reviewer posts REVIEW to Mailbox: ║
313
+ ║ ┌──────────────────────────────────────┐ ║
314
+ ║ │ REVIEW │ ║
315
+ ║ │ Task: {task ID} │ ║
316
+ ║ │ Status: PASS or FAIL │ ║
317
+ ║ │ Findings: │ ║
318
+ ║ │ | # | Finding | Severity | Action | │ ║
319
+ ║ │ |---|---------|----------|--------| │ ║
320
+ ║ │ | 1 | ... | CRITICAL | Fix | │ ║
321
+ ║ │ | 2 | ... | MINOR | Suggest| │ ║
322
+ ║ │ Required actions: {list} │ ║
323
+ ║ └──────────────────────────────────────┘ ║
324
+ ║ ║
325
+ ║ STEP 6: IF FAIL — Debate Loop (max 3 rounds) ║
326
+ ║ ───────────────────────────────────────── ║
327
+ ║ g. Executor reads REVIEW findings from Mailbox ║
328
+ ║ h. For EACH finding: ║
329
+ ║ - If VALID → Fix the code → Note what was fixed ║
330
+ ║ - If DISPUTED → Write DEFENSE with evidence: ║
331
+ ║ "Finding #2 is invalid because [evidence/reasoning]" ║
332
+ ║ i. Executor posts RESUBMISSION or DEFENSE to Mailbox: ║
333
+ ║ ┌──────────────────────────────────────┐ ║
334
+ ║ │ RESUBMISSION / DEFENSE │ ║
335
+ ║ │ Task: {task ID} │ ║
336
+ ║ │ Round: {1/2/3} │ ║
337
+ ║ │ Fixes applied: {list} │ ║
338
+ ║ │ Defended findings: {list + evidence} │ ║
339
+ ║ └──────────────────────────────────────┘ ║
340
+ ║ j. Reviewer re-reviews → posts new REVIEW → back to step (e) ║
341
+ ║ k. After round 3 without resolution: ║
342
+ ║ → Reviewer posts ESCALATION to Mailbox ║
343
+ ║ → Tech Lead reads all debate history ║
344
+ ║ → Tech Lead posts ARBITRATION with binding resolution ║
345
+ ║ ║
346
+ ║ STEP 7: IF PASS ║
347
+ ║ ───────────────── ║
348
+ ║ l. Reviewer posts APPROVAL to Mailbox ║
349
+ ║ m. Tech Lead marks task ✅ in Task List ║
350
+ ║ n. Move to next task → back to step (a) ║
351
+ ║ ║
352
+ ║ STEP 8: After ALL tasks complete ║
353
+ ║ ───────────────────────────── ║
354
+ ║ o. Tech Lead verifies full integration: ║
355
+ ║ - All tasks ✅ in Task List ║
356
+ ║ - No cross-task conflicts ║
357
+ ║ - API contracts match between modules ║
358
+ ║ p. Tech Lead posts DECISION to Mailbox: ║
359
+ ║ ┌──────────────────────────────────────┐ ║
360
+ ║ │ DECISION │ ║
361
+ ║ │ Phase: 2 — Implementation │ ║
362
+ ║ │ Status: COMPLETE │ ║
363
+ ║ │ Tasks completed: {count}/{total} │ ║
364
+ ║ │ Disputes resolved: {count} │ ║
365
+ ║ │ Arbitrations needed: {count} │ ║
366
+ ║ │ ✅ CONSENSUS: tech-lead ✓ | │ ║
367
+ ║ │ {executor} ✓ | reviewer ✓ │ ║
368
+ ║ └──────────────────────────────────────┘ ║
369
+ ║ q. Phase output released ║
370
+ ╚══════════════════════════════════════════════════════════════════════╝
371
+ ```
372
+
373
+ ### SCOPE ADHERENCE (ENFORCED BY REVIEWER)
374
+
375
+ ```
376
+ 1. READ SCOPE FIRST — every task MUST trace to Phase 1 scope
377
+ 2. IF task seems wrong → STOP → Executor posts ESCALATION to Mailbox
378
+ → Tech Lead evaluates → Re-scope or Override
379
+ 3. NO scope creep — Reviewer explicitly checks for this:
380
+ "Does this SUBMISSION stay within scoped changes? Any additions not in scope?"
381
+ 4. Scope creep found by Reviewer → automatic FAIL with:
382
+ Severity: CRITICAL | Action: "Remove out-of-scope code or get scope amended"
383
+ ```
384
+
385
+ **Exit Criteria**: All scoped tasks implemented, all reviews passed, no unauthorized scope creep, integration verified
386
+ **Consensus**: ✅ CONSENSUS: tech-lead ✓ | {executor} ✓ | reviewer ✓
387
+
388
+ ---
389
+
390
+ ## 🎭 Phase 3: VERIFICATION — 🔺 GOLDEN TRIANGLE
391
+
392
+ | Role | Agent | Mission |
393
+ | --------- | -------------------------------------------- | ---------------------------------------------------------- |
394
+ | Tech Lead | `tester` | Decompose: verification strategy, test what was changed |
395
+ | Executor | `tester` (self-implements tests) | Execute: write tests, run tests, generate coverage report |
396
+ | Reviewer | `security-engineer` | Challenge: edge cases, regressions, security implications |
397
+
398
+ **Triangle Loop**:
399
+ 1. `tester` (as Tech Lead) reads Phase 2 implementation output → decomposes verification into:
400
+ - Unit tests for changed/new functions
401
+ - Integration tests for affected endpoints or modules
402
+ - Regression checks for dependent code
403
+ - Edge case validation
404
+ 2. `tester` (as Tech Lead) posts TASK_ASSIGNMENT to Mailbox with test plan
405
+ 3. `tester` (as Executor) writes and runs tests → posts SUBMISSION per test category:
406
+ - Tests written (file list)
407
+ - Tests passed / failed
408
+ - Coverage percentage for changed files
409
+ - Edge cases validated
410
+ 4. `security-engineer` reviews test submissions → posts REVIEW:
411
+ - Are security-sensitive paths tested (auth, input validation, injection)?
412
+ - Are edge cases truly edge cases or happy paths in disguise?
413
+ - Are there regression risks in dependent code not covered?
414
+ - Are error paths and failure modes tested?
415
+ 5. Debate loop if FAIL → `tester` fixes gaps or defends → max 3 rounds
416
+ 6. `tester` (as Tech Lead) synthesizes final verification report
417
+
418
+ **Deliverable**: `./reports/reviews/REVIEW-{task}.md`
419
+ **Exit Criteria**: All tests pass, changed code covered, security validated, no regressions detected
420
+ **Consensus**: ✅ CONSENSUS: tester ✓ | tester(exec) ✓ | security-engineer ✓
421
+
422
+ ---
423
+
424
+ ## ✅ COMPLETION
425
+
426
+ Present final code implementation report with consensus stamps from ALL phases:
427
+
428
+ ```markdown
429
+ # 🔺 Golden Triangle Code Report: {task}
430
+
431
+ ## Phase Results
432
+ | Phase | Triangle | Consensus | Rounds |
433
+ |-------|----------|-----------|--------|
434
+ | P1: Scope Analysis | tech-lead / scouter / reviewer | ✅ | {n} |
435
+ | P2: Implementation | tech-lead / {executor} / reviewer | ✅ | {n} |
436
+ | P3: Verification | tester / tester / security-engineer | ✅ | {n} |
437
+
438
+ ## Debate Summary
439
+ - Total submissions: {count}
440
+ - First-pass approvals: {count}
441
+ - Debates triggered: {count}
442
+ - Arbitrations needed: {count}
443
+
444
+ ## Files Changed
445
+ {list of all files created/modified}
446
+
447
+ ## Mailbox Reference
448
+ Full debate history: `./reports/MAILBOX-{date}.md`
449
+
450
+ ## Next Actions
451
+ 1. ✅ **Done** — Code complete (triangle-validated across all phases)
452
+ 2. 🚀 **Deploy** → `/deploy:preview`
453
+ 3. 📝 **Docs** → `/docs:core`
454
+ 4. ❌ **Changes required** — Critical issues found → `/fix:team`
455
+ 5. 🧪 **Test gaps** — Insufficient coverage → `/test:team`
456
+ ```
package/commands/code.md CHANGED
@@ -40,6 +40,9 @@ IF task is complex (multi-file, research needed):
40
40
  IF task is complex AND context optimization is critical:
41
41
  → Route to /code:focus
42
42
 
43
+ IF task is complex AND maximum quality with team collaboration needed:
44
+ → Route to /code:team
45
+
43
46
  IF unsure:
44
47
  → Default to /code:fast (escalate if needed)
45
48
  ```
@@ -53,6 +56,7 @@ IF unsure:
53
56
  | `/code:fast` | Quick implementation, clear requirements |
54
57
  | `/code:hard` | Complex features, multi-file changes |
55
58
  | `/code:focus` | Complex features with **enforced context optimization** |
59
+ | `/code:team` | Maximum quality with parallel agent team collaboration |
56
60
 
57
61
  ---
58
62
 
@@ -68,6 +72,7 @@ IF unsure:
68
72
  1. ⚡ **Fast** → `/code:fast` — Quick implementation
69
73
  2. ⚡⚡⚡ **Hard** → `/code:hard` — Full development cycle
70
74
  3. 🎯 **Focus** → `/code:focus` — Full cycle with **automatic context clearing** (prevents hallucination)
75
+ 4. 👥 **Team** → `/code:team` — Full team collaboration (parallel agents, maximum quality)
71
76
 
72
77
  ⏳ Awaiting selection...
73
78
  ```