clavix 2.1.2 → 2.3.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 (138) hide show
  1. package/README.md +3 -3
  2. package/dist/cli/commands/init.js +11 -4
  3. package/dist/core/adapters/copilot-instructions-generator.d.ts +26 -0
  4. package/dist/core/adapters/copilot-instructions-generator.js +104 -0
  5. package/dist/core/agent-manager.js +0 -2
  6. package/dist/templates/agents/copilot-instructions.md +90 -0
  7. package/dist/templates/slash-commands/amp/archive.md +130 -3
  8. package/dist/templates/slash-commands/amp/deep.md +70 -10
  9. package/dist/templates/slash-commands/amp/fast.md +62 -15
  10. package/dist/templates/slash-commands/amp/implement.md +147 -2
  11. package/dist/templates/slash-commands/amp/plan.md +103 -7
  12. package/dist/templates/slash-commands/amp/prd.md +111 -13
  13. package/dist/templates/slash-commands/amp/start.md +77 -1
  14. package/dist/templates/slash-commands/amp/summarize.md +101 -21
  15. package/dist/templates/slash-commands/augment/archive.md +131 -4
  16. package/dist/templates/slash-commands/augment/deep.md +71 -11
  17. package/dist/templates/slash-commands/augment/fast.md +63 -16
  18. package/dist/templates/slash-commands/augment/implement.md +148 -3
  19. package/dist/templates/slash-commands/augment/plan.md +104 -8
  20. package/dist/templates/slash-commands/augment/prd.md +106 -8
  21. package/dist/templates/slash-commands/augment/start.md +78 -2
  22. package/dist/templates/slash-commands/augment/summarize.md +101 -21
  23. package/dist/templates/slash-commands/claude-code/archive.md +130 -3
  24. package/dist/templates/slash-commands/claude-code/deep.md +70 -10
  25. package/dist/templates/slash-commands/claude-code/fast.md +62 -15
  26. package/dist/templates/slash-commands/claude-code/implement.md +147 -2
  27. package/dist/templates/slash-commands/claude-code/plan.md +103 -7
  28. package/dist/templates/slash-commands/claude-code/prd.md +111 -13
  29. package/dist/templates/slash-commands/claude-code/start.md +77 -1
  30. package/dist/templates/slash-commands/claude-code/summarize.md +101 -21
  31. package/dist/templates/slash-commands/cline/archive.md +130 -3
  32. package/dist/templates/slash-commands/cline/deep.md +70 -10
  33. package/dist/templates/slash-commands/cline/fast.md +62 -15
  34. package/dist/templates/slash-commands/cline/implement.md +147 -2
  35. package/dist/templates/slash-commands/cline/plan.md +103 -7
  36. package/dist/templates/slash-commands/cline/prd.md +111 -13
  37. package/dist/templates/slash-commands/cline/start.md +77 -1
  38. package/dist/templates/slash-commands/cline/summarize.md +101 -21
  39. package/dist/templates/slash-commands/codebuddy/archive.md +130 -3
  40. package/dist/templates/slash-commands/codebuddy/deep.md +70 -10
  41. package/dist/templates/slash-commands/codebuddy/fast.md +62 -15
  42. package/dist/templates/slash-commands/codebuddy/implement.md +147 -2
  43. package/dist/templates/slash-commands/codebuddy/plan.md +103 -7
  44. package/dist/templates/slash-commands/codebuddy/prd.md +111 -13
  45. package/dist/templates/slash-commands/codebuddy/start.md +77 -1
  46. package/dist/templates/slash-commands/codebuddy/summarize.md +101 -21
  47. package/dist/templates/slash-commands/codex/archive.md +130 -3
  48. package/dist/templates/slash-commands/codex/deep.md +70 -10
  49. package/dist/templates/slash-commands/codex/fast.md +62 -15
  50. package/dist/templates/slash-commands/codex/implement.md +147 -2
  51. package/dist/templates/slash-commands/codex/plan.md +103 -7
  52. package/dist/templates/slash-commands/codex/prd.md +111 -13
  53. package/dist/templates/slash-commands/codex/start.md +77 -1
  54. package/dist/templates/slash-commands/codex/summarize.md +101 -21
  55. package/dist/templates/slash-commands/crush/archive.md +130 -3
  56. package/dist/templates/slash-commands/crush/deep.md +70 -10
  57. package/dist/templates/slash-commands/crush/fast.md +62 -15
  58. package/dist/templates/slash-commands/crush/implement.md +147 -2
  59. package/dist/templates/slash-commands/crush/plan.md +103 -7
  60. package/dist/templates/slash-commands/crush/prd.md +111 -13
  61. package/dist/templates/slash-commands/crush/start.md +77 -1
  62. package/dist/templates/slash-commands/crush/summarize.md +101 -21
  63. package/dist/templates/slash-commands/cursor/archive.md +130 -3
  64. package/dist/templates/slash-commands/cursor/deep.md +70 -10
  65. package/dist/templates/slash-commands/cursor/fast.md +62 -15
  66. package/dist/templates/slash-commands/cursor/implement.md +147 -2
  67. package/dist/templates/slash-commands/cursor/plan.md +103 -7
  68. package/dist/templates/slash-commands/cursor/prd.md +111 -13
  69. package/dist/templates/slash-commands/cursor/start.md +77 -1
  70. package/dist/templates/slash-commands/cursor/summarize.md +101 -21
  71. package/dist/templates/slash-commands/droid/archive.md +130 -3
  72. package/dist/templates/slash-commands/droid/deep.md +70 -10
  73. package/dist/templates/slash-commands/droid/fast.md +62 -15
  74. package/dist/templates/slash-commands/droid/implement.md +147 -2
  75. package/dist/templates/slash-commands/droid/plan.md +103 -7
  76. package/dist/templates/slash-commands/droid/prd.md +111 -13
  77. package/dist/templates/slash-commands/droid/start.md +77 -1
  78. package/dist/templates/slash-commands/droid/summarize.md +101 -21
  79. package/dist/templates/slash-commands/gemini/archive.toml +132 -4
  80. package/dist/templates/slash-commands/gemini/deep.toml +72 -11
  81. package/dist/templates/slash-commands/gemini/fast.toml +64 -16
  82. package/dist/templates/slash-commands/gemini/implement.toml +149 -3
  83. package/dist/templates/slash-commands/gemini/plan.toml +116 -13
  84. package/dist/templates/slash-commands/gemini/prd.toml +107 -8
  85. package/dist/templates/slash-commands/gemini/start.toml +79 -2
  86. package/dist/templates/slash-commands/gemini/summarize.toml +102 -21
  87. package/dist/templates/slash-commands/kilocode/archive.md +130 -3
  88. package/dist/templates/slash-commands/kilocode/deep.md +70 -10
  89. package/dist/templates/slash-commands/kilocode/fast.md +62 -15
  90. package/dist/templates/slash-commands/kilocode/implement.md +147 -2
  91. package/dist/templates/slash-commands/kilocode/plan.md +103 -7
  92. package/dist/templates/slash-commands/kilocode/prd.md +111 -13
  93. package/dist/templates/slash-commands/kilocode/start.md +77 -1
  94. package/dist/templates/slash-commands/kilocode/summarize.md +101 -21
  95. package/dist/templates/slash-commands/opencode/archive.md +130 -3
  96. package/dist/templates/slash-commands/opencode/deep.md +70 -10
  97. package/dist/templates/slash-commands/opencode/fast.md +62 -15
  98. package/dist/templates/slash-commands/opencode/implement.md +147 -2
  99. package/dist/templates/slash-commands/opencode/plan.md +103 -7
  100. package/dist/templates/slash-commands/opencode/prd.md +111 -13
  101. package/dist/templates/slash-commands/opencode/start.md +77 -1
  102. package/dist/templates/slash-commands/opencode/summarize.md +101 -21
  103. package/dist/templates/slash-commands/qwen/archive.toml +132 -4
  104. package/dist/templates/slash-commands/qwen/deep.toml +72 -11
  105. package/dist/templates/slash-commands/qwen/fast.toml +64 -16
  106. package/dist/templates/slash-commands/qwen/implement.toml +149 -3
  107. package/dist/templates/slash-commands/qwen/plan.toml +116 -13
  108. package/dist/templates/slash-commands/qwen/prd.toml +107 -8
  109. package/dist/templates/slash-commands/qwen/start.toml +79 -2
  110. package/dist/templates/slash-commands/qwen/summarize.toml +102 -21
  111. package/dist/templates/slash-commands/roocode/archive.md +130 -3
  112. package/dist/templates/slash-commands/roocode/deep.md +70 -10
  113. package/dist/templates/slash-commands/roocode/fast.md +62 -15
  114. package/dist/templates/slash-commands/roocode/implement.md +147 -2
  115. package/dist/templates/slash-commands/roocode/plan.md +103 -7
  116. package/dist/templates/slash-commands/roocode/prd.md +111 -13
  117. package/dist/templates/slash-commands/roocode/start.md +77 -1
  118. package/dist/templates/slash-commands/roocode/summarize.md +101 -21
  119. package/dist/templates/slash-commands/windsurf/archive.md +130 -3
  120. package/dist/templates/slash-commands/windsurf/deep.md +70 -10
  121. package/dist/templates/slash-commands/windsurf/fast.md +62 -15
  122. package/dist/templates/slash-commands/windsurf/implement.md +147 -2
  123. package/dist/templates/slash-commands/windsurf/plan.md +103 -7
  124. package/dist/templates/slash-commands/windsurf/prd.md +111 -13
  125. package/dist/templates/slash-commands/windsurf/start.md +77 -1
  126. package/dist/templates/slash-commands/windsurf/summarize.md +101 -21
  127. package/dist/types/agent.d.ts +1 -1
  128. package/package.json +2 -2
  129. package/dist/core/adapters/copilot-adapter.d.ts +0 -24
  130. package/dist/core/adapters/copilot-adapter.js +0 -88
  131. package/dist/templates/slash-commands/copilot/archive.agent.md +0 -164
  132. package/dist/templates/slash-commands/copilot/deep.agent.md +0 -147
  133. package/dist/templates/slash-commands/copilot/fast.agent.md +0 -136
  134. package/dist/templates/slash-commands/copilot/implement.agent.md +0 -122
  135. package/dist/templates/slash-commands/copilot/plan.agent.md +0 -69
  136. package/dist/templates/slash-commands/copilot/prd.agent.md +0 -80
  137. package/dist/templates/slash-commands/copilot/start.agent.md +0 -66
  138. package/dist/templates/slash-commands/copilot/summarize.agent.md +0 -99
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Clavix
2
- > AI prompt improvement & PRD generation CLI (CLEAR Framework)
2
+ > Transform vague ideas into production-ready prompts. Analyze gaps, generate PRDs, and supercharge your AI coding workflow with the CLEAR framework.
3
3
 
