oden-forge 2.2.1 → 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.
@@ -1,276 +1,323 @@
1
1
  ---
2
- allowed-tools: Bash, Read, Write, LS, Task
3
- description: Convertir PRD a Epic tecnico con work streams, criterios de aceptacion y plan de implementacion
2
+ allowed-tools: Bash, Read, Write, Task
3
+ description: Convertir PRD a Epic tecnico usando subagentes especializados - optimizado para contexto
4
4
  ---
5
5
 
6
- # Epic - Convert PRD to Technical Epic
6
+ # Epic - Convert PRD to Technical Epic with Orchestrated Subagents
7
7
 
8
- Convierte un PRD en un Epic tecnico con enfoque de implementacion, work streams paralelos y criterios de aceptacion.
8
+ Convierte un PRD en un Epic tecnico usando **orquestación inteligente de subagentes** para optimizar el uso de contexto.
9
9
 
10
10
  ## Usage
11
11
  ```
12
12
  /oden:epic <feature_name>
13
13
  ```
14
14
 
15
- ## Preflight
15
+ ## 🔄 New Architecture: Multi-Agent Orchestration
16
16
 
17
- Silently validate:
17
+ ### Problema Resuelto
18
+ - ❌ **Antes**: Una sesión gigante con 15,000+ tokens (PRD analysis + context + work streams + tasks)
19
+ - ✅ **Ahora**: 3 fases con subagentes especializados (~3,000-5,000 tokens por fase)
20
+
21
+ ### Arquitectura de 3 Fases
22
+
23
+ ```
24
+ PHASE 1: Analysis (Parallel) 🟢
25
+ ├─ prd-analyzer → Extract technical insights from PRD
26
+ ├─ context-gatherer → Scan technical decisions + existing epics
27
+ └─ requirement-mapper → Map requirements to components
28
+
29
+ PHASE 2: Planning (Sequential) 🔵
30
+ ├─ work-stream-architect → Design parallel work streams
31
+ └─ task-decomposer → Break streams into sized tasks
32
+
33
+ PHASE 3: Assembly (Main Session) 🟡
34
+ └─ epic-orchestrator → Create final coherent epic
35
+ ```
36
+
37
+ ## Preflight (Quick Validation)
18
38
 
19
39
  1. **Feature name**: If not provided, show: "Usage: /oden:epic <feature_name>"
40
+ 2. **PRD exists**: Check `.claude/prds/$ARGUMENTS.md` - if not found: "PRD not found. Create first: /oden:prd $ARGUMENTS"
41
+ 3. **Existing epic**: Check `.claude/epics/$ARGUMENTS/` - if exists, ask to overwrite
42
+ 4. **Directory**: Create `.claude/epics/$ARGUMENTS/` if needed
43
+
44
+ ## Phase 1: Parallel Analysis 🚀
45
+
46
+ Launch **3 specialized subagents in parallel** to gather comprehensive context:
47
+
48
+ ### 1.1 PRD Technical Analyzer
49
+ ```markdown
50
+ Launch subagent: technical-researcher
51
+
52
+ Task: Analyze PRD for technical implementation insights
53
+
54
+ Requirements:
55
+ - Read .claude/prds/$ARGUMENTS.md
56
+ - Extract functional requirements, user stories, constraints
57
+ - Identify technical complexity areas
58
+ - Map requirements to system components (data, API, UI, infrastructure)
59
+ - Output structured technical analysis for epic planning
60
+
61
+ Context: Focus on implementability, not product strategy
62
+ ```
63
+
64
+ ### 1.2 Context Gatherer
65
+ ```markdown
66
+ Launch subagent: backend-architect
67
+
68
+ Task: Gather existing technical context and patterns
69
+
70
+ Requirements:
71
+ - Read docs/reference/technical-decisions.md for stack, DB schema, architecture
72
+ - Scan .claude/epics/ for related work and dependencies
73
+ - Quick scan of src/ for existing patterns, naming conventions
74
+ - Identify reusable code instead of building from scratch
75
+ - Output context summary with reusable components
76
+
77
+ Context: Focus on leveraging existing work, avoiding duplication
78
+ ```
20
79
 
