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,168 @@
|
|
|
1
|
+
# Decision Observability
|
|
2
|
+
|
|
3
|
+
This command records important decisions made during development, creating an auditable log for explainability and traceability.
|
|
4
|
+
|
|
5
|
+
## 🎯 Objective
|
|
6
|
+
|
|
7
|
+
Create a structured record of technical and product decisions, ensuring:
|
|
8
|
+
- **Explainability**: Why each decision was made
|
|
9
|
+
- **Traceability**: Which sources (PRD, metaspecs, ADRs) supported the decision
|
|
10
|
+
- **Audit**: Complete history of choices for future review
|
|
11
|
+
- **Learning**: Documentation of trade-offs and alternatives considered
|
|
12
|
+
|
|
13
|
+
**IMPORTANT**: This command does NOT generate new decisions. It only RECORDS decisions that have already been made during the development process.
|
|
14
|
+
|
|
15
|
+
## 📋 Prerequisites
|
|
16
|
+
|
|
17
|
+
- You have run at least one of the commands that generate decisions:
|
|
18
|
+
- `/spec` - generates PRD with product decisions
|
|
19
|
+
- `/plan` - generates plan.md with technical decisions
|
|
20
|
+
- `/work` - implementation generates decisions during development
|
|
21
|
+
|
|
22
|
+
## 🔍 Observation Process
|
|
23
|
+
|
|
24
|
+
### 1. Identify Relevant Decisions
|
|
25
|
+
|
|
26
|
+
Analyze the session files (`./.sessions/<ISSUE-ID>/`) to identify decisions:
|
|
27
|
+
|
|
28
|
+
**After `/spec`** - Product Decisions:
|
|
29
|
+
- Read `./.sessions/<ISSUE-ID>/prd.md`
|
|
30
|
+
- Identify decisions in:
|
|
31
|
+
- Scope (what is included/excluded in the feature)
|
|
32
|
+
- Personas served (who is the target audience)
|
|
33
|
+
- Success metrics (how to measure results)
|
|
34
|
+
- Non-functional requirements (performance, accessibility)
|
|
35
|
+
- Constraints and trade-offs
|
|
36
|
+
|
|
37
|
+
**After `/plan`** - Technical Decisions:
|
|
38
|
+
- Read `./.sessions/<ISSUE-ID>/plan.md`
|
|
39
|
+
- Identify decisions in:
|
|
40
|
+
- Component/module architecture
|
|
41
|
+
- Choice of libraries or tools
|
|
42
|
+
- Implementation patterns
|
|
43
|
+
- Data structure
|
|
44
|
+
- Testing strategy
|
|
45
|
+
|
|
46
|
+
**During `/work`** - Implementation Decisions:
|
|
47
|
+
- Read `./.sessions/<ISSUE-ID>/work.md`
|
|
48
|
+
- Identify decisions in:
|
|
49
|
+
- Refactorings performed
|
|
50
|
+
- Changes in approach
|
|
51
|
+
- Optimizations applied
|
|
52
|
+
- Handling of edge cases
|
|
53
|
+
|
|
54
|
+
### 2. Document Each Decision
|
|
55
|
+
|
|
56
|
+
For each identified decision, document:
|
|
57
|
+
|
|
58
|
+
```markdown
|
|
59
|
+
## Decision: [Clear Title]
|
|
60
|
+
|
|
61
|
+
**Context**: [Why do we need to decide this? What is the problem or need?]
|
|
62
|
+
|
|
63
|
+
**Options Considered**:
|
|
64
|
+
1. **Option A**: [Description]
|
|
65
|
+
- Pros: [advantages]
|
|
66
|
+
- Cons: [disadvantages]
|
|
67
|
+
2. **Option B**: [Description]
|
|
68
|
+
- Pros: [advantages]
|
|
69
|
+
- Cons: [disadvantages]
|
|
70
|
+
|
|
71
|
+
**Decision**: [Chosen option]
|
|
72
|
+
|
|
73
|
+
**Justification**: [Why did we choose this option? Which criteria were most important?]
|
|
74
|
+
|
|
75
|
+
**Sources**:
|
|
76
|
+
- [PRD section X]
|
|
77
|
+
- [Metaspec Y]
|
|
78
|
+
- [ADR-00Z]
|
|
79
|
+
|
|
80
|
+
**Accepted Trade-offs**: [Which disadvantages did we consciously accept?]
|
|
81
|
+
|
|
82
|
+
**Reversibility**: Easy / Medium / Hard
|
|
83
|
+
|
|
84
|
+
**Date**: [decision date]
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### 3. Create Decision Log
|
|
88
|
+
|
|
89
|
+
Save in `./.sessions/<ISSUE-ID>/decisions.md`:
|
|
90
|
+
|
|
91
|
+
```markdown
|
|
92
|
+
# Decision Log - [ISSUE-ID]
|
|
93
|
+
|
|
94
|
+
## Summary
|
|
95
|
+
[Brief summary of the main decisions made in this feature]
|
|
96
|
+
|
|
97
|
+
## Product Decisions
|
|
98
|
+
|
|
99
|
+
### [Decision 1]
|
|
100
|
+
[As per template above]
|
|
101
|
+
|
|
102
|
+
### [Decision 2]
|
|
103
|
+
[As per template above]
|
|
104
|
+
|
|
105
|
+
## Technical Decisions
|
|
106
|
+
|
|
107
|
+
### [Decision 3]
|
|
108
|
+
[As per template above]
|
|
109
|
+
|
|
110
|
+
### [Decision 4]
|
|
111
|
+
[As per template above]
|
|
112
|
+
|
|
113
|
+
## Implementation Decisions
|
|
114
|
+
|
|
115
|
+
### [Decision 5]
|
|
116
|
+
[As per template above]
|
|
117
|
+
|
|
118
|
+
## Lessons Learned
|
|
119
|
+
- [Lesson 1]
|
|
120
|
+
- [Lesson 2]
|
|
121
|
+
|
|
122
|
+
## Pending Decisions
|
|
123
|
+
- [Decision that still needs to be made]
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## 📊 Impact Analysis
|
|
127
|
+
|
|
128
|
+
For critical decisions, document the impact:
|
|
129
|
+
|
|
130
|
+
```markdown
|
|
131
|
+
## Impact Analysis
|
|
132
|
+
|
|
133
|
+
**Affected Repositories**: [list]
|
|
134
|
+
|
|
135
|
+
**Impacted Components**: [list]
|
|
136
|
+
|
|
137
|
+
**Created Dependencies**: [list]
|
|
138
|
+
|
|
139
|
+
**Introduced Risks**: [list]
|
|
140
|
+
|
|
141
|
+
**Applied Mitigations**: [list]
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## 🔄 Decision Review
|
|
145
|
+
|
|
146
|
+
Periodically review the decisions made:
|
|
147
|
+
- Do they still make sense?
|
|
148
|
+
- Were the trade-offs proven correct?
|
|
149
|
+
- Are there learnings to document?
|
|
150
|
+
- Does any decision need to be reversed?
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
**Provided arguments**:
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
#$ARGUMENTS
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## 🎯 Outcome
|
|
163
|
+
|
|
164
|
+
After running this command, you will have:
|
|
165
|
+
- Complete decision log in `./.sessions/<ISSUE-ID>/decisions.md`
|
|
166
|
+
- Traceability of every choice made
|
|
167
|
+
- Documentation for future reference
|
|
168
|
+
- Basis for ADRs (if decisions are architectural)
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Warm-up - Context Loading
|
|
2
|
+
|
|
3
|
+
This command prepares the environment by loading the complete context of the project and current workspace.
|
|
4
|
+
|
|
5
|
+
## 1. Identify Current Workspace
|
|
6
|
+
|
|
7
|
+
Check if you are inside a workspace created by `context-cli`:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Check if you're in a workspace directory
|
|
11
|
+
pwd
|
|
12
|
+
# The workspace is usually at ~/workspaces/<ISSUE-ID>/
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
If you're not in a workspace, ask the user which workspace to use or if you should create a new one with `feature:start`.
|
|
16
|
+
|
|
17
|
+
## 2. Load Project Configuration
|
|
18
|
+
|
|
19
|
+
Identify the project's orchestrator:
|
|
20
|
+
|
|
21
|
+
1. **Look for the `.contextrc.json` file** in any of the workspace repositories
|
|
22
|
+
2. This file contains the orchestrator repository URL
|
|
23
|
+
3. If the orchestrator is not cloned locally yet, clone it
|
|
24
|
+
|
|
25
|
+
## 3. Load Project Manifest
|
|
26
|
+
|
|
27
|
+
Read the `context-manifest.json` from the orchestrator to understand:
|
|
28
|
+
- Complete list of ecosystem repositories
|
|
29
|
+
- MetaSpecs repository URL
|
|
30
|
+
- Dependencies between repositories
|
|
31
|
+
- Role of each repository (application, library, service, specs-provider)
|
|
32
|
+
|
|
33
|
+
## 4. Load MetaSpecs
|
|
34
|
+
|
|
35
|
+
The MetaSpecs repository is defined in `context-manifest.json` (usually with `role: "specs-provider"`).
|
|
36
|
+
|
|
37
|
+
**Always read the index files first:**
|
|
38
|
+
|
|
39
|
+
1. **`README.md`** - Project overview and documentation structure
|
|
40
|
+
2. **`index.md`** (in root or subfolders) - Index of available specifications
|
|
41
|
+
|
|
42
|
+
**Use the indexes as reference** to navigate to the specific specifications you need. Don't assume specific files exist - always consult the indexes first.
|
|
43
|
+
|
|
44
|
+
## 5. Load Current Session (if exists)
|
|
45
|
+
|
|
46
|
+
Check if there's a saved session for this workspace:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Look for session in orchestrator
|
|
50
|
+
ls -la .sessions/<ISSUE-ID>/ 2>/dev/null
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If it exists, read the session files to recover the context from the last execution.
|
|
54
|
+
|
|
55
|
+
## 6. Repository Context
|
|
56
|
+
|
|
57
|
+
For each repository present in the workspace, read:
|
|
58
|
+
- `README.md` - Repository purpose and overview
|
|
59
|
+
- Main configuration file (`package.json`, `pom.xml`, `requirements.txt`, etc.)
|
|
60
|
+
|
|
61
|
+
## 7. Smart Navigation
|
|
62
|
+
|
|
63
|
+
- **Code**: Use search tools (glob, grep) to locate relevant files
|
|
64
|
+
- **Documentation**: Use MetaSpecs indexes as reference
|
|
65
|
+
- **Wait for Instructions**: DO NOT read other files now. Wait for the next command.
|
|
66
|
+
|
|
67
|
+
## 8. Jidoka Principle (Stop When Detecting Problems)
|
|
68
|
+
|
|
69
|
+
If you detect misalignment, conflicts, or problems:
|
|
70
|
+
1. 🛑 **STOP** immediately
|
|
71
|
+
2. 📝 **DOCUMENT** the problem found
|
|
72
|
+
3. 💬 **ALERT** the user before proceeding
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
**Provided arguments**: #$ARGUMENTS
|
|
77
|
+
|
|
78
|
+
**Status**: Context loaded. Waiting for next command.
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
# Planificación Técnica
|
|
2
|
+
|
|
3
|
+
Este comando crea el plan técnico detallado para la implementación de la feature.
|
|
4
|
+
|
|
5
|
+
## 📋 Prerrequisitos
|
|
6
|
+
|
|
7
|
+
- PRD creado vía `/spec`
|
|
8
|
+
- Análisis inicial hecho vía `/start`
|
|
9
|
+
- Archivos `context.md` y `architecture.md` creados y aprobados
|
|
10
|
+
|
|
11
|
+
## 📍 IMPORTANTE: Entienda la Estructura
|
|
12
|
+
|
|
13
|
+
**Workspace**:
|
|
14
|
+
```
|
|
15
|
+
<orchestrator>/.sessions/<ISSUE-ID>/
|
|
16
|
+
├── repo-1/ # worktree (será usado no /work)
|
|
17
|
+
├── repo-2/ # worktree (será usado no /work)
|
|
18
|
+
├── context.md # contexto (inmutable - LEER)
|
|
19
|
+
├── architecture.md # arquitectura (inmutable - LEER)
|
|
20
|
+
└── plan.md # plan (mutable - CREAR)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Repositorios principales** (solo lectura):
|
|
24
|
+
```
|
|
25
|
+
{base_path}/repo-1/ # repo principal (branch main/master)
|
|
26
|
+
{base_path}/repo-2/ # repo principal (branch main/master)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**REGLA DE ORO**:
|
|
30
|
+
- ✅ Lea `context.md` y `architecture.md` (inmutables)
|
|
31
|
+
- ✅ Cree `plan.md` en `.sessions/<ISSUE-ID>/`
|
|
32
|
+
- ✅ Lea código de los repositorios principales (read-only)
|
|
33
|
+
- ❌ NUNCA haga checkout en los repositorios principales
|
|
34
|
+
- ❌ NUNCA modifique `context.md` o `architecture.md`
|
|
35
|
+
|
|
36
|
+
## ⚠️ IMPORTANTE: Archivos Inmutables
|
|
37
|
+
|
|
38
|
+
**Este comando debe LEER pero NO MODIFICAR:**
|
|
39
|
+
- ✅ **LEER** `.sessions/<ISSUE-ID>/context.md` (inmutable)
|
|
40
|
+
- ✅ **LEER** `.sessions/<ISSUE-ID>/architecture.md` (inmutable)
|
|
41
|
+
- ✅ **CREAR** `.sessions/<ISSUE-ID>/plan.md` (mutable - será actualizado durante `/work`)
|
|
42
|
+
- ❌ **NO modificar `context.md` o `architecture.md`**
|
|
43
|
+
|
|
44
|
+
## 📚 Cargar MetaSpecs
|
|
45
|
+
|
|
46
|
+
**Localizar MetaSpecs automáticamente**:
|
|
47
|
+
1. Lea `context-manifest.json` del orchestrator
|
|
48
|
+
2. Encuentre el repositorio con `"role": "metaspecs"`
|
|
49
|
+
3. Lea `ai.properties.md` para obtener el `base_path`
|
|
50
|
+
4. El metaspecs está en: `{base_path}/{metaspecs-repo-id}/`
|
|
51
|
+
5. Lea los archivos `index.md` relevantes para garantizar conformidad con:
|
|
52
|
+
- Arquitectura del sistema
|
|
53
|
+
- Patrones de diseño y código
|
|
54
|
+
- Estructura de carpetas y archivos
|
|
55
|
+
- Convenciones de nomenclatura
|
|
56
|
+
|
|
57
|
+
## 🎯 Objetivo
|
|
58
|
+
|
|
59
|
+
Crear un plan técnico detallado que guiará la implementación, dividiendo el trabajo en unidades más pequeñas y secuenciales.
|
|
60
|
+
|
|
61
|
+
## 📝 Estructura del Plan
|
|
62
|
+
|
|
63
|
+
### 1. Visión General Técnica
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
# Plan Técnico - [Título de la Feature]
|
|
67
|
+
|
|
68
|
+
## Resumen
|
|
69
|
+
[Breve descripción técnica de lo que se implementará]
|
|
70
|
+
|
|
71
|
+
## Repositorios Involucrados
|
|
72
|
+
- **<repo-1>**: [Papel en esta feature]
|
|
73
|
+
- **<repo-2>**: [Papel en esta feature]
|
|
74
|
+
|
|
75
|
+
## Enfoque Técnico
|
|
76
|
+
[Estrategia general de implementación]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 2. Arquitectura de la Solución
|
|
80
|
+
|
|
81
|
+
```markdown
|
|
82
|
+
## Arquitectura
|
|
83
|
+
|
|
84
|
+
### Diagrama de Componentes
|
|
85
|
+
[Descripción textual o ASCII art de los componentes y sus relaciones]
|
|
86
|
+
|
|
87
|
+
### Flujo de Datos
|
|
88
|
+
1. [Paso 1 del flujo]
|
|
89
|
+
2. [Paso 2 del flujo]
|
|
90
|
+
3. [Paso 3 del flujo]
|
|
91
|
+
|
|
92
|
+
### Integraciones
|
|
93
|
+
- **<repo-1> → <repo-2>**: [Cómo se comunican]
|
|
94
|
+
- **Sistema → API Externa**: [Si hay]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 3. Decisiones Técnicas
|
|
98
|
+
|
|
99
|
+
```markdown
|
|
100
|
+
## Decisiones Técnicas
|
|
101
|
+
|
|
102
|
+
### Decisión 1: [Título]
|
|
103
|
+
**Contexto**: [Por qué necesitamos decidir esto]
|
|
104
|
+
**Opciones consideradas**:
|
|
105
|
+
- Opción A: [Pros y contras]
|
|
106
|
+
- Opción B: [Pros y contras]
|
|
107
|
+
**Decisión**: [Opción elegida]
|
|
108
|
+
**Justificación**: [Por qué elegimos esta opción]
|
|
109
|
+
|
|
110
|
+
### Decisión 2: [Título]
|
|
111
|
+
[Mismo formato arriba]
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 4. Plan de Implementación
|
|
115
|
+
|
|
116
|
+
Divida el trabajo en unidades pequeñas y secuenciales:
|
|
117
|
+
|
|
118
|
+
```markdown
|
|
119
|
+
## Plan de Implementación
|
|
120
|
+
|
|
121
|
+
### Fase 1: [Nombre de la Fase]
|
|
122
|
+
**Objetivo**: [Qué se logrará en esta fase]
|
|
123
|
+
**Repositorios**: [repos afectados]
|
|
124
|
+
|
|
125
|
+
#### Tarea 1.1: [Descripción]
|
|
126
|
+
- **Repo**: <repo-1>
|
|
127
|
+
- **Archivos**: [archivos a crear/modificar]
|
|
128
|
+
- **Descripción**: [Qué hacer]
|
|
129
|
+
- **Pruebas**: [Pruebas a implementar]
|
|
130
|
+
- **Estimación**: [tiempo estimado]
|
|
131
|
+
|
|
132
|
+
#### Tarea 1.2: [Descripción]
|
|
133
|
+
- **Repo**: <repo-2>
|
|
134
|
+
- **Archivos**: [archivos a crear/modificar]
|
|
135
|
+
- **Descripción**: [Qué hacer]
|
|
136
|
+
- **Pruebas**: [Pruebas a implementar]
|
|
137
|
+
- **Estimación**: [tiempo estimado]
|
|
138
|
+
|
|
139
|
+
### Fase 2: [Nombre de la Fase]
|
|
140
|
+
[Mismo formato arriba]
|
|
141
|
+
|
|
142
|
+
### Fase 3: [Nombre de la Fase]
|
|
143
|
+
[Mismo formato arriba]
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### 5. Estructura de Archivos
|
|
147
|
+
|
|
148
|
+
Para cada repositorio, defina la estructura:
|
|
149
|
+
|
|
150
|
+
```markdown
|
|
151
|
+
## Estructura de Archivos
|
|
152
|
+
|
|
153
|
+
### <repo-1>
|
|
154
|
+
```
|
|
155
|
+
src/
|
|
156
|
+
├── components/
|
|
157
|
+
│ ├── NewComponent.tsx (CREAR)
|
|
158
|
+
│ └── ExistingComponent.tsx (MODIFICAR)
|
|
159
|
+
├── services/
|
|
160
|
+
│ └── NewService.ts (CREAR)
|
|
161
|
+
└── tests/
|
|
162
|
+
└── NewComponent.test.tsx (CREAR)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### <repo-2>
|
|
166
|
+
```
|
|
167
|
+
src/
|
|
168
|
+
├── controllers/
|
|
169
|
+
│ └── NewController.ts (CREAR)
|
|
170
|
+
└── tests/
|
|
171
|
+
└── NewController.test.ts (CREAR)
|
|
172
|
+
```
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### 6. APIs y Contratos
|
|
176
|
+
|
|
177
|
+
```markdown
|
|
178
|
+
## APIs y Contratos
|
|
179
|
+
|
|
180
|
+
### Endpoints Nuevos
|
|
181
|
+
|
|
182
|
+
#### POST /api/resource
|
|
183
|
+
**Request**:
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"field1": "string",
|
|
187
|
+
"field2": "number"
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**Response**:
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"id": "string",
|
|
195
|
+
"status": "string"
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Endpoints Modificados
|
|
200
|
+
|
|
201
|
+
#### GET /api/resource/:id
|
|
202
|
+
**Cambios**: [Qué cambia]
|
|
203
|
+
**Breaking Change**: Sí / No
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### 7. Estrategia de Pruebas
|
|
207
|
+
|
|
208
|
+
```markdown
|
|
209
|
+
## Estrategia de Pruebas
|
|
210
|
+
|
|
211
|
+
### Pruebas Unitarias
|
|
212
|
+
- **<repo-1>**: [Componentes/funciones a probar]
|
|
213
|
+
- **<repo-2>**: [Componentes/funciones a probar]
|
|
214
|
+
|
|
215
|
+
### Pruebas de Integración
|
|
216
|
+
- **Escenario 1**: [Descripción y repos involucrados]
|
|
217
|
+
- **Escenario 2**: [Descripción y repos involucrados]
|
|
218
|
+
|
|
219
|
+
### Pruebas E2E (si aplica)
|
|
220
|
+
- **Flujo 1**: [Descripción]
|
|
221
|
+
- **Flujo 2**: [Descripción]
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### 8. Riesgos Técnicos
|
|
225
|
+
|
|
226
|
+
```markdown
|
|
227
|
+
## Riesgos Técnicos
|
|
228
|
+
|
|
229
|
+
### Riesgo 1: [Descripción]
|
|
230
|
+
- **Impacto**: Alto / Medio / Bajo
|
|
231
|
+
- **Probabilidad**: Alta / Media / Baja
|
|
232
|
+
- **Mitigación**: [Cómo mitigar]
|
|
233
|
+
- **Plan B**: [Alternativa si ocurre]
|
|
234
|
+
|
|
235
|
+
### Riesgo 2: [Descripción]
|
|
236
|
+
[Mismo formato arriba]
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### 9. Checklist de Implementación
|
|
240
|
+
|
|
241
|
+
```markdown
|
|
242
|
+
## Checklist de Implementación
|
|
243
|
+
|
|
244
|
+
### Fase 1
|
|
245
|
+
- [ ] Tarea 1.1
|
|
246
|
+
- [ ] Tarea 1.2
|
|
247
|
+
- [ ] Pruebas de la Fase 1
|
|
248
|
+
|
|
249
|
+
### Fase 2
|
|
250
|
+
- [ ] Tarea 2.1
|
|
251
|
+
- [ ] Tarea 2.2
|
|
252
|
+
- [ ] Pruebas de la Fase 2
|
|
253
|
+
|
|
254
|
+
### Fase 3
|
|
255
|
+
- [ ] Tarea 3.1
|
|
256
|
+
- [ ] Tarea 3.2
|
|
257
|
+
- [ ] Pruebas de la Fase 3
|
|
258
|
+
|
|
259
|
+
### Finalización
|
|
260
|
+
- [ ] Documentación actualizada
|
|
261
|
+
- [ ] Code review
|
|
262
|
+
- [ ] Pruebas de integración
|
|
263
|
+
- [ ] PR creado
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## 📄 Guardado del Plan
|
|
267
|
+
|
|
268
|
+
Guarde en `./.sessions/<ISSUE-ID>/plan.md`
|
|
269
|
+
|
|
270
|
+
## 🔍 Revisión
|
|
271
|
+
|
|
272
|
+
Revise el plan verificando:
|
|
273
|
+
- Todas las tareas están claras y ejecutables
|
|
274
|
+
- Dependencias entre tareas están identificadas
|
|
275
|
+
- Estimaciones son realistas
|
|
276
|
+
- Riesgos fueron considerados
|
|
277
|
+
- Estrategia de pruebas es adecuada
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
**Argumentos proporcionados**:
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
#$ARGUMENTS
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## 🎯 Próximo Paso
|
|
290
|
+
|
|
291
|
+
Tras la aprobación del plan:
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
/work
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
Este comando iniciará la ejecución de la primera unidad de trabajo del plan.
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Creación de Pull Request
|
|
2
|
+
|
|
3
|
+
Este comando crea Pull Requests para todos los repositorios modificados en el workspace.
|
|
4
|
+
|
|
5
|
+
## 📋 Requisitos previos
|
|
6
|
+
|
|
7
|
+
Antes de crear PRs, asegúrate de que:
|
|
8
|
+
- Has ejecutado `/pre-pr` y todas las validaciones pasaron
|
|
9
|
+
- Todos los commits fueron realizados
|
|
10
|
+
- Todas las pruebas están pasando
|
|
11
|
+
- La documentación está actualizada
|
|
12
|
+
|
|
13
|
+
## 🎯 Proceso de Creación de PRs
|
|
14
|
+
|
|
15
|
+
### 1. Identificar Repositorios Modificados
|
|
16
|
+
|
|
17
|
+
Para cada repositorio en el workspace, verifica:
|
|
18
|
+
```bash
|
|
19
|
+
cd <repositório>
|
|
20
|
+
git status
|
|
21
|
+
git log origin/main..HEAD # Ver commits no pushados
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### 2. Push de las Branches
|
|
25
|
+
|
|
26
|
+
Para cada repositorio modificado:
|
|
27
|
+
```bash
|
|
28
|
+
cd <repositório>
|
|
29
|
+
git push origin <branch-name>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 3. Crear Pull Requests
|
|
33
|
+
|
|
34
|
+
Para cada repositorio, crea un PR usando el GitHub CLI o la interfaz web:
|
|
35
|
+
|
|
36
|
+
**Usando GitHub CLI**:
|
|
37
|
+
```bash
|
|
38
|
+
cd <repositório>
|
|
39
|
+
gh pr create --title "[ISSUE-ID] Título de la Feature" \
|
|
40
|
+
--body "$(cat ../.sessions/<ISSUE-ID>/pr-description.md)" \
|
|
41
|
+
--base main
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Plantilla de Descripción del PR**:
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
## 🎯 Objetivo
|
|
48
|
+
|
|
49
|
+
[Breve descripción de lo que hace este PR]
|
|
50
|
+
|
|
51
|
+
## 📝 Cambios
|
|
52
|
+
|
|
53
|
+
### Repositorio: <nome-do-repo>
|
|
54
|
+
|
|
55
|
+
- [Cambio 1]
|
|
56
|
+
- [Cambio 2]
|
|
57
|
+
- [Cambio 3]
|
|
58
|
+
|
|
59
|
+
## 🔗 Relaciones
|
|
60
|
+
|
|
61
|
+
- **Issue**: <ISSUE-ID>
|
|
62
|
+
- **PRs Relacionados**:
|
|
63
|
+
- <repo-1>#<PR-number>
|
|
64
|
+
- <repo-2>#<PR-number>
|
|
65
|
+
|
|
66
|
+
## ✅ Checklist
|
|
67
|
+
|
|
68
|
+
- [ ] Código implementado y probado
|
|
69
|
+
- [ ] Pruebas unitarias añadidas/actualizadas
|
|
70
|
+
- [ ] Pruebas de integración pasando
|
|
71
|
+
- [ ] Documentación actualizada
|
|
72
|
+
- [ ] Sin breaking changes (o documentados)
|
|
73
|
+
- [ ] Revisado por pares (después de crear el PR)
|
|
74
|
+
|
|
75
|
+
## 🧪 Cómo Testear
|
|
76
|
+
|
|
77
|
+
1. [Paso 1]
|
|
78
|
+
2. [Paso 2]
|
|
79
|
+
3. [Resultado esperado]
|
|
80
|
+
|
|
81
|
+
## 📸 Screenshots/Demos
|
|
82
|
+
|
|
83
|
+
[Si aplica, añade capturas de pantalla o enlaces a demos]
|
|
84
|
+
|
|
85
|
+
## 🔍 Notas para Revisores
|
|
86
|
+
|
|
87
|
+
- [Punto de atención 1]
|
|
88
|
+
- [Punto de atención 2]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 4. Vincular PRs
|
|
92
|
+
|
|
93
|
+
Si hay múltiples PRs (uno por repositorio):
|
|
94
|
+
- Añade enlaces cruzados entre los PRs
|
|
95
|
+
- Documenta el orden de merge recomendado
|
|
96
|
+
- Indica dependencias entre PRs
|
|
97
|
+
|
|
98
|
+
### 5. Actualizar Issue en el Task Manager
|
|
99
|
+
|
|
100
|
+
Si el task manager está configurado:
|
|
101
|
+
- Mueve la issue a "En Revisión" o "PR Abierto"
|
|
102
|
+
- Añade enlaces de los PRs en la issue
|
|
103
|
+
- Añade comentario con resumen de los cambios
|
|
104
|
+
|
|
105
|
+
### 6. Documentación de la Sesión
|
|
106
|
+
|
|
107
|
+
Actualiza `./.sessions/<ISSUE-ID>/pr.md`:
|
|
108
|
+
|
|
109
|
+
```markdown
|
|
110
|
+
# [Título de la Feature] - Pull Requests
|
|
111
|
+
|
|
112
|
+
## PRs Creados
|
|
113
|
+
|
|
114
|
+
### <repo-1>
|
|
115
|
+
- **Link**: <URL del PR>
|
|
116
|
+
- **Estado**: Abierto
|
|
117
|
+
- **Commits**: X commits
|
|
118
|
+
|
|
119
|
+
### <repo-2>
|
|
120
|
+
- **Link**: <URL del PR>
|
|
121
|
+
- **Estado**: Abierto
|
|
122
|
+
- **Commits**: Y commits
|
|
123
|
+
|
|
124
|
+
## Orden de Merge Recomendado
|
|
125
|
+
|
|
126
|
+
1. <repo-1> - [Justificación]
|
|
127
|
+
2. <repo-2> - [Justificación]
|
|
128
|
+
|
|
129
|
+
## Notas para Merge
|
|
130
|
+
|
|
131
|
+
- [Nota importante 1]
|
|
132
|
+
- [Nota importante 2]
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## 🔍 Checklist Final
|
|
136
|
+
|
|
137
|
+
Antes de solicitar revisión:
|
|
138
|
+
- [ ] Todos los PRs creados
|
|
139
|
+
- [ ] Descripciones completas y claras
|
|
140
|
+
- [ ] PRs vinculados entre sí
|
|
141
|
+
- [ ] Issue actualizada en el task manager
|
|
142
|
+
- [ ] Pruebas pasando en CI/CD
|
|
143
|
+
- [ ] Documentación de la sesión completa
|
|
144
|
+
|
|
145
|
+
## 📢 Comunicación
|
|
146
|
+
|
|
147
|
+
Notifica al equipo sobre los PRs:
|
|
148
|
+
- Menciona revisores relevantes
|
|
149
|
+
- Destaca cambios críticos o breaking changes
|
|
150
|
+
- Indica urgencia si aplica
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
**Argumentos proporcionados**:
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
#$ARGUMENTS
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## 🎯 Próximos Pasos
|
|
163
|
+
|
|
164
|
+
1. Esperar revisión de los PRs
|
|
165
|
+
2. Responder comentarios y hacer ajustes
|
|
166
|
+
3. Tras la aprobación, hacer merge en el orden recomendado
|
|
167
|
+
4. Ejecutar `context-cli feature:end <ISSUE-ID>` para limpiar el workspace
|