4
4
  ## Table of contents
5
5
  - [Why Clavix?](#why-clavix)
@@ -19,8 +19,8 @@ Clavix is built on CLEAR (Concise, Logical, Explicit, Adaptive, Reflective), an
19
19
  | Category | Providers |
20
20
  | --- | --- |
21
21
  | IDE & editor extensions | Cursor · Windsurf · Kilocode · Roocode · Cline |
22
- | CLI agents | Claude Code · Droid CLI · CodeBuddy CLI · OpenCode · Gemini CLI · Qwen Code · Amp · Crush CLI · Codex CLI |
23
- | Universal adapters | AGENTS.md · OCTO.md · WARP.md |
22
+ | CLI agents | Claude Code · Droid CLI · CodeBuddy CLI · OpenCode · Gemini CLI · Qwen Code · Amp · Crush CLI · Codex CLI · Augment CLI |
23
+ | Universal adapters | AGENTS.md · GitHub Copilot · OCTO.md · WARP.md |
24
24
 
25
25
  Provider paths and argument placeholders are listed in [docs/providers.md](docs/providers.md).
26
26
 
@@ -46,6 +46,7 @@ const doc_injector_1 = require("../../core/doc-injector");
46
46
  const agents_md_generator_1 = require("../../core/adapters/agents-md-generator");
47
47
  const octo_md_generator_1 = require("../../core/adapters/octo-md-generator");
48
48
  const warp_md_generator_1 = require("../../core/adapters/warp-md-generator");
49
+ const copilot_instructions_generator_1 = require("../../core/adapters/copilot-instructions-generator");
49
50
  const file_system_1 = require("../../utils/file-system");
50
51
  const config_1 = require("../../types/config");
51
52
  const gemini_adapter_1 = require("../../core/adapters/gemini-adapter");
@@ -98,10 +99,6 @@ class Init extends core_1.Command {
98
99
  name: 'CodeBuddy (.codebuddy/commands/)',
99
100
  value: 'codebuddy',
100
101
  },
101
- {
102
- name: 'Copilot CLI (.github/agents/)',
103
- value: 'copilot',
104
- },
105
102
  {
106
103
  name: 'Crush CLI (.crush/commands/clavix/)',
107
104
  value: 'crush',
@@ -154,6 +151,10 @@ class Init extends core_1.Command {
154
151
  name: 'agents.md (Universal - for tools without slash commands)',
155
152
  value: 'agents-md',
156
153
  },
154
+ {
155
+ name: 'GitHub Copilot (.github/copilot-instructions.md)',
156
+ value: 'copilot-instructions',
157
+ },
157
158
  {
158
159
  name: 'Warp (WARP.md - optimized for Warp)',
159
160
  value: 'warp-md',
@@ -193,6 +194,12 @@ class Init extends core_1.Command {
193
194
  await agents_md_generator_1.AgentsMdGenerator.generate();
194
195
  continue;
195
196
  }
197
+ // Handle copilot-instructions separately (it's not an adapter)
198
+ if (providerName === 'copilot-instructions') {
199
+ console.log(chalk_1.default.gray(' ✓ Generating .github/copilot-instructions.md...'));
200
+ await copilot_instructions_generator_1.CopilotInstructionsGenerator.generate();
201
+ continue;
202
+ }
196
203
  // Handle octo-md separately (it's not an adapter)
197
204
  if (providerName === 'octo-md') {
198
205
  console.log(chalk_1.default.gray(' ✓ Generating OCTO.md...'));
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Generator for GitHub Copilot instructions file
3
+ * Provides workflow instructions via .github/copilot-instructions.md
4
+ */
5
+ export declare class CopilotInstructionsGenerator {
6
+ static readonly TARGET_FILE = ".github/copilot-instructions.md";
7
+ static readonly START_MARKER = "<!-- CLAVIX:START -->";
8
+ static readonly END_MARKER = "<!-- CLAVIX:END -->";
9
+ /**
10
+ * Generate or update .github/copilot-instructions.md with Clavix workflows
11
+ */
12
+ static generate(): Promise<void>;
13
+ /**
14
+ * Inject or update managed block in .github/copilot-instructions.md
15
+ */
16
+ private static injectManagedBlock;
17
+ /**
18
+ * Escape special regex characters
19
+ */
20
+ private static escapeRegex;
21
+ /**
22
+ * Check if .github/copilot-instructions.md has Clavix block
23
+ */
24
+ static hasClavixBlock(): Promise<boolean>;
25
+ }
26
+ //# sourceMappingURL=copilot-instructions-generator.d.ts.map
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.CopilotInstructionsGenerator = void 0;
37
+ const file_system_1 = require("../../utils/file-system");
38
+ const path = __importStar(require("path"));
39
+ /**
40
+ * Generator for GitHub Copilot instructions file
41
+ * Provides workflow instructions via .github/copilot-instructions.md
42
+ */
43
+ class CopilotInstructionsGenerator {
44
+ /**
45
+ * Generate or update .github/copilot-instructions.md with Clavix workflows
46
+ */
47
+ static async generate() {
48
+ const templatePath = path.join(__dirname, '../../templates/agents/copilot-instructions.md');
49
+ // Check if template exists
50
+ if (!(await file_system_1.FileSystem.exists(templatePath))) {
51
+ throw new Error(`Copilot instructions template not found at ${templatePath}`);
52
+ }
53
+ const template = await file_system_1.FileSystem.readFile(templatePath);
54
+ // Ensure .github directory exists
55
+ await file_system_1.FileSystem.ensureDir('.github');
56
+ // Inject into .github/copilot-instructions.md using managed blocks
57
+ await this.injectManagedBlock(this.TARGET_FILE, template);
58
+ }
59
+ /**
60
+ * Inject or update managed block in .github/copilot-instructions.md
61
+ */
62
+ static async injectManagedBlock(filePath, content) {
63
+ let fileContent = '';
64
+ // Read existing file or start with empty content
65
+ if (await file_system_1.FileSystem.exists(filePath)) {
66
+ fileContent = await file_system_1.FileSystem.readFile(filePath);
67
+ }
68
+ const blockRegex = new RegExp(`${this.escapeRegex(this.START_MARKER)}[\\s\\S]*?${this.escapeRegex(this.END_MARKER)}`, 'g');
69
+ const wrappedContent = `${this.START_MARKER}\n${content}\n${this.END_MARKER}`;
70
+ if (blockRegex.test(fileContent)) {
71
+ // Replace existing block
72
+ fileContent = fileContent.replace(blockRegex, wrappedContent);
73
+ }
74
+ else {
75
+ // Append new block
76
+ if (fileContent && !fileContent.endsWith('\n\n')) {
77
+ fileContent += '\n\n';
78
+ }
79
+ fileContent += wrappedContent + '\n';
80
+ }
81
+ await file_system_1.FileSystem.writeFileAtomic(filePath, fileContent);
82
+ }
83
+ /**
84
+ * Escape special regex characters
85
+ */
86
+ static escapeRegex(str) {
87
+ return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
88
+ }
89
+ /**
90
+ * Check if .github/copilot-instructions.md has Clavix block
91
+ */
92
+ static async hasClavixBlock() {
93
+ if (!(await file_system_1.FileSystem.exists(this.TARGET_FILE))) {
94
+ return false;
95
+ }
96
+ const content = await file_system_1.FileSystem.readFile(this.TARGET_FILE);
97
+ return content.includes(this.START_MARKER);
98
+ }
99
+ }
100
+ exports.CopilotInstructionsGenerator = CopilotInstructionsGenerator;
101
+ CopilotInstructionsGenerator.TARGET_FILE = '.github/copilot-instructions.md';
102
+ CopilotInstructionsGenerator.START_MARKER = '<!-- CLAVIX:START -->';
103
+ CopilotInstructionsGenerator.END_MARKER = '<!-- CLAVIX:END -->';
104
+ //# sourceMappingURL=copilot-instructions-generator.js.map
@@ -17,7 +17,6 @@ const gemini_adapter_1 = require("./adapters/gemini-adapter");
17
17
  const qwen_adapter_1 = require("./adapters/qwen-adapter");
18
18
  const codex_adapter_1 = require("./adapters/codex-adapter");
19
19
  const augment_adapter_1 = require("./adapters/augment-adapter");
20
- const copilot_adapter_1 = require("./adapters/copilot-adapter");
21
20
  /**
22
21
  * Agent Manager - handles agent detection and registration
23
22
  */
@@ -40,7 +39,6 @@ class AgentManager {
40
39
  this.registerAdapter(new gemini_adapter_1.GeminiAdapter());
41
40
  this.registerAdapter(new qwen_adapter_1.QwenAdapter());
42
41
  this.registerAdapter(new codex_adapter_1.CodexAdapter());
43
- this.registerAdapter(new copilot_adapter_1.CopilotAdapter());
44
42
  }
45
43
  /**
46
44
  * Register a new agent adapter
@@ -0,0 +1,90 @@
1
+ # Clavix Workflows for GitHub Copilot
2
+
3
+ These instructions enhance GitHub Copilot's understanding of the Clavix prompt engineering framework and workflow commands available in this project.
4
+
5
+ ## About Clavix
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.
8
+
9
+ ## Available Commands
10
+
11
+ When working with this project, you can use the following Clavix commands:
12
+
13
+ ### Prompt Improvement
14
+ - `clavix fast "<prompt>"` - Quick CLEAR analysis (C/L/E components) with improved prompt output
15
+ - `clavix deep "<prompt>"` - Comprehensive CLEAR analysis (all 5 components: C/L/E/A/R) with alternatives and validation
16
+
17
+ ### Strategic Planning
18
+ - `clavix prd` - Interactive PRD generation through Socratic questioning
19
+ - `clavix plan` - Transform PRDs into phase-based implementation tasks
20
+ - `clavix implement` - Execute tasks with progress tracking
21
+
22
+ ### Conversational Workflows
23
+ - `clavix start` - Begin conversational session for requirements gathering
24
+ - `clavix summarize [session-id]` - Extract mini-PRD and optimized prompts from sessions
25
+
26
+ ### Project Management
27
+ - `clavix list` - List sessions and output projects
28
+ - `clavix show [session-id]` - Inspect session or project details
29
+ - `clavix archive [project]` - Archive or restore completed projects
30
+ - `clavix update` - Refresh Clavix documentation and commands
31
+
32
+ ## Workflow Patterns
33
+
34
+ ### Quick Prompt Improvement
35
+ 1. User provides a rough prompt
36
+ 2. Run `clavix fast "<prompt>"` for quick CLEAR-validated improvements
37
+ 3. Use the optimized prompt for better results
38
+
39
+ ### Comprehensive Prompt Analysis
40
+ 1. User has a complex requirement
41
+ 2. Run `clavix deep "<prompt>"` for full CLEAR analysis
42
+ 3. Review alternative variations and validation checklists
43
+ 4. Select the best approach
44
+
45
+ ### Strategic Project Planning
46
+ 1. Run `clavix prd` to generate a comprehensive PRD through guided questions
47
+ 2. Run `clavix plan` to break down the PRD into implementation tasks
48
+ 3. Run `clavix implement` to execute tasks systematically
49
+ 4. Archive completed work with `clavix archive`
50
+
51
+ ### Conversational Requirements Gathering
52
+ 1. Run `clavix start` to begin capturing a conversation
53
+ 2. Discuss requirements naturally with the user
54
+ 3. Run `clavix summarize` to extract structured requirements and prompts
55
+
56
+ ## CLEAR Framework Components
57
+
58
+ When analyzing or improving prompts, apply these CLEAR Framework principles:
59
+
60
+ - **[C] Concise**: Remove verbosity, pleasantries, unnecessary qualifiers
61
+ - **[L] Logical**: Ensure coherent sequencing (context → requirements → constraints → output)
62
+ - **[E] Explicit**: Add clear specifications for persona, format, tone, success criteria
63
+ - **[A] Adaptive**: Provide alternative phrasings and flexible structures
64
+ - **[R] Reflective**: Include validation checklists and quality criteria
65
+
66
+ ## Output Locations
67
+
68
+ Clavix stores artifacts in the `.clavix/` directory:
69
+ - `.clavix/outputs/<project>/` - PRDs, tasks, and optimized prompts
70
+ - `.clavix/sessions/` - Captured conversational sessions
71
+ - `.clavix/templates/` - Custom template overrides
72
+ - `.clavix/config.json` - Project configuration
73
+
74
+ ## Best Practices
75
+
76
+ 1. **Start with the right mode**: Use fast mode for simple prompts, deep mode for complex requirements, and PRD mode for strategic planning
77
+ 2. **Leverage CLEAR Framework**: Always consider the 5 CLEAR components when crafting prompts
78
+ 3. **Document requirements**: Use PRD workflow for significant features to ensure clear requirements
79
+ 4. **Track progress**: Use implement command to maintain structured task execution
80
+ 5. **Archive completed work**: Keep project organized by archiving finished projects
81
+
82
+ ## Integration with GitHub Copilot
83
+
84
+ When users ask for help with prompts or requirements:
85
+ 1. Suggest running the appropriate Clavix command
86
+ 2. Explain the expected output and benefits
87
+ 3. Help interpret Clavix-generated outputs
88
+ 4. Apply CLEAR Framework principles in your responses
89
+
90
+ This integration makes GitHub Copilot aware of Clavix workflows and can suggest using Clavix commands when appropriate.
@@ -47,7 +47,33 @@ You are helping the user archive completed PRD projects to keep their workspace
47
47
  - User wants to archive work-in-progress
48
48
  - Tasks are incomplete but project is done
49
49
 
50
- 5. **List Archived Projects**:
50
+ 5. **Delete Project (Permanent Removal)**: **DESTRUCTIVE ACTION**
51
+ ```bash
52
+ clavix archive [project-name] --delete
53
+ ```
54
+
55
+ **WARNING**: This PERMANENTLY deletes the project. Cannot be restored.
56
+
57
+ **When to delete vs archive:**
58
+ - **DELETE**: Failed experiments, duplicate projects, test/demo data, abandoned prototypes with no value
59
+ - **ARCHIVE**: Completed work, incomplete but potentially useful work, anything you might reference later
60
+
61
+ **Delete decision tree:**
62
+ ```
63
+ Is this a failed experiment with no learning value? → DELETE
64
+ Is this a duplicate/test project with no unique info? → DELETE
65
+ Might you need to reference this code later? → ARCHIVE
66
+ Could this be useful for learning/reference? → ARCHIVE
67
+ Are you unsure? → ARCHIVE (safe default)
68
+ ```
69
+
70
+ **Safety confirmation required:**
71
+ - Shows project details and task status
72
+ - Requires typing project name to confirm
73
+ - Warns about permanent deletion
74
+ - Lists what will be permanently deleted
75
+
76
+ 6. **List Archived Projects**:
51
77
  ```bash
52
78
  clavix archive --list
53
79
  ```
@@ -63,14 +89,14 @@ You are helping the user archive completed PRD projects to keep their workspace
63
89
 
64
90
  ## When to Archive
65
91
 
66
- **Good times to archive**:
92
+ **Good times to archive:**
67
93
  - All implementation tasks are completed (`tasks.md` shows 100%)
68
94
  - Project has been deployed/shipped to production
69
95
  - Feature is complete and no more work planned
70
96
  - User explicitly requests archival
71
97
  - Old/abandoned projects that won't be continued
72
98
 
73
- **Don't archive when**:
99
+ **Don't archive when:**
74
100
  - Tasks are still in progress (unless using --force)
75
101
  - Project is actively being worked on
76
102
  - Future enhancements are planned in current tasks
@@ -131,6 +157,29 @@ You: "I'll restore it from the archive"
131
157
  Result: Project moved back to .clavix/outputs/user-authentication-system/
132
158
  ```
133
159
 
160
+ ### Workflow 4: Delete Failed Experiment
161
+ ```
162
+ User: "I have a test project 'api-experiment-1' that I don't need anymore"
163
+ You: "Is this something you might reference later, or can it be permanently deleted?"
164
+
165
+ User: "It was just a quick test, no value. Delete it."
166
+ You: "This will permanently delete the project. I'll run the delete command."
167
+
168
+ Run: clavix archive api-experiment-1 --delete
169
+
170
+ System shows:
171
+ Project: api-experiment-1
172
+ Tasks: 3/5 completed
173
+ Files: full-prd.md, quick-prd.md, tasks.md
174
+
175
+ WARNING: This action is PERMANENT and CANNOT be undone.
176
+ Type the project name to confirm deletion: _
177
+
178
+ User types: api-experiment-1
179
+
180
+ Result: Project permanently deleted from .clavix/outputs/api-experiment-1/
181
+ ```
182
+
134
183
  ## AI Agent Guidelines
135
184
 
136
185
  When user mentions archiving or cleaning up projects:
@@ -155,6 +204,28 @@ When user mentions archiving or cleaning up projects:
155
204
  - Use `clavix archive --list` to show what's archived
156
205
  - Offer to restore if needed
157
206
 
207
+ 5. **Handle delete requests carefully**:
208
+ - Always ask if they want to delete or archive
209
+ - Explain that delete is permanent and irreversible
210
+ - Suggest archive as the safer default
211
+ - Use decision tree to help user decide
212
+ - Only proceed with `--delete` after clear confirmation
213
+ - Double-check it's truly no-value content (failed experiments, duplicates)
214
+
215
+ ## Workflow Navigation
216
+
217
+ **You are here:** Archive (Project Cleanup)
218
+
219
+ **Common workflows:**
220
+ - **Complete workflow**: `/clavix:implement` → [all tasks done] → `/clavix:archive` → Clean workspace
221
+ - **Review and archive**: `/clavix:archive` → [select completed project] → Archive
222
+ - **Restore old work**: `/clavix:archive --list` → `/clavix:archive --restore [project]` → Resume
223
+
224
+ **Related commands:**
225
+ - `/clavix:implement` - Complete remaining tasks before archiving
226
+ - `/clavix:plan` - Review task completion status
227
+ - `/clavix:prd` - Start new project after archiving old one
228
+
158
229
  ## Tips
159
230
 
160
231
  - Archive keeps your active projects list clean and focused
@@ -162,3 +233,59 @@ When user mentions archiving or cleaning up projects:
162
233
  - Archive is searchable - you can still `grep` or find files in archive/
163
234
  - Regular archiving improves `/clavix:plan` and `/clavix:implement` performance
164
235
  - Use `--list` regularly to know what's been archived
236
+
237
+ ## Troubleshooting
238
+
239
+ ### Issue: No projects available to archive
240
+ **Cause**: No projects in `.clavix/outputs/` OR all already archived
241
+ **Solution**:
242
+ - Run `clavix archive --list` to see archived projects
243
+ - Check `.clavix/outputs/` for active projects
244
+ - If none exist, no action needed
245
+
246
+ ### Issue: Trying to archive project with incomplete tasks
247
+ **Cause**: User wants to archive but tasks aren't 100% done
248
+ **Solution** (inline):
249
+ - Warn: "Project has X incomplete tasks. Archive anyway?"
250
+ - Show which tasks are incomplete
251
+ - Suggest `--force` flag if user confirms
252
+ - Recommend completing tasks first if they're actually unfinished (not scope-changed)
253
+
254
+ ### Issue: Cannot restore archived project (name conflict)
255
+ **Cause**: Project with same name already exists in active outputs
256
+ **Solution**:
257
+ - Error: "Project '[name]' already exists in active outputs"
258
+ - Suggest renaming one of them
259
+ - Or archive the active one first, then restore
260
+ - Or restore to different name (if CLI supports it)
261
+
262
+ ### Issue: Unsure whether to delete or archive
263
+ **Cause**: User wants to clean up but uncertain about permanence
264
+ **Solution**:
265
+ - Use the decision tree in template
266
+ - Default recommendation: ARCHIVE (safer)
267
+ - Only suggest delete for: duplicates, failed experiments, test data
268
+ - Remind: Archive is free, disk space is cheap, regret is expensive
269
+
270
+ ### Issue: Accidentally deleted project (used --delete instead of archive)
271
+ **Cause**: User error or misunderstanding of --delete flag
272
+ **Solution**:
273
+ - Cannot be recovered from Clavix
274
+ - Check if git history exists (if code was committed)
275
+ - Check if user has backups
276
+ - Learn: Use archive by default, delete only when absolutely certain
277
+
278
+ ### Issue: Archive directory getting too large
279
+ **Cause**: Many archived projects accumulating
280
+ **Solution**:
281
+ - Archive is meant to grow - this is normal
282
+ - Projects in archive don't affect performance
283
+ - If truly concerned: Review archive, delete ancient/irrelevant projects
284
+ - Or move very old archives to external backup storage
285
+
286
+ ### Issue: Archived project but forgot what it was about
287
+ **Cause**: No naming convention or time passed
288
+ **Solution**:
289
+ - Read PRD in archived project: `.clavix/outputs/archive/[project]/full-prd.md`
290
+ - PRD contains problem, goal, and features
291
+ - Consider better naming conventions: date-feature format (e.g., "2024-01-user-auth")
@@ -31,21 +31,37 @@ An academically-validated prompt engineering framework by Dr. Leo Lo (University
31
31
  - **Adaptiveness [A]**: Multiple variations and approaches
32
32
  - **Reflectiveness [R]**: Full validation and edge case analysis
33
33
 
34
- 3. **Generate Comprehensive Output**:
34
+ 3. **Strategic Scope Detection** (before detailed analysis):
35
35
 
36
- a. **📊 CLEAR Assessment** (all 5 components with scores)
36
+ **Check for strategic concerns** by identifying keywords/themes:
37
+ - **Architecture**: system design, microservices, monolith, architecture patterns, scalability patterns
38
+ - **Security**: authentication, authorization, encryption, security, OWASP, vulnerabilities, threat model
39
+ - **Scalability**: load balancing, caching, database scaling, performance optimization, high availability
40
+ - **Infrastructure**: deployment, CI/CD, DevOps, cloud infrastructure, containers, orchestration
41
+ - **Business Impact**: ROI, business metrics, KPIs, stakeholder impact, market analysis
37
42
 
38
- b. **✨ CLEAR-Optimized Prompt** (applying all components)
43
+ **If 3+ strategic keywords detected**:
44
+ Ask the user: "I notice this involves strategic decisions around [detected themes]. These topics benefit from PRD-style planning with business context and architectural considerations. Would you like to:
45
+ - Switch to `/clavix:prd` for comprehensive strategic planning (recommended)
46
+ - Continue with deep mode for prompt-level analysis only"
39
47
 
40
- c. **📝 CLEAR Changes Made** (labeled with [C], [L], [E], [A], [R])
48
+ **If user chooses to continue**, proceed with deep analysis but remind them at the end that `/clavix:prd` is available for strategic planning.
41
49
 
42
- d. **🔄 Adaptive Variations [A]**:
50
+ 4. **Generate Comprehensive Output**:
51
+
52
+ a. **CLEAR Assessment** (all 5 components with scores)
53
+
54
+ b. **CLEAR-Optimized Prompt** (applying all components)
55
+
56
+ c. **CLEAR Changes Made** (labeled with [C], [L], [E], [A], [R])
57
+
58
+ d. **Adaptive Variations [A]**:
43
59
  - 2-3 alternative phrasings
44
60
  - Alternative structures (user story, job story, structured)
45
61
  - Temperature recommendations
46
62
  - Explain when each approach is most appropriate
47
63
 
48
- e. **🤔 Reflection Checklist [R]**:
64
+ e. **Reflection Checklist [R]**:
49
65
  - Validation steps for accuracy
50
66
  - Edge cases to consider
51
67
  - "What could go wrong" analysis
@@ -62,14 +78,14 @@ An academically-validated prompt engineering framework by Dr. Leo Lo (University
62
78
 
63
79
  ## Deep Mode Features
64
80
 
65
- Include (Full CLEAR Framework):
81
+ **Include (Full CLEAR Framework):**
66
82
  - **[C, L, E]**: All fast mode analysis (conciseness, logic, explicitness)
67
83
  - **[A] Adaptive**: Alternative phrasings, structures, flexibility, temperature
68
84
  - **[R] Reflective**: Validation checklist, edge cases, quality criteria, fact-checking
69
85
  - **CLEAR Assessment**: All 5 component scores
70
86
  - **CLEAR-labeled Changes**: Educational feedback showing which component improved what
71
87
 
72
- Do NOT include (these belong in `/clavix:prd`):
88
+ **Do NOT include (these belong in `/clavix:prd`):**
73
89
  - System architecture recommendations
74
90
  - Security best practices
75
91
  - Scalability strategy
@@ -101,12 +117,12 @@ Output:
101
117
  - How to handle session expiration during active use?
102
118
 
103
119
  ## Implementation Examples
104
- Good:
120
+ **Good:**
105
121
  - Prompt specifies authentication method, error handling, and accessibility requirements
106
122
  - Includes context about existing auth system and integration points
107
123
  - Defines measurable success criteria (load time, accessibility score)
108
124
 
109
- Bad:
125
+ **Bad:**
110
126
  - "Make a login page" - no context, constraints, or success criteria
111
127
  - Missing technical stack and integration requirements
112
128
  - No consideration of security or user experience
@@ -137,6 +153,20 @@ Output:
137
153
  - **Deep mode** (`/clavix:deep`): Full CLEAR (C, L, E, A, R) - comprehensive analysis with alternatives and validation
138
154
  - **PRD mode** (`/clavix:prd`): CLEAR-validated PRD generation - strategic planning with architecture decisions
139
155
 
156
+ ## Workflow Navigation
157
+
158
+ **You are here:** Deep Mode (Comprehensive CLEAR Analysis)
159
+
160
+ **Common workflows:**
161
+ - **Thorough analysis**: `/clavix:deep` → Use optimized prompt + alternatives
162
+ - **Escalate to strategic**: `/clavix:deep` → (detects strategic scope) → `/clavix:prd` → Plan → Implement → Archive
163
+ - **From fast mode**: `/clavix:fast` → (suggests) `/clavix:deep` → Full analysis with A & R components
164
+
165
+ **Related commands:**
166
+ - `/clavix:fast` - Quick CLEAR improvements (C, L, E only)
167
+ - `/clavix:prd` - Strategic PRD generation for architecture/business decisions
168
+ - `/clavix:start` - Conversational mode for exploring unclear requirements
169
+
140
170
  ## Tips
141
171
 
142
172
  - **Apply full CLEAR framework** systematically: all 5 components
@@ -145,3 +175,33 @@ Output:
145
175
  - Use **[A] Adaptive** to explore alternative approaches
146
176
  - Use **[R] Reflective** to identify edge cases and validation needs
147
177
  - For architecture, security, and scalability, recommend `/clavix:prd`
178
+
179
+ ## Troubleshooting
180
+
181
+ ### Issue: Strategic scope detected but user wants to continue with deep mode
182
+ **Cause**: User prefers deep analysis over PRD generation
183
+ **Solution**:
184
+ - Proceed with deep mode as requested
185
+ - Remind at end that `/clavix:prd` is available for strategic planning
186
+ - Focus on prompt-level CLEAR analysis, exclude architecture recommendations
187
+
188
+ ### Issue: Too many alternative variations making output overwhelming
189
+ **Cause**: Adaptive component generating many options
190
+ **Solution**:
191
+ - Limit to 2-3 most distinct alternatives
192
+ - Focus on meaningfully different approaches (not minor wording changes)
193
+ - Group similar variations together
194
+
195
+ ### Issue: Reflective validation finding too many edge cases
196
+ **Cause**: Complex prompt with many potential failure modes
197
+ **Solution**:
198
+ - Prioritize most likely or highest-impact edge cases
199
+ - Group related edge cases
200
+ - Suggest documenting all edge cases in PRD for complex projects
201
+
202
+ ### Issue: Deep analysis still feels insufficient for complex project
203
+ **Cause**: Project needs strategic planning, not just prompt analysis
204
+ **Solution**:
205
+ - Switch to `/clavix:prd` for comprehensive planning
206
+ - Deep mode is for prompts, PRD mode is for projects
207
+ - Use PRD workflow: PRD → Plan → Implement