clavix 2.8.2 → 3.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 (55) hide show
  1. package/README.md +26 -6
  2. package/dist/cli/commands/deep.d.ts +3 -4
  3. package/dist/cli/commands/deep.js +162 -261
  4. package/dist/cli/commands/fast.d.ts +3 -4
  5. package/dist/cli/commands/fast.js +126 -303
  6. package/dist/cli/commands/init.js +184 -22
  7. package/dist/cli/commands/prd.d.ts +7 -6
  8. package/dist/cli/commands/prd.js +113 -132
  9. package/dist/cli/commands/summarize.d.ts +1 -12
  10. package/dist/cli/commands/summarize.js +63 -131
  11. package/dist/core/intelligence/index.d.ts +10 -0
  12. package/dist/core/intelligence/index.js +13 -0
  13. package/dist/core/intelligence/intent-detector.d.ts +33 -0
  14. package/dist/core/intelligence/intent-detector.js +311 -0
  15. package/dist/core/intelligence/pattern-library.d.ts +44 -0
  16. package/dist/core/intelligence/pattern-library.js +103 -0
  17. package/dist/core/intelligence/patterns/actionability-enhancer.d.ts +27 -0
  18. package/dist/core/intelligence/patterns/actionability-enhancer.js +162 -0
  19. package/dist/core/intelligence/patterns/base-pattern.d.ts +31 -0
  20. package/dist/core/intelligence/patterns/base-pattern.js +39 -0
  21. package/dist/core/intelligence/patterns/completeness-validator.d.ts +27 -0
  22. package/dist/core/intelligence/patterns/completeness-validator.js +135 -0
  23. package/dist/core/intelligence/patterns/conciseness-filter.d.ts +12 -0
  24. package/dist/core/intelligence/patterns/conciseness-filter.js +61 -0
  25. package/dist/core/intelligence/patterns/objective-clarifier.d.ts +14 -0
  26. package/dist/core/intelligence/patterns/objective-clarifier.js +97 -0
  27. package/dist/core/intelligence/patterns/structure-organizer.d.ts +31 -0
  28. package/dist/core/intelligence/patterns/structure-organizer.js +185 -0
  29. package/dist/core/intelligence/patterns/technical-context-enricher.d.ts +16 -0
  30. package/dist/core/intelligence/patterns/technical-context-enricher.js +132 -0
  31. package/dist/core/intelligence/quality-assessor.d.ts +42 -0
  32. package/dist/core/intelligence/quality-assessor.js +296 -0
  33. package/dist/core/intelligence/types.d.ts +81 -0
  34. package/dist/core/intelligence/types.js +3 -0
  35. package/dist/core/intelligence/universal-optimizer.d.ts +31 -0
  36. package/dist/core/intelligence/universal-optimizer.js +118 -0
  37. package/dist/core/prd-generator.d.ts +2 -2
  38. package/dist/core/task-manager.js +18 -5
  39. package/dist/templates/agents/agents.md +2 -2
  40. package/dist/templates/agents/copilot-instructions.md +15 -15
  41. package/dist/templates/agents/octo.md +35 -30
  42. package/dist/templates/agents/warp.md +3 -3
  43. package/dist/templates/full-prd-template.hbs +1 -1
  44. package/dist/templates/prd-questions.md +1 -1
  45. package/dist/templates/quick-prd-template.hbs +1 -1
  46. package/dist/templates/slash-commands/_canonical/deep.md +261 -122
  47. package/dist/templates/slash-commands/_canonical/fast.md +101 -69
  48. package/dist/templates/slash-commands/_canonical/implement.md +1 -1
  49. package/dist/templates/slash-commands/_canonical/plan.md +12 -12
  50. package/dist/templates/slash-commands/_canonical/prd.md +34 -24
  51. package/dist/templates/slash-commands/_canonical/start.md +13 -12
  52. package/dist/templates/slash-commands/_canonical/summarize.md +42 -25
  53. package/dist/utils/error-utils.d.ts +7 -0
  54. package/dist/utils/error-utils.js +17 -0
  55. package/package.json +21 -12
@@ -1,18 +1,18 @@
1
1
  # Clavix Workflows for GitHub Copilot
2
2
 
