@thatix.io/context-first-agents-cli 0.1.0 → 0.2.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 +189 -7
- package/dist/commands/create-orchestrator.js +4 -1
- package/dist/commands/doctor.js +21 -5
- package/dist/commands/init.js +3 -1
- package/dist/templates/commands/en/engineer/plan.md +301 -0
- package/dist/templates/commands/en/engineer/pr.md +194 -0
- package/dist/templates/commands/en/engineer/pre-pr.md +325 -0
- package/dist/templates/commands/en/engineer/start.md +285 -0
- package/dist/templates/commands/en/engineer/work.md +256 -0
- package/dist/templates/commands/en/products/check.md +237 -0
- package/dist/templates/commands/en/products/collect.md +170 -0
- package/dist/templates/commands/en/products/refine.md +231 -0
- package/dist/templates/commands/en/products/spec.md +273 -0
- package/dist/templates/commands/en/quality/metrics.md +266 -0
- package/dist/templates/commands/en/quality/observe.md +172 -0
- package/dist/templates/commands/en/warm-up.md +59 -0
- package/dist/templates/commands/es/agents/CONTEXT-CONTRACT.md +63 -0
- package/dist/templates/commands/es/agents/implementer.md +27 -0
- package/dist/templates/commands/es/agents/integrator.md +24 -0
- package/dist/templates/commands/es/agents/reviewer.md +31 -0
- package/dist/templates/commands/es/agents/tester.md +22 -0
- package/dist/templates/commands/es/engineer/plan.md +335 -0
- package/dist/templates/commands/es/engineer/pr.md +228 -0
- package/dist/templates/commands/es/engineer/pre-pr.md +359 -0
- package/dist/templates/commands/es/engineer/start.md +318 -0
- package/dist/templates/commands/es/engineer/work.md +290 -0
- package/dist/templates/commands/es/orchestrate.md +125 -0
- package/dist/templates/commands/es/products/check.md +271 -0
- package/dist/templates/commands/es/products/collect.md +218 -0
- package/dist/templates/commands/es/products/refine.md +265 -0
- package/dist/templates/commands/es/products/spec.md +306 -0
- package/dist/templates/commands/es/quality/metrics.md +300 -0
- package/dist/templates/commands/es/quality/observe.md +205 -0
- package/dist/templates/commands/es/warm-up.md +59 -0
- package/dist/templates/commands/pt-BR/engineer/plan.md +335 -0
- package/dist/templates/commands/pt-BR/engineer/pr.md +228 -0
- package/dist/templates/commands/pt-BR/engineer/pre-pr.md +359 -0
- package/dist/templates/commands/pt-BR/engineer/start.md +319 -0
- package/dist/templates/commands/pt-BR/engineer/work.md +290 -0
- package/dist/templates/commands/pt-BR/products/check.md +271 -0
- package/dist/templates/commands/pt-BR/products/collect.md +219 -0
- package/dist/templates/commands/pt-BR/products/refine.md +265 -0
- package/dist/templates/commands/pt-BR/products/spec.md +307 -0
- package/dist/templates/commands/pt-BR/quality/metrics.md +300 -0
- package/dist/templates/commands/pt-BR/quality/observe.md +206 -0
- package/dist/templates/commands/pt-BR/warm-up.md +59 -0
- package/package.json +7 -3
- package/templates/commands/en/engineer/plan.md +301 -0
- package/templates/commands/en/engineer/pr.md +194 -0
- package/templates/commands/en/engineer/pre-pr.md +325 -0
- package/templates/commands/en/engineer/start.md +285 -0
- package/templates/commands/en/engineer/work.md +256 -0
- package/templates/commands/en/products/check.md +237 -0
- package/templates/commands/en/products/collect.md +170 -0
- package/templates/commands/en/products/refine.md +231 -0
- package/templates/commands/en/products/spec.md +273 -0
- package/templates/commands/en/quality/metrics.md +266 -0
- package/templates/commands/en/quality/observe.md +172 -0
- package/templates/commands/en/warm-up.md +59 -0
- package/templates/commands/es/agents/CONTEXT-CONTRACT.md +63 -0
- package/templates/commands/es/agents/implementer.md +27 -0
- package/templates/commands/es/agents/integrator.md +24 -0
- package/templates/commands/es/agents/reviewer.md +31 -0
- package/templates/commands/es/agents/tester.md +22 -0
- package/templates/commands/es/engineer/plan.md +335 -0
- package/templates/commands/es/engineer/pr.md +228 -0
- package/templates/commands/es/engineer/pre-pr.md +359 -0
- package/templates/commands/es/engineer/start.md +318 -0
- package/templates/commands/es/engineer/work.md +290 -0
- package/templates/commands/es/orchestrate.md +125 -0
- package/templates/commands/es/products/check.md +271 -0
- package/templates/commands/es/products/collect.md +218 -0
- package/templates/commands/es/products/refine.md +265 -0
- package/templates/commands/es/products/spec.md +306 -0
- package/templates/commands/es/quality/metrics.md +300 -0
- package/templates/commands/es/quality/observe.md +205 -0
- package/templates/commands/es/warm-up.md +59 -0
- package/templates/commands/pt-BR/engineer/plan.md +335 -0
- package/templates/commands/pt-BR/engineer/pr.md +228 -0
- package/templates/commands/pt-BR/engineer/pre-pr.md +359 -0
- package/templates/commands/pt-BR/engineer/start.md +319 -0
- package/templates/commands/pt-BR/engineer/work.md +290 -0
- package/templates/commands/pt-BR/products/check.md +271 -0
- package/templates/commands/pt-BR/products/collect.md +219 -0
- package/templates/commands/pt-BR/products/refine.md +265 -0
- package/templates/commands/pt-BR/products/spec.md +307 -0
- package/templates/commands/pt-BR/quality/metrics.md +300 -0
- package/templates/commands/pt-BR/quality/observe.md +206 -0
- package/templates/commands/pt-BR/warm-up.md +59 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
# Start Development
|
|
2
|
+
|
|
3
|
+
This command initiates the development of a feature in the current workspace.
|
|
4
|
+
|
|
5
|
+
## 📍 IMPORTANT: Understand the Structure
|
|
6
|
+
|
|
7
|
+
**Workspace** (where you will work):
|
|
8
|
+
```
|
|
9
|
+
<orchestrator>/.sessions/<ISSUE-ID>/
|
|
10
|
+
├── repo-1/ # worktree with branch feature/<ISSUE-ID>
|
|
11
|
+
├── repo-2/ # worktree with branch feature/<ISSUE-ID>
|
|
12
|
+
├── context.md # context (immutable - created by this command)
|
|
13
|
+
├── architecture.md # architecture (immutable - created by this command)
|
|
14
|
+
└── plan.md # plan (mutable - created by /plan)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Main Repositories** (read-only):
|
|
18
|
+
```
|
|
19
|
+
{base_path}/repo-1/ # main repo (branch main/master)
|
|
20
|
+
{base_path}/repo-2/ # main repo (branch main/master)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**GOLDEN RULE**:
|
|
24
|
+
- ✅ Read metaspecs and code from main repositories (read-only)
|
|
25
|
+
- ✅ Create `context.md` and `architecture.md` in `.sessions/<ISSUE-ID>/`
|
|
26
|
+
- ❌ NEVER checkout main repositories
|
|
27
|
+
- ❌ NEVER modify code in this command (use `/work` later)
|
|
28
|
+
|
|
29
|
+
## Configuration
|
|
30
|
+
|
|
31
|
+
Read `context-manifest.json` and `ai.properties.md` from the orchestrator to get repositories, base_path, and task_management_system.
|
|
32
|
+
|
|
33
|
+
## 📚 Load MetaSpecs
|
|
34
|
+
|
|
35
|
+
**Automatically locate MetaSpecs**:
|
|
36
|
+
1. Read `context-manifest.json` from the orchestrator
|
|
37
|
+
2. Find the repository with `"role": "metaspecs"`
|
|
38
|
+
3. Read `ai.properties.md` to get the `base_path`
|
|
39
|
+
4. The metaspecs are at: `{base_path}/{metaspecs-repo-id}/`
|
|
40
|
+
5. Read relevant `index.md` files:
|
|
41
|
+
- Business context
|
|
42
|
+
- Stack, architecture, and technical patterns
|
|
43
|
+
- Project conventions
|
|
44
|
+
- ADRs (Architecture Decision Records)
|
|
45
|
+
|
|
46
|
+
## 🎯 Project Context
|
|
47
|
+
|
|
48
|
+
Before starting, load the context by consulting:
|
|
49
|
+
- `context-manifest.json` - Repository structure
|
|
50
|
+
- MetaSpecs (located above) - Architecture and patterns
|
|
51
|
+
- `workspace directory` - Current workspace information
|
|
52
|
+
|
|
53
|
+
## ⚙️ Initial Setup
|
|
54
|
+
|
|
55
|
+
1. **Verify Workspace**:
|
|
56
|
+
- Confirm you are in the correct workspace (check `workspace directory`)
|
|
57
|
+
- List repositories available in the workspace
|
|
58
|
+
|
|
59
|
+
2. **Check Branches**:
|
|
60
|
+
- For each repository in the workspace, check the current branch
|
|
61
|
+
- Confirm all branches are synchronized
|
|
62
|
+
|
|
63
|
+
3. **Load Specification**:
|
|
64
|
+
- **If task manager configured**: Read the issue using the appropriate MCP
|
|
65
|
+
- **Otherwise**: Ask the user for the specification file or feature description
|
|
66
|
+
|
|
67
|
+
4. **Update Status** (if task manager configured):
|
|
68
|
+
- Move the issue to "In Progress"
|
|
69
|
+
|
|
70
|
+
## 📋 Analysis and Understanding
|
|
71
|
+
|
|
72
|
+
Analyze the specification and build a complete understanding by answering:
|
|
73
|
+
|
|
74
|
+
### Business
|
|
75
|
+
- **Why** is this being built?
|
|
76
|
+
- **Who** benefits?
|
|
77
|
+
- **Which** metric do we want to impact?
|
|
78
|
+
|
|
79
|
+
### Functional
|
|
80
|
+
- **What is the expected outcome?** (user behavior, system output)
|
|
81
|
+
- **Which components** will be created/modified in each repository?
|
|
82
|
+
- **Which integrations** between repositories are necessary?
|
|
83
|
+
|
|
84
|
+
### Technical
|
|
85
|
+
- **Approved stack?** Check against technical specifications
|
|
86
|
+
- **Architectural patterns?** Check ADRs (if available)
|
|
87
|
+
- **New dependencies?** Justify and document
|
|
88
|
+
- **How to test?** (according to project standards)
|
|
89
|
+
|
|
90
|
+
### Validation against MetaSpecs
|
|
91
|
+
|
|
92
|
+
If metaspecs are available, validate:
|
|
93
|
+
- Aligned with strategy and roadmap?
|
|
94
|
+
- Uses approved technology stack?
|
|
95
|
+
- Respects Architecture Decision Records?
|
|
96
|
+
- Follows documented business rules?
|
|
97
|
+
|
|
98
|
+
## 🤔 Clarification Questions
|
|
99
|
+
|
|
100
|
+
After initial analysis, formulate **3-5 most important clarifications**:
|
|
101
|
+
|
|
102
|
+
**Examples of relevant questions**:
|
|
103
|
+
- Which repository should contain the main logic?
|
|
104
|
+
- How should repositories communicate?
|
|
105
|
+
- Are there dependencies between changes in different repos?
|
|
106
|
+
- What is the recommended implementation order?
|
|
107
|
+
- Is there impact on APIs or contracts between services?
|
|
108
|
+
|
|
109
|
+
## 💾 Creation of Context.md
|
|
110
|
+
|
|
111
|
+
**IMPORTANT**: This file is **IMMUTABLE** after approval. It must not be modified by subsequent commands.
|
|
112
|
+
|
|
113
|
+
Create file `./.sessions/<ISSUE-ID>/context.md` with:
|
|
114
|
+
|
|
115
|
+
```markdown
|
|
116
|
+
# Context: [Feature Name]
|
|
117
|
+
|
|
118
|
+
## Why
|
|
119
|
+
[Business value, persona served, impacted metric]
|
|
120
|
+
|
|
121
|
+
## What
|
|
122
|
+
[Main functionalities, expected behavior]
|
|
123
|
+
|
|
124
|
+
## How
|
|
125
|
+
[Technical approach, components, affected repositories]
|
|
126
|
+
|
|
127
|
+
## Validation against MetaSpecs
|
|
128
|
+
- [x] Aligned with product strategy
|
|
129
|
+
- [x] Serves correct persona
|
|
130
|
+
- [x] Impacted metric documented
|
|
131
|
+
- [x] Uses approved stack
|
|
132
|
+
- [x] Respects ADRs
|
|
133
|
+
- [x] No conflicts with known limitations
|
|
134
|
+
|
|
135
|
+
## Dependencies
|
|
136
|
+
[Libraries, APIs, existing components]
|
|
137
|
+
|
|
138
|
+
## Constraints
|
|
139
|
+
[Technical limitations, performance targets, budget]
|
|
140
|
+
|
|
141
|
+
## Tests
|
|
142
|
+
[Critical E2E, necessary unit tests, expected coverage]
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**After creating `context.md`, request user review and approval before proceeding.**
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 🏗️ Creation of Architecture.md
|
|
150
|
+
|
|
151
|
+
**IMPORTANT**: This file is **IMMUTABLE** after approval. It must not be modified by subsequent commands.
|
|
152
|
+
|
|
153
|
+
### Architectural Principles (MANDATORY)
|
|
154
|
+
|
|
155
|
+
**BEFORE creating the architecture, you MUST:**
|
|
156
|
+
|
|
157
|
+
1. **Read ADRs (Architecture Decision Records)**:
|
|
158
|
+
- List ADRs in metaspecs
|
|
159
|
+
- Read ALL ADRs relevant to the feature
|
|
160
|
+
- Identify mandatory constraints and patterns
|
|
161
|
+
|
|
162
|
+
2. **Consult architectural patterns**:
|
|
163
|
+
- Read project structure guides in metaspecs
|
|
164
|
+
- Read coding patterns in metaspecs
|
|
165
|
+
- Identify existing patterns in code (use Glob/Grep to find similar examples)
|
|
166
|
+
|
|
167
|
+
3. **Validate compliance with ADRs**:
|
|
168
|
+
- For each relevant ADR, check if the proposed solution respects the decisions
|
|
169
|
+
- Document compliance in architecture.md
|
|
170
|
+
- If violation exists, justify or propose correction
|
|
171
|
+
|
|
172
|
+
4. **Analyze existing code**:
|
|
173
|
+
- Use Glob/Grep to find similar components/modules
|
|
174
|
+
- Understand existing patterns and structures
|
|
175
|
+
- Align new implementation with project standards
|
|
176
|
+
|
|
177
|
+
### Architecture Document Structure
|
|
178
|
+
|
|
179
|
+
Create file `./.sessions/<ISSUE-ID>/architecture.md` with:
|
|
180
|
+
|
|
181
|
+
```markdown
|
|
182
|
+
# Architecture: [Feature Name]
|
|
183
|
+
|
|
184
|
+
## Overview
|
|
185
|
+
[High-level view of the system before and after the change]
|
|
186
|
+
|
|
187
|
+
## Affected Components
|
|
188
|
+
[List of components and their relationships, dependencies]
|
|
189
|
+
|
|
190
|
+
### Component Diagram
|
|
191
|
+
[Textual description or Mermaid diagram of components]
|
|
192
|
+
|
|
193
|
+
### Data Flow
|
|
194
|
+
1. [Step 1 of the flow]
|
|
195
|
+
2. [Step 2 of the flow]
|
|
196
|
+
3. [Step 3 of the flow]
|
|
197
|
+
|
|
198
|
+
## Proposed Directory Structure
|
|
199
|
+
[Based on project patterns]
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
repo-1/
|
|
203
|
+
├── src/
|
|
204
|
+
│ ├── components/
|
|
205
|
+
│ │ └── NewComponent.tsx (CREATE)
|
|
206
|
+
│ └── services/
|
|
207
|
+
│ └── NewService.ts (CREATE)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Patterns and Best Practices
|
|
211
|
+
[Patterns to be maintained or introduced]
|
|
212
|
+
|
|
213
|
+
## ADR Validation
|
|
214
|
+
[List of consulted ADRs and compliance]
|
|
215
|
+
|
|
216
|
+
- [x] ADR-001: [Name] - Compliant
|
|
217
|
+
- [x] ADR-002: [Name] - Compliant
|
|
218
|
+
|
|
219
|
+
## External Dependencies
|
|
220
|
+
[Libraries to be used or added]
|
|
221
|
+
|
|
222
|
+
## Technical Decisions
|
|
223
|
+
|
|
224
|
+
### Decision 1: [Title]
|
|
225
|
+
**Context**: [Why we need to decide this]
|
|
226
|
+
**Options considered**:
|
|
227
|
+
- Option A: [Pros and cons]
|
|
228
|
+
- Option B: [Pros and cons]
|
|
229
|
+
**Decision**: [Chosen option]
|
|
230
|
+
**Justification**: [Why we chose this option]
|
|
231
|
+
|
|
232
|
+
## Constraints and Assumptions
|
|
233
|
+
[Technical limitations and premises]
|
|
234
|
+
|
|
235
|
+
## Trade-offs
|
|
236
|
+
[Alternatives considered and why they were not chosen]
|
|
237
|
+
|
|
238
|
+
## Consequences
|
|
239
|
+
**Positive**:
|
|
240
|
+
- [Benefit 1]
|
|
241
|
+
- [Benefit 2]
|
|
242
|
+
|
|
243
|
+
**Negative**:
|
|
244
|
+
- [Cost/limitation 1]
|
|
245
|
+
- [Cost/limitation 2]
|
|
246
|
+
|
|
247
|
+
## Main Files
|
|
248
|
+
[List of main files to be edited/created]
|
|
249
|
+
|
|
250
|
+
- `repo-1/src/components/NewComponent.tsx` (CREATE)
|
|
251
|
+
- `repo-1/src/services/NewService.ts` (CREATE)
|
|
252
|
+
- `repo-2/src/controllers/NewController.ts` (CREATE)
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**After creating `architecture.md`, request user review and approval before proceeding.**
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
**Provided arguments**:
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
#$ARGUMENTS
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## 🎯 Next Step
|
|
268
|
+
|
|
269
|
+
**After user approval of `context.md` and `architecture.md` files**:
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
/plan
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
This command will create the detailed technical implementation plan.
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## ⚠️ IMPORTANT: Immutable Files
|
|
280
|
+
|
|
281
|
+
**`context.md` and `architecture.md` are IMMUTABLE after approval.**
|
|
282
|
+
|
|
283
|
+
- ✅ They can be READ by subsequent commands (`/plan`, `/work`)
|
|
284
|
+
- ❌ They MUST NOT be MODIFIED by any command
|
|
285
|
+
- ❌ If changes are needed, discuss with the user and create new files or update the issue in the task manager
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# Work Execution
|
|
2
|
+
|
|
3
|
+
This command executes a unit of work in the current workspace, implementing part of the technical plan.
|
|
4
|
+
|
|
5
|
+
## 📋 Prerequisites
|
|
6
|
+
|
|
7
|
+
Before executing, make sure that:
|
|
8
|
+
- You have run `/start` and `/plan` to have the technical plan
|
|
9
|
+
- You are in the correct workspace: `<orchestrator>/.sessions/<ISSUE-ID>/`
|
|
10
|
+
- You have the files `.sessions/<ISSUE-ID>/` available:
|
|
11
|
+
- `context.md` (immutable)
|
|
12
|
+
- `architecture.md` (immutable)
|
|
13
|
+
- `plan.md` (mutable)
|
|
14
|
+
|
|
15
|
+
## Configuration
|
|
16
|
+
|
|
17
|
+
Read `context-manifest.json` and `ai.properties.md` from the orchestrator to get repositories, base_path, and task_management_system.
|
|
18
|
+
|
|
19
|
+
## 📍 IMPORTANT: Understand the Structure
|
|
20
|
+
|
|
21
|
+
**Workspace** (where you work):
|
|
22
|
+
```
|
|
23
|
+
<orchestrator>/.sessions/<ISSUE-ID>/
|
|
24
|
+
├── repo-1/ # worktree with branch feature/<ISSUE-ID>
|
|
25
|
+
├── repo-2/ # worktree with branch feature/<ISSUE-ID>
|
|
26
|
+
├── context.md # context (immutable)
|
|
27
|
+
├── architecture.md # architecture (immutable)
|
|
28
|
+
└── plan.md # plan (mutable)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Main repositories** (DO NOT touch):
|
|
32
|
+
```
|
|
33
|
+
{base_path}/repo-1/ # main repo (branch main/master)
|
|
34
|
+
{base_path}/repo-2/ # main repo (branch main/master)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**GOLDEN RULE**:
|
|
38
|
+
- ✅ Work ONLY inside `<orchestrator>/.sessions/<ISSUE-ID>/`
|
|
39
|
+
- ✅ Commit in the worktrees inside the workspace
|
|
40
|
+
- ❌ NEVER checkout branches in the main repositories
|
|
41
|
+
- ❌ NEVER navigate to `{base_path}/{repo-id}/`
|
|
42
|
+
|
|
43
|
+
## 🛑 CRITICAL: WHERE TO CREATE CODE
|
|
44
|
+
|
|
45
|
+
**⚠️ ATTENTION: ALL CODE MUST BE CREATED INSIDE THE REPOSITORY WORKTREE!**
|
|
46
|
+
|
|
47
|
+
**✅ CORRECT** - Create code inside the worktree:
|
|
48
|
+
```
|
|
49
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/src/file.ts ✅
|
|
50
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/tests/test.ts ✅
|
|
51
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/package.json ✅
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**❌ WRONG** - NEVER create code directly in .sessions:
|
|
55
|
+
```
|
|
56
|
+
<orchestrator>/.sessions/src/file.ts ❌
|
|
57
|
+
<orchestrator>/.sessions/<ISSUE-ID>/src/file.ts ❌
|
|
58
|
+
<orchestrator>/.sessions/<ISSUE-ID>/file.ts ❌
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**ABSOLUTE RULE**:
|
|
62
|
+
- 🛑 **EVERY code file** (`.ts`, `.js`, `.py`, `.java`, etc.) **MUST be inside** `<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/`
|
|
63
|
+
- 🛑 **NEVER create code** directly in `<orchestrator>/.sessions/` or `<orchestrator>/.sessions/<ISSUE-ID>/`
|
|
64
|
+
- ✅ **Only valid place**: Inside the repository's worktree
|
|
65
|
+
|
|
66
|
+
## ⚠️ IMPORTANT: Immutable Files
|
|
67
|
+
|
|
68
|
+
**This command must READ but NOT MODIFY:**
|
|
69
|
+
- ✅ **READ** `.sessions/<ISSUE-ID>/context.md` (immutable)
|
|
70
|
+
- ✅ **READ** `.sessions/<ISSUE-ID>/architecture.md` (immutable)
|
|
71
|
+
- ✅ **UPDATE** `.sessions/<ISSUE-ID>/plan.md` (mark progress)
|
|
72
|
+
- ✅ **IMPLEMENT** code **INSIDE THE WORKTREE**: `.sessions/<ISSUE-ID>/<repo-name>/`
|
|
73
|
+
- ✅ **MAKE COMMITS** in the worktrees: `.sessions/<ISSUE-ID>/<repo-name>/`
|
|
74
|
+
- ❌ **Do NOT modify `context.md` or `architecture.md`**
|
|
75
|
+
- ❌ **Do NOT checkout branches in the main repositories (outside workspace)**
|
|
76
|
+
- 🛑 **NEVER create code directly in `.sessions/` or `.sessions/<ISSUE-ID>/`**
|
|
77
|
+
|
|
78
|
+
## 📚 Load MetaSpecs
|
|
79
|
+
|
|
80
|
+
**Automatically locate MetaSpecs**:
|
|
81
|
+
1. Read `context-manifest.json` from the orchestrator
|
|
82
|
+
2. Find the repository with `"role": "metaspecs"`
|
|
83
|
+
3. Read `ai.properties.md` to get the `base_path`
|
|
84
|
+
4. The metaspecs are at: `{base_path}/{metaspecs-repo-id}/`
|
|
85
|
+
5. Read relevant `index.md` files during implementation to:
|
|
86
|
+
- Follow coding standards
|
|
87
|
+
- Respect defined architecture
|
|
88
|
+
- Use correct conventions
|
|
89
|
+
|
|
90
|
+
## 🎯 Objective
|
|
91
|
+
|
|
92
|
+
Implement a specific unit of work from the plan, which may involve:
|
|
93
|
+
- Creating new files/components
|
|
94
|
+
- Modifying existing files
|
|
95
|
+
- Adding tests
|
|
96
|
+
- Updating documentation
|
|
97
|
+
|
|
98
|
+
## 📝 Work Process
|
|
99
|
+
|
|
100
|
+
**⚠️ IMPORTANT: PROGRESS CONTROL**
|
|
101
|
+
|
|
102
|
+
This command executes the work in **incremental phases**. After completing each **MAIN PHASE** (e.g., Phase 1 → Phase 2):
|
|
103
|
+
|
|
104
|
+
1. 🛑 **STOP** execution
|
|
105
|
+
2. 📊 **PRESENT** a summary of what was done
|
|
106
|
+
3. ❓ **ASK** the developer if they want to:
|
|
107
|
+
- Review the implemented code
|
|
108
|
+
- Make adjustments before continuing
|
|
109
|
+
- Proceed to the next phase
|
|
110
|
+
|
|
111
|
+
**IMPORTANT**:
|
|
112
|
+
- ✅ **PAUSE** between main phases (Phase 1 → Phase 2 → Phase 3)
|
|
113
|
+
- ❌ **DO NOT pause** between subphases (Phase 1.1 → Phase 1.2 → Phase 1.3)
|
|
114
|
+
|
|
115
|
+
**DO NOT implement everything at once**. Work main phase by main phase, awaiting developer confirmation.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
### 1. Identify Unit of Work
|
|
120
|
+
|
|
121
|
+
Based on the technical plan (`./.sessions/<ISSUE-ID>/plan.md`), identify:
|
|
122
|
+
- Which specific task will be implemented now
|
|
123
|
+
- In which repository(ies) of the workspace
|
|
124
|
+
- Which files will be created/modified
|
|
125
|
+
- Dependencies with other tasks
|
|
126
|
+
|
|
127
|
+
### 2. Implementation
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
**IMPORTANT**: Work ONLY inside the workspace `.sessions/<ISSUE-ID>/`
|
|
132
|
+
|
|
133
|
+
For each repository in the workspace:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Navigate to the worktree inside the workspace
|
|
137
|
+
cd <orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/
|
|
138
|
+
|
|
139
|
+
# Verify you are on the correct branch
|
|
140
|
+
git branch # should show * feature/<ISSUE-ID>
|
|
141
|
+
|
|
142
|
+
# Implement the code here
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Execute the implementation following:
|
|
146
|
+
- **Project standards**: Consult style and architecture guides
|
|
147
|
+
- **Approved stack**: Use only technologies documented in the metaspecs
|
|
148
|
+
- **Tests**: Implement tests according to project standards
|
|
149
|
+
- **Documentation**: Update comments and docs when necessary
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
### 3. Local Validation
|
|
154
|
+
|
|
155
|
+
Before committing:
|
|
156
|
+
- Run unit/integration tests
|
|
157
|
+
- Check linting and formatting
|
|
158
|
+
- Confirm no existing functionality is broken
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
### 4. Commit
|
|
163
|
+
|
|
164
|
+
For each repository modified **inside the workspace**:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# Navigate to the worktree inside the workspace
|
|
168
|
+
cd <orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/
|
|
169
|
+
|
|
170
|
+
# Add changes
|
|
171
|
+
git add .
|
|
172
|
+
|
|
173
|
+
# Commit
|
|
174
|
+
git commit -m "type: concise description
|
|
175
|
+
|
|
176
|
+
- Detail 1
|
|
177
|
+
- Detail 2
|
|
178
|
+
|
|
179
|
+
Refs: <ISSUE-ID>"
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Commit types**: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`
|
|
183
|
+
|
|
184
|
+
**⚠️ MANDATORY PAUSE**: After completing the ENTIRE main phase (identification + implementation + validation + commit + plan.md update), **STOP** and show the developer:
|
|
185
|
+
- Complete summary of the phase
|
|
186
|
+
- Files created/modified
|
|
187
|
+
- Commits made
|
|
188
|
+
- Ask if they want to review or proceed to the next phase
|
|
189
|
+
|
|
190
|
+
### 5. Update Plan.md
|
|
191
|
+
|
|
192
|
+
**FOR EACH completed task**, update `./.sessions/<ISSUE-ID>/plan.md`:
|
|
193
|
+
|
|
194
|
+
```markdown
|
|
195
|
+
#### 1.1 - [Task Name] [Completed ✅]
|
|
196
|
+
- [Detail 1]
|
|
197
|
+
- [Detail 2]
|
|
198
|
+
- [Detail 3]
|
|
199
|
+
|
|
200
|
+
**Files**:
|
|
201
|
+
- `path/to/file1.ts` ✅
|
|
202
|
+
- `path/to/file2.vue` ✅
|
|
203
|
+
|
|
204
|
+
**Tests**:
|
|
205
|
+
- Unit test: [Description] ✅
|
|
206
|
+
- Integration test: [Description] ✅
|
|
207
|
+
|
|
208
|
+
**Comments**:
|
|
209
|
+
- Decision: [Explanation of important technical decision]
|
|
210
|
+
- Learning: [Something learned during implementation]
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**Mark task status**:
|
|
214
|
+
- `[Not Started ⏳]` - Task not started yet
|
|
215
|
+
- `[In Progress ⏰]` - Task currently being worked on
|
|
216
|
+
- `[Completed ✅]` - Task finished and validated
|
|
217
|
+
|
|
218
|
+
## 🔍 Quality Checklist
|
|
219
|
+
|
|
220
|
+
Before considering the unit complete:
|
|
221
|
+
- [ ] Code implemented and tested
|
|
222
|
+
- [ ] Tests passing
|
|
223
|
+
- [ ] Linting/formatting OK
|
|
224
|
+
- [ ] Documentation updated (if necessary)
|
|
225
|
+
- [ ] Commit made in all affected repos
|
|
226
|
+
- [ ] `plan.md` updated with progress and comments
|
|
227
|
+
|
|
228
|
+
## ⚠️ Jidoka Principle
|
|
229
|
+
|
|
230
|
+
If you encounter problems during implementation:
|
|
231
|
+
1. 🛑 **STOP** the implementation
|
|
232
|
+
2. 📝 **DOCUMENT** the problem found
|
|
233
|
+
3. 💬 **ALERT** the user and discuss solutions
|
|
234
|
+
4. 🔄 **ADJUST** the plan if necessary
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
**Provided arguments**:
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
#$ARGUMENTS
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## 🎯 Next Steps
|
|
247
|
+
|
|
248
|
+
- **Continue implementation**: Run `/work` again for the next unit
|
|
249
|
+
- **Finish feature**: When everything is implemented, run `/pre-pr`
|
|
250
|
+
|
|
251
|
+
## 💡 Tips
|
|
252
|
+
|
|
253
|
+
- Work in small, incremental units
|
|
254
|
+
- Commit frequently (atomic commits)
|
|
255
|
+
- Document important decisions in the session
|
|
256
|
+
- Keep repositories synchronized with each other
|