clavix 4.11.1 β†’ 4.11.2

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,103 +4,84 @@ This directory contains the complete instruction set for AI agents consuming Cla
4
4
 
5
5
  ---
6
6
 
7
- ## πŸ“ Documentation Architecture
7
+ ## πŸ“ Documentation Architecture (v4.11)
8
8
 
9
9
  ```
10
10
  Canonical Templates (SOURCE OF TRUTH)
11
11
  src/templates/slash-commands/_canonical/
12
- β”œβ”€β”€ fast.md, deep.md, prd.md
13
- β”œβ”€β”€ start.md, summarize.md
14
- β”œβ”€β”€ plan.md, implement.md, execute.md
15
- └── archive.md, prompts.md
16
- ↓ (copied during clavix init)
17
- Instruction Files (AUTO-GENERATED)
12
+ β”œβ”€β”€ improve.md - Unified prompt optimization (standard + comprehensive)
13
+ β”œβ”€β”€ prd.md - PRD generation via Socratic questions
14
+ β”œβ”€β”€ start.md - Conversational mode entry
15
+ β”œβ”€β”€ summarize.md - Extract requirements from conversation
16
+ β”œβ”€β”€ plan.md - Task breakdown from PRD
17
+ β”œβ”€β”€ implement.md - Execute tasks with progress tracking
18
+ β”œβ”€β”€ execute.md - Run saved prompts
19
+ β”œβ”€β”€ verify.md - Post-implementation verification
20
+ └── archive.md - Archive completed projects
21
+ ↓ (referenced by)
22
+ Component Templates (REUSABLE BUILDING BLOCKS)
23
+ src/templates/slash-commands/_components/
24
+ β”œβ”€β”€ agent-protocols/ - Self-correction, state awareness, decision rules
25
+ β”œβ”€β”€ sections/ - Quality dimensions, patterns, escalation factors
26
+ └── troubleshooting/ - Mode confusion, triage escalation
27
+ ↓ (copied during clavix init/update)
28
+ User Instructions
18
29
  .clavix/instructions/
19
- β”œβ”€β”€ workflows/ - Complete workflows (COPIED from canonical)
20
- β”œβ”€β”€ core/ - Foundational concepts (static)
21
- └── troubleshooting/ - Common issues (static)
22
- ↓ (reference)
23
- Generic Connectors (THIN WRAPPERS)
24
- src/templates/agents/
25
- β”œβ”€β”€ agents.md - Generic agents
26
- β”œβ”€β”€ octo.md - Octofriend-specific
27
- β”œβ”€β”€ copilot-instructions.md - GitHub Copilot
28
- └── warp.md - Warp AI
30
+ β”œβ”€β”€ core/ - Foundational concepts (clavix-mode, verification)
31
+ └── troubleshooting/ - Common issues and fixes
32
+ ↓ (referenced by)
33
+ Integration Adapters (THIN WRAPPERS)
34
+ src/templates/integrations/
35
+ β”œβ”€β”€ claude-code/ - Claude Code adapter
36
+ β”œβ”€β”€ cursor/ - Cursor adapter
37
+ β”œβ”€β”€ windsurf/ - Windsurf adapter
38
+ └── ... (22 integrations total)
29
39
  ```
30
40
 
31
41
  ---
32
42
 
33
43
  ## 🎯 Core Principles
34
44
 
35
- ### 1. Single Source of Truth
45
+ ### 1. Canonical Templates = Single Source of Truth
36
46
 
37
- **Canonical templates** (`src/templates/slash-commands/_canonical/`) are the definitive reference:
38
- - Complete workflow descriptions
39
- - Official command behavior
40
- - Authoritative patterns and examples
47
+ **Canonical templates** (`src/templates/slash-commands/_canonical/`) define authoritative behavior:
48
+ - Complete workflow descriptions with all steps
49
+ - Official command behavior and output formats
50
+ - Patterns, examples, and edge cases
41
51
  - NEVER modified for size/brevity - they define the standard
42
52
 
43
- **Rule:** When canonical and instruction files conflict, canonical wins.
53
+ **Rule:** When in doubt, canonical templates are correct.
44
54
 
45
- ### 2. Agent-Optimized Instructions
55
+ ### 2. Component Templates = DRY Building Blocks
46
56
 
47
- **Instruction files** (`src/templates/instructions/`) are derived from canonical templates but optimized for AI agent consumption:
48
- - Must match canonical workflows 100% in substance
49
- - Can reorganize for better agent comprehension
50
- - Add explicit checkpoints, self-correction checks, troubleshooting
51
- - Include "Common Mistakes" sections with wrong/right examples
52
- - Expand on ambiguous points from canonical
57
+ **Component templates** (`src/templates/slash-commands/_components/`) provide reusable sections:
58
+ - `agent-protocols/` - Self-correction, state detection, decision rules
59
+ - `sections/` - Quality dimensions, pattern visibility, escalation factors
60
+ - `troubleshooting/` - Error recovery and mode confusion handling
53
61
 
54
- **Rule:** Instruction files implement canonical, never contradict it.
62
+ **Rule:** Shared content lives in components, not duplicated across canonicals.
55
63
 
56
- ### 3. Thin Generic Connectors
64
+ ### 3. Integration Adapters = Platform-Specific Wrappers
57
65
 
58
- **Generic connector files** (`src/templates/agents/`) are minimal wrappers:
59
- - Reference instruction files, don't duplicate them
60
- - Platform-specific guidance ONLY (model switching, tool limitations, etc.)
61
- - Brief workflow overview + standard workflow (PRD β†’ Plan β†’ Implement β†’ Archive)
62
- - Command quick reference table
63
- - Common mistakes specific to platform
66
+ **Integration adapters** (`src/templates/integrations/`) provide minimal platform wrappers:
67
+ - Reference canonical templates, don't duplicate content
68
+ - Platform-specific formatting and tool usage
69
+ - Command format transformation (colon vs hyphen separators)
70
+ - Model-specific guidance (context limits, tool availability)
64
71
 