3
- These instructions enhance GitHub Copilot's understanding of the Clavix prompt engineering framework and workflow commands available in this project.
3
+ These instructions enhance GitHub Copilot's understanding of the Clavix universal prompt intelligence toolkit and workflow commands available in this project.
4
4
 
5
5
  ## About Clavix
6
6
 
7
- Clavix is a CLEAR Framework-validated prompt engineering toolkit that helps improve prompts, generate PRDs, and manage implementation workflows. The CLEAR Framework (Concise, Logical, Explicit, Adaptive, Reflective) is an academically-validated approach developed by Dr. Leo Lo at the University of New Mexico.
7
+ Clavix is a universal prompt intelligence toolkit that helps improve prompts, generate PRDs, and manage implementation workflows. It automatically detects intent and applies quality-based optimization patterns without requiring users to learn any specific framework.
8
8
 
9
9
  ## Available Commands
10
10
 
11
11
  When working with this project, you can use the following Clavix commands:
12
12
 
13
13
  ### Prompt Improvement
14
- - `clavix fast "<prompt>"` - Quick CLEAR analysis (C/L/E components) with improved prompt output. CLI auto-saves; slash commands require manual saving per template instructions.
15
- - `clavix deep "<prompt>"` - Comprehensive CLEAR analysis (all 5 components: C/L/E/A/R) with alternatives and validation. CLI auto-saves; slash commands require manual saving per template instructions.
14
+ - `clavix fast "<prompt>"` - Quick quality assessment (5 dimensions) with improved prompt output. CLI auto-saves; slash commands require manual saving per template instructions.
15
+ - `clavix deep "<prompt>"` - Comprehensive analysis with alternatives, edge cases, and validation checklists. CLI auto-saves; slash commands require manual saving per template instructions.
16
16
 
17
17
  ### Strategic Planning
18
18
  - `clavix prd` - Interactive PRD generation through Socratic questioning
@@ -62,12 +62,12 @@ Clavix now automatically saves optimized prompts from fast/deep commands for lat
62
62
 
63
63
  ### Quick Prompt Improvement
64
64
  1. User provides a rough prompt
65
- 2. Run `clavix fast "<prompt>"` for quick CLEAR-validated improvements
65
+ 2. Run `clavix fast "<prompt>"` for quick quality-based improvements
66
66
  3. Use the optimized prompt for better results
67
67
 
68
68
  ### Comprehensive Prompt Analysis
69
69
  1. User has a complex requirement
70
- 2. Run `clavix deep "<prompt>"` for full CLEAR analysis
70
+ 2. Run `clavix deep "<prompt>"` for comprehensive analysis
71
71
  3. Review alternative variations and validation checklists
72
72
  4. Select the best approach
73
73
 
@@ -82,15 +82,15 @@ Clavix now automatically saves optimized prompts from fast/deep commands for lat
82
82
  2. Discuss requirements naturally with the user
83
83
  3. Run `clavix summarize` to extract structured requirements and prompts
84
84
 
85
- ## CLEAR Framework Components
85
+ ## Quality Dimensions
86
86
 
87
- When analyzing or improving prompts, apply these CLEAR Framework principles:
87
+ When analyzing or improving prompts, consider these 5 quality dimensions:
88
88
 
89
- - **[C] Concise**: Remove verbosity, pleasantries, unnecessary qualifiers
90
- - **[L] Logical**: Ensure coherent sequencing (context requirements constraints → output)
91
- - **[E] Explicit**: Add clear specifications for persona, format, tone, success criteria
92
- - **[A] Adaptive**: Provide alternative phrasings and flexible structures
93
- - **[R] Reflective**: Include validation checklists and quality criteria
89
+ - **Clarity**: Is the objective clear and unambiguous?
90
+ - **Efficiency**: Is the prompt concise without losing critical information?
91
+ - **Structure**: Is information organized logically (context requirements constraints → output)?
92
+ - **Completeness**: Are all necessary specifications provided (persona, format, tone, success criteria)?
93
+ - **Actionability**: Can AI take immediate action on this prompt?
94
94
 
95
95
  ## Output Locations
96
96
 
