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.
Files changed (163) hide show
  1. package/README.md +69 -61
  2. package/dist/cli/commands/init.js +54 -153
  3. package/dist/cli/commands/update.js +19 -21
  4. package/dist/templates/agents/agents.md +28 -26
  5. package/dist/templates/agents/copilot-instructions.md +42 -36
  6. package/dist/templates/agents/octo.md +41 -36
  7. package/dist/templates/agents/warp.md +24 -24
  8. package/dist/templates/instructions/README.md +8 -5
  9. package/dist/templates/slash-commands/_canonical/archive.md +83 -121
  10. package/dist/templates/slash-commands/_canonical/execute.md +32 -42
  11. package/dist/templates/slash-commands/_canonical/implement.md +32 -44
  12. package/dist/templates/slash-commands/_canonical/improve.md +13 -52
  13. package/dist/templates/slash-commands/_canonical/plan.md +8 -20
  14. package/dist/templates/slash-commands/_canonical/verify.md +9 -9
  15. package/dist/templates/slash-commands/_components/agent-protocols/assertion-checkpoints.md +1 -1
  16. package/dist/templates/slash-commands/_components/agent-protocols/cli-reference.md +84 -180
  17. package/dist/templates/slash-commands/_components/agent-protocols/decision-rules.md +5 -6
  18. package/dist/templates/slash-commands/_components/agent-protocols/error-handling.md +2 -2
  19. package/dist/templates/slash-commands/_components/agent-protocols/file-formats.md +41 -59
  20. package/dist/templates/slash-commands/_components/agent-protocols/state-awareness.md +5 -7
  21. package/dist/templates/slash-commands/_components/sections/file-saving-protocol.md +20 -27
  22. package/dist/templates/slash-commands/_components/troubleshooting/file-not-saved.md +4 -5
  23. package/dist/templates/slash-commands/_components/troubleshooting/vibecoder-recovery.md +2 -2
  24. package/dist/utils/agent-error-messages.js +13 -12
  25. package/package.json +2 -2
  26. package/dist/cli/commands/analyze.d.ts +0 -17
  27. package/dist/cli/commands/analyze.js +0 -133
  28. package/dist/cli/commands/archive.d.ts +0 -36
  29. package/dist/cli/commands/archive.js +0 -266
  30. package/dist/cli/commands/deep.d.ts +0 -17
  31. package/dist/cli/commands/deep.js +0 -170
  32. package/dist/cli/commands/execute.d.ts +0 -15
  33. package/dist/cli/commands/execute.js +0 -168
  34. package/dist/cli/commands/fast.d.ts +0 -18
  35. package/dist/cli/commands/fast.js +0 -219
  36. package/dist/cli/commands/implement.d.ts +0 -24
  37. package/dist/cli/commands/implement.js +0 -289
  38. package/dist/cli/commands/improve.d.ts +0 -32
  39. package/dist/cli/commands/improve.js +0 -250
  40. package/dist/cli/commands/list.d.ts +0 -17
  41. package/dist/cli/commands/list.js +0 -217
  42. package/dist/cli/commands/plan.d.ts +0 -21
  43. package/dist/cli/commands/plan.js +0 -297
  44. package/dist/cli/commands/prd.d.ts +0 -24
  45. package/dist/cli/commands/prd.js +0 -321
  46. package/dist/cli/commands/prompts/clear.d.ts +0 -16
  47. package/dist/cli/commands/prompts/clear.js +0 -222
  48. package/dist/cli/commands/prompts/list.d.ts +0 -8
  49. package/dist/cli/commands/prompts/list.js +0 -88
  50. package/dist/cli/commands/show.d.ts +0 -21
  51. package/dist/cli/commands/show.js +0 -191
  52. package/dist/cli/commands/start.d.ts +0 -40
  53. package/dist/cli/commands/start.js +0 -210
  54. package/dist/cli/commands/summarize.d.ts +0 -17
  55. package/dist/cli/commands/summarize.js +0 -196
  56. package/dist/cli/commands/task-complete.d.ts +0 -27
  57. package/dist/cli/commands/task-complete.js +0 -269
  58. package/dist/cli/commands/verify.d.ts +0 -28
  59. package/dist/cli/commands/verify.js +0 -349
  60. package/dist/core/archive-manager.d.ts +0 -100
  61. package/dist/core/archive-manager.js +0 -302
  62. package/dist/core/basic-checklist-generator.d.ts +0 -35
  63. package/dist/core/basic-checklist-generator.js +0 -344
  64. package/dist/core/checklist-parser.d.ts +0 -48
  65. package/dist/core/checklist-parser.js +0 -238
  66. package/dist/core/config-manager.d.ts +0 -149
  67. package/dist/core/config-manager.js +0 -230
  68. package/dist/core/conversation-analyzer.d.ts +0 -86
  69. package/dist/core/conversation-analyzer.js +0 -387
  70. package/dist/core/conversation-quality-tracker.d.ts +0 -81
  71. package/dist/core/conversation-quality-tracker.js +0 -195
  72. package/dist/core/git-manager.d.ts +0 -126
  73. package/dist/core/git-manager.js +0 -282
  74. package/dist/core/intelligence/confidence-calculator.d.ts +0 -93
  75. package/dist/core/intelligence/confidence-calculator.js +0 -124
  76. package/dist/core/intelligence/index.d.ts +0 -11
  77. package/dist/core/intelligence/index.js +0 -15
  78. package/dist/core/intelligence/intent-detector.d.ts +0 -54
  79. package/dist/core/intelligence/intent-detector.js +0 -723
  80. package/dist/core/intelligence/pattern-library.d.ts +0 -104
  81. package/dist/core/intelligence/pattern-library.js +0 -330
  82. package/dist/core/intelligence/patterns/actionability-enhancer.d.ts +0 -27
  83. package/dist/core/intelligence/patterns/actionability-enhancer.js +0 -192
  84. package/dist/core/intelligence/patterns/alternative-phrasing-generator.d.ts +0 -29
  85. package/dist/core/intelligence/patterns/alternative-phrasing-generator.js +0 -239
  86. package/dist/core/intelligence/patterns/ambiguity-detector.d.ts +0 -22
  87. package/dist/core/intelligence/patterns/ambiguity-detector.js +0 -196
  88. package/dist/core/intelligence/patterns/assumption-explicitizer.d.ts +0 -30
  89. package/dist/core/intelligence/patterns/assumption-explicitizer.js +0 -296
  90. package/dist/core/intelligence/patterns/base-pattern.d.ts +0 -192
  91. package/dist/core/intelligence/patterns/base-pattern.js +0 -103
  92. package/dist/core/intelligence/patterns/completeness-validator.d.ts +0 -27
  93. package/dist/core/intelligence/patterns/completeness-validator.js +0 -221
  94. package/dist/core/intelligence/patterns/conciseness-filter.d.ts +0 -20
  95. package/dist/core/intelligence/patterns/conciseness-filter.js +0 -92
  96. package/dist/core/intelligence/patterns/context-precision.d.ts +0 -32
  97. package/dist/core/intelligence/patterns/context-precision.js +0 -389
  98. package/dist/core/intelligence/patterns/conversation-summarizer.d.ts +0 -30
  99. package/dist/core/intelligence/patterns/conversation-summarizer.js +0 -277
  100. package/dist/core/intelligence/patterns/dependency-identifier.d.ts +0 -23
  101. package/dist/core/intelligence/patterns/dependency-identifier.js +0 -166
  102. package/dist/core/intelligence/patterns/domain-context-enricher.d.ts +0 -21
  103. package/dist/core/intelligence/patterns/domain-context-enricher.js +0 -198
  104. package/dist/core/intelligence/patterns/edge-case-identifier.d.ts +0 -30
  105. package/dist/core/intelligence/patterns/edge-case-identifier.js +0 -269
  106. package/dist/core/intelligence/patterns/error-tolerance-enhancer.d.ts +0 -22
  107. package/dist/core/intelligence/patterns/error-tolerance-enhancer.js +0 -179
  108. package/dist/core/intelligence/patterns/implicit-requirement-extractor.d.ts +0 -24
  109. package/dist/core/intelligence/patterns/implicit-requirement-extractor.js +0 -259
  110. package/dist/core/intelligence/patterns/objective-clarifier.d.ts +0 -22
  111. package/dist/core/intelligence/patterns/objective-clarifier.js +0 -126
  112. package/dist/core/intelligence/patterns/output-format-enforcer.d.ts +0 -22
  113. package/dist/core/intelligence/patterns/output-format-enforcer.js +0 -151
  114. package/dist/core/intelligence/patterns/prd-structure-enforcer.d.ts +0 -23
  115. package/dist/core/intelligence/patterns/prd-structure-enforcer.js +0 -183
  116. package/dist/core/intelligence/patterns/prerequisite-identifier.d.ts +0 -23
  117. package/dist/core/intelligence/patterns/prerequisite-identifier.js +0 -221
  118. package/dist/core/intelligence/patterns/requirement-prioritizer.d.ts +0 -24
  119. package/dist/core/intelligence/patterns/requirement-prioritizer.js +0 -134
  120. package/dist/core/intelligence/patterns/scope-definer.d.ts +0 -26
  121. package/dist/core/intelligence/patterns/scope-definer.js +0 -236
  122. package/dist/core/intelligence/patterns/step-decomposer.d.ts +0 -31
  123. package/dist/core/intelligence/patterns/step-decomposer.js +0 -242
  124. package/dist/core/intelligence/patterns/structure-organizer.d.ts +0 -31
  125. package/dist/core/intelligence/patterns/structure-organizer.js +0 -218
  126. package/dist/core/intelligence/patterns/success-criteria-enforcer.d.ts +0 -22
  127. package/dist/core/intelligence/patterns/success-criteria-enforcer.js +0 -165
  128. package/dist/core/intelligence/patterns/success-metrics-enforcer.d.ts +0 -24
  129. package/dist/core/intelligence/patterns/success-metrics-enforcer.js +0 -165
  130. package/dist/core/intelligence/patterns/technical-context-enricher.d.ts +0 -25
  131. package/dist/core/intelligence/patterns/technical-context-enricher.js +0 -165
  132. package/dist/core/intelligence/patterns/topic-coherence-analyzer.d.ts +0 -26
  133. package/dist/core/intelligence/patterns/topic-coherence-analyzer.js +0 -300
  134. package/dist/core/intelligence/patterns/user-persona-enricher.d.ts +0 -24
  135. package/dist/core/intelligence/patterns/user-persona-enricher.js +0 -141
  136. package/dist/core/intelligence/patterns/validation-checklist-creator.d.ts +0 -31
  137. package/dist/core/intelligence/patterns/validation-checklist-creator.js +0 -242
  138. package/dist/core/intelligence/quality-assessor.d.ts +0 -71
  139. package/dist/core/intelligence/quality-assessor.js +0 -525
  140. package/dist/core/intelligence/types.d.ts +0 -111
  141. package/dist/core/intelligence/types.js +0 -3
  142. package/dist/core/intelligence/universal-optimizer.d.ts +0 -91
  143. package/dist/core/intelligence/universal-optimizer.js +0 -399
  144. package/dist/core/prd-generator.d.ts +0 -76
  145. package/dist/core/prd-generator.js +0 -173
  146. package/dist/core/prompt-manager.d.ts +0 -110
  147. package/dist/core/prompt-manager.js +0 -274
  148. package/dist/core/prompt-optimizer.d.ts +0 -268
  149. package/dist/core/prompt-optimizer.js +0 -959
  150. package/dist/core/question-engine.d.ts +0 -167
  151. package/dist/core/question-engine.js +0 -356
  152. package/dist/core/session-manager.d.ts +0 -139
  153. package/dist/core/session-manager.js +0 -365
  154. package/dist/core/task-manager.d.ts +0 -211
  155. package/dist/core/task-manager.js +0 -981
  156. package/dist/core/verification-hooks.d.ts +0 -67
  157. package/dist/core/verification-hooks.js +0 -309
  158. package/dist/core/verification-manager.d.ts +0 -107
  159. package/dist/core/verification-manager.js +0 -415
  160. package/dist/types/session.d.ts +0 -78
  161. package/dist/types/session.js +0 -8
  162. package/dist/types/verification.d.ts +0 -205
  163. package/dist/types/verification.js +0 -9
