clavix 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/init.js +53 -153
- package/dist/cli/commands/update.js +18 -21
- package/dist/core/doc-injector.d.ts +2 -2
- package/dist/core/doc-injector.js +12 -12
- package/dist/index 2.js +13 -0
- package/dist/index.d 2.ts +4 -0
- package/dist/templates/agents/agents.md +29 -28
- package/dist/templates/agents/copilot-instructions.md +43 -38
- package/dist/templates/agents/octo.md +42 -38
- package/dist/templates/agents/warp.md +25 -26
- package/dist/templates/instructions/README.md +20 -19
- package/dist/templates/instructions/core/clavix-mode.md +10 -25
- package/dist/templates/instructions/core/mode-enforcement.md +10 -11
- package/dist/templates/slash-commands/_canonical/archive.md +1 -1
- package/dist/templates/slash-commands/_canonical/implement.md +227 -14
- package/dist/templates/slash-commands/_canonical/improve.md +7 -7
- package/dist/templates/slash-commands/_canonical/plan.md +9 -21
- package/dist/templates/slash-commands/_canonical/prd.md +1 -1
- package/dist/templates/slash-commands/_canonical/start.md +1 -1
- package/dist/templates/slash-commands/_canonical/summarize.md +3 -3
- package/dist/templates/slash-commands/_canonical/verify.md +14 -14
- 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
- package/dist/templates/slash-commands/_canonical/execute.md +0 -276
- package/dist/templates/slash-commands/_components/agent-protocols/assertion-checkpoints.md +0 -122
- package/dist/templates/slash-commands/_components/agent-protocols/file-formats.md +0 -169
- package/dist/templates/slash-commands/_components/agent-protocols/quality-output.md +0 -94
- package/dist/templates/slash-commands/_components/agent-protocols/self-correction.md +0 -61
- package/dist/templates/slash-commands/_components/agent-protocols/state-assertion.md +0 -51
- package/dist/templates/slash-commands/_components/agent-protocols/verification-methods.md +0 -184
- package/dist/templates/slash-commands/_components/mode-headers/implementation-mode.md +0 -21
- package/dist/templates/slash-commands/_components/mode-headers/planning-mode.md +0 -17
- package/dist/templates/slash-commands/_components/mode-headers/self-correction.md +0 -13
- package/dist/templates/slash-commands/_components/references/intent-types.md +0 -39
- package/dist/templates/slash-commands/_components/sections/file-saving-protocol.md +0 -40
- package/dist/templates/slash-commands/_components/sections/intent-detection.md +0 -24
- package/dist/templates/slash-commands/_components/sections/pattern-visibility.md +0 -122
- package/dist/templates/slash-commands/_components/sections/quality-assessment.md +0 -26
- package/dist/templates/slash-commands/_components/sections/workflow-navigation.md +0 -13
- package/dist/templates/slash-commands/_components/troubleshooting/file-not-saved.md +0 -19
- package/dist/templates/slash-commands/_components/troubleshooting/mode-confusion.md +0 -46
- package/dist/templates/slash-commands/_components/troubleshooting/triage-escalation.md +0 -26
|
@@ -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.
|
|
3
|
+
"version": "5.1.0",
|
|
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",
|
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "Clavix: Execute"
|
|
3
|
-
description: Execute saved prompts from improve optimization
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Clavix: Execute Saved Prompts
|
|
7
|
-
|
|
8
|
-
Time to build! You've optimized a prompt with `/clavix:improve` - now I'll implement it.
|
|
9
|
-
|
|
10
|
-
Your saved prompts live in `.clavix/outputs/prompts/`.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## What This Does
|
|
15
|
-
|
|
16
|
-
When you run `/clavix:execute`, I:
|
|
17
|
-
1. **Find your prompt** - Load what you saved from improve mode
|
|
18
|
-
2. **Understand what to build** - Read the requirements and checklist
|
|
19
|
-
3. **Implement everything** - Write the code, create files, build features
|
|
20
|
-
4. **Run verification automatically** - Make sure everything works
|
|
21
|
-
5. **Clean up when done** - Remove executed prompts
|
|
22
|
-
|
|
23
|
-
**I do ALL of this automatically. You just watch (or grab coffee).**
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## CLAVIX MODE: Implementation
|
|
28
|
-
|
|
29
|
-
**I'm in implementation mode. Building time!**
|
|
30
|
-
|
|
31
|
-
**What I'll do:**
|
|
32
|
-
- Read and understand your prompt requirements
|
|
33
|
-
- Implement everything in the optimized prompt
|
|
34
|
-
- Write production-quality code
|
|
35
|
-
- Follow the specifications exactly
|
|
36
|
-
- Run tests and verification automatically
|
|
37
|
-
- Handle errors and fix issues
|
|
38
|
-
|
|
39
|
-
**What I'm authorized to create:**
|
|
40
|
-
- Functions, classes, and components
|
|
41
|
-
- New files and file modifications
|
|
42
|
-
- Tests for implemented code
|
|
43
|
-
- Configuration files if needed
|
|
44
|
-
|
|
45
|
-
**Before I start, I'll confirm:**
|
|
46
|
-
> "Starting implementation mode. Building your [feature description]..."
|
|
47
|
-
|
|
48
|
-
For complete mode documentation, see: `.clavix/instructions/core/clavix-mode.md`
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Before You Start
|
|
53
|
-
|
|
54
|
-
You need a saved prompt first. Run:
|
|
55
|
-
- `/clavix:improve "your prompt"` - Smart prompt improvement with auto depth selection
|
|
56
|
-
|
|
57
|
-
Then come back here with `/clavix:execute`.
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## How I Execute Your Prompt
|
|
62
|
-
|
|
63
|
-
### The Quick Version
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
You: /clavix:execute
|
|
67
|
-
Me: [Finds your latest prompt]
|
|
68
|
-
[Reads requirements]
|
|
69
|
-
[Implements everything]
|
|
70
|
-
[Runs verification]
|
|
71
|
-
Me: "Done! Here's what I built..."
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### The Detailed Version (v5 Agentic-First)
|
|
75
|
-
|
|
76
|
-
**Step 1: I find your prompt**
|
|
77
|
-
|
|
78
|
-
I read directly from the file system:
|
|
79
|
-
- List `.clavix/outputs/prompts/*.md` to find saved prompts
|
|
80
|
-
- Get the most recent one (by timestamp in filename or frontmatter)
|
|
81
|
-
- Read the prompt file: `.clavix/outputs/prompts/<id>.md`
|
|
82
|
-
|
|
83
|
-
**Step 2: I read and understand**
|
|
84
|
-
|
|
85
|
-
I parse the prompt file and extract:
|
|
86
|
-
- The objective (what to build)
|
|
87
|
-
- Requirements (specifics to implement)
|
|
88
|
-
- Technical constraints (how to build it)
|
|
89
|
-
- Success criteria (how to know it's done)
|
|
90
|
-
|
|
91
|
-
**Step 3: I implement everything**
|
|
92
|
-
|
|
93
|
-
This is where I actually write code using my native tools:
|
|
94
|
-
- Create new files as needed
|
|
95
|
-
- Modify existing files
|
|
96
|
-
- Write functions, components, classes
|
|
97
|
-
- Add tests if specified
|
|
98
|
-
|
|
99
|
-
**Step 4: I verify automatically**
|
|
100
|
-
|
|
101
|
-
After building, I verify by:
|
|
102
|
-
- Running tests (if test suite exists)
|
|
103
|
-
- Building/compiling to ensure no errors
|
|
104
|
-
- Checking requirements from the checklist
|
|
105
|
-
|
|
106
|
-
**Step 5: I report results**
|
|
107
|
-
|
|
108
|
-
You'll see a summary of:
|
|
109
|
-
- What I built
|
|
110
|
-
- What passed verification
|
|
111
|
-
- Any issues (if they exist)
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## Automatic Verification (I Handle This)
|
|
116
|
-
|
|
117
|
-
**I always verify after implementing. You don't need to ask.**
|
|
118
|
-
|
|
119
|
-
### What Happens Automatically
|
|
120
|
-
|
|
121
|
-
After I finish building, I run verification myself:
|
|
122
|
-
|
|
123
|
-
1. **Load the checklist** - From your executed prompt (what to check)
|
|
124
|
-
2. **Run automated tests** - Test suite, build, linting, type checking
|
|
125
|
-
3. **Check each requirement** - Make sure everything was implemented
|
|
126
|
-
4. **Generate a report** - Show you what passed and failed
|
|
127
|
-
|
|
128
|
-
### What You'll See
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
Implementation complete for [prompt-id]
|
|
132
|
-
|
|
133
|
-
Verification Results:
|
|
134
|
-
8 items passed
|
|
135
|
-
1 item needs attention: [specific issue]
|
|
136
|
-
|
|
137
|
-
Would you like me to fix the failing item?
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Understanding the Symbols
|
|
141
|
-
|
|
142
|
-
| Symbol | Meaning |
|
|
143
|
-
|--------|---------|
|
|
144
|
-
| Pass | Passed - This works |
|
|
145
|
-
| Fail | Failed - Needs fixing |
|
|
146
|
-
| Skip | Skipped - Check later |
|
|
147
|
-
| N/A | N/A - Doesn't apply |
|
|
148
|
-
|
|
149
|
-
### When Things Fail
|
|
150
|
-
|
|
151
|
-
**I try to fix issues automatically:**
|
|
152
|
-
|
|
153
|
-
If verification finds problems, I'll:
|
|
154
|
-
1. Tell you what failed and why
|
|
155
|
-
2. Offer to fix it
|
|
156
|
-
3. Re-verify after fixing
|
|
157
|
-
|
|
158
|
-
**If I can't fix it myself:**
|
|
159
|
-
|
|
160
|
-
I'll explain what's wrong and what you might need to do:
|
|
161
|
-
> "The database connection is failing - this might be a configuration issue.
|
|
162
|
-
> Can you check that your `.env` file has the correct `DATABASE_URL`?"
|
|
163
|
-
|
|
164
|
-
### Standard vs Comprehensive Depth Verification
|
|
165
|
-
|
|
166
|
-
**Standard depth prompts:**
|
|
167
|
-
- I generate a basic checklist based on what you asked for
|
|
168
|
-
- Covers essentials: compiles, no errors, requirements met
|
|
169
|
-
|
|
170
|
-
**Comprehensive depth prompts:**
|
|
171
|
-
- Use the comprehensive checklist from deep analysis
|
|
172
|
-
- More thorough verification with edge cases
|
|
173
|
-
|
|
174
|
-
**For more thorough verification, use `/clavix:improve --comprehensive`**
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
## Prompt Management (v5 Agentic-First)
|
|
179
|
-
|
|
180
|
-
**Where prompts live:**
|
|
181
|
-
- All prompts: `.clavix/outputs/prompts/*.md`
|
|
182
|
-
- Metadata: In frontmatter of each `.md` file
|
|
183
|
-
|
|
184
|
-
### How I Access Prompts (Native Tools)
|
|
185
|
-
|
|
186
|
-
| What I Do | How I Do It |
|
|
187
|
-
|-----------|-------------|
|
|
188
|
-
| List saved prompts | List `.clavix/outputs/prompts/*.md` files |
|
|
189
|
-
| Get latest prompt | Find newest file by timestamp in filename |
|
|
190
|
-
| Get specific prompt | Read `.clavix/outputs/prompts/<id>.md` |
|
|
191
|
-
| Mark as executed | Edit frontmatter: `executed: true` |
|
|
192
|
-
| Clean up executed | Delete files where frontmatter has `executed: true` |
|
|
193
|
-
|
|
194
|
-
### The Prompt Lifecycle
|
|
195
|
-
|
|
196
|
-
```
|
|
197
|
-
1. YOU CREATE → /clavix:improve (saves to .clavix/outputs/prompts/<id>.md)
|
|
198
|
-
2. I EXECUTE → /clavix:execute (you are here) - I read and implement
|
|
199
|
-
3. I VERIFY → Automatic verification
|
|
200
|
-
4. MARK DONE → I update frontmatter with executed: true
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
## Finding Your Way Around
|
|
206
|
-
|
|
207
|
-
Need to see what projects exist or check progress? I read the file system:
|
|
208
|
-
|
|
209
|
-
| What I Need | How I Find It |
|
|
210
|
-
|-------------|---------------|
|
|
211
|
-
| See all projects | List directories in `.clavix/outputs/` |
|
|
212
|
-
| Check a specific project | Read `.clavix/outputs/<project>/` files |
|
|
213
|
-
| See saved prompts | List `.clavix/outputs/prompts/*.md` files |
|
|
214
|
-
| Find archived work | List `.clavix/outputs/archive/` |
|
|
215
|
-
|
|
216
|
-
---
|
|
217
|
-
|
|
218
|
-
## When Things Go Wrong
|
|
219
|
-
|
|
220
|
-
### No Prompts Found
|
|
221
|
-
|
|
222
|
-
If I can't find a saved prompt, I'll tell you:
|
|
223
|
-
> "I don't see any saved prompts. Let's create one first!"
|
|
224
|
-
|
|
225
|
-
Then you can run `/clavix:improve "your requirement"` and come back.
|
|
226
|
-
|
|
227
|
-
### Prompt Is Old or Stale
|
|
228
|
-
|
|
229
|
-
If your prompt is more than 7 days old:
|
|
230
|
-
> "This prompt is a bit old. Want me to proceed anyway, or should we create a fresh one?"
|
|
231
|
-
|
|
232
|
-
### Verification Keeps Failing
|
|
233
|
-
|
|
234
|
-
If I can't get verification to pass after trying:
|
|
235
|
-
> "I've tried a few fixes but this item keeps failing. Here's what's happening: [details]
|
|
236
|
-
>
|
|
237
|
-
> Would you like me to:
|
|
238
|
-
> 1. Keep trying with a different approach
|
|
239
|
-
> 2. Skip this check for now
|
|
240
|
-
> 3. Show you what needs manual attention"
|
|
241
|
-
|
|
242
|
-
---
|
|
243
|
-
|
|
244
|
-
## Workflow Navigation
|
|
245
|
-
|
|
246
|
-
**Where you are:** Execute (building your prompt)
|
|
247
|
-
|
|
248
|
-
**How you got here:**
|
|
249
|
-
1. `/clavix:improve` - Optimized your prompt
|
|
250
|
-
2. **`/clavix:execute`** - Now building it (you are here)
|
|
251
|
-
|
|
252
|
-
**What happens after:**
|
|
253
|
-
- I verify automatically - Results shown
|
|
254
|
-
- If all passes - Done! I clean up
|
|
255
|
-
- If issues - `/clavix:verify` for detailed check
|
|
256
|
-
|
|
257
|
-
**Related commands:**
|
|
258
|
-
- `/clavix:improve` - Smart prompt optimization (previous step)
|
|
259
|
-
- `/clavix:verify` - Detailed verification (if needed)
|
|
260
|
-
- `/clavix:archive` - Archive when fully done
|
|
261
|
-
|
|
262
|
-
---
|
|
263
|
-
|
|
264
|
-
## Agent Transparency (v5.0)
|
|
265
|
-
|
|
266
|
-
### CLI Reference (Commands I Execute)
|
|
267
|
-
{{INCLUDE:agent-protocols/cli-reference.md}}
|
|
268
|
-
|
|
269
|
-
### Error Handling
|
|
270
|
-
{{INCLUDE:agent-protocols/error-handling.md}}
|
|
271
|
-
|
|
272
|
-
### Agent Decision Rules
|
|
273
|
-
{{INCLUDE:agent-protocols/decision-rules.md}}
|
|
274
|
-
|
|
275
|
-
### Recovery Patterns
|
|
276
|
-
{{INCLUDE:troubleshooting/vibecoder-recovery.md}}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
## Assertion Checkpoints (v4.6)
|
|
2
|
-
|
|
3
|
-
At key workflow stages, verify your execution matches expected state. These checkpoints help ensure correct template execution.
|
|
4
|
-
|
|
5
|
-
### Fast/Deep Mode Checkpoints
|
|
6
|
-
|
|
7
|
-
**CHECKPOINT 1: After Intent Detection**
|
|
8
|
-
```
|
|
9
|
-
✓ Intent type identified (one of 11 types)
|
|
10
|
-
✓ Confidence percentage calculated
|
|
11
|
-
✓ If confidence < 70%: Secondary intent noted
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
**CHECKPOINT 2: After Quality Assessment**
|
|
15
|
-
```
|
|
16
|
-
✓ All 6 dimensions scored:
|
|
17
|
-
- Clarity (0-100%)
|
|
18
|
-
- Efficiency (0-100%)
|
|
19
|
-
- Structure (0-100%)
|
|
20
|
-
- Completeness (0-100%)
|
|
21
|
-
- Actionability (0-100%)
|
|
22
|
-
- Specificity (0-100%)
|
|
23
|
-
✓ Overall quality calculated
|
|
24
|
-
✓ Strengths identified (any dimension >= 85%)
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
**CHECKPOINT 3: After Optimization**
|
|
28
|
-
```
|
|
29
|
-
✓ Enhanced prompt generated
|
|
30
|
-
✓ Improvements listed with dimension labels
|
|
31
|
-
✓ Patterns applied documented
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
**CHECKPOINT 4: After Saving**
|
|
35
|
-
```
|
|
36
|
-
✓ Prompt saved to .clavix/outputs/prompts/{mode}/
|
|
37
|
-
✓ Index file updated
|
|
38
|
-
✓ Success message displayed
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### PRD Mode Checkpoints
|
|
42
|
-
|
|
43
|
-
**CHECKPOINT 1: Before Questions**
|
|
44
|
-
```
|
|
45
|
-
✓ State assertion displayed
|
|
46
|
-
✓ Implementation blocked message shown
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
**CHECKPOINT 2: After Each Question**
|
|
50
|
-
```
|
|
51
|
-
✓ Answer validated for completeness
|
|
52
|
-
✓ Follow-up asked if answer is vague
|
|
53
|
-
✓ Minimum requirements met before proceeding
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
**CHECKPOINT 3: After Document Generation**
|
|
57
|
-
```
|
|
58
|
-
✓ Full PRD generated with all sections
|
|
59
|
-
✓ Quick PRD generated (2-3 paragraphs)
|
|
60
|
-
✓ Quality validation scores displayed
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
**CHECKPOINT 4: After Saving**
|
|
64
|
-
```
|
|
65
|
-
✓ Files saved to .clavix/outputs/{project-name}/
|
|
66
|
-
✓ full-prd.md exists
|
|
67
|
-
✓ quick-prd.md exists
|
|
68
|
-
✓ Next steps displayed
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Implementation Mode Checkpoints
|
|
72
|
-
|
|
73
|
-
**CHECKPOINT 1: Before Starting**
|
|
74
|
-
```
|
|
75
|
-
✓ Config file checked (.clavix-implement-config.json)
|
|
76
|
-
✓ Resume state detected if exists
|
|
77
|
-
✓ Tasks loaded from tasks.md
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
**CHECKPOINT 2: After Each Task**
|
|
81
|
-
```
|
|
82
|
-
✓ Task completed successfully
|
|
83
|
-
✓ clavix task-complete {task-id} called
|
|
84
|
-
✓ Next task displayed automatically
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
**CHECKPOINT 3: After All Tasks**
|
|
88
|
-
```
|
|
89
|
-
✓ All tasks marked complete
|
|
90
|
-
✓ Archive suggestion displayed
|
|
91
|
-
✓ Git commit created if configured
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### Verification Block Format
|
|
95
|
-
|
|
96
|
-
At the end of your response, include this verification block:
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
## Clavix Execution Verification
|
|
100
|
-
- [x] Intent detected: {type} ({confidence}%)
|
|
101
|
-
- [x] Quality assessed: {overall}%
|
|
102
|
-
- [x] {N} patterns applied
|
|
103
|
-
- [x] Prompt saved: {filename}
|
|
104
|
-
- [x] Mode: {fast|deep|prd|plan}
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
This allows users and developers to verify correct template execution and helps identify any deviations from expected behavior.
|
|
108
|
-
|
|
109
|
-
### Self-Verification Protocol
|
|
110
|
-
|
|
111
|
-
If a checkpoint fails:
|
|
112
|
-
1. **STOP**: Do not proceed past the failed checkpoint
|
|
113
|
-
2. **IDENTIFY**: Which checkpoint failed and why
|
|
114
|
-
3. **REPORT**: Inform user of the issue
|
|
115
|
-
4. **RECOVER**: Take corrective action or ask for guidance
|
|
116
|
-
|
|
117
|
-
Example recovery:
|
|
118
|
-
```
|
|
119
|
-
⚠️ Checkpoint 2 failed: Quality assessment incomplete
|
|
120
|
-
Issue: Specificity dimension not scored
|
|
121
|
-
Action: Rerunning quality assessment with all 6 dimensions
|
|
122
|
-
```
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
## File Format Reference (v5 Agentic-First)
|
|
2
|
-
|
|
3
|
-
### .clavix-implement-config.json
|
|
4
|
-
|
|
5
|
-
Implementation state configuration file.
|
|
6
|
-
|
|
7
|
-
**Location:** `.clavix/outputs/{project}/.clavix-implement-config.json`
|
|
8
|
-
|
|
9
|
-
**Schema:**
|
|
10
|
-
```json
|
|
11
|
-
{
|
|
12
|
-
"commitStrategy": "per-task" | "per-5-tasks" | "per-phase" | "none",
|
|
13
|
-
"tasksPath": "string - absolute path to tasks.md",
|
|
14
|
-
"currentTask": {
|
|
15
|
-
"id": "phase-N-name-M",
|
|
16
|
-
"description": "Task description text",
|
|
17
|
-
"phase": "Phase Name",
|
|
18
|
-
"completed": false
|
|
19
|
-
},
|
|
20
|
-
"stats": {
|
|
21
|
-
"total": 16,
|
|
22
|
-
"completed": 4,
|
|
23
|
-
"remaining": 12,
|
|
24
|
-
"percentage": 25
|
|
25
|
-
},
|
|
26
|
-
"timestamp": "2024-01-15T10:30:00.000Z",
|
|
27
|
-
"completedTaskIds": ["phase-1-setup-1", "phase-1-setup-2"],
|
|
28
|
-
"blockedTasks": [
|
|
29
|
-
{
|
|
30
|
-
"taskId": "phase-2-auth-3",
|
|
31
|
-
"reason": "Waiting for API keys",
|
|
32
|
-
"timestamp": "2024-01-15T11:00:00.000Z"
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
**Agent Usage Rules:**
|
|
39
|
-
- READ this file to determine current state
|
|
40
|
-
- UPDATE using Edit tool when marking tasks complete
|
|
41
|
-
- IF missing: Create with initial state
|
|
42
|
-
- IF corrupted: Report as UNRECOVERABLE error
|
|
43
|
-
|
|
44
|
-
### tasks.md Format
|
|
45
|
-
|
|
46
|
-
Task breakdown file generated by /clavix:plan.
|
|
47
|
-
|
|
48
|
-
**Location:** `.clavix/outputs/{project}/tasks.md`
|
|
49
|
-
|
|
50
|
-
**Structure:**
|
|
51
|
-
```markdown
|
|
52
|
-
# Implementation Tasks: {Project Name}
|
|
53
|
-
|
|
54
|
-
Generated from: {PRD filename}
|
|
55
|
-
Created: {timestamp}
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Phase 1: {Phase Name}
|
|
60
|
-
|
|
61
|
-
- [ ] {Task description}
|
|
62
|
-
- Task ID: `phase-1-{sanitized-name}-1`
|
|
63
|
-
- PRD Reference: {section-name}
|
|
64
|
-
|
|
65
|
-
- [ ] {Another task}
|
|
66
|
-
- Task ID: `phase-1-{sanitized-name}-2`
|
|
67
|
-
|
|
68
|
-
- [x] {Completed task}
|
|
69
|
-
- Task ID: `phase-1-{sanitized-name}-3`
|
|
70
|
-
|
|
71
|
-
## Phase 2: {Phase Name}
|
|
72
|
-
|
|
73
|
-
- [ ] {Task description}
|
|
74
|
-
- Task ID: `phase-2-{sanitized-name}-1`
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
## Progress Summary
|
|
79
|
-
|
|
80
|
-
- Total Tasks: {N}
|
|
81
|
-
- Completed: {M}
|
|
82
|
-
- Remaining: {N-M}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
**Task ID Pattern:** `phase-{N}-{sanitized-name}-{M}`
|
|
86
|
-
- `N` = Phase number (1-indexed)
|
|
87
|
-
- `sanitized-name` = Lowercase, hyphens for spaces, no special chars
|
|
88
|
-
- `M` = Task counter within phase (1-indexed)
|
|
89
|
-
|
|
90
|
-
**Valid Examples:**
|
|
91
|
-
- `phase-1-setup-configuration-1`
|
|
92
|
-
- `phase-2-user-authentication-3`
|
|
93
|
-
- `phase-3-api-integration-2`
|
|
94
|
-
|
|
95
|
-
**Invalid Examples:**
|
|
96
|
-
- `phase1-setup-1` - Missing hyphen after "phase"
|
|
97
|
-
- `Phase-1-Setup-1` - Must be lowercase
|
|
98
|
-
- `phase-1-setup` - Missing task number
|
|
99
|
-
|
|
100
|
-
### Prompt Files (v5 Format)
|
|
101
|
-
|
|
102
|
-
Individual prompt files with frontmatter metadata.
|
|
103
|
-
|
|
104
|
-
**Location:** `.clavix/outputs/prompts/<id>.md`
|
|
105
|
-
|
|
106
|
-
**Format:**
|
|
107
|
-
```markdown
|
|
108
|
-
---
|
|
109
|
-
id: std-20250127-143022-a3f2
|
|
110
|
-
timestamp: 2025-01-27T14:30:22Z
|
|
111
|
-
executed: false
|
|
112
|
-
originalPrompt: "the user's original prompt text"
|
|
113
|
-
depthUsed: standard|comprehensive
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
# Improved Prompt
|
|
117
|
-
|
|
118
|
-
<optimized prompt content>
|
|
119
|
-
|
|
120
|
-
## Quality Scores
|
|
121
|
-
- **Clarity**: 85%
|
|
122
|
-
- **Efficiency**: 80%
|
|
123
|
-
- **Structure**: 90%
|
|
124
|
-
- **Completeness**: 75%
|
|
125
|
-
- **Actionability**: 88%
|
|
126
|
-
- **Overall**: 84% (good)
|
|
127
|
-
|
|
128
|
-
## Original Prompt
|
|
129
|
-
```
|
|
130
|
-
<user's original prompt>
|
|
131
|
-
```
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
**Agent Usage:**
|
|
135
|
-
- LIST prompts: `ls .clavix/outputs/prompts/*.md`
|
|
136
|
-
- READ prompt: Use Read tool on `.clavix/outputs/prompts/<id>.md`
|
|
137
|
-
- FIND latest: Sort files by timestamp in filename
|
|
138
|
-
- MARK executed: Edit frontmatter to set `executed: true`
|
|
139
|
-
|
|
140
|
-
### PRD Files
|
|
141
|
-
|
|
142
|
-
**Full PRD:** `.clavix/outputs/{project}/full-prd.md`
|
|
143
|
-
- Complete team-facing document
|
|
144
|
-
- All sections expanded
|
|
145
|
-
|
|
146
|
-
**Quick PRD:** `.clavix/outputs/{project}/quick-prd.md`
|
|
147
|
-
- 2-3 paragraph AI-optimized version
|
|
148
|
-
- Key requirements only
|
|
149
|
-
|
|
150
|
-
**Mini PRD:** `.clavix/outputs/{project}/mini-prd.md`
|
|
151
|
-
- From /clavix:summarize
|
|
152
|
-
- Extracted from conversation
|
|
153
|
-
|
|
154
|
-
### Directory Structure Overview (v5)
|
|
155
|
-
|
|
156
|
-
```
|
|
157
|
-
.clavix/
|
|
158
|
-
├── outputs/
|
|
159
|
-
│ ├── prompts/
|
|
160
|
-
│ │ └── *.md # Prompt files (metadata in frontmatter)
|
|
161
|
-
│ ├── {project-name}/
|
|
162
|
-
│ │ ├── full-prd.md
|
|
163
|
-
│ │ ├── quick-prd.md
|
|
164
|
-
│ │ ├── tasks.md
|
|
165
|
-
│ │ └── .clavix-implement-config.json
|
|
166
|
-
│ └── archive/
|
|
167
|
-
│ └── {archived-project}/
|
|
168
|
-
└── config.json # Global config
|
|
169
|
-
```
|