ctx-cc 3.5.0 → 4.1.0
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 +375 -676
- package/agents/ctx-arch-mapper.md +5 -3
- package/agents/ctx-auditor.md +5 -3
- package/agents/ctx-codex-reviewer.md +214 -0
- package/agents/ctx-concerns-mapper.md +5 -3
- package/agents/ctx-criteria-suggester.md +6 -4
- package/agents/ctx-debugger.md +5 -3
- package/agents/ctx-designer.md +488 -114
- package/agents/ctx-discusser.md +5 -3
- package/agents/ctx-executor.md +5 -3
- package/agents/ctx-handoff.md +6 -4
- package/agents/ctx-learner.md +5 -3
- package/agents/ctx-mapper.md +4 -3
- package/agents/ctx-ml-analyst.md +600 -0
- package/agents/ctx-ml-engineer.md +933 -0
- package/agents/ctx-ml-reviewer.md +485 -0
- package/agents/ctx-ml-scientist.md +626 -0
- package/agents/ctx-parallelizer.md +4 -3
- package/agents/ctx-planner.md +5 -3
- package/agents/ctx-predictor.md +4 -3
- package/agents/ctx-qa.md +5 -3
- package/agents/ctx-quality-mapper.md +5 -3
- package/agents/ctx-researcher.md +5 -3
- package/agents/ctx-reviewer.md +6 -4
- package/agents/ctx-team-coordinator.md +5 -3
- package/agents/ctx-tech-mapper.md +5 -3
- package/agents/ctx-verifier.md +5 -3
- package/bin/ctx.js +199 -27
- package/commands/brand.md +309 -0
- package/commands/ctx.md +10 -10
- package/commands/design.md +304 -0
- package/commands/experiment.md +251 -0
- package/commands/help.md +57 -7
- package/commands/init.md +25 -0
- package/commands/metrics.md +1 -1
- package/commands/milestone.md +1 -1
- package/commands/ml-status.md +197 -0
- package/commands/monitor.md +1 -1
- package/commands/train.md +266 -0
- package/commands/visual-qa.md +559 -0
- package/commands/voice.md +1 -1
- package/hooks/post-tool-use.js +39 -0
- package/hooks/pre-tool-use.js +94 -0
- package/hooks/subagent-stop.js +32 -0
- package/package.json +9 -3
- package/plugin.json +46 -0
- package/skills/ctx-design-system/SKILL.md +572 -0
- package/skills/ctx-ml-experiment/SKILL.md +334 -0
- package/skills/ctx-ml-pipeline/SKILL.md +437 -0
- package/skills/ctx-orchestrator/SKILL.md +91 -0
- package/skills/ctx-review-gate/SKILL.md +147 -0
- package/skills/ctx-state/SKILL.md +100 -0
- package/skills/ctx-visual-qa/SKILL.md +587 -0
- package/src/agents.js +109 -0
- package/src/auto.js +287 -0
- package/src/capabilities.js +226 -0
- package/src/commits.js +94 -0
- package/src/config.js +112 -0
- package/src/context.js +241 -0
- package/src/handoff.js +156 -0
- package/src/hooks.js +218 -0
- package/src/install.js +125 -50
- package/src/lifecycle.js +194 -0
- package/src/metrics.js +198 -0
- package/src/pipeline.js +269 -0
- package/src/review-gate.js +338 -0
- package/src/runner.js +120 -0
- package/src/skills.js +143 -0
- package/src/state.js +267 -0
- package/src/worktree.js +244 -0
- package/templates/PRD.json +1 -1
- package/templates/config.json +4 -237
- package/workflows/ctx-router.md +0 -485
- package/workflows/map-codebase.md +0 -329
package/workflows/ctx-router.md
DELETED
|
@@ -1,485 +0,0 @@
|
|
|
1
|
-
<purpose>
|
|
2
|
-
Smart router for CTX - understands natural language, detects intent, and routes to the right workflow.
|
|
3
|
-
|
|
4
|
-
Users don't need to memorize commands. They describe what they want, CTX routes automatically.
|
|
5
|
-
</purpose>
|
|
6
|
-
|
|
7
|
-
<ui_reference>
|
|
8
|
-
@~/.claude/ctx/references/ui-brand.md
|
|
9
|
-
</ui_reference>
|
|
10
|
-
|
|
11
|
-
<intent_detection>
|
|
12
|
-
Parse the user's message to detect intent. Check patterns in order:
|
|
13
|
-
|
|
14
|
-
| Pattern | Intent | Action |
|
|
15
|
-
|---------|--------|--------|
|
|
16
|
-
| "build", "create", "make", "start new", "I want to..." + "app/project/feature" | new-project | Route to init flow |
|
|
17
|
-
| "fix", "bug", "broken", "not working", "error", "crash", "fails" | debug | Route to debug flow |
|
|
18
|
-
| "test", "QA", "check", "accessible", "works?", "validate" | qa | Route to QA flow |
|
|
19
|
-
| "study", "analyze", "understand", "learn", "explore", "what is this", "deeply study" | analyze | Route to map-codebase flow |
|
|
20
|
-
| "improve", "optimize", "better", "enhance", "upgrade", "refactor" | improve | Analyze + suggest improvements |
|
|
21
|
-
| "review", "audit", "security", "ready", "before deploy" | review | Verify flow |
|
|
22
|
-
| "deploy", "ship", "publish", "release", "push", "launch" | ship | Ship flow |
|
|
23
|
-
| "status", "progress", "where", "what's next", "current" | status | Status report |
|
|
24
|
-
| "help", "how", "what can", "commands", "guide" | help | Show help |
|
|
25
|
-
| "continue", "next", "go", "do it" | continue | Read STATE.md and continue |
|
|
26
|
-
|
|
27
|
-
Store detected intent for routing.
|
|
28
|
-
</intent_detection>
|
|
29
|
-
|
|
30
|
-
<process>
|
|
31
|
-
|
|
32
|
-
<step name="verify_ctx_structure" priority="first">
|
|
33
|
-
**MANDATORY FIRST STEP - Execute before anything else:**
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
test -d .ctx && echo "exists" || echo "missing"
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Store result:
|
|
40
|
-
- If "exists": CTX is initialized, load state
|
|
41
|
-
- If "missing": CTX not initialized, may need setup
|
|
42
|
-
</step>
|
|
43
|
-
|
|
44
|
-
<step name="detect_intent">
|
|
45
|
-
Parse user message and detect intent using patterns above.
|
|
46
|
-
|
|
47
|
-
Output detected intent for routing decision.
|
|
48
|
-
</step>
|
|
49
|
-
|
|
50
|
-
<step name="route_no_ctx">
|
|
51
|
-
**If NO .ctx/ folder (new user):**
|
|
52
|
-
|
|
53
|
-
Route by detected intent:
|
|
54
|
-
|
|
55
|
-
### Intent: new-project
|
|
56
|
-
|
|
57
|
-
Output:
|
|
58
|
-
```
|
|
59
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
60
|
-
CTX ► WELCOME
|
|
61
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
62
|
-
|
|
63
|
-
I understood: "{{user_request}}"
|
|
64
|
-
|
|
65
|
-
You want to build something new. Let's set it up!
|
|
66
|
-
|
|
67
|
-
───────────────────────────────────────────────────────
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Execute /ctx:init inline (don't tell user to run it separately).
|
|
71
|
-
|
|
72
|
-
### Intent: analyze (study/explore)
|
|
73
|
-
|
|
74
|
-
Output:
|
|
75
|
-
```
|
|
76
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
77
|
-
CTX ► DEEP STUDY
|
|
78
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
79
|
-
|
|
80
|
-
I understood: "{{user_request}}"
|
|
81
|
-
|
|
82
|
-
Before I analyze, let me understand the scope.
|
|
83
|
-
|
|
84
|
-
───────────────────────────────────────────────────────
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
**Step 0: Gather context with AskUserQuestion**
|
|
88
|
-
|
|
89
|
-
Use the AskUserQuestion tool to ask:
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
AskUserQuestion({
|
|
93
|
-
questions: [
|
|
94
|
-
{
|
|
95
|
-
question: "What type of analysis do you need?",
|
|
96
|
-
header: "Scope",
|
|
97
|
-
options: [
|
|
98
|
-
{ label: "Code only", description: "Analyze codebase structure, patterns, and quality" },
|
|
99
|
-
{ label: "Code + Running app", description: "Also browse the running application in browser" },
|
|
100
|
-
{ label: "Full system", description: "Code + App + API testing + Database inspection" }
|
|
101
|
-
],
|
|
102
|
-
multiSelect: false
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
question: "Is the application running locally?",
|
|
106
|
-
header: "Environment",
|
|
107
|
-
options: [
|
|
108
|
-
{ label: "Yes, running", description: "App is running at localhost or local URL" },
|
|
109
|
-
{ label: "Not yet", description: "I'll start it or you can help me start it" },
|
|
110
|
-
{ label: "Remote/Staging", description: "App is deployed to a remote environment" }
|
|
111
|
-
],
|
|
112
|
-
multiSelect: false
|
|
113
|
-
}
|
|
114
|
-
]
|
|
115
|
-
})
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
**If user selects "Code + Running app" or "Full system":**
|
|
119
|
-
|
|
120
|
-
Ask for credentials:
|
|
121
|
-
```
|
|
122
|
-
AskUserQuestion({
|
|
123
|
-
questions: [
|
|
124
|
-
{
|
|
125
|
-
question: "Do you have login credentials for the app?",
|
|
126
|
-
header: "Access",
|
|
127
|
-
options: [
|
|
128
|
-
{ label: "Yes, I'll provide them", description: "I have username/password or API keys" },
|
|
129
|
-
{ label: "No auth needed", description: "The app doesn't require login" },
|
|
130
|
-
{ label: "OAuth/SSO only", description: "Login requires external provider" }
|
|
131
|
-
],
|
|
132
|
-
multiSelect: false
|
|
133
|
-
}
|
|
134
|
-
]
|
|
135
|
-
})
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
**If user will provide credentials:**
|
|
139
|
-
|
|
140
|
-
Output:
|
|
141
|
-
```
|
|
142
|
-
╔═══════════════════════════════════════════════════════╗
|
|
143
|
-
║ LOGIN CREDENTIALS ║
|
|
144
|
-
╚═══════════════════════════════════════════════════════╝
|
|
145
|
-
|
|
146
|
-
I'll detect the app URL from your config files.
|
|
147
|
-
Please provide login credentials for browser testing:
|
|
148
|
-
|
|
149
|
-
• Username/Email: _______________
|
|
150
|
-
• Password: _______________
|
|
151
|
-
|
|
152
|
-
───────────────────────────────────────────────────────
|
|
153
|
-
→ Paste credentials or type "skip" to analyze code only
|
|
154
|
-
───────────────────────────────────────────────────────
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
Store credentials in memory for browser testing (never write to files).
|
|
158
|
-
|
|
159
|
-
**Detect app URL from codebase:**
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
# Check common locations for app URL
|
|
163
|
-
grep -r "localhost\|127.0.0.1" .env* package.json 2>/dev/null | head -5
|
|
164
|
-
grep -r "PORT\|port" .env* package.json 2>/dev/null | head -5
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
Extract URL like `http://localhost:3000` from config.
|
|
168
|
-
|
|
169
|
-
**Step 1: Show analysis plan**
|
|
170
|
-
|
|
171
|
-
Output:
|
|
172
|
-
```
|
|
173
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
174
|
-
CTX ► ANALYZING CODEBASE
|
|
175
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
176
|
-
|
|
177
|
-
Analysis scope: {{selected_scope}}
|
|
178
|
-
Environment: {{selected_environment}}
|
|
179
|
-
Access: {{access_level}}
|
|
180
|
-
|
|
181
|
-
Starting analysis with 4 specialized mappers...
|
|
182
|
-
|
|
183
|
-
───────────────────────────────────────────────────────
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
**Step 2: Create structure**
|
|
187
|
-
|
|
188
|
-
```bash
|
|
189
|
-
mkdir -p .ctx/codebase
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
**Step 2: Show spawning indicator**
|
|
193
|
-
|
|
194
|
-
Output:
|
|
195
|
-
```
|
|
196
|
-
◆ Spawning 4 mappers in parallel...
|
|
197
|
-
→ ctx-tech-mapper
|
|
198
|
-
→ ctx-arch-mapper
|
|
199
|
-
→ ctx-quality-mapper
|
|
200
|
-
→ ctx-concerns-mapper
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
**Step 3: Spawn 4 mapper agents in parallel**
|
|
204
|
-
|
|
205
|
-
Read model profile (default to "balanced"):
|
|
206
|
-
```bash
|
|
207
|
-
MODEL_PROFILE="haiku"
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
Spawn all 4 agents with a SINGLE message containing multiple Task calls:
|
|
211
|
-
|
|
212
|
-
```
|
|
213
|
-
Task(prompt="Analyze this codebase for technology stack. Write comprehensive analysis to: .ctx/codebase/TECH.md. Include languages, frameworks, dependencies, versions, build tools. Return confirmation with line count when complete.", subagent_type="ctx-tech-mapper", model="haiku", run_in_background=true, description="Map tech stack")
|
|
214
|
-
|
|
215
|
-
Task(prompt="Analyze this codebase architecture. Write comprehensive analysis to: .ctx/codebase/ARCH.md. Include architectural pattern, layer structure, module boundaries, entry points, data flow. Return confirmation with line count when complete.", subagent_type="ctx-arch-mapper", model="haiku", run_in_background=true, description="Map architecture")
|
|
216
|
-
|
|
217
|
-
Task(prompt="Analyze this codebase for quality patterns. Write comprehensive analysis to: .ctx/codebase/QUALITY.md. Include test coverage, linting, type safety, documentation, code smells. Return confirmation with line count when complete.", subagent_type="ctx-quality-mapper", model="haiku", run_in_background=true, description="Map quality")
|
|
218
|
-
|
|
219
|
-
Task(prompt="Analyze this codebase for concerns and risks. Write comprehensive analysis to: .ctx/codebase/CONCERNS.md. Include security issues, technical debt, performance problems, operational risks. Return confirmation with line count when complete.", subagent_type="ctx-concerns-mapper", model="haiku", run_in_background=true, description="Map concerns")
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
**Step 4: Wait for completion and show progress**
|
|
223
|
-
|
|
224
|
-
Use TaskOutput to wait for each agent. As each completes, output:
|
|
225
|
-
|
|
226
|
-
```
|
|
227
|
-
✓ ctx-tech-mapper complete: TECH.md ({{N}} lines)
|
|
228
|
-
✓ ctx-arch-mapper complete: ARCH.md ({{N}} lines)
|
|
229
|
-
✓ ctx-quality-mapper complete: QUALITY.md ({{N}} lines)
|
|
230
|
-
✓ ctx-concerns-mapper complete: CONCERNS.md ({{N}} lines)
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
**Step 5: Verify output**
|
|
234
|
-
|
|
235
|
-
```bash
|
|
236
|
-
ls -la .ctx/codebase/
|
|
237
|
-
wc -l .ctx/codebase/*.md
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
**Step 6: Create summary**
|
|
241
|
-
|
|
242
|
-
Read all 4 documents:
|
|
243
|
-
```bash
|
|
244
|
-
cat .ctx/codebase/TECH.md
|
|
245
|
-
cat .ctx/codebase/ARCH.md
|
|
246
|
-
cat .ctx/codebase/QUALITY.md
|
|
247
|
-
cat .ctx/codebase/CONCERNS.md
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
Write `.ctx/codebase/SUMMARY.md` with key findings from each document.
|
|
251
|
-
|
|
252
|
-
**Step 7: Browser testing (if scope includes running app)**
|
|
253
|
-
|
|
254
|
-
If user selected "Code + Running app" or "Full system":
|
|
255
|
-
|
|
256
|
-
Output:
|
|
257
|
-
```
|
|
258
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
259
|
-
CTX ► BROWSER TESTING
|
|
260
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
261
|
-
|
|
262
|
-
Now testing the running application...
|
|
263
|
-
|
|
264
|
-
───────────────────────────────────────────────────────
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
Use Playwright MCP tools to:
|
|
268
|
-
|
|
269
|
-
1. Navigate to app URL:
|
|
270
|
-
```
|
|
271
|
-
mcp__playwright__browser_navigate({ url: "{{app_url}}" })
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
2. Take snapshot of initial state:
|
|
275
|
-
```
|
|
276
|
-
mcp__playwright__browser_snapshot({})
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
3. If credentials provided, log in:
|
|
280
|
-
```
|
|
281
|
-
mcp__playwright__browser_type({ element: "email/username field", ref: "{{ref}}", text: "{{username}}" })
|
|
282
|
-
mcp__playwright__browser_type({ element: "password field", ref: "{{ref}}", text: "{{password}}" })
|
|
283
|
-
mcp__playwright__browser_click({ element: "login button", ref: "{{ref}}" })
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
4. Take snapshot after login:
|
|
287
|
-
```
|
|
288
|
-
mcp__playwright__browser_snapshot({})
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
5. Explore key pages based on codebase analysis:
|
|
292
|
-
- Navigate to pages identified in ARCH.md
|
|
293
|
-
- Take screenshots of main flows
|
|
294
|
-
- Check for console errors
|
|
295
|
-
|
|
296
|
-
6. Write browser findings to `.ctx/codebase/BROWSER.md`:
|
|
297
|
-
- Pages tested
|
|
298
|
-
- UI issues found
|
|
299
|
-
- Console errors
|
|
300
|
-
- Accessibility observations
|
|
301
|
-
- Screenshots taken
|
|
302
|
-
|
|
303
|
-
Output progress:
|
|
304
|
-
```
|
|
305
|
-
◆ Testing application...
|
|
306
|
-
→ Navigating to {{app_url}}
|
|
307
|
-
→ Logging in as {{username}}
|
|
308
|
-
→ Exploring dashboard
|
|
309
|
-
→ Checking user flows
|
|
310
|
-
|
|
311
|
-
✓ Browser testing complete: BROWSER.md ({{N}} lines)
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
**Step 8: Show completion banner**
|
|
315
|
-
|
|
316
|
-
Output:
|
|
317
|
-
```
|
|
318
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
319
|
-
CTX ► MAPPING COMPLETE ✓
|
|
320
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
321
|
-
|
|
322
|
-
┌─────────────────────────────────────────────────────┐
|
|
323
|
-
│ CODEBASE SUMMARY │
|
|
324
|
-
├─────────────────────────────────────────────────────┤
|
|
325
|
-
│ Tech: {{primary_language}}, {{framework}} │
|
|
326
|
-
│ Architecture: {{pattern}} │
|
|
327
|
-
│ Quality: {{coverage}}% coverage, {{warnings}} │
|
|
328
|
-
│ Concerns: {{concern_count}} identified │
|
|
329
|
-
└─────────────────────────────────────────────────────┘
|
|
330
|
-
|
|
331
|
-
Files created:
|
|
332
|
-
.ctx/codebase/TECH.md
|
|
333
|
-
.ctx/codebase/ARCH.md
|
|
334
|
-
.ctx/codebase/QUALITY.md
|
|
335
|
-
.ctx/codebase/CONCERNS.md
|
|
336
|
-
.ctx/codebase/SUMMARY.md
|
|
337
|
-
|
|
338
|
-
───────────────────────────────────────────────────────
|
|
339
|
-
|
|
340
|
-
## ▶ Next Up
|
|
341
|
-
|
|
342
|
-
**Initialize project** — set up CTX workflow with this context
|
|
343
|
-
|
|
344
|
-
`/ctx:init`
|
|
345
|
-
|
|
346
|
-
<sub>`/clear` first → fresh context window</sub>
|
|
347
|
-
|
|
348
|
-
───────────────────────────────────────────────────────
|
|
349
|
-
|
|
350
|
-
**Also available:**
|
|
351
|
-
- `cat .ctx/codebase/SUMMARY.md` — view full summary
|
|
352
|
-
- `/ctx:map-codebase --refresh` — re-analyze codebase
|
|
353
|
-
|
|
354
|
-
───────────────────────────────────────────────────────
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
### Intent: debug
|
|
358
|
-
|
|
359
|
-
Output:
|
|
360
|
-
```
|
|
361
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
362
|
-
CTX ► DEBUG MODE
|
|
363
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
364
|
-
|
|
365
|
-
I understood: "{{problem_description}}"
|
|
366
|
-
|
|
367
|
-
Let me analyze the codebase first, then investigate.
|
|
368
|
-
|
|
369
|
-
───────────────────────────────────────────────────────
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
First map codebase (same as analyze), then spawn debugger agent.
|
|
373
|
-
|
|
374
|
-
### Intent: help or unknown
|
|
375
|
-
|
|
376
|
-
Output:
|
|
377
|
-
```
|
|
378
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
379
|
-
CTX ► WELCOME
|
|
380
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
381
|
-
|
|
382
|
-
What would you like to do?
|
|
383
|
-
|
|
384
|
-
┌─────────────────────────────────────────────────────┐
|
|
385
|
-
│ AVAILABLE ACTIONS │
|
|
386
|
-
├─────────────────────────────────────────────────────┤
|
|
387
|
-
│ "Build something new" → Set up your project │
|
|
388
|
-
│ "Fix a bug" → Debug the issue │
|
|
389
|
-
│ "Study the codebase" → Analyze everything │
|
|
390
|
-
│ "Test the app" → Run full QA │
|
|
391
|
-
└─────────────────────────────────────────────────────┘
|
|
392
|
-
|
|
393
|
-
Just describe what you want in natural language!
|
|
394
|
-
|
|
395
|
-
───────────────────────────────────────────────────────
|
|
396
|
-
```
|
|
397
|
-
</step>
|
|
398
|
-
|
|
399
|
-
<step name="route_with_ctx">
|
|
400
|
-
**If .ctx/ folder EXISTS:**
|
|
401
|
-
|
|
402
|
-
### Load state first
|
|
403
|
-
|
|
404
|
-
```bash
|
|
405
|
-
cat .ctx/STATE.md
|
|
406
|
-
cat .ctx/config.json 2>/dev/null || echo "{}"
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
Extract:
|
|
410
|
-
- `status`: Current workflow status
|
|
411
|
-
- `currentPhase`: Active phase
|
|
412
|
-
- `profile`: Model profile (quality/balanced/budget)
|
|
413
|
-
|
|
414
|
-
### Route by Intent + State
|
|
415
|
-
|
|
416
|
-
| Intent | Action |
|
|
417
|
-
|--------|--------|
|
|
418
|
-
| new-project | Warn project exists, offer to add phase |
|
|
419
|
-
| analyze | Run map-codebase (refresh) |
|
|
420
|
-
| debug | Spawn debugger with context |
|
|
421
|
-
| qa | Spawn QA agent |
|
|
422
|
-
| status | Show status from STATE.md |
|
|
423
|
-
| continue | Resume from STATE.md status |
|
|
424
|
-
|
|
425
|
-
### Status Report Format
|
|
426
|
-
|
|
427
|
-
Output:
|
|
428
|
-
```
|
|
429
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
430
|
-
CTX ► STATUS
|
|
431
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
432
|
-
|
|
433
|
-
Project: {{name}}
|
|
434
|
-
Status: {{status}}
|
|
435
|
-
Profile: {{profile}}
|
|
436
|
-
|
|
437
|
-
Progress: ████████░░ {{percent}}%
|
|
438
|
-
|
|
439
|
-
| Phase | Status | Tasks |
|
|
440
|
-
|-------|--------|----------|
|
|
441
|
-
| 1 | ✓ | 5/5 |
|
|
442
|
-
| 2 | ◆ | 2/4 |
|
|
443
|
-
| 3 | ○ | 0/3 |
|
|
444
|
-
|
|
445
|
-
Current: {{current_phase}}
|
|
446
|
-
|
|
447
|
-
───────────────────────────────────────────────────────
|
|
448
|
-
|
|
449
|
-
## ▶ Next Up
|
|
450
|
-
|
|
451
|
-
**{{next_action}}**
|
|
452
|
-
|
|
453
|
-
`/ctx` or describe what you want to do
|
|
454
|
-
|
|
455
|
-
───────────────────────────────────────────────────────
|
|
456
|
-
```
|
|
457
|
-
</step>
|
|
458
|
-
|
|
459
|
-
</process>
|
|
460
|
-
|
|
461
|
-
<research_integration>
|
|
462
|
-
**When to use ArguSeek:**
|
|
463
|
-
|
|
464
|
-
For debug, improve, and review intents, research BEFORE spawning agents:
|
|
465
|
-
|
|
466
|
-
```
|
|
467
|
-
mcp__arguseek__research_iteratively({
|
|
468
|
-
query: "{{tech_stack}} {{problem_or_goal}} best practices solutions 2025"
|
|
469
|
-
})
|
|
470
|
-
```
|
|
471
|
-
|
|
472
|
-
Include research findings in agent prompts.
|
|
473
|
-
</research_integration>
|
|
474
|
-
|
|
475
|
-
<success_criteria>
|
|
476
|
-
- [ ] .ctx structure checked first
|
|
477
|
-
- [ ] Intent detected from user message
|
|
478
|
-
- [ ] Correct flow routed
|
|
479
|
-
- [ ] UI patterns used consistently (banners, boxes, progress)
|
|
480
|
-
- [ ] ArguSeek called for research-worthy intents
|
|
481
|
-
- [ ] Task() agents spawned with full context
|
|
482
|
-
- [ ] STATE.md created/updated
|
|
483
|
-
- [ ] Clear "Next Up" shown with command
|
|
484
|
-
- [ ] User knows to run /ctx to continue
|
|
485
|
-
</success_criteria>
|