@liriraid/agentflow-ai 1.0.20 → 1.0.22
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/README.md +204 -52
- package/bin/agentflow.mjs +0 -0
- package/orchestrator.js +78 -7
- package/package.json +63 -60
- package/templates/en/.claude/hooks/notify-check.js +20 -20
- package/templates/en/.claude/settings.json +24 -24
- package/templates/en/.claude/skills/orchestrator-explore/SKILL.md +32 -31
- package/templates/en/.claude/skills/orchestrator-queue-planning/SKILL.md +50 -50
- package/templates/en/AGENT-CONFIG.md +3 -2
- package/templates/en/ORCHESTRATOR.md +22 -12
- package/templates/en/README.md +182 -138
- package/templates/en/agents/OPENCODE.md +62 -42
- package/templates/en/docs/usage.md +1 -1
- package/templates/en/orchestrator.config.json +0 -7
- package/templates/es/.claude/hooks/notify-check.js +20 -20
- package/templates/es/.claude/settings.json +24 -24
- package/templates/es/.claude/skills/orchestrator-explore/SKILL.md +34 -33
- package/templates/es/.claude/skills/orchestrator-queue-planning/SKILL.md +52 -52
- package/templates/es/AGENT-CONFIG.md +3 -2
- package/templates/es/ORCHESTRATOR.md +22 -12
- package/templates/es/PROJECT.md +2 -2
- package/templates/es/README.md +224 -34
- package/templates/es/agents/OPENCODE.md +62 -42
- package/templates/es/docs/usage.md +1 -1
- package/templates/es/orchestrator.config.json +2 -9
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: orchestrator-explore
|
|
3
|
-
description: >
|
|
4
|
-
Explore, analyze, or investigate the project before proposing or delegating implementation.
|
|
5
|
-
license: MIT
|
|
6
|
-
metadata:
|
|
7
|
-
owner: agentflow
|
|
8
|
-
version: "1.1"
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Skill: orchestrator-explore
|
|
12
|
-
|
|
13
|
-
## Purpose
|
|
14
|
-
|
|
15
|
-
Gather useful context before creating TASKs or OpenSpec artifacts.
|
|
16
|
-
|
|
17
|
-
## Critical Rules
|
|
18
|
-
|
|
19
|
-
- Understand the user's exact scope first.
|
|
20
|
-
- Prefer exploration before implementation when context is unclear.
|
|
21
|
-
- Use
|
|
22
|
-
- When delegating exploration to OpenCode, include in the brief exactly what it must report: flows, dependencies, architecture findings, inconsistencies, etc.
|
|
23
|
-
- Do not fill `QUEUE.md` with implementation tasks until enough context exists.
|
|
24
|
-
- Summarize findings in actionable terms: what exists, what is missing, what risks exist, and what tasks follow.
|
|
25
|
-
- If the change is large or multi-phase, move toward OpenSpec.
|
|
26
|
-
- If work is clear, convert findings into concrete TASKs using `orchestrator-queue-planning`.
|
|
27
|
-
- When OpenCode delivers its report in INBOX.md, use
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
---
|
|
2
|
+
name: orchestrator-explore
|
|
3
|
+
description: >
|
|
4
|
+
Explore, analyze, or investigate the project before proposing or delegating implementation.
|
|
5
|
+
license: MIT
|
|
6
|
+
metadata:
|
|
7
|
+
owner: agentflow
|
|
8
|
+
version: "1.1"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Skill: orchestrator-explore
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Gather useful context before creating TASKs or OpenSpec artifacts.
|
|
16
|
+
|
|
17
|
+
## Critical Rules
|
|
18
|
+
|
|
19
|
+
- Understand the user's exact scope first.
|
|
20
|
+
- Prefer exploration before implementation when context is unclear.
|
|
21
|
+
- Use **ONLY OpenCode** as the exploration agent when deep codebase analysis is needed — its role is **EXCLUSIVELY analysis**, **NEVER implementation**.
|
|
22
|
+
- When delegating exploration to OpenCode, include in the brief exactly what it must report: flows, dependencies, architecture findings, inconsistencies, etc.
|
|
23
|
+
- Do not fill `QUEUE.md` with implementation tasks until enough context exists.
|
|
24
|
+
- Summarize findings in actionable terms: what exists, what is missing, what risks exist, and what tasks follow.
|
|
25
|
+
- If the change is large or multi-phase, move toward OpenSpec.
|
|
26
|
+
- If work is clear, convert findings into concrete TASKs using `orchestrator-queue-planning`.
|
|
27
|
+
- **STRICT RULE: When OpenCode delivers its report in INBOX.md, use THOSE findings to create implementation TASKs (assigned to Codex or Claude-Worker). Under NO circumstances should Claude-Orchestrator re-analyze the code itself if OpenCode has already done so. Read the report in `progress/PROGRESS-OpenCode.md` or INBOX.md and base your decisions on that analysis.**
|
|
28
|
+
- If OpenCode's report is insufficient, ask OpenCode to deepen analysis on a specific area with a new analysis TASK, but **DO NOT do it yourself**.
|
|
29
|
+
|
|
30
|
+
## Expected Result
|
|
31
|
+
|
|
32
|
+
The orchestrator can decide whether to plan TASKs or continue investigation. **The final result MUST be one or more TASKs in QUEUE.md assigned to Codex or Claude-Worker for implementation, NOT more analysis by Claude-Orchestrator.**
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: orchestrator-queue-planning
|
|
3
|
-
description: >
|
|
4
|
-
Convert user requests, specs, or findings into concrete TASK entries for QUEUE.md.
|
|
5
|
-
license: MIT
|
|
6
|
-
metadata:
|
|
7
|
-
owner: agentflow
|
|
8
|
-
version: "1.1"
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Skill: orchestrator-queue-planning
|
|
12
|
-
|
|
13
|
-
## Purpose
|
|
14
|
-
|
|
15
|
-
Turn the user's request into executable queue work for the TUI.
|
|
16
|
-
|
|
17
|
-
## Agent Assignment Rules
|
|
18
|
-
|
|
19
|
-
### OpenCode — analysis only
|
|
20
|
-
- Use for exploration, audits, context reading, and structured reports.
|
|
21
|
-
- **Do not assign implementation** — OpenCode does not modify project files.
|
|
22
|
-
- If work needs prior analysis, create an OpenCode TASK first, then a Codex TASK with `> after:TASK-NNN`.
|
|
23
|
-
|
|
24
|
-
### Codex — primary implementation
|
|
25
|
-
- Use for implementation, code changes, tests, and docs when the spec is clear.
|
|
26
|
-
- It is the primary execution agent.
|
|
27
|
-
- If Codex fails persistently, the TUI automatically reassigns to Claude-Worker (Frontend/Backend).
|
|
28
|
-
|
|
29
|
-
### Claude-Worker (Frontend / Backend)
|
|
30
|
-
- Automatic fallback when Codex fails.
|
|
31
|
-
- Also takes overflow work when both Codex and OpenCode are busy and more tasks are pending.
|
|
32
|
-
- Frontend-only projects: always use `Frontend`; backend work: use `Backend`.
|
|
33
|
-
|
|
34
|
-
## Critical Rules
|
|
35
|
-
|
|
36
|
-
- Create small, concrete, executable TASKs.
|
|
37
|
-
- Every TASK must include agent, priority, repo, and a clear description.
|
|
38
|
-
- Use `> after:TASK-NNN` for dependencies.
|
|
39
|
-
- Do not implement the task directly as Claude-Orchestrator.
|
|
40
|
-
- Distribution by task count:
|
|
41
|
-
- **1 analysis task**: OpenCode
|
|
42
|
-
- **1 implementation task**: Codex
|
|
43
|
-
- **2 parallel tasks**: OpenCode (analysis) + Codex (implementation when spec is clear)
|
|
44
|
-
- **3+ tasks** with Codex busy: overflow goes to `Frontend` (FE repo) or `Backend` (BE repo)
|
|
45
|
-
- Keep `QUEUE.md` aligned with the user's current objective.
|
|
46
|
-
- **Never assign implementation to OpenCode.**
|
|
47
|
-
|
|
48
|
-
## Expected Result
|
|
49
|
-
|
|
50
|
-
`QUEUE.md` contains clear TASKs ready for the TUI to run.
|
|
1
|
+
---
|
|
2
|
+
name: orchestrator-queue-planning
|
|
3
|
+
description: >
|
|
4
|
+
Convert user requests, specs, or findings into concrete TASK entries for QUEUE.md.
|
|
5
|
+
license: MIT
|
|
6
|
+
metadata:
|
|
7
|
+
owner: agentflow
|
|
8
|
+
version: "1.1"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Skill: orchestrator-queue-planning
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Turn the user's request into executable queue work for the TUI.
|
|
16
|
+
|
|
17
|
+
## Agent Assignment Rules
|
|
18
|
+
|
|
19
|
+
### OpenCode — analysis only
|
|
20
|
+
- Use for exploration, audits, context reading, and structured reports.
|
|
21
|
+
- **Do not assign implementation** — OpenCode does not modify project files.
|
|
22
|
+
- If work needs prior analysis, create an OpenCode TASK first, then a Codex TASK with `> after:TASK-NNN`.
|
|
23
|
+
|
|
24
|
+
### Codex — primary implementation
|
|
25
|
+
- Use for implementation, code changes, tests, and docs when the spec is clear.
|
|
26
|
+
- It is the primary execution agent.
|
|
27
|
+
- If Codex fails persistently, the TUI automatically reassigns to Claude-Worker (Frontend/Backend).
|
|
28
|
+
|
|
29
|
+
### Claude-Worker (Frontend / Backend)
|
|
30
|
+
- Automatic fallback when Codex fails.
|
|
31
|
+
- Also takes overflow work when both Codex and OpenCode are busy and more tasks are pending.
|
|
32
|
+
- Frontend-only projects: always use `Frontend`; backend work: use `Backend`.
|
|
33
|
+
|
|
34
|
+
## Critical Rules
|
|
35
|
+
|
|
36
|
+
- Create small, concrete, executable TASKs.
|
|
37
|
+
- Every TASK must include agent, priority, repo, and a clear description.
|
|
38
|
+
- Use `> after:TASK-NNN` for dependencies.
|
|
39
|
+
- Do not implement the task directly as Claude-Orchestrator.
|
|
40
|
+
- Distribution by task count:
|
|
41
|
+
- **1 analysis task**: OpenCode
|
|
42
|
+
- **1 implementation task**: Codex
|
|
43
|
+
- **2 parallel tasks**: OpenCode (analysis) + Codex (implementation when spec is clear)
|
|
44
|
+
- **3+ tasks** with Codex busy: overflow goes to `Frontend` (FE repo) or `Backend` (BE repo)
|
|
45
|
+
- Keep `QUEUE.md` aligned with the user's current objective.
|
|
46
|
+
- **Never assign implementation to OpenCode.**
|
|
47
|
+
|
|
48
|
+
## Expected Result
|
|
49
|
+
|
|
50
|
+
`QUEUE.md` contains clear TASKs ready for the TUI to run.
|
|
@@ -52,7 +52,8 @@ Default routing should put executable work on Codex or OpenCode first when they
|
|
|
52
52
|
## Initial Convention
|
|
53
53
|
|
|
54
54
|
- `claude` is the primary profile.
|
|
55
|
-
- `codex`
|
|
55
|
+
- `codex` is the primary implementation profile
|
|
56
|
+
- `opencode` is a support profile that **can implement code** depending on the model configured in your OpenCode installation
|
|
56
57
|
- Other profiles can exist while remaining disabled by default.
|
|
57
58
|
|
|
58
59
|
## Suggested Local Folders
|
|
@@ -71,5 +72,5 @@ If both global and local agent configuration exist, the local project config sho
|
|
|
71
72
|
|
|
72
73
|
- Claude uses `.claude/skills/` as the main project skill base.
|
|
73
74
|
- Codex and OpenCode can have their own local config even if they do not use the same skill model today.
|
|
74
|
-
- OpenCode can explore, audit, and implement
|
|
75
|
+
- OpenCode can explore, audit, and **implement code** — capabilities depend on your configured model.
|
|
75
76
|
- The design should allow richer local layers for additional agents later.
|
|
@@ -121,6 +121,8 @@ del .away-mode
|
|
|
121
121
|
|
|
122
122
|
The TUI handles fallback automatically following this chain:
|
|
123
123
|
|
|
124
|
+
```
|
|
125
|
+
Codex fails → OpenCode → Frontend (frontend repo) or Backend (backend repo)
|
|
124
126
|
```
|
|
125
127
|
Codex fails → Frontend (frontend repo) or Backend (backend repo) directly
|
|
126
128
|
```
|
|
@@ -146,20 +148,23 @@ Default agent summary:
|
|
|
146
148
|
| --- | --- | --- |
|
|
147
149
|
| Backend | claude | Backend code through Claude-Worker |
|
|
148
150
|
| Frontend | claude | Broad frontend work through Claude-Worker |
|
|
149
|
-
| Codex | codex |
|
|
150
|
-
| OpenCode | opencode |
|
|
151
|
+
| Codex | codex | **First choice for implementation**; structured implementation, tests, docs, narrow frontend support |
|
|
152
|
+
| OpenCode | opencode | **Second choice for implementation**; exploration, audits, structured reports |
|
|
151
153
|
| Gemini | gemini | Optional audits and reviews only when explicitly enabled |
|
|
152
154
|
| Cursor | cursor | Optional mechanical bulk edits only when explicitly enabled |
|
|
153
155
|
| Abacus | abacusai | Optional small focused tasks only when explicitly enabled |
|
|
154
156
|
|
|
157
|
+
**Notes about OpenCode:**
|
|
158
|
+
- OpenCode can perform both analysis and implementation — capabilities depend on the model you have configured in your OpenCode installation.
|
|
159
|
+
|
|
155
160
|
## How To Assign Work
|
|
156
161
|
|
|
157
162
|
1. **When the user asks for a change or new task** → **NEVER analyze directly yourself**
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
- **If prior analysis is needed**: Create a TASK in `QUEUE.md` assigned **EXCLUSIVELY** to **OpenCode** to explore the context
|
|
164
|
+
- **Wait for the report**: OpenCode writes findings to `progress/PROGRESS-OpenCode.md` and notifies in `INBOX.md`
|
|
165
|
+
- **Then implement**: **READ OPENCODE'S REPORT** in `progress/PROGRESS-OpenCode.md` or `INBOX.md` and create new TASK assigned to **Codex** (or Claude-Worker if Codex is unavailable)
|
|
166
|
+
- **OpenCode DOES NOT implement** — its TASKs are **ONLY for analysis**; implementation **ALWAYS** goes to Codex or Claude-Worker
|
|
167
|
+
- **NEVER, under any circumstances, analyze the project code yourself (Claude-Orchestrator)** — **THIS IS OPENCODE'S EXCLUSIVE JOB**. If a report from OpenCode already exists, **USE THAT CONTEXT** to create implementation tasks.
|
|
163
168
|
|
|
164
169
|
2. Write TASKs in `QUEUE.md` with this format:
|
|
165
170
|
|
|
@@ -178,11 +183,12 @@ Rules:
|
|
|
178
183
|
|
|
179
184
|
Routing preferences:
|
|
180
185
|
|
|
181
|
-
1. Use OpenCode for exploration, audits, and
|
|
182
|
-
2. Use Codex as the primary implementation agent when the spec is clear.
|
|
183
|
-
3.
|
|
184
|
-
4.
|
|
185
|
-
5.
|
|
186
|
+
1. Use OpenCode for exploration, audits, and **implementation**.
|
|
187
|
+
2. Use Codex as the **primary implementation agent** when the spec is clear.
|
|
188
|
+
3. Use OpenCode as the **secondary implementation agent**.
|
|
189
|
+
4. Keep Claude-Worker available as automatic fallback for Codex/OpenCode and for overflow tasks.
|
|
190
|
+
5. For frontend, use Codex for narrow tasks and Frontend/Claude-Worker for broad UI work.
|
|
191
|
+
6. Do not assign all tasks to Claude just because Claude is the orchestrator.
|
|
186
192
|
|
|
187
193
|
## Hard Rules
|
|
188
194
|
|
|
@@ -196,6 +202,10 @@ Routing preferences:
|
|
|
196
202
|
8. Use Engram for durable decisions, bugs, discoveries, and session summaries.
|
|
197
203
|
9. Use `openspec/changes/<change-name>/` for large changes.
|
|
198
204
|
10. Claude remains the final reviewer before work is considered accepted.
|
|
205
|
+
11. **MANDATORY VERIFICATION:** Before creating any implementation TASK, **READ AND CONFIRM THAT:**
|
|
206
|
+
- There is an OpenCode report in `INBOX.md` or `progress/PROGRESS-OpenCode.md` for the requested analysis.
|
|
207
|
+
- The implementation TASK is based **EXCLUSIVELY** on OpenCode's report.
|
|
208
|
+
- **YOU (Claude-Orchestrator) HAVE NOT** analyzed the code yourself.
|
|
199
209
|
|
|
200
210
|
## TUI Controls
|
|
201
211
|
|
package/templates/en/README.md
CHANGED
|
@@ -1,83 +1,89 @@
|
|
|
1
|
-
# agentflow
|
|
1
|
+
# agentflow-ai
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Multi-Agent Orchestration System for AI-Powered Development**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A reusable workspace orchestrator that coordinates multiple AI coding agents to work **in parallel** on real projects, while keeping the project repository **completely clean** of orchestrator files.
|
|
6
6
|
|
|
7
7
|
```text
|
|
8
8
|
project-workspace/
|
|
9
|
-
|
|
10
|
-
orchestrator-
|
|
9
|
+
my-project/ # Real project (stays clean)
|
|
10
|
+
orchestrator-my-project/ # Orchestrator workspace (generated)
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
13
|
+
## 🎯 What It Does
|
|
14
|
+
|
|
15
|
+
- **Coordinates multiple AI agents** (Claude, Codex, OpenCode, etc.) to work simultaneously on your project.
|
|
16
|
+
- **Real-time monitoring** with a modern TUI (Terminal User Interface) that shows live agent status, queue, and progress.
|
|
17
|
+
- **Automatic task delegation** based on agent specialization (analysis, implementation, code review).
|
|
18
|
+
- **Persistent memory** using Engram to maintain context across sessions.
|
|
19
|
+
- **Spec-Driven Development (SDD)** support with OpenSpec for large, multi-phase changes.
|
|
20
|
+
- **Fallback system** that automatically reassigns tasks when an agent fails or reaches rate limits.
|
|
21
|
+
- **Multi-language support** (English and Spanish) for all templates and documentation.
|
|
22
|
+
|
|
23
|
+
## ✨ Key Features
|
|
24
|
+
|
|
25
|
+
### 1. **Sibling Workspace Model**
|
|
26
|
+
- The orchestrator creates a **separate workspace** next to your real project.
|
|
27
|
+
- Your project repository **stays completely clean** (no `QUEUE.md`, `logs/`, or orchestrator files).
|
|
28
|
+
- Agents work on the real project files via absolute paths configured in `orchestrator.config.json`.
|
|
29
|
+
|
|
30
|
+
### 2. **Multi-Agent Coordination**
|
|
31
|
+
| Agent | CLI | Model | Implementation? | Notes |
|
|
32
|
+
|-------|-----|-------|----------------|-------|
|
|
33
|
+
| **Claude-Orchestrator** | - | - | ❌ No | Session coordinator only |
|
|
34
|
+
| **Codex** | `codex` | auto | ✅ Yes | Primary implementation |
|
|
35
|
+
| **OpenCode** | `opencode` | auto | ✅ Yes | Secondary implementation |
|
|
36
|
+
| **Claude-Worker** (Backend/Frontend) | `claude` | auto | ✅ Yes | Fallback implementation |
|
|
37
|
+
| **Gemini** | `gemini` | auto | ❌ No | Audits/reviews only |
|
|
38
|
+
| **Cursor** | `cursor` | auto | ❌ No | Bulk edits only |
|
|
39
|
+
| **Abacus** | `abacusai` | auto | ❌ No | Small focused tasks |
|
|
40
|
+
|
|
41
|
+
### 3. **Real-Time Operation**
|
|
42
|
+
- **fs.watch on QUEUE.md**: Detects changes in **~1-2 seconds** (Linux/macOS: direct file watch; Windows: directory watch fallback).
|
|
43
|
+
- **Live TUI updates**: The dashboard refreshes automatically when tasks are added, started, or completed.
|
|
44
|
+
- **Instant notifications**: Claude-Orchestrator receives alerts in `INBOX.md` and `NOTIFY.md` when tasks finish.
|
|
45
|
+
|
|
46
|
+
### 4. **Smart Task Delegation**
|
|
47
|
+
- **Analysis tasks** → Always assigned to **OpenCode**.
|
|
48
|
+
- **Implementation tasks** → Assigned to **Codex** (1st) → **OpenCode** (2nd) → **Claude-Worker** (3rd).
|
|
49
|
+
- **Fallback chain**: `Codex → OpenCode → Claude-Worker` (automatic).
|
|
50
|
+
|
|
51
|
+
### 5. **Persistent Memory & SDD**
|
|
52
|
+
- **Engram**: Stores decisions, bugs, and findings across sessions.
|
|
53
|
+
- **OpenSpec**: Supports `proposal.md`, `spec.md`, `design.md`, `tasks.md`, and `verify-report.md` for large changes.
|
|
54
|
+
- **Handoffs**: Session summaries for continuity.
|
|
55
|
+
|
|
56
|
+
## 🚀 Installation
|
|
57
|
+
|
|
58
|
+
### Global CLI (Recommended)
|
|
52
59
|
```bash
|
|
53
|
-
|
|
60
|
+
pnpm add -g @liriraid/agentflow-ai
|
|
54
61
|
```
|
|
55
62
|
|
|
56
|
-
|
|
57
|
-
|
|
63
|
+
### Local Development
|
|
58
64
|
```bash
|
|
59
|
-
|
|
65
|
+
git clone https://github.com/LiriRaid/agentflow-ai.git
|
|
66
|
+
cd agentflow-ai
|
|
67
|
+
pnpm install
|
|
60
68
|
```
|
|
61
69
|
|
|
62
|
-
|
|
70
|
+
## 🛠️ Quick Start
|
|
63
71
|
|
|
72
|
+
### 1. Create an Orchestrator Workspace
|
|
64
73
|
```bash
|
|
65
|
-
|
|
66
|
-
agentflow init-workspace C:/code/my-project
|
|
67
|
-
```
|
|
74
|
+
# Interactive (asks for language)
|
|
75
|
+
agentflow init-workspace C:/code/my-project
|
|
68
76
|
|
|
69
|
-
|
|
77
|
+
# Direct (English)
|
|
78
|
+
agentflow init-workspace C:/code/my-project --lang en
|
|
70
79
|
|
|
71
|
-
|
|
72
|
-
C:/code/
|
|
73
|
-
my-project/
|
|
74
|
-
orchestrator-my-project/
|
|
80
|
+
# Direct (Spanish)
|
|
81
|
+
agentflow init-workspace C:/code/my-project --lang es
|
|
75
82
|
```
|
|
83
|
+
This creates a sibling workspace (e.g., `orchestrator-my-project/`) with all configuration files.
|
|
76
84
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
Edit `orchestrator.config.json`:
|
|
80
|
-
|
|
85
|
+
### 2. Configure Repositories
|
|
86
|
+
Edit `orchestrator.config.json` in the generated workspace:
|
|
81
87
|
```json
|
|
82
88
|
{
|
|
83
89
|
"repos": {
|
|
@@ -87,102 +93,140 @@ Edit `orchestrator.config.json`:
|
|
|
87
93
|
}
|
|
88
94
|
```
|
|
89
95
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
## Start The System
|
|
93
|
-
|
|
94
|
-
Open one terminal in the orchestrator workspace:
|
|
95
|
-
|
|
96
|
+
### 3. Start the TUI
|
|
96
97
|
```bash
|
|
97
|
-
cd
|
|
98
|
-
agentflow ink
|
|
98
|
+
cd orchestrator-my-project
|
|
99
|
+
agentflow ink --paused
|
|
99
100
|
```
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
**Controls:**
|
|
102
|
+
- `S`: Start/Resume
|
|
103
|
+
- `P`: Pause
|
|
104
|
+
- `R`: Reload queue
|
|
105
|
+
- `Q`: Quit (stops all agents)
|
|
106
|
+
|
|
107
|
+
### 4. Launch Claude Code
|
|
108
|
+
Open a second terminal in the **orchestrator workspace** (not the real project):
|
|
103
109
|
```bash
|
|
104
|
-
cd
|
|
110
|
+
cd orchestrator-my-project
|
|
105
111
|
claude
|
|
106
112
|
```
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
```text
|
|
113
|
+
Then run:
|
|
114
|
+
```
|
|
111
115
|
Read ORCHESTRATOR.md and start.
|
|
112
116
|
```
|
|
113
117
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
118
|
+
### 5. Request Work
|
|
119
|
+
Examples:
|
|
120
|
+
- `"Explore this project"` → OpenCode analyzes and reports.
|
|
121
|
+
- `"Add JWT authentication"` → OpenCode analyzes, then Codex/OpenCode implement.
|
|
122
|
+
- `"Refactor the API layer"` → OpenCode explores, then workers implement in parallel.
|
|
117
123
|
|
|
118
|
-
|
|
119
|
-
2. Claude reads the relevant project context.
|
|
120
|
-
3. Claude creates TASKs in `QUEUE.md`.
|
|
121
|
-
4. User presses `R` in the TUI to reload the queue.
|
|
122
|
-
5. User presses `S` if the TUI is paused.
|
|
123
|
-
6. The TUI launches workers.
|
|
124
|
-
7. Workers report `TASK_REPORT`.
|
|
125
|
-
8. Claude-Orchestrator reviews the output and plans the next batch.
|
|
126
|
-
|
|
127
|
-
## Queue Format
|
|
128
|
-
|
|
129
|
-
```text
|
|
130
|
-
TASK-NNN | short title | Agent | P1 | repo | detailed description
|
|
131
|
-
```
|
|
124
|
+
## 📁 Workspace Structure
|
|
132
125
|
|
|
133
|
-
|
|
126
|
+
The generated workspace includes:
|
|
134
127
|
|
|
135
128
|
```text
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
129
|
+
orchestrator-my-project/
|
|
130
|
+
├── ORCHESTRATOR.md # Core rules for the orchestrator session
|
|
131
|
+
├── CLAUDE.md # Routing rules for Claude
|
|
132
|
+
├── QUEUE.md # Active task queue (TASK-NNN | title | agent | ...)
|
|
133
|
+
├── ENGRAM.md # Persistent memory conventions
|
|
134
|
+
├── orchestrator.config.json # Repos, agents, models, and profiles
|
|
135
|
+
├── agents/ # Agent-specific instructions
|
|
136
|
+
│ ├── BACKEND.md
|
|
137
|
+
│ ├── FRONTEND.md
|
|
138
|
+
│ ├── CODEX.md
|
|
139
|
+
│ └── OPENCODE.md
|
|
140
|
+
├── .claude/ # Local Claude skills and config
|
|
141
|
+
│ └── skills/ # Orchestrator skills (init, explore, etc.)
|
|
142
|
+
├── .codex/ # Codex config
|
|
143
|
+
├── .opencode/ # OpenCode config
|
|
144
|
+
├── openspec/ # SDD artifacts
|
|
145
|
+
│ ├── changes/
|
|
146
|
+
│ └── templates/
|
|
147
|
+
├── docs/ # Documentation
|
|
148
|
+
├── logs/ # Execution logs
|
|
149
|
+
├── handoffs/ # Session handoffs
|
|
150
|
+
└── progress/ # Agent progress reports
|
|
139
151
|
```
|
|
140
152
|
|
|
141
|
-
##
|
|
142
|
-
|
|
143
|
-
- Start executable work with Codex or OpenCode when suitable.
|
|
144
|
-
- Use Claude-Worker for fallback, extra capacity, broad implementation, or sensitive tasks.
|
|
145
|
-
- For frontend, Codex should handle narrow and verifiable tasks; Frontend/Claude-Worker should own broad UI work.
|
|
146
|
-
- OpenCode can audit, explore, and implement scoped tasks.
|
|
147
|
-
- Do not send all work to Claude just because Claude is the orchestrator.
|
|
148
|
-
|
|
149
|
-
## Models
|
|
150
|
-
|
|
151
|
-
The default config can specify models per agent:
|
|
153
|
+
## 🎛️ Configuration
|
|
152
154
|
|
|
155
|
+
### Agent Configuration (`orchestrator.config.json`)
|
|
153
156
|
```json
|
|
154
157
|
{
|
|
158
|
+
"projectName": "My Project",
|
|
159
|
+
"workspaceLanguage": "en",
|
|
160
|
+
"maxConcurrent": 5,
|
|
161
|
+
"pollIntervalSeconds": 5, // Fallback polling (realtime uses fs.watch)
|
|
162
|
+
"taskTimeoutMinutes": 30,
|
|
163
|
+
"repos": {
|
|
164
|
+
"backend": "C:/code/my-backend",
|
|
165
|
+
"frontend": "C:/code/my-frontend"
|
|
166
|
+
},
|
|
167
|
+
"agentProfiles": {
|
|
168
|
+
"claude": { "enabled": true, "localConfigDir": ".claude" },
|
|
169
|
+
"codex": { "enabled": true, "localConfigDir": ".codex" },
|
|
170
|
+
"opencode": { "enabled": true, "localConfigDir": ".opencode" }
|
|
171
|
+
},
|
|
155
172
|
"agents": {
|
|
156
|
-
"Backend": { "cli": "claude", "
|
|
157
|
-
"Frontend": { "cli": "claude", "
|
|
158
|
-
"Codex": { "cli": "codex", "
|
|
159
|
-
"OpenCode": { "cli": "opencode", "
|
|
173
|
+
"Backend": { "cli": "claude", "defaultRepo": "backend" },
|
|
174
|
+
"Frontend": { "cli": "claude", "defaultRepo": "frontend" },
|
|
175
|
+
"Codex": { "cli": "codex", "defaultRepo": "backend" },
|
|
176
|
+
"OpenCode": { "cli": "opencode", "defaultRepo": "frontend" }
|
|
160
177
|
}
|
|
161
178
|
}
|
|
162
179
|
```
|
|
163
180
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
-
|
|
175
|
-
- `
|
|
176
|
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
181
|
+
### Model Selection
|
|
182
|
+
Each agent uses the model you have configured in its own CLI. You can optionally add `"model": "model-name"` to any agent entry to override — for Claude this accepts values like `sonnet` or `opus`.
|
|
183
|
+
|
|
184
|
+
## 🔄 Workflow Example
|
|
185
|
+
|
|
186
|
+
1. **User Request**: `"Add JWT authentication to the backend."`
|
|
187
|
+
2. **Claude-Orchestrator**:
|
|
188
|
+
- Creates `TASK-001` (OpenCode): `"Analyze current auth system"`
|
|
189
|
+
- Waits for OpenCode's report in `progress/PROGRESS-OpenCode.md`
|
|
190
|
+
3. **OpenCode**:
|
|
191
|
+
- Analyzes the codebase.
|
|
192
|
+
- Writes findings to `progress/PROGRESS-OpenCode.md` and `INBOX.md`.
|
|
193
|
+
4. **Claude-Orchestrator**:
|
|
194
|
+
- Reads OpenCode's report.
|
|
195
|
+
- Creates `TASK-002` (Codex): `"Implement JWT auth"` (depends on TASK-001).
|
|
196
|
+
5. **Codex/OpenCode**:
|
|
197
|
+
- Implements the feature (Codex first, OpenCode second).
|
|
198
|
+
- Reports completion in `progress/PROGRESS-*.md`.
|
|
199
|
+
6. **TUI**:
|
|
200
|
+
- Shows real-time updates (task status, agent activity, costs).
|
|
201
|
+
|
|
202
|
+
## 📊 Supported Agents & Models
|
|
203
|
+
|
|
204
|
+
| Agent | CLI | Model | Implementation? | Notes |
|
|
205
|
+
|-------|-----|-------|----------------|-------|
|
|
206
|
+
| Backend | `claude` | auto | ✅ Yes | Claude-Worker for backend tasks |
|
|
207
|
+
| Frontend | `claude` | auto | ✅ Yes | Claude-Worker for frontend tasks |
|
|
208
|
+
| Codex | `codex` | auto | ✅ Yes | Primary implementation |
|
|
209
|
+
| OpenCode | `opencode` | auto | ✅ Yes | Secondary implementation |
|
|
210
|
+
| Gemini | `gemini` | auto | ❌ No | Audits/reviews only |
|
|
211
|
+
| Cursor | `cursor` | auto | ❌ No | Bulk edits only |
|
|
212
|
+
| Abacus | `abacusai` | auto | ❌ No | Small focused tasks |
|
|
213
|
+
|
|
214
|
+
## 🛡️ Safety & Best Practices
|
|
215
|
+
|
|
216
|
+
- **No auto-commits**: Agents never run `git commit` or `git push`.
|
|
217
|
+
- **No YOLO by default**: Safe permissions mode is enabled unless `--yolo` is used.
|
|
218
|
+
- **Claude as reviewer**: Claude-Orchestrator validates all work before user approval.
|
|
219
|
+
- **Clean repos**: Project files stay untouched; orchestrator files live in the sibling workspace.
|
|
220
|
+
- **Fallback safety**: Tasks are automatically reassigned if an agent fails.
|
|
221
|
+
|
|
222
|
+
## 📚 Documentation
|
|
223
|
+
|
|
224
|
+
- **Core Rules**: See `ORCHESTRATOR.md` in the generated workspace.
|
|
225
|
+
- **Agent Routing**: See `CLAUDE.md`.
|
|
226
|
+
- **Architecture**: See `docs/architecture.md`.
|
|
227
|
+
- **OpenSpec**: See `openspec/FLOW.md`.
|
|
228
|
+
|
|
229
|
+
## 🤝 Acknowledgements
|
|
230
|
+
|
|
231
|
+
Inspired by [Orquestador-AI](https://github.com/ariellontero/Orquestador-AI) by Ariel Lontero (MIT).
|
|
232
|
+
Built from scratch with a modern architecture: **Ink TUI + React, npm package, real-time fs.watch, multi-language templates, and multi-agent coordination**.
|