@@ -1,67 +0,0 @@
1
- /**
2
- * Clavix v4.8: Verification Hooks
3
- *
4
- * Detects and executes CLI hooks for automated verification of checklist items.
5
- * Supports npm, yarn, and pnpm package managers.
6
- */
7
- import { VerificationHook, HookResult, HookType, DetectedHooks } from '../types/verification.js';
8
- /**
9
- * Verification Hooks Manager
10
- */
11
- export declare class VerificationHooks {
12
- private readonly cwd;
13
- private detectedHooks;
14
- constructor(cwd?: string);
15
- /**
16
- * Detect available hooks in the project
17
- */
18
- detectHooks(): Promise<DetectedHooks>;
19
- /**
20
- * Detect package manager used in the project
21
- */
22
- private detectPackageManager;
23
- /**
24
- * Create a hook definition
25
- */
26
- private createHook;
27
- /**
28
- * Run a specific hook
29
- */
30
- runHook(hook: VerificationHook): Promise<HookResult>;
31
- /**
32
- * Run all detected hooks
33
- */
34
- runAllHooks(): Promise<HookResult[]>;
35
- /**
36
- * Run a hook by type
37
- */
38
- runHookByType(type: HookType): Promise<HookResult | null>;
39
- /**
40
- * Execute a command and capture output
41
- */
42
- private executeCommand;
43
- /**
44
- * Determine if the hook succeeded
45
- */
46
- private determineSuccess;
47
- /**
48
- * Determine confidence level in the result
49
- */
50
- private determineConfidence;
51
- /**
52
- * Get hook by type
53
- */
54
- getHook(type: HookType): Promise<VerificationHook | null>;
55
- /**
56
- * Check if a hook type is available
57
- */
58
- hasHook(type: HookType): Promise<boolean>;
59
- /**
60
- * Get summary of available hooks
61
- */
62
- getHookSummary(): Promise<{
63
- available: HookType[];
64
- unavailable: HookType[];
65
- }>;
66
- }
67
- //# sourceMappingURL=verification-hooks.d.ts.map
@@ -1,309 +0,0 @@
1
- /**
2
- * Clavix v4.8: Verification Hooks
3
- *
4
- * Detects and executes CLI hooks for automated verification of checklist items.
5
- * Supports npm, yarn, and pnpm package managers.
6
- */
7
- import { spawn } from 'child_process';
8
- import fs from 'fs-extra';
9
- import * as path from 'path';
10
- /**
11
- * Default timeout for hooks (60 seconds)
12
- */
13
- const DEFAULT_TIMEOUT = 60000;
14
- /**
15
- * Built-in hook definitions
16
- */
17
- const HOOK_DEFINITIONS = {
18
- test: {
19
- displayName: 'Tests',
20
- commands: ['npm test', 'npm run test', 'yarn test', 'pnpm test'],
21
- successPatterns: [
22
- /(\d+)\s+(passing|passed)/i,
23
- /tests?\s+passed/i,
24
- /all\s+tests?\s+passed/i,
25
- /0\s+failed/i,
26
- /test\s+suites?:\s+\d+\s+passed/i,
27
- ],
28
- failurePatterns: [/(\d+)\s+failed/i, /test\s+failed/i, /FAIL/i, /error/i],
29
- },
30
- build: {
31
- displayName: 'Build',
32
- commands: ['npm run build', 'yarn build', 'pnpm build', 'tsc'],
33
- successPatterns: [/successfully/i, /done/i, /built/i, /compiled/i],
34
- failurePatterns: [/error/i, /failed/i, /TS\d{4}:/],
35
- },
36
- lint: {
37
- displayName: 'Lint',
38
- commands: ['npm run lint', 'yarn lint', 'pnpm lint', 'eslint .'],
39
- successPatterns: [/0\s+errors?/i, /no\s+errors?/i, /all\s+files?\s+pass/i],
40
- failurePatterns: [/(\d+)\s+errors?/i, /error/i],
41
- },
42
- typecheck: {
43
- displayName: 'Type Check',
44
- commands: ['tsc --noEmit', 'npm run typecheck', 'yarn typecheck'],
45
- successPatterns: [/^$/], // Empty output means success for tsc
46
- failurePatterns: [/error\s+TS\d{4}/i, /Type\s+error/i],
47
- },
48
- custom: {
49
- displayName: 'Custom',
50
- commands: [],
51
- successPatterns: [],
52
- failurePatterns: [],
53
- },
54
- };
55
- /**
56
- * Verification Hooks Manager
57
- */
58
- export class VerificationHooks {
59
- cwd;
60
- detectedHooks = null;
61
- constructor(cwd) {
62
- this.cwd = cwd || process.cwd();
63
- }
64
- /**
65
- * Detect available hooks in the project
66
- */
67
- async detectHooks() {
68
- if (this.detectedHooks) {
69
- return this.detectedHooks;
70
- }
71
- const packageJsonPath = path.join(this.cwd, 'package.json');
72
- const hasPackageJson = await fs.pathExists(packageJsonPath);
73
- const packageManager = await this.detectPackageManager();
74
- const hooks = [];
75
- if (hasPackageJson) {
76
- try {
77
- const packageJson = await fs.readJson(packageJsonPath);
78
- const scripts = packageJson.scripts || {};
79
- // Check for test script
80
- if (scripts.test) {
81
- hooks.push(this.createHook('test', `${packageManager} test`, packageManager));
82
- }
83
- // Check for build script
84
- if (scripts.build) {
85
- hooks.push(this.createHook('build', `${packageManager} run build`, packageManager));
86
- }
87
- // Check for lint script
88
- if (scripts.lint) {
89
- hooks.push(this.createHook('lint', `${packageManager} run lint`, packageManager));
90
- }
91
- // Check for typecheck script
92
- if (scripts.typecheck || scripts['type-check']) {
93
- const cmd = scripts.typecheck ? 'typecheck' : 'type-check';
94
- hooks.push(this.createHook('typecheck', `${packageManager} run ${cmd}`, packageManager));
95
- }
96
- else {
97
- // Check for TypeScript
98
- const hasTsConfig = await fs.pathExists(path.join(this.cwd, 'tsconfig.json'));
99
- if (hasTsConfig) {
100
- hooks.push(this.createHook('typecheck', 'npx tsc --noEmit', packageManager));
101
- }
102
- }
103
- }
104
- catch {
105
- // Ignore errors reading package.json
106
- }
107
- }
108
- this.detectedHooks = {
109
- hooks,
110
- packageManager,
111
- hasPackageJson,
112
- };
113
- return this.detectedHooks;
114
- }
115
- /**
116
- * Detect package manager used in the project
117
- */
118
- async detectPackageManager() {
119
- // Check for lock files
120
- if (await fs.pathExists(path.join(this.cwd, 'pnpm-lock.yaml'))) {
121
- return 'pnpm';
122
- }
123
- if (await fs.pathExists(path.join(this.cwd, 'yarn.lock'))) {
124
- return 'yarn';
125
- }
126
- if (await fs.pathExists(path.join(this.cwd, 'package-lock.json'))) {
127
- return 'npm';
128
- }
129
- return 'unknown';
130
- }
131
- /**
132
- * Create a hook definition
133
- */
134
- createHook(type, command, _packageManager) {
135
- const def = HOOK_DEFINITIONS[type];
136
- return {
137
- name: type,
138
- displayName: def.displayName,
139
- command,
140
- successPattern: def.successPatterns[0],
141
- failurePattern: def.failurePatterns[0],
142
- timeout: DEFAULT_TIMEOUT,
143
- };
144
- }
145
- /**
146
- * Run a specific hook
147
- */
148
- async runHook(hook) {
149
- const startTime = Date.now();
150
- try {
151
- const { exitCode, output } = await this.executeCommand(hook.command, hook.timeout);
152
- const executionTimeMs = Date.now() - startTime;
153
- // Determine success based on exit code and patterns
154
- const success = this.determineSuccess(hook, exitCode, output);
155
- const confidence = this.determineConfidence(hook, exitCode, output, success);
156
- return {
157
- hook,
158
- success,
159
- exitCode,
160
- output,
161
- confidence,
162
- executionTimeMs,
163
- };
164
- }
165
- catch (error) {
166
- const executionTimeMs = Date.now() - startTime;
167
- return {
168
- hook,
169
- success: false,
170
- exitCode: -1,
171
- output: '',
172
- confidence: 'low',
173
- executionTimeMs,
174
- error: error instanceof Error ? error.message : String(error),
175
- };
176
- }
177
- }
178
- /**
179
- * Run all detected hooks
180
- */
181
- async runAllHooks() {
182
- const detected = await this.detectHooks();
183
- const results = [];
184
- for (const hook of detected.hooks) {
185
- const result = await this.runHook(hook);
186
- results.push(result);
187
- }
188
- return results;
189
- }
190
- /**
191
- * Run a hook by type
192
- */
193
- async runHookByType(type) {
194
- const detected = await this.detectHooks();
195
- const hook = detected.hooks.find((h) => h.name === type);
196
- if (!hook) {
197
- return null;
198
- }
199
- return this.runHook(hook);
200
- }
201
- /**
202
- * Execute a command and capture output
203
- */
204
- executeCommand(command, timeout) {
205
- return new Promise((resolve, reject) => {
206
- const [cmd, ...args] = command.split(' ');
207
- let output = '';
208
- const proc = spawn(cmd, args, {
209
- cwd: this.cwd,
210
- shell: true,
211
- env: { ...process.env, CI: 'true', FORCE_COLOR: '0' },
212
- });
213
- const timeoutId = setTimeout(() => {
214
- proc.kill('SIGTERM');
215
- reject(new Error(`Command timed out after ${timeout}ms`));
216
- }, timeout);
217
- proc.stdout?.on('data', (data) => {
218
- output += data.toString();
219
- });
220
- proc.stderr?.on('data', (data) => {
221
- output += data.toString();
222
- });
223
- proc.on('close', (code) => {
224
- clearTimeout(timeoutId);
225
- resolve({
226
- exitCode: code ?? 0,
227
- output: output.trim(),
228
- });
229
- });
230
- proc.on('error', (error) => {
231
- clearTimeout(timeoutId);
232
- reject(error);
233
- });
234
- });
235
- }
236
- /**
237
- * Determine if the hook succeeded
238
- */
239
- determineSuccess(hook, exitCode, output) {
240
- // Exit code 0 is primary success indicator
241
- if (exitCode !== 0) {
242
- return false;
243
- }
244
- // Check for explicit failure patterns
245
- const def = HOOK_DEFINITIONS[hook.name];
246
- for (const pattern of def.failurePatterns) {
247
- if (pattern.test(output)) {
248
- // Check if it's a "0 errors" type match
249
- const match = output.match(pattern);
250
- if (match && match[1] === '0') {
251
- continue; // "0 errors" is success
252
- }
253
- return false;
254
- }
255
- }
256
- return true;
257
- }
258
- /**
259
- * Determine confidence level in the result
260
- */
261
- determineConfidence(hook, exitCode, output, success) {
262
- const def = HOOK_DEFINITIONS[hook.name];
263
- // Clear exit code with matching success patterns = high confidence
264
- if (exitCode === 0 && success) {
265
- for (const pattern of def.successPatterns) {
266
- if (pattern.test(output)) {
267
- return 'high';
268
- }
269
- }
270
- // Exit 0 but no explicit success pattern
271
- return 'medium';
272
- }
273
- // Clear failure indicators
274
- if (exitCode !== 0 || !success) {
275
- for (const pattern of def.failurePatterns) {
276
- if (pattern.test(output)) {
277
- return 'high';
278
- }
279
- }
280
- return 'medium';
281
- }
282
- return 'low';
283
- }
284
- /**
285
- * Get hook by type
286
- */
287
- async getHook(type) {
288
- const detected = await this.detectHooks();
289
- return detected.hooks.find((h) => h.name === type) || null;
290
- }
291
- /**
292
- * Check if a hook type is available
293
- */
294
- async hasHook(type) {
295
- const detected = await this.detectHooks();
296
- return detected.hooks.some((h) => h.name === type);
297
- }
298
- /**
299
- * Get summary of available hooks
300
- */
301
- async getHookSummary() {
302
- const detected = await this.detectHooks();
303
- const allTypes = ['test', 'build', 'lint', 'typecheck'];
304
- const available = detected.hooks.map((h) => h.name);
305
- const unavailable = allTypes.filter((t) => !available.includes(t));
306
- return { available, unavailable };
307
- }
308
- }
309
- //# sourceMappingURL=verification-hooks.js.map
@@ -1,107 +0,0 @@
1
- /**
2
- * Clavix v4.11: Verification Manager
3
- *
4
- * Manages verification state, execution flow, and persistence.
5
- * Coordinates between checklist parsing, hook execution, and result storage.
6
- * v4.11: Updated for unified storage (no fast/deep subdirs)
7
- */
8
- import { VerificationReport, VerificationResult, VerificationSummary, ChecklistItem, ReportStatus, VerificationStatus, VerificationConfidence, VerificationMethod } from '../types/verification.js';
9
- /**
10
- * Verification Manager
11
- */
12
- export declare class VerificationManager {
13
- private readonly promptManager;
14
- private readonly checklistParser;
15
- private readonly verificationHooks;
16
- private readonly outputDir;
17
- constructor(baseDir?: string);
18
- /**
19
- * Initialize verification for a prompt
20
- */
21
- initializeVerification(promptId: string): Promise<VerificationReport>;
22
- /**
23
- * v4.11: Get verification report path (unified storage)
24
- */
25
- getReportPath(promptId: string): string;
26
- /**
27
- * v4.11: Load verification report
28
- */
29
- loadReport(promptId: string): Promise<VerificationReport | null>;
30
- /**
31
- * v4.11: Save verification report
32
- */
33
- saveReport(report: VerificationReport): Promise<void>;
34
- /**
35
- * Mark a single item as verified
36
- */
37
- markItemVerified(promptId: string, itemId: string, status: VerificationStatus, options?: {
38
- evidence?: string;
39
- reason?: string;
40
- confidence?: VerificationConfidence;
41
- method?: VerificationMethod;
42
- }): Promise<VerificationReport>;
43
- /**
44
- * Run automated verification for a prompt
45
- */
46
- runAutomatedVerification(promptId: string): Promise<VerificationReport>;
47
- /**
48
- * Match checklist item content to hook type
49
- */
50
- private matchItemToHook;
51
- /**
52
- * Truncate output for storage
53
- */
54
- private truncateOutput;
55
- /**
56
- * Calculate summary from results
57
- */
58
- calculateSummary(results: VerificationResult[]): VerificationSummary;
59
- /**
60
- * Calculate overall report status
61
- */
62
- private calculateReportStatus;
63
- /**
64
- * Get pending items from report
65
- */
66
- getPendingItems(report: VerificationReport): ChecklistItem[];
67
- /**
68
- * Get failed items from report
69
- */
70
- getFailedItems(report: VerificationReport): Array<{
71
- item: ChecklistItem;
72
- result: VerificationResult;
73
- }>;
74
- /**
75
- * Check if verification is complete
76
- */
77
- isComplete(report: VerificationReport): boolean;
78
- /**
79
- * Check if verification requires attention (has failures)
80
- */
81
- requiresAttention(report: VerificationReport): boolean;
82
- /**
83
- * v4.11: Delete verification report
84
- */
85
- deleteReport(promptId: string): Promise<boolean>;
86
- /**
87
- * v4.11: Get all verification reports
88
- */
89
- listReports(): Promise<VerificationReport[]>;
90
- /**
91
- * Get verification status for a prompt
92
- */
93
- getVerificationStatus(promptId: string): Promise<{
94
- hasReport: boolean;
95
- status: ReportStatus | null;
96
- summary: VerificationSummary | null;
97
- }>;
98
- /**
99
- * Format verification report for display
100
- */
101
- formatReportForDisplay(report: VerificationReport): string;
102
- /**
103
- * Get status icon for display
104
- */
105
- private getStatusIcon;
106
- }
107
- //# sourceMappingURL=verification-manager.d.ts.map