65
- **Target sizes:**
66
- - agents.md: 4-7K (generic, no platform features)
67
- - octo.md: 7-10K (Octofriend has unique features)
68
- - copilot-instructions.md: 5-7K (GitHub Copilot integration)
69
- - warp.md: 5-7K (Warp AI-specific)
70
-
71
- **Rule:** If it's in an instruction file, don't duplicate it in a connector file.
72
+ **Rule:** If it's in canonical, don't duplicate in adapter.
72
73
 
73
74
  ---
74
75
 
75
76
  ## πŸ“‚ Directory Structure
76
77
 
77
- ### `/workflows/` - Step-by-Step Workflows
78
-
79
- Complete, executable workflows with explicit steps:
80
-
81
- | File | Purpose | Key Sections |
82
- |------|---------|--------------|
83
- | `start.md` | Conversational mode entry | Questions, complexity tracking, mode transitions |
84
- | `summarize.md` | Extract requirements from conversation | Pre-validation, extraction, file creation, optimization |
85
- | `fast.md` | Quick prompt optimization | Intent detection, quality assessment, smart triage |
86
- | `deep.md` | Comprehensive analysis | Strategic scope, alternatives, validation, edge cases, risks |
87
- | `prd.md` | PRD generation via Socratic questions | 5-question sequence, validation criteria, file-saving protocol |
88
-
89
- **Pattern:** Each workflow file includes:
90
- - CLAVIX PLANNING MODE block (clarifies planning vs implementation)
91
- - Complete workflow steps with checkpoints
92
- - Self-correction checks
93
- - Common mistakes (wrong/right examples)
94
- - Troubleshooting references
95
- - Integration with other workflows
96
-
97
78
  ### `/core/` - Foundational Concepts
98
79
 
99
80
  Cross-workflow patterns and principles:
100
81
 
101
82
  | File | Purpose | Key Content |
102
83
  |------|---------|-------------|
103
- | `clavix-mode.md` | Planning vs implementation distinction | Mode table, standard workflow, command categorization |
84
+ | `clavix-mode.md` | Planning vs implementation distinction | Mode table, command categorization, standard workflow |
104
85
  | `file-operations.md` | File creation patterns | Write tool usage, verification steps, error handling |
105
86
  | `verification.md` | Checkpoint patterns | Self-correction triggers, validation approaches |
106
87
 
@@ -124,125 +105,116 @@ Problem β†’ Solution guides:
124
105
 
125
106
  ---
126
107
 
127
- ## πŸ”„ Maintenance Workflow
108
+ ## πŸ“‹ Quick Reference
128
109
 
129
- ### When Adding New Workflow
110
+ ### Standard Workflow
130
111
 
131
- 1. **Create canonical template** in `src/templates/slash-commands/_canonical/`
132
- - Complete workflow description
133
- - All steps, examples, edge cases
134
- - This is the official reference
112
+ All workflows follow this progression:
135
113
 
136
- 2. **NO NEED to create instruction file** - It's auto-copied during init
137
- - During `clavix init`, canonical templates are automatically copied to `.clavix/instructions/workflows/`
138
- - User projects get fresh copy on init/update
139
- - **Single source of truth:** Only maintain canonical template
114
+ ```
115
+ PRD Creation β†’ Task Planning β†’ Implementation β†’ Verification β†’ Archive
116
+ ```
140
117
 
141
- 3. **Update generic connectors** in `src/templates/agents/` (if needed)
142
- - Add table reference to new workflow
143
- - Update workflow detection keywords
144
- - DO NOT duplicate workflow steps
118
+ | Phase | Command | Output | Mode |
119
+ |-------|---------|--------|------|
120
+ | **Planning** | `/clavix:prd` or `/clavix:start` | `full-prd.md` + `quick-prd.md` | PLANNING |
121
+ | **Task Prep** | `/clavix:plan` | `tasks.md` | PLANNING |
122
+ | **Implementation** | `/clavix:implement` | Executed code | IMPLEMENTATION |
123
+ | **Verification** | `/clavix:verify` | Verification report | VERIFICATION |
124
+ | **Completion** | `/clavix:archive` | Archived project | MANAGEMENT |
145
125
 
146
- 4. **Update this README** if new pattern/principle introduced
126
+ ### Command Mode Mapping
147
127
 
148
- ### When Modifying Existing Workflow
128
+ | Command | Mode | Implement? |
129
+ |---------|------|------------|
130
+ | `/clavix:start` | Planning | βœ— NO |
131
+ | `/clavix:summarize` | Planning | βœ— NO |
132
+ | `/clavix:improve` | Planning | βœ— NO |
133
+ | `/clavix:prd` | Planning | βœ— NO |
134
+ | `/clavix:plan` | Planning | βœ— NO |
135
+ | `/clavix:implement` | Implementation | βœ“ YES |
136
+ | `/clavix:execute` | Implementation | βœ“ YES |
137
+ | `/clavix:verify` | Verification | Context-dependent |
138
+ | `/clavix:archive` | Management | βœ— NO |
149
139
 
150
- 1. **Update canonical template** - This is source of truth
151
- 2. **Users run `clavix update`** - Refreshes `.clavix/instructions/workflows/` from canonical
152
- 3. **Test:** Verify `clavix update` propagates changes correctly
153
- 4. **No manual duplication needed** - InstructionsGenerator copies from canonical automatically
140
+ ### Agent-Only Commands (No Slash Command)
154
141
 
155
- ### When Reporting Verbosity Issues
142
+ | CLI Command | Purpose | Invoked By |
143
+ |-------------|---------|------------|
144
+ | `clavix analyze` | Internal prompt analysis | `improve` workflow |
145
+ | `clavix task-complete` | Mark task done | `implement` workflow |
156
146
 
