clavix 5.0.1 → 5.1.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.
Files changed (39) hide show
  1. package/dist/cli/commands/init.js +2 -3
  2. package/dist/cli/commands/update.js +1 -2
  3. package/dist/core/doc-injector.d.ts +2 -2
  4. package/dist/core/doc-injector.js +12 -12
  5. package/dist/templates/agents/agents.md +3 -4
  6. package/dist/templates/agents/copilot-instructions.md +4 -5
  7. package/dist/templates/agents/octo.md +7 -8
  8. package/dist/templates/agents/warp.md +3 -4
  9. package/dist/templates/instructions/README.md +12 -14
  10. package/dist/templates/instructions/core/clavix-mode.md +10 -25
  11. package/dist/templates/instructions/core/mode-enforcement.md +10 -11
  12. package/dist/templates/slash-commands/_canonical/archive.md +1 -1
  13. package/dist/templates/slash-commands/_canonical/implement.md +227 -14
  14. package/dist/templates/slash-commands/_canonical/improve.md +7 -7
  15. package/dist/templates/slash-commands/_canonical/plan.md +1 -1
  16. package/dist/templates/slash-commands/_canonical/prd.md +1 -1
  17. package/dist/templates/slash-commands/_canonical/start.md +1 -1
  18. package/dist/templates/slash-commands/_canonical/summarize.md +3 -3
  19. package/dist/templates/slash-commands/_canonical/verify.md +5 -5
  20. package/package.json +1 -1
  21. package/dist/templates/slash-commands/_canonical/execute.md +0 -276
  22. package/dist/templates/slash-commands/_components/agent-protocols/assertion-checkpoints.md +0 -122
  23. package/dist/templates/slash-commands/_components/agent-protocols/file-formats.md +0 -169
  24. package/dist/templates/slash-commands/_components/agent-protocols/quality-output.md +0 -94
  25. package/dist/templates/slash-commands/_components/agent-protocols/self-correction.md +0 -61
  26. package/dist/templates/slash-commands/_components/agent-protocols/state-assertion.md +0 -51
  27. package/dist/templates/slash-commands/_components/agent-protocols/verification-methods.md +0 -184
  28. package/dist/templates/slash-commands/_components/mode-headers/implementation-mode.md +0 -21
  29. package/dist/templates/slash-commands/_components/mode-headers/planning-mode.md +0 -17
  30. package/dist/templates/slash-commands/_components/mode-headers/self-correction.md +0 -13
  31. package/dist/templates/slash-commands/_components/references/intent-types.md +0 -39
  32. package/dist/templates/slash-commands/_components/sections/file-saving-protocol.md +0 -40
  33. package/dist/templates/slash-commands/_components/sections/intent-detection.md +0 -24
  34. package/dist/templates/slash-commands/_components/sections/pattern-visibility.md +0 -122
  35. package/dist/templates/slash-commands/_components/sections/quality-assessment.md +0 -26
  36. package/dist/templates/slash-commands/_components/sections/workflow-navigation.md +0 -13
  37. package/dist/templates/slash-commands/_components/troubleshooting/file-not-saved.md +0 -19
  38. package/dist/templates/slash-commands/_components/troubleshooting/mode-confusion.md +0 -46
  39. package/dist/templates/slash-commands/_components/troubleshooting/triage-escalation.md +0 -26
