clavix 5.0.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.
- package/dist/cli/commands/init.js +54 -153
- package/dist/cli/commands/update.js +19 -21
- package/dist/index 2.js +13 -0
- package/dist/index.d 2.ts +4 -0
- package/dist/templates/agents/agents.md +28 -26
- package/dist/templates/agents/copilot-instructions.md +42 -36
- package/dist/templates/agents/octo.md +41 -36
- package/dist/templates/agents/warp.md +24 -24
- package/dist/templates/instructions/README.md +8 -5
- package/dist/templates/slash-commands/_canonical/plan.md +8 -20
- package/dist/templates/slash-commands/_canonical/verify.md +9 -9
- package/dist/templates/slash-commands/_components/agent-protocols/assertion-checkpoints.md +1 -1
- package/dist/templates/slash-commands/_components/agent-protocols/decision-rules.md +5 -6
- package/dist/templates/slash-commands/_components/agent-protocols/state-awareness.md +5 -7
- package/dist/templates/slash-commands/_components/troubleshooting/vibecoder-recovery.md +2 -2
- package/dist/utils/agent-error-messages.js +13 -12
- package/package.json +1 -1
|
@@ -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
|
-
│ │
|
|
282
|
-
│
|
|
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
|
-
##
|
|
288
|
+
## Clavix Commands (v5)
|
|
289
289
|
|
|
290
|
-
###
|
|
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
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
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
|
-
###
|
|
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
|
-
|
|
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
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
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
|
-
|
|
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
|
-
|
|
393
|
-
\`\`\`bash
|
|
394
|
-
# Manual commits (default):
|
|
395
|
-
clavix implement
|
|
323
|
+
**Clavix follows this progression:**
|
|
396
324
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
325
|
+
\`\`\`
|
|
326
|
+
PRD Creation → Task Planning → Implementation → Archive
|
|
327
|
+
\`\`\`
|
|
400
328
|
|
|
401
|
-
|
|
402
|
-
\`\`\`bash
|
|
403
|
-
clavix task-complete <taskId>
|
|
404
|
-
# Validates completion, optionally commits, shows next task
|
|
405
|
-
\`\`\`
|
|
329
|
+
**Detailed steps:**
|
|
406
330
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
clavix
|
|
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
|
-
|
|
335
|
+
2. **Task Preparation**
|
|
336
|
+
- Run: \`/clavix:plan\` transforms PRD into curated task list
|
|
337
|
+
- Output: \`.clavix/outputs/{project}/tasks.md\`
|
|
413
338
|
|
|
414
|
-
|
|
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
|
-
|
|
417
|
-
- \`
|
|
418
|
-
-
|
|
419
|
-
- \`per-phase\` - Commit when phase completes (milestone-based)
|
|
344
|
+
4. **Completion**
|
|
345
|
+
- Run: \`/clavix:archive\`
|
|
346
|
+
- Archives completed work
|
|
420
347
|
|
|
421
|
-
**
|
|
348
|
+
**Key principle:** Planning workflows create documents. Implementation workflows write code.
|
|
422
349
|
|
|
423
|
-
##
|
|
350
|
+
## Prompt Lifecycle
|
|
424
351
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
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
|
-
##
|
|
357
|
+
## When to Use Which Mode
|
|
432
358
|
|
|
433
|
-
**Improve
|
|
434
|
-
|
|
435
|
-
clavix
|
|
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
|
-
###
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
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
|
-
###
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
clavix
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
clavix
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
clavix
|
|
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
|
}
|
package/dist/index 2.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { run, handle, settings } from '@oclif/core';
|
|
3
|
+
// Disable debug mode (stack traces) unless explicitly requested via DEBUG env var
|
|
4
|
+
if (!process.env.DEBUG) {
|
|
5
|
+
settings.debug = false;
|
|
6
|
+
}
|
|
7
|
+
// Run if called directly
|
|
8
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
9
|
+
run().catch(handle);
|
|
10
|
+
}
|
|
11
|
+
// Export for testing
|
|
12
|
+
export { run };
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -66,36 +66,38 @@ For complete step-by-step workflows, see `.clavix/instructions/`:
|
|
|
66
66
|
|
|
67
67
|
---
|
|
68
68
|
|
|
69
|
-
## 📋
|
|
69
|
+
## 📋 Clavix Commands (v5)
|
|
70
70
|
|
|
71
|
+
### Setup Commands (CLI)
|
|
71
72
|
| Command | Purpose |
|
|
72
73
|
|---------|---------|
|
|
73
|
-
| `clavix init` |
|
|
74
|
-
| `clavix
|
|
75
|
-
| `clavix
|
|
76
|
-
| `clavix
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
|
82
|
-
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
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
|
-
**
|
|
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:
|
|
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:
|
|
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:
|
|
125
|
+
- Run: `/clavix:implement`
|
|
124
126
|
- Agent executes tasks systematically
|
|
125
127
|
- Mode: IMPLEMENTATION
|
|
126
|
-
-
|
|
128
|
+
- Agent edits tasks.md directly to mark progress (`- [ ]` → `- [x]`)
|
|
127
129
|
|
|
128
130
|
4. **Completion**
|
|
129
|
-
- Run:
|
|
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/
|
|
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
|
|
@@ -38,8 +38,7 @@ For complete step-by-step workflows, see `.clavix/instructions/`:
|
|
|
38
38
|
|----------|-----------------|---------|
|
|
39
39
|
| **Conversational Mode** | `workflows/start.md` | Natural requirements gathering through discussion |
|
|
40
40
|
| **Extract Requirements** | `workflows/summarize.md` | Analyze conversation → mini-PRD + optimized prompts |
|
|
41
|
-
| **
|
|
42
|
-
| **Deep Analysis** | `workflows/deep.md` | Comprehensive with alternatives, validation, edge cases |
|
|
41
|
+
| **Prompt Optimization** | `workflows/improve.md` | Intent detection + quality assessment + auto-depth selection |
|
|
43
42
|
| **PRD Generation** | `workflows/prd.md` | Socratic questions → full PRD + quick PRD |
|
|
44
43
|
| **Mode Boundaries** | `core/clavix-mode.md` | Planning vs implementation distinction |
|
|
45
44
|
|
|
@@ -54,33 +53,40 @@ For complete step-by-step workflows, see `.clavix/instructions/`:
|
|
|
54
53
|
|
|
55
54
|
---
|
|
56
55
|
|
|
57
|
-
## 📋
|
|
56
|
+
## 📋 Clavix Commands (v5)
|
|
58
57
|
|
|
58
|
+
### Setup Commands (CLI)
|
|
59
59
|
| Command | Purpose |
|
|
60
60
|
|---------|---------|
|
|
61
|
-
| `clavix
|
|
62
|
-
| `clavix
|
|
63
|
-
| `clavix
|
|
64
|
-
| `clavix
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
|
70
|
-
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
61
|
+
| `clavix init` | Initialize Clavix in a project |
|
|
62
|
+
| `clavix update` | Update templates after package update |
|
|
63
|
+
| `clavix config` | Manage configuration |
|
|
64
|
+
| `clavix version` | Show version |
|
|
65
|
+
|
|
66
|
+
### Workflow Commands (Slash Commands)
|
|
67
|
+
All workflows are executed via slash commands:
|
|
68
|
+
|
|
69
|
+
| Slash Command | Purpose |
|
|
70
|
+
|---------------|---------|
|
|
71
|
+
| `/clavix:improve` | Optimize prompts (auto-selects depth) |
|
|
72
|
+
| `/clavix:prd` | Generate PRD through guided questions |
|
|
73
|
+
| `/clavix:plan` | Create task breakdown from PRD |
|
|
74
|
+
| `/clavix:implement` | Execute tasks with progress tracking |
|
|
75
|
+
| `/clavix:start` | Begin conversational session |
|
|
76
|
+
| `/clavix:summarize` | Extract requirements from conversation |
|
|
77
|
+
| `/clavix:execute` | Run saved prompts |
|
|
78
|
+
| `/clavix:verify` | Verify implementation |
|
|
79
|
+
| `/clavix:archive` | Archive completed projects |
|
|
74
80
|
|
|
75
81
|
---
|
|
76
82
|
|
|
77
|
-
## 🔄 Prompt Lifecycle
|
|
83
|
+
## 🔄 Prompt Lifecycle Workflow
|
|
78
84
|
|
|
79
|
-
**Prompt Lifecycle
|
|
80
|
-
1. **Optimize**:
|
|
81
|
-
2. **Review**:
|
|
82
|
-
3. **Execute**:
|
|
83
|
-
4. **Cleanup**:
|
|
85
|
+
**Prompt Lifecycle:**
|
|
86
|
+
1. **Optimize**: `/clavix:improve` → Analyzes and improves your prompt
|
|
87
|
+
2. **Review**: Agent reads `.clavix/outputs/prompts/*.md` to list saved prompts
|
|
88
|
+
3. **Execute**: `/clavix:execute` → Implement when ready
|
|
89
|
+
4. **Cleanup**: Agent deletes old prompt files from `.clavix/outputs/prompts/`
|
|
84
90
|
|
|
85
91
|
---
|
|
86
92
|
|
|
@@ -94,10 +100,10 @@ PRD Creation → Task Planning → Implementation → Archive
|
|
|
94
100
|
|
|
95
101
|
**Detailed steps:**
|
|
96
102
|
|
|
97
|
-
1. **Planning Phase** -
|
|
98
|
-
2. **Task Preparation** -
|
|
99
|
-
3. **Implementation Phase** -
|
|
100
|
-
4. **Completion** -
|
|
103
|
+
1. **Planning Phase** - `/clavix:prd` or `/clavix:start` → `/clavix:summarize`
|
|
104
|
+
2. **Task Preparation** - `/clavix:plan` transforms PRD into tasks.md
|
|
105
|
+
3. **Implementation Phase** - `/clavix:implement` executes tasks systematically
|
|
106
|
+
4. **Completion** - `/clavix:archive` archives completed work
|
|
101
107
|
|
|
102
108
|
**Key principle:** Planning workflows create documents. Implementation workflows write code.
|
|
103
109
|
|
|
@@ -113,17 +119,17 @@ When analyzing prompts, consider these 5 dimensions:
|
|
|
113
119
|
- **Completeness**: All specs provided (persona, format, tone, success criteria)?
|
|
114
120
|
- **Actionability**: Can AI take immediate action?
|
|
115
121
|
|
|
116
|
-
**Reference:** See `workflows/
|
|
122
|
+
**Reference:** See `workflows/improve.md` for complete quality assessment patterns
|
|
117
123
|
|
|
118
124
|
---
|
|
119
125
|
|
|
120
126
|
## 💡 Best Practices for GitHub Copilot
|
|
121
127
|
|
|
122
|
-
1. **Suggest appropriate workflow** -
|
|
128
|
+
1. **Suggest appropriate workflow** - `/clavix:improve` for prompts, `/clavix:prd` for strategic planning
|
|
123
129
|
2. **Reference instruction files** - Point to `.clavix/instructions/workflows/*.md` instead of recreating steps
|
|
124
130
|
3. **Respect mode boundaries** - Planning mode = no code, Implementation mode = write code
|
|
125
131
|
4. **Use quality dimensions** - Apply 5-dimension assessment principles in responses
|
|
126
|
-
5. **Guide users to
|
|
132
|
+
5. **Guide users to slash commands** - Recommend appropriate `/clavix:*` commands for their needs
|
|
127
133
|
|
|
128
134
|
---
|
|
129
135
|
|
|
@@ -132,17 +138,17 @@ When analyzing prompts, consider these 5 dimensions:
|
|
|
132
138
|
### ❌ Jumping to implementation during planning
|
|
133
139
|
**Wrong:** User discusses feature → Copilot generates code immediately
|
|
134
140
|
|
|
135
|
-
**Right:** User discusses feature → Suggest
|
|
141
|
+
**Right:** User discusses feature → Suggest `/clavix:prd` or `/clavix:start` → Create planning docs first
|
|
136
142
|
|
|
137
143
|
### ❌ Not suggesting Clavix workflows
|
|
138
144
|
**Wrong:** User asks "How should I phrase this?" → Copilot provides generic advice
|
|
139
145
|
|
|
140
|
-
**Right:** User asks "How should I phrase this?" → Suggest
|
|
146
|
+
**Right:** User asks "How should I phrase this?" → Suggest `/clavix:improve` for quality assessment
|
|
141
147
|
|
|
142
148
|
### ❌ Recreating workflow steps inline
|
|
143
149
|
**Wrong:** Copilot explains entire PRD generation process in chat
|
|
144
150
|
|
|
145
|
-
**Right:** Copilot references `.clavix/instructions/workflows/prd.md` and suggests running
|
|
151
|
+
**Right:** Copilot references `.clavix/instructions/workflows/prd.md` and suggests running `/clavix:prd`
|
|
146
152
|
|
|
147
153
|
---
|
|
148
154
|
|
|
@@ -151,7 +157,7 @@ When analyzing prompts, consider these 5 dimensions:
|
|
|
151
157
|
When users ask for help with prompts or requirements:
|
|
152
158
|
|
|
153
159
|
1. **Detect need** - Identify if user needs planning, optimization, or implementation
|
|
154
|
-
2. **Suggest command** - Recommend appropriate
|
|
160
|
+
2. **Suggest slash command** - Recommend appropriate `/clavix:*` command
|
|
155
161
|
3. **Explain benefit** - Describe expected output and value
|
|
156
162
|
4. **Help interpret** - Assist with understanding Clavix-generated outputs
|
|
157
163
|
5. **Apply principles** - Use quality dimensions in your responses
|
|
@@ -159,10 +165,10 @@ When users ask for help with prompts or requirements:
|
|
|
159
165
|
**Example flow:**
|
|
160
166
|
```
|
|
161
167
|
User: "I want to build a dashboard but I'm not sure how to phrase the requirements"
|
|
162
|
-
Copilot: "I suggest running
|
|
168
|
+
Copilot: "I suggest running `/clavix:start` to begin conversational requirements gathering.
|
|
163
169
|
This will help us explore your needs naturally, then we can extract structured requirements
|
|
164
|
-
with
|
|
165
|
-
clavix
|
|
170
|
+
with `/clavix:summarize`. Alternatively, if you have a rough idea, try:
|
|
171
|
+
`/clavix:improve 'Build a dashboard for...'` for quick optimization."
|
|
166
172
|
```
|
|
167
173
|
|
|
168
174
|
---
|
|
@@ -20,9 +20,10 @@ Clavix workflows optimized for Octofriend's capabilities: model switching, multi
|
|
|
20
20
|
- ❌ DO NOT implement features during these workflows
|
|
21
21
|
|
|
22
22
|
**IMPLEMENTATION workflows** (CODE ALLOWED):
|
|
23
|
-
- `/clavix:implement`, `/clavix:execute
|
|
23
|
+
- `/clavix:implement`, `/clavix:execute`
|
|
24
24
|
- Your role: Write code, execute tasks, implement features
|
|
25
25
|
- ✅ DO implement code during these workflows
|
|
26
|
+
- Mark task completion by editing tasks.md directly (`- [ ]` → `- [x]`)
|
|
26
27
|
|
|
27
28
|
See `.clavix/instructions/core/clavix-mode.md` for complete mode documentation.
|
|
28
29
|
|
|
@@ -115,35 +116,40 @@ Autofix handles edge cases gracefully - let it work.
|
|
|
115
116
|
|
|
116
117
|
---
|
|
117
118
|
|
|
118
|
-
## 📋
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
| `clavix
|
|
124
|
-
| `clavix
|
|
125
|
-
| `clavix
|
|
126
|
-
| `clavix
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
|
130
|
-
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
119
|
+
## 📋 Clavix Commands (v5)
|
|
120
|
+
|
|
121
|
+
### Setup Commands (CLI)
|
|
122
|
+
| Command | Purpose |
|
|
123
|
+
|---------|---------|
|
|
124
|
+
| `clavix init` | Initialize Clavix in a project |
|
|
125
|
+
| `clavix update` | Update templates after package update |
|
|
126
|
+
| `clavix config` | Manage configuration |
|
|
127
|
+
| `clavix version` | Show version |
|
|
128
|
+
|
|
129
|
+
### Workflow Commands (Slash Commands)
|
|
130
|
+
| Slash Command | Purpose |
|
|
131
|
+
|---------------|---------|
|
|
132
|
+
| `/clavix:improve` | Optimize prompts (auto-selects depth) |
|
|
133
|
+
| `/clavix:prd` | Generate PRD through questions |
|
|
134
|
+
| `/clavix:plan` | Create task breakdown from PRD |
|
|
135
|
+
| `/clavix:implement` | Execute tasks with progress tracking |
|
|
136
|
+
| `/clavix:start` | Begin conversational session |
|
|
137
|
+
| `/clavix:summarize` | Extract requirements from conversation |
|
|
138
|
+
| `/clavix:execute` | Run saved prompts |
|
|
139
|
+
| `/clavix:verify` | Verify implementation |
|
|
140
|
+
| `/clavix:archive` | Archive completed projects |
|
|
135
141
|
|
|
136
142
|
---
|
|
137
143
|
|
|
138
144
|
## 🔄 Prompt Execution Workflow
|
|
139
145
|
|
|
140
|
-
**When you have a saved prompt to execute
|
|
146
|
+
**When you have a saved prompt to execute:**
|
|
141
147
|
|
|
142
|
-
1. **List available prompts**:
|
|
143
|
-
2. **
|
|
144
|
-
3. **
|
|
148
|
+
1. **List available prompts**: List files in `.clavix/outputs/prompts/*.md`
|
|
149
|
+
2. **Execute prompt**: `/clavix:execute` - implement saved prompt
|
|
150
|
+
3. **Implement**: Agent reads the optimized prompt and implements the feature
|
|
145
151
|
|
|
146
|
-
**Note:**
|
|
152
|
+
**Note:** Slash commands save prompts as `.md` files with frontmatter metadata.
|
|
147
153
|
|
|
148
154
|
---
|
|
149
155
|
|
|
@@ -151,26 +157,25 @@ Autofix handles edge cases gracefully - let it work.
|
|
|
151
157
|
|
|
152
158
|
**Complete project flow:**
|
|
153
159
|
|
|
154
|
-
1. **Planning** (
|
|
160
|
+
1. **Planning** (`/clavix:prd`)
|
|
155
161
|
- Creates PRD (full + quick versions)
|
|
156
162
|
- Saves to `.clavix/outputs/{project}/`
|
|
157
163
|
|
|
158
|
-
2. **Task Preparation** (
|
|
164
|
+
2. **Task Preparation** (`/clavix:plan`)
|
|
159
165
|
- Transforms PRD → curated tasks.md
|
|
160
166
|
- Phase-based organization
|
|
161
167
|
|
|
162
|
-
3. **Implementation** (
|
|
168
|
+
3. **Implementation** (`/clavix:implement`)
|
|
163
169
|
- Agent executes tasks systematically
|
|
164
|
-
-
|
|
170
|
+
- Marks progress by editing tasks.md (`- [ ]` → `- [x]`)
|
|
165
171
|
- Optional git commit strategies
|
|
166
172
|
|
|
167
|
-
4. **Completion** (
|
|
173
|
+
4. **Completion** (`/clavix:archive`)
|
|
168
174
|
- Archives completed project
|
|
169
175
|
|
|
170
176
|
**Alternative quick paths:**
|
|
171
|
-
- **Quick improvement**:
|
|
172
|
-
- **
|
|
173
|
-
- **Conversational**: `clavix start` → `clavix summarize` → `clavix execute` → Done
|
|
177
|
+
- **Quick improvement**: `/clavix:improve` → `/clavix:execute` → Done
|
|
178
|
+
- **Conversational**: `/clavix:start` → `/clavix:summarize` → `/clavix:execute` → Done
|
|
174
179
|
|
|
175
180
|
---
|
|
176
181
|
|
|
@@ -189,9 +194,9 @@ Autofix handles edge cases gracefully - let it work.
|
|
|
189
194
|
## ⚠️ Common Mistakes
|
|
190
195
|
|
|
191
196
|
### ❌ Implementing during planning workflows
|
|
192
|
-
**Wrong:** User runs
|
|
197
|
+
**Wrong:** User runs `/clavix:prd`, you generate PRD then start building features
|
|
193
198
|
|
|
194
|
-
**Right:** User runs
|
|
199
|
+
**Right:** User runs `/clavix:prd`, you generate PRD, save files, suggest `/clavix:plan` as next step
|
|
195
200
|
|
|
196
201
|
### ❌ Skipping file creation
|
|
197
202
|
**Wrong:** Display optimized prompt, stop there
|
|
@@ -201,7 +206,7 @@ Autofix handles edge cases gracefully - let it work.
|
|
|
201
206
|
### ❌ Not referencing instruction files
|
|
202
207
|
**Wrong:** Trying to remember workflow details from this file
|
|
203
208
|
|
|
204
|
-
**Right:** "See `.clavix/instructions/workflows/
|
|
209
|
+
**Right:** "See `.clavix/instructions/workflows/improve.md` for complete workflow"
|
|
205
210
|
|
|
206
211
|
### ❌ Using wrong model for task
|
|
207
212
|
**Wrong:** Using fast model for complex architectural planning
|
|
@@ -212,9 +217,9 @@ Autofix handles edge cases gracefully - let it work.
|
|
|
212
217
|
|
|
213
218
|
## 🆘 When in Doubt
|
|
214
219
|
|
|
215
|
-
1. **Check which command was run** - Determines your mode (planning vs implementation)
|
|
220
|
+
1. **Check which slash command was run** - Determines your mode (planning vs implementation)
|
|
216
221
|
2. **Reference instruction files** - They have complete step-by-step guidance
|
|
217
|
-
3. **Ask the user** - "Should I implement this (run
|
|
222
|
+
3. **Ask the user** - "Should I implement this (run `/clavix:implement`), or continue planning?"
|
|
218
223
|
4. **Switch models** - Use thinking models for complex planning tasks
|
|
219
224
|
|
|
220
225
|
---
|
|
@@ -33,8 +33,7 @@ See `.clavix/instructions/core/clavix-mode.md` for complete mode documentation.
|
|
|
33
33
|
For complete step-by-step workflows, see `.clavix/instructions/`:
|
|
34
34
|
- `.clavix/instructions/workflows/start.md` - Conversational mode
|
|
35
35
|
- `.clavix/instructions/workflows/summarize.md` - Extract requirements
|
|
36
|
-
- `.clavix/instructions/workflows/
|
|
37
|
-
- `.clavix/instructions/workflows/deep.md` - Comprehensive analysis
|
|
36
|
+
- `.clavix/instructions/workflows/improve.md` - Prompt optimization (auto-depth)
|
|
38
37
|
- `.clavix/instructions/workflows/prd.md` - PRD generation
|
|
39
38
|
- `.clavix/instructions/troubleshooting/` - Common issues
|
|
40
39
|
|
|
@@ -47,25 +46,26 @@ For complete step-by-step workflows, see `.clavix/instructions/`:
|
|
|
47
46
|
- Or run ad hoc: `npx clavix@latest init`
|
|
48
47
|
- Verify setup: `clavix version`
|
|
49
48
|
|
|
50
|
-
###
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
49
|
+
### CLI Commands (v5)
|
|
50
|
+
| Command | Purpose |
|
|
51
|
+
|---------|---------|
|
|
52
|
+
| `clavix init` | Initialize Clavix in a project |
|
|
53
|
+
| `clavix update` | Update templates after package update |
|
|
54
|
+
| `clavix config` | Manage configuration |
|
|
55
|
+
| `clavix version` | Show version |
|
|
56
|
+
|
|
57
|
+
### Slash Commands (Workflows)
|
|
58
|
+
| Slash Command | Purpose |
|
|
59
|
+
|---------------|---------|
|
|
60
|
+
| `/clavix:improve` | Optimize prompts (auto-selects depth) |
|
|
61
|
+
| `/clavix:prd` | Generate PRD through guided questions |
|
|
62
|
+
| `/clavix:plan` | Create task breakdown from PRD |
|
|
63
|
+
| `/clavix:implement` | Execute tasks with progress tracking |
|
|
64
|
+
| `/clavix:start` | Begin conversational session |
|
|
65
|
+
| `/clavix:summarize` | Extract requirements from conversation |
|
|
66
|
+
| `/clavix:execute` | Run saved prompts |
|
|
67
|
+
| `/clavix:verify` | Verify implementation |
|
|
68
|
+
| `/clavix:archive` | Archive completed projects |
|
|
69
69
|
|
|
70
70
|
### Outputs
|
|
71
71
|
- Project artifacts live under `.clavix/outputs/<project>/`
|
|
@@ -86,14 +86,14 @@ For complete step-by-step workflows, see `.clavix/instructions/`:
|
|
|
86
86
|
### ⚠️ Common Mistakes
|
|
87
87
|
|
|
88
88
|
#### ❌ Jumping to implementation during planning
|
|
89
|
-
**Wrong:** User runs
|
|
89
|
+
**Wrong:** User runs `/clavix:prd`, you generate PRD then start building features
|
|
90
90
|
|
|
91
|
-
**Right:** User runs
|
|
91
|
+
**Right:** User runs `/clavix:prd`, you generate PRD, save files, suggest `/clavix:plan` as next step
|
|
92
92
|
|
|
93
93
|
#### ❌ Not referencing instruction files
|
|
94
94
|
**Wrong:** Trying to remember workflow details from this file
|
|
95
95
|
|
|
96
|
-
**Right:** "See `.clavix/instructions/workflows/
|
|
96
|
+
**Right:** "See `.clavix/instructions/workflows/improve.md` for complete workflow"
|
|
97
97
|
|
|
98
98
|
---
|
|
99
99
|
|
|
@@ -137,12 +137,15 @@ PRD Creation → Task Planning → Implementation → Verification → Archive
|
|
|
137
137
|
| `/clavix:verify` | Verification | Context-dependent |
|
|
138
138
|
| `/clavix:archive` | Management | ✗ NO |
|
|
139
139
|
|
|
140
|
-
### Agent
|
|
140
|
+
### Agent Operations (v5 Agentic-First)
|
|
141
141
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
|
145
|
-
|
|
142
|
+
In v5, agents use native tools (Write, Edit, Bash) instead of CLI commands:
|
|
143
|
+
|
|
144
|
+
| Operation | How Agent Performs It |
|
|
145
|
+
|-----------|----------------------|
|
|
146
|
+
| Save prompt | Use Write tool to create `.clavix/outputs/prompts/<id>.md` |
|
|
147
|
+
| Mark task done | Use Edit tool to change `- [ ]` to `- [x]` in tasks.md |
|
|
148
|
+
| Archive project | Use Bash tool to move directory to archive/ |
|
|
146
149
|
|
|
147
150
|
---
|
|
148
151
|
|
|
@@ -84,36 +84,24 @@ Implementation: BLOCKED - I will create tasks, not implement them
|
|
|
84
84
|
|
|
85
85
|
**As an AI agent, you have two execution options:**
|
|
86
86
|
|
|
87
|
-
#### **
|
|
87
|
+
#### **Agent Execution Protocol (v5)**
|
|
88
88
|
|
|
89
89
|
1. **Validate prerequisites**:
|
|
90
90
|
- Check if `.clavix/outputs/` directory exists
|
|
91
91
|
- Look for PRD artifacts: `full-prd.md`, `quick-prd.md`, `mini-prd.md`, or `optimized-prompt.md`
|
|
92
92
|
- **If not found**: Error inline - "No PRD found in `.clavix/outputs/`. Use `/clavix:prd` or `/clavix:summarize` first."
|
|
93
93
|
|
|
94
|
-
2. **
|
|
95
|
-
```bash
|
|
96
|
-
clavix plan
|
|
97
|
-
```
|
|
94
|
+
2. **Read the PRD** from `.clavix/outputs/[project-name]/`
|
|
98
95
|
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
clavix plan --project project-name
|
|
102
|
-
```
|
|
96
|
+
3. **Generate task breakdown** following Part B principles
|
|
103
97
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
```
|
|
98
|
+
4. **Create `tasks.md`** using your Write tool with format specified in "Task Format Reference" below
|
|
99
|
+
|
|
100
|
+
5. **Save to**: `.clavix/outputs/[project-name]/tasks.md`
|
|
108
101
|
|
|
109
|
-
|
|
110
|
-
- Project selection (if multiple)
|
|
111
|
-
- Reading PRD content
|
|
112
|
-
- Generating task breakdown
|
|
113
|
-
- Creating `tasks.md` file
|
|
114
|
-
- Formatting with proper task IDs
|
|
102
|
+
6. **Use exact format** (task IDs, checkboxes, structure)
|
|
115
103
|
|
|
116
|
-
#### **
|
|
104
|
+
#### **Alternative: Generate Tasks Directly** (If agent has full PRD context)
|
|
117
105
|
|
|
118
106
|
If you have the full PRD content in memory and want to generate tasks directly:
|
|
119
107
|
|
|
@@ -352,17 +352,17 @@ I generate different checklists based on what you're building:
|
|
|
352
352
|
|
|
353
353
|
---
|
|
354
354
|
|
|
355
|
-
## Reference: Verification
|
|
355
|
+
## Reference: Verification Operations
|
|
356
356
|
|
|
357
|
-
**I
|
|
357
|
+
**I perform these operations using my native tools:**
|
|
358
358
|
|
|
359
|
-
|
|
|
360
|
-
|
|
361
|
-
|
|
|
362
|
-
|
|
|
363
|
-
| `
|
|
364
|
-
|
|
|
365
|
-
|
|
|
359
|
+
| Operation | How I Do It |
|
|
360
|
+
|-----------|-------------|
|
|
361
|
+
| Check most recent implementation | Read `.clavix/outputs/prompts/` directory, find newest file |
|
|
362
|
+
| Check specific prompt | Read the specific `.clavix/outputs/prompts/<id>.md` file |
|
|
363
|
+
| Run automated checks | Execute `npm test`, `npm run build`, `npm run lint` via Bash tool |
|
|
364
|
+
| Update verification status | Edit the prompt file metadata with verification results |
|
|
365
|
+
| Generate report | Create verification report in `.clavix/outputs/` |
|
|
366
366
|
|
|
367
367
|
---
|
|
368
368
|
|
|
@@ -80,7 +80,7 @@ At key workflow stages, verify your execution matches expected state. These chec
|
|
|
80
80
|
**CHECKPOINT 2: After Each Task**
|
|
81
81
|
```
|
|
82
82
|
✓ Task completed successfully
|
|
83
|
-
✓
|
|
83
|
+
✓ tasks.md edited: - [ ] changed to - [x] for completed task
|
|
84
84
|
✓ Next task displayed automatically
|
|
85
85
|
```
|
|
86
86
|
|
|
@@ -66,14 +66,14 @@ IF escalation_score < 45:
|
|
|
66
66
|
|
|
67
67
|
```
|
|
68
68
|
AFTER implementing task:
|
|
69
|
-
→
|
|
70
|
-
→
|
|
69
|
+
→ EDIT tasks.md: Change - [ ] to - [x] for completed task
|
|
70
|
+
→ Use Edit tool to update the checkbox
|
|
71
71
|
|
|
72
|
-
IF
|
|
72
|
+
IF edit succeeds:
|
|
73
73
|
→ SHOW: Next task automatically
|
|
74
74
|
→ CONTINUE with next task
|
|
75
75
|
|
|
76
|
-
IF
|
|
76
|
+
IF edit fails:
|
|
77
77
|
→ SHOW error to user
|
|
78
78
|
→ ASK: "Task completion failed: [error]. How to proceed?"
|
|
79
79
|
```
|
|
@@ -92,7 +92,7 @@ BEFORE starting /clavix:implement:
|
|
|
92
92
|
→ SAY: "All tasks complete. Consider /clavix:archive"
|
|
93
93
|
|
|
94
94
|
IF not exists:
|
|
95
|
-
→
|
|
95
|
+
→ CREATE config file and start implementation
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
### Rule 6: File Operations
|
|
@@ -158,7 +158,6 @@ IF any verification fails:
|
|
|
158
158
|
|
|
159
159
|
AFTER optimization complete:
|
|
160
160
|
→ MUST save prompt to .clavix/outputs/prompts/
|
|
161
|
-
→ MUST update index file
|
|
162
161
|
→ SHOW: "✓ Prompt saved: [filename]"
|
|
163
162
|
```
|
|
164
163
|
|
|
@@ -19,10 +19,10 @@ Read: .clavix/outputs/{project}/.clavix-implement-config.json
|
|
|
19
19
|
|-----------|-------|-------------|
|
|
20
20
|
| Config missing, no PRD files | `NO_PROJECT` | Run /clavix:prd |
|
|
21
21
|
| PRD exists, no tasks.md | `PRD_EXISTS` | Run /clavix:plan |
|
|
22
|
-
| tasks.md exists, no config | `TASKS_EXIST` | Run clavix
|
|
22
|
+
| tasks.md exists, no config | `TASKS_EXIST` | Run /clavix:implement |
|
|
23
23
|
| config.stats.remaining > 0 | `IMPLEMENTING` | Continue from currentTask |
|
|
24
24
|
| config.stats.remaining == 0 | `ALL_COMPLETE` | Suggest /clavix:archive |
|
|
25
|
-
| Project in archive/ directory | `ARCHIVED` |
|
|
25
|
+
| Project in archive/ directory | `ARCHIVED` | Move back from archive to restore |
|
|
26
26
|
|
|
27
27
|
**Step 3: State assertion**
|
|
28
28
|
Always output current state when starting a workflow:
|
|
@@ -54,22 +54,20 @@ NO_PROJECT:
|
|
|
54
54
|
|
|
55
55
|
PRD_EXISTS:
|
|
56
56
|
→ /clavix:plan creates TASKS_EXIST
|
|
57
|
-
→ clavix plan command creates TASKS_EXIST
|
|
58
57
|
|
|
59
58
|
TASKS_EXIST:
|
|
60
|
-
→ clavix implement initializes config → IMPLEMENTING
|
|
61
59
|
→ /clavix:implement starts tasks → IMPLEMENTING
|
|
62
60
|
|
|
63
61
|
IMPLEMENTING:
|
|
64
|
-
→
|
|
62
|
+
→ Agent edits tasks.md (- [ ] → - [x]) reduces remaining
|
|
65
63
|
→ When remaining == 0 → ALL_COMPLETE
|
|
66
64
|
|
|
67
65
|
ALL_COMPLETE:
|
|
68
|
-
→ clavix
|
|
66
|
+
→ /clavix:archive moves to archive/ → ARCHIVED
|
|
69
67
|
→ Adding new tasks → back to IMPLEMENTING
|
|
70
68
|
|
|
71
69
|
ARCHIVED:
|
|
72
|
-
→
|
|
70
|
+
→ Agent moves project back from archive/ → back to previous state
|
|
73
71
|
```
|
|
74
72
|
|
|
75
73
|
### Prompt Lifecycle States (Separate from PRD)
|
|
@@ -21,7 +21,7 @@ When something goes wrong, help users gracefully. Always try to fix it yourself
|
|
|
21
21
|
#### Prompt Not Found
|
|
22
22
|
**What happened:** User asked about a prompt that doesn't exist
|
|
23
23
|
**You try first:**
|
|
24
|
-
1.
|
|
24
|
+
1. List files in `.clavix/outputs/prompts/` directory to see what's available
|
|
25
25
|
2. Check if there's a similar prompt ID
|
|
26
26
|
|
|
27
27
|
**Say:**
|
|
@@ -37,7 +37,7 @@ When something goes wrong, help users gracefully. Always try to fix it yourself
|
|
|
37
37
|
#### Task Not Found
|
|
38
38
|
**What happened:** Tried to complete a task that doesn't exist
|
|
39
39
|
**You try first:**
|
|
40
|
-
1.
|
|
40
|
+
1. Read `tasks.md` file to get current tasks
|
|
41
41
|
2. Check for typos in task ID
|
|
42
42
|
|
|
43
43
|
**Say:**
|
|
@@ -17,7 +17,7 @@ export class AgentErrorMessages {
|
|
|
17
17
|
'Agent recovery options:\n' +
|
|
18
18
|
' 1. Execute /clavix:prd to generate comprehensive PRD\n' +
|
|
19
19
|
' 2. Execute /clavix:summarize if conversation exists\n' +
|
|
20
|
-
' 3.
|
|
20
|
+
' 3. Check .clavix/sessions/ if saved session available\n\n' +
|
|
21
21
|
'Select option and execute, then retry this command.');
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
@@ -27,8 +27,8 @@ export class AgentErrorMessages {
|
|
|
27
27
|
static noTasksFound(projectName) {
|
|
28
28
|
return (`No tasks.md found for project: ${projectName}\n\n` +
|
|
29
29
|
'Agent recovery options:\n' +
|
|
30
|
-
` 1. Execute
|
|
31
|
-
' 2. Or
|
|
30
|
+
` 1. Execute /clavix:plan to generate task breakdown\n` +
|
|
31
|
+
' 2. Or read PRD and generate tasks.md manually\n\n' +
|
|
32
32
|
'After task generation completes, retry implementation.');
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
@@ -38,10 +38,9 @@ export class AgentErrorMessages {
|
|
|
38
38
|
static configNotFound() {
|
|
39
39
|
return ('Configuration file not found: .clavix-implement-config.json\n\n' +
|
|
40
40
|
'Agent recovery:\n' +
|
|
41
|
-
' 1.
|
|
42
|
-
' 2.
|
|
43
|
-
' 3.
|
|
44
|
-
' 4. Then retry task completion\n\n' +
|
|
41
|
+
' 1. Execute /clavix:implement to initialize implementation\n' +
|
|
42
|
+
' 2. Config will be created automatically\n' +
|
|
43
|
+
' 3. Then retry task completion\n\n' +
|
|
45
44
|
'This is expected on first run.');
|
|
46
45
|
}
|
|
47
46
|
/**
|
|
@@ -50,14 +49,15 @@ export class AgentErrorMessages {
|
|
|
50
49
|
*/
|
|
51
50
|
static taskNotFound(taskId, availableTasks) {
|
|
52
51
|
const taskList = availableTasks
|
|
53
|
-
.map(t => {
|
|
52
|
+
.map((t) => {
|
|
54
53
|
const status = t.completed ? '[x]' : '[ ]';
|
|
55
54
|
return ` ${status} ${t.id} - ${t.description}`;
|
|
56
55
|
})
|
|
57
56
|
.join('\n');
|
|
58
57
|
return (`Task ID not found: ${taskId}\n\n` +
|
|
59
58
|
'Available task IDs:\n' +
|
|
60
|
-
taskList +
|
|
59
|
+
taskList +
|
|
60
|
+
'\n\n' +
|
|
61
61
|
'Select a valid task ID from the list above and retry.');
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
@@ -93,7 +93,8 @@ export class AgentErrorMessages {
|
|
|
93
93
|
static multiplePrdsFound(projects) {
|
|
94
94
|
const projectList = projects.map((p, i) => ` ${i + 1}. ${p}`).join('\n');
|
|
95
95
|
return ('Multiple PRD projects found:\n\n' +
|
|
96
|
-
projectList +
|
|
96
|
+
projectList +
|
|
97
|
+
'\n\n' +
|
|
97
98
|
'Agent recovery options:\n' +
|
|
98
99
|
' 1. Specify project explicitly: --project <name>\n' +
|
|
99
100
|
' 2. Or run CLI in interactive mode to let user select\n\n' +
|
|
@@ -134,8 +135,8 @@ export class AgentErrorMessages {
|
|
|
134
135
|
' • All projects already archived\n' +
|
|
135
136
|
' • No projects with completed tasks\n\n' +
|
|
136
137
|
'Agent recovery options:\n' +
|
|
137
|
-
' 1.
|
|
138
|
-
' 2. Check
|
|
138
|
+
' 1. List .clavix/outputs/archive/ to see archived projects\n' +
|
|
139
|
+
' 2. Check .clavix/outputs/ for active projects\n' +
|
|
139
140
|
' 3. Or create new PRD with /clavix:prd');
|
|
140
141
|
}
|
|
141
142
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavix",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "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.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|