157
- **Bloat checklist:**
158
- 1. Is canonical template duplicated in instruction file? β†’ Remove from instruction, reference canonical
159
- 2. Is instruction file duplicated in connector file? β†’ Remove from connector, reference instruction
160
- 3. Is workflow description inline in connector? β†’ Remove, add table reference to instruction file
161
- 4. Are "Common Mistakes" duplicated across files? β†’ Keep in instruction file only
162
- 5. Is command reference table too detailed? β†’ Condense to single-line purpose
147
+ ---
163
148
 
164
- **Size targets:**
165
- - Canonical templates: 10-20K (complete reference, no size limit)
166
- - Instruction files: 10-18K (agent-optimized, comprehensive)
167
- - Generic connectors: 4-10K (thin wrappers)
149
+ ## πŸ”„ Maintenance Workflow
168
150
 
169
- ---
151
+ ### When Adding New Workflow
170
152
 
171
- ## 🧠 Design Philosophy
153
+ 1. **Create canonical template** in `src/templates/slash-commands/_canonical/`
154
+ - Complete workflow description
155
+ - All steps, examples, edge cases
156
+ - Include CLAVIX MODE header if planning-only
172
157
 
173
- ### Why Three Layers?
158
+ 2. **Create CLI command** in `src/cli/commands/`
159
+ - Implement the command behavior
160
+ - Ensure template and CLI match
174
161
 
175
- **Layer 1: Canonical Templates**
176
- - **Audience:** CLI implementation, human developers, official documentation
177
- - **Purpose:** Define authoritative behavior
178
- - **Constraint:** Complete and accurate, no brevity requirement
162
+ 3. **Update tests** in `tests/consistency/`
163
+ - Add command to `cli-template-parity.test.ts` categories
164
+ - Update any affected consistency tests
179
165
 
180
- **Layer 2: Instruction Files**
181
- - **Audience:** AI agents (all platforms)
182
- - **Purpose:** Executable guidance with self-correction
183
- - **Constraint:** Must match canonical, optimized for agent comprehension
166
+ 4. **Run validation**: `npm run validate:consistency`
184
167
 
185
- **Layer 3: Generic Connectors**
186
- - **Audience:** Platform-specific agents (Copilot, Octofriend, Warp, generic)
187
- - **Purpose:** Minimal platform-specific wrapper + references
188
- - **Constraint:** Keep thin, reference instruction files, platform-unique guidance only
168
+ ### When Modifying Existing Workflow
189
169
 
190
- ### Why Not Just One File?
170
+ 1. **Update canonical template** - This is the source of truth
171
+ 2. **Update CLI if behavior changed**
172
+ 3. **Run validation**: `npm run validate:consistency`
173
+ 4. **Users run `clavix update`** - Refreshes their local instructions
191
174
 
192
- **Problems with single-file approach:**
193
- 1. **Duplication:** Same workflow described 4+ times (canonical + 3 platforms)
194
- 2. **Maintenance burden:** Update one workflow = edit 4+ files
195
- 3. **Size bloat:** Each platform file becomes 15-20K
196
- 4. **Inconsistency:** Descriptions drift apart over time
197
- 5. **Confusion:** Agent sees multiple versions, unclear which is authoritative
175
+ ### Preventing the "Half-Update" Problem
198
176
 
199
- **Benefits of three-layer hierarchy:**
200
- 1. **DRY principle:** Write workflow once (instruction file), reference everywhere
201
- 2. **Single source of truth:** Canonical β†’ Instruction β†’ Connector flow
202
- 3. **Platform focus:** Connector files focus on platform-specific value (model switching, tool limitations)
203
- 4. **Maintainability:** Fix bug in one instruction file, all platforms benefit
204
- 5. **Clarity:** Agent knows where to look - instruction file for workflow, connector for platform quirks
177
+ The v4.11.2 release introduced validation to catch incomplete updates:
205
178
 
206
- ---
179
+ ```bash
180
+ # Run before committing
181
+ npm run validate:consistency
207
182
 
208
- ## πŸ“‹ Quick Reference Tables
183
+ # Checks performed:
184
+ # - No legacy command references (fast, deep commands removed in v4.11)
185
+ # - All CLI commands have templates (if required)
186
+ # - All templates have CLI implementations
187
+ # - No deprecated version references
188
+ # - Mode enforcement headers present
189
+ ```
209
190
 
210
- ### Standard Workflow
191
+ ---
211
192
 
212
- All workflows follow this progression:
193
+ ## 🧠 Design Philosophy
213
194
 
214
- ```
215
- PRD Creation β†’ Task Planning β†’ Implementation β†’ Archive
216
- ```
195
+ ### Why Canonical Templates?
217
196
 
218
- | Phase | Command | Output | Mode |
219
- |-------|---------|--------|------|
220
- | **Planning** | `clavix prd` or conversational | `full-prd.md` + `quick-prd.md` | PLANNING |
221
- | **Task Prep** | `clavix plan` | `tasks.md` | PLANNING (Pre-Implementation) |
222
- | **Implementation** | `clavix implement` | Executed code | IMPLEMENTATION |
223
- | **Completion** | `clavix archive` | Archived project | Management |
197
+ **Canonical templates solve the documentation drift problem:**
198
+ - Single authoritative source for workflow behavior
199
+ - Agents can trust template instructions match CLI behavior
200
+ - Updates propagate through validation, not manual duplication
201
+ - Clear ownership: canonical defines, adapters reference
224
202
 
225
- ### Mode Distinction
203
+ ### Why Component Templates?
226
204
 
