clavix 2.4.3 → 2.5.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 (67) hide show
  1. package/dist/cli/commands/task-complete.d.ts +27 -0
  2. package/dist/cli/commands/task-complete.js +305 -0
  3. package/dist/core/config-manager.d.ts +149 -0
  4. package/dist/core/config-manager.js +267 -0
  5. package/dist/core/git-manager.d.ts +27 -1
  6. package/dist/core/git-manager.js +114 -10
  7. package/dist/core/task-manager.d.ts +31 -0
  8. package/dist/core/task-manager.js +142 -0
  9. package/dist/templates/slash-commands/_canonical/implement.md +104 -50
  10. package/package.json +1 -1
  11. /package/dist/{core 2/adapters → core/adapters 2}/agents-md-generator.d.ts +0 -0
  12. /package/dist/{core 2/adapters → core/adapters 2}/agents-md-generator.js +0 -0
  13. /package/dist/{core 2/adapters → core/adapters 2}/amp-adapter.d.ts +0 -0
  14. /package/dist/{core 2/adapters → core/adapters 2}/amp-adapter.js +0 -0
  15. /package/dist/{core 2/adapters → core/adapters 2}/augment-adapter.d.ts +0 -0
  16. /package/dist/{core 2/adapters → core/adapters 2}/augment-adapter.js +0 -0
  17. /package/dist/{core 2/adapters → core/adapters 2}/base-adapter.d.ts +0 -0
  18. /package/dist/{core 2/adapters → core/adapters 2}/base-adapter.js +0 -0
  19. /package/dist/{core 2/adapters → core/adapters 2}/claude-code-adapter.d.ts +0 -0
  20. /package/dist/{core 2/adapters → core/adapters 2}/claude-code-adapter.js +0 -0
  21. /package/dist/{core 2/adapters → core/adapters 2}/cline-adapter.d.ts +0 -0
  22. /package/dist/{core 2/adapters → core/adapters 2}/cline-adapter.js +0 -0
  23. /package/dist/{core 2/adapters → core/adapters 2}/codebuddy-adapter.d.ts +0 -0
  24. /package/dist/{core 2/adapters → core/adapters 2}/codebuddy-adapter.js +0 -0
  25. /package/dist/{core 2/adapters → core/adapters 2}/codex-adapter.d.ts +0 -0
  26. /package/dist/{core 2/adapters → core/adapters 2}/codex-adapter.js +0 -0
  27. /package/dist/{core 2/adapters → core/adapters 2}/copilot-instructions-generator.d.ts +0 -0
  28. /package/dist/{core 2/adapters → core/adapters 2}/copilot-instructions-generator.js +0 -0
  29. /package/dist/{core 2/adapters → core/adapters 2}/crush-adapter.d.ts +0 -0
  30. /package/dist/{core 2/adapters → core/adapters 2}/crush-adapter.js +0 -0
  31. /package/dist/{core 2/adapters → core/adapters 2}/cursor-adapter.d.ts +0 -0
  32. /package/dist/{core 2/adapters → core/adapters 2}/cursor-adapter.js +0 -0
  33. /package/dist/{core 2/adapters → core/adapters 2}/droid-adapter.d.ts +0 -0
  34. /package/dist/{core 2/adapters → core/adapters 2}/droid-adapter.js +0 -0
  35. /package/dist/{core 2/adapters → core/adapters 2}/gemini-adapter.d.ts +0 -0
  36. /package/dist/{core 2/adapters → core/adapters 2}/gemini-adapter.js +0 -0
  37. /package/dist/{core 2/adapters → core/adapters 2}/kilocode-adapter.d.ts +0 -0
  38. /package/dist/{core 2/adapters → core/adapters 2}/kilocode-adapter.js +0 -0
  39. /package/dist/{core 2/adapters → core/adapters 2}/octo-md-generator.d.ts +0 -0
  40. /package/dist/{core 2/adapters → core/adapters 2}/octo-md-generator.js +0 -0
  41. /package/dist/{core 2/adapters → core/adapters 2}/opencode-adapter.d.ts +0 -0
  42. /package/dist/{core 2/adapters → core/adapters 2}/opencode-adapter.js +0 -0
  43. /package/dist/{core 2/adapters → core/adapters 2}/qwen-adapter.d.ts +0 -0
  44. /package/dist/{core 2/adapters → core/adapters 2}/qwen-adapter.js +0 -0
  45. /package/dist/{core 2/adapters → core/adapters 2}/roocode-adapter.d.ts +0 -0
  46. /package/dist/{core 2/adapters → core/adapters 2}/roocode-adapter.js +0 -0
  47. /package/dist/{core 2/adapters → core/adapters 2}/warp-md-generator.d.ts +0 -0
  48. /package/dist/{core 2/adapters → core/adapters 2}/warp-md-generator.js +0 -0
  49. /package/dist/{core 2/adapters → core/adapters 2}/windsurf-adapter.d.ts +0 -0
  50. /package/dist/{core 2/adapters → core/adapters 2}/windsurf-adapter.js +0 -0
  51. /package/dist/{core 2/agent-manager.js → core/agent-manager 2.js} +0 -0
  52. /package/dist/{core 2/agent-manager.d.ts → core/agent-manager.d 2.ts} +0 -0
  53. /package/dist/{core 2/archive-manager.js → core/archive-manager 2.js} +0 -0
  54. /package/dist/{core 2/archive-manager.d.ts → core/archive-manager.d 2.ts} +0 -0
  55. /package/dist/{core 2/conversation-analyzer.d.ts → core/conversation-analyzer.d 2.ts} +0 -0
  56. /package/dist/{core 2/doc-injector.js → core/doc-injector 2.js} +0 -0
  57. /package/dist/{core 2/doc-injector.d.ts → core/doc-injector.d 2.ts} +0 -0
  58. /package/dist/{core 2/git-manager.js → core/git-manager 2.js} +0 -0
  59. /package/dist/{core 2/git-manager.d.ts → core/git-manager.d 2.ts} +0 -0
  60. /package/dist/{core 2/prompt-optimizer.js → core/prompt-optimizer 2.js} +0 -0
  61. /package/dist/{core 2/prompt-optimizer.d.ts → core/prompt-optimizer.d 2.ts} +0 -0
  62. /package/dist/{core 2/question-engine.js → core/question-engine 2.js} +0 -0
  63. /package/dist/{core 2/question-engine.d.ts → core/question-engine.d 2.ts} +0 -0
  64. /package/dist/{core 2/session-manager.js → core/session-manager 2.js} +0 -0
  65. /package/dist/{core 2/session-manager.d.ts → core/session-manager.d 2.ts} +0 -0
  66. /package/dist/{core 2/task-manager.js → core/task-manager 2.js} +0 -0
  67. /package/dist/{core 2/task-manager.d.ts → core/task-manager.d 2.ts} +0 -0
