ctx-cc 3.4.1 → 3.4.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/package.json +1 -1
- package/references/ui-brand.md +256 -0
- package/workflows/ctx-router.md +283 -39
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ctx-cc",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.3",
|
|
4
4
|
"description": "CTX 3.3 (Continuous Task eXecution) - AI that learns your preferences. Learning system, predictive planning, self-healing deployments (Sentry/LogRocket), voice control for hands-free development.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
<ui_patterns>
|
|
2
|
+
|
|
3
|
+
Visual patterns for user-facing CTX output. All workflows @-reference this file.
|
|
4
|
+
|
|
5
|
+
## Stage Banners
|
|
6
|
+
|
|
7
|
+
Use for major workflow transitions. 55-character width.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
11
|
+
CTX ► {STAGE NAME}
|
|
12
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**Stage names (uppercase):**
|
|
16
|
+
- `ANALYZING CODEBASE`
|
|
17
|
+
- `MAPPING COMPLETE`
|
|
18
|
+
- `INITIALIZING PROJECT`
|
|
19
|
+
- `RESEARCHING`
|
|
20
|
+
- `PLANNING PHASE {N}`
|
|
21
|
+
- `EXECUTING`
|
|
22
|
+
- `VERIFYING`
|
|
23
|
+
- `PHASE {N} COMPLETE ✓`
|
|
24
|
+
- `DEBUG MODE`
|
|
25
|
+
- `QA TESTING`
|
|
26
|
+
- `SHIP READY 🚀`
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Checkpoint Boxes
|
|
31
|
+
|
|
32
|
+
User action required. 55-character width.
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
╔═══════════════════════════════════════════════════════╗
|
|
36
|
+
║ CHECKPOINT: {Type} ║
|
|
37
|
+
╚═══════════════════════════════════════════════════════╝
|
|
38
|
+
|
|
39
|
+
{Content}
|
|
40
|
+
|
|
41
|
+
───────────────────────────────────────────────────────
|
|
42
|
+
→ {ACTION PROMPT}
|
|
43
|
+
───────────────────────────────────────────────────────
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Types:**
|
|
47
|
+
- `CHECKPOINT: Approval Required` → `→ Type "approved" or describe issues`
|
|
48
|
+
- `CHECKPOINT: Decision Required` → `→ Select an option`
|
|
49
|
+
- `CHECKPOINT: Action Required` → `→ Type "done" when complete`
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Status Symbols
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
✓ Complete / Passed / Verified
|
|
57
|
+
✗ Failed / Missing / Blocked
|
|
58
|
+
◆ In Progress / Active
|
|
59
|
+
○ Pending / Queued
|
|
60
|
+
⚡ Auto-completed
|
|
61
|
+
⚠ Warning / Attention needed
|
|
62
|
+
🚀 Ship ready (only in banner)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Progress Bars
|
|
68
|
+
|
|
69
|
+
**Percentage-based:**
|
|
70
|
+
```
|
|
71
|
+
Progress: ████████░░ 80%
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**For agent spawning:**
|
|
75
|
+
```
|
|
76
|
+
Mapping: [████████████████████] TECH ✓ 12s
|
|
77
|
+
[████████████████████] ARCH ✓ 15s
|
|
78
|
+
[████████████████░░░░] QUALITY ◆ ...
|
|
79
|
+
[░░░░░░░░░░░░░░░░░░░░] CONCERNS ○
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Task count:**
|
|
83
|
+
```
|
|
84
|
+
Tasks: 2/4 complete
|
|
85
|
+
Phases: 1/5 complete
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Spawning Indicators
|
|
91
|
+
|
|
92
|
+
When spawning agents, show activity:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
◆ Spawning 4 mappers in parallel...
|
|
96
|
+
→ ctx-tech-mapper
|
|
97
|
+
→ ctx-arch-mapper
|
|
98
|
+
→ ctx-quality-mapper
|
|
99
|
+
→ ctx-concerns-mapper
|
|
100
|
+
|
|
101
|
+
✓ ctx-tech-mapper complete: TECH.md (156 lines)
|
|
102
|
+
✓ ctx-arch-mapper complete: ARCH.md (203 lines)
|
|
103
|
+
✓ ctx-quality-mapper complete: QUALITY.md (178 lines)
|
|
104
|
+
✓ ctx-concerns-mapper complete: CONCERNS.md (145 lines)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Summary Boxes
|
|
110
|
+
|
|
111
|
+
For displaying analysis results:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
┌─────────────────────────────────────────────────────┐
|
|
115
|
+
│ CODEBASE SUMMARY │
|
|
116
|
+
├─────────────────────────────────────────────────────┤
|
|
117
|
+
│ Tech: TypeScript, Next.js 14, Prisma │
|
|
118
|
+
│ Architecture: Modular monolith │
|
|
119
|
+
│ Quality: 67% coverage, 12 lint warnings │
|
|
120
|
+
│ Concerns: 3 security, 5 tech debt items │
|
|
121
|
+
└─────────────────────────────────────────────────────┘
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Next Up Block
|
|
127
|
+
|
|
128
|
+
Always at end of major completions.
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
───────────────────────────────────────────────────────
|
|
132
|
+
|
|
133
|
+
## ▶ Next Up
|
|
134
|
+
|
|
135
|
+
**{Action}** — {one-line description}
|
|
136
|
+
|
|
137
|
+
`{copy-paste command}`
|
|
138
|
+
|
|
139
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
140
|
+
|
|
141
|
+
───────────────────────────────────────────────────────
|
|
142
|
+
|
|
143
|
+
**Also available:**
|
|
144
|
+
- `/ctx:alternative-1` — description
|
|
145
|
+
- `/ctx:alternative-2` — description
|
|
146
|
+
|
|
147
|
+
───────────────────────────────────────────────────────
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Error Box
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
╔═══════════════════════════════════════════════════════╗
|
|
156
|
+
║ ERROR ║
|
|
157
|
+
╚═══════════════════════════════════════════════════════╝
|
|
158
|
+
|
|
159
|
+
{Error description}
|
|
160
|
+
|
|
161
|
+
**To fix:** {Resolution steps}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Warning Box
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
┌─────────────────────────────────────────────────────┐
|
|
170
|
+
│ ⚠ WARNING │
|
|
171
|
+
├─────────────────────────────────────────────────────┤
|
|
172
|
+
│ {Warning message} │
|
|
173
|
+
└─────────────────────────────────────────────────────┘
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Tables
|
|
179
|
+
|
|
180
|
+
For structured data display:
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
| Phase | Status | Tasks | Progress |
|
|
184
|
+
|-------|--------|-------|----------|
|
|
185
|
+
| 1 | ✓ | 5/5 | 100% |
|
|
186
|
+
| 2 | ◆ | 2/4 | 50% |
|
|
187
|
+
| 3 | ○ | 0/3 | 0% |
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
For concerns/issues:
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
| Severity | Count | Category |
|
|
194
|
+
|----------|-------|-----------------|
|
|
195
|
+
| Critical | 0 | — |
|
|
196
|
+
| High | 2 | Security |
|
|
197
|
+
| Medium | 5 | Tech Debt |
|
|
198
|
+
| Low | 8 | Code Quality |
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Welcome Banner
|
|
204
|
+
|
|
205
|
+
First-time users:
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
209
|
+
CTX ► WELCOME
|
|
210
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
211
|
+
|
|
212
|
+
I understood: "{user_request}"
|
|
213
|
+
|
|
214
|
+
{Brief explanation of what will happen next}
|
|
215
|
+
|
|
216
|
+
───────────────────────────────────────────────────────
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Completion Banner
|
|
222
|
+
|
|
223
|
+
End of workflow:
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
227
|
+
CTX ► {STAGE} COMPLETE ✓
|
|
228
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
229
|
+
|
|
230
|
+
{Summary of what was accomplished}
|
|
231
|
+
|
|
232
|
+
Files: {list of created/modified files}
|
|
233
|
+
|
|
234
|
+
───────────────────────────────────────────────────────
|
|
235
|
+
|
|
236
|
+
## ▶ Next Up
|
|
237
|
+
|
|
238
|
+
{Next action recommendation}
|
|
239
|
+
|
|
240
|
+
───────────────────────────────────────────────────────
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Anti-Patterns (AVOID)
|
|
246
|
+
|
|
247
|
+
- Varying box/banner widths (use 55 chars consistently)
|
|
248
|
+
- Mixing banner styles (`===`, `---`, `***`)
|
|
249
|
+
- Skipping `CTX ►` prefix in banners
|
|
250
|
+
- Random emoji (only use defined symbols above)
|
|
251
|
+
- Missing Next Up block after completions
|
|
252
|
+
- Plain text output without structure
|
|
253
|
+
- Inconsistent indentation
|
|
254
|
+
- Missing progress indicators during long operations
|
|
255
|
+
|
|
256
|
+
</ui_patterns>
|
package/workflows/ctx-router.md
CHANGED
|
@@ -4,6 +4,10 @@ Smart router for CTX - understands natural language, detects intent, and routes
|
|
|
4
4
|
Users don't need to memorize commands. They describe what they want, CTX routes automatically.
|
|
5
5
|
</purpose>
|
|
6
6
|
|
|
7
|
+
<ui_reference>
|
|
8
|
+
@~/.claude/ctx/references/ui-brand.md
|
|
9
|
+
</ui_reference>
|
|
10
|
+
|
|
7
11
|
<intent_detection>
|
|
8
12
|
Parse the user's message to detect intent. Check patterns in order:
|
|
9
13
|
|
|
@@ -50,33 +54,153 @@ Route by detected intent:
|
|
|
50
54
|
|
|
51
55
|
### Intent: new-project
|
|
52
56
|
|
|
57
|
+
Output:
|
|
53
58
|
```
|
|
54
|
-
|
|
59
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
60
|
+
CTX ► WELCOME
|
|
61
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
55
62
|
|
|
56
63
|
I understood: "{{user_request}}"
|
|
57
64
|
|
|
58
65
|
You want to build something new. Let's set it up!
|
|
66
|
+
|
|
67
|
+
───────────────────────────────────────────────────────
|
|
59
68
|
```
|
|
60
69
|
|
|
61
70
|
Execute /ctx:init inline (don't tell user to run it separately).
|
|
62
71
|
|
|
63
72
|
### Intent: analyze (study/explore)
|
|
64
73
|
|
|
74
|
+
Output:
|
|
65
75
|
```
|
|
66
|
-
|
|
76
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
77
|
+
CTX ► DEEP STUDY
|
|
78
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
67
79
|
|
|
68
80
|
I understood: "{{user_request}}"
|
|
69
81
|
|
|
70
|
-
|
|
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:
|
|
71
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:
|
|
72
148
|
|
|
73
|
-
|
|
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**
|
|
74
187
|
|
|
75
188
|
```bash
|
|
76
189
|
mkdir -p .ctx/codebase
|
|
77
190
|
```
|
|
78
191
|
|
|
79
|
-
**Step 2:
|
|
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**
|
|
80
204
|
|
|
81
205
|
Read model profile (default to "balanced"):
|
|
82
206
|
```bash
|
|
@@ -95,73 +219,180 @@ Task(prompt="Analyze this codebase for quality patterns. Write comprehensive ana
|
|
|
95
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")
|
|
96
220
|
```
|
|
97
221
|
|
|
98
|
-
**Step
|
|
222
|
+
**Step 4: Wait for completion and show progress**
|
|
99
223
|
|
|
100
|
-
Use TaskOutput to wait for
|
|
224
|
+
Use TaskOutput to wait for each agent. As each completes, output:
|
|
101
225
|
|
|
102
|
-
|
|
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**
|
|
103
234
|
|
|
104
235
|
```bash
|
|
105
236
|
ls -la .ctx/codebase/
|
|
106
237
|
wc -l .ctx/codebase/*.md
|
|
107
238
|
```
|
|
108
239
|
|
|
109
|
-
**Step
|
|
110
|
-
|
|
111
|
-
Read all 4 documents and create SUMMARY.md:
|
|
240
|
+
**Step 6: Create summary**
|
|
112
241
|
|
|
242
|
+
Read all 4 documents:
|
|
113
243
|
```bash
|
|
114
|
-
cat .ctx/codebase/TECH.md
|
|
244
|
+
cat .ctx/codebase/TECH.md
|
|
245
|
+
cat .ctx/codebase/ARCH.md
|
|
246
|
+
cat .ctx/codebase/QUALITY.md
|
|
247
|
+
cat .ctx/codebase/CONCERNS.md
|
|
115
248
|
```
|
|
116
249
|
|
|
117
250
|
Write `.ctx/codebase/SUMMARY.md` with key findings from each document.
|
|
118
251
|
|
|
119
|
-
**Step
|
|
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**
|
|
120
315
|
|
|
316
|
+
Output:
|
|
121
317
|
```
|
|
122
|
-
|
|
318
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
319
|
+
CTX ► MAPPING COMPLETE ✓
|
|
320
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
123
321
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
322
|
+
┌─────────────────────────────────────────────────────┐
|
|
323
|
+
│ CODEBASE SUMMARY │
|
|
324
|
+
├─────────────────────────────────────────────────────┤
|
|
325
|
+
│ Tech: {{primary_language}}, {{framework}} │
|
|
326
|
+
│ Architecture: {{pattern}} │
|
|
327
|
+
│ Quality: {{coverage}}% coverage, {{warnings}} │
|
|
328
|
+
│ Concerns: {{concern_count}} identified │
|
|
329
|
+
└─────────────────────────────────────────────────────┘
|
|
128
330
|
|
|
129
|
-
Files:
|
|
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
|
|
130
337
|
|
|
131
|
-
|
|
338
|
+
───────────────────────────────────────────────────────
|
|
132
339
|
|
|
133
|
-
Next Up
|
|
340
|
+
## ▶ Next Up
|
|
134
341
|
|
|
135
|
-
|
|
342
|
+
**Initialize project** — set up CTX workflow with this context
|
|
136
343
|
|
|
137
|
-
|
|
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
|
+
───────────────────────────────────────────────────────
|
|
138
355
|
```
|
|
139
356
|
|
|
140
357
|
### Intent: debug
|
|
141
358
|
|
|
359
|
+
Output:
|
|
142
360
|
```
|
|
143
|
-
|
|
361
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
362
|
+
CTX ► DEBUG MODE
|
|
363
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
144
364
|
|
|
145
365
|
I understood: "{{problem_description}}"
|
|
146
366
|
|
|
147
|
-
Let me analyze the codebase
|
|
367
|
+
Let me analyze the codebase first, then investigate.
|
|
368
|
+
|
|
369
|
+
───────────────────────────────────────────────────────
|
|
148
370
|
```
|
|
149
371
|
|
|
150
372
|
First map codebase (same as analyze), then spawn debugger agent.
|
|
151
373
|
|
|
152
374
|
### Intent: help or unknown
|
|
153
375
|
|
|
376
|
+
Output:
|
|
154
377
|
```
|
|
155
|
-
|
|
378
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
379
|
+
CTX ► WELCOME
|
|
380
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
156
381
|
|
|
157
382
|
What would you like to do?
|
|
158
383
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
"
|
|
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
|
+
└─────────────────────────────────────────────────────┘
|
|
163
392
|
|
|
164
|
-
Just describe what you want!
|
|
393
|
+
Just describe what you want in natural language!
|
|
394
|
+
|
|
395
|
+
───────────────────────────────────────────────────────
|
|
165
396
|
```
|
|
166
397
|
</step>
|
|
167
398
|
|
|
@@ -193,23 +424,35 @@ Extract:
|
|
|
193
424
|
|
|
194
425
|
### Status Report Format
|
|
195
426
|
|
|
427
|
+
Output:
|
|
196
428
|
```
|
|
197
|
-
|
|
429
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
430
|
+
CTX ► STATUS
|
|
431
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
198
432
|
|
|
199
433
|
Project: {{name}}
|
|
200
|
-
Status:
|
|
434
|
+
Status: {{status}}
|
|
201
435
|
Profile: {{profile}}
|
|
202
436
|
|
|
203
|
-
Progress:
|
|
437
|
+
Progress: ████████░░ {{percent}}%
|
|
438
|
+
|
|
439
|
+
| Phase | Status | Tasks |
|
|
440
|
+
|-------|--------|----------|
|
|
441
|
+
| 1 | ✓ | 5/5 |
|
|
442
|
+
| 2 | ◆ | 2/4 |
|
|
443
|
+
| 3 | ○ | 0/3 |
|
|
204
444
|
|
|
205
445
|
Current: {{current_phase}}
|
|
206
|
-
Next: {{next_action}}
|
|
207
446
|
|
|
208
|
-
|
|
447
|
+
───────────────────────────────────────────────────────
|
|
448
|
+
|
|
449
|
+
## ▶ Next Up
|
|
450
|
+
|
|
451
|
+
**{{next_action}}**
|
|
209
452
|
|
|
210
|
-
|
|
453
|
+
`/ctx` or describe what you want to do
|
|
211
454
|
|
|
212
|
-
|
|
455
|
+
───────────────────────────────────────────────────────
|
|
213
456
|
```
|
|
214
457
|
</step>
|
|
215
458
|
|
|
@@ -233,9 +476,10 @@ Include research findings in agent prompts.
|
|
|
233
476
|
- [ ] .ctx structure checked first
|
|
234
477
|
- [ ] Intent detected from user message
|
|
235
478
|
- [ ] Correct flow routed
|
|
479
|
+
- [ ] UI patterns used consistently (banners, boxes, progress)
|
|
236
480
|
- [ ] ArguSeek called for research-worthy intents
|
|
237
481
|
- [ ] Task() agents spawned with full context
|
|
238
482
|
- [ ] STATE.md created/updated
|
|
239
|
-
- [ ] Clear "Next Up" shown
|
|
483
|
+
- [ ] Clear "Next Up" shown with command
|
|
240
484
|
- [ ] User knows to run /ctx to continue
|
|
241
485
|
</success_criteria>
|