227
- | Command | Mode | Implement? |
228
- |---------|------|------------|
229
- | `/clavix:start` | Planning | βœ— NO |
230
- | `/clavix:summarize` | Planning | βœ— NO |
231
- | `/clavix:fast` | Planning | βœ— NO |
232
- | `/clavix:deep` | Planning | βœ— NO |
233
- | `/clavix:prd` | Planning | βœ— NO |
234
- | `/clavix:plan` | Planning (Pre-Implementation) | βœ— NO |
235
- | `/clavix:implement` | Implementation | βœ“ YES |
236
- | `/clavix:execute` | Implementation | βœ“ YES |
237
- | `/clavix:task-complete` | Implementation | βœ“ YES |
205
+ **Components prevent duplication:**
206
+ - Quality dimensions defined once, used in improve.md
207
+ - Agent protocols shared across all planning workflows
208
+ - Troubleshooting sections reusable across contexts
209
+ - Pattern visibility documented centrally
238
210
 
239
- ### File Size Expectations
211
+ ### Why Integration Adapters?
240
212
 
241
- | File Type | Size Range | Line Range | Purpose |
242
- |-----------|-----------|------------|---------|
243
- | Canonical Template | 10-20K | 300-600 lines | Complete reference (no limit) |
244
- | Instruction File | 10-18K | 350-650 lines | Agent-executable workflows |
245
- | Generic Connector | 4-10K | 150-300 lines | Thin wrapper + platform-specific |
213
+ **Adapters handle platform differences:**
214
+ - Command format: `/clavix:improve` vs `/clavix-improve`
215
+ - Tool availability: Some platforms lack filesystem access
216
+ - Context limits: Different token limits per platform
217
+ - Model guidance: Platform-specific best practices
246
218
 
247
219
  ---
248
220
 
@@ -253,10 +225,9 @@ PRD Creation β†’ Task Planning β†’ Implementation β†’ Archive
253
225
  **Root cause:** Agent didn't recognize planning mode boundary
254
226
 
255
227
  **Fix:**
256
- 1. Check instruction file has CLAVIX PLANNING MODE block at top
257
- 2. Verify "DO NOT IMPLEMENT" warnings present and clear
258
- 3. Add self-correction check: "Check 1: Am I Implementing?"
259
- 4. Reference `troubleshooting/jumped-to-implementation.md`
228
+ 1. Check canonical template has CLAVIX MODE header at top
229
+ 2. Verify "DO NOT IMPLEMENT" warnings present
230
+ 3. Reference `troubleshooting/jumped-to-implementation.md`
260
231
 
261
232
  ### "Agent skipped file creation"
262
233
 
@@ -264,48 +235,50 @@ PRD Creation β†’ Task Planning β†’ Implementation β†’ Archive
264
235
 
265
236
  **Fix:**
266
237
  1. Add explicit step-by-step file creation section
267
- 2. Include "Step N: Verify Files Were Created" with ls command
268
- 3. Add common mistake: "Skipping file creation"
269
- 4. Reference `troubleshooting/skipped-file-creation.md`
238
+ 2. Include verification step with file listing
239
+ 3. Reference `troubleshooting/skipped-file-creation.md`
270
240
 
271
- ### "Generic connector file too large (>10K)"
241
+ ### "Legacy command references found"
272
242
 
273
- **Root cause:** Duplicating instruction file content
243
+ **Root cause:** Template not updated during v4.11 migration
274
244
 
275
245
  **Fix:**
276
- 1. Identify duplicated workflow descriptions
277
- 2. Replace with table reference to instruction file
278
- 3. Keep only platform-specific guidance (model switching, tool limitations, etc.)
279
- 4. Condense CLI reference table (one line per command)
280
- 5. Remove detailed workflow explanations (link to instruction file instead)
246
+ 1. Run `npm run validate:consistency` to find all occurrences
247
+ 2. Replace legacy fast/deep commands with `clavix improve`
248
+ 3. Replace "fast mode"/"deep mode" with "standard depth"/"comprehensive depth"
249
+ 4. Update any navigation references
281
250
 
282
- ### "Instruction file doesn't match canonical"
251
+ ### "Template doesn't match CLI behavior"
283
252
 
284
- **Root cause:** Manual edit to instruction file without checking canonical
253
+ **Root cause:** CLI changed without updating canonical template
285
254
 
286
255
  **Fix:**
287
- 1. Read canonical template: `src/templates/slash-commands/_canonical/<workflow>.md`
288
- 2. Compare with instruction file: `src/templates/instructions/workflows/<workflow>.md`
289
- 3. Ensure substance matches 100%
290
- 4. Reorganization for agent clarity is OK, contradicting canonical is NOT
256
+ 1. Read canonical template in `src/templates/slash-commands/_canonical/`
257
+ 2. Compare with actual CLI behavior
258
+ 3. Update canonical template to match CLI
259
+ 4. Run `npm run validate:consistency`
260
+ 5. Update `cli-template-parity.test.ts` if needed
291
261
 
292
262
  ---
293
263
 
294
- ## πŸ“š Additional Resources
264
+ ## πŸ“š Key Files Reference
265
+
266
+ ### Canonical Templates (Start Here)
267
+ - `improve.md` - Unified prompt optimization (v4.11)
268
+ - `prd.md` - PRD generation workflow
269
+ - `implement.md` - Task execution workflow
295
270
 
296
- **Related documentation:**
297
- - `src/templates/slash-commands/_canonical/README.md` - Canonical template guidelines
298
- - `src/templates/agents/README.md` - Generic connector patterns (if exists)
299
- - `CONTRIBUTING.md` - General contribution guidelines
300
- - `ARCHITECTURE.md` - Overall Clavix architecture
271
+ ### Agent Protocols
272
+ - `_components/agent-protocols/self-correction.md` - Mistake detection
273
+ - `_components/agent-protocols/state-awareness.md` - Workflow state tracking
274
+ - `_components/agent-protocols/decision-rules.md` - Decision logic
301
275
 
