context-first-cli 2.1.4 → 2.1.6
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/engineer/pr.md +38 -15
- package/dist/templates/commands/en/engineer/pre-pr.md +38 -15
- package/dist/templates/commands/en/engineer/work.md +34 -10
- package/dist/templates/commands/es/engineer/pr.md +35 -12
- package/dist/templates/commands/es/engineer/pre-pr.md +58 -35
- package/dist/templates/commands/es/engineer/work.md +79 -55
- package/dist/templates/commands/pt-BR/engineer/pr.md +23 -0
- package/dist/templates/commands/pt-BR/engineer/pre-pr.md +23 -0
- package/dist/templates/commands/pt-BR/engineer/work.md +26 -2
- package/package.json +1 -1
- package/templates/commands/en/engineer/pr.md +38 -15
- package/templates/commands/en/engineer/pre-pr.md +38 -15
- package/templates/commands/en/engineer/work.md +34 -10
- package/templates/commands/es/engineer/pr.md +35 -12
- package/templates/commands/es/engineer/pre-pr.md +58 -35
- package/templates/commands/es/engineer/work.md +79 -55
- package/templates/commands/pt-BR/engineer/pr.md +23 -0
- package/templates/commands/pt-BR/engineer/pre-pr.md +23 -0
- package/templates/commands/pt-BR/engineer/work.md +26 -2
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Este comando ejecuta una unidad de trabajo en el workspace actual, implementando parte del plan técnico.
|
|
4
4
|
|
|
5
|
-
## 📋
|
|
5
|
+
## 📋 Prerrequisitos
|
|
6
6
|
|
|
7
|
-
Antes de ejecutar,
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
7
|
+
Antes de ejecutar, asegúrate de que:
|
|
8
|
+
- Has ejecutado `/start` y `/plan` para tener el plan técnico
|
|
9
|
+
- Estás en el workspace correcto: `<orchestrator>/.sessions/<ISSUE-ID>/`
|
|
10
|
+
- Tienes disponibles los archivos `.sessions/<ISSUE-ID>/`:
|
|
11
11
|
- `context.md` (inmutable)
|
|
12
12
|
- `architecture.md` (inmutable)
|
|
13
13
|
- `plan.md` (mutable)
|
|
14
14
|
|
|
15
|
-
## 📍 IMPORTANTE:
|
|
15
|
+
## 📍 IMPORTANTE: Entiende la Estructura
|
|
16
16
|
|
|
17
|
-
**Workspace** (donde
|
|
17
|
+
**Workspace** (donde trabajas):
|
|
18
18
|
```
|
|
19
19
|
<orchestrator>/.sessions/<ISSUE-ID>/
|
|
20
20
|
├── repo-1/ # worktree con branch feature/<ISSUE-ID>
|
|
@@ -31,10 +31,33 @@ Antes de ejecutar, asegúrese de que:
|
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
**REGLA DE ORO**:
|
|
34
|
-
- ✅
|
|
35
|
-
- ✅
|
|
36
|
-
- ❌ NUNCA
|
|
37
|
-
- ❌ NUNCA
|
|
34
|
+
- ✅ Trabaja SÓLO dentro de `<orchestrator>/.sessions/<ISSUE-ID>/`
|
|
35
|
+
- ✅ Haz commits en los worktrees dentro del workspace
|
|
36
|
+
- ❌ NUNCA hagas checkout en los repositorios principales
|
|
37
|
+
- ❌ NUNCA navegues a `{base_path}/{repo-id}/`
|
|
38
|
+
|
|
39
|
+
## 🛑 CRÍTICO: DÓNDE CREAR CÓDIGO
|
|
40
|
+
|
|
41
|
+
**⚠️ ATENCIÓN: TODO CÓDIGO DEBE SER CREADO DENTRO DEL WORKTREE DEL REPOSITORIO!**
|
|
42
|
+
|
|
43
|
+
**✅ CORRECTO** - Crear código dentro del worktree:
|
|
44
|
+
```
|
|
45
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/src/file.ts ✅
|
|
46
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/tests/test.ts ✅
|
|
47
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/package.json ✅
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**❌ INCORRECTO** - NUNCA crear código directamente en .sessions:
|
|
51
|
+
```
|
|
52
|
+
<orchestrator>/.sessions/src/file.ts ❌
|
|
53
|
+
<orchestrator>/.sessions/<ISSUE-ID>/src/file.ts ❌
|
|
54
|
+
<orchestrator>/.sessions/<ISSUE-ID>/file.ts ❌
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**REGLA ABSOLUTA**:
|
|
58
|
+
- 🛑 **TODO archivo de código** (`.ts`, `.js`, `.py`, `.java`, etc.) **DEBE estar dentro de** `<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/`
|
|
59
|
+
- 🛑 **NUNCA crees código** directamente en `<orchestrator>/.sessions/` o `<orchestrator>/.sessions/<ISSUE-ID>/`
|
|
60
|
+
- ✅ **Único lugar válido**: Dentro del worktree del repositorio específico
|
|
38
61
|
|
|
39
62
|
## ⚠️ IMPORTANTE: Archivos Inmutables
|
|
40
63
|
|
|
@@ -42,19 +65,20 @@ Antes de ejecutar, asegúrese de que:
|
|
|
42
65
|
- ✅ **LEER** `.sessions/<ISSUE-ID>/context.md` (inmutable)
|
|
43
66
|
- ✅ **LEER** `.sessions/<ISSUE-ID>/architecture.md` (inmutable)
|
|
44
67
|
- ✅ **ACTUALIZAR** `.sessions/<ISSUE-ID>/plan.md` (marcar progreso)
|
|
45
|
-
- ✅ **IMPLEMENTAR** código
|
|
46
|
-
- ✅ **HACER COMMITS** en los
|
|
68
|
+
- ✅ **IMPLEMENTAR** código **DENTRO DEL WORKTREE**: `.sessions/<ISSUE-ID>/<repo-name>/`
|
|
69
|
+
- ✅ **HACER COMMITS** en los worktrees: `.sessions/<ISSUE-ID>/<repo-name>/`
|
|
47
70
|
- ❌ **NO modificar `context.md` o `architecture.md`**
|
|
48
71
|
- ❌ **NO hacer checkout de branches en los repositorios principales (fuera del workspace)**
|
|
72
|
+
- 🛑 **NUNCA crear código en `.sessions/` o `.sessions/<ISSUE-ID>/` directamente**
|
|
49
73
|
|
|
50
74
|
## 📚 Cargar MetaSpecs
|
|
51
75
|
|
|
52
76
|
**Localizar MetaSpecs automáticamente**:
|
|
53
|
-
1.
|
|
54
|
-
2.
|
|
55
|
-
3.
|
|
77
|
+
1. Lee `context-manifest.json` del orchestrator
|
|
78
|
+
2. Encuentra el repositorio con `"role": "metaspecs"`
|
|
79
|
+
3. Lee `ai.properties.md` para obtener el `base_path`
|
|
56
80
|
4. El metaspecs está en: `{base_path}/{metaspecs-repo-id}/`
|
|
57
|
-
5.
|
|
81
|
+
5. Lee los archivos `index.md` relevantes durante la implementación para:
|
|
58
82
|
- Seguir patrones de código
|
|
59
83
|
- Respetar arquitectura definida
|
|
60
84
|
- Usar convenciones correctas
|
|
@@ -71,27 +95,27 @@ Implementar una unidad de trabajo específica del plan, que puede involucrar:
|
|
|
71
95
|
|
|
72
96
|
**⚠️ IMPORTANTE: CONTROL DE PROGRESO**
|
|
73
97
|
|
|
74
|
-
Este comando ejecuta el trabajo en **fases incrementales**.
|
|
98
|
+
Este comando ejecuta el trabajo en **fases incrementales**. Tras completar cada **FASE PRINCIPAL** (ej: Fase 1 → Fase 2):
|
|
75
99
|
|
|
76
|
-
1. 🛑 **
|
|
77
|
-
2. 📊 **
|
|
78
|
-
3. ❓ **
|
|
100
|
+
1. 🛑 **DETÉN** la ejecución
|
|
101
|
+
2. 📊 **PRESENTA** un resumen de lo realizado
|
|
102
|
+
3. ❓ **PREGUNTA** al desarrollador si quiere:
|
|
79
103
|
- Revisar el código implementado
|
|
80
104
|
- Hacer ajustes antes de continuar
|
|
81
105
|
- Continuar a la siguiente fase
|
|
82
106
|
|
|
83
107
|
**IMPORTANTE**:
|
|
84
|
-
- ✅ **
|
|
85
|
-
- ❌ **NO
|
|
108
|
+
- ✅ **PAUSA** entre fases principales (Fase 1 → Fase 2 → Fase 3)
|
|
109
|
+
- ❌ **NO pauses** entre subfases (Fase 1.1 → Fase 1.2 → Fase 1.3)
|
|
86
110
|
|
|
87
|
-
**NO
|
|
111
|
+
**NO implementes todo de una vez**. Trabaja fase principal por fase principal, esperando confirmación del desarrollador.
|
|
88
112
|
|
|
89
113
|
---
|
|
90
114
|
|
|
91
115
|
### 1. Identificar Unidad de Trabajo
|
|
92
116
|
|
|
93
|
-
Basado en el plan técnico (`./.sessions/<ISSUE-ID>/plan.md`),
|
|
94
|
-
- Qué tarea específica
|
|
117
|
+
Basado en el plan técnico (`./.sessions/<ISSUE-ID>/plan.md`), identifica:
|
|
118
|
+
- Qué tarea específica se implementará ahora
|
|
95
119
|
- En cuál(es) repositorio(s) del workspace
|
|
96
120
|
- Qué archivos serán creados/modificados
|
|
97
121
|
- Dependencias con otras tareas
|
|
@@ -100,34 +124,34 @@ Basado en el plan técnico (`./.sessions/<ISSUE-ID>/plan.md`), identifique:
|
|
|
100
124
|
|
|
101
125
|
|
|
102
126
|
|
|
103
|
-
**IMPORTANTE**:
|
|
127
|
+
**IMPORTANTE**: Trabaja SÓLO dentro del workspace en `.sessions/<ISSUE-ID>/`
|
|
104
128
|
|
|
105
129
|
Para cada repositorio en el workspace:
|
|
106
130
|
|
|
107
131
|
```bash
|
|
108
|
-
#
|
|
132
|
+
# Navega al worktree dentro del workspace
|
|
109
133
|
cd <orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/
|
|
110
134
|
|
|
111
|
-
#
|
|
135
|
+
# Verifica que estás en la branch correcta
|
|
112
136
|
git branch # debe mostrar * feature/<ISSUE-ID>
|
|
113
137
|
|
|
114
|
-
#
|
|
138
|
+
# Implementa el código aquí
|
|
115
139
|
```
|
|
116
140
|
|
|
117
|
-
|
|
118
|
-
- **Patrones del proyecto**:
|
|
119
|
-
- **Stack aprobada**:
|
|
120
|
-
- **Pruebas**:
|
|
121
|
-
- **Documentación**:
|
|
141
|
+
Ejecuta la implementación siguiendo:
|
|
142
|
+
- **Patrones del proyecto**: Consulta guías de estilo y arquitectura
|
|
143
|
+
- **Stack aprobada**: Usa sólo tecnologías documentadas en las metaspecs
|
|
144
|
+
- **Pruebas**: Implementa pruebas conforme a los estándares del proyecto
|
|
145
|
+
- **Documentación**: Actualiza comentarios y docs cuando sea necesario
|
|
122
146
|
|
|
123
147
|
|
|
124
148
|
|
|
125
149
|
### 3. Validación Local
|
|
126
150
|
|
|
127
151
|
Antes de commitear:
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
152
|
+
- Ejecuta pruebas unitarias/integración
|
|
153
|
+
- Verifica linting y formato
|
|
154
|
+
- Confirma que no rompiste funcionalidades existentes
|
|
131
155
|
|
|
132
156
|
|
|
133
157
|
|
|
@@ -136,10 +160,10 @@ Antes de commitear:
|
|
|
136
160
|
Para cada repositorio modificado **dentro del workspace**:
|
|
137
161
|
|
|
138
162
|
```bash
|
|
139
|
-
#
|
|
163
|
+
# Navega al worktree dentro del workspace
|
|
140
164
|
cd <orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/
|
|
141
165
|
|
|
142
|
-
#
|
|
166
|
+
# Añade los cambios
|
|
143
167
|
git add .
|
|
144
168
|
|
|
145
169
|
# Commit
|
|
@@ -153,15 +177,15 @@ Refs: <ISSUE-ID>"
|
|
|
153
177
|
|
|
154
178
|
**Tipos de commit**: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`
|
|
155
179
|
|
|
156
|
-
**⚠️ PAUSA OBLIGATORIA**:
|
|
180
|
+
**⚠️ PAUSA OBLIGATORIA**: Tras completar TODA la fase principal (identificación + implementación + validación + commit + actualización del plan.md), **DETÉN** y muestra al desarrollador:
|
|
157
181
|
- Resumen completo de la fase
|
|
158
182
|
- Archivos creados/modificados
|
|
159
183
|
- Commits realizados
|
|
160
|
-
-
|
|
184
|
+
- Pregunta si quiere revisar o continuar a la siguiente fase
|
|
161
185
|
|
|
162
186
|
### 5. Actualización del Plan.md
|
|
163
187
|
|
|
164
|
-
**POR CADA tarea completada**,
|
|
188
|
+
**POR CADA tarea completada**, actualiza `./.sessions/<ISSUE-ID>/plan.md`:
|
|
165
189
|
|
|
166
190
|
```markdown
|
|
167
191
|
#### 1.1 - [Nombre de la Tarea] [Completada ✅]
|
|
@@ -182,9 +206,9 @@ Refs: <ISSUE-ID>"
|
|
|
182
206
|
- Aprendizaje: [Algo aprendido durante implementación]
|
|
183
207
|
```
|
|
184
208
|
|
|
185
|
-
**
|
|
209
|
+
**Marca el estado de las tareas**:
|
|
186
210
|
- `[No Iniciada ⏳]` - Tarea aún no comenzó
|
|
187
|
-
- `[En Progreso ⏰]` - Tarea en curso
|
|
211
|
+
- `[En Progreso ⏰]` - Tarea en curso
|
|
188
212
|
- `[Completada ✅]` - Tarea finalizada y validada
|
|
189
213
|
|
|
190
214
|
## 🔍 Checklist de Calidad
|
|
@@ -199,11 +223,11 @@ Antes de considerar la unidad completa:
|
|
|
199
223
|
|
|
200
224
|
## ⚠️ Principio Jidoka
|
|
201
225
|
|
|
202
|
-
Si
|
|
203
|
-
1. 🛑 **
|
|
204
|
-
2. 📝 **
|
|
205
|
-
3. 💬 **
|
|
206
|
-
4. 🔄 **
|
|
226
|
+
Si encuentras problemas durante la implementación:
|
|
227
|
+
1. 🛑 **DETÉN** la implementación
|
|
228
|
+
2. 📝 **DOCUMENTA** el problema encontrado
|
|
229
|
+
3. 💬 **ALERTA** al usuario y discute soluciones
|
|
230
|
+
4. 🔄 **AJUSTA** el plan si es necesario
|
|
207
231
|
|
|
208
232
|
---
|
|
209
233
|
|
|
@@ -217,12 +241,12 @@ Si encuentra problemas durante la implementación:
|
|
|
217
241
|
|
|
218
242
|
## 🎯 Próximos Pasos
|
|
219
243
|
|
|
220
|
-
- **Continuar implementación**:
|
|
221
|
-
- **Finalizar feature**: Cuando todo esté implementado,
|
|
244
|
+
- **Continuar implementación**: Ejecuta `/work` nuevamente para la siguiente unidad
|
|
245
|
+
- **Finalizar feature**: Cuando todo esté implementado, ejecuta `/pre-pr`
|
|
222
246
|
|
|
223
247
|
## 💡 Consejos
|
|
224
248
|
|
|
225
|
-
-
|
|
249
|
+
- Trabaja en unidades pequeñas e incrementales
|
|
226
250
|
- Commit frecuente (commits atómicos)
|
|
227
|
-
-
|
|
228
|
-
-
|
|
251
|
+
- Documenta decisiones importantes en la sesión
|
|
252
|
+
- Mantén los repositorios sincronizados entre sí
|
|
@@ -10,6 +10,29 @@ Antes de criar PRs, certifique-se de que:
|
|
|
10
10
|
- Todos os testes estão passando
|
|
11
11
|
- A documentação está atualizada
|
|
12
12
|
|
|
13
|
+
## 🛑 CRÍTICO: ONDE TRABALHAR
|
|
14
|
+
|
|
15
|
+
**⚠️ ATENÇÃO: Se precisar fazer ajustes de última hora, TODO CÓDIGO DEVE SER CRIADO DENTRO DO WORKTREE!**
|
|
16
|
+
|
|
17
|
+
**✅ CORRETO** - Trabalhar dentro do worktree:
|
|
18
|
+
```
|
|
19
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/src/file.ts ✅
|
|
20
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/README.md ✅
|
|
21
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/CHANGELOG.md ✅
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**❌ ERRADO** - NUNCA criar código fora do worktree:
|
|
25
|
+
```
|
|
26
|
+
<orchestrator>/.sessions/file.ts ❌
|
|
27
|
+
<orchestrator>/.sessions/<ISSUE-ID>/file.ts ❌
|
|
28
|
+
{base_path}/<repo-name>/file.ts ❌ (repositório principal!)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**REGRA ABSOLUTA**:
|
|
32
|
+
- 🛑 **Qualquer ajuste de código** (docs, changelog, fixes) **DEVE estar em** `<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/`
|
|
33
|
+
- 🛑 **NUNCA modifique** o repositório principal em `{base_path}/<repo-name>/`
|
|
34
|
+
- ✅ **Trabalhe APENAS** dentro do worktree do repositório específico
|
|
35
|
+
|
|
13
36
|
## 🎯 Processo de Criação de PRs
|
|
14
37
|
|
|
15
38
|
### 1. Identificar Repositórios Modificados
|
|
@@ -12,6 +12,29 @@ Este comando valida que tudo está pronto para criar Pull Requests.
|
|
|
12
12
|
|
|
13
13
|
Garantir que a implementação está completa, testada e pronta para revisão antes de criar os PRs.
|
|
14
14
|
|
|
15
|
+
## 🛑 CRÍTICO: ONDE TRABALHAR
|
|
16
|
+
|
|
17
|
+
**⚠️ ATENÇÃO: TODO CÓDIGO (testes, fixes, ajustes) DEVE SER CRIADO DENTRO DO WORKTREE!**
|
|
18
|
+
|
|
19
|
+
**✅ CORRETO** - Trabalhar dentro do worktree:
|
|
20
|
+
```
|
|
21
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/src/file.ts ✅
|
|
22
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/tests/test.ts ✅
|
|
23
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/.eslintrc.js ✅
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**❌ ERRADO** - NUNCA criar código fora do worktree:
|
|
27
|
+
```
|
|
28
|
+
<orchestrator>/.sessions/test.ts ❌
|
|
29
|
+
<orchestrator>/.sessions/<ISSUE-ID>/test.ts ❌
|
|
30
|
+
{base_path}/<repo-name>/test.ts ❌ (repositório principal!)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**REGRA ABSOLUTA**:
|
|
34
|
+
- 🛑 **TODO código** (testes, fixes, configurações) **DEVE estar em** `<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/`
|
|
35
|
+
- 🛑 **NUNCA modifique** o repositório principal em `{base_path}/<repo-name>/`
|
|
36
|
+
- ✅ **Trabalhe APENAS** dentro do worktree do repositório específico
|
|
37
|
+
|
|
15
38
|
## ✅ Checklist de Validação
|
|
16
39
|
|
|
17
40
|
### 1. Completude da Implementação
|
|
@@ -36,16 +36,40 @@ Antes de executar, certifique-se de que:
|
|
|
36
36
|
- ❌ NUNCA faça checkout nos repositórios principais
|
|
37
37
|
- ❌ NUNCA navegue para `{base_path}/{repo-id}/`
|
|
38
38
|
|
|
39
|
+
## 🛑 CRÍTICO: ONDE CRIAR CÓDIGO
|
|
40
|
+
|
|
41
|
+
**⚠️ ATENÇÃO: TODO CÓDIGO DEVE SER CRIADO DENTRO DO WORKTREE DO REPOSITÓRIO!**
|
|
42
|
+
|
|
43
|
+
**✅ CORRETO** - Criar código dentro do worktree:
|
|
44
|
+
```
|
|
45
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/src/file.ts ✅
|
|
46
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/tests/test.ts ✅
|
|
47
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/package.json ✅
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**❌ ERRADO** - NUNCA criar código diretamente em .sessions:
|
|
51
|
+
```
|
|
52
|
+
<orchestrator>/.sessions/src/file.ts ❌
|
|
53
|
+
<orchestrator>/.sessions/<ISSUE-ID>/src/file.ts ❌
|
|
54
|
+
<orchestrator>/.sessions/<ISSUE-ID>/file.ts ❌
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**REGRA ABSOLUTA**:
|
|
58
|
+
- 🛑 **TODO arquivo de código** (`.ts`, `.js`, `.py`, `.java`, etc.) **DEVE estar dentro de** `<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/`
|
|
59
|
+
- 🛑 **NUNCA crie código** diretamente em `<orchestrator>/.sessions/` ou `<orchestrator>/.sessions/<ISSUE-ID>/`
|
|
60
|
+
- ✅ **Único lugar válido**: Dentro do worktree do repositório específico
|
|
61
|
+
|
|
39
62
|
## ⚠️ IMPORTANTE: Arquivos Imutáveis
|
|
40
63
|
|
|
41
64
|
**Este comando deve LER mas NÃO MODIFICAR:**
|
|
42
65
|
- ✅ **LER** `.sessions/<ISSUE-ID>/context.md` (imutável)
|
|
43
66
|
- ✅ **LER** `.sessions/<ISSUE-ID>/architecture.md` (imutável)
|
|
44
67
|
- ✅ **ATUALIZAR** `.sessions/<ISSUE-ID>/plan.md` (marcar progresso)
|
|
45
|
-
- ✅ **IMPLEMENTAR** código
|
|
46
|
-
- ✅ **FAZER COMMITS** nos
|
|
68
|
+
- ✅ **IMPLEMENTAR** código **DENTRO DO WORKTREE**: `.sessions/<ISSUE-ID>/<repo-name>/`
|
|
69
|
+
- ✅ **FAZER COMMITS** nos worktrees: `.sessions/<ISSUE-ID>/<repo-name>/`
|
|
47
70
|
- ❌ **NÃO modificar `context.md` ou `architecture.md`**
|
|
48
71
|
- ❌ **NÃO fazer checkout de branches nos repositórios principais (fora do workspace)**
|
|
72
|
+
- 🛑 **NUNCA criar código em `.sessions/` ou `.sessions/<ISSUE-ID>/` diretamente**
|
|
49
73
|
|
|
50
74
|
## 📚 Carregar MetaSpecs
|
|
51
75
|
|
package/package.json
CHANGED
|
@@ -10,32 +10,55 @@ Before creating PRs, make sure that:
|
|
|
10
10
|
- All tests are passing
|
|
11
11
|
- Documentation is up to date
|
|
12
12
|
|
|
13
|
+
## 🛑 CRITICAL: WHERE TO WORK
|
|
14
|
+
|
|
15
|
+
**⚠️ ATTENTION: If you need to make last-minute adjustments, ALL CODE MUST BE CREATED INSIDE THE WORKTREE!**
|
|
16
|
+
|
|
17
|
+
**✅ CORRECT** - Work inside the worktree:
|
|
18
|
+
```
|
|
19
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/src/file.ts ✅
|
|
20
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/README.md ✅
|
|
21
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/CHANGELOG.md ✅
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**❌ WRONG** - NEVER create code outside the worktree:
|
|
25
|
+
```
|
|
26
|
+
<orchestrator>/.sessions/file.ts ❌
|
|
27
|
+
<orchestrator>/.sessions/<ISSUE-ID>/file.ts ❌
|
|
28
|
+
{base_path}/<repo-name>/file.ts ❌ (main repository!)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**ABSOLUTE RULE**:
|
|
32
|
+
- 🛑 **Any code adjustment** (docs, changelog, fixes) **MUST be in** `<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/`
|
|
33
|
+
- 🛑 **NEVER modify** the main repository in `{base_path}/<repo-name>/`
|
|
34
|
+
- ✅ **Work ONLY** inside the specific repository’s worktree
|
|
35
|
+
|
|
13
36
|
## 🎯 PR Creation Process
|
|
14
37
|
|
|
15
38
|
### 1. Identify Modified Repositories
|
|
16
39
|
|
|
17
40
|
For each repository in the workspace, check:
|
|
18
41
|
```bash
|
|
19
|
-
cd <
|
|
42
|
+
cd <repository>
|
|
20
43
|
git status
|
|
21
|
-
git log origin/main..HEAD #
|
|
44
|
+
git log origin/main..HEAD # See unpushed commits
|
|
22
45
|
```
|
|
23
46
|
|
|
24
47
|
### 2. Push Branches
|
|
25
48
|
|
|
26
49
|
For each modified repository:
|
|
27
50
|
```bash
|
|
28
|
-
cd <
|
|
51
|
+
cd <repository>
|
|
29
52
|
git push origin <branch-name>
|
|
30
53
|
```
|
|
31
54
|
|
|
32
55
|
### 3. Create Pull Requests
|
|
33
56
|
|
|
34
|
-
For each repository, create a PR using GitHub CLI or
|
|
57
|
+
For each repository, create a PR using GitHub CLI or web interface:
|
|
35
58
|
|
|
36
59
|
**Using GitHub CLI**:
|
|
37
60
|
```bash
|
|
38
|
-
cd <
|
|
61
|
+
cd <repository>
|
|
39
62
|
gh pr create --title "[ISSUE-ID] Feature Title" \
|
|
40
63
|
--body "$(cat ../.sessions/<ISSUE-ID>/pr-description.md)" \
|
|
41
64
|
--base main
|
|
@@ -50,7 +73,7 @@ gh pr create --title "[ISSUE-ID] Feature Title" \
|
|
|
50
73
|
|
|
51
74
|
## 📝 Changes
|
|
52
75
|
|
|
53
|
-
### Repository: <
|
|
76
|
+
### Repository: <repo-name>
|
|
54
77
|
|
|
55
78
|
- [Change 1]
|
|
56
79
|
- [Change 2]
|
|
@@ -84,22 +107,22 @@ gh pr create --title "[ISSUE-ID] Feature Title" \
|
|
|
84
107
|
|
|
85
108
|
## 🔍 Notes for Reviewers
|
|
86
109
|
|
|
87
|
-
- [
|
|
88
|
-
- [
|
|
110
|
+
- [Attention point 1]
|
|
111
|
+
- [Attention point 2]
|
|
89
112
|
```
|
|
90
113
|
|
|
91
114
|
### 4. Link PRs
|
|
92
115
|
|
|
93
116
|
If there are multiple PRs (one per repository):
|
|
94
|
-
- Add cross-links between
|
|
95
|
-
- Document
|
|
117
|
+
- Add cross-links between PRs
|
|
118
|
+
- Document recommended merge order
|
|
96
119
|
- Indicate dependencies between PRs
|
|
97
120
|
|
|
98
121
|
### 5. Update Issue in Task Manager
|
|
99
122
|
|
|
100
|
-
If
|
|
123
|
+
If a task manager is configured:
|
|
101
124
|
- Move the issue to "In Review" or "PR Open"
|
|
102
|
-
- Add PR links
|
|
125
|
+
- Add PR links to the issue
|
|
103
126
|
- Add a comment summarizing the changes
|
|
104
127
|
|
|
105
128
|
### 6. Session Documentation
|
|
@@ -126,7 +149,7 @@ Update `./.sessions/<ISSUE-ID>/pr.md`:
|
|
|
126
149
|
1. <repo-1> - [Justification]
|
|
127
150
|
2. <repo-2> - [Justification]
|
|
128
151
|
|
|
129
|
-
## Merge
|
|
152
|
+
## Notes for Merge
|
|
130
153
|
|
|
131
154
|
- [Important note 1]
|
|
132
155
|
- [Important note 2]
|
|
@@ -146,7 +169,7 @@ Before requesting review:
|
|
|
146
169
|
|
|
147
170
|
Notify the team about the PRs:
|
|
148
171
|
- Mention relevant reviewers
|
|
149
|
-
- Highlight critical
|
|
172
|
+
- Highlight critical or breaking changes
|
|
150
173
|
- Indicate urgency if applicable
|
|
151
174
|
|
|
152
175
|
---
|
|
@@ -161,7 +184,7 @@ Notify the team about the PRs:
|
|
|
161
184
|
|
|
162
185
|
## 🎯 Next Steps
|
|
163
186
|
|
|
164
|
-
1. Await PR
|
|
187
|
+
1. Await PR reviews
|
|
165
188
|
2. Respond to comments and make adjustments
|
|
166
189
|
3. After approval, merge in the recommended order
|
|
167
190
|
4. Run `context-cli feature:end <ISSUE-ID>` to clean the workspace
|
|
@@ -4,7 +4,7 @@ This command validates that everything is ready to create Pull Requests.
|
|
|
4
4
|
|
|
5
5
|
## 📋 Prerequisites
|
|
6
6
|
|
|
7
|
-
- Complete implementation (all `/plan`
|
|
7
|
+
- Complete implementation (all tasks from `/plan` executed)
|
|
8
8
|
- All commits made
|
|
9
9
|
- Clean and organized workspace
|
|
10
10
|
|
|
@@ -12,6 +12,29 @@ This command validates that everything is ready to create Pull Requests.
|
|
|
12
12
|
|
|
13
13
|
Ensure that the implementation is complete, tested, and ready for review before creating the PRs.
|
|
14
14
|
|
|
15
|
+
## 🛑 CRITICAL: WHERE TO WORK
|
|
16
|
+
|
|
17
|
+
**⚠️ ATTENTION: ALL CODE (tests, fixes, adjustments) MUST BE CREATED INSIDE THE WORKTREE!**
|
|
18
|
+
|
|
19
|
+
**✅ CORRECT** - Work inside the worktree:
|
|
20
|
+
```
|
|
21
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/src/file.ts ✅
|
|
22
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/tests/test.ts ✅
|
|
23
|
+
<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/.eslintrc.js ✅
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**❌ WRONG** - NEVER create code outside the worktree:
|
|
27
|
+
```
|
|
28
|
+
<orchestrator>/.sessions/test.ts ❌
|
|
29
|
+
<orchestrator>/.sessions/<ISSUE-ID>/test.ts ❌
|
|
30
|
+
{base_path}/<repo-name>/test.ts ❌ (main repository!)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**ABSOLUTE RULE**:
|
|
34
|
+
- 🛑 **ALL code** (tests, fixes, configurations) **MUST be in** `<orchestrator>/.sessions/<ISSUE-ID>/<repo-name>/`
|
|
35
|
+
- 🛑 **NEVER modify** the main repository at `{base_path}/<repo-name>/`
|
|
36
|
+
- ✅ **Work ONLY** inside the specific repository’s worktree
|
|
37
|
+
|
|
15
38
|
## ✅ Validation Checklist
|
|
16
39
|
|
|
17
40
|
### 1. Implementation Completeness
|
|
@@ -19,10 +42,10 @@ Ensure that the implementation is complete, tested, and ready for review before
|
|
|
19
42
|
```markdown
|
|
20
43
|
## Completeness Check
|
|
21
44
|
|
|
22
|
-
- [ ] All plan
|
|
45
|
+
- [ ] All tasks from the plan have been executed
|
|
23
46
|
- [ ] All functional requirements from the PRD have been implemented
|
|
24
47
|
- [ ] All acceptance criteria have been met
|
|
25
|
-
- [ ] No functionality is
|
|
48
|
+
- [ ] No functionality is half-done
|
|
26
49
|
```
|
|
27
50
|
|
|
28
51
|
### 2. Code Quality
|
|
@@ -163,7 +186,7 @@ Checklist:
|
|
|
163
186
|
|
|
164
187
|
- [ ] Branches are up to date with the base branch (main/develop)
|
|
165
188
|
- [ ] No merge conflicts
|
|
166
|
-
- [ ] Changes
|
|
189
|
+
- [ ] Changes across repositories are synchronized
|
|
167
190
|
- [ ] Dependencies between repos have been tested
|
|
168
191
|
```
|
|
169
192
|
|
|
@@ -184,7 +207,7 @@ Checklist:
|
|
|
184
207
|
## Performance
|
|
185
208
|
|
|
186
209
|
- [ ] No obvious performance regressions
|
|
187
|
-
- [ ]
|
|
210
|
+
- [ ] Expensive queries/operations have been optimized
|
|
188
211
|
- [ ] No memory leaks introduced
|
|
189
212
|
- [ ] PRD performance requirements have been met
|
|
190
213
|
```
|
|
@@ -234,16 +257,16 @@ Create `./.sessions/<ISSUE-ID>/pr-description.md`:
|
|
|
234
257
|
3. [Expected result]
|
|
235
258
|
|
|
236
259
|
## 🔍 Notes for Reviewers
|
|
237
|
-
- [
|
|
238
|
-
- [
|
|
260
|
+
- [Point of attention 1]
|
|
261
|
+
- [Point of attention 2]
|
|
239
262
|
```
|
|
240
263
|
|
|
241
264
|
## 🚨 Issues Found
|
|
242
265
|
|
|
243
266
|
If any validation fails:
|
|
244
267
|
1. 🛑 **STOP** the PR creation process
|
|
245
|
-
2. 📝 **DOCUMENT** the
|
|
246
|
-
3. 🔧 **FIX** the
|
|
268
|
+
2. 📝 **DOCUMENT** the problem
|
|
269
|
+
3. 🔧 **FIX** the problem
|
|
247
270
|
4. 🔄 **RUN** `/pre-pr` again
|
|
248
271
|
|
|
249
272
|
## 📊 Validation Report
|
|
@@ -253,11 +276,11 @@ Create `./.sessions/<ISSUE-ID>/pre-pr-report.md`:
|
|
|
253
276
|
```markdown
|
|
254
277
|
# Pre-PR Validation Report
|
|
255
278
|
|
|
256
|
-
**Date**: [date/time]
|
|
279
|
+
**Date**: [date/time]
|
|
257
280
|
**Issue**: [ISSUE-ID]
|
|
258
281
|
|
|
259
282
|
## Overall Status
|
|
260
|
-
✅ Ready for PR / ⚠️ Pending / ❌ Blocked
|
|
283
|
+
✅ Ready for PR / ⚠️ Pending Issues / ❌ Blocked
|
|
261
284
|
|
|
262
285
|
## Validated Repositories
|
|
263
286
|
- **<repo-1>**: ✅ OK
|
|
@@ -268,9 +291,9 @@ Create `./.sessions/<ISSUE-ID>/pre-pr-report.md`:
|
|
|
268
291
|
- **Integration Tests**: Y/Y passing
|
|
269
292
|
- **Coverage**: Z%
|
|
270
293
|
|
|
271
|
-
## Pending
|
|
272
|
-
- [Pending
|
|
273
|
-
- [Pending
|
|
294
|
+
## Pending Issues (if any)
|
|
295
|
+
- [Pending issue 1]
|
|
296
|
+
- [Pending issue 2]
|
|
274
297
|
|
|
275
298
|
## Next Steps
|
|
276
299
|
- [x] All validations passed
|
|
@@ -295,4 +318,4 @@ If all validations passed:
|
|
|
295
318
|
/pr
|
|
296
319
|
```
|
|
297
320
|
|
|
298
|
-
This command will create
|
|
321
|
+
This command will create Pull Requests for all modified repositories.
|