@@ -9,23 +9,24 @@ You are helping the user implement tasks from their task plan with AI assistance
9
9
 
10
10
  ## Instructions
11
11
 
12
- 1. **Run the implement command**:
13
- ```bash
14
- clavix implement
15
- ```
16
-
17
- This will:
18
- - Show interactive PRD selection (if multiple projects exist)
19
- - Locate the `tasks.md` file for the selected/specified project
20
- - Show current progress
21
- - Display the next incomplete task
22
- - Prompt for git auto-commit preferences
23
- - Create a config file for the AI agent
24
-
25
- **Note**: You can skip the selection menu by specifying a project:
26
- ```bash
27
- clavix implement --project my-feature
28
- ```
12
+ 1. **First-time setup - Run CLI command if needed**:
13
+
14
+ Check if `.clavix-implement-config.json` exists in the PRD output folder.
15
+
16
+ **If config file does NOT exist** (first time running implement):
17
+ - Run the CLI command to initialize:
18
+ ```bash
19
+ clavix implement
20
+ ```
21
+ - This will:
22
+ - Show current progress
23
+ - Display the next incomplete task
24
+ - Prompt user for git auto-commit preferences
25
+ - Create `.clavix-implement-config.json` file
26
+ - Wait for command to complete, then proceed with step 2
27
+
28
+ **If config file already exists**:
29
+ - Skip to step 2 (implementation loop)
29
30
 