302
- **Key files to read first:**
303
- - `core/clavix-mode.md` - Understand planning vs implementation
304
- - `workflows/fast.md` - See complete workflow pattern
305
- - `../agents/octo.md` - See thin connector example (post-v3.6.1)
276
+ ### Validation
277
+ - `scripts/validate-consistency.ts` - TypeScript ↔ Template validator
278
+ - `tests/consistency/cli-template-parity.test.ts` - CLI-Template mapping tests
306
279
 
307
280
  ---
308
281
 
309
- **Last updated:** v3.6.1 (November 2025)
282
+ **Last updated:** v4.11.2 (November 2025)
310
283
 
311
- **Maintainers:** Ensure this README stays synchronized with actual instruction hierarchy.
284
+ **Validation:** Run `npm run validate:consistency` before committing changes.
@@ -6,7 +6,7 @@ Clavix has **two distinct modes** based on the command type:
6
6
 
7
7
  ### CLAVIX PLANNING MODE (Requirements & Documentation)
8
8
 
9
- **Commands:** `/clavix:start`, `/clavix:summarize`, `/clavix:fast`, `/clavix:deep`, `/clavix:prd`
9
+ **Commands:** `/clavix:start`, `/clavix:summarize`, `/clavix:improve`, `/clavix:prd`
10
10
 
11
11
  **Your role:**
12
12
  - Ask questions about requirements
@@ -40,8 +40,7 @@ Clavix has **two distinct modes** based on the command type:
40
40
  |---------|------|------------|
41
41
  | `/clavix:start` | Planning | βœ— NO |
42
42
  | `/clavix:summarize` | Planning | βœ— NO |
43
- | `/clavix:fast` | Planning | βœ— NO |
44
- | `/clavix:deep` | Planning | βœ— NO |
43
+ | `/clavix:improve` | Planning | βœ— NO |
45
44
  | `/clavix:prd` | Planning | βœ— NO |
46
45
  | `/clavix:plan` | Planning (Pre-Implementation) | βœ— NO |
47
46
  | `/clavix:implement` | Implementation | βœ“ YES |
@@ -108,7 +107,7 @@ Clavix has **two distinct modes** based on the command type:
108
107
  **User runs:** `/clavix:implement` or `/clavix:execute`
109
108
  β†’ **You are in IMPLEMENTATION MODE** - write code
110
109
 
111
- **User runs:** `/clavix:prd` or `/clavix:fast` or `/clavix:start`
110
+ **User runs:** `/clavix:prd` or `/clavix:improve` or `/clavix:start`
112
111
  β†’ **You are in PLANNING MODE** - gather requirements, don't implement
113
112
 
114
113
  ---
@@ -281,42 +281,40 @@ If workflow isn't proceeding as expected, check:
281
281
 
282
282
  ---
283
283
 
284
- ### Quick Improvement (/clavix:fast)
284
+ ### Prompt Improvement (/clavix:improve)
285
285
 
286
286
  ```markdown
287
287
  **Checkpoints to include:**
288
288
 
289
- 1. After analysis:
289
+ 1. After triage:
290
+ **CHECKPOINT:** Triage complete - [standard/comprehensive] depth selected
291
+
292
+ 2. After analysis:
290
293
  **CHECKPOINT:** Analyzed prompt - identified [N] improvement areas
291
294
 
292
- 2. After optimization:
295
+ 3. After optimization:
293
296
  **CHECKPOINT:** Generated optimized prompt with [N] enhancements
294
297
 
295
- 3. After file creation:
296
- **CHECKPOINT:** Saved prompt to .clavix/outputs/prompts/fast/[id].md
298
+ 4. After file creation:
299
+ **CHECKPOINT:** Saved prompt to .clavix/outputs/prompts/[id].md
297
300
 
298
- 4. After verification:
301
+ 5. After verification:
299
302
  **CHECKPOINT:** File verified - prompt saved successfully
300
303
  ```
301
304
 
302
- ---
303
-
304
- ### Deep Analysis (/clavix:deep)
305
+ **For Comprehensive Depth (`/clavix:improve --comprehensive`):**
305
306
 
306
307
  ```markdown
307
- **Checkpoints to include:**
308
+ **Additional checkpoints:**
308
309
 
309
- 1. After initial analysis:
310
- **CHECKPOINT:** Completed deep analysis - generated [N] alternative phrasings
310
+ 1. After alternative analysis:
311
+ **CHECKPOINT:** Generated [N] alternative phrasings
311
312
 
312
313
  2. After edge case analysis:
313
314
  **CHECKPOINT:** Identified [M] edge cases and potential issues
314
315
 
315
- 3. After file creation:
316
- **CHECKPOINT:** Created comprehensive analysis document
317
-
318
- 4. After verification:
319
- **CHECKPOINT:** All outputs verified - deep analysis complete
316
+ 3. After validation checklist:
317
+ **CHECKPOINT:** Created comprehensive analysis with validation checklist
320
318
  ```
321
319
 
322
320
  ---
@@ -54,7 +54,7 @@ Let me return to asking clarifying questions about your requirements instead.
54
54
  Agent should:
55
55
  1. **Return** to asking clarifying questions (if in `/clavix:start`)
56
56
  2. **Return** to extracting requirements (if in `/clavix:summarize`)
57
- 3. **Return** to analyzing prompts (if in `/clavix:fast` or `/clavix:deep`)
57
+ 3. **Return** to analyzing prompts (if in `/clavix:improve`)
58
58
  4. **Return** to generating PRD (if in `/clavix:prd`)
59
59
 
60
60
  **NOT** continue with implementation.
@@ -11,7 +11,7 @@ Agent completed a Clavix workflow but didn't create the expected output files. C
11
11
  - Agent says "files created" but they don't exist in `.clavix/outputs/`
