context-first-cli 2.2.0 → 2.3.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/README.md +28 -0
- package/dist/commands/feature.d.ts +1 -0
- package/dist/commands/feature.d.ts.map +1 -1
- package/dist/commands/feature.js +146 -2
- package/dist/commands/feature.js.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/templates/commands/en/products/refine.md +64 -26
- package/dist/templates/commands/en/products/spec.md +42 -5
- package/dist/templates/commands/en/quality/metrics.md +51 -14
- package/dist/templates/commands/en/quality/observe.md +44 -6
- package/dist/templates/commands/en/warm-up.md +56 -19
- package/dist/templates/commands/es/products/refine.md +100 -62
- package/dist/templates/commands/es/products/spec.md +63 -26
- package/dist/templates/commands/es/quality/metrics.md +43 -5
- package/dist/templates/commands/es/quality/observe.md +42 -5
- package/dist/templates/commands/es/warm-up.md +45 -7
- package/package.json +1 -1
- package/templates/commands/en/products/refine.md +64 -26
- package/templates/commands/en/products/spec.md +42 -5
- package/templates/commands/en/quality/metrics.md +51 -14
- package/templates/commands/en/quality/observe.md +44 -6
- package/templates/commands/en/warm-up.md +56 -19
- package/templates/commands/es/products/refine.md +100 -62
- package/templates/commands/es/products/spec.md +63 -26
- package/templates/commands/es/quality/metrics.md +43 -5
- package/templates/commands/es/quality/observe.md +42 -5
- package/templates/commands/es/warm-up.md +45 -7
|
@@ -6,17 +6,54 @@ This command creates the complete specification (Product Requirements Document)
|
|
|
6
6
|
|
|
7
7
|
**This command is ONLY for requirements documentation:**
|
|
8
8
|
- ✅ Create PRD (Product Requirements Document)
|
|
9
|
-
- ✅ Update issue in task manager via MCP
|
|
9
|
+
- ✅ Update issue in the task manager via MCP
|
|
10
10
|
- ✅ **READ** files from main repositories (read-only)
|
|
11
11
|
- ❌ **DO NOT implement code**
|
|
12
12
|
- ❌ **DO NOT edit code files**
|
|
13
13
|
- ❌ **DO NOT checkout branches in main repositories**
|
|
14
|
-
- ❌ **DO NOT
|
|
14
|
+
- ❌ **DO NOT make commits**
|
|
15
15
|
|
|
16
16
|
**Next step**: `/start` to begin development.
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
+
## 📋 Project Configuration
|
|
21
|
+
|
|
22
|
+
**⚠️ IMPORTANT: Always read the project configuration files BEFORE running this command!**
|
|
23
|
+
|
|
24
|
+
### Mandatory Files
|
|
25
|
+
|
|
26
|
+
1. **`context-manifest.json`** (orchestrator root)
|
|
27
|
+
- List of project repositories
|
|
28
|
+
- Roles of each repository (metaspecs, application, etc.)
|
|
29
|
+
- URLs and dependencies between repositories
|
|
30
|
+
|
|
31
|
+
2. **`ai.properties.md`** (orchestrator root)
|
|
32
|
+
- Project settings (`project_name`, `base_path`)
|
|
33
|
+
- Task management system (`task_management_system`)
|
|
34
|
+
- Credentials and specific configurations
|
|
35
|
+
|
|
36
|
+
### How to Read
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# 1. Read context-manifest.json
|
|
40
|
+
cat context-manifest.json
|
|
41
|
+
|
|
42
|
+
# 2. Read ai.properties.md
|
|
43
|
+
cat ai.properties.md
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Essential Information
|
|
47
|
+
|
|
48
|
+
After reading the files, you will have:
|
|
49
|
+
- ✅ Complete list of project repositories
|
|
50
|
+
- ✅ Location of the metaspecs repository
|
|
51
|
+
- ✅ Base path to locate repositories
|
|
52
|
+
- ✅ Configured task management system
|
|
53
|
+
- ✅ Project-specific configurations
|
|
54
|
+
|
|
55
|
+
**🛑 DO NOT proceed without reading these files!** They contain critical information for correct command execution.
|
|
56
|
+
|
|
20
57
|
## 📋 Prerequisites
|
|
21
58
|
|
|
22
59
|
- Issue refined via `/refine`
|
|
@@ -29,7 +66,7 @@ This command creates the complete specification (Product Requirements Document)
|
|
|
29
66
|
2. Find the repository with `"role": "metaspecs"`
|
|
30
67
|
3. Read `ai.properties.md` to get the `base_path`
|
|
31
68
|
4. The metaspecs are located at: `{base_path}/{metaspecs-repo-id}/`
|
|
32
|
-
5. Read
|
|
69
|
+
5. Read relevant `index.md` files to ensure compliance with:
|
|
33
70
|
- System architecture
|
|
34
71
|
- Design patterns
|
|
35
72
|
- Technical constraints
|
|
@@ -133,7 +170,7 @@ Create a complete PRD that will serve as the single source of truth for implemen
|
|
|
133
170
|
- **External**: [external APIs, if any]
|
|
134
171
|
|
|
135
172
|
### Data Model
|
|
136
|
-
[Describe changes to
|
|
173
|
+
[Describe changes to data model, if any]
|
|
137
174
|
```
|
|
138
175
|
|
|
139
176
|
### 6. Acceptance Criteria
|
|
@@ -162,7 +199,7 @@ Create a complete PRD that will serve as the single source of truth for implemen
|
|
|
162
199
|
```markdown
|
|
163
200
|
## Out of Scope
|
|
164
201
|
|
|
165
|
-
Features that
|
|
202
|
+
Features that will NOT be implemented in this version:
|
|
166
203
|
- [Item 1]
|
|
167
204
|
- [Item 2]
|
|
168
205
|
|
|
@@ -11,6 +11,43 @@ Measure and document the quality of the implementation through objective metrics
|
|
|
11
11
|
- Performance
|
|
12
12
|
- Compliance with standards
|
|
13
13
|
|
|
14
|
+
## 📋 Project Configuration
|
|
15
|
+
|
|
16
|
+
**⚠️ IMPORTANT: Always read the project configuration files BEFORE running this command!**
|
|
17
|
+
|
|
18
|
+
### Required Files
|
|
19
|
+
|
|
20
|
+
1. **`context-manifest.json`** (orchestrator root)
|
|
21
|
+
- List of project repositories
|
|
22
|
+
- Roles of each repository (metaspecs, application, etc.)
|
|
23
|
+
- URLs and dependencies between repositories
|
|
24
|
+
|
|
25
|
+
2. **`ai.properties.md`** (orchestrator root)
|
|
26
|
+
- Project settings (`project_name`, `base_path`)
|
|
27
|
+
- Task management system (`task_management_system`)
|
|
28
|
+
- Credentials and specific configurations
|
|
29
|
+
|
|
30
|
+
### How to Read
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# 1. Read context-manifest.json
|
|
34
|
+
cat context-manifest.json
|
|
35
|
+
|
|
36
|
+
# 2. Read ai.properties.md
|
|
37
|
+
cat ai.properties.md
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Essential Information
|
|
41
|
+
|
|
42
|
+
After reading the files, you will have:
|
|
43
|
+
- ✅ Complete list of project repositories
|
|
44
|
+
- ✅ Location of the metaspecs repository
|
|
45
|
+
- ✅ Base path to locate repositories
|
|
46
|
+
- ✅ Configured task management system
|
|
47
|
+
- ✅ Project-specific configurations
|
|
48
|
+
|
|
49
|
+
**🛑 DO NOT proceed without reading these files!** They contain critical information for the correct execution of the command.
|
|
50
|
+
|
|
14
51
|
## 📋 Prerequisites
|
|
15
52
|
|
|
16
53
|
- Implementation completed (after `/work`)
|
|
@@ -57,14 +94,14 @@ Document:
|
|
|
57
94
|
|
|
58
95
|
### 2. Code Complexity
|
|
59
96
|
|
|
60
|
-
Analyze the cyclomatic complexity of
|
|
97
|
+
Analyze the cyclomatic complexity of modified files:
|
|
61
98
|
|
|
62
99
|
```markdown
|
|
63
100
|
## Code Complexity
|
|
64
101
|
|
|
65
102
|
### Files with High Complexity
|
|
66
|
-
- **
|
|
67
|
-
- **
|
|
103
|
+
- **file1.ts**: Complexity 15 (recommended: < 10)
|
|
104
|
+
- **file2.ts**: Complexity 12
|
|
68
105
|
|
|
69
106
|
### Recommendations
|
|
70
107
|
- [Refactoring suggestion 1]
|
|
@@ -163,12 +200,12 @@ Identify technical debt introduced or resolved:
|
|
|
163
200
|
```markdown
|
|
164
201
|
## Technical Debt
|
|
165
202
|
|
|
166
|
-
### Introduced
|
|
203
|
+
### Debt Introduced
|
|
167
204
|
- **Item 1**: [Description and justification]
|
|
168
205
|
- Severity: High / Medium / Low
|
|
169
206
|
- Resolution plan: [when and how to resolve]
|
|
170
207
|
|
|
171
|
-
### Resolved
|
|
208
|
+
### Debt Resolved
|
|
172
209
|
- **Item 1**: [What was resolved]
|
|
173
210
|
- Impact: [improvement achieved]
|
|
174
211
|
```
|
|
@@ -185,7 +222,7 @@ Create `./.sessions/<ISSUE-ID>/metrics.md`:
|
|
|
185
222
|
|
|
186
223
|
## Executive Summary
|
|
187
224
|
|
|
188
|
-
- **Test Coverage**: X% (
|
|
225
|
+
- **Test Coverage**: X% (goal: Y%)
|
|
189
226
|
- **Code Quality**: ✅ / ⚠️ / ❌
|
|
190
227
|
- **Performance**: ✅ / ⚠️ / ❌
|
|
191
228
|
- **Technical Debt**: Low / Medium / High
|
|
@@ -210,7 +247,7 @@ Create `./.sessions/<ISSUE-ID>/metrics.md`:
|
|
|
210
247
|
|
|
211
248
|
## Approval for Merge
|
|
212
249
|
|
|
213
|
-
- [ ] Test coverage >=
|
|
250
|
+
- [ ] Test coverage >= goal
|
|
214
251
|
- [ ] No critical quality issues
|
|
215
252
|
- [ ] Performance within requirements
|
|
216
253
|
- [ ] Technical debt documented and approved
|
|
@@ -229,18 +266,18 @@ If the project has goals defined in metaspecs, validate:
|
|
|
229
266
|
- **Performance**: < 100ms
|
|
230
267
|
|
|
231
268
|
### Status
|
|
232
|
-
- Coverage: ✅ 85% (
|
|
233
|
-
- Complexity: ⚠️ 12 (
|
|
234
|
-
- Performance: ✅ 85ms (
|
|
269
|
+
- Coverage: ✅ 85% (goal: 80%)
|
|
270
|
+
- Complexity: ⚠️ 12 (goal: 10) - Justified
|
|
271
|
+
- Performance: ✅ 85ms (goal: 100ms)
|
|
235
272
|
```
|
|
236
273
|
|
|
237
274
|
## 🚨 Alerts
|
|
238
275
|
|
|
239
276
|
If any metric is out of acceptable range:
|
|
240
|
-
1. 🛑 **DOCUMENT** the
|
|
277
|
+
1. 🛑 **DOCUMENT** the issue
|
|
241
278
|
2. 💬 **ALERT** the user
|
|
242
279
|
3. 🔧 **PROPOSE** corrective actions
|
|
243
|
-
4. ⏸️ **CONSIDER** blocking the merge until
|
|
280
|
+
4. ⏸️ **CONSIDER** blocking the merge until resolution
|
|
244
281
|
|
|
245
282
|
---
|
|
246
283
|
|
|
@@ -252,11 +289,11 @@ If any metric is out of acceptable range:
|
|
|
252
289
|
|
|
253
290
|
---
|
|
254
291
|
|
|
255
|
-
## 🎯
|
|
292
|
+
## 🎯 Outcome
|
|
256
293
|
|
|
257
294
|
After running this command, you will have:
|
|
258
295
|
- Complete metrics report
|
|
259
296
|
- Comparison with baseline and goals
|
|
260
297
|
- Identification of quality issues
|
|
261
|
-
-
|
|
298
|
+
- Recommendations for actions
|
|
262
299
|
- Objective basis for merge approval
|
|
@@ -10,11 +10,49 @@ Create a structured record of technical and product decisions, ensuring:
|
|
|
10
10
|
- **Audit**: Complete history of choices for future review
|
|
11
11
|
- **Learning**: Documentation of trade-offs and alternatives considered
|
|
12
12
|
|
|
13
|
-
**IMPORTANT**: This command
|
|
13
|
+
**IMPORTANT**: This command DOES NOT generate new decisions. It only RECORDS decisions that have already been made during the development process.
|
|
14
|
+
|
|
15
|
+
## 📋 Project Configuration
|
|
16
|
+
|
|
17
|
+
**⚠️ IMPORTANT: Always read the project configuration files BEFORE running this command!**
|
|
18
|
+
|
|
19
|
+
### Required Files
|
|
20
|
+
|
|
21
|
+
1. **`context-manifest.json`** (orchestrator root)
|
|
22
|
+
- List of project repositories
|
|
23
|
+
- Roles of each repository (metaspecs, application, etc.)
|
|
24
|
+
- URLs and dependencies between repositories
|
|
25
|
+
|
|
26
|
+
2. **`ai.properties.md`** (orchestrator root)
|
|
27
|
+
- Project settings (`project_name`, `base_path`)
|
|
28
|
+
- Task management system (`task_management_system`)
|
|
29
|
+
- Credentials and specific configurations
|
|
30
|
+
|
|
31
|
+
### How to Read
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# 1. Read context-manifest.json
|
|
35
|
+
cat context-manifest.json
|
|
36
|
+
|
|
37
|
+
# 2. Read ai.properties.md
|
|
38
|
+
cat ai.properties.md
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Essential Information
|
|
42
|
+
|
|
43
|
+
After reading the files, you will have:
|
|
44
|
+
- ✅ Complete list of project repositories
|
|
45
|
+
- ✅ Location of the metaspecs repository
|
|
46
|
+
- ✅ Base path to locate repositories
|
|
47
|
+
- ✅ Configured task management system
|
|
48
|
+
- ✅ Project-specific configurations
|
|
49
|
+
|
|
50
|
+
**🛑 DO NOT proceed without reading these files!** They contain critical information for the correct execution of the command.
|
|
51
|
+
|
|
14
52
|
|
|
15
53
|
## 📋 Prerequisites
|
|
16
54
|
|
|
17
|
-
-
|
|
55
|
+
- Have executed at least one of the commands that generate decisions:
|
|
18
56
|
- `/spec` - generates PRD with product decisions
|
|
19
57
|
- `/plan` - generates plan.md with technical decisions
|
|
20
58
|
- `/work` - implementation generates decisions during development
|
|
@@ -47,9 +85,9 @@ Analyze the session files (`./.sessions/<ISSUE-ID>/`) to identify decisions:
|
|
|
47
85
|
- Read `./.sessions/<ISSUE-ID>/work.md`
|
|
48
86
|
- Identify decisions in:
|
|
49
87
|
- Refactorings performed
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
88
|
+
- Approach changes
|
|
89
|
+
- Applied optimizations
|
|
90
|
+
- Edge case handling
|
|
53
91
|
|
|
54
92
|
### 2. Document Each Decision
|
|
55
93
|
|
|
@@ -145,7 +183,7 @@ For critical decisions, document the impact:
|
|
|
145
183
|
|
|
146
184
|
Periodically review the decisions made:
|
|
147
185
|
- Do they still make sense?
|
|
148
|
-
-
|
|
186
|
+
- Have the trade-offs proven correct?
|
|
149
187
|
- Are there learnings to document?
|
|
150
188
|
- Does any decision need to be reversed?
|
|
151
189
|
|
|
@@ -1,34 +1,71 @@
|
|
|
1
1
|
# Warm-up - Context Loading
|
|
2
2
|
|
|
3
|
-
This command prepares the environment by loading the
|
|
3
|
+
This command prepares the environment by loading the full context of the current project and workspace.
|
|
4
4
|
|
|
5
5
|
## 1. Identify Current Workspace
|
|
6
6
|
|
|
7
7
|
Check if you are inside a workspace created by `context-cli`:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
# Check if you
|
|
10
|
+
# Check if you are in a workspace directory
|
|
11
11
|
pwd
|
|
12
|
-
# The workspace is usually at ~/workspaces/<ISSUE-ID>/
|
|
12
|
+
# The workspace is usually located at ~/workspaces/<ISSUE-ID>/
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
If you
|
|
15
|
+
If you are not in a workspace, ask the user which workspace to use or if a new one should be created with `feature:start`.
|
|
16
|
+
|
|
17
|
+
## 📋 Project Configuration
|
|
18
|
+
|
|
19
|
+
**⚠️ IMPORTANT: Always read the project configuration files BEFORE running this command!**
|
|
20
|
+
|
|
21
|
+
### Required Files
|
|
22
|
+
|
|
23
|
+
1. **`context-manifest.json`** (root of the orchestrator)
|
|
24
|
+
- List of project repositories
|
|
25
|
+
- Roles of each repository (metaspecs, application, etc.)
|
|
26
|
+
- URLs and dependencies between repositories
|
|
27
|
+
|
|
28
|
+
2. **`ai.properties.md`** (root of the orchestrator)
|
|
29
|
+
- Project settings (`project_name`, `base_path`)
|
|
30
|
+
- Task management system (`task_management_system`)
|
|
31
|
+
- Credentials and specific configurations
|
|
32
|
+
|
|
33
|
+
### How to Read
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# 1. Read context-manifest.json
|
|
37
|
+
cat context-manifest.json
|
|
38
|
+
|
|
39
|
+
# 2. Read ai.properties.md
|
|
40
|
+
cat ai.properties.md
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Essential Information
|
|
44
|
+
|
|
45
|
+
After reading the files, you will have:
|
|
46
|
+
- ✅ Complete list of project repositories
|
|
47
|
+
- ✅ Location of the metaspecs repository
|
|
48
|
+
- ✅ Base path to locate repositories
|
|
49
|
+
- ✅ Configured task management system
|
|
50
|
+
- ✅ Project-specific configurations
|
|
51
|
+
|
|
52
|
+
**🛑 DO NOT proceed without reading these files!** They contain critical information for the correct execution of the command.
|
|
16
53
|
|
|
17
54
|
## 2. Load Project Configuration
|
|
18
55
|
|
|
19
|
-
You are already in the project
|
|
56
|
+
You are already in the project orchestrator (root of the current repository).
|
|
20
57
|
|
|
21
|
-
1. **Verify you
|
|
58
|
+
1. **Verify you are at the orchestrator root**: `pwd` should show the orchestrator directory
|
|
22
59
|
2. **Read the `context-manifest.json` file** at the orchestrator root
|
|
23
|
-
3. **Read the `ai.properties.md` file** to
|
|
60
|
+
3. **Read the `ai.properties.md` file** to obtain local configurations (base_path, etc.)
|
|
24
61
|
|
|
25
62
|
## 3. Load Project Manifest
|
|
26
63
|
|
|
27
64
|
Read the `context-manifest.json` from the orchestrator to understand:
|
|
28
65
|
- Complete list of ecosystem repositories
|
|
29
|
-
- MetaSpecs repository
|
|
66
|
+
- URL of the MetaSpecs repository
|
|
30
67
|
- Dependencies between repositories
|
|
31
|
-
-
|
|
68
|
+
- Roles of each repository (application, library, service, specs-provider)
|
|
32
69
|
|
|
33
70
|
## 4. Load MetaSpecs
|
|
34
71
|
|
|
@@ -37,32 +74,32 @@ The MetaSpecs repository is **separate** and defined in `context-manifest.json`
|
|
|
37
74
|
**Locate the metaspecs repository:**
|
|
38
75
|
|
|
39
76
|
1. Read `context-manifest.json` and find the repository with `role: "metaspecs"`
|
|
40
|
-
2.
|
|
77
|
+
2. Obtain the `id` of that repository (e.g., "my-project-metaspecs")
|
|
41
78
|
3. Read `ai.properties.md` to get the `base_path`
|
|
42
|
-
4. The metaspecs repository is at: `{base_path}/{metaspecs-id}/`
|
|
79
|
+
4. The metaspecs repository is located at: `{base_path}/{metaspecs-id}/`
|
|
43
80
|
|
|
44
81
|
**Always read the index files first:**
|
|
45
82
|
|
|
46
83
|
1. **`README.md`** - Project overview and documentation structure
|
|
47
84
|
2. **`index.md`** (in root or subfolders) - Index of available specifications
|
|
48
85
|
|
|
49
|
-
**Use the indexes as reference** to navigate to the specific specifications you need.
|
|
86
|
+
**Use the indexes as a reference** to navigate to the specific specifications you need. Do not assume specific files exist — always consult the indexes first.
|
|
50
87
|
|
|
51
|
-
## 5. Load Current Session (if
|
|
88
|
+
## 5. Load Current Session (if any)
|
|
52
89
|
|
|
53
|
-
Check if there
|
|
90
|
+
Check if there is a saved session for this workspace:
|
|
54
91
|
|
|
55
92
|
```bash
|
|
56
|
-
# Look for session in orchestrator
|
|
93
|
+
# Look for session in the orchestrator
|
|
57
94
|
ls -la .sessions/<ISSUE-ID>/ 2>/dev/null
|
|
58
95
|
```
|
|
59
96
|
|
|
60
|
-
If it exists, read the session files to recover the context
|
|
97
|
+
If it exists, read the session files to recover the context of the last execution.
|
|
61
98
|
|
|
62
99
|
## 6. Repository Context
|
|
63
100
|
|
|
64
101
|
For each repository present in the workspace, read:
|
|
65
|
-
- `README.md` -
|
|
102
|
+
- `README.md` - Purpose and overview of the repository
|
|
66
103
|
- Main configuration file (`package.json`, `pom.xml`, `requirements.txt`, etc.)
|
|
67
104
|
|
|
68
105
|
## 7. Smart Navigation
|
|
@@ -71,7 +108,7 @@ For each repository present in the workspace, read:
|
|
|
71
108
|
- **Documentation**: Use MetaSpecs indexes as reference
|
|
72
109
|
- **Wait for Instructions**: DO NOT read other files now. Wait for the next command.
|
|
73
110
|
|
|
74
|
-
## 8. Jidoka Principle (Stop
|
|
111
|
+
## 8. Jidoka Principle (Stop Upon Detecting Problems)
|
|
75
112
|
|
|
76
113
|
If you detect misalignment, conflicts, or problems:
|
|
77
114
|
1. 🛑 **STOP** immediately
|
|
@@ -82,4 +119,4 @@ If you detect misalignment, conflicts, or problems:
|
|
|
82
119
|
|
|
83
120
|
**Provided arguments**: #$ARGUMENTS
|
|
84
121
|
|
|
85
|
-
**Status**: Context loaded.
|
|
122
|
+
**Status**: Context loaded. Awaiting next command.
|