clavix 4.12.0 → 5.0.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 (151) hide show
  1. package/README.md +69 -61
  2. package/dist/templates/slash-commands/_canonical/archive.md +83 -121
  3. package/dist/templates/slash-commands/_canonical/execute.md +32 -42
  4. package/dist/templates/slash-commands/_canonical/implement.md +32 -44
  5. package/dist/templates/slash-commands/_canonical/improve.md +13 -52
  6. package/dist/templates/slash-commands/_components/agent-protocols/cli-reference.md +84 -180
  7. package/dist/templates/slash-commands/_components/agent-protocols/error-handling.md +2 -2
  8. package/dist/templates/slash-commands/_components/agent-protocols/file-formats.md +41 -59
  9. package/dist/templates/slash-commands/_components/sections/file-saving-protocol.md +20 -27
  10. package/dist/templates/slash-commands/_components/troubleshooting/file-not-saved.md +4 -5
  11. package/package.json +2 -2
  12. package/dist/cli/commands/analyze.d.ts +0 -17
  13. package/dist/cli/commands/analyze.js +0 -133
  14. package/dist/cli/commands/archive.d.ts +0 -36
  15. package/dist/cli/commands/archive.js +0 -266
  16. package/dist/cli/commands/deep.d.ts +0 -17
  17. package/dist/cli/commands/deep.js +0 -170
  18. package/dist/cli/commands/execute.d.ts +0 -15
  19. package/dist/cli/commands/execute.js +0 -168
  20. package/dist/cli/commands/fast.d.ts +0 -18
  21. package/dist/cli/commands/fast.js +0 -219
  22. package/dist/cli/commands/implement.d.ts +0 -24
  23. package/dist/cli/commands/implement.js +0 -289
  24. package/dist/cli/commands/improve.d.ts +0 -32
  25. package/dist/cli/commands/improve.js +0 -250
  26. package/dist/cli/commands/list.d.ts +0 -17
  27. package/dist/cli/commands/list.js +0 -217
  28. package/dist/cli/commands/plan.d.ts +0 -21
  29. package/dist/cli/commands/plan.js +0 -297
  30. package/dist/cli/commands/prd.d.ts +0 -24
  31. package/dist/cli/commands/prd.js +0 -321
  32. package/dist/cli/commands/prompts/clear.d.ts +0 -16
  33. package/dist/cli/commands/prompts/clear.js +0 -222
  34. package/dist/cli/commands/prompts/list.d.ts +0 -8
  35. package/dist/cli/commands/prompts/list.js +0 -88
  36. package/dist/cli/commands/show.d.ts +0 -21
  37. package/dist/cli/commands/show.js +0 -191
  38. package/dist/cli/commands/start.d.ts +0 -40
  39. package/dist/cli/commands/start.js +0 -210
  40. package/dist/cli/commands/summarize.d.ts +0 -17
  41. package/dist/cli/commands/summarize.js +0 -196
  42. package/dist/cli/commands/task-complete.d.ts +0 -27
  43. package/dist/cli/commands/task-complete.js +0 -269
  44. package/dist/cli/commands/verify.d.ts +0 -28
  45. package/dist/cli/commands/verify.js +0 -349
  46. package/dist/core/archive-manager.d.ts +0 -100
  47. package/dist/core/archive-manager.js +0 -302
  48. package/dist/core/basic-checklist-generator.d.ts +0 -35
  49. package/dist/core/basic-checklist-generator.js +0 -344
  50. package/dist/core/checklist-parser.d.ts +0 -48
  51. package/dist/core/checklist-parser.js +0 -238
  52. package/dist/core/config-manager.d.ts +0 -149
  53. package/dist/core/config-manager.js +0 -230
  54. package/dist/core/conversation-analyzer.d.ts +0 -86
  55. package/dist/core/conversation-analyzer.js +0 -387
  56. package/dist/core/conversation-quality-tracker.d.ts +0 -81
  57. package/dist/core/conversation-quality-tracker.js +0 -195
  58. package/dist/core/git-manager.d.ts +0 -126
  59. package/dist/core/git-manager.js +0 -282
  60. package/dist/core/intelligence/confidence-calculator.d.ts +0 -93
  61. package/dist/core/intelligence/confidence-calculator.js +0 -124
  62. package/dist/core/intelligence/index.d.ts +0 -11
  63. package/dist/core/intelligence/index.js +0 -15
  64. package/dist/core/intelligence/intent-detector.d.ts +0 -54
  65. package/dist/core/intelligence/intent-detector.js +0 -723
  66. package/dist/core/intelligence/pattern-library.d.ts +0 -104
  67. package/dist/core/intelligence/pattern-library.js +0 -330
  68. package/dist/core/intelligence/patterns/actionability-enhancer.d.ts +0 -27
  69. package/dist/core/intelligence/patterns/actionability-enhancer.js +0 -192
  70. package/dist/core/intelligence/patterns/alternative-phrasing-generator.d.ts +0 -29
  71. package/dist/core/intelligence/patterns/alternative-phrasing-generator.js +0 -239
  72. package/dist/core/intelligence/patterns/ambiguity-detector.d.ts +0 -22
  73. package/dist/core/intelligence/patterns/ambiguity-detector.js +0 -196
  74. package/dist/core/intelligence/patterns/assumption-explicitizer.d.ts +0 -30
  75. package/dist/core/intelligence/patterns/assumption-explicitizer.js +0 -296
  76. package/dist/core/intelligence/patterns/base-pattern.d.ts +0 -192
  77. package/dist/core/intelligence/patterns/base-pattern.js +0 -103
  78. package/dist/core/intelligence/patterns/completeness-validator.d.ts +0 -27
  79. package/dist/core/intelligence/patterns/completeness-validator.js +0 -221
  80. package/dist/core/intelligence/patterns/conciseness-filter.d.ts +0 -20
  81. package/dist/core/intelligence/patterns/conciseness-filter.js +0 -92
  82. package/dist/core/intelligence/patterns/context-precision.d.ts +0 -32
  83. package/dist/core/intelligence/patterns/context-precision.js +0 -389
  84. package/dist/core/intelligence/patterns/conversation-summarizer.d.ts +0 -30
  85. package/dist/core/intelligence/patterns/conversation-summarizer.js +0 -277
  86. package/dist/core/intelligence/patterns/dependency-identifier.d.ts +0 -23
  87. package/dist/core/intelligence/patterns/dependency-identifier.js +0 -166
  88. package/dist/core/intelligence/patterns/domain-context-enricher.d.ts +0 -21
  89. package/dist/core/intelligence/patterns/domain-context-enricher.js +0 -198
  90. package/dist/core/intelligence/patterns/edge-case-identifier.d.ts +0 -30
  91. package/dist/core/intelligence/patterns/edge-case-identifier.js +0 -269
  92. package/dist/core/intelligence/patterns/error-tolerance-enhancer.d.ts +0 -22
  93. package/dist/core/intelligence/patterns/error-tolerance-enhancer.js +0 -179
  94. package/dist/core/intelligence/patterns/implicit-requirement-extractor.d.ts +0 -24
  95. package/dist/core/intelligence/patterns/implicit-requirement-extractor.js +0 -259
  96. package/dist/core/intelligence/patterns/objective-clarifier.d.ts +0 -22
  97. package/dist/core/intelligence/patterns/objective-clarifier.js +0 -126
  98. package/dist/core/intelligence/patterns/output-format-enforcer.d.ts +0 -22
  99. package/dist/core/intelligence/patterns/output-format-enforcer.js +0 -151
  100. package/dist/core/intelligence/patterns/prd-structure-enforcer.d.ts +0 -23
  101. package/dist/core/intelligence/patterns/prd-structure-enforcer.js +0 -183
  102. package/dist/core/intelligence/patterns/prerequisite-identifier.d.ts +0 -23
  103. package/dist/core/intelligence/patterns/prerequisite-identifier.js +0 -221
  104. package/dist/core/intelligence/patterns/requirement-prioritizer.d.ts +0 -24
  105. package/dist/core/intelligence/patterns/requirement-prioritizer.js +0 -134
  106. package/dist/core/intelligence/patterns/scope-definer.d.ts +0 -26
  107. package/dist/core/intelligence/patterns/scope-definer.js +0 -236
  108. package/dist/core/intelligence/patterns/step-decomposer.d.ts +0 -31
  109. package/dist/core/intelligence/patterns/step-decomposer.js +0 -242
  110. package/dist/core/intelligence/patterns/structure-organizer.d.ts +0 -31
  111. package/dist/core/intelligence/patterns/structure-organizer.js +0 -218
  112. package/dist/core/intelligence/patterns/success-criteria-enforcer.d.ts +0 -22
  113. package/dist/core/intelligence/patterns/success-criteria-enforcer.js +0 -165
  114. package/dist/core/intelligence/patterns/success-metrics-enforcer.d.ts +0 -24
  115. package/dist/core/intelligence/patterns/success-metrics-enforcer.js +0 -165
  116. package/dist/core/intelligence/patterns/technical-context-enricher.d.ts +0 -25
  117. package/dist/core/intelligence/patterns/technical-context-enricher.js +0 -165
  118. package/dist/core/intelligence/patterns/topic-coherence-analyzer.d.ts +0 -26
  119. package/dist/core/intelligence/patterns/topic-coherence-analyzer.js +0 -300
  120. package/dist/core/intelligence/patterns/user-persona-enricher.d.ts +0 -24
  121. package/dist/core/intelligence/patterns/user-persona-enricher.js +0 -141
  122. package/dist/core/intelligence/patterns/validation-checklist-creator.d.ts +0 -31
  123. package/dist/core/intelligence/patterns/validation-checklist-creator.js +0 -242
  124. package/dist/core/intelligence/quality-assessor.d.ts +0 -71
  125. package/dist/core/intelligence/quality-assessor.js +0 -525
  126. package/dist/core/intelligence/types.d.ts +0 -111
  127. package/dist/core/intelligence/types.js +0 -3
  128. package/dist/core/intelligence/universal-optimizer.d.ts +0 -91
  129. package/dist/core/intelligence/universal-optimizer.js +0 -399
  130. package/dist/core/prd-generator.d.ts +0 -76
  131. package/dist/core/prd-generator.js +0 -173
  132. package/dist/core/prompt-manager.d.ts +0 -110
  133. package/dist/core/prompt-manager.js +0 -274
  134. package/dist/core/prompt-optimizer.d.ts +0 -268
  135. package/dist/core/prompt-optimizer.js +0 -959
  136. package/dist/core/question-engine.d.ts +0 -167
  137. package/dist/core/question-engine.js +0 -356
  138. package/dist/core/session-manager.d.ts +0 -139
  139. package/dist/core/session-manager.js +0 -365
  140. package/dist/core/task-manager.d.ts +0 -211
  141. package/dist/core/task-manager.js +0 -981
  142. package/dist/core/verification-hooks.d.ts +0 -67
  143. package/dist/core/verification-hooks.js +0 -309
  144. package/dist/core/verification-manager.d.ts +0 -107
  145. package/dist/core/verification-manager.js +0 -415
  146. package/dist/index 2.js +0 -13
  147. package/dist/index.d 2.ts +0 -4
  148. package/dist/types/session.d.ts +0 -78
  149. package/dist/types/session.js +0 -8
  150. package/dist/types/verification.d.ts +0 -205
  151. 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`
@@ -38,25 +38,25 @@ When you run `/clavix:archive`, I:
38
38
 
39
39
  ---
40
40
 
41
- ## How I Archive Projects
41
+ ## How I Archive Projects (v5 Agentic-First)
42
42
 
43
- **I handle all the commands - you just tell me what to do.**
43
+ **I use my native tools directly - no CLI commands involved.**
44
44
 
45
- ### What I Run (You Don't Need To)
45
+ ### What I Do
46
46
 
47
- | What You Want | Command I Execute |
48
- |---------------|-------------------|
49
- | Archive completed project | `clavix archive` |
50
- | Archive specific project | `clavix archive [name]` |
51
- | Archive incomplete work | `clavix archive [name] --force` |
52
- | Delete permanently | `clavix archive [name] --delete` |
53
- | See what's archived | `clavix archive --list` |
54
- | Restore from archive | `clavix archive --restore [name]` |
47
+ | What You Want | How I Do It |
48
+ |---------------|-------------|
49
+ | Archive completed project | Move directory: `.clavix/outputs/<project>` → `.clavix/outputs/archive/<project>` |
50
+ | Archive incomplete work | Same, with your confirmation |
51
+ | Delete permanently | Remove directory: `rm -rf .clavix/outputs/<project>` |
52
+ | See what's archived | List files in `.clavix/outputs/archive/` |
53
+ | Restore from archive | Move back: `.clavix/outputs/archive/<project>` `.clavix/outputs/<project>` |
55
54
 
56
55
  ### Before I Archive
57
56
 
58
57
  I check:
59
58
  - ✓ Projects exist in `.clavix/outputs/`
59
+ - ✓ Task completion status (read tasks.md)
60
60
  - ✓ What you want to do (archive, delete, restore)
61
61
  - ✓ Project name is correct
62
62
 
@@ -69,44 +69,27 @@ I tell you:
69
69
 
70
70
  ### Part B: Understanding Archive Operations
71
71
 
72
- **Archive Modes**:
72
+ **Archive Operations** (I perform these using my native tools):
73
73
 
74
- 1. **Interactive Archive Mode**:
75
- ```bash
76
- clavix archive
77
- ```
78
-
79
- CLI behavior:
80
- - Lists all PRD projects with 100% tasks completed
81
- - Allows user to select which project to archive
82
- - Confirms before archiving
83
- - Moves the project to archive directory
74
+ 1. **Interactive Archive**:
75
+ - I list all PRD projects in `.clavix/outputs/`
76
+ - I check which have 100% tasks completed
77
+ - You select which to archive
78
+ - I move the project to `.clavix/outputs/archive/`
84
79
 
85
80
  2. **Archive Specific Project**:
86
- ```bash
87
- clavix archive [project-name]
88
- ```
89
-
90
- CLI behavior:
91
- - Checks task completion status
92
- - Warns if tasks are incomplete
93
- - Asks for confirmation
94
- - Archives the specific project
81
+ - I check task completion status in `tasks.md`
82
+ - I warn if tasks are incomplete
83
+ - You confirm
84
+ - I move the project directory
95
85
 
96
86
  3. **Force Archive (Incomplete Tasks)**:
97
- ```bash
98
- clavix archive [project-name] --force
99
- ```
100
-
101
87
  Use when:
102
88
  - Project scope changed and some tasks are no longer relevant
103
89
  - User wants to archive work-in-progress
104
90
  - Tasks are incomplete but project is done
105
91
 
106
92
  4. **Delete Project (Permanent Removal)**: **DESTRUCTIVE ACTION**
107
- ```bash
108
- clavix archive [project-name] --delete
109
- ```
110
93
 
111
94
  **WARNING**: This PERMANENTLY deletes the project. Cannot be restored.
112
95
 
@@ -124,24 +107,16 @@ I tell you:
124
107
  ```
