clavix 4.7.0 → 4.8.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/execute.js +29 -9
- package/dist/cli/commands/verify.d.ts +28 -0
- package/dist/cli/commands/verify.js +347 -0
- package/dist/core/adapters/amp-adapter.d.ts +3 -0
- package/dist/core/adapters/amp-adapter.js +1 -0
- package/dist/core/adapters/cline-adapter.d.ts +3 -0
- package/dist/core/adapters/cline-adapter.js +1 -0
- package/dist/core/adapters/codebuddy-adapter.d.ts +3 -0
- package/dist/core/adapters/codebuddy-adapter.js +1 -0
- package/dist/core/adapters/codex-adapter.d.ts +3 -0
- package/dist/core/adapters/codex-adapter.js +1 -0
- package/dist/core/adapters/cursor-adapter.d.ts +3 -0
- package/dist/core/adapters/cursor-adapter.js +1 -0
- package/dist/core/adapters/droid-adapter.d.ts +3 -0
- package/dist/core/adapters/droid-adapter.js +1 -0
- package/dist/core/adapters/instructions-generator.js +9 -2
- package/dist/core/adapters/kilocode-adapter.d.ts +3 -0
- package/dist/core/adapters/kilocode-adapter.js +1 -0
- package/dist/core/adapters/opencode-adapter.d.ts +3 -0
- package/dist/core/adapters/opencode-adapter.js +1 -0
- package/dist/core/adapters/roocode-adapter.d.ts +3 -0
- package/dist/core/adapters/roocode-adapter.js +1 -0
- package/dist/core/adapters/windsurf-adapter.d.ts +3 -0
- package/dist/core/adapters/windsurf-adapter.js +1 -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/command-transformer.d.ts +55 -0
- package/dist/core/command-transformer.js +65 -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/agent.d.ts +4 -0
- package/dist/types/verification.d.ts +204 -0
- package/dist/types/verification.js +8 -0
- package/dist/utils/template-loader.d.ts +1 -1
- package/dist/utils/template-loader.js +5 -1
- package/package.json +1 -1
|
@@ -20,6 +20,9 @@ export declare class RoocodeAdapter extends BaseAdapter {
|
|
|
20
20
|
readonly features: {
|
|
21
21
|
supportsSubdirectories: boolean;
|
|
22
22
|
supportsFrontmatter: boolean;
|
|
23
|
+
commandFormat: {
|
|
24
|
+
separator: "-";
|
|
25
|
+
};
|
|
23
26
|
};
|
|
24
27
|
/**
|
|
25
28
|
* Detect if Roocode is available in the project
|
|
@@ -19,6 +19,9 @@ export declare class WindsurfAdapter extends BaseAdapter {
|
|
|
19
19
|
readonly features: {
|
|
20
20
|
supportsSubdirectories: boolean;
|
|
21
21
|
supportsFrontmatter: boolean;
|
|
22
|
+
commandFormat: {
|
|
23
|
+
separator: "-";
|
|
24
|
+
};
|
|
22
25
|
};
|
|
23
26
|
/**
|
|
24
27
|
* Detect if Windsurf is available in the project
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clavix v4.8: Basic Checklist Generator
|
|
3
|
+
*
|
|
4
|
+
* Generates basic verification checklists for fast mode prompts
|
|
5
|
+
* that don't have comprehensive checklists from deep mode.
|
|
6
|
+
*/
|
|
7
|
+
import { PromptIntent } from './intelligence/types.js';
|
|
8
|
+
import { ParsedChecklist } from '../types/verification.js';
|
|
9
|
+
/**
|
|
10
|
+
* Basic Checklist Generator
|
|
11
|
+
*/
|
|
12
|
+
export declare class BasicChecklistGenerator {
|
|
13
|
+
/**
|
|
14
|
+
* Generate a basic checklist based on intent
|
|
15
|
+
*/
|
|
16
|
+
generate(intent: PromptIntent): ParsedChecklist;
|
|
17
|
+
/**
|
|
18
|
+
* Generate checklist for a specific prompt content
|
|
19
|
+
* Detects additional items based on prompt keywords
|
|
20
|
+
*/
|
|
21
|
+
generateFromPrompt(content: string, intent: PromptIntent): ParsedChecklist;
|
|
22
|
+
/**
|
|
23
|
+
* Check if content contains any of the keywords
|
|
24
|
+
*/
|
|
25
|
+
private hasKeywords;
|
|
26
|
+
/**
|
|
27
|
+
* Get available intents
|
|
28
|
+
*/
|
|
29
|
+
getAvailableIntents(): PromptIntent[];
|
|
30
|
+
/**
|
|
31
|
+
* Check if intent has a specific checklist
|
|
32
|
+
*/
|
|
33
|
+
hasChecklistForIntent(intent: PromptIntent): boolean;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=basic-checklist-generator.d.ts.map
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clavix v4.8: Basic Checklist Generator
|
|
3
|
+
*
|
|
4
|
+
* Generates basic verification checklists for fast mode prompts
|
|
5
|
+
* that don't have comprehensive checklists from deep mode.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Intent-specific checklist templates
|
|
9
|
+
*/
|
|
10
|
+
const INTENT_CHECKLISTS = {
|
|
11
|
+
'code-generation': [
|
|
12
|
+
{
|
|
13
|
+
content: 'Code compiles/runs without errors',
|
|
14
|
+
group: 'Functionality',
|
|
15
|
+
verificationType: 'automated',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
content: 'All requirements from prompt are implemented',
|
|
19
|
+
group: 'Functionality',
|
|
20
|
+
verificationType: 'manual',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
content: 'No console errors or warnings',
|
|
24
|
+
group: 'Quality',
|
|
25
|
+
verificationType: 'semi-automated',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
content: 'Code follows project conventions',
|
|
29
|
+
group: 'Quality',
|
|
30
|
+
verificationType: 'automated',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
testing: [
|
|
34
|
+
{
|
|
35
|
+
content: 'All tests pass',
|
|
36
|
+
group: 'Functionality',
|
|
37
|
+
verificationType: 'automated',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
content: 'Test coverage is acceptable',
|
|
41
|
+
group: 'Coverage',
|
|
42
|
+
verificationType: 'automated',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
content: 'Edge cases are tested',
|
|
46
|
+
group: 'Coverage',
|
|
47
|
+
verificationType: 'manual',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
content: 'Tests are independent (no shared state)',
|
|
51
|
+
group: 'Quality',
|
|
52
|
+
verificationType: 'manual',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
debugging: [
|
|
56
|
+
{
|
|
57
|
+
content: 'Bug is fixed',
|
|
58
|
+
group: 'Functionality',
|
|
59
|
+
verificationType: 'manual',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
content: 'No regression introduced',
|
|
63
|
+
group: 'Regression',
|
|
64
|
+
verificationType: 'automated',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
content: 'Root cause is addressed',
|
|
68
|
+
group: 'Analysis',
|
|
69
|
+
verificationType: 'manual',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
content: 'Related areas tested for side effects',
|
|
73
|
+
group: 'Regression',
|
|
74
|
+
verificationType: 'manual',
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
'security-review': [
|
|
78
|
+
{
|
|
79
|
+
content: 'Authentication is verified',
|
|
80
|
+
group: 'Auth',
|
|
81
|
+
verificationType: 'manual',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
content: 'Input is properly sanitized',
|
|
85
|
+
group: 'Input',
|
|
86
|
+
verificationType: 'manual',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
content: 'Sensitive data is protected',
|
|
90
|
+
group: 'Data',
|
|
91
|
+
verificationType: 'manual',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
content: 'No known vulnerabilities',
|
|
95
|
+
group: 'Security',
|
|
96
|
+
verificationType: 'manual',
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
refinement: [
|
|
100
|
+
{
|
|
101
|
+
content: 'Improvement is implemented',
|
|
102
|
+
group: 'Functionality',
|
|
103
|
+
verificationType: 'manual',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
content: 'No functionality regression',
|
|
107
|
+
group: 'Regression',
|
|
108
|
+
verificationType: 'automated',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
content: 'Performance is not degraded',
|
|
112
|
+
group: 'Performance',
|
|
113
|
+
verificationType: 'manual',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
content: 'Code quality is maintained',
|
|
117
|
+
group: 'Quality',
|
|
118
|
+
verificationType: 'automated',
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
planning: [
|
|
122
|
+
{
|
|
123
|
+
content: 'Plan is clear and actionable',
|
|
124
|
+
group: 'Clarity',
|
|
125
|
+
verificationType: 'manual',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
content: 'All requirements are addressed',
|
|
129
|
+
group: 'Completeness',
|
|
130
|
+
verificationType: 'manual',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
content: 'Risks are identified',
|
|
134
|
+
group: 'Risk',
|
|
135
|
+
verificationType: 'manual',
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
documentation: [
|
|
139
|
+
{
|
|
140
|
+
content: 'Documentation is accurate',
|
|
141
|
+
group: 'Accuracy',
|
|
142
|
+
verificationType: 'manual',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
content: 'Examples are correct and work',
|
|
146
|
+
group: 'Accuracy',
|
|
147
|
+
verificationType: 'manual',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
content: 'Documentation is complete',
|
|
151
|
+
group: 'Completeness',
|
|
152
|
+
verificationType: 'manual',
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
migration: [
|
|
156
|
+
{
|
|
157
|
+
content: 'Migration completes successfully',
|
|
158
|
+
group: 'Functionality',
|
|
159
|
+
verificationType: 'manual',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
content: 'Data integrity is preserved',
|
|
163
|
+
group: 'Data',
|
|
164
|
+
verificationType: 'manual',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
content: 'All features work post-migration',
|
|
168
|
+
group: 'Functionality',
|
|
169
|
+
verificationType: 'manual',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
content: 'Rollback plan is tested',
|
|
173
|
+
group: 'Safety',
|
|
174
|
+
verificationType: 'manual',
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
learning: [
|
|
178
|
+
{
|
|
179
|
+
content: 'Concept is understood',
|
|
180
|
+
group: 'Understanding',
|
|
181
|
+
verificationType: 'manual',
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
content: 'Examples are working',
|
|
185
|
+
group: 'Practice',
|
|
186
|
+
verificationType: 'manual',
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
'prd-generation': [
|
|
190
|
+
{
|
|
191
|
+
content: 'PRD covers all requirements',
|
|
192
|
+
group: 'Completeness',
|
|
193
|
+
verificationType: 'manual',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
content: 'Success criteria are defined',
|
|
197
|
+
group: 'Clarity',
|
|
198
|
+
verificationType: 'manual',
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
summarization: [
|
|
202
|
+
{
|
|
203
|
+
content: 'Summary captures key points',
|
|
204
|
+
group: 'Accuracy',
|
|
205
|
+
verificationType: 'manual',
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
content: 'No important details omitted',
|
|
209
|
+
group: 'Completeness',
|
|
210
|
+
verificationType: 'manual',
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Default checklist for unknown intents
|
|
216
|
+
*/
|
|
217
|
+
const DEFAULT_CHECKLIST = [
|
|
218
|
+
{
|
|
219
|
+
content: 'Task is completed successfully',
|
|
220
|
+
group: 'Functionality',
|
|
221
|
+
verificationType: 'manual',
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
content: 'No errors or warnings',
|
|
225
|
+
group: 'Quality',
|
|
226
|
+
verificationType: 'semi-automated',
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
content: 'Output meets requirements',
|
|
230
|
+
group: 'Functionality',
|
|
231
|
+
verificationType: 'manual',
|
|
232
|
+
},
|
|
233
|
+
];
|
|
234
|
+
/**
|
|
235
|
+
* Basic Checklist Generator
|
|
236
|
+
*/
|
|
237
|
+
export class BasicChecklistGenerator {
|
|
238
|
+
/**
|
|
239
|
+
* Generate a basic checklist based on intent
|
|
240
|
+
*/
|
|
241
|
+
generate(intent) {
|
|
242
|
+
const template = INTENT_CHECKLISTS[intent] || DEFAULT_CHECKLIST;
|
|
243
|
+
const validationItems = template.map((item, index) => ({
|
|
244
|
+
id: `generated-${index + 1}`,
|
|
245
|
+
category: 'validation',
|
|
246
|
+
content: item.content,
|
|
247
|
+
group: item.group,
|
|
248
|
+
verificationType: item.verificationType,
|
|
249
|
+
}));
|
|
250
|
+
return {
|
|
251
|
+
validationItems,
|
|
252
|
+
edgeCases: [],
|
|
253
|
+
risks: [],
|
|
254
|
+
hasChecklist: validationItems.length > 0,
|
|
255
|
+
totalItems: validationItems.length,
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Generate checklist for a specific prompt content
|
|
260
|
+
* Detects additional items based on prompt keywords
|
|
261
|
+
*/
|
|
262
|
+
generateFromPrompt(content, intent) {
|
|
263
|
+
const baseChecklist = this.generate(intent);
|
|
264
|
+
const additionalItems = [];
|
|
265
|
+
const lowerContent = content.toLowerCase();
|
|
266
|
+
let itemIndex = baseChecklist.validationItems.length;
|
|
267
|
+
// API-related checks
|
|
268
|
+
if (this.hasKeywords(lowerContent, ['api', 'endpoint', 'route', 'rest', 'graphql'])) {
|
|
269
|
+
additionalItems.push({
|
|
270
|
+
id: `generated-${++itemIndex}`,
|
|
271
|
+
category: 'validation',
|
|
272
|
+
content: 'API endpoints return correct responses',
|
|
273
|
+
group: 'API',
|
|
274
|
+
verificationType: 'manual',
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
// UI-related checks
|
|
278
|
+
if (this.hasKeywords(lowerContent, ['ui', 'component', 'form', 'page', 'button'])) {
|
|
279
|
+
additionalItems.push({
|
|
280
|
+
id: `generated-${++itemIndex}`,
|
|
281
|
+
category: 'validation',
|
|
282
|
+
content: 'UI renders correctly',
|
|
283
|
+
group: 'UI',
|
|
284
|
+
verificationType: 'semi-automated',
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
// Database-related checks
|
|
288
|
+
if (this.hasKeywords(lowerContent, ['database', 'db', 'query', 'schema', 'migration'])) {
|
|
289
|
+
additionalItems.push({
|
|
290
|
+
id: `generated-${++itemIndex}`,
|
|
291
|
+
category: 'validation',
|
|
292
|
+
content: 'Database operations work correctly',
|
|
293
|
+
group: 'Data',
|
|
294
|
+
verificationType: 'manual',
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
// Auth-related checks
|
|
298
|
+
if (this.hasKeywords(lowerContent, ['auth', 'login', 'session', 'token', 'permission'])) {
|
|
299
|
+
additionalItems.push({
|
|
300
|
+
id: `generated-${++itemIndex}`,
|
|
301
|
+
category: 'validation',
|
|
302
|
+
content: 'Authentication/authorization works correctly',
|
|
303
|
+
group: 'Security',
|
|
304
|
+
verificationType: 'manual',
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
// Performance-related checks
|
|
308
|
+
if (this.hasKeywords(lowerContent, ['performance', 'optimize', 'speed', 'fast', 'slow'])) {
|
|
309
|
+
additionalItems.push({
|
|
310
|
+
id: `generated-${++itemIndex}`,
|
|
311
|
+
category: 'validation',
|
|
312
|
+
content: 'Performance is acceptable',
|
|
313
|
+
group: 'Performance',
|
|
314
|
+
verificationType: 'manual',
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
return {
|
|
318
|
+
validationItems: [...baseChecklist.validationItems, ...additionalItems],
|
|
319
|
+
edgeCases: baseChecklist.edgeCases,
|
|
320
|
+
risks: baseChecklist.risks,
|
|
321
|
+
hasChecklist: true,
|
|
322
|
+
totalItems: baseChecklist.validationItems.length + additionalItems.length,
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Check if content contains any of the keywords
|
|
327
|
+
*/
|
|
328
|
+
hasKeywords(content, keywords) {
|
|
329
|
+
return keywords.some((kw) => content.includes(kw));
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Get available intents
|
|
333
|
+
*/
|
|
334
|
+
getAvailableIntents() {
|
|
335
|
+
return Object.keys(INTENT_CHECKLISTS);
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Check if intent has a specific checklist
|
|
339
|
+
*/
|
|
340
|
+
hasChecklistForIntent(intent) {
|
|
341
|
+
return intent in INTENT_CHECKLISTS;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
//# sourceMappingURL=basic-checklist-generator.js.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clavix v4.8: Checklist Parser
|
|
3
|
+
*
|
|
4
|
+
* Parses validation checklists, edge cases, and risk sections from
|
|
5
|
+
* deep mode prompt output files.
|
|
6
|
+
*/
|
|
7
|
+
import { ChecklistItem, ParsedChecklist, VerificationType } from '../types/verification.js';
|
|
8
|
+
/**
|
|
9
|
+
* Parse checklist items from prompt content
|
|
10
|
+
*/
|
|
11
|
+
export declare class ChecklistParser {
|
|
12
|
+
/**
|
|
13
|
+
* Parse all checklist sections from prompt content
|
|
14
|
+
*/
|
|
15
|
+
parse(content: string): ParsedChecklist;
|
|
16
|
+
/**
|
|
17
|
+
* Parse the Validation Checklist section
|
|
18
|
+
*/
|
|
19
|
+
parseValidationSection(content: string): ChecklistItem[];
|
|
20
|
+
/**
|
|
21
|
+
* Parse the Edge Cases to Consider section
|
|
22
|
+
*/
|
|
23
|
+
parseEdgeCaseSection(content: string): ChecklistItem[];
|
|
24
|
+
/**
|
|
25
|
+
* Parse the What Could Go Wrong section
|
|
26
|
+
*/
|
|
27
|
+
parseRiskSection(content: string): ChecklistItem[];
|
|
28
|
+
/**
|
|
29
|
+
* Detect verification type based on item content
|
|
30
|
+
*/
|
|
31
|
+
detectVerificationType(content: string): VerificationType;
|
|
32
|
+
/**
|
|
33
|
+
* Get a summary of the parsed checklist
|
|
34
|
+
*/
|
|
35
|
+
getSummary(checklist: ParsedChecklist): {
|
|
36
|
+
validation: number;
|
|
37
|
+
edgeCases: number;
|
|
38
|
+
risks: number;
|
|
39
|
+
automated: number;
|
|
40
|
+
semiAutomated: number;
|
|
41
|
+
manual: number;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Check if content has any checklist sections
|
|
45
|
+
*/
|
|
46
|
+
hasChecklist(content: string): boolean;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=checklist-parser.d.ts.map
|