clavix 4.2.0 → 4.3.2

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 (51) hide show
  1. package/LICENSE +201 -21
  2. package/README.md +1 -1
  3. package/dist/cli/commands/deep.js +4 -58
  4. package/dist/cli/commands/init.js +13 -16
  5. package/dist/cli/commands/plan.js +2 -2
  6. package/dist/core/conversation-quality-tracker.d.ts +81 -0
  7. package/dist/core/conversation-quality-tracker.js +195 -0
  8. package/dist/core/intelligence/intent-detector.js +3 -0
  9. package/dist/core/intelligence/pattern-library.d.ts +18 -1
  10. package/dist/core/intelligence/pattern-library.js +131 -0
  11. package/dist/core/intelligence/patterns/conversation-summarizer.d.ts +25 -0
  12. package/dist/core/intelligence/patterns/conversation-summarizer.js +197 -0
  13. package/dist/core/intelligence/patterns/dependency-identifier.d.ts +21 -0
  14. package/dist/core/intelligence/patterns/dependency-identifier.js +149 -0
  15. package/dist/core/intelligence/patterns/implicit-requirement-extractor.d.ts +20 -0
  16. package/dist/core/intelligence/patterns/implicit-requirement-extractor.js +129 -0
  17. package/dist/core/intelligence/patterns/requirement-prioritizer.d.ts +22 -0
  18. package/dist/core/intelligence/patterns/requirement-prioritizer.js +117 -0
  19. package/dist/core/intelligence/patterns/success-metrics-enforcer.d.ts +22 -0
  20. package/dist/core/intelligence/patterns/success-metrics-enforcer.js +142 -0
  21. package/dist/core/intelligence/patterns/topic-coherence-analyzer.d.ts +22 -0
  22. package/dist/core/intelligence/patterns/topic-coherence-analyzer.js +140 -0
  23. package/dist/core/intelligence/patterns/user-persona-enricher.d.ts +22 -0
  24. package/dist/core/intelligence/patterns/user-persona-enricher.js +124 -0
  25. package/dist/core/intelligence/quality-assessor.js +2 -0
  26. package/dist/core/intelligence/types.d.ts +7 -2
  27. package/dist/core/intelligence/universal-optimizer.d.ts +27 -2
  28. package/dist/core/intelligence/universal-optimizer.js +65 -5
  29. package/dist/core/task-manager.d.ts +1 -2
  30. package/dist/core/task-manager.js +21 -26
  31. package/dist/templates/slash-commands/_canonical/deep.md +37 -69
  32. package/dist/templates/slash-commands/_canonical/fast.md +1 -0
  33. package/dist/templates/slash-commands/_components/sections/pattern-visibility.md +26 -2
  34. package/package.json +3 -3
  35. package/dist/templates/instructions/README 2.md +0 -311
  36. package/dist/templates/instructions/core 2/clavix-mode.md +0 -275
  37. package/dist/templates/instructions/core 2/file-operations.md +0 -330
  38. package/dist/templates/instructions/core 2/verification.md +0 -377
  39. package/dist/templates/instructions/troubleshooting 2/jumped-to-implementation.md +0 -234
  40. package/dist/templates/instructions/troubleshooting 2/mode-confusion.md +0 -402
  41. package/dist/templates/instructions/troubleshooting 2/skipped-file-creation.md +0 -385
  42. package/dist/templates/slash-commands/_canonical 2/archive.md +0 -410
  43. package/dist/templates/slash-commands/_canonical 2/deep.md +0 -512
  44. package/dist/templates/slash-commands/_canonical 2/execute.md +0 -80
  45. package/dist/templates/slash-commands/_canonical 2/fast.md +0 -370
  46. package/dist/templates/slash-commands/_canonical 2/implement.md +0 -364
  47. package/dist/templates/slash-commands/_canonical 2/plan.md +0 -329
  48. package/dist/templates/slash-commands/_canonical 2/prd.md +0 -320
  49. package/dist/templates/slash-commands/_canonical 2/prompts.md +0 -97
  50. package/dist/templates/slash-commands/_canonical 2/start.md +0 -204
  51. package/dist/templates/slash-commands/_canonical 2/summarize.md +0 -395
package/LICENSE CHANGED
@@ -1,21 +1,201 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Clavix
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to the Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2025 Clavix
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -116,7 +116,7 @@ clavix prd
116
116
  - Build: `npm run build`
117
117
 
118
118
  ## License
119
- MIT
119
+ Apache-2.0
120
120
 
121
121
  ## Star History
122
122
 
@@ -87,64 +87,13 @@ export default class Deep extends Command {
87
87
  console.log();
88
88
  }
89
89
  // ===== Enhanced Prompt =====
