ctx-cc 3.0.0 → 3.3.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 +360 -6
- package/agents/ctx-auditor.md +495 -0
- package/agents/ctx-criteria-suggester.md +358 -0
- package/agents/ctx-handoff.md +379 -0
- package/agents/ctx-learner.md +533 -0
- package/agents/ctx-parallelizer.md +351 -0
- package/agents/ctx-predictor.md +438 -0
- package/agents/ctx-reviewer.md +366 -0
- package/agents/ctx-team-coordinator.md +407 -0
- package/commands/integrate.md +422 -0
- package/commands/metrics.md +465 -0
- package/commands/milestone.md +264 -0
- package/commands/monitor.md +474 -0
- package/commands/voice.md +513 -0
- package/package.json +2 -2
- package/templates/config.json +253 -16
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
### Continuous Task eXecution
|
|
6
6
|
|
|
7
|
-
**
|
|
7
|
+
**Intelligent workflow orchestration for Claude Code.**
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/ctx-cc)
|
|
10
10
|
[](https://www.npmjs.com/package/ctx-cc)
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
|
|
14
14
|
<img src="./assets/terminal.png" alt="CTX Terminal" width="700">
|
|
15
15
|
|
|
16
|
-
**
|
|
16
|
+
**AI that learns your preferences. Predictive planning. Self-healing deployments. Voice control.**
|
|
17
17
|
|
|
18
|
-
[Installation](#installation) · [Quick Start](#quick-start) · [New in 3.
|
|
18
|
+
[Installation](#installation) · [Quick Start](#quick-start) · [New in 3.3](#new-in-33) · [Commands](#commands) · [Why CTX](#why-ctx)
|
|
19
19
|
|
|
20
20
|
</div>
|
|
21
21
|
|
|
@@ -53,7 +53,302 @@ npx ctx-cc --force # Overwrite existing installation
|
|
|
53
53
|
|
|
54
54
|
---
|
|
55
55
|
|
|
56
|
-
## New in 3.
|
|
56
|
+
## New in 3.3
|
|
57
|
+
|
|
58
|
+
### Learning System
|
|
59
|
+
CTX learns from your codebase and preferences:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
[LEARNER] Applying 3 learned preferences
|
|
63
|
+
|
|
64
|
+
1. Using Zod for validation
|
|
65
|
+
→ Based on pattern P001 (95% confidence, 12 observations)
|
|
66
|
+
|
|
67
|
+
2. Functional components only
|
|
68
|
+
→ Based on decision D005 (explicit preference)
|
|
69
|
+
|
|
70
|
+
3. Avoiding moment.js, using date-fns
|
|
71
|
+
→ Based on failure F001 (bundle size)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Memory stored in `.ctx/memory/`:
|
|
75
|
+
- `patterns.json` - Code patterns you prefer
|
|
76
|
+
- `decisions.json` - Past architectural decisions
|
|
77
|
+
- `failures.json` - What didn't work
|
|
78
|
+
- `preferences.json` - Communication style
|
|
79
|
+
- `conventions.json` - Naming and structure
|
|
80
|
+
|
|
81
|
+
Commands:
|
|
82
|
+
```bash
|
|
83
|
+
/ctx learn # Show what CTX has learned
|
|
84
|
+
/ctx learn patterns # Show code patterns
|
|
85
|
+
/ctx learn decisions # Show architectural decisions
|
|
86
|
+
/ctx learn forget [id] # Remove a learned pattern
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Predictive Planning
|
|
90
|
+
AI suggests what to build next based on patterns:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
[PREDICT] Feature Suggestions for MyApp
|
|
94
|
+
|
|
95
|
+
Based on your e-commerce app at MVP stage:
|
|
96
|
+
|
|
97
|
+
1. Cart Abandonment Recovery
|
|
98
|
+
├─ ROI: 9/10
|
|
99
|
+
├─ Effort: Medium (2-3 days)
|
|
100
|
+
└─ Impact: +15-25% recovered revenue
|
|
101
|
+
|
|
102
|
+
2. Product Reviews & Ratings
|
|
103
|
+
├─ ROI: 9/10
|
|
104
|
+
├─ Effort: Low (1-2 days)
|
|
105
|
+
└─ Impact: +18% conversion rate
|
|
106
|
+
|
|
107
|
+
3. Discount Codes System
|
|
108
|
+
├─ ROI: 7/10
|
|
109
|
+
└─ Effort: Low (1 day)
|
|
110
|
+
|
|
111
|
+
[1] Create story [A] Create all [R] Research more
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Commands:
|
|
115
|
+
```bash
|
|
116
|
+
/ctx predict # Full prediction analysis
|
|
117
|
+
/ctx predict --quick # Quick wins only (< 1 day)
|
|
118
|
+
/ctx predict --create [id] # Create story from suggestion
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Self-Healing Deployments
|
|
122
|
+
Monitor production errors and auto-fix:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
/ctx monitor connect sentry # Connect Sentry
|
|
126
|
+
/ctx monitor errors # List recent errors
|
|
127
|
+
/ctx monitor auto-fix [id] # Auto-fix with PR
|
|
128
|
+
/ctx monitor --watch # Continuous monitoring
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Auto-fix workflow:
|
|
132
|
+
```
|
|
133
|
+
1. Sentry reports: "TypeError in checkout.ts:45"
|
|
134
|
+
2. CTX analyzes error pattern
|
|
135
|
+
3. If safe pattern (null check, import, etc.):
|
|
136
|
+
→ Auto-generates fix
|
|
137
|
+
→ Runs tests
|
|
138
|
+
→ Creates PR
|
|
139
|
+
→ Notifies team
|
|
140
|
+
4. If complex pattern:
|
|
141
|
+
→ Creates fix story
|
|
142
|
+
→ Assigns priority
|
|
143
|
+
→ Provides context
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Supports: Sentry, LogRocket, Bugsnag, Datadog
|
|
147
|
+
|
|
148
|
+
### Voice Control
|
|
149
|
+
Speak your requirements instead of typing:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
/ctx voice # Start voice input
|
|
153
|
+
/ctx voice --continuous # Always listening
|
|
154
|
+
/ctx voice --dictate # Long-form input
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
[VOICE] 🎤 Listening...
|
|
159
|
+
|
|
160
|
+
User: "Create a story for user authentication
|
|
161
|
+
with email login and forgot password"
|
|
162
|
+
|
|
163
|
+
[VOICE] Story created:
|
|
164
|
+
|
|
165
|
+
Title: User Authentication
|
|
166
|
+
Criteria:
|
|
167
|
+
✓ User can login with email/password
|
|
168
|
+
✓ Forgot password sends reset email
|
|
169
|
+
✓ Session persists across browser
|
|
170
|
+
|
|
171
|
+
Add to PRD? [Y/n/edit]
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Supports: macOS Speech, Whisper (local), Google Speech, Azure
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## From 3.2
|
|
179
|
+
|
|
180
|
+
### Milestone Workflow
|
|
181
|
+
Full release management with audit, archive, and git tagging:
|
|
182
|
+
```bash
|
|
183
|
+
/ctx milestone # Show current milestone status
|
|
184
|
+
/ctx milestone list # List all milestones
|
|
185
|
+
/ctx milestone audit # Verify milestone complete
|
|
186
|
+
/ctx milestone complete # Archive and create git tag
|
|
187
|
+
/ctx milestone new v2.0 # Start next version
|
|
188
|
+
/ctx milestone gaps # Generate fix phases for failures
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Features:
|
|
192
|
+
- Archive phases to `.ctx/archive/v{version}/`
|
|
193
|
+
- Auto-create git tags on complete
|
|
194
|
+
- Gap analysis for incomplete milestones
|
|
195
|
+
- Integration with Linear/Jira/GitHub
|
|
196
|
+
|
|
197
|
+
### Team Collaboration
|
|
198
|
+
Multiple developers working with CTX on same repo:
|
|
199
|
+
```
|
|
200
|
+
[TEAM] Current Activity
|
|
201
|
+
|
|
202
|
+
Active:
|
|
203
|
+
alice: T001 - User authentication (10m)
|
|
204
|
+
bob: T003 - API endpoints (waiting for T001)
|
|
205
|
+
|
|
206
|
+
Available:
|
|
207
|
+
charlie: idle
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Features:
|
|
211
|
+
- **File locking** - Prevent conflicts during execution
|
|
212
|
+
- **Lock expiry** - Auto-release after 1 hour
|
|
213
|
+
- **Conflict detection** - Fail fast on overlaps
|
|
214
|
+
- **Team notifications** - Slack/Discord on phase complete
|
|
215
|
+
- **Branch strategy** - Auto-create feature branches
|
|
216
|
+
|
|
217
|
+
### Audit Trail (SOC2/HIPAA Compliance)
|
|
218
|
+
Complete traceability for enterprise:
|
|
219
|
+
```bash
|
|
220
|
+
/ctx audit # Show today's summary
|
|
221
|
+
/ctx audit week # Weekly summary
|
|
222
|
+
/ctx audit export # Generate compliance report
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Every action logged:
|
|
226
|
+
```json
|
|
227
|
+
{
|
|
228
|
+
"timestamp": "2024-01-20T09:30:00Z",
|
|
229
|
+
"action": "execute",
|
|
230
|
+
"story": "S001",
|
|
231
|
+
"agent": "ctx-executor",
|
|
232
|
+
"model": "claude-sonnet-4",
|
|
233
|
+
"tokens": {"input": 5000, "output": 2000},
|
|
234
|
+
"filesModified": ["src/auth/login.ts"],
|
|
235
|
+
"decisions": ["Use JWT for auth"],
|
|
236
|
+
"commit": "abc1234"
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Compliance features:
|
|
241
|
+
- Access logging (who read what)
|
|
242
|
+
- Decision tracking (with rationale)
|
|
243
|
+
- Change log (all modifications)
|
|
244
|
+
- Retention policies (90d daily, 1y weekly)
|
|
245
|
+
- SOC2, HIPAA, GDPR modes
|
|
246
|
+
|
|
247
|
+
### Metrics Dashboard
|
|
248
|
+
Understand AI productivity impact:
|
|
249
|
+
```bash
|
|
250
|
+
/ctx metrics # Overview dashboard
|
|
251
|
+
/ctx metrics cost # Cost analysis
|
|
252
|
+
/ctx metrics export # Export HTML dashboard
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
╔══════════════════════════════════════════════════════════╗
|
|
257
|
+
║ CTX METRICS - Week 3 ║
|
|
258
|
+
╠══════════════════════════════════════════════════════════╣
|
|
259
|
+
║ Stories/Week: 8 (+2) Total Cost: $4.87 ║
|
|
260
|
+
║ Time/Story: 1h 45m Per Story: $0.61 ║
|
|
261
|
+
║ Debug Loops: 12 Success Rate: 92% ║
|
|
262
|
+
║ ║
|
|
263
|
+
║ ROI: 30x (24 hours saved, $145 net savings) ║
|
|
264
|
+
╚══════════════════════════════════════════════════════════╝
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Metrics tracked:
|
|
268
|
+
- Stories completed per day/week
|
|
269
|
+
- Average time per story
|
|
270
|
+
- Token usage by phase/model
|
|
271
|
+
- Cost analysis with ROI
|
|
272
|
+
- Debug loop frequency
|
|
273
|
+
- Verification success rate
|
|
274
|
+
- Human intervention rate
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## From 3.1
|
|
279
|
+
|
|
280
|
+
### Intelligent Task Parallelization
|
|
281
|
+
Tasks without dependencies run simultaneously:
|
|
282
|
+
```
|
|
283
|
+
Wave 1: [T001, T003] → Parallel (no deps)
|
|
284
|
+
Wave 2: [T002] → After T001
|
|
285
|
+
Wave 3: [T004] → After T002
|
|
286
|
+
|
|
287
|
+
Result: 40% faster execution
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Pre-Commit Review (ctx-reviewer)
|
|
291
|
+
Catches errors BEFORE they're committed:
|
|
292
|
+
- Type errors (TypeScript, Python, Go)
|
|
293
|
+
- Unresolved imports
|
|
294
|
+
- Circular dependencies
|
|
295
|
+
- Security vulnerabilities
|
|
296
|
+
- Empty catch blocks, console.logs
|
|
297
|
+
|
|
298
|
+
```
|
|
299
|
+
[CTX] Pre-Commit Review
|
|
300
|
+
✅ Types: Pass
|
|
301
|
+
✅ Imports: Pass
|
|
302
|
+
⚠️ Medium: 2 console.log statements
|
|
303
|
+
❌ Critical: SQL injection risk at line 45
|
|
304
|
+
|
|
305
|
+
Status: BLOCKED - Fix critical issue
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Acceptance Criteria Auto-Generation
|
|
309
|
+
AI suggests comprehensive criteria:
|
|
310
|
+
```
|
|
311
|
+
Story: "Add user authentication"
|
|
312
|
+
|
|
313
|
+
Suggested Criteria:
|
|
314
|
+
✓ User can register with email/password
|
|
315
|
+
✓ Invalid credentials show error
|
|
316
|
+
✓ Passwords hashed with bcrypt
|
|
317
|
+
✓ Session expires after 24h
|
|
318
|
+
✓ Brute force protection enabled
|
|
319
|
+
|
|
320
|
+
[A] Accept all [B] See more [C] Edit
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### Smart Context Handoff
|
|
324
|
+
Seamless transitions at context limits:
|
|
325
|
+
|
|
326
|
+
| Threshold | Action |
|
|
327
|
+
|-----------|--------|
|
|
328
|
+
| 40% | Prepare handoff notes |
|
|
329
|
+
| 50% | Write HANDOFF.md, warn |
|
|
330
|
+
| 60% | Spawn fresh agent |
|
|
331
|
+
|
|
332
|
+
Zero information loss. Work continues automatically.
|
|
333
|
+
|
|
334
|
+
### Issue Tracker Integration
|
|
335
|
+
Sync with Linear, Jira, or GitHub Issues:
|
|
336
|
+
```bash
|
|
337
|
+
/ctx integrate linear # Setup Linear
|
|
338
|
+
/ctx integrate jira # Setup Jira
|
|
339
|
+
/ctx integrate github # Setup GitHub Issues
|
|
340
|
+
/ctx integrate --sync # Force sync all stories
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Features:
|
|
344
|
+
- Bidirectional story sync
|
|
345
|
+
- Status mapping (CTX → tracker)
|
|
346
|
+
- Auto-close on verify pass
|
|
347
|
+
- Comment on verify fail
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## From 3.0
|
|
57
352
|
|
|
58
353
|
### Repository Mapping (like Aider)
|
|
59
354
|
```bash
|
|
@@ -203,6 +498,57 @@ Results synthesized into `SUMMARY.md`.
|
|
|
203
498
|
| `/ctx phase add "goal"` | Add new phase |
|
|
204
499
|
| `/ctx phase next` | Complete current, move to next |
|
|
205
500
|
|
|
501
|
+
### Integration
|
|
502
|
+
| Command | Purpose |
|
|
503
|
+
|---------|---------|
|
|
504
|
+
| `/ctx integrate` | Show integration status |
|
|
505
|
+
| `/ctx integrate linear` | Setup Linear |
|
|
506
|
+
| `/ctx integrate jira` | Setup Jira |
|
|
507
|
+
| `/ctx integrate github` | Setup GitHub Issues |
|
|
508
|
+
| `/ctx integrate --sync` | Sync all stories |
|
|
509
|
+
|
|
510
|
+
### Milestone
|
|
511
|
+
| Command | Purpose |
|
|
512
|
+
|---------|---------|
|
|
513
|
+
| `/ctx milestone` | Show current milestone |
|
|
514
|
+
| `/ctx milestone list` | List all milestones |
|
|
515
|
+
| `/ctx milestone audit` | Verify completion |
|
|
516
|
+
| `/ctx milestone complete` | Archive and tag |
|
|
517
|
+
| `/ctx milestone new [name]` | Start next version |
|
|
518
|
+
| `/ctx milestone gaps` | Generate fix phases |
|
|
519
|
+
|
|
520
|
+
### Metrics & Audit
|
|
521
|
+
| Command | Purpose |
|
|
522
|
+
|---------|---------|
|
|
523
|
+
| `/ctx metrics` | Show productivity dashboard |
|
|
524
|
+
| `/ctx metrics cost` | Cost analysis |
|
|
525
|
+
| `/ctx metrics export` | Export HTML dashboard |
|
|
526
|
+
| `/ctx audit` | Show audit summary |
|
|
527
|
+
| `/ctx audit export` | Generate compliance report |
|
|
528
|
+
|
|
529
|
+
### Learning & Prediction
|
|
530
|
+
| Command | Purpose |
|
|
531
|
+
|---------|---------|
|
|
532
|
+
| `/ctx learn` | Show what CTX has learned |
|
|
533
|
+
| `/ctx learn patterns` | Show code patterns |
|
|
534
|
+
| `/ctx learn decisions` | Show architectural decisions |
|
|
535
|
+
| `/ctx learn forget [id]` | Remove a learned pattern |
|
|
536
|
+
| `/ctx predict` | Get feature suggestions |
|
|
537
|
+
| `/ctx predict --quick` | Quick wins only |
|
|
538
|
+
| `/ctx predict --create [id]` | Create story from suggestion |
|
|
539
|
+
|
|
540
|
+
### Monitoring & Voice
|
|
541
|
+
| Command | Purpose |
|
|
542
|
+
|---------|---------|
|
|
543
|
+
| `/ctx monitor` | Show monitoring status |
|
|
544
|
+
| `/ctx monitor connect sentry` | Connect Sentry |
|
|
545
|
+
| `/ctx monitor errors` | List recent errors |
|
|
546
|
+
| `/ctx monitor auto-fix [id]` | Auto-fix with PR |
|
|
547
|
+
| `/ctx monitor --watch` | Continuous monitoring |
|
|
548
|
+
| `/ctx voice` | Start voice input |
|
|
549
|
+
| `/ctx voice --continuous` | Always listening mode |
|
|
550
|
+
| `/ctx voice --dictate` | Long-form dictation |
|
|
551
|
+
|
|
206
552
|
---
|
|
207
553
|
|
|
208
554
|
## State Machine
|
|
@@ -246,7 +592,7 @@ Smart handoff creates `HANDOFF.md` with:
|
|
|
246
592
|
|
|
247
593
|
---
|
|
248
594
|
|
|
249
|
-
##
|
|
595
|
+
## 20 Specialized Agents
|
|
250
596
|
|
|
251
597
|
| Agent | Spawned when | Model (balanced) |
|
|
252
598
|
|-------|--------------|------------------|
|
|
@@ -262,6 +608,14 @@ Smart handoff creates `HANDOFF.md` with:
|
|
|
262
608
|
| ctx-designer | design stories | sonnet |
|
|
263
609
|
| ctx-debugger | status = debugging | sonnet |
|
|
264
610
|
| ctx-verifier | status = verifying | haiku |
|
|
611
|
+
| ctx-parallelizer | before execution | haiku |
|
|
612
|
+
| ctx-reviewer | before commit | sonnet |
|
|
613
|
+
| ctx-criteria-suggester | during init/discuss | sonnet |
|
|
614
|
+
| ctx-handoff | at context thresholds | haiku |
|
|
615
|
+
| ctx-team-coordinator | team mode | sonnet |
|
|
616
|
+
| ctx-auditor | always (background) | haiku |
|
|
617
|
+
| ctx-learner | observing patterns | haiku |
|
|
618
|
+
| ctx-predictor | after milestone/on demand | sonnet |
|
|
265
619
|
|
|
266
620
|
---
|
|
267
621
|
|
|
@@ -399,6 +753,6 @@ MIT
|
|
|
399
753
|
|
|
400
754
|
**[GitHub](https://github.com/jufjuf/CTX)** · **[Issues](https://github.com/jufjuf/CTX/issues)** · **[npm](https://www.npmjs.com/package/ctx-cc)**
|
|
401
755
|
|
|
402
|
-
*CTX 3.
|
|
756
|
+
*CTX 3.3 - AI that learns your preferences. Predictive planning. Self-healing. Voice control.*
|
|
403
757
|
|
|
404
758
|
</div>
|