@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,358 @@
1
+ ---
2
+ description: "🔺 Team Plan — Golden Triangle adversarial collaboration for maximum quality planning"
3
+ version: "2.0"
4
+ category: planning
5
+ execution-mode: execute
6
+ ---
7
+
8
+ # /plan:team — Golden Triangle Planning & Architecture
9
+
10
+ > **MISSION**: Maximum quality technical planning 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
+ <task>$ARGUMENTS</task>
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 → execute 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` — Append only, never overwrite.
60
+
61
+ | Type | Sender | Receiver | Purpose |
62
+ | ----------------- | --------- | --------- | ---------------------------------------------- |
63
+ | TASK_ASSIGNMENT | Tech Lead | Executor | Assign task with requirements and context |
64
+ | SUBMISSION | Executor | Reviewer | Submit completed work for review |
65
+ | REVIEW | Reviewer | Executor | Review result: PASS or FAIL with findings |
66
+ | DEFENSE | Executor | Reviewer | Defend approach against FAIL findings |
67
+ | RESUBMISSION | Executor | Reviewer | Resubmit after fixing FAIL findings |
68
+ | APPROVAL | Reviewer | Tech Lead | Confirm task passes all review criteria |
69
+ | ESCALATION | Any | Tech Lead | Escalate unresolvable disagreement |
70
+ | ARBITRATION | Tech Lead | All | Tech Lead resolves dispute with binding decision|
71
+ | DECISION | Tech Lead | All | Final phase decision with consensus stamp |
72
+
73
+ ---
74
+
75
+ ## 📁 DELIVERABLE FILES
76
+
77
+ | Phase / Team | Output |
78
+ | ---------------- | ----------------------------------------------- |
79
+ | Phase 1 (Disc.) | `./reports/brainstorms/BRAINSTORM-{task}.md` + `./reports/scouts/SCOUT-{task}.md` |
80
+ | Phase 2 (Arch.) | `./reports/researchers/RESEARCH-{task}.md` + `./reports/designs/ADR-{task}.md` |
81
+ | Phase 3 (Plan) | `./reports/plans/PLAN-{task}.md` (or `PLAN-{task}-phase1.md`, …) |
82
+ | Phase 4 (Review) | `./reports/qa/QA-PLAN-{task}.md` |
83
+ | ALL Phases | `./reports/MAILBOX-{date}.md` |
84
+
85
+ All files in `./reports/` → English only. If plan has **> 3 phases** or **> 3 days** effort → produce **multiple plan files** (one per phase/milestone), each executable in sequence.
86
+
87
+ ---
88
+
89
+ ## 🔗 PHASE DEPENDENCIES
90
+
91
+ | Phase | Requires | Blocking |
92
+ | ------------------------------- | --------------------------------- | ----------- |
93
+ | P1: Requirements Discovery | User request | No |
94
+ | P2: Architecture & Research | P1 requirements + codebase map | **YES** |
95
+ | P3: Plan Creation | RESEARCH + ADRs + SCOUT | **YES** |
96
+ | P4: Review & Finalization | **PLAN file(s)** | **YES** |
97
+
98
+ **⛔ Blocking**: If input missing → STOP → Create it first → Resume
99
+
100
+ ---
101
+
102
+ ## ⛔ INCREMENTAL EXECUTION (MANDATORY)
103
+
104
+ One phase at a time. Within each phase follow the Golden Triangle Loop below.
105
+
106
+ **Consensus Stamp Format** (required to close each phase):
107
+ ```
108
+ ✅ CONSENSUS: {TechLead} ✓ | {Executor} ✓ | {Reviewer} ✓
109
+ ```
110
+
111
+ ---
112
+
113
+ ## 🔺 GOLDEN TRIANGLE LOOP — Universal Protocol
114
+
115
+ > Every phase below follows this exact loop. Deviations are PROHIBITED.
116
+
117
+ ```
118
+ ┌─────────────────────────────────────────────────────────────────────┐
119
+ │ 1. Tech Lead decomposes phase goal → Shared Task List → Mailbox │
120
+ │ 2. Executor works each task → SUBMISSION to Mailbox │
121
+ │ 3. Reviewer reviews → REVIEW (PASS/FAIL) to Mailbox │
122
+ │ 4. IF FAIL (max 3 rounds): Fix or DEFENSE → re-review │
123
+ │ → After 3 rounds → ESCALATION to Tech Lead │
124
+ │ 5. IF PASS: APPROVAL → task ✅ │
125
+ │ 6. All tasks done → Tech Lead verifies → DECISION + consensus │
126
+ │ OUTPUT: ✅ CONSENSUS: TechLead ✓ | Executor ✓ | Reviewer ✓ │
127
+ └─────────────────────────────────────────────────────────────────────┘
128
+ ```
129
+
130
+ ---
131
+
132
+ ## 🎭 Phase 1: REQUIREMENTS DISCOVERY — 🔺 GOLDEN TRIANGLE
133
+
134
+ | Role | Agent | Mission |
135
+ | --------- | ------------------------------------ | ---------------------------------------------------------- |
136
+ | Tech Lead | `researcher` | Decompose: requirement areas, stakeholder analysis, scope boundaries |
137
+ | Executor | `scouter` + `business-analyst` | Execute: codebase analysis, business requirements extraction |
138
+ | Reviewer | `brainstormer` (Devil's Advocate) | Challenge: missed requirements, unstated assumptions |
139
+
140
+ **Triangle Loop**:
141
+ 1. `researcher` decomposes into: functional reqs, non-functional reqs, codebase context, stakeholder needs → TASK_ASSIGNMENT to Mailbox
142
+ 2. `scouter` surveys codebase → posts SUBMISSION: architecture map, dependency graph, existing patterns, constraints
143
+ 3. `business-analyst` extracts business reqs → posts SUBMISSION: user stories, business rules, priorities, success metrics
144
+ 4. `brainstormer` reviews EACH SUBMISSION → posts REVIEW:
145
+ - Requirements complete? Edge cases missed? Assumptions validated?
146
+ - Conflicting requirements? Adversarial scenarios?
147
+ 5. If FAIL → executors address gaps or defend → RESUBMISSION/DEFENSE → max 3 rounds
148
+ 6. `researcher` synthesizes all approved findings into unified artifacts
149
+
150
+ **Deliverable**: `./reports/brainstorms/BRAINSTORM-{task}.md` + `./reports/scouts/SCOUT-{task}.md`
151
+ **Exit Criteria**: All requirements captured, codebase mapped, business context validated, assumptions challenged
152
+ **Consensus**: ✅ CONSENSUS: researcher ✓ | scouter+business-analyst ✓ | brainstormer ✓
153
+
154
+ ---
155
+
156
+ ## 🎭 Phase 2: ARCHITECTURE & RESEARCH — 🔺 GOLDEN TRIANGLE
157
+
158
+ | Role | Agent | Mission |
159
+ | --------- | ------------------------------------ | ---------------------------------------------------------- |
160
+ | Tech Lead | `tech-lead` | Decompose: architecture decisions, pattern selection |
161
+ | Executor | `researcher` | Execute: research patterns, evaluate technologies, draft ADRs |
162
+ | Reviewer | `reviewer` (feasibility critic) | Challenge: over-engineering, complexity, scalability concerns |
163
+
164
+ **Prerequisite**: **READ** BRAINSTORM + SCOUT files from Phase 1.
165
+
166
+ **Triangle Loop**:
167
+ 1. `tech-lead` reads Phase 1 artifacts → decomposes: pattern selection, tech evaluation, data model, API contracts, NFR architecture → TASK_ASSIGNMENT to Mailbox
168
+ 2. `researcher` deep-dives each area → posts SUBMISSION: trade-off matrix, evaluation pros/cons, draft ADR per decision, evidence (benchmarks, case studies)
169
+ 3. `reviewer` reviews with feasibility lens → posts REVIEW:
170
+ - Does this pattern fit our codebase? Complexity justified?
171
+ - Simpler alternatives? Maintenance burden? Evidence-backed?
172
+ 4. Debate loop if FAIL → `researcher` defends or pivots → max 3 rounds
173
+ 5. `tech-lead` arbitrates disputes → DECISION → synthesizes deliverables
174
+
175
+ **CONSTRAINT INHERITANCE**: Architecture decisions MUST reference Phase 1 ("Based on requirement R1...", "Codebase constraint from SCOUT...", "Business rule from BA...")
176
+
177
+ **Deliverable**: `./reports/researchers/RESEARCH-{task}.md` + `./reports/designs/ADR-{task}.md`
178
+ **Exit Criteria**: Patterns researched, alternatives documented, ADRs drafted, feasibility validated
179
+ **Consensus**: ✅ CONSENSUS: tech-lead ✓ | researcher ✓ | reviewer ✓
180
+
181
+ ---
182
+
183
+ ## 🎭 Phase 3: PLAN CREATION — 🔺 GOLDEN TRIANGLE
184
+
185
+ > **THIS IS THE MOST CRITICAL PHASE.** Every step is detailed. No shortcuts.
186
+
187
+ | Role | Agent | Mission |
188
+ | --------- | --------------------------------------------- | ---------------------------------------------------------- |
189
+ | Tech Lead | `planner` | Decompose: plan structure, task breakdown, dependencies |
190
+ | Executor | `planner` (self-implements) | Execute: write detailed PLAN-{task}.md |
191
+ | Reviewer | `tech-lead` + `security-engineer` lens | Challenge: missing tasks, wrong estimates, security gaps, unfeasible steps |
192
+
193
+ **Prerequisite**: **READ** BRAINSTORM + SCOUT + RESEARCH + ADR files from Phases 1–2.
194
+
195
+ ### GOLDEN TRIANGLE PLAN CREATION LOOP (CRITICAL — Step by Step)
196
+
197
+ ```
198
+ ╔══════════════════════════════════════════════════════════════════════╗
199
+ ║ PHASE 3: PLAN CREATION LOOP — FOLLOW EXACTLY ║
200
+ ╠══════════════════════════════════════════════════════════════════════╣
201
+ ║ ║
202
+ ║ STEP 1: Planner reads ALL prior deliverables ║
203
+ ║ ───────────────────────────────────────── ║
204
+ ║ - Load BRAINSTORM → requirements + acceptance criteria ║
205
+ ║ - Load SCOUT → codebase map + constraints ║
206
+ ║ - Load RESEARCH → patterns + trade-offs ║
207
+ ║ - Load ADR → architecture decisions ║
208
+ ║ ║
209
+ ║ STEP 2: Planner creates Shared Task List for plan sections ║
210
+ ║ ───────────────────────────────────────── ║
211
+ ║ - Sections: overview, prerequisites, phases, tasks, risks, rollback ║
212
+ ║ - Format: [ID] [Status] [Section] [Dependencies] [Acceptance] ║
213
+ ║ - Post to Mailbox as TASK_ASSIGNMENT ║
214
+ ║ ║
215
+ ║ STEP 3: FOR EACH SECTION — Planner writes ║
216
+ ║ ───────────────────────────────────────── ║
217
+ ║ a. Write plan section with FULL detail: ║
218
+ ║ - Every task: description, agent, file paths, acceptance ║
219
+ ║ - Every phase: entry criteria, exit criteria, dependencies ║
220
+ ║ - Risk table: probability, impact, mitigation, rollback ║
221
+ ║ b. Post SUBMISSION to Mailbox with content + traceability links ║
222
+ ║ ║
223
+ ║ STEP 4: Reviewer reviews each SUBMISSION ║
224
+ ║ ───────────────────────────────────────── ║
225
+ ║ Checks against ALL 6 dimensions: ║
226
+ ║ ┌──────────────────────────────────────────────────────┐ ║
227
+ ║ │ 1. COMPLETENESS — All tasks covered? Nothing missing? │ ║
228
+ ║ │ 2. FEASIBILITY — Can each task actually be done? │ ║
229
+ ║ │ 3. SECURITY — OWASP Top 10? Auth? Input validation? │ ║
230
+ ║ │ 4. ESTIMATES — Realistic or optimistic? Evidence? │ ║
231
+ ║ │ 5. DEPENDENCIES — All explicit? Circular risks? │ ║
232
+ ║ │ 6. TRACEABILITY — Every task traces to a requirement? │ ║
233
+ ║ └──────────────────────────────────────────────────────┘ ║
234
+ ║ Posts REVIEW: PASS or FAIL with findings table ║
235
+ ║ ║
236
+ ║ STEP 5: IF FAIL — Debate Loop (max 3 rounds) ║
237
+ ║ ───────────────────────────────────────── ║
238
+ ║ - For EACH finding: Fix (if valid) or DEFENSE (if disputed) ║
239
+ ║ - Post RESUBMISSION/DEFENSE to Mailbox ║
240
+ ║ - Reviewer re-reviews → back to step 4 ║
241
+ ║ - After round 3 → ESCALATION → Planner ARBITRATES ║
242
+ ║ ║
243
+ ║ STEP 6: IF PASS → APPROVAL → section ✅ → next section ║
244
+ ║ ║
245
+ ║ STEP 7: After ALL sections complete ║
246
+ ║ ───────────────────────────── ║
247
+ ║ Planner verifies full plan coherence: ║
248
+ ║ - All sections ✅, no conflicts, acyclic dependencies ║
249
+ ║ - Every Phase 1 requirement has ≥1 task ║
250
+ ║ - Every Phase 2 ADR is reflected in plan ║
251
+ ║ Posts DECISION with consensus stamp → Phase output released ║
252
+ ╚══════════════════════════════════════════════════════════════════════╝
253
+ ```
254
+
255
+ ### PLAN QUALITY ENFORCEMENT (ENFORCED BY REVIEWER)
256
+
257
+ ```
258
+ 1. Every task MUST trace to a requirement or ADR — orphans = automatic FAIL
259
+ 2. Every external input path must have validation planned
260
+ 3. Every phase must have a rollback strategy
261
+ 4. Deviations from prior phase findings require explicit justification
262
+ ```
263
+
264
+ **Deliverable**: `./reports/plans/PLAN-{task}.md` (single) or `PLAN-{task}-phase1.md`, … (multi-phase)
265
+ **Exit Criteria**: Plan complete, all sections reviewed, security validated, estimates challenged, traceability verified
266
+ **Consensus**: ✅ CONSENSUS: planner ✓ | planner(exec) ✓ | tech-lead+security ✓
267
+
268
+ ---
269
+
270
+ ## 🎭 Phase 4: REVIEW & FINALIZATION — 🔺 GOLDEN TRIANGLE
271
+
272
+ | Role | Agent | Mission |
273
+ | --------- | ------------------------------------ | ---------------------------------------------------------- |
274
+ | Tech Lead | `tech-lead` | Final review, integration check |
275
+ | Executor | `reviewer` | Execute: comprehensive plan review |
276
+ | Reviewer | `business-analyst` | Challenge: business alignment, acceptance criteria coverage |
277
+
278
+ **Prerequisite**: **READ** PLAN file(s) + all Phase 1–2 artifacts.
279
+
280
+ **Triangle Loop**:
281
+ 1. `tech-lead` decomposes into: technical coherence, cross-phase traceability, risk adequacy, testability → TASK_ASSIGNMENT to Mailbox
282
+ 2. `reviewer` audits plan → posts SUBMISSION: structure assessment, completeness vs Phase 1 reqs, ADR alignment, security posture, executability score
283
+ 3. `business-analyst` reviews with business lens → posts REVIEW:
284
+ - Acceptance criteria cover all business requirements?
285
+ - Success metrics testable? Priority aligned with value?
286
+ - Stakeholders would approve as-is?
287
+ 4. Debate loop if FAIL → `reviewer` addresses gaps or defends → max 3 rounds
288
+ 5. `tech-lead` synthesizes final validation report
289
+
290
+ **FINAL QUALITY GATE**:
291
+ ```
292
+ FOR EACH requirement in BRAINSTORM-{task}.md:
293
+ → reviewer: Verify ≥1 plan task addresses this requirement
294
+ → business-analyst: Confirm AC matches business intent
295
+ → Document: "REQ-{id} → Task: {ref} → AC: {criteria} → ✓/✗"
296
+ ```
297
+
298
+ **Deliverable**: `./reports/qa/QA-PLAN-{task}.md` — includes: PASS/REVISE verdict, traceability matrix, security summary, business confirmation
299
+ **Exit Criteria**: Plan validated, technically coherent, security reviewed, business-aligned
300
+ **Consensus**: ✅ CONSENSUS: tech-lead ✓ | reviewer ✓ | business-analyst ✓
301
+
302
+ **⚠️ IF VERDICT = NEEDS REVISION:**
303
+ ```
304
+ 1. QA-PLAN lists specific amendments
305
+ 2. RETURN to Phase 3 → planner addresses amendments
306
+ 3. RE-RUN Phase 4 → max 2 revision cycles → then escalate to user
307
+ ```
308
+
309
+ ---
310
+
311
+ ## 🛡️ VERIFICATION CHECKPOINT
312
+
313
+ > **⛔ BLOCKING**: Load Context Gate protocol NOW before proceeding.
314
+ >
315
+ > **LOAD**: `rules/CONTEXT-GATE.md` — Execute HARD MODE protocol
316
+
317
+ ```yaml
318
+ context_gate_execution:
319
+ mode: "HARD (User Choice)"
320
+ trigger: "After Phase 4 completes with PASS"
321
+ protocol: "Follow rules/CONTEXT-GATE.md § HARD MODE"
322
+ variant_adjustments:
323
+ plan_file: "PLAN-{task}.md"
324
+ qa_report: "QA-PLAN-{task}.md"
325
+ mailbox: "MAILBOX-{date}.md contains full debate history"
326
+ remaining_action: "Hand off to implementation workflow"
327
+ ```
328
+
329
+ **DO NOT present completion until user selects option.**
330
+
331
+ ---
332
+
333
+ ## ✅ COMPLETION
334
+
335
+ ```markdown
336
+ # 🔺 Golden Triangle Planning Report: {task}
337
+
338
+ ## Phase Results
339
+ | Phase | Triangle | Consensus | Rounds |
340
+ |-------|----------|-----------|--------|
341
+ | P1: Requirements | researcher / scouter+BA / brainstormer | ✅ | {n} |
342
+ | P2: Architecture | tech-lead / researcher / reviewer | ✅ | {n} |
343
+ | P3: Plan Creation | planner / planner / tech-lead+security | ✅ | {n} |
344
+ | P4: Review | tech-lead / reviewer / business-analyst | ✅ | {n} |
345
+
346
+ ## Debate Summary
347
+ - Total submissions: {count} | First-pass: {count} | Debates: {count} | Arbitrations: {count}
348
+
349
+ ## Deliverables
350
+ 1. ✅ **Plan** — `./reports/plans/PLAN-{task}.md` (or multi-phase files)
351
+ 2. ✅ **QA** — `./reports/qa/QA-PLAN-{task}.md` confirms PASS
352
+ 3. 📬 **Debate** — `./reports/MAILBOX-{date}.md`
353
+
354
+ ## Next Actions
355
+ 1. 🍳 **Implement** → `/cook:team` or `/cook:hard`
356
+ 2. 📝 **Docs** → `/docs:core`
357
+ 3. 🔄 **Revise** → Re-run Phase 3 with updated requirements
358
+ ```
package/commands/plan.md CHANGED
@@ -37,6 +37,9 @@ IF task is complex (research needed, architectural):
37
37
  IF task is complex AND clean implementation handoff is critical:
38
38
  → Route to /plan:focus
39
39
 
40
+ IF task is complex AND maximum quality with team collaboration needed:
41
+ → Route to /plan:team
42
+
40
43
  IF unsure:
41
44
  → Default to /plan:fast
42
45
  ```
@@ -50,6 +53,7 @@ IF unsure:
50
53
  | `/plan:fast` | Quick planning without research |
51
54
  | `/plan:hard` | Full planning with research |
52
55
  | `/plan:focus` | Full planning with **enforced context optimization** |
56
+ | `/plan:team` | Maximum quality with parallel agent team collaboration |
53
57
 
54
58
  ---
55
59
 
@@ -65,6 +69,7 @@ IF unsure:
65
69
  1. ⚡ **Fast** → `/plan:fast` — Quick plan
66
70
  2. ⚡⚡⚡ **Hard** → `/plan:hard` — Full research-backed plan
67
71
  3. 🎯 **Focus** → `/plan:focus` — Full plan with **automatic context clearing** (clean implementation handoff)
72
+ 4. 👥 **Team** → `/plan:team` — Full team collaboration (parallel agents, maximum quality)
68
73
 
69
74
  ⏳ Awaiting selection...
70
75
  ```