clavix 5.0.0 → 5.1.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.
Files changed (45) hide show
  1. package/dist/cli/commands/init.js +53 -153
  2. package/dist/cli/commands/update.js +18 -21
  3. package/dist/core/doc-injector.d.ts +2 -2
  4. package/dist/core/doc-injector.js +12 -12
  5. package/dist/index 2.js +13 -0
  6. package/dist/index.d 2.ts +4 -0
  7. package/dist/templates/agents/agents.md +29 -28
  8. package/dist/templates/agents/copilot-instructions.md +43 -38
  9. package/dist/templates/agents/octo.md +42 -38
  10. package/dist/templates/agents/warp.md +25 -26
  11. package/dist/templates/instructions/README.md +20 -19
  12. package/dist/templates/instructions/core/clavix-mode.md +10 -25
  13. package/dist/templates/instructions/core/mode-enforcement.md +10 -11
  14. package/dist/templates/slash-commands/_canonical/archive.md +1 -1
  15. package/dist/templates/slash-commands/_canonical/implement.md +227 -14
  16. package/dist/templates/slash-commands/_canonical/improve.md +7 -7
  17. package/dist/templates/slash-commands/_canonical/plan.md +9 -21
  18. package/dist/templates/slash-commands/_canonical/prd.md +1 -1
  19. package/dist/templates/slash-commands/_canonical/start.md +1 -1
  20. package/dist/templates/slash-commands/_canonical/summarize.md +3 -3
  21. package/dist/templates/slash-commands/_canonical/verify.md +14 -14
  22. package/dist/templates/slash-commands/_components/agent-protocols/decision-rules.md +5 -6
  23. package/dist/templates/slash-commands/_components/agent-protocols/state-awareness.md +5 -7
  24. package/dist/templates/slash-commands/_components/troubleshooting/vibecoder-recovery.md +2 -2
  25. package/dist/utils/agent-error-messages.js +13 -12
  26. package/package.json +1 -1
  27. package/dist/templates/slash-commands/_canonical/execute.md +0 -276
  28. package/dist/templates/slash-commands/_components/agent-protocols/assertion-checkpoints.md +0 -122
  29. package/dist/templates/slash-commands/_components/agent-protocols/file-formats.md +0 -169
  30. package/dist/templates/slash-commands/_components/agent-protocols/quality-output.md +0 -94
  31. package/dist/templates/slash-commands/_components/agent-protocols/self-correction.md +0 -61
  32. package/dist/templates/slash-commands/_components/agent-protocols/state-assertion.md +0 -51
  33. package/dist/templates/slash-commands/_components/agent-protocols/verification-methods.md +0 -184
  34. package/dist/templates/slash-commands/_components/mode-headers/implementation-mode.md +0 -21
  35. package/dist/templates/slash-commands/_components/mode-headers/planning-mode.md +0 -17
  36. package/dist/templates/slash-commands/_components/mode-headers/self-correction.md +0 -13
  37. package/dist/templates/slash-commands/_components/references/intent-types.md +0 -39
  38. package/dist/templates/slash-commands/_components/sections/file-saving-protocol.md +0 -40
  39. package/dist/templates/slash-commands/_components/sections/intent-detection.md +0 -24
  40. package/dist/templates/slash-commands/_components/sections/pattern-visibility.md +0 -122
  41. package/dist/templates/slash-commands/_components/sections/quality-assessment.md +0 -26
  42. package/dist/templates/slash-commands/_components/sections/workflow-navigation.md +0 -13
  43. package/dist/templates/slash-commands/_components/troubleshooting/file-not-saved.md +0 -19
  44. package/dist/templates/slash-commands/_components/troubleshooting/mode-confusion.md +0 -46
  45. package/dist/templates/slash-commands/_components/troubleshooting/triage-escalation.md +0 -26
@@ -273,51 +273,43 @@ Welcome to Clavix! This directory contains your local Clavix configuration and d
273
273
  .clavix/
274
274
  ├── config.json # Your Clavix configuration
275
275
  ├── INSTRUCTIONS.md # This file
276
+ ├── instructions/ # Workflow instruction files for AI agents
276
277
  ├── sessions/ # Conversational mode session files
277
278
  ├── outputs/
278
279
  │ ├── <project-name>/ # Per-project outputs
279
280
  │ │ ├── full-prd.md