@@ -1,61 +0,0 @@
1
- ## Self-Correction Protocol
2
-
3
- **DETECT**: If you find yourself doing any of these 6 mistake types:
4
-
5
- ### Mistake Type 1: Implementation Code
6
- - Writing function/class definitions for the user's feature
7
- - Creating component implementations
8
- - Generating API endpoint code
9
- - Writing test files for the user's feature
10
- - Creating database schemas/migrations
11
- - Writing configuration files for deployment
12
- - **Reading project files to "understand context" before showing analysis**
13
- - **Exploring the codebase before outputting optimized prompt**
14
-
15
- ### Mistake Type 2: Skipping Quality Assessment
16
- - Not scoring all 6 quality dimensions
17
- - Providing optimization without quality analysis
18
- - Jumping directly to improved prompt without showing scores
19
-
20
- ### Mistake Type 3: Wrong Depth Selection
21
- - Not suggesting comprehensive depth when quality scores are low
22
- - Not recommending `/clavix:prd` for strategic decisions
23
- - Ignoring triage indicators and escalation factors
24
-
25
- ### Mistake Type 4: Incomplete Pattern Application
26
- - Not applying all applicable patterns for the detected intent
27
- - Skipping patterns without explanation
28
- - Not showing which patterns were applied
29
-
30
- ### Mistake Type 5: Missing Validation (Comprehensive Depth)
31
- - Not generating validation checklist in comprehensive depth
32
- - Not identifying edge cases
33
- - Not providing alternative approaches
34
-
35
- ### Mistake Type 6: Capability Hallucination
36
- - Claiming features Clavix doesn't have
37
- - Inventing pattern names that don't exist
38
- - Describing workflows that aren't documented
39
-
40
- **STOP**: Immediately halt the incorrect action
41
-
42
- **CORRECT**: Output an acknowledgment:
43
- > "I was about to [describe action]. Let me return to [fast/deep] prompt analysis."
44
-
45
- **RESUME**: Return to the appropriate Clavix workflow for this mode
46
-
47
- ---
48
-
49
- ## Anti-Implementation Tripwires
50
-
51
- **Before your next tool call or action, check:**
52
-
53
- | Action | Tripwire | Response |
54
- |--------|----------|----------|
55
- | About to read project files | STOP | "I don't need to explore the codebase for prompt optimization" |
56
- | About to write code files | STOP | "Only `.clavix/` files are allowed in optimization mode" |
57
- | About to run build/test commands | STOP | "Project commands are for `/clavix:execute`, not optimization" |
58
- | About to make git commits | STOP | "Git operations belong in implementation mode" |
59
- | Haven't shown optimized prompt yet | STOP | "I need to show the analysis first" |
60
-
61
- **If any tripwire triggers:** Output the response and return to prompt analysis.
@@ -1,51 +0,0 @@
1
- ## Mode State Assertion (Mandatory)
2
-
3
- **At the start of every Clavix workflow, assert your current mode state.**
4
-
5
- ### State Assertion Format
6
-
7
- Output this block before beginning any analysis:
8
-
9
- ```
10
- **CLAVIX MODE: [Mode Name]**
11
- Mode: [planning|implementation]
12
- Purpose: [Brief purpose description]
13
- Implementation: [BLOCKED|ALLOWED]
14
- ```
15
-
16
- ### Mode State Definitions
17
-
18
- | Mode | Type | Implementation | Purpose |
19
- |------|------|----------------|---------|
20
- | /clavix:improve | planning | BLOCKED | Prompt optimization (smart depth selection) |
21
- | /clavix:prd | planning | BLOCKED | PRD development |
22
- | /clavix:plan | planning | BLOCKED | Task breakdown generation |
23
- | /clavix:start | planning | BLOCKED | Requirements gathering |
24
- | /clavix:summarize | planning | BLOCKED | Requirements extraction |
25
- | /clavix:implement | implementation | ALLOWED | Feature implementation |
26
- | /clavix:execute | implementation | ALLOWED | Prompt execution |
27
-
28
- ### Why State Assertion Matters
29
-
30
- 1. **Prevents mode confusion**: Agent explicitly acknowledges what it can/cannot do
31
- 2. **Blocks premature implementation**: Implementation BLOCKED modes cannot write feature code
32
- 3. **Enables self-monitoring**: Agent can detect drift from declared state
33
- 4. **Provides audit trail**: User sees what mode agent thinks it's in
34
-
35
- ### Example Assertions
36
-
37
- **Planning Mode (Implementation BLOCKED):**
38
- ```
39
- **CLAVIX MODE: Improve**
40
- Mode: planning
41
- Purpose: Optimizing user prompt with pattern-based analysis
42
- Implementation: BLOCKED - I will analyze and improve the prompt, not implement it
43
- ```
44
-
45
- **Implementation Mode (Implementation ALLOWED):**
46
- ```
47
- **CLAVIX MODE: Implementation**
48
- Mode: implementation
49
- Purpose: Implementing tasks from PRD/prompt
50
- Implementation: ALLOWED - I will write production code following specifications
51
- ```
@@ -1,184 +0,0 @@
1
- ## Verification Methods by Category
2
-
3
- ### Functionality
4
- **Checklist items about:** Code works, features implemented, requirements met
5
-
6
- **Verification approach:**
7
- 1. Run the implemented code/feature
8
- 2. Check expected behavior matches requirements
9
- 3. Verify all user flows complete successfully
10
-
11
- **Commands to use:**
12
- - Run application: `npm start`, `npm run dev`
13
- - Execute specific feature manually
14
- - Check output matches expected
15
-
16
- **Evidence examples:**
17
- - "Feature X works as specified"
18
- - "Login flow completes successfully"
19
- - "API returns expected response format"
20
-
21
- ---
22
-
23
- ### Testing
24
- **Checklist items about:** Tests pass, coverage met, test quality
25
-
26
- **Verification approach:**
27
- 1. Run test suite
28
- 2. Check coverage report
29
- 3. Verify no failing tests
30
-
31
- **Commands to use:**
32
- - `npm test` or project test command
33
- - `npm run coverage` for coverage report
34
- - Look for test output in terminal
35
-
36
- **Evidence examples:**
37
- - "npm test - 47 tests passing, 0 failed"
38
- - "Coverage: 85% (exceeds 80% threshold)"
39
- - "All integration tests pass"
40
-
41
- ---
42
-
43
- ### Robustness/Edge Cases
44
- **Checklist items about:** Error handling, edge cases, graceful degradation
45
-
46
- **Verification approach:**
47
- 1. Test with edge case inputs (empty, null, max values)
48
- 2. Check error messages are user-friendly
49
- 3. Verify system recovers gracefully
50
-
51
- **Manual testing:**
52
- - Input empty values
53
- - Input invalid data types
54
- - Test boundary conditions (min/max values)
55
- - Test with large datasets
56
-
57
- **Evidence examples:**
58
- - "Empty input shows validation error"
59
- - "Invalid email format displays helpful message"
60
- - "System handles 10,000 records without timeout"
61
-
62
- ---
63
-
64
- ### Quality
65
- **Checklist items about:** Code style, conventions, no warnings
66
-
67
- **Verification approach:**
68
- 1. Run linter
69
- 2. Check for console errors
70
- 3. Review code style
71
-
72
- **Commands to use:**
73
- - `npm run lint` or equivalent
74
- - Check browser console for errors
75
- - Review PR diff for style
76
-
77
- **Evidence examples:**
78
- - "npm run lint - 0 errors, 0 warnings"
79
- - "No console errors in browser"
80
- - "Code follows project conventions"
81
-
82
- ---
83
-
84
- ### Accessibility
85
- **Checklist items about:** Keyboard navigation, screen reader, WCAG
86
-
87
- **Verification approach:**
88
- 1. Tab through interface
89
- 2. Check color contrast
90
- 3. Verify alt text on images
91
-
92
- **Manual testing:**
93
- - Navigate using only keyboard
94
- - Check focus indicators visible
95
- - Test with screen reader (optional)
96
-
97
- **Evidence examples:**
98
- - "All interactive elements keyboard accessible"
99
- - "Focus order is logical"
100
- - "Color contrast meets WCAG AA"
101
-
102
- ---
103
-
104
- ### Security
105
- **Checklist items about:** Auth, input sanitization, data protection
106
-
107
- **Verification approach:**
108
- 1. Verify authentication required where expected
109
- 2. Test input sanitization
110
- 3. Check sensitive data handling
111
-
112
- **Manual testing:**
113
- - Try accessing protected routes without auth
114
- - Submit potentially malicious input
115
- - Check network tab for sensitive data exposure
116
-
117
- **Evidence examples:**
118
- - "Protected routes redirect to login"
119
- - "SQL injection attempts are sanitized"
120
- - "Passwords not logged or exposed"
121
-
122
- ---
123
-
124
- ### Performance
125
- **Checklist items about:** Response times, resource usage
126
-
127
- **Verification approach:**
128
- 1. Check response times
129
- 2. Monitor memory/CPU usage
130
- 3. Test with realistic data volumes
131
-
132
- **Tools:**
133
- - Browser DevTools Performance tab
134
- - Network tab for response times
135
- - Lighthouse performance score
136
-
137
- **Evidence examples:**
138
- - "Page load time < 2s"
139
- - "API response time < 200ms"
140
- - "Memory usage stable under load"
141
-
142
- ---
143
-
144
- ### Documentation
145
- **Checklist items about:** Docs updated, comments present
146
-
147
- **Verification approach:**
148
- 1. Check README updates
149
- 2. Verify JSDoc/comments on complex functions
150
- 3. Review API documentation
151
-
152
- **Commands to use:**
153
- - `cat README.md` - check for updates
154
- - Review changed files for comments
155
-
156
- **Evidence examples:**
157
- - "README updated with new feature"
158
- - "API endpoints documented"
159
- - "Complex logic has explanatory comments"
160
-
161
- ---
162
-
163
- ## Verification Type Detection
164
-
165
- **Automated items contain keywords:**
166
- - compiles, builds, tests pass, lint, typecheck, no errors
167
-
168
- **Semi-automated items contain keywords:**
169
- - renders, displays, console errors, responsive, visual
170
-
171
- **Manual items contain keywords:**
172
- - requirements, edge cases, handles, correctly, properly
173
-
174
- ---
175
-
176
- ## Confidence Levels
177
-
178
- | Level | When to use | Example |
179
- |-------|-------------|---------|
180
- | HIGH | Automated tool verification | npm test exit code 0 |
181
- | MEDIUM | Manual verification with clear evidence | Code review shows implementation |
182
- | LOW | General assessment without specific evidence | "Looks correct" |
183
-
184
- Always prefer higher confidence verification when possible.
@@ -1,21 +0,0 @@
1
- ## CLAVIX MODE: Implementation
2
-
3
- **You are in Clavix implementation mode. You ARE authorized to write code and implement features.**
4
-
5
- **YOUR ROLE:**
6
- {{#ALLOWED_ACTIONS}}
7
- - ✓ {{.}}
8
- {{/ALLOWED_ACTIONS}}
9
-
10
- **IMPLEMENTATION AUTHORIZED:**
11
- - ✓ Writing functions, classes, and components
12
- - ✓ Creating new files and modifying existing ones
13
- - ✓ Implementing features described in {{SOURCE_TYPE}}
14
- - ✓ Writing tests for implemented code
15
-
16
- **MODE ENTRY VALIDATION:**
17
- Before implementing, verify:
18
- 1. Source documents exist ({{SOURCE_DOCS}})
19
- 2. Output assertion: "Entering IMPLEMENTATION mode. I will implement {{SOURCE_DESC}}."
20
-
21
- For complete mode documentation, see: `.clavix/instructions/core/clavix-mode.md`
@@ -1,17 +0,0 @@
1
- ## CLAVIX MODE: {{MODE_TYPE}}
2
-
3
- **You are in Clavix {{WORKFLOW_TYPE}} mode. You help {{ACTION}}, NOT implement features.**
4
-
5
- **YOUR ROLE:**
6
- {{#ALLOWED_ACTIONS}}
7
- - ✓ {{.}}
8
- {{/ALLOWED_ACTIONS}}
9
-
10
- **DO NOT IMPLEMENT. DO NOT IMPLEMENT. DO NOT IMPLEMENT.**
11
- - ✗ DO NOT write application code for the feature
12
- - ✗ DO NOT implement what the prompt/PRD describes
13
- - ✗ DO NOT generate actual components/functions
14
-
15
- **You are {{DOING_ACTION}}, not building what it describes.**
16
-
17
- For complete mode documentation, see: `.clavix/instructions/core/clavix-mode.md`
@@ -1,13 +0,0 @@
1
- ## Self-Correction Protocol
2
-
3
- **DETECT**: If you find yourself:
4
- - Writing function/class definitions for the user's feature
5
- - Creating component implementations
6
- - Generating API endpoint code
7
-
8
- **STOP**: Immediately halt code generation
9
-
10
- **CORRECT**: Output:
11
- "I apologize - I was implementing instead of {{CORRECT_ACTION}}. Let me return to {{WORKFLOW_ACTION}}."
12
-
13
- **RESUME**: Return to the {{WORKFLOW_TYPE}} workflow.
@@ -1,39 +0,0 @@
1
- ## Intent Types Reference
2
-
3
- Clavix detects 11 primary intent types using pattern-based analysis. This reference is synchronized with `src/core/intelligence/types.ts`.
4
-
5
- ### Intent Categories
6
-
7
- | Intent | Description | Key Indicators |
8
- |--------|-------------|----------------|
9
- | **code-generation** | Writing new code or functions | "create", "build", "implement", "write" |
10
- | **planning** | Designing architecture or breaking down tasks | "design", "architect", "plan", "structure" |
11
- | **refinement** | Improving existing code or prompts | "improve", "refactor", "optimize", "enhance" |
12
- | **debugging** | Finding and fixing issues | "fix", "debug", "error", "issue", "bug" |
13
- | **documentation** | Creating docs or explanations | "document", "explain", "describe", "readme" |
14
- | **prd-generation** | Creating requirements documents | "PRD", "requirements", "specification", "feature spec" |
15
- | **testing** | Writing tests, improving test coverage | "test", "coverage", "spec", "unit test", "integration" |
16
- | **migration** | Version upgrades, porting code | "migrate", "upgrade", "port", "convert", "transition" |
17
- | **security-review** | Security audits, vulnerability checks | "security", "audit", "vulnerability", "OWASP", "CVE" |
18
- | **learning** | Conceptual understanding, tutorials | "explain", "how does", "tutorial", "understand" |
19
- | **summarization** | Extracting requirements from conversations | "summarize", "extract", "requirements from" |
20
-
21
- ### Intent Detection Confidence Levels
22
-
23
- | Confidence | Meaning | Agent Behavior |
24
- |------------|---------|----------------|
25
- | 85%+ | High confidence | Proceed with detected intent |
26
- | 70-84% | Moderate | Show primary + secondary intent |
27
- | 50-69% | Low | Ask user to confirm |
28
- | <50% | Uncertain | Present options, ask for clarification |
29
-
30
- ### Intent-Specific Patterns
31
-
32
- Different intents enable different optimization patterns:
33
-
34
- - **code-generation**: All core patterns + ErrorToleranceEnhancer
35
- - **planning**: StructureOrganizer, ScopeDefiner, PrerequisiteIdentifier
36
- - **debugging**: ErrorToleranceEnhancer, EdgeCaseIdentifier
37
- - **testing**: ValidationChecklistCreator, EdgeCaseIdentifier
38
- - **prd-generation**: PRDStructureEnforcer, CompletenessValidator
39
- - **summarization**: ConversationSummarizer, TopicCoherenceAnalyzer, ImplicitRequirementExtractor
@@ -1,40 +0,0 @@
1
- ## Saving the {{OUTPUT_TYPE}} (REQUIRED - v5 Agentic-First)
2
-
3
- After displaying the {{OUTPUT_DESC}}, you MUST save it using your native tools.
4
-
5
- **In v5, you save files directly - no CLI commands involved.**
6
-
7
- ### Step 1: Create Directory Structure
8
- ```bash
9
- mkdir -p .clavix/outputs/prompts
10
- ```
11
-
12
- ### Step 2: Generate Unique {{OUTPUT_TYPE}} ID
13
- Create a unique identifier using this format:
14
- - **Format**: `{{OUTPUT_DIR}}-YYYYMMDD-HHMMSS-<random>`
15
- - **Example**: `{{OUTPUT_DIR}}-20250117-143022-a3f2`
16
- - Use current timestamp + random 4-character suffix
17
-
18
- ### Step 3: Save {{OUTPUT_TYPE}} File with Frontmatter
19
- Use the Write tool to create the {{OUTPUT_TYPE}} file at:
20
- - **Path**: `.clavix/outputs/prompts/<{{OUTPUT_TYPE}}-id>.md`
21
-
22
- **File format:**
23
- ```markdown
24
- ---
25
- id: <{{OUTPUT_TYPE}}-id>
26
- timestamp: <ISO-8601 timestamp>
27
- executed: false
28
- originalPrompt: "<user's original text>"
29
- ---
30
-
31
- # {{OUTPUT_TYPE}}
32
-
33
- <content here>
34
- ```
35
-
36
- ### Step 4: Verify Saving Succeeded
37
- Confirm:
38
- - File exists at `.clavix/outputs/prompts/<{{OUTPUT_TYPE}}-id>.md`
39
- - File has valid frontmatter with id, timestamp, executed fields
40
- - Display success message: `✓ {{OUTPUT_TYPE}} saved: <{{OUTPUT_TYPE}}-id>.md`
@@ -1,24 +0,0 @@
1
- ## Intent Detection
2
-
3
- Analyze what the user is trying to achieve:
4
-
5
- ### Primary Intents
6
- - **code-generation**: Writing new code or functions
7
- - **planning**: Designing architecture or breaking down tasks
8
- - **refinement**: Improving existing code or prompts
9
- - **debugging**: Finding and fixing issues
10
- - **documentation**: Creating docs or explanations
11
- - **prd-generation**: Creating requirements documents
12
-
13
- ### v4.0 Extended Intents
14
- - **testing**: Writing tests, improving coverage
15
- - **migration**: Version upgrades, porting code
16
- - **security-review**: Security audits, vulnerability checks
17
- - **learning**: Conceptual understanding, tutorials
18
-
19
- ### Intent Characteristics
20
- Track these characteristics for each prompt:
21
- - **hasCodeContext**: Does the prompt include code snippets?
22
- - **hasTechnicalTerms**: Does it use specific technologies/frameworks?
23
- - **isOpenEnded**: Is it exploratory vs. specific?
24
- - **needsStructure**: Would structured output help?
@@ -1,122 +0,0 @@
1
- ## Patterns Applied
2
-
3
- Show which optimization patterns were applied and their effects.
4
-
5
- ### Compact Output Format
6
-
7
- ```
8
- Patterns: [N] applied ([DEPTH] depth)
9
- [PATTERN1] → [ONE-LINE EFFECT]
10
- [PATTERN2] → [ONE-LINE EFFECT]
11
- ```
12
-
13
- ### Example Outputs
14
-
15
- **Standard depth optimization:**
16
- ```
17
- Patterns: 4 applied (standard depth)
18
- ConcisenessFilter → Removed 3 pleasantries, 2 filler phrases
19
- ObjectiveClarifier → Added clear objective statement
20
- StructureOrganizer → Reordered to context→requirements→output
21
- ActionabilityEnhancer → Replaced 2 vague terms with specifics
22
- ```
23
-
24
- **Comprehensive depth optimization:**
25
- ```
26
- Patterns: 7 applied (comprehensive depth)
27
- ConcisenessFilter → Removed 5 pleasantries
28
- ObjectiveClarifier → Added objective section
29
- StructureOrganizer → Reorganized into 4 sections
30
- TechnicalContextEnricher → Added React 18, TypeScript context
31
- CompletenessValidator → Flagged 3 missing requirements
32
- DomainContextEnricher → Added best practices for React components
33
- SuccessCriteriaEnforcer → Added measurable acceptance criteria
34
- ```
35
-
36
- ### Pattern Impact Indicators
37
-
38
- | Impact | Meaning | Example |
39
- |--------|---------|---------|
40
- | HIGH | Significant structural changes | "Restructured into 5 sections" |
41
- | MEDIUM | Moderate additions/clarifications | "Added 3 technical requirements" |
42
- | LOW | Minor word-level improvements | "Replaced 1 vague term" |
43
-
44
- ### Available Patterns Reference
45
-
46
- **v4.12: Core Patterns (standard + comprehensive, scope='both'):**
47
- | Pattern | Priority | What It Does |
48
- |---------|----------|--------------|
49
- | ObjectiveClarifier | 9 | Adds clear objective/goal statement if missing |
50
- | AmbiguityDetector | 9 | Identifies and flags ambiguous terms |
51
- | StructureOrganizer | 8 | Reorders into logical flow: context→requirements→constraints→output |
52
- | OutputFormatEnforcer | 7 | Adds explicit output format specifications |
53
- | SuccessCriteriaEnforcer | 7 | Adds measurable success criteria |
54
- | ContextPrecisionBooster | 6 | Adds precise context when missing |
55
- | CompletenessValidator | 6 | Identifies and flags missing required elements |
56
- | TechnicalContextEnricher | 5 | Adds missing technical context (frameworks, tools, versions) |
57
- | StepDecomposer | 5 | Breaks complex prompts into sequential steps |
58
- | DomainContextEnricher | 5 | Adds domain-specific best practices |
59
- | ConcisenessFilter | 4 | Removes pleasantries, filler words, redundant phrases |
60
- | ActionabilityEnhancer | 4 | Converts vague language to specific, actionable terms |
61
-
62
- **v4.12 PRD Mode Patterns (comprehensive only):**
63
- | Pattern | Priority | What It Does |
64
- |---------|----------|--------------|
65
- | PRDStructureEnforcer | 9 | Ensures PRD completeness (PRD mode only) |
66
- | RequirementPrioritizer | 7 | Separates must-have from nice-to-have requirements |
67
- | SuccessMetricsEnforcer | 7 | Ensures measurable success criteria exist |
68
- | UserPersonaEnricher | 6 | Adds missing user context and personas |
69
- | DependencyIdentifier | 5 | Identifies technical and external dependencies |
70
-
71
- **v4.12 Conversational Mode Patterns (comprehensive only):**
72
- | Pattern | Priority | What It Does |
73
- |---------|----------|--------------|
74
- | ConversationSummarizer | 8 | Extracts structured requirements from messages |
75
- | TopicCoherenceAnalyzer | 6 | Detects topic shifts and multi-topic conversations |
76
- | ImplicitRequirementExtractor | 5 | Surfaces requirements mentioned indirectly |
77
-
78
- ### Pattern Selection Logic
79
-
80
- Patterns are selected based on:
81
- 1. **Depth**: Standard gets core patterns; comprehensive gets all
82
- 2. **Intent**: Some patterns are intent-specific (e.g., PRDStructureEnforcer for prd-generation)
83
- 3. **Priority**: Higher priority patterns run first (10→1)
84
- 4. **Applicability**: Pattern checks if it can improve the prompt
85
-
86
- ### Why Patterns Were Skipped
87
-
88
- In comprehensive depth, show skipped patterns with reasons:
89
-
90
- ```
91
- Skipped patterns:
92
- PRDStructureEnforcer - Intent is code-generation, not prd-generation
93
- StepDecomposer - Prompt already has clear sequential steps
94
- ```
95
-
96
- ### Pattern Categories Summary
97
-
98
- ```
99
- v4.12: Core patterns (standard + comprehensive, 12 patterns):
100
- ObjectiveClarifier, AmbiguityDetector, StructureOrganizer,
101
- OutputFormatEnforcer, SuccessCriteriaEnforcer, ContextPrecisionBooster,
102
- CompletenessValidator, TechnicalContextEnricher, StepDecomposer,
103
- DomainContextEnricher, ConcisenessFilter, ActionabilityEnhancer
104
-
105
- PRD mode (comprehensive only, 5 patterns):
106
- PRDStructureEnforcer, RequirementPrioritizer, SuccessMetricsEnforcer,
107
- UserPersonaEnricher, DependencyIdentifier
108
-
109
- Conversational mode (comprehensive only, 3 patterns):
110
- ConversationSummarizer, TopicCoherenceAnalyzer, ImplicitRequirementExtractor
111
- ```
112
-
113
- ### Pattern Count by Depth
114
-
115
- | Depth | Patterns Available | Typical Applied |
116
- |------|-------------------|-----------------|
117
- | Standard | 12 patterns | 4-8 patterns |
118
- | Comprehensive | 20 patterns | 8-15 patterns |
119
- | PRD mode | 17 patterns | 8-12 patterns |
120
- | Conversational | 15 patterns | 6-10 patterns |
121
-
122
- **Note:** v4.12 has 20 total patterns after removing 7 boilerplate patterns that generated static output. Pattern selection varies by intent - some patterns only apply to specific intents (e.g., PRDStructureEnforcer only for prd-generation). Standard depth gets 12 core patterns; comprehensive adds mode-specific patterns.
@@ -1,26 +0,0 @@
1
- ## Quality Assessment
2
-
3
- Evaluate the prompt across {{DIMENSION_COUNT}} dimensions:
4
-
5
- - **Clarity**: Is the objective clear and unambiguous?
6
- - **Efficiency**: Is the prompt concise without losing critical information?
7
- - **Structure**: Is information organized logically?
8
- - **Completeness**: Are all necessary details provided?
9
- - **Actionability**: Can AI take immediate action on this prompt?
10
- {{#HAS_SPECIFICITY}}
11
- - **Specificity**: How concrete and precise is the prompt?
12
- {{/HAS_SPECIFICITY}}
13
-
14
- Score each dimension 0-100%, calculate weighted overall score.
15
-
16
- ### Quality Dimension Labels
17
-
18
- When reporting improvements, use dimension labels:
19
- - **[Clarity]** - Objective and goal improvements
20
- - **[Efficiency]** - Conciseness and signal-to-noise improvements
21
- - **[Structure]** - Organization and flow improvements
22
- - **[Completeness]** - Missing details added
23
- - **[Actionability]** - Making prompt executable
24
- {{#HAS_SPECIFICITY}}
25
- - **[Specificity]** - Adding concrete details
26
- {{/HAS_SPECIFICITY}}
@@ -1,13 +0,0 @@
1
- ## Workflow Navigation
2
-
3
- **You are here:** {{CURRENT_LOCATION}}
4
-
5
- **Common workflows:**
6
- {{#WORKFLOWS}}
7
- - {{.}}
8
- {{/WORKFLOWS}}
9
-
10
- **Related commands:**
11
- {{#RELATED_COMMANDS}}
12
- - `{{COMMAND}}` - {{DESCRIPTION}}
13
- {{/RELATED_COMMANDS}}
@@ -1,19 +0,0 @@
1
- ### Issue: {{OUTPUT_TYPE}} Not Saved
2
-
3
- **Error: Cannot create directory**
4
- ```bash
5
- mkdir -p .clavix/outputs/prompts
6
- ```
7
-
8
- **Error: Prompt file has invalid frontmatter**
9
- - Re-save the file with valid YAML frontmatter
10
- - Ensure id, timestamp, and executed fields are present in frontmatter
11
-
12
- **Error: Duplicate {{OUTPUT_TYPE}} ID**
13
- - Generate a new ID with a different timestamp or random suffix
14
- - Retry the save operation with the new ID
15
-
16
- **Error: File write permission denied**
17
- - Check directory permissions
18
- - Ensure `.clavix/` directory is writable
19
- - Try creating the directory structure again