ctx-cc 3.4.1 → 3.4.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctx-cc",
3
- "version": "3.4.1",
3
+ "version": "3.4.2",
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>
@@ -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,24 +54,34 @@ Route by detected intent:
50
54
 
51
55
  ### Intent: new-project
52
56
 
57
+ Output:
53
58
  ```
54
- Welcome to CTX!
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
- Welcome to CTX!
76
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
77
+ CTX ► ANALYZING CODEBASE
78
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
67
79
 
68
80
  I understood: "{{user_request}}"
69
81
 
70
- Let me analyze this codebase first.
82
+ Let me analyze this codebase with 4 specialized mappers.
83
+
84
+ ───────────────────────────────────────────────────────
71
85
  ```
72
86
 
73
87
  **Step 1: Create structure**
@@ -76,7 +90,18 @@ Let me analyze this codebase first.
76
90
  mkdir -p .ctx/codebase
77
91
  ```
78
92
 
79
- **Step 2: Spawn 4 mapper agents in parallel**
93
+ **Step 2: Show spawning indicator**
94
+
95
+ Output:
96
+ ```
97
+ ◆ Spawning 4 mappers in parallel...
98
+ → ctx-tech-mapper
99
+ → ctx-arch-mapper
100
+ → ctx-quality-mapper
101
+ → ctx-concerns-mapper
102
+ ```
103
+
104
+ **Step 3: Spawn 4 mapper agents in parallel**
80
105
 
81
106
  Read model profile (default to "balanced"):
82
107
  ```bash
