context-first-cli 2.0.3 → 2.0.4
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/templates/commands/en/products/refine.md +124 -149
- package/dist/templates/commands/es/products/refine.md +124 -149
- package/dist/templates/commands/pt-BR/products/refine.md +124 -149
- package/package.json +1 -1
- package/templates/commands/en/products/refine.md +124 -149
- package/templates/commands/es/products/refine.md +124 -149
- package/templates/commands/pt-BR/products/refine.md +124 -149
|
@@ -1,209 +1,182 @@
|
|
|
1
1
|
# Requirements Refinement
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
You are a product expert responsible for helping to refine requirements for the project.
|
|
4
4
|
|
|
5
5
|
## ⚠️ IMPORTANT: This Command DOES NOT Implement Code
|
|
6
6
|
|
|
7
|
-
**This command is ONLY for
|
|
8
|
-
- ✅
|
|
9
|
-
- ✅
|
|
10
|
-
- ✅
|
|
7
|
+
**This command is ONLY for planning and documentation:**
|
|
8
|
+
- ✅ Validate requirements against metaspecs
|
|
9
|
+
- ✅ Create refined specification
|
|
10
|
+
- ✅ Save documentation in `.sessions/`
|
|
11
|
+
- ✅ Update issue in task manager
|
|
11
12
|
- ❌ **DO NOT implement code**
|
|
12
13
|
- ❌ **DO NOT edit code files**
|
|
13
|
-
- ❌ **DO NOT
|
|
14
|
-
- ❌ **DO NOT make commits**
|
|
14
|
+
- ❌ **DO NOT run tests or deploy**
|
|
15
15
|
|
|
16
|
-
**Next step**: `/spec [ISSUE-ID]` to create
|
|
16
|
+
**Next step**: `/spec [ISSUE-ID]` to create a complete PRD based on the refined requirements.
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## Objective
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
- Project context will be loaded automatically (see "Load MetaSpecs" section below)
|
|
22
|
+
Transform an initial requirement into a refined and validated specification, ready to become a complete PRD.
|
|
24
23
|
|
|
25
|
-
##
|
|
24
|
+
## Process
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
- Exact scope (what is included and what is not)
|
|
29
|
-
- Clear acceptance criteria
|
|
30
|
-
- Impact on each repository
|
|
31
|
-
- Technical dependencies
|
|
32
|
-
- Risks and constraints
|
|
26
|
+
### 1. Clarification Phase
|
|
33
27
|
|
|
34
|
-
|
|
28
|
+
Read the initial requirement and ask questions to achieve full clarity about:
|
|
29
|
+
- **Objective**: Why build this?
|
|
30
|
+
- **Business Value**: Which metric/persona does it impact?
|
|
31
|
+
- **Scope**: What is included and what is NOT included?
|
|
32
|
+
- **Interactions**: Which existing features/components are affected?
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
Keep asking questions until you have full understanding.
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
### 2. Validation Against Metaspecs
|
|
39
37
|
|
|
40
|
-
|
|
41
|
-
- Use the appropriate MCP to fetch the issue:
|
|
42
|
-
- `task_management_system=jira`: Use Jira MCP
|
|
43
|
-
- `task_management_system=linear`: Use Linear MCP
|
|
44
|
-
- `task_management_system=github`: Use GitHub MCP
|
|
45
|
-
- Load all issue data (title, description, labels, etc.)
|
|
38
|
+
**IMPORTANT**: First read `ai.properties.md` to obtain the `base_path`. The indexes should ALREADY be in context (you ran `/warm-up`). Consult the indexes and read ONLY the relevant documents to validate the requirement.
|
|
46
39
|
|
|
47
|
-
**
|
|
40
|
+
**Validation Process**:
|
|
48
41
|
|
|
49
|
-
|
|
50
|
-
-
|
|
42
|
+
1. **Consult the indexes loaded** by `/warm-up`:
|
|
43
|
+
- Read `context-manifest.json` to find the repository with `role: "metaspecs"`
|
|
44
|
+
- Obtain the `id` of that repository (e.g., "my-project-metaspecs")
|
|
45
|
+
- Read `ai.properties.md` to get the `base_path`
|
|
46
|
+
- The metaspecs repository is at: `{base_path}/{metaspecs-id}/`
|
|
47
|
+
- Consult `{base_path}/{metaspecs-id}/index.md` - Project overview
|
|
48
|
+
- Consult specific indexes (e.g., `specs/business/index.md`, `specs/technical/index.md`)
|
|
51
49
|
|
|
52
|
-
|
|
50
|
+
2. **Identify relevant documents** for this specific requirement:
|
|
51
|
+
- In `specs/business/`: Which business documents are relevant?
|
|
52
|
+
- In `specs/technical/`: Which technical documents are relevant?
|
|
53
53
|
|
|
54
|
-
**
|
|
55
|
-
1. Read `context-manifest.json` from the orchestrator
|
|
56
|
-
2. Find the repository with `"role": "metaspecs"`
|
|
57
|
-
3. Read `ai.properties.md` to get the `base_path`
|
|
58
|
-
4. The metaspecs are located at: `{base_path}/{metaspecs-repo-id}/`
|
|
59
|
-
5. Read relevant `index.md` files to understand:
|
|
60
|
-
- System architecture
|
|
61
|
-
- Design patterns
|
|
62
|
-
- Technical constraints
|
|
63
|
-
- Project conventions
|
|
54
|
+
3. **Read ONLY the identified relevant documents** (do not read everything!)
|
|
64
55
|
|
|
65
|
-
|
|
56
|
+
4. **Validate the requirement** against the read metaspecs:
|
|
57
|
+
- ✅ Alignment with product strategy and vision
|
|
58
|
+
- ✅ Meets needs of the correct personas
|
|
59
|
+
- ✅ Compatible with approved technology stack
|
|
60
|
+
- ✅ Respects architectural decisions (ADRs)
|
|
61
|
+
- ✅ Follows existing business rules
|
|
62
|
+
- ⚠️ Identify conflicts or violations
|
|
66
63
|
|
|
67
|
-
|
|
64
|
+
**If violations are identified**: 🛑 **STOP** and ask the user for clarification before proceeding (Jidoka Principle).
|
|
68
65
|
|
|
69
|
-
|
|
70
|
-
- Specific functionalities to be implemented
|
|
71
|
-
- Repositories that will be modified
|
|
72
|
-
- Necessary integrations
|
|
66
|
+
### 3. Summary and Approval Phase
|
|
73
67
|
|
|
74
|
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
68
|
+
Once you have gathered sufficient information and validated against metaspecs, present a structured summary with:
|
|
69
|
+
- **Feature**: Feature name
|
|
70
|
+
- **Objective**: Why build it (1-2 sentences)
|
|
71
|
+
- **Business Value**: Metric, persona, roadmap phase (consult metaspecs)
|
|
72
|
+
- **Scope**: What INCLUDES and what DOES NOT INCLUDE
|
|
73
|
+
- **Affected Components**: List based on current architecture (consult technical metaspecs)
|
|
74
|
+
- **Validation against Metaspecs**: ✅ Approved / ⚠️ Attention needed
|
|
78
75
|
|
|
79
|
-
|
|
76
|
+
Request user approval and incorporate feedback if necessary.
|
|
80
77
|
|
|
81
|
-
|
|
78
|
+
**Tip**: You may research the codebase or internet before finalizing, if needed.
|
|
82
79
|
|
|
83
|
-
|
|
84
|
-
## Acceptance Criteria
|
|
80
|
+
### 4. Saving the Refined Requirements
|
|
85
81
|
|
|
86
|
-
|
|
87
|
-
- [ ] [Criterion 1 - specific and testable]
|
|
88
|
-
- [ ] [Criterion 2 - specific and testable]
|
|
82
|
+
Once the user approves, save the requirements:
|
|
89
83
|
|
|
90
|
-
|
|
91
|
-
- [ ] [Technical criterion 1]
|
|
92
|
-
- [ ] [Technical criterion 2]
|
|
84
|
+
**IMPORTANT**: Always create a local backup AND update the task manager (if configured).
|
|
93
85
|
|
|
94
|
-
|
|
95
|
-
- [ ] Unit tests implemented
|
|
96
|
-
- [ ] Integration tests implemented
|
|
97
|
-
- [ ] Documentation updated
|
|
98
|
-
```
|
|
86
|
+
**Saving Process**:
|
|
99
87
|
|
|
100
|
-
|
|
88
|
+
1. **ALWAYS create local backup first**:
|
|
89
|
+
- Create a complete file at `./.sessions/<ISSUE-ID>/refined.md` (e.g., `./.sessions/FIN-5/refined.md`)
|
|
90
|
+
- Where `<ISSUE-ID>` is the issue ID (e.g., FIN-5, FIN-123)
|
|
91
|
+
- Include ALL refinement details (complete backup)
|
|
101
92
|
|
|
102
|
-
|
|
93
|
+
2. **If task manager is configured** (read `ai.properties.md` to identify `task_management_system`):
|
|
94
|
+
- Identify the MCP tool of the task manager
|
|
95
|
+
- **Update the BODY (description) of the issue** with a CONCISE version of the refined requirements
|
|
96
|
+
- For Jira: Use Jira MCP with `description` field
|
|
97
|
+
- For Linear: Use Linear MCP with `description` field
|
|
98
|
+
- For GitHub: Use GitHub MCP with `body` field
|
|
99
|
+
- **IMPORTANT**: Create a SUMMARY version (max 3000 words) to avoid API limits
|
|
100
|
+
- Include link to local file at the end: "Full document: `.sessions/<ISSUE-ID>/refined.md`"
|
|
101
|
+
- **ALWAYS overwrite** the existing body (do not append)
|
|
103
102
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
### <repo-1>
|
|
108
|
-
- **Affected components**: [list]
|
|
109
|
-
- **Type of change**: New feature / Modification / Refactoring
|
|
110
|
-
- **Estimated complexity**: Low / Medium / High
|
|
111
|
-
- **Risks**: [specific risks]
|
|
112
|
-
|
|
113
|
-
### <repo-2>
|
|
114
|
-
- **Affected components**: [list]
|
|
115
|
-
- **Type of change**: New feature / Modification / Refactoring
|
|
116
|
-
- **Estimated complexity**: Low / Medium / High
|
|
117
|
-
- **Risks**: [specific risks]
|
|
118
|
-
```
|
|
103
|
+
**Note**:
|
|
104
|
+
- The local backup is ALWAYS saved and complete
|
|
105
|
+
- If API error occurs, manually verify if the issue was updated in the task manager
|
|
119
106
|
|
|
120
|
-
|
|
107
|
+
**Output Template**:
|
|
121
108
|
|
|
122
|
-
|
|
123
|
-
- Dependencies between repositories
|
|
124
|
-
- Dependencies on other features/issues
|
|
125
|
-
- Technical constraints
|
|
126
|
-
- Business constraints
|
|
127
|
-
- Known blockers
|
|
109
|
+
**IMPORTANT**: The default template for refined requirements may be documented in the metaspecs repository. Check `{base_path}/{metaspecs-id}/specs/refined/` or similar.
|
|
128
110
|
|
|
129
|
-
|
|
111
|
+
**FULL Template** (for local backup `.sessions/<ISSUE-ID>/refined.md`):
|
|
112
|
+
- **Metadata**: Issue, ID, Task Manager, Project, Date, Sprint, Priority
|
|
113
|
+
- **🎯 WHY**: Reasons, business value, metric, persona, strategic alignment
|
|
114
|
+
- **📦 WHAT**: Detailed features, affected components, integrations, full negative scope
|
|
115
|
+
- **🔧 HOW**: Stack, coding standards, file structure, dependencies, implementation order, failure modes, performance/cost/UX considerations
|
|
116
|
+
- **✅ Validation against Metaspecs**: Consulted documents (business and technical), verified ADRs, validation result
|
|
117
|
+
- **📊 Success Metrics**: Technical, product/UX, acceptance criteria
|
|
118
|
+
- **🔄 Product Impact**: Alignment with goals, enablers, mitigated risks
|
|
119
|
+
- **⚠️ Known Limitations**: MVP limitations
|
|
120
|
+
- **📝 Implementation Checklist**: Tasks by area (backend, frontend, testing, security, etc.)
|
|
130
121
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
- **Large**: 3-5 days
|
|
135
|
-
- **Very Large**: > 5 days (consider breaking into smaller issues)
|
|
122
|
+
**SUMMARY Template** (for task manager - max 3000 words):
|
|
123
|
+
```markdown
|
|
124
|
+
# [Feature Name] - Refined Requirements
|
|
136
125
|
|
|
137
|
-
|
|
126
|
+
**Sprint X** | **Y days** | **Priority**
|
|
138
127
|
|
|
139
|
-
|
|
128
|
+
## Objective
|
|
129
|
+
[1-2 paragraphs: what it is and why do it]
|
|
140
130
|
|
|
141
|
-
##
|
|
131
|
+
## Scope
|
|
142
132
|
|
|
143
|
-
|
|
133
|
+
### Main Features
|
|
134
|
+
- Feature 1: [summary]
|
|
135
|
+
- Feature 2: [summary]
|
|
136
|
+
- Validations/Guards: [summary]
|
|
144
137
|
|
|
145
|
-
|
|
146
|
-
-
|
|
147
|
-
-
|
|
148
|
-
- Add estimate if supported by the task manager
|
|
149
|
-
- Inform the user: "✅ Issue [ID] updated with refinement"
|
|
138
|
+
### Affected Components
|
|
139
|
+
- Component 1: [type of change]
|
|
140
|
+
- Component 2: [type of change]
|
|
150
141
|
|
|
151
|
-
|
|
142
|
+
### Security
|
|
143
|
+
✅ [item 1] ✅ [item 2] ✅ [item 3]
|
|
152
144
|
|
|
153
|
-
|
|
145
|
+
## Negative Scope
|
|
146
|
+
❌ [item 1] ❌ [item 2] ❌ [item 3]
|
|
154
147
|
|
|
155
|
-
|
|
156
|
-
|
|
148
|
+
## Stack
|
|
149
|
+
[Tech stack summarized by area]
|
|
157
150
|
|
|
158
|
-
##
|
|
151
|
+
## Structure
|
|
152
|
+
[SUMMARIZED file tree - main modules only]
|
|
159
153
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
### Excluded
|
|
165
|
-
- [Item 1]
|
|
166
|
-
- [Item 2]
|
|
154
|
+
## Failure Modes (To Avoid)
|
|
155
|
+
🔴 [critical 1] 🔴 [critical 2]
|
|
156
|
+
🟡 [medium 1] 🟡 [medium 2]
|
|
167
157
|
|
|
168
158
|
## Acceptance Criteria
|
|
169
|
-
[
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
[As per section 4 above]
|
|
173
|
-
|
|
174
|
-
## Dependencies
|
|
175
|
-
- [Dependency 1]
|
|
176
|
-
- [Dependency 2]
|
|
177
|
-
|
|
178
|
-
## Constraints
|
|
179
|
-
- [Constraint 1]
|
|
180
|
-
- [Constraint 2]
|
|
159
|
+
- [ ] [item 1]
|
|
160
|
+
- [ ] [item 2]
|
|
161
|
+
- [ ] [item 3]
|
|
181
162
|
|
|
182
|
-
##
|
|
183
|
-
|
|
163
|
+
## Validation
|
|
164
|
+
**ADRs**: [list]
|
|
165
|
+
**Specs**: [main]
|
|
166
|
+
**Status**: ✅ Approved
|
|
184
167
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
2. [Question 2]
|
|
168
|
+
**Impact**: [summary]
|
|
169
|
+
**Limitations**: [summary]
|
|
188
170
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
- [Risk 2 and mitigation]
|
|
171
|
+
---
|
|
172
|
+
📄 **Full document**: `.sessions/<ISSUE-ID>/refined.md`
|
|
192
173
|
```
|
|
193
174
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
## 🔍 Validation
|
|
197
|
-
|
|
198
|
-
Validate the refinement against:
|
|
199
|
-
- Product strategy (if documented)
|
|
200
|
-
- Technical architecture (if documented)
|
|
201
|
-
- Team capacity
|
|
202
|
-
- Roadmap priorities
|
|
175
|
+
**Audience**: AI Developer with capabilities similar to yours. Be concise but complete.
|
|
203
176
|
|
|
204
177
|
---
|
|
205
178
|
|
|
206
|
-
**
|
|
179
|
+
**Requirement to Refine**:
|
|
207
180
|
|
|
208
181
|
```
|
|
209
182
|
#$ARGUMENTS
|
|
@@ -213,10 +186,12 @@ Validate the refinement against:
|
|
|
213
186
|
|
|
214
187
|
## 🎯 Next Step
|
|
215
188
|
|
|
216
|
-
After
|
|
189
|
+
**After user approval and saving the refined requirements**, the natural flow is:
|
|
217
190
|
|
|
218
191
|
```bash
|
|
219
192
|
/spec [ISSUE-ID]
|
|
220
193
|
```
|
|
221
194
|
|
|
222
|
-
|
|
195
|
+
**Example**: `/spec FIN-3`
|
|
196
|
+
|
|
197
|
+
This command will create a complete PRD (Product Requirements Document) based on the refined requirements, detailing features, user stories, acceptance criteria, and final validations.
|