@liriraid/agentflow-ai 1.0.27 → 1.0.29
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/bin/agentflow.mjs +0 -1
- package/orchestrator.js +6 -14
- package/package.json +65 -64
- package/templates/en/CLAUDE.md +27 -75
- package/templates/en/ORCHESTRATOR.md +20 -18
- package/templates/es/CLAUDE.md +27 -120
- package/templates/es/ORCHESTRATOR.md +21 -22
- package/templates/en/.atl/skill-registry.md +0 -27
- package/templates/en/.claude/skills/orchestrator-apply/SKILL.md +0 -31
- package/templates/en/.claude/skills/orchestrator-archive/SKILL.md +0 -26
- package/templates/en/.claude/skills/orchestrator-design/SKILL.md +0 -27
- package/templates/en/.claude/skills/orchestrator-explore/SKILL.md +0 -32
- package/templates/en/.claude/skills/orchestrator-init/SKILL.md +0 -32
- package/templates/en/.claude/skills/orchestrator-memory/SKILL.md +0 -26
- package/templates/en/.claude/skills/orchestrator-openspec/SKILL.md +0 -35
- package/templates/en/.claude/skills/orchestrator-propose/SKILL.md +0 -26
- package/templates/en/.claude/skills/orchestrator-queue-planning/SKILL.md +0 -50
- package/templates/en/.claude/skills/orchestrator-spec/SKILL.md +0 -27
- package/templates/en/.claude/skills/orchestrator-tasks/SKILL.md +0 -27
- package/templates/en/.claude/skills/orchestrator-verify/SKILL.md +0 -27
- package/templates/es/.atl/skill-registry.md +0 -133
- package/templates/es/.claude/skills/orchestrator-apply/SKILL.md +0 -32
- package/templates/es/.claude/skills/orchestrator-archive/SKILL.md +0 -28
- package/templates/es/.claude/skills/orchestrator-design/SKILL.md +0 -32
- package/templates/es/.claude/skills/orchestrator-explore/SKILL.md +0 -34
- package/templates/es/.claude/skills/orchestrator-init/SKILL.md +0 -32
- package/templates/es/.claude/skills/orchestrator-memory/SKILL.md +0 -31
- package/templates/es/.claude/skills/orchestrator-openspec/SKILL.md +0 -55
- package/templates/es/.claude/skills/orchestrator-propose/SKILL.md +0 -33
- package/templates/es/.claude/skills/orchestrator-queue-planning/SKILL.md +0 -52
- package/templates/es/.claude/skills/orchestrator-spec/SKILL.md +0 -28
- package/templates/es/.claude/skills/orchestrator-tasks/SKILL.md +0 -32
- package/templates/es/.claude/skills/orchestrator-verify/SKILL.md +0 -31
package/bin/agentflow.mjs
CHANGED
package/orchestrator.js
CHANGED
|
@@ -1154,16 +1154,8 @@ function generateBrief(task) {
|
|
|
1154
1154
|
if (taskMatch) taskEntry = taskMatch[0];
|
|
1155
1155
|
}
|
|
1156
1156
|
|
|
1157
|
-
//
|
|
1158
|
-
//
|
|
1159
|
-
let globalStandards = "";
|
|
1160
|
-
const globalClaude = path.join(GLOBAL_CLAUDE_DIR, "CLAUDE.md");
|
|
1161
|
-
if (fs.existsSync(globalClaude)) {
|
|
1162
|
-
globalStandards = fs.readFileSync(globalClaude, "utf-8").trim();
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
// Project plan — if `<projectName>-plan.md` or `PLAN.md` exists in the workspace,
|
|
1166
|
-
// inject it as shared context so every agent sees the big-picture plan.
|
|
1157
|
+
// Project plan — only inject the first 60 lines as orientation context.
|
|
1158
|
+
// Worker agents don't need the full plan to execute a single task.
|
|
1167
1159
|
let projectPlan = "";
|
|
1168
1160
|
const planCandidates = [
|
|
1169
1161
|
path.join(
|
|
@@ -1175,7 +1167,9 @@ function generateBrief(task) {
|
|
|
1175
1167
|
];
|
|
1176
1168
|
for (const p of planCandidates) {
|
|
1177
1169
|
if (fs.existsSync(p)) {
|
|
1178
|
-
|
|
1170
|
+
const lines = fs.readFileSync(p, "utf-8").split("\n");
|
|
1171
|
+
projectPlan = lines.slice(0, 60).join("\n");
|
|
1172
|
+
if (lines.length > 60) projectPlan += "\n\n[Plan truncated — full plan in PLAN.md]";
|
|
1179
1173
|
break;
|
|
1180
1174
|
}
|
|
1181
1175
|
}
|
|
@@ -1201,10 +1195,8 @@ function generateBrief(task) {
|
|
|
1201
1195
|
# Priority: ${task.priority}
|
|
1202
1196
|
# Workspace: ${WORKSPACE}
|
|
1203
1197
|
# Progress file: ${progressFile}
|
|
1204
|
-
# Global supply chain: ${GLOBAL_CLAUDE_DIR}
|
|
1205
1198
|
|
|
1206
|
-
${
|
|
1207
|
-
${projectPlan ? `## Project Plan (big picture — use as context, don't try to do everything)\n${projectPlan}\n` : ""}
|
|
1199
|
+
${projectPlan ? `## Project Plan (orientation only — focus on your task)\n${projectPlan}\n` : ""}
|
|
1208
1200
|
${agentInstructions ? `## Agent Instructions\n${agentInstructions}` : ""}
|
|
1209
1201
|
${protocolRules ? `## Protocol Rules\n${protocolRules}` : ""}
|
|
1210
1202
|
|
package/package.json
CHANGED
|
@@ -1,64 +1,65 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@liriraid/agentflow-ai",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Multi-agent workspace orchestrator with TUI. Coordinates AI coding agents over your real frontend and backend projects.",
|
|
5
|
-
"author": "LiriRaid",
|
|
6
|
-
"homepage": "https://github.com/LiriRaid/agentflow-ai#readme",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/LiriRaid/agentflow-ai.git"
|
|
10
|
-
},
|
|
11
|
-
"bugs": {
|
|
12
|
-
"url": "https://github.com/LiriRaid/agentflow-ai/issues"
|
|
13
|
-
},
|
|
14
|
-
"publishConfig": {
|
|
15
|
-
"access": "public"
|
|
16
|
-
},
|
|
17
|
-
"main": "orchestrator.js",
|
|
18
|
-
"bin": {
|
|
19
|
-
"agentflow": "bin/agentflow.mjs"
|
|
20
|
-
},
|
|
21
|
-
"files": [
|
|
22
|
-
"bin",
|
|
23
|
-
"src",
|
|
24
|
-
"templates",
|
|
25
|
-
"orchestrator.js",
|
|
26
|
-
"LICENSE",
|
|
27
|
-
"README.md"
|
|
28
|
-
],
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
"orchestrator",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@liriraid/agentflow-ai",
|
|
3
|
+
"version": "1.0.29",
|
|
4
|
+
"description": "Multi-agent workspace orchestrator with TUI. Coordinates AI coding agents over your real frontend and backend projects.",
|
|
5
|
+
"author": "LiriRaid",
|
|
6
|
+
"homepage": "https://github.com/LiriRaid/agentflow-ai#readme",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/LiriRaid/agentflow-ai.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/LiriRaid/agentflow-ai/issues"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"main": "orchestrator.js",
|
|
18
|
+
"bin": {
|
|
19
|
+
"agentflow": "bin/agentflow.mjs"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"bin",
|
|
23
|
+
"src",
|
|
24
|
+
"templates",
|
|
25
|
+
"orchestrator.js",
|
|
26
|
+
"LICENSE",
|
|
27
|
+
"README.md"
|
|
28
|
+
],
|
|
29
|
+
"packageManager": "pnpm@11.6.0",
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=18.0.0"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"start": "node orchestrator.js",
|
|
35
|
+
"start:paused": "node orchestrator.js --paused",
|
|
36
|
+
"start:ink": "node src/ink/index.mjs",
|
|
37
|
+
"start:ink:paused": "node src/ink/index.mjs --paused",
|
|
38
|
+
"cli:help": "node bin/agentflow.mjs --help"
|
|
39
|
+
},
|
|
40
|
+
"keywords": [
|
|
41
|
+
"ai",
|
|
42
|
+
"agents",
|
|
43
|
+
"orchestrator",
|
|
44
|
+
"agentflow-ai",
|
|
45
|
+
"claude",
|
|
46
|
+
"codex",
|
|
47
|
+
"gemini",
|
|
48
|
+
"cursor",
|
|
49
|
+
"opencode",
|
|
50
|
+
"abacus",
|
|
51
|
+
"tui",
|
|
52
|
+
"multi-agent",
|
|
53
|
+
"coding-assistant",
|
|
54
|
+
"openspec",
|
|
55
|
+
"engram",
|
|
56
|
+
"skills",
|
|
57
|
+
"agent-config"
|
|
58
|
+
],
|
|
59
|
+
"license": "MIT",
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"blessed": "^0.1.81",
|
|
62
|
+
"ink": "^5.2.1",
|
|
63
|
+
"react": "^18.3.1"
|
|
64
|
+
}
|
|
65
|
+
}
|
package/templates/en/CLAUDE.md
CHANGED
|
@@ -1,91 +1,43 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Orchestrator Workspace
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This workspace manages task delegation to AI worker agents. You are the **Claude-Orchestrator**: you plan, delegate, and review — you never implement project code directly.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Your general behavior follows your global `~/.claude/` configuration. This file only adds orchestrator-specific rules.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
2. Use `.atl/skill-registry.md` as the local skill catalog.
|
|
9
|
-
3. Use `ENGRAM.md` for persistent memory conventions.
|
|
10
|
-
4. Do not rely on `~/.claude/skills/` for the main orchestrator flow.
|
|
11
|
-
5. If a global skill has the same name as a local skill, the local skill wins.
|
|
12
|
-
6. Use `openspec/` for large or multi-phase changes before broad implementation.
|
|
7
|
+
## Core Rules
|
|
13
8
|
|
|
14
|
-
|
|
9
|
+
- Never implement project code yourself — create TASKs in `QUEUE.md` and let the TUI dispatch them to worker agents.
|
|
10
|
+
- Read `ORCHESTRATOR.md` on startup for full agent guide, routing, and session rules.
|
|
15
11
|
|
|
16
|
-
|
|
12
|
+
## Task Distribution (critical)
|
|
17
13
|
|
|
18
|
-
|
|
14
|
+
The TUI runs **one task per agent at a time**. To run tasks in parallel, assign them to **different agents**.
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
- `lee ORCHESTRATOR.md y arranca`
|
|
22
|
-
- `start orchestrator`
|
|
23
|
-
- `initialize the orchestrator`
|
|
16
|
+
**Rule: maximum 1 task per agent per batch.** Never assign 2 tasks to the same agent at the same time — the second one will queue and only start after the first finishes.
|
|
24
17
|
|
|
25
|
-
|
|
18
|
+
| Agent | Use for |
|
|
19
|
+
|-------|---------|
|
|
20
|
+
| `Codex` | Primary implementation |
|
|
21
|
+
| `OpenCode` | Secondary implementation or analysis (once free after an analysis task, it takes implementation too) |
|
|
22
|
+
| `Frontend` | Broad frontend work or overflow |
|
|
23
|
+
| `Backend` | Backend API or overflow |
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
Example — 3 tasks ready at the same time:
|
|
26
|
+
- TASK-001 → **Codex**
|
|
27
|
+
- TASK-002 → **OpenCode**
|
|
28
|
+
- TASK-003 → **Frontend**
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
Check `STATUS.md` to see which agents are currently free before assigning.
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
## Dependency Rule (`after:`)
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
Only add `> after:TASK-NNN` when the **output of that task is required as input** for the next one (genuine data dependency). Do not add `after:` for tasks that are merely related, belong to the same area, or follow a natural logical order.
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
### Proposal, Spec, Design, Tasks
|
|
38
|
-
|
|
39
|
-
If the user asks for proposal, spec, design, tasks, or a documented change, use the matching skill:
|
|
40
|
-
|
|
41
|
-
- `orchestrator-propose`
|
|
42
|
-
- `orchestrator-spec`
|
|
43
|
-
- `orchestrator-design`
|
|
44
|
-
- `orchestrator-tasks`
|
|
45
|
-
- `orchestrator-openspec`
|
|
46
|
-
|
|
47
|
-
### Queue Planning and Delegation
|
|
48
|
-
|
|
49
|
-
If the user asks to create tasks, split work, delegate, or plan the queue, use:
|
|
50
|
-
|
|
51
|
-
- `orchestrator-queue-planning`
|
|
52
|
-
|
|
53
|
-
The default output should be TASK entries in `QUEUE.md`, not direct implementation by Claude-Orchestrator.
|
|
54
|
-
|
|
55
|
-
### Apply, Verify, Archive
|
|
56
|
-
|
|
57
|
-
If the user asks to implement, apply tasks, verify implementation, or archive a change, use:
|
|
58
|
-
|
|
59
|
-
- `orchestrator-apply`
|
|
60
|
-
- `orchestrator-verify`
|
|
61
|
-
- `orchestrator-archive`
|
|
62
|
-
|
|
63
|
-
Implementation still goes through worker agents and `QUEUE.md` unless the user explicitly overrides the orchestrator rule.
|
|
64
|
-
|
|
65
|
-
### Memory and Continuity
|
|
66
|
-
|
|
67
|
-
If the user asks to remember, summarize, restore previous context, or save decisions, use:
|
|
68
|
-
|
|
69
|
-
- `orchestrator-memory`
|
|
70
|
-
|
|
71
|
-
## Operating Rules
|
|
72
|
-
|
|
73
|
-
- If intent is ambiguous between exploration and planning, explore first.
|
|
74
|
-
- If the user starts the orchestrator, run `orchestrator-init` before anything else.
|
|
75
|
-
- If work is large or multi-agent, use OpenSpec before filling `QUEUE.md`.
|
|
76
|
-
- If context is clear enough, convert work into concrete TASKs.
|
|
77
|
-
- Keep the orchestrator behavior aligned with `ORCHESTRATOR.md`.
|
|
78
|
-
- Keep memory behavior aligned with `ENGRAM.md`.
|
|
79
|
-
- Respect the default agent restrictions.
|
|
80
|
-
- Do not let Claude-Orchestrator implement project work directly.
|
|
36
|
+
**Independent tasks must go out in parallel, each to a different available agent.**
|
|
81
37
|
|
|
82
38
|
## Key Files
|
|
83
39
|
|
|
84
|
-
- `ORCHESTRATOR.md
|
|
85
|
-
- `QUEUE.md
|
|
86
|
-
- `orchestrator.config.json
|
|
87
|
-
- `ENGRAM.md
|
|
88
|
-
- `.atl/skill-registry.md`: local skill catalog
|
|
89
|
-
- `.claude/skills/*/SKILL.md`: local skills
|
|
90
|
-
- `openspec/`: durable artifacts for large changes
|
|
91
|
-
- `docs/usage.md`: recommended workflow
|
|
40
|
+
- `ORCHESTRATOR.md` — startup flow, agent roles, hard rules
|
|
41
|
+
- `QUEUE.md` — format: `TASK-NNN | title | Agent | P1 | repo | description`
|
|
42
|
+
- `orchestrator.config.json` — agent names and repo paths
|
|
43
|
+
- `ENGRAM.md` — memory rules
|
|
@@ -36,14 +36,16 @@ When the user requests work after startup:
|
|
|
36
36
|
|
|
37
37
|
1. Do not implement the work in the interactive Claude session.
|
|
38
38
|
2. Convert the request into one or more TASKs in `QUEUE.md`.
|
|
39
|
-
3.
|
|
40
|
-
|
|
41
|
-
- `Codex` →
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
39
|
+
3. Each agent runs **one task at a time**. For parallel execution, assign tasks to different agents.
|
|
40
|
+
4. Default assignment order:
|
|
41
|
+
- `Codex` → primary implementation (code changes, tests, docs)
|
|
42
|
+
- `OpenCode` → secondary implementation or analysis (exploration, audits, reports)
|
|
43
|
+
- `Frontend` → broad frontend work or overflow when Codex and OpenCode are both assigned
|
|
44
|
+
- `Backend` → backend API work or overflow
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
**When there are multiple independent tasks, distribute them across agents from the start.** Do not assign all tasks to Codex — they will queue up and run one by one.
|
|
47
|
+
|
|
48
|
+
The TUI handles automatic fallback on failure: Codex fails → Claude-Worker directly. You do not need to manually reassign on failure.
|
|
47
49
|
|
|
48
50
|
The `repo` field determines the working directory: `frontend` for UI/client work, `backend` for API/server work. Codex and OpenCode can work in either repo depending on the task.
|
|
49
51
|
|
|
@@ -179,11 +181,10 @@ Default agent summary:
|
|
|
179
181
|
## How To Assign Work
|
|
180
182
|
|
|
181
183
|
1. **When the user asks for a change or new task** → **NEVER analyze directly yourself**
|
|
182
|
-
- **If context already exists** (OpenCode reports from this session, completed similar tasks, user-specified exact changes): **skip OpenCode** and create implementation TASKs
|
|
183
|
-
- **If prior analysis is needed** (new area, unknown structure, no prior report): Create ONE TASK
|
|
184
|
+
- **If context already exists** (OpenCode reports from this session, completed similar tasks, user-specified exact changes): **skip OpenCode** and create implementation TASKs distributed across available agents in parallel.
|
|
185
|
+
- **If prior analysis is needed** (new area, unknown structure, no prior report): Create ONE TASK assigned to **OpenCode** for that area. Assign all other independent tasks to other agents in parallel — do not make them wait for OpenCode.
|
|
184
186
|
- **Wait for the OpenCode report only for the tasks that depend on it**: OpenCode writes findings to `progress/PROGRESS-OpenCode.md` and notifies in `INBOX.md`
|
|
185
|
-
- **Then implement
|
|
186
|
-
- **OpenCode DOES NOT implement** — its TASKs are **ONLY for analysis**; implementation **ALWAYS** goes to Codex or Claude-Worker
|
|
187
|
+
- **Then implement**: **READ OPENCODE'S REPORT** and create implementation TASKs distributed across all available agents — Codex, OpenCode (now free after analysis), Frontend, Backend.
|
|
187
188
|
- **NEVER analyze the project code yourself (Claude-Orchestrator)** — use OpenCode for that. If a report already exists, **USE THAT CONTEXT** directly.
|
|
188
189
|
|
|
189
190
|
2. Write TASKs in `QUEUE.md` with this format:
|
|
@@ -196,19 +197,20 @@ Rules:
|
|
|
196
197
|
|
|
197
198
|
1. `Agent` must match a key in `orchestrator.config.json.agents`.
|
|
198
199
|
2. `repo` must match a key in `orchestrator.config.json.repos`.
|
|
199
|
-
3. Add `> after:TASK-NNN` at the end of the description for
|
|
200
|
+
3. Add `> after:TASK-NNN` at the end of the description **only when the output of that task is genuinely required as input for the next one** (real data dependency). Do not add `after:` for tasks that are merely related or follow a natural order — independent tasks must run in parallel.
|
|
200
201
|
4. Use `TASKS.md` under `### TASK-NNN` for longer task specs when needed.
|
|
201
202
|
5. Use `briefs/TASK-NNN-BRIEF.md` for very detailed briefs when needed.
|
|
202
203
|
6. **The TUI starts automatically** - you don't need to press R or S. The TUI detects new tasks and launches them.
|
|
203
204
|
|
|
204
205
|
Routing preferences:
|
|
205
206
|
|
|
206
|
-
1.
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
207
|
+
1. **Maximum 1 task per agent per batch.** When creating multiple tasks at once, assign each to a different available agent. Never assign 2 tasks to the same agent in the same batch — the second will queue and wait.
|
|
208
|
+
- Example with 3 tasks: TASK-001 → Codex, TASK-002 → OpenCode, TASK-003 → Frontend
|
|
209
|
+
- Check `STATUS.md` to see which agents are free before assigning.
|
|
210
|
+
2. Use Codex as the **primary implementation agent**.
|
|
211
|
+
3. Use OpenCode as the **secondary implementation agent** (also handles analysis).
|
|
212
|
+
4. Use Frontend/Backend for overflow or broad UI/API work.
|
|
213
|
+
5. Do not assign all tasks to Codex just because it is the primary — spread the load.
|
|
212
214
|
|
|
213
215
|
## Hard Rules
|
|
214
216
|
|
package/templates/es/CLAUDE.md
CHANGED
|
@@ -1,136 +1,43 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Workspace del Orquestador
|
|
2
2
|
|
|
3
|
-
Este
|
|
3
|
+
Este workspace gestiona la delegación de tareas a agentes worker. Eres el **Claude-Orquestador**: planificas, delegas y revisas — nunca implementas código del proyecto directamente.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Tu comportamiento general sigue tu configuración global en `~/.claude/`. Este archivo solo agrega reglas específicas del orquestador.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
2. Usa `.atl/skill-registry.md` como catálogo de skills del proyecto
|
|
9
|
-
3. Usa `ENGRAM.md` como convención local para memoria persistente
|
|
10
|
-
4. No dependas de `~/.claude/skills/` para el flujo principal del orquestador
|
|
11
|
-
5. Si existe una skill global con el mismo nombre, la **local** del proyecto gana
|
|
12
|
-
6. Si existe `openspec/`, úsalo como capa persistente para cambios grandes antes de delegar implementación amplia
|
|
7
|
+
## Reglas principales
|
|
13
8
|
|
|
14
|
-
|
|
9
|
+
- Nunca implementes código del proyecto tú mismo — crea TASKs en `QUEUE.md` y deja que la TUI las despache a los agentes worker.
|
|
10
|
+
- Lee `ORCHESTRATOR.md` al inicio para la guía completa de agentes, routing y reglas de sesión.
|
|
15
11
|
|
|
16
|
-
|
|
12
|
+
## Distribución de tareas (crítico)
|
|
17
13
|
|
|
18
|
-
|
|
14
|
+
La TUI ejecuta **una tarea por agente a la vez**. Para ejecutar tareas en paralelo, asígnalas a **agentes distintos**.
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
- `arranca el orquestador`
|
|
22
|
-
- `inicia el orquestador`
|
|
23
|
-
- `start orchestrator`
|
|
16
|
+
**Regla: máximo 1 task por agente por batch.** Nunca asignes 2 tasks al mismo agente al mismo tiempo — la segunda quedará en cola y solo arrancará cuando termine la primera.
|
|
24
17
|
|
|
25
|
-
|
|
18
|
+
| Agente | Usar para |
|
|
19
|
+
|--------|-----------|
|
|
20
|
+
| `Codex` | Implementación primaria |
|
|
21
|
+
| `OpenCode` | Implementación secundaria o análisis (una vez libre tras una task de análisis, también toma implementación) |
|
|
22
|
+
| `Frontend` | Trabajo frontend amplio o desbordamiento |
|
|
23
|
+
| `Backend` | API backend o desbordamiento |
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
Ejemplo — 3 tasks listas al mismo tiempo:
|
|
26
|
+
- TASK-001 → **Codex**
|
|
27
|
+
- TASK-002 → **OpenCode**
|
|
28
|
+
- TASK-003 → **Frontend**
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
Revisa `STATUS.md` para saber qué agentes están libres antes de asignar.
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
## Regla de dependencias (`after:`)
|
|
32
33
|
|
|
33
|
-
- `
|
|
34
|
-
- `analiza estos archivos`
|
|
35
|
-
- `investiga este flujo`
|
|
36
|
-
- `revisa esto antes de implementar`
|
|
34
|
+
Solo agrega `> after:TASK-NNN` cuando la **salida de esa tarea sea requerida como entrada** para la siguiente (dependencia de datos real). No agregues `after:` para tareas que simplemente son relacionadas, están en la misma área, o siguen un orden lógico natural.
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- `orchestrator-explore`
|
|
41
|
-
|
|
42
|
-
### Proposal / spec / design / tasks
|
|
43
|
-
|
|
44
|
-
Si el usuario dice algo como:
|
|
45
|
-
|
|
46
|
-
- `haz proposal`
|
|
47
|
-
- `haz spec`
|
|
48
|
-
- `haz design`
|
|
49
|
-
- `haz tasks`
|
|
50
|
-
- `documentemos este cambio`
|
|
51
|
-
- `prepara el cambio antes de implementarlo`
|
|
52
|
-
|
|
53
|
-
usa la skill:
|
|
54
|
-
|
|
55
|
-
- `orchestrator-propose`
|
|
56
|
-
- `orchestrator-spec`
|
|
57
|
-
- `orchestrator-design`
|
|
58
|
-
- `orchestrator-tasks`
|
|
59
|
-
|
|
60
|
-
### Planificación de cola / delegación
|
|
61
|
-
|
|
62
|
-
Si el usuario dice algo como:
|
|
63
|
-
|
|
64
|
-
- `crea tareas`
|
|
65
|
-
- `divide el trabajo`
|
|
66
|
-
- `llena la queue`
|
|
67
|
-
- `deleguemos esto`
|
|
68
|
-
- `planifica las tasks`
|
|
69
|
-
|
|
70
|
-
usa la skill:
|
|
71
|
-
|
|
72
|
-
- `orchestrator-queue-planning`
|
|
73
|
-
|
|
74
|
-
### OpenSpec / cambios grandes
|
|
75
|
-
|
|
76
|
-
Si el usuario dice algo como:
|
|
77
|
-
|
|
78
|
-
- `crea un change`
|
|
79
|
-
- `abre openspec`
|
|
80
|
-
- `documentemos este cambio antes de implementarlo`
|
|
81
|
-
|
|
82
|
-
usa la skill:
|
|
83
|
-
|
|
84
|
-
- `orchestrator-openspec`
|
|
85
|
-
|
|
86
|
-
### Apply / verify / archive
|
|
87
|
-
|
|
88
|
-
Si el usuario dice algo como:
|
|
89
|
-
|
|
90
|
-
- `implementa este cambio`
|
|
91
|
-
- `aplica las tareas`
|
|
92
|
-
- `verifica la implementación`
|
|
93
|
-
- `archiva el cambio`
|
|
94
|
-
|
|
95
|
-
usa la skill:
|
|
96
|
-
|
|
97
|
-
- `orchestrator-apply`
|
|
98
|
-
- `orchestrator-verify`
|
|
99
|
-
- `orchestrator-archive`
|
|
100
|
-
|
|
101
|
-
### Memoria / continuidad / recordatorios
|
|
102
|
-
|
|
103
|
-
Si el usuario dice algo como:
|
|
104
|
-
|
|
105
|
-
- `recuerda qué hicimos`
|
|
106
|
-
- `cómo quedó esto`
|
|
107
|
-
- `guarda este contexto`
|
|
108
|
-
- `haz un resumen de sesión`
|
|
109
|
-
- `trae el contexto anterior`
|
|
110
|
-
|
|
111
|
-
usa la skill:
|
|
112
|
-
|
|
113
|
-
- `orchestrator-memory`
|
|
114
|
-
|
|
115
|
-
## Reglas operativas
|
|
116
|
-
|
|
117
|
-
- Si hay ambigüedad entre explorar y planificar, explora primero.
|
|
118
|
-
- Si el usuario pide iniciar sesión del orquestador, arranca con `orchestrator-init` antes de cualquier otra cosa.
|
|
119
|
-
- Si el trabajo es grande, multifase o involucra varios agentes, pasa por `orchestrator-propose` / `orchestrator-spec` / `orchestrator-design` / `orchestrator-tasks` antes de llenar `QUEUE.md`.
|
|
120
|
-
- Si una exploración ya produjo suficiente contexto, el siguiente paso natural es `orchestrator-propose` o `orchestrator-tasks`, según el nivel de claridad.
|
|
121
|
-
- Si el usuario pide continuidad o recordar trabajo previo, usa `orchestrator-memory`.
|
|
122
|
-
- Si el usuario pide proposal/spec/design/tasks de un cambio, usa las skills `orchestrator-*` correspondientes.
|
|
123
|
-
- Mantén la lógica del orquestador alineada con `ORCHESTRATOR.md`.
|
|
124
|
-
- Mantén la memoria alineada con `ENGRAM.md`.
|
|
125
|
-
- Respeta las restricciones de agentes por defecto del proyecto.
|
|
36
|
+
**Las tareas independientes deben salir en paralelo, cada una a un agente disponible distinto.**
|
|
126
37
|
|
|
127
38
|
## Archivos clave
|
|
128
39
|
|
|
129
|
-
- `ORCHESTRATOR.md` —
|
|
130
|
-
- `
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
- `docs/components.md` — mapa de componentes implementados
|
|
134
|
-
- `docs/usage.md` — flujo recomendado de uso
|
|
135
|
-
- `openspec/` — artefactos persistentes para cambios grandes
|
|
136
|
-
- `QUEUE.md` — cola activa del motor
|
|
40
|
+
- `ORCHESTRATOR.md` — flujo de inicio, roles de agentes, reglas duras
|
|
41
|
+
- `QUEUE.md` — formato: `TASK-NNN | título | Agente | P1 | repo | descripción`
|
|
42
|
+
- `orchestrator.config.json` — nombres de agentes y rutas de repos
|
|
43
|
+
- `ENGRAM.md` — reglas de memoria
|
|
@@ -18,15 +18,18 @@ Hay dos roles distintos que no deben confundirse:
|
|
|
18
18
|
|
|
19
19
|
**Prioridad de asignación de trabajo:**
|
|
20
20
|
|
|
21
|
+
Cada agente ejecuta **una tarea a la vez**. Para ejecutar tareas en paralelo, asígnalas a **agentes distintos**.
|
|
22
|
+
|
|
21
23
|
```
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
b) Codex falló persistentemente → la TUI reasigna automáticamente a Claude-Worker
|
|
24
|
+
Codex → implementación principal (primera opción)
|
|
25
|
+
OpenCode → implementación secundaria o análisis
|
|
26
|
+
Frontend → trabajo frontend amplio o desbordamiento
|
|
27
|
+
Backend → trabajo backend o desbordamiento
|
|
27
28
|
```
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
**Cuando hay múltiples tareas independientes, distribúyelas entre agentes desde el principio.** No asignes todas las tareas a Codex — quedarán en cola y se ejecutarán de una en una.
|
|
31
|
+
|
|
32
|
+
La TUI gestiona el fallback automático al fallar un agente (Codex falla → Claude-Worker). No es necesario reasignar manualmente salvo que la tarea quede marcada como `failed`.
|
|
30
33
|
|
|
31
34
|
## El workspace NO es el proyecto real
|
|
32
35
|
|
|
@@ -182,11 +185,10 @@ Revisa `orchestrator.config.json` → `agents`. Cada entrada tiene:
|
|
|
182
185
|
## Cómo asignar trabajo
|
|
183
186
|
|
|
184
187
|
1. **Cuando el usuario pide un cambio o nueva tarea** → **NUNCA analices directamente**
|
|
185
|
-
- **Si ya existe contexto suficiente** (reportes de OpenCode de esta sesión, tareas similares ya completadas, cambios que el usuario especificó exactamente): **omite OpenCode** y crea TASKs de implementación
|
|
186
|
-
- **Si se necesita análisis previo** (área nueva, estructura desconocida, sin reporte previo): Crea UNA TASK asignada a **OpenCode** para esa área.
|
|
188
|
+
- **Si ya existe contexto suficiente** (reportes de OpenCode de esta sesión, tareas similares ya completadas, cambios que el usuario especificó exactamente): **omite OpenCode** y crea TASKs de implementación en paralelo, distribuyéndolas entre los agentes disponibles.
|
|
189
|
+
- **Si se necesita análisis previo** (área nueva, estructura desconocida, sin reporte previo): Crea UNA TASK asignada a **OpenCode** para esa área. Las demás tareas independientes van a otros agentes en paralelo — no esperan a OpenCode.
|
|
187
190
|
- **Espera el reporte de OpenCode solo para las tareas que dependen de él**: OpenCode escribe hallazgos en `progress/PROGRESS-OpenCode.md` y notifica en `INBOX.md`
|
|
188
|
-
- **Luego implementa la tarea dependiente**: **LEE EL REPORTE DE OPENCODE** y crea
|
|
189
|
-
- **OpenCode NO implementa** — sus TASKs son **SOLO de análisis**; la implementación **SIEMPRE** va a Codex o Claude-Worker
|
|
191
|
+
- **Luego implementa la tarea dependiente**: **LEE EL REPORTE DE OPENCODE** y crea las TASKs de implementación distribuyéndolas entre todos los agentes disponibles (Codex, OpenCode si ya terminó el análisis, Frontend, Backend).
|
|
190
192
|
- **NUNCA analices el código del proyecto tú mismo (Claude-Orquestador)** — usa OpenCode para eso. Si ya existe un reporte, **USA ESE CONTEXTO** directamente.
|
|
191
193
|
|
|
192
194
|
2. Escribe TASKs en `QUEUE.md` (formato pipe; la TUI lo lee):
|
|
@@ -197,20 +199,17 @@ Revisa `orchestrator.config.json` → `agents`. Cada entrada tiene:
|
|
|
197
199
|
Valores válidos de `repo`: exactamente las keys de `orchestrator.config.json.repos`.
|
|
198
200
|
3. (Opcional) También escribe una spec larga en `TASKS.md` bajo un heading `### TASK-NNN`; se inyecta al brief.
|
|
199
201
|
4. (Opcional) Para un brief muy detallado, crea `briefs/TASK-NNN-BRIEF.md`; también se inyecta.
|
|
200
|
-
5. Dependencias: agrega `> after:TASK-NNN` al final de la descripción
|
|
202
|
+
5. Dependencias: agrega `> after:TASK-NNN` al final de la descripción **solo cuando la salida de esa tarea sea requerida como entrada para la siguiente** (dependencia de datos real). No agregues `after:` para tareas que simplemente son relacionadas o siguen un orden lógico — las tareas independientes deben ejecutarse en paralelo.
|
|
201
203
|
6. **La TUI inicia automáticamente** - NO necesitas presionar R ni S. La TUI detecta nuevas tasks y las lanza.
|
|
202
|
-
7. **
|
|
203
|
-
|
|
204
|
+
7. **Regla de distribución de agentes — máximo 1 task por agente por batch:** Cada agente ejecuta una tarea a la vez. Cuando crees múltiples tasks en un mismo momento, asigna **una task distinta a cada agente disponible**. Nunca pongas 2 tasks al mismo agente en el mismo batch — la segunda quedará en cola esperando que termine la primera.
|
|
205
|
+
- Ejemplo con 3 tasks: TASK-001 → Codex, TASK-002 → OpenCode, TASK-003 → Frontend
|
|
206
|
+
- Revisa `STATUS.md` para saber qué agentes están libres antes de asignar.
|
|
207
|
+
8. **REGLA CRÍTICA SOBRE ANÁLISIS:** Si OpenCode ya analizó algo y escribió su reporte en `INBOX.md` o `progress/PROGRESS-OpenCode.md`, **TÚ (Claude-Orquestador) NO DEBES VOLVER A ANALIZAR EL MISMO CÓDIGO**. Usa el reporte existente para crear tareas de implementación.
|
|
204
208
|
9. **Regla de ejecución en paralelo — nunca serialices lo que puede correr en paralelo:**
|
|
205
|
-
- **Si el contexto ya existe**: asigna todas las tareas independientes en paralelo
|
|
206
|
-
- **Si falta contexto para un área**: manda UNA TASK a OpenCode para esa área. Las demás tareas independientes van a Codex en paralelo — no esperan a OpenCode.
|
|
207
|
-
-
|
|
208
|
-
|
|
209
|
-
- 1 tarea de implementación → Codex
|
|
210
|
-
- 2 tareas paralelas → OpenCode (análisis) + Codex (implementación con spec clara)
|
|
211
|
-
- 3+ tareas independientes con contexto claro → Codex + Frontend/Backend en paralelo
|
|
212
|
-
- **¿Cuándo el contexto es suficiente?** OpenCode ya reportó sobre esa área en esta sesión / el usuario especificó exactamente qué cambiar / tareas similares ya se completaron esta sesión.
|
|
213
|
-
10. Si hay más TASKs que agentes disponibles, deja el resto en cola con dependencias claras o prioridad menor; no uses Gemini, Cursor ni Abacus salvo permiso explícito.
|
|
209
|
+
- **Si el contexto ya existe**: asigna todas las tareas independientes en paralelo, distribuyéndolas entre agentes disponibles.
|
|
210
|
+
- **Si falta contexto para un área**: manda UNA TASK a OpenCode para esa área. Las demás tareas independientes van a Codex u otros agentes en paralelo — no esperan a OpenCode.
|
|
211
|
+
- **¿Cuándo el contexto es suficiente?** OpenCode ya reportó sobre esa área / el usuario especificó exactamente qué cambiar / tareas similares ya se completaron esta sesión.
|
|
212
|
+
10. Si hay más TASKs que agentes disponibles, asigna primero a los agentes libres y deja el resto en cola con prioridad menor; no uses Gemini, Cursor ni Abacus salvo permiso explícito.
|
|
214
213
|
9. El campo `repo` determina en qué directorio trabaja el agente. Usa siempre el valor correcto: `frontend` para trabajo de UI/cliente, `backend` para trabajo de API/servidor. Codex y OpenCode pueden trabajar en ambos repos según lo que indique la task.
|
|
215
214
|
|
|
216
215
|
## Reglas
|