clavix 5.8.1 → 5.9.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.
@@ -96,8 +96,9 @@ export function getDisplayNames(agentManager, integrations) {
96
96
  * Determine the command separator based on selected integrations
97
97
  */
98
98
  export function determineCommandSeparator(integrations) {
99
- const usesColon = integrations.some((i) => COLON_SEPARATOR_INTEGRATIONS.includes(i));
100
- const usesHyphen = integrations.some((i) => !COLON_SEPARATOR_INTEGRATIONS.includes(i));
99
+ const colonList = COLON_SEPARATOR_INTEGRATIONS;
100
+ const usesColon = integrations.some((i) => colonList.includes(i));
101
+ const usesHyphen = integrations.some((i) => !colonList.includes(i));
101
102
  if (usesColon && !usesHyphen) {
102
103
  return { primary: ':' };
103
104
  }
@@ -274,7 +274,7 @@ Result: Project permanently deleted
274
274
 
275
275
  ---
276
276
 
277
- ## Agent Transparency (v5.8.1)
277
+ ## Agent Transparency (v5.9.0)
278
278
 
279
279
  ### Agent Manual (Universal Protocols)
280
280
  {{INCLUDE:agent-protocols/AGENT_MANUAL.md}}
@@ -524,7 +524,7 @@ I'll explain what's wrong and what you might need to do:
524
524
 
525
525
  ---
526
526
 
527
- ## Agent Transparency (v5.8.1)
527
+ ## Agent Transparency (v5.9.0)
528
528
 
529
529
  ### Agent Manual (Universal Protocols)
530
530
  {{INCLUDE:agent-protocols/AGENT_MANUAL.md}}
@@ -125,6 +125,8 @@ Clavix provides a unified **improve** mode that intelligently selects the approp
125
125
 
126
126
  ## Instructions
127
127
 
128
+ **Before beginning:** Use the Clarifying Questions Protocol (see Agent Transparency section) when you need critical information from the user (confidence < 95%). For prompt improvement, this means confirming intent, desired depth, or technical constraints when ambiguous.
129
+
128
130
  1. Take the user's prompt: `{{ARGS}}`
129
131
 
130
132
  2. **Intent Detection** - Analyze what the user is trying to achieve:
@@ -522,7 +524,7 @@ Wait for the user to decide what to do next.
522
524
 
523
525
  ---
524
526
 
525
- ## Agent Transparency (v5.8.1)
527
+ ## Agent Transparency (v5.9.0)
526
528
 
527
529
  ### Agent Manual (Universal Protocols)
528
530
  {{INCLUDE:agent-protocols/AGENT_MANUAL.md}}
@@ -79,6 +79,8 @@ Implementation: BLOCKED - I will create the plan, not the code
79
79
 
80
80
  ## Instructions
81
81
 
82
+ **Before beginning:** Use the Clarifying Questions Protocol (see Agent Transparency section) when you need critical information from the user (confidence < 95%). For task planning, this means confirming which PRD to use, technical approach preferences, or task breakdown granularity.
83
+
82
84
  ### Part A: Agent Execution Protocol
83
85
 
84
86
  **As an AI agent, you must follow this strict sequence:**
@@ -105,30 +107,37 @@ Implementation: BLOCKED - I will create the plan, not the code
105
107
  - Check `.clavix/outputs/<project-name>/` for `full-prd.md`, `quick-prd.md`, etc.
106
108
  - If missing, check legacy `.clavix/outputs/summarize/`.
107
109
  2. **Read PRD**: Ingest the requirements.
110
+ 3. **Extract Architecture**: Look for the "Architecture & Design" section. Note any specific patterns (e.g., Clean Architecture, Feature-Sliced Design) or structural decisions.
108
111
 
109
112
  #### **Phase 3: Task Generation**
110
- 1. **Synthesize**: Combine [PRD Requirements] + [Codebase Patterns].
111
- 2. **Draft Tasks**: Create tasks that specify *exactly* what to change in the code.
112
- 3. **Create `tasks.md`**: Use the format in "Task Format Reference".
113
- 4. **Save to**: `.clavix/outputs/[project-name]/tasks.md`.
113
+ 1. **Synthesize**: Combine [PRD Requirements] + [Codebase Patterns] + [Architecture Decisions].
114
+ 2. **Prioritize Structure**: Ensure initial tasks cover any necessary architectural setup (e.g., creating folders for new layers, setting up base classes).
115
+ 3. **Draft Tasks**: Create tasks that specify *exactly* what to change in the code.
116
+ 4. **Create `tasks.md`**: Use the format in "Task Format Reference".
117
+ 5. **Save to**: `.clavix/outputs/[project-name]/tasks.md`.
114
118
 
115
119
  ### Part B: Behavioral Guidance (Technical Specificity)
116
120
 
117
121
  **Your goal is "Low-Level Engineering Plans", not "High-Level Management Plans".**
118
122
 
119
- 1. **Specific File Paths**:
123
+ 1. **Architecture First**:
124
+ - If the PRD specifies a pattern (e.g., Repository), the first tasks MUST set up that structure.
125
+ - **Bad**: "Implement user feature."
126
+ - **Good**: "Create `src/repositories/UserRepository.ts` interface first, then implementation."
127
+
128
+ 2. **Specific File Paths**:
120
129
  - **Bad**: "Create a user profile component."
121
130
  - **Good**: "Create `src/components/user/UserProfile.tsx`. Export as default."
122
131
 
123
- 2. **Technical Constraints**:
132
+ 3. **Technical Constraints**:
124
133
  - **Bad**: "Add validation."
125
134
  - **Good**: "Use `zod` schema in `src/schemas/user.ts`. Integrate with `react-hook-form`."
126
135
 
127
- 3. **Respect Existing Architecture**:
136
+ 4. **Respect Existing Architecture**:
128
137
  - If the project uses a `services/` folder for API calls, do **not** put `fetch` calls directly in components.
129
138
  - If the project uses `shadcn/ui`, instruct to use those primitives, not raw HTML.
130
139
 
131
- 4. **Granularity**:
140
+ 5. **Granularity**:
132
141
  - Each task should be a single logical unit of work (approx. 20-40 mins).
133
142
  - Separate "Backend API" from "Frontend UI" tasks.
134
143
  - Separate "Type Definition" from "Implementation" if complex.
@@ -148,6 +157,7 @@ Implementation: BLOCKED - I will create the plan, not the code
148
157
 
149
158
  ## Technical Context & Standards
150
159
  *Detected Stack & Patterns*
160
+ - **Architecture**: {e.g., Feature-Sliced Design, Monolith}
151
161
  - **Framework**: {e.g., Next.js 14 App Router}
152
162
  - **Styling**: {e.g., Tailwind CSS + shadcn/ui}
153
163
  - **State**: {e.g., Zustand (stores in /src/store)}
@@ -219,7 +229,7 @@ Present the plan and ask:
219
229
 
220
230
  ---
221
231
 
222
- ## Agent Transparency (v5.8.1)
232
+ ## Agent Transparency (v5.9.0)
223
233
 
224
234
  ### Agent Manual (Universal Protocols)
225
235
  {{INCLUDE:agent-protocols/AGENT_MANUAL.md}}
@@ -87,6 +87,8 @@ Both documents are automatically validated for quality (Clarity, Structure, Comp
87
87
 
88
88
  ## Instructions
89
89
 
90
+ **Before beginning:** Use the Clarifying Questions Protocol (see Agent Transparency section) when you need critical information from the user (confidence < 95%). For PRD development, this means confirming ambiguous project scope, technical requirements, or feature priorities.
91
+
90
92
  1. Guide the user through these strategic questions, **one at a time** with validation:
91
93
 
92
94
  **Question 1**: What are we building and why? (Problem + goal in 2-3 sentences)
@@ -123,6 +125,11 @@ Both documents are automatically validated for quality (Clarity, Structure, Comp
123
125
  - "Are there performance requirements (load time, concurrent users)?"
124
126
  - **If "I don't know"**: Suggest common stacks based on project type or skip
125
127
 
128
+ **Question 3.5**: Any specific architectural patterns or design choices?
129
+
130
+ - **Optional**
131
+ - **Prompt**: "Do you have preferences for folder structure, design patterns (e.g., Repository, Adapter), or architectural style (Monolith vs Microservices)?"
132
+
126
133
  **Question 4**: What is explicitly OUT of scope? (What are we NOT building?)
127
134
 
128
135
  - **Validation**: At least 1 explicit exclusion
@@ -134,7 +141,7 @@ Both documents are automatically validated for quality (Clarity, Structure, Comp
134
141
 
135
142
  **Question 5**: Any additional context or requirements?
136
143
 
137
- - **Optional**: Press Enter to skip
144
+ - **Optional**
138
145
  - **Helpful areas**: Compliance needs, accessibility, localization, deadlines, team constraints
139
146
 
140
147
  2. **Before proceeding to document generation**, verify minimum viable answers:
@@ -159,6 +166,9 @@ Both documents are automatically validated for quality (Clarity, Structure, Comp
159
166
  ### Technical Requirements
160
167
  [User's answer to Q3, detailed]
161
168
 
169
+ ### Architecture & Design
170
+ [User's answer to Q3.5 if provided]
171
+
162
172
  ## Out of Scope
163
173
  [User's answer to Q4]
164
174
 
@@ -344,7 +354,7 @@ The validation ensures generated PRDs are immediately usable for AI consumption
344
354
 
345
355
  ---
346
356
 
347
- ## Agent Transparency (v5.8.1)
357
+ ## Agent Transparency (v5.9.0)
348
358
 
349
359
  ### Agent Manual (Universal Protocols)
350
360
  {{INCLUDE:agent-protocols/AGENT_MANUAL.md}}
@@ -415,7 +415,7 @@ I'll update the PRD and add this to the refinement history. Confirm?
415
415
 
416
416
  ---
417
417
 
418
- ## Agent Transparency (v5.8.1)
418
+ ## Agent Transparency (v5.9.0)
419
419
 
420
420
  ### Agent Manual (Universal Protocols)
421
421
  {{INCLUDE:agent-protocols/AGENT_MANUAL.md}}
@@ -79,6 +79,8 @@ Implementation: BLOCKED - I will ask questions and explore needs, not implement
79
79
 
80
80
  ## Instructions
81
81
 
82
+ **Before beginning:** Use the Clarifying Questions Protocol (see Agent Transparency section) throughout the conversation when you need critical information from the user (confidence < 95%). In conversational mode, this means probing for unclear requirements, technical constraints, or user needs.
83
+
82
84
  1. Begin with a friendly introduction:
83
85
  ```
84
86
  I'm starting Clavix conversational mode for requirements gathering.
@@ -96,6 +98,7 @@ Implementation: BLOCKED - I will ask questions and explore needs, not implement
96
98
  2. As the user describes their needs:
97
99
  - Ask clarifying questions about unclear points
98
100
  - Probe for technical constraints
101
+ - Probe for architectural preferences (e.g., 'Do you need a specific structure like Clean Architecture, Microservices, or Feature-Sliced Design?')
99
102
  - Explore edge cases and requirements
100
103
  - Help them think through user needs
101
104
  - Identify potential challenges
@@ -115,6 +118,7 @@ Implementation: BLOCKED - I will ask questions and explore needs, not implement
115
118
  - Target users
116
119
  - Core features
117
120
  - Technical requirements
121
+ - Architecture & Design
118
122
  - Success criteria
119
123
  - Constraints and scope
120
124
 
@@ -226,7 +230,7 @@ The goal is natural exploration of requirements, not a rigid questionnaire. Foll
226
230
 
227
231
  ---
228
232
 
229
- ## Agent Transparency (v5.8.1)
233
+ ## Agent Transparency (v5.9.0)
230
234
 
231
235
  ### Agent Manual (Universal Protocols)
232
236
  {{INCLUDE:agent-protocols/AGENT_MANUAL.md}}
@@ -80,6 +80,8 @@ Implementation: BLOCKED - I will extract requirements, not implement them
80
80
 
81
81
  ## Instructions
82
82
 
83
+ **Before beginning:** Use the Clarifying Questions Protocol (see Agent Transparency section) when you need critical information from the user (confidence < 95%). For summarization, this means asking for missing context, unclear requirements, or ambiguous technical specifications before extraction.
84
+
83
85
  1. **Pre-Extraction Validation** - Check conversation completeness:
84
86
 
85
87
  **CHECKPOINT:** Pre-extraction validation started
@@ -113,6 +115,7 @@ Implementation: BLOCKED - I will extract requirements, not implement them
113
115
  - **Problem/Goal** [confidence]: What is the user trying to build or solve?
114
116
  - **Key Requirements** [confidence per requirement]: What features and functionality were discussed?
115
117
  - **Technical Constraints** [confidence]: Any technologies, integrations, or performance needs?
118
+ - **Architecture & Design** [confidence]: Any specific patterns, structures, or design choices?
116
119
  - **User Needs** [confidence]: Who are the end users and what do they need?
117
120
  - **Success Criteria** [confidence]: How will success be measured?
118
121
  - **Context** [confidence]: Any important background or constraints?
@@ -195,6 +198,11 @@ Implementation: BLOCKED - I will extract requirements, not implement them
195
198
  - **Integrations:** [External systems]
196
199
  - **Other:** [Any other technical constraints]
197
200
 
201
+ ## Architecture & Design
202
+ - **Pattern:** [e.g. Monolith, Microservices, Serverless]
203
+ - **Structure:** [e.g. Feature-based, Layered, Clean Architecture]
204
+ - **Key Decisions:** [Specific design choices made]
205
+
198
206
  ## User Context
199
207
  **Target Users:** [Who will use this?]
200
208
  **Primary Use Case:** [Main problem being solved]
@@ -401,7 +409,7 @@ The `/clavix:summarize` command extracts requirements from exploratory conversat
401
409
 
402
410
  ---
403
411
 
404
- ## Agent Transparency (v5.8.1)
412
+ ## Agent Transparency (v5.9.0)
405
413
 
406
414
  ### Agent Manual (Universal Protocols)
407
415
  {{INCLUDE:agent-protocols/AGENT_MANUAL.md}}
@@ -123,7 +123,7 @@ Implementation: BLOCKED - I'll analyze and report, not modify or fix
123
123
 
124
124
  ----
125
125
 
126
- ## Agent Transparency (v5.8.1)
126
+ ## Agent Transparency (v5.9.0)
127
127
 
128
128
  ### Agent Manual (Universal Protocols)
129
129
  {{INCLUDE:agent-protocols/AGENT_MANUAL.md}}
@@ -10,6 +10,7 @@ Core protocols that all AI agents must follow. Shared across most commands.
10
10
  | Component | Purpose | Used By |
11
11
  |-----------|---------|---------|
12
12
  | `AGENT_MANUAL.md` | Universal protocols (transparency, mode identification, communication patterns) | All 9 commands |
13
+ | `clarifying-questions.md` | Systematic protocol for asking clarifying questions (95% confidence threshold) | improve, prd, plan, start, summarize |
13
14
  | `cli-reference.md` | CLI command reference including removed commands table | improve, prd, plan, implement, verify, archive |
14
15
  | `state-awareness.md` | Workflow state detection (mid-PRD, mid-implementation, etc.) | prd, plan, implement, summarize |
15
16
  | `state-assertion.md` | Required mode assertion output (MODE, Purpose, Implementation status) | Available for all commands |
@@ -46,12 +47,12 @@ Recovery patterns for common agent issues.
46
47
 
47
48
  | Command | Components Used |
48
49
  |---------|----------------|
49
- | `/clavix:improve` | AGENT_MANUAL, cli-reference, improvement-explanations, quality-dimensions, escalation-factors, pattern-impact |
50
- | `/clavix:prd` | AGENT_MANUAL, prd-examples, quality-dimensions, state-awareness, cli-reference |
51
- | `/clavix:plan` | AGENT_MANUAL, state-awareness, cli-reference, vibecoder-recovery |
50
+ | `/clavix:improve` | AGENT_MANUAL (includes clarifying-questions), cli-reference, improvement-explanations, quality-dimensions, escalation-factors, pattern-impact |
51
+ | `/clavix:prd` | AGENT_MANUAL (includes clarifying-questions), prd-examples, quality-dimensions, state-awareness, cli-reference |
52
+ | `/clavix:plan` | AGENT_MANUAL (includes clarifying-questions), state-awareness, cli-reference, vibecoder-recovery |
52
53
  | `/clavix:implement` | AGENT_MANUAL, state-awareness, task-blocking, cli-reference, vibecoder-recovery |
53
- | `/clavix:start` | AGENT_MANUAL, supportive-companion, conversation-examples, vibecoder-recovery |
54
- | `/clavix:summarize` | AGENT_MANUAL, improvement-explanations, quality-dimensions, state-awareness, vibecoder-recovery |
54
+ | `/clavix:start` | AGENT_MANUAL (includes clarifying-questions), supportive-companion, conversation-examples, vibecoder-recovery |
55
+ | `/clavix:summarize` | AGENT_MANUAL (includes clarifying-questions), improvement-explanations, quality-dimensions, state-awareness, vibecoder-recovery |
55
56
  | `/clavix:refine` | AGENT_MANUAL, cli-reference, quality-dimensions, state-awareness |
56
57
  | `/clavix:verify` | AGENT_MANUAL, cli-reference, vibecoder-recovery |
57
58
  | `/clavix:archive` | AGENT_MANUAL, cli-reference, vibecoder-recovery |
@@ -268,6 +268,12 @@ Each Clavix command has a specific mode. Stay within your mode:
268
268
 
269
269
  ---
270
270
 
271
+ ## Clarifying Questions Protocol
272
+
273
+ {{INCLUDE:agent-protocols/clarifying-questions.md}}
274
+
275
+ ---
276
+
271
277
  ## Verification Block Template
272
278
 
273
279
  At the end of workflows that produce output, include verification:
@@ -0,0 +1,99 @@
1
+ # Clarifying Questions Protocol
2
+
3
+ When the user's request requires critical information to proceed correctly, use this protocol to gather necessary details systematically.
4
+
5
+ ## When to Ask Clarifying Questions
6
+
7
+ Ask clarifying questions when:
8
+ - **Critical ambiguity exists** - The request has multiple valid interpretations that lead to substantially different outcomes
9
+ - **Missing essential context** - Information necessary to complete the task successfully is absent
10
+ - **Technical specifications needed** - Specific versions, paths, identifiers, or constraints are required
11
+ - **User choice required** - Multiple valid approaches exist and the user's preference is needed
12
+
13
+ **Do NOT ask clarifying questions when:**
14
+ - The information is trivial or easily inferred from context
15
+ - You can make a reasonable default assumption and mention it
16
+ - The question would slow down obviously simple tasks
17
+ - You're seeking perfection rather than addressing genuine ambiguity
18
+
19
+ ## Question Format
20
+
21
+ Use this structured format for maximum clarity and efficiency:
22
+
23
+ ### a. Multiple Choice Questions
24
+
25
+ When presenting options, use clear labels and make selection easy:
26
+
27
+ **Question:** [Your question here]
28
+
29
+ **Options:**
30
+ - **a.** First option - brief explanation
31
+ - **b.** Second option - brief explanation
32
+ - **c.** Third option - brief explanation
33
+
34
+ **Please respond with your choice (e.g., 'a' or 'option a').**
35
+
36
+ ### b. Custom Input Questions
37
+
38
+ When you need specific information not in a predefined list:
39
+
40
+ **Question:** [Your question here]
41
+
42
+ **Please provide:** [Clear description of what format/content you need]
43
+
44
+ **Example:** [Show an example of valid input]
45
+
46
+ ## Confidence Threshold
47
+
48
+ **Ask clarifying questions when confidence < 95%**
49
+
50
+ If you're 95%+ confident you understand the user's intent and have the necessary information, proceed without asking. If confidence is below 95%, stop and ask.
51
+
52
+ ## Best Practices
53
+
54
+ 1. **Ask questions sequentially** - Don't overwhelm with multiple questions at once unless they're tightly related
55
+ 2. **Explain why you're asking** - Briefly state what the answer will help you determine
56
+ 3. **Limit options** - Present 2-4 options maximum for choice questions
57
+ 4. **Make defaults clear** - If there's a sensible default, state it and ask for confirmation
58
+ 5. **Batch related questions** - If multiple questions are interdependent, present them together
59
+
60
+ ## Examples
61
+
62
+ ### Good: Clear Multiple Choice
63
+ > I need to know where to save the configuration file to proceed correctly.
64
+ >
65
+ > **Options:**
66
+ > - **a.** Project root (recommended for project-specific configs)
67
+ > - **b.** Home directory (for user-wide settings)
68
+ > - **c.** Custom path (you specify)
69
+ >
70
+ > **Please respond with your choice (e.g., 'a').**
71
+
72
+ ### Good: Custom Input with Context
73
+ > To generate the migration script, I need the database schema version.
74
+ >
75
+ > **Please provide:** The current schema version number (e.g., "2.1.0" or "v3.4")
76
+ >
77
+ > If you're unsure, you can check with: `npm run db:version`
78
+
79
+ ### Bad: Unnecessary Question
80
+ > ❌ "Do you want me to use good coding practices?"
81
+ >
82
+ > (This is always implied - just do it)
83
+
84
+ ### Bad: Analysis Paralysis
85
+ > ❌ "Should I use const or let for this variable?"
86
+ >
87
+ > (This is implementation detail - decide yourself based on best practices)
88
+
89
+ ## Recovery Pattern
90
+
91
+ If you realize you should have asked clarifying questions AFTER starting:
92
+
93
+ 1. **STOP** the current approach
94
+ 2. **EXPLAIN** what you discovered that requires clarification
95
+ 3. **ASK** the necessary questions
96
+ 4. **RESUME** with the correct approach once answered
97
+
98
+ **Example:**
99
+ > I apologize - I started implementing the auth flow but realized I need to clarify which authentication method you want to use. Are we implementing: (a) JWT tokens, (b) Session-based auth, or (c) OAuth2?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavix",
3
- "version": "5.8.1",
3
+ "version": "5.9.0",
4
4
  "description": "Agentic-first prompt workflows. Markdown templates that teach AI agents how to optimize prompts, create PRDs, and manage implementation.\n\nSLASH COMMANDS (in your AI assistant):\n /clavix:improve Optimize prompts with auto-depth\n /clavix:prd Generate PRD through questions\n /clavix:plan Create task breakdown from PRD\n /clavix:implement Execute tasks with progress tracking\n /clavix:start Begin conversational session\n /clavix:summarize Extract requirements from conversation\n /clavix:refine Refine existing PRD or prompt\n /clavix:verify Verify implementation against requirements\n /clavix:archive Archive completed projects\n\nWorks with Claude Code, Cursor, Windsurf, and 20 AI coding tools.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",