12
12
  - Agent provides content in chat instead of using Write tool
13
13
  - Agent completes `/clavix:summarize` but no mini-prd.md, original-prompt.md, or optimized-prompt.md files
14
- - Agent finishes `/clavix:fast` or `/clavix:deep` but no saved prompt file
14
+ - Agent finishes `/clavix:improve` but no saved prompt file
15
15
  - Agent generates PRD content but no PRD.md or PRD-quick.md files
16
16
 
17
17
  ---
@@ -262,23 +262,23 @@ Should show all three files.
262
262
 
263
263
  ---
264
264
 
265
- ### Test Scenario 2: Fast Improvement
265
+ ### Test Scenario 2: Prompt Improvement
266
266
 
267
267
  **Setup:**
268
268
  ```markdown
269
- User: /clavix:fast [prompt]
269
+ User: /clavix:improve [prompt]
270
270
  ```
271
271
 
272
272
  **Expected behavior:**
273
- - Agent analyzes prompt
273
+ - Agent analyzes prompt with triage
274
274
  - Agent generates optimized version
275
- - Agent creates .clavix/outputs/prompts/fast/ directory
276
- - Agent writes fast-YYYYMMDD-HHMM.md file
275
+ - Agent creates .clavix/outputs/prompts/ directory
276
+ - Agent writes prompt file with timestamp ID
277
277
  - Agent verifies file created
278
278
 
279
279
  **Test:**
280
280
  ```bash
281
- ls -la .clavix/outputs/prompts/fast/
281
+ ls -la .clavix/outputs/prompts/
282
282
  ```
283
283
 
284
284
  Should show saved prompt file.
@@ -176,7 +176,7 @@ I tell you:
176
176
 
177
177
  ## Prompts Are Separate
178
178
 
179
- Fast/deep prompts from `/clavix:fast` and `/clavix:deep` are stored separately in `.clavix/outputs/prompts/`.
179
+ Optimized prompts from `/clavix:improve` are stored separately in `.clavix/outputs/prompts/`.
180
180
 
181
181
  **Prompts are NOT archived with PRD projects.**
182
182
 
@@ -357,7 +357,7 @@ The generated `tasks.md` will look like:
357
357
  **Agent recovery**:
358
358
  1. Read the PRD to assess detail level
359
359
  2. If PRD is vague:
360
- - Suggest: "Let's improve the PRD with `/clavix:deep` first"
360
+ - Suggest: "Let's improve the PRD with `/clavix:improve --comprehensive` first"
361
361
  - Then regenerate tasks with `clavix plan --overwrite`
362
362
  3. If PRD is detailed but tasks are high-level:
363
363
  - Manually break each task into 3-5 concrete sub-tasks
@@ -310,8 +310,8 @@ The validation ensures generated PRDs are immediately usable for AI consumption
310
310
 
311
311
  **Common workflows:**
312
312
  - **Full planning workflow**: `/clavix:prd` β†’ `/clavix:plan` β†’ `/clavix:implement` β†’ `/clavix:archive`
313
- - **From deep mode**: `/clavix:deep` β†’ (strategic scope detected) β†’ `/clavix:prd`
314
- - **Quick to strategic**: `/clavix:fast` β†’ (realizes complexity) β†’ `/clavix:prd`
313
+ - **From improve mode**: `/clavix:improve` β†’ (strategic scope detected) β†’ `/clavix:prd`
314
+ - **Quick to strategic**: `/clavix:improve` β†’ (realizes complexity) β†’ `/clavix:prd`
315
315
 
316
316
  **Related commands:**
317
317
  - `/clavix:plan` - Generate task breakdown from PRD (next step)
@@ -194,7 +194,7 @@ After the conversational session, `/clavix:summarize` will:
194
194
  **Related commands:**
195
195
  - `/clavix:summarize` - Extract and optimize conversation (typical next step)
196
196
  - `/clavix:prd` - Switch to Clavix Planning Mode for structured PRD generation
197
- - `/clavix:fast` or `/clavix:deep` - Direct prompt improvement instead of conversation
197
+ - `/clavix:improve` - Direct prompt improvement instead of conversation
198
198
 
199
199
  ## Note
200
200
 
@@ -405,7 +405,7 @@ Implementation: BLOCKED - I will extract requirements, not implement them
405
405
  **Related commands:**
406
406
  - `/clavix:start` - Begin conversational exploration (typical previous step)
407
407
  - `/clavix:plan` - Generate tasks from extracted mini-PRD (next step)
408
- - `/clavix:fast` or `/clavix:deep` - Further optimize the extracted prompt
408
+ - `/clavix:improve` - Further optimize the extracted prompt
409
409
 
410
410
  ## Example
411
411
 
@@ -241,9 +241,9 @@ Failed checks are normal. They just mean something needs a bit more work.
241
241
 
242
242
  ---
243
243
 
244
- ## Fast Mode vs Deep Mode
244
+ ## Standard vs Comprehensive Depth
245
245
 
246
- ### If You Used Deep Mode (`/clavix:deep`)
246
+ ### If You Used Comprehensive Depth (`/clavix:improve --comprehensive`)
247
247
 
248
248
  Your prompt already has a detailed checklist. I'll use that.
249
249
 
@@ -253,9 +253,9 @@ Your prompt already has a detailed checklist. I'll use that.
253
253
  - Potential risks identified
254
254
  - Specific verification criteria
255
255
 
256
- ### If You Used Fast Mode (`/clavix:fast`)
256
+ ### If You Used Standard Depth (`/clavix:improve`)
257
257
 
258
- Fast mode doesn't create detailed checklists, so I'll generate one based on what you were building.
258
+ Standard depth doesn't create detailed checklists, so I'll generate one based on what you were building.
259
259
 
260
260
  **What you get:**
261
261
  - Basic checks based on what you asked for
