clavix 3.2.1 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -371,7 +371,6 @@ If using Claude Code, Cursor, or Windsurf, the following slash commands are avai
371
371
 
372
372
  ### Implementation
373
373
  - \`/clavix:implement\` - Execute task workflow with git integration
374
- - \`/clavix:task-complete\` - Mark task as complete
375
374
 
376
375
  ### Project Management
377
376
  - \`/clavix:archive\` - Archive completed projects
@@ -95,8 +95,23 @@ You are helping the user implement tasks from their task plan with AI assistance
95
95
 
96
96
  **CRITICAL: Always use the `clavix task-complete` command**
97
97
 
98
+ ### Why task-complete is CLI-Only
99
+
100
+ The `clavix task-complete` command requires:
101
+ - State validation across config files
102
+ - Atomic checkbox updates in tasks.md
103
+ - Conditional git commit execution
104
+ - Progress tracking and next-task resolution
105
+
106
+ Therefore it's implemented as a **CLI command** (not a slash command) and called **automatically by the agent** during implementation workflow.
107
+
108
+ **Agent Responsibility:** Run `clavix task-complete {task-id}` after implementing each task.
109
+ **User Responsibility:** None - agent handles task completion automatically.
110
+
111
+ ### Usage
112
+
98
113
  ```bash
99
- # After implementing a task
114
+ # After implementing a task, agent runs:
100
115
  clavix task-complete {task-id}
101
116
 
102
117
  # Example
@@ -206,6 +221,12 @@ Which option would you like?"
206
221
 
207
222
  ## Example Workflow
208
223
 
