clavix 4.12.0 → 5.0.1

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 (163) hide show
  1. package/README.md +69 -61
  2. package/dist/cli/commands/init.js +54 -153
  3. package/dist/cli/commands/update.js +19 -21
  4. package/dist/templates/agents/agents.md +28 -26
  5. package/dist/templates/agents/copilot-instructions.md +42 -36
  6. package/dist/templates/agents/octo.md +41 -36
  7. package/dist/templates/agents/warp.md +24 -24
  8. package/dist/templates/instructions/README.md +8 -5
  9. package/dist/templates/slash-commands/_canonical/archive.md +83 -121
  10. package/dist/templates/slash-commands/_canonical/execute.md +32 -42
  11. package/dist/templates/slash-commands/_canonical/implement.md +32 -44
  12. package/dist/templates/slash-commands/_canonical/improve.md +13 -52
  13. package/dist/templates/slash-commands/_canonical/plan.md +8 -20
  14. package/dist/templates/slash-commands/_canonical/verify.md +9 -9
  15. package/dist/templates/slash-commands/_components/agent-protocols/assertion-checkpoints.md +1 -1
  16. package/dist/templates/slash-commands/_components/agent-protocols/cli-reference.md +84 -180
  17. package/dist/templates/slash-commands/_components/agent-protocols/decision-rules.md +5 -6
  18. package/dist/templates/slash-commands/_components/agent-protocols/error-handling.md +2 -2
  19. package/dist/templates/slash-commands/_components/agent-protocols/file-formats.md +41 -59
  20. package/dist/templates/slash-commands/_components/agent-protocols/state-awareness.md +5 -7
  21. package/dist/templates/slash-commands/_components/sections/file-saving-protocol.md +20 -27
  22. package/dist/templates/slash-commands/_components/troubleshooting/file-not-saved.md +4 -5
  23. package/dist/templates/slash-commands/_components/troubleshooting/vibecoder-recovery.md +2 -2
  24. package/dist/utils/agent-error-messages.js +13 -12
  25. package/package.json +2 -2
  26. package/dist/cli/commands/analyze.d.ts +0 -17
  27. package/dist/cli/commands/analyze.js +0 -133
  28. package/dist/cli/commands/archive.d.ts +0 -36
  29. package/dist/cli/commands/archive.js +0 -266
  30. package/dist/cli/commands/deep.d.ts +0 -17
  31. package/dist/cli/commands/deep.js +0 -170
  32. package/dist/cli/commands/execute.d.ts +0 -15
  33. package/dist/cli/commands/execute.js +0 -168
  34. package/dist/cli/commands/fast.d.ts +0 -18
  35. package/dist/cli/commands/fast.js +0 -219
  36. package/dist/cli/commands/implement.d.ts +0 -24
  37. package/dist/cli/commands/implement.js +0 -289
  38. package/dist/cli/commands/improve.d.ts +0 -32
  39. package/dist/cli/commands/improve.js +0 -250
  40. package/dist/cli/commands/list.d.ts +0 -17
  41. package/dist/cli/commands/list.js +0 -217
  42. package/dist/cli/commands/plan.d.ts +0 -21
  43. package/dist/cli/commands/plan.js +0 -297
  44. package/dist/cli/commands/prd.d.ts +0 -24
  45. package/dist/cli/commands/prd.js +0 -321
  46. package/dist/cli/commands/prompts/clear.d.ts +0 -16
  47. package/dist/cli/commands/prompts/clear.js +0 -222
  48. package/dist/cli/commands/prompts/list.d.ts +0 -8
  49. package/dist/cli/commands/prompts/list.js +0 -88
  50. package/dist/cli/commands/show.d.ts +0 -21
  51. package/dist/cli/commands/show.js +0 -191
  52. package/dist/cli/commands/start.d.ts +0 -40
  53. package/dist/cli/commands/start.js +0 -210
  54. package/dist/cli/commands/summarize.d.ts +0 -17
  55. package/dist/cli/commands/summarize.js +0 -196
  56. package/dist/cli/commands/task-complete.d.ts +0 -27
  57. package/dist/cli/commands/task-complete.js +0 -269
  58. package/dist/cli/commands/verify.d.ts +0 -28
  59. package/dist/cli/commands/verify.js +0 -349
  60. package/dist/core/archive-manager.d.ts +0 -100
  61. package/dist/core/archive-manager.js +0 -302
  62. package/dist/core/basic-checklist-generator.d.ts +0 -35
  63. package/dist/core/basic-checklist-generator.js +0 -344
  64. package/dist/core/checklist-parser.d.ts +0 -48
  65. package/dist/core/checklist-parser.js +0 -238
  66. package/dist/core/config-manager.d.ts +0 -149
  67. package/dist/core/config-manager.js +0 -230
  68. package/dist/core/conversation-analyzer.d.ts +0 -86
  69. package/dist/core/conversation-analyzer.js +0 -387
  70. package/dist/core/conversation-quality-tracker.d.ts +0 -81
  71. package/dist/core/conversation-quality-tracker.js +0 -195
  72. package/dist/core/git-manager.d.ts +0 -126
  73. package/dist/core/git-manager.js +0 -282
  74. package/dist/core/intelligence/confidence-calculator.d.ts +0 -93
  75. package/dist/core/intelligence/confidence-calculator.js +0 -124
  76. package/dist/core/intelligence/index.d.ts +0 -11
  77. package/dist/core/intelligence/index.js +0 -15
  78. package/dist/core/intelligence/intent-detector.d.ts +0 -54
  79. package/dist/core/intelligence/intent-detector.js +0 -723
  80. package/dist/core/intelligence/pattern-library.d.ts +0 -104
  81. package/dist/core/intelligence/pattern-library.js +0 -330
  82. package/dist/core/intelligence/patterns/actionability-enhancer.d.ts +0 -27
  83. package/dist/core/intelligence/patterns/actionability-enhancer.js +0 -192
  84. package/dist/core/intelligence/patterns/alternative-phrasing-generator.d.ts +0 -29
  85. package/dist/core/intelligence/patterns/alternative-phrasing-generator.js +0 -239
  86. package/dist/core/intelligence/patterns/ambiguity-detector.d.ts +0 -22
  87. package/dist/core/intelligence/patterns/ambiguity-detector.js +0 -196
  88. package/dist/core/intelligence/patterns/assumption-explicitizer.d.ts +0 -30
  89. package/dist/core/intelligence/patterns/assumption-explicitizer.js +0 -296
  90. package/dist/core/intelligence/patterns/base-pattern.d.ts +0 -192
  91. package/dist/core/intelligence/patterns/base-pattern.js +0 -103
  92. package/dist/core/intelligence/patterns/completeness-validator.d.ts +0 -27
  93. package/dist/core/intelligence/patterns/completeness-validator.js +0 -221
  94. package/dist/core/intelligence/patterns/conciseness-filter.d.ts +0 -20
  95. package/dist/core/intelligence/patterns/conciseness-filter.js +0 -92
  96. package/dist/core/intelligence/patterns/context-precision.d.ts +0 -32
  97. package/dist/core/intelligence/patterns/context-precision.js +0 -389
  98. package/dist/core/intelligence/patterns/conversation-summarizer.d.ts +0 -30
  99. package/dist/core/intelligence/patterns/conversation-summarizer.js +0 -277
  100. package/dist/core/intelligence/patterns/dependency-identifier.d.ts +0 -23
  101. package/dist/core/intelligence/patterns/dependency-identifier.js +0 -166
  102. package/dist/core/intelligence/patterns/domain-context-enricher.d.ts +0 -21
  103. package/dist/core/intelligence/patterns/domain-context-enricher.js +0 -198
  104. package/dist/core/intelligence/patterns/edge-case-identifier.d.ts +0 -30
  105. package/dist/core/intelligence/patterns/edge-case-identifier.js +0 -269
  106. package/dist/core/intelligence/patterns/error-tolerance-enhancer.d.ts +0 -22
  107. package/dist/core/intelligence/patterns/error-tolerance-enhancer.js +0 -179
  108. package/dist/core/intelligence/patterns/implicit-requirement-extractor.d.ts +0 -24
  109. package/dist/core/intelligence/patterns/implicit-requirement-extractor.js +0 -259
  110. package/dist/core/intelligence/patterns/objective-clarifier.d.ts +0 -22
  111. package/dist/core/intelligence/patterns/objective-clarifier.js +0 -126
  112. package/dist/core/intelligence/patterns/output-format-enforcer.d.ts +0 -22
  113. package/dist/core/intelligence/patterns/output-format-enforcer.js +0 -151
  114. package/dist/core/intelligence/patterns/prd-structure-enforcer.d.ts +0 -23
  115. package/dist/core/intelligence/patterns/prd-structure-enforcer.js +0 -183
  116. package/dist/core/intelligence/patterns/prerequisite-identifier.d.ts +0 -23
  117. package/dist/core/intelligence/patterns/prerequisite-identifier.js +0 -221
  118. package/dist/core/intelligence/patterns/requirement-prioritizer.d.ts +0 -24
  119. package/dist/core/intelligence/patterns/requirement-prioritizer.js +0 -134
  120. package/dist/core/intelligence/patterns/scope-definer.d.ts +0 -26
  121. package/dist/core/intelligence/patterns/scope-definer.js +0 -236
  122. package/dist/core/intelligence/patterns/step-decomposer.d.ts +0 -31
  123. package/dist/core/intelligence/patterns/step-decomposer.js +0 -242
  124. package/dist/core/intelligence/patterns/structure-organizer.d.ts +0 -31
  125. package/dist/core/intelligence/patterns/structure-organizer.js +0 -218
  126. package/dist/core/intelligence/patterns/success-criteria-enforcer.d.ts +0 -22
  127. package/dist/core/intelligence/patterns/success-criteria-enforcer.js +0 -165
  128. package/dist/core/intelligence/patterns/success-metrics-enforcer.d.ts +0 -24
  129. package/dist/core/intelligence/patterns/success-metrics-enforcer.js +0 -165
  130. package/dist/core/intelligence/patterns/technical-context-enricher.d.ts +0 -25
  131. package/dist/core/intelligence/patterns/technical-context-enricher.js +0 -165
  132. package/dist/core/intelligence/patterns/topic-coherence-analyzer.d.ts +0 -26
  133. package/dist/core/intelligence/patterns/topic-coherence-analyzer.js +0 -300
  134. package/dist/core/intelligence/patterns/user-persona-enricher.d.ts +0 -24
  135. package/dist/core/intelligence/patterns/user-persona-enricher.js +0 -141
  136. package/dist/core/intelligence/patterns/validation-checklist-creator.d.ts +0 -31
  137. package/dist/core/intelligence/patterns/validation-checklist-creator.js +0 -242
  138. package/dist/core/intelligence/quality-assessor.d.ts +0 -71
  139. package/dist/core/intelligence/quality-assessor.js +0 -525
  140. package/dist/core/intelligence/types.d.ts +0 -111
  141. package/dist/core/intelligence/types.js +0 -3
  142. package/dist/core/intelligence/universal-optimizer.d.ts +0 -91
  143. package/dist/core/intelligence/universal-optimizer.js +0 -399
  144. package/dist/core/prd-generator.d.ts +0 -76
  145. package/dist/core/prd-generator.js +0 -173
  146. package/dist/core/prompt-manager.d.ts +0 -110
  147. package/dist/core/prompt-manager.js +0 -274
  148. package/dist/core/prompt-optimizer.d.ts +0 -268
  149. package/dist/core/prompt-optimizer.js +0 -959
  150. package/dist/core/question-engine.d.ts +0 -167
  151. package/dist/core/question-engine.js +0 -356
  152. package/dist/core/session-manager.d.ts +0 -139
  153. package/dist/core/session-manager.js +0 -365
  154. package/dist/core/task-manager.d.ts +0 -211
  155. package/dist/core/task-manager.js +0 -981
  156. package/dist/core/verification-hooks.d.ts +0 -67
  157. package/dist/core/verification-hooks.js +0 -309
  158. package/dist/core/verification-manager.d.ts +0 -107
  159. package/dist/core/verification-manager.js +0 -415
  160. package/dist/types/session.d.ts +0 -78
  161. package/dist/types/session.js +0 -8
  162. package/dist/types/verification.d.ts +0 -205
  163. package/dist/types/verification.js +0 -9
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Clavix
2
- > Prompt optimization for AI coding. Transform rough ideas into structured, actionable prompts using pattern-based analysis—no framework to learn.
2
+ > Agentic-first prompt workflows. Markdown templates that teach AI agents how to optimize prompts, create PRDs, and manage implementation. Works with Claude Code, Cursor, Windsurf, and 19+ other AI coding tools.
3
3
 