@@ -263,8 +263,8 @@ Fast mode doesn't create detailed checklists, so I'll generate one based on what
263
263
  - Common sense verifications
264
264
 
265
265
  **You'll see:**
266
- > "This was a fast mode prompt, so I'm creating a basic checklist.
267
- > For more thorough verification next time, use /clavix:deep"
266
+ > "This was a standard depth prompt, so I'm creating a basic checklist.
267
+ > For more thorough verification next time, use /clavix:improve --comprehensive"
268
268
 
269
269
  ---
270
270
 
@@ -371,7 +371,7 @@ I generate different checklists based on what you're building:
371
371
  **Where you are:** Verification (checking your work)
372
372
 
373
373
  **How you got here:**
374
- 1. `/clavix:deep` or `/clavix:fast` β†’ Optimized your prompt
374
+ 1. `/clavix:improve` β†’ Optimized your prompt
375
375
  2. `/clavix:execute` β†’ Implemented the requirements
376
376
  3. **`/clavix:verify`** β†’ Now checking it works (you are here)
377
377
 
@@ -381,7 +381,7 @@ I generate different checklists based on what you're building:
381
381
 
382
382
  **Related commands:**
383
383
  - `/clavix:execute` - Run the implementation (previous step)
384
- - `/clavix:deep` - Get comprehensive checklist next time
384
+ - `/clavix:improve --comprehensive` - Get comprehensive checklist next time
385
385
  - `/clavix:archive` - Archive when done (next step)
386
386
 
387
387
  ---
@@ -7,11 +7,11 @@ These rules define deterministic agent behavior. Follow exactly - no interpretat
7
7
  ```
8
8
  IF quality < 60%:
9
9
  IF (completeness < 50%) OR (clarity < 50%) OR (actionability < 50%):
10
- β†’ ACTION: Strongly recommend /clavix:deep
11
- β†’ SAY: "Quality is [X]%. Deep mode strongly recommended for: [low dimensions]"
10
+ β†’ ACTION: Strongly recommend comprehensive depth
11
+ β†’ SAY: "Quality is [X]%. Comprehensive depth strongly recommended for: [low dimensions]"
12
12
  ELSE:
13
- β†’ ACTION: Suggest /clavix:deep
14
- β†’ SAY: "Quality is [X]%. Consider deep mode for better results."
13
+ β†’ ACTION: Suggest comprehensive depth
14
+ β†’ SAY: "Quality is [X]%. Consider comprehensive depth for better results."
15
15
 
16
16
  IF quality >= 60% AND quality < 80%:
17
17
  β†’ ACTION: Proceed with optimization
@@ -46,19 +46,19 @@ IF confidence < 50%:
46
46
 
47
47
  ```
48
48
  IF escalation_score >= 75:
49
- β†’ ACTION: Strongly recommend deep mode
49
+ β†’ ACTION: Strongly recommend comprehensive depth
50
50
  β†’ SHOW: Top 3 contributing factors
51
51
 
52
52
  IF escalation_score 60-74:
53
- β†’ ACTION: Recommend deep mode
53
+ β†’ ACTION: Recommend comprehensive depth
54
54
  β†’ SHOW: Primary contributing factor
55
55
 
56
56
  IF escalation_score 45-59:
57
- β†’ ACTION: Suggest deep mode as option
58
- β†’ SAY: "Deep mode available for more thorough analysis"
57
+ β†’ ACTION: Suggest comprehensive depth as option
58
+ β†’ SAY: "Comprehensive depth available for more thorough analysis"
59
59
 
60
60
  IF escalation_score < 45:
61
- β†’ ACTION: Fast mode sufficient
61
+ β†’ ACTION: Standard depth sufficient
62
62
  β†’ NO escalation mention
63
63
  ```
64
64
 
@@ -120,7 +120,7 @@ IF pattern not applicable to intent:
120
120
  IF pattern applicable but skipped:
121
121
  β†’ EXPLAIN: "Skipped [pattern] because [reason]"
122
122
 
123
- DEEP MODE ONLY:
123
+ COMPREHENSIVE DEPTH ONLY:
124
124
  β†’ MUST include alternatives (2-3)
125
125
  β†’ MUST include validation checklist
126
126
  β†’ MUST include edge cases
@@ -129,15 +129,15 @@ DEEP MODE ONLY:
129
129
  ### Rule 8: Mode Transition Decision
130
130
 
131
131
  ```
132
- IF user requests /clavix:fast but quality < 50%:
133
- β†’ ACTION: Warn and suggest deep
134
- β†’ SAY: "Quality is [X]%. Fast mode may be insufficient."
132
+ IF user requests standard depth but quality < 50%:
133
+ β†’ ACTION: Warn and suggest comprehensive
134
+ β†’ SAY: "Quality is [X]%. Standard depth may be insufficient."
135
135
  β†’ ALLOW: User can override and proceed
136
136
 
137
- IF user in /clavix:deep but prompt is simple (quality > 85%):
137
+ IF user requests comprehensive depth but prompt is simple (quality > 85%):
138
138
  β†’ ACTION: Note efficiency
139
- β†’ SAY: "Prompt is already high quality. Fast mode would suffice."
140
- β†’ CONTINUE: With deep analysis anyway
139
+ β†’ SAY: "Prompt is already high quality. Standard depth would suffice."
140
+ β†’ CONTINUE: With comprehensive analysis anyway
141
141
 
142
142
  IF strategic keywords detected (3+ architecture/security/scalability):
143
143
  β†’ ACTION: Suggest PRD mode
@@ -17,8 +17,8 @@
17
17
  - Providing optimization without quality analysis
18
18
  - Jumping directly to improved prompt without showing scores
19
19
 
