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.
- package/README.md +3 -3
- package/dist/cli/commands/init.js +11 -4
- package/dist/core/adapters/copilot-instructions-generator.d.ts +26 -0
- package/dist/core/adapters/copilot-instructions-generator.js +104 -0
- package/dist/core/agent-manager.js +0 -2
- package/dist/templates/agents/copilot-instructions.md +90 -0
- package/dist/templates/slash-commands/amp/archive.md +130 -3
- package/dist/templates/slash-commands/amp/deep.md +70 -10
- package/dist/templates/slash-commands/amp/fast.md +62 -15
- package/dist/templates/slash-commands/amp/implement.md +147 -2
- package/dist/templates/slash-commands/amp/plan.md +103 -7
- package/dist/templates/slash-commands/amp/prd.md +111 -13
- package/dist/templates/slash-commands/amp/start.md +77 -1
- package/dist/templates/slash-commands/amp/summarize.md +101 -21
- package/dist/templates/slash-commands/augment/archive.md +131 -4
- package/dist/templates/slash-commands/augment/deep.md +71 -11
- package/dist/templates/slash-commands/augment/fast.md +63 -16
- package/dist/templates/slash-commands/augment/implement.md +148 -3
- package/dist/templates/slash-commands/augment/plan.md +104 -8
- package/dist/templates/slash-commands/augment/prd.md +106 -8
- package/dist/templates/slash-commands/augment/start.md +78 -2
- package/dist/templates/slash-commands/augment/summarize.md +101 -21
- package/dist/templates/slash-commands/claude-code/archive.md +130 -3
- package/dist/templates/slash-commands/claude-code/deep.md +70 -10
- package/dist/templates/slash-commands/claude-code/fast.md +62 -15
- package/dist/templates/slash-commands/claude-code/implement.md +147 -2
- package/dist/templates/slash-commands/claude-code/plan.md +103 -7
- package/dist/templates/slash-commands/claude-code/prd.md +111 -13
- package/dist/templates/slash-commands/claude-code/start.md +77 -1
- package/dist/templates/slash-commands/claude-code/summarize.md +101 -21
- package/dist/templates/slash-commands/cline/archive.md +130 -3
- package/dist/templates/slash-commands/cline/deep.md +70 -10
- package/dist/templates/slash-commands/cline/fast.md +62 -15
- package/dist/templates/slash-commands/cline/implement.md +147 -2
- package/dist/templates/slash-commands/cline/plan.md +103 -7
- package/dist/templates/slash-commands/cline/prd.md +111 -13
- package/dist/templates/slash-commands/cline/start.md +77 -1
- package/dist/templates/slash-commands/cline/summarize.md +101 -21
- package/dist/templates/slash-commands/codebuddy/archive.md +130 -3
- package/dist/templates/slash-commands/codebuddy/deep.md +70 -10
- package/dist/templates/slash-commands/codebuddy/fast.md +62 -15
- package/dist/templates/slash-commands/codebuddy/implement.md +147 -2
- package/dist/templates/slash-commands/codebuddy/plan.md +103 -7
- package/dist/templates/slash-commands/codebuddy/prd.md +111 -13
- package/dist/templates/slash-commands/codebuddy/start.md +77 -1
- package/dist/templates/slash-commands/codebuddy/summarize.md +101 -21
- package/dist/templates/slash-commands/codex/archive.md +130 -3
- package/dist/templates/slash-commands/codex/deep.md +70 -10
- package/dist/templates/slash-commands/codex/fast.md +62 -15
- package/dist/templates/slash-commands/codex/implement.md +147 -2
- package/dist/templates/slash-commands/codex/plan.md +103 -7
- package/dist/templates/slash-commands/codex/prd.md +111 -13
- package/dist/templates/slash-commands/codex/start.md +77 -1
- package/dist/templates/slash-commands/codex/summarize.md +101 -21
- package/dist/templates/slash-commands/crush/archive.md +130 -3
- package/dist/templates/slash-commands/crush/deep.md +70 -10
- package/dist/templates/slash-commands/crush/fast.md +62 -15
- package/dist/templates/slash-commands/crush/implement.md +147 -2
- package/dist/templates/slash-commands/crush/plan.md +103 -7
- package/dist/templates/slash-commands/crush/prd.md +111 -13
- package/dist/templates/slash-commands/crush/start.md +77 -1
- package/dist/templates/slash-commands/crush/summarize.md +101 -21
- package/dist/templates/slash-commands/cursor/archive.md +130 -3
- package/dist/templates/slash-commands/cursor/deep.md +70 -10
- package/dist/templates/slash-commands/cursor/fast.md +62 -15
- package/dist/templates/slash-commands/cursor/implement.md +147 -2
- package/dist/templates/slash-commands/cursor/plan.md +103 -7
- package/dist/templates/slash-commands/cursor/prd.md +111 -13
- package/dist/templates/slash-commands/cursor/start.md +77 -1
- package/dist/templates/slash-commands/cursor/summarize.md +101 -21
- package/dist/templates/slash-commands/droid/archive.md +130 -3
- package/dist/templates/slash-commands/droid/deep.md +70 -10
- package/dist/templates/slash-commands/droid/fast.md +62 -15
- package/dist/templates/slash-commands/droid/implement.md +147 -2
- package/dist/templates/slash-commands/droid/plan.md +103 -7
- package/dist/templates/slash-commands/droid/prd.md +111 -13
- package/dist/templates/slash-commands/droid/start.md +77 -1
- package/dist/templates/slash-commands/droid/summarize.md +101 -21
- package/dist/templates/slash-commands/gemini/archive.toml +132 -4
- package/dist/templates/slash-commands/gemini/deep.toml +72 -11
- package/dist/templates/slash-commands/gemini/fast.toml +64 -16
- package/dist/templates/slash-commands/gemini/implement.toml +149 -3
- package/dist/templates/slash-commands/gemini/plan.toml +116 -13
- package/dist/templates/slash-commands/gemini/prd.toml +107 -8
- package/dist/templates/slash-commands/gemini/start.toml +79 -2
- package/dist/templates/slash-commands/gemini/summarize.toml +102 -21
- package/dist/templates/slash-commands/kilocode/archive.md +130 -3
- package/dist/templates/slash-commands/kilocode/deep.md +70 -10
- package/dist/templates/slash-commands/kilocode/fast.md +62 -15
- package/dist/templates/slash-commands/kilocode/implement.md +147 -2
- package/dist/templates/slash-commands/kilocode/plan.md +103 -7
- package/dist/templates/slash-commands/kilocode/prd.md +111 -13
- package/dist/templates/slash-commands/kilocode/start.md +77 -1
- package/dist/templates/slash-commands/kilocode/summarize.md +101 -21
- package/dist/templates/slash-commands/opencode/archive.md +130 -3
- package/dist/templates/slash-commands/opencode/deep.md +70 -10
- package/dist/templates/slash-commands/opencode/fast.md +62 -15
- package/dist/templates/slash-commands/opencode/implement.md +147 -2
- package/dist/templates/slash-commands/opencode/plan.md +103 -7
- package/dist/templates/slash-commands/opencode/prd.md +111 -13
- package/dist/templates/slash-commands/opencode/start.md +77 -1
- package/dist/templates/slash-commands/opencode/summarize.md +101 -21
- package/dist/templates/slash-commands/qwen/archive.toml +132 -4
- package/dist/templates/slash-commands/qwen/deep.toml +72 -11
- package/dist/templates/slash-commands/qwen/fast.toml +64 -16
- package/dist/templates/slash-commands/qwen/implement.toml +149 -3
- package/dist/templates/slash-commands/qwen/plan.toml +116 -13
- package/dist/templates/slash-commands/qwen/prd.toml +107 -8
- package/dist/templates/slash-commands/qwen/start.toml +79 -2
- package/dist/templates/slash-commands/qwen/summarize.toml +102 -21
- package/dist/templates/slash-commands/roocode/archive.md +130 -3
- package/dist/templates/slash-commands/roocode/deep.md +70 -10
- package/dist/templates/slash-commands/roocode/fast.md +62 -15
- package/dist/templates/slash-commands/roocode/implement.md +147 -2
- package/dist/templates/slash-commands/roocode/plan.md +103 -7
- package/dist/templates/slash-commands/roocode/prd.md +111 -13
- package/dist/templates/slash-commands/roocode/start.md +77 -1
- package/dist/templates/slash-commands/roocode/summarize.md +101 -21
- package/dist/templates/slash-commands/windsurf/archive.md +130 -3
- package/dist/templates/slash-commands/windsurf/deep.md +70 -10
- package/dist/templates/slash-commands/windsurf/fast.md +62 -15
- package/dist/templates/slash-commands/windsurf/implement.md +147 -2
- package/dist/templates/slash-commands/windsurf/plan.md +103 -7
- package/dist/templates/slash-commands/windsurf/prd.md +111 -13
- package/dist/templates/slash-commands/windsurf/start.md +77 -1
- package/dist/templates/slash-commands/windsurf/summarize.md +101 -21
- package/dist/types/agent.d.ts +1 -1
- package/package.json +2 -2
- package/dist/core/adapters/copilot-adapter.d.ts +0 -24
- package/dist/core/adapters/copilot-adapter.js +0 -88
- package/dist/templates/slash-commands/copilot/archive.agent.md +0 -164
- package/dist/templates/slash-commands/copilot/deep.agent.md +0 -147
- package/dist/templates/slash-commands/copilot/fast.agent.md +0 -136
- package/dist/templates/slash-commands/copilot/implement.agent.md +0 -122
- package/dist/templates/slash-commands/copilot/plan.agent.md +0 -69
- package/dist/templates/slash-commands/copilot/prd.agent.md +0 -80
- package/dist/templates/slash-commands/copilot/start.agent.md +0 -66
- package/dist/templates/slash-commands/copilot/summarize.agent.md +0 -99
|
@@ -9,15 +9,35 @@ You are analyzing the conversation history and extracting optimized requirements
|
|
|
9
9
|
|
|
10
10
|
## Instructions
|
|
11
11
|
|
|
12
|
-
1.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
1. **Pre-Extraction Validation** - Check conversation completeness:
|
|
13
|
+
|
|
14
|
+
**Minimum viable requirements:**
|
|
15
|
+
- **Objective/Goal**: Is there a clear problem or goal stated?
|
|
16
|
+
- **Requirements**: Are there at least 2-3 concrete features or capabilities described?
|
|
17
|
+
- **Context**: Is there enough context about who/what/why?
|
|
18
|
+
|
|
19
|
+
**If missing critical elements:**
|
|
20
|
+
- Identify what's missing (e.g., "No clear objective", "Requirements too vague")
|
|
21
|
+
- Ask targeted questions to fill gaps:
|
|
22
|
+
- Missing objective: "What problem are you trying to solve?"
|
|
23
|
+
- Vague requirements: "Can you describe 2-3 specific things this should do?"
|
|
24
|
+
- No context: "Who will use this and in what situation?"
|
|
25
|
+
- **DO NOT** proceed to extraction until minimum viable requirements met
|
|
26
|
+
|
|
27
|
+
**Confidence indicators** (annotate extracted elements):
|
|
28
|
+
- **[HIGH]**: Explicitly stated multiple times with details
|
|
29
|
+
- **[MEDIUM]**: Mentioned once or inferred from context
|
|
30
|
+
- **[LOW]**: Assumed based on limited information
|
|
31
|
+
|
|
32
|
+
2. Review the entire conversation and identify (with confidence indicators):
|
|
33
|
+
- **Problem/Goal** [confidence]: What is the user trying to build or solve?
|
|
34
|
+
- **Key Requirements** [confidence per requirement]: What features and functionality were discussed?
|
|
35
|
+
- **Technical Constraints** [confidence]: Any technologies, integrations, or performance needs?
|
|
36
|
+
- **User Needs** [confidence]: Who are the end users and what do they need?
|
|
37
|
+
- **Success Criteria** [confidence]: How will success be measured?
|
|
38
|
+
- **Context** [confidence]: Any important background or constraints?
|
|
39
|
+
|
|
40
|
+
3. Generate TWO outputs:
|
|
21
41
|
|
|
22
42
|
**Mini-PRD** (structured document):
|
|
23
43
|
```markdown
|
|
@@ -52,12 +72,18 @@ You are analyzing the conversation history and extracting optimized requirements
|
|
|
52
72
|
[Success criteria and any important context]
|
|
53
73
|
```
|
|
54
74
|
|
|
55
|
-
3. **CLEAR Framework Optimization** (automatic):
|
|
56
|
-
- After extracting the optimized prompt,
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
75
|
+
3. **CLEAR Framework Optimization** (automatic with labeled improvements):
|
|
76
|
+
- After extracting the optimized prompt, analyze using CLEAR framework
|
|
77
|
+
- Apply Conciseness, Logic, and Explicitness enhancements
|
|
78
|
+
- **Label all improvements** with CLEAR component tags:
|
|
79
|
+
- **[C]**: "Removed 12 conversational words, reduced from 45 to 28 words"
|
|
80
|
+
- **[L]**: "Restructured flow: context → requirements → constraints → success criteria"
|
|
81
|
+
- **[E]**: "Added explicit output format (React component), persona (senior dev), success metrics (load time < 2s)"
|
|
82
|
+
- Display both raw extraction and CLEAR-enhanced version
|
|
83
|
+
- Show CLEAR scores (before/after) and labeled improvements
|
|
84
|
+
- Save both versions:
|
|
85
|
+
- `optimized-prompt.md` (raw extraction)
|
|
86
|
+
- `clear-optimized-prompt.md` (CLEAR-enhanced with improvement notes)
|
|
61
87
|
|
|
62
88
|
4. Highlight key insights discovered during the conversation.
|
|
63
89
|
|
|
@@ -78,12 +104,26 @@ You are analyzing the conversation history and extracting optimized requirements
|
|
|
78
104
|
|
|
79
105
|
## Quality Checks
|
|
80
106
|
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
107
|
+
- Clear objective stated
|
|
108
|
+
- Specific, actionable requirements
|
|
109
|
+
- Technical constraints identified
|
|
110
|
+
- Success criteria defined
|
|
111
|
+
- User needs considered
|
|
112
|
+
- CLEAR framework applied for AI consumption
|
|
113
|
+
|
|
114
|
+
## Workflow Navigation
|
|
115
|
+
|
|
116
|
+
**You are here:** Summarize (Conversation Extraction)
|
|
117
|
+
|
|
118
|
+
**Common workflows:**
|
|
119
|
+
- **Standard flow**: `/clavix:start` → [conversation] → `/clavix:summarize` → Use CLEAR-optimized prompt
|
|
120
|
+
- **To implementation**: `/clavix:summarize` → `/clavix:plan` → `/clavix:implement` → `/clavix:archive`
|
|
121
|
+
- **Standalone use**: [Any conversation] → `/clavix:summarize` → Extract and optimize
|
|
122
|
+
|
|
123
|
+
**Related commands:**
|
|
124
|
+
- `/clavix:start` - Begin conversational exploration (typical previous step)
|
|
125
|
+
- `/clavix:plan` - Generate tasks from extracted mini-PRD (next step)
|
|
126
|
+
- `/clavix:fast` or `/clavix:deep` - Further optimize the extracted prompt
|
|
87
127
|
|
|
88
128
|
## Example
|
|
89
129
|
|
|
@@ -97,3 +137,43 @@ Technical stack: React + TypeScript frontend, integrate with existing Salesforce
|
|
|
97
137
|
|
|
98
138
|
Success: Sales managers can identify issues within 30 seconds of opening, dashboard loads in <2 seconds, 90% of team uses it daily within first month.
|
|
99
139
|
```
|
|
140
|
+
|
|
141
|
+
## Troubleshooting
|
|
142
|
+
|
|
143
|
+
### Issue: Pre-extraction validation fails (missing objective/requirements)
|
|
144
|
+
**Cause**: Conversation didn't cover enough detail
|
|
145
|
+
**Solution** (inline - DO NOT extract):
|
|
146
|
+
- List what's missing specifically
|
|
147
|
+
- Ask targeted questions to fill gaps
|
|
148
|
+
- Only proceed to extraction after minimum viable requirements met
|
|
149
|
+
- Show confidence indicators for what WAS discussed
|
|
150
|
+
|
|
151
|
+
### Issue: Conversation covered multiple unrelated topics
|
|
152
|
+
**Cause**: Exploratory discussion without focus
|
|
153
|
+
**Solution**:
|
|
154
|
+
- Ask user which topic to extract/focus on
|
|
155
|
+
- Or extract all topics separately into different sections
|
|
156
|
+
- Mark multi-topic extraction with [MULTI-TOPIC] indicator
|
|
157
|
+
- Suggest breaking into separate PRDs for each topic
|
|
158
|
+
|
|
159
|
+
### Issue: CLEAR optimization doesn't significantly improve extracted prompt
|
|
160
|
+
**Cause**: Conversation was already well-structured and detailed
|
|
161
|
+
**Solution**:
|
|
162
|
+
- Minor improvements are normal for good conversations
|
|
163
|
+
- Show CLEAR scores (should be high: >80%)
|
|
164
|
+
- Still provide both versions but note that original extraction was already CLEAR
|
|
165
|
+
|
|
166
|
+
### Issue: Low confidence indicators across all extracted elements
|
|
167
|
+
**Cause**: Conversation was too vague or high-level
|
|
168
|
+
**Solution** (inline):
|
|
169
|
+
- Don't just extract with [LOW] markers everywhere
|
|
170
|
+
- Ask follow-up questions to increase confidence
|
|
171
|
+
- Or inform user: "Our conversation was exploratory. I recommend `/clavix:start` to go deeper, or `/clavix:prd` for structured planning"
|
|
172
|
+
|
|
173
|
+
### Issue: Extracted prompt contradicts earlier conversation
|
|
174
|
+
**Cause**: Requirements evolved during conversation
|
|
175
|
+
**Solution**:
|
|
176
|
+
- Use latest/final version of requirements
|
|
177
|
+
- Note that requirements evolved
|
|
178
|
+
- Ask user to confirm which version is correct
|
|
179
|
+
- Suggest starting fresh with `/clavix:prd` if major contradictions exist
|
package/dist/types/agent.d.ts
CHANGED
|
@@ -37,5 +37,5 @@ export interface ManagedBlock {
|
|
|
37
37
|
content: string;
|
|
38
38
|
targetFile: string;
|
|
39
39
|
}
|
|
40
|
-
export type AgentType = 'agents-md' | 'amp' | 'augment' | 'claude-code' | 'cline' | 'codex' | 'codebuddy' | 'copilot' | 'crush' | 'cursor' | 'custom' | 'droid' | 'gemini' | 'kilocode' | 'octo-md' | 'opencode' | 'qwen' | 'roocode' | 'windsurf';
|
|
40
|
+
export type AgentType = 'agents-md' | 'amp' | 'augment' | 'claude-code' | 'cline' | 'codex' | 'codebuddy' | 'copilot-instructions' | 'crush' | 'cursor' | 'custom' | 'droid' | 'gemini' | 'kilocode' | 'octo-md' | 'opencode' | 'qwen' | 'roocode' | 'windsurf';
|
|
41
41
|
//# sourceMappingURL=agent.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavix",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.3.0",
|
|
4
|
+
"description": "Transform vague ideas into production-ready prompts. CLI tool using the CLEAR framework to analyze, improve, and generate PRDs for AI coding assistants (Claude Code, Cursor, Windsurf, and more)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"bin": {
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { BaseAdapter } from './base-adapter';
|
|
2
|
-
import { CommandTemplate } from '../../types/agent';
|
|
3
|
-
/**
|
|
4
|
-
* GitHub Copilot CLI adapter (custom agents)
|
|
5
|
-
* Generates agent profiles under .github/agents
|
|
6
|
-
*/
|
|
7
|
-
export declare class CopilotAdapter extends BaseAdapter {
|
|
8
|
-
readonly name = "copilot";
|
|
9
|
-
readonly displayName = "Copilot CLI";
|
|
10
|
-
readonly directory = ".github/agents";
|
|
11
|
-
readonly fileExtension = ".agent.md";
|
|
12
|
-
readonly features: {
|
|
13
|
-
supportsSubdirectories: boolean;
|
|
14
|
-
supportsFrontmatter: boolean;
|
|
15
|
-
frontmatterFields: string[];
|
|
16
|
-
};
|
|
17
|
-
detectProject(): Promise<boolean>;
|
|
18
|
-
getCommandPath(): string;
|
|
19
|
-
getTargetFilename(name: string): string;
|
|
20
|
-
protected formatCommand(template: CommandTemplate): string;
|
|
21
|
-
private toTitle;
|
|
22
|
-
private getHomeDir;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=copilot-adapter.d.ts.map
|
|
@@ -1,88 +0,0 @@
|
|
|
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.CopilotAdapter = void 0;
|
|
37
|
-
const os = __importStar(require("os"));
|
|
38
|
-
const path = __importStar(require("path"));
|
|
39
|
-
const base_adapter_1 = require("./base-adapter");
|
|
40
|
-
const file_system_1 = require("../../utils/file-system");
|
|
41
|
-
/**
|
|
42
|
-
* GitHub Copilot CLI adapter (custom agents)
|
|
43
|
-
* Generates agent profiles under .github/agents
|
|
44
|
-
*/
|
|
45
|
-
class CopilotAdapter extends base_adapter_1.BaseAdapter {
|
|
46
|
-
constructor() {
|
|
47
|
-
super(...arguments);
|
|
48
|
-
this.name = 'copilot';
|
|
49
|
-
this.displayName = 'Copilot CLI';
|
|
50
|
-
this.directory = '.github/agents';
|
|
51
|
-
this.fileExtension = '.agent.md';
|
|
52
|
-
this.features = {
|
|
53
|
-
supportsSubdirectories: false,
|
|
54
|
-
supportsFrontmatter: true,
|
|
55
|
-
frontmatterFields: ['name', 'description', 'tools', 'target'],
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
async detectProject() {
|
|
59
|
-
if (await file_system_1.FileSystem.exists('.github/agents')) {
|
|
60
|
-
return true;
|
|
61
|
-
}
|
|
62
|
-
const homeAgentsDir = path.join(this.getHomeDir(), '.copilot', 'agents');
|
|
63
|
-
return file_system_1.FileSystem.exists(homeAgentsDir);
|
|
64
|
-
}
|
|
65
|
-
getCommandPath() {
|
|
66
|
-
return this.directory;
|
|
67
|
-
}
|
|
68
|
-
getTargetFilename(name) {
|
|
69
|
-
return `clavix-${name}${this.fileExtension}`;
|
|
70
|
-
}
|
|
71
|
-
formatCommand(template) {
|
|
72
|
-
const displayName = `Clavix: ${this.toTitle(template.name)}`;
|
|
73
|
-
const frontmatter = `---\nname: ${displayName}\ndescription: ${template.description}\n---\n\n`;
|
|
74
|
-
return frontmatter + template.content;
|
|
75
|
-
}
|
|
76
|
-
toTitle(value) {
|
|
77
|
-
return value
|
|
78
|
-
.split(/[-_\s]+/)
|
|
79
|
-
.filter(Boolean)
|
|
80
|
-
.map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))
|
|
81
|
-
.join(' ');
|
|
82
|
-
}
|
|
83
|
-
getHomeDir() {
|
|
84
|
-
return process.env.CLAVIX_HOME_OVERRIDE || os.homedir();
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
exports.CopilotAdapter = CopilotAdapter;
|
|
88
|
-
//# sourceMappingURL=copilot-adapter.js.map
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "Clavix: Archive"
|
|
3
|
-
description: Archive completed PRD projects
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Clavix Archive - PRD Project Archival
|
|
7
|
-
|
|
8
|
-
You are helping the user archive completed PRD projects to keep their workspace organized.
|
|
9
|
-
|
|
10
|
-
## Instructions
|
|
11
|
-
|
|
12
|
-
1. **Understanding Archive**:
|
|
13
|
-
- Archives move completed PRD projects from `.clavix/outputs/` to `.clavix/outputs/archive/`
|
|
14
|
-
- Archived projects are no longer shown in active project lists
|
|
15
|
-
- Projects can be restored from archive if needed
|
|
16
|
-
- Only projects with all tasks completed should typically be archived
|
|
17
|
-
|
|
18
|
-
2. **Interactive Archive Mode**:
|
|
19
|
-
```bash
|
|
20
|
-
clavix archive
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
This will:
|
|
24
|
-
- List all PRD projects with 100% tasks completed
|
|
25
|
-
- Allow user to select which project to archive
|
|
26
|
-
- Confirm before archiving
|
|
27
|
-
- Move the project to archive directory
|
|
28
|
-
|
|
29
|
-
3. **Archive Specific Project**:
|
|
30
|
-
```bash
|
|
31
|
-
clavix archive [project-name]
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
This will:
|
|
35
|
-
- Check task completion status
|
|
36
|
-
- Warn if tasks are incomplete
|
|
37
|
-
- Ask for confirmation
|
|
38
|
-
- Archive the specific project
|
|
39
|
-
|
|
40
|
-
4. **Force Archive (Incomplete Tasks)**:
|
|
41
|
-
```bash
|
|
42
|
-
clavix archive [project-name] --force
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Use this when:
|
|
46
|
-
- Project scope changed and some tasks are no longer relevant
|
|
47
|
-
- User wants to archive work-in-progress
|
|
48
|
-
- Tasks are incomplete but project is done
|
|
49
|
-
|
|
50
|
-
5. **List Archived Projects**:
|
|
51
|
-
```bash
|
|
52
|
-
clavix archive --list
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Shows all projects currently in archive with their task completion status
|
|
56
|
-
|
|
57
|
-
6. **Restore from Archive**:
|
|
58
|
-
```bash
|
|
59
|
-
clavix archive --restore [project-name]
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Moves a project back from archive to active outputs
|
|
63
|
-
|
|
64
|
-
## When to Archive
|
|
65
|
-
|
|
66
|
-
✅ **Good times to archive**:
|
|
67
|
-
- All implementation tasks are completed (`tasks.md` shows 100%)
|
|
68
|
-
- Project has been deployed/shipped to production
|
|
69
|
-
- Feature is complete and no more work planned
|
|
70
|
-
- User explicitly requests archival
|
|
71
|
-
- Old/abandoned projects that won't be continued
|
|
72
|
-
|
|
73
|
-
❌ **Don't archive when**:
|
|
74
|
-
- Tasks are still in progress (unless using --force)
|
|
75
|
-
- Project is actively being worked on
|
|
76
|
-
- Future enhancements are planned in current tasks
|
|
77
|
-
|
|
78
|
-
## Archive Behavior
|
|
79
|
-
|
|
80
|
-
**What gets archived:**
|
|
81
|
-
- The entire PRD project folder
|
|
82
|
-
- All files: PRD.md, PRD-quick.md, tasks.md, .clavix-implement-config.json
|
|
83
|
-
- Complete directory structure preserved
|
|
84
|
-
|
|
85
|
-
**Where it goes:**
|
|
86
|
-
- From: `.clavix/outputs/[project-name]/`
|
|
87
|
-
- To: `.clavix/outputs/archive/[project-name]/`
|
|
88
|
-
|
|
89
|
-
**What changes:**
|
|
90
|
-
- Archived projects won't show in `/clavix:plan` searches
|
|
91
|
-
- Archived projects won't show in `/clavix:implement` searches
|
|
92
|
-
- They're still accessible in archive directory
|
|
93
|
-
- Can be restored at any time
|
|
94
|
-
|
|
95
|
-
## Example Workflows
|
|
96
|
-
|
|
97
|
-
### Workflow 1: Complete Project
|
|
98
|
-
```
|
|
99
|
-
User: "I've finished implementing the user authentication feature"
|
|
100
|
-
You: "Great! Let me help you archive it."
|
|
101
|
-
|
|
102
|
-
Run: clavix archive
|
|
103
|
-
|
|
104
|
-
User selects: user-authentication-system
|
|
105
|
-
System shows: All 15 tasks completed (100%)
|
|
106
|
-
User confirms: Yes, archive it
|
|
107
|
-
|
|
108
|
-
Result: Project moved to .clavix/outputs/archive/user-authentication-system/
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Workflow 2: Force Archive WIP
|
|
112
|
-
```
|
|
113
|
-
User: "We're pivoting, I want to archive the old API design even though tasks aren't done"
|
|
114
|
-
You: "I'll archive it with --force"
|
|
115
|
-
|
|
116
|
-
Run: clavix archive old-api-design --force
|
|
117
|
-
|
|
118
|
-
System shows: 8 incomplete tasks
|
|
119
|
-
User confirms: Yes, archive anyway
|
|
120
|
-
|
|
121
|
-
Result: Project archived despite incomplete tasks
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### Workflow 3: Restore Archived Project
|
|
125
|
-
```
|
|
126
|
-
User: "Actually, we need to revisit that authentication feature"
|
|
127
|
-
You: "I'll restore it from the archive"
|
|
128
|
-
|
|
129
|
-
Run: clavix archive --restore user-authentication-system
|
|
130
|
-
|
|
131
|
-
Result: Project moved back to .clavix/outputs/user-authentication-system/
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## AI Agent Guidelines
|
|
135
|
-
|
|
136
|
-
When user mentions archiving or cleaning up projects:
|
|
137
|
-
|
|
138
|
-
1. **Check completion status first**:
|
|
139
|
-
- Run `clavix archive` to see archivable projects
|
|
140
|
-
- Review task completion percentages
|
|
141
|
-
- Suggest archiving only completed projects
|
|
142
|
-
|
|
143
|
-
2. **Confirm before archiving**:
|
|
144
|
-
- Always confirm which project to archive
|
|
145
|
-
- Mention the archive location
|
|
146
|
-
- Explain that it can be restored
|
|
147
|
-
|
|
148
|
-
3. **Use --force cautiously**:
|
|
149
|
-
- Only when user explicitly wants to archive incomplete work
|
|
150
|
-
- Explain which tasks will remain incomplete
|
|
151
|
-
- Confirm they won't lose data (just moving location)
|
|
152
|
-
|
|
153
|
-
4. **Suggest restoration**:
|
|
154
|
-
- If user mentions old work, check archive
|
|
155
|
-
- Use `clavix archive --list` to show what's archived
|
|
156
|
-
- Offer to restore if needed
|
|
157
|
-
|
|
158
|
-
## Tips
|
|
159
|
-
|
|
160
|
-
- Archive keeps your active projects list clean and focused
|
|
161
|
-
- Archived projects maintain all their data (nothing is deleted)
|
|
162
|
-
- Archive is searchable - you can still `grep` or find files in archive/
|
|
163
|
-
- Regular archiving improves `/clavix:plan` and `/clavix:implement` performance
|
|
164
|
-
- Use `--list` regularly to know what's been archived
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "Clavix: Deep"
|
|
3
|
-
description: Full CLEAR framework analysis (C, L, E, A, R components)
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Clavix Deep Mode - Full CLEAR Framework Analysis
|
|
7
|
-
|
|
8
|
-
You are helping the user perform a comprehensive deep analysis using the full CLEAR Framework (all 5 components: Concise, Logical, Explicit, Adaptive, Reflective).
|
|
9
|
-
|
|
10
|
-
## CLEAR Framework (Deep Mode)
|
|
11
|
-
|
|
12
|
-
**What is CLEAR?**
|
|
13
|
-
An academically-validated prompt engineering framework by Dr. Leo Lo (University of New Mexico).
|
|
14
|
-
|
|
15
|
-
**Deep Mode Uses ALL Components:**
|
|
16
|
-
- **[C] Concise**: Remove verbosity, pleasantries, unnecessary words
|
|
17
|
-
- **[L] Logical**: Ensure coherent sequencing (context → requirements → constraints → output)
|
|
18
|
-
- **[E] Explicit**: Add persona, format, tone, success criteria
|
|
19
|
-
- **[A] Adaptive**: Generate alternative phrasings, structures, flexibility
|
|
20
|
-
- **[R] Reflective**: Create validation checklists, edge cases, quality criteria
|
|
21
|
-
|
|
22
|
-
## Instructions
|
|
23
|
-
|
|
24
|
-
1. Take the user's prompt: `{{ARGS}}`
|
|
25
|
-
|
|
26
|
-
2. **Apply Full CLEAR Framework** (C, L, E, A, R):
|
|
27
|
-
|
|
28
|
-
- **Conciseness [C]**: Detailed verbosity analysis
|
|
29
|
-
- **Logic [L]**: Comprehensive flow analysis
|
|
30
|
-
- **Explicitness [E]**: Complete specification check
|
|
31
|
-
- **Adaptiveness [A]**: Multiple variations and approaches
|
|
32
|
-
- **Reflectiveness [R]**: Full validation and edge case analysis
|
|
33
|
-
|
|
34
|
-
3. **Generate Comprehensive Output**:
|
|
35
|
-
|
|
36
|
-
a. **📊 CLEAR Assessment** (all 5 components with scores)
|
|
37
|
-
|
|
38
|
-
b. **✨ CLEAR-Optimized Prompt** (applying all components)
|
|
39
|
-
|
|
40
|
-
c. **📝 CLEAR Changes Made** (labeled with [C], [L], [E], [A], [R])
|
|
41
|
-
|
|
42
|
-
d. **🔄 Adaptive Variations [A]**:
|
|
43
|
-
- 2-3 alternative phrasings
|
|
44
|
-
- Alternative structures (user story, job story, structured)
|
|
45
|
-
- Temperature recommendations
|
|
46
|
-
- Explain when each approach is most appropriate
|
|
47
|
-
|
|
48
|
-
e. **🤔 Reflection Checklist [R]**:
|
|
49
|
-
- Validation steps for accuracy
|
|
50
|
-
- Edge cases to consider
|
|
51
|
-
- "What could go wrong" analysis
|
|
52
|
-
- Fact-checking steps
|
|
53
|
-
- Quality criteria
|
|
54
|
-
|
|
55
|
-
4. **CLEAR-labeled educational feedback**:
|
|
56
|
-
- Label all changes with CLEAR component tags
|
|
57
|
-
- Example: "[C] Removed 15 unnecessary pleasantries"
|
|
58
|
-
- Example: "[A] See Alternative Structures for 3 different approaches"
|
|
59
|
-
- Example: "[R] See Reflection Checklist for 5 validation steps"
|
|
60
|
-
|
|
61
|
-
5. Present everything in comprehensive, CLEAR-organized format.
|
|
62
|
-
|
|
63
|
-
## Deep Mode Features
|
|
64
|
-
|
|
65
|
-
✅ Include (Full CLEAR Framework):
|
|
66
|
-
- **[C, L, E]**: All fast mode analysis (conciseness, logic, explicitness)
|
|
67
|
-
- **[A] Adaptive**: Alternative phrasings, structures, flexibility, temperature
|
|
68
|
-
- **[R] Reflective**: Validation checklist, edge cases, quality criteria, fact-checking
|
|
69
|
-
- **CLEAR Assessment**: All 5 component scores
|
|
70
|
-
- **CLEAR-labeled Changes**: Educational feedback showing which component improved what
|
|
71
|
-
|
|
72
|
-
❌ Do NOT include (these belong in `/clavix:prd`):
|
|
73
|
-
- System architecture recommendations
|
|
74
|
-
- Security best practices
|
|
75
|
-
- Scalability strategy
|
|
76
|
-
- Business impact analysis
|
|
77
|
-
|
|
78
|
-
## Example
|
|
79
|
-
|
|
80
|
-
If user provides: "Create a login page"
|
|
81
|
-
|
|
82
|
-
Output:
|
|
83
|
-
```
|
|
84
|
-
## Analysis
|
|
85
|
-
[All fast mode analysis: gaps, ambiguities, strengths, suggestions]
|
|
86
|
-
|
|
87
|
-
## Changes Made
|
|
88
|
-
- Added authentication context and user needs
|
|
89
|
-
- Specified technical stack and constraints
|
|
90
|
-
- Defined success criteria and expected output
|
|
91
|
-
|
|
92
|
-
## Alternative Phrasings
|
|
93
|
-
1. "Implement a user authentication interface that enables secure access to the platform"
|
|
94
|
-
2. "Design and build a login system that validates user credentials and manages sessions"
|
|
95
|
-
3. "Create an authentication flow that allows registered users to access their accounts"
|
|
96
|
-
|
|
97
|
-
## Edge Cases to Consider
|
|
98
|
-
- What happens when a user enters incorrect credentials 3+ times?
|
|
99
|
-
- How to handle users who've forgotten both email and password?
|
|
100
|
-
- What about users trying to log in from a new device?
|
|
101
|
-
- How to handle session expiration during active use?
|
|
102
|
-
|
|
103
|
-
## Implementation Examples
|
|
104
|
-
✅ Good:
|
|
105
|
-
- Prompt specifies authentication method, error handling, and accessibility requirements
|
|
106
|
-
- Includes context about existing auth system and integration points
|
|
107
|
-
- Defines measurable success criteria (load time, accessibility score)
|
|
108
|
-
|
|
109
|
-
❌ Bad:
|
|
110
|
-
- "Make a login page" - no context, constraints, or success criteria
|
|
111
|
-
- Missing technical stack and integration requirements
|
|
112
|
-
- No consideration of security or user experience
|
|
113
|
-
|
|
114
|
-
## Alternative Prompt Structures
|
|
115
|
-
1. **User Story**: "As a registered user, I want to log into my account so that I can access my personalized dashboard"
|
|
116
|
-
→ Focuses on user value and benefits
|
|
117
|
-
|
|
118
|
-
2. **Job Story**: "When I visit the app, I want to authenticate securely, so I can access my saved data"
|
|
119
|
-
→ Emphasizes context and motivation
|
|
120
|
-
|
|
121
|
-
3. **Structured Sections**: Objective, Requirements, Constraints, Success Criteria
|
|
122
|
-
→ Provides comprehensive organization
|
|
123
|
-
|
|
124
|
-
## What Could Go Wrong
|
|
125
|
-
- Without security requirements, implementation might miss OWASP best practices
|
|
126
|
-
- Vague "login page" could be interpreted as OAuth, email/password, or social login
|
|
127
|
-
- Missing error handling specification could lead to poor UX
|
|
128
|
-
- No accessibility requirements might exclude users with disabilities
|
|
129
|
-
|
|
130
|
-
## Improved Prompt
|
|
131
|
-
[Structured prompt with all sections]
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## When to Use Deep vs Fast vs PRD
|
|
135
|
-
|
|
136
|
-
- **Fast mode** (`/clavix:fast`): C, L, E components - quick CLEAR cleanup
|
|
137
|
-
- **Deep mode** (`/clavix:deep`): Full CLEAR (C, L, E, A, R) - comprehensive analysis with alternatives and validation
|
|
138
|
-
- **PRD mode** (`/clavix:prd`): CLEAR-validated PRD generation - strategic planning with architecture decisions
|
|
139
|
-
|
|
140
|
-
## Tips
|
|
141
|
-
|
|
142
|
-
- **Apply full CLEAR framework** systematically: all 5 components
|
|
143
|
-
- Label all changes with CLEAR components for education
|
|
144
|
-
- Deep mode focuses on **prompt-level** CLEAR analysis, not strategic architecture
|
|
145
|
-
- Use **[A] Adaptive** to explore alternative approaches
|
|
146
|
-
- Use **[R] Reflective** to identify edge cases and validation needs
|
|
147
|
-
- For architecture, security, and scalability, recommend `/clavix:prd`
|