ctx-cc 3.3.2 → 3.3.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.
@@ -623,6 +623,45 @@ If ALL criteria pass:
623
623
  }
624
624
  ```
625
625
 
626
+ ## Delivery Guarantee Loop
627
+
628
+ ```
629
+ ┌─────────────────────────────────────────┐
630
+ │ DESIGN DELIVERY GUARANTEE LOOP │
631
+ ├─────────────────────────────────────────┤
632
+ │ │
633
+ │ verify design → ALL PASS? │
634
+ │ │ │
635
+ │ ├─ YES → COMPLETE (100% working) │
636
+ │ │ │
637
+ │ └─ NO → debug/fix → verify again │
638
+ │ ↑ │ │
639
+ │ └─────────────────────┘ │
640
+ │ │
641
+ │ Loop continues until: │
642
+ │ 1. ALL checks pass, OR │
643
+ │ 2. Max attempts (10) → escalate │
644
+ │ │
645
+ │ NEVER mark complete with failures │
646
+ │ │
647
+ └─────────────────────────────────────────┘
648
+ ```
649
+
650
+ **Design work is ONLY marked complete when:**
651
+ - ✓ All approval gates passed (mood board, direction, prototype)
652
+ - ✓ Three-level check passes (exists, substantive, wired)
653
+ - ✓ Visual verification matches prototype
654
+ - ✓ WCAG 2.2 AA compliance verified
655
+ - ✓ Browser renders correctly (all breakpoints)
656
+ - ✓ No console errors
657
+ - ✓ All acceptance criteria satisfied
658
+
659
+ **If ANY fails:**
660
+ - Set status = "debugging"
661
+ - Spawn ctx-debugger for technical issues
662
+ - Return to designer for visual/a11y issues
663
+ - Loop until 100% verified
664
+
626
665
  </verification>
627
666
 
628
667
  <output>
@@ -312,11 +312,40 @@ After each task:
312
312
  - Set status = "debugging"
313
313
  - Capture error details
314
314
  - Hand off to ctx-debugger
315
+ - **Loop until fixed** (debug → fix → verify → repeat)
315
316
 
316
317
  ### If All Tasks Complete
317
318
  - Set status = "verifying"
318
319
  - Hand off to ctx-verifier
319
320
 
321
+ ## 8. Delivery Guarantee
322
+
323
+ ```
324
+ ┌─────────────────────────────────────────┐
325
+ │ EXECUTOR DELIVERY GUARANTEE │
326
+ ├─────────────────────────────────────────┤
327
+ │ │
328
+ │ execute task → quick verify │
329
+ │ │ │
330
+ │ ├─ PASS → commit → next task │
331
+ │ │ │
332
+ │ └─ FAIL → debug → fix → verify │
333
+ │ ↑ │ │
334
+ │ └─────────────────────┘ │
335
+ │ │
336
+ │ NEVER commit failing code │
337
+ │ NEVER skip to next task on failure │
338
+ │ ALWAYS loop until 100% working │
339
+ │ │
340
+ └─────────────────────────────────────────┘
341
+ ```
342
+
343
+ **Task is ONLY committed when:**
344
+ - ✓ Build passes
345
+ - ✓ Tests pass
346
+ - ✓ Lint passes
347
+ - ✓ No blocking anti-patterns
348
+
320
349
  </process>
321
350
 
322
351
  <commit_message_examples>
@@ -148,6 +148,15 @@ Write `.ctx/phases/{story_id}/PLAN.md`:
148
148
  - Run tests
149
149
  - Browser verify each criterion
150
150
 
151
+ ## Delivery Guarantee
152
+ Every task loops until verified:
153
+ ```
154
+ execute → verify → PASS? → commit
155
+ ↓ NO
156
+ debug → fix → verify again
157
+ ```
158
+ NEVER mark done until ALL criteria pass.
159
+
151
160
  ## Notes
152
161
  {Key insights from research}
153
162
  ```
@@ -399,9 +399,42 @@ Based on results:
399
399
  - Update PRD progress
400
400
 
401
401
  **If FAIL:**