30
31
  2. **As the AI agent, you should**:
31
32
 
@@ -47,56 +48,64 @@ You are helping the user implement tasks from their task plan with AI assistance
47
48
  - Use PRD requirements as your guide
48
49
  - Ask user for clarification if needed
49
50
 
50
- e. **Mark task as completed**:
51
- - In `tasks.md`, change `- [ ] Task description` to `- [x] Task description`
52
- - Update only the specific task you just completed
53
-
54
- f. **Create git commit (if enabled)**:
55
- - Check the `commitStrategy` in config
56
- - If `per-task`: commit after each task
57
- - If `per-5-tasks`: commit after every 5 tasks
58
- - If `per-phase`: commit when all tasks in a phase are done
59
- - Use descriptive commit messages with task description
60
-
61
- g. **Move to next task**:
62
- - Find the next `- [ ]` task in tasks.md
63
- - Repeat the process
51
+ e. **Complete the task programmatically**:
52
+ - IMPORTANT: NEVER manually edit checkboxes in tasks.md
53
+ - Instead, run: `clavix task-complete {task-id}`
54
+ - The task ID is found in tasks.md (e.g., `phase-1-authentication-1`)
55
+ - This command automatically:
56
+ Validates the task exists
57
+ Updates the checkbox in tasks.md
58
+ Tracks completion in config file
59
+ Creates git commit (if strategy enabled)
60
+ Displays the next task
61
+ - Example: `clavix task-complete phase-1-setup-1`
62
+
63
+ f. **Move to next task**:
64
+ - The task-complete command shows the next task automatically
65
+ - Read it and repeat the process
66
+ - If you get interrupted, just run `clavix implement` again to resume
64
67
 
65
68
  3. **Session Resume**:
66
69
  - When user runs `clavix implement` again, it automatically picks up from the last incomplete task
67
70
  - No manual tracking needed - the checkboxes in tasks.md are the source of truth
68
71
 
69
- ## Git Commit Format
72
+ ## Task Completion Workflow
73
+
74
+ **CRITICAL: Always use the `clavix task-complete` command**
70
75
 
71
- When creating commits, use this format:
76
+ ```bash
77
+ # After implementing a task
78
+ clavix task-complete {task-id}
72
79
 
80
+ # Example
81
+ clavix task-complete phase-1-setup-1
73
82
  ```
74
- clavix: [task description]
75
83
 
76
- Completed tasks:
77
- - Task 1
78
- - Task 2
84
+ The command handles:
85
+ - Checkbox updates in tasks.md
86
+ - Config file tracking
87
+ - Git commits (per strategy)
88
+ - Progress display
89
+ - Next task retrieval
79
90
 
80
- Project: [project-name]
81
- Generated by Clavix /clavix:implement
82
- ```
91
+ **NEVER manually edit tasks.md checkboxes** - the command ensures proper tracking and prevents state inconsistencies.
83
92
 
84
93
  ## Important Rules
85
94
 
86
95
  **DO**:
87
- - Read tasks.md to find the current task
96
+ - Read tasks.md to find the current task and its ID
88
97
  - Implement ONE task at a time
89
- - Mark tasks complete by changing `[ ]` to `[x]`
90
- - Create commits based on the strategy in config
98
+ - Use `clavix task-complete {task-id}` after completing each task
91
99
  - Reference the PRD for detailed requirements
92
100
  - Ask for clarification when tasks are ambiguous
101
+ - Run `clavix implement` again if interrupted to resume
93
102
 
94
103
  **DON'T**:
104
+ - NEVER manually edit checkboxes in tasks.md
95
105
  - Skip tasks or implement out of order
96
106
  - Mark tasks complete before actually implementing them
97
- - Modify multiple tasks' checkboxes at once (only current task)
98
- - Create commits if strategy is 'none'
99
107
  - Assume what code to write - use PRD as source of truth
108
+ - Try to track task completion manually
100
109
 
101
110
  ## Task Blocking Protocol
102
111
 
@@ -177,17 +186,40 @@ Which option would you like?"
177
186
 
178
187
  ```