280
281
  │ │ ├── quick-prd.md
281
- │ │ ├── tasks.md
282
- │ └── .clavix-implement-config.json
283
- │ ├── prompts/ # Saved prompts for re-execution (v4.11 unified)
282
+ │ │ └── tasks.md
283
+ ├── prompts/ # Saved prompts for re-execution
284
284
  │ └── archive/ # Archived completed projects
285
285
  └── templates/ # Custom template overrides (optional)
286
286
  \`\`\`
287
287
 
288
- ## CLI Commands Reference
288
+ ## Clavix Commands (v5)
289
289
 
290
- ### Prompt Improvement (v4.11)
291
- - \`clavix improve "<prompt>"\` - Smart prompt optimization with auto depth selection
292
- - \`clavix improve "<prompt>" --comprehensive\` - Force comprehensive depth analysis
293
- - \`clavix execute [--latest]\` - Execute saved prompts
294
- - \`clavix prompts list\` - View all saved prompts with status (NEW/EXECUTED/OLD/STALE)
295
- - \`clavix prompts clear\` - Cleanup prompts (\`--executed\`, \`--stale\`, \`--standard\`, \`--comprehensive\`, \`--all\`)
290
+ ### Setup Commands (CLI)
296
291
 
297
- ### PRD & Planning
298
- - \`clavix prd\` - Generate PRD through guided Socratic questions
299
- - \`clavix plan\` - Transform PRD or session into phase-based \`tasks.md\`
300
- - \`clavix start\` - Start conversational mode for requirements gathering
301
- - \`clavix summarize [session-id]\` - Extract mini-PRD and prompts from conversation
292
+ | Command | Purpose |
293
+ |---------|---------|
294
+ | \`clavix init\` | Initialize Clavix in a project |
295
+ | \`clavix update\` | Update templates after package update |
296
+ | \`clavix config\` | Manage configuration |
297
+ | \`clavix version\` | Show version |
302
298
 
303
- ### Implementation
304
- - \`clavix implement [--commit-strategy=<type>]\` - Execute tasks with optional git auto-commits
305
- - \`clavix task-complete <taskId>\` - Mark task complete with validation, auto-show next task
299
+ ### Workflow Commands (Slash Commands)
306
300
 
307
- ### Project Management
308
- - \`clavix list [--sessions|--outputs]\` - List sessions and/or output projects
309
- - \`clavix show [session-id|--output <project>]\` - Inspect session or project details
310
- - \`clavix archive [project] [--restore]\` - Archive completed projects or restore them
301
+ All workflows are executed via slash commands that AI agents read and follow:
311
302
 
312
- ### Configuration
313
- - \`clavix init\` - Initialize Clavix (you just ran this!)
314
- - \`clavix config [get|set|edit|reset]\` - Manage configuration preferences
315
- - \`clavix update [--docs-only|--commands-only]\` - Refresh managed docs and slash commands
316
- - \`clavix version\` - Print installed version
317
-
318
- ## Slash Commands (AI Agents)
319
-
320
- If using Claude Code, Cursor, or Windsurf, the following slash commands are available:
303
+ | Slash Command | Purpose |
304
+ |---------------|---------|
305
+ | \`/clavix:improve\` | Optimize prompts (auto-selects depth) |
306
+ | \`/clavix:prd\` | Generate PRD through guided questions |
307
+ | \`/clavix:plan\` | Create task breakdown from PRD |
308
+ | \`/clavix:implement\` | Execute tasks or prompts (auto-detects source) |
309
+ | \`/clavix:start\` | Begin conversational session |
310
+ | \`/clavix:summarize\` | Extract requirements from conversation |
311
+ | \`/clavix:verify\` | Verify implementation |
312
+ | \`/clavix:archive\` | Archive completed projects |
321
313
 
322
314
  **Note:** Running \`clavix init\` or \`clavix update\` will regenerate all slash commands from templates. Any manual edits to generated commands will be lost. If you need custom commands, create new command files instead of modifying generated ones.
323
315
 
@@ -325,143 +317,51 @@ If using Claude Code, Cursor, or Windsurf, the following slash commands are avai
325
317
  - Claude Code, Gemini, Qwen: \`/clavix:improve\` (colon format)
326
318
  - Cursor, Droid, Windsurf, etc.: \`/clavix-improve\` (hyphen format)
327
319
 
328
- ### Prompt Improvement (v4.11)
329
- - \`improve [prompt]\` - Smart optimization with auto depth selection
330
- - \`execute\` - Execute saved prompts
331
-
332
- ### PRD & Planning
333
- - \`/clavix:prd\` - Generate PRD through guided questions
334
- - \`/clavix:plan\` - Generate task breakdown from PRD
335
- - \`/clavix:start\` - Start conversational mode
336
- - \`/clavix:summarize\` - Summarize conversation
337
-
338
- ### Implementation
339
- - \`/clavix:implement\` - Execute task workflow with git integration
340
-
341
- ### Project Management
342
- - \`/clavix:archive\` - Archive completed projects
343
-
344
- ## Workflows
345
-
346
- ### Prompt Lifecycle (v4.11)
347
-
348
- 1. **Create improved prompt**:
349
- \`\`\`bash
350
- clavix improve "your prompt here"
351
- # Clavix auto-selects depth based on quality analysis:
352
- # - <60% quality: standard depth (basic fixes)
353
- # - 60-74%: asks user to choose
354
- # - >=75%: comprehensive depth (polish)
355
- \`\`\`
356
- - CLI auto-saves to \`.clavix/outputs/prompts/\`
357
- - Slash commands require manual save per template instructions
358
-
359
- 2. **Execute saved prompt**:
360
- \`\`\`bash
361
- clavix execute --latest # Most recent prompt
362
- clavix execute # Interactive selection
363
- \`\`\`
364
-
365
- 3. **Manage prompts**:
366
- \`\`\`bash
367
- clavix prompts list # View all with status
368
- clavix prompts clear --executed # Remove executed prompts
369
- clavix prompts clear --stale # Remove stale (30+ days)
370
- \`\`\`
371
-
372
- **Prompt Status**:
373
- - \`NEW\` - Just created, never executed
374
- - \`EXECUTED\` - Successfully executed at least once
375
- - \`OLD\` - 7+ days old, not executed
376
- - \`STALE\` - 30+ days old, not executed
377
-
378
- ### Implementation Workflow (v1.3+)
379
-
380
- 1. **Generate PRD**:
381
- \`\`\`bash
382
- clavix prd
383
- # Creates: .clavix/outputs/<project>/full-prd.md + quick-prd.md
384
- \`\`\`
385
-
386
- 2. **Create task breakdown**:
387
- \`\`\`bash
388
- clavix plan
389
- # Creates: .clavix/outputs/<project>/tasks.md
390
- \`\`\`
320
+ ## Standard Workflow
391
321
 
392
- 3. **Execute tasks with git integration**:
393
- \`\`\`bash
394
- # Manual commits (default):
395
- clavix implement
322
+ **Clavix follows this progression:**
396
323
 
397
- # Or with auto-commit strategy:
398
- clavix implement --commit-strategy=per-phase
399
- \`\`\`
324
+ \`\`\`
325
+ PRD Creation → Task Planning → Implementation → Archive
326
+ \`\`\`
400
327
 
401
- 4. **Mark tasks complete**:
402
- \`\`\`bash
403
- clavix task-complete <taskId>
404
- # Validates completion, optionally commits, shows next task
405
- \`\`\`
328
+ **Detailed steps:**
406
329
 
407
- 5. **Archive when done**:
408
- \`\`\`bash
409
- clavix archive my-project
410
- \`\`\`
330
+ 1. **Planning Phase**
331
+ - Run: \`/clavix:prd\` or \`/clavix:start\` → \`/clavix:summarize\`
332
+ - Output: \`.clavix/outputs/{project}/full-prd.md\` + \`quick-prd.md\`
411
333
 
412
- ### Git Auto-Commit Strategies (v2.8.1)
334
+ 2. **Task Preparation**
335
+ - Run: \`/clavix:plan\` transforms PRD into curated task list
336
+ - Output: \`.clavix/outputs/{project}/tasks.md\`
413
337
 
414
- When using \`clavix implement --commit-strategy=<type>\`:
338
+ 3. **Implementation Phase**
339
+ - Run: \`/clavix:implement\`
340
+ - Agent executes tasks systematically
341
+ - Agent edits tasks.md directly to mark progress (\`- [ ]\` → \`- [x]\`)
415
342
 
416
- - \`none\` (default) - Manual git workflow, full control
417
- - \`per-task\` - Commit after each completed task (detailed history)
418
- - \`per-5-tasks\` - Commit every 5 tasks (balanced)
419
- - \`per-phase\` - Commit when phase completes (milestone-based)
343
+ 4. **Completion**
344
+ - Run: \`/clavix:archive\`
345
+ - Archives completed work
420
346
 
421
- **Recommendation**: Use \`none\` for most projects. Only enable auto-commits for large implementations with clear phases.
347
+ **Key principle:** Planning workflows create documents. Implementation workflows write code.
422
348
 
423
- ## When to Use Which Mode (v4.11)
349
+ ## Prompt Lifecycle
424
350
 
425
- - **Improve mode**: Smart prompt optimization with auto depth selection
426
- - Standard depth: Quick cleanup for simpler prompts
427
- - Comprehensive depth: Thorough analysis for complex requirements
428
- - **PRD mode**: Strategic planning with architecture, risks, and business impact
429
- - **Conversational mode** (\`start\`/\`summarize\`): Natural discussion → extract structured requirements
351
+ 1. **Optimize prompt**: \`/clavix:improve\` - Analyzes and improves your prompt
352
+ 2. **Review**: Agent lists saved prompts from \`.clavix/outputs/prompts/\`
353
+ 3. **Execute**: \`/clavix:implement --latest\` - Implement when ready
354
+ 4. **Cleanup**: Agent deletes old prompt files from \`.clavix/outputs/prompts/\`
430
355
 
431
- ## Typical Workflows
356
+ ## When to Use Which Mode
432
357
 
433
- **Improve a prompt** (v4.11 unified):
434
- \`\`\`bash
435
- clavix improve "Add user authentication"
436
- clavix execute --latest
437
- \`\`\`
438
-
439
- **Create and execute strategy**:
440
- \`\`\`bash
441
- clavix prd # Generate PRD
442
- clavix plan # Create tasks.md
443
- clavix implement # Execute with manual commits
444
- \`\`\`
445
-
446
- **Capture conversation**:
447
- \`\`\`bash
448
- clavix start # Record conversation
449
- # ... discuss requirements ...
450
- clavix summarize # Extract mini-PRD + prompt
451
- \`\`\`
452
-
453
- **Stay organized**:
454
- \`\`\`bash
455
- clavix list # See all projects
456
- clavix show --output my-project
457
- clavix archive my-project
458
- \`\`\`
358
+ - **Improve mode** (\`/clavix:improve\`): Smart prompt optimization with auto-depth selection
359
+ - **PRD mode** (\`/clavix:prd\`): Strategic planning with architecture and business impact
360
+ - **Conversational mode** (\`/clavix:start\` \`/clavix:summarize\`): Natural discussion → extract structured requirements
459
361
 
460
362
  ## Customization
461
363
 
462
- Create custom templates in \`.clavix/templates/\` to override defaults:
463
- - \`improve.txt\` - Custom improve mode template
464
- - \`prd-questions.txt\` - Custom PRD questions
364
+ Create custom templates in \`.clavix/templates/\` to override defaults.
465
365
 
466
366
  Edit configuration:
467
367
  \`\`\`bash
@@ -215,28 +215,25 @@ export default class Update extends Command {
215
215
 
216
216
  This project uses Clavix for prompt improvement and PRD generation.
217
217
 
218
- ### Available Commands
219
- - \`clavix improve [prompt]\` - Unified prompt optimization with auto-depth selection
220
- - \`clavix improve --comprehensive [prompt]\` - Force comprehensive analysis
221
- - \`clavix improve --standard [prompt]\` - Force standard optimization
222
- - \`clavix analyze [prompt]\` - JSON analysis output for programmatic use
223
- - \`clavix prd\` - Generate a comprehensive PRD through guided questions
224
- - \`clavix start\` - Start a conversational session for iterative development
225
- - \`clavix summarize\` - Extract requirements from conversation history
226
- - \`clavix execute [--latest]\` - Execute saved prompts
227
- - \`clavix verify [--latest]\` - Verify implementation against checklist
218
+ ### Setup Commands (CLI)
219
+ | Command | Purpose |
220
+ |---------|---------|
221
+ | \`clavix init\` | Initialize Clavix in a project |
222
+ | \`clavix update\` | Update templates after package update |
223
+ | \`clavix config\` | Manage configuration |
224
+ | \`clavix version\` | Show version |
228
225
 
229
- ### Quick Start
230
- \`\`\`bash
231
- # Prompt optimization (auto-selects depth)
232
- clavix improve "Build a user auth system"
233
-
234
- # Generate a PRD
235
- clavix prd
236
-
237
- # Start conversational mode
238
- clavix start
239
- \`\`\`
226
+ ### Workflow Commands (Slash Commands)
227
+ | Slash Command | Purpose |
228
+ |---------------|---------|
229
+ | \`/clavix:improve\` | Optimize prompts (auto-selects depth) |
230
+ | \`/clavix:prd\` | Generate PRD through guided questions |
231
+ | \`/clavix:plan\` | Create task breakdown from PRD |
232
+ | \`/clavix:implement\` | Execute tasks or prompts (auto-detects source) |
233
+ | \`/clavix:start\` | Begin conversational session |
234
+ | \`/clavix:summarize\` | Extract requirements from conversation |
235
+ | \`/clavix:verify\` | Verify implementation |
236
+ | \`/clavix:archive\` | Archive completed projects |
240
237
 
241
238
  Learn more: https://github.com/clavixdev/clavix`;
