elsabro 6.0.0 → 7.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/agents/elsabro-orchestrator.md +39 -0
- package/bin/install.js +8 -4
- package/commands/elsabro/add-phase.md +20 -0
- package/commands/elsabro/complete-milestone.md +20 -0
- package/commands/elsabro/design-ui.md +21 -0
- package/commands/elsabro/execute.md +132 -12
- package/commands/elsabro/new-milestone.md +23 -0
- package/commands/elsabro/party.md +80 -23
- package/commands/elsabro/quick.md +19 -2
- package/flow-engine/src/agent-cards.json +74 -0
- package/flow-engine/src/callbacks.js +268 -0
- package/flow-engine/src/cli.js +597 -0
- package/flow-engine/src/executors.js +14 -1
- package/flow-engine/src/index.js +4 -2
- package/flow-engine/src/party.js +414 -0
- package/flow-engine/src/runner.js +5 -5
- package/flow-engine/tests/callbacks.test.js +274 -0
- package/flow-engine/tests/cli.test.js +208 -0
- package/flow-engine/tests/executors-complex.test.js +61 -1
- package/flow-engine/tests/integration.test.js +667 -38
- package/flow-engine/tests/party.test.js +724 -0
- package/flows/development-flow.json +104 -120
- package/package.json +5 -3
- package/references/next-step-engine.md +19 -0
- package/references/state-sync.md +15 -0
|
@@ -345,6 +345,45 @@ Archivos modificados:
|
|
|
345
345
|
- `elsabro-qa` - Para testing paralelo
|
|
346
346
|
</integration_with_elsabro>
|
|
347
347
|
|
|
348
|
+
<party_mode>
|
|
349
|
+
## Party Mode (Moderation)
|
|
350
|
+
|
|
351
|
+
When invoked as Party Master via `onSynthesize` callback in `/elsabro:party`:
|
|
352
|
+
|
|
353
|
+
### Role
|
|
354
|
+
- Synthesize multi-agent debate into consensus/debates/actions
|
|
355
|
+
- Identify agreement vs disagreement patterns across rounds
|
|
356
|
+
- Weight later-round positions higher (refined after discussion)
|
|
357
|
+
- Format synthesis as structured JSON for PartyEngine
|
|
358
|
+
|
|
359
|
+
### Synthesis Contract
|
|
360
|
+
|
|
361
|
+
Input: Full discussion history with agent names, rounds, and responses.
|
|
362
|
+
|
|
363
|
+
Output JSON:
|
|
364
|
+
```json
|
|
365
|
+
{
|
|
366
|
+
"consensus": ["Points all agents agreed on"],
|
|
367
|
+
"debates": ["Points with disagreement, with each agent's position"],
|
|
368
|
+
"actionItems": ["Concrete next steps derived from discussion"],
|
|
369
|
+
"keyInsights": ["Non-obvious insights that emerged from the debate"],
|
|
370
|
+
"suggestedNext": "plan|execute|discuss-phase|research-phase"
|
|
371
|
+
}
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### Integration
|
|
375
|
+
- PartyEngine calls `onSynthesize({ history, topic, agents })`
|
|
376
|
+
- Quantum receives the full debate history and produces structured output
|
|
377
|
+
- The synthesis is used to generate PARTY-SUMMARY.md and update state.json
|
|
378
|
+
- `suggestedNext` drives the next-step-engine recommendation
|
|
379
|
+
|
|
380
|
+
### Agent Coordination in Party Mode
|
|
381
|
+
Unlike parallel execution (waves), Party Mode is **sequential deliberation**:
|
|
382
|
+
- Each agent speaks one at a time within a round
|
|
383
|
+
- History is cumulative — each agent sees all prior responses
|
|
384
|
+
- Quantum synthesizes only after all rounds complete
|
|
385
|
+
</party_mode>
|
|
386
|
+
|
|
348
387
|
<agent_teams>
|
|
349
388
|
## Agent Teams Integration (v4.2.0 — Mandatory)
|
|
350
389
|
|
package/bin/install.js
CHANGED
|
@@ -239,8 +239,8 @@ if (hasUpdate) {
|
|
|
239
239
|
console.log(` ${yellow}⚠${reset} No se pudo verificar la última versión`);
|
|
240
240
|
console.log(` ${dim}Intentando actualizar de todas formas...${reset}\n`);
|
|
241
241
|
} else if (latestVersion === pkg.version) {
|
|
242
|
-
console.log(` ${green}✓${reset}
|
|
243
|
-
|
|
242
|
+
console.log(` ${green}✓${reset} Versión actual: ${pkg.version} (ya es la última)`);
|
|
243
|
+
console.log(` ${dim}Reinstalando archivos locales...${reset}\n`);
|
|
244
244
|
} else {
|
|
245
245
|
console.log(` ${cyan}Nueva versión disponible: ${latestVersion}${reset}`);
|
|
246
246
|
console.log(` ${dim}Versión actual: ${pkg.version}${reset}\n`);
|
|
@@ -357,7 +357,9 @@ async function install() {
|
|
|
357
357
|
{ src: 'templates', dest: 'templates', name: 'Templates' },
|
|
358
358
|
{ src: 'workflows', dest: 'workflows', name: 'Workflows' },
|
|
359
359
|
{ src: 'references', dest: 'references', name: 'Referencias' },
|
|
360
|
-
{ src: 'hooks/dist', dest: 'hooks', name: 'Hooks' }
|
|
360
|
+
{ src: 'hooks/dist', dest: 'hooks', name: 'Hooks' },
|
|
361
|
+
{ src: 'flows', dest: 'flows', name: 'Flows' },
|
|
362
|
+
{ src: 'flow-engine', dest: 'flow-engine', name: 'Flow Engine' }
|
|
361
363
|
];
|
|
362
364
|
|
|
363
365
|
const failures = [];
|
|
@@ -465,7 +467,9 @@ async function uninstall() {
|
|
|
465
467
|
'skills',
|
|
466
468
|
'templates',
|
|
467
469
|
'workflows',
|
|
468
|
-
'references'
|
|
470
|
+
'references',
|
|
471
|
+
'flows',
|
|
472
|
+
'flow-engine'
|
|
469
473
|
];
|
|
470
474
|
|
|
471
475
|
for (const item of toRemove) {
|
|
@@ -4,6 +4,7 @@ description: Agregar una nueva fase al final del milestone actual
|
|
|
4
4
|
sync:
|
|
5
5
|
reads: [".elsabro/state.json"]
|
|
6
6
|
writes: [".elsabro/state.json"]
|
|
7
|
+
agents: [elsabro-scrum-master]
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# /elsabro:add-phase
|
|
@@ -116,6 +117,25 @@ Actualiza `PHASES.md` y `MILESTONE.md`:
|
|
|
116
117
|
- Verifica nombre único de fase
|
|
117
118
|
- Sugiere dependencias basado en orden
|
|
118
119
|
|
|
120
|
+
## Agent Validation (Scrum Master)
|
|
121
|
+
|
|
122
|
+
After phase definition but before writing to PHASES.md, validate using Bob (scrum-master):
|
|
123
|
+
|
|
124
|
+
```javascript
|
|
125
|
+
Task({
|
|
126
|
+
subagent_type: "elsabro-scrum-master",
|
|
127
|
+
model: "haiku",
|
|
128
|
+
prompt: `Validate this new phase:
|
|
129
|
+
Phase: ${phaseName}
|
|
130
|
+
Description: ${phaseDescription}
|
|
131
|
+
Milestone: ${milestoneContext}
|
|
132
|
+
Existing phases: ${existingPhases}
|
|
133
|
+
|
|
134
|
+
Check: Dependencies ok? Effort estimate reasonable? Overlap with existing phases?
|
|
135
|
+
Return brief validation with any concerns.`
|
|
136
|
+
})
|
|
137
|
+
```
|
|
138
|
+
|
|
119
139
|
## Output
|
|
120
140
|
|
|
121
141
|
```
|
|
@@ -4,6 +4,7 @@ description: Cerrar un milestone completado con retrospectiva y documentacion de
|
|
|
4
4
|
sync:
|
|
5
5
|
reads: [".elsabro/state.json"]
|
|
6
6
|
writes: [".elsabro/state.json", ".elsabro/context.md"]
|
|
7
|
+
agents: [elsabro-tech-writer]
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# /elsabro:complete-milestone
|
|
@@ -87,6 +88,25 @@ Si todas las verificaciones pasan, genera `.planning/milestones/M001-xxx/RETROSP
|
|
|
87
88
|
- [Shoutouts]
|
|
88
89
|
```
|
|
89
90
|
|
|
91
|
+
### Paso 2.5: Polish Retrospective (Tech Writer)
|
|
92
|
+
|
|
93
|
+
After auto-generating the retrospective template, invoke Paige (tech-writer) to polish it into a readable narrative:
|
|
94
|
+
|
|
95
|
+
```javascript
|
|
96
|
+
Task({
|
|
97
|
+
subagent_type: "elsabro-tech-writer",
|
|
98
|
+
model: "haiku",
|
|
99
|
+
prompt: `Polish this retrospective into a readable narrative:
|
|
100
|
+
Template: ${autoGeneratedRetrospective}
|
|
101
|
+
Milestone: ${milestoneName} — ${milestoneObjectives}
|
|
102
|
+
|
|
103
|
+
Enhance: Turn bullets into cohesive narrative, highlight key learnings,
|
|
104
|
+
create 'what we shipped' summary. Keep concise and professional.`
|
|
105
|
+
})
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Replace the template-generated retrospective with Paige's polished version before saving.
|
|
109
|
+
|
|
90
110
|
### Paso 3: Actualizar Status
|
|
91
111
|
|
|
92
112
|
Actualiza `MILESTONE.md`:
|
|
@@ -18,6 +18,7 @@ allowed-tools:
|
|
|
18
18
|
- mcp__stitch__get_screen
|
|
19
19
|
- mcp__stitch__generate_screen_from_text
|
|
20
20
|
argument-hint: "[descripción de la interfaz o número de fase]"
|
|
21
|
+
agents: [elsabro-ux-designer]
|
|
21
22
|
sync:
|
|
22
23
|
reads: [".elsabro/state.json", ".planning/*-PLAN.md"]
|
|
23
24
|
writes: [".elsabro/state.json", ".elsabro/context.md", ".planning/ui-designs/"]
|
|
@@ -225,6 +226,26 @@ for (const screen of screens) {
|
|
|
225
226
|
}
|
|
226
227
|
```
|
|
227
228
|
|
|
229
|
+
## Paso 3.5: UX Review (Sally)
|
|
230
|
+
|
|
231
|
+
After initial screen generation, invoke Sally (ux-designer) for UX quality review:
|
|
232
|
+
|
|
233
|
+
```javascript
|
|
234
|
+
Task({
|
|
235
|
+
subagent_type: "elsabro-ux-designer",
|
|
236
|
+
model: "sonnet",
|
|
237
|
+
prompt: `Review these generated screens for UX quality:
|
|
238
|
+
Screens: ${generatedScreenDescriptions}
|
|
239
|
+
Tech stack: ${state.context.tech_stack}
|
|
240
|
+
|
|
241
|
+
Check: Accessibility (contrast, touch targets, ARIA),
|
|
242
|
+
flow consistency, mobile responsiveness, brand alignment.
|
|
243
|
+
Suggest specific refinements with priority.`
|
|
244
|
+
})
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Apply Sally's refinement suggestions before showing screens to the user.
|
|
248
|
+
|
|
228
249
|
## Paso 4: Revisar y Refinar
|
|
229
250
|
|
|
230
251
|
### 4.1 Listar screens generados
|
|
@@ -1373,20 +1373,140 @@ Al completar un plan:
|
|
|
1373
1373
|
</summary_creation>
|
|
1374
1374
|
|
|
1375
1375
|
<engine_integration>
|
|
1376
|
-
## Flow Engine (
|
|
1376
|
+
## Flow Engine (v7.0.0) + CLI
|
|
1377
1377
|
|
|
1378
|
-
The flow engine runtime is
|
|
1379
|
-
|
|
1378
|
+
The flow engine runtime is at `flow-engine/src/index.js`.
|
|
1379
|
+
The CLI is at `flow-engine/src/cli.js` (also `npm run flow` or `elsabro-flow`).
|
|
1380
1380
|
|
|
1381
|
-
|
|
1382
|
-
Not-implemented nodes throw NotImplementedError with gap descriptions.
|
|
1381
|
+
### Quick Reference
|
|
1383
1382
|
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
engine.
|
|
1390
|
-
|
|
1383
|
+
```bash
|
|
1384
|
+
# Validate flow + see team compositions
|
|
1385
|
+
node flow-engine/src/cli.js validate --flow flows/development-flow.json
|
|
1386
|
+
|
|
1387
|
+
# Dry-run (full path, mock callbacks)
|
|
1388
|
+
node flow-engine/src/cli.js dry-run --flow flows/development-flow.json --task "feature" --profile default
|
|
1389
|
+
|
|
1390
|
+
# Step-based execution
|
|
1391
|
+
node flow-engine/src/cli.js init --flow flows/development-flow.json --task "build auth" --profile default
|
|
1392
|
+
node flow-engine/src/cli.js step --flow flows/development-flow.json
|
|
1393
|
+
node flow-engine/src/cli.js complete --flow flows/development-flow.json --result '{"output": "done"}'
|
|
1394
|
+
node flow-engine/src/cli.js status --flow flows/development-flow.json
|
|
1391
1395
|
```
|
|
1392
1396
|
</engine_integration>
|
|
1397
|
+
|
|
1398
|
+
<cli_driven_execution>
|
|
1399
|
+
## CLI-Driven Execution (v7.0.0)
|
|
1400
|
+
|
|
1401
|
+
The CLI manages graph traversal. It auto-resolves simple nodes (entry, condition, router, exit)
|
|
1402
|
+
and stops at actionable nodes, emitting a JSON instruction. Claude follows the instruction,
|
|
1403
|
+
then calls `complete` to advance.
|
|
1404
|
+
|
|
1405
|
+
### Main Loop
|
|
1406
|
+
|
|
1407
|
+
```
|
|
1408
|
+
init → [step → execute instruction → complete]* → step (finished)
|
|
1409
|
+
```
|
|
1410
|
+
|
|
1411
|
+
1. **init**: Creates checkpoint at entry node
|
|
1412
|
+
2. **step**: Auto-resolves through conditions/routers, stops at actionable node, returns instruction JSON
|
|
1413
|
+
3. **execute instruction**: Claude executes based on instruction type (see below)
|
|
1414
|
+
4. **complete**: Stores result, advances checkpoint to next node
|
|
1415
|
+
5. Repeat step→execute→complete until `step` returns `{ finished: true }`
|
|
1416
|
+
|
|
1417
|
+
### Instruction Types
|
|
1418
|
+
|
|
1419
|
+
#### `type: "agent"` → Launch single subagent
|
|
1420
|
+
```javascript
|
|
1421
|
+
// instruction: { type: "agent", nodeId, agent, model, inputs }
|
|
1422
|
+
Task({
|
|
1423
|
+
subagent_type: instruction.agent,
|
|
1424
|
+
model: instruction.model,
|
|
1425
|
+
prompt: `Execute task with inputs: ${JSON.stringify(instruction.inputs)}`
|
|
1426
|
+
})
|
|
1427
|
+
```
|
|
1428
|
+
|
|
1429
|
+
#### `type: "parallel"` with `useAgentTeams: false` → Launch subagents (haiku exploration)
|
|
1430
|
+
```javascript
|
|
1431
|
+
// instruction: { type: "parallel", nodeId, useAgentTeams: false, branches }
|
|
1432
|
+
// All-haiku branches → regular subagents, no team needed
|
|
1433
|
+
for (const branch of instruction.branches) {
|
|
1434
|
+
Task({
|
|
1435
|
+
subagent_type: branch.agent,
|
|
1436
|
+
model: "haiku",
|
|
1437
|
+
prompt: `Execute: ${JSON.stringify(branch.inputs)}`
|
|
1438
|
+
})
|
|
1439
|
+
}
|
|
1440
|
+
```
|
|
1441
|
+
|
|
1442
|
+
#### `type: "parallel"` with `useAgentTeams: true` → Use Agent Teams (min 5 members)
|
|
1443
|
+
```javascript
|
|
1444
|
+
// instruction: { type: "parallel", nodeId, useAgentTeams: true, team: { name, members[5+] }, branches }
|
|
1445
|
+
//
|
|
1446
|
+
// The engine composed a team of 5+ members:
|
|
1447
|
+
// - Core branch agents (from flow definition)
|
|
1448
|
+
// - Support agents (verifier, qa, debugger, etc.) padded to minimum 5
|
|
1449
|
+
//
|
|
1450
|
+
// Claude Code handles team lifecycle automatically:
|
|
1451
|
+
|
|
1452
|
+
TeamCreate({
|
|
1453
|
+
team_name: instruction.team.name,
|
|
1454
|
+
description: instruction.team.description
|
|
1455
|
+
})
|
|
1456
|
+
|
|
1457
|
+
// Launch ALL team members (not just branches — the full team of 5+)
|
|
1458
|
+
for (const member of instruction.team.members) {
|
|
1459
|
+
Task({
|
|
1460
|
+
subagent_type: member.agent,
|
|
1461
|
+
model: member.model,
|
|
1462
|
+
team_name: instruction.team.name,
|
|
1463
|
+
name: member.name,
|
|
1464
|
+
prompt: `Role: ${member.role}. Execute your part of ${instruction.nodeId}.`
|
|
1465
|
+
})
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
// When all complete:
|
|
1469
|
+
for (const member of instruction.team.members) {
|
|
1470
|
+
SendMessage({ type: "shutdown_request", recipient: member.name, content: "Done" })
|
|
1471
|
+
}
|
|
1472
|
+
TeamDelete()
|
|
1473
|
+
```
|
|
1474
|
+
|
|
1475
|
+
#### `type: "interrupt"` → Ask user
|
|
1476
|
+
```javascript
|
|
1477
|
+
// instruction: { type: "interrupt", nodeId, display, routes, reason }
|
|
1478
|
+
AskUserQuestion({
|
|
1479
|
+
questions: [{
|
|
1480
|
+
question: instruction.display.title,
|
|
1481
|
+
options: instruction.display.options.map(o => ({ label: o.label, description: o.id }))
|
|
1482
|
+
}]
|
|
1483
|
+
})
|
|
1484
|
+
// User's selection maps to a route key → pass as result to complete
|
|
1485
|
+
```
|
|
1486
|
+
|
|
1487
|
+
#### `type: "sequence"` → Execute steps inline
|
|
1488
|
+
```javascript
|
|
1489
|
+
// instruction: { type: "sequence", nodeId, steps }
|
|
1490
|
+
for (const step of instruction.steps) {
|
|
1491
|
+
if (step.action === "bash") Bash(step.command)
|
|
1492
|
+
if (step.action === "agent") Task({ subagent_type: step.agent, ... })
|
|
1493
|
+
if (step.action === "read_files") Read(step.files)
|
|
1494
|
+
}
|
|
1495
|
+
```
|
|
1496
|
+
|
|
1497
|
+
### Team Compositions (from validate)
|
|
1498
|
+
|
|
1499
|
+
| Node | Core | Padded to 5 with | Total |
|
|
1500
|
+
|------|------|-------------------|-------|
|
|
1501
|
+
| `standard_analyze` | 4 haiku | NO TEAM (subagents) | 4 subagents |
|
|
1502
|
+
| `parallel_implementation` | executor, qa | + verifier, analyst, debugger | 5 |
|
|
1503
|
+
| `fix_issues` | debugger, error-detective, refactor | + verifier, qa | 5 |
|
|
1504
|
+
| `parallel_review` | code-reviewer, silent-failure, staff | + verifier, qa | 5 |
|
|
1505
|
+
|
|
1506
|
+
### Rules
|
|
1507
|
+
|
|
1508
|
+
1. **Minimum 5 teammates** — Every Agent Team has at least 5 members
|
|
1509
|
+
2. **Haiku exception** — All-haiku parallel nodes use subagents, not teams
|
|
1510
|
+
3. **One team at a time** — Cleanup before creating next team
|
|
1511
|
+
4. **Cleanup required** — SendMessage shutdown + TeamDelete after each team
|
|
1512
|
+
</cli_driven_execution>
|
|
@@ -4,6 +4,7 @@ description: Crear un nuevo milestone con objetivos, timeline y métricas de éx
|
|
|
4
4
|
sync:
|
|
5
5
|
reads: [".elsabro/state.json"]
|
|
6
6
|
writes: [".elsabro/state.json", ".elsabro/context.md"]
|
|
7
|
+
agents: [elsabro-scrum-master]
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# /elsabro:new-milestone
|
|
@@ -149,6 +150,28 @@ P6: Launch (W10)
|
|
|
149
150
|
- Linked con `/elsabro:complete-milestone` para cierre
|
|
150
151
|
- Linked con `/elsabro:audit-milestone` para revisión
|
|
151
152
|
|
|
153
|
+
## Agent Validation (Scrum Master)
|
|
154
|
+
|
|
155
|
+
After the user defines objectives, timeline, and phases, validate the milestone definition using Bob (scrum-master) before generating the folder structure:
|
|
156
|
+
|
|
157
|
+
```javascript
|
|
158
|
+
Task({
|
|
159
|
+
subagent_type: "elsabro-scrum-master",
|
|
160
|
+
model: "haiku",
|
|
161
|
+
prompt: `Validate this milestone definition:
|
|
162
|
+
Name: ${milestoneName}
|
|
163
|
+
Objectives: ${objectives}
|
|
164
|
+
Timeline: ${timeline}
|
|
165
|
+
Phases: ${phases}
|
|
166
|
+
|
|
167
|
+
Check: Are timelines realistic? Are phases ordered by dependencies?
|
|
168
|
+
Are there scope risks? Suggest adjustments if needed.
|
|
169
|
+
Return a brief validation summary with any warnings.`
|
|
170
|
+
})
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
If Bob identifies issues, present them to the user before proceeding.
|
|
174
|
+
|
|
152
175
|
<siguiente_paso>
|
|
153
176
|
## Siguiente Paso
|
|
154
177
|
|
|
@@ -3,7 +3,8 @@ name: party
|
|
|
3
3
|
description: Party Mode - Discusion multi-agente colaborativa donde 2-3 agentes debaten un tema desde diferentes perspectivas
|
|
4
4
|
sync:
|
|
5
5
|
reads: [".elsabro/state.json"]
|
|
6
|
-
writes: [".elsabro/state.json"]
|
|
6
|
+
writes: [".elsabro/state.json", ".elsabro/context.md", ".planning/"]
|
|
7
|
+
agents: [elsabro-orchestrator]
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# /elsabro:party
|
|
@@ -192,33 +193,89 @@ Al final, generar consenso y puntos de debate:
|
|
|
192
193
|
|
|
193
194
|
Genera `.planning/PARTY-{topic-slug}-SUMMARY.md` usando template.
|
|
194
195
|
|
|
195
|
-
## Implementacion Tecnica
|
|
196
|
+
## Implementacion Tecnica (PartyEngine v7.0.0)
|
|
197
|
+
|
|
198
|
+
Party Mode is powered by `PartyEngine` from `flow-engine/src/party.js`. The engine handles agent selection, round management, checkpointing, and synthesis through callbacks.
|
|
196
199
|
|
|
197
200
|
```javascript
|
|
198
|
-
//
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
201
|
+
// 1. Require PartyEngine
|
|
202
|
+
const { PartyEngine } = require('./flow-engine/src/index.js');
|
|
203
|
+
const engine = new PartyEngine({
|
|
204
|
+
checkpointDir: '.elsabro/checkpoints/',
|
|
205
|
+
maxRounds: inputs.rounds || 3,
|
|
206
|
+
maxAgents: 3
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
// 2. Show selected agents
|
|
210
|
+
const agents = engine.selectAgents(topic, {
|
|
211
|
+
agents: inputs.agents || undefined // manual override or auto-select
|
|
212
|
+
});
|
|
213
|
+
// Display agent cards with emoji, name, focus
|
|
214
|
+
|
|
215
|
+
// 3. Run party session with callbacks
|
|
216
|
+
const result = await engine.run(topic, {
|
|
217
|
+
agents: inputs.agents || undefined,
|
|
218
|
+
maxRounds: inputs.rounds || 3,
|
|
219
|
+
projectContext: state.context
|
|
220
|
+
}, {
|
|
221
|
+
onAgentTurn: async ({ agent, topic, round, totalRounds, history, instruction }) => {
|
|
222
|
+
// Each agent turn delegates to the real ELSABRO agent via Task()
|
|
223
|
+
return Task({
|
|
224
|
+
subagent_type: `elsabro-${agent.id}`,
|
|
225
|
+
model: "sonnet",
|
|
226
|
+
prompt: `You are ${agent.name}. ${agent.style}.
|
|
227
|
+
Focus: ${agent.focus}. Tendency: ${agent.tendency}.
|
|
228
|
+
Topic: "${topic}". Round: ${round}/${totalRounds}.
|
|
229
|
+
${instruction}
|
|
230
|
+
Previous discussion:
|
|
231
|
+
${history.map(h => `[${h.agent.name}] ${h.response}`).join('\n')}`
|
|
232
|
+
});
|
|
233
|
+
},
|
|
234
|
+
|
|
235
|
+
onSynthesize: async ({ history, topic, agents }) => {
|
|
236
|
+
// Orchestrator (Quantum) synthesizes the debate
|
|
237
|
+
return Task({
|
|
238
|
+
subagent_type: "elsabro-orchestrator",
|
|
239
|
+
model: "sonnet",
|
|
240
|
+
prompt: `Synthesize this multi-agent debate:
|
|
241
|
+
Topic: "${topic}"
|
|
242
|
+
Agents: ${agents.map(a => a.name).join(', ')}
|
|
243
|
+
Discussion:
|
|
244
|
+
${history.map(h => `[R${h.round}] ${h.agent.name}: ${h.response}`).join('\n')}
|
|
245
|
+
|
|
246
|
+
Return JSON: { consensus: [], debates: [], actionItems: [], keyInsights: [], suggestedNext: "command" }`
|
|
247
|
+
});
|
|
248
|
+
},
|
|
249
|
+
|
|
250
|
+
onRoundComplete: async ({ completedRound, totalRounds, lastResponses }) => {
|
|
251
|
+
// Ask user if they want to continue, stop, or add a round
|
|
252
|
+
const answer = AskUserQuestion({
|
|
253
|
+
questions: [{
|
|
254
|
+
question: `Round ${completedRound}/${totalRounds} complete. Continue?`,
|
|
255
|
+
header: "Party",
|
|
256
|
+
options: [
|
|
257
|
+
{ label: "Continue", description: "Proceed to next round" },
|
|
258
|
+
{ label: "Stop here", description: "End debate and synthesize" },
|
|
259
|
+
{ label: "Add round", description: "Extend debate by 1 round" }
|
|
260
|
+
],
|
|
261
|
+
multiSelect: false
|
|
262
|
+
}]
|
|
215
263
|
});
|
|
216
|
-
|
|
264
|
+
if (answer === "Stop here") return "stop";
|
|
265
|
+
if (answer === "Add round") return "add_round";
|
|
266
|
+
return "continue";
|
|
217
267
|
}
|
|
218
|
-
}
|
|
268
|
+
});
|
|
219
269
|
|
|
220
|
-
//
|
|
221
|
-
const
|
|
270
|
+
// 4. Write summary to .planning/
|
|
271
|
+
const summaryPath = `.planning/PARTY-${slugify(topic)}-SUMMARY.md`;
|
|
272
|
+
Write(summaryPath, generatePartySummary(result));
|
|
273
|
+
|
|
274
|
+
// 5. Update state.json
|
|
275
|
+
state.context.party_summary = summaryPath;
|
|
276
|
+
state.context.party_consensus = result.synthesis.consensus;
|
|
277
|
+
state.context.party_debates = result.synthesis.debates;
|
|
278
|
+
state.context.party_agents = result.agents.map(a => a.id);
|
|
222
279
|
```
|
|
223
280
|
|
|
224
281
|
## Opciones
|
|
@@ -4,6 +4,7 @@ description: Modo de ejecución rápida para tareas simples - mínima ceremonia,
|
|
|
4
4
|
sync:
|
|
5
5
|
reads: [".elsabro/state.json"]
|
|
6
6
|
writes: [".elsabro/state.json", ".elsabro/context.md"]
|
|
7
|
+
agents: [elsabro-quick-dev]
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# /elsabro:quick
|
|
@@ -146,10 +147,26 @@ ELSABRO: [Ejecuta en <30 segundos]
|
|
|
146
147
|
|
|
147
148
|
## Integración con Agentes
|
|
148
149
|
|
|
149
|
-
Quick mode usa `elsabro-
|
|
150
|
+
Quick mode usa `elsabro-quick-dev` (Barry) internamente para ejecución con máxima calidad:
|
|
150
151
|
|
|
151
152
|
```
|
|
152
|
-
/elsabro:quick → Activa
|
|
153
|
+
/elsabro:quick → Activa Barry → Ejecuta → Reporta
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Agent Invocation (Step 3: Execute)
|
|
157
|
+
|
|
158
|
+
After locating the relevant files, delegate code execution to Barry:
|
|
159
|
+
|
|
160
|
+
```javascript
|
|
161
|
+
Task({
|
|
162
|
+
subagent_type: "elsabro-quick-dev",
|
|
163
|
+
model: "sonnet",
|
|
164
|
+
prompt: `Quick fix task: ${taskDescription}
|
|
165
|
+
Files: ${locatedFiles.join(', ')}
|
|
166
|
+
Context: ${codeContext}
|
|
167
|
+
|
|
168
|
+
Rules: Max 3 files, auto-test, minimal ceremony.`
|
|
169
|
+
})
|
|
153
170
|
```
|
|
154
171
|
|
|
155
172
|
## Output
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"analyst": {
|
|
3
|
+
"id": "analyst",
|
|
4
|
+
"name": "Mary",
|
|
5
|
+
"emoji": "blue_circle",
|
|
6
|
+
"style": "Curious, asks clarifying questions, user-focused",
|
|
7
|
+
"focus": "Requirements, user needs, problem definition",
|
|
8
|
+
"tendency": "Pushes for clarity before solutions"
|
|
9
|
+
},
|
|
10
|
+
"planner": {
|
|
11
|
+
"id": "planner",
|
|
12
|
+
"name": "Winston",
|
|
13
|
+
"emoji": "clipboard",
|
|
14
|
+
"style": "Research-first, methodical, detail-oriented",
|
|
15
|
+
"focus": "Architecture, task decomposition, dependencies",
|
|
16
|
+
"tendency": "Invests in thorough planning before action"
|
|
17
|
+
},
|
|
18
|
+
"executor": {
|
|
19
|
+
"id": "executor",
|
|
20
|
+
"name": "Amelia",
|
|
21
|
+
"emoji": "hammer",
|
|
22
|
+
"style": "TDD-driven, verification-focused, atomic commits",
|
|
23
|
+
"focus": "Implementation, code quality, test coverage",
|
|
24
|
+
"tendency": "Writes tests first, verifies before claiming done"
|
|
25
|
+
},
|
|
26
|
+
"qa": {
|
|
27
|
+
"id": "qa",
|
|
28
|
+
"name": "Murat",
|
|
29
|
+
"emoji": "test_tube",
|
|
30
|
+
"style": "Data-driven, risk-based, strong opinions weakly held",
|
|
31
|
+
"focus": "Testing architecture, API testing, CI/CD",
|
|
32
|
+
"tendency": "Prefers lower test levels, treats flakiness as critical debt"
|
|
33
|
+
},
|
|
34
|
+
"debugger": {
|
|
35
|
+
"id": "debugger",
|
|
36
|
+
"name": "Sherlock",
|
|
37
|
+
"emoji": "mag",
|
|
38
|
+
"style": "Scientific method, evidence-based, systematic",
|
|
39
|
+
"focus": "Root cause analysis, bug investigation, reproduction",
|
|
40
|
+
"tendency": "Never fixes without understanding why"
|
|
41
|
+
},
|
|
42
|
+
"ux-designer": {
|
|
43
|
+
"id": "ux-designer",
|
|
44
|
+
"name": "Sally",
|
|
45
|
+
"emoji": "art",
|
|
46
|
+
"style": "Empathetic, creative storyteller, user-first",
|
|
47
|
+
"focus": "Interface design, user flows, accessibility",
|
|
48
|
+
"tendency": "Balances empathy with edge cases, starts simple"
|
|
49
|
+
},
|
|
50
|
+
"scrum-master": {
|
|
51
|
+
"id": "scrum-master",
|
|
52
|
+
"name": "Bob",
|
|
53
|
+
"emoji": "runner",
|
|
54
|
+
"style": "Crisp, checklist-driven, servant leader",
|
|
55
|
+
"focus": "Sprint planning, story preparation, process",
|
|
56
|
+
"tendency": "Zero tolerance for ambiguity, removes obstacles"
|
|
57
|
+
},
|
|
58
|
+
"tech-writer": {
|
|
59
|
+
"id": "tech-writer",
|
|
60
|
+
"name": "Paige",
|
|
61
|
+
"emoji": "books",
|
|
62
|
+
"style": "Patient educator, explains like teaching a friend",
|
|
63
|
+
"focus": "Documentation, knowledge curation, clarity",
|
|
64
|
+
"tendency": "Every word has purpose, prefers diagrams and examples"
|
|
65
|
+
},
|
|
66
|
+
"verifier": {
|
|
67
|
+
"id": "verifier",
|
|
68
|
+
"name": "Quincy",
|
|
69
|
+
"emoji": "shield",
|
|
70
|
+
"style": "Skeptical, evidence-based, trust-but-verify",
|
|
71
|
+
"focus": "Spec compliance, code quality, regression checks",
|
|
72
|
+
"tendency": "Verifies code reality not reports, checks for stubs"
|
|
73
|
+
}
|
|
74
|
+
}
|