ctx-cc 3.3.0 → 3.3.1

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/bin/ctx.js CHANGED
@@ -19,9 +19,9 @@ if (options.help) {
19
19
  ╚██████╗ ██║ ██╔╝ ██╗
20
20
  ╚═════╝ ╚═╝ ╚═╝ ╚═╝\x1b[0m
21
21
 
22
- \x1b[1mCTX 2.2 - Continuous Task eXecution\x1b[0m
23
- PRD-driven workflow orchestration for Claude Code.
24
- 8 commands. Story-verified. Debug loop.
22
+ \x1b[1mCTX 3.3 - Continuous Task eXecution\x1b[0m
23
+ Intelligent workflow orchestration for Claude Code.
24
+ 20 agents. Learning system. Predictive planning. Self-healing.
25
25
 
26
26
  \x1b[1mUsage:\x1b[0m
27
27
  npx ctx-cc [options]
package/commands/help.md CHANGED
@@ -4,134 +4,227 @@ description: Show CTX commands and usage guide
4
4
  ---
5
5
 
6
6
  <objective>
7
- Display the CTX 2.3 command reference.
7
+ Display the CTX 3.3 command reference.
8
8
 
9
9
  Output ONLY the reference content below. Do NOT add project-specific analysis.
10
10
  </objective>
11
11
 
12
12
  <reference>
13
- # CTX 2.3 Command Reference
13
+ # CTX 3.3 Command Reference
14
14
 
15
- **CTX** (Continuous Task eXecution) - Smart workflow orchestration for Claude Code.
16
- 8 commands. PRD-driven. Design-first. Smart routing. Debug loop until 100% fixed.
15
+ **CTX** (Continuous Task eXecution) - Intelligent workflow orchestration for Claude Code.
16
+ 20 agents. Learning system. Predictive planning. Self-healing. Voice control.
17
17
 
18
18
  ## Quick Start
19
19
 
20
20
  ```
21
21
  1. /ctx init Initialize project + generate PRD.json
22
- 2. /ctx Smart router does the right thing
23
- 3. /ctx status Check progress (read-only)
24
- 4. /ctx pause Checkpoint when needed
22
+ 2. /ctx map Build repository map
23
+ 3. /ctx Smart router does the right thing
24
+ 4. /ctx status Check progress (read-only)
25
25
  ```
26
26
 
27
- ## What's New in 2.3
27
+ ## What's New in 3.3
28
28
 
29
- - **Design System Integration** - Full brand + UI design workflow
30
- - **ctx-designer Agent** - WCAG 2.2 AA, W3C tokens, Figma MCP, Gemini
31
- - **Story Types** - feature, brand, design, fix, refactor
32
- - **3 Options Pattern** - Always present A/B/C for design decisions
33
- - **Visual Approval Gates** - Mood board → Direction → Prototype → Final
34
- - **BRAND_KIT.md** - Visual foundation with W3C design tokens
35
- - **EAA 2025 Ready** - European Accessibility Act compliance
29
+ - **Learning System** - CTX learns your patterns, decisions, preferences
30
+ - **Predictive Planning** - AI suggests what to build next with ROI scoring
31
+ - **Self-Healing** - Monitor production errors, auto-create fixes
32
+ - **Voice Control** - Speak commands and dictate stories
36
33
 
37
- ## What's in 2.2
34
+ ## What's in 3.2
38
35
 
39
- - **Front-Loaded Approach** - Gather ALL info upfront, execute autonomously
40
- - **PRD.json** - Requirements contract with user stories
41
- - **Secure Credentials** - `.ctx/.env` for test credentials (gitignored)
42
- - **Acceptance Criteria** - Each story has verifiable criteria
43
- - **`passes` Flag** - Auto-tracks story completion
44
- - **Story-Driven Workflow** - Plan → Execute → Verify → Next Story
36
+ - **Milestone Workflow** - Full release management with git tagging
37
+ - **Team Collaboration** - File locking, conflict detection, notifications
38
+ - **Audit Trail** - SOC2/HIPAA/GDPR compliance logging
39
+ - **Metrics Dashboard** - Stories/day, cost analysis, ROI tracking
45
40
 
46
- ## Front-Loaded Philosophy
41
+ ## What's in 3.1
47
42
 
48
- ```
49
- /ctx init gathers:
50
- ├── Requirements PRD.json stories
51
- ├── Context problem, target user, success criteria
52
- ├── Credentials .ctx/.env (gitignored)
53
- └── Constitution → rules for autonomous decisions
54
-
55
- Then /ctx runs autonomously:
56
- ├── Only interrupts for architecture decisions
57
- ├── Uses stored credentials for browser testing
58
- └── Loops until all stories pass
59
- ```
43
+ - **Task Parallelization** - Run independent tasks simultaneously
44
+ - **Pre-Commit Review** - Catch errors before commit
45
+ - **Criteria Auto-Gen** - AI-suggested acceptance criteria
46
+ - **Smart Handoff** - Seamless context transitions
47
+ - **Issue Tracker Sync** - Linear, Jira, GitHub Issues
60
48
 
61
- ## The 8 Commands
49
+ ## What's in 3.0
62
50
 
63
- ### Smart (Auto-routing)
51
+ - **Repository Mapping** - Token-optimized codebase map
52
+ - **Discussion Phase** - Capture decisions before planning
53
+ - **Model Profiles** - quality/balanced/budget routing
54
+ - **Git-Native** - Auto-commit per task
55
+ - **Persistent Debug** - Sessions survive context resets
56
+ - **Parallel Codebase Analysis** - 4 mapper agents
64
57
 
58
+ ---
59
+
60
+ ## Commands
61
+
62
+ ### Smart (Auto-routing)
65
63
  | Command | Purpose |
66
64
  |---------|---------|
67
65
  | `/ctx` | **Smart router** - reads STATE.md, does the right thing |
68
- | `/ctx init` | Initialize project with STATE.md |
66
+ | `/ctx init` | Initialize project with STATE.md + PRD.json |
69
67
 
70
- ### Inspect (Read-only)
68
+ ### Mapping
69
+ | Command | Purpose |
70
+ |---------|---------|
71
+ | `/ctx map` | Build repository map (REPO-MAP.md) |
72
+ | `/ctx map-codebase` | Deep analysis (4 parallel agents) |
71
73
 
74
+ ### Discussion
72
75
  | Command | Purpose |
73
76
  |---------|---------|
74
- | `/ctx status` | See current state without triggering action |
77
+ | `/ctx discuss [story]` | Capture decisions before planning |
78
+
79
+ ### Configuration
80
+ | Command | Purpose |
81
+ |---------|---------|
82
+ | `/ctx profile [name]` | Switch model profile (quality/balanced/budget) |
75
83
 
76
- ### Control (Override smart router)
84
+ ### Inspect (Read-only)
85
+ | Command | Purpose |
86
+ |---------|---------|
87
+ | `/ctx status` | See current state without triggering action |
77
88
 
89
+ ### Control (Override)
78
90
  | Command | Purpose |
79
91
  |---------|---------|
80
92
  | `/ctx plan [goal]` | Force research + planning |
81
93
  | `/ctx verify` | Force three-level verification |
82
- | `/ctx quick "task"` | Quick task bypass (skip workflow) |
94
+ | `/ctx quick "task"` | Quick task bypass |
83
95
 
84
96
  ### Session
85
-
86
97
  | Command | Purpose |
87
98
  |---------|---------|
88
99
  | `/ctx pause` | Checkpoint for session resume |
89
100
 
90
101
  ### Phase Management
91
-
92
102
  | Command | Purpose |
93
103
  |---------|---------|
94
- | `/ctx phase list` | Show all phases with status |
95
- | `/ctx phase add "goal"` | Add new phase to roadmap |
104
+ | `/ctx phase list` | Show all phases |
105
+ | `/ctx phase add "goal"` | Add new phase |
96
106
  | `/ctx phase next` | Complete current, move to next |
97
- | `/ctx phase skip` | Skip current phase |
107
+
108
+ ### Integration
109
+ | Command | Purpose |
110
+ |---------|---------|
111
+ | `/ctx integrate` | Show integration status |
112
+ | `/ctx integrate linear` | Setup Linear |
113
+ | `/ctx integrate jira` | Setup Jira |
114
+ | `/ctx integrate github` | Setup GitHub Issues |
115
+
116
+ ### Milestone
117
+ | Command | Purpose |
118
+ |---------|---------|
119
+ | `/ctx milestone` | Show current milestone |
120
+ | `/ctx milestone list` | List all milestones |
121
+ | `/ctx milestone audit` | Verify completion |
122
+ | `/ctx milestone complete` | Archive and tag |
123
+ | `/ctx milestone new [name]` | Start next version |
124
+
125
+ ### Metrics & Audit
126
+ | Command | Purpose |
127
+ |---------|---------|
128
+ | `/ctx metrics` | Show productivity dashboard |
129
+ | `/ctx metrics cost` | Cost analysis |
130
+ | `/ctx metrics export` | Export HTML dashboard |
131
+ | `/ctx audit` | Show audit summary |
132
+ | `/ctx audit export` | Generate compliance report |
133
+
134
+ ### Learning & Prediction
135
+ | Command | Purpose |
136
+ |---------|---------|
137
+ | `/ctx learn` | Show what CTX has learned |
138
+ | `/ctx learn patterns` | Show code patterns |
139
+ | `/ctx learn decisions` | Show architectural decisions |
140
+ | `/ctx learn forget [id]` | Remove a learned pattern |
141
+ | `/ctx predict` | Get feature suggestions |
142
+ | `/ctx predict --quick` | Quick wins only |
143
+ | `/ctx predict --create [id]` | Create story from suggestion |
144
+
145
+ ### Monitoring & Voice
146
+ | Command | Purpose |
147
+ |---------|---------|
148
+ | `/ctx monitor` | Show monitoring status |
149
+ | `/ctx monitor connect sentry` | Connect Sentry |
150
+ | `/ctx monitor errors` | List recent errors |
151
+ | `/ctx monitor auto-fix [id]` | Auto-fix with PR |
152
+ | `/ctx monitor --watch` | Continuous monitoring |
153
+ | `/ctx voice` | Start voice input |
154
+ | `/ctx voice --continuous` | Always listening mode |
155
+ | `/ctx voice --dictate` | Long-form dictation |
98
156
 
99
157
  ---
100
158
 
101
159
  ## Smart Router States
102
160
 
103
- When you run `/ctx`, it reads STATE.md and PRD.json, auto-routes:
104
-
105
161
  | State | What happens |
106
162
  |-------|--------------|
107
- | initializing | Research + Plan for current story |
108
- | executing | Execute tasks for current story |
109
- | debugging | **Debug loop until 100% fixed** |
110
- | verifying | Verify acceptance criteria mark story as passed |
163
+ | initializing | Research + Map + Plan |
164
+ | discussing | Capture decisions in CONTEXT.md |
165
+ | executing | Execute with git-native commits |
166
+ | debugging | Persistent debug loop (max 10 attempts) |
167
+ | verifying | Three-level verification |
111
168
  | paused | Resume from checkpoint |
112
169
 
113
- **Story Flow:**
170
+ ## Model Profiles
171
+
172
+ | Profile | Research | Execute | Verify | Cost |
173
+ |---------|----------|---------|--------|------|
174
+ | quality | Opus | Opus | Sonnet | 3x |
175
+ | balanced | Opus | Sonnet | Haiku | 1x |
176
+ | budget | Sonnet | Sonnet | Haiku | 0.4x |
177
+
178
+ ## 20 Specialized Agents
179
+
180
+ | Agent | Purpose |
181
+ |-------|---------|
182
+ | ctx-mapper | Repository mapping |
183
+ | ctx-tech-mapper | Technology analysis |
184
+ | ctx-arch-mapper | Architecture analysis |
185
+ | ctx-quality-mapper | Quality analysis |
186
+ | ctx-concerns-mapper | Security/debt analysis |
187
+ | ctx-discusser | Decision capture |
188
+ | ctx-researcher | Web research |
189
+ | ctx-planner | Task planning |
190
+ | ctx-executor | Code execution |
191
+ | ctx-designer | Design/brand work |
192
+ | ctx-debugger | Persistent debugging |
193
+ | ctx-verifier | Three-level verification |
194
+ | ctx-parallelizer | Task parallelization |
195
+ | ctx-reviewer | Pre-commit review |
196
+ | ctx-criteria-suggester | Criteria generation |
197
+ | ctx-handoff | Context transitions |
198
+ | ctx-team-coordinator | Team collaboration |
199
+ | ctx-auditor | Compliance logging |
200
+ | ctx-learner | Pattern learning |
201
+ | ctx-predictor | Feature prediction |
202
+
203
+ ## Key Features
204
+
205
+ ### Learning System
114
206
  ```
115
- S001 → plan → execute → verify ✓ → S002 → plan → execute → verify ✓ → ...
207
+ .ctx/memory/
208
+ ├── patterns.json # Code patterns you prefer
209
+ ├── decisions.json # Past architectural decisions
210
+ ├── failures.json # What didn't work
211
+ └── preferences.json # Communication style
116
212
  ```
117
213
 
118
- ## Debug Loop
214
+ ### Predictive Planning
215
+ - Pattern matching (e-commerce, SaaS, social)
216
+ - ROI scoring for suggestions
217
+ - Auto story generation
119
218
 
120
- When something breaks, CTX enters debug mode:
219
+ ### Self-Healing
220
+ - Sentry, LogRocket, Bugsnag, Datadog
221
+ - Auto-fix safe patterns
222
+ - PR creation with tests
121
223
 
122
- ```
123
- Loop (max 5 attempts):
124
- 1. Analyze error
125
- 2. Form hypothesis
126
- 3. Apply fix
127
- 4. Verify (build + tests + browser)
128
- 5. If fixed → done
129
- If not → new hypothesis, try again
130
- ```
131
-
132
- **Browser verification for UI:**
133
- - Playwright or Chrome DevTools
134
- - Screenshots saved to `.ctx/debug/`
224
+ ### Voice Control
225
+ - Command recognition
226
+ - Story dictation
227
+ - Continuous listening mode
135
228
 
136
229
  ## Three-Level Verification
137
230
 
@@ -141,148 +234,34 @@ Loop (max 5 attempts):
141
234
  | Substantive | Real code, not stub? | No TODOs, no placeholders |
142
235
  | Wired | Imported and used? | Trace imports |
143
236
 
144
- ## Design Workflow
145
-
146
- CTX handles visual work with dedicated agents and approval gates.
237
+ ## Context Budget
147
238
 
148
- ### Story Types
149
- | Type | Agent | Purpose |
150
- |------|-------|---------|
151
- | feature | ctx-executor | Standard implementation |
152
- | brand | ctx-designer | BRAND_KIT.md + tokens |
153
- | design | ctx-designer | UI components/pages |
154
- | fix | ctx-debugger | Bug fixes |
155
- | refactor | ctx-executor | Code improvements |
156
-
157
- ### Design Approval Gates
158
- ```
159
- Mood Board → Direction (A/B/C) → Prototype → Final
160
- ```
161
- Each gate requires user approval before proceeding.
162
-
163
- ### 3 Options Pattern
164
- All design decisions present:
165
- - **Option A**: Conservative (safe, proven)
166
- - **Option B**: Balanced (recommended)
167
- - **Option C**: Bold (distinctive)
168
-
169
- ### WCAG 2.2 AA Compliance
170
- | Criterion | Requirement |
171
- |-----------|-------------|
172
- | 2.4.11 | Focus not obscured |
173
- | 2.5.7 | Drag alternatives |
174
- | 2.5.8 | 24x24px targets |
175
- | 3.3.8 | Accessible auth |
176
-
177
- ### W3C Design Tokens
178
- ```
179
- tokens/
180
- ├── primitive.tokens.json # Raw values
181
- ├── semantic.tokens.json # Purpose aliases
182
- └── component.tokens.json # Component-specific
183
- ```
184
-
185
- ## Key Design Principles
186
-
187
- ### Atomic Planning (2-3 Tasks Max)
188
- Prevents context degradation. Big work = multiple phases.
189
-
190
- ### 95% Auto-Deviation Handling
191
- | Trigger | Action |
192
- |---------|--------|
193
- | Bug in existing code | Auto-fix |
194
- | Missing validation | Auto-add |
195
- | Blocking issue | Auto-fix |
196
- | Architecture decision | Ask user |
197
-
198
- ### Context Budget
199
239
  | Usage | Quality | Action |
200
240
  |-------|---------|--------|
201
241
  | 0-30% | Peak | Continue |
202
- | 30-50% | Good | Continue |
203
- | 50%+ | Degrading | Auto-checkpoint |
204
-
205
- ## 6 Specialized Agents
206
-
207
- | Agent | When spawned |
208
- |-------|--------------|
209
- | ctx-researcher | During planning (ArguSeek + ChunkHound) |
210
- | ctx-planner | After research |
211
- | ctx-executor | During execution (feature stories) |
212
- | ctx-designer | During execution (brand/design stories) |
213
- | ctx-debugger | When debugging |
214
- | ctx-verifier | During verification |
215
-
216
- ## Integrations
217
-
218
- - **ArguSeek**: Web research during planning
219
- - **ChunkHound**: Semantic code search (`uv tool install chunkhound`)
220
- - **Playwright/DevTools**: Browser verification for UI
221
- - **Figma MCP**: Design context extraction and screenshots
222
- - **Gemini Design**: Image generation and UI code generation
242
+ | 30-40% | Good | Continue |
243
+ | 40-50% | Good | Prepare handoff |
244
+ | 50-60% | Degrading | Auto-checkpoint |
245
+ | 60-70% | Degrading | Create HANDOFF.md |
246
+ | 70%+ | Poor | Force checkpoint |
223
247
 
224
248
  ## Directory Structure
225
249
 
226
250
  ```
227
251
  .ctx/
228
- ├── STATE.md # Living digest - execution state
229
- ├── PRD.json # Requirements contract - stories + criteria
230
- ├── .env # Test credentials (GITIGNORED)
231
- ├── .gitignore # Protects secrets
232
- ├── phases/{story_id}/ # Per-story data
233
- ├── RESEARCH.md # ArguSeek + ChunkHound results
234
- ├── PLAN.md # Tasks mapped to acceptance criteria
235
- ├── VERIFY.md # Verification report
236
- ├── MOOD_BOARD.md # Design references (design stories)
237
- │ └── DESIGN_BRIEF.md # Design decisions (design stories)
252
+ ├── config.json # Model profiles, git settings
253
+ ├── STATE.md # Execution state
254
+ ├── PRD.json # Requirements contract
255
+ ├── REPO-MAP.md # Codebase map
256
+ ├── codebase/ # Deep analysis
257
+ ├── phases/ # Per-story data
258
+ ├── memory/ # Learned patterns
259
+ ├── audit/ # Compliance logs
260
+ ├── metrics/ # Productivity data
261
+ ├── debug/ # Debug sessions
238
262
  ├── checkpoints/ # Auto-checkpoints
239
- ├── debug/ # Debug screenshots
240
- └── verify/ # Verification screenshots
241
-
242
- project/
243
- ├── BRAND_KIT.md # Visual foundation (brand stories)
244
- └── tokens/ # W3C design tokens
245
- ├── primitive.tokens.json
246
- ├── semantic.tokens.json
247
- └── component.tokens.json
248
- ```
249
-
250
- ## PRD.json Structure
251
-
252
- ```json
253
- {
254
- "brand": {
255
- "hasBrandKit": false,
256
- "personality": ["professional", "modern"],
257
- "euMarket": true
258
- },
259
- "design": {
260
- "wcagLevel": "AA",
261
- "eaaCompliance": true,
262
- "tokenFormat": "w3c"
263
- },
264
- "stories": [
265
- {
266
- "id": "S001",
267
- "type": "brand",
268
- "title": "Establish brand kit",
269
- "acceptanceCriteria": ["BRAND_KIT.md exists", "tokens/ populated"],
270
- "passes": false
271
- },
272
- {
273
- "id": "S002",
274
- "type": "design",
275
- "title": "Login page",
276
- "acceptanceCriteria": ["WCAG 2.2 AA compliant", "All states implemented"],
277
- "passes": false
278
- }
279
- ],
280
- "metadata": {
281
- "currentStory": "S001",
282
- "passedStories": 0,
283
- "totalStories": 5
284
- }
285
- }
263
+ ├── milestones/ # Milestone archives
264
+ └── locks/ # Team file locks
286
265
  ```
287
266
 
288
267
  ## Updating CTX
@@ -292,5 +271,5 @@ npx ctx-cc --force
292
271
  ```
293
272
 
294
273
  ---
295
- *CTX 2.3 - PRD-driven, design-first, story-verified, debug loop until 100% fixed*
274
+ *CTX 3.3 - Learning. Prediction. Self-healing. Voice control.*
296
275
  </reference>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctx-cc",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
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",
package/src/install.js CHANGED
@@ -28,9 +28,9 @@ function printBanner() {
28
28
  ╚██████╗ ██║ ██╔╝ ██╗
29
29
  ╚═════╝ ╚═╝ ╚═╝ ╚═╝
30
30
  `));
31
- console.log(` ${bold('CTX 2.2')} ${dim(`v${VERSION}`)}`);
32
- console.log(' PRD-driven workflow orchestration for Claude Code.');
33
- console.log(' 8 commands. Story-verified. Debug loop.\n');
31
+ console.log(` ${bold('CTX 3.3')} ${dim(`v${VERSION}`)}`);
32
+ console.log(' Intelligent workflow orchestration for Claude Code.');
33
+ console.log(' 20 agents. Learning system. Predictive planning. Self-healing.\n');
34
34
  }
35
35
 
36
36
  function copyDir(src, dest) {