@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,343 @@
|
|
|
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
|
+
## π PLAN-ALREADY-PROVIDED: SKIP REDUNDANT PHASES
|
|
32
|
+
|
|
33
|
+
**Before starting Phase 1**, resolve whether the user is **coding from an existing plan**. If yes, **do not** run research, scout, or brainstorm.
|
|
34
|
+
|
|
35
|
+
### Detection
|
|
36
|
+
|
|
37
|
+
- User message references a plan: e.g. `@plan`, `@PLAN-...`, path like `./reports/plans/PLAN-{name}.md`, or phrases like "according to plan", "follow the plan", "code from plan", "implement per plan".
|
|
38
|
+
- Or a plan file already exists for this task at `./reports/plans/PLAN-{task}.md` (derive `{task}` from `$ARGUMENTS` or from the referenced file name).
|
|
39
|
+
|
|
40
|
+
### Resolution
|
|
41
|
+
|
|
42
|
+
1. **CHECK**: Does a valid plan file exist (user-provided path or `./reports/plans/PLAN-{task}.md`)?
|
|
43
|
+
2. **IF YES**:
|
|
44
|
+
- **SKIP** Phase 1 (Requirements/Brainstorm), Phase 2 (Scout), Phase 3 (Planning).
|
|
45
|
+
- **ANNOUNCE**: "β
Plan provided/found β skipping research, scout, and planning. Proceeding to implementation."
|
|
46
|
+
- **GO TO**: Strict Context Gate (automatic) β then Phase 4 (Implementation) β Phase 5 (Testing) β Phase 6 (Review).
|
|
47
|
+
3. **IF NO**: Run phases in order: Phase 1 β 2 β 3 β Context Gate β 4 β 5 β 6.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## π TIERED EXECUTION PROTOCOL (MANDATORY)
|
|
52
|
+
|
|
53
|
+
> **Reference**: `{RULES_PATH}/ADAPTIVE-EXECUTION.md`
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
tiered_execution:
|
|
57
|
+
principle: "Sub-agent FIRST (Tier 1). EMBODY ONLY on system failure (Tier 2)."
|
|
58
|
+
|
|
59
|
+
tool_discovery: "Check runSubagent availability BEFORE first delegation"
|
|
60
|
+
|
|
61
|
+
for_each_phase:
|
|
62
|
+
TIER_1_MANDATORY: "IF tool exists β MUST use SUB_AGENT_DELEGATION"
|
|
63
|
+
TIER_2_FALLBACK: "ONLY on system errorβNOT complexity/preference/speed"
|
|
64
|
+
|
|
65
|
+
anti_lazy_fallback:
|
|
66
|
+
- β NEVER use Tier 2 when Tier 1 tool is available
|
|
67
|
+
- β
ALWAYS attempt Tier 1 first when tool exists
|
|
68
|
+
- β
ALWAYS log justification for Tier 2 fallback
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## β οΈ CRITICAL: PHASE CONTINUITY RULES
|
|
74
|
+
|
|
75
|
+
```yaml
|
|
76
|
+
phase_continuity:
|
|
77
|
+
rule: "Each phase MUST reference and follow outputs from prior phases"
|
|
78
|
+
|
|
79
|
+
check_for_files:
|
|
80
|
+
- "./reports/brainstorms/BRAINSTORM-{task}.md"
|
|
81
|
+
- "./reports/scouts/SCOUT-{task}.md"
|
|
82
|
+
- "./reports/plans/PLAN-{task}.md"
|
|
83
|
+
|
|
84
|
+
enforcement:
|
|
85
|
+
- Phase 3 (Planning) MUST incorporate Scout findings
|
|
86
|
+
- Phase 4 (Implementation) MUST follow the Plan file exactly
|
|
87
|
+
- Phase 5 (Testing) MUST verify all plan checkpoints
|
|
88
|
+
- If prior phase file missing β Agent MUST create it
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
All files in `./reports/` β English only.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## β INCREMENTAL EXECUTION (MANDATORY)
|
|
96
|
+
|
|
97
|
+
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).
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## π Phase 1: REQUIREMENTS ANALYSIS
|
|
102
|
+
|
|
103
|
+
| Attribute | Value |
|
|
104
|
+
| ----------- | --------------------------------- |
|
|
105
|
+
| **Agent** | `brainstormer` |
|
|
106
|
+
| **Goal** | Clarify requirements if ambiguous |
|
|
107
|
+
| **Trigger** | If requirements unclear |
|
|
108
|
+
|
|
109
|
+
### β‘ TIERED EXECUTION
|
|
110
|
+
|
|
111
|
+
**TIER 1 (MANDATORY when tool exists):**
|
|
112
|
+
|
|
113
|
+
> Invoke runSubagent for `brainstormer`. Context: ISOLATED.
|
|
114
|
+
|
|
115
|
+
**TIER 2 (FALLBACK on system error only):**
|
|
116
|
+
|
|
117
|
+
> Load `{AGENTS_PATH}/brainstormer.md`
|
|
118
|
+
> EMBODY [brainstormer] β Requires logged system error justification.
|
|
119
|
+
|
|
120
|
+
**Exit Criteria:**
|
|
121
|
+
|
|
122
|
+
- [ ] Requirements clear
|
|
123
|
+
- [ ] Scope defined
|
|
124
|
+
- [ ] Acceptance criteria established
|
|
125
|
+
- [ ] **METHODOLOGY CHECK**: Output aligns with `brainstormer` Thinking Protocol
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## π Phase 2: CODEBASE ANALYSIS
|
|
130
|
+
|
|
131
|
+
| Attribute | Value |
|
|
132
|
+
| --------- | ----------------------------- |
|
|
133
|
+
| **Agent** | `scouter` |
|
|
134
|
+
| **Goal** | Full codebase context mapping |
|
|
135
|
+
|
|
136
|
+
### β‘ TIERED EXECUTION
|
|
137
|
+
|
|
138
|
+
**TIER 1 (MANDATORY when tool exists):**
|
|
139
|
+
|
|
140
|
+
> Invoke runSubagent for `scouter`. Context: ISOLATED.
|
|
141
|
+
|
|
142
|
+
**TIER 2 (FALLBACK on system error only):**
|
|
143
|
+
|
|
144
|
+
> Load `{AGENTS_PATH}/scouter.md`
|
|
145
|
+
> EMBODY [scouter] β Requires logged system error justification.
|
|
146
|
+
|
|
147
|
+
**Exit Criteria:**
|
|
148
|
+
|
|
149
|
+
- [ ] Architecture understood
|
|
150
|
+
- [ ] Patterns documented
|
|
151
|
+
- [ ] Integration points identified
|
|
152
|
+
- [ ] **METHODOLOGY CHECK**: Output aligns with `scouter` Thinking Protocol
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## π Phase 3: IMPLEMENTATION PLANNING
|
|
157
|
+
|
|
158
|
+
| Attribute | Value |
|
|
159
|
+
| --------- | -------------------------- |
|
|
160
|
+
| **Agent** | `planner` |
|
|
161
|
+
| **Goal** | Create implementation plan |
|
|
162
|
+
|
|
163
|
+
### β‘ TIERED EXECUTION
|
|
164
|
+
|
|
165
|
+
**TIER 1 (MANDATORY when tool exists):**
|
|
166
|
+
|
|
167
|
+
> Invoke runSubagent for `planner`. Context: ISOLATED.
|
|
168
|
+
|
|
169
|
+
**TIER 2 (FALLBACK on system error only):**
|
|
170
|
+
|
|
171
|
+
> Load `{AGENTS_PATH}/planner.md`
|
|
172
|
+
> EMBODY [planner] β Requires logged system error justification.
|
|
173
|
+
|
|
174
|
+
**Exit Criteria:**
|
|
175
|
+
|
|
176
|
+
- [ ] Plan created
|
|
177
|
+
- [ ] Steps defined
|
|
178
|
+
- [ ] Risks identified
|
|
179
|
+
- [ ] **METHODOLOGY CHECK**: Output aligns with `planner` Thinking Protocol
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## π‘οΈ STRICT CONTEXT GATE β Automatic Context Optimization
|
|
184
|
+
|
|
185
|
+
> **β‘ FOCUS MODE**: This checkpoint executes automatically. NO user input required.
|
|
186
|
+
>
|
|
187
|
+
> **PURPOSE**: Prevent "context rot" by forcibly clearing noisy planning history.
|
|
188
|
+
> This acts as a mandatory "firewall" between Planning and Implementation phases.
|
|
189
|
+
|
|
190
|
+
### π AUTOMATIC EXECUTION (NO PROMPT)
|
|
191
|
+
|
|
192
|
+
```yaml
|
|
193
|
+
strict_context_gate:
|
|
194
|
+
mode: "AUTOMATIC - No user interaction"
|
|
195
|
+
behavior: "Force Clear context & Auto-Implement"
|
|
196
|
+
|
|
197
|
+
execution:
|
|
198
|
+
1. ANNOUNCE: |
|
|
199
|
+
## π‘οΈ Strict Context Gate β Automatic
|
|
200
|
+
|
|
201
|
+
β
**Plan Complete**: `./reports/plans/PLAN-{task}.md`
|
|
202
|
+
π **Focus Mode**: Automatically clearing context for implementation.
|
|
203
|
+
|
|
204
|
+
β‘ Executing: **Clear context & Auto-Implement**...
|
|
205
|
+
|
|
206
|
+
2. CONTEXT_DIRECTIVE: |
|
|
207
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
208
|
+
β β MANDATORY CONTEXT RESET β FOCUS MODE β
|
|
209
|
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
|
|
210
|
+
β IGNORE: All previous chat messages, reasoning chains, β
|
|
211
|
+
β brainstorming discussions, research explorations, β
|
|
212
|
+
β rejected alternatives, and intermediate thinking. β
|
|
213
|
+
β β
|
|
214
|
+
β SOLE SOURCE OF TRUTH: `./reports/plans/PLAN-{task}.md` β
|
|
215
|
+
β β
|
|
216
|
+
β PROCEED: Begin Implementation phase with FRESH context mindset. β
|
|
217
|
+
β Treat this as a NEW conversation starting from Plan. β
|
|
218
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
219
|
+
|
|
220
|
+
3. LOAD: Read Plan file completely as if seeing it for the first time
|
|
221
|
+
|
|
222
|
+
4. PROCEED: Start Phase 4 (Implementation) immediately
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### π Post-Gate Status
|
|
226
|
+
|
|
227
|
+
```markdown
|
|
228
|
+
π **Context Gate Passed**
|
|
229
|
+
|
|
230
|
+
- Previous context: DISCARDED
|
|
231
|
+
- Active context: Plan file only
|
|
232
|
+
- Mode: Fresh implementation start
|
|
233
|
+
|
|
234
|
+
Proceeding to Implementation...
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## π Phase 4: IMPLEMENTATION
|
|
240
|
+
|
|
241
|
+
| Attribute | Value |
|
|
242
|
+
| --------- | ----------------------------------- |
|
|
243
|
+
| **Agent** | `tech-lead` β routes to specialists |
|
|
244
|
+
| **Goal** | Execute plan with specialist agents |
|
|
245
|
+
|
|
246
|
+
### β‘ TIERED EXECUTION
|
|
247
|
+
|
|
248
|
+
**TIER 1 (MANDATORY when tool exists):**
|
|
249
|
+
|
|
250
|
+
> Invoke runSubagent for `tech-lead`. Context: ISOLATED.
|
|
251
|
+
> Tech-lead will spawn specialist subagents as needed.
|
|
252
|
+
|
|
253
|
+
**TIER 2 (FALLBACK on system error only):**
|
|
254
|
+
|
|
255
|
+
> Load `{AGENTS_PATH}/tech-lead.md`
|
|
256
|
+
> EMBODY [tech-lead] β Requires logged system error justification.
|
|
257
|
+
> Then recursively EMBODY specialists as needed.
|
|
258
|
+
|
|
259
|
+
### β‘ FOCUS ADHERENCE DIRECTIVE
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
1. READ plan completely BEFORE any implementation
|
|
263
|
+
2. FOR EACH plan step:
|
|
264
|
+
a. Implement EXACTLY as specified
|
|
265
|
+
b. Mark complete: `- [ ]` β `- [x]`
|
|
266
|
+
3. IF deviation needed:
|
|
267
|
+
a. STOP
|
|
268
|
+
b. REQUEST Re-Planning
|
|
269
|
+
c. DO NOT proceed with own interpretation
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**Exit Criteria:**
|
|
273
|
+
|
|
274
|
+
- [ ] All plan steps executed
|
|
275
|
+
- [ ] Code complete
|
|
276
|
+
- [ ] Documentation updated
|
|
277
|
+
- [ ] **Each plan step has corresponding implementation**
|
|
278
|
+
- [ ] **No unauthorized deviations**
|
|
279
|
+
- [ ] **METHODOLOGY CHECK**: Output aligns with `tech-lead` Thinking Protocol
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## π Phase 5: TESTING
|
|
284
|
+
|
|
285
|
+
| Attribute | Value |
|
|
286
|
+
| --------- | --------------------- |
|
|
287
|
+
| **Agent** | `tester` |
|
|
288
|
+
| **Goal** | Comprehensive testing |
|
|
289
|
+
|
|
290
|
+
### β‘ TIERED EXECUTION
|
|
291
|
+
|
|
292
|
+
**TIER 1 (MANDATORY when tool exists):**
|
|
293
|
+
|
|
294
|
+
> Invoke runSubagent for `tester`. Context: ISOLATED.
|
|
295
|
+
|
|
296
|
+
**TIER 2 (FALLBACK on system error only):**
|
|
297
|
+
|
|
298
|
+
> Load `{AGENTS_PATH}/tester.md`
|
|
299
|
+
> EMBODY [tester] β Requires logged system error justification.
|
|
300
|
+
|
|
301
|
+
**Exit Criteria:**
|
|
302
|
+
|
|
303
|
+
- [ ] Tests written
|
|
304
|
+
- [ ] All tests pass
|
|
305
|
+
- [ ] Coverage adequate
|
|
306
|
+
- [ ] **METHODOLOGY CHECK**: Output aligns with `tester` Thinking Protocol
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## π Phase 6: REVIEW
|
|
311
|
+
|
|
312
|
+
| Attribute | Value |
|
|
313
|
+
| --------- | ------------------- |
|
|
314
|
+
| **Agent** | `reviewer` |
|
|
315
|
+
| **Goal** | Code quality review |
|
|
316
|
+
|
|
317
|
+
### β‘ TIERED EXECUTION
|
|
318
|
+
|
|
319
|
+
**TIER 1 (MANDATORY when tool exists):**
|
|
320
|
+
|
|
321
|
+
> Invoke runSubagent for `reviewer`. Context: ISOLATED.
|
|
322
|
+
|
|
323
|
+
**TIER 2 (FALLBACK on system error only):**
|
|
324
|
+
|
|
325
|
+
> Load `{AGENTS_PATH}/reviewer.md`
|
|
326
|
+
> EMBODY [reviewer] β Requires logged system error justification.
|
|
327
|
+
|
|
328
|
+
**Exit Criteria:**
|
|
329
|
+
|
|
330
|
+
- [ ] Code reviewed
|
|
331
|
+
- [ ] Standards met
|
|
332
|
+
- [ ] No blocking issues
|
|
333
|
+
- [ ] **METHODOLOGY CHECK**: Output aligns with `reviewer` Thinking Protocol
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## COMPLETION
|
|
338
|
+
|
|
339
|
+
Present implementation report with:
|
|
340
|
+
|
|
341
|
+
1. β
**Done** β Feature complete (Focus Mode)
|
|
342
|
+
2. π **Deploy** β `/deploy:preview`
|
|
343
|
+
3. π **Docs** β `/docs:core`
|
package/commands/code/hard.md
CHANGED
|
@@ -25,6 +25,26 @@ execution-mode: execute
|
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
+
## π PLAN-ALREADY-PROVIDED: SKIP REDUNDANT PHASES
|
|
29
|
+
|
|
30
|
+
**Before starting Phase 1**, resolve whether the user is **coding from an existing plan**. If yes, **do not** run research, scout, or brainstorm.
|
|
31
|
+
|
|
32
|
+
### Detection
|
|
33
|
+
|
|
34
|
+
- User message references a plan: e.g. `@plan`, `@PLAN-...`, path like `./reports/plans/PLAN-{name}.md`, or phrases like "according to plan", "follow the plan", "code from plan", "implement per plan".
|
|
35
|
+
- Or a plan file already exists for this task at `./reports/plans/PLAN-{task}.md` (derive `{task}` from `$ARGUMENTS` or from the referenced file name).
|
|
36
|
+
|
|
37
|
+
### Resolution
|
|
38
|
+
|
|
39
|
+
1. **CHECK**: Does a valid plan file exist (user-provided path or `./reports/plans/PLAN-{task}.md`)?
|
|
40
|
+
2. **IF YES**:
|
|
41
|
+
- **SKIP** Phase 1 (Requirements/Brainstorm), Phase 2 (Scout), Phase 3 (Planning).
|
|
42
|
+
- **ANNOUNCE**: "β
Plan provided/found β skipping research, scout, and planning. Proceeding to implementation."
|
|
43
|
+
- **GO TO**: Verification Checkpoint (Context Optimization) β then Phase 4 (Implementation) β Phase 5 (Testing) β Phase 6 (Review).
|
|
44
|
+
3. **IF NO**: Run phases in order: Phase 1 β 2 β 3 β Checkpoint β 4 β 5 β 6.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
28
48
|
## π TIERED EXECUTION PROTOCOL (MANDATORY)
|
|
29
49
|
|
|
30
50
|
> **Reference**: `{RULES_PATH}/ADAPTIVE-EXECUTION.md`
|
|
@@ -213,6 +233,65 @@ One phase at a time, each phase independent: Phase 1 β then Phase 2 β β¦ in
|
|
|
213
233
|
|
|
214
234
|
---
|
|
215
235
|
|
|
236
|
+
## π‘οΈ VERIFICATION CHECKPOINT β Context Optimization
|
|
237
|
+
|
|
238
|
+
> **PURPOSE**: Prevent "context rot" by clearing noisy planning history before implementation.
|
|
239
|
+
>
|
|
240
|
+
> Long-running planning sessions fill context with noise that degrades code generation quality.
|
|
241
|
+
> This checkpoint acts as a "firewall" between Planning and Implementation phases.
|
|
242
|
+
|
|
243
|
+
### β‘ OPTIONS (Present to User)
|
|
244
|
+
|
|
245
|
+
```markdown
|
|
246
|
+
## π‘οΈ Context Optimization Checkpoint
|
|
247
|
+
|
|
248
|
+
**Planning Complete** β Plan file created at: `./reports/plans/PLAN-{task}.md`
|
|
249
|
+
|
|
250
|
+
**Choose how to proceed with implementation:**
|
|
251
|
+
|
|
252
|
+
| Option | Action | Description |
|
|
253
|
+
|--------|--------|-------------|
|
|
254
|
+
| **1. π Clear context & Auto-Implement** | `RECOMMENDED` | Fresh start: Reload Plan file, ignore chat history, begin implementation immediately |
|
|
255
|
+
| **2. βΈοΈ Clear context & Manual** | `SAFE` | Clear context, reload Plan, pause for your command before coding |
|
|
256
|
+
| **3. β οΈ Continue (No Clear)** | `RISKY` | Proceed with full history attached (may cause hallucination) |
|
|
257
|
+
|
|
258
|
+
β³ Awaiting selection...
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### π EXECUTION BEHAVIOR
|
|
262
|
+
|
|
263
|
+
```yaml
|
|
264
|
+
option_1_clear_auto_implement:
|
|
265
|
+
behavior: "RECOMMENDED - Simulate fresh start"
|
|
266
|
+
steps:
|
|
267
|
+
1. ACKNOWLEDGE: "π Executing Clear context & Auto-Implement..."
|
|
268
|
+
2. CONTEXT_DIRECTIVE: |
|
|
269
|
+
β IGNORE all previous chat messages and reasoning chains.
|
|
270
|
+
β
RELOAD: `./reports/plans/PLAN-{task}.md` as SOLE SOURCE OF TRUTH.
|
|
271
|
+
β
PROCEED: Begin Phase 4 (Implementation) immediately.
|
|
272
|
+
3. LOAD: Read Plan file completely
|
|
273
|
+
4. EXECUTE: Start Implementation phase with fresh context mindset
|
|
274
|
+
|
|
275
|
+
option_2_clear_manual:
|
|
276
|
+
behavior: "Clear and wait for explicit command"
|
|
277
|
+
steps:
|
|
278
|
+
1. ACKNOWLEDGE: "βΈοΈ Context cleared. Plan reloaded."
|
|
279
|
+
2. CONTEXT_DIRECTIVE: |
|
|
280
|
+
β IGNORE all previous chat messages and reasoning chains.
|
|
281
|
+
β
RELOAD: `./reports/plans/PLAN-{task}.md` as SOLE SOURCE OF TRUTH.
|
|
282
|
+
3. OUTPUT: "Ready for implementation. Type `/continue` or give specific instructions."
|
|
283
|
+
4. WAIT: For user command before proceeding
|
|
284
|
+
|
|
285
|
+
option_3_continue_no_clear:
|
|
286
|
+
behavior: "Proceed with caution - context rot risk"
|
|
287
|
+
steps:
|
|
288
|
+
1. WARN: "β οΈ Continuing with full history. Higher hallucination risk."
|
|
289
|
+
2. PROCEED: Continue to Phase 4 with existing context
|
|
290
|
+
3. MONITOR: Watch for signs of context confusion
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
216
295
|
## π Phase 4: IMPLEMENTATION
|
|
217
296
|
|
|
218
297
|
| Attribute | Value |
|
package/commands/code.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
|
|
|
@@ -27,12 +28,18 @@ execution-mode: router
|
|
|
27
28
|
## ROUTING LOGIC
|
|
28
29
|
|
|
29
30
|
```
|
|
31
|
+
IF user references an existing plan (@plan, @PLAN-..., path to PLAN-*.md, or "according to plan" / "follow the plan"):
|
|
32
|
+
β Route to /code:hard or /code:focus (workflow will SKIP research, scout, brainstorm and go straight to implementation)
|
|
33
|
+
|
|
30
34
|
IF task is simple (clear requirements, single file):
|
|
31
35
|
β Route to /code:fast
|
|
32
36
|
|
|
33
37
|
IF task is complex (multi-file, research needed):
|
|
34
38
|
β Route to /code:hard
|
|
35
39
|
|
|
40
|
+
IF task is complex AND context optimization is critical:
|
|
41
|
+
β Route to /code:focus
|
|
42
|
+
|
|
36
43
|
IF unsure:
|
|
37
44
|
β Default to /code:fast (escalate if needed)
|
|
38
45
|
```
|
|
@@ -41,10 +48,11 @@ IF unsure:
|
|
|
41
48
|
|
|
42
49
|
## AVAILABLE ROUTES
|
|
43
50
|
|
|
44
|
-
| Route
|
|
45
|
-
|
|
|
46
|
-
| `/code:fast`
|
|
47
|
-
| `/code:hard`
|
|
51
|
+
| Route | When to Use |
|
|
52
|
+
| ------------- | ------------------------------------------------------- |
|
|
53
|
+
| `/code:fast` | Quick implementation, clear requirements |
|
|
54
|
+
| `/code:hard` | Complex features, multi-file changes |
|
|
55
|
+
| `/code:focus` | Complex features with **enforced context optimization** |
|
|
48
56
|
|
|
49
57
|
---
|
|
50
58
|
|
|
@@ -59,6 +67,7 @@ IF unsure:
|
|
|
59
67
|
|
|
60
68
|
1. β‘ **Fast** β `/code:fast` β Quick implementation
|
|
61
69
|
2. β‘β‘β‘ **Hard** β `/code:hard` β Full development cycle
|
|
70
|
+
3. π― **Focus** β `/code:focus` β Full cycle with **automatic context clearing** (prevents hallucination)
|
|
62
71
|
|
|
63
72
|
β³ Awaiting selection...
|
|
64
73
|
```
|