clavix 4.12.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/README.md +69 -61
- package/dist/cli/commands/init.js +54 -153
- package/dist/cli/commands/update.js +19 -21
- 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/archive.md +83 -121
- package/dist/templates/slash-commands/_canonical/execute.md +32 -42
- package/dist/templates/slash-commands/_canonical/implement.md +32 -44
- package/dist/templates/slash-commands/_canonical/improve.md +13 -52
- 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/cli-reference.md +84 -180
- package/dist/templates/slash-commands/_components/agent-protocols/decision-rules.md +5 -6
- package/dist/templates/slash-commands/_components/agent-protocols/error-handling.md +2 -2
- package/dist/templates/slash-commands/_components/agent-protocols/file-formats.md +41 -59
- package/dist/templates/slash-commands/_components/agent-protocols/state-awareness.md +5 -7
- package/dist/templates/slash-commands/_components/sections/file-saving-protocol.md +20 -27
- package/dist/templates/slash-commands/_components/troubleshooting/file-not-saved.md +4 -5
- package/dist/templates/slash-commands/_components/troubleshooting/vibecoder-recovery.md +2 -2
- package/dist/utils/agent-error-messages.js +13 -12
- package/package.json +2 -2
- package/dist/cli/commands/analyze.d.ts +0 -17
- package/dist/cli/commands/analyze.js +0 -133
- package/dist/cli/commands/archive.d.ts +0 -36
- package/dist/cli/commands/archive.js +0 -266
- package/dist/cli/commands/deep.d.ts +0 -17
- package/dist/cli/commands/deep.js +0 -170
- package/dist/cli/commands/execute.d.ts +0 -15
- package/dist/cli/commands/execute.js +0 -168
- package/dist/cli/commands/fast.d.ts +0 -18
- package/dist/cli/commands/fast.js +0 -219
- package/dist/cli/commands/implement.d.ts +0 -24
- package/dist/cli/commands/implement.js +0 -289
- package/dist/cli/commands/improve.d.ts +0 -32
- package/dist/cli/commands/improve.js +0 -250
- package/dist/cli/commands/list.d.ts +0 -17
- package/dist/cli/commands/list.js +0 -217
- package/dist/cli/commands/plan.d.ts +0 -21
- package/dist/cli/commands/plan.js +0 -297
- package/dist/cli/commands/prd.d.ts +0 -24
- package/dist/cli/commands/prd.js +0 -321
- package/dist/cli/commands/prompts/clear.d.ts +0 -16
- package/dist/cli/commands/prompts/clear.js +0 -222
- package/dist/cli/commands/prompts/list.d.ts +0 -8
- package/dist/cli/commands/prompts/list.js +0 -88
- package/dist/cli/commands/show.d.ts +0 -21
- package/dist/cli/commands/show.js +0 -191
- package/dist/cli/commands/start.d.ts +0 -40
- package/dist/cli/commands/start.js +0 -210
- package/dist/cli/commands/summarize.d.ts +0 -17
- package/dist/cli/commands/summarize.js +0 -196
- package/dist/cli/commands/task-complete.d.ts +0 -27
- package/dist/cli/commands/task-complete.js +0 -269
- package/dist/cli/commands/verify.d.ts +0 -28
- package/dist/cli/commands/verify.js +0 -349
- package/dist/core/archive-manager.d.ts +0 -100
- package/dist/core/archive-manager.js +0 -302
- package/dist/core/basic-checklist-generator.d.ts +0 -35
- package/dist/core/basic-checklist-generator.js +0 -344
- package/dist/core/checklist-parser.d.ts +0 -48
- package/dist/core/checklist-parser.js +0 -238
- package/dist/core/config-manager.d.ts +0 -149
- package/dist/core/config-manager.js +0 -230
- package/dist/core/conversation-analyzer.d.ts +0 -86
- package/dist/core/conversation-analyzer.js +0 -387
- package/dist/core/conversation-quality-tracker.d.ts +0 -81
- package/dist/core/conversation-quality-tracker.js +0 -195
- package/dist/core/git-manager.d.ts +0 -126
- package/dist/core/git-manager.js +0 -282
- package/dist/core/intelligence/confidence-calculator.d.ts +0 -93
- package/dist/core/intelligence/confidence-calculator.js +0 -124
- package/dist/core/intelligence/index.d.ts +0 -11
- package/dist/core/intelligence/index.js +0 -15
- package/dist/core/intelligence/intent-detector.d.ts +0 -54
- package/dist/core/intelligence/intent-detector.js +0 -723
- package/dist/core/intelligence/pattern-library.d.ts +0 -104
- package/dist/core/intelligence/pattern-library.js +0 -330
- package/dist/core/intelligence/patterns/actionability-enhancer.d.ts +0 -27
- package/dist/core/intelligence/patterns/actionability-enhancer.js +0 -192
- package/dist/core/intelligence/patterns/alternative-phrasing-generator.d.ts +0 -29
- package/dist/core/intelligence/patterns/alternative-phrasing-generator.js +0 -239
- package/dist/core/intelligence/patterns/ambiguity-detector.d.ts +0 -22
- package/dist/core/intelligence/patterns/ambiguity-detector.js +0 -196
- package/dist/core/intelligence/patterns/assumption-explicitizer.d.ts +0 -30
- package/dist/core/intelligence/patterns/assumption-explicitizer.js +0 -296
- package/dist/core/intelligence/patterns/base-pattern.d.ts +0 -192
- package/dist/core/intelligence/patterns/base-pattern.js +0 -103
- package/dist/core/intelligence/patterns/completeness-validator.d.ts +0 -27
- package/dist/core/intelligence/patterns/completeness-validator.js +0 -221
- package/dist/core/intelligence/patterns/conciseness-filter.d.ts +0 -20
- package/dist/core/intelligence/patterns/conciseness-filter.js +0 -92
- package/dist/core/intelligence/patterns/context-precision.d.ts +0 -32
- package/dist/core/intelligence/patterns/context-precision.js +0 -389
- package/dist/core/intelligence/patterns/conversation-summarizer.d.ts +0 -30
- package/dist/core/intelligence/patterns/conversation-summarizer.js +0 -277
- package/dist/core/intelligence/patterns/dependency-identifier.d.ts +0 -23
- package/dist/core/intelligence/patterns/dependency-identifier.js +0 -166
- package/dist/core/intelligence/patterns/domain-context-enricher.d.ts +0 -21
- package/dist/core/intelligence/patterns/domain-context-enricher.js +0 -198
- package/dist/core/intelligence/patterns/edge-case-identifier.d.ts +0 -30
- package/dist/core/intelligence/patterns/edge-case-identifier.js +0 -269
- package/dist/core/intelligence/patterns/error-tolerance-enhancer.d.ts +0 -22
- package/dist/core/intelligence/patterns/error-tolerance-enhancer.js +0 -179
- package/dist/core/intelligence/patterns/implicit-requirement-extractor.d.ts +0 -24
- package/dist/core/intelligence/patterns/implicit-requirement-extractor.js +0 -259
- package/dist/core/intelligence/patterns/objective-clarifier.d.ts +0 -22
- package/dist/core/intelligence/patterns/objective-clarifier.js +0 -126
- package/dist/core/intelligence/patterns/output-format-enforcer.d.ts +0 -22
- package/dist/core/intelligence/patterns/output-format-enforcer.js +0 -151
- package/dist/core/intelligence/patterns/prd-structure-enforcer.d.ts +0 -23
- package/dist/core/intelligence/patterns/prd-structure-enforcer.js +0 -183
- package/dist/core/intelligence/patterns/prerequisite-identifier.d.ts +0 -23
- package/dist/core/intelligence/patterns/prerequisite-identifier.js +0 -221
- package/dist/core/intelligence/patterns/requirement-prioritizer.d.ts +0 -24
- package/dist/core/intelligence/patterns/requirement-prioritizer.js +0 -134
- package/dist/core/intelligence/patterns/scope-definer.d.ts +0 -26
- package/dist/core/intelligence/patterns/scope-definer.js +0 -236
- package/dist/core/intelligence/patterns/step-decomposer.d.ts +0 -31
- package/dist/core/intelligence/patterns/step-decomposer.js +0 -242
- package/dist/core/intelligence/patterns/structure-organizer.d.ts +0 -31
- package/dist/core/intelligence/patterns/structure-organizer.js +0 -218
- package/dist/core/intelligence/patterns/success-criteria-enforcer.d.ts +0 -22
- package/dist/core/intelligence/patterns/success-criteria-enforcer.js +0 -165
- package/dist/core/intelligence/patterns/success-metrics-enforcer.d.ts +0 -24
- package/dist/core/intelligence/patterns/success-metrics-enforcer.js +0 -165
- package/dist/core/intelligence/patterns/technical-context-enricher.d.ts +0 -25
- package/dist/core/intelligence/patterns/technical-context-enricher.js +0 -165
- package/dist/core/intelligence/patterns/topic-coherence-analyzer.d.ts +0 -26
- package/dist/core/intelligence/patterns/topic-coherence-analyzer.js +0 -300
- package/dist/core/intelligence/patterns/user-persona-enricher.d.ts +0 -24
- package/dist/core/intelligence/patterns/user-persona-enricher.js +0 -141
- package/dist/core/intelligence/patterns/validation-checklist-creator.d.ts +0 -31
- package/dist/core/intelligence/patterns/validation-checklist-creator.js +0 -242
- package/dist/core/intelligence/quality-assessor.d.ts +0 -71
- package/dist/core/intelligence/quality-assessor.js +0 -525
- package/dist/core/intelligence/types.d.ts +0 -111
- package/dist/core/intelligence/types.js +0 -3
- package/dist/core/intelligence/universal-optimizer.d.ts +0 -91
- package/dist/core/intelligence/universal-optimizer.js +0 -399
- package/dist/core/prd-generator.d.ts +0 -76
- package/dist/core/prd-generator.js +0 -173
- package/dist/core/prompt-manager.d.ts +0 -110
- package/dist/core/prompt-manager.js +0 -274
- package/dist/core/prompt-optimizer.d.ts +0 -268
- package/dist/core/prompt-optimizer.js +0 -959
- package/dist/core/question-engine.d.ts +0 -167
- package/dist/core/question-engine.js +0 -356
- package/dist/core/session-manager.d.ts +0 -139
- package/dist/core/session-manager.js +0 -365
- package/dist/core/task-manager.d.ts +0 -211
- package/dist/core/task-manager.js +0 -981
- package/dist/core/verification-hooks.d.ts +0 -67
- package/dist/core/verification-hooks.js +0 -309
- package/dist/core/verification-manager.d.ts +0 -107
- package/dist/core/verification-manager.js +0 -415
- package/dist/types/session.d.ts +0 -78
- package/dist/types/session.js +0 -8
- package/dist/types/verification.d.ts +0 -205
- package/dist/types/verification.js +0 -9
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import { BasePattern, } from './base-pattern.js';
|
|
2
|
-
/**
|
|
3
|
-
* v4.5 Pattern: Validation Checklist Creator
|
|
4
|
-
*
|
|
5
|
-
* Creates implementation validation checklists to ensure
|
|
6
|
-
* comprehensive verification of completed work.
|
|
7
|
-
*/
|
|
8
|
-
export class ValidationChecklistCreator extends BasePattern {
|
|
9
|
-
// -------------------------------------------------------------------------
|
|
10
|
-
// Pattern Metadata (v4.5 unified types)
|
|
11
|
-
// -------------------------------------------------------------------------
|
|
12
|
-
id = 'validation-checklist-creator';
|
|
13
|
-
name = 'Validation Checklist Creator';
|
|
14
|
-
description = 'Create implementation validation checklist for verification';
|
|
15
|
-
applicableIntents = [
|
|
16
|
-
'code-generation',
|
|
17
|
-
'testing',
|
|
18
|
-
'migration',
|
|
19
|
-
'security-review',
|
|
20
|
-
'debugging',
|
|
21
|
-
];
|
|
22
|
-
scope = 'comprehensive';
|
|
23
|
-
priority = 3; // VERY LOW - final touches
|
|
24
|
-
phases = ['all'];
|
|
25
|
-
// v4.5: Dependencies
|
|
26
|
-
dependencies = {
|
|
27
|
-
runAfter: ['success-criteria-enforcer'], // Checklist should include success criteria
|
|
28
|
-
enhancedBy: ['edge-case-identifier'],
|
|
29
|
-
};
|
|
30
|
-
// -------------------------------------------------------------------------
|
|
31
|
-
// Configuration Schema (v4.5)
|
|
32
|
-
// -------------------------------------------------------------------------
|
|
33
|
-
static configSchema = {
|
|
34
|
-
maxChecklistItems: {
|
|
35
|
-
type: 'number',
|
|
36
|
-
default: 12,
|
|
37
|
-
description: 'Maximum number of checklist items',
|
|
38
|
-
validation: { min: 5, max: 20 },
|
|
39
|
-
},
|
|
40
|
-
groupByCategory: {
|
|
41
|
-
type: 'boolean',
|
|
42
|
-
default: true,
|
|
43
|
-
description: 'Group checklist items by category',
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
// -------------------------------------------------------------------------
|
|
47
|
-
// Pattern Application
|
|
48
|
-
// -------------------------------------------------------------------------
|
|
49
|
-
apply(prompt, context) {
|
|
50
|
-
const checklist = this.createChecklist(prompt, context.intent.primaryIntent);
|
|
51
|
-
if (checklist.length === 0) {
|
|
52
|
-
return {
|
|
53
|
-
enhancedPrompt: prompt,
|
|
54
|
-
improvement: {
|
|
55
|
-
dimension: 'actionability',
|
|
56
|
-
description: 'No validation checklist needed',
|
|
57
|
-
impact: 'low',
|
|
58
|
-
},
|
|
59
|
-
applied: false,
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
// Append checklist section to the prompt
|
|
63
|
-
const checklistSection = this.formatChecklistSection(checklist);
|
|
64
|
-
const enhancedPrompt = `${prompt}\n\n${checklistSection}`;
|
|
65
|
-
return {
|
|
66
|
-
enhancedPrompt,
|
|
67
|
-
improvement: {
|
|
68
|
-
dimension: 'actionability',
|
|
69
|
-
description: `Created validation checklist with ${checklist.length} items`,
|
|
70
|
-
impact: 'high',
|
|
71
|
-
},
|
|
72
|
-
applied: true,
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
createChecklist(prompt, intent) {
|
|
76
|
-
const items = [];
|
|
77
|
-
const lowerPrompt = prompt.toLowerCase();
|
|
78
|
-
// Intent-specific checklist items
|
|
79
|
-
switch (intent) {
|
|
80
|
-
case 'code-generation':
|
|
81
|
-
items.push(...this.getCodeGenerationChecklist(lowerPrompt));
|
|
82
|
-
break;
|
|
83
|
-
case 'testing':
|
|
84
|
-
items.push(...this.getTestingChecklist(lowerPrompt));
|
|
85
|
-
break;
|
|
86
|
-
case 'migration':
|
|
87
|
-
items.push(...this.getMigrationChecklist(lowerPrompt));
|
|
88
|
-
break;
|
|
89
|
-
case 'security-review':
|
|
90
|
-
items.push(...this.getSecurityChecklist(lowerPrompt));
|
|
91
|
-
break;
|
|
92
|
-
case 'debugging':
|
|
93
|
-
items.push(...this.getDebuggingChecklist(lowerPrompt));
|
|
94
|
-
break;
|
|
95
|
-
}
|
|
96
|
-
// Domain-specific items
|
|
97
|
-
items.push(...this.getDomainChecklist(lowerPrompt));
|
|
98
|
-
// General quality items
|
|
99
|
-
items.push(...this.getGeneralChecklist());
|
|
100
|
-
return items.slice(0, 12); // Max 12 items
|
|
101
|
-
}
|
|
102
|
-
getCodeGenerationChecklist(prompt) {
|
|
103
|
-
const items = [
|
|
104
|
-
{ description: 'Code compiles/runs without errors', category: 'functionality' },
|
|
105
|
-
{ description: 'All requirements from prompt are implemented', category: 'functionality' },
|
|
106
|
-
{ description: 'Edge cases are handled gracefully', category: 'robustness' },
|
|
107
|
-
];
|
|
108
|
-
if (this.hasSection(prompt, ['api', 'endpoint', 'route'])) {
|
|
109
|
-
items.push({ description: 'API returns correct status codes', category: 'functionality' });
|
|
110
|
-
items.push({
|
|
111
|
-
description: 'API handles invalid requests gracefully',
|
|
112
|
-
category: 'robustness',
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
if (this.hasSection(prompt, ['ui', 'component', 'form', 'page'])) {
|
|
116
|
-
items.push({ description: 'UI renders correctly on different screen sizes', category: 'ux' });
|
|
117
|
-
items.push({ description: 'Keyboard navigation works correctly', category: 'accessibility' });
|
|
118
|
-
}
|
|
119
|
-
if (this.hasSection(prompt, ['test', 'coverage'])) {
|
|
120
|
-
items.push({ description: 'Unit tests pass', category: 'testing' });
|
|
121
|
-
items.push({ description: 'Test coverage meets requirements', category: 'testing' });
|
|
122
|
-
}
|
|
123
|
-
return items;
|
|
124
|
-
}
|
|
125
|
-
getTestingChecklist(_prompt) {
|
|
126
|
-
return [
|
|
127
|
-
{ description: 'All test cases pass consistently', category: 'functionality' },
|
|
128
|
-
{ description: 'Tests are independent (no shared state)', category: 'quality' },
|
|
129
|
-
{ description: 'Edge cases have dedicated tests', category: 'coverage' },
|
|
130
|
-
{ description: 'Error scenarios are tested', category: 'coverage' },
|
|
131
|
-
{ description: 'Tests run in reasonable time', category: 'performance' },
|
|
132
|
-
{ description: 'Test names clearly describe what they test', category: 'maintainability' },
|
|
133
|
-
{ description: 'Mocks/stubs are appropriately scoped', category: 'quality' },
|
|
134
|
-
];
|
|
135
|
-
}
|
|
136
|
-
getMigrationChecklist(_prompt) {
|
|
137
|
-
return [
|
|
138
|
-
{ description: 'Data migrated correctly (spot check sample records)', category: 'data' },
|
|
139
|
-
{ description: 'All functionality works in new system', category: 'functionality' },
|
|
140
|
-
{ description: 'Performance is acceptable (equal or better)', category: 'performance' },
|
|
141
|
-
{ description: 'Rollback procedure tested and documented', category: 'safety' },
|
|
142
|
-
{ description: 'No data loss during migration', category: 'data' },
|
|
143
|
-
{ description: 'Integrations with other systems still work', category: 'integration' },
|
|
144
|
-
{ description: 'Users can perform all previous workflows', category: 'functionality' },
|
|
145
|
-
];
|
|
146
|
-
}
|
|
147
|
-
getSecurityChecklist(_prompt) {
|
|
148
|
-
return [
|
|
149
|
-
{ description: 'Authentication required for protected resources', category: 'auth' },
|
|
150
|
-
{ description: 'Authorization checks prevent privilege escalation', category: 'auth' },
|
|
151
|
-
{ description: 'User input is sanitized (no injection vulnerabilities)', category: 'input' },
|
|
152
|
-
{ description: 'Sensitive data is encrypted in transit (HTTPS)', category: 'data' },
|
|
153
|
-
{ description: 'Sensitive data is encrypted at rest', category: 'data' },
|
|
154
|
-
{
|
|
155
|
-
description: "Error messages don't leak sensitive information",
|
|
156
|
-
category: 'info-disclosure',
|
|
157
|
-
},
|
|
158
|
-
{ description: 'Rate limiting prevents abuse', category: 'protection' },
|
|
159
|
-
{ description: 'Security headers are properly configured', category: 'headers' },
|
|
160
|
-
];
|
|
161
|
-
}
|
|
162
|
-
getDebuggingChecklist(_prompt) {
|
|
163
|
-
return [
|
|
164
|
-
{ description: 'Root cause identified and documented', category: 'analysis' },
|
|
165
|
-
{ description: 'Bug is consistently reproducible before fix', category: 'verification' },
|
|
166
|
-
{ description: 'Fix resolves the original issue', category: 'functionality' },
|
|
167
|
-
{ description: "Fix doesn't introduce new bugs (regression)", category: 'regression' },
|
|
168
|
-
{ description: 'Related areas tested for side effects', category: 'regression' },
|
|
169
|
-
{ description: 'Test added to prevent recurrence', category: 'prevention' },
|
|
170
|
-
];
|
|
171
|
-
}
|
|
172
|
-
getDomainChecklist(prompt) {
|
|
173
|
-
const items = [];
|
|
174
|
-
if (this.hasSection(prompt, ['payment', 'transaction', 'checkout'])) {
|
|
175
|
-
items.push({ description: 'Payment processing works correctly', category: 'functionality' });
|
|
176
|
-
items.push({ description: 'Duplicate transactions prevented', category: 'safety' });
|
|
177
|
-
}
|
|
178
|
-
if (this.hasSection(prompt, ['email', 'notification', 'message'])) {
|
|
179
|
-
items.push({
|
|
180
|
-
description: 'Notifications sent to correct recipients',
|
|
181
|
-
category: 'functionality',
|
|
182
|
-
});
|
|
183
|
-
items.push({ description: 'Notification content is correct', category: 'content' });
|
|
184
|
-
}
|
|
185
|
-
if (this.hasSection(prompt, ['upload', 'file', 'image'])) {
|
|
186
|
-
items.push({ description: 'File uploads work for valid files', category: 'functionality' });
|
|
187
|
-
items.push({
|
|
188
|
-
description: 'Invalid/large files are rejected gracefully',
|
|
189
|
-
category: 'validation',
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
if (this.hasSection(prompt, ['database', 'db', 'query', 'schema'])) {
|
|
193
|
-
items.push({ description: 'Database queries perform well', category: 'performance' });
|
|
194
|
-
items.push({ description: 'Database constraints are enforced', category: 'data' });
|
|
195
|
-
}
|
|
196
|
-
return items;
|
|
197
|
-
}
|
|
198
|
-
getGeneralChecklist() {
|
|
199
|
-
return [
|
|
200
|
-
{ description: 'Code follows project conventions/style guide', category: 'quality' },
|
|
201
|
-
{ description: 'No console errors or warnings', category: 'quality' },
|
|
202
|
-
{ description: 'Documentation updated if needed', category: 'documentation' },
|
|
203
|
-
];
|
|
204
|
-
}
|
|
205
|
-
formatChecklistSection(items) {
|
|
206
|
-
const lines = [
|
|
207
|
-
'### Validation Checklist',
|
|
208
|
-
'',
|
|
209
|
-
'Before considering this task complete, verify:',
|
|
210
|
-
];
|
|
211
|
-
// Group by category
|
|
212
|
-
const byCategory = new Map();
|
|
213
|
-
items.forEach((item) => {
|
|
214
|
-
const existing = byCategory.get(item.category) || [];
|
|
215
|
-
existing.push(item);
|
|
216
|
-
byCategory.set(item.category, existing);
|
|
217
|
-
});
|
|
218
|
-
// Format grouped items
|
|
219
|
-
if (byCategory.size > 3) {
|
|
220
|
-
// If many categories, group them
|
|
221
|
-
byCategory.forEach((categoryItems, category) => {
|
|
222
|
-
lines.push('');
|
|
223
|
-
lines.push(`**${this.formatCategory(category)}:**`);
|
|
224
|
-
categoryItems.forEach((item) => {
|
|
225
|
-
lines.push(`☐ ${item.description}`);
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
else {
|
|
230
|
-
// Simple list for fewer categories
|
|
231
|
-
lines.push('');
|
|
232
|
-
items.forEach((item) => {
|
|
233
|
-
lines.push(`☐ ${item.description}`);
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
return lines.join('\n');
|
|
237
|
-
}
|
|
238
|
-
formatCategory(category) {
|
|
239
|
-
return category.charAt(0).toUpperCase() + category.slice(1).replace(/-/g, ' ');
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
//# sourceMappingURL=validation-checklist-creator.js.map
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { IntentAnalysis, QualityMetrics } from './types.js';
|
|
2
|
-
export declare class QualityAssessor {
|
|
3
|
-
private readonly COMPLETENESS_REQUIREMENTS;
|
|
4
|
-
/**
|
|
5
|
-
* Assess quality of a prompt (backward compatibility wrapper)
|
|
6
|
-
* @deprecated Use assess() method instead for full quality metrics
|
|
7
|
-
* v4.0: Now includes specificity in return type
|
|
8
|
-
*/
|
|
9
|
-
assessQuality(prompt: string, intent: string): {
|
|
10
|
-
clarity: number;
|
|
11
|
-
efficiency: number;
|
|
12
|
-
structure: number;
|
|
13
|
-
completeness: number;
|
|
14
|
-
actionability: number;
|
|
15
|
-
specificity: number;
|
|
16
|
-
overall: number;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Assess quality of a prompt
|
|
20
|
-
* v4.0: Now includes specificity as 6th quality dimension
|
|
21
|
-
*/
|
|
22
|
-
assess(original: string, enhanced: string, intent: IntentAnalysis): QualityMetrics;
|
|
23
|
-
private assessClarity;
|
|
24
|
-
private assessEfficiency;
|
|
25
|
-
private assessStructure;
|
|
26
|
-
private assessCompleteness;
|
|
27
|
-
private assessActionability;
|
|
28
|
-
/**
|
|
29
|
-
* v4.0: Assess specificity - How concrete and precise is the prompt?
|
|
30
|
-
* Penalizes vague language, rewards concrete indicators
|
|
31
|
-
*/
|
|
32
|
-
private assessSpecificity;
|
|
33
|
-
/**
|
|
34
|
-
* Calculate weighted overall quality score
|
|
35
|
-
* v4.12: Added comprehensive weight documentation
|
|
36
|
-
*
|
|
37
|
-
* WEIGHT RATIONALE:
|
|
38
|
-
* Weights are designed based on what matters most for each intent type:
|
|
39
|
-
*
|
|
40
|
-
* | Intent | Primary Focus | Secondary Focus | Rationale |
|
|
41
|
-
* |--------|---------------|-----------------|-----------|
|
|
42
|
-
* | code-generation | completeness (25%) | clarity, actionability (20% each) | Code needs full specs |
|
|
43
|
-
* | planning | structure, completeness (25% each) | clarity (20%) | Plans need organization |
|
|
44
|
-
* | debugging | actionability, completeness (25% each) | specificity (20%) | Need steps to reproduce |
|
|
45
|
-
* | migration | specificity, completeness (25% each) | clarity (20%) | Version/path precision |
|
|
46
|
-
* | testing | completeness (25%) | specificity, actionability (20% each) | Edge cases matter |
|
|
47
|
-
* | security-review | completeness (25%) | specificity, clarity (20% each) | Thorough coverage |
|
|
48
|
-
* | learning | clarity (30%) | structure, completeness (20% each) | Understanding > action |
|
|
49
|
-
* | default | completeness (22%) | clarity, structure, actionability (18% each) | Balanced |
|
|
50
|
-
*
|
|
51
|
-
* These weights can be overridden via ClavixConfig.intelligence.qualityWeights
|
|
52
|
-
*/
|
|
53
|
-
private calculateOverall;
|
|
54
|
-
private identifyStrengths;
|
|
55
|
-
private identifyImprovements;
|
|
56
|
-
private hasObjective;
|
|
57
|
-
private hasTechStack;
|
|
58
|
-
private hasOutputFormat;
|
|
59
|
-
private hasSuccessCriteria;
|
|
60
|
-
private hasSection;
|
|
61
|
-
private countSignalWords;
|
|
62
|
-
private hasInputOutput;
|
|
63
|
-
private hasEdgeCases;
|
|
64
|
-
private hasProblemStatement;
|
|
65
|
-
private hasGoal;
|
|
66
|
-
private hasConstraints;
|
|
67
|
-
private hasExpectedBehavior;
|
|
68
|
-
private hasActualBehavior;
|
|
69
|
-
private hasExamples;
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=quality-assessor.d.ts.map
|