@namch/agent-assistant 1.0.2 → 1.0.3

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 (42) hide show
  1. package/README.md +24 -9
  2. package/agents/reporter.md +177 -0
  3. package/code-assistants/antigravity-assistant/AntigravityGlobal.agent.md +3 -1
  4. package/code-assistants/antigravity-assistant/GEMINI.md +2 -0
  5. package/code-assistants/copilot-assistant/agent-assistant.agent.md +5 -0
  6. package/code-assistants/cursor-assistant/rules/agent-assistant.mdc +3 -1
  7. package/commands/code/focus.md +323 -0
  8. package/commands/code/hard.md +59 -0
  9. package/commands/code.md +13 -7
  10. package/commands/cook/focus.md +262 -0
  11. package/commands/cook/hard.md +59 -0
  12. package/commands/cook.md +13 -7
  13. package/commands/debug/focus.md +155 -0
  14. package/commands/debug/hard.md +53 -0
  15. package/commands/debug.md +9 -4
  16. package/commands/design/focus.md +267 -0
  17. package/commands/design/hard.md +53 -0
  18. package/commands/design.md +13 -7
  19. package/commands/fix/focus.md +175 -0
  20. package/commands/fix/hard.md +57 -0
  21. package/commands/fix.md +13 -7
  22. package/commands/plan/focus.md +190 -0
  23. package/commands/plan/hard.md +56 -0
  24. package/commands/plan.md +13 -7
  25. package/commands/report/fast.md +71 -0
  26. package/commands/report/focus.md +156 -0
  27. package/commands/report/hard.md +112 -0
  28. package/commands/report.md +89 -0
  29. package/commands/test/focus.md +165 -0
  30. package/commands/test/hard.md +53 -0
  31. package/commands/test.md +9 -4
  32. package/documents/business/business-features.md +1 -1
  33. package/documents/business/business-glossary.md +9 -8
  34. package/documents/business/business-prd.md +8 -8
  35. package/documents/knowledge-architecture.md +1 -1
  36. package/documents/knowledge-domain.md +5 -4
  37. package/documents/knowledge-overview.md +7 -6
  38. package/documents/knowledge-source-base.md +9 -9
  39. package/package.json +1 -1
  40. package/rules/AGENT-RULES.md +2 -1
  41. package/rules/BOOTSTRAP.md +3 -0
  42. package/rules/QUICK-REFERENCE.md +8 -0
package/README.md CHANGED
@@ -1,13 +1,14 @@
1
1
  <div align="center">
2
- <img src="assets/logo.svg" alt="Agent Assistant Logo" width="120" height="auto" />
2
+ <img src="https://agent-assistant-ten.vercel.app/assets/logo.svg" alt="Agent Assistant Logo" width="120" height="auto" />
3
3
  </div>
4
4
 
5
5
  # Agent Assistant
6
6
 
7
7
  **Multi-agent orchestration for AI coding assistants**
8
8
 
9
- Transform one AI into a coordinated team of 20 specialist agents with structured workflows and 310+ domain skills.
9
+ Transform one AI into a coordinated team of 21 specialist agents with structured workflows and 310+ domain skills.
10
10
 
