context-first-cli 1.8.2 → 2.0.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/commands/create-orchestrator.d.ts.map +1 -1
- package/dist/commands/create-orchestrator.js +15 -3
- package/dist/commands/create-orchestrator.js.map +1 -1
- package/dist/commands/feature.d.ts.map +1 -1
- package/dist/commands/feature.js +33 -2
- package/dist/commands/feature.js.map +1 -1
- package/dist/commands/update-commands.d.ts.map +1 -1
- package/dist/commands/update-commands.js +42 -2
- package/dist/commands/update-commands.js.map +1 -1
- package/dist/templates/commands/en/engineer/plan.md +297 -0
- package/dist/templates/commands/en/engineer/pr.md +167 -0
- package/dist/templates/commands/en/engineer/pre-pr.md +262 -0
- package/dist/templates/commands/en/engineer/start.md +281 -0
- package/dist/templates/commands/en/engineer/work.md +197 -0
- package/dist/templates/commands/en/products/check.md +233 -0
- package/dist/templates/commands/en/products/collect.md +156 -0
- package/dist/templates/commands/en/products/refine.md +222 -0
- package/dist/templates/commands/en/products/spec.md +267 -0
- package/dist/templates/commands/en/quality/metrics.md +240 -0
- package/dist/templates/commands/en/quality/observe.md +168 -0
- package/dist/templates/commands/en/warm-up.md +78 -0
- package/dist/templates/commands/es/engineer/plan.md +297 -0
- package/dist/templates/commands/es/engineer/pr.md +167 -0
- package/dist/templates/commands/es/engineer/pre-pr.md +262 -0
- package/dist/templates/commands/es/engineer/start.md +281 -0
- package/dist/templates/commands/es/engineer/work.md +197 -0
- package/dist/templates/commands/es/products/check.md +233 -0
- package/dist/templates/commands/es/products/collect.md +156 -0
- package/dist/templates/commands/es/products/refine.md +222 -0
- package/dist/templates/commands/es/products/spec.md +267 -0
- package/dist/templates/commands/es/quality/metrics.md +240 -0
- package/dist/templates/commands/es/quality/observe.md +168 -0
- package/dist/templates/commands/es/warm-up.md +78 -0
- package/dist/utils/config.d.ts +1 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js.map +1 -1
- package/package.json +1 -1
- package/templates/commands/en/engineer/plan.md +297 -0
- package/templates/commands/en/engineer/pr.md +167 -0
- package/templates/commands/en/engineer/pre-pr.md +262 -0
- package/templates/commands/en/engineer/start.md +281 -0
- package/templates/commands/en/engineer/work.md +197 -0
- package/templates/commands/en/products/check.md +233 -0
- package/templates/commands/en/products/collect.md +156 -0
- package/templates/commands/en/products/refine.md +222 -0
- package/templates/commands/en/products/spec.md +267 -0
- package/templates/commands/en/quality/metrics.md +240 -0
- package/templates/commands/en/quality/observe.md +168 -0
- package/templates/commands/en/warm-up.md +78 -0
- package/templates/commands/es/engineer/plan.md +297 -0
- package/templates/commands/es/engineer/pr.md +167 -0
- package/templates/commands/es/engineer/pre-pr.md +262 -0
- package/templates/commands/es/engineer/start.md +281 -0
- package/templates/commands/es/engineer/work.md +197 -0
- package/templates/commands/es/products/check.md +233 -0
- package/templates/commands/es/products/collect.md +156 -0
- package/templates/commands/es/products/refine.md +222 -0
- package/templates/commands/es/products/spec.md +267 -0
- package/templates/commands/es/quality/metrics.md +240 -0
- package/templates/commands/es/quality/observe.md +168 -0
- package/templates/commands/es/warm-up.md +78 -0
- package/templates/commands/pt-BR/engineer/plan.md +297 -0
- package/templates/commands/pt-BR/engineer/pr.md +167 -0
- package/templates/commands/pt-BR/engineer/pre-pr.md +262 -0
- package/templates/commands/pt-BR/engineer/start.md +281 -0
- package/templates/commands/pt-BR/engineer/work.md +197 -0
- package/templates/commands/pt-BR/products/check.md +233 -0
- package/templates/commands/pt-BR/products/collect.md +156 -0
- package/templates/commands/pt-BR/products/refine.md +222 -0
- package/templates/commands/pt-BR/products/spec.md +267 -0
- package/templates/commands/pt-BR/quality/metrics.md +240 -0
- package/templates/commands/pt-BR/quality/observe.md +168 -0
- package/templates/commands/pt-BR/warm-up.md +78 -0
- /package/{templates/commands → dist/templates/commands/pt-BR}/engineer/plan.md +0 -0
- /package/{templates/commands → dist/templates/commands/pt-BR}/engineer/pr.md +0 -0
- /package/{templates/commands → dist/templates/commands/pt-BR}/engineer/pre-pr.md +0 -0
- /package/{templates/commands → dist/templates/commands/pt-BR}/engineer/start.md +0 -0
- /package/{templates/commands → dist/templates/commands/pt-BR}/engineer/work.md +0 -0
- /package/{templates/commands → dist/templates/commands/pt-BR}/products/check.md +0 -0
- /package/{templates/commands → dist/templates/commands/pt-BR}/products/collect.md +0 -0
- /package/{templates/commands → dist/templates/commands/pt-BR}/products/refine.md +0 -0
- /package/{templates/commands → dist/templates/commands/pt-BR}/products/spec.md +0 -0
- /package/{templates/commands → dist/templates/commands/pt-BR}/quality/metrics.md +0 -0
- /package/{templates/commands → dist/templates/commands/pt-BR}/quality/observe.md +0 -0
- /package/{templates/commands → dist/templates/commands/pt-BR}/warm-up.md +0 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# Requirements Refinement
|
|
2
|
+
|
|
3
|
+
This command refines a collected issue, transforming it into clear and validated requirements.
|
|
4
|
+
|
|
5
|
+
## ⚠️ IMPORTANT: This Command DOES NOT Implement Code
|
|
6
|
+
|
|
7
|
+
**This command is ONLY for requirements refinement:**
|
|
8
|
+
- ✅ Refine and validate requirements
|
|
9
|
+
- ✅ Update issue in the task manager via MCP
|
|
10
|
+
- ✅ **READ** files from main repositories (read-only)
|
|
11
|
+
- ❌ **DO NOT implement code**
|
|
12
|
+
- ❌ **DO NOT edit code files**
|
|
13
|
+
- ❌ **DO NOT checkout branches in main repositories**
|
|
14
|
+
- ❌ **DO NOT make commits**
|
|
15
|
+
|
|
16
|
+
**Next step**: `/spec [ISSUE-ID]` to create the complete specification (PRD).
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 📋 Prerequisites
|
|
21
|
+
|
|
22
|
+
- Issue already collected via `/collect`
|
|
23
|
+
- Project context will be loaded automatically (see "Load MetaSpecs" section below)
|
|
24
|
+
|
|
25
|
+
## 🎯 Objective
|
|
26
|
+
|
|
27
|
+
Refine the collected issue, clarifying:
|
|
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
|
|
33
|
+
|
|
34
|
+
## 📝 Refinement Process
|
|
35
|
+
|
|
36
|
+
### 1. Load Issue
|
|
37
|
+
|
|
38
|
+
**PRIORITY 1: Use MCP (Model Context Protocol)**
|
|
39
|
+
|
|
40
|
+
- Read `ai.properties.md` from the orchestrator to identify the `task_management_system`
|
|
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.)
|
|
46
|
+
|
|
47
|
+
**FALLBACK: If MCP is unavailable or fails**
|
|
48
|
+
|
|
49
|
+
- Read `./.sessions/<ISSUE-ID>/collect.md`
|
|
50
|
+
- If the file does not exist, inform the user of the error
|
|
51
|
+
|
|
52
|
+
### 2. Load MetaSpecs
|
|
53
|
+
|
|
54
|
+
**Automatically locate MetaSpecs**:
|
|
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
|
|
64
|
+
|
|
65
|
+
### 3. Scope Analysis
|
|
66
|
+
|
|
67
|
+
Clearly define:
|
|
68
|
+
|
|
69
|
+
**What IS in scope**:
|
|
70
|
+
- Specific functionalities to be implemented
|
|
71
|
+
- Repositories that will be modified
|
|
72
|
+
- Necessary integrations
|
|
73
|
+
|
|
74
|
+
**What IS NOT in scope**:
|
|
75
|
+
- Related functionalities deferred for later
|
|
76
|
+
- Future optimizations
|
|
77
|
+
- "Nice to have" features
|
|
78
|
+
|
|
79
|
+
### 4. Acceptance Criteria
|
|
80
|
+
|
|
81
|
+
Define measurable and testable criteria:
|
|
82
|
+
|
|
83
|
+
```markdown
|
|
84
|
+
## Acceptance Criteria
|
|
85
|
+
|
|
86
|
+
### Functional
|
|
87
|
+
- [ ] [Criterion 1 - specific and testable]
|
|
88
|
+
- [ ] [Criterion 2 - specific and testable]
|
|
89
|
+
|
|
90
|
+
### Technical
|
|
91
|
+
- [ ] [Technical criterion 1]
|
|
92
|
+
- [ ] [Technical criterion 2]
|
|
93
|
+
|
|
94
|
+
### Quality
|
|
95
|
+
- [ ] Unit tests implemented
|
|
96
|
+
- [ ] Integration tests implemented
|
|
97
|
+
- [ ] Documentation updated
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### 5. Impact Analysis
|
|
101
|
+
|
|
102
|
+
For each affected repository:
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
## Impact by Repository
|
|
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
|
+
```
|
|
119
|
+
|
|
120
|
+
### 6. Dependencies and Constraints
|
|
121
|
+
|
|
122
|
+
Identify:
|
|
123
|
+
- Dependencies between repositories
|
|
124
|
+
- Dependencies on other features/issues
|
|
125
|
+
- Technical constraints
|
|
126
|
+
- Business constraints
|
|
127
|
+
- Known blockers
|
|
128
|
+
|
|
129
|
+
### 7. Initial Estimate
|
|
130
|
+
|
|
131
|
+
Provide effort estimate:
|
|
132
|
+
- **Small**: < 1 day
|
|
133
|
+
- **Medium**: 1-3 days
|
|
134
|
+
- **Large**: 3-5 days
|
|
135
|
+
- **Very Large**: > 5 days (consider breaking into smaller issues)
|
|
136
|
+
|
|
137
|
+
### 8. Pending Questions
|
|
138
|
+
|
|
139
|
+
List questions that still need answers before starting implementation.
|
|
140
|
+
|
|
141
|
+
## 📄 Saving the Refinement
|
|
142
|
+
|
|
143
|
+
**PRIORITY 1: Update via MCP**
|
|
144
|
+
|
|
145
|
+
- Use the task manager MCP to update the issue
|
|
146
|
+
- Add acceptance criteria as a comment or custom field
|
|
147
|
+
- Update labels/tags if necessary (e.g., "refined", "ready-for-spec")
|
|
148
|
+
- Add estimate if supported by the task manager
|
|
149
|
+
- Inform the user: "✅ Issue [ID] updated with refinement"
|
|
150
|
+
|
|
151
|
+
**FALLBACK: Create .md file only if MCP fails**
|
|
152
|
+
|
|
153
|
+
If MCP is unavailable or fails, create/update `./.sessions/<ISSUE-ID>/refine.md`:
|
|
154
|
+
|
|
155
|
+
```markdown
|
|
156
|
+
# [Issue Title] - Refinement
|
|
157
|
+
|
|
158
|
+
## Scope
|
|
159
|
+
|
|
160
|
+
### Included
|
|
161
|
+
- [Item 1]
|
|
162
|
+
- [Item 2]
|
|
163
|
+
|
|
164
|
+
### Excluded
|
|
165
|
+
- [Item 1]
|
|
166
|
+
- [Item 2]
|
|
167
|
+
|
|
168
|
+
## Acceptance Criteria
|
|
169
|
+
[As per section 3 above]
|
|
170
|
+
|
|
171
|
+
## Impact by Repository
|
|
172
|
+
[As per section 4 above]
|
|
173
|
+
|
|
174
|
+
## Dependencies
|
|
175
|
+
- [Dependency 1]
|
|
176
|
+
- [Dependency 2]
|
|
177
|
+
|
|
178
|
+
## Constraints
|
|
179
|
+
- [Constraint 1]
|
|
180
|
+
- [Constraint 2]
|
|
181
|
+
|
|
182
|
+
## Estimate
|
|
183
|
+
[Small/Medium/Large/Very Large] - [Justification]
|
|
184
|
+
|
|
185
|
+
## Pending Questions
|
|
186
|
+
1. [Question 1]
|
|
187
|
+
2. [Question 2]
|
|
188
|
+
|
|
189
|
+
## Identified Risks
|
|
190
|
+
- [Risk 1 and mitigation]
|
|
191
|
+
- [Risk 2 and mitigation]
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Inform the user: "⚠️ Refinement saved locally in .sessions/ (task manager not available)"
|
|
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
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
**Provided arguments**:
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
#$ARGUMENTS
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## 🎯 Next Step
|
|
215
|
+
|
|
216
|
+
After approved refinement:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
/spec [ISSUE-ID]
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
This command will create the complete feature specification (PRD).
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# Specification Creation (PRD)
|
|
2
|
+
|
|
3
|
+
This command creates the complete specification (Product Requirements Document) for the feature.
|
|
4
|
+
|
|
5
|
+
## ⚠️ IMPORTANT: This Command DOES NOT Implement Code
|
|
6
|
+
|
|
7
|
+
**This command is ONLY for requirements documentation:**
|
|
8
|
+
- ✅ Create PRD (Product Requirements Document)
|
|
9
|
+
- ✅ Update issue in task manager via MCP
|
|
10
|
+
- ✅ **READ** files from main repositories (read-only)
|
|
11
|
+
- ❌ **DO NOT implement code**
|
|
12
|
+
- ❌ **DO NOT edit code files**
|
|
13
|
+
- ❌ **DO NOT checkout branches in main repositories**
|
|
14
|
+
- ❌ **DO NOT commit**
|
|
15
|
+
|
|
16
|
+
**Next step**: `/start` to begin development.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 📋 Prerequisites
|
|
21
|
+
|
|
22
|
+
- Issue refined via `/refine`
|
|
23
|
+
- Approval to proceed with the feature
|
|
24
|
+
|
|
25
|
+
## 📚 Load MetaSpecs
|
|
26
|
+
|
|
27
|
+
**Automatically locate MetaSpecs**:
|
|
28
|
+
1. Read `context-manifest.json` from the orchestrator
|
|
29
|
+
2. Find the repository with `"role": "metaspecs"`
|
|
30
|
+
3. Read `ai.properties.md` to get the `base_path`
|
|
31
|
+
4. The metaspecs are located at: `{base_path}/{metaspecs-repo-id}/`
|
|
32
|
+
5. Read the relevant `index.md` files to ensure compliance with:
|
|
33
|
+
- System architecture
|
|
34
|
+
- Design patterns
|
|
35
|
+
- Technical constraints
|
|
36
|
+
- Project conventions
|
|
37
|
+
|
|
38
|
+
## 🎯 Objective
|
|
39
|
+
|
|
40
|
+
Create a complete PRD that will serve as the single source of truth for implementation.
|
|
41
|
+
|
|
42
|
+
## 📝 PRD Structure
|
|
43
|
+
|
|
44
|
+
### 1. Overview
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
# [Feature Title]
|
|
48
|
+
|
|
49
|
+
## Context
|
|
50
|
+
[Why are we building this? What problem does it solve?]
|
|
51
|
+
|
|
52
|
+
## Objective
|
|
53
|
+
[What do we want to achieve with this feature?]
|
|
54
|
+
|
|
55
|
+
## Success Metrics
|
|
56
|
+
- [Metric 1]: [How to measure]
|
|
57
|
+
- [Metric 2]: [How to measure]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 2. Functional Requirements
|
|
61
|
+
|
|
62
|
+
```markdown
|
|
63
|
+
## Functional Requirements
|
|
64
|
+
|
|
65
|
+
### RF-01: [Requirement Name]
|
|
66
|
+
**Description**: [Detailed description]
|
|
67
|
+
**Priority**: Must Have / Should Have / Could Have
|
|
68
|
+
**Repositories**: [affected repos]
|
|
69
|
+
|
|
70
|
+
### RF-02: [Requirement Name]
|
|
71
|
+
**Description**: [Detailed description]
|
|
72
|
+
**Priority**: Must Have / Should Have / Could Have
|
|
73
|
+
**Repositories**: [affected repos]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 3. Non-Functional Requirements
|
|
77
|
+
|
|
78
|
+
```markdown
|
|
79
|
+
## Non-Functional Requirements
|
|
80
|
+
|
|
81
|
+
### Performance
|
|
82
|
+
- [Performance requirement]
|
|
83
|
+
|
|
84
|
+
### Security
|
|
85
|
+
- [Security requirement]
|
|
86
|
+
|
|
87
|
+
### Accessibility
|
|
88
|
+
- [Accessibility requirement]
|
|
89
|
+
|
|
90
|
+
### Scalability
|
|
91
|
+
- [Scalability requirement]
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 4. User Flows
|
|
95
|
+
|
|
96
|
+
```markdown
|
|
97
|
+
## User Flows
|
|
98
|
+
|
|
99
|
+
### Main Flow
|
|
100
|
+
1. [Step 1]
|
|
101
|
+
2. [Step 2]
|
|
102
|
+
3. [Step 3]
|
|
103
|
+
|
|
104
|
+
### Alternative Flows
|
|
105
|
+
**Scenario**: [Scenario name]
|
|
106
|
+
1. [Step 1]
|
|
107
|
+
2. [Step 2]
|
|
108
|
+
|
|
109
|
+
### Error Handling
|
|
110
|
+
**Error**: [Error type]
|
|
111
|
+
**Behavior**: [How the system should react]
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 5. Technical Specification
|
|
115
|
+
|
|
116
|
+
```markdown
|
|
117
|
+
## Technical Specification
|
|
118
|
+
|
|
119
|
+
### Architecture
|
|
120
|
+
|
|
121
|
+
#### <repo-1>
|
|
122
|
+
- **New components**: [list]
|
|
123
|
+
- **Modified components**: [list]
|
|
124
|
+
- **APIs**: [new/modified endpoints]
|
|
125
|
+
|
|
126
|
+
#### <repo-2>
|
|
127
|
+
- **New components**: [list]
|
|
128
|
+
- **Modified components**: [list]
|
|
129
|
+
- **APIs**: [new/modified endpoints]
|
|
130
|
+
|
|
131
|
+
### Integrations
|
|
132
|
+
- **Between repos**: [how repos communicate]
|
|
133
|
+
- **External**: [external APIs, if any]
|
|
134
|
+
|
|
135
|
+
### Data Model
|
|
136
|
+
[Describe changes to the data model, if any]
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 6. Acceptance Criteria
|
|
140
|
+
|
|
141
|
+
```markdown
|
|
142
|
+
## Acceptance Criteria
|
|
143
|
+
|
|
144
|
+
### Functional
|
|
145
|
+
- [ ] [Specific and testable criterion]
|
|
146
|
+
- [ ] [Specific and testable criterion]
|
|
147
|
+
|
|
148
|
+
### Technical
|
|
149
|
+
- [ ] Unit tests with coverage >= X%
|
|
150
|
+
- [ ] Integration tests implemented
|
|
151
|
+
- [ ] Performance within requirements
|
|
152
|
+
- [ ] Documentation updated
|
|
153
|
+
|
|
154
|
+
### Quality
|
|
155
|
+
- [ ] Code review approved
|
|
156
|
+
- [ ] No regressions
|
|
157
|
+
- [ ] Accessibility validated
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### 7. Out of Scope
|
|
161
|
+
|
|
162
|
+
```markdown
|
|
163
|
+
## Out of Scope
|
|
164
|
+
|
|
165
|
+
Features that WILL NOT be implemented in this version:
|
|
166
|
+
- [Item 1]
|
|
167
|
+
- [Item 2]
|
|
168
|
+
|
|
169
|
+
Justification: [Why these are deferred]
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### 8. Risks and Mitigations
|
|
173
|
+
|
|
174
|
+
```markdown
|
|
175
|
+
## Risks and Mitigations
|
|
176
|
+
|
|
177
|
+
### Risk 1: [Description]
|
|
178
|
+
- **Probability**: High / Medium / Low
|
|
179
|
+
- **Impact**: High / Medium / Low
|
|
180
|
+
- **Mitigation**: [How to mitigate]
|
|
181
|
+
|
|
182
|
+
### Risk 2: [Description]
|
|
183
|
+
- **Probability**: High / Medium / Low
|
|
184
|
+
- **Impact**: High / Medium / Low
|
|
185
|
+
- **Mitigation**: [How to mitigate]
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### 9. Dependencies
|
|
189
|
+
|
|
190
|
+
```markdown
|
|
191
|
+
## Dependencies
|
|
192
|
+
|
|
193
|
+
### Technical
|
|
194
|
+
- [Technical dependency 1]
|
|
195
|
+
- [Technical dependency 2]
|
|
196
|
+
|
|
197
|
+
### Business
|
|
198
|
+
- [Business dependency 1]
|
|
199
|
+
- [Business dependency 2]
|
|
200
|
+
|
|
201
|
+
### Blockers
|
|
202
|
+
- [Blocker 1 and plan to resolve]
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### 10. Test Plan
|
|
206
|
+
|
|
207
|
+
```markdown
|
|
208
|
+
## Test Plan
|
|
209
|
+
|
|
210
|
+
### Unit Tests
|
|
211
|
+
- [Area 1 to be tested]
|
|
212
|
+
- [Area 2 to be tested]
|
|
213
|
+
|
|
214
|
+
### Integration Tests
|
|
215
|
+
- [Scenario 1]
|
|
216
|
+
- [Scenario 2]
|
|
217
|
+
|
|
218
|
+
### Manual Tests
|
|
219
|
+
- [Scenario 1]
|
|
220
|
+
- [Scenario 2]
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## 📄 Saving the PRD
|
|
224
|
+
|
|
225
|
+
**PRIORITY 1: Use MCP (Model Context Protocol)**
|
|
226
|
+
|
|
227
|
+
- Read `ai.properties.md` from the orchestrator to identify the `task_management_system`
|
|
228
|
+
- Use the appropriate MCP to update the issue with the PRD:
|
|
229
|
+
- Add the complete PRD as a comment on the issue
|
|
230
|
+
- Or attach as a file (if the task manager supports it)
|
|
231
|
+
- Update status/labels (e.g., "spec-ready", "ready-for-dev")
|
|
232
|
+
- Inform the user: "✅ PRD added to issue [ID]"
|
|
233
|
+
|
|
234
|
+
**FALLBACK: Create .md file only if MCP fails**
|
|
235
|
+
|
|
236
|
+
If MCP is unavailable or fails:
|
|
237
|
+
- Save to `./.sessions/<ISSUE-ID>/prd.md`
|
|
238
|
+
- Inform the user: "⚠️ PRD saved locally in .sessions/ (task manager not available)"
|
|
239
|
+
|
|
240
|
+
## 🔍 Review and Approval
|
|
241
|
+
|
|
242
|
+
Before finishing:
|
|
243
|
+
1. Review the PRD with stakeholders
|
|
244
|
+
2. Validate against metaspecs (if available)
|
|
245
|
+
3. Obtain approval to start implementation
|
|
246
|
+
4. **Via MCP**: Update the issue in the task manager with status "Ready for Development"
|
|
247
|
+
5. **Fallback**: Document approval in `./.sessions/<ISSUE-ID>/prd.md`
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
**Provided arguments**:
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
#$ARGUMENTS
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## 🎯 Next Step
|
|
260
|
+
|
|
261
|
+
After PRD approval:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
/start
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
This command will start feature development.
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
# Quality Metrics
|
|
2
|
+
|
|
3
|
+
This command collects and analyzes quality metrics of the code and the development process.
|
|
4
|
+
|
|
5
|
+
## 🎯 Objective
|
|
6
|
+
|
|
7
|
+
Measure and document the quality of the implementation through objective metrics:
|
|
8
|
+
- Test coverage
|
|
9
|
+
- Code complexity
|
|
10
|
+
- Technical debt
|
|
11
|
+
- Performance
|
|
12
|
+
- Compliance with standards
|
|
13
|
+
|
|
14
|
+
## 📋 Prerequisites
|
|
15
|
+
|
|
16
|
+
- Implementation completed (after `/work`)
|
|
17
|
+
- Tests implemented
|
|
18
|
+
- Build working
|
|
19
|
+
|
|
20
|
+
## 📊 Metrics to Collect
|
|
21
|
+
|
|
22
|
+
### 1. Test Coverage
|
|
23
|
+
|
|
24
|
+
For each modified repository:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
cd <repositório>
|
|
28
|
+
|
|
29
|
+
# Run tests with coverage
|
|
30
|
+
npm run test:coverage # or equivalent command
|
|
31
|
+
|
|
32
|
+
# Capture results
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Document:
|
|
36
|
+
```markdown
|
|
37
|
+
## Test Coverage
|
|
38
|
+
|
|
39
|
+
### <repo-1>
|
|
40
|
+
- **Total Coverage**: X%
|
|
41
|
+
- **Statements**: X%
|
|
42
|
+
- **Branches**: X%
|
|
43
|
+
- **Functions**: X%
|
|
44
|
+
- **Lines**: X%
|
|
45
|
+
- **Uncovered Files**: [list]
|
|
46
|
+
|
|
47
|
+
### <repo-2>
|
|
48
|
+
[Same format]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 2. Code Complexity
|
|
52
|
+
|
|
53
|
+
Analyze the cyclomatic complexity of the modified files:
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
## Code Complexity
|
|
57
|
+
|
|
58
|
+
### Files with High Complexity
|
|
59
|
+
- **arquivo1.ts**: Complexity 15 (recommended: < 10)
|
|
60
|
+
- **arquivo2.ts**: Complexity 12
|
|
61
|
+
|
|
62
|
+
### Recommendations
|
|
63
|
+
- [Refactoring suggestion 1]
|
|
64
|
+
- [Refactoring suggestion 2]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 3. Code Quality
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Run linting
|
|
71
|
+
npm run lint
|
|
72
|
+
|
|
73
|
+
# Check formatting
|
|
74
|
+
npm run format:check
|
|
75
|
+
|
|
76
|
+
# Static analysis (if available)
|
|
77
|
+
npm run analyze
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Document:
|
|
81
|
+
```markdown
|
|
82
|
+
## Code Quality
|
|
83
|
+
|
|
84
|
+
### Linting
|
|
85
|
+
- **Errors**: 0
|
|
86
|
+
- **Warnings**: X
|
|
87
|
+
- **Justified Warnings**: [list with justifications]
|
|
88
|
+
|
|
89
|
+
### Formatting
|
|
90
|
+
- **Status**: ✅ Compliant / ⚠️ Adjustments needed
|
|
91
|
+
|
|
92
|
+
### Static Analysis
|
|
93
|
+
- **Critical Issues**: 0
|
|
94
|
+
- **Medium Issues**: X
|
|
95
|
+
- **Low Issues**: Y
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### 4. Performance
|
|
99
|
+
|
|
100
|
+
If applicable, measure performance:
|
|
101
|
+
|
|
102
|
+
```markdown
|
|
103
|
+
## Performance
|
|
104
|
+
|
|
105
|
+
### Benchmarks
|
|
106
|
+
- **Operation X**: Yms (baseline: Zms)
|
|
107
|
+
- **Operation Y**: Yms (baseline: Zms)
|
|
108
|
+
|
|
109
|
+
### Applied Optimizations
|
|
110
|
+
- [Optimization 1 and impact]
|
|
111
|
+
- [Optimization 2 and impact]
|
|
112
|
+
|
|
113
|
+
### Identified Bottlenecks
|
|
114
|
+
- [Bottleneck 1 and mitigation plan]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 5. Size and Impact
|
|
118
|
+
|
|
119
|
+
```markdown
|
|
120
|
+
## Size and Impact
|
|
121
|
+
|
|
122
|
+
### Lines of Code
|
|
123
|
+
- **Added**: +X lines
|
|
124
|
+
- **Removed**: -Y lines
|
|
125
|
+
- **Modified**: Z lines
|
|
126
|
+
|
|
127
|
+
### Files
|
|
128
|
+
- **New**: X files
|
|
129
|
+
- **Modified**: Y files
|
|
130
|
+
- **Removed**: Z files
|
|
131
|
+
|
|
132
|
+
### Dependencies
|
|
133
|
+
- **New dependencies**: [list]
|
|
134
|
+
- **Bundle size**: +X KB
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### 6. Technical Debt
|
|
138
|
+
|
|
139
|
+
Identify technical debt introduced or resolved:
|
|
140
|
+
|
|
141
|
+
```markdown
|
|
142
|
+
## Technical Debt
|
|
143
|
+
|
|
144
|
+
### Introduced Debt
|
|
145
|
+
- **Item 1**: [Description and justification]
|
|
146
|
+
- Severity: High / Medium / Low
|
|
147
|
+
- Resolution plan: [when and how to resolve]
|
|
148
|
+
|
|
149
|
+
### Resolved Debt
|
|
150
|
+
- **Item 1**: [What was resolved]
|
|
151
|
+
- Impact: [improvement achieved]
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## 📄 Metrics Report
|
|
155
|
+
|
|
156
|
+
Create `./.sessions/<ISSUE-ID>/metrics.md`:
|
|
157
|
+
|
|
158
|
+
```markdown
|
|
159
|
+
# Metrics Report - [ISSUE-ID]
|
|
160
|
+
|
|
161
|
+
**Date**: [date/time]
|
|
162
|
+
**Repositories**: [list]
|
|
163
|
+
|
|
164
|
+
## Executive Summary
|
|
165
|
+
|
|
166
|
+
- **Test Coverage**: X% (target: Y%)
|
|
167
|
+
- **Code Quality**: ✅ / ⚠️ / ❌
|
|
168
|
+
- **Performance**: ✅ / ⚠️ / ❌
|
|
169
|
+
- **Technical Debt**: Low / Medium / High
|
|
170
|
+
|
|
171
|
+
## Detailed Metrics
|
|
172
|
+
|
|
173
|
+
[Include all sections above]
|
|
174
|
+
|
|
175
|
+
## Comparison with Baseline
|
|
176
|
+
|
|
177
|
+
| Metric | Before | After | Variation |
|
|
178
|
+
|--------|--------|-------|-----------|
|
|
179
|
+
| Coverage | X% | Y% | +Z% |
|
|
180
|
+
| Average Complexity | X | Y | +Z |
|
|
181
|
+
| Bundle Size | X KB | Y KB | +Z KB |
|
|
182
|
+
|
|
183
|
+
## Recommended Actions
|
|
184
|
+
|
|
185
|
+
1. [Action 1 - high priority]
|
|
186
|
+
2. [Action 2 - medium priority]
|
|
187
|
+
3. [Action 3 - low priority]
|
|
188
|
+
|
|
189
|
+
## Approval for Merge
|
|
190
|
+
|
|
191
|
+
- [ ] Test coverage >= target
|
|
192
|
+
- [ ] No critical quality issues
|
|
193
|
+
- [ ] Performance within requirements
|
|
194
|
+
- [ ] Technical debt documented and approved
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## 🎯 Quality Goals
|
|
198
|
+
|
|
199
|
+
If the project has goals defined in metaspecs, validate:
|
|
200
|
+
|
|
201
|
+
```markdown
|
|
202
|
+
## Validation against Goals
|
|
203
|
+
|
|
204
|
+
### Project Goals
|
|
205
|
+
- **Minimum coverage**: 80%
|
|
206
|
+
- **Maximum complexity**: 10
|
|
207
|
+
- **Performance**: < 100ms
|
|
208
|
+
|
|
209
|
+
### Status
|
|
210
|
+
- Coverage: ✅ 85% (target: 80%)
|
|
211
|
+
- Complexity: ⚠️ 12 (target: 10) - Justified
|
|
212
|
+
- Performance: ✅ 85ms (target: 100ms)
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## 🚨 Alerts
|
|
216
|
+
|
|
217
|
+
If any metric is out of acceptable range:
|
|
218
|
+
1. 🛑 **DOCUMENT** the problem
|
|
219
|
+
2. 💬 **ALERT** the user
|
|
220
|
+
3. 🔧 **PROPOSE** corrective actions
|
|
221
|
+
4. ⏸️ **CONSIDER** blocking the merge until resolved
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
**Provided arguments**:
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
#$ARGUMENTS
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## 🎯 Result
|
|
234
|
+
|
|
235
|
+
After running this command, you will have:
|
|
236
|
+
- Complete metrics report
|
|
237
|
+
- Comparison with baseline and goals
|
|
238
|
+
- Identification of quality issues
|
|
239
|
+
- Recommended actions
|
|
240
|
+
- Objective basis for merge approval
|