@@ -103,7 +103,7 @@ Clavix stores artifacts in the `.clavix/` directory:
103
103
  ## Best Practices
104
104
 
105
105
  1. **Start with the right mode**: Use fast mode for simple prompts, deep mode for complex requirements, and PRD mode for strategic planning
106
- 2. **Leverage CLEAR Framework**: Always consider the 5 CLEAR components when crafting prompts
106
+ 2. **Focus on quality**: Always consider the 5 quality dimensions (Clarity, Efficiency, Structure, Completeness, Actionability) when crafting prompts
107
107
  3. **Document requirements**: Use PRD workflow for significant features to ensure clear requirements
108
108
  4. **Track progress**: Use implement command to maintain structured task execution
109
109
  5. **Archive completed work**: Keep project organized by archiving finished projects
@@ -114,6 +114,6 @@ When users ask for help with prompts or requirements:
114
114
  1. Suggest running the appropriate Clavix command
115
115
  2. Explain the expected output and benefits
116
116
  3. Help interpret Clavix-generated outputs
117
- 4. Apply CLEAR Framework principles in your responses
117
+ 4. Apply quality assessment principles in your responses
118
118
 
119
119
  This integration makes GitHub Copilot aware of Clavix workflows and can suggest using Clavix commands when appropriate.
@@ -39,35 +39,39 @@ Detect user intent from keywords and trigger appropriate workflow. Use Octofrien
39
39
  ---
40
40
 
41
41
  ### Fast Prompt Improvement Workflow
42
- **Trigger Keywords:** improve prompt, quick fix, make better, optimize prompt, fast improvement, CLEAR framework
42
+ **Trigger Keywords:** improve prompt, quick fix, make better, optimize prompt, fast improvement
43
43
 
44
44
  **When to use:** User wants quick improvements to their prompt
45
45
 
46
46
  **Process:**
47
- 1. Analyze the prompt using CLEAR Framework (C, L, E components):
48
- - **[C] Conciseness**: Identify verbosity, pleasantries, unnecessary words
49
- - **[L] Logic**: Check sequencing and coherent flow
50
- - **[E] Explicitness**: Verify persona, format, tone, success criteria
47
+ 1. Analyze the prompt using quality assessment (5 dimensions):
48
+ - **Clarity**: Is the objective clear and unambiguous?
49
+ - **Efficiency**: Is the prompt concise without losing critical information?
50
+ - **Structure**: Is information organized logically?
51
+ - **Completeness**: Are all necessary details provided?
52
+ - **Actionability**: Can AI take immediate action on this prompt?
51
53
 
52
54
  2. Assess if deep analysis is needed:
53
55
  - Prompt < 20 characters?
54
56
  - Missing 3+ critical elements?
55
57
  - Contains vague words ("app", "system") without context?
56
- - Low CLEAR scores (C<60%, L<60%, E<50%)?
58
+ - Low quality scores (Overall <65%, or any dimension <50%)?
57
59
 
58
60
  **If YES:** Recommend deep analysis instead and explain why
59
61
 
60
- 3. Generate CLEAR-optimized structured prompt with sections:
62
+ 3. Generate optimized structured prompt with sections:
61
63
  - **Objective**: Clear, specific goal
62
64
  - **Requirements**: Detailed, actionable requirements
63
65
  - **Technical Constraints**: Technologies, performance, integrations
64
66
  - **Expected Output**: What result should look like
65
67
  - **Success Criteria**: How to measure completion
66
68
 
67
- 4. List **CLEAR Changes Made** with component labels:
68
- - [C] "Removed 15 unnecessary words"
69
- - [L] "Restructured: context → requirements → output"
70
- - [E] "Added explicit persona, format, tone"
69
+ 4. List **Improvements Applied** with quality dimension labels:
70
+ - [Efficiency] "Removed 15 unnecessary words"
71
+ - [Structure] "Reorganized: context → requirements → output"
72
+ - [Clarity] "Added explicit persona, format, tone"
73
+ - [Completeness] "Added missing tech stack and success criteria"
74
+ - [Actionability] "Converted vague goals into specific requirements"
71
75
 
72
76
  5. Present optimized prompt in code block for easy copying
73
77
 