242
239
  }
@@ -41,13 +41,13 @@ export declare class DocInjector {
41
41
  private static validateMarkdown;
42
42
  /**
43
43
  * Create default AGENTS.md content
44
- * v4.11: Updated for unified /clavix:improve command
44
+ * v5.1: Updated for consolidated implement command
45
45
  */
46
46
  static getDefaultAgentsContent(): string;
47
47
  /**
48
48
  * Create the CLAUDE.md block content (without file wrapper)
49
49
  * This is the single source of truth for Claude Code documentation
50
- * v4.11: Updated for unified /clavix:improve command
50
+ * v5.1: Consolidated execute into implement, removed prompts command
51
51
  */
52
52
  static getClaudeBlockContent(): string;
53
53
  /**
@@ -134,7 +134,7 @@ export class DocInjector {
134
134
  }
135
135
  /**
136
136
  * Create default AGENTS.md content
137
- * v4.11: Updated for unified /clavix:improve command
137
+ * v5.1: Updated for consolidated implement command
138
138
  */
139
139
  static getDefaultAgentsContent() {
140
140
  return `# AI Agent Instructions
@@ -165,19 +165,19 @@ For more information, run \`clavix --help\` in your terminal.
165
165
  /**
166
166
  * Create the CLAUDE.md block content (without file wrapper)
167
167
  * This is the single source of truth for Claude Code documentation
168
- * v4.11: Updated for unified /clavix:improve command
168
+ * v5.1: Consolidated execute into implement, removed prompts command
169
169
  */
170
170
  static getClaudeBlockContent() {
171
171
  return `## Clavix Integration
172
172
 
173
173
  This project uses Clavix for prompt improvement and PRD generation. The following slash commands are available:
174
174
 
175
- ### Prompt Optimization Commands
175
+ ### Prompt Optimization
176
176
 
177
177
  #### /clavix:improve [prompt]
178
178
  Optimize prompts with smart depth auto-selection. Clavix analyzes your prompt quality and automatically selects the appropriate depth (standard or comprehensive). Use for all prompt optimization needs.
179
179
 
180
- ### PRD & Planning Commands
180
+ ### PRD & Planning
181
181
 
182
182
  #### /clavix:prd
183
183
  Launch the PRD generation workflow. Clavix will guide you through strategic questions and generate both a comprehensive PRD and a quick-reference version optimized for AI consumption.
@@ -186,9 +186,11 @@ Launch the PRD generation workflow. Clavix will guide you through strategic ques
186
186
  Generate an optimized implementation task breakdown from your PRD. Creates a phased task plan with dependencies and priorities.
187
187
 
188
188
  #### /clavix:implement
189
- Execute tasks from your task plan with AI assistance. Supports automatic git commits and progress tracking.
189
+ Execute tasks or prompts with AI assistance. Auto-detects source: tasks.md (from PRD workflow) or prompts/ (from improve workflow). Supports automatic git commits and progress tracking.
190
190
 
191
- ### Session Management Commands
191
+ Use \`--latest\` to execute most recent prompt, \`--tasks\` to force task mode.
192
+
193
+ ### Session Management
192
194
 
193
195
  #### /clavix:start
194
196
  Enter conversational mode for iterative prompt development. Discuss your requirements naturally, and later use \`/clavix:summarize\` to extract an optimized prompt.
@@ -198,11 +200,8 @@ Analyze the current conversation and extract key requirements into a structured
198
200
 
199
201
  ### Utility Commands
200
202
 
201
- #### /clavix:execute
202
- Run saved prompts with lifecycle awareness. Execute previously optimized prompts.
203
-
204
- #### /clavix:prompts
205
- Manage your saved prompts. List, view, and organize your prompt library.
203
+ #### /clavix:verify
204
+ Verify implementation against checklist. Run automated checks and generate pass/fail reports.
206
205
 
207
206
  #### /clavix:archive
208
207
  Archive completed projects. Move finished PRDs and outputs to the archive for future reference.
@@ -215,7 +214,8 @@ Archive completed projects. Move finished PRDs and outputs to the archive for fu
215
214
  1. Start with \`/clavix:prd\` or \`/clavix:start\` for complex features
216
215
  2. Generate tasks with \`/clavix:plan\`
217
216
  3. Implement with \`/clavix:implement\`
218
- 4. Archive when complete with \`/clavix:archive\`
217
+ 4. Verify with \`/clavix:verify\`
218
+ 5. Archive when complete with \`/clavix:archive\`
219
219
 
220
220
  **Pro tip**: Start complex features with \`/clavix:prd\` or \`/clavix:start\` to ensure clear requirements before implementation.`;
221
221
  }
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ import { run, handle, settings } from '@oclif/core';
3
+ // Disable debug mode (stack traces) unless explicitly requested via DEBUG env var
4
+ if (!process.env.DEBUG) {
5
+ settings.debug = false;
6
+ }
7
+ // Run if called directly
8
+ if (import.meta.url === `file://${process.argv[1]}`) {
9
+ run().catch(handle);
10
+ }
11
+ // Export for testing
12
+ export { run };
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { run } from '@oclif/core';
3
+ export { run };
4
+ //# sourceMappingURL=index.d.ts.map
@@ -4,7 +4,7 @@ This guide is for agents that can only read documentation (no slash-command supp
4
4
 
5
5
  ---
6
6
 
7
- ## ⛔ CLAVIX MODE ENFORCEMENT (v4.7)
7
+ ## ⛔ CLAVIX MODE ENFORCEMENT
8
8
 
9
9
  **CRITICAL: Know which mode you're in and STOP at the right point.**
10
10
 
@@ -12,7 +12,7 @@ This guide is for agents that can only read documentation (no slash-command supp
12
12
  - Improve mode - Prompt optimization only (auto-selects depth)
13
13
  - Your role: Analyze, optimize, show improved prompt, **STOP**
14
14
  - ❌ DO NOT implement the prompt's requirements
15
- - ✅ After showing optimized prompt, tell user: "Run `/clavix:execute --latest` to implement"
15
+ - ✅ After showing optimized prompt, tell user: "Run `/clavix:implement --latest` to implement"
16
16
 
17
17
  **PLANNING workflows** (NO CODE ALLOWED):
18
18
  - Conversational mode, requirement extraction, PRD generation
@@ -66,36 +66,37 @@ For complete step-by-step workflows, see `.clavix/instructions/`:
66
66
 
67
67
  ---
68
68
 
69
- ## 📋 CLI Quick Reference
69
+ ## 📋 Clavix Commands (v5)
70
70
 
71
+ ### Setup Commands (CLI)
71
72
  | Command | Purpose |
72
73
  |---------|---------|
73
- | `clavix init` | Interactive setup with integration selection |
74
- | `clavix improve "<prompt>"` | Unified optimization with auto-depth selection |
75
- | `clavix improve --comprehensive "<prompt>"` | Force comprehensive analysis |
76
- | `clavix improve --standard "<prompt>"` | Force standard optimization |
77
- | `clavix analyze "<prompt>"` | JSON analysis output for programmatic use |
78
- | `clavix execute [--latest]` | Execute saved prompts (interactive or --latest) |
79
- | `clavix verify [--latest]` | Verify implementation against checklist |
80
- | `clavix prompts list` | View saved prompts with status (NEW, EXECUTED, OLD, STALE) |
81
- | `clavix prompts clear` | Manage cleanup (--executed, --stale, --standard, --comprehensive, --all) |
82
- | `clavix prd` | Guided PRD generation → `full-prd.md` + `quick-prd.md` |
83
- | `clavix plan` | Transform PRD → phase-based `tasks.md` |
84
- | `clavix implement [--commit-strategy=<type>]` | Execute tasks (git strategies: per-task, per-5-tasks, per-phase, none) |
85
- | `clavix start` | Begin conversational session |
86
- | `clavix summarize [session-id]` | Extract PRD from session |
87
- | `clavix list` | List sessions and outputs |
88
- | `clavix archive [project]` | Archive/restore completed projects |
89
- | `clavix update` | Refresh documentation |
74
+ | `clavix init` | Initialize Clavix in a project |
75
+ | `clavix update` | Update templates after package update |
76
+ | `clavix config` | Manage configuration |
77
+ | `clavix version` | Show version |
78
+
79
+ ### Workflow Commands (Slash Commands)
80
+ All workflows are executed via slash commands that AI agents read and follow:
81
+
82
+ | Slash Command | Purpose |
83
+ |---------------|---------|
84
+ | `/clavix:improve` | Optimize prompts (auto-selects depth) |
85
+ | `/clavix:prd` | Generate PRD through guided questions |
86
+ | `/clavix:plan` | Create task breakdown from PRD |
87
+ | `/clavix:implement` | Execute tasks or prompts (auto-detects source) |
88
+ | `/clavix:start` | Begin conversational session |
89
+ | `/clavix:summarize` | Extract requirements from conversation |
90
+ | `/clavix:verify` | Verify implementation |
91
+ | `/clavix:archive` | Archive completed projects |
90
92
 
91
93
  **Quick start:**
92
94
  ```bash
93
95
  npm install -g clavix
94
96
  clavix init
95
- clavix version
96
97
  ```
97
98
 
98
- **Save behavior:** CLI auto-saves prompts to `.clavix/outputs/`. When using slash commands, the agent must save manually per template instructions (no automatic persistence).
99
+ **How it works:** Slash commands are markdown templates. When invoked, the agent reads the template and follows its instructions using native tools (Read, Write, Edit, Bash).
99
100
 
100
101
  ---
101
102
 
@@ -110,23 +111,23 @@ PRD Creation → Task Planning → Implementation → Archive
110
111
  **Detailed steps:**
111
112
 
112
113
  1. **Planning Phase**
113
- - Run: User uses conversational mode or direct PRD generation
114
+ - Run: `/clavix:prd` or `/clavix:start` `/clavix:summarize`
114
115
  - Output: `.clavix/outputs/{project}/full-prd.md` + `quick-prd.md`
115
116
  - Mode: PLANNING
116
117
 
117
118
  2. **Task Preparation**
118
- - Run: `clavix plan` transforms PRD into curated task list
119
+ - Run: `/clavix:plan` transforms PRD into curated task list
119
120
  - Output: `.clavix/outputs/{project}/tasks.md`
120
121
  - Mode: PLANNING (Pre-Implementation)
121
122
 
122
123
  3. **Implementation Phase**
123
- - Run: `clavix implement [--commit-strategy=<type>]`
124
+ - Run: `/clavix:implement`
124
125
  - Agent executes tasks systematically
125
126
  - Mode: IMPLEMENTATION
126
- - Uses `clavix task-complete <taskId>` to mark progress
127
+ - Agent edits tasks.md directly to mark progress (`- [ ]` → `- [x]`)
127
128
 
128
129
  4. **Completion**
129
- - Run: `clavix archive [project]`
130
+ - Run: `/clavix:archive`
130
131
  - Archives completed work
131
132
  - Mode: Management
132
133
 
@@ -167,7 +168,7 @@ PRD Creation → Task Planning → Implementation → Archive
167
168
  ### ❌ Recreating workflow instructions inline
168
169
  **Wrong:** Copy entire fast mode workflow into response
169
170
 
170
- **Right:** Reference `.clavix/instructions/workflows/fast.md` and follow its steps
171
+ **Right:** Reference `.clavix/instructions/workflows/improve.md` and follow its steps
171
172
 
172
173
  ### ❌ Not using instruction files
173
174
  **Wrong:** Make up workflow steps or guess at process