clavix 2.3.0 → 2.4.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/dist/cli/commands/init.js +1 -1
- package/dist/core 2/adapters/agents-md-generator.d.ts +26 -0
- package/dist/core 2/adapters/agents-md-generator.js +102 -0
- package/dist/core 2/adapters/amp-adapter.d.ts +27 -0
- package/dist/core 2/adapters/amp-adapter.js +42 -0
- package/dist/core 2/adapters/augment-adapter.d.ts +22 -0
- package/dist/core 2/adapters/augment-adapter.js +77 -0
- package/dist/core 2/adapters/base-adapter.d.ts +45 -0
- package/dist/core 2/adapters/base-adapter.js +142 -0
- package/dist/core 2/adapters/claude-code-adapter.d.ts +32 -0
- package/dist/core 2/adapters/claude-code-adapter.js +116 -0
- package/dist/core 2/adapters/cline-adapter.d.ts +34 -0
- package/dist/core 2/adapters/cline-adapter.js +52 -0
- package/dist/core 2/adapters/codebuddy-adapter.d.ts +24 -0
- package/dist/core 2/adapters/codebuddy-adapter.js +82 -0
- package/dist/core 2/adapters/codex-adapter.d.ts +24 -0
- package/dist/core 2/adapters/codex-adapter.js +79 -0
- package/dist/core 2/adapters/copilot-instructions-generator.d.ts +26 -0
- package/dist/core 2/adapters/copilot-instructions-generator.js +104 -0
- package/dist/core 2/adapters/crush-adapter.d.ts +35 -0
- package/dist/core 2/adapters/crush-adapter.js +49 -0
- package/dist/core 2/adapters/cursor-adapter.d.ts +25 -0
- package/dist/core 2/adapters/cursor-adapter.js +40 -0
- package/dist/core 2/adapters/droid-adapter.d.ts +33 -0
- package/dist/core 2/adapters/droid-adapter.js +57 -0
- package/dist/core 2/adapters/gemini-adapter.d.ts +27 -0
- package/dist/core 2/adapters/gemini-adapter.js +90 -0
- package/dist/core 2/adapters/kilocode-adapter.d.ts +34 -0
- package/dist/core 2/adapters/kilocode-adapter.js +49 -0
- package/dist/core 2/adapters/octo-md-generator.d.ts +26 -0
- package/dist/core 2/adapters/octo-md-generator.js +102 -0
- package/dist/core 2/adapters/opencode-adapter.d.ts +33 -0
- package/dist/core 2/adapters/opencode-adapter.js +56 -0
- package/dist/core 2/adapters/qwen-adapter.d.ts +27 -0
- package/dist/core 2/adapters/qwen-adapter.js +90 -0
- package/dist/core 2/adapters/roocode-adapter.d.ts +40 -0
- package/dist/core 2/adapters/roocode-adapter.js +68 -0
- package/dist/core 2/adapters/warp-md-generator.d.ts +17 -0
- package/dist/core 2/adapters/warp-md-generator.js +88 -0
- package/dist/core 2/adapters/windsurf-adapter.d.ts +34 -0
- package/dist/core 2/adapters/windsurf-adapter.js +49 -0
- package/dist/core 2/agent-manager.d.ts +51 -0
- package/dist/core 2/agent-manager.js +126 -0
- package/dist/core 2/archive-manager.d.ts +100 -0
- package/dist/core 2/archive-manager.js +338 -0
- package/dist/core 2/conversation-analyzer.d.ts +86 -0
- package/dist/core 2/doc-injector.d.ts +51 -0
- package/dist/core 2/doc-injector.js +236 -0
- package/dist/core 2/git-manager.d.ts +100 -0
- package/dist/core 2/git-manager.js +214 -0
- package/dist/core 2/prompt-optimizer.d.ts +268 -0
- package/dist/core 2/prompt-optimizer.js +963 -0
- package/dist/core 2/question-engine.d.ts +167 -0
- package/dist/core 2/question-engine.js +395 -0
- package/dist/core 2/session-manager.d.ts +139 -0
- package/dist/core 2/session-manager.js +403 -0
- package/dist/core 2/task-manager.d.ts +155 -0
- package/dist/core 2/task-manager.js +689 -0
- package/dist/utils/template-loader.js +24 -22
- package/package.json +1 -1
- package/dist/templates/slash-commands/augment/archive.md +0 -291
- package/dist/templates/slash-commands/augment/deep.md +0 -207
- package/dist/templates/slash-commands/augment/fast.md +0 -183
- package/dist/templates/slash-commands/augment/implement.md +0 -267
- package/dist/templates/slash-commands/augment/plan.md +0 -173
- package/dist/templates/slash-commands/augment/prd.md +0 -178
- package/dist/templates/slash-commands/augment/start.md +0 -142
- package/dist/templates/slash-commands/augment/summarize.md +0 -179
- package/dist/templates/slash-commands/claude-code/archive.md +0 -291
- package/dist/templates/slash-commands/claude-code/deep.md +0 -207
- package/dist/templates/slash-commands/claude-code/fast.md +0 -183
- package/dist/templates/slash-commands/claude-code/implement.md +0 -267
- package/dist/templates/slash-commands/claude-code/plan.md +0 -173
- package/dist/templates/slash-commands/claude-code/prd.md +0 -178
- package/dist/templates/slash-commands/claude-code/start.md +0 -142
- package/dist/templates/slash-commands/claude-code/summarize.md +0 -179
- package/dist/templates/slash-commands/cline/archive.md +0 -291
- package/dist/templates/slash-commands/cline/deep.md +0 -207
- package/dist/templates/slash-commands/cline/fast.md +0 -183
- package/dist/templates/slash-commands/cline/implement.md +0 -267
- package/dist/templates/slash-commands/cline/plan.md +0 -173
- package/dist/templates/slash-commands/cline/prd.md +0 -178
- package/dist/templates/slash-commands/cline/start.md +0 -142
- package/dist/templates/slash-commands/cline/summarize.md +0 -179
- package/dist/templates/slash-commands/codebuddy/archive.md +0 -291
- package/dist/templates/slash-commands/codebuddy/deep.md +0 -207
- package/dist/templates/slash-commands/codebuddy/fast.md +0 -183
- package/dist/templates/slash-commands/codebuddy/implement.md +0 -267
- package/dist/templates/slash-commands/codebuddy/plan.md +0 -173
- package/dist/templates/slash-commands/codebuddy/prd.md +0 -178
- package/dist/templates/slash-commands/codebuddy/start.md +0 -142
- package/dist/templates/slash-commands/codebuddy/summarize.md +0 -179
- package/dist/templates/slash-commands/codex/archive.md +0 -291
- package/dist/templates/slash-commands/codex/deep.md +0 -207
- package/dist/templates/slash-commands/codex/fast.md +0 -183
- package/dist/templates/slash-commands/codex/implement.md +0 -267
- package/dist/templates/slash-commands/codex/plan.md +0 -173
- package/dist/templates/slash-commands/codex/prd.md +0 -178
- package/dist/templates/slash-commands/codex/start.md +0 -142
- package/dist/templates/slash-commands/codex/summarize.md +0 -179
- package/dist/templates/slash-commands/crush/archive.md +0 -291
- package/dist/templates/slash-commands/crush/deep.md +0 -207
- package/dist/templates/slash-commands/crush/fast.md +0 -183
- package/dist/templates/slash-commands/crush/implement.md +0 -267
- package/dist/templates/slash-commands/crush/plan.md +0 -173
- package/dist/templates/slash-commands/crush/prd.md +0 -178
- package/dist/templates/slash-commands/crush/start.md +0 -142
- package/dist/templates/slash-commands/crush/summarize.md +0 -179
- package/dist/templates/slash-commands/cursor/archive.md +0 -291
- package/dist/templates/slash-commands/cursor/deep.md +0 -207
- package/dist/templates/slash-commands/cursor/fast.md +0 -183
- package/dist/templates/slash-commands/cursor/implement.md +0 -267
- package/dist/templates/slash-commands/cursor/plan.md +0 -173
- package/dist/templates/slash-commands/cursor/prd.md +0 -178
- package/dist/templates/slash-commands/cursor/start.md +0 -142
- package/dist/templates/slash-commands/cursor/summarize.md +0 -179
- package/dist/templates/slash-commands/droid/archive.md +0 -291
- package/dist/templates/slash-commands/droid/deep.md +0 -207
- package/dist/templates/slash-commands/droid/fast.md +0 -183
- package/dist/templates/slash-commands/droid/implement.md +0 -267
- package/dist/templates/slash-commands/droid/plan.md +0 -173
- package/dist/templates/slash-commands/droid/prd.md +0 -178
- package/dist/templates/slash-commands/droid/start.md +0 -142
- package/dist/templates/slash-commands/droid/summarize.md +0 -179
- package/dist/templates/slash-commands/gemini/archive.toml +0 -290
- package/dist/templates/slash-commands/gemini/deep.toml +0 -206
- package/dist/templates/slash-commands/gemini/fast.toml +0 -182
- package/dist/templates/slash-commands/gemini/implement.toml +0 -266
- package/dist/templates/slash-commands/gemini/plan.toml +0 -170
- package/dist/templates/slash-commands/gemini/prd.toml +0 -177
- package/dist/templates/slash-commands/gemini/start.toml +0 -141
- package/dist/templates/slash-commands/gemini/summarize.toml +0 -178
- package/dist/templates/slash-commands/kilocode/archive.md +0 -291
- package/dist/templates/slash-commands/kilocode/deep.md +0 -207
- package/dist/templates/slash-commands/kilocode/fast.md +0 -183
- package/dist/templates/slash-commands/kilocode/implement.md +0 -267
- package/dist/templates/slash-commands/kilocode/plan.md +0 -173
- package/dist/templates/slash-commands/kilocode/prd.md +0 -178
- package/dist/templates/slash-commands/kilocode/start.md +0 -142
- package/dist/templates/slash-commands/kilocode/summarize.md +0 -179
- package/dist/templates/slash-commands/opencode/archive.md +0 -291
- package/dist/templates/slash-commands/opencode/deep.md +0 -207
- package/dist/templates/slash-commands/opencode/fast.md +0 -183
- package/dist/templates/slash-commands/opencode/implement.md +0 -267
- package/dist/templates/slash-commands/opencode/plan.md +0 -173
- package/dist/templates/slash-commands/opencode/prd.md +0 -178
- package/dist/templates/slash-commands/opencode/start.md +0 -142
- package/dist/templates/slash-commands/opencode/summarize.md +0 -179
- package/dist/templates/slash-commands/qwen/archive.toml +0 -290
- package/dist/templates/slash-commands/qwen/deep.toml +0 -206
- package/dist/templates/slash-commands/qwen/fast.toml +0 -182
- package/dist/templates/slash-commands/qwen/implement.toml +0 -266
- package/dist/templates/slash-commands/qwen/plan.toml +0 -170
- package/dist/templates/slash-commands/qwen/prd.toml +0 -177
- package/dist/templates/slash-commands/qwen/start.toml +0 -141
- package/dist/templates/slash-commands/qwen/summarize.toml +0 -178
- package/dist/templates/slash-commands/roocode/archive.md +0 -291
- package/dist/templates/slash-commands/roocode/deep.md +0 -207
- package/dist/templates/slash-commands/roocode/fast.md +0 -183
- package/dist/templates/slash-commands/roocode/implement.md +0 -267
- package/dist/templates/slash-commands/roocode/plan.md +0 -173
- package/dist/templates/slash-commands/roocode/prd.md +0 -178
- package/dist/templates/slash-commands/roocode/start.md +0 -142
- package/dist/templates/slash-commands/roocode/summarize.md +0 -179
- package/dist/templates/slash-commands/windsurf/archive.md +0 -291
- package/dist/templates/slash-commands/windsurf/deep.md +0 -207
- package/dist/templates/slash-commands/windsurf/fast.md +0 -183
- package/dist/templates/slash-commands/windsurf/implement.md +0 -267
- package/dist/templates/slash-commands/windsurf/plan.md +0 -173
- package/dist/templates/slash-commands/windsurf/prd.md +0 -178
- package/dist/templates/slash-commands/windsurf/start.md +0 -142
- package/dist/templates/slash-commands/windsurf/summarize.md +0 -179
- /package/dist/templates/slash-commands/{amp → _canonical}/archive.md +0 -0
- /package/dist/templates/slash-commands/{amp → _canonical}/deep.md +0 -0
- /package/dist/templates/slash-commands/{amp → _canonical}/fast.md +0 -0
- /package/dist/templates/slash-commands/{amp → _canonical}/implement.md +0 -0
- /package/dist/templates/slash-commands/{amp → _canonical}/plan.md +0 -0
- /package/dist/templates/slash-commands/{amp → _canonical}/prd.md +0 -0
- /package/dist/templates/slash-commands/{amp → _canonical}/start.md +0 -0
- /package/dist/templates/slash-commands/{amp → _canonical}/summarize.md +0 -0
|
@@ -36,40 +36,42 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.loadCommandTemplates = loadCommandTemplates;
|
|
37
37
|
const path = __importStar(require("path"));
|
|
38
38
|
const file_system_1 = require("./file-system");
|
|
39
|
-
const toml_templates_1 = require("./toml-templates");
|
|
40
39
|
async function loadCommandTemplates(adapter) {
|
|
41
|
-
|
|
40
|
+
// Load from canonical template source (always .md files)
|
|
41
|
+
const templatesDir = getCanonicalTemplatesDirectory();
|
|
42
42
|
const files = await file_system_1.FileSystem.listFiles(templatesDir);
|
|
43
43
|
if (files.length === 0) {
|
|
44
44
|
return [];
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
const commandFiles = files.filter((file) => file.endsWith(
|
|
46
|
+
// Canonical templates are always .md files
|
|
47
|
+
const commandFiles = files.filter((file) => file.endsWith('.md'));
|
|
48
48
|
const templates = [];
|
|
49
49
|
for (const file of commandFiles) {
|
|
50
50
|
const templatePath = path.join(templatesDir, file);
|
|
51
51
|
const content = await file_system_1.FileSystem.readFile(templatePath);
|
|
52
|
-
const name = file.slice(0, -
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
templates.push({
|
|
63
|
-
name,
|
|
64
|
-
content,
|
|
65
|
-
description: extractDescription(content),
|
|
66
|
-
});
|
|
67
|
-
}
|
|
52
|
+
const name = file.slice(0, -3); // Remove .md extension
|
|
53
|
+
// Extract description and clean content from markdown
|
|
54
|
+
const description = extractDescription(content);
|
|
55
|
+
const cleanContent = stripFrontmatter(content);
|
|
56
|
+
templates.push({
|
|
57
|
+
name,
|
|
58
|
+
content: cleanContent,
|
|
59
|
+
description,
|
|
60
|
+
});
|
|
68
61
|
}
|
|
69
62
|
return templates;
|
|
70
63
|
}
|
|
71
|
-
function
|
|
72
|
-
return path.join(__dirname, '..', 'templates', 'slash-commands',
|
|
64
|
+
function getCanonicalTemplatesDirectory() {
|
|
65
|
+
return path.join(__dirname, '..', 'templates', 'slash-commands', '_canonical');
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Strip YAML frontmatter from markdown content
|
|
69
|
+
* Returns clean content without the --- delimited frontmatter
|
|
70
|
+
*/
|
|
71
|
+
function stripFrontmatter(content) {
|
|
72
|
+
// Match YAML frontmatter pattern: ---\n...\n---
|
|
73
|
+
const frontmatterRegex = /^---\r?\n[\s\S]*?\r?\n---\r?\n/;
|
|
74
|
+
return content.replace(frontmatterRegex, '').trim();
|
|
73
75
|
}
|
|
74
76
|
function extractDescription(content) {
|
|
75
77
|
const yamlMatch = content.match(/description:\s*(.+)/);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavix",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
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",
|
|
@@ -1,291 +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. **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**:
|
|
77
|
-
```bash
|
|
78
|
-
clavix archive --list
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Shows all projects currently in archive with their task completion status
|
|
82
|
-
|
|
83
|
-
6. **Restore from Archive**:
|
|
84
|
-
```bash
|
|
85
|
-
clavix archive --restore [project-name]
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Moves a project back from archive to active outputs
|
|
89
|
-
|
|
90
|
-
## When to Archive
|
|
91
|
-
|
|
92
|
-
**Good times to archive:**
|
|
93
|
-
- All implementation tasks are completed (`tasks.md` shows 100%)
|
|
94
|
-
- Project has been deployed/shipped to production
|
|
95
|
-
- Feature is complete and no more work planned
|
|
96
|
-
- User explicitly requests archival
|
|
97
|
-
- Old/abandoned projects that won't be continued
|
|
98
|
-
|
|
99
|
-
**Don't archive when:**
|
|
100
|
-
- Tasks are still in progress (unless using --force)
|
|
101
|
-
- Project is actively being worked on
|
|
102
|
-
- Future enhancements are planned in current tasks
|
|
103
|
-
|
|
104
|
-
## Archive Behavior
|
|
105
|
-
|
|
106
|
-
**What gets archived:**
|
|
107
|
-
- The entire PRD project folder
|
|
108
|
-
- All files: PRD.md, PRD-quick.md, tasks.md, .clavix-implement-config.json
|
|
109
|
-
- Complete directory structure preserved
|
|
110
|
-
|
|
111
|
-
**Where it goes:**
|
|
112
|
-
- From: `.clavix/outputs/[project-name]/`
|
|
113
|
-
- To: `.clavix/outputs/archive/[project-name]/`
|
|
114
|
-
|
|
115
|
-
**What changes:**
|
|
116
|
-
- Archived projects won't show in `/clavix:plan` searches
|
|
117
|
-
- Archived projects won't show in `/clavix:implement` searches
|
|
118
|
-
- They're still accessible in archive directory
|
|
119
|
-
- Can be restored at any time
|
|
120
|
-
|
|
121
|
-
## Example Workflows
|
|
122
|
-
|
|
123
|
-
### Workflow 1: Complete Project
|
|
124
|
-
```
|
|
125
|
-
User: "I've finished implementing the user authentication feature"
|
|
126
|
-
You: "Great! Let me help you archive it."
|
|
127
|
-
|
|
128
|
-
Run: clavix archive
|
|
129
|
-
|
|
130
|
-
User selects: user-authentication-system
|
|
131
|
-
System shows: All 15 tasks completed (100%)
|
|
132
|
-
User confirms: Yes, archive it
|
|
133
|
-
|
|
134
|
-
Result: Project moved to .clavix/outputs/archive/user-authentication-system/
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### Workflow 2: Force Archive WIP
|
|
138
|
-
```
|
|
139
|
-
User: "We're pivoting, I want to archive the old API design even though tasks aren't done"
|
|
140
|
-
You: "I'll archive it with --force"
|
|
141
|
-
|
|
142
|
-
Run: clavix archive old-api-design --force
|
|
143
|
-
|
|
144
|
-
System shows: 8 incomplete tasks
|
|
145
|
-
User confirms: Yes, archive anyway
|
|
146
|
-
|
|
147
|
-
Result: Project archived despite incomplete tasks
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
### Workflow 3: Restore Archived Project
|
|
151
|
-
```
|
|
152
|
-
User: "Actually, we need to revisit that authentication feature"
|
|
153
|
-
You: "I'll restore it from the archive"
|
|
154
|
-
|
|
155
|
-
Run: clavix archive --restore user-authentication-system
|
|
156
|
-
|
|
157
|
-
Result: Project moved back to .clavix/outputs/user-authentication-system/
|
|
158
|
-
```
|
|
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
|
-
|
|
183
|
-
## AI Agent Guidelines
|
|
184
|
-
|
|
185
|
-
When user mentions archiving or cleaning up projects:
|
|
186
|
-
|
|
187
|
-
1. **Check completion status first**:
|
|
188
|
-
- Run `clavix archive` to see archivable projects
|
|
189
|
-
- Review task completion percentages
|
|
190
|
-
- Suggest archiving only completed projects
|
|
191
|
-
|
|
192
|
-
2. **Confirm before archiving**:
|
|
193
|
-
- Always confirm which project to archive
|
|
194
|
-
- Mention the archive location
|
|
195
|
-
- Explain that it can be restored
|
|
196
|
-
|
|
197
|
-
3. **Use --force cautiously**:
|
|
198
|
-
- Only when user explicitly wants to archive incomplete work
|
|
199
|
-
- Explain which tasks will remain incomplete
|
|
200
|
-
- Confirm they won't lose data (just moving location)
|
|
201
|
-
|
|
202
|
-
4. **Suggest restoration**:
|
|
203
|
-
- If user mentions old work, check archive
|
|
204
|
-
- Use `clavix archive --list` to show what's archived
|
|
205
|
-
- Offer to restore if needed
|
|
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
|
-
|
|
229
|
-
## Tips
|
|
230
|
-
|
|
231
|
-
- Archive keeps your active projects list clean and focused
|
|
232
|
-
- Archived projects maintain all their data (nothing is deleted)
|
|
233
|
-
- Archive is searchable - you can still `grep` or find files in archive/
|
|
234
|
-
- Regular archiving improves `/clavix:plan` and `/clavix:implement` performance
|
|
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")
|
|
@@ -1,207 +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. **Strategic Scope Detection** (before detailed analysis):
|
|
35
|
-
|
|
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
|
|
42
|
-
|
|
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"
|
|
47
|
-
|
|
48
|
-
**If user chooses to continue**, proceed with deep analysis but remind them at the end that `/clavix:prd` is available for strategic planning.
|
|
49
|
-
|
|
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]**:
|
|
59
|
-
- 2-3 alternative phrasings
|
|
60
|
-
- Alternative structures (user story, job story, structured)
|
|
61
|
-
- Temperature recommendations
|
|
62
|
-
- Explain when each approach is most appropriate
|
|
63
|
-
|
|
64
|
-
e. **Reflection Checklist [R]**:
|
|
65
|
-
- Validation steps for accuracy
|
|
66
|
-
- Edge cases to consider
|
|
67
|
-
- "What could go wrong" analysis
|
|
68
|
-
- Fact-checking steps
|
|
69
|
-
- Quality criteria
|
|
70
|
-
|
|
71
|
-
4. **CLEAR-labeled educational feedback**:
|
|
72
|
-
- Label all changes with CLEAR component tags
|
|
73
|
-
- Example: "[C] Removed 15 unnecessary pleasantries"
|
|
74
|
-
- Example: "[A] See Alternative Structures for 3 different approaches"
|
|
75
|
-
- Example: "[R] See Reflection Checklist for 5 validation steps"
|
|
76
|
-
|
|
77
|
-
5. Present everything in comprehensive, CLEAR-organized format.
|
|
78
|
-
|
|
79
|
-
## Deep Mode Features
|
|
80
|
-
|
|
81
|
-
**Include (Full CLEAR Framework):**
|
|
82
|
-
- **[C, L, E]**: All fast mode analysis (conciseness, logic, explicitness)
|
|
83
|
-
- **[A] Adaptive**: Alternative phrasings, structures, flexibility, temperature
|
|
84
|
-
- **[R] Reflective**: Validation checklist, edge cases, quality criteria, fact-checking
|
|
85
|
-
- **CLEAR Assessment**: All 5 component scores
|
|
86
|
-
- **CLEAR-labeled Changes**: Educational feedback showing which component improved what
|
|
87
|
-
|
|
88
|
-
**Do NOT include (these belong in `/clavix:prd`):**
|
|
89
|
-
- System architecture recommendations
|
|
90
|
-
- Security best practices
|
|
91
|
-
- Scalability strategy
|
|
92
|
-
- Business impact analysis
|
|
93
|
-
|
|
94
|
-
## Example
|
|
95
|
-
|
|
96
|
-
If user provides: "Create a login page"
|
|
97
|
-
|
|
98
|
-
Output:
|
|
99
|
-
```
|
|
100
|
-
## Analysis
|
|
101
|
-
[All fast mode analysis: gaps, ambiguities, strengths, suggestions]
|
|
102
|
-
|
|
103
|
-
## Changes Made
|
|
104
|
-
- Added authentication context and user needs
|
|
105
|
-
- Specified technical stack and constraints
|
|
106
|
-
- Defined success criteria and expected output
|
|
107
|
-
|
|
108
|
-
## Alternative Phrasings
|
|
109
|
-
1. "Implement a user authentication interface that enables secure access to the platform"
|
|
110
|
-
2. "Design and build a login system that validates user credentials and manages sessions"
|
|
111
|
-
3. "Create an authentication flow that allows registered users to access their accounts"
|
|
112
|
-
|
|
113
|
-
## Edge Cases to Consider
|
|
114
|
-
- What happens when a user enters incorrect credentials 3+ times?
|
|
115
|
-
- How to handle users who've forgotten both email and password?
|
|
116
|
-
- What about users trying to log in from a new device?
|
|
117
|
-
- How to handle session expiration during active use?
|
|
118
|
-
|
|
119
|
-
## Implementation Examples
|
|
120
|
-
**Good:**
|
|
121
|
-
- Prompt specifies authentication method, error handling, and accessibility requirements
|
|
122
|
-
- Includes context about existing auth system and integration points
|
|
123
|
-
- Defines measurable success criteria (load time, accessibility score)
|
|
124
|
-
|
|
125
|
-
**Bad:**
|
|
126
|
-
- "Make a login page" - no context, constraints, or success criteria
|
|
127
|
-
- Missing technical stack and integration requirements
|
|
128
|
-
- No consideration of security or user experience
|
|
129
|
-
|
|
130
|
-
## Alternative Prompt Structures
|
|
131
|
-
1. **User Story**: "As a registered user, I want to log into my account so that I can access my personalized dashboard"
|
|
132
|
-
→ Focuses on user value and benefits
|
|
133
|
-
|
|
134
|
-
2. **Job Story**: "When I visit the app, I want to authenticate securely, so I can access my saved data"
|
|
135
|
-
→ Emphasizes context and motivation
|
|
136
|
-
|
|
137
|
-
3. **Structured Sections**: Objective, Requirements, Constraints, Success Criteria
|
|
138
|
-
→ Provides comprehensive organization
|
|
139
|
-
|
|
140
|
-
## What Could Go Wrong
|
|
141
|
-
- Without security requirements, implementation might miss OWASP best practices
|
|
142
|
-
- Vague "login page" could be interpreted as OAuth, email/password, or social login
|
|
143
|
-
- Missing error handling specification could lead to poor UX
|
|
144
|
-
- No accessibility requirements might exclude users with disabilities
|
|
145
|
-
|
|
146
|
-
## Improved Prompt
|
|
147
|
-
[Structured prompt with all sections]
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
## When to Use Deep vs Fast vs PRD
|
|
151
|
-
|
|
152
|
-
- **Fast mode** (`/clavix:fast`): C, L, E components - quick CLEAR cleanup
|
|
153
|
-
- **Deep mode** (`/clavix:deep`): Full CLEAR (C, L, E, A, R) - comprehensive analysis with alternatives and validation
|
|
154
|
-
- **PRD mode** (`/clavix:prd`): CLEAR-validated PRD generation - strategic planning with architecture decisions
|
|
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
|
-
|
|
170
|
-
## Tips
|
|
171
|
-
|
|
172
|
-
- **Apply full CLEAR framework** systematically: all 5 components
|
|
173
|
-
- Label all changes with CLEAR components for education
|
|
174
|
-
- Deep mode focuses on **prompt-level** CLEAR analysis, not strategic architecture
|
|
175
|
-
- Use **[A] Adaptive** to explore alternative approaches
|
|
176
|
-
- Use **[R] Reflective** to identify edge cases and validation needs
|
|
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
|