90
+ // Note: Pattern-generated content (Alternative Approaches, Edge Cases, Validation Checklist)
91
+ // is already embedded in result.enhanced by deep mode patterns
90
92
  console.log(chalk.bold.cyan('✨ Enhanced Prompt:\n'));
91
93
  console.log(chalk.dim('─'.repeat(80)));
92
94
  console.log(result.enhanced);
93
95
  console.log(chalk.dim('─'.repeat(80)));
94
96
  console.log();
95
- // ===== DEEP MODE EXCLUSIVE FEATURES =====
96
- // Alternative Approaches (TODO: when AlternativePhrasingGenerator pattern is implemented)
97
- console.log(chalk.bold.cyan('🎨 Alternative Approaches:\n'));
98
- console.log(chalk.cyan(' 1. Functional Decomposition: Break the task into smaller, testable functions'));
99
- console.log(chalk.cyan(' 2. Test-Driven Approach: Write tests first, then implement to satisfy them'));
100
- console.log(chalk.cyan(' 3. Example-Driven: Start with concrete input/output examples'));
101
- console.log(chalk.gray(' Note: Full alternative generation coming soon with deep mode patterns\n'));
102
- // Alternative Structures (TODO: when StructureVariationGenerator pattern is implemented)
103
- console.log(chalk.bold.cyan('📋 Alternative Structures:\n'));
104
- console.log(chalk.cyan(' Step-by-step:'));
105
- console.log(chalk.gray(' • Break complex task into sequential steps'));
106
- console.log(chalk.gray(' • Each step has clear input/output'));
107
- console.log(chalk.cyan(' Template-based:'));
108
- console.log(chalk.gray(' • Provide code/document template to fill'));
109
- console.log(chalk.gray(' • Reduces ambiguity with concrete structure'));
110
- console.log(chalk.cyan(' Example-driven:'));
111
- console.log(chalk.gray(' • Show concrete examples of desired output'));
112
- console.log(chalk.gray(' • AI learns from patterns in examples\n'));
113
- // Validation Checklist (TODO: when ValidationChecklistCreator pattern is implemented)
114
- console.log(chalk.bold.yellow('✅ Validation Checklist:\n'));
115
- console.log(chalk.yellow(' Before considering this task complete, verify:'));
116
- console.log(chalk.yellow(' ☐ Requirements match the objective stated above'));
117
- console.log(chalk.yellow(' ☐ All edge cases are handled (empty, null, invalid inputs)'));
118
- console.log(chalk.yellow(' ☐ Error handling is appropriate for the context'));
119
- console.log(chalk.yellow(' ☐ Output format matches specifications'));
120
- console.log(chalk.yellow(' ☐ Performance is acceptable for expected input sizes'));
121
- if (result.intent.primaryIntent === 'code-generation') {
122
- console.log(chalk.yellow(' ☐ Code is testable and maintainable'));
123
- console.log(chalk.yellow(' ☐ Security considerations addressed (injection, XSS, etc.)'));
124
- }
125
- console.log();
126
- // Edge Cases (TODO: when EdgeCaseIdentifier pattern is implemented)
127
- console.log(chalk.bold.yellow('⚠️ Edge Cases to Consider:\n'));
128
- if (result.intent.primaryIntent === 'code-generation') {
129
- console.log(chalk.yellow(' • Empty or null inputs'));
130
- console.log(chalk.yellow(' • Very large inputs (performance implications)'));
131
- console.log(chalk.yellow(' • Invalid or malformed data'));
132
- console.log(chalk.yellow(' • Concurrent access (if applicable)'));
133
- console.log(chalk.yellow(' • Network failures or timeouts (if I/O involved)'));
134
- }
135
- else if (result.intent.primaryIntent === 'planning') {
136
- console.log(chalk.yellow(' • Scope creep during implementation'));
137
- console.log(chalk.yellow(' • Technical constraints not identified upfront'));
138
- console.log(chalk.yellow(' • Timeline assumptions that may not hold'));
139
- console.log(chalk.yellow(' • Dependencies on external systems'));
140
- }
141
- else {
142
- console.log(chalk.yellow(' • Unexpected user behavior'));
143
- console.log(chalk.yellow(' • Error conditions and recovery'));
144
- console.log(chalk.yellow(' • Resource limitations'));
145
- console.log(chalk.yellow(' • Compatibility across environments'));
146
- }
147
- console.log();
148
97
  // Patterns Applied
149
98
  if (result.appliedPatterns.length > 0) {
150
99
  console.log(chalk.bold.blue('🧩 Patterns Applied:\n'));
@@ -168,7 +117,7 @@ export default class Deep extends Command {
168
117
  console.log(chalk.blue(` ${recommendation}\n`));
169
118
  }
170
119
  console.log(chalk.gray(`⚡ Processed in ${result.processingTimeMs}ms\n`));
171
- console.log(chalk.gray('💡 Tip: Use the enhanced prompt with the validation checklist and edge cases in mind\n'));
120
+ console.log(chalk.gray('💡 Tip: The enhanced prompt above includes alternative approaches, edge cases, and validation checklist\n'));
172
121
  }