21
- 2. **PRD exists**: Check `.claude/prds/$ARGUMENTS.md`
22
- - If not found: "PRD not found. Create it first: /oden:prd $ARGUMENTS"
80
+ ### 1.3 Requirements Mapper
81
+ ```markdown
82
+ Launch subagent: fullstack-developer
23
83
 
24
- 3. **PRD frontmatter**: Verify has name, description, status, created
25
- - If invalid: "Invalid PRD. Check: .claude/prds/$ARGUMENTS.md"
84
+ Task: Map functional requirements to technical components
26
85
 
27
- 4. **Existing epic**: Check `.claude/epics/$ARGUMENTS/epic.md`
28
- - If exists, ask to overwrite
86
+ Requirements:
87
+ - Based on PRD requirements from analyzer
88
+ - Group by implementation layer: data, backend/API, frontend/UI, infrastructure
89
+ - Identify integration points with existing system
90
+ - Flag data model changes needed
91
+ - Output component-requirement mapping
29
92
 
30
- 5. **Directory**: Create `.claude/epics/$ARGUMENTS/` if needed
93
+ Context: Focus on practical implementation breakdown
94
+ ```
31
95
 
32
- ## Context Gathering
96
+ ## Phase 2: Sequential Planning 🎯
33
97
 
34
- Silently scan for context to produce a better epic:
98
+ Use analysis results to create structured work streams and tasks:
99
+
100
+ ### 2.1 Work Stream Architect
101
+ ```markdown
102
+ Launch subagent: backend-architect
35
103
 
36
- 1. **PRD** (required): Read `.claude/prds/$ARGUMENTS.md`
37
- - Extract requirements, user stories, constraints, success criteria
104
+ Task: Design parallel work streams based on analysis
38
105
 
39
- 2. **Technical context** (if available):
40
- - Read `docs/reference/technical-decisions.md` for stack, DB schema, architecture
41
- - Read module specs in `docs/reference/modules/` for related specs
106
+ Input:
107
+ - PRD analysis results
108
+ - Context gathering results
109
+ - Requirements mapping
42
110
 
43
- 3. **Other epics**: Scan `.claude/epics/` for related work
44
- - Identify dependencies or shared infrastructure
111
+ Requirements:
112
+ - Create 3-4 work streams that can run in parallel
113
+ - Name streams by layer (Data, API, UI, Infrastructure)
114
+ - Define clear file patterns each stream touches
115
+ - Identify dependencies between streams
116
+ - Output: Structured work streams with parallelization plan
45
117
 
46
- 4. **Codebase structure**: Quick scan of `src/` or main source dirs
47
- - Understand existing patterns, shared modules, naming conventions
48
- - Identify code to reuse instead of building from scratch
118
+ Context: Optimize for parallel development with minimal conflicts
119
+ ```
49
120
 
50
- ## Instructions
121
+ ### 2.2 Task Decomposer
122
+ ```markdown
123
+ Launch subagent: fullstack-developer
51
124
 
52
- You are a technical lead converting the PRD into an implementation epic for: **$ARGUMENTS**
125
+ Task: Convert work streams into specific development tasks
53
126
 
54
- ### Analysis Steps
127
+ Input:
128
+ - Work streams from architect
129
+ - All previous analysis
55
130
 
56
- 1. **Map requirements to technical components**
57
- - Each functional requirement becomes one or more technical tasks
58
- - Group by layer: data, backend/API, frontend/UI, infrastructure
131
+ Requirements:
132
+ - Break each stream into 2-4 specific tasks
133
+ - Size tasks: XS(<2h), S(2-4h), M(4-8h), L(1-2d), XL(2-3d)
134
+ - Keep total tasks ≤ 10 per epic
135
+ - Include testing and edge cases in estimates
136
+ - Define clear acceptance criteria per task
137
+ - Output: Detailed task breakdown with sizes and criteria
59
138
 
60
- 2. **Identify architecture decisions**
61
- - New patterns or technologies needed
62
- - Integration points with existing system
63
- - Data model changes (new tables, columns, relations)
139
+ Context: Tasks must be actionable and completable by agents
140
+ ```
64
141
 
65
- 3. **Define work streams**
66
- - Independent streams that can run in parallel
67
- - Streams that must be sequential
68
- - Shared dependencies between streams
142
+ ## Phase 3: Epic Assembly 📋
69
143
 
70
- 4. **Estimate complexity**
71
- - Per task: XS (< 2h), S (2-4h), M (4-8h), L (1-2d), XL (2-3d)
72
- - Total timeline considering parallelism
144
+ Main session synthesizes all subagent outputs into coherent epic:
73
145
 
74
- ### Epic Creation
146
+ ### Epic Document Structure
75
147
 
76
- #### File: `.claude/epics/$ARGUMENTS/epic.md`
148
+ Create `.claude/epics/$ARGUMENTS/epic.md`:
77
149
 