125
108
 
126
109
  **Safety confirmation required:**
127
- - Shows project details and task status
128
- - Requires typing project name to confirm
129
- - Warns about permanent deletion
130
- - Lists what will be permanently deleted
110
+ - I show project details and task status
111
+ - I ask you to type project name to confirm
112
+ - I warn about permanent deletion
113
+ - I list what will be permanently deleted
131
114
 
132
115
  5. **List Archived Projects**:
133
- ```bash
134
- clavix archive --list
135
- ```
136
-
137
- Shows all projects currently in archive with their task completion status
116
+ I read the contents of `.clavix/outputs/archive/` and show you all archived projects.
138
117
 
139
118
  6. **Restore from Archive**:
140
- ```bash
141
- clavix archive --restore [project-name]
142
- ```
143
-
144
- Moves a project back from archive to active outputs
119
+ I move a project back: `.clavix/outputs/archive/<project>` → `.clavix/outputs/<project>`
145
120
 
146
121
  ## When to Archive
147
122
 
@@ -180,61 +155,57 @@ Optimized prompts from `/clavix:improve` are stored separately in `.clavix/outpu
180
155
 
181
156
  **Prompts are NOT archived with PRD projects.**
182
157
 
183
- **Manage prompts separately (CLI commands):**
184
- ```bash
185
- clavix prompts list # View all prompts
186
- clavix prompts clear # Interactive cleanup
187
- clavix prompts clear --executed # Remove executed only
188
- clavix prompts clear --stale # Remove >30 day old
189
- ```
190
-
191
- **Before archiving, consider cleanup:**
192
- ```bash
193
- clavix prompts clear --executed
194
- ```
158
+ **To manage prompts:**
159
+ - **View all prompts**: List `.clavix/outputs/prompts/*.md` files
160
+ - **View a prompt**: Read `.clavix/outputs/prompts/<id>.md`
161
+ - **Delete executed prompts**: Remove files where frontmatter has `executed: true`
162
+ - **Delete stale prompts**: Remove files older than 30 days (check timestamp in frontmatter)
195
163
 
196
164
  **Prompts lifecycle:**
197
165
  - Independent from PRD lifecycle
198
- - Managed via CLI commands
199
- - Clear manually when project complete
166
+ - Managed by reading/writing files directly
167
+ - Clean up manually when project complete
200
168
 
201
169
  ## Example Workflows
202
170
 
203
171
  ### Workflow 1: Complete Project
204
172
  ```
205
173
  User: "I've finished implementing the user authentication feature"
206
- You: "Great! Let me help you archive it."
174
+ You: "Great! Let me check the task status and help you archive it."
207
175
 
208
- Run: clavix archive
176
+ I read: .clavix/outputs/user-authentication-system/tasks.md
177
+ Result: All 15 tasks completed (100%)
209
178
 
210
- User selects: user-authentication-system
211
- System shows: All 15 tasks completed (100%)
212
- User confirms: Yes, archive it
179
+ You confirm: Yes, archive it
213
180
 
214
- Result: Project moved to .clavix/outputs/archive/user-authentication-system/
181
+ I execute: mv .clavix/outputs/user-authentication-system .clavix/outputs/archive/
182
+
183
+ Result: Project archived to .clavix/outputs/archive/user-authentication-system/
215
184
  ```
216
185
 
217
186
  ### Workflow 2: Force Archive WIP
218
187
  ```
219
188
  User: "We're pivoting, I want to archive the old API design even though tasks aren't done"
220
- You: "I'll archive it with --force"
189
+ You: "I'll check the status and archive it if you confirm."
221
190
 
222
- Run: clavix archive old-api-design --force
191
+ I read: .clavix/outputs/old-api-design/tasks.md
192
+ Result: 8 incomplete tasks
223
193
 
224
- System shows: 8 incomplete tasks
225
194
  User confirms: Yes, archive anyway
226
195
 
196
+ I execute: mv .clavix/outputs/old-api-design .clavix/outputs/archive/
197
+
227
198
  Result: Project archived despite incomplete tasks
228
199
  ```
229
200
 
230
201
  ### Workflow 3: Restore Archived Project
231
202
  ```
232
203
  User: "Actually, we need to revisit that authentication feature"
233
- You: "I'll restore it from the archive"
204
+ You: "I'll restore it from the archive."
234
205
 
235
- Run: clavix archive --restore user-authentication-system
206
+ I execute: mv .clavix/outputs/archive/user-authentication-system .clavix/outputs/
236
207
 
237
- Result: Project moved back to .clavix/outputs/user-authentication-system/
208
+ Result: Project restored to .clavix/outputs/user-authentication-system/
238
209
  ```
239
210
 
240
211
  ### Workflow 4: Delete Failed Experiment
@@ -243,26 +214,25 @@ User: "I have a test project 'api-experiment-1' that I don't need anymore"
243
214
  You: "Is this something you might reference later, or can it be permanently deleted?"
244
215
 
245
216
  User: "It was just a quick test, no value. Delete it."
246
- You: "This will permanently delete the project. I'll run the delete command."
217
+ You: "This will permanently delete the project. Please confirm by typing the project name."
247
218
 
248
- Run: clavix archive api-experiment-1 --delete
249
-
250
- System shows:
219
+ I show:
251
220
  Project: api-experiment-1
252
221
  Tasks: 3/5 completed
253
222
  Files: full-prd.md, quick-prd.md, tasks.md
254
223
 
255
224
  WARNING: This action is PERMANENT and CANNOT be undone.
256
- Type the project name to confirm deletion: _
257
225
 
258
226
  User types: api-experiment-1
259
227
 
260
- Result: Project permanently deleted from .clavix/outputs/api-experiment-1/
228
+ I execute: rm -rf .clavix/outputs/api-experiment-1
229
+
230
+ Result: Project permanently deleted
261
231
  ```
262
232
 
263
233
  ---
264
234
 
265
- ## Agent Transparency (v4.9)
235
+ ## Agent Transparency (v5.0)
266
236
 
267
237
  ### CLI Reference (Commands I Execute)
268
238
  {{INCLUDE:agent-protocols/cli-reference.md}}
@@ -295,37 +265,37 @@ Result: Project permanently deleted from .clavix/outputs/api-experiment-1/
295
265
  - Archive keeps your active projects list clean and focused
296
266
  - Archived projects maintain all their data (nothing is deleted)
297
267
  - Archive is searchable - you can still `grep` or find files in archive/
298
- - Regular archiving improves `/clavix:plan` and `/clavix:implement` performance
299
- - Use `--list` regularly to know what's been archived
268
+ - Regular archiving keeps `.clavix/outputs/` organized
269
+ - Check `.clavix/outputs/archive/` to see what's been archived
300
270
 
301
271
  ## Troubleshooting
302
272
 
303
273
  ### Issue: No projects available to archive
304
274
  **Cause**: No projects in `.clavix/outputs/` OR all already archived
305
275
 
306
- **Agent recovery**:
307
- 1. Check if `.clavix/outputs/` exists: `ls .clavix/outputs/`
276
+ **How I handle it**:
277
+ 1. Read `.clavix/outputs/` directory
308
278
  2. If directory doesn't exist: "No PRD projects found. Create one with `/clavix:prd`"
309
- 3. If empty: Run `clavix archive --list` to show archived projects
279
+ 3. If empty: Check `.clavix/outputs/archive/` for archived projects
310
280
  4. Communicate: "All projects are already archived" or "No projects exist yet"
311
281
 
312
282
  ### Issue: Trying to archive project with incomplete tasks
313
283
  **Cause**: User wants to archive but tasks aren't 100% done
314
284
 
315
- **Agent recovery**:
316
- 1. CLI will warn about incomplete tasks
285
+ **How I handle it**:
286
+ 1. I read tasks.md and count incomplete tasks
317
287
  2. Ask user: "Project has X incomplete tasks. Do you want to:
318
288
  - Complete tasks first with `/clavix:implement`
319
- - Archive anyway with `--force` (tasks remain incomplete but archived)
289
+ - Archive anyway (tasks remain incomplete but archived)
320
290
  - Cancel archival"
321
- 3. If user confirms force: Run `clavix archive [project] --force`
322
- 4. If scope changed: Explain `--force` is appropriate
291
+ 3. If user confirms: I move the directory
292
+ 4. If scope changed: Explain force archive is appropriate
323
293
 
324
294
  ### Issue: Cannot restore archived project (name conflict)
325
295
  **Cause**: Project with same name already exists in active outputs
326
296
 
327
- **Agent recovery**:
328
- 1. CLI will show error: "Project '[name]' already exists in active outputs"
297
+ **How I handle it**:
298
+ 1. I detect the conflict when checking the target directory
329
299
  2. Ask user which option:
330
300
  - Archive the active project first, then restore old one
331
301
  - Keep both (manual rename required)
@@ -335,62 +305,54 @@ Result: Project permanently deleted from .clavix/outputs/api-experiment-1/
335
305
  ### Issue: Unsure whether to delete or archive
336
306
  **Cause**: User wants to clean up but uncertain about permanence
337
307
 
338
- **Agent recovery**:
308
+ **How I handle it**:
339
309
  1. Use decision tree to guide user:
340
- ```
341
- Ask user questions:
342
310
  - "Is this a failed experiment with no learning value?"
343
311
  - "Might you need to reference this code later?"
344
312
  - "Are you unsure if it's valuable?"
345
- ```
346
313
  2. Default recommendation: **ARCHIVE** (safer, reversible)
347
314
  3. Only suggest DELETE for: duplicates, failed experiments, test data with zero value
348
315
  4. Remind: "Archive is free, disk space is cheap, regret is expensive"
349
316
 
350
- ### Issue: CLI command fails or hangs
317
+ ### Issue: File operation fails
351
318
  **Cause**: File system permissions, missing directory, or process error
352
319
 
353
- **Agent recovery**:
354
- 1. Check error output from CLI
320
+ **How I handle it**:
321
+ 1. Check error output
355
322
  2. Common fixes:
356
323
  - Check `.clavix/outputs/` exists and is writable
357
324
  - Verify project name is correct (no typos)
358
325
  - Check if another process is accessing the files
359
- 3. Suggest: Run with full project path or retry
360
- 4. If persistent: Inform user to check file permissions
326
+ 3. Retry the operation or inform user about permissions
361
327
 
362
- ### Issue: Accidentally deleted project (used --delete instead of archive)
363
- **Cause**: User error or misunderstanding of --delete flag
328
+ ### Issue: Accidentally deleted project
329
+ **Cause**: User error
364
330
 
365
- **Agent recovery**:
366
- 1. Acknowledge: "Project was permanently deleted via `--delete` flag"
331
+ **How I handle it**:
332
+ 1. Acknowledge: "Project was permanently deleted"
367
333
  2. Check recovery options:
368
334
  - "If code was committed to git, we can recover from git history"
369
335
  - "Check if you have local backups"
370
336
  - "Check if IDE has local history (VS Code, JetBrains)"
371
337
  3. Prevention: "Going forward, use ARCHIVE by default. Only DELETE when absolutely certain."
372
- 4. No recovery possible from Clavix itself
373
338
 
374
339
  ### Issue: Archive directory getting too large
375
340
  **Cause**: Many archived projects accumulating
376
341
 
377
- **Agent response**:
342
+ **How I handle it**:
378
343
  1. Explain: "Archive is designed to grow - this is normal behavior"
379
- 2. Archived projects don't affect active command performance
380
- 3. If user truly concerned:
381
- - Review archive: `clavix archive --list`
344
+ 2. Archived projects don't affect workflow performance
345
+ 3. If user concerned:
346
+ - List archive contents
382
347
  - Identify ancient/irrelevant projects
383
- - Delete only truly obsolete ones: `clavix archive [old-project] --delete`
348
+ - Delete only truly obsolete ones
384
349
  - Or suggest external backup for very old projects
385
350
 
386
351
  ### Issue: Archived project but forgot what it was about
387
352
  **Cause**: No naming convention or time passed
388
353
 
389
- **Agent recovery**:
390
- 1. Read the PRD to remind user:
391
- ```bash
392
- cat .clavix/outputs/archive/[project-name]/full-prd.md
393
- ```
354
+ **How I handle it**:
355
+ 1. Read the PRD: `.clavix/outputs/archive/[project-name]/full-prd.md`
394
356
  2. Summarize: Problem, Goal, Features from PRD
395
357
  3. Suggest: Better naming conventions going forward
396
358
  - Example: `2024-01-user-auth` (date-feature format)