@@ -76,28 +80,29 @@ Detect user intent from keywords and trigger appropriate workflow. Use Octofrien
76
80
  ---
77
81
 
78
82
  ### Deep Prompt Analysis Workflow
79
- **Trigger Keywords:** deep analysis, comprehensive review, thorough examination, full CLEAR analysis, deep dive
83
+ **Trigger Keywords:** deep analysis, comprehensive review, thorough examination, deep dive, alternatives
80
84
 
81
- **When to use:** User wants comprehensive prompt analysis with all CLEAR components
85
+ **When to use:** User wants comprehensive prompt analysis with alternatives and validation
82
86
 
83
87
  **Octofriend Tip:** This is an ideal use case for model switching. Start with a thinking model for comprehensive analysis, then switch to a faster model for formatting the final output.
84
88
 
85
89
  **Process:**
86
- 1. Apply **Full CLEAR Framework** (C, L, E, A, R):
87
- - **[C] Conciseness**: Detailed verbosity analysis
88
- - **[L] Logic**: Comprehensive flow analysis
89
- - **[E] Explicitness**: Complete specification check
90
- - **[A] Adaptive**: Generate 3-5 alternative phrasings and structures
91
- - **[R] Reflective**: Create validation checklist, identify edge cases
90
+ 1. Apply **comprehensive quality assessment** (5 dimensions):
91
+ - **Clarity**: Detailed ambiguity analysis
92
+ - **Efficiency**: Comprehensive verbosity analysis
93
+ - **Structure**: Complete flow and organization check
94
+ - **Completeness**: Thorough specification review
95
+ - **Actionability**: Assess immediate executability
92
96
 
93
- 2. Provide **CLEAR Scoring** (0-100% for each component)
97
+ 2. Provide **quality scoring** (0-100% for each dimension)
94
98
 
95
99
  3. Generate multiple outputs:
96
- - **Primary optimized prompt** (all CLEAR components applied)
97
- - **Alternative variations** (3-5 different approaches with Adaptive component)
98
- - **Validation checklist** (Reflective component - edge cases, quality criteria)
100
+ - **Primary optimized prompt** (all improvements applied)
101
+ - **Alternative approaches** (3-5 different ways to phrase/structure the request)
102
+ - **Alternative structures** (step-by-step, template-based, example-driven)
103
+ - **Validation checklist** (edge cases, quality criteria, verification steps)
99
104
 
100
- 4. Explain **CLEAR Changes Made** for each component with examples
105
+ 4. Explain **improvements applied** for each quality dimension with examples
101
106
 
102
107
  5. Identify potential issues and mitigation strategies
103
108
 
@@ -263,7 +268,7 @@ When starting implementation with `clavix implement`:
263
268
  | Command | Use it for |
264
269
  | --- | --- |
265
270
  | `clavix init` | Rebuild `.clavix` structure and regenerate provider assets. |
266
- | `clavix fast` / `clavix deep` | CLEAR-based prompt improvement (quick vs. comprehensive). CLI auto-saves prompts. Slash commands require manual saving per template instructions. |
271
+ | `clavix fast` / `clavix deep` | Quality-based prompt improvement (quick vs. comprehensive). CLI auto-saves prompts. Slash commands require manual saving per template instructions. |
267
272
  | `clavix execute` | Execute saved prompts (interactive selection or `--latest` for most recent). |
268
273
  | `clavix prompts list` | View saved prompts with lifecycle status (NEW, EXECUTED, OLD, STALE). |
269
274
  | `clavix prompts clear` | Cleanup executed/stale prompts (`--executed`, `--stale`, `--fast`, `--deep`). |
@@ -287,10 +292,10 @@ When starting implementation with `clavix implement`:
287
292
  → Use PRD Generation Workflow
288
293
 
289
294
  **User has a prompt and wants quick improvement:**
290
- → Use Fast Prompt Improvement (CLEAR C, L, E)
295
+ → Use Fast Prompt Improvement (quality assessment with 5 dimensions)
291
296
 
292
297
  **User wants thorough analysis or mentions alternatives/edge cases:**
293
- → Use Deep Analysis (Full CLEAR: C, L, E, A, R)
298
+ → Use Deep Analysis (comprehensive with alternatives and validation)
294
299
  → Consider model switching for optimal results