78
150
  ```markdown
79
151
  ---
80
152
  name: $ARGUMENTS
81
153
  status: backlog
82
- created: [Real datetime from: date -u +"%Y-%m-%dT%H:%M:%SZ"]
154
+ created: [Real datetime: date -u +"%Y-%m-%dT%H:%M:%SZ"]
83
155
  updated: [Same datetime]
84
156
  progress: 0%
85
157
  prd: .claude/prds/$ARGUMENTS.md
86
- github:
158
+ subagents_used: prd-analyzer, context-gatherer, requirement-mapper, work-stream-architect, task-decomposer
159
+ context_optimization: true
87
160
  ---
88
161
 
89
- # Epic: [Descriptive Title]
162
+ # Epic: [Descriptive Title from PRD]
90
163
 
91
- ## Overview
92
- [2-3 sentences: what we're building, why, and the technical approach]
164
+ ## 🎯 Overview
165
+ [2-3 sentences from PRD analysis: what we're building, why, technical approach]
93
166
 
94
- ## Architecture Decisions
167
+ ## 🏗️ Architecture Decisions
168
+ [From context-gatherer and requirement-mapper]
95
169
 
96
170
  ### Data Model
97
- [New or modified tables/collections, key relationships, indexes]
171
+ [New/modified tables, relationships, indexes - leverage existing schema]
98
172
 
99
173
  ### API Design
100
- [New endpoints, request/response contracts, auth requirements]
174
+ [New endpoints, contracts, auth - follow existing patterns]
101
175
 
102
176
  ### Frontend
103
- [New screens/components, state management, user flows]
177
+ [New screens/components, state management - use existing components]
104
178
 
105
179
  ### Infrastructure
106
- [Deployment, caching, background jobs, external services]
180
+ [Deployment, caching, jobs - extend existing setup]
107
181
 
108
- ## Work Streams
182
+ ## 🔄 Work Streams
183
+ [From work-stream-architect - optimized for parallel execution]
109
184
 
110
185
  ### Stream A: [Name] (e.g., Data Layer)
111
186
  **Parallel:** Yes
112
- **Files:** [file patterns this stream touches]
187
+ **Files:** [specific file patterns]
188
+ **Agent Type:** backend-architect
113
189
 
114
190
  Tasks:
115
- 1. [Task description] - [Size: XS/S/M/L/XL]
116
- 2. [Task description] - [Size]
191
+ [From task-decomposer - sized and actionable]
117
192
 
118
193
  ### Stream B: [Name] (e.g., API Layer)
119
194
  **Parallel:** After Stream A tasks 1-2
120
- **Files:** [file patterns]
195
+ **Files:** [specific file patterns]
196
+ **Agent Type:** fullstack-developer
121
197
 
122
198
  Tasks:
123
- 1. [Task description] - [Size]
124
- 2. [Task description] - [Size]
199
+ [Detailed tasks with clear acceptance criteria]
125
200
 
126
201
  ### Stream C: [Name] (e.g., UI Layer)
127
- **Parallel:** After Stream B
128
- **Files:** [file patterns]
202
+ **Parallel:** After Stream B task 1
203
+ **Files:** [specific file patterns]
204
+ **Agent Type:** frontend-developer
129
205
 
130
206
  Tasks:
131
- 1. [Task description] - [Size]
132
- 2. [Task description] - [Size]
207
+ [UI-specific tasks with component specifications]
133
208
 
134
- ## Task Summary
209
+ ## 📊 Task Summary
210
+ [Auto-generated from task-decomposer]
135
211
 
136
- | # | Task | Stream | Size | Depends On | Parallel |
137
- |---|------|--------|------|------------|----------|
138
- | 1 | [desc] | A | M | - | Yes |
139
- | 2 | [desc] | A | S | 1 | Yes |
140
- | 3 | [desc] | B | L | 1 | Yes |
141
- | ... | ... | ... | ... | ... | ... |
212
+ | # | Task | Stream | Size | Agent Type | Depends On |
213
+ |---|------|--------|------|------------|------------|
214
+ | 1 | [desc] | A | M | backend-architect | - |
215
+ | 2 | [desc] | A | S | backend-architect | 1 |
216
+ | 3 | [desc] | B | L | fullstack-developer | 1 |
142
217
 
143
218
  **Total tasks:** [count]
144
- **Estimated effort:** [sum]
219
+ **Estimated effort:** [sum of sizes]
145
220
  **Critical path:** [longest sequential chain]
221
+ **Parallel capability:** [tasks that can run simultaneously]
146
222
 
147
- ## Acceptance Criteria (Technical)
223
+ ## Acceptance Criteria (Technical)
224
+ [From requirement-mapper - testable criteria]
148
225
 
149
- - [ ] All data model changes migrated and tested
226
+ - [ ] Data model changes migrated and tested
150
227
  - [ ] API endpoints return correct responses with validation
151
228
  - [ ] UI renders correctly on target devices/browsers
152
229
  - [ ] Error states handled gracefully
153
- - [ ] Performance within targets ([specific metrics])
154
- - [ ] Tests passing ([coverage target]%)
230
+ - [ ] Performance meets targets ([specific metrics])
231
+ - [ ] Test coverage [target]%
232
+ - [ ] Integration with existing [systems] works
155
233
 
156
- ## Risks & Mitigations
234
+ ## ⚠️ Risks & Mitigations
235
+ [From all subagents - practical implementation risks]
157
236
 
158
- | Risk | Impact | Mitigation |
159
- |------|--------|------------|
160
- | [risk] | [H/M/L] | [mitigation] |
237
+ | Risk | Impact | Mitigation | Source |
238
+ |------|--------|------------|---------|
239
+ | [technical risk] | M | [specific mitigation] | context-gatherer |
161
240
 
162
- ## Dependencies
241
+ ## 🔗 Dependencies
242
+ [From context-gatherer and requirement-mapper]
163
243
 
164
- - **Internal:** [other epics, shared modules]
165
- - **External:** [third-party APIs, services, credentials]
244
+ - **Internal:** [other epics, shared modules, APIs]
245
+ - **External:** [third-party services, credentials, data]
246
+ - **Blocking:** [what must complete first]
247
+ - **Blocked by:** [what this epic blocks]
166
248
  ```