224
+ **CRITICAL WORKFLOW RULE:**
225
+ - Agent implements task → Agent runs `clavix task-complete` → Agent proceeds to next task
226
+ - User NEVER manually runs task-complete
227
+ - User NEVER manually edits tasks.md checkboxes
228
+ - This is an automated workflow, not a manual checklist
229
+
209
230
  ```
210
231
  1. User runs: clavix implement
211
232
  2. Command shows: "Next task (ID: phase-1-auth-1): Implement user authentication"
@@ -45,6 +45,11 @@ export async function collectLegacyCommandFiles(adapter, commandNames) {
45
45
  for (const file of hyphenFiles) {
46
46
  legacyPaths.add(path.resolve(path.join(clavixDir, file)));
47
47
  }
48
+ // Remove task-complete.md (CLI-only command, not a user-facing slash command)
49
+ const taskCompleteFile = path.resolve(clavixDir, 'task-complete.md');
50
+ if (await FileSystem.exists(taskCompleteFile)) {
51
+ legacyPaths.add(taskCompleteFile);
52
+ }
48
53
  }
49
54
  return Array.from(legacyPaths);
50
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavix",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "description": "Clavix Intelligence™ for AI coding. Automatically optimizes prompts with intent detection, quality assessment, and adaptive patterns—no framework to learn. Works with Claude Code, Cursor, Windsurf, and 19+ other AI coding tools.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,188 +0,0 @@
1
- ---
2
- name: "Clavix: Task Complete"
3
- description: Mark a task as completed with validation and optional git commit
4
- ---
5
-
6
- # Clavix Task Complete - Mark Implementation Task Done
7
-
8
- You are helping the user mark a task as completed during implementation workflow.
9
-
10
- ## Instructions
11
-
12
- 1. **Prerequisites**:
13
- - User must have run `clavix implement` to start implementation
14
- - `.clavix-implement-config.json` must exist in PRD folder
15
- - `tasks.md` must be generated from `clavix plan`
16
-
17
- 2. **Verify the task ID**:
18
-
19
- a. **Read tasks.md** to find the task ID:
20
- - Task IDs are in format: `**phase-1-feature-1**`
21
- - Located before each task description
22
- - Example: `- [ ] **phase-1-auth-1** - Implement user authentication`
23
-
24
- b. **Confirm with user** if task ID is unclear:
25
- ```
26
- I see these incomplete tasks:
27
- - phase-1-auth-1: Implement user authentication
28
- - phase-1-auth-2: Add password reset flow
29
-
30
- Which task did you complete? (or provide task ID)
31
- ```
32
-
33
- 3. **Mark task as completed**:
34
-
35
- **Run the CLI command**:
36
- ```bash
37
- clavix task-complete <task-id>
38
- ```
39
-
40
- **Examples**:
41
- ```bash
42
- clavix task-complete phase-1-auth-1
43
- clavix task-complete phase-2-api-3
44
- clavix task-complete setup-1
45
- ```
46
-
47
- 4. **The command will automatically**:
48
- - Validate task exists in tasks.md
49
- - Mark checkbox as `[x]` in tasks.md
50
- - Update config file with completion tracking
51
- - Show progress statistics (X/Y tasks completed)
52
- - Create git commit (if strategy enabled and conditions met)
53
- - Display next incomplete task
54
-
55
- 5. **Git auto-commit behavior**:
56
-
57
- The command respects the git strategy configured in `clavix implement`:
58
-
59
- - **`none`** (default): No automatic commits
60
- - **`per-task`**: Creates commit after this completion
61
- - **`per-5-tasks`**: Creates commit if 5 tasks completed (modulo 5 == 0)
62
- - **`per-phase`**: Creates commit if all tasks in current phase are done
63
-
64
- **Override for specific task**:
65
- ```bash
66
- clavix task-complete phase-1-auth-1 --no-git
67
- ```
68
- Skips git commit even if strategy is enabled (useful for experimental changes).
69
-
70
- 6. **Handle command output**:
71
-
72
- a. **Success case**:
73
- ```
74
- ✓ Task marked as completed
75
- ✓ Configuration updated
76
-
77
- Progress:
78
- Completed: 5/20 tasks (25%)
79
- Remaining: 15 tasks
80
-
81
- Next Task:
82
- ID: phase-1-auth-2
83
- Add password reset flow
84
- Reference: Full PRD section "Authentication > Password Reset"
85
- ```
86
-
87
- b. **Already completed case**:
88
- ```
89
- ⚠ Task "phase-1-auth-1" is already marked as completed
90
-
91
- Use --force to re-mark this task as completed.
92
-
93
- Next Task:
94
- ID: phase-1-auth-2
95
- ...
96
- ```
97
-
98
- c. **All tasks complete**:
99
- ```
100
- ✓ Task marked as completed
101
- 🎉 All tasks completed!
102
-
103
- Great work! All implementation tasks are done.
104
-
105
- Hint: Run "clavix archive" to archive this project
106
- ```
107
-
108
- 7. **After task completion**:
109
-
110
- a. **If more tasks remaining**:
111
- - Acknowledge the completion
112
- - Ask user: "Ready to start the next task? [display next task description]"
113
- - Or: "Would you like to implement the next task now?"
114
-
115
- b. **If all tasks complete**:
116
- - Congratulate the user
117
- - Suggest running `clavix archive` to archive the project
118
- - Ask if they want to create a final git commit or tag
119
-
120
- 8. **Error recovery**:
121
-
122
- **If task ID not found**:
123
- ```
124
- ✗ Task ID "phase-1-invalid" not found
125
-
126
- Available task IDs:
127
- Phase 1: Authentication
128
- [ ] phase-1-auth-1 - Implement user authentication
129
- [ ] phase-1-auth-2 - Add password reset flow
130
- ```
131
-
132
- - The command lists all available tasks
133
- - Ask user to verify task ID
134
- - Or ask which task they meant to complete
135
-
136
- **If config file not found**:
137
- ```
138
- No config files found.
139
-
140
- Hint: Run "clavix implement" first to initialize
141
- ```
142
-
143
- - Tell user to run `clavix implement` first
144
- - This starts the implementation workflow
145
-
146
- **If file write error**:
147
- ```
148
- ✗ Failed to mark task as completed
149
-
150
- Recovery Options:
151
- 1. Check if tasks.md file is readable and writable
152
- 2. Verify task ID matches exactly
153
- 3. Try running with --force flag
154
- 4. Check tasks.md.backup file if created
155
- ```
156
-
157
- - Follow recovery suggestions
158
- - Check file permissions
159
- - Ask user if they manually edited tasks.md
160
-
161
- ## Command Flags
162
-
163
- - `--no-git`: Skip git commit even if strategy is enabled
164
- - `-f, --force`: Force completion even if already marked complete
165
- - `-c, --config <path>`: Specify custom config file path (defaults to auto-discover)
166
-
167
- ## Best Practices
168
-
169
- 1. **Never manually edit tasks.md checkboxes** - Always use `clavix task-complete`
170
- 2. **Verify task completion** - Ensure implementation is done before marking
171
- 3. **Use --no-git for experiments** - Skip commits for work-in-progress changes
172
- 4. **Check next task** - Command automatically shows what to work on next
173
- 5. **Track progress** - Use progress stats to estimate remaining work
174
-
175
- ## Related Commands
176
-
177
- - `clavix implement` - Start implementation workflow (shows current task)
178
- - `clavix plan` - Generate tasks.md from PRD
179
- - `clavix archive` - Archive completed project (run after all tasks done)
180
-
181
- ## Next Steps
182
-
183
- After completing all tasks:
184
- 1. Run `clavix archive` to archive the implementation
185
- 2. Create final git commit or tag
186
- 3. Update CHANGELOG if needed
187
- 4. Merge feature branch
188
- 5. Deploy or release