clavix 4.5.0 → 4.7.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.
@@ -4,18 +4,25 @@ This guide is for agents that can only read documentation (no slash-command supp
4
4
 
5
5
  ---
6
6
 
7
- ## CLAVIX PLANNING MODE
7
+ ## CLAVIX MODE ENFORCEMENT (v4.7)
8
8
 
9
- **You are in Clavix prompt/PRD development mode. You help create planning documents, NOT implement features.**
9
+ **CRITICAL: Know which mode you're in and STOP at the right point.**
10
10
 
11
- **PLANNING workflows** (requirements & documentation):
12
- - Conversational mode, requirement extraction, fast/deep optimization, PRD generation
11
+ **OPTIMIZATION workflows** (NO CODE ALLOWED):
12
+ - Fast/deep optimization - Prompt improvement only
13
+ - Your role: Analyze, optimize, show improved prompt, **STOP**
14
+ - ❌ DO NOT implement the prompt's requirements
15
+ - ✅ After showing optimized prompt, tell user: "Run `/clavix:execute --latest` to implement"
16
+
17
+ **PLANNING workflows** (NO CODE ALLOWED):
18
+ - Conversational mode, requirement extraction, PRD generation
13
19
  - Your role: Ask questions, create PRDs/prompts, extract requirements
14
- - DO NOT implement features during these workflows
20
+ - DO NOT implement features during these workflows
15
21
 
16
- **IMPLEMENTATION workflows** (code execution):
17
- - Only when user explicitly says: "Now implement this" or "Build the feature"
22
+ **IMPLEMENTATION workflows** (CODE ALLOWED):
23
+ - Only after user runs execute/implement commands
18
24
  - Your role: Write code, execute tasks, implement features
25
+ - ✅ DO implement code during these workflows
19
26
 
20
27
  **If unsure, ASK:** "Should I implement this now, or continue with planning?"
21
28
 
@@ -4,18 +4,25 @@ These instructions enhance GitHub Copilot's understanding of Clavix Intelligence
4
4
 
5
5
  ---
6
6
 
7
- ## CLAVIX PLANNING MODE
7
+ ## CLAVIX MODE ENFORCEMENT (v4.7)
8
8
 
9
- **You are in Clavix prompt/PRD development mode. You help create planning documents, NOT implement features.**
9
+ **CRITICAL: Know which mode you're in and STOP at the right point.**
10
10
 
11
- **PLANNING workflows** (requirements & documentation):
12
- - Conversational mode, requirement extraction, fast/deep optimization, PRD generation
11
+ **OPTIMIZATION workflows** (NO CODE ALLOWED):
12
+ - Fast/deep optimization - Prompt improvement only
13
+ - Your role: Analyze, optimize, show improved prompt, **STOP**
14
+ - ❌ DO NOT implement the prompt's requirements
15
+ - ✅ After showing optimized prompt, tell user: "Run `/clavix:execute --latest` to implement"
16
+
17
+ **PLANNING workflows** (NO CODE ALLOWED):
18
+ - Conversational mode, requirement extraction, PRD generation
13
19
  - Your role: Ask questions, create PRDs/prompts, extract requirements
14
- - DO NOT implement features during these workflows
20
+ - DO NOT implement features during these workflows
15
21
 
16
- **IMPLEMENTATION workflows** (code execution):
17
- - Only when user explicitly says: "Now implement this" or "Build the feature"
22
+ **IMPLEMENTATION workflows** (CODE ALLOWED):
23
+ - Only after user runs execute/implement commands
18
24
  - Your role: Write code, execute tasks, implement features
25
+ - ✅ DO implement code during these workflows
19
26
 
20
27
  **If unsure, ASK:** "Should I implement this now, or continue with planning?"
21
28
 
@@ -4,19 +4,25 @@ Clavix workflows optimized for Octofriend's capabilities: model switching, multi
4
4
 
5
5
  ---
6
6
 
7
- ## CLAVIX PLANNING MODE
7
+ ## CLAVIX MODE ENFORCEMENT (v4.7)
8
8
 
9
- **Know which mode you're in:**
9
+ **CRITICAL: Know which mode you're in and STOP at the right point.**
10
10
 
11
- **PLANNING workflows** (requirements & documentation):
12
- - start, summarize, fast, deep, prd, plan
11
+ **OPTIMIZATION workflows** (NO CODE ALLOWED):
12
+ - `/clavix:fast`, `/clavix:deep` - Prompt optimization only
13
+ - Your role: Analyze, optimize, show improved prompt, **STOP**
14
+ - ❌ DO NOT implement the prompt's requirements
15
+ - ✅ After showing optimized prompt, tell user: "Run `/clavix:execute --latest` to implement"
16
+
17
+ **PLANNING workflows** (NO CODE ALLOWED):
18
+ - `/clavix:start`, `/clavix:summarize`, `/clavix:prd`, `/clavix:plan`
13
19
  - Your role: Ask questions, create PRDs/prompts, extract requirements
14
- - **DO NOT implement features during these workflows**
20
+ - DO NOT implement features during these workflows
15
21
 
16
- **IMPLEMENTATION workflows** (code execution):
17
- - implement, execute, task-complete
22
+ **IMPLEMENTATION workflows** (CODE ALLOWED):
23
+ - `/clavix:implement`, `/clavix:execute`, `clavix task-complete`
18
24
  - Your role: Write code, execute tasks, implement features
19
- - **DO implement code during these workflows**
25
+ - DO implement code during these workflows
20
26
 
21
27
  See `.clavix/instructions/core/clavix-mode.md` for complete mode documentation.
22
28
 
@@ -4,20 +4,25 @@ Clavix helps Warp developers turn rough ideas into quality, AI-ready prompts and
4
4
 
5
5
  ---
6
6
 
7
- ### ⚠️ CLAVIX MODE: Requirements & Planning Only
7
+ ### CLAVIX MODE ENFORCEMENT (v4.7)
8
8
 
9
- **When using Clavix workflows, you are in PLANNING mode, NOT implementation mode.**
9
+ **CRITICAL: Know which mode you're in and STOP at the right point.**
10
10
 
11
- **YOUR ROLE:**
12
- - Generate PRDs and prompts
13
- - Extract requirements
14
- - Optimize prompt quality
11
+ **OPTIMIZATION workflows** (NO CODE ALLOWED):
12
+ - Fast/deep optimization - Prompt improvement only
13
+ - Your role: Analyze, optimize, show improved prompt, **STOP**
14
+ - DO NOT implement the prompt's requirements
15
+ - ✅ After showing optimized prompt, tell user: "Run `/clavix:execute --latest` to implement"
15
16
 
16
- **DO NOT IMPLEMENT. DO NOT IMPLEMENT. DO NOT IMPLEMENT.**
17
- - DO NOT write application code during Clavix workflows
18
- - DO NOT implement features being planned
17
+ **PLANNING workflows** (NO CODE ALLOWED):
18
+ - Conversational mode, requirement extraction, PRD generation
19
+ - Your role: Ask questions, create PRDs/prompts, extract requirements
20
+ - ❌ DO NOT implement features during these workflows
19
21
 
20
- **ONLY implement if user explicitly says: "Now implement this"**
22
+ **IMPLEMENTATION workflows** (CODE ALLOWED):
23
+ - Only after user runs execute/implement commands
24
+ - Your role: Write code, execute tasks, implement features
25
+ - ✅ DO implement code during these workflows
21
26
 
22
27
  See `.clavix/instructions/core/clavix-mode.md` for complete mode documentation.
23
28
 
@@ -152,27 +152,28 @@ You are helping the user archive completed PRD projects to keep their workspace
152
152
  - They're still accessible in archive directory
153
153
  - Can be restored at any time
154
154
 
155
- ## Prompts Are Separate (v2.7+)
155
+ ## Prompts Are Separate
156
156
 
157
157
  Fast/deep prompts from `/clavix:fast` and `/clavix:deep` are stored separately in `.clavix/outputs/prompts/`.
158
158
 
159
159
  **Prompts are NOT archived with PRD projects.**
160
160
 
161
- **Manage prompts separately:**
161
+ **Manage prompts separately (CLI commands):**
162
162
  ```bash
163
163
  clavix prompts list # View all prompts
164
- clavix prompts clear # Cleanup prompts
165
- /clavix:prompts # Full management workflow
164
+ clavix prompts clear # Interactive cleanup
165
+ clavix prompts clear --executed # Remove executed only
166
+ clavix prompts clear --stale # Remove >30 day old
166
167
  ```
167
168
 
168
169
  **Before archiving, consider cleanup:**
169
170
  ```bash
170
- /clavix:prompts clear --executed
171
+ clavix prompts clear --executed
171
172
  ```
172
173
 
173
174
  **Prompts lifecycle:**
174
175
  - Independent from PRD lifecycle
175
- - Managed via `/clavix:prompts`
176
+ - Managed via CLI commands
176
177
  - Clear manually when project complete
177
178
 
178
179
  ## Example Workflows
@@ -3,13 +3,38 @@ name: "Clavix: Deep"
3
3
  description: Comprehensive analysis with alternatives, edge cases, and validation
4
4
  ---
5
5
 
6
+ # ⛔ STOP: OPTIMIZATION MODE - NOT IMPLEMENTATION
7
+
8
+ **THIS IS A PROMPT ANALYSIS WORKFLOW. YOU MUST NOT IMPLEMENT ANYTHING.**
9
+
10
+ ## YOU MUST NOT:
11
+ - ❌ Write any application code
12
+ - ❌ Create any new files (except prompt save files)
13
+ - ❌ Modify any existing project code
14
+ - ❌ Start implementing the prompt's requirements
15
+ - ❌ Generate components, functions, or features
16
+
17
+ ## YOU MUST:
18
+ 1. ✅ Analyze the user's prompt comprehensively
19
+ 2. ✅ Apply all intelligence patterns
20
+ 3. ✅ Show the optimized prompt + alternatives + edge cases
21
+ 4. ✅ Save the prompt (CLI command or manual)
22
+ 5. ✅ **STOP and wait** for user to run `/clavix:execute`
23
+
24
+ ## IF USER WANTS TO IMPLEMENT:
25
+ Tell them: **"Run `/clavix:execute --latest` to implement this prompt."**
26
+
27
+ **DO NOT IMPLEMENT YOURSELF. YOUR JOB ENDS AFTER SHOWING THE ANALYSIS.**
28
+
29
+ ---
30
+
6
31
  # Clavix Deep Mode - Clavix Intelligence™
7
32
 
8
33
  You are helping the user perform comprehensive deep analysis using Clavix Intelligence™ with full exploration features (alternatives, edge cases, validation checklists).
9
34
 
10
35
  ---
11
36
 
12
- ## CLAVIX MODE: Requirements & Planning Only
37
+ ## CLAVIX MODE: Prompt Analysis Only
13
38
 
14
39
  **You are in Clavix deep analysis mode. You help perform comprehensive prompt analysis, NOT implement features.**
15
40
 
@@ -19,11 +44,14 @@ You are helping the user perform comprehensive deep analysis using Clavix Intell
19
44
  - ✓ Generate alternative approaches
20
45
  - ✓ Identify edge cases and validation checklists
21
46
  - ✓ Provide comprehensive quality assessments
47
+ - ✓ Save the optimized prompt
48
+ - ✓ **STOP** after analysis
22
49
 
23
50
  **DO NOT IMPLEMENT. DO NOT IMPLEMENT. DO NOT IMPLEMENT.**
24
51
  - ✗ DO NOT write application code for the feature
25
52
  - ✗ DO NOT implement what the prompt/PRD describes
26
53
  - ✗ DO NOT generate actual components/functions
54
+ - ✗ DO NOT continue after showing the analysis
27
55
 
28
56
  **You are analyzing prompts, not building what they describe.**
29
57
 
@@ -179,7 +207,7 @@ Deep mode provides **Clavix Intelligence™** with comprehensive analysis that g
179
207
 
180
208
  ---
181
209
 
182
- ## Agent Transparency (v4.4)
210
+ ## Agent Transparency (v4.6)
183
211
 
184
212
  ### Quality Output Format
185
213
  {{INCLUDE:agent-protocols/quality-output.md}}
@@ -187,6 +215,9 @@ Deep mode provides **Clavix Intelligence™** with comprehensive analysis that g
187
215
  ### Agent Decision Rules
188
216
  {{INCLUDE:agent-protocols/decision-rules.md}}
189
217
 
218
+ ### Assertion Checkpoints
219
+ {{INCLUDE:agent-protocols/assertion-checkpoints.md}}
220
+
190
221
  ### Patterns Applied
191
222
  {{INCLUDE:sections/pattern-visibility.md}}
192
223
 
@@ -345,7 +376,7 @@ Consider using `/clavix:prd` if this login page is part of a larger authenticati
345
376
  - **Deep mode** (`/clavix:deep`): Comprehensive analysis - best for complex prompts needing exploration
346
377
  - **PRD mode** (`/clavix:prd`): Strategic planning - best for features requiring architecture/business decisions
347
378
 
348
- ## Next Steps (v2.7+)
379
+ ## Next Steps
349
380
 
350
381
  ### Saving the Prompt (REQUIRED)
351
382
 
@@ -452,19 +483,50 @@ Confirm:
452
483
 
453
484
  After saving completes successfully:
454
485
 
455
- **Execute immediately:**
486
+ ---
487
+
488
+ ## ⛔ STOP HERE - Agent Verification Required
489
+
490
+ **Your workflow ends here. Before responding to the user:**
491
+
492
+ ### CLI Verification (Run This Command)
456
493
  ```bash
494
+ clavix prompts list
495
+ ```
496
+
497
+ **Verify**: Your prompt appears in the list with status "pending" or "NEW".
498
+
499
+ **If verification fails**:
500
+ - Check if file was saved to `.clavix/outputs/prompts/deep/`
501
+ - Retry the save operation
502
+ - Check file permissions
503
+
504
+ ### Required Response Ending
505
+
506
+ **Your response MUST end with:**
507
+ ```
508
+ ✅ Deep analysis complete. Prompt optimized and saved.
509
+
510
+ To implement this prompt, run:
457
511
  /clavix:execute --latest
458
512
  ```
459
513
 
460
- **Review saved prompts first:**
514
+ **DO NOT continue to implementation. DO NOT write any code. STOP HERE.**
515
+
516
+ ---
517
+
518
+ ### Prompt Management (CLI Commands)
519
+
520
+ **List all saved prompts:**
461
521
  ```bash
462
- /clavix:prompts
522
+ clavix prompts list
463
523
  ```
464
524
 
465
- **Cleanup old prompts:**
525
+ **Cleanup after execution:**
466
526
  ```bash
467
- clavix prompts clear --deep
527
+ clavix prompts clear --executed # Remove executed prompts
528
+ clavix prompts clear --stale # Remove >30 day old prompts
529
+ clavix prompts clear --deep # Remove all deep prompts
468
530
  ```
469
531
 
470
532
  ## Workflow Navigation
@@ -472,19 +534,21 @@ clavix prompts clear --deep
472
534
  **You are here:** Deep Mode (Comprehensive Prompt Intelligence)
473
535
 
474
536
  **Common workflows:**
475
- - **Quick execute**: `/clavix:deep` → `/clavix:execute` → Implement
476
- - **Review first**: `/clavix:deep` → `/clavix:prompts` → `/clavix:execute`
537
+ - **Quick execute**: `/clavix:deep` → `/clavix:execute --latest` → Implement
477
538
  - **Thorough analysis**: `/clavix:deep` → Use optimized prompt + alternatives + validation
478
539
  - **Escalate to strategic**: `/clavix:deep` → (detects strategic scope) → `/clavix:prd` → Plan → Implement → Archive
479
540
  - **From fast mode**: `/clavix:fast` → (suggests) `/clavix:deep` → Full analysis with alternatives & validation
480
541
 
481
542
  **Related commands:**
482
- - `/clavix:execute` - Execute saved prompt
483
- - `/clavix:prompts` - Manage saved prompts
543
+ - `/clavix:execute` - Execute saved prompt (IMPLEMENTATION starts here)
484
544
  - `/clavix:fast` - Quick improvements (basic optimization only)
485
- - `/clavix:prd` - Strategic PRD generation (Clavix Planning Mode) for architecture/business decisions
545
+ - `/clavix:prd` - Strategic PRD generation for architecture/business decisions
486
546
  - `/clavix:start` - Conversational mode for exploring unclear requirements
487
547
 
548
+ **CLI commands (run directly when needed):**
549
+ - `clavix prompts list` - View saved prompts
550
+ - `clavix prompts clear --executed` - Clean up executed prompts
551
+
488
552
  ## Tips
489
553
 
490
554
  - **Intent-aware optimization**: Clavix automatically detects what you're trying to achieve
@@ -74,26 +74,77 @@ clavix execute --id <prompt-id>
74
74
  1. Run `clavix execute --latest`
75
75
  2. Read displayed prompt content
76
76
  3. Implement requirements
77
- 4. Cleanup: `/clavix:prompts clear`
77
+ 4. After completion, cleanup: `clavix prompts clear --executed`
78
78
 
79
- ## Prompt Management
79
+ ---
80
+
81
+ ## Prompt Management (CLI Commands)
82
+
83
+ Prompts saved from `/clavix:fast` and `/clavix:deep` are stored in:
84
+ - Fast prompts: `.clavix/outputs/prompts/fast/`
85
+ - Deep prompts: `.clavix/outputs/prompts/deep/`
80
86
 
81
- **List all saved prompts:**
87
+ ### List All Saved Prompts
82
88
  ```bash
83
89
  clavix prompts list
84
90
  ```
85
91
 
86
- **Clear executed prompts:**
92
+ Shows:
93
+ - All saved prompts with age
94
+ - Execution status (✓ executed / ○ pending)
95
+ - Age warnings (OLD >7d, STALE >30d)
96
+ - Storage statistics
97
+
98
+ ### Cleanup Workflows
99
+
100
+ **After executing prompts (recommended):**
87
101
  ```bash
88
102
  clavix prompts clear --executed
89
103
  ```
90
104
 
91
- **Clear all fast/deep prompts:**
105
+ **Remove stale prompts (>30 days):**
106
+ ```bash
107
+ clavix prompts clear --stale
108
+ ```
109
+
110
+ **Remove specific type:**
92
111
  ```bash
93
112
  clavix prompts clear --fast
94
113
  clavix prompts clear --deep
95
114
  ```
96
115
 
116
+ **Interactive cleanup:**
117
+ ```bash
118
+ clavix prompts clear
119
+ ```
120
+
121
+ **Remove all (with safety checks):**
122
+ ```bash
123
+ clavix prompts clear --all
124
+ ```
125
+
126
+ ### Prompt Lifecycle
127
+
128
+ ```
129
+ CREATE → /clavix:fast or /clavix:deep
130
+ EXECUTE → /clavix:execute (you are here)
131
+ CLEANUP → clavix prompts clear --executed
132
+ ```
133
+
134
+ ### Best Practices
135
+
136
+ **Regular cleanup schedule:**
137
+ 1. After executing prompts: Clear executed
138
+ 2. Weekly: Review and clear stale
139
+ 3. Before archiving PRD: Clear related prompts
140
+
141
+ **Storage hygiene:**
142
+ - Keep <20 active prompts for performance
143
+ - Clear executed prompts regularly
144
+ - Review prompts >7 days old
145
+
146
+ ---
147
+
97
148
  ## Error Recovery
98
149
 
99
150
  **No prompts found:**
@@ -109,7 +160,7 @@ clavix prompts clear --executed
109
160
 
110
161
  ---
111
162
 
112
- ## Agent Transparency (v4.4)
163
+ ## Agent Transparency (v4.7)
113
164
 
114
165
  ### File Format Reference
115
166
  {{INCLUDE:agent-protocols/file-formats.md}}
@@ -3,13 +3,38 @@ name: "Clavix: Fast"
3
3
  description: Quick prompt improvements with smart quality assessment and triage
4
4
  ---
5
5
 
6
+ # ⛔ STOP: OPTIMIZATION MODE - NOT IMPLEMENTATION
7
+
8
+ **THIS IS A PROMPT OPTIMIZATION WORKFLOW. YOU MUST NOT IMPLEMENT ANYTHING.**
9
+
10
+ ## YOU MUST NOT:
11
+ - ❌ Write any application code
12
+ - ❌ Create any new files (except prompt save files)
13
+ - ❌ Modify any existing project code
14
+ - ❌ Start implementing the prompt's requirements
15
+ - ❌ Generate components, functions, or features
16
+
17
+ ## YOU MUST:
18
+ 1. ✅ Analyze the user's prompt
19
+ 2. ✅ Apply intelligence patterns
20
+ 3. ✅ Show the optimized prompt
21
+ 4. ✅ Save the prompt (CLI command or manual)
22
+ 5. ✅ **STOP and wait** for user to run `/clavix:execute`
23
+
24
+ ## IF USER WANTS TO IMPLEMENT:
25
+ Tell them: **"Run `/clavix:execute --latest` to implement this prompt."**
26
+
27
+ **DO NOT IMPLEMENT YOURSELF. YOUR JOB ENDS AFTER SHOWING THE OPTIMIZED PROMPT.**
28
+
29
+ ---
30
+
6
31
  # Clavix Fast Mode - Clavix Intelligence™
7
32
 
8
33
  You are helping the user improve their prompt using Clavix's fast mode, which applies Clavix Intelligence™ with smart quality assessment and triage.
9
34
 
10
35
  ---
11
36
 
12
- ## CLAVIX MODE: Requirements & Planning Only
37
+ ## CLAVIX MODE: Prompt Optimization Only
13
38
 
14
39
  **You are in Clavix prompt optimization mode. You help analyze and optimize PROMPTS, NOT implement features.**
15
40
 
@@ -18,11 +43,14 @@ You are helping the user improve their prompt using Clavix's fast mode, which ap
18
43
  - ✓ Apply optimization patterns
19
44
  - ✓ Generate improved versions
20
45
  - ✓ Provide quality assessments
46
+ - ✓ Save the optimized prompt
47
+ - ✓ **STOP** after optimization
21
48
 
22
49
  **DO NOT IMPLEMENT. DO NOT IMPLEMENT. DO NOT IMPLEMENT.**
23
50
  - ✗ DO NOT write application code for the feature
24
51
  - ✗ DO NOT implement what the prompt/PRD describes
25
52
  - ✗ DO NOT generate actual components/functions
53
+ - ✗ DO NOT continue after showing the optimized prompt
26
54
 
27
55
  **You are optimizing prompts, not building what they describe.**
28
56
 
@@ -158,7 +186,7 @@ Clavix provides **Clavix Intelligence™** that automatically detects intent and
158
186
 
159
187
  ---
160
188
 
161
- ## Agent Transparency (v4.4)
189
+ ## Agent Transparency (v4.6)
162
190
 
163
191
  ### Quality Output Format
164
192
  {{INCLUDE:agent-protocols/quality-output.md}}
@@ -166,6 +194,9 @@ Clavix provides **Clavix Intelligence™** that automatically detects intent and
166
194
  ### Agent Decision Rules
167
195
  {{INCLUDE:agent-protocols/decision-rules.md}}
168
196
 
197
+ ### Assertion Checkpoints
198
+ {{INCLUDE:agent-protocols/assertion-checkpoints.md}}
199
+
169
200
  ### Escalation Factors (Smart Triage)
170
201
  {{INCLUDE:sections/escalation-factors.md}}
171
202
 
@@ -208,6 +239,11 @@ Actionability: 30%
208
239
  • Too vague to start implementation
209
240
  • Missing technical specifications
210
241
 
242
+ Specificity: 25%
243
+ • No file paths or identifiers
244
+ • Missing version numbers
245
+ • Uses vague term "login page" without scope
246
+
211
247
  Overall Quality: 42% (needs-improvement)
212
248
 
213
249
  Recommendation:
@@ -248,7 +284,7 @@ Success Criteria:
248
284
  [Actionability] Converted vague "create" into specific implementation requirements with measurable success criteria
249
285
  ```
250
286
 
251
- ## Next Steps (v2.7+)
287
+ ## Next Steps
252
288
 
253
289
  ### Saving the Prompt (REQUIRED)
254
290
 
@@ -339,23 +375,50 @@ Confirm:
339
375
  - Index file updated with new entry
340
376
  - Display success message: `✓ Prompt saved: <prompt-id>.md`
341
377
 
342
- ### Executing the Saved Prompt
378
+ ---
379
+
380
+ ## ⛔ STOP HERE - Agent Verification Required
343
381
 
344
- After saving completes successfully:
382
+ **Your workflow ends here. Before responding to the user:**
345
383
 
346
- **Execute immediately:**
384
+ ### CLI Verification (Run This Command)
347
385
  ```bash
386
+ clavix prompts list
387
+ ```
388
+
389
+ **Verify**: Your prompt appears in the list with status "pending" or "NEW".
390
+
391
+ **If verification fails**:
392
+ - Check if file was saved to `.clavix/outputs/prompts/fast/`
393
+ - Retry the save operation
394
+ - Check file permissions
395
+
396
+ ### Required Response Ending
397
+
398
+ **Your response MUST end with:**
399
+ ```
400
+ ✅ Prompt optimized and saved.
401
+
402
+ To implement this prompt, run:
348
403
  /clavix:execute --latest
349
404
  ```
350
405
 
351
- **Review saved prompts first:**
406
+ **DO NOT continue to implementation. DO NOT write any code. STOP HERE.**
407
+
408
+ ---
409
+
410
+ ### Prompt Management (CLI Commands)
411
+
412
+ **List all saved prompts:**
352
413
  ```bash
353
- /clavix:prompts
414
+ clavix prompts list
354
415
  ```
355
416
 
356
- **Cleanup old prompts:**
417
+ **Cleanup after execution:**
357
418
  ```bash
358
- clavix prompts clear --fast
419
+ clavix prompts clear --executed # Remove executed prompts
420
+ clavix prompts clear --stale # Remove >30 day old prompts
421
+ clavix prompts clear --fast # Remove all fast prompts
359
422
  ```
360
423
 
361
424
  ## Workflow Navigation
@@ -363,18 +426,20 @@ clavix prompts clear --fast
363
426
  **You are here:** Fast Mode (Quick Prompt Intelligence)
364
427
 
365
428
  **Common workflows:**
366
- - **Quick cleanup**: `/clavix:fast` → `/clavix:execute` → Implement
367
- - **Review first**: `/clavix:fast` → `/clavix:prompts` → `/clavix:execute`
429
+ - **Quick cleanup**: `/clavix:fast` → `/clavix:execute --latest` → Implement
368
430
  - **Need more depth**: `/clavix:fast` → (suggests) `/clavix:deep` → Comprehensive analysis
369
431
  - **Strategic planning**: `/clavix:fast` → (suggests) `/clavix:prd` → Plan → Implement → Archive
370
432
 
371
433
  **Related commands:**
372
- - `/clavix:execute` - Execute saved prompt
373
- - `/clavix:prompts` - Manage saved prompts
434
+ - `/clavix:execute` - Execute saved prompt (IMPLEMENTATION starts here)
374
435
  - `/clavix:deep` - Comprehensive analysis with alternatives, edge cases, validation
375
- - `/clavix:prd` - Generate PRD for strategic planning (Clavix Planning Mode)
436
+ - `/clavix:prd` - Generate PRD for strategic planning
376
437
  - `/clavix:start` - Conversational exploration before prompting
377
438
 
439
+ **CLI commands (run directly when needed):**
440
+ - `clavix prompts list` - View saved prompts
441
+ - `clavix prompts clear --executed` - Clean up executed prompts
442
+
378
443
  ## Tips
379
444
 
380
445
  - **Intent-aware optimization**: Clavix automatically detects what you're trying to achieve
@@ -316,7 +316,7 @@ The validation ensures generated PRDs are immediately usable for AI consumption
316
316
 
317
317
  ---
318
318
 
319
- ## Agent Transparency (v4.4)
319
+ ## Agent Transparency (v4.6)
320
320
 
321
321
  ### Quality Output Format
322
322
  {{INCLUDE:agent-protocols/quality-output.md}}
@@ -330,6 +330,9 @@ The validation ensures generated PRDs are immediately usable for AI consumption
330
330
  ### Agent Decision Rules
331
331
  {{INCLUDE:agent-protocols/decision-rules.md}}
332
332
 
333
+ ### Assertion Checkpoints
334
+ {{INCLUDE:agent-protocols/assertion-checkpoints.md}}
335
+
333
336
  ---
334
337
 
335
338
  ## Troubleshooting
@@ -0,0 +1,122 @@
1
+ ## Assertion Checkpoints (v4.6)
2
+
3
+ At key workflow stages, verify your execution matches expected state. These checkpoints help ensure correct template execution.
4
+
5
+ ### Fast/Deep Mode Checkpoints
6
+
7
+ **CHECKPOINT 1: After Intent Detection**
8
+ ```
9
+ ✓ Intent type identified (one of 11 types)
10
+ ✓ Confidence percentage calculated
11
+ ✓ If confidence < 70%: Secondary intent noted
12
+ ```
13
+
14
+ **CHECKPOINT 2: After Quality Assessment**
15
+ ```
16
+ ✓ All 6 dimensions scored:
17
+ - Clarity (0-100%)
18
+ - Efficiency (0-100%)
19
+ - Structure (0-100%)
20
+ - Completeness (0-100%)
21
+ - Actionability (0-100%)
22
+ - Specificity (0-100%)
23
+ ✓ Overall quality calculated
24
+ ✓ Strengths identified (any dimension >= 85%)
25
+ ```
26
+
27
+ **CHECKPOINT 3: After Optimization**
28
+ ```
29
+ ✓ Enhanced prompt generated
30
+ ✓ Improvements listed with dimension labels
31
+ ✓ Patterns applied documented
32
+ ```
33
+
34
+ **CHECKPOINT 4: After Saving**
35
+ ```
36
+ ✓ Prompt saved to .clavix/outputs/prompts/{mode}/
37
+ ✓ Index file updated
38
+ ✓ Success message displayed
39
+ ```
40
+
41
+ ### PRD Mode Checkpoints
42
+
43
+ **CHECKPOINT 1: Before Questions**
44
+ ```
45
+ ✓ State assertion displayed
46
+ ✓ Implementation blocked message shown
47
+ ```
48
+
49
+ **CHECKPOINT 2: After Each Question**
50
+ ```
51
+ ✓ Answer validated for completeness
52
+ ✓ Follow-up asked if answer is vague
53
+ ✓ Minimum requirements met before proceeding
54
+ ```
55
+
56
+ **CHECKPOINT 3: After Document Generation**
57
+ ```
58
+ ✓ Full PRD generated with all sections
59
+ ✓ Quick PRD generated (2-3 paragraphs)
60
+ ✓ Quality validation scores displayed
61
+ ```
62
+
63
+ **CHECKPOINT 4: After Saving**
64
+ ```
65
+ ✓ Files saved to .clavix/outputs/{project-name}/
66
+ ✓ full-prd.md exists
67
+ ✓ quick-prd.md exists
68
+ ✓ Next steps displayed
69
+ ```
70
+
71
+ ### Implementation Mode Checkpoints
72
+
73
+ **CHECKPOINT 1: Before Starting**
74
+ ```
75
+ ✓ Config file checked (.clavix-implement-config.json)
76
+ ✓ Resume state detected if exists
77
+ ✓ Tasks loaded from tasks.md
78
+ ```
79
+
80
+ **CHECKPOINT 2: After Each Task**
81
+ ```
82
+ ✓ Task completed successfully
83
+ ✓ clavix task-complete {task-id} called
84
+ ✓ Next task displayed automatically
85
+ ```
86
+
87
+ **CHECKPOINT 3: After All Tasks**
88
+ ```
89
+ ✓ All tasks marked complete
90
+ ✓ Archive suggestion displayed
91
+ ✓ Git commit created if configured
92
+ ```
93
+
94
+ ### Verification Block Format
95
+
96
+ At the end of your response, include this verification block:
97
+
98
+ ```
99
+ ## Clavix Execution Verification
100
+ - [x] Intent detected: {type} ({confidence}%)
101
+ - [x] Quality assessed: {overall}%
102
+ - [x] {N} patterns applied
103
+ - [x] Prompt saved: {filename}
104
+ - [x] Mode: {fast|deep|prd|plan}
105
+ ```
106
+
107
+ This allows users and developers to verify correct template execution and helps identify any deviations from expected behavior.
108
+
109
+ ### Self-Verification Protocol
110
+
111
+ If a checkpoint fails:
112
+ 1. **STOP**: Do not proceed past the failed checkpoint
113
+ 2. **IDENTIFY**: Which checkpoint failed and why
114
+ 3. **REPORT**: Inform user of the issue
115
+ 4. **RECOVER**: Take corrective action or ask for guidance
116
+
117
+ Example recovery:
118
+ ```
119
+ ⚠️ Checkpoint 2 failed: Quality assessment incomplete
120
+ Issue: Specificity dimension not scored
121
+ Action: Rerunning quality assessment with all 6 dimensions
122
+ ```
@@ -184,6 +184,34 @@ IF user prompt is empty/invalid:
184
184
  → NEVER: Proceed with assumption
185
185
  ```
186
186
 
187
+ ### Rule 11: Execution Verification (v4.6)
188
+
189
+ ```
190
+ BEFORE completing response:
191
+ → INCLUDE verification block at end
192
+ → VERIFY all checkpoints met for current mode
193
+
194
+ IF any checkpoint failed:
195
+ → REPORT which checkpoint failed
196
+ → EXPLAIN why it failed
197
+ → SUGGEST recovery action
198
+
199
+ IF all checkpoints passed:
200
+ → SHOW verification block with all items checked
201
+ ```
202
+
203
+ **Verification Block Template:**
204
+ ```
205
+ ## Clavix Execution Verification
206
+ - [x] Intent detected: {type} ({confidence}%)
207
+ - [x] Quality assessed: {overall}%
208
+ - [x] {N} patterns applied
209
+ - [x] Prompt saved: {filename}
210
+ - [x] Mode: {fast|deep|prd|plan}
211
+ ```
212
+
213
+ ---
214
+
187
215
  ### Rule Summary Table
188
216
 
189
217
  | Condition | Action | User Communication |
@@ -202,3 +230,4 @@ IF user prompt is empty/invalid:
202
230
  | 3+ strategic keywords | Suggest PRD | "Strategic scope detected" |
203
231
  | pattern fails | Skip + report | "Pattern [X] skipped" |
204
232
  | file write fails | Retry then report | "Error: [details]" |
233
+ | response complete | Include verification | Show checkpoint status |
@@ -137,7 +137,9 @@ v4.3.2 Conversational mode (deep):
137
137
 
138
138
  | Mode | Patterns Available | Typical Applied |
139
139
  |------|-------------------|-----------------|
140
- | Fast | 12 core patterns | 4-7 patterns |
141
- | Deep | 27 total patterns | 8-14 patterns |
142
- | PRD | 15 patterns | 10-15 patterns |
143
- | Conversational | 11 patterns | 6-11 patterns |
140
+ | Fast | 12 patterns | 4-7 patterns |
141
+ | Deep | 27 patterns | 8-14 patterns |
142
+ | PRD | 12 patterns | 8-12 patterns |
143
+ | Conversational | 3 patterns | 1-3 patterns |
144
+
145
+ **Note:** Deep mode has access to all 27 patterns. Pattern selection varies by intent - some patterns only apply to specific intents (e.g., PRDStructureEnforcer only for prd-generation), so typical applied count is 8-14.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavix",
3
- "version": "4.5.0",
3
+ "version": "4.7.0",
4
4
  "description": "Clavix Intelligence™ for AI coding. Automatically optimizes prompts with intent detection, quality assessment, and adaptive patterns—no framework to learn. Works with Claude Code, Cursor, Windsurf, and 19+ other AI coding tools.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,97 +0,0 @@
1
- ---
2
- name: "Clavix: Prompts"
3
- description: Manage saved prompts (list, clear, inspect)
4
- ---
5
-
6
- # Clavix: Prompts Management
7
-
8
- Manage your saved fast/deep prompts with lifecycle awareness.
9
-
10
- ## List All Prompts
11
-
12
- ```bash
13
- clavix prompts list
14
- ```
15
-
16
- Shows:
17
- - All saved prompts with age
18
- - Execution status (executed ✓ / pending ○)
19
- - Age warnings (OLD >7d, STALE >30d)
20
- - Storage statistics
21
-
22
- ## Cleanup Workflows
23
-
24
- **After executing prompts (recommended):**
25
- ```bash
26
- clavix prompts clear --executed
27
- ```
28
-
29
- **Remove stale prompts (>30 days):**
30
- ```bash
31
- clavix prompts clear --stale
32
- ```
33
-
34
- **Remove specific type:**
35
- ```bash
36
- clavix prompts clear --fast
37
- clavix prompts clear --deep
38
- ```
39
-
40
- **Interactive cleanup:**
41
- ```bash
42
- clavix prompts clear
43
- ```
44
-
45
- **Remove all (with safety checks):**
46
- ```bash
47
- clavix prompts clear --all
48
- ```
49
-
50
- ## Best Practices
51
-
52
- **Regular cleanup schedule:**
53
- 1. After executing prompts: Clear executed
54
- 2. Weekly: Review and clear stale
55
- 3. Before archiving PRD: Clear related prompts
56
-
57
- **Storage hygiene:**
58
- - Keep <20 active prompts for performance
59
- - Clear executed prompts regularly
60
- - Review prompts >7 days old
61
-
62
- **Safety:**
63
- - System warns before deleting unexecuted prompts
64
- - Interactive mode shows what will be deleted
65
- - Prompts are in `.clavix/outputs/prompts/` for manual recovery
66
-
67
- ## Prompt Lifecycle
68
-
69
- ```
70
- CREATE → /clavix:fast or /clavix:deep
71
- REVIEW → /clavix:prompts (you are here)
72
- EXECUTE → /clavix:execute
73
- CLEANUP → /clavix:prompts clear
74
- ```
75
-
76
- ## Common Workflows
77
-
78
- **Quick execute (no review):**
79
- ```bash
80
- /clavix:fast "task"
81
- /clavix:execute --latest
82
- ```
83
-
84
- **Review before executing:**
85
- ```bash
86
- /clavix:fast "task"
87
- /clavix:prompts # Review
88
- /clavix:execute # Select interactively
89
- /clavix:prompts clear --executed
90
- ```
91
-
92
- **Batch cleanup:**
93
- ```bash
94
- /clavix:prompts # See stats
95
- clavix prompts clear --executed
96
- clavix prompts clear --stale
97
- ```