@namch/agent-assistant 1.0.2 β 1.0.4
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/CHANGELOG.md +54 -0
- package/README.md +24 -9
- 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 +343 -0
- package/commands/code/hard.md +79 -0
- package/commands/code.md +16 -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 +4 -2
- package/rules/AGENT-RULES.md +2 -1
- package/rules/BOOTSTRAP.md +3 -0
- package/rules/QUICK-REFERENCE.md +8 -0
|
@@ -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 |
|
package/commands/design.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 design is simple (component, quick mockup):
|
|
|
33
34
|
IF design is complex (full feature, system):
|
|
34
35
|
β Route to /design:hard
|
|
35
36
|
|
|
37
|
+
IF design is complex AND clean implementation handoff is critical:
|
|
38
|
+
β Route to /design:focus
|
|
39
|
+
|
|
36
40
|
IF unsure:
|
|
37
41
|
β Default to /design:fast
|
|
38
42
|
```
|
|
@@ -41,10 +45,11 @@ IF unsure:
|
|
|
41
45
|
|
|
42
46
|
## AVAILABLE ROUTES
|
|
43
47
|
|
|
44
|
-
| Route
|
|
45
|
-
|
|
|
46
|
-
| `/design:fast`
|
|
47
|
-
| `/design:hard`
|
|
48
|
+
| Route | When to Use |
|
|
49
|
+
| --------------- | -------------------------------------------------- |
|
|
50
|
+
| `/design:fast` | Quick component design, simple UI |
|
|
51
|
+
| `/design:hard` | Full feature design, system design |
|
|
52
|
+
| `/design:focus` | Full design with **enforced context optimization** |
|
|
48
53
|
|
|
49
54
|
---
|
|
50
55
|
|
|
@@ -59,6 +64,7 @@ IF unsure:
|
|
|
59
64
|
|
|
60
65
|
1. β‘ **Fast** β `/design:fast` β Quick design
|
|
61
66
|
2. β‘β‘β‘ **Hard** β `/design:hard` β Full design process
|
|
67
|
+
3. π― **Focus** β `/design:focus` β Full design with **automatic context clearing** (clean implementation handoff)
|
|
62
68
|
|
|
63
69
|
β³ Awaiting selection...
|
|
64
70
|
```
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: π Focused Fix β Complete issue resolution with enforced context optimization
|
|
3
|
+
version: "1.0"
|
|
4
|
+
category: debugging
|
|
5
|
+
execution-mode: execute
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /fix:focus β Focus Issue Resolution
|
|
9
|
+
|
|
10
|
+
> **MISSION**: Full resolution 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 fix implementation without context rot risk.
|
|
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
|
+
**β Anti-Lazy**: Never use TIER 2 when TIER 1 tool available.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## π DELIVERABLE FILES
|
|
43
|
+
|
|
44
|
+
| Agent | Output |
|
|
45
|
+
| ---------- | ------------------------------------------- |
|
|
46
|
+
| debugger | `./reports/debugs/DEBUG-{issue}.md` |
|
|
47
|
+
| researcher | `./reports/researchers/RESEARCH-{issue}.md` |
|
|
48
|
+
|
|
49
|
+
All files in `./reports/` β English only.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## β INCREMENTAL EXECUTION (MANDATORY)
|
|
54
|
+
|
|
55
|
+
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). Format: rules/EXECUTION-PROTOCOL.md Β§ Phase output structure.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## π Phase 1: DEEP ANALYSIS
|
|
60
|
+
|
|
61
|
+
| Agent | `debugger` |
|
|
62
|
+
| ----- | ---------------------------------------------------------------- |
|
|
63
|
+
| Goal | Full root cause analysis |
|
|
64
|
+
| Exit | Root cause identified, impact assessed, failure chain documented |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## π Phase 2: RESEARCH
|
|
69
|
+
|
|
70
|
+
| Agent | `researcher` |
|
|
71
|
+
| ----- | ---------------------------------------------- |
|
|
72
|
+
| Goal | Research solution patterns |
|
|
73
|
+
| Exit | Solutions researched, best approach identified |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## π Phase 3: FIX PLANNING
|
|
78
|
+
|
|
79
|
+
| Agent | `planner` |
|
|
80
|
+
| ----- | --------------------------------- |
|
|
81
|
+
| Goal | Create fix strategy with rollback |
|
|
82
|
+
| Exit | Plan created, rollback included |
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## π‘οΈ STRICT CONTEXT GATE β Automatic Context Optimization
|
|
87
|
+
|
|
88
|
+
> **β‘ FOCUS MODE**: This checkpoint executes automatically. NO user input required.
|
|
89
|
+
>
|
|
90
|
+
> **PURPOSE**: Prevent "context rot" by forcibly clearing noisy debugging/planning history.
|
|
91
|
+
> This acts as a mandatory "firewall" between Planning and Implementation phases.
|
|
92
|
+
|
|
93
|
+
### π AUTOMATIC EXECUTION (NO PROMPT)
|
|
94
|
+
|
|
95
|
+
```yaml
|
|
96
|
+
strict_context_gate:
|
|
97
|
+
mode: "AUTOMATIC - No user interaction"
|
|
98
|
+
behavior: "Force Clear context & Auto-Implement"
|
|
99
|
+
|
|
100
|
+
execution:
|
|
101
|
+
1. ANNOUNCE: |
|
|
102
|
+
## π‘οΈ Strict Context Gate β Automatic
|
|
103
|
+
|
|
104
|
+
β
**Fix Plan Complete**: Strategy defined with rollback.
|
|
105
|
+
π **Focus Mode**: Automatically clearing context for implementation.
|
|
106
|
+
|
|
107
|
+
β‘ Executing: **Clear context & Auto-Implement**...
|
|
108
|
+
|
|
109
|
+
2. CONTEXT_DIRECTIVE: |
|
|
110
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
111
|
+
β β MANDATORY CONTEXT RESET β FOCUS MODE β
|
|
112
|
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
|
|
113
|
+
β IGNORE: All previous debugging hypotheses, failed attempts, β
|
|
114
|
+
β research explorations, and intermediate reasoning. β
|
|
115
|
+
β β
|
|
116
|
+
β SOLE SOURCE OF TRUTH: Fix plan with rollback strategy. β
|
|
117
|
+
β β
|
|
118
|
+
β PROCEED: Begin Implementation phase with FRESH context mindset. β
|
|
119
|
+
β Treat this as a NEW conversation starting from Plan. β
|
|
120
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
121
|
+
|
|
122
|
+
3. LOAD: Read Fix plan completely as if seeing it for the first time
|
|
123
|
+
|
|
124
|
+
4. PROCEED: Start Phase 4 (Implementation) immediately
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### π Post-Gate Status
|
|
128
|
+
|
|
129
|
+
```markdown
|
|
130
|
+
π **Context Gate Passed**
|
|
131
|
+
|
|
132
|
+
- Previous context: DISCARDED
|
|
133
|
+
- Active context: Fix plan only
|
|
134
|
+
- Mode: Fresh implementation start
|
|
135
|
+
|
|
136
|
+
Proceeding to Implementation...
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## π Phase 4: IMPLEMENTATION
|
|
142
|
+
|
|
143
|
+
| Agent | `tech-lead` β specialists |
|
|
144
|
+
| ----- | ----------------------------------- |
|
|
145
|
+
| Goal | Execute fix plan |
|
|
146
|
+
| Exit | Fix implemented, changes documented |
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## π Phase 5: VALIDATION
|
|
151
|
+
|
|
152
|
+
| Agent | `tester` |
|
|
153
|
+
| ----- | ----------------------------------------- |
|
|
154
|
+
| Goal | Comprehensive validation |
|
|
155
|
+
| Exit | Issue resolved, tests pass, no regression |
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## π Phase 5.5: ROLLBACK VERIFICATION (IF CRITICAL)
|
|
160
|
+
|
|
161
|
+
| Agent | `devops-engineer` |
|
|
162
|
+
| ------- | ---------------------------------------------------- |
|
|
163
|
+
| Trigger | Fix affects production or is critical |
|
|
164
|
+
| Goal | Verify rollback plan |
|
|
165
|
+
| Exit | Rollback documented, tested, recovery time estimated |
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## COMPLETION
|
|
170
|
+
|
|
171
|
+
Present fix report with:
|
|
172
|
+
|
|
173
|
+
1. β
**Fixed** β Issue resolved (Focus Mode)
|
|
174
|
+
2. π§ͺ **Test** β `/test`
|
|
175
|
+
3. π **Docs** β `/docs:core`
|
package/commands/fix/hard.md
CHANGED
|
@@ -79,6 +79,63 @@ One phase at a time, each phase independent: Phase 1 β then Phase 2 β β¦ in
|
|
|
79
79
|
|
|
80
80
|
---
|
|
81
81
|
|
|
82
|
+
## π‘οΈ VERIFICATION CHECKPOINT β Context Optimization
|
|
83
|
+
|
|
84
|
+
> **PURPOSE**: Prevent "context rot" by clearing noisy debugging/planning history before implementation.
|
|
85
|
+
>
|
|
86
|
+
> Long-running analysis sessions fill context with noise that degrades code generation quality.
|
|
87
|
+
> This checkpoint acts as a "firewall" between Planning and Implementation phases.
|
|
88
|
+
|
|
89
|
+
### β‘ OPTIONS (Present to User)
|
|
90
|
+
|
|
91
|
+
```markdown
|
|
92
|
+
## π‘οΈ Context Optimization Checkpoint
|
|
93
|
+
|
|
94
|
+
**Planning Complete** β Fix plan created with rollback strategy.
|
|
95
|
+
|
|
96
|
+
**Choose how to proceed with implementation:**
|
|
97
|
+
|
|
98
|
+
| Option | Action | Description |
|
|
99
|
+
|--------|--------|-------------|
|
|
100
|
+
| **1. π Clear context & Auto-Implement** | `RECOMMENDED` | Fresh start: Reload Plan, ignore chat history, begin fix immediately |
|
|
101
|
+
| **2. βΈοΈ Clear context & Manual** | `SAFE` | Clear context, reload Plan, pause for your command before coding |
|
|
102
|
+
| **3. β οΈ Continue (No Clear)** | `RISKY` | Proceed with full history attached (may cause hallucination) |
|
|
103
|
+
|
|
104
|
+
β³ Awaiting selection...
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### π EXECUTION BEHAVIOR
|
|
108
|
+
|
|
109
|
+
```yaml
|
|
110
|
+
option_1_clear_auto_implement:
|
|
111
|
+
behavior: "RECOMMENDED - Simulate fresh start"
|
|
112
|
+
steps:
|
|
113
|
+
1. ACKNOWLEDGE: "π Executing Clear context & Auto-Implement..."
|
|
114
|
+
2. CONTEXT_DIRECTIVE: |
|
|
115
|
+
β IGNORE all previous chat messages and reasoning chains.
|
|
116
|
+
β
RELOAD: Fix plan as SOLE SOURCE OF TRUTH.
|
|
117
|
+
β
PROCEED: Begin Phase 4 (Implementation) immediately.
|
|
118
|
+
3. EXECUTE: Start Implementation phase with fresh context mindset
|
|
119
|
+
|
|
120
|
+
option_2_clear_manual:
|
|
121
|
+
behavior: "Clear and wait for explicit command"
|
|
122
|
+
steps:
|
|
123
|
+
1. ACKNOWLEDGE: "βΈοΈ Context cleared. Plan reloaded."
|
|
124
|
+
2. CONTEXT_DIRECTIVE: |
|
|
125
|
+
β IGNORE all previous chat messages and reasoning chains.
|
|
126
|
+
β
RELOAD: Fix plan as SOLE SOURCE OF TRUTH.
|
|
127
|
+
3. OUTPUT: "Ready for fix implementation. Type `/continue` or give specific instructions."
|
|
128
|
+
4. WAIT: For user command before proceeding
|
|
129
|
+
|
|
130
|
+
option_3_continue_no_clear:
|
|
131
|
+
behavior: "Proceed with caution - context rot risk"
|
|
132
|
+
steps:
|
|
133
|
+
1. WARN: "β οΈ Continuing with full history. Higher hallucination risk."
|
|
134
|
+
2. PROCEED: Continue to Phase 4 with existing context
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
82
139
|
## π Phase 4: IMPLEMENTATION
|
|
83
140
|
|
|
84
141
|
| Agent | `tech-lead` β specialists |
|
package/commands/fix.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 issue is simple (clear cause, quick fix):
|
|
|
33
34
|
IF issue is complex (research needed, multi-file):
|
|
34
35
|
β Route to /fix:hard
|
|
35
36
|
|
|
37
|
+
IF issue is complex AND context optimization is critical:
|
|
38
|
+
β Route to /fix:focus
|
|
39
|
+
|
|
36
40
|
IF unsure:
|
|
37
41
|
β Default to /fix:fast (escalate if needed)
|
|
38
42
|
```
|
|
@@ -41,10 +45,11 @@ IF unsure:
|
|
|
41
45
|
|
|
42
46
|
## AVAILABLE ROUTES
|
|
43
47
|
|
|
44
|
-
| Route
|
|
45
|
-
|
|
|
46
|
-
| `/fix:fast`
|
|
47
|
-
| `/fix:hard`
|
|
48
|
+
| Route | When to Use |
|
|
49
|
+
| ------------ | ----------------------------------------------------- |
|
|
50
|
+
| `/fix:fast` | Quick fixes, clear issues |
|
|
51
|
+
| `/fix:hard` | Complex issues, research needed |
|
|
52
|
+
| `/fix:focus` | Complex issues with **enforced context optimization** |
|
|
48
53
|
|
|
49
54
|
---
|
|
50
55
|
|
|
@@ -59,6 +64,7 @@ IF unsure:
|
|
|
59
64
|
|
|
60
65
|
1. β‘ **Fast** β `/fix:fast` β Quick fix
|
|
61
66
|
2. β‘β‘β‘ **Hard** β `/fix:hard` β Full resolution
|
|
67
|
+
3. π― **Focus** β `/fix:focus` β Full resolution with **automatic context clearing** (prevents hallucination)
|
|
62
68
|
|
|
63
69
|
β³ Awaiting selection...
|
|
64
70
|
```
|