179
188
  1. User runs: clavix implement
180
- 2. Command shows: "Next task: Implement user authentication"
189
+ 2. Command shows: "Next task (ID: phase-1-auth-1): Implement user authentication"
181
190
  3. You (AI agent):
182
191
  - Read PRD authentication requirements
183
192
  - Implement auth logic
184
193
  - Write tests
185
- - Update tasks.md: - [x] Implement user authentication
186
- - Create git commit (if enabled)
187
- - Find next task in tasks.md
188
- - Continue or wait for user
194
+ - Run: clavix task-complete phase-1-auth-1
195
+ - Command automatically:
196
+ Marks task complete in tasks.md
197
+ Updates config tracking
198
+ • Creates git commit (if enabled)
199
+ • Shows next task
200
+ - Continue with next task or wait for user
189
201
  ```
190
202
 
203
+ ## Finding Task IDs
204
+
205
+ Task IDs are visible in several places:
206
+ 1. When you read `tasks.md` - they're in the format `phase-X-name-Y`
207
+ 2. In the config file (`.clavix-implement-config.json`) under `currentTask.id`
208
+ 3. When running `clavix implement` - shown next to task description
209
+
210
+ Example tasks.md structure:
211
+ ```markdown
212
+ ## Phase 1: Authentication
213
+
214
+ - [ ] Implement user registration (ref: User Management)
215
+ Task ID: phase-1-authentication-1
216
+
217
+ - [ ] Add JWT token generation (ref: User Management)
218
+ Task ID: phase-1-authentication-2
219
+ ```
220
+
221
+ To find the task ID programmatically, read tasks.md and look for the pattern `phase-{number}-{sanitized-phase-name}-{counter}`.
222
+
191
223
  ## Workflow Navigation
192
224
 
193
225
  **You are here:** Implement (Task Execution)
@@ -219,6 +251,28 @@ Which option would you like?"
219
251
  - CLI creates config and shows first task
220
252
  - AI agent should wait for config before proceeding
221
253
 
254
+ ### Issue: `clavix task-complete` command not found
255
+ **Cause**: Clavix version doesn't have task-complete command OR not in PATH
256
+ **Solution**:
257
+ - Check Clavix version: `clavix --version`
258
+ - Ensure Clavix is up to date: `npm install -g clavix@latest`
259
+ - If issue persists, report bug to Clavix maintainers
260
+
261
+ ### Issue: Task ID not found by task-complete
262
+ **Cause**: Task ID doesn't match what's in tasks.md
263
+ **Solution**:
264
+ - Read tasks.md to see actual task IDs
265
+ - Task IDs follow pattern: `{sanitized-phase-name}-{counter}`
266
+ - Run `clavix task-complete` without arguments to see available tasks
267
+ - Example: `phase-1-authentication-1` not `Phase 1 Authentication 1`
268
+
269
+ ### Issue: Task already marked complete
270
+ **Cause**: Task was completed in previous session or manually
271
+ **Solution**:
272
+ - Use `--force` flag: `clavix task-complete {task-id} --force`
273
+ - Or skip to next task shown by `clavix implement`
274
+ - Config will be updated to track the completion
275
+
222
276
  ### Issue: Cannot find next incomplete task in tasks.md
223
277
  **Cause**: All tasks completed OR tasks.md corrupted
224
278
  **Solution**:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavix",
3
- "version": "2.4.3",
3
+ "version": "2.5.1",
4
4
  "description": "Transform vague ideas into production-ready prompts. CLI tool using the CLEAR framework to analyze, improve, and generate PRDs for AI coding assistants (Claude Code, Cursor, Windsurf, and more)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",