clavix 4.7.0 → 4.8.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/execute.js +29 -9
- package/dist/cli/commands/verify.d.ts +28 -0
- package/dist/cli/commands/verify.js +347 -0
- package/dist/core/basic-checklist-generator.d.ts +35 -0
- package/dist/core/basic-checklist-generator.js +344 -0
- package/dist/core/checklist-parser.d.ts +48 -0
- package/dist/core/checklist-parser.js +238 -0
- package/dist/core/prompt-manager.d.ts +7 -0
- package/dist/core/prompt-manager.js +47 -22
- package/dist/core/verification-hooks.d.ts +67 -0
- package/dist/core/verification-hooks.js +309 -0
- package/dist/core/verification-manager.d.ts +106 -0
- package/dist/core/verification-manager.js +422 -0
- package/dist/templates/slash-commands/_canonical/execute.md +72 -1
- package/dist/templates/slash-commands/_canonical/verify.md +292 -0
- package/dist/templates/slash-commands/_components/agent-protocols/verification-methods.md +184 -0
- package/dist/types/verification.d.ts +204 -0
- package/dist/types/verification.js +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Clavix: Verify"
|
|
3
|
+
description: Verify implementation against validation checklist from deep/fast mode
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Clavix: Verify Implementation
|
|
7
|
+
|
|
8
|
+
Verify that your implementation covers the validation checklist, edge cases, and risks identified by `/clavix:deep` or `/clavix:fast`.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## CLAVIX MODE: Verification
|
|
13
|
+
|
|
14
|
+
**You are in Clavix verification mode. You verify implementations against checklists.**
|
|
15
|
+
|
|
16
|
+
**YOUR ROLE:**
|
|
17
|
+
- ✓ Load saved prompt and extract validation checklist
|
|
18
|
+
- ✓ Verify each checklist item systematically
|
|
19
|
+
- ✓ Run automated hooks where applicable (test, build, lint)
|
|
20
|
+
- ✓ Report pass/fail/skip for each item with reasoning
|
|
21
|
+
- ✓ Generate verification report
|
|
22
|
+
|
|
23
|
+
**DO NOT IMPLEMENT. DO NOT MODIFY CODE.**
|
|
24
|
+
- ✗ Writing new code
|
|
25
|
+
- ✗ Fixing issues found during verification
|
|
26
|
+
- ✗ Making changes to implementation
|
|
27
|
+
- Only verify and report. User will fix issues and re-verify.
|
|
28
|
+
|
|
29
|
+
**MODE ENTRY VALIDATION:**
|
|
30
|
+
Before verifying, confirm:
|
|
31
|
+
1. Prompt was executed via `/clavix:execute`
|
|
32
|
+
2. Implementation is complete (or ready for verification)
|
|
33
|
+
3. Output assertion: "Entering VERIFICATION mode. I will verify, not implement."
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Prerequisites
|
|
38
|
+
|
|
39
|
+
1. Generate optimized prompt with checklist:
|
|
40
|
+
```bash
|
|
41
|
+
/clavix:deep "your requirement"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
2. Execute and implement:
|
|
45
|
+
```bash
|
|
46
|
+
/clavix:execute --latest
|
|
47
|
+
# ... implement requirements ...
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
3. Then verify:
|
|
51
|
+
```bash
|
|
52
|
+
/clavix:verify --latest
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Usage
|
|
58
|
+
|
|
59
|
+
**Verify latest executed prompt (recommended):**
|
|
60
|
+
```bash
|
|
61
|
+
clavix verify --latest
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Verify specific prompt:**
|
|
65
|
+
```bash
|
|
66
|
+
clavix verify --id <prompt-id>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Show verification status:**
|
|
70
|
+
```bash
|
|
71
|
+
clavix verify --status
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Re-run only failed items:**
|
|
75
|
+
```bash
|
|
76
|
+
clavix verify --retry-failed
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Export verification report:**
|
|
80
|
+
```bash
|
|
81
|
+
clavix verify --export markdown
|
|
82
|
+
clavix verify --export json
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Verification Workflow
|
|
88
|
+
|
|
89
|
+
### Step 1: Load Checklist
|
|
90
|
+
|
|
91
|
+
1. Locate saved prompt from `.clavix/outputs/prompts/deep/` or `.clavix/outputs/prompts/fast/`
|
|
92
|
+
2. Extract validation checklist, edge cases, and risks sections
|
|
93
|
+
3. If fast mode (no checklist): Generate basic checklist from intent
|
|
94
|
+
|
|
95
|
+
### Step 2: Run Automated Hooks
|
|
96
|
+
|
|
97
|
+
For items that can be verified automatically:
|
|
98
|
+
|
|
99
|
+
| Hook | Verifies |
|
|
100
|
+
|------|----------|
|
|
101
|
+
| `test` | "Tests pass", "All tests", "Test coverage" |
|
|
102
|
+
| `build` | "Compiles", "Builds without errors" |
|
|
103
|
+
| `lint` | "No warnings", "Follows conventions" |
|
|
104
|
+
| `typecheck` | "Type errors", "TypeScript" |
|
|
105
|
+
|
|
106
|
+
Hooks are auto-detected from `package.json` scripts.
|
|
107
|
+
|
|
108
|
+
### Step 3: Manual Verification
|
|
109
|
+
|
|
110
|
+
For each item that requires manual verification:
|
|
111
|
+
|
|
112
|
+
1. **Display the item:**
|
|
113
|
+
```
|
|
114
|
+
📋 [Item description]
|
|
115
|
+
Category: [Functionality/Robustness/Quality/etc.]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
2. **Verify against implementation:**
|
|
119
|
+
- Review code changes
|
|
120
|
+
- Test functionality
|
|
121
|
+
- Check edge cases
|
|
122
|
+
|
|
123
|
+
3. **Record result:**
|
|
124
|
+
- ✓ **Passed**: Item is verified (with evidence)
|
|
125
|
+
- ✗ **Failed**: Item not covered (with reason)
|
|
126
|
+
- ⏭️ **Skipped**: Will verify later
|
|
127
|
+
- ➖ **N/A**: Does not apply to this implementation
|
|
128
|
+
|
|
129
|
+
### Step 4: Generate Report
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
══════════════════════════════════════════════════════════════════════
|
|
133
|
+
VERIFICATION REPORT
|
|
134
|
+
[prompt-id]
|
|
135
|
+
══════════════════════════════════════════════════════════════════════
|
|
136
|
+
|
|
137
|
+
📋 VALIDATION CHECKLIST (X items)
|
|
138
|
+
|
|
139
|
+
✅ [automated] Code compiles/runs without errors
|
|
140
|
+
Evidence: npm run build - exit code 0
|
|
141
|
+
Confidence: HIGH
|
|
142
|
+
|
|
143
|
+
✅ [manual] All requirements implemented
|
|
144
|
+
Evidence: Login page with OAuth, callback handling
|
|
145
|
+
Confidence: MEDIUM
|
|
146
|
+
|
|
147
|
+
❌ [manual] Keyboard navigation works
|
|
148
|
+
Status: FAILED
|
|
149
|
+
Reason: Tab order skips OAuth buttons
|
|
150
|
+
Confidence: MEDIUM
|
|
151
|
+
|
|
152
|
+
══════════════════════════════════════════════════════════════════════
|
|
153
|
+
SUMMARY
|
|
154
|
+
══════════════════════════════════════════════════════════════════════
|
|
155
|
+
Total: X items
|
|
156
|
+
Passed: Y (Z%)
|
|
157
|
+
Failed: N (requires attention)
|
|
158
|
+
Skipped: M
|
|
159
|
+
|
|
160
|
+
⚠️ N item(s) require attention before marking complete
|
|
161
|
+
══════════════════════════════════════════════════════════════════════
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Fast Mode Handling
|
|
167
|
+
|
|
168
|
+
When verifying a fast mode prompt (no checklist):
|
|
169
|
+
|
|
170
|
+
1. **Detect intent** from original prompt
|
|
171
|
+
2. **Generate basic checklist** based on intent:
|
|
172
|
+
- `code-generation`: compiles, requirements met, no errors, follows conventions
|
|
173
|
+
- `testing`: tests pass, coverage acceptable, edge cases tested
|
|
174
|
+
- `debugging`: bug fixed, no regression, root cause addressed
|
|
175
|
+
- etc.
|
|
176
|
+
|
|
177
|
+
3. **Display notice:**
|
|
178
|
+
```
|
|
179
|
+
⚠️ No checklist found (fast mode prompt)
|
|
180
|
+
Generating basic checklist based on intent...
|
|
181
|
+
|
|
182
|
+
💡 For comprehensive checklists, use /clavix:deep
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Verification Methods by Category
|
|
188
|
+
|
|
189
|
+
### Functionality
|
|
190
|
+
- Run the implemented feature
|
|
191
|
+
- Check expected behavior matches requirements
|
|
192
|
+
- Verify all user flows complete successfully
|
|
193
|
+
|
|
194
|
+
### Testing
|
|
195
|
+
- Run test suite: `npm test`
|
|
196
|
+
- Check coverage report
|
|
197
|
+
- Verify no failing tests
|
|
198
|
+
|
|
199
|
+
### Robustness/Edge Cases
|
|
200
|
+
- Test with edge case inputs (empty, null, max values)
|
|
201
|
+
- Check error messages are user-friendly
|
|
202
|
+
- Verify system recovers gracefully
|
|
203
|
+
|
|
204
|
+
### Quality
|
|
205
|
+
- Run linter: `npm run lint`
|
|
206
|
+
- Check for console errors
|
|
207
|
+
- Review code style
|
|
208
|
+
|
|
209
|
+
### Security (if applicable)
|
|
210
|
+
- Verify authentication required where expected
|
|
211
|
+
- Test input sanitization
|
|
212
|
+
- Check sensitive data handling
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## After Verification
|
|
217
|
+
|
|
218
|
+
### If All Items Pass
|
|
219
|
+
```
|
|
220
|
+
✓ Verification complete!
|
|
221
|
+
|
|
222
|
+
Next steps:
|
|
223
|
+
/clavix:archive - Archive completed project
|
|
224
|
+
clavix prompts clear --executed - Cleanup prompts
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### If Items Fail
|
|
228
|
+
```
|
|
229
|
+
⚠️ Some items require attention.
|
|
230
|
+
|
|
231
|
+
Fix issues and re-run:
|
|
232
|
+
clavix verify --retry-failed --id <prompt-id>
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## Verification Report Storage
|
|
238
|
+
|
|
239
|
+
Reports are saved alongside prompt files:
|
|
240
|
+
```
|
|
241
|
+
.clavix/
|
|
242
|
+
outputs/
|
|
243
|
+
prompts/
|
|
244
|
+
deep/
|
|
245
|
+
deep-20250117-143022-a3f2.md # Prompt
|
|
246
|
+
deep-20250117-143022-a3f2.verification.json # Report
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Agent Transparency (v4.8)
|
|
252
|
+
|
|
253
|
+
### Verification Confidence Levels
|
|
254
|
+
|
|
255
|
+
| Level | Meaning | Example |
|
|
256
|
+
|-------|---------|---------|
|
|
257
|
+
| HIGH | Automated verification passed | npm test exit code 0 |
|
|
258
|
+
| MEDIUM | Agent verified with evidence | Code review confirmed |
|
|
259
|
+
| LOW | Agent verified without clear evidence | General assessment |
|
|
260
|
+
|
|
261
|
+
### Verification Checkpoint Output
|
|
262
|
+
|
|
263
|
+
After completing verification:
|
|
264
|
+
```
|
|
265
|
+
VERIFICATION CHECKPOINT (v4.8):
|
|
266
|
+
- Prompt: [id]
|
|
267
|
+
- Total items: [X]
|
|
268
|
+
- Passed: [Y] ([Z]%)
|
|
269
|
+
- Failed: [N]
|
|
270
|
+
- Status: [completed/requires-attention]
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Error Handling
|
|
274
|
+
{{INCLUDE:agent-protocols/error-handling.md}}
|
|
275
|
+
|
|
276
|
+
### Decision Rules
|
|
277
|
+
{{INCLUDE:agent-protocols/decision-rules.md}}
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## Workflow Navigation
|
|
282
|
+
|
|
283
|
+
**You are here:** Verify (Post-Implementation Verification)
|
|
284
|
+
|
|
285
|
+
**Common workflows:**
|
|
286
|
+
- `/clavix:execute` → **`/clavix:verify`** → Fix issues → Re-verify → `/clavix:archive`
|
|
287
|
+
- `/clavix:implement` → **`/clavix:verify`** → `/clavix:archive`
|
|
288
|
+
|
|
289
|
+
**Related commands:**
|
|
290
|
+
- `/clavix:execute` - Execute saved prompt (previous step)
|
|
291
|
+
- `/clavix:deep` - Comprehensive analysis with validation checklist
|
|
292
|
+
- `/clavix:archive` - Archive completed project (next step)
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
## Verification Methods by Category
|
|
2
|
+
|
|
3
|
+
### Functionality
|
|
4
|
+
**Checklist items about:** Code works, features implemented, requirements met
|
|
5
|
+
|
|
6
|
+
**Verification approach:**
|
|
7
|
+
1. Run the implemented code/feature
|
|
8
|
+
2. Check expected behavior matches requirements
|
|
9
|
+
3. Verify all user flows complete successfully
|
|
10
|
+
|
|
11
|
+
**Commands to use:**
|
|
12
|
+
- Run application: `npm start`, `npm run dev`
|
|
13
|
+
- Execute specific feature manually
|
|
14
|
+
- Check output matches expected
|
|
15
|
+
|
|
16
|
+
**Evidence examples:**
|
|
17
|
+
- "Feature X works as specified"
|
|
18
|
+
- "Login flow completes successfully"
|
|
19
|
+
- "API returns expected response format"
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
### Testing
|
|
24
|
+
**Checklist items about:** Tests pass, coverage met, test quality
|
|
25
|
+
|
|
26
|
+
**Verification approach:**
|
|
27
|
+
1. Run test suite
|
|
28
|
+
2. Check coverage report
|
|
29
|
+
3. Verify no failing tests
|
|
30
|
+
|
|
31
|
+
**Commands to use:**
|
|
32
|
+
- `npm test` or project test command
|
|
33
|
+
- `npm run coverage` for coverage report
|
|
34
|
+
- Look for test output in terminal
|
|
35
|
+
|
|
36
|
+
**Evidence examples:**
|
|
37
|
+
- "npm test - 47 tests passing, 0 failed"
|
|
38
|
+
- "Coverage: 85% (exceeds 80% threshold)"
|
|
39
|
+
- "All integration tests pass"
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### Robustness/Edge Cases
|
|
44
|
+
**Checklist items about:** Error handling, edge cases, graceful degradation
|
|
45
|
+
|
|
46
|
+
**Verification approach:**
|
|
47
|
+
1. Test with edge case inputs (empty, null, max values)
|
|
48
|
+
2. Check error messages are user-friendly
|
|
49
|
+
3. Verify system recovers gracefully
|
|
50
|
+
|
|
51
|
+
**Manual testing:**
|
|
52
|
+
- Input empty values
|
|
53
|
+
- Input invalid data types
|
|
54
|
+
- Test boundary conditions (min/max values)
|
|
55
|
+
- Test with large datasets
|
|
56
|
+
|
|
57
|
+
**Evidence examples:**
|
|
58
|
+
- "Empty input shows validation error"
|
|
59
|
+
- "Invalid email format displays helpful message"
|
|
60
|
+
- "System handles 10,000 records without timeout"
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### Quality
|
|
65
|
+
**Checklist items about:** Code style, conventions, no warnings
|
|
66
|
+
|
|
67
|
+
**Verification approach:**
|
|
68
|
+
1. Run linter
|
|
69
|
+
2. Check for console errors
|
|
70
|
+
3. Review code style
|
|
71
|
+
|
|
72
|
+
**Commands to use:**
|
|
73
|
+
- `npm run lint` or equivalent
|
|
74
|
+
- Check browser console for errors
|
|
75
|
+
- Review PR diff for style
|
|
76
|
+
|
|
77
|
+
**Evidence examples:**
|
|
78
|
+
- "npm run lint - 0 errors, 0 warnings"
|
|
79
|
+
- "No console errors in browser"
|
|
80
|
+
- "Code follows project conventions"
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
### Accessibility
|
|
85
|
+
**Checklist items about:** Keyboard navigation, screen reader, WCAG
|
|
86
|
+
|
|
87
|
+
**Verification approach:**
|
|
88
|
+
1. Tab through interface
|
|
89
|
+
2. Check color contrast
|
|
90
|
+
3. Verify alt text on images
|
|
91
|
+
|
|
92
|
+
**Manual testing:**
|
|
93
|
+
- Navigate using only keyboard
|
|
94
|
+
- Check focus indicators visible
|
|
95
|
+
- Test with screen reader (optional)
|
|
96
|
+
|
|
97
|
+
**Evidence examples:**
|
|
98
|
+
- "All interactive elements keyboard accessible"
|
|
99
|
+
- "Focus order is logical"
|
|
100
|
+
- "Color contrast meets WCAG AA"
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
### Security
|
|
105
|
+
**Checklist items about:** Auth, input sanitization, data protection
|
|
106
|
+
|
|
107
|
+
**Verification approach:**
|
|
108
|
+
1. Verify authentication required where expected
|
|
109
|
+
2. Test input sanitization
|
|
110
|
+
3. Check sensitive data handling
|
|
111
|
+
|
|
112
|
+
**Manual testing:**
|
|
113
|
+
- Try accessing protected routes without auth
|
|
114
|
+
- Submit potentially malicious input
|
|
115
|
+
- Check network tab for sensitive data exposure
|
|
116
|
+
|
|
117
|
+
**Evidence examples:**
|
|
118
|
+
- "Protected routes redirect to login"
|
|
119
|
+
- "SQL injection attempts are sanitized"
|
|
120
|
+
- "Passwords not logged or exposed"
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
### Performance
|
|
125
|
+
**Checklist items about:** Response times, resource usage
|
|
126
|
+
|
|
127
|
+
**Verification approach:**
|
|
128
|
+
1. Check response times
|
|
129
|
+
2. Monitor memory/CPU usage
|
|
130
|
+
3. Test with realistic data volumes
|
|
131
|
+
|
|
132
|
+
**Tools:**
|
|
133
|
+
- Browser DevTools Performance tab
|
|
134
|
+
- Network tab for response times
|
|
135
|
+
- Lighthouse performance score
|
|
136
|
+
|
|
137
|
+
**Evidence examples:**
|
|
138
|
+
- "Page load time < 2s"
|
|
139
|
+
- "API response time < 200ms"
|
|
140
|
+
- "Memory usage stable under load"
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
### Documentation
|
|
145
|
+
**Checklist items about:** Docs updated, comments present
|
|
146
|
+
|
|
147
|
+
**Verification approach:**
|
|
148
|
+
1. Check README updates
|
|
149
|
+
2. Verify JSDoc/comments on complex functions
|
|
150
|
+
3. Review API documentation
|
|
151
|
+
|
|
152
|
+
**Commands to use:**
|
|
153
|
+
- `cat README.md` - check for updates
|
|
154
|
+
- Review changed files for comments
|
|
155
|
+
|
|
156
|
+
**Evidence examples:**
|
|
157
|
+
- "README updated with new feature"
|
|
158
|
+
- "API endpoints documented"
|
|
159
|
+
- "Complex logic has explanatory comments"
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Verification Type Detection
|
|
164
|
+
|
|
165
|
+
**Automated items contain keywords:**
|
|
166
|
+
- compiles, builds, tests pass, lint, typecheck, no errors
|
|
167
|
+
|
|
168
|
+
**Semi-automated items contain keywords:**
|
|
169
|
+
- renders, displays, console errors, responsive, visual
|
|
170
|
+
|
|
171
|
+
**Manual items contain keywords:**
|
|
172
|
+
- requirements, edge cases, handles, correctly, properly
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Confidence Levels
|
|
177
|
+
|
|
178
|
+
| Level | When to use | Example |
|
|
179
|
+
|-------|-------------|---------|
|
|
180
|
+
| HIGH | Automated tool verification | npm test exit code 0 |
|
|
181
|
+
| MEDIUM | Manual verification with clear evidence | Code review shows implementation |
|
|
182
|
+
| LOW | General assessment without specific evidence | "Looks correct" |
|
|
183
|
+
|
|
184
|
+
Always prefer higher confidence verification when possible.
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clavix v4.8: Verification System Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the checklist verification system that ensures
|
|
5
|
+
* checklists generated by deep/fast modes are verified after implementation.
|
|
6
|
+
*/
|
|
7
|
+
import { PromptIntent } from '../core/intelligence/types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Category of checklist item
|
|
10
|
+
*/
|
|
11
|
+
export type ChecklistCategory = 'validation' | 'edge-case' | 'risk';
|
|
12
|
+
/**
|
|
13
|
+
* How the checklist item can be verified
|
|
14
|
+
*/
|
|
15
|
+
export type VerificationType = 'automated' | 'semi-automated' | 'manual';
|
|
16
|
+
/**
|
|
17
|
+
* A single item from the checklist
|
|
18
|
+
*/
|
|
19
|
+
export interface ChecklistItem {
|
|
20
|
+
/** Unique identifier (e.g., "validation-1", "edge-case-2") */
|
|
21
|
+
id: string;
|
|
22
|
+
/** Category of the item */
|
|
23
|
+
category: ChecklistCategory;
|
|
24
|
+
/** Item description text */
|
|
25
|
+
content: string;
|
|
26
|
+
/** Optional grouping (e.g., "Functionality", "Robustness") */
|
|
27
|
+
group?: string;
|
|
28
|
+
/** How this item should be verified */
|
|
29
|
+
verificationType: VerificationType;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Parsed checklist from a prompt file
|
|
33
|
+
*/
|
|
34
|
+
export interface ParsedChecklist {
|
|
35
|
+
/** Validation checklist items (☐ items from deep mode) */
|
|
36
|
+
validationItems: ChecklistItem[];
|
|
37
|
+
/** Edge cases to consider */
|
|
38
|
+
edgeCases: ChecklistItem[];
|
|
39
|
+
/** Risk/what could go wrong items */
|
|
40
|
+
risks: ChecklistItem[];
|
|
41
|
+
/** Whether the prompt has any checklist */
|
|
42
|
+
hasChecklist: boolean;
|
|
43
|
+
/** Total number of items across all categories */
|
|
44
|
+
totalItems: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Type of verification hook
|
|
48
|
+
*/
|
|
49
|
+
export type HookType = 'test' | 'build' | 'lint' | 'typecheck' | 'custom';
|
|
50
|
+
/**
|
|
51
|
+
* A CLI hook for automated verification
|
|
52
|
+
*/
|
|
53
|
+
export interface VerificationHook {
|
|
54
|
+
/** Hook identifier */
|
|
55
|
+
name: HookType;
|
|
56
|
+
/** Display name */
|
|
57
|
+
displayName: string;
|
|
58
|
+
/** Command to execute */
|
|
59
|
+
command: string;
|
|
60
|
+
/** Regex pattern to match success */
|
|
61
|
+
successPattern?: RegExp;
|
|
62
|
+
/** Regex pattern to match failure */
|
|
63
|
+
failurePattern?: RegExp;
|
|
64
|
+
/** Timeout in milliseconds */
|
|
65
|
+
timeout: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Result of running a verification hook
|
|
69
|
+
*/
|
|
70
|
+
export interface HookResult {
|
|
71
|
+
/** Hook that was run */
|
|
72
|
+
hook: VerificationHook;
|
|
73
|
+
/** Whether the hook succeeded */
|
|
74
|
+
success: boolean;
|
|
75
|
+
/** Exit code of the command */
|
|
76
|
+
exitCode: number;
|
|
77
|
+
/** Command output (stdout + stderr) */
|
|
78
|
+
output: string;
|
|
79
|
+
/** Confidence in the result */
|
|
80
|
+
confidence: VerificationConfidence;
|
|
81
|
+
/** Execution time in milliseconds */
|
|
82
|
+
executionTimeMs: number;
|
|
83
|
+
/** Error message if hook failed to run */
|
|
84
|
+
error?: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Detected hooks for a project
|
|
88
|
+
*/
|
|
89
|
+
export interface DetectedHooks {
|
|
90
|
+
/** Available hooks */
|
|
91
|
+
hooks: VerificationHook[];
|
|
92
|
+
/** Package manager detected */
|
|
93
|
+
packageManager: 'npm' | 'yarn' | 'pnpm' | 'unknown';
|
|
94
|
+
/** Whether a package.json was found */
|
|
95
|
+
hasPackageJson: boolean;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Status of a verification item
|
|
99
|
+
*/
|
|
100
|
+
export type VerificationStatus = 'pending' | 'passed' | 'failed' | 'skipped' | 'not-applicable';
|
|
101
|
+
/**
|
|
102
|
+
* Confidence level in the verification result
|
|
103
|
+
*/
|
|
104
|
+
export type VerificationConfidence = 'high' | 'medium' | 'low';
|
|
105
|
+
/**
|
|
106
|
+
* Method used for verification
|
|
107
|
+
*/
|
|
108
|
+
export type VerificationMethod = 'automated' | 'semi-automated' | 'manual';
|
|
109
|
+
/**
|
|
110
|
+
* Result of verifying a single checklist item
|
|
111
|
+
*/
|
|
112
|
+
export interface VerificationResult {
|
|
113
|
+
/** ID of the checklist item */
|
|
114
|
+
itemId: string;
|
|
115
|
+
/** Verification status */
|
|
116
|
+
status: VerificationStatus;
|
|
117
|
+
/** Method used for verification */
|
|
118
|
+
method: VerificationMethod;
|
|
119
|
+
/** Confidence in the result */
|
|
120
|
+
confidence: VerificationConfidence;
|
|
121
|
+
/** Evidence of verification (command output or agent reasoning) */
|
|
122
|
+
evidence?: string;
|
|
123
|
+
/** Reason for failed/skipped status */
|
|
124
|
+
reason?: string;
|
|
125
|
+
/** Timestamp of verification */
|
|
126
|
+
verifiedAt: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Overall status of the verification report
|
|
130
|
+
*/
|
|
131
|
+
export type ReportStatus = 'pending' | 'in-progress' | 'completed' | 'requires-attention';
|
|
132
|
+
/**
|
|
133
|
+
* Summary statistics for verification
|
|
134
|
+
*/
|
|
135
|
+
export interface VerificationSummary {
|
|
136
|
+
/** Total number of items */
|
|
137
|
+
total: number;
|
|
138
|
+
/** Number of passed items */
|
|
139
|
+
passed: number;
|
|
140
|
+
/** Number of failed items */
|
|
141
|
+
failed: number;
|
|
142
|
+
/** Number of skipped items */
|
|
143
|
+
skipped: number;
|
|
144
|
+
/** Number of not-applicable items */
|
|
145
|
+
notApplicable: number;
|
|
146
|
+
/** Coverage percentage (passed / (total - skipped - notApplicable)) */
|
|
147
|
+
coveragePercent: number;
|
|
148
|
+
/** Number of automated checks */
|
|
149
|
+
automatedChecks: number;
|
|
150
|
+
/** Number of manual checks */
|
|
151
|
+
manualChecks: number;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Full verification report
|
|
155
|
+
*/
|
|
156
|
+
export interface VerificationReport {
|
|
157
|
+
/** Report version */
|
|
158
|
+
version: '1.0';
|
|
159
|
+
/** ID of the prompt being verified */
|
|
160
|
+
promptId: string;
|
|
161
|
+
/** Source of the prompt (fast or deep) */
|
|
162
|
+
source: 'fast' | 'deep';
|
|
163
|
+
/** When verification started */
|
|
164
|
+
startedAt: string;
|
|
165
|
+
/** When verification completed (all items done) */
|
|
166
|
+
completedAt?: string;
|
|
167
|
+
/** Overall status */
|
|
168
|
+
status: ReportStatus;
|
|
169
|
+
/** All checklist items */
|
|
170
|
+
items: ChecklistItem[];
|
|
171
|
+
/** Verification results for each item */
|
|
172
|
+
results: VerificationResult[];
|
|
173
|
+
/** Summary statistics */
|
|
174
|
+
summary: VerificationSummary;
|
|
175
|
+
/** Detected hooks used for automated verification */
|
|
176
|
+
detectedHooks?: DetectedHooks;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Intent-to-checklist mapping entry
|
|
180
|
+
*/
|
|
181
|
+
export interface IntentChecklist {
|
|
182
|
+
/** The intent type */
|
|
183
|
+
intent: PromptIntent;
|
|
184
|
+
/** Checklist items for this intent */
|
|
185
|
+
items: Array<{
|
|
186
|
+
content: string;
|
|
187
|
+
group?: string;
|
|
188
|
+
verificationType: VerificationType;
|
|
189
|
+
}>;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Additional fields for PromptMetadata to support verification
|
|
193
|
+
*/
|
|
194
|
+
export interface VerificationMetadata {
|
|
195
|
+
/** Whether verification is required for this prompt */
|
|
196
|
+
verificationRequired?: boolean;
|
|
197
|
+
/** Whether the prompt has been verified */
|
|
198
|
+
verified?: boolean;
|
|
199
|
+
/** Timestamp of last verification */
|
|
200
|
+
lastVerifiedAt?: string;
|
|
201
|
+
/** Path to verification report file */
|
|
202
|
+
verificationReportPath?: string;
|
|
203
|
+
}
|
|
204
|
+
//# sourceMappingURL=verification.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavix",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.0",
|
|
4
4
|
"description": "Clavix Intelligence™ for AI coding. Automatically optimizes prompts with intent detection, quality assessment, and adaptive patterns—no framework to learn. Works with Claude Code, Cursor, Windsurf, and 19+ other AI coding tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|