402
- - Create fix tasks mapped to failing criteria
403
- - Set status = "debugging" or "executing"
404
- - Keep current story
402
+ - Analyze failure type:
403
+ - **Build/Test/Runtime error** → Set status = "debugging"
404
+ - **Missing feature** → Set status = "executing" with fix tasks
405
+ - Record `debug_issue` with error details
406
+ - **DO NOT mark as complete until 100% pass**
407
+
408
+ ## 11. Delivery Guarantee Loop
409
+
410
+ ```
411
+ ┌─────────────────────────────────────────┐
412
+ │ DELIVERY GUARANTEE LOOP │
413
+ ├─────────────────────────────────────────┤
414
+ │ │
415
+ │ verify → ALL CRITERIA PASS? │
416
+ │ │ │
417
+ │ ├─ YES → COMPLETE (100% working) │
418
+ │ │ │
419
+ │ └─ NO → debug/fix → verify again │
420
+ │ ↑ │ │
421
+ │ └─────────────────────┘ │
422
+ │ │
423
+ │ Loop continues until: │
424
+ │ 1. ALL criteria pass, OR │
425
+ │ 2. Max debug attempts (10) → escalate │
426
+ │ │
427
+ │ NEVER mark complete with failures │
428
+ │ │
429
+ └─────────────────────────────────────────┘
430
+ ```
431
+
432
+ **Key principle:** Work is ONLY marked complete when:
433
+ - ✓ ALL acceptance criteria pass
434
+ - ✓ Three-level check passes (exists, substantive, wired)
435
+ - ✓ No blocking anti-patterns
436
+ - ✓ Browser verification passes (if UI)
437
+ - ✓ Build + Tests + Lint all green
405
438
 
406
439
  </process>
407
440
 
package/commands/ctx.md CHANGED
@@ -88,8 +88,12 @@ Route to: **Three-Level Verification**
88
88
  - Level 2: Substantive (real code, not stub?)
89
89
  - Level 3: Wired (imported and used?)
90
90
  3. Scan for anti-patterns (TODO, empty catch, placeholders)
91
- 4. If all pass: complete phase, update STATE.md
92
- 5. If fails: create fix tasks, set status = "executing"
91
+ 4. Browser verification (if UI)
92
+ 5. **DELIVERY GUARANTEE:**
93
+ - If ALL pass: complete phase → COMPLETE
94
+ - If ANY fail: set status = "debugging" → fix → verify again
95
+ - Loop until 100% working or max attempts
96
+ - NEVER mark complete with failures
93
97
 
94
98
  ### If status = "paused"
95
99
  Route to: **Resume**
@@ -149,9 +153,14 @@ executing → debugging (if verification fails)
149
153
  executing → verifying (if all tasks done)
150
154
  debugging → executing (if fix works)
151
155
  debugging → ESCALATE (if max attempts fail)
152
- verifying → executing (if anti-patterns found)
153
- verifying → COMPLETE (if all passes)
156
+ verifying → debugging (if any check fails) ← LOOP BACK
157
+ verifying → COMPLETE (if ALL pass 100%) ← ONLY EXIT
154
158
  paused → (previous state)
159
+
160
+ DELIVERY GUARANTEE LOOP:
161
+ verifying ←→ debugging ←→ executing
162
+
163
+ COMPLETE (only when 100% verified)
155
164
  ```
156
165
  </state_transitions>
157
166
 
@@ -121,8 +121,11 @@ Based on results:
121
121
  - Set status to "initializing" for next story
122
122
  - Update current story reference
123
123
  - **FAIL**:
124
- - Create fix tasks
125
- - Set status = "debugging" or "executing"
124
+ - Analyze failure type:
125
+ - **Build/Test/Runtime error** → Set status = "debugging" (spawn ctx-debugger)
126
+ - **Missing feature/incomplete** → Create fix tasks, set status = "executing"
127
+ - Record `debug_issue` in STATE.md with error details
128
+ - Debug mode will loop until fixed (max 10 attempts)
126
129
  </workflow>
127
130
 
128
131
  <output_format>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ctx-cc",
3
- "version": "3.3.2",
3
+ "version": "3.3.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",