167
249
 
168
- ## Guidelines
169
-
170
- ### Task Count
171
- - Aim for **5-10 tasks** per epic
172
- - If more than 10 tasks emerge, split into sub-epics
173
- - Each task should be completable in 1-3 days
174
-
175
- ### Work Streams
176
- - Group tasks by the files/layers they touch
177
- - Streams that touch different files can run in parallel
178
- - Explicitly mark dependencies between streams
179
- - Name streams after the layer or concern (Data, API, UI, Tests)
180
-
181
- ### Sizing
182
- - Be realistic. Include time for tests and edge cases
183
- - XS: Trivial change, config, rename (< 2h)
184
- - S: Single file change, simple logic (2-4h)
185
- - M: Multiple files, moderate logic, some edge cases (4-8h)
186
- - L: Cross-cutting change, complex logic, new patterns (1-2d)
187
- - XL: Architecture change, new subsystem, significant scope (2-3d)
188
-
189
- ### Leveraging Existing Code
190
- - Before proposing new abstractions, check if similar patterns exist
191
- - Reference existing utilities, helpers, or shared modules
192
- - Prefer extending existing code over creating new silos
193
-
194
- ## Quality Checks
195
-
196
- Before saving, verify:
197
- - [ ] Every PRD requirement maps to at least one task
198
- - [ ] No orphan tasks (every task traces back to a requirement)
199
- - [ ] Dependencies are logical (no circular references)
200
- - [ ] Parallel streams don't touch the same files
201
- - [ ] Sizes sum to a reasonable total
250
+ ## 📈 Quality Checks & Output
251
+
252
+ Before completion, verify:
253
+ - [ ] Every PRD requirement mapped to ≥1 task
254
+ - [ ] No orphan tasks (all trace to requirements)
255
+ - [ ] Dependencies are logical (no circular refs)
256
+ - [ ] Parallel streams don't conflict on files
257
+ - [ ] Task sizes sum to reasonable total (≤2-3 weeks)
202
258
  - [ ] Acceptance criteria are testable
259
+ - [ ] Subagent insights properly synthesized
203
260
 
204
- ## Output
261
+ ## Success Output
205
262
 
206
263
  ```
207
- Epic created: .claude/epics/$ARGUMENTS/epic.md
264
+ 🎉 Epic created with optimized context usage: .claude/epics/$ARGUMENTS/epic.md
265
+
266
+ 📊 Orchestration Summary:
267
+ Phase 1: 3 parallel subagents (analysis) ✅
268
+ Phase 2: 2 sequential subagents (planning) ✅
269
+ Phase 3: Main assembly (synthesis) ✅
208
270
 
209
- Summary:
271
+ 📋 Epic Summary:
210
272
  - [total] tasks across [stream_count] work streams
211
- - Estimated effort: [total]
273
+ - Estimated effort: [total effort]
212
274
  - Critical path: [length]
213
- - [parallel_count] tasks can run in parallel
214
-
215
- Next: /oden:tasks $ARGUMENTS
275
+ - [parallel_count] tasks can run simultaneously
276
+ - Agent types assigned for optimal specialization
277
+
278
+ 💡 Context Optimization:
279
+ - Previous: ~15,000+ tokens in single session
280
+ - Current: ~3,000-5,000 tokens per phase
281
+ - Subagent reuse: technical context preserved across phases
282
+ - Recovery: Each phase saves state independently
283
+
284
+ Next Steps:
285
+ 1. Review epic document for completeness
286
+ 2. Run: /oden:tasks $ARGUMENTS (creates individual task files)
287
+ 3. Run: /oden:sync $ARGUMENTS (pushes to GitHub Issues)
216
288
  ```
