clavix 4.2.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/deep.js +4 -58
- package/dist/cli/commands/init.js +13 -16
- package/dist/cli/commands/plan.js +2 -2
- package/dist/core/task-manager.d.ts +1 -2
- package/dist/core/task-manager.js +21 -26
- package/dist/templates/slash-commands/_canonical/deep.md +37 -70
- package/dist/templates/slash-commands/_components/sections/pattern-visibility.md +1 -1
- package/package.json +2 -2
- package/dist/templates/instructions/README 2.md +0 -311
- package/dist/templates/instructions/core 2/clavix-mode.md +0 -275
- package/dist/templates/instructions/core 2/file-operations.md +0 -330
- package/dist/templates/instructions/core 2/verification.md +0 -377
- package/dist/templates/instructions/troubleshooting 2/jumped-to-implementation.md +0 -234
- package/dist/templates/instructions/troubleshooting 2/mode-confusion.md +0 -402
- package/dist/templates/instructions/troubleshooting 2/skipped-file-creation.md +0 -385
- package/dist/templates/slash-commands/_canonical 2/archive.md +0 -410
- package/dist/templates/slash-commands/_canonical 2/deep.md +0 -512
- package/dist/templates/slash-commands/_canonical 2/execute.md +0 -80
- package/dist/templates/slash-commands/_canonical 2/fast.md +0 -370
- package/dist/templates/slash-commands/_canonical 2/implement.md +0 -364
- package/dist/templates/slash-commands/_canonical 2/plan.md +0 -329
- package/dist/templates/slash-commands/_canonical 2/prd.md +0 -320
- package/dist/templates/slash-commands/_canonical 2/prompts.md +0 -97
- package/dist/templates/slash-commands/_canonical 2/start.md +0 -204
- package/dist/templates/slash-commands/_canonical 2/summarize.md +0 -395
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
# Clavix Instructions Hierarchy
|
|
2
|
-
|
|
3
|
-
This directory contains the complete instruction set for AI agents consuming Clavix workflows. Understanding this hierarchy is critical for maintaining consistent, high-quality agent behavior.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 📐 Documentation Architecture
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
Canonical Templates (SOURCE OF TRUTH)
|
|
11
|
-
src/templates/slash-commands/_canonical/
|
|
12
|
-
├── fast.md, deep.md, prd.md
|
|
13
|
-
├── start.md, summarize.md
|
|
14
|
-
├── plan.md, implement.md, execute.md
|
|
15
|
-
└── archive.md, prompts.md
|
|
16
|
-
↓ (copied during clavix init)
|
|
17
|
-
Instruction Files (AUTO-GENERATED)
|
|
18
|
-
.clavix/instructions/
|
|
19
|
-
├── workflows/ - Complete workflows (COPIED from canonical)
|
|
20
|
-
├── core/ - Foundational concepts (static)
|
|
21
|
-
└── troubleshooting/ - Common issues (static)
|
|
22
|
-
↓ (reference)
|
|
23
|
-
Generic Connectors (THIN WRAPPERS)
|
|
24
|
-
src/templates/agents/
|
|
25
|
-
├── agents.md - Generic agents
|
|
26
|
-
├── octo.md - Octofriend-specific
|
|
27
|
-
├── copilot-instructions.md - GitHub Copilot
|
|
28
|
-
└── warp.md - Warp AI
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## 🎯 Core Principles
|
|
34
|
-
|
|
35
|
-
### 1. Single Source of Truth
|
|
36
|
-
|
|
37
|
-
**Canonical templates** (`src/templates/slash-commands/_canonical/`) are the definitive reference:
|
|
38
|
-
- Complete workflow descriptions
|
|
39
|
-
- Official command behavior
|
|
40
|
-
- Authoritative patterns and examples
|
|
41
|
-
- NEVER modified for size/brevity - they define the standard
|
|
42
|
-
|
|
43
|
-
**Rule:** When canonical and instruction files conflict, canonical wins.
|
|
44
|
-
|
|
45
|
-
### 2. Agent-Optimized Instructions
|
|
46
|
-
|
|
47
|
-
**Instruction files** (`src/templates/instructions/`) are derived from canonical templates but optimized for AI agent consumption:
|
|
48
|
-
- Must match canonical workflows 100% in substance
|
|
49
|
-
- Can reorganize for better agent comprehension
|
|
50
|
-
- Add explicit checkpoints, self-correction checks, troubleshooting
|
|
51
|
-
- Include "Common Mistakes" sections with wrong/right examples
|
|
52
|
-
- Expand on ambiguous points from canonical
|
|
53
|
-
|
|
54
|
-
**Rule:** Instruction files implement canonical, never contradict it.
|
|
55
|
-
|
|
56
|
-
### 3. Thin Generic Connectors
|
|
57
|
-
|
|
58
|
-
**Generic connector files** (`src/templates/agents/`) are minimal wrappers:
|
|
59
|
-
- Reference instruction files, don't duplicate them
|
|
60
|
-
- Platform-specific guidance ONLY (model switching, tool limitations, etc.)
|
|
61
|
-
- Brief workflow overview + standard workflow (PRD → Plan → Implement → Archive)
|
|
62
|
-
- Command quick reference table
|
|
63
|
-
- Common mistakes specific to platform
|
|
64
|
-
|
|
65
|
-
**Target sizes:**
|
|
66
|
-
- agents.md: 4-7K (generic, no platform features)
|
|
67
|
-
- octo.md: 7-10K (Octofriend has unique features)
|
|
68
|
-
- copilot-instructions.md: 5-7K (GitHub Copilot integration)
|
|
69
|
-
- warp.md: 5-7K (Warp AI-specific)
|
|
70
|
-
|
|
71
|
-
**Rule:** If it's in an instruction file, don't duplicate it in a connector file.
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## 📂 Directory Structure
|
|
76
|
-
|
|
77
|
-
### `/workflows/` - Step-by-Step Workflows
|
|
78
|
-
|
|
79
|
-
Complete, executable workflows with explicit steps:
|
|
80
|
-
|
|
81
|
-
| File | Purpose | Key Sections |
|
|
82
|
-
|------|---------|--------------|
|
|
83
|
-
| `start.md` | Conversational mode entry | Questions, complexity tracking, mode transitions |
|
|
84
|
-
| `summarize.md` | Extract requirements from conversation | Pre-validation, extraction, file creation, optimization |
|
|
85
|
-
| `fast.md` | Quick prompt optimization | Intent detection, quality assessment, smart triage |
|
|
86
|
-
| `deep.md` | Comprehensive analysis | Strategic scope, alternatives, validation, edge cases, risks |
|
|
87
|
-
| `prd.md` | PRD generation via Socratic questions | 5-question sequence, validation criteria, file-saving protocol |
|
|
88
|
-
|
|
89
|
-
**Pattern:** Each workflow file includes:
|
|
90
|
-
- CLAVIX PLANNING MODE block (clarifies planning vs implementation)
|
|
91
|
-
- Complete workflow steps with checkpoints
|
|
92
|
-
- Self-correction checks
|
|
93
|
-
- Common mistakes (wrong/right examples)
|
|
94
|
-
- Troubleshooting references
|
|
95
|
-
- Integration with other workflows
|
|
96
|
-
|
|
97
|
-
### `/core/` - Foundational Concepts
|
|
98
|
-
|
|
99
|
-
Cross-workflow patterns and principles:
|
|
100
|
-
|
|
101
|
-
| File | Purpose | Key Content |
|
|
102
|
-
|------|---------|-------------|
|
|
103
|
-
| `clavix-mode.md` | Planning vs implementation distinction | Mode table, standard workflow, command categorization |
|
|
104
|
-
| `file-operations.md` | File creation patterns | Write tool usage, verification steps, error handling |
|
|
105
|
-
| `verification.md` | Checkpoint patterns | Self-correction triggers, validation approaches |
|
|
106
|
-
|
|
107
|
-
**Purpose:** Define concepts used across multiple workflows to avoid duplication.
|
|
108
|
-
|
|
109
|
-
### `/troubleshooting/` - Common Issues
|
|
110
|
-
|
|
111
|
-
Problem → Solution guides:
|
|
112
|
-
|
|
113
|
-
| File | Purpose | Symptoms & Solutions |
|
|
114
|
-
|------|---------|---------------------|
|
|
115
|
-
| `jumped-to-implementation.md` | Agent implemented during planning | Detect, stop, apologize, return to planning |
|
|
116
|
-
| `skipped-file-creation.md` | Files not created | Explicit Write tool steps, verification protocol |
|
|
117
|
-
| `mode-confusion.md` | Unclear planning vs implementation | Ask user to clarify, explain mode boundaries |
|
|
118
|
-
|
|
119
|
-
**Pattern:** Each troubleshooting file includes:
|
|
120
|
-
- Symptoms (how to detect the problem)
|
|
121
|
-
- Root cause (why it happened)
|
|
122
|
-
- Solution (step-by-step fix)
|
|
123
|
-
- Prevention (how to avoid in future)
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
## 🔄 Maintenance Workflow
|
|
128
|
-
|
|
129
|
-
### When Adding New Workflow
|
|
130
|
-
|
|
131
|
-
1. **Create canonical template** in `src/templates/slash-commands/_canonical/`
|
|
132
|
-
- Complete workflow description
|
|
133
|
-
- All steps, examples, edge cases
|
|
134
|
-
- This is the official reference
|
|
135
|
-
|
|
136
|
-
2. **NO NEED to create instruction file** - It's auto-copied during init
|
|
137
|
-
- During `clavix init`, canonical templates are automatically copied to `.clavix/instructions/workflows/`
|
|
138
|
-
- User projects get fresh copy on init/update
|
|
139
|
-
- **Single source of truth:** Only maintain canonical template
|
|
140
|
-
|
|
141
|
-
3. **Update generic connectors** in `src/templates/agents/` (if needed)
|
|
142
|
-
- Add table reference to new workflow
|
|
143
|
-
- Update workflow detection keywords
|
|
144
|
-
- DO NOT duplicate workflow steps
|
|
145
|
-
|
|
146
|
-
4. **Update this README** if new pattern/principle introduced
|
|
147
|
-
|
|
148
|
-
### When Modifying Existing Workflow
|
|
149
|
-
|
|
150
|
-
1. **Update canonical template** - This is source of truth
|
|
151
|
-
2. **Users run `clavix update`** - Refreshes `.clavix/instructions/workflows/` from canonical
|
|
152
|
-
3. **Test:** Verify `clavix update` propagates changes correctly
|
|
153
|
-
4. **No manual duplication needed** - InstructionsGenerator copies from canonical automatically
|
|
154
|
-
|
|
155
|
-
### When Reporting Verbosity Issues
|
|
156
|
-
|
|
157
|
-
**Bloat checklist:**
|
|
158
|
-
1. Is canonical template duplicated in instruction file? → Remove from instruction, reference canonical
|
|
159
|
-
2. Is instruction file duplicated in connector file? → Remove from connector, reference instruction
|
|
160
|
-
3. Is workflow description inline in connector? → Remove, add table reference to instruction file
|
|
161
|
-
4. Are "Common Mistakes" duplicated across files? → Keep in instruction file only
|
|
162
|
-
5. Is command reference table too detailed? → Condense to single-line purpose
|
|
163
|
-
|
|
164
|
-
**Size targets:**
|
|
165
|
-
- Canonical templates: 10-20K (complete reference, no size limit)
|
|
166
|
-
- Instruction files: 10-18K (agent-optimized, comprehensive)
|
|
167
|
-
- Generic connectors: 4-10K (thin wrappers)
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## 🧠 Design Philosophy
|
|
172
|
-
|
|
173
|
-
### Why Three Layers?
|
|
174
|
-
|
|
175
|
-
**Layer 1: Canonical Templates**
|
|
176
|
-
- **Audience:** CLI implementation, human developers, official documentation
|
|
177
|
-
- **Purpose:** Define authoritative behavior
|
|
178
|
-
- **Constraint:** Complete and accurate, no brevity requirement
|
|
179
|
-
|
|
180
|
-
**Layer 2: Instruction Files**
|
|
181
|
-
- **Audience:** AI agents (all platforms)
|
|
182
|
-
- **Purpose:** Executable guidance with self-correction
|
|
183
|
-
- **Constraint:** Must match canonical, optimized for agent comprehension
|
|
184
|
-
|
|
185
|
-
**Layer 3: Generic Connectors**
|
|
186
|
-
- **Audience:** Platform-specific agents (Copilot, Octofriend, Warp, generic)
|
|
187
|
-
- **Purpose:** Minimal platform-specific wrapper + references
|
|
188
|
-
- **Constraint:** Keep thin, reference instruction files, platform-unique guidance only
|
|
189
|
-
|
|
190
|
-
### Why Not Just One File?
|
|
191
|
-
|
|
192
|
-
**Problems with single-file approach:**
|
|
193
|
-
1. **Duplication:** Same workflow described 4+ times (canonical + 3 platforms)
|
|
194
|
-
2. **Maintenance burden:** Update one workflow = edit 4+ files
|
|
195
|
-
3. **Size bloat:** Each platform file becomes 15-20K
|
|
196
|
-
4. **Inconsistency:** Descriptions drift apart over time
|
|
197
|
-
5. **Confusion:** Agent sees multiple versions, unclear which is authoritative
|
|
198
|
-
|
|
199
|
-
**Benefits of three-layer hierarchy:**
|
|
200
|
-
1. **DRY principle:** Write workflow once (instruction file), reference everywhere
|
|
201
|
-
2. **Single source of truth:** Canonical → Instruction → Connector flow
|
|
202
|
-
3. **Platform focus:** Connector files focus on platform-specific value (model switching, tool limitations)
|
|
203
|
-
4. **Maintainability:** Fix bug in one instruction file, all platforms benefit
|
|
204
|
-
5. **Clarity:** Agent knows where to look - instruction file for workflow, connector for platform quirks
|
|
205
|
-
|
|
206
|
-
---
|
|
207
|
-
|
|
208
|
-
## 📋 Quick Reference Tables
|
|
209
|
-
|
|
210
|
-
### Standard Workflow
|
|
211
|
-
|
|
212
|
-
All workflows follow this progression:
|
|
213
|
-
|
|
214
|
-
```
|
|
215
|
-
PRD Creation → Task Planning → Implementation → Archive
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
| Phase | Command | Output | Mode |
|
|
219
|
-
|-------|---------|--------|------|
|
|
220
|
-
| **Planning** | `clavix prd` or conversational | `full-prd.md` + `quick-prd.md` | PLANNING |
|
|
221
|
-
| **Task Prep** | `clavix plan` | `tasks.md` | PLANNING (Pre-Implementation) |
|
|
222
|
-
| **Implementation** | `clavix implement` | Executed code | IMPLEMENTATION |
|
|
223
|
-
| **Completion** | `clavix archive` | Archived project | Management |
|
|
224
|
-
|
|
225
|
-
### Mode Distinction
|
|
226
|
-
|
|
227
|
-
| Command | Mode | Implement? |
|
|
228
|
-
|---------|------|------------|
|
|
229
|
-
| `/clavix:start` | Planning | ✗ NO |
|
|
230
|
-
| `/clavix:summarize` | Planning | ✗ NO |
|
|
231
|
-
| `/clavix:fast` | Planning | ✗ NO |
|
|
232
|
-
| `/clavix:deep` | Planning | ✗ NO |
|
|
233
|
-
| `/clavix:prd` | Planning | ✗ NO |
|
|
234
|
-
| `/clavix:plan` | Planning (Pre-Implementation) | ✗ NO |
|
|
235
|
-
| `/clavix:implement` | Implementation | ✓ YES |
|
|
236
|
-
| `/clavix:execute` | Implementation | ✓ YES |
|
|
237
|
-
| `/clavix:task-complete` | Implementation | ✓ YES |
|
|
238
|
-
|
|
239
|
-
### File Size Expectations
|
|
240
|
-
|
|
241
|
-
| File Type | Size Range | Line Range | Purpose |
|
|
242
|
-
|-----------|-----------|------------|---------|
|
|
243
|
-
| Canonical Template | 10-20K | 300-600 lines | Complete reference (no limit) |
|
|
244
|
-
| Instruction File | 10-18K | 350-650 lines | Agent-executable workflows |
|
|
245
|
-
| Generic Connector | 4-10K | 150-300 lines | Thin wrapper + platform-specific |
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
|
-
## 🔧 Troubleshooting
|
|
250
|
-
|
|
251
|
-
### "Agent jumped to implementation during planning"
|
|
252
|
-
|
|
253
|
-
**Root cause:** Agent didn't recognize planning mode boundary
|
|
254
|
-
|
|
255
|
-
**Fix:**
|
|
256
|
-
1. Check instruction file has CLAVIX PLANNING MODE block at top
|
|
257
|
-
2. Verify "DO NOT IMPLEMENT" warnings present and clear
|
|
258
|
-
3. Add self-correction check: "Check 1: Am I Implementing?"
|
|
259
|
-
4. Reference `troubleshooting/jumped-to-implementation.md`
|
|
260
|
-
|
|
261
|
-
### "Agent skipped file creation"
|
|
262
|
-
|
|
263
|
-
**Root cause:** File-saving protocol not explicit enough
|
|
264
|
-
|
|
265
|
-
**Fix:**
|
|
266
|
-
1. Add explicit step-by-step file creation section
|
|
267
|
-
2. Include "Step N: Verify Files Were Created" with ls command
|
|
268
|
-
3. Add common mistake: "Skipping file creation"
|
|
269
|
-
4. Reference `troubleshooting/skipped-file-creation.md`
|
|
270
|
-
|
|
271
|
-
### "Generic connector file too large (>10K)"
|
|
272
|
-
|
|
273
|
-
**Root cause:** Duplicating instruction file content
|
|
274
|
-
|
|
275
|
-
**Fix:**
|
|
276
|
-
1. Identify duplicated workflow descriptions
|
|
277
|
-
2. Replace with table reference to instruction file
|
|
278
|
-
3. Keep only platform-specific guidance (model switching, tool limitations, etc.)
|
|
279
|
-
4. Condense CLI reference table (one line per command)
|
|
280
|
-
5. Remove detailed workflow explanations (link to instruction file instead)
|
|
281
|
-
|
|
282
|
-
### "Instruction file doesn't match canonical"
|
|
283
|
-
|
|
284
|
-
**Root cause:** Manual edit to instruction file without checking canonical
|
|
285
|
-
|
|
286
|
-
**Fix:**
|
|
287
|
-
1. Read canonical template: `src/templates/slash-commands/_canonical/<workflow>.md`
|
|
288
|
-
2. Compare with instruction file: `src/templates/instructions/workflows/<workflow>.md`
|
|
289
|
-
3. Ensure substance matches 100%
|
|
290
|
-
4. Reorganization for agent clarity is OK, contradicting canonical is NOT
|
|
291
|
-
|
|
292
|
-
---
|
|
293
|
-
|
|
294
|
-
## 📚 Additional Resources
|
|
295
|
-
|
|
296
|
-
**Related documentation:**
|
|
297
|
-
- `src/templates/slash-commands/_canonical/README.md` - Canonical template guidelines
|
|
298
|
-
- `src/templates/agents/README.md` - Generic connector patterns (if exists)
|
|
299
|
-
- `CONTRIBUTING.md` - General contribution guidelines
|
|
300
|
-
- `ARCHITECTURE.md` - Overall Clavix architecture
|
|
301
|
-
|
|
302
|
-
**Key files to read first:**
|
|
303
|
-
- `core/clavix-mode.md` - Understand planning vs implementation
|
|
304
|
-
- `workflows/fast.md` - See complete workflow pattern
|
|
305
|
-
- `../agents/octo.md` - See thin connector example (post-v3.6.1)
|
|
306
|
-
|
|
307
|
-
---
|
|
308
|
-
|
|
309
|
-
**Last updated:** v3.6.1 (November 2025)
|
|
310
|
-
|
|
311
|
-
**Maintainers:** Ensure this README stays synchronized with actual instruction hierarchy.
|
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
# Understanding Clavix Modes
|
|
2
|
-
|
|
3
|
-
## Two Types of Clavix Workflows
|
|
4
|
-
|
|
5
|
-
Clavix has **two distinct modes** based on the command type:
|
|
6
|
-
|
|
7
|
-
### CLAVIX PLANNING MODE (Requirements & Documentation)
|
|
8
|
-
|
|
9
|
-
**Commands:** `/clavix:start`, `/clavix:summarize`, `/clavix:fast`, `/clavix:deep`, `/clavix:prd`
|
|
10
|
-
|
|
11
|
-
**Your role:**
|
|
12
|
-
- Ask questions about requirements
|
|
13
|
-
- Create PRDs (Product Requirements Documents)
|
|
14
|
-
- Generate optimized prompts
|
|
15
|
-
- Extract and structure requirements
|
|
16
|
-
- Analyze and improve prompt quality
|
|
17
|
-
- Document features, constraints, success criteria
|
|
18
|
-
|
|
19
|
-
**DO NOT implement features during these workflows.**
|
|
20
|
-
|
|
21
|
-
### CLAVIX IMPLEMENTATION MODE (Code Execution)
|
|
22
|
-
|
|
23
|
-
**Commands:** `/clavix:implement`, `/clavix:execute`, `/clavix:task-complete`
|
|
24
|
-
|
|
25
|
-
**Your role:**
|
|
26
|
-
- Write code and implement features
|
|
27
|
-
- Execute tasks from tasks.md
|
|
28
|
-
- Complete implementation work
|
|
29
|
-
- Mark tasks as completed
|
|
30
|
-
|
|
31
|
-
**DO implement code during these workflows.**
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Core Principle
|
|
36
|
-
|
|
37
|
-
**Know which mode you're in based on the command:**
|
|
38
|
-
|
|
39
|
-
| Command | Mode | Implement? |
|
|
40
|
-
|---------|------|------------|
|
|
41
|
-
| `/clavix:start` | Planning | ✗ NO |
|
|
42
|
-
| `/clavix:summarize` | Planning | ✗ NO |
|
|
43
|
-
| `/clavix:fast` | Planning | ✗ NO |
|
|
44
|
-
| `/clavix:deep` | Planning | ✗ NO |
|
|
45
|
-
| `/clavix:prd` | Planning | ✗ NO |
|
|
46
|
-
| `/clavix:plan` | Planning (Pre-Implementation) | ✗ NO |
|
|
47
|
-
| `/clavix:implement` | Implementation | ✓ YES |
|
|
48
|
-
| `/clavix:execute` | Implementation | ✓ YES |
|
|
49
|
-
| `/clavix:task-complete` | Implementation | ✓ YES |
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
## What You Should Do
|
|
54
|
-
|
|
55
|
-
✓ **Ask questions** about what the user wants to build
|
|
56
|
-
✓ **Generate PRDs** that describe the requirements
|
|
57
|
-
✓ **Create optimized prompts** that can be used for implementation later
|
|
58
|
-
✓ **Extract and structure requirements** from conversations
|
|
59
|
-
✓ **Analyze and improve** prompt quality
|
|
60
|
-
✓ **Document** features, constraints, and success criteria
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## What You Should NOT Do
|
|
65
|
-
|
|
66
|
-
**DO NOT IMPLEMENT. DO NOT IMPLEMENT. DO NOT IMPLEMENT.**
|
|
67
|
-
|
|
68
|
-
✗ **DO NOT write application code** for the feature being discussed
|
|
69
|
-
✗ **DO NOT implement** the feature or component
|
|
70
|
-
✗ **DO NOT generate** functions, classes, or modules for the actual application
|
|
71
|
-
✗ **DO NOT start building** the feature itself
|
|
72
|
-
✗ **DO NOT create example implementations** unless explicitly asked
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Standard Workflow: PRD → Plan → Implement → Archive
|
|
77
|
-
|
|
78
|
-
**The typical Clavix workflow:**
|
|
79
|
-
|
|
80
|
-
1. **Planning Phase** (`/clavix:prd`)
|
|
81
|
-
- Creates PRD (full + quick versions)
|
|
82
|
-
- Mode: PLANNING
|
|
83
|
-
- Output: `.clavix/outputs/{project}/full-prd.md` + `quick-prd.md`
|
|
84
|
-
|
|
85
|
-
2. **Task Preparation** (`/clavix:plan`)
|
|
86
|
-
- Transforms PRD into curated tasks.md
|
|
87
|
-
- Mode: PLANNING (Pre-Implementation)
|
|
88
|
-
- Output: `.clavix/outputs/{project}/tasks.md`
|
|
89
|
-
|
|
90
|
-
3. **Implementation Phase** (`/clavix:implement`)
|
|
91
|
-
- Agent executes tasks systematically
|
|
92
|
-
- Mode: IMPLEMENTATION
|
|
93
|
-
- Uses `task-complete` to mark progress
|
|
94
|
-
|
|
95
|
-
4. **Completion** (`/clavix:archive`)
|
|
96
|
-
- Archives completed project
|
|
97
|
-
- Mode: Management
|
|
98
|
-
|
|
99
|
-
**Key principle:** Planning workflows create documents. Implementation workflows write code.
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## When to Switch Modes
|
|
104
|
-
|
|
105
|
-
**User says:** "Now implement this" or "Build this feature"
|
|
106
|
-
→ **Switch to IMPLEMENTATION MODE** if not already in implementation command
|
|
107
|
-
|
|
108
|
-
**User runs:** `/clavix:implement` or `/clavix:execute`
|
|
109
|
-
→ **You are in IMPLEMENTATION MODE** - write code
|
|
110
|
-
|
|
111
|
-
**User runs:** `/clavix:prd` or `/clavix:fast` or `/clavix:start`
|
|
112
|
-
→ **You are in PLANNING MODE** - gather requirements, don't implement
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## When Unsure
|
|
117
|
-
|
|
118
|
-
If you're not sure whether the user wants planning or implementation, **ASK:**
|
|
119
|
-
|
|
120
|
-
> "Should I implement this feature now, or continue with requirements and planning?"
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## Common Mistakes to Avoid
|
|
125
|
-
|
|
126
|
-
### ❌ Wrong: Jumping to Implementation
|
|
127
|
-
|
|
128
|
-
**User:** "I want to build a todo app with authentication"
|
|
129
|
-
|
|
130
|
-
**Wrong response:**
|
|
131
|
-
```typescript
|
|
132
|
-
// Creating TodoApp component
|
|
133
|
-
export function TodoApp() {
|
|
134
|
-
const [todos, setTodos] = useState([]);
|
|
135
|
-
// ... implementation
|
|
136
|
-
}
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### ✓ Right: Gathering Requirements
|
|
140
|
-
|
|
141
|
-
**User:** "I want to build a todo app with authentication"
|
|
142
|
-
|
|
143
|
-
**Right response:**
|
|
144
|
-
> "Let me help you plan this todo app. A few clarifying questions:
|
|
145
|
-
>
|
|
146
|
-
> 1. What authentication method do you want? (OAuth, email/password, magic link?)
|
|
147
|
-
> 2. Should todos be per-user or shared across teams?
|
|
148
|
-
> 3. What todo features are essential? (priority levels, due dates, categories?)
|
|
149
|
-
> 4. Any specific technical constraints or framework preferences?
|
|
150
|
-
>
|
|
151
|
-
> Once we've gathered all requirements, I'll create a comprehensive PRD and optimized prompt for implementation."
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
|
-
## Mode Detection Examples
|
|
156
|
-
|
|
157
|
-
### Scenario 1: User Starts Conversational Mode
|
|
158
|
-
|
|
159
|
-
**Command:** `/clavix:start`
|
|
160
|
-
|
|
161
|
-
**Your mode:** CLAVIX PLANNING MODE
|
|
162
|
-
|
|
163
|
-
**Actions:**
|
|
164
|
-
- Enter conversational mode
|
|
165
|
-
- Ask clarifying questions
|
|
166
|
-
- Track requirements
|
|
167
|
-
- DO NOT implement anything
|
|
168
|
-
- Remind user to use `/clavix:summarize` when ready
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
### Scenario 2: User Asks for Summarization
|
|
173
|
-
|
|
174
|
-
**Command:** `/clavix:summarize`
|
|
175
|
-
|
|
176
|
-
**Your mode:** CLAVIX PLANNING MODE
|
|
177
|
-
|
|
178
|
-
**Actions:**
|
|
179
|
-
- Analyze conversation
|
|
180
|
-
- Extract requirements
|
|
181
|
-
- Create mini-PRD
|
|
182
|
-
- Create optimized prompts
|
|
183
|
-
- Save files
|
|
184
|
-
- DO NOT implement the feature
|
|
185
|
-
|
|
186
|
-
---
|
|
187
|
-
|
|
188
|
-
### Scenario 3: User Runs Implement Command
|
|
189
|
-
|
|
190
|
-
**Command:** `/clavix:implement`
|
|
191
|
-
|
|
192
|
-
**Your mode:** CLAVIX IMPLEMENTATION MODE
|
|
193
|
-
|
|
194
|
-
**Actions:**
|
|
195
|
-
- Read tasks.md from `.clavix/outputs/{project}/`
|
|
196
|
-
- Execute tasks systematically
|
|
197
|
-
- Write actual implementation code
|
|
198
|
-
- Use `/clavix:task-complete` to mark tasks done
|
|
199
|
-
- Continue until all tasks completed
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
### Scenario 4: User Runs Execute Command
|
|
204
|
-
|
|
205
|
-
**Command:** `/clavix:execute` or `/clavix:execute --latest`
|
|
206
|
-
|
|
207
|
-
**Your mode:** CLAVIX IMPLEMENTATION MODE
|
|
208
|
-
|
|
209
|
-
**Actions:**
|
|
210
|
-
- Load saved prompt from fast/deep workflow
|
|
211
|
-
- Implement the feature described in the prompt
|
|
212
|
-
- Write actual code
|
|
213
|
-
- Complete the implementation
|
|
214
|
-
|
|
215
|
-
---
|
|
216
|
-
|
|
217
|
-
### Scenario 5: Ambiguous Request During Planning
|
|
218
|
-
|
|
219
|
-
**User:** "What do you think about adding real-time updates?"
|
|
220
|
-
|
|
221
|
-
**Context:** Currently in conversational mode (`/clavix:start`)
|
|
222
|
-
|
|
223
|
-
**Your mode:** CLAVIX PLANNING MODE (clarify first)
|
|
224
|
-
|
|
225
|
-
**Response:**
|
|
226
|
-
> "Are you asking me to:
|
|
227
|
-
> 1. Discuss the requirements for real-time updates and add them to our planning? (I'll stay in planning mode)
|
|
228
|
-
> 2. Implement real-time updates now? (You'd need to run `/clavix:implement` for that)
|
|
229
|
-
>
|
|
230
|
-
> Since we're in planning mode, I'll assume option 1 unless you explicitly request implementation."
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
### Scenario 6: User Gives Direct Implementation Request
|
|
235
|
-
|
|
236
|
-
**User:** "Now implement this feature" or "Build the dashboard we discussed"
|
|
237
|
-
|
|
238
|
-
**Your mode:** Check context first
|
|
239
|
-
|
|
240
|
-
**If no `/clavix:implement` command was run:**
|
|
241
|
-
- Suggest: "To implement this, please run `/clavix:implement` or `/clavix:execute`. This ensures proper task tracking and file management."
|
|
242
|
-
|
|
243
|
-
**If `/clavix:implement` command was run:**
|
|
244
|
-
- You're already in CLAVIX IMPLEMENTATION MODE
|
|
245
|
-
- Proceed with implementation
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
|
-
## Self-Correction
|
|
250
|
-
|
|
251
|
-
If you catch yourself implementing during a Clavix workflow:
|
|
252
|
-
|
|
253
|
-
1. **STOP immediately**
|
|
254
|
-
2. **Delete** the implementation attempt
|
|
255
|
-
3. **Apologize**: "I apologize - I was jumping to implementation. Let me continue with requirements gathering instead."
|
|
256
|
-
4. **Return** to asking questions or documenting requirements
|
|
257
|
-
5. **Reference** this file for clarification
|
|
258
|
-
|
|
259
|
-
---
|
|
260
|
-
|
|
261
|
-
## Summary
|
|
262
|
-
|
|
263
|
-
**Two distinct Clavix modes:**
|
|
264
|
-
|
|
265
|
-
1. **CLAVIX PLANNING MODE** (`start`, `summarize`, `fast`, `deep`, `prd`, `plan`)
|
|
266
|
-
- Create PRDs, prompts, documentation
|
|
267
|
-
- DO NOT implement features
|
|
268
|
-
|
|
269
|
-
2. **CLAVIX IMPLEMENTATION MODE** (`implement`, `execute`, `task-complete`)
|
|
270
|
-
- Write code and build features
|
|
271
|
-
- DO implement what's been planned
|
|
272
|
-
|
|
273
|
-
**Standard workflow:** PRD → Plan → Implement → Archive
|
|
274
|
-
|
|
275
|
-
**When in doubt:** Check which command was run, or ask the user to clarify.
|