4
4
  ## Table of contents
5
5
  - [Why Clavix?](#why-clavix)
6
6
  - [How It Works](#how-it-works)
7
- - [Providers](#providers)
7
+ - [Supported AI Tools](#supported-ai-tools)
8
8
  - [Quickstart](#quickstart)
9
9
  - [Full documentation](#full-documentation)
10
10
 
@@ -12,109 +12,117 @@
12
12
 
13
13
  | Version | Highlights | Details |
14
14
  | --- | --- | --- |
15
- | **v3.6.1** (Latest) | Documentation hierarchy & verbosity reduction | [Changelog](CHANGELOG.md#361---2025-11-24) |
16
- | **v3.6.0** | Enhanced generic connector instructions | [Changelog](CHANGELOG.md#360---2025-11-24) |
17
- | **v3.5.0** | "Providers" → "Integrations" terminology | [Changelog](CHANGELOG.md#350---2025-01-24) |
18
- | **v3.4.0** | Provider categorization fixes | [Changelog](CHANGELOG.md#340---2025-11-24) |
15
+ | **v5.0.0** (Latest) | Agentic-first architecture - lean template delivery | [Changelog](CHANGELOG.md#500---2025-01-27) |
16
+ | **v4.12.0** | Final v4 release with full CLI commands | [Changelog](docs/archive/v4-changelog.md) |
19
17
 
20
- **Requirements:** Node.js 16.0.0 (ESM support required)
18
+ **Requirements:** Node.js >= 18.0.0
21
19
 
22
20
  ## Why Clavix?
23
- Better prompts lead to better code. Clavix analyzes what you're trying to do and applies structured optimization patterns—no framework to learn, no methodology to master. Just describe what you want, and Clavix structures it for AI consumption.
24
21
 
25
- **What Clavix provides:**
26
- - **Pattern-based intent detection** - Weighted keyword scoring across 11 intent categories
27
- - **20 optimization patterns** - Automatically applied based on intent and quality assessment
28
- - **Workflow management** - PRD generation, task breakdown, and implementation tracking
29
- - **Universal integration** - Supports 20+ AI coding assistants with native slash commands
22
+ Better prompts lead to better code. Clavix provides **markdown templates** that teach AI agents how to:
23
+ - **Optimize prompts** - Transform rough ideas into structured, AI-ready prompts
24
+ - **Create PRDs** - Generate comprehensive requirements documents through guided questions
25
+ - **Plan implementations** - Break down PRDs into phased task lists
26
+ - **Track progress** - Manage task completion with optional git commits
27
+
28
+ **No framework to learn.** Just describe what you want, and your AI agent follows the Clavix templates to structure it properly.
30
29
 
31
30
  Learn more in [docs/why-clavix.md](docs/why-clavix.md).
32
31
 
33
32
  ## How It Works
34
- Clavix uses pattern-based analysis to:
35
- - **Detect intent** - Keyword scoring and phrase detection across 11 intent categories
36
- - **Assess quality** - Heuristic scoring across 6 dimensions: Clarity, Efficiency, Structure, Completeness, Actionability, Specificity
37
- - **Apply patterns** - 20 optimization patterns automatically selected based on intent and quality
38
- - **Generate output** - Structured prompts optimized for AI coding assistants
39
33
 
40
- Optimization applies automatically—no frameworks to learn, no manual analysis required. Just describe what you want in plain language, and Clavix structures it into an AI-ready prompt.
34
+ Clavix v5 follows an **agentic-first architecture**:
35
+
36
+ 1. **You run `clavix init`** - Sets up `.clavix/` directory with slash command templates
37
+ 2. **You invoke a slash command** - Like `/clavix:improve` in Claude Code or Cursor
38
+ 3. **Your AI agent reads the template** - The markdown file contains all instructions
39
+ 4. **The agent follows the instructions** - Using its native tools (Write, Read, Edit, etc.)
40
+ 5. **Output is saved** - To `.clavix/outputs/` for future reference
41
41
 
42
- See [docs/philosophy.md](docs/philosophy.md) for an honest look at what Clavix is and isn't.
42
+ **No TypeScript code executes during slash command usage.** The templates are the product - they instruct AI agents on what to do.
43
43
 
44
- ## Providers
44
+ ## Supported AI Tools
45
45
 
46
- | Category | Providers |
46
+ | Category | Tools |
47
47
  | --- | --- |
48
- | IDE & editor extensions | Cursor · Windsurf · Kilocode · Roocode · Cline |
49
- | CLI agents | Claude Code · Droid CLI · CodeBuddy CLI · OpenCode · Gemini CLI · Qwen Code · LLXPRT · Amp · Crush CLI · Codex CLI · Augment CLI |
50
- | Universal adapters | AGENTS.md · GitHub Copilot · OCTO.md · WARP.md |
48
+ | IDE extensions | Cursor, Windsurf, Kilocode, Roocode, Cline |
49
+ | CLI agents | Claude Code, Droid CLI, CodeBuddy CLI, OpenCode, Gemini CLI, Qwen Code, LLXPRT, Amp, Crush CLI, Codex CLI, Augment CLI |
50
+ | Universal adapters | AGENTS.md, GitHub Copilot, OCTO.md, WARP.md |
51
51
 
52
- Provider paths and argument placeholders are listed in [docs/integrations.md](docs/integrations.md).
52
+ Full list and configuration: [docs/integrations.md](docs/integrations.md)
53
53
 
54
54
  ## Quickstart
55
55
 
56
- ### For AI Agents (Recommended)
57
-
58
- Most Clavix users work through AI coding assistants:
59
-
60
- > **💡 Choosing Your Workflow:**
61
- > - **Improve** – Optimize a single prompt (auto-selects depth)
62
- > - **PRD** – Plan something new with guided questions
63
- > - **Start** – Explore ideas conversationally
64
- >
65
- > See [Choosing the Right Workflow](docs/guides/choosing-workflow.md) for detailed guidance.
56
+ ### 1. Install and Initialize
66
57
 
67
58
  ```bash
68
- # 1. Initialize in your project
69
59
  npm install -g clavix
70
60
  clavix init
61
+ ```
62
+
63
+ This creates `.clavix/` with slash command templates and injects documentation into your CLAUDE.md (or equivalent).
71
64
 
72
- # 2. Use slash commands in your AI agent
73
- /clavix:improve "Create a login page" # Optimize a prompt
74
- /clavix:prd # Full PRD workflow
75
- /clavix:start # Conversational exploration
65
+ ### 2. Use Slash Commands
76
66
 
77
- # 3. Manage saved prompts
78
- /clavix:execute # Execute saved prompts
79
- /clavix:verify # Verify implementation against checklist
67
+ In your AI coding assistant (Claude Code, Cursor, etc.):
80
68
 
81
- # 4. Implement with task tracking
82
- /clavix:plan # Generate tasks from PRD
83
- /clavix:implement # Start implementation workflow
84
- clavix task-complete <taskId> # Mark tasks done with auto-commit
69
+ ```
70
+ /clavix:improve "Create a secure login page with JWT"
85
71
  ```
86
72
 
87
- **Supported agents**: Claude Code, Cursor, Windsurf, and [17+ more providers](docs/integrations.md)
73
+ The AI agent reads the improve template and:
74
+ - Analyzes your prompt for quality
75
+ - Applies optimization patterns
76
+ - Saves the improved version to `.clavix/outputs/prompts/`
88
77
 
89
- Learn more: [Workflow guide](docs/guides/choosing-workflow.md)
78
+ ### 3. Choose Your Workflow
90
79
 
91
- ### Direct CLI Usage (Alternative)
80
+ | Command | When to Use |
81
+ |---------|-------------|
82
+ | `/clavix:improve` | Optimize a single prompt (auto-selects depth) |
83
+ | `/clavix:prd` | Plan something new with guided questions |
84
+ | `/clavix:start` | Explore ideas conversationally first |
85
+ | `/clavix:plan` | Generate tasks from a PRD |
86
+ | `/clavix:implement` | Execute tasks with progress tracking |
87
+ | `/clavix:archive` | Archive completed projects |
92
88
 
93
- You can also use Clavix directly from the terminal:
89
+ See [Choosing the Right Workflow](docs/guides/choosing-workflow.md) for detailed guidance.
90
+
91
+ ### 4. Keep Templates Updated
94
92
 
95
93
  ```bash
96
- clavix init
97
- clavix improve "Create a login page" # Auto-selects depth
98
- clavix improve --comprehensive "Complex API" # Force comprehensive
99
- clavix prd
94
+ clavix update # After npm update clavix
100
95
  ```
101
96
 
97
+ ## CLI Commands
98
+
99
+ Clavix v5 has only 4 CLI commands (for setup, not workflows):
100
+
101
+ | Command | Purpose |
102
+ |---------|---------|
103
+ | `clavix init` | Initialize Clavix in a project |
104
+ | `clavix update` | Update templates after package update |
105
+ | `clavix config` | Manage configuration |
106
+ | `clavix version` | Show version |
107
+
108
+ **All workflows** (`/clavix:improve`, `/clavix:prd`, etc.) are **slash commands** that AI agents execute by reading markdown templates.
109
+
102
110
  ## Full documentation
103
111
  - Overview & navigation: [docs/README.md](docs/README.md)
104
- - Command reference: [docs/commands/](docs/commands/README.md)
105
- - Providers: [docs/integrations.md](docs/integrations.md)
112
+ - Integrations: [docs/integrations.md](docs/integrations.md)
106
113
  - How it works: [docs/how-it-works.md](docs/how-it-works.md)
107
114
  - Philosophy: [docs/philosophy.md](docs/philosophy.md)
108
- - Guides: [docs/guides/](docs/guides/workflows.md)
115
+ - v4 Architecture (archived): [docs/archive/v4-architecture.md](docs/archive/v4-architecture.md)
109
116
 
110
117
  ## Requirements
111
118
 
112
119
  ### For End Users
113
- - **Node.js 16.0.0** (ESM support required)
120
+ - **Node.js >= 18.0.0**
114
121
  - npm or yarn package manager
122
+ - An AI coding assistant (Claude Code, Cursor, Windsurf, etc.)
115
123
 
116
124
  ### For Contributors
117
- - **Node.js 16.0.0**
125
+ - **Node.js >= 18.0.0**
118
126
  - Run tests: `npm test`
119
127
  - Lint: `npm run lint`
120
128
  - Build: `npm run build`
@@ -273,51 +273,44 @@ 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 with progress tracking |
309
+ | \`/clavix:start\` | Begin conversational session |
310
+ | \`/clavix:summarize\` | Extract requirements from conversation |
311
+ | \`/clavix:execute\` | Run saved prompts |
312
+ | \`/clavix:verify\` | Verify implementation |
313
+ | \`/clavix:archive\` | Archive completed projects |
321
314
 
322
315
  **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
316
 
@@ -325,143 +318,51 @@ If using Claude Code, Cursor, or Windsurf, the following slash commands are avai
325
318
  - Claude Code, Gemini, Qwen: \`/clavix:improve\` (colon format)
326
319
  - Cursor, Droid, Windsurf, etc.: \`/clavix-improve\` (hyphen format)
327
320
 
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
- \`\`\`
321
+ ## Standard Workflow
391
322
 
392
- 3. **Execute tasks with git integration**:
393
- \`\`\`bash
394
- # Manual commits (default):
395
- clavix implement
323
+ **Clavix follows this progression:**
396
324
 
397
- # Or with auto-commit strategy:
398
- clavix implement --commit-strategy=per-phase
399
- \`\`\`
325
+ \`\`\`
326
+ PRD Creation → Task Planning → Implementation → Archive
327
+ \`\`\`
400
328
 
401
- 4. **Mark tasks complete**:
402
- \`\`\`bash
403
- clavix task-complete <taskId>
404
- # Validates completion, optionally commits, shows next task
405
- \`\`\`
329
+ **Detailed steps:**
406
330
 
407
- 5. **Archive when done**:
408
- \`\`\`bash
409
- clavix archive my-project
410
- \`\`\`
331
+ 1. **Planning Phase**
332
+ - Run: \`/clavix:prd\` or \`/clavix:start\` → \`/clavix:summarize\`
333
+ - Output: \`.clavix/outputs/{project}/full-prd.md\` + \`quick-prd.md\`
411
334
 
412
- ### Git Auto-Commit Strategies (v2.8.1)
335
+ 2. **Task Preparation**
336
+ - Run: \`/clavix:plan\` transforms PRD into curated task list
337
+ - Output: \`.clavix/outputs/{project}/tasks.md\`
413
338
 
414
- When using \`clavix implement --commit-strategy=<type>\`:
339
+ 3. **Implementation Phase**
340
+ - Run: \`/clavix:implement\`
341
+ - Agent executes tasks systematically
342
+ - Agent edits tasks.md directly to mark progress (\`- [ ]\` → \`- [x]\`)
415
343
 
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)
344
+ 4. **Completion**
345
+ - Run: \`/clavix:archive\`
346
+ - Archives completed work
420
347
 
421
- **Recommendation**: Use \`none\` for most projects. Only enable auto-commits for large implementations with clear phases.
348
+ **Key principle:** Planning workflows create documents. Implementation workflows write code.
422
349
 
423
- ## When to Use Which Mode (v4.11)
350
+ ## Prompt Lifecycle
424
351
 
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
352
+ 1. **Optimize prompt**: \`/clavix:improve\` - Analyzes and improves your prompt
353
+ 2. **Review**: Agent lists saved prompts from \`.clavix/outputs/prompts/\`
354
+ 3. **Execute**: \`/clavix:execute\` - Implement when ready
355
+ 4. **Cleanup**: Agent deletes old prompt files from \`.clavix/outputs/prompts/\`
430
356
 
431
- ## Typical Workflows
357
+ ## When to Use Which Mode
432
358
 
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
- \`\`\`
359
+ - **Improve mode** (\`/clavix:improve\`): Smart prompt optimization with auto-depth selection
360
+ - **PRD mode** (\`/clavix:prd\`): Strategic planning with architecture and business impact
361
+ - **Conversational mode** (\`/clavix:start\` \`/clavix:summarize\`): Natural discussion → extract structured requirements
459
362
 
460
363
  ## Customization
461
364
 
462
- Create custom templates in \`.clavix/templates/\` to override defaults:
463
- - \`improve.txt\` - Custom improve mode template
464
- - \`prd-questions.txt\` - Custom PRD questions
365
+ Create custom templates in \`.clavix/templates/\` to override defaults.
465
366
 
466
367
  Edit configuration:
467
368
  \`\`\`bash
@@ -215,28 +215,26 @@ 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 with progress tracking |
233
+ | \`/clavix:start\` | Begin conversational session |
234
+ | \`/clavix:summarize\` | Extract requirements from conversation |
235
+ | \`/clavix:execute\` | Run saved prompts |
236
+ | \`/clavix:verify\` | Verify implementation |
237
+ | \`/clavix:archive\` | Archive completed projects |
240
238
 
241
239
  Learn more: https://github.com/clavixdev/clavix`;
242
240
  }
@@ -66,36 +66,38 @@ 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 with progress tracking |
88
+ | `/clavix:start` | Begin conversational session |
89
+ | `/clavix:summarize` | Extract requirements from conversation |
90
+ | `/clavix:execute` | Run saved prompts |
91
+ | `/clavix:verify` | Verify implementation |
92
+ | `/clavix:archive` | Archive completed projects |
90
93
 
91
94
  **Quick start:**
92
95
  ```bash
93
96
  npm install -g clavix
94
97
  clavix init
95
- clavix version
96
98
  ```
97
99
 
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).
100
+ **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
101
 
100
102
  ---
101
103
 
@@ -110,23 +112,23 @@ PRD Creation → Task Planning → Implementation → Archive
110
112
  **Detailed steps:**
111
113
 
112
114
  1. **Planning Phase**
113
- - Run: User uses conversational mode or direct PRD generation
115
+ - Run: `/clavix:prd` or `/clavix:start` `/clavix:summarize`
114
116
  - Output: `.clavix/outputs/{project}/full-prd.md` + `quick-prd.md`
115
117
  - Mode: PLANNING
116
118
 
117
119
  2. **Task Preparation**
118
- - Run: `clavix plan` transforms PRD into curated task list
120
+ - Run: `/clavix:plan` transforms PRD into curated task list
119
121
  - Output: `.clavix/outputs/{project}/tasks.md`
120
122
  - Mode: PLANNING (Pre-Implementation)
121
123
 
122
124
  3. **Implementation Phase**
123
- - Run: `clavix implement [--commit-strategy=<type>]`
125
+ - Run: `/clavix:implement`
124
126
  - Agent executes tasks systematically
125
127
  - Mode: IMPLEMENTATION
126
- - Uses `clavix task-complete <taskId>` to mark progress
128
+ - Agent edits tasks.md directly to mark progress (`- [ ]` → `- [x]`)
127
129
 
128
130
  4. **Completion**
129
- - Run: `clavix archive [project]`
131
+ - Run: `/clavix:archive`
130
132
  - Archives completed work
131
133
  - Mode: Management
132
134
 
@@ -167,7 +169,7 @@ PRD Creation → Task Planning → Implementation → Archive
167
169
  ### ❌ Recreating workflow instructions inline
168
170
  **Wrong:** Copy entire fast mode workflow into response
169
171
 
170
- **Right:** Reference `.clavix/instructions/workflows/fast.md` and follow its steps
172
+ **Right:** Reference `.clavix/instructions/workflows/improve.md` and follow its steps
171
173
 
172
174
  ### ❌ Not using instruction files
173
175
  **Wrong:** Make up workflow steps or guess at process