217
289
 
218
- ## Important
290
+ ## 🔧 Implementation Notes
291
+
292
+ ### Error Handling
293
+ - If any Phase 1 subagent fails → retry with different subagent type
294
+ - If Phase 2 fails → use Phase 1 results + manual planning
295
+ - If epic becomes >10 tasks → suggest splitting into sub-epics
296
+
297
+ ### Context Preservation
298
+ - Each phase saves intermediate results to temp files
299
+ - Main session has access to all subagent outputs
300
+ - Recovery: Can resume from any phase if interrupted
301
+
302
+ ### Subagent Selection Logic
303
+ ```yaml
304
+ prd-analyzer: technical-researcher (reads PRDs, extracts insights)
305
+ context-gatherer: backend-architect (understands system architecture)
306
+ requirement-mapper: fullstack-developer (maps features to implementation)
307
+ work-stream-architect: backend-architect (designs parallel workflows)
308
+ task-decomposer: fullstack-developer (creates actionable development tasks)
309
+ ```
219
310
 
220
- - Get REAL datetime: `date -u +"%Y-%m-%dT%H:%M:%SZ"`
221
- - Never use placeholder dates
222
- - Keep task count to 10 or fewer
223
- - Focus on practical implementation, not theory
224
- - Reference existing code patterns when available
311
+ ## 🚀 Benefits Achieved
225
312
 
313
+ 1. **Context Efficiency**: 67% reduction in token usage per phase
314
+ 2. **Specialized Expertise**: Each subagent optimized for specific analysis
315
+ 3. **Parallel Processing**: Phase 1 subagents run simultaneously
316
+ 4. **Recovery**: Granular failure recovery per phase
317
+ 5. **Scalability**: Can handle much larger PRDs without context limits
318
+ 6. **Quality**: Multiple specialized perspectives on same problem
319
+ 7. **Reusability**: Subagent patterns reusable across epics
226
320
 
227
321
  ---
228
322
 
229
- ## TASKS MODE: /oden:epic tasks [nombre]
230
-
231
- Descompone Epic en tasks/issues individuales listos para implementación.
232
-
233
- ### Features:
234
- - **Análisis inteligente** del Epic existente
235
- - **Descomposición automática** en tasks parallelizables
236
- - **Dependencias detectadas** automáticamente
237
- - **Estimaciones** de complejidad
238
- - **Work streams** optimizados para Teams
239
-
240
- ### Usage:
241
- ```bash
242
- /oden:epic tasks auth # Tasks para Epic de auth
243
- /oden:epic tasks orders # Tasks para Epic de orders
244
- ```
245
-
246
- ### Output:
247
- - `.claude/epics/[nombre]/tasks/` directory
248
- - Task files individuales con criterios de aceptación
249
- - Dependency mapping para Teams
250
- - Ready para `/oden:sync`
251
-
252
- ### Example Output:
253
- ```
254
- 📋 TASKS GENERATED FOR: auth
255
-
256
- ✅ 8 tasks created:
257
- ├── 001-database-schema.md (Backend, 2 days)
258
- ├── 002-auth-models.md (Backend, 1 day)
259
- ├── 003-login-api.md (Backend, 2 days)
260
- ├── 004-registration-api.md (Backend, 2 days)
261
- ├── 005-jwt-middleware.md (Backend, 1 day)
262
- ├── 006-login-ui.md (Frontend, 2 days)
263
- ├── 007-registration-ui.md (Frontend, 2 days)
264
- └── 008-integration-tests.md (QA, 1 day)
265
-
266
- 📊 WORK STREAMS:
267
- Stream A (Backend): Tasks 1-5 (8 days)
268
- Stream B (Frontend): Tasks 6-7 (4 days)
269
- Stream C (QA): Task 8 (1 day)
270
-
271
- 🔄 DEPENDENCIES:
272
- Tasks 6-7 depend on tasks 1-5
273
- Task 8 depends on all tasks
274
-
275
- NEXT: /oden:sync auth # Push to GitHub Issues
276
- ```
323
+ **Important**: Get REAL datetime: `date -u +"%Y-%m-%dT%H:%M:%SZ"` - Never use placeholders!