@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
|
@@ -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`
|
package/commands/code/hard.md
CHANGED
|
@@ -213,6 +213,65 @@ One phase at a time, each phase independent: Phase 1 β then Phase 2 β β¦ in
|
|
|
213
213
|
|
|
214
214
|
---
|
|
215
215
|
|
|
216
|
+
## π‘οΈ VERIFICATION CHECKPOINT β Context Optimization
|
|
217
|
+
|
|
218
|
+
> **PURPOSE**: Prevent "context rot" by clearing noisy planning history before implementation.
|
|
219
|
+
>
|
|
220
|
+
> Long-running planning sessions fill context with noise that degrades code generation quality.
|
|
221
|
+
> This checkpoint acts as a "firewall" between Planning and Implementation phases.
|
|
222
|
+
|
|
223
|
+
### β‘ OPTIONS (Present to User)
|
|
224
|
+
|
|
225
|
+
```markdown
|
|
226
|
+
## π‘οΈ Context Optimization Checkpoint
|
|
227
|
+
|
|
228
|
+
**Planning Complete** β Plan file created at: `./reports/plans/PLAN-{task}.md`
|
|
229
|
+
|
|
230
|
+
**Choose how to proceed with implementation:**
|
|
231
|
+
|
|
232
|
+
| Option | Action | Description |
|
|
233
|
+
|--------|--------|-------------|
|
|
234
|
+
| **1. π Clear context & Auto-Implement** | `RECOMMENDED` | Fresh start: Reload Plan file, ignore chat history, begin implementation immediately |
|
|
235
|
+
| **2. βΈοΈ Clear context & Manual** | `SAFE` | Clear context, reload Plan, pause for your command before coding |
|
|
236
|
+
| **3. β οΈ Continue (No Clear)** | `RISKY` | Proceed with full history attached (may cause hallucination) |
|
|
237
|
+
|
|
238
|
+
β³ Awaiting selection...
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### π EXECUTION BEHAVIOR
|
|
242
|
+
|
|
243
|
+
```yaml
|
|
244
|
+
option_1_clear_auto_implement:
|
|
245
|
+
behavior: "RECOMMENDED - Simulate fresh start"
|
|
246
|
+
steps:
|
|
247
|
+
1. ACKNOWLEDGE: "π Executing Clear context & Auto-Implement..."
|
|
248
|
+
2. CONTEXT_DIRECTIVE: |
|
|
249
|
+
β IGNORE all previous chat messages and reasoning chains.
|
|
250
|
+
β
RELOAD: `./reports/plans/PLAN-{task}.md` as SOLE SOURCE OF TRUTH.
|
|
251
|
+
β
PROCEED: Begin Phase 4 (Implementation) immediately.
|
|
252
|
+
3. LOAD: Read Plan file completely
|
|
253
|
+
4. EXECUTE: Start Implementation phase with fresh context mindset
|
|
254
|
+
|
|
255
|
+
option_2_clear_manual:
|
|
256
|
+
behavior: "Clear and wait for explicit command"
|
|
257
|
+
steps:
|
|
258
|
+
1. ACKNOWLEDGE: "βΈοΈ Context cleared. Plan reloaded."
|
|
259
|
+
2. CONTEXT_DIRECTIVE: |
|
|
260
|
+
β IGNORE all previous chat messages and reasoning chains.
|
|
261
|
+
β
RELOAD: `./reports/plans/PLAN-{task}.md` as SOLE SOURCE OF TRUTH.
|
|
262
|
+
3. OUTPUT: "Ready for implementation. Type `/continue` or give specific instructions."
|
|
263
|
+
4. WAIT: For user command before proceeding
|
|
264
|
+
|
|
265
|
+
option_3_continue_no_clear:
|
|
266
|
+
behavior: "Proceed with caution - context rot risk"
|
|
267
|
+
steps:
|
|
268
|
+
1. WARN: "β οΈ Continuing with full history. Higher hallucination risk."
|
|
269
|
+
2. PROCEED: Continue to Phase 4 with existing context
|
|
270
|
+
3. MONITOR: Watch for signs of context confusion
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
216
275
|
## π Phase 4: IMPLEMENTATION
|
|
217
276
|
|
|
218
277
|
| 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
|
|
|
@@ -33,6 +34,9 @@ IF task is simple (clear requirements, single file):
|
|
|
33
34
|
IF task is complex (multi-file, research needed):
|
|
34
35
|
β Route to /code:hard
|
|
35
36
|
|
|
37
|
+
IF task is complex AND context optimization is critical:
|
|
38
|
+
β Route to /code:focus
|
|
39
|
+
|
|
36
40
|
IF unsure:
|
|
37
41
|
β Default to /code:fast (escalate if needed)
|
|
38
42
|
```
|
|
@@ -41,10 +45,11 @@ IF unsure:
|
|
|
41
45
|
|
|
42
46
|
## AVAILABLE ROUTES
|
|
43
47
|
|
|
44
|
-
| Route
|
|
45
|
-
|
|
|
46
|
-
| `/code:fast`
|
|
47
|
-
| `/code:hard`
|
|
48
|
+
| Route | When to Use |
|
|
49
|
+
| ------------- | ------------------------------------------------------- |
|
|
50
|
+
| `/code:fast` | Quick implementation, clear requirements |
|
|
51
|
+
| `/code:hard` | Complex features, multi-file changes |
|
|
52
|
+
| `/code: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** β `/code:fast` β Quick implementation
|
|
61
66
|
2. β‘β‘β‘ **Hard** β `/code:hard` β Full development cycle
|
|
67
|
+
3. π― **Focus** β `/code:focus` β Full cycle with **automatic context clearing** (prevents hallucination)
|
|
62
68
|
|
|
63
69
|
β³ Awaiting selection...
|
|
64
70
|
```
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: π Focused Feature β Complete development with enforced context optimization
|
|
3
|
+
version: "1.0"
|
|
4
|
+
category: engineering
|
|
5
|
+
execution-mode: execute
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /cook:focus β Focus Feature Development
|
|
9
|
+
|
|
10
|
+
> **MISSION**: Full feature development 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
|
+
<feature>$ARGUMENTS</feature>
|
|
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
|
+
> Reference: `{RULES_PATH}/ADAPTIVE-EXECUTION.md`
|
|
34
|
+
|
|
35
|
+
| Tier | When | Action |
|
|
36
|
+
| ---------- | ----------------------------- | ---------------------------- |
|
|
37
|
+
| **TIER 1** | runSubagent/Agent Tool EXISTS | Invoke sub-agent (MANDATORY) |
|
|
38
|
+
| **TIER 2** | Tool MISSING or SYSTEM error | EMBODY agent file (FALLBACK) |
|
|
39
|
+
|
|
40
|
+
**β Anti-Lazy**: Never use TIER 2 when TIER 1 tool available.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## π DELIVERABLE FILES
|
|
45
|
+
|
|
46
|
+
| Agent | Output |
|
|
47
|
+
| ------------ | ----------------------------------------------- |
|
|
48
|
+
| brainstormer | `./reports/brainstorms/BRAINSTORM-{feature}.md` |
|
|
49
|
+
| researcher | `./reports/researchers/RESEARCH-{feature}.md` |
|
|
50
|
+
| scouter | `./reports/scouts/SCOUT-{feature}.md` |
|
|
51
|
+
| designer | `./reports/designs/DESIGN-{feature}.md` |
|
|
52
|
+
| planner | `./reports/plans/PLAN-{feature}.md` |
|
|
53
|
+
|
|
54
|
+
All files in `./reports/` β English only.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## π PHASE DEPENDENCIES
|
|
59
|
+
|
|
60
|
+
| Phase | Requires | Blocking |
|
|
61
|
+
| ------------------ | ---------------------- | ----------- |
|
|
62
|
+
| P1: Brainstorm | User request | No |
|
|
63
|
+
| P2: Research | User request | No |
|
|
64
|
+
| P3: Scout | User request | No |
|
|
65
|
+
| P3.5: DB Design | Data requirements | Conditional |
|
|
66
|
+
| P4: Design | Scout findings | Conditional |
|
|
67
|
+
| P5: Planning | RESEARCH + SCOUT files | **YES** |
|
|
68
|
+
| P5.5: Context Gate | **PLAN file** | **AUTO** |
|
|
69
|
+
| P6: Implementation | **PLAN file** | **YES** |
|
|
70
|
+
| P7: Testing | PLAN + Code | **YES** |
|
|
71
|
+
| P8: Review | PLAN + Code + Tests | **YES** |
|
|
72
|
+
|
|
73
|
+
**β Blocking**: If input missing β STOP β Create it first β Resume
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## β INCREMENTAL EXECUTION (MANDATORY)
|
|
78
|
+
|
|
79
|
+
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.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## π Phase 1: REQUIREMENTS CLARIFICATION
|
|
84
|
+
|
|
85
|
+
| Agent | `brainstormer` |
|
|
86
|
+
| ----- | -------------------------------------------------------------------- |
|
|
87
|
+
| Goal | Full requirements discovery |
|
|
88
|
+
| Exit | Requirements clear, constraints identified, success criteria defined |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## π Phase 2: RESEARCH
|
|
93
|
+
|
|
94
|
+
| Agent | `researcher` |
|
|
95
|
+
| ----- | -------------------------------------------------------------------------- |
|
|
96
|
+
| Goal | Research best practices and patterns |
|
|
97
|
+
| Exit | Patterns researched, best practices identified, recommendations documented |
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## π Phase 3: CODEBASE ANALYSIS
|
|
102
|
+
|
|
103
|
+
| Agent | `scouter` |
|
|
104
|
+
| ----- | ----------------------------------------------------------------------- |
|
|
105
|
+
| Goal | Map architecture and integration points |
|
|
106
|
+
| Exit | Architecture understood, integration points mapped, patterns documented |
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## π Phase 3.5: DATABASE DESIGN (IF DATA CHANGES)
|
|
111
|
+
|
|
112
|
+
| Agent | `database-architect` |
|
|
113
|
+
| ------- | ----------------------------------------------------------- |
|
|
114
|
+
| Trigger | Feature involves database changes/migrations |
|
|
115
|
+
| Goal | Schema design and data modeling |
|
|
116
|
+
| Exit | Schema designed, migrations planned, query patterns defined |
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## π Phase 4: DESIGN (IF UI NEEDED)
|
|
121
|
+
|
|
122
|
+
| Agent | `designer` |
|
|
123
|
+
| ------- | ----------------------------------------------------- |
|
|
124
|
+
| Trigger | Feature has UI components |
|
|
125
|
+
| Goal | UI/UX design |
|
|
126
|
+
| Exit | Design created, accessibility considered, specs ready |
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## π Phase 5: PLANNING
|
|
131
|
+
|
|
132
|
+
| Agent | `planner` |
|
|
133
|
+
| ------------ | --------------------------------------------------- |
|
|
134
|
+
| Prerequisite | **READ** RESEARCH + SCOUT + DESIGN files |
|
|
135
|
+
| Goal | Create detailed implementation plan |
|
|
136
|
+
| Output | `./reports/plans/PLAN-{feature}.md` |
|
|
137
|
+
| Exit | Plan file created, phases defined, risks identified |
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## π‘οΈ STRICT CONTEXT GATE β Automatic Context Optimization
|
|
142
|
+
|
|
143
|
+
> **β‘ FOCUS MODE**: This checkpoint executes automatically. NO user input required.
|
|
144
|
+
>
|
|
145
|
+
> **PURPOSE**: Prevent "context rot" by forcibly clearing noisy planning history.
|
|
146
|
+
> This acts as a mandatory "firewall" between Planning and Implementation phases.
|
|
147
|
+
|
|
148
|
+
### π AUTOMATIC EXECUTION (NO PROMPT)
|
|
149
|
+
|
|
150
|
+
```yaml
|
|
151
|
+
strict_context_gate:
|
|
152
|
+
mode: "AUTOMATIC - No user interaction"
|
|
153
|
+
behavior: "Force Clear context & Auto-Implement"
|
|
154
|
+
|
|
155
|
+
execution:
|
|
156
|
+
1. ANNOUNCE: |
|
|
157
|
+
## π‘οΈ Strict Context Gate β Automatic
|
|
158
|
+
|
|
159
|
+
β
**Plan Complete**: `./reports/plans/PLAN-{feature}.md`
|
|
160
|
+
π **Focus Mode**: Automatically clearing context for implementation.
|
|
161
|
+
|
|
162
|
+
β‘ Executing: **Clear context & Auto-Implement**...
|
|
163
|
+
|
|
164
|
+
2. CONTEXT_DIRECTIVE: |
|
|
165
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
166
|
+
β β MANDATORY CONTEXT RESET β FOCUS MODE β
|
|
167
|
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
|
|
168
|
+
β IGNORE: All previous chat messages, reasoning chains, β
|
|
169
|
+
β brainstorming discussions, research explorations, β
|
|
170
|
+
β rejected alternatives, and intermediate thinking. β
|
|
171
|
+
β β
|
|
172
|
+
β SOLE SOURCE OF TRUTH: `./reports/plans/PLAN-{feature}.md` β
|
|
173
|
+
β β
|
|
174
|
+
β PROCEED: Begin Implementation phase with FRESH context mindset. β
|
|
175
|
+
β Treat this as a NEW conversation starting from Plan. β
|
|
176
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
177
|
+
|
|
178
|
+
3. LOAD: Read Plan file completely as if seeing it for the first time
|
|
179
|
+
|
|
180
|
+
4. PROCEED: Start Phase 6 (Implementation) immediately
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### π Post-Gate Status
|
|
184
|
+
|
|
185
|
+
```markdown
|
|
186
|
+
π **Context Gate Passed**
|
|
187
|
+
|
|
188
|
+
- Previous context: DISCARDED
|
|
189
|
+
- Active context: Plan file only
|
|
190
|
+
- Mode: Fresh implementation start
|
|
191
|
+
|
|
192
|
+
Proceeding to Implementation...
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## π Phase 6: IMPLEMENTATION
|
|
198
|
+
|
|
199
|
+
| Agent | `tech-lead` β routes to specialists |
|
|
200
|
+
| ------------ | ------------------------------------------------------- |
|
|
201
|
+
| Prerequisite | **READ and FOLLOW** `./reports/plans/PLAN-{feature}.md` |
|
|
202
|
+
| Goal | Execute implementation plan |
|
|
203
|
+
|
|
204
|
+
**FOCUS ADHERENCE:**
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
1. READ plan FIRST
|
|
208
|
+
2. FOR EACH step:
|
|
209
|
+
- Implement EXACTLY as specified
|
|
210
|
+
- Mark step complete: [ ] β [x]
|
|
211
|
+
3. IF step seems wrong:
|
|
212
|
+
- STOP β Document β Request Re-Planning
|
|
213
|
+
- DO NOT implement your own interpretation
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
| Exit | All plan phases complete, no unauthorized deviations |
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## π Phase 7: TESTING
|
|
221
|
+
|
|
222
|
+
| Agent | `tester` |
|
|
223
|
+
| ------------ | ---------------------------- |
|
|
224
|
+
| Prerequisite | **READ** PLAN + Code changes |
|
|
225
|
+
| Goal | Comprehensive testing |
|
|
226
|
+
|
|
227
|
+
**PLAN CHECKPOINT VERIFICATION:**
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
FOR EACH checkpoint in PLAN:
|
|
231
|
+
- Write test that verifies criteria
|
|
232
|
+
- Document: "Checkpoint X β Test Y"
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
| Exit | All tests pass, each plan checkpoint has test |
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## π Phase 8: REVIEW
|
|
240
|
+
|
|
241
|
+
| Agent | `reviewer` |
|
|
242
|
+
| ------------ | -------------------------------- |
|
|
243
|
+
| Prerequisite | **READ** PLAN + Code + Tests |
|
|
244
|
+
| Goal | Quality review + Plan compliance |
|
|
245
|
+
|
|
246
|
+
**REVIEW CHECKLIST:**
|
|
247
|
+
|
|
248
|
+
- Does code implement plan specification?
|
|
249
|
+
- Any unauthorized deviations?
|
|
250
|
+
- All plan phases reflected in code?
|
|
251
|
+
|
|
252
|
+
| Exit | Code matches plan intent, standards met, approved |
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## COMPLETION
|
|
257
|
+
|
|
258
|
+
Present feature report with:
|
|
259
|
+
|
|
260
|
+
1. β
**Done** β Feature complete (Focus Mode)
|
|
261
|
+
2. π **Deploy** β `/deploy:preview`
|
|
262
|
+
3. π **Docs** β `/docs:core`
|