clavix 2.8.0 → 2.8.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.
- package/README.md +24 -1
- package/dist/templates/agents/agents.md +3 -2
- package/dist/templates/agents/copilot-instructions.md +4 -3
- package/dist/templates/agents/octo.md +2 -1
- package/dist/templates/agents/warp.md +3 -2
- package/dist/templates/slash-commands/_canonical/deep.md +122 -2
- package/dist/templates/slash-commands/_canonical/fast.md +112 -2
- package/dist/templates/slash-commands/_canonical/task-complete.md +188 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,6 +46,11 @@ clavix init
|
|
|
46
46
|
/clavix:execute # Interactive selection of saved prompts
|
|
47
47
|
/clavix:prompts # Manage prompt lifecycle
|
|
48
48
|
|
|
49
|
+
# 4. Implement with task tracking (v2.8+)
|
|
50
|
+
clavix plan # Generate tasks from PRD
|
|
51
|
+
clavix implement # Start implementation workflow
|
|
52
|
+
clavix task-complete <taskId> # Mark tasks done with auto-commit
|
|
53
|
+
|
|
49
54
|
# Or via CLI
|
|
50
55
|
clavix execute --latest
|
|
51
56
|
clavix prompts list
|
|
@@ -68,13 +73,31 @@ Clavix now automatically saves prompts from fast/deep optimization, allowing you
|
|
|
68
73
|
3. **Execute**: `/clavix:execute` or `clavix execute --latest` → Implement when ready
|
|
69
74
|
4. **Cleanup**: `clavix prompts clear --executed` → Remove completed prompts
|
|
70
75
|
|
|
76
|
+
**Prompt Saving Modes (v2.8.1 clarification):**
|
|
77
|
+
|
|
78
|
+
**CLI Usage (Auto-Save)**:
|
|
79
|
+
```bash
|
|
80
|
+
clavix fast "prompt" # Automatically saves to .clavix/outputs/prompts/fast/
|
|
81
|
+
clavix deep "prompt" # Automatically saves to .clavix/outputs/prompts/deep/
|
|
82
|
+
```
|
|
83
|
+
CLI has direct file system access – saving is automatic.
|
|
84
|
+
|
|
85
|
+
**Slash Command Usage (Agent Manual Save)**:
|
|
86
|
+
```bash
|
|
87
|
+
/clavix:fast "prompt" # Agent must follow template saving instructions
|
|
88
|
+
/clavix:deep "prompt" # Agent must follow template saving instructions
|
|
89
|
+
```
|
|
90
|
+
Slash commands run through AI agent that must use tools per template.
|
|
91
|
+
|
|
92
|
+
**Why the difference?** CLI runs directly in Node.js with file access, while slash commands require agent execution of Write tool.
|
|
93
|
+
|
|
71
94
|
**Storage hygiene:**
|
|
72
95
|
- Age warnings: >7 days = OLD, >30 days = STALE
|
|
73
96
|
- Safety confirmations before deletion
|
|
74
97
|
- Smart recommendations for cleanup
|
|
75
98
|
- Keep <20 active prompts recommended
|
|
76
99
|
|
|
77
|
-
Learn more: [Complete prompt lifecycle documentation](
|
|
100
|
+
Learn more: [Complete prompt lifecycle documentation](docs/commands/execute.md)
|
|
78
101
|
|
|
79
102
|
### Direct CLI Usage (Alternative)
|
|
80
103
|
|
|
@@ -12,14 +12,15 @@ Use these instructions when your agent can only read documentation (no slash-com
|
|
|
12
12
|
| Command | Purpose |
|
|
13
13
|
| --- | --- |
|
|
14
14
|
| `clavix init` | Interactive setup. Select providers and generate documentation/command files. |
|
|
15
|
-
| `clavix fast "<prompt>"` | CLEAR (C/L/E) analysis with improved prompt output.
|
|
16
|
-
| `clavix deep "<prompt>"` | Full CLEAR (C/L/E/A/R) analysis, alternative variations, validation checklists.
|
|
15
|
+
| `clavix fast "<prompt>"` | CLEAR (C/L/E) analysis with improved prompt output. CLI auto-saves to `.clavix/outputs/prompts/fast/`. When using slash commands, agent must save manually per template instructions. |
|
|
16
|
+
| `clavix deep "<prompt>"` | Full CLEAR (C/L/E/A/R) analysis, alternative variations, validation checklists. CLI auto-saves to `.clavix/outputs/prompts/deep/`. When using slash commands, agent must save manually per template instructions. |
|
|
17
17
|
| `clavix execute [--latest]` | Execute saved prompts from fast/deep optimization. Interactive selection or `--latest` for most recent. |
|
|
18
18
|
| `clavix prompts list` | View all saved prompts with status (NEW, EXECUTED, OLD, STALE) and storage statistics. |
|
|
19
19
|
| `clavix prompts clear` | Manage prompt cleanup. Supports `--executed`, `--stale`, `--fast`, `--deep`, `--all` flags. |
|
|
20
20
|
| `clavix prd` | Guided Socratic questions that generate `full-prd.md` and `quick-prd.md`. |
|
|
21
21
|
| `clavix plan` | Transform PRDs or sessions into phase-based `tasks.md`. |
|
|
22
22
|
| `clavix implement [--commit-strategy=<type>]` | Start task execution. Git strategies: per-task, per-5-tasks, per-phase, none (default: none). |
|
|
23
|
+
| `clavix task-complete <taskId>` | Mark task as completed with validation and optional git commit. Auto-displays next task. |
|
|
23
24
|
| `clavix start` | Begin conversational capture session for requirements gathering. |
|
|
24
25
|
| `clavix summarize [session-id]` | Extract mini PRD and optimized prompts from saved sessions. |
|
|
25
26
|
| `clavix list` | List sessions and/or output projects (`--sessions`, `--outputs`, filters). |
|
|
@@ -11,13 +11,14 @@ Clavix is a CLEAR Framework-validated prompt engineering toolkit that helps impr
|
|
|
11
11
|
When working with this project, you can use the following Clavix commands:
|
|
12
12
|
|
|
13
13
|
### Prompt Improvement
|
|
14
|
-
- `clavix fast "<prompt>"` - Quick CLEAR analysis (C/L/E components) with improved prompt output
|
|
15
|
-
- `clavix deep "<prompt>"` - Comprehensive CLEAR analysis (all 5 components: C/L/E/A/R) with alternatives and validation
|
|
14
|
+
- `clavix fast "<prompt>"` - Quick CLEAR analysis (C/L/E components) with improved prompt output. CLI auto-saves; slash commands require manual saving per template instructions.
|
|
15
|
+
- `clavix deep "<prompt>"` - Comprehensive CLEAR analysis (all 5 components: C/L/E/A/R) with alternatives and validation. CLI auto-saves; slash commands require manual saving per template instructions.
|
|
16
16
|
|
|
17
17
|
### Strategic Planning
|
|
18
18
|
- `clavix prd` - Interactive PRD generation through Socratic questioning
|
|
19
19
|
- `clavix plan` - Transform PRDs into phase-based implementation tasks
|
|
20
20
|
- `clavix implement [--commit-strategy=<type>]` - Execute tasks with progress tracking (git: per-task, per-5-tasks, per-phase, none [default])
|
|
21
|
+
- `clavix task-complete <taskId>` - Mark task as completed with validation and optional git commit
|
|
21
22
|
|
|
22
23
|
### Conversational Workflows
|
|
23
24
|
- `clavix start` - Begin conversational session for requirements gathering
|
|
@@ -52,7 +53,7 @@ Clavix now automatically saves optimized prompts from fast/deep commands for lat
|
|
|
52
53
|
- `--force` - Skip confirmation prompts
|
|
53
54
|
|
|
54
55
|
**Prompt Lifecycle Workflow:**
|
|
55
|
-
1. Optimize: `clavix fast/deep "<prompt>"` →
|
|
56
|
+
1. Optimize: `clavix fast/deep "<prompt>"` → CLI auto-saves; slash commands require manual saving
|
|
56
57
|
2. Review: `clavix prompts list` → View all saved prompts with status
|
|
57
58
|
3. Execute: `clavix execute --latest` → Implement when ready
|
|
58
59
|
4. Cleanup: `clavix prompts clear --executed` → Remove completed prompts
|
|
@@ -263,13 +263,14 @@ When starting implementation with `clavix implement`:
|
|
|
263
263
|
| Command | Use it for |
|
|
264
264
|
| --- | --- |
|
|
265
265
|
| `clavix init` | Rebuild `.clavix` structure and regenerate provider assets. |
|
|
266
|
-
| `clavix fast` / `clavix deep` | CLEAR-based prompt improvement (quick vs. comprehensive).
|
|
266
|
+
| `clavix fast` / `clavix deep` | CLEAR-based prompt improvement (quick vs. comprehensive). CLI auto-saves prompts. Slash commands require manual saving per template instructions. |
|
|
267
267
|
| `clavix execute` | Execute saved prompts (interactive selection or `--latest` for most recent). |
|
|
268
268
|
| `clavix prompts list` | View saved prompts with lifecycle status (NEW, EXECUTED, OLD, STALE). |
|
|
269
269
|
| `clavix prompts clear` | Cleanup executed/stale prompts (`--executed`, `--stale`, `--fast`, `--deep`). |
|
|
270
270
|
| `clavix prd` | Guided questions to create PRDs. |
|
|
271
271
|
| `clavix plan` | Convert PRD artifacts into task lists. |
|
|
272
272
|
| `clavix implement [--commit-strategy=<type>]` | Start task execution (git: per-task, per-5-tasks, per-phase, none [default]). |
|
|
273
|
+
| `clavix task-complete <taskId>` | Mark task completed with validation and optional git commit. Auto-displays next task. |
|
|
273
274
|
| `clavix start` | Capture conversational requirements. |
|
|
274
275
|
| `clavix summarize` | Extract mini PRDs and prompts from sessions. |
|
|
275
276
|
| `clavix list` | List sessions or outputs (use `--sessions`, `--outputs`, `--archived`). |
|
|
@@ -9,14 +9,15 @@ Clavix helps Warp developers turn rough ideas into CLEAR, AI-ready prompts and P
|
|
|
9
9
|
|
|
10
10
|
### Common commands
|
|
11
11
|
- `clavix init` – interactive provider setup (regenerates docs & commands)
|
|
12
|
-
- `clavix fast "<prompt>"` – quick CLEAR (C/L/E) analysis and improved prompt.
|
|
13
|
-
- `clavix deep "<prompt>"` – full CLEAR (C/L/E/A/R) analysis with alternatives & checklists.
|
|
12
|
+
- `clavix fast "<prompt>"` – quick CLEAR (C/L/E) analysis and improved prompt. CLI auto-saves; slash commands need manual saving per template instructions.
|
|
13
|
+
- `clavix deep "<prompt>"` – full CLEAR (C/L/E/A/R) analysis with alternatives & checklists. CLI auto-saves; slash commands need manual saving per template instructions.
|
|
14
14
|
- `clavix execute [--latest]` – execute saved prompts from fast/deep. Interactive selection or `--latest` for most recent.
|
|
15
15
|
- `clavix prompts list` – view all saved prompts with age/status (NEW, EXECUTED, OLD, STALE)
|
|
16
16
|
- `clavix prompts clear [--executed|--stale|--fast|--deep]` – cleanup executed or old prompts
|
|
17
17
|
- `clavix prd` – answer focused questions to create full/quick PRDs
|
|
18
18
|
- `clavix plan` – transform PRDs or sessions into task lists
|
|
19
19
|
- `clavix implement [--commit-strategy=<type>]` – execute tasks (git: per-task, per-5-tasks, per-phase, none [default])
|
|
20
|
+
- `clavix task-complete <taskId>` – mark task completed with validation and optional git commit
|
|
20
21
|
- `clavix start` – capture requirement conversations in Warp
|
|
21
22
|
- `clavix summarize [session-id]` – extract mini PRDs and optimized prompts
|
|
22
23
|
- `clavix list` – list sessions/outputs (`--sessions`, `--outputs`, `--archived`)
|
|
@@ -155,11 +155,110 @@ Output:
|
|
|
155
155
|
|
|
156
156
|
## Next Steps (v2.7+)
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
### Saving the Prompt (REQUIRED)
|
|
159
|
+
|
|
160
|
+
After displaying the CLEAR-optimized prompt, you MUST save it to ensure it's available for the prompt lifecycle workflow.
|
|
161
|
+
|
|
162
|
+
**If user ran CLI command** (`clavix deep "prompt"`):
|
|
163
|
+
- Prompt is automatically saved ✓
|
|
164
|
+
- Skip to "Executing the Saved Prompt" section below
|
|
165
|
+
|
|
166
|
+
**If you are executing this slash command** (`/clavix:deep`):
|
|
167
|
+
- You MUST save the prompt manually
|
|
168
|
+
- Follow these steps:
|
|
169
|
+
|
|
170
|
+
#### Step 1: Create Directory Structure
|
|
171
|
+
```bash
|
|
172
|
+
mkdir -p .clavix/outputs/prompts/deep
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
#### Step 2: Generate Unique Prompt ID
|
|
176
|
+
Create a unique identifier using this format:
|
|
177
|
+
- **Format**: `deep-YYYYMMDD-HHMMSS-<random>`
|
|
178
|
+
- **Example**: `deep-20250117-143022-a3f2`
|
|
179
|
+
- Use current timestamp + random 4-character suffix
|
|
180
|
+
|
|
181
|
+
#### Step 3: Save Prompt File
|
|
182
|
+
Use the Write tool to create the prompt file at:
|
|
183
|
+
- **Path**: `.clavix/outputs/prompts/deep/<prompt-id>.md`
|
|
184
|
+
|
|
185
|
+
**File content format**:
|
|
186
|
+
```markdown
|
|
187
|
+
---
|
|
188
|
+
id: <prompt-id>
|
|
189
|
+
source: deep
|
|
190
|
+
timestamp: <ISO-8601 timestamp>
|
|
191
|
+
executed: false
|
|
192
|
+
originalPrompt: <user's original prompt text>
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
# Improved Prompt
|
|
196
|
+
|
|
197
|
+
<Insert the CLEAR-optimized prompt content from your analysis above>
|
|
198
|
+
|
|
199
|
+
## CLEAR Scores
|
|
200
|
+
- **C** (Conciseness): <percentage>%
|
|
201
|
+
- **L** (Logic): <percentage>%
|
|
202
|
+
- **E** (Explicitness): <percentage>%
|
|
203
|
+
- **A** (Adaptiveness): <percentage>%
|
|
204
|
+
- **R** (Reflectiveness): <percentage>%
|
|
205
|
+
- **Overall**: <percentage>% (<rating>)
|
|
206
|
+
|
|
207
|
+
## Alternative Variations
|
|
208
|
+
|
|
209
|
+
<Insert adaptive variations from your analysis>
|
|
210
|
+
|
|
211
|
+
## Reflection Checklist
|
|
212
|
+
|
|
213
|
+
<Insert reflective validation from your analysis>
|
|
214
|
+
|
|
215
|
+
## Original Prompt
|
|
216
|
+
```
|
|
217
|
+
<user's original prompt text>
|
|
218
|
+
```
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
#### Step 4: Update Index File
|
|
222
|
+
Use the Write tool to update the index at `.clavix/outputs/prompts/deep/.index.json`:
|
|
223
|
+
|
|
224
|
+
**If index file doesn't exist**, create it with:
|
|
225
|
+
```json
|
|
226
|
+
{
|
|
227
|
+
"version": "1.0",
|
|
228
|
+
"prompts": []
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**Then add a new metadata entry** to the `prompts` array:
|
|
233
|
+
```json
|
|
234
|
+
{
|
|
235
|
+
"id": "<prompt-id>",
|
|
236
|
+
"filename": "<prompt-id>.md",
|
|
237
|
+
"source": "deep",
|
|
238
|
+
"timestamp": "<ISO-8601 timestamp>",
|
|
239
|
+
"createdAt": "<ISO-8601 timestamp>",
|
|
240
|
+
"path": ".clavix/outputs/prompts/deep/<prompt-id>.md",
|
|
241
|
+
"originalPrompt": "<user's original prompt text>",
|
|
242
|
+
"executed": false,
|
|
243
|
+
"executedAt": null
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
**Important**: Read the existing index first, append the new entry to the `prompts` array, then write the updated index back.
|
|
248
|
+
|
|
249
|
+
#### Step 5: Verify Saving Succeeded
|
|
250
|
+
Confirm:
|
|
251
|
+
- File exists at `.clavix/outputs/prompts/deep/<prompt-id>.md`
|
|
252
|
+
- Index file updated with new entry
|
|
253
|
+
- Display success message: `✓ Prompt saved: <prompt-id>.md`
|
|
254
|
+
|
|
255
|
+
### Executing the Saved Prompt
|
|
256
|
+
|
|
257
|
+
After saving completes successfully:
|
|
159
258
|
|
|
160
259
|
**Execute immediately:**
|
|
161
260
|
```bash
|
|
162
|
-
/clavix:execute
|
|
261
|
+
/clavix:execute --latest
|
|
163
262
|
```
|
|
164
263
|
|
|
165
264
|
**Review saved prompts first:**
|
|
@@ -201,6 +300,27 @@ clavix prompts clear --deep
|
|
|
201
300
|
|
|
202
301
|
## Troubleshooting
|
|
203
302
|
|
|
303
|
+
### Issue: Prompt Not Saved
|
|
304
|
+
|
|
305
|
+
**Error: Cannot create directory**
|
|
306
|
+
```bash
|
|
307
|
+
mkdir -p .clavix/outputs/prompts/deep
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
**Error: Index file corrupted or invalid JSON**
|
|
311
|
+
```bash
|
|
312
|
+
echo '{"version":"1.0","prompts":[]}' > .clavix/outputs/prompts/deep/.index.json
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
**Error: Duplicate prompt ID**
|
|
316
|
+
- Generate a new ID with a different timestamp or random suffix
|
|
317
|
+
- Retry the save operation with the new ID
|
|
318
|
+
|
|
319
|
+
**Error: File write permission denied**
|
|
320
|
+
- Check directory permissions
|
|
321
|
+
- Ensure `.clavix/` directory is writable
|
|
322
|
+
- Try creating the directory structure again
|
|
323
|
+
|
|
204
324
|
### Issue: Strategic scope detected but user wants to continue with deep mode
|
|
205
325
|
**Cause**: User prefers deep analysis over PRD generation
|
|
206
326
|
**Solution**:
|
|
@@ -138,11 +138,100 @@ Success Criteria:
|
|
|
138
138
|
|
|
139
139
|
## Next Steps (v2.7+)
|
|
140
140
|
|
|
141
|
-
|
|
141
|
+
### Saving the Prompt (REQUIRED)
|
|
142
|
+
|
|
143
|
+
After displaying the CLEAR-optimized prompt, you MUST save it to ensure it's available for the prompt lifecycle workflow.
|
|
144
|
+
|
|
145
|
+
**If user ran CLI command** (`clavix fast "prompt"`):
|
|
146
|
+
- Prompt is automatically saved ✓
|
|
147
|
+
- Skip to "Executing the Saved Prompt" section below
|
|
148
|
+
|
|
149
|
+
**If you are executing this slash command** (`/clavix:fast`):
|
|
150
|
+
- You MUST save the prompt manually
|
|
151
|
+
- Follow these steps:
|
|
152
|
+
|
|
153
|
+
#### Step 1: Create Directory Structure
|
|
154
|
+
```bash
|
|
155
|
+
mkdir -p .clavix/outputs/prompts/fast
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
#### Step 2: Generate Unique Prompt ID
|
|
159
|
+
Create a unique identifier using this format:
|
|
160
|
+
- **Format**: `fast-YYYYMMDD-HHMMSS-<random>`
|
|
161
|
+
- **Example**: `fast-20250117-143022-a3f2`
|
|
162
|
+
- Use current timestamp + random 4-character suffix
|
|
163
|
+
|
|
164
|
+
#### Step 3: Save Prompt File
|
|
165
|
+
Use the Write tool to create the prompt file at:
|
|
166
|
+
- **Path**: `.clavix/outputs/prompts/fast/<prompt-id>.md`
|
|
167
|
+
|
|
168
|
+
**File content format**:
|
|
169
|
+
```markdown
|
|
170
|
+
---
|
|
171
|
+
id: <prompt-id>
|
|
172
|
+
source: fast
|
|
173
|
+
timestamp: <ISO-8601 timestamp>
|
|
174
|
+
executed: false
|
|
175
|
+
originalPrompt: <user's original prompt text>
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
# Improved Prompt
|
|
179
|
+
|
|
180
|
+
<Insert the CLEAR-optimized prompt content from your analysis above>
|
|
181
|
+
|
|
182
|
+
## CLEAR Scores
|
|
183
|
+
- **C** (Conciseness): <percentage>%
|
|
184
|
+
- **L** (Logic): <percentage>%
|
|
185
|
+
- **E** (Explicitness): <percentage>%
|
|
186
|
+
- **Overall**: <percentage>% (<rating>)
|
|
187
|
+
|
|
188
|
+
## Original Prompt
|
|
189
|
+
```
|
|
190
|
+
<user's original prompt text>
|
|
191
|
+
```
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
#### Step 4: Update Index File
|
|
195
|
+
Use the Write tool to update the index at `.clavix/outputs/prompts/fast/.index.json`:
|
|
196
|
+
|
|
197
|
+
**If index file doesn't exist**, create it with:
|
|
198
|
+
```json
|
|
199
|
+
{
|
|
200
|
+
"version": "1.0",
|
|
201
|
+
"prompts": []
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Then add a new metadata entry** to the `prompts` array:
|
|
206
|
+
```json
|
|
207
|
+
{
|
|
208
|
+
"id": "<prompt-id>",
|
|
209
|
+
"filename": "<prompt-id>.md",
|
|
210
|
+
"source": "fast",
|
|
211
|
+
"timestamp": "<ISO-8601 timestamp>",
|
|
212
|
+
"createdAt": "<ISO-8601 timestamp>",
|
|
213
|
+
"path": ".clavix/outputs/prompts/fast/<prompt-id>.md",
|
|
214
|
+
"originalPrompt": "<user's original prompt text>",
|
|
215
|
+
"executed": false,
|
|
216
|
+
"executedAt": null
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**Important**: Read the existing index first, append the new entry to the `prompts` array, then write the updated index back.
|
|
221
|
+
|
|
222
|
+
#### Step 5: Verify Saving Succeeded
|
|
223
|
+
Confirm:
|
|
224
|
+
- File exists at `.clavix/outputs/prompts/fast/<prompt-id>.md`
|
|
225
|
+
- Index file updated with new entry
|
|
226
|
+
- Display success message: `✓ Prompt saved: <prompt-id>.md`
|
|
227
|
+
|
|
228
|
+
### Executing the Saved Prompt
|
|
229
|
+
|
|
230
|
+
After saving completes successfully:
|
|
142
231
|
|
|
143
232
|
**Execute immediately:**
|
|
144
233
|
```bash
|
|
145
|
-
/clavix:execute
|
|
234
|
+
/clavix:execute --latest
|
|
146
235
|
```
|
|
147
236
|
|
|
148
237
|
**Review saved prompts first:**
|
|
@@ -183,6 +272,27 @@ clavix prompts clear --fast
|
|
|
183
272
|
|
|
184
273
|
## Troubleshooting
|
|
185
274
|
|
|
275
|
+
### Issue: Prompt Not Saved
|
|
276
|
+
|
|
277
|
+
**Error: Cannot create directory**
|
|
278
|
+
```bash
|
|
279
|
+
mkdir -p .clavix/outputs/prompts/fast
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**Error: Index file corrupted or invalid JSON**
|
|
283
|
+
```bash
|
|
284
|
+
echo '{"version":"1.0","prompts":[]}' > .clavix/outputs/prompts/fast/.index.json
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
**Error: Duplicate prompt ID**
|
|
288
|
+
- Generate a new ID with a different timestamp or random suffix
|
|
289
|
+
- Retry the save operation with the new ID
|
|
290
|
+
|
|
291
|
+
**Error: File write permission denied**
|
|
292
|
+
- Check directory permissions
|
|
293
|
+
- Ensure `.clavix/` directory is writable
|
|
294
|
+
- Try creating the directory structure again
|
|
295
|
+
|
|
186
296
|
### Issue: Triage keeps recommending deep mode
|
|
187
297
|
**Cause**: Prompt has low CLEAR scores + multiple secondary indicators
|
|
188
298
|
**Solution**:
|
|
@@ -0,0 +1,188 @@
|
|
|
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavix",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.2",
|
|
4
4
|
"description": "Transform vague ideas into production-ready prompts. AI agent tool with CLI interface using the CLEAR framework to analyze, improve, and generate PRDs for AI coding assistants (Claude Code, Cursor, Windsurf, and more)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|