ctx-cc 3.3.4 → 3.3.6

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 CHANGED
@@ -13,7 +13,9 @@
13
13
 
14
14
  <img src="./assets/terminal.png" alt="CTX Terminal" width="700">
15
15
 
16
- **AI that learns your preferences. Predictive planning. Self-healing deployments. Voice control.**
16
+ **Conversational-first. Just describe what you want no commands to memorize.**
17
+
18
+ AI that learns your preferences. Predictive planning. Self-healing deployments. 21 specialized agents.
17
19
 
18
20
  [Installation](#installation) · [Quick Start](#quick-start) · [New in 3.3](#new-in-33) · [Commands](#commands) · [Why CTX](#why-ctx) · [**Getting Started Guide**](./GETTING_STARTED.md)
19
21
 
@@ -40,6 +42,16 @@ npx ctx-cc --force # Overwrite existing installation
40
42
 
41
43
  ## Quick Start
42
44
 
45
+ **Just talk to CTX.** No commands to memorize:
46
+
47
+ ```
48
+ "I want to build a todo app" → CTX sets up your project
49
+ "Fix the login bug" → CTX starts debugging
50
+ "Is my app accessible?" → CTX runs accessibility QA
51
+ "What should I do next?" → CTX shows status + recommendation
52
+ ```
53
+
54
+ Or use commands directly:
43
55
  ```
44
56
  1. /ctx init Gather requirements + credentials + design context
45
57
  2. /ctx map Build repository map (existing codebases)
@@ -48,13 +60,60 @@ npx ctx-cc --force # Overwrite existing installation
48
60
 
49
61
  **The Flow:**
50
62
  ```
51
- /ctx init /ctx map/ctx Autonomous loop → Delivered!
63
+ Tell CTX what you wantCTX figures out the rest → Delivered!
52
64
  ```
53
65
 
54
66
  ---
55
67
 
56
68
  ## New in 3.3
57
69
 
70
+ ### Conversational-First Routing
71
+ **No commands to memorize.** CTX understands natural language from your first prompt:
72
+
73
+ | You Say | CTX Does |
74
+ |---------|----------|
75
+ | "I want to build a todo app" | Sets up project, researches best practices, creates plan |
76
+ | "Fix the login bug" | Analyzes codebase, starts debugging |
77
+ | "Is my app accessible?" | Runs WCAG 2.1 AA accessibility audit |
78
+ | "Test everything" | Crawls every page, clicks every button |
79
+ | "What's next?" | Shows status and recommended action |
80
+ | "Ship it" | Runs verification, then deploys |
81
+
82
+ **New user?** CTX welcomes you and guides setup:
83
+ ```
84
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
85
+ Welcome to CTX!
86
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
87
+
88
+ I understood: "build a todo app with React"
89
+
90
+ You want to build something new. Let's set it up!
91
+
92
+ I'll now:
93
+ 1. Create your project structure
94
+ 2. Research best practices for React todo apps
95
+ 3. Create a plan with clear milestones
96
+ ```
97
+
98
+ Commands still work as shortcuts for power users.
99
+
100
+ ### Full System QA
101
+ Crawl every page, click every button, find all issues:
102
+
103
+ ```bash
104
+ /ctx qa # Full system QA (WCAG 2.1 AA)
105
+ /ctx qa --a11y-only # Accessibility audit only
106
+ /ctx qa --visual-only # Visual regression (3 viewports)
107
+ /ctx qa --resume # Resume interrupted session
108
+ ```
109
+
110
+ Features:
111
+ - **WCAG 2.1 AA compliance** - Touch targets, alt text, labels, contrast, keyboard
112
+ - **Multi-viewport testing** - Mobile (375px), Tablet (768px), Desktop (1280px)
113
+ - **Performance monitoring** - Slow requests, large assets
114
+ - **Trace capture** - Screenshots and logs for every failed interaction
115
+ - **Fix tasks** - Issues organized by section, ready for execution
116
+
58
117
  ### Learning System
59
118
  CTX learns from your codebase and preferences:
60
119
 
@@ -517,8 +576,10 @@ Results synthesized into `SUMMARY.md`.
517
576
  ### QA (Full System Testing)
518
577
  | Command | Purpose |
519
578
  |---------|---------|
520
- | `/ctx qa` | Full system QA - every page, every button |
579
+ | `/ctx qa` | Full system QA - WCAG 2.1 AA, every page, every button |
521
580
  | `/ctx qa --section "auth"` | QA specific section only |
581
+ | `/ctx qa --a11y-only` | Accessibility audit only |
582
+ | `/ctx qa --visual-only` | Visual regression (mobile/tablet/desktop) |
522
583
  | `/ctx qa --resume` | Resume interrupted QA session |
523
584
  | `/ctx qa --report` | Show last QA report |
524
585
 
@@ -790,6 +851,6 @@ MIT
790
851
 
791
852
  **[GitHub](https://github.com/jufjuf/CTX)** · **[Issues](https://github.com/jufjuf/CTX/issues)** · **[npm](https://www.npmjs.com/package/ctx-cc)**
792
853
 
793
- *CTX 3.3 - AI that learns your preferences. Predictive planning. Self-healing. Voice control.*
854
+ *CTX 3.3 - Conversational-first. Just describe what you want. 21 agents. Learning system. Self-healing.*
794
855
 
795
856
  </div>
package/commands/ctx.md CHANGED
@@ -1,16 +1,212 @@
1
1
  ---
2
2
  name: ctx
3
- description: Smart router - reads STATE.md, config.json, and does the right thing. Uses model profiles for cost optimization.
3
+ description: Smart router - understands natural language, detects intent, and guides users from first prompt. No commands to memorize.
4
4
  ---
5
5
 
6
6
  <objective>
7
- CTX 3.0 Smart Router - One command that always knows what to do next.
7
+ CTX Smart Router - Conversational-first workflow orchestration.
8
8
 
9
- Read STATE.md, load config.json, use appropriate model profile, and execute the right action.
9
+ **Users don't need to know commands.** They just describe what they want, and CTX routes to the right workflow automatically.
10
+
11
+ ```
12
+ User: "I want to build a todo app" → Routes to init
13
+ User: "Fix the login bug" → Routes to debug
14
+ User: "Is my app accessible?" → Routes to QA
15
+ User: "What should I do next?" → Shows status + recommendation
16
+ ```
10
17
  </objective>
11
18
 
12
19
  <workflow>
13
- ## Step 0: Load Configuration
20
+
21
+ ## Step 0: Intent Detection (ALWAYS RUNS FIRST)
22
+
23
+ Before checking state, parse the user's natural language request.
24
+
25
+ ### Intent Patterns
26
+
27
+ | User Says | Detected Intent | Route To |
28
+ |-----------|-----------------|----------|
29
+ | "build", "create", "make", "start new", "I want to..." | `new-project` | /ctx:init |
30
+ | "fix", "bug", "broken", "not working", "error" | `debug` | /ctx:debug |
31
+ | "test", "QA", "check", "accessible", "works?" | `qa` | /ctx:qa |
32
+ | "review", "audit", "security", "ready?" | `review` | /ctx:verify |
33
+ | "production", "prod ready", "production ready" | `production-ready` | Full audit → QA → fixes |
34
+ | "study", "analyze", "understand", "learn", "explore" | `analyze` | /ctx:map-codebase |
35
+ | "improve", "optimize", "better", "enhance" | `improve` | Analyze → suggest → fix |
36
+ | "deploy", "ship", "publish", "release" | `ship` | /ctx:verify → ship |
37
+ | "status", "progress", "where", "what's next" | `status` | /ctx:status |
38
+ | "help", "how", "what can", "commands" | `help` | /ctx:help |
39
+ | "plan", "design", "architect" | `plan` | /ctx:plan |
40
+ | "continue", "next", "go", "do it" | `continue` | (read STATE.md) |
41
+
42
+ ### Intent Detection Logic
43
+
44
+ ```javascript
45
+ function detectIntent(userMessage) {
46
+ const msg = userMessage.toLowerCase();
47
+
48
+ // New project signals
49
+ if (msg.match(/\b(build|create|make|start|new|want to)\b.*\b(app|project|feature|site|api)\b/)) {
50
+ return 'new-project';
51
+ }
52
+
53
+ // Debug signals
54
+ if (msg.match(/\b(fix|bug|broken|error|crash|not working|fails?|issue)\b/)) {
55
+ return 'debug';
56
+ }
57
+
58
+ // QA signals
59
+ if (msg.match(/\b(test|qa|check|accessible|works|validate|verify all)\b/)) {
60
+ return 'qa';
61
+ }
62
+
63
+ // Production-ready signals
64
+ if (msg.match(/\b(production|prod ready|production.?ready|make it ready)\b/)) {
65
+ return 'production-ready';
66
+ }
67
+
68
+ // Analyze/study signals
69
+ if (msg.match(/\b(study|analyze|understand|learn|explore|what is this)\b/)) {
70
+ return 'analyze';
71
+ }
72
+
73
+ // Improve signals
74
+ if (msg.match(/\b(improve|optimize|better|enhance|upgrade|refactor)\b/)) {
75
+ return 'improve';
76
+ }
77
+
78
+ // Review signals
79
+ if (msg.match(/\b(review|audit|security|ready|before deploy)\b/)) {
80
+ return 'review';
81
+ }
82
+
83
+ // Ship signals
84
+ if (msg.match(/\b(deploy|ship|publish|release|push|launch)\b/)) {
85
+ return 'ship';
86
+ }
87
+
88
+ // Status signals
89
+ if (msg.match(/\b(status|progress|where|what.?s next|current)\b/)) {
90
+ return 'status';
91
+ }
92
+
93
+ // Help signals
94
+ if (msg.match(/\b(help|how|what can|commands|guide)\b/)) {
95
+ return 'help';
96
+ }
97
+
98
+ // Continue signals (or no clear intent)
99
+ return 'continue';
100
+ }
101
+ ```
102
+
103
+ ## Step 1: Check Project State
104
+
105
+ Check if `.ctx/` folder exists:
106
+
107
+ ### If NO `.ctx/` folder (New User)
108
+
109
+ Based on detected intent:
110
+
111
+ | Intent | Action |
112
+ |--------|--------|
113
+ | `new-project` | "Let's set up your project!" → Run /ctx:init flow |
114
+ | `debug` | "Let me understand the codebase first." → Run /ctx:map → /ctx:debug |
115
+ | `qa` | "I'll analyze the project first." → Run /ctx:map → /ctx:qa |
116
+ | `production-ready` | "I'll audit everything and make it production ready." → Full pipeline below |
117
+ | `analyze` | "Let me study this codebase." → Run /ctx:map-codebase |
118
+ | `improve` | "I'll analyze and suggest improvements." → Run /ctx:map → analyze → suggest |
119
+ | `continue` | Guide user: "What would you like to do with this project?" |
120
+ | `help` | Show quick start guide |
121
+
122
+ ### Production-Ready Pipeline
123
+
124
+ When user says "make it production ready":
125
+
126
+ ```
127
+ 1. /ctx:map-codebase → Deep analysis (4 parallel agents)
128
+ 2. /ctx:qa → Full system QA (WCAG 2.1 AA)
129
+ 3. Security audit → Check for vulnerabilities
130
+ 4. Performance check → Find slow requests, large assets
131
+ 5. Create fix tasks → Prioritized by severity
132
+ 6. Execute fixes → With verification loop
133
+ 7. Final verification → Three-level check
134
+ 8. Report → Production readiness score
135
+ ```
136
+
137
+ Output:
138
+ ```
139
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
140
+ PRODUCTION READINESS AUDIT
141
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
142
+
143
+ Codebase Analysis: ✓ Complete
144
+ ├── Tech: React 18, Node.js, PostgreSQL
145
+ ├── Architecture: Clean, well-structured
146
+ ├── Quality: 78% test coverage
147
+ └── Concerns: 3 security issues, 5 performance issues
148
+
149
+ Full QA: ✓ Complete
150
+ ├── Pages tested: 24
151
+ ├── WCAG 2.1 AA: 92% compliant
152
+ ├── Issues found: 12
153
+ └── Critical: 2
154
+
155
+ Security Audit: ⚠ Issues Found
156
+ ├── SQL injection risk: 1
157
+ ├── XSS vulnerability: 1
158
+ └── Exposed secrets: 1
159
+
160
+ Performance: ⚠ Issues Found
161
+ ├── Slow API calls: 3
162
+ ├── Large assets: 2
163
+ └── Missing caching: Yes
164
+
165
+ Fix Tasks Created: 8
166
+ ├── Critical: 3 (security)
167
+ ├── High: 5 (performance, a11y)
168
+ └── Medium: 4
169
+
170
+ Ready to fix? [Y] Fix all [C] Critical only [R] Review first
171
+ ```
172
+
173
+ **Output for new users:**
174
+ ```
175
+ [CTX] Welcome! I see this is a new project.
176
+
177
+ Based on your request, I'll help you {{detected_action}}.
178
+
179
+ {{guided_next_step}}
180
+ ```
181
+
182
+ ### If `.ctx/` folder EXISTS
183
+
184
+ Load configuration and state:
185
+ - Read `.ctx/config.json` for profile settings
186
+ - Read `.ctx/STATE.md` for current status
187
+ - Check `.ctx/REPO-MAP.md` for codebase understanding
188
+
189
+ ## Step 2: Route Based on Intent + State
190
+
191
+ Combine detected intent with current state:
192
+
193
+ | Intent | State | Action |
194
+ |--------|-------|--------|
195
+ | `new-project` | any | Warn if project exists, offer to add story |
196
+ | `debug` | any | Route to /ctx:debug |
197
+ | `qa` | any | Route to /ctx:qa |
198
+ | `production-ready` | any | Run full production-ready pipeline |
199
+ | `analyze` | any | Route to /ctx:map-codebase |
200
+ | `improve` | any | Analyze → suggest improvements → create stories |
201
+ | `status` | any | Show STATE.md summary |
202
+ | `continue` | initializing | Run research phase |
203
+ | `continue` | discussing | Run discussion phase |
204
+ | `continue` | executing | Execute current task |
205
+ | `continue` | debugging | Resume debug session |
206
+ | `continue` | verifying | Run verification |
207
+ | `continue` | paused | Resume from checkpoint |
208
+
209
+ ## Step 3: Load Configuration
14
210
 
15
211
  Read `.ctx/config.json` for:
16
212
  - Active profile (quality/balanced/budget)
@@ -22,20 +218,9 @@ If config.json doesn't exist:
22
218
  - Copy from templates/config.json
23
219
  - Set balanced as default profile
24
220
 
25
- ## Step 1: Read State
26
-
27
- Read `.ctx/STATE.md` to understand current situation.
221
+ ## Step 4: Execute Routed Action
28
222
 
29
- If STATE.md doesn't exist:
30
- - Output: "No CTX project found. Run `/ctx init` to start."
31
- - Stop.
32
-
33
- Also check for:
34
- - `.ctx/REPO-MAP.md` - Codebase understanding
35
- - `.ctx/codebase/SUMMARY.md` - Deep codebase analysis
36
- - `.ctx/phases/{story_id}/CONTEXT.md` - Locked decisions
37
-
38
- ## Step 2: Route Based on State
223
+ Based on routing decision from Step 2:
39
224
 
40
225
  ### If status = "initializing"
41
226
  Route to: **Research Phase**
@@ -102,7 +287,7 @@ Route to: **Resume**
102
287
  3. Set status to previous state
103
288
  4. Continue workflow
104
289
 
105
- ## Step 3: Model Selection
290
+ ## Step 5: Model Selection
106
291
 
107
292
  Based on current action and active profile:
108
293
 
@@ -118,7 +303,7 @@ Based on current action and active profile:
118
303
 
119
304
  Use Task tool with `model` parameter from routing table.
120
305
 
121
- ## Step 4: Context Budget Check
306
+ ## Step 6: Context Budget Check
122
307
 
123
308
  After every action:
124
309
  - Calculate context usage
@@ -127,14 +312,14 @@ After every action:
127
312
  - If > 60%: Create HANDOFF.md, spawn fresh agent
128
313
  - If > 70%: Force checkpoint
129
314
 
130
- ## Step 5: Git-Native Commit
315
+ ## Step 7: Git-Native Commit
131
316
 
132
317
  If task completed successfully AND config.git.autoCommit = true:
133
318
  1. Stage modified files
134
319
  2. Create commit with CTX format
135
320
  3. Record commit hash in STATE.md
136
321
 
137
- ## Step 6: Update State
322
+ ## Step 8: Update State
138
323
 
139
324
  Always update STATE.md after any action:
140
325
  - Current status
@@ -188,7 +373,33 @@ DELIVERY GUARANTEE LOOP:
188
373
  </context_budget>
189
374
 
190
375
  <output_format>
191
- After routing, output:
376
+
377
+ ## For New Users (no .ctx/ folder)
378
+
379
+ ```
380
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
381
+ Welcome to CTX!
382
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
383
+
384
+ I understood: "{{user_request}}"
385
+
386
+ {{intent_response}}
387
+
388
+ {{guided_action}}
389
+ ```
390
+
391
+ **Intent Responses:**
392
+
393
+ | Intent | Response |
394
+ |--------|----------|
395
+ | new-project | "You want to build something new. Let's set it up!" |
396
+ | debug | "You need to fix something. Let me understand the codebase first." |
397
+ | qa | "You want to test the system. I'll analyze the project first." |
398
+ | status | "This is a new project. Would you like to start building?" |
399
+ | help | (Show quick start guide) |
400
+
401
+ ## For Existing Projects
402
+
192
403
  ```
193
404
  [CTX] Status: {{status}}
194
405
  [CTX] Profile: {{profile}} ({{costTier}})
@@ -197,4 +408,86 @@ After routing, output:
197
408
  [CTX] Next: {{next_action}}
198
409
  [CTX] Context: {{percent}}% ({{quality}})
199
410
  ```
411
+
412
+ ## Guided Prompts (When Intent Unclear)
413
+
414
+ If user's intent is ambiguous, ask:
415
+
416
+ ```
417
+ I'm not sure what you'd like to do. Here are your options:
418
+
419
+ "Build something new" → I'll help you start a project
420
+ "Fix a bug" → I'll debug the issue
421
+ "Test the app" → I'll run full QA
422
+ "Show status" → I'll show current progress
423
+
424
+ What would you like to do?
425
+ ```
200
426
  </output_format>
427
+
428
+ <examples>
429
+
430
+ ## Example Conversations
431
+
432
+ ### New User - Build Intent
433
+ ```
434
+ User: "I want to build a todo app with React"
435
+
436
+ CTX: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
437
+ Welcome to CTX!
438
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
439
+
440
+ I understood: "build a todo app with React"
441
+
442
+ You want to build something new. Let's set it up!
443
+
444
+ I'll now:
445
+ 1. Create your project structure
446
+ 2. Research best practices for React todo apps
447
+ 3. Create a plan with clear milestones
448
+
449
+ [Starting project setup...]
450
+ ```
451
+
452
+ ### New User - Fix Intent
453
+ ```
454
+ User: "The login is broken"
455
+
456
+ CTX: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
457
+ Welcome to CTX!
458
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
459
+
460
+ I understood: "login is broken"
461
+
462
+ You need to fix something. Let me understand the codebase first.
463
+
464
+ I'll now:
465
+ 1. Map your codebase structure
466
+ 2. Find the login-related code
467
+ 3. Start debugging
468
+
469
+ [Analyzing codebase...]
470
+ ```
471
+
472
+ ### Existing Project - Continue
473
+ ```
474
+ User: "continue"
475
+
476
+ CTX: [CTX] Status: executing
477
+ [CTX] Profile: balanced (1x cost)
478
+ [CTX] Story: S002 - User Authentication
479
+ [CTX] Task: 2/3 - Implement login form validation
480
+ [CTX] Action: Executing task...
481
+ ```
482
+
483
+ ### Existing Project - QA Intent
484
+ ```
485
+ User: "is the app accessible?"
486
+
487
+ CTX: [CTX] Detected: QA request (accessibility)
488
+ [CTX] Routing to: /ctx:qa --a11y-only
489
+
490
+ Running WCAG 2.1 AA accessibility audit...
491
+ ```
492
+
493
+ </examples>
package/commands/help.md CHANGED
@@ -13,10 +13,22 @@ Output ONLY the reference content below. Do NOT add project-specific analysis.
13
13
  # CTX 3.3 Command Reference
14
14
 
15
15
  **CTX** (Continuous Task eXecution) - Intelligent workflow orchestration for Claude Code.
16
- 21 agents. Learning system. Predictive planning. Self-healing. Voice control. Full system QA.
16
+
17
+ **Conversational-first.** Just describe what you want - no commands to memorize.
18
+ 21 agents. Learning system. Predictive planning. Self-healing. Full system QA.
17
19
 
18
20
  ## Quick Start
19
21
 
22
+ **You don't need to memorize commands.** Just tell CTX what you want:
23
+
24
+ ```
25
+ "I want to build a todo app" → CTX sets up your project
26
+ "Fix the login bug" → CTX starts debugging
27
+ "Is my app accessible?" → CTX runs QA
28
+ "What's next?" → CTX shows status
29
+ ```
30
+
31
+ Or use commands directly:
20
32
  ```
21
33
  1. /ctx init Initialize project + generate PRD.json
22
34
  2. /ctx map Build repository map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctx-cc",
3
- "version": "3.3.4",
3
+ "version": "3.3.6",
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",