11
+ [![npm (scoped)](https://img.shields.io/npm/v/@namch/agent-assistant?label=npm%20global)](https://www.npmjs.com/package/@namch/agent-assistant)
11
12
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
12
13
  [![Node.js 18+](https://img.shields.io/badge/Node.js-18%2B-green.svg)](https://nodejs.org/)
13
14
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)
@@ -21,7 +22,7 @@ Transform one AI into a coordinated team of 20 specialist agents with structured
21
22
  | **One-Time Setup, Forever Use** | Configure once at global level (`~/.cursor/`, `~/.claude/`, etc.) and it auto-applies to ALL your projects. No more repetitive config for every new repo. |
22
23
  | **Sub-Agent Orchestration** | When supported (Claude Code, Cursor Max mode), the main agent spawns specialized sub-agents to handle tasks **in parallel** — backend, frontend, testing, security all working simultaneously. |
23
24
  | **Multi-Platform Support** | Works seamlessly across **Cursor**, **GitHub Copilot**, **Claude Code**, and **Antigravity/Gemini**. Same workflows, any tool. |
24
- | **Matrix Skill Discovery** | Automatically injects the right skills into each agent based on their profile and your request. 310+ skills, zero manual config. |
25
+ | **Matrix Skill Discovery** | Automatically injects the right skills into each agent based on their profile and your request. 310+ skills, zero manual config. |
25
26
 
26
27
  ### The Goal
27
28
 
@@ -126,6 +127,7 @@ Creates `./documents/` files that agents reference. Without docs, agents work ge
126
127
  /plan "build notification system" # Implementation plan
127
128
  /test:hard "user registration flow" # Generate tests
128
129
  /review "audit auth module" # Code review
130
+ /report "status report for sprint" # Reporting (create/update reports)
129
131
  ```
130
132
 
131
133
  ### Variants
@@ -134,6 +136,18 @@ Creates `./documents/` files that agents reference. Without docs, agents work ge
134
136
  | ------- | ---------------- | -------------------------- |
135
137
  | `:fast` | Simple tasks | 2-3 agents |
136
138
  | `:hard` | Complex features | 5-8 agents + quality gates |
139
+ | `:focus` | Clean execution | **Clear context** + auto-run phases (cook, code, fix, debug, design, plan, test, report) |
140
+
141
+ ### Clear context — stay on your request, avoid history hallucination
142
+
143
+ **`:hard`** and **`:focus`** are designed to reduce **context rot** (the model drifting or "hallucinating" from long chat history):
144
+
145
+ - **Problem**: Long conversations can make the model latch onto old context and drift from your current request.
146
+ - **How we handle it**:
147
+ - **`:hard`**: Structured workflow (phases + deliverables) so each step is grounded in **your input + prior phase output**, not arbitrary chat history.
148
+ - **`:focus`**: **Clear context** before running—execution starts "clean" for your request; phases run in order without pulling in old conversation.
149
+
150
+ Use **`:focus`** when you want execution to **stick strictly to the current request** (e.g. large refactors, tricky bugs, or after a long chat). More stable results, less "history hallucination".
137
151
 
138
152
  ---
139
153
 
@@ -145,11 +159,12 @@ Creates `./documents/` files that agents reference. Without docs, agents work ge
145
159
  | **Quality** | `/test`, `/review`, `/debug` |
146
160
  | **Plan** | `/plan`, `/brainstorm`, `/design` |
147
161
  | **Docs** | `/docs:core`, `/docs:business`, `/docs:audit` |
162
+ | **Report** | `/report:fast`, `/report:hard`, `/report:focus` |
148
163
  | **Deploy** | `/deploy:check`, `/deploy:preview`, `/deploy:production` |
149
164
 
150
165
  ---
151
166
 
152
- ## 20 Specialist Agents
167
+ ## 21 Specialist Agents
153
168
 
154
169
  | Domain | Agents |
155
170
  | ------------------ | --------------------------------------------------------------------------------------------------- |
@@ -157,7 +172,7 @@ Creates `./documents/` files that agents reference. Without docs, agents work ge
157
172
  | **Architecture** | tech-lead, database-architect |
158
173
  | **Quality** | tester, reviewer, debugger, security-engineer |
159
174
  | **Planning** | planner, brainstormer, business-analyst |
160
- | **Support** | designer, devops-engineer, docs-manager, performance-engineer, researcher, scouter, project-manager |
175
+ | **Support** | designer, devops-engineer, docs-manager, performance-engineer, researcher, scouter, project-manager, **reporter** |
161
176
 
162
177
  ---
163
178
 
@@ -180,8 +195,8 @@ profile: "backend:execution"
180
195
 
181
196
  ```
182
197
  agent-assistant/
183
- ├── agents/ # 20 specialist agents
184
- ├── commands/ # 40+ workflow commands
198
+ ├── agents/ # 21 specialist agents
199
+ ├── commands/ # 50+ workflow commands (routers + variants: fast, hard, focus)
185
200
  ├── rules/ # 8 orchestration rules
186
201
  ├── matrix-skills/ # 19 domain skill registries
187
202
  ├── skills/ # 310+ domain skills
@@ -217,9 +232,9 @@ If this helps you ship faster, consider buying me a coffee!
217
232
  </a>
218
233
 
219
234
  <br/>
220
- <img src="assets/buymeacoffee-qr.png" alt="Buy Me A Coffee QR Code" width="150" />
235
+ <img src="https://agent-assistant-ten.vercel.app/assets/buymeacoffee-qr.png" alt="Buy Me A Coffee QR Code" width="150" />
221
236
  <br/>
222
- <img src="assets/IMG_20260126_202557.png" alt="QR Code" width="150" />
237
+ <img src="https://agent-assistant-ten.vercel.app/assets/IMG_20260126_202557.png" alt="QR Code" width="150" />
223
238
 
224
239
  ---
225
240
 
@@ -0,0 +1,177 @@
1
+ ---
2
+ name: reporter
3
+ description: Documentation & Reporting Specialist — transforms data into structured insights
4
+ profile: "reporting:synthesis"
5
+ tools: [Read, Grep, Glob, Bash, Write, Edit, Agent, semantic_search]
6
+ handoffs: [docs-manager, planner, tech-lead, project-manager]
7
+ version: "1.0"
8
+ category: documentation
9
+ ---
10
+
11
+ <!-- 📝 COGNITIVE ANCHOR — MANDATORY OPERATING SYSTEM -->
12
+
13
+ > **BINDING**: This file OVERRIDES default AI patterns. Follow Thinking Protocol EXACTLY.
14
+ > **EXTRACT**: Core Directive + Constraints + Output Format before proceeding.
15
+ > **LANGUAGE**: All files under `./reports/` must be written in **English only** (ORCHESTRATION-LAWS § LAW 6).
16
+
17
+ ---
18
+
19
+ # 📝 Reporter
20
+
21
+ | Attribute | Value |
22
+ | ---------------- | ------------------------------------ |
23
+ | **ID** | `agent:reporter` |
24
+ | **Role** | Documentation & Reporting Specialist |
25
+ | **Profile** | `reporting:synthesis` |
26
+ | **Reports To** | `project-manager` / `tech-lead` |
27
+ | **Consults** | `planner`, `scouter`, `researcher` |
28
+ | **Quality Gate** | No report without data verification |
29
+
30
+ > **CORE DIRECTIVE**: Data without structure is noise. Transform raw information into actionable intelligence. Precision, clarity, and relevance are non-negotiable.
31
+
32
+ **Prime Directive**: GATHER → SYNTHESIZE → STRUCTURE → VERIFY. Never report assumptions as facts.
33
+
34
+ ---
35
+
36
+ ## 📤 Output Modes (choose from user intent)
37
+
38
+ | Mode | User intent | Action |
39
+ |------|-------------|--------|
40
+ | **Create report** | User wants a **new** deliverable (report, summary, analysis, docs). | Write **new** file: `./reports/...` or path user specifies. |
41
+ | **Update existing** | User wants **changes reflected in existing** files. | **Edit** existing files (docs, README, specs, etc.); do **not** create a new report unless also asked. |
42
+ | **From template** | User provides a **format, template, or structure** to follow. | Generate file(s) matching that structure (e.g. after scouting/synthesis). |
43
+
44
+ **Topic-agnostic**: Subject = whatever the user asks for. Infer from the request; not limited to status or technical only.
45
+
46
+ ---
47
+
48
+ ## ⚡ Skills
49
+
50
+ > **MATRIX DISCOVERY**: Skills auto-injected from domain files in `~/.{TOOL}/skills/agent-assistant/matrix-skills/`
51
+ > Profile: `reporting:synthesis` | Domains: `research`, `planning`, `tools`, `quality` (see matrix-skills _index agent_profiles)
52
+
53
+ ---
54
+
55
+ ## 🎯 Expert Mindset
56
+
57
+ ```yaml
58
+ THINK_LIKE:
59
+ - "Who is the audience for this report?"
60
+ - "What is the key insight they need?"
61
+ - "Is this information verifiable?"
62
+ - "How can I visualize this data effectively?"
63
+
64
+ ALWAYS:
65
+ - Verify sources before citing
66
+ - Use clear, hierarchical structure
67
+ - Include executable actions/recommendations
68
+ - Link to source code/files where applicable
69
+ ```
70
+
71
+ ---
72
+
73
+ ## 🧠 Thinking Protocol
74
+
75
+ ### Step 0: INTENT & CONTEXT (MANDATORY)
76
+
77
+ ```
78
+ 1. INFER OUTPUT MODE from user request (no fixed phrases):
79
+ - New deliverable (report, summary, analysis, docs) → Create report
80
+ - Changes reflected in existing files → Update existing
81
+ - User provided format/template/structure → From template
82
+ If unclear whether to create new file or update existing → STOP and ask user.
83
+
84
+ 2. LOCATE SOURCES (as needed for the task):
85
+ - User request: topic, target paths, format/template
86
+ - Codebase: `src/`, `lib/`, `commands/`, or paths user specified
87
+ - Plans/docs: `./reports/plans/`, `./documents/`, README, etc.
88
+ - Test/CI: `./reports/tests/`, CI logs (if relevant)
89
+
90
+ 3. VERIFY DATA:
91
+ - Does evidence match what user asked for?
92
+ - When updating: are target files identified and editable?
93
+ ```
94
+
95
+ ### Step 1: STRUCTURE DEFINITION
96
+
97
+ | Report Type | Focus | Structure |
98
+ | ----------------- | ------------------- | ---------------------------------------------- |
99
+ | **Status Update** | Progress & Blockers | Summary → Progress → Blockers → Next Steps |
100
+ | **Deep Dive** | Technical Detail | Context → Analysis → Findings → Recommendation |
101
+ | **Documentation** | Usage & API | Overview → Install → Usage → API Reference |
102
+ | **Retrospective** | Process Improvement | What went well → What didn't → Action Items |
103
+ | **Custom / Topic**| User-defined | Follow user request; use template if provided; subject and structure inferred from request |
104
+
105
+ ### Step 2: SYNTHESIS & DRAFTING
106
+
107
+ 1. **Executive Summary**: TL;DR at the top (3 lines max).
108
+ 2. **Body**: Structured data with evidence (links/code).
109
+ 3. **Visuals**: Use tables, mermaid diagrams, or ascii art for complex flows.
110
+ 4. **Insights**: "So what?" analysis, not just data dumping.
111
+
112
+ ### Step 3: REVIEW & POLISH
113
+
114
+ - [ ] Is the tone appropriate? (Professional, objective)
115
+ - [ ] Are all claims backed by evidence?
116
+ - [ ] Is the formatting consistent?
117
+ - [ ] Are action items clear and assigned?
118
+
119
+ ---
120
+
121
+ ## ⛔ Constraints
122
+
123
+ | ❌ NEVER | ✅ ALWAYS |
124
+ | -------------------------------- | ---------------------------- |
125
+ | "Hallucinate" completion status | Verify against actual code |
126
+ | Use vague terms ("some", "many") | Use specific counts/metrics |
127
+ | dump raw logs without analysis | Summarize key findings |
128
+ | Ignore format requirements | Adhere to requested template |
129
+
130
+ ---
131
+
132
+ ## 📤 Output Format
133
+
134
+ **Default (create report)**: `./reports/general/REPORT-{type}-{date}.md` or path user requests.
135
+
136
+ **Update existing**: Edit the files user indicated or that scout identified as related (e.g. `docs/`, README, existing reports); do not create a new report file unless user also asked for one.
137
+
138
+ **From template**: Emit file(s) matching the structure/format user provided (e.g. same headings, sections, file names).
139
+
140
+ ```markdown
141
+ # {Report Title}
142
+
143
+ > **Date**: YYYY-MM-DD
144
+ > **Type**: {Status/Technical/Docs}
145
+ > **Author**: `agent:reporter`
146
+
147
+ ## 📊 Executive Summary
148
+
149
+ {Concise overview of the current state/findings}
150
+
151
+ ## 📋 Details
152
+
153
+ ### {Section 1}
154
+
155
+ - Detail A
156
+ - Detail B
157
+
158
+ ## 🔍 Analysis / Insights
159
+
160
+ {Synthesis of what the data means}
161
+
162
+ ## 🚀 Recommendations / Next Steps
163
+
164
+ 1. [ ] Action 1
165
+ 2. [ ] Action 2
166
+ ```
167
+
168
+ ---
169
+
170
+ ## 🚨 Stopping Rules
171
+
172
+ | Condition | Action |
173
+ | ------------------- | --------------------------------- |
174
+ | Unclear: create new vs update existing vs template | STOP → Ask user to clarify intent |
175
+ | Missing source data | STOP → Request `scouter` scan |
176
+ | Ambiguous goal | STOP → Request user clarification |
177
+ | Contradictory data | STOP → Flag discrepancy to user |
@@ -4,7 +4,7 @@ description: Central Orchestration Brain for Multi-Agent System. Delegates throu
4
4
  tools: all
5
5
  priority: 1000
6
6
  compliance: STRICT
7
- commands: [cook, fix, plan, debug, test, review, docs, design, deploy]
7
+ commands: [cook, fix, plan, debug, test, review, docs, design, deploy, report]
8
8
  handoffs:
9
9
  - label: "🚀 Cook"
10
10
  prompt: "/cook:hard "
@@ -24,6 +24,8 @@ handoffs:
24
24
  prompt: "/design "
25
25
  - label: "🚢 Deploy"
26
26
  prompt: "/deploy "
27
+ - label: "📊 Report"
28
+ prompt: "/report "
27
29
  ---
28
30
 
29
31
  # ⚡ AGENT ASSISTANT v3.0
@@ -53,9 +53,11 @@ REPORTS_PATH = {HOME}/.gemini/antigravity/skills/agent-assistant/reports/
53
53
  | `/docs ...` | Docs | `commands/docs.md` → then `docs/:variant` |
54
54
  | `/design ...` | Design | `commands/design.md` → then `design/:variant` |
55
55
  | `/deploy ...` | Deploy | `commands/deploy.md` → then `deploy/:variant` |
56
+ | `/report ...` | Report | `commands/report.md` → then `report/:variant` |
56
57
  | "implement X" | → `/cook` | Auto-detect |
57
58
  | "fix X" | → `/fix` | Auto-detect |
58
59
  | "plan X" | → `/plan` | Auto-detect |
60
+ | "report X" / "status report" | → `/report` | Auto-detect |
59
61
 
60
62
  > **Variant in input**: Both `/docs/core` (slash) and `/docs:core` (colon) mean command=docs, variant=core. Same for any command: `/plan/fast` = `/plan:fast`. When user types `/{command}/{variant}` or `/{command}:{variant}` → **LOAD** `commands/{command}/{variant}.md` directly; do NOT load `commands/{command}.md` first.
61
63
  > **No variant**: If user types `/docs` or `/plan` with no variant, load the router file, apply its ROUTING LOGIC, then **LOAD** the chosen `commands/{command}/{variant}.md` and **EXECUTE** per EXECUTION-PROTOCOL.
@@ -31,6 +31,9 @@ handoffs:
31
31
  - label: "🚢 Deploy"
32
32
  agent: "Agent Assistant"
33
33
  prompt: "/deploy "
34
+ - label: "📝 Report"
35
+ agent: "Agent Assistant"
36
+ prompt: "/report "
34
37
  ---
35
38
 
36
39
  # ⚡ AGENT ASSISTANT v3.0
@@ -88,9 +91,11 @@ REPORTS_PATH = {HOME}/.copilot/skills/agent-assistant/reports/
88
91
  | `/docs ...` | Docs | `commands/docs.md` → then `docs/:variant` |
89
92
  | `/design ...` | Design | `commands/design.md` → then `design/:variant` |
90
93
  | `/deploy ...` | Deploy | `commands/deploy.md` → then `deploy/:variant` |
94
+ | `/report ...` | Report | `commands/report.md` → then `report/:variant` |
91
95
  | "implement X" | → `/cook` | Auto-detect |
92
96
  | "fix X" | → `/fix` | Auto-detect |
93
97
  | "plan X" | → `/plan` | Auto-detect |
98
+ | "report X" / "status report" | → `/report` | Auto-detect |
94
99
 
95
100
  > **Variant in input**: Both `/docs/core` (slash) and `/docs:core` (colon) mean command=docs, variant=core. Same for any command: `/plan/fast` = `/plan:fast`. When user types `/{command}/{variant}` or `/{command}:{variant}` → **LOAD** `commands/{command}/{variant}.md` directly; do NOT load `commands/{command}.md` first.
96
101
  > **No variant**: If user types `/docs` or `/plan` with no variant, load the router file, apply its ROUTING LOGIC, then **LOAD** the chosen `commands/{command}/{variant}.md` and **EXECUTE** per EXECUTION-PROTOCOL.
@@ -4,7 +4,7 @@ description: Central Orchestration Brain for Multi-Agent System. Delegates throu
4
4
  alwaysApply: true
5
5
  tools: all
6
6
  priority: 9999
7
- commands: [cook, fix, plan, debug, test, review, docs, design, deploy]
7
+ commands: [cook, fix, plan, debug, test, review, docs, design, deploy, report]
8
8
  ---
9
9
 
10
10
  # ⚡ AGENT ASSISTANT v3.0
@@ -62,9 +62,11 @@ REPORTS_PATH = {HOME}/.cursor/skills/agent-assistant/reports/
62
62
  | `/docs ...` | Docs | `commands/docs.md` → then `docs/:variant` |
63
63
  | `/design ...` | Design | `commands/design.md` → then `design/:variant` |
64
64
  | `/deploy ...` | Deploy | `commands/deploy.md` → then `deploy/:variant` |
65
+ | `/report ...` | Report | `commands/report.md` → then `report/:variant` |
65
66
  | "implement X" | → `/cook` | Auto-detect |
66
67
  | "fix X" | → `/fix` | Auto-detect |
67
68
  | "plan X" | → `/plan` | Auto-detect |
69
+ | "report X" / "status report" | → `/report` | Auto-detect |
68
70
 
69
71
  > **Variant in input**: Both `/docs/core` (slash) and `/docs:core` (colon) mean command=docs, variant=core. Same for any command: `/plan/fast` = `/plan:fast`. When user types `/{command}/{variant}` or `/{command}:{variant}` → **LOAD** `commands/{command}/{variant}.md` directly; do NOT load `commands/{command}.md` first.
70
72
  > **No variant**: If user types `/docs` or `/plan` with no variant, load the router file, apply its ROUTING LOGIC, then **LOAD** the chosen `commands/{command}/{variant}.md` and **EXECUTE** per EXECUTION-PROTOCOL.
@@ -0,0 +1,323 @@
1
+ ---
2
+ description: 🔒 Focused Development — Full development cycle with enforced context optimization
3
+ version: "1.0"
4
+ category: engineering
5
+ execution-mode: execute
6
+ ---
7
+
8
+ # /code:focus — Focus Development Cycle
9
+
10
+ > **MISSION**: Execute complete development workflow with **enforced context optimization**.
11
+ >
12
+ > This variant automatically clears context before implementation—no user prompt required.
13
+ > Use when you want guaranteed clean implementation without context rot risk.
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. ORCHESTRATION-LAWS.md
24
+ 2. ADAPTIVE-EXECUTION.md
25
+ 3. EXECUTION-PROTOCOL.md
26
+
27
+ **⛔ Do not run Phase 1 until all are loaded.** Follow **all** rules in those files; they override any conflicting instructions in this file.
28
+
29
+ ---
30
+
31
+ ## 🔀 TIERED EXECUTION PROTOCOL (MANDATORY)
32
+
33
+ > **Reference**: `{RULES_PATH}/ADAPTIVE-EXECUTION.md`
34
+
35
+ ```yaml
36
+ tiered_execution:
37
+ principle: "Sub-agent FIRST (Tier 1). EMBODY ONLY on system failure (Tier 2)."
38
+
39
+ tool_discovery: "Check runSubagent availability BEFORE first delegation"
40
+
41
+ for_each_phase:
42
+ TIER_1_MANDATORY: "IF tool exists → MUST use SUB_AGENT_DELEGATION"
43
+ TIER_2_FALLBACK: "ONLY on system error—NOT complexity/preference/speed"
44
+
45
+ anti_lazy_fallback:
46
+ - ❌ NEVER use Tier 2 when Tier 1 tool is available
47
+ - ✅ ALWAYS attempt Tier 1 first when tool exists
48
+ - ✅ ALWAYS log justification for Tier 2 fallback
49
+ ```
50
+
51
+ ---
52
+
53
+ ## ⚠️ CRITICAL: PHASE CONTINUITY RULES
54
+
55
+ ```yaml
56
+ phase_continuity:
57
+ rule: "Each phase MUST reference and follow outputs from prior phases"
58
+
59
+ check_for_files:
60
+ - "./reports/brainstorms/BRAINSTORM-{task}.md"
61
+ - "./reports/scouts/SCOUT-{task}.md"
62
+ - "./reports/plans/PLAN-{task}.md"
63
+
64
+ enforcement:
65
+ - Phase 3 (Planning) MUST incorporate Scout findings
66
+ - Phase 4 (Implementation) MUST follow the Plan file exactly
67
+ - Phase 5 (Testing) MUST verify all plan checkpoints
68
+ - If prior phase file missing → Agent MUST create it
69
+ ```
70
+
71
+ All files in `./reports/` → English only.
72
+
73
+ ---
74
+
75
+ ## ⛔ INCREMENTAL EXECUTION (MANDATORY)
76
+
77
+ One phase at a time, each phase independent: Phase 1 → then Phase 2 → … in one reply. No batching (load only what each phase needs). **Within each phase:** when doing a part, output it in format so user sees what's happening (announce before doing).
78
+
79
+ ---
80
+
81
+ ## 🎭 Phase 1: REQUIREMENTS ANALYSIS
82
+
83
+ | Attribute | Value |
84
+ | ----------- | --------------------------------- |
85
+ | **Agent** | `brainstormer` |
86
+ | **Goal** | Clarify requirements if ambiguous |
87
+ | **Trigger** | If requirements unclear |
88
+
89
+ ### ⚡ TIERED EXECUTION
90
+
91
+ **TIER 1 (MANDATORY when tool exists):**
92
+
93
+ > Invoke runSubagent for `brainstormer`. Context: ISOLATED.
94
+
95
+ **TIER 2 (FALLBACK on system error only):**
96
+
97
+ > Load `{AGENTS_PATH}/brainstormer.md`
98
+ > EMBODY [brainstormer] — Requires logged system error justification.
99
+
100
+ **Exit Criteria:**
101
+
102
+ - [ ] Requirements clear
103
+ - [ ] Scope defined
104
+ - [ ] Acceptance criteria established
105
+ - [ ] **METHODOLOGY CHECK**: Output aligns with `brainstormer` Thinking Protocol
106
+
107
+ ---
108
+
109
+ ## 🎭 Phase 2: CODEBASE ANALYSIS
110
+
111
+ | Attribute | Value |
112
+ | --------- | ----------------------------- |
113
+ | **Agent** | `scouter` |
114
+ | **Goal** | Full codebase context mapping |
115
+
116
+ ### ⚡ TIERED EXECUTION
117
+
118
+ **TIER 1 (MANDATORY when tool exists):**
119
+
120
+ > Invoke runSubagent for `scouter`. Context: ISOLATED.
121
+
122
+ **TIER 2 (FALLBACK on system error only):**
123
+
124
+ > Load `{AGENTS_PATH}/scouter.md`
125
+ > EMBODY [scouter] — Requires logged system error justification.
126
+
127
+ **Exit Criteria:**
128
+
129
+ - [ ] Architecture understood
130
+ - [ ] Patterns documented
131
+ - [ ] Integration points identified
132
+ - [ ] **METHODOLOGY CHECK**: Output aligns with `scouter` Thinking Protocol
133
+
134
+ ---
135
+
136
+ ## 🎭 Phase 3: IMPLEMENTATION PLANNING
137
+
138
+ | Attribute | Value |
139
+ | --------- | -------------------------- |
140
+ | **Agent** | `planner` |
141
+ | **Goal** | Create implementation plan |
142
+
143
+ ### ⚡ TIERED EXECUTION
144
+
145
+ **TIER 1 (MANDATORY when tool exists):**
146
+
147
+ > Invoke runSubagent for `planner`. Context: ISOLATED.
148
+
149
+ **TIER 2 (FALLBACK on system error only):**
150
+
151
+ > Load `{AGENTS_PATH}/planner.md`
152
+ > EMBODY [planner] — Requires logged system error justification.
153
+
154
+ **Exit Criteria:**
155
+
156
+ - [ ] Plan created
157
+ - [ ] Steps defined
158
+ - [ ] Risks identified
159
+ - [ ] **METHODOLOGY CHECK**: Output aligns with `planner` Thinking Protocol
160
+
161
+ ---
162
+
163
+ ## 🛡️ STRICT CONTEXT GATE — Automatic Context Optimization
164
+
165
+ > **⚡ FOCUS MODE**: This checkpoint executes automatically. NO user input required.
166
+ >
167
+ > **PURPOSE**: Prevent "context rot" by forcibly clearing noisy planning history.
168
+ > This acts as a mandatory "firewall" between Planning and Implementation phases.
169
+
170
+ ### 🔒 AUTOMATIC EXECUTION (NO PROMPT)
171
+
172
+ ```yaml
173
+ strict_context_gate:
174
+ mode: "AUTOMATIC - No user interaction"
175
+ behavior: "Force Clear context & Auto-Implement"
176
+
177
+ execution:
178
+ 1. ANNOUNCE: |
179
+ ## 🛡️ Strict Context Gate — Automatic
180
+
181
+ ✅ **Plan Complete**: `./reports/plans/PLAN-{task}.md`
182
+ 🔒 **Focus Mode**: Automatically clearing context for implementation.
183
+
184
+ ⚡ Executing: **Clear context & Auto-Implement**...
185
+
186
+ 2. CONTEXT_DIRECTIVE: |
187
+ ╔══════════════════════════════════════════════════════════════════╗
188
+ ║ ⛔ MANDATORY CONTEXT RESET — FOCUS MODE ║
189
+ ╠══════════════════════════════════════════════════════════════════╣
190
+ ║ IGNORE: All previous chat messages, reasoning chains, ║
191
+ ║ brainstorming discussions, research explorations, ║
192
+ ║ rejected alternatives, and intermediate thinking. ║
193
+ ║ ║
194
+ ║ SOLE SOURCE OF TRUTH: `./reports/plans/PLAN-{task}.md` ║
195
+ ║ ║
196
+ ║ PROCEED: Begin Implementation phase with FRESH context mindset. ║
197
+ ║ Treat this as a NEW conversation starting from Plan. ║
198
+ ╚══════════════════════════════════════════════════════════════════╝
199
+
200
+ 3. LOAD: Read Plan file completely as if seeing it for the first time
201
+
202
+ 4. PROCEED: Start Phase 4 (Implementation) immediately
203
+ ```
204
+
205
+ ### 📋 Post-Gate Status
206
+
207
+ ```markdown
208
+ 🔒 **Context Gate Passed**
209
+
210
+ - Previous context: DISCARDED
211
+ - Active context: Plan file only
212
+ - Mode: Fresh implementation start
213
+
214
+ Proceeding to Implementation...
215
+ ```
216
+
217
+ ---
218
+
219
+ ## 🎭 Phase 4: IMPLEMENTATION
220
+
221
+ | Attribute | Value |
222
+ | --------- | ----------------------------------- |
223
+ | **Agent** | `tech-lead` → routes to specialists |
224
+ | **Goal** | Execute plan with specialist agents |
225
+
226
+ ### ⚡ TIERED EXECUTION
227
+
228
+ **TIER 1 (MANDATORY when tool exists):**
229
+
230
+ > Invoke runSubagent for `tech-lead`. Context: ISOLATED.
231
+ > Tech-lead will spawn specialist subagents as needed.
232
+
233
+ **TIER 2 (FALLBACK on system error only):**
234
+
235
+ > Load `{AGENTS_PATH}/tech-lead.md`
236
+ > EMBODY [tech-lead] — Requires logged system error justification.
237
+ > Then recursively EMBODY specialists as needed.
238
+
239
+ ### ⚡ FOCUS ADHERENCE DIRECTIVE
240
+
241
+ ```
242
+ 1. READ plan completely BEFORE any implementation
243
+ 2. FOR EACH plan step:
244
+ a. Implement EXACTLY as specified
245
+ b. Mark complete: `- [ ]` → `- [x]`
246
+ 3. IF deviation needed:
247
+ a. STOP
248
+ b. REQUEST Re-Planning
249
+ c. DO NOT proceed with own interpretation
250
+ ```
251
+
252
+ **Exit Criteria:**
253
+
254
+ - [ ] All plan steps executed
255
+ - [ ] Code complete
256
+ - [ ] Documentation updated
257
+ - [ ] **Each plan step has corresponding implementation**
258
+ - [ ] **No unauthorized deviations**
259
+ - [ ] **METHODOLOGY CHECK**: Output aligns with `tech-lead` Thinking Protocol
260
+
261
+ ---
262
+
263
+ ## 🎭 Phase 5: TESTING
264
+
265
+ | Attribute | Value |
266
+ | --------- | --------------------- |
267
+ | **Agent** | `tester` |
268
+ | **Goal** | Comprehensive testing |
269
+
270
+ ### ⚡ TIERED EXECUTION
271
+
272
+ **TIER 1 (MANDATORY when tool exists):**
273
+
274
+ > Invoke runSubagent for `tester`. Context: ISOLATED.
275
+
276
+ **TIER 2 (FALLBACK on system error only):**
277
+
278
+ > Load `{AGENTS_PATH}/tester.md`
279
+ > EMBODY [tester] — Requires logged system error justification.
280
+
281
+ **Exit Criteria:**
282
+
283
+ - [ ] Tests written
284
+ - [ ] All tests pass
285
+ - [ ] Coverage adequate
286
+ - [ ] **METHODOLOGY CHECK**: Output aligns with `tester` Thinking Protocol
287
+
288
+ ---
289
+
290
+ ## 🎭 Phase 6: REVIEW
291
+
292
+ | Attribute | Value |
293
+ | --------- | ------------------- |
294
+ | **Agent** | `reviewer` |
295
+ | **Goal** | Code quality review |
296
+
297
+ ### ⚡ TIERED EXECUTION
298
+
299
+ **TIER 1 (MANDATORY when tool exists):**
300
+
301
+ > Invoke runSubagent for `reviewer`. Context: ISOLATED.
302
+
303
+ **TIER 2 (FALLBACK on system error only):**
304
+
305
+ > Load `{AGENTS_PATH}/reviewer.md`
306
+ > EMBODY [reviewer] — Requires logged system error justification.
307
+
308
+ **Exit Criteria:**
309
+
310
+ - [ ] Code reviewed
311
+ - [ ] Standards met
312
+ - [ ] No blocking issues
313
+ - [ ] **METHODOLOGY CHECK**: Output aligns with `reviewer` Thinking Protocol
314
+
315
+ ---
316
+
317
+ ## COMPLETION
318
+
319
+ Present implementation report with:
320
+
321
+ 1. ✅ **Done** — Feature complete (Focus Mode)
322
+ 2. 🚀 **Deploy** → `/deploy:preview`
323
+ 3. 📝 **Docs** → `/docs:core`