@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/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
|
```
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: π Focused Plan β Research-backed planning with enforced context optimization
|
|
3
|
+
version: "1.0"
|
|
4
|
+
category: planning
|
|
5
|
+
execution-mode: execute
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /plan:focus β Focus Comprehensive Planning
|
|
9
|
+
|
|
10
|
+
> **MISSION**: Create thorough implementation plan with **enforced context optimization**.
|
|
11
|
+
>
|
|
12
|
+
> This variant automatically clears context before handoffβno user prompt required.
|
|
13
|
+
> Use when you want guaranteed clean plan handoff 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
|
|
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
|
+
| researcher | `./reports/researchers/RESEARCH-{task}.md` |
|
|
45
|
+
| scouter | `./reports/scouts/SCOUT-{task}.md` |
|
|
46
|
+
| planner | **One** `./reports/plans/PLAN-{task}.md` **OR** multiple `./reports/plans/PLAN-{task}-phase1.md`, `PLAN-{task}-phase2.md`, β¦ (see **Complexity & plan splitting** below) |
|
|
47
|
+
|
|
48
|
+
**Plans are source of truth for implementation.** All files in `./reports/` β English only.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## π COMPLEXITY & PLAN SPLITTING (MANDATORY FOR PLANNER)
|
|
53
|
+
|
|
54
|
+
When the logical plan would have **> 3 phases** or **estimated effort > 3 days**, the planner **MUST** produce **multiple plan files** (one per executable phase or per milestone group), **not** one monolithic file.
|
|
55
|
+
|
|
56
|
+
| Condition | Planner output |
|
|
57
|
+
| -------------------------- | ---------------------------------------------------------------- |
|
|
58
|
+
| β€ 3 phases, β€ 3 days | **One** `PLAN-{task}.md` |
|
|
59
|
+
| > 3 phases **or** > 3 days | **Multiple** `PLAN-{task}-phase1.md`, `PLAN-{task}-phase2.md`, β¦ |
|
|
60
|
+
|
|
61
|
+
**Multi-plan rules:**
|
|
62
|
+
|
|
63
|
+
- Naming: `PLAN-{task}-phase1.md`, `PLAN-{task}-phase2.md`, β¦
|
|
64
|
+
- Order: Execute in numeric order; phase N starts only after phase Nβ1 is complete.
|
|
65
|
+
- Each file: scope **only** that phase; Prerequisites state "Phase Nβ1 complete" (or prior deliverables); clear handoff to next file.
|
|
66
|
+
- Index (optional): planner may add `PLAN-{task}-INDEX.md` listing phases and file names for navigation.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## β INCREMENTAL EXECUTION (MANDATORY)
|
|
71
|
+
|
|
72
|
+
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.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## π Phase 1: RESEARCH
|
|
77
|
+
|
|
78
|
+
| Agent | `researcher` |
|
|
79
|
+
| ------ | --------------------------------------------- |
|
|
80
|
+
| Goal | Research best practices and patterns |
|
|
81
|
+
| Output | `./reports/researchers/RESEARCH-{task}.md` |
|
|
82
|
+
| Exit | Best practices identified, sources documented |
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## π Phase 2: CODEBASE ANALYSIS
|
|
87
|
+
|
|
88
|
+
| Agent | `scouter` |
|
|
89
|
+
| ------ | -------------------------------------------- |
|
|
90
|
+
| Goal | Full architecture mapping |
|
|
91
|
+
| Output | `./reports/scouts/SCOUT-{task}.md` |
|
|
92
|
+
| Exit | Architecture understood, dependencies mapped |
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## π Phase 3: DESIGN (IF UI NEEDED)
|
|
97
|
+
|
|
98
|
+
| Agent | `designer` |
|
|
99
|
+
| ------- | ------------------------------------------------- |
|
|
100
|
+
| Trigger | Task involves UI/UX |
|
|
101
|
+
| Goal | Design approach input |
|
|
102
|
+
| Exit | Design approach defined, accessibility considered |
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## π Phase 4: PLAN CREATION
|
|
107
|
+
|
|
108
|
+
| Agent | `planner` |
|
|
109
|
+
| ------------ | --------------------------------------------------------------------------------------------------------------------------- |
|
|
110
|
+
| Prerequisite | **READ** RESEARCH + SCOUT files (and DESIGN if Phase 3 ran) |
|
|
111
|
+
| Goal | Create detailed implementation plan as **one file** or **multiple phase files** (see **Complexity & plan splitting** above) |
|
|
112
|
+
| Output | One `./reports/plans/PLAN-{task}.md` **or** multiple `./reports/plans/PLAN-{task}-phase1.md`, `PLAN-{task}-phase2.md`, β¦ |
|
|
113
|
+
|
|
114
|
+
**Directive to planner:** If the task decomposes into **> 3 phases** or **> 3 days** effort, produce **multiple plan files** (one per phase/milestone), each executable in sequence. Otherwise produce a single `PLAN-{task}.md`.
|
|
115
|
+
|
|
116
|
+
**CONSTRAINT INHERITANCE:**
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
Plan(s) MUST reference prior phases:
|
|
120
|
+
- "Based on research finding R1..."
|
|
121
|
+
- "Following pattern from Scout..."
|
|
122
|
+
- "Per design decision D1..."
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
| Exit | One plan file **or** multiple phase plan files created; each has scope, prerequisites, tasks, exit criteria, risks, rollback; order and handoffs clear |
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## π‘οΈ STRICT CONTEXT GATE β Automatic Context Optimization
|
|
130
|
+
|
|
131
|
+
> **β‘ FOCUS MODE**: This checkpoint executes automatically. NO user input required.
|
|
132
|
+
>
|
|
133
|
+
> **PURPOSE**: Prevent "context rot" by forcibly clearing noisy research/planning history.
|
|
134
|
+
> This acts as a mandatory "firewall" before handoff to implementation workflows.
|
|
135
|
+
|
|
136
|
+
### π AUTOMATIC EXECUTION (NO PROMPT)
|
|
137
|
+
|
|
138
|
+
```yaml
|
|
139
|
+
strict_context_gate:
|
|
140
|
+
mode: "AUTOMATIC - No user interaction"
|
|
141
|
+
behavior: "Force Clear context & Ready"
|
|
142
|
+
|
|
143
|
+
execution:
|
|
144
|
+
1. ANNOUNCE: |
|
|
145
|
+
## π‘οΈ Strict Context Gate β Automatic
|
|
146
|
+
|
|
147
|
+
β
**Plan Complete**: Plan file(s) created.
|
|
148
|
+
π **Focus Mode**: Automatically clearing context for implementation handoff.
|
|
149
|
+
|
|
150
|
+
β‘ Executing: **Clear context & Ready**...
|
|
151
|
+
|
|
152
|
+
2. CONTEXT_DIRECTIVE: |
|
|
153
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
154
|
+
β β MANDATORY CONTEXT RESET β FOCUS MODE β
|
|
155
|
+
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
|
|
156
|
+
β IGNORE: All previous research discussions, exploration paths, β
|
|
157
|
+
β rejected alternatives, and intermediate reasoning. β
|
|
158
|
+
β β
|
|
159
|
+
β SOLE SOURCE OF TRUTH: Plan file(s) in ./reports/plans/ β
|
|
160
|
+
β β
|
|
161
|
+
β HANDOFF: Plan is ready for `/code:focus` implementation. β
|
|
162
|
+
β Implementation should treat Plan as fresh context. β
|
|
163
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
164
|
+
|
|
165
|
+
3. OUTPUT: Plan summary for user
|
|
166
|
+
|
|
167
|
+
4. PROCEED: To COMPLETION
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### π Post-Gate Status
|
|
171
|
+
|
|
172
|
+
```markdown
|
|
173
|
+
π **Context Gate Passed**
|
|
174
|
+
|
|
175
|
+
- Previous context: DISCARDED
|
|
176
|
+
- Active context: Plan file(s) only
|
|
177
|
+
- Mode: Clean handoff ready
|
|
178
|
+
|
|
179
|
+
Plan ready for implementation...
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## COMPLETION
|
|
185
|
+
|
|
186
|
+
Present plan with:
|
|
187
|
+
|
|
188
|
+
1. β
**Plan Ready** β `./reports/plans/PLAN-{task}.md` (single) **or** `PLAN-{task}-phase1.md`, `PLAN-{task}-phase2.md`, β¦ (multi-phase, execute in order)
|
|
189
|
+
2. π **Context Optimized** β Ready for focus implementation
|
|
190
|
+
3. π³ **Implement** β `/code:focus` (run phase-by-phase when multiple plan files exist)
|
package/commands/plan/hard.md
CHANGED
|
@@ -123,6 +123,62 @@ Plan(s) MUST reference prior phases:
|
|
|
123
123
|
|
|
124
124
|
---
|
|
125
125
|
|
|
126
|
+
## π‘οΈ VERIFICATION CHECKPOINT β Context Optimization
|
|
127
|
+
|
|
128
|
+
> **PURPOSE**: Prevent "context rot" by clearing noisy research/planning history before implementation.
|
|
129
|
+
>
|
|
130
|
+
> Long-running planning sessions fill context with noise that degrades implementation quality.
|
|
131
|
+
> This checkpoint acts as a "firewall" before handing off to implementation workflows.
|
|
132
|
+
|
|
133
|
+
### β‘ OPTIONS (Present to User)
|
|
134
|
+
|
|
135
|
+
```markdown
|
|
136
|
+
## π‘οΈ Context Optimization Checkpoint
|
|
137
|
+
|
|
138
|
+
**Planning Complete** β Plan file(s) created.
|
|
139
|
+
|
|
140
|
+
**Choose how to proceed:**
|
|
141
|
+
|
|
142
|
+
| Option | Action | Description |
|
|
143
|
+
|--------|--------|-------------|
|
|
144
|
+
| **1. π Clear context & Ready** | `RECOMMENDED` | Fresh start for implementation: Reload Plan, ignore planning history |
|
|
145
|
+
| **2. βΈοΈ Review First** | `SAFE` | Clear context, show plan summary, wait for approval |
|
|
146
|
+
| **3. β οΈ Continue (No Clear)** | `RISKY` | Keep full history (may affect `/cook:hard` quality) |
|
|
147
|
+
|
|
148
|
+
β³ Awaiting selection...
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### π EXECUTION BEHAVIOR
|
|
152
|
+
|
|
153
|
+
```yaml
|
|
154
|
+
option_1_clear_ready:
|
|
155
|
+
behavior: "RECOMMENDED - Prepare clean handoff"
|
|
156
|
+
steps:
|
|
157
|
+
1. ACKNOWLEDGE: "π Context optimized. Plan ready for implementation."
|
|
158
|
+
2. CONTEXT_DIRECTIVE: |
|
|
159
|
+
β IGNORE all previous research/planning reasoning chains.
|
|
160
|
+
β
PLAN FILE is SOLE SOURCE OF TRUTH for implementation.
|
|
161
|
+
3. OUTPUT: "Run `/code:focus` to implement with clean context."
|
|
162
|
+
|
|
163
|
+
option_2_review_first:
|
|
164
|
+
behavior: "Clear and show summary"
|
|
165
|
+
steps:
|
|
166
|
+
1. ACKNOWLEDGE: "βΈοΈ Context cleared."
|
|
167
|
+
2. CONTEXT_DIRECTIVE: |
|
|
168
|
+
β IGNORE all previous research/planning reasoning chains.
|
|
169
|
+
β
PLAN FILE is SOLE SOURCE OF TRUTH.
|
|
170
|
+
3. OUTPUT: Display plan summary for user review
|
|
171
|
+
4. WAIT: For user approval before proceeding
|
|
172
|
+
|
|
173
|
+
option_3_continue_no_clear:
|
|
174
|
+
behavior: "Proceed with caution - context rot risk"
|
|
175
|
+
steps:
|
|
176
|
+
1. WARN: "β οΈ Continuing with full history. May affect implementation quality."
|
|
177
|
+
2. PROCEED: Complete workflow with existing context
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
126
182
|
## COMPLETION
|
|
127
183
|
|
|
128
184
|
Present plan with:
|
package/commands/plan.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 (e.g. plan/hard.md), and execute it.
|
|
24
25
|
|
|
@@ -33,6 +34,9 @@ IF task is clear (known approach, codebase-only):
|
|
|
33
34
|
IF task is complex (research needed, architectural):
|
|
34
35
|
β Route to /plan:hard
|
|
35
36
|
|
|
37
|
+
IF task is complex AND clean implementation handoff is critical:
|
|
38
|
+
β Route to /plan:focus
|
|
39
|
+
|
|
36
40
|
IF unsure:
|
|
37
41
|
β Default to /plan:fast
|
|
38
42
|
```
|
|
@@ -41,10 +45,11 @@ IF unsure:
|
|
|
41
45
|
|
|
42
46
|
## AVAILABLE ROUTES
|
|
43
47
|
|
|
44
|
-
| Route
|
|
45
|
-
|
|
|
46
|
-
| `/plan:fast`
|
|
47
|
-
| `/plan:hard`
|
|
48
|
+
| Route | When to Use |
|
|
49
|
+
| ------------- | ---------------------------------------------------- |
|
|
50
|
+
| `/plan:fast` | Quick planning without research |
|
|
51
|
+
| `/plan:hard` | Full planning with research |
|
|
52
|
+
| `/plan:focus` | Full planning with **enforced context optimization** |
|
|
48
53
|
|
|
49
54
|
---
|
|
50
55
|
|
|
@@ -59,6 +64,7 @@ IF unsure:
|
|
|
59
64
|
|
|
60
65
|
1. β‘ **Fast** β `/plan:fast` β Quick plan
|
|
61
66
|
2. β‘β‘β‘ **Hard** β `/plan:hard` β Full research-backed plan
|
|
67
|
+
3. π― **Focus** β `/plan:focus` β Full plan with **automatic context clearing** (clean implementation handoff)
|
|
62
68
|
|
|
63
69
|
β³ Awaiting selection...
|
|
64
70
|
```
|