173
122
  displayAnalysisOnly(result) {
174
123
  console.log(chalk.bold.cyan('🎯 Intent Analysis:\n'));
@@ -198,9 +147,6 @@ export default class Deep extends Command {
198
147
  async savePrompt(result) {
199
148
  try {
200
149
  const manager = new PromptManager();
201
- const timestamp = new Date().toISOString().replace(/[:.]/g, '-').slice(0, -5);
202
- const hash = this.generateShortHash(result.original);
203
- const filename = `deep-${timestamp}-${hash}`;
204
150
  // Format enhanced prompt as content
205
151
  const content = result.enhanced;
206
152
  await manager.savePrompt(content, 'deep', result.original);
@@ -215,7 +161,7 @@ export default class Deep extends Command {
215
161
  let hash = 0;
216
162
  for (let i = 0; i < text.length; i++) {
217
163
  const char = text.charCodeAt(i);
218
- hash = ((hash << 5) - hash) + char;
164
+ hash = (hash << 5) - hash + char;
219
165
  hash = hash & hash;
220
166
  }
221
167
  return Math.abs(hash).toString(16).slice(0, 4);
@@ -17,9 +17,7 @@ import { loadCommandTemplates } from '../../utils/template-loader.js';
17
17
  import { collectLegacyCommandFiles } from '../../utils/legacy-command-cleanup.js';
18
18
  export default class Init extends Command {
19
19
  static description = 'Initialize Clavix in the current project';
20
- static examples = [
21
- '<%= config.bin %> <%= command.id %>',
22
- ];
20
+ static examples = ['<%= config.bin %> <%= command.id %>'];
23
21
  async run() {
24
22
  console.log(chalk.bold.cyan('\n🚀 Clavix Initialization\n'));
25
23
  try {
@@ -47,7 +45,7 @@ export default class Init extends Command {
47
45
  const config = JSON.parse(configContent);
48
46
  existingIntegrations = config.integrations || config.providers || [];
49
47
  }
50
- catch (error) {
48
+ catch {
51
49
  // Ignore parse errors, will use empty array
52
50
  }
53
51
  }
@@ -161,9 +159,10 @@ export default class Init extends Command {
161
159
  },
162
160
  ]);
163
161
  if (!useNamespace) {
164
- adapter = adapter.name === 'gemini'
165
- ? new GeminiAdapter({ useNamespace: false })
166
- : new QwenAdapter({ useNamespace: false });
162
+ adapter =
163
+ adapter.name === 'gemini'
164
+ ? new GeminiAdapter({ useNamespace: false })
165
+ : new QwenAdapter({ useNamespace: false });
167
166
  console.log(chalk.gray(` → Using ${adapter.getCommandPath()} (no namespacing)`));
168
167
  }
169
168
  }
@@ -235,19 +234,17 @@ export default class Init extends Command {
235
234
  catch (error) {
236
235
  const { getErrorMessage, toError } = await import('../../utils/error-utils.js');
237
236
  console.error(chalk.red('\n✗ Initialization failed:'), getErrorMessage(error));
238
- if (error && typeof error === 'object' && 'hint' in error && typeof error.hint === 'string') {
237
+ if (error &&
238
+ typeof error === 'object' &&
239
+ 'hint' in error &&
240
+ typeof error.hint === 'string') {
239
241
  console.error(chalk.yellow(' Hint:'), error.hint);
240
242
  }
241
243
  throw toError(error);
242
244
  }
243
245
  }
244
246
  async createDirectoryStructure() {
245
- const dirs = [
246
- '.clavix',
247
- '.clavix/sessions',
248
- '.clavix/outputs',
249
- '.clavix/templates',
250
- ];
247
+ const dirs = ['.clavix', '.clavix/sessions', '.clavix/outputs', '.clavix/templates'];
251
248
  for (const dir of dirs) {
252
249
  await FileSystem.ensureDir(dir);
253
250
  }
@@ -289,8 +286,8 @@ Welcome to Clavix! This directory contains your local Clavix configuration and d
289
286
  ## CLI Commands Reference
290
287
 
291
288
  ### Prompt Improvement
292
- - \`clavix fast "<prompt>"\` - Quick CLEAR (C/L/E) improvements with smart triage
293
- - \`clavix deep "<prompt>"\` - Comprehensive CLEAR (C/L/E/A/R) analysis with alternatives
289
+ - \`clavix fast "<prompt>"\` - Quick Clavix Intelligence improvements with smart triage
290
+ - \`clavix deep "<prompt>"\` - Comprehensive Clavix Intelligence analysis with alternatives
294
291
  - \`clavix execute [--latest]\` - Execute saved prompts from fast/deep optimization
295
292
  - \`clavix prompts list\` - View all saved prompts with status (NEW/EXECUTED/OLD/STALE)
296
293
  - \`clavix prompts clear\` - Cleanup prompts (\`--executed\`, \`--stale\`, \`--fast\`, \`--deep\`, \`--all\`)
@@ -80,7 +80,7 @@ export default class Plan extends Command {
80
80
  const resolvedProjectName = projectName ?? path.basename(prdPath);
81
81
  // Check if tasks.md already exists
82
82
  const tasksPath = path.join(prdPath, 'tasks.md');
83
- if (await fs.pathExists(tasksPath) && !flags.overwrite) {
83
+ if ((await fs.pathExists(tasksPath)) && !flags.overwrite) {
84
84
  console.log(chalk.yellow('Warning: tasks.md already exists.'));
85
85
  console.log(chalk.gray(`Location: ${tasksPath}`));
86
86
  console.log(chalk.gray('Use --overwrite to regenerate tasks.md.\n'));
@@ -151,7 +151,7 @@ export default class Plan extends Command {
151
151
  console.log(chalk.gray(' 2. Edit if needed (add/remove/modify tasks)'));
152
152
  console.log(chalk.gray(' 3. Run'), chalk.cyan('clavix implement'), chalk.gray('to start implementation'));
153
153
  console.log();
154
- console.log(chalk.dim('Tip: Tasks follow CLEAR framework principles for optimal AI execution\n'));
154
+ console.log(chalk.dim('Tip: Tasks are optimized with Clavix Intelligence for optimal AI execution\n'));
155
155
  }
156
156
  catch (error) {
157
157
  const errorMessage = error instanceof Error ? error.message : 'An unexpected error occurred';
@@ -0,0 +1,81 @@
1
+ /**
2
+ * v4.3.2: Conversation Quality Tracker
3
+ *
4
+ * Implements the "Supportive Companion" UX pattern for conversational mode.
5
+ * Silently tracks quality, provides positive reinforcement, and gentle guidance.
6
+ */
7
+ export interface TrackedTopic {
8
+ name: string;
9
+ confidence: number;
10
+ firstMentioned: number;
11
+ }
12
+ export interface ConversationQuality {
13
+ topics: TrackedTopic[];
14
+ overallCompleteness: number;
15
+ ambiguityLevel: number;
16
+ messageCount: number;
17
+ }
18
+ export interface NudgeResult {
19
+ shouldNudge: boolean;
20
+ message?: string;
21
+ gap?: string;
22
+ }
23
+ /**
24
+ * ConversationQualityTracker - "Supportive Companion" UX
25
+ *
26
+ * Design principles:
27
+ * - Silent tracking during normal flow
28
+ * - Celebrate progress, don't criticize gaps
29
+ * - Gentle nudge only for critical issues (max 1 per session)
30
+ * - Always reassure that Clavix will help
31
+ */
32
+ export declare class ConversationQualityTracker {
33
+ private topics;
34
+ private messageCount;
35
+ private hasNudged;
36
+ private lastCheckpointAt;
37
+ private readonly TOPIC_KEYWORDS;
38
+ private readonly CRITICAL_TOPICS;
39
+ /**
40
+ * Track a new message (silent analysis)
41
+ */
42
+ trackMessage(content: string): void;
43
+ /**
44
+ * Get positive checkpoint message (call after ~5 messages or on "status")
45
+ * Returns null if not time for a checkpoint
46
+ */
47
+ getPositiveCheckpoint(): string | null;
48
+ /**
49
+ * Check if a gentle nudge is needed (max 1 per session, only for critical gaps)
50
+ */
51
+ shouldNudge(): NudgeResult;
52
+ /**
53
+ * Get reassuring end-of-session message
54
+ */
55
+ getEndMessage(): string;
56
+ /**
57
+ * Get current quality metrics (for internal use)
58
+ */
59
+ calculateQuality(): ConversationQuality;
60
+ /**
61
+ * Get list of covered topics (user-friendly names)
62
+ */
63
+ private getCoveredTopics;
64
+ /**
65
+ * Find a critical gap to nudge about
66
+ */
67
+ private findCriticalGap;
68
+ /**
69
+ * Analyze message content for topic coverage
70
+ */
71
+ private analyzeTopics;
72
+ /**
73
+ * Reset tracker for new session
74
+ */
75
+ reset(): void;
76
+ /**
77
+ * Get summary for debugging/logging
78
+ */
79
+ getSummary(): string;
80
+ }
81
+ //# sourceMappingURL=conversation-quality-tracker.d.ts.map