clavix 4.4.0 → 4.5.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/core/adapters/instructions-generator.d.ts +2 -1
- package/dist/core/adapters/instructions-generator.js +21 -8
- package/dist/core/intelligence/confidence-calculator.d.ts +93 -0
- package/dist/core/intelligence/confidence-calculator.js +124 -0
- package/dist/core/intelligence/index.d.ts +1 -0
- package/dist/core/intelligence/index.js +2 -0
- package/dist/core/intelligence/intent-detector.js +10 -8
- package/dist/core/intelligence/pattern-library.d.ts +34 -12
- package/dist/core/intelligence/pattern-library.js +120 -85
- package/dist/core/intelligence/patterns/actionability-enhancer.d.ts +10 -10
- package/dist/core/intelligence/patterns/actionability-enhancer.js +31 -6
- package/dist/core/intelligence/patterns/alternative-phrasing-generator.d.ts +10 -8
- package/dist/core/intelligence/patterns/alternative-phrasing-generator.js +21 -3
- package/dist/core/intelligence/patterns/ambiguity-detector.d.ts +10 -8
- package/dist/core/intelligence/patterns/ambiguity-detector.js +31 -3
- package/dist/core/intelligence/patterns/assumption-explicitizer.d.ts +10 -8
- package/dist/core/intelligence/patterns/assumption-explicitizer.js +26 -3
- package/dist/core/intelligence/patterns/base-pattern.d.ts +166 -8
- package/dist/core/intelligence/patterns/base-pattern.js +64 -4
- package/dist/core/intelligence/patterns/completeness-validator.d.ts +10 -10
- package/dist/core/intelligence/patterns/completeness-validator.js +26 -5
- package/dist/core/intelligence/patterns/conciseness-filter.d.ts +15 -7
- package/dist/core/intelligence/patterns/conciseness-filter.js +36 -4
- package/dist/core/intelligence/patterns/context-precision.d.ts +10 -8
- package/dist/core/intelligence/patterns/context-precision.js +28 -5
- package/dist/core/intelligence/patterns/conversation-summarizer.d.ts +11 -9
- package/dist/core/intelligence/patterns/conversation-summarizer.js +40 -16
- package/dist/core/intelligence/patterns/dependency-identifier.d.ts +11 -9
- package/dist/core/intelligence/patterns/dependency-identifier.js +21 -4
- package/dist/core/intelligence/patterns/domain-context-enricher.d.ts +10 -8
- package/dist/core/intelligence/patterns/domain-context-enricher.js +27 -3
- package/dist/core/intelligence/patterns/edge-case-identifier.d.ts +10 -8
- package/dist/core/intelligence/patterns/edge-case-identifier.js +21 -3
- package/dist/core/intelligence/patterns/error-tolerance-enhancer.d.ts +10 -8
- package/dist/core/intelligence/patterns/error-tolerance-enhancer.js +22 -4
- package/dist/core/intelligence/patterns/implicit-requirement-extractor.d.ts +11 -9
- package/dist/core/intelligence/patterns/implicit-requirement-extractor.js +27 -4
- package/dist/core/intelligence/patterns/objective-clarifier.d.ts +15 -7
- package/dist/core/intelligence/patterns/objective-clarifier.js +46 -17
- package/dist/core/intelligence/patterns/output-format-enforcer.d.ts +10 -8
- package/dist/core/intelligence/patterns/output-format-enforcer.js +20 -3
- package/dist/core/intelligence/patterns/prd-structure-enforcer.d.ts +10 -8
- package/dist/core/intelligence/patterns/prd-structure-enforcer.js +25 -3
- package/dist/core/intelligence/patterns/prerequisite-identifier.d.ts +10 -8
- package/dist/core/intelligence/patterns/prerequisite-identifier.js +28 -4
- package/dist/core/intelligence/patterns/requirement-prioritizer.d.ts +11 -9
- package/dist/core/intelligence/patterns/requirement-prioritizer.js +21 -4
- package/dist/core/intelligence/patterns/scope-definer.d.ts +10 -8
- package/dist/core/intelligence/patterns/scope-definer.js +27 -3
- package/dist/core/intelligence/patterns/step-decomposer.d.ts +10 -8
- package/dist/core/intelligence/patterns/step-decomposer.js +21 -3
- package/dist/core/intelligence/patterns/structure-organizer.d.ts +10 -10
- package/dist/core/intelligence/patterns/structure-organizer.js +25 -5
- package/dist/core/intelligence/patterns/success-criteria-enforcer.d.ts +10 -8
- package/dist/core/intelligence/patterns/success-criteria-enforcer.js +20 -3
- package/dist/core/intelligence/patterns/success-metrics-enforcer.d.ts +11 -9
- package/dist/core/intelligence/patterns/success-metrics-enforcer.js +27 -4
- package/dist/core/intelligence/patterns/technical-context-enricher.d.ts +16 -7
- package/dist/core/intelligence/patterns/technical-context-enricher.js +71 -38
- package/dist/core/intelligence/patterns/topic-coherence-analyzer.d.ts +11 -9
- package/dist/core/intelligence/patterns/topic-coherence-analyzer.js +22 -4
- package/dist/core/intelligence/patterns/user-persona-enricher.d.ts +11 -9
- package/dist/core/intelligence/patterns/user-persona-enricher.js +21 -4
- package/dist/core/intelligence/patterns/validation-checklist-creator.d.ts +11 -8
- package/dist/core/intelligence/patterns/validation-checklist-creator.js +31 -3
- package/dist/templates/slash-commands/_components/references/intent-types.md +3 -1
- package/dist/templates/slash-commands/_components/sections/pattern-visibility.md +9 -9
- package/package.json +1 -1
|
@@ -1,11 +1,44 @@
|
|
|
1
|
-
import { BasePattern } from './base-pattern.js';
|
|
1
|
+
import { BasePattern, } from './base-pattern.js';
|
|
2
|
+
/**
|
|
3
|
+
* v4.5 Pattern: Technical Context Enricher
|
|
4
|
+
*
|
|
5
|
+
* Adds missing technical context (language, framework, versions).
|
|
6
|
+
* Detects technologies and suggests version specifications.
|
|
7
|
+
*/
|
|
2
8
|
export class TechnicalContextEnricher extends BasePattern {
|
|
9
|
+
// -------------------------------------------------------------------------
|
|
10
|
+
// Pattern Metadata (v4.5 unified types)
|
|
11
|
+
// -------------------------------------------------------------------------
|
|
3
12
|
id = 'technical-context-enricher';
|
|
4
13
|
name = 'Technical Context Enricher';
|
|
5
14
|
description = 'Adds missing technical context (language, framework, versions)';
|
|
6
15
|
applicableIntents = ['code-generation', 'refinement', 'debugging'];
|
|
7
16
|
mode = 'both';
|
|
8
|
-
priority =
|
|
17
|
+
priority = 5; // MEDIUM-LOW - supplementary context
|
|
18
|
+
phases = ['all'];
|
|
19
|
+
// v4.5: Dependencies
|
|
20
|
+
dependencies = {
|
|
21
|
+
runAfter: ['objective-clarifier'], // Clarify objective first, then add technical context
|
|
22
|
+
enhancedBy: ['domain-context-enricher'],
|
|
23
|
+
};
|
|
24
|
+
// -------------------------------------------------------------------------
|
|
25
|
+
// Configuration Schema (v4.5)
|
|
26
|
+
// -------------------------------------------------------------------------
|
|
27
|
+
static configSchema = {
|
|
28
|
+
detectFrameworks: {
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
default: true,
|
|
31
|
+
description: 'Detect and add framework information',
|
|
32
|
+
},
|
|
33
|
+
suggestVersions: {
|
|
34
|
+
type: 'boolean',
|
|
35
|
+
default: true,
|
|
36
|
+
description: 'Suggest adding version information when missing',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
// -------------------------------------------------------------------------
|
|
40
|
+
// Pattern Application
|
|
41
|
+
// -------------------------------------------------------------------------
|
|
9
42
|
apply(prompt, context) {
|
|
10
43
|
const lowerPrompt = prompt.toLowerCase();
|
|
11
44
|
const enhancements = [];
|
|
@@ -16,9 +49,9 @@ export class TechnicalContextEnricher extends BasePattern {
|
|
|
16
49
|
improvement: {
|
|
17
50
|
dimension: 'completeness',
|
|
18
51
|
description: 'Technical context already specified',
|
|
19
|
-
impact: 'low'
|
|
52
|
+
impact: 'low',
|
|
20
53
|
},
|
|
21
|
-
applied: false
|
|
54
|
+
applied: false,
|
|
22
55
|
};
|
|
23
56
|
}
|
|
24
57
|
// Detect language mentions without versions
|
|
@@ -40,22 +73,22 @@ export class TechnicalContextEnricher extends BasePattern {
|
|
|
40
73
|
improvement: {
|
|
41
74
|
dimension: 'completeness',
|
|
42
75
|
description: 'No additional technical context needed',
|
|
43
|
-
impact: 'low'
|
|
76
|
+
impact: 'low',
|
|
44
77
|
},
|
|
45
|
-
applied: false
|
|
78
|
+
applied: false,
|
|
46
79
|
};
|
|
47
80
|
}
|
|
48
81
|
// Add technical context section
|
|
49
|
-
const contextSection = `\n\n# Technical Constraints\n${enhancements.map(e => `- ${e}`).join('\n')}`;
|
|
82
|
+
const contextSection = `\n\n# Technical Constraints\n${enhancements.map((e) => `- ${e}`).join('\n')}`;
|
|
50
83
|
const enhanced = prompt + contextSection;
|
|
51
84
|
return {
|
|
52
85
|
enhancedPrompt: enhanced,
|
|
53
86
|
improvement: {
|
|
54
87
|
dimension: 'completeness',
|
|
55
88
|
description: `Added ${enhancements.length} technical context specifications`,
|
|
56
|
-
impact: 'medium'
|
|
89
|
+
impact: 'medium',
|
|
57
90
|
},
|
|
58
|
-
applied: true
|
|
91
|
+
applied: true,
|
|
59
92
|
};
|
|
60
93
|
}
|
|
61
94
|
hasTechnicalContext(prompt) {
|
|
@@ -63,25 +96,25 @@ export class TechnicalContextEnricher extends BasePattern {
|
|
|
63
96
|
/version|v\d+\.\d+/i,
|
|
64
97
|
/technical (context|constraints|requirements)/i,
|
|
65
98
|
/language:.*framework:/i,
|
|
66
|
-
/using (python|javascript|typescript|java|rust|go) \d/i
|
|
99
|
+
/using (python|javascript|typescript|java|rust|go) \d/i,
|
|
67
100
|
];
|
|
68
|
-
return contextMarkers.some(marker => marker.test(prompt));
|
|
101
|
+
return contextMarkers.some((marker) => marker.test(prompt));
|
|
69
102
|
}
|
|
70
103
|
detectLanguage(prompt) {
|
|
71
104
|
const languages = {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
105
|
+
python: 'Python',
|
|
106
|
+
javascript: 'JavaScript',
|
|
107
|
+
typescript: 'TypeScript',
|
|
108
|
+
java: 'Java',
|
|
109
|
+
rust: 'Rust',
|
|
110
|
+
go: 'Go',
|
|
111
|
+
php: 'PHP',
|
|
112
|
+
ruby: 'Ruby',
|
|
113
|
+
swift: 'Swift',
|
|
114
|
+
kotlin: 'Kotlin',
|
|
82
115
|
'c++': 'C++',
|
|
83
|
-
|
|
84
|
-
'c#': 'C#'
|
|
116
|
+
csharp: 'C#',
|
|
117
|
+
'c#': 'C#',
|
|
85
118
|
};
|
|
86
119
|
for (const [key, name] of Object.entries(languages)) {
|
|
87
120
|
if (prompt.includes(key)) {
|
|
@@ -102,21 +135,21 @@ export class TechnicalContextEnricher extends BasePattern {
|
|
|
102
135
|
}
|
|
103
136
|
detectFramework(prompt) {
|
|
104
137
|
const frameworks = {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
138
|
+
react: 'React',
|
|
139
|
+
vue: 'Vue.js',
|
|
140
|
+
angular: 'Angular',
|
|
141
|
+
svelte: 'Svelte',
|
|
142
|
+
next: 'Next.js',
|
|
143
|
+
nextjs: 'Next.js',
|
|
144
|
+
nuxt: 'Nuxt.js',
|
|
145
|
+
django: 'Django',
|
|
146
|
+
flask: 'Flask',
|
|
147
|
+
fastapi: 'FastAPI',
|
|
148
|
+
express: 'Express.js',
|
|
149
|
+
nestjs: 'NestJS',
|
|
150
|
+
spring: 'Spring Boot',
|
|
151
|
+
rails: 'Ruby on Rails',
|
|
152
|
+
laravel: 'Laravel',
|
|
120
153
|
};
|
|
121
154
|
for (const [key, name] of Object.entries(frameworks)) {
|
|
122
155
|
if (prompt.includes(key)) {
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { BasePattern } from './base-pattern.js';
|
|
2
|
-
import { PromptIntent,
|
|
1
|
+
import { BasePattern, PatternMode, PatternPriority, PatternPhase, PatternConfigSchema } from './base-pattern.js';
|
|
2
|
+
import { PromptIntent, PatternContext, PatternResult } from '../types.js';
|
|
3
3
|
/**
|
|
4
|
-
* v4.
|
|
4
|
+
* v4.5 Pattern: Topic Coherence Analyzer
|
|
5
5
|
*
|
|
6
6
|
* Detects topic shifts and multi-topic conversations.
|
|
7
7
|
* Helps organize scattered discussions into coherent themes.
|
|
8
8
|
* Enhanced with expanded topic dictionary and better detection.
|
|
9
9
|
*/
|
|
10
10
|
export declare class TopicCoherenceAnalyzer extends BasePattern {
|
|
11
|
-
id
|
|
12
|
-
name
|
|
13
|
-
description
|
|
14
|
-
applicableIntents: PromptIntent[];
|
|
15
|
-
mode:
|
|
16
|
-
priority:
|
|
11
|
+
readonly id = "topic-coherence-analyzer";
|
|
12
|
+
readonly name = "Topic Coherence Analyzer";
|
|
13
|
+
readonly description = "Detects topic shifts and multi-topic conversations";
|
|
14
|
+
readonly applicableIntents: PromptIntent[];
|
|
15
|
+
readonly mode: PatternMode;
|
|
16
|
+
readonly priority: PatternPriority;
|
|
17
|
+
readonly phases: PatternPhase[];
|
|
18
|
+
static readonly configSchema: PatternConfigSchema;
|
|
17
19
|
private readonly topicIndicators;
|
|
18
20
|
apply(prompt: string, _context: PatternContext): PatternResult;
|
|
19
21
|
private detectTopics;
|
|
@@ -1,18 +1,36 @@
|
|
|
1
|
-
import { BasePattern } from './base-pattern.js';
|
|
1
|
+
import { BasePattern, } from './base-pattern.js';
|
|
2
2
|
/**
|
|
3
|
-
* v4.
|
|
3
|
+
* v4.5 Pattern: Topic Coherence Analyzer
|
|
4
4
|
*
|
|
5
5
|
* Detects topic shifts and multi-topic conversations.
|
|
6
6
|
* Helps organize scattered discussions into coherent themes.
|
|
7
7
|
* Enhanced with expanded topic dictionary and better detection.
|
|
8
8
|
*/
|
|
9
9
|
export class TopicCoherenceAnalyzer extends BasePattern {
|
|
10
|
+
// -------------------------------------------------------------------------
|
|
11
|
+
// Pattern Metadata (v4.5 unified types)
|
|
12
|
+
// -------------------------------------------------------------------------
|
|
10
13
|
id = 'topic-coherence-analyzer';
|
|
11
|
-
name = '
|
|
14
|
+
name = 'Topic Coherence Analyzer';
|
|
12
15
|
description = 'Detects topic shifts and multi-topic conversations';
|
|
13
16
|
applicableIntents = ['summarization', 'planning'];
|
|
14
17
|
mode = 'deep';
|
|
15
|
-
priority = 6;
|
|
18
|
+
priority = 6; // MEDIUM - standard enhancement
|
|
19
|
+
phases = ['conversation-tracking', 'summarization'];
|
|
20
|
+
// -------------------------------------------------------------------------
|
|
21
|
+
// Configuration Schema (v4.5)
|
|
22
|
+
// -------------------------------------------------------------------------
|
|
23
|
+
static configSchema = {
|
|
24
|
+
minTopicsForOrganization: {
|
|
25
|
+
type: 'number',
|
|
26
|
+
default: 2,
|
|
27
|
+
description: 'Minimum number of topics before organizing',
|
|
28
|
+
validation: { min: 2, max: 5 },
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
// -------------------------------------------------------------------------
|
|
32
|
+
// Pattern Data
|
|
33
|
+
// -------------------------------------------------------------------------
|
|
16
34
|
// Expanded topic indicators (~15 topics with more keywords)
|
|
17
35
|
topicIndicators = {
|
|
18
36
|
'User Interface': [
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { BasePattern } from './base-pattern.js';
|
|
2
|
-
import { PromptIntent,
|
|
1
|
+
import { BasePattern, PatternMode, PatternPriority, PatternPhase, PatternConfigSchema } from './base-pattern.js';
|
|
2
|
+
import { PromptIntent, PatternContext, PatternResult } from '../types.js';
|
|
3
3
|
/**
|
|
4
|
-
* v4.
|
|
4
|
+
* v4.5 Pattern: User Persona Enricher
|
|
5
5
|
*
|
|
6
6
|
* Adds missing user context and personas to PRD content.
|
|
7
7
|
* Ensures the "who" is clearly defined alongside the "what".
|
|
8
8
|
*/
|
|
9
9
|
export declare class UserPersonaEnricher extends BasePattern {
|
|
10
|
-
id
|
|
11
|
-
name
|
|
12
|
-
description
|
|
13
|
-
applicableIntents: PromptIntent[];
|
|
14
|
-
mode:
|
|
15
|
-
priority:
|
|
10
|
+
readonly id = "user-persona-enricher";
|
|
11
|
+
readonly name = "User Persona Enricher";
|
|
12
|
+
readonly description = "Adds missing user context and personas";
|
|
13
|
+
readonly applicableIntents: PromptIntent[];
|
|
14
|
+
readonly mode: PatternMode;
|
|
15
|
+
readonly priority: PatternPriority;
|
|
16
|
+
readonly phases: PatternPhase[];
|
|
17
|
+
static readonly configSchema: PatternConfigSchema;
|
|
16
18
|
apply(prompt: string, _context: PatternContext): PatternResult;
|
|
17
19
|
private hasUserContext;
|
|
18
20
|
private needsUserContext;
|
|
@@ -1,17 +1,34 @@
|
|
|
1
|
-
import { BasePattern } from './base-pattern.js';
|
|
1
|
+
import { BasePattern, } from './base-pattern.js';
|
|
2
2
|
/**
|
|
3
|
-
* v4.
|
|
3
|
+
* v4.5 Pattern: User Persona Enricher
|
|
4
4
|
*
|
|
5
5
|
* Adds missing user context and personas to PRD content.
|
|
6
6
|
* Ensures the "who" is clearly defined alongside the "what".
|
|
7
7
|
*/
|
|
8
8
|
export class UserPersonaEnricher extends BasePattern {
|
|
9
|
+
// -------------------------------------------------------------------------
|
|
10
|
+
// Pattern Metadata (v4.5 unified types)
|
|
11
|
+
// -------------------------------------------------------------------------
|
|
9
12
|
id = 'user-persona-enricher';
|
|
10
|
-
name = '
|
|
13
|
+
name = 'User Persona Enricher';
|
|
11
14
|
description = 'Adds missing user context and personas';
|
|
12
15
|
applicableIntents = ['prd-generation', 'planning'];
|
|
13
16
|
mode = 'deep';
|
|
14
|
-
priority = 6;
|
|
17
|
+
priority = 6; // MEDIUM - standard enhancement
|
|
18
|
+
phases = ['question-validation', 'output-generation'];
|
|
19
|
+
// -------------------------------------------------------------------------
|
|
20
|
+
// Configuration Schema (v4.5)
|
|
21
|
+
// -------------------------------------------------------------------------
|
|
22
|
+
static configSchema = {
|
|
23
|
+
inferUserType: {
|
|
24
|
+
type: 'boolean',
|
|
25
|
+
default: true,
|
|
26
|
+
description: 'Attempt to infer user type from content',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
// -------------------------------------------------------------------------
|
|
30
|
+
// Pattern Application
|
|
31
|
+
// -------------------------------------------------------------------------
|
|
15
32
|
apply(prompt, _context) {
|
|
16
33
|
// Check if user/persona context already exists
|
|
17
34
|
if (this.hasUserContext(prompt)) {
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { BasePattern } from './base-pattern.js';
|
|
1
|
+
import { BasePattern, PatternMode, PatternPriority, PatternPhase, PatternConfigSchema, PatternDependency } from './base-pattern.js';
|
|
2
2
|
import { PromptIntent, PatternContext, PatternResult } from '../types.js';
|
|
3
3
|
/**
|
|
4
|
-
* v4.
|
|
4
|
+
* v4.5 Pattern: Validation Checklist Creator
|
|
5
5
|
*
|
|
6
6
|
* Creates implementation validation checklists to ensure
|
|
7
7
|
* comprehensive verification of completed work.
|
|
8
8
|
*/
|
|
9
9
|
export declare class ValidationChecklistCreator extends BasePattern {
|
|
10
|
-
id
|
|
11
|
-
name
|
|
12
|
-
description
|
|
13
|
-
applicableIntents: PromptIntent[];
|
|
14
|
-
mode:
|
|
15
|
-
priority:
|
|
10
|
+
readonly id = "validation-checklist-creator";
|
|
11
|
+
readonly name = "Validation Checklist Creator";
|
|
12
|
+
readonly description = "Create implementation validation checklist for verification";
|
|
13
|
+
readonly applicableIntents: PromptIntent[];
|
|
14
|
+
readonly mode: PatternMode;
|
|
15
|
+
readonly priority: PatternPriority;
|
|
16
|
+
readonly phases: PatternPhase[];
|
|
17
|
+
readonly dependencies: PatternDependency;
|
|
18
|
+
static readonly configSchema: PatternConfigSchema;
|
|
16
19
|
apply(prompt: string, context: PatternContext): PatternResult;
|
|
17
20
|
private createChecklist;
|
|
18
21
|
private getCodeGenerationChecklist;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { BasePattern } from './base-pattern.js';
|
|
1
|
+
import { BasePattern, } from './base-pattern.js';
|
|
2
2
|
/**
|
|
3
|
-
* v4.
|
|
3
|
+
* v4.5 Pattern: Validation Checklist Creator
|
|
4
4
|
*
|
|
5
5
|
* Creates implementation validation checklists to ensure
|
|
6
6
|
* comprehensive verification of completed work.
|
|
7
7
|
*/
|
|
8
8
|
export class ValidationChecklistCreator extends BasePattern {
|
|
9
|
+
// -------------------------------------------------------------------------
|
|
10
|
+
// Pattern Metadata (v4.5 unified types)
|
|
11
|
+
// -------------------------------------------------------------------------
|
|
9
12
|
id = 'validation-checklist-creator';
|
|
10
13
|
name = 'Validation Checklist Creator';
|
|
11
14
|
description = 'Create implementation validation checklist for verification';
|
|
@@ -17,7 +20,32 @@ export class ValidationChecklistCreator extends BasePattern {
|
|
|
17
20
|
'debugging',
|
|
18
21
|
];
|
|
19
22
|
mode = 'deep';
|
|
20
|
-
priority = 3;
|
|
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
|
+
// -------------------------------------------------------------------------
|
|
21
49
|
apply(prompt, context) {
|
|
22
50
|
const checklist = this.createChecklist(prompt, context.intent.primaryIntent);
|
|
23
51
|
if (checklist.length === 0) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## Intent Types Reference
|
|
2
2
|
|
|
3
|
-
Clavix Intelligence™ detects
|
|
3
|
+
Clavix Intelligence™ detects 11 primary intent types. This reference is synchronized with `src/core/intelligence/types.ts`.
|
|
4
4
|
|
|
5
5
|
### Intent Categories
|
|
6
6
|
|
|
@@ -16,6 +16,7 @@ Clavix Intelligence™ detects 10 primary intent types. This reference is synchr
|
|
|
16
16
|
| **migration** | Version upgrades, porting code | "migrate", "upgrade", "port", "convert", "transition" |
|
|
17
17
|
| **security-review** | Security audits, vulnerability checks | "security", "audit", "vulnerability", "OWASP", "CVE" |
|
|
18
18
|
| **learning** | Conceptual understanding, tutorials | "explain", "how does", "tutorial", "understand" |
|
|
19
|
+
| **summarization** | Extracting requirements from conversations | "summarize", "extract", "requirements from" |
|
|
19
20
|
|
|
20
21
|
### Intent Detection Confidence Levels
|
|
21
22
|
|
|
@@ -35,3 +36,4 @@ Different intents enable different optimization patterns:
|
|
|
35
36
|
- **debugging**: ErrorToleranceEnhancer, EdgeCaseIdentifier
|
|
36
37
|
- **testing**: ValidationChecklistCreator, EdgeCaseIdentifier
|
|
37
38
|
- **prd-generation**: PRDStructureEnforcer, CompletenessValidator
|
|
39
|
+
- **summarization**: ConversationSummarizer, TopicCoherenceAnalyzer, ImplicitRequirementExtractor
|
|
@@ -46,19 +46,19 @@ Patterns: 7 applied (deep mode)
|
|
|
46
46
|
**Core Patterns (fast + deep):**
|
|
47
47
|
| Pattern | Priority | What It Does |
|
|
48
48
|
|---------|----------|--------------|
|
|
49
|
-
| ConcisenessFilter |
|
|
49
|
+
| ConcisenessFilter | 4 | Removes pleasantries, filler words, redundant phrases |
|
|
50
50
|
| ObjectiveClarifier | 9 | Adds clear objective/goal statement if missing |
|
|
51
51
|
| StructureOrganizer | 8 | Reorders into logical flow: context→requirements→constraints→output |
|
|
52
|
-
| ActionabilityEnhancer |
|
|
53
|
-
| TechnicalContextEnricher |
|
|
52
|
+
| ActionabilityEnhancer | 4 | Converts vague language to specific, actionable terms |
|
|
53
|
+
| TechnicalContextEnricher | 5 | Adds missing technical context (frameworks, tools, versions) |
|
|
54
54
|
| CompletenessValidator | 6 | Identifies and flags missing required elements |
|
|
55
|
-
| StepDecomposer |
|
|
56
|
-
| ContextPrecisionBooster |
|
|
55
|
+
| StepDecomposer | 5 | Breaks complex prompts into sequential steps |
|
|
56
|
+
| ContextPrecisionBooster | 6 | Adds precise context when missing |
|
|
57
57
|
|
|
58
58
|
**Deep Mode Exclusive Patterns:**
|
|
59
59
|
| Pattern | Priority | What It Does |
|
|
60
60
|
|---------|----------|--------------|
|
|
61
|
-
| AlternativePhrasingGenerator |
|
|
61
|
+
| AlternativePhrasingGenerator | 3 | Generates 2-3 alternative prompt structures |
|
|
62
62
|
| EdgeCaseIdentifier | 4 | Identifies domain-specific edge cases |
|
|
63
63
|
| ValidationChecklistCreator | 3 | Creates implementation verification checklist |
|
|
64
64
|
| AssumptionExplicitizer | 6 | Makes implicit assumptions explicit |
|
|
@@ -72,7 +72,7 @@ Patterns: 7 applied (deep mode)
|
|
|
72
72
|
|---------|----------|--------------|
|
|
73
73
|
| AmbiguityDetector | 9 | Identifies and flags ambiguous terms |
|
|
74
74
|
| OutputFormatEnforcer | 7 | Adds explicit output format specifications |
|
|
75
|
-
| SuccessCriteriaEnforcer |
|
|
75
|
+
| SuccessCriteriaEnforcer | 7 | Adds measurable success criteria |
|
|
76
76
|
| DomainContextEnricher | 5 | Adds domain-specific best practices |
|
|
77
77
|
|
|
78
78
|
**v4.3.2 PRD Mode Patterns (deep mode):**
|
|
@@ -88,7 +88,7 @@ Patterns: 7 applied (deep mode)
|
|
|
88
88
|
|---------|----------|--------------|
|
|
89
89
|
| ConversationSummarizer | 8 | Extracts structured requirements from messages |
|
|
90
90
|
| TopicCoherenceAnalyzer | 6 | Detects topic shifts and multi-topic conversations |
|
|
91
|
-
| ImplicitRequirementExtractor |
|
|
91
|
+
| ImplicitRequirementExtractor | 5 | Surfaces requirements mentioned indirectly |
|
|
92
92
|
|
|
93
93
|
### Pattern Selection Logic
|
|
94
94
|
|
|
@@ -137,7 +137,7 @@ v4.3.2 Conversational mode (deep):
|
|
|
137
137
|
|
|
138
138
|
| Mode | Patterns Available | Typical Applied |
|
|
139
139
|
|------|-------------------|-----------------|
|
|
140
|
-
| Fast |
|
|
140
|
+
| Fast | 12 core patterns | 4-7 patterns |
|
|
141
141
|
| Deep | 27 total patterns | 8-14 patterns |
|
|
142
142
|
| PRD | 15 patterns | 10-15 patterns |
|
|
143
143
|
| Conversational | 11 patterns | 6-11 patterns |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavix",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.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",
|