295
300
 
296
301
  **User wants to discuss/explore before committing:**
@@ -342,8 +347,8 @@ When starting implementation with `clavix implement`:
342
347
  - **Use markdown formatting** for all outputs
343
348
  - **Be conversational and supportive** - this is a collaborative process
344
349
  - **Ask follow-up questions** when requirements are vague or incomplete
345
- - **Apply CLEAR Framework** systematically in prompt improvement workflows
346
- - **Reference CLEAR components** ([C], [L], [E], [A], [R]) when explaining changes
350
+ - **Apply quality assessment** systematically in prompt improvement workflows
351
+ - **Reference quality dimensions** (Clarity, Efficiency, Structure, Completeness, Actionability) when explaining changes
347
352
  - **Switch models strategically** based on task complexity and thinking requirements
348
353
  - **Leverage your multi-turn capabilities** for deep exploration and synthesis
349
354
 
@@ -353,7 +358,7 @@ When starting implementation with `clavix implement`:
353
358
 
354
359
  Your goal is to help users:
355
360
  - Create clear, comprehensive PRDs through guided questioning
356
- - Improve prompts using CLEAR Framework principles
361
+ - Improve prompts using universal prompt intelligence principles
357
362
  - Think through requirements systematically
358
363
  - Execute implementation plans efficiently
359
364
  - Archive completed work properly
@@ -1,6 +1,6 @@
1
1
  ## Clavix Integration for Warp
2
2
 
3
- Clavix helps Warp developers turn rough ideas into CLEAR, AI-ready prompts and Product Requirements Documents without leaving the terminal.
3
+ Clavix helps Warp developers turn rough ideas into quality, AI-ready prompts and Product Requirements Documents without leaving the terminal.
4
4
 
5
5
  ### Quick start
6
6
  - Install globally: `npm install -g clavix`
@@ -9,8 +9,8 @@ Clavix helps Warp developers turn rough ideas into CLEAR, AI-ready prompts and P
9
9
 
10
10
  ### Common commands
11
11
  - `clavix init` – interactive provider setup (regenerates docs & commands)
12
- - `clavix fast "<prompt>"` – quick CLEAR (C/L/E) analysis and improved prompt. CLI auto-saves; slash commands need manual saving per template instructions.
13
- - `clavix deep "<prompt>"` – full CLEAR (C/L/E/A/R) analysis with alternatives & checklists. CLI auto-saves; slash commands need manual saving per template instructions.
12
+ - `clavix fast "<prompt>"` – quick quality assessment (5 dimensions) and improved prompt. CLI auto-saves; slash commands need manual saving per template instructions.
13
+ - `clavix deep "<prompt>"` – comprehensive analysis with alternatives, edge cases, and validation checklists. CLI auto-saves; slash commands need manual saving per template instructions.
14
14
  - `clavix execute [--latest]` – execute saved prompts from fast/deep. Interactive selection or `--latest` for most recent.
15
15
  - `clavix prompts list` – view all saved prompts with age/status (NEW, EXECUTED, OLD, STALE)
16
16
  - `clavix prompts clear [--executed|--stale|--fast|--deep]` – cleanup executed or old prompts
@@ -81,4 +81,4 @@ The following criteria must be met for this project to be considered complete:
81
81
 
82
82
  ---
83
83
 
84
- *This PRD was generated by Clavix. Edit and refine as needed for your project.*
84
+ *Generated with Clavix Planning Mode Edit and refine as needed for your project.*
@@ -1,7 +1,7 @@
1
1
  # PRD Question Flow
2
2
 
3
3
  Generate a focused Product Requirements Document optimized for vibecoding.
4
- Built with CLEAR framework principles for fast iteration without losing quality.
4
+ Built with Clavix Planning Mode for fast iteration without losing quality.
5
5
 
6
6
  ## Question 1
7
7
 
@@ -48,4 +48,4 @@ Focus on creating a well-structured, maintainable, and tested implementation.
48
48
 
49
49
  ---
50
50
 
51
- *Generated: {{timestamp}} | Use with AI agents for development*
51
+ *Generated with Clavix Planning Mode: {{timestamp}} | Optimized for AI-assisted development*