20
- ### Mistake Type 3: Wrong Mode Selection
21
- - Not suggesting `/clavix:deep` when quality scores are low
20
+ ### Mistake Type 3: Wrong Depth Selection
21
+ - Not suggesting comprehensive depth when quality scores are low
22
22
  - Not recommending `/clavix:prd` for strategic decisions
23
23
  - Ignoring triage indicators and escalation factors
24
24
 
@@ -27,8 +27,8 @@
27
27
  - Skipping patterns without explanation
28
28
  - Not showing which patterns were applied
29
29
 
30
- ### Mistake Type 5: Missing Validation (Deep Mode)
31
- - Not generating validation checklist in deep mode
30
+ ### Mistake Type 5: Missing Validation (Comprehensive Depth)
31
+ - Not generating validation checklist in comprehensive depth
32
32
  - Not identifying edge cases
33
33
  - Not providing alternative approaches
34
34
 
@@ -17,8 +17,7 @@ Implementation: [BLOCKED|ALLOWED]
17
17
 
18
18
  | Mode | Type | Implementation | Purpose |
19
19
  |------|------|----------------|---------|
20
- | /clavix:fast | planning | BLOCKED | Prompt optimization |
21
- | /clavix:deep | planning | BLOCKED | Comprehensive prompt analysis |
20
+ | /clavix:improve | planning | BLOCKED | Prompt optimization (smart depth selection) |
22
21
  | /clavix:prd | planning | BLOCKED | PRD development |
23
22
  | /clavix:plan | planning | BLOCKED | Task breakdown generation |
24
23
  | /clavix:start | planning | BLOCKED | Requirements gathering |
@@ -37,9 +36,9 @@ Implementation: [BLOCKED|ALLOWED]
37
36
 
38
37
  **Planning Mode (Implementation BLOCKED):**
39
38
  ```
40
- **CLAVIX MODE: Fast Optimization**
39
+ **CLAVIX MODE: Improve**
41
40
  Mode: planning
42
- Purpose: Optimizing user prompt with Clavix Intelligenceβ„’
41
+ Purpose: Optimizing user prompt with Clavix Intelligence
43
42
  Implementation: BLOCKED - I will analyze and improve the prompt, not implement it
44
43
  ```
45
44
 
@@ -50,7 +50,7 @@ Always output current state when starting a workflow:
50
50
  NO_PROJECT:
51
51
  β†’ /clavix:prd creates PRD_EXISTS
52
52
  β†’ /clavix:start + /clavix:summarize creates PRD_EXISTS
53
- β†’ /clavix:fast or /clavix:deep creates prompt (not PRD_EXISTS)
53
+ β†’ /clavix:improve creates prompt (not PRD_EXISTS)
54
54
 
55
55
  PRD_EXISTS:
56
56
  β†’ /clavix:plan creates TASKS_EXIST
@@ -41,6 +41,6 @@
41
41
  1. Ask user to clarify current intent
42
42
  2. Check last Clavix command run
43
43
  3. Mode determination:
44
- - `/clavix:fast`, `/clavix:deep`, `/clavix:prd`, `/clavix:start`, `/clavix:summarize`, `/clavix:plan` β†’ PLANNING
44
+ - `/clavix:improve`, `/clavix:prd`, `/clavix:start`, `/clavix:summarize`, `/clavix:plan` β†’ PLANNING
45
45
  - `/clavix:implement`, `/clavix:execute` β†’ IMPLEMENTATION
46
46
  4. If still unclear, default to PLANNING and ask for clarification
@@ -1,26 +1,26 @@
1
- ### Issue: Triage keeps recommending deep mode
1
+ ### Issue: Triage keeps recommending comprehensive depth
2
2
 
3
3
  **Cause**: Prompt has low quality scores + multiple secondary indicators
4
4
 
5
5
  **Solution**:
6
- - Accept the recommendation - deep mode will provide better analysis
7
- - OR improve prompt manually before running fast mode again
6
+ - Accept the recommendation - comprehensive depth will provide better analysis
7
+ - OR improve prompt manually before running with standard depth again
8
8
  - Check which quality dimension is scoring low and address it
9
9
 
10
- ### Issue: Can't determine if prompt is complex enough for deep mode
10
+ ### Issue: Can't determine if prompt is complex enough for comprehensive depth
11
11
 
12
12
  **Cause**: Borderline quality scores or unclear content quality
13
13
 
14
14
  **Solution**:
15
- - Err on side of fast mode first
16
- - If output feels insufficient, escalate to `/clavix:deep`
15
+ - Err on side of standard depth first
16
+ - If output feels insufficient, escalate to `/clavix:improve --comprehensive`
17
17
  - Use triage as guidance, not absolute rule
18
18
 
19
19
  ### Issue: Improved prompt still feels incomplete
20
20
 
21
- **Cause**: Fast mode only applies basic optimizations
21
+ **Cause**: Standard depth only applies basic optimizations
22
22
 
23
23
  **Solution**:
24
- - Use `/clavix:deep` for alternative approaches, edge cases, and validation checklists
24
+ - Use `/clavix:improve --comprehensive` for alternative approaches, edge cases, and validation checklists
25
25
  - OR use `/clavix:prd` if strategic planning is needed
26
- - Fast mode is for quick cleanup, not comprehensive analysis
26
+ - Standard depth is for quick cleanup, not comprehensive analysis
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavix",
3
- "version": "4.11.1",
3
+ "version": "4.11.2",
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",
@@ -24,6 +24,8 @@
24
24
  "test:watch": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest --watch",
25
25
  "test:coverage": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest --coverage",
26
26
  "test:changed": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest --changedSince=HEAD~1 --passWithNoTests",
27
+ "test:parity": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest tests/consistency/cli-template-parity.test.ts",
28
+ "test:consistency": "NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest tests/consistency/",
27
29
  "lint": "eslint",
28
30
  "lint:fix": "eslint --fix",
29
31
  "format": "prettier --write \"src/**/*.ts\"",