@@ -95,73 +120,118 @@ Task(prompt="Analyze this codebase for quality patterns. Write comprehensive ana
95
120
  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
121
  ```
97
122
 
98
- **Step 3: Wait for completion**
123
+ **Step 4: Wait for completion and show progress**
124
+
125
+ Use TaskOutput to wait for each agent. As each completes, output:
99
126
 
100
- Use TaskOutput to wait for all 4 agents to complete.
127
+ ```
128
+ ✓ ctx-tech-mapper complete: TECH.md ({{N}} lines)
129
+ ✓ ctx-arch-mapper complete: ARCH.md ({{N}} lines)
130
+ ✓ ctx-quality-mapper complete: QUALITY.md ({{N}} lines)
131
+ ✓ ctx-concerns-mapper complete: CONCERNS.md ({{N}} lines)
132
+ ```
101
133
 
102
- **Step 4: Verify output**
134
+ **Step 5: Verify output**
103
135
 
104
136
  ```bash
105
137
  ls -la .ctx/codebase/
106
138
  wc -l .ctx/codebase/*.md
107
139
  ```
108
140
 
109
- **Step 5: Create summary**
110
-
111
- Read all 4 documents and create SUMMARY.md:
141
+ **Step 6: Create summary**
112
142
 
143
+ Read all 4 documents:
113
144
  ```bash
114
- cat .ctx/codebase/TECH.md .ctx/codebase/ARCH.md .ctx/codebase/QUALITY.md .ctx/codebase/CONCERNS.md
145
+ cat .ctx/codebase/TECH.md
146
+ cat .ctx/codebase/ARCH.md
147
+ cat .ctx/codebase/QUALITY.md
148
+ cat .ctx/codebase/CONCERNS.md
115
149
  ```
116
150
 
117
151
  Write `.ctx/codebase/SUMMARY.md` with key findings from each document.
118
152
 
119
- **Step 6: Report**
153
+ **Step 7: Show completion banner**
120
154
 
155
+ Output:
121
156
  ```
122
- [CTX] Codebase Mapped
157
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
158
+ CTX ► MAPPING COMPLETE ✓
159
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
160
+
161
+ ┌─────────────────────────────────────────────────────┐
162
+ │ CODEBASE SUMMARY │
163
+ ├─────────────────────────────────────────────────────┤
164
+ │ Tech: {{primary_language}}, {{framework}} │
165
+ │ Architecture: {{pattern}} │
166
+ │ Quality: {{coverage}}% coverage, {{warnings}} │
167
+ │ Concerns: {{concern_count}} identified │
168
+ └─────────────────────────────────────────────────────┘
169
+
170
+ Files created:
171
+ .ctx/codebase/TECH.md
172
+ .ctx/codebase/ARCH.md
173
+ .ctx/codebase/QUALITY.md
174
+ .ctx/codebase/CONCERNS.md
175
+ .ctx/codebase/SUMMARY.md
176
+
177
+ ───────────────────────────────────────────────────────
178
+
179
+ ## ▶ Next Up
123
180
 
124
- Tech: {{stack}}
125
- Architecture: {{pattern}}
126
- Quality: {{assessment}}
127
- Concerns: {{count}} identified
181
+ **Initialize project** — set up CTX workflow with this context
128
182
 
129
- Files: .ctx/codebase/
183
+ `/ctx:init`
130
184
 
131
- ---
185
+ <sub>`/clear` first → fresh context window</sub>
132
186
 
133
- Next Up:
187
+ ───────────────────────────────────────────────────────
134
188
 
135
- /ctx:init - Initialize project with this context
189
+ **Also available:**
190
+ - `cat .ctx/codebase/SUMMARY.md` — view full summary
191
+ - `/ctx:map-codebase --refresh` — re-analyze codebase
136
192
 
137
- ---
193
+ ───────────────────────────────────────────────────────
138
194
  ```
139
195
 
140
196
  ### Intent: debug
141
197
 
198
+ Output:
142
199
  ```
143
- Welcome to CTX!
200
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
201
+ CTX ► DEBUG MODE
202
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
144
203
 
145
204
  I understood: "{{problem_description}}"
146
205
 
147
- Let me analyze the codebase and investigate.
206
+ Let me analyze the codebase first, then investigate.
207
+
208
+ ───────────────────────────────────────────────────────
148
209
  ```
149
210
 
150
211
  First map codebase (same as analyze), then spawn debugger agent.
151
212
 
152
213
  ### Intent: help or unknown
153
214
 
215
+ Output:
154
216
  ```
155
- Welcome to CTX!
217
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
218
+ CTX ► WELCOME
219
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
156
220
 
157
221
  What would you like to do?
158
222
 
159
- "Build something new" -> I'll set up your project
160
- "Fix a bug" -> I'll debug the issue
161
- "Study the codebase" -> I'll analyze everything
162
- "Test the app" -> I'll run full QA
223
+ ┌─────────────────────────────────────────────────────┐
224
+ AVAILABLE ACTIONS │
225
+ ├─────────────────────────────────────────────────────┤
226
+ "Build something new" Set up your project │
227
+ │ "Fix a bug" → Debug the issue │
228
+ │ "Study the codebase" → Analyze everything │
229
+ │ "Test the app" → Run full QA │
230
+ └─────────────────────────────────────────────────────┘
231
+
232
+ Just describe what you want in natural language!
163
233
 
164
- Just describe what you want!
234
+ ───────────────────────────────────────────────────────
165
235
  ```
166
236
  </step>
167
237
 
@@ -193,23 +263,35 @@ Extract:
193
263
 
194
264
  ### Status Report Format
195
265
 
266
+ Output:
196
267
  ```
197
- [CTX] Status
268
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
269
+ CTX ► STATUS
270
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
198
271
 
199
272
  Project: {{name}}
200
- Status: {{status}}
273
+ Status: {{status}}
201
274
  Profile: {{profile}}
202
275
 
203
- Progress: [{{progress_bar}}] {{completed}}/{{total}} phases
276
+ Progress: ████████░░ {{percent}}%
277
+
278
+ | Phase | Status | Tasks |
279
+ |-------|--------|----------|
280
+ | 1 | ✓ | 5/5 |
281
+ | 2 | ◆ | 2/4 |
282
+ | 3 | ○ | 0/3 |
204
283
 
205
284
  Current: {{current_phase}}
206
- Next: {{next_action}}
207
285
 
208
- ---
286
+ ───────────────────────────────────────────────────────
287
+
288
+ ## ▶ Next Up
289
+
290
+ **{{next_action}}**
209
291
 
210
- To continue: /ctx or describe what you want to do
292
+ `/ctx` or describe what you want to do
211
293
 
212
- ---
294
+ ───────────────────────────────────────────────────────
213
295
  ```
214
296
  </step>
215
297
 
@@ -233,9 +315,10 @@ Include research findings in agent prompts.
233
315
  - [ ] .ctx structure checked first
234
316
  - [ ] Intent detected from user message
235
317
  - [ ] Correct flow routed
318
+ - [ ] UI patterns used consistently (banners, boxes, progress)
236
319
  - [ ] ArguSeek called for research-worthy intents
237
320
  - [ ] Task() agents spawned with full context
238
321
  - [ ] STATE.md created/updated
239
- - [ ] Clear "Next Up" shown
322
+ - [ ] Clear "Next Up" shown with command
240
323
  - [ ] User knows to run /ctx to continue
241
324
  </success_criteria>