clavix 4.9.0 → 4.11.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/analyze.d.ts +17 -0
- package/dist/cli/commands/analyze.js +133 -0
- package/dist/cli/commands/execute.d.ts +2 -2
- package/dist/cli/commands/execute.js +23 -21
- package/dist/cli/commands/improve.d.ts +32 -0
- package/dist/cli/commands/improve.js +250 -0
- package/dist/cli/commands/init.js +35 -29
- package/dist/cli/commands/prd.js +14 -13
- package/dist/cli/commands/prompts/clear.d.ts +2 -2
- package/dist/cli/commands/prompts/clear.js +32 -26
- package/dist/cli/commands/prompts/list.js +14 -19
- package/dist/cli/commands/summarize.js +23 -14
- package/dist/cli/commands/verify.d.ts +2 -2
- package/dist/cli/commands/verify.js +26 -24
- package/dist/core/doc-injector.d.ts +2 -0
- package/dist/core/doc-injector.js +12 -13
- package/dist/core/intelligence/intent-detector.d.ts +4 -0
- package/dist/core/intelligence/intent-detector.js +8 -18
- package/dist/core/intelligence/pattern-library.d.ts +16 -10
- package/dist/core/intelligence/pattern-library.js +47 -35
- package/dist/core/intelligence/patterns/actionability-enhancer.d.ts +2 -2
- package/dist/core/intelligence/patterns/actionability-enhancer.js +1 -1
- package/dist/core/intelligence/patterns/alternative-phrasing-generator.d.ts +2 -2
- package/dist/core/intelligence/patterns/alternative-phrasing-generator.js +1 -1
- package/dist/core/intelligence/patterns/ambiguity-detector.d.ts +2 -2
- package/dist/core/intelligence/patterns/ambiguity-detector.js +1 -1
- package/dist/core/intelligence/patterns/assumption-explicitizer.d.ts +2 -2
- package/dist/core/intelligence/patterns/assumption-explicitizer.js +1 -1
- package/dist/core/intelligence/patterns/base-pattern.d.ts +10 -7
- package/dist/core/intelligence/patterns/base-pattern.js +7 -3
- package/dist/core/intelligence/patterns/completeness-validator.d.ts +2 -2
- package/dist/core/intelligence/patterns/completeness-validator.js +1 -1
- package/dist/core/intelligence/patterns/conciseness-filter.d.ts +2 -2
- package/dist/core/intelligence/patterns/conciseness-filter.js +1 -1
- package/dist/core/intelligence/patterns/context-precision.d.ts +2 -2
- package/dist/core/intelligence/patterns/context-precision.js +1 -1
- package/dist/core/intelligence/patterns/conversation-summarizer.d.ts +2 -2
- package/dist/core/intelligence/patterns/conversation-summarizer.js +1 -1
- package/dist/core/intelligence/patterns/dependency-identifier.d.ts +2 -2
- package/dist/core/intelligence/patterns/dependency-identifier.js +1 -1
- package/dist/core/intelligence/patterns/domain-context-enricher.d.ts +2 -2
- package/dist/core/intelligence/patterns/domain-context-enricher.js +1 -1
- package/dist/core/intelligence/patterns/edge-case-identifier.d.ts +2 -2
- package/dist/core/intelligence/patterns/edge-case-identifier.js +1 -1
- package/dist/core/intelligence/patterns/error-tolerance-enhancer.d.ts +2 -2
- package/dist/core/intelligence/patterns/error-tolerance-enhancer.js +1 -1
- package/dist/core/intelligence/patterns/implicit-requirement-extractor.d.ts +2 -2
- package/dist/core/intelligence/patterns/implicit-requirement-extractor.js +1 -1
- package/dist/core/intelligence/patterns/objective-clarifier.d.ts +2 -2
- package/dist/core/intelligence/patterns/objective-clarifier.js +1 -1
- package/dist/core/intelligence/patterns/output-format-enforcer.d.ts +2 -2
- package/dist/core/intelligence/patterns/output-format-enforcer.js +1 -1
- package/dist/core/intelligence/patterns/prd-structure-enforcer.d.ts +2 -2
- package/dist/core/intelligence/patterns/prd-structure-enforcer.js +1 -1
- package/dist/core/intelligence/patterns/prerequisite-identifier.d.ts +2 -2
- package/dist/core/intelligence/patterns/prerequisite-identifier.js +1 -1
- package/dist/core/intelligence/patterns/requirement-prioritizer.d.ts +2 -2
- package/dist/core/intelligence/patterns/requirement-prioritizer.js +1 -1
- package/dist/core/intelligence/patterns/scope-definer.d.ts +2 -2
- package/dist/core/intelligence/patterns/scope-definer.js +1 -1
- package/dist/core/intelligence/patterns/step-decomposer.d.ts +2 -2
- package/dist/core/intelligence/patterns/step-decomposer.js +1 -1
- package/dist/core/intelligence/patterns/structure-organizer.d.ts +2 -2
- package/dist/core/intelligence/patterns/structure-organizer.js +1 -1
- package/dist/core/intelligence/patterns/success-criteria-enforcer.d.ts +2 -2
- package/dist/core/intelligence/patterns/success-criteria-enforcer.js +1 -1
- package/dist/core/intelligence/patterns/success-metrics-enforcer.d.ts +2 -2
- package/dist/core/intelligence/patterns/success-metrics-enforcer.js +1 -1
- package/dist/core/intelligence/patterns/technical-context-enricher.d.ts +2 -2
- package/dist/core/intelligence/patterns/technical-context-enricher.js +1 -1
- package/dist/core/intelligence/patterns/topic-coherence-analyzer.d.ts +2 -2
- package/dist/core/intelligence/patterns/topic-coherence-analyzer.js +1 -1
- package/dist/core/intelligence/patterns/user-persona-enricher.d.ts +2 -2
- package/dist/core/intelligence/patterns/user-persona-enricher.js +1 -1
- package/dist/core/intelligence/patterns/validation-checklist-creator.d.ts +2 -2
- package/dist/core/intelligence/patterns/validation-checklist-creator.js +1 -1
- package/dist/core/intelligence/types.d.ts +6 -3
- package/dist/core/intelligence/universal-optimizer.d.ts +20 -15
- package/dist/core/intelligence/universal-optimizer.js +44 -29
- package/dist/core/prompt-manager.d.ts +24 -22
- package/dist/core/prompt-manager.js +65 -92
- package/dist/core/verification-manager.d.ts +8 -7
- package/dist/core/verification-manager.js +34 -41
- package/dist/templates/agents/octo.md +6 -8
- package/dist/templates/slash-commands/_canonical/execute.md +52 -41
- package/dist/templates/slash-commands/_canonical/implement.md +28 -0
- package/dist/templates/slash-commands/_canonical/improve.md +604 -0
- package/dist/templates/slash-commands/_canonical/verify.md +1 -1
- package/dist/templates/slash-commands/_components/agent-protocols/cli-reference.md +12 -0
- package/dist/templates/slash-commands/_components/agent-protocols/self-correction.md +20 -1
- package/dist/templates/slash-commands/_components/sections/escalation-factors.md +25 -25
- package/dist/templates/slash-commands/_components/sections/pattern-visibility.md +27 -33
- package/dist/types/config.d.ts +1 -2
- package/dist/types/verification.d.ts +7 -6
- package/dist/types/verification.js +2 -1
- package/package.json +1 -1
- package/dist/templates/slash-commands/_canonical/deep.md +0 -616
- package/dist/templates/slash-commands/_canonical/fast.md +0 -503
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { IntentDetector } from './intent-detector.js';
|
|
2
2
|
import { PatternLibrary } from './pattern-library.js';
|
|
3
3
|
import { QualityAssessor } from './quality-assessor.js';
|
|
4
|
-
import { OptimizationResult, OptimizationMode, OptimizationPhase, DocumentType, EscalationAnalysis } from './types.js';
|
|
4
|
+
import { OptimizationResult, OptimizationMode, OptimizationPhase, DocumentType, EscalationAnalysis, DepthLevel } from './types.js';
|
|
5
5
|
/**
|
|
6
|
-
* v4.
|
|
6
|
+
* v4.11: Extended context options for optimization modes
|
|
7
7
|
*/
|
|
8
8
|
export interface OptimizationContextOverride {
|
|
9
9
|
phase?: OptimizationPhase;
|
|
10
10
|
documentType?: DocumentType;
|
|
11
11
|
questionId?: string;
|
|
12
12
|
intent?: string;
|
|
13
|
+
depthLevel?: DepthLevel;
|
|
13
14
|
}
|
|
14
15
|
export declare class UniversalOptimizer {
|
|
15
16
|
private intentDetector;
|
|
@@ -17,10 +18,10 @@ export declare class UniversalOptimizer {
|
|
|
17
18
|
private qualityAssessor;
|
|
18
19
|
constructor(intentDetector?: IntentDetector, patternLibrary?: PatternLibrary, qualityAssessor?: QualityAssessor);
|
|
19
20
|
/**
|
|
20
|
-
* Optimize a prompt using Clavix Intelligence
|
|
21
|
+
* v4.11: Optimize a prompt using Clavix Intelligence
|
|
21
22
|
* @param prompt The prompt to optimize
|
|
22
|
-
* @param mode The optimization mode
|
|
23
|
-
* @param contextOverride Optional context override
|
|
23
|
+
* @param mode The optimization mode ('improve' | 'prd' | 'conversational')
|
|
24
|
+
* @param contextOverride Optional context override including depthLevel
|
|
24
25
|
*/
|
|
25
26
|
optimize(prompt: string, mode: OptimizationMode, contextOverride?: OptimizationContextOverride): Promise<OptimizationResult>;
|
|
26
27
|
/**
|
|
@@ -37,12 +38,16 @@ export declare class UniversalOptimizer {
|
|
|
37
38
|
*/
|
|
38
39
|
private generateFriendlySuggestion;
|
|
39
40
|
/**
|
|
40
|
-
* Determine if
|
|
41
|
+
* v4.11: Determine if comprehensive depth should be recommended
|
|
41
42
|
* @deprecated Use analyzeEscalation() for more detailed analysis
|
|
42
43
|
*/
|
|
44
|
+
shouldRecommendComprehensive(result: OptimizationResult): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Use shouldRecommendComprehensive() instead
|
|
47
|
+
*/
|
|
43
48
|
shouldRecommendDeepMode(result: OptimizationResult): boolean;
|
|
44
49
|
/**
|
|
45
|
-
* v4.
|
|
50
|
+
* v4.11: Analyze whether to escalate from standard to comprehensive depth
|
|
46
51
|
* Uses multi-factor scoring for intelligent triage decisions
|
|
47
52
|
*
|
|
48
53
|
* IMPORTANT: Quality checks use the ORIGINAL prompt, not the enhanced one,
|
|
@@ -50,16 +55,16 @@ export declare class UniversalOptimizer {
|
|
|
50
55
|
*/
|
|
51
56
|
analyzeEscalation(result: OptimizationResult): EscalationAnalysis;
|
|
52
57
|
/**
|
|
53
|
-
* Generate a user-friendly explanation of what
|
|
58
|
+
* v4.11: Generate a user-friendly explanation of what comprehensive depth would provide
|
|
54
59
|
*/
|
|
55
|
-
private
|
|
60
|
+
private generateComprehensiveValue;
|
|
56
61
|
/**
|
|
57
|
-
* Get recommendation message for user
|
|
58
|
-
*
|
|
62
|
+
* v4.11: Get recommendation message for user
|
|
63
|
+
* Enhanced with escalation analysis for improve mode
|
|
59
64
|
*/
|
|
60
65
|
getRecommendation(result: OptimizationResult): string | null;
|
|
61
66
|
/**
|
|
62
|
-
* v4.
|
|
67
|
+
* v4.11: Get detailed escalation recommendation with all reasons
|
|
63
68
|
* Useful for verbose output or debugging
|
|
64
69
|
*/
|
|
65
70
|
getDetailedRecommendation(result: OptimizationResult): {
|
|
@@ -68,12 +73,12 @@ export declare class UniversalOptimizer {
|
|
|
68
73
|
qualityLevel: 'excellent' | 'good' | 'decent' | 'needs-work';
|
|
69
74
|
};
|
|
70
75
|
/**
|
|
71
|
-
* Get statistics about the optimizer
|
|
76
|
+
* v4.11: Get statistics about the optimizer
|
|
72
77
|
*/
|
|
73
78
|
getStatistics(): {
|
|
74
79
|
totalPatterns: number;
|
|
75
|
-
|
|
76
|
-
|
|
80
|
+
standardPatterns: number;
|
|
81
|
+
comprehensivePatterns: number;
|
|
77
82
|
};
|
|
78
83
|
}
|
|
79
84
|
//# sourceMappingURL=universal-optimizer.d.ts.map
|
|
@@ -11,10 +11,10 @@ export class UniversalOptimizer {
|
|
|
11
11
|
this.qualityAssessor = qualityAssessor || new QualityAssessor();
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
|
-
* Optimize a prompt using Clavix Intelligence
|
|
14
|
+
* v4.11: Optimize a prompt using Clavix Intelligence
|
|
15
15
|
* @param prompt The prompt to optimize
|
|
16
|
-
* @param mode The optimization mode
|
|
17
|
-
* @param contextOverride Optional context override
|
|
16
|
+
* @param mode The optimization mode ('improve' | 'prd' | 'conversational')
|
|
17
|
+
* @param contextOverride Optional context override including depthLevel
|
|
18
18
|
*/
|
|
19
19
|
async optimize(prompt, mode, contextOverride) {
|
|
20
20
|
const startTime = Date.now();
|
|
@@ -26,10 +26,12 @@ export class UniversalOptimizer {
|
|
|
26
26
|
primaryIntent: contextOverride.intent,
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
+
// v4.11: Get depth level (explicit or auto-detected)
|
|
30
|
+
const depthLevel = contextOverride?.depthLevel;
|
|
29
31
|
// Step 2: Select applicable patterns using mode-aware selection
|
|
30
32
|
const patterns = mode === 'prd' || mode === 'conversational'
|
|
31
|
-
? this.patternLibrary.selectPatternsForMode(mode, intent, contextOverride?.phase)
|
|
32
|
-
: this.patternLibrary.selectPatterns(intent, mode);
|
|
33
|
+
? this.patternLibrary.selectPatternsForMode(mode, intent, contextOverride?.phase, depthLevel)
|
|
34
|
+
: this.patternLibrary.selectPatterns(intent, mode, depthLevel);
|
|
33
35
|
// Step 3: Apply patterns sequentially
|
|
34
36
|
let enhanced = prompt;
|
|
35
37
|
const improvements = [];
|
|
@@ -42,6 +44,8 @@ export class UniversalOptimizer {
|
|
|
42
44
|
phase: contextOverride?.phase,
|
|
43
45
|
documentType: contextOverride?.documentType,
|
|
44
46
|
questionId: contextOverride?.questionId,
|
|
47
|
+
// v4.11: Depth level for pattern selection
|
|
48
|
+
depthLevel,
|
|
45
49
|
};
|
|
46
50
|
for (const pattern of patterns) {
|
|
47
51
|
try {
|
|
@@ -73,6 +77,7 @@ export class UniversalOptimizer {
|
|
|
73
77
|
improvements,
|
|
74
78
|
appliedPatterns,
|
|
75
79
|
mode,
|
|
80
|
+
depthUsed: depthLevel, // v4.11: Track which depth was used
|
|
76
81
|
processingTimeMs,
|
|
77
82
|
};
|
|
78
83
|
}
|
|
@@ -122,15 +127,21 @@ export class UniversalOptimizer {
|
|
|
122
127
|
return `adding ${detail} would help`;
|
|
123
128
|
}
|
|
124
129
|
/**
|
|
125
|
-
* Determine if
|
|
130
|
+
* v4.11: Determine if comprehensive depth should be recommended
|
|
126
131
|
* @deprecated Use analyzeEscalation() for more detailed analysis
|
|
127
132
|
*/
|
|
128
|
-
|
|
133
|
+
shouldRecommendComprehensive(result) {
|
|
129
134
|
const escalation = this.analyzeEscalation(result);
|
|
130
135
|
return escalation.shouldEscalate;
|
|
131
136
|
}
|
|
132
137
|
/**
|
|
133
|
-
*
|
|
138
|
+
* @deprecated Use shouldRecommendComprehensive() instead
|
|
139
|
+
*/
|
|
140
|
+
shouldRecommendDeepMode(result) {
|
|
141
|
+
return this.shouldRecommendComprehensive(result);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* v4.11: Analyze whether to escalate from standard to comprehensive depth
|
|
134
145
|
* Uses multi-factor scoring for intelligent triage decisions
|
|
135
146
|
*
|
|
136
147
|
* IMPORTANT: Quality checks use the ORIGINAL prompt, not the enhanced one,
|
|
@@ -236,23 +247,23 @@ export class UniversalOptimizer {
|
|
|
236
247
|
else {
|
|
237
248
|
escalationConfidence = 'low';
|
|
238
249
|
}
|
|
239
|
-
// Generate
|
|
240
|
-
const
|
|
250
|
+
// v4.11: Generate comprehensive mode value proposition
|
|
251
|
+
const comprehensiveValue = this.generateComprehensiveValue(result, reasons);
|
|
241
252
|
return {
|
|
242
253
|
// Threshold of 45 ensures planning prompts with missing completeness trigger escalation
|
|
243
254
|
shouldEscalate: totalScore >= 45,
|
|
244
255
|
escalationScore: Math.min(totalScore, 100),
|
|
245
256
|
escalationConfidence,
|
|
246
257
|
reasons,
|
|
247
|
-
|
|
258
|
+
comprehensiveValue,
|
|
248
259
|
};
|
|
249
260
|
}
|
|
250
261
|
/**
|
|
251
|
-
* Generate a user-friendly explanation of what
|
|
262
|
+
* v4.11: Generate a user-friendly explanation of what comprehensive depth would provide
|
|
252
263
|
*/
|
|
253
|
-
|
|
264
|
+
generateComprehensiveValue(result, reasons) {
|
|
254
265
|
const benefits = [];
|
|
255
|
-
// Based on primary issues, suggest specific
|
|
266
|
+
// Based on primary issues, suggest specific comprehensive depth benefits
|
|
256
267
|
const hasLowQuality = reasons.some((r) => r.factor === 'low-quality');
|
|
257
268
|
const hasLowCompleteness = reasons.some((r) => r.factor === 'missing-completeness');
|
|
258
269
|
const hasHighAmbiguity = reasons.some((r) => r.factor === 'high-ambiguity');
|
|
@@ -277,22 +288,23 @@ export class UniversalOptimizer {
|
|
|
277
288
|
if (result.intent.primaryIntent === 'security-review') {
|
|
278
289
|
benefits.push('security checklist and threat analysis');
|
|
279
290
|
}
|
|
280
|
-
// Always include validation checklist for
|
|
291
|
+
// Always include validation checklist for comprehensive depth
|
|
281
292
|
benefits.push('validation checklist');
|
|
282
293
|
if (benefits.length === 0) {
|
|
283
|
-
return '
|
|
294
|
+
return 'Comprehensive analysis provides thorough examination with alternative approaches.';
|
|
284
295
|
}
|
|
285
|
-
return `
|
|
296
|
+
return `Comprehensive analysis would provide: ${benefits.join(', ')}.`;
|
|
286
297
|
}
|
|
287
298
|
/**
|
|
288
|
-
* Get recommendation message for user
|
|
289
|
-
*
|
|
299
|
+
* v4.11: Get recommendation message for user
|
|
300
|
+
* Enhanced with escalation analysis for improve mode
|
|
290
301
|
*/
|
|
291
302
|
getRecommendation(result) {
|
|
292
|
-
|
|
303
|
+
// v4.11: Check for escalation only in improve mode with standard depth
|
|
304
|
+
if (result.mode === 'improve' && result.depthUsed !== 'comprehensive') {
|
|
293
305
|
const escalation = this.analyzeEscalation(result);
|
|
294
306
|
if (escalation.shouldEscalate) {
|
|
295
|
-
return `${escalation.
|
|
307
|
+
return `${escalation.comprehensiveValue} Run: /clavix:improve --comprehensive`;
|
|
296
308
|
}
|
|
297
309
|
}
|
|
298
310
|
if (result.quality.overall >= 90) {
|
|
@@ -307,11 +319,14 @@ export class UniversalOptimizer {
|
|
|
307
319
|
return null;
|
|
308
320
|
}
|
|
309
321
|
/**
|
|
310
|
-
* v4.
|
|
322
|
+
* v4.11: Get detailed escalation recommendation with all reasons
|
|
311
323
|
* Useful for verbose output or debugging
|
|
312
324
|
*/
|
|
313
325
|
getDetailedRecommendation(result) {
|
|
314
|
-
|
|
326
|
+
// v4.11: Check escalation for improve mode with non-comprehensive depth
|
|
327
|
+
const escalation = result.mode === 'improve' && result.depthUsed !== 'comprehensive'
|
|
328
|
+
? this.analyzeEscalation(result)
|
|
329
|
+
: undefined;
|
|
315
330
|
let qualityLevel;
|
|
316
331
|
let message;
|
|
317
332
|
if (result.quality.overall >= 90) {
|
|
@@ -331,7 +346,7 @@ export class UniversalOptimizer {
|
|
|
331
346
|
message = 'This prompt needs improvement for best results.';
|
|
332
347
|
}
|
|
333
348
|
if (escalation?.shouldEscalate) {
|
|
334
|
-
message = `${escalation.
|
|
349
|
+
message = `${escalation.comprehensiveValue} Run: /clavix:improve --comprehensive`;
|
|
335
350
|
}
|
|
336
351
|
return {
|
|
337
352
|
message,
|
|
@@ -340,16 +355,16 @@ export class UniversalOptimizer {
|
|
|
340
355
|
};
|
|
341
356
|
}
|
|
342
357
|
/**
|
|
343
|
-
* Get statistics about the optimizer
|
|
358
|
+
* v4.11: Get statistics about the optimizer
|
|
344
359
|
*/
|
|
345
360
|
getStatistics() {
|
|
346
361
|
const totalPatterns = this.patternLibrary.getPatternCount();
|
|
347
|
-
const
|
|
348
|
-
const
|
|
362
|
+
const standardPatterns = this.patternLibrary.getPatternsByScope('standard').length;
|
|
363
|
+
const comprehensivePatterns = this.patternLibrary.getPatternsByScope('comprehensive').length;
|
|
349
364
|
return {
|
|
350
365
|
totalPatterns,
|
|
351
|
-
|
|
352
|
-
|
|
366
|
+
standardPatterns,
|
|
367
|
+
comprehensivePatterns,
|
|
353
368
|
};
|
|
354
369
|
}
|
|
355
370
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { DepthLevel } from './intelligence/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* v4.11: Unified prompt metadata
|
|
4
|
+
* Replaces separate fast/deep storage with single directory and depthUsed field
|
|
5
|
+
*/
|
|
2
6
|
export interface PromptMetadata {
|
|
3
7
|
id: string;
|
|
4
8
|
filename: string;
|
|
5
|
-
|
|
9
|
+
depthUsed: DepthLevel;
|
|
6
10
|
timestamp: string;
|
|
7
11
|
createdAt: Date;
|
|
8
12
|
path: string;
|
|
@@ -24,15 +28,15 @@ export interface PromptData {
|
|
|
24
28
|
content: string;
|
|
25
29
|
}
|
|
26
30
|
export interface PromptFilters {
|
|
27
|
-
|
|
31
|
+
depthUsed?: DepthLevel;
|
|
28
32
|
executed?: boolean;
|
|
29
33
|
stale?: boolean;
|
|
30
34
|
old?: boolean;
|
|
31
35
|
}
|
|
32
36
|
export interface StorageStats {
|
|
33
37
|
totalPrompts: number;
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
standardPrompts: number;
|
|
39
|
+
comprehensivePrompts: number;
|
|
36
40
|
executedPrompts: number;
|
|
37
41
|
pendingPrompts: number;
|
|
38
42
|
stalePrompts: number;
|
|
@@ -43,39 +47,39 @@ export declare class PromptManager {
|
|
|
43
47
|
private readonly promptsDir;
|
|
44
48
|
constructor(baseDir?: string);
|
|
45
49
|
/**
|
|
46
|
-
* Get index file path
|
|
50
|
+
* v4.11: Get unified index file path
|
|
47
51
|
*/
|
|
48
52
|
private getIndexPath;
|
|
49
53
|
/**
|
|
50
|
-
* Ensure prompts directory
|
|
54
|
+
* v4.11: Ensure prompts directory exists (single directory)
|
|
51
55
|
*/
|
|
52
56
|
ensurePromptsDir(): Promise<void>;
|
|
53
57
|
/**
|
|
54
|
-
* Generate unique prompt ID with
|
|
58
|
+
* v4.11: Generate unique prompt ID with depth and timestamp
|
|
55
59
|
*/
|
|
56
|
-
generatePromptId(
|
|
60
|
+
generatePromptId(depthLevel: DepthLevel, _originalPrompt: string): string;
|
|
57
61
|
/**
|
|
58
|
-
* Save optimized prompt to file system
|
|
62
|
+
* v4.11: Save optimized prompt to file system
|
|
59
63
|
*/
|
|
60
|
-
savePrompt(content: string,
|
|
64
|
+
savePrompt(content: string, depthUsed: DepthLevel, originalPrompt: string, linkedProject?: string): Promise<PromptMetadata>;
|
|
61
65
|
/**
|
|
62
|
-
* Load prompt by ID
|
|
66
|
+
* v4.11: Load prompt by ID
|
|
63
67
|
*/
|
|
64
68
|
loadPrompt(id: string): Promise<PromptData | null>;
|
|
65
69
|
/**
|
|
66
|
-
* List prompts with optional filtering
|
|
70
|
+
* v4.11: List prompts with optional filtering
|
|
67
71
|
*/
|
|
68
72
|
listPrompts(filters?: PromptFilters): Promise<PromptMetadata[]>;
|
|
69
73
|
/**
|
|
70
|
-
* Mark prompt as executed
|
|
74
|
+
* v4.11: Mark prompt as executed
|
|
71
75
|
*/
|
|
72
76
|
markExecuted(id: string): Promise<void>;
|
|
73
77
|
/**
|
|
74
|
-
* Mark prompt as verified (v4.8)
|
|
78
|
+
* v4.11: Mark prompt as verified (v4.8)
|
|
75
79
|
*/
|
|
76
80
|
markVerified(id: string): Promise<void>;
|
|
77
81
|
/**
|
|
78
|
-
* Delete prompts by filter
|
|
82
|
+
* v4.11: Delete prompts by filter
|
|
79
83
|
*/
|
|
80
84
|
deletePrompts(filters: PromptFilters): Promise<number>;
|
|
81
85
|
/**
|
|
@@ -87,21 +91,19 @@ export declare class PromptManager {
|
|
|
87
91
|
*/
|
|
88
92
|
getStalePrompts(_daysOld?: number): Promise<PromptMetadata[]>;
|
|
89
93
|
/**
|
|
90
|
-
* Get storage statistics
|
|
94
|
+
* v4.11: Get storage statistics
|
|
91
95
|
*/
|
|
92
96
|
getStorageStats(): Promise<StorageStats>;
|
|
93
97
|
/**
|
|
94
|
-
* Load index from file
|
|
95
|
-
* If source is specified, loads that source's index only
|
|
96
|
-
* If source is undefined, loads and merges all source indexes
|
|
98
|
+
* v4.11: Load unified index from file
|
|
97
99
|
*/
|
|
98
100
|
private loadIndex;
|
|
99
101
|
/**
|
|
100
|
-
* Save index to file
|
|
102
|
+
* v4.11: Save unified index to file
|
|
101
103
|
*/
|
|
102
104
|
private saveIndex;
|
|
103
105
|
/**
|
|
104
|
-
* Add prompt to index
|
|
106
|
+
* v4.11: Add prompt to unified index
|
|
105
107
|
*/
|
|
106
108
|
private addToIndex;
|
|
107
109
|
}
|