@namch/agent-assistant 1.0.1 → 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.
- package/README.md +103 -40
- package/agents/reporter.md +177 -0
- package/code-assistants/antigravity-assistant/AntigravityGlobal.agent.md +3 -1
- package/code-assistants/antigravity-assistant/GEMINI.md +2 -0
- package/code-assistants/copilot-assistant/agent-assistant.agent.md +5 -0
- package/code-assistants/cursor-assistant/rules/agent-assistant.mdc +3 -1
- package/commands/code/focus.md +323 -0
- package/commands/code/hard.md +59 -0
- package/commands/code.md +13 -7
- package/commands/cook/focus.md +262 -0
- package/commands/cook/hard.md +59 -0
- package/commands/cook.md +13 -7
- package/commands/debug/focus.md +155 -0
- package/commands/debug/hard.md +53 -0
- package/commands/debug.md +9 -4
- package/commands/design/focus.md +267 -0
- package/commands/design/hard.md +53 -0
- package/commands/design.md +13 -7
- package/commands/fix/focus.md +175 -0
- package/commands/fix/hard.md +57 -0
- package/commands/fix.md +13 -7
- package/commands/plan/focus.md +190 -0
- package/commands/plan/hard.md +56 -0
- package/commands/plan.md +13 -7
- package/commands/report/fast.md +71 -0
- package/commands/report/focus.md +156 -0
- package/commands/report/hard.md +112 -0
- package/commands/report.md +89 -0
- package/commands/test/focus.md +165 -0
- package/commands/test/hard.md +53 -0
- package/commands/test.md +9 -4
- package/documents/business/business-features.md +1 -1
- package/documents/business/business-glossary.md +9 -8
- package/documents/business/business-prd.md +8 -8
- package/documents/knowledge-architecture.md +1 -1
- package/documents/knowledge-domain.md +5 -4
- package/documents/knowledge-overview.md +7 -6
- package/documents/knowledge-source-base.md +9 -9
- package/package.json +1 -1
- package/rules/AGENT-RULES.md +2 -1
- package/rules/BOOTSTRAP.md +3 -0
- package/rules/QUICK-REFERENCE.md +8 -0
package/commands/cook/hard.md
CHANGED
|
@@ -134,6 +134,65 @@ One phase at a time, each phase independent: Phase 1 → then Phase 2 → … in
|
|
|
134
134
|
|
|
135
135
|
---
|
|
136
136
|
|
|
137
|
+
## 🛡️ VERIFICATION CHECKPOINT — Context Optimization
|
|
138
|
+
|
|
139
|
+
> **PURPOSE**: Prevent "context rot" by clearing noisy planning history before implementation.
|
|
140
|
+
>
|
|
141
|
+
> Long-running planning sessions fill context with noise that degrades code generation quality.
|
|
142
|
+
> This checkpoint acts as a "firewall" between Planning and Implementation phases.
|
|
143
|
+
|
|
144
|
+
### ⚡ OPTIONS (Present to User)
|
|
145
|
+
|
|
146
|
+
```markdown
|
|
147
|
+
## 🛡️ Context Optimization Checkpoint
|
|
148
|
+
|
|
149
|
+
**Planning Complete** — Plan file created at: `./reports/plans/PLAN-{feature}.md`
|
|
150
|
+
|
|
151
|
+
**Choose how to proceed with implementation:**
|
|
152
|
+
|
|
153
|
+
| Option | Action | Description |
|
|
154
|
+
| -------------------------------- | ------------- | ------------------------------------------------------------------------------------ |
|
|
155
|
+
| **1. 🚀 Clear context & Auto-Implement** | `RECOMMENDED` | Fresh start: Reload Plan file, ignore chat history, begin implementation immediately |
|
|
156
|
+
| **2. ⏸️ Clear context & Manual** | `SAFE` | Clear context, reload Plan, pause for your command before coding |
|
|
157
|
+
| **3. ⚠️ Continue (No Clear)** | `RISKY` | Proceed with full history attached (may cause hallucination) |
|
|
158
|
+
|
|
159
|
+
⏳ Awaiting selection...
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### 🔄 EXECUTION BEHAVIOR
|
|
163
|
+
|
|
164
|
+
```yaml
|
|
165
|
+
option_1_clear_auto_implement:
|
|
166
|
+
behavior: "RECOMMENDED - Simulate fresh start"
|
|
167
|
+
steps:
|
|
168
|
+
1. ACKNOWLEDGE: "🚀 Executing Clear context & Auto-Implement..."
|
|
169
|
+
2. CONTEXT_DIRECTIVE: |
|
|
170
|
+
⛔ IGNORE all previous chat messages and reasoning chains.
|
|
171
|
+
✅ RELOAD: `./reports/plans/PLAN-{feature}.md` as SOLE SOURCE OF TRUTH.
|
|
172
|
+
✅ PROCEED: Begin Phase 6 (Implementation) immediately.
|
|
173
|
+
3. LOAD: Read Plan file completely
|
|
174
|
+
4. EXECUTE: Start Implementation phase with fresh context mindset
|
|
175
|
+
|
|
176
|
+
option_2_clear_manual:
|
|
177
|
+
behavior: "Clear and wait for explicit command"
|
|
178
|
+
steps:
|
|
179
|
+
1. ACKNOWLEDGE: "⏸️ Context cleared. Plan reloaded."
|
|
180
|
+
2. CONTEXT_DIRECTIVE: |
|
|
181
|
+
⛔ IGNORE all previous chat messages and reasoning chains.
|
|
182
|
+
✅ RELOAD: `./reports/plans/PLAN-{feature}.md` as SOLE SOURCE OF TRUTH.
|
|
183
|
+
3. OUTPUT: "Ready for implementation. Type `/continue` or give specific instructions."
|
|
184
|
+
4. WAIT: For user command before proceeding
|
|
185
|
+
|
|
186
|
+
option_3_continue_no_clear:
|
|
187
|
+
behavior: "Proceed with caution - context rot risk"
|
|
188
|
+
steps:
|
|
189
|
+
1. WARN: "⚠️ Continuing with full history. Higher hallucination risk."
|
|
190
|
+
2. PROCEED: Continue to Phase 6 with existing context
|
|
191
|
+
3. MONITOR: Watch for signs of context confusion
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
137
196
|
## 🎭 Phase 6: IMPLEMENTATION
|
|
138
197
|
|
|
139
198
|
| Agent | `tech-lead` → routes to specialists |
|
package/commands/cook.md
CHANGED
|
@@ -16,9 +16,10 @@ execution-mode: router
|
|
|
16
16
|
## 🛑 PRE-FLIGHT (DO FIRST — BLOCKS EXECUTION)
|
|
17
17
|
|
|
18
18
|
**LOAD now** (in order; path `./rules/` or `~/.{TOOL}/skills/agent-assistant/rules/`):
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
|
|
20
|
+
1. ORCHESTRATION-LAWS.md
|
|
21
|
+
2. ADAPTIVE-EXECUTION.md
|
|
22
|
+
3. EXECUTION-PROTOCOL.md
|
|
22
23
|
|
|
23
24
|
**⛔ Do not run any workflow phase until all are loaded.** Follow **all** rules in those files. Then run this file's ROUTING LOGIC, LOAD the chosen variant workflow, and execute it.
|
|
24
25
|
|
|
@@ -33,6 +34,9 @@ IF feature is simple (clear spec, low complexity):
|
|
|
33
34
|
IF feature is complex (multi-component, research needed):
|
|
34
35
|
→ Route to /cook:hard
|
|
35
36
|
|
|
37
|
+
IF feature is complex AND context optimization is critical:
|
|
38
|
+
→ Route to /cook:focus
|
|
39
|
+
|
|
36
40
|
IF unsure:
|
|
37
41
|
→ Default to /cook:fast
|
|
38
42
|
```
|
|
@@ -41,10 +45,11 @@ IF unsure:
|
|
|
41
45
|
|
|
42
46
|
## AVAILABLE ROUTES
|
|
43
47
|
|
|
44
|
-
| Route
|
|
45
|
-
|
|
|
46
|
-
| `/cook:fast`
|
|
47
|
-
| `/cook:hard`
|
|
48
|
+
| Route | When to Use |
|
|
49
|
+
| ------------- | ------------------------------------------------------- |
|
|
50
|
+
| `/cook:fast` | Quick features, clear specifications |
|
|
51
|
+
| `/cook:hard` | Complex features, full workflow |
|
|
52
|
+
| `/cook:focus` | Complex features with **enforced context optimization** |
|
|
48
53
|
|
|
49
54
|
---
|
|
50
55
|
|
|
@@ -59,6 +64,7 @@ IF unsure:
|
|
|
59
64
|
|
|
60
65
|
1. ⚡ **Fast** → `/cook:fast` — Quick implementation
|
|
61
66
|
2. ⚡⚡⚡ **Hard** → `/cook:hard` — Full feature development
|
|
67
|
+
3. 🎯 **Focus** → `/cook:focus` — Full development with **automatic context clearing** (prevents hallucination)
|
|
62
68
|
|
|
63
69
|
⏳ Awaiting selection...
|
|
64
70
|
```
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 🔒 Focused Debug — Deep investigation with enforced context optimization
|
|
3
|
+
version: "1.0"
|
|
4
|
+
category: debugging
|
|
5
|
+
execution-mode: execute
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /debug:focus — Focus Deep Investigation
|
|
9
|
+
|
|
10
|
+
> **MISSION**: Thorough investigation with **enforced context optimization**.
|
|
11
|
+
>
|
|
12
|
+
> This variant automatically clears context before fix handoff—no user prompt required.
|
|
13
|
+
> Use when you want guaranteed clean fix handoff without hypothesis drift.
|
|
14
|
+
|
|
15
|
+
<issue>$ARGUMENTS</issue>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 🛑 PRE-FLIGHT (DO FIRST — BLOCKS PHASE 1)
|
|
20
|
+
|
|
21
|
+
**LOAD now** (in order; path `./rules/` or `~/.{TOOL}/skills/agent-assistant/rules/`):
|
|
22
|
+
|
|
23
|
+
1. 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
|
|
32
|
+
|
|
33
|
+
| Tier | When | Action |
|
|
34
|
+
| ---------- | ------------------ | ---------------------------- |
|
|
35
|
+
| **TIER 1** | runSubagent EXISTS | Invoke sub-agent (MANDATORY) |
|
|
36
|
+
| **TIER 2** | Tool MISSING | EMBODY agent file (FALLBACK) |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 📁 DELIVERABLE FILES
|
|
41
|
+
|
|
42
|
+
| Agent | Output |
|
|
43
|
+
| -------- | ----------------------------------- |
|
|
44
|
+
| debugger | `./reports/debugs/DEBUG-{issue}.md` |
|
|
45
|
+
|
|
46
|
+
All files in `./reports/` → English only.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## ⛔ INCREMENTAL EXECUTION (MANDATORY)
|
|
51
|
+
|
|
52
|
+
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).
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 🎭 Phase 1: INFORMATION GATHERING
|
|
57
|
+
|
|
58
|
+
| Agent | `scouter` |
|
|
59
|
+
| ----- | ----------------------------------------- |
|
|
60
|
+
| Goal | Gather context and reproduction steps |
|
|
61
|
+
| Exit | Context gathered, reproduction documented |
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 🎭 Phase 2: HYPOTHESIS FORMATION
|
|
66
|
+
|
|
67
|
+
| Agent | `debugger` |
|
|
68
|
+
| ----- | ----------------------------------- |
|
|
69
|
+
| Goal | Form and rank hypotheses |
|
|
70
|
+
| Exit | Hypotheses documented with evidence |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## 🎭 Phase 3: ROOT CAUSE ANALYSIS
|
|
75
|
+
|
|
76
|
+
| Agent | `debugger` |
|
|
77
|
+
| ------ | ----------------------------------------------- |
|
|
78
|
+
| Goal | Deep investigation |
|
|
79
|
+
| Output | `./reports/debugs/DEBUG-{issue}.md` |
|
|
80
|
+
| Exit | Root cause identified, failure chain documented |
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 🎭 Phase 4: SOLUTION DESIGN
|
|
85
|
+
|
|
86
|
+
| Agent | `planner` |
|
|
87
|
+
| ----- | --------------------------------------- |
|
|
88
|
+
| Goal | Design fix strategy |
|
|
89
|
+
| Exit | Fix approach defined with rollback plan |
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## 🛡️ STRICT CONTEXT GATE — Automatic Context Optimization
|
|
94
|
+
|
|
95
|
+
> **⚡ FOCUS MODE**: This checkpoint executes automatically. NO user input required.
|
|
96
|
+
>
|
|
97
|
+
> **PURPOSE**: Prevent "context rot" by forcibly clearing noisy debugging history.
|
|
98
|
+
> This acts as a mandatory "firewall" before handoff to fix workflows.
|
|
99
|
+
|
|
100
|
+
### 🔒 AUTOMATIC EXECUTION (NO PROMPT)
|
|
101
|
+
|
|
102
|
+
```yaml
|
|
103
|
+
strict_context_gate:
|
|
104
|
+
mode: "AUTOMATIC - No user interaction"
|
|
105
|
+
behavior: "Force Clear context & Fix"
|
|
106
|
+
|
|
107
|
+
execution:
|
|
108
|
+
1. ANNOUNCE: |
|
|
109
|
+
## 🛡️ Strict Context Gate — Automatic
|
|
110
|
+
|
|
111
|
+
✅ **Debug Complete**: Root cause identified, fix strategy designed.
|
|
112
|
+
🔒 **Focus Mode**: Automatically clearing context for fix handoff.
|
|
113
|
+
|
|
114
|
+
⚡ Executing: **Clear context & Fix**...
|
|
115
|
+
|
|
116
|
+
2. CONTEXT_DIRECTIVE: |
|
|
117
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
118
|
+
║ ⛔ MANDATORY CONTEXT RESET — FOCUS MODE ║
|
|
119
|
+
╠══════════════════════════════════════════════════════════════════╣
|
|
120
|
+
║ IGNORE: All debugging hypotheses, failed investigation paths, ║
|
|
121
|
+
║ rejected theories, and intermediate reasoning. ║
|
|
122
|
+
║ ║
|
|
123
|
+
║ SOLE SOURCE OF TRUTH: Root cause + Fix strategy. ║
|
|
124
|
+
║ ║
|
|
125
|
+
║ HANDOFF: Ready for `/fix:focus` implementation. ║
|
|
126
|
+
║ Fix should treat root cause as fresh context. ║
|
|
127
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
128
|
+
|
|
129
|
+
3. OUTPUT: Root cause + Fix strategy summary
|
|
130
|
+
|
|
131
|
+
4. PROCEED: To COMPLETION
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 📋 Post-Gate Status
|
|
135
|
+
|
|
136
|
+
```markdown
|
|
137
|
+
🔒 **Context Gate Passed**
|
|
138
|
+
|
|
139
|
+
- Previous context: DISCARDED
|
|
140
|
+
- Active context: Root cause + Fix strategy only
|
|
141
|
+
- Mode: Clean handoff ready
|
|
142
|
+
|
|
143
|
+
Ready for fix implementation...
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## COMPLETION
|
|
149
|
+
|
|
150
|
+
Present findings with:
|
|
151
|
+
|
|
152
|
+
1. ✅ **Root Cause** — Identified (Focus Mode)
|
|
153
|
+
2. 🔒 **Context Optimized** — Ready for focus fix
|
|
154
|
+
3. 🔧 **Fix** → `/fix:focus`
|
|
155
|
+
4. 📝 **Document** → `/docs:core`
|
package/commands/debug/hard.md
CHANGED
|
@@ -87,6 +87,59 @@ One phase at a time, each phase independent: Phase 1 → then Phase 2 → … in
|
|
|
87
87
|
|
|
88
88
|
---
|
|
89
89
|
|
|
90
|
+
## 🛡️ VERIFICATION CHECKPOINT — Context Optimization
|
|
91
|
+
|
|
92
|
+
> **PURPOSE**: Prevent "context rot" by clearing noisy debugging/analysis history before fix implementation.
|
|
93
|
+
>
|
|
94
|
+
> Deep investigation sessions fill context with hypotheses and failed attempts that can confuse implementation.
|
|
95
|
+
> This checkpoint acts as a "firewall" before handing off to fix workflows.
|
|
96
|
+
|
|
97
|
+
### ⚡ OPTIONS (Present to User)
|
|
98
|
+
|
|
99
|
+
```markdown
|
|
100
|
+
## 🛡️ Context Optimization Checkpoint
|
|
101
|
+
|
|
102
|
+
**Debug Analysis Complete** — Root cause identified, fix strategy designed.
|
|
103
|
+
|
|
104
|
+
**Choose how to proceed:**
|
|
105
|
+
|
|
106
|
+
| Option | Action | Description |
|
|
107
|
+
|--------|--------|-------------|
|
|
108
|
+
| **1. 🚀 Clear context & Fix** | `RECOMMENDED` | Fresh start: Ignore debug history, proceed with fix strategy only |
|
|
109
|
+
| **2. ⏸️ Review First** | `SAFE` | Clear context, show fix summary, wait for approval |
|
|
110
|
+
| **3. ⚠️ Continue (No Clear)** | `RISKY` | Keep debug history (may cause fix drift) |
|
|
111
|
+
|
|
112
|
+
⏳ Awaiting selection...
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 🔄 EXECUTION BEHAVIOR
|
|
116
|
+
|
|
117
|
+
```yaml
|
|
118
|
+
option_1_clear_fix:
|
|
119
|
+
behavior: "RECOMMENDED - Clean handoff to fix"
|
|
120
|
+
steps:
|
|
121
|
+
1. ACKNOWLEDGE: "🚀 Context optimized. Fix strategy ready."
|
|
122
|
+
2. CONTEXT_DIRECTIVE: |
|
|
123
|
+
⛔ IGNORE all debugging hypotheses and failed investigation paths.
|
|
124
|
+
✅ FIX STRATEGY is SOLE SOURCE OF TRUTH.
|
|
125
|
+
3. OUTPUT: "Run `/fix:focus` to implement with clean context."
|
|
126
|
+
|
|
127
|
+
option_2_review_first:
|
|
128
|
+
behavior: "Clear and show summary"
|
|
129
|
+
steps:
|
|
130
|
+
1. ACKNOWLEDGE: "⏸️ Context cleared."
|
|
131
|
+
2. OUTPUT: Display root cause + fix strategy summary
|
|
132
|
+
3. WAIT: For user approval
|
|
133
|
+
|
|
134
|
+
option_3_continue_no_clear:
|
|
135
|
+
behavior: "Proceed with caution"
|
|
136
|
+
steps:
|
|
137
|
+
1. WARN: "⚠️ Debug history retained. Watch for hypothesis drift."
|
|
138
|
+
2. PROCEED: Complete workflow with existing context
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
90
143
|
## COMPLETION
|
|
91
144
|
|
|
92
145
|
Present findings with:
|
package/commands/debug.md
CHANGED
|
@@ -33,6 +33,9 @@ IF issue is simple (clear error, reproducible):
|
|
|
33
33
|
IF issue is complex (intermittent, unclear cause):
|
|
34
34
|
→ Route to /debug:hard
|
|
35
35
|
|
|
36
|
+
IF issue is complex AND clean fix handoff is critical:
|
|
37
|
+
→ Route to /debug:focus
|
|
38
|
+
|
|
36
39
|
IF unsure:
|
|
37
40
|
→ Default to /debug:fast (escalate if needed)
|
|
38
41
|
```
|
|
@@ -41,10 +44,11 @@ IF unsure:
|
|
|
41
44
|
|
|
42
45
|
## AVAILABLE ROUTES
|
|
43
46
|
|
|
44
|
-
| Route
|
|
45
|
-
|
|
|
46
|
-
| `/debug:fast`
|
|
47
|
-
| `/debug:hard`
|
|
47
|
+
| Route | When to Use |
|
|
48
|
+
| --------------- | ---------------------------------------------------- |
|
|
49
|
+
| `/debug:fast` | Quick diagnosis for simple bugs |
|
|
50
|
+
| `/debug:hard` | Deep investigation for complex issues |
|
|
51
|
+
| `/debug:focus` | Deep investigation with **enforced context optimization** |
|
|
48
52
|
|
|
49
53
|
---
|
|
50
54
|
|
|
@@ -59,6 +63,7 @@ IF unsure:
|
|
|
59
63
|
|
|
60
64
|
1. ⚡ **Fast** → `/debug:fast` — Quick diagnosis
|
|
61
65
|
2. ⚡⚡⚡ **Hard** → `/debug:hard` — Deep investigation
|
|
66
|
+
3. 🔒 **Focus** → `/debug:focus` — Deep investigation with **automatic context clearing** (clean fix handoff)
|
|
62
67
|
|
|
63
68
|
⏳ Awaiting selection...
|
|
64
69
|
```
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 🔒 Focused Design — Complete design process with enforced context optimization
|
|
3
|
+
version: "1.0"
|
|
4
|
+
category: design
|
|
5
|
+
execution-mode: execute
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /design:focus — Focus Full Design Process
|
|
9
|
+
|
|
10
|
+
> **MISSION**: Execute complete design process with **enforced context optimization**.
|
|
11
|
+
>
|
|
12
|
+
> This variant automatically clears context before implementation handoff—no user prompt required.
|
|
13
|
+
> Use when you want guaranteed clean implementation handoff without design exploration noise.
|
|
14
|
+
|
|
15
|
+
<request>$ARGUMENTS</request>
|
|
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
|
+
for_each_phase:
|
|
39
|
+
TIER_1_MANDATORY: "IF tool exists → MUST use SUB_AGENT_DELEGATION"
|
|
40
|
+
TIER_2_FALLBACK: "ONLY on system error—NOT complexity/preference/speed"
|
|
41
|
+
anti_lazy_fallback:
|
|
42
|
+
- ❌ NEVER use Tier 2 when Tier 1 tool is available
|
|
43
|
+
- ✅ ALWAYS attempt Tier 1 first when tool exists
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## ⚠️ CRITICAL: DELIVERABLE FILE RULES
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
deliverable_files:
|
|
52
|
+
researcher: "./reports/researchers/RESEARCH-{request}.md"
|
|
53
|
+
scouter: "./reports/scouts/SCOUT-{request}.md"
|
|
54
|
+
designer: "./reports/designs/DESIGN-{request}.md" # MANDATORY OUTPUT
|
|
55
|
+
|
|
56
|
+
enforcement:
|
|
57
|
+
- Design phase MUST create design file
|
|
58
|
+
- Design file is the deliverable for implementation phases
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
All files in `./reports/` → English only.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## ⛔ INCREMENTAL EXECUTION (MANDATORY)
|
|
66
|
+
|
|
67
|
+
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).
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 🎭 Phase 1: REQUIREMENTS DISCOVERY
|
|
72
|
+
|
|
73
|
+
| Attribute | Value |
|
|
74
|
+
| --------- | --------------------------- |
|
|
75
|
+
| **Agent** | `brainstormer` |
|
|
76
|
+
| **Goal** | Clarify design requirements |
|
|
77
|
+
|
|
78
|
+
### ⚡ TIERED EXECUTION
|
|
79
|
+
|
|
80
|
+
**TIER 1 (MANDATORY when tool exists):**
|
|
81
|
+
|
|
82
|
+
> Invoke runSubagent for `brainstormer`. Context: ISOLATED.
|
|
83
|
+
|
|
84
|
+
**TIER 2 (FALLBACK on system error only):**
|
|
85
|
+
|
|
86
|
+
> Load `{AGENTS_PATH}/brainstormer.md`
|
|
87
|
+
> EMBODY [brainstormer] — Requires logged system error justification.
|
|
88
|
+
|
|
89
|
+
**Exit Criteria:**
|
|
90
|
+
|
|
91
|
+
- [ ] Requirements clear
|
|
92
|
+
- [ ] User needs identified
|
|
93
|
+
- [ ] Constraints documented
|
|
94
|
+
- [ ] **METHODOLOGY CHECK**: Output aligns with `brainstormer` Thinking Protocol
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 🎭 Phase 2: RESEARCH
|
|
99
|
+
|
|
100
|
+
| Attribute | Value |
|
|
101
|
+
| --------- | ------------------------------- |
|
|
102
|
+
| **Agent** | `researcher` |
|
|
103
|
+
| **Goal** | Research design patterns and UX |
|
|
104
|
+
|
|
105
|
+
### ⚡ TIERED EXECUTION
|
|
106
|
+
|
|
107
|
+
**TIER 1 (MANDATORY when tool exists):**
|
|
108
|
+
|
|
109
|
+
> Invoke runSubagent for `researcher`. Context: ISOLATED.
|
|
110
|
+
|
|
111
|
+
**TIER 2 (FALLBACK on system error only):**
|
|
112
|
+
|
|
113
|
+
> Load `{AGENTS_PATH}/researcher.md`
|
|
114
|
+
> EMBODY [researcher] — Requires logged system error justification.
|
|
115
|
+
|
|
116
|
+
**Exit Criteria:**
|
|
117
|
+
|
|
118
|
+
- [ ] Patterns researched
|
|
119
|
+
- [ ] Best practices identified
|
|
120
|
+
- [ ] **METHODOLOGY CHECK**: Output aligns with `researcher` Thinking Protocol
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 🎭 Phase 3: CODEBASE ANALYSIS
|
|
125
|
+
|
|
126
|
+
| Attribute | Value |
|
|
127
|
+
| --------- | -------------------------- |
|
|
128
|
+
| **Agent** | `scouter` |
|
|
129
|
+
| **Goal** | Map existing design system |
|
|
130
|
+
|
|
131
|
+
### ⚡ TIERED EXECUTION
|
|
132
|
+
|
|
133
|
+
**TIER 1 (MANDATORY when tool exists):**
|
|
134
|
+
|
|
135
|
+
> Invoke runSubagent for `scouter`. Context: ISOLATED.
|
|
136
|
+
|
|
137
|
+
**TIER 2 (FALLBACK on system error only):**
|
|
138
|
+
|
|
139
|
+
> Load `{AGENTS_PATH}/scouter.md`
|
|
140
|
+
> EMBODY [scouter] — Requires logged system error justification.
|
|
141
|
+
|
|
142
|
+
**Exit Criteria:**
|
|
143
|
+
|
|
144
|
+
- [ ] Design system documented
|
|
145
|
+
- [ ] Component inventory
|
|
146
|
+
- [ ] Integration points
|
|
147
|
+
- [ ] **METHODOLOGY CHECK**: Output aligns with `scouter` Thinking Protocol
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## 🎭 Phase 4: DESIGN CREATION
|
|
152
|
+
|
|
153
|
+
| Attribute | Value |
|
|
154
|
+
| --------- | ---------------------- |
|
|
155
|
+
| **Agent** | `designer` |
|
|
156
|
+
| **Goal** | Full design with specs |
|
|
157
|
+
|
|
158
|
+
### ⚡ TIERED EXECUTION
|
|
159
|
+
|
|
160
|
+
**TIER 1 (MANDATORY when tool exists):**
|
|
161
|
+
|
|
162
|
+
> Invoke runSubagent for `designer`. Context: ISOLATED.
|
|
163
|
+
|
|
164
|
+
**TIER 2 (FALLBACK on system error only):**
|
|
165
|
+
|
|
166
|
+
> Load `{AGENTS_PATH}/designer.md`
|
|
167
|
+
> EMBODY [designer] — Requires logged system error justification.
|
|
168
|
+
|
|
169
|
+
**Exit Criteria:**
|
|
170
|
+
|
|
171
|
+
- [ ] Design complete
|
|
172
|
+
- [ ] All states covered
|
|
173
|
+
- [ ] Accessibility verified
|
|
174
|
+
- [ ] Specs documented
|
|
175
|
+
- [ ] **METHODOLOGY CHECK**: Output aligns with `designer` Thinking Protocol
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 🛡️ STRICT CONTEXT GATE — Automatic Context Optimization
|
|
180
|
+
|
|
181
|
+
> **⚡ FOCUS MODE**: This checkpoint executes automatically. NO user input required.
|
|
182
|
+
>
|
|
183
|
+
> **PURPOSE**: Prevent "context rot" by forcibly clearing noisy design exploration history.
|
|
184
|
+
> This acts as a mandatory "firewall" before review and implementation handoff.
|
|
185
|
+
|
|
186
|
+
### 🔒 AUTOMATIC EXECUTION (NO PROMPT)
|
|
187
|
+
|
|
188
|
+
```yaml
|
|
189
|
+
strict_context_gate:
|
|
190
|
+
mode: "AUTOMATIC - No user interaction"
|
|
191
|
+
behavior: "Force Clear context & Ready"
|
|
192
|
+
|
|
193
|
+
execution:
|
|
194
|
+
1. ANNOUNCE: |
|
|
195
|
+
## 🛡️ Strict Context Gate — Automatic
|
|
196
|
+
|
|
197
|
+
✅ **Design Complete**: `./reports/designs/DESIGN-{request}.md`
|
|
198
|
+
🔒 **Focus Mode**: Automatically clearing context for review/implementation.
|
|
199
|
+
|
|
200
|
+
⚡ Executing: **Clear context & Ready**...
|
|
201
|
+
|
|
202
|
+
2. CONTEXT_DIRECTIVE: |
|
|
203
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
204
|
+
║ ⛔ MANDATORY CONTEXT RESET — FOCUS MODE ║
|
|
205
|
+
╠══════════════════════════════════════════════════════════════════╣
|
|
206
|
+
║ IGNORE: All design exploration, rejected alternatives, ║
|
|
207
|
+
║ iteration history, and intermediate reasoning. ║
|
|
208
|
+
║ ║
|
|
209
|
+
║ SOLE SOURCE OF TRUTH: Design file in ./reports/designs/ ║
|
|
210
|
+
║ ║
|
|
211
|
+
║ PROCEED: Continue to Design Review with clean context. ║
|
|
212
|
+
║ Then handoff to implementation. ║
|
|
213
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
214
|
+
|
|
215
|
+
3. LOAD: Read Design file as if seeing it for the first time
|
|
216
|
+
|
|
217
|
+
4. PROCEED: Continue to Phase 5 (Design Review)
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### 📋 Post-Gate Status
|
|
221
|
+
|
|
222
|
+
```markdown
|
|
223
|
+
🔒 **Context Gate Passed**
|
|
224
|
+
- Previous context: DISCARDED
|
|
225
|
+
- Active context: Design file only
|
|
226
|
+
- Mode: Clean review start
|
|
227
|
+
|
|
228
|
+
Proceeding to Design Review...
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## 🎭 Phase 5: DESIGN REVIEW
|
|
234
|
+
|
|
235
|
+
| Attribute | Value |
|
|
236
|
+
| --------- | --------------------- |
|
|
237
|
+
| **Agent** | `reviewer` |
|
|
238
|
+
| **Goal** | Review design quality |
|
|
239
|
+
|
|
240
|
+
### ⚡ TIERED EXECUTION
|
|
241
|
+
|
|
242
|
+
**TIER 1 (MANDATORY when tool exists):**
|
|
243
|
+
|
|
244
|
+
> Invoke runSubagent for `reviewer`. Context: ISOLATED.
|
|
245
|
+
|
|
246
|
+
**TIER 2 (FALLBACK on system error only):**
|
|
247
|
+
|
|
248
|
+
> Load `{AGENTS_PATH}/reviewer.md`
|
|
249
|
+
> EMBODY [reviewer] — Requires logged system error justification.
|
|
250
|
+
|
|
251
|
+
**Exit Criteria:**
|
|
252
|
+
|
|
253
|
+
- [ ] Design reviewed
|
|
254
|
+
- [ ] Standards met
|
|
255
|
+
- [ ] Approved
|
|
256
|
+
- [ ] **METHODOLOGY CHECK**: Output aligns with `reviewer` Thinking Protocol
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## COMPLETION
|
|
261
|
+
|
|
262
|
+
Present design with:
|
|
263
|
+
|
|
264
|
+
1. ✅ **Done** — Design approved (Focus Mode)
|
|
265
|
+
2. 🔒 **Context Optimized** — Ready for focus implementation
|
|
266
|
+
3. 💻 **Implement** → `/code:focus`
|
|
267
|
+
4. 🔄 **Iterate** — Further refinement
|
package/commands/design/hard.md
CHANGED
|
@@ -173,6 +173,59 @@ One phase at a time, each phase independent: Phase 1 → then Phase 2 → … in
|
|
|
173
173
|
|
|
174
174
|
---
|
|
175
175
|
|
|
176
|
+
## 🛡️ VERIFICATION CHECKPOINT — Context Optimization
|
|
177
|
+
|
|
178
|
+
> **PURPOSE**: Prevent "context rot" by clearing noisy design exploration history before implementation.
|
|
179
|
+
>
|
|
180
|
+
> Design iterations and rejected alternatives fill context with noise.
|
|
181
|
+
> This checkpoint acts as a "firewall" before handing off to implementation.
|
|
182
|
+
|
|
183
|
+
### ⚡ OPTIONS (Present to User)
|
|
184
|
+
|
|
185
|
+
```markdown
|
|
186
|
+
## 🛡️ Context Optimization Checkpoint
|
|
187
|
+
|
|
188
|
+
**Design Complete** — Design specs created at: `./reports/designs/DESIGN-{request}.md`
|
|
189
|
+
|
|
190
|
+
**Choose how to proceed:**
|
|
191
|
+
|
|
192
|
+
| Option | Action | Description |
|
|
193
|
+
|--------|--------|-------------|
|
|
194
|
+
| **1. 🚀 Clear context & Ready** | `RECOMMENDED` | Fresh start for implementation: Reload Design, ignore exploration history |
|
|
195
|
+
| **2. ⏸️ Review First** | `SAFE` | Clear context, show design summary, wait for approval |
|
|
196
|
+
| **3. ⚠️ Continue (No Clear)** | `RISKY` | Keep design history (may affect review quality) |
|
|
197
|
+
|
|
198
|
+
⏳ Awaiting selection...
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### 🔄 EXECUTION BEHAVIOR
|
|
202
|
+
|
|
203
|
+
```yaml
|
|
204
|
+
option_1_clear_ready:
|
|
205
|
+
behavior: "RECOMMENDED - Clean handoff"
|
|
206
|
+
steps:
|
|
207
|
+
1. ACKNOWLEDGE: "🚀 Context optimized. Design ready for review/implementation."
|
|
208
|
+
2. CONTEXT_DIRECTIVE: |
|
|
209
|
+
⛔ IGNORE all design exploration and rejected alternatives.
|
|
210
|
+
✅ DESIGN FILE is SOLE SOURCE OF TRUTH.
|
|
211
|
+
3. PROCEED: Continue to Design Review phase
|
|
212
|
+
|
|
213
|
+
option_2_review_first:
|
|
214
|
+
behavior: "Clear and show summary"
|
|
215
|
+
steps:
|
|
216
|
+
1. ACKNOWLEDGE: "⏸️ Context cleared."
|
|
217
|
+
2. OUTPUT: Display design summary for user review
|
|
218
|
+
3. WAIT: For user approval
|
|
219
|
+
|
|
220
|
+
option_3_continue_no_clear:
|
|
221
|
+
behavior: "Proceed with caution"
|
|
222
|
+
steps:
|
|
223
|
+
1. WARN: "⚠️ Design exploration history retained."
|
|
224
|
+
2. PROCEED: Continue to review with existing context
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
176
229
|
## 🎭 Phase 5: DESIGN REVIEW
|
|
177
230
|
|
|
178
231
|
| Attribute | Value |
|