@liriraid/agentflow-ai 1.0.19 → 1.0.21
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 +205 -52
- package/orchestrator.js +109 -10
- package/package.json +1 -1
- package/src/ink/index.mjs +8 -3
- package/templates/en/.claude/hooks/notify-check.js +20 -0
- package/templates/en/.claude/settings.json +24 -0
- package/templates/en/.claude/skills/orchestrator-explore/SKILL.md +7 -4
- package/templates/en/.claude/skills/orchestrator-queue-planning/SKILL.md +24 -5
- package/templates/en/AGENT-CONFIG.md +3 -2
- package/templates/en/ORCHESTRATOR.md +30 -18
- package/templates/en/README.md +182 -137
- package/templates/en/agents/OPENCODE.md +68 -23
- package/templates/es/.claude/hooks/notify-check.js +20 -0
- package/templates/es/.claude/settings.json +24 -0
- package/templates/es/.claude/skills/orchestrator-explore/SKILL.md +7 -4
- package/templates/es/.claude/skills/orchestrator-queue-planning/SKILL.md +25 -8
- package/templates/es/AGENT-CONFIG.md +3 -2
- package/templates/es/ORCHESTRATOR.md +32 -20
- package/templates/es/README.md +222 -29
- package/templates/es/agents/OPENCODE.md +63 -18
- package/templates/es/orchestrator.config.json +1 -1
|
@@ -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 when using advanced models** (e.g., Mistral Medium 3.5 128B)
|
|
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 when
|
|
75
|
+
- OpenCode can explore, audit, and **implement code when using advanced models** like Mistral Medium 3.5 128B.
|
|
75
76
|
- The design should allow richer local layers for additional agents later.
|
|
@@ -36,12 +36,14 @@ 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.
|
|
39
|
+
3. Assign by role:
|
|
40
|
+
- `OpenCode` → **analysis only** (exploration, audits, reports — does NOT modify code)
|
|
41
|
+
- `Codex` → **primary implementation** (code changes, tests, docs)
|
|
40
42
|
4. Assign a Claude-Worker (`Frontend` or `Backend`) **only** when:
|
|
41
|
-
- **Multiple independent tasks exist** AND Codex
|
|
42
|
-
- A task has **permanently failed** in Codex
|
|
43
|
+
- **Multiple independent tasks exist** AND Codex is already occupied, OR
|
|
44
|
+
- A task has **permanently failed** in Codex — then Claude-Worker takes it as last resort.
|
|
43
45
|
|
|
44
|
-
The TUI handles automatic fallback: Codex fails →
|
|
46
|
+
The TUI handles automatic fallback: Codex fails → Claude-Worker directly. You only need to manually assign Claude-Workers for load balancing (case a) or when the TUI marks a task as permanently `failed` (case b).
|
|
45
47
|
|
|
46
48
|
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.
|
|
47
49
|
|
|
@@ -120,9 +122,9 @@ del .away-mode
|
|
|
120
122
|
The TUI handles fallback automatically following this chain:
|
|
121
123
|
|
|
122
124
|
```
|
|
123
|
-
Codex fails
|
|
124
|
-
|
|
125
|
-
|
|
125
|
+
Codex fails → OpenCode (with Mistral Medium 3.5 128B) → Frontend (frontend repo) or Backend (backend repo)
|
|
126
|
+
```
|
|
127
|
+
Codex fails → Frontend (frontend repo) or Backend (backend repo) directly
|
|
126
128
|
```
|
|
127
129
|
|
|
128
130
|
As Orchestrator you do **not** need to manually reassign on failure — the TUI does it. Your role is:
|
|
@@ -146,19 +148,24 @@ 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** (with Mistral Medium 3.5 128B); 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
|
+
- When OpenCode uses **Mistral Medium 3.5 128B or equivalent models**, it can implement code.
|
|
159
|
+
- If the model is not suitable for implementation, OpenCode will only perform analysis and report as `blocked`.
|
|
160
|
+
|
|
155
161
|
## How To Assign Work
|
|
156
162
|
|
|
157
163
|
1. **When the user asks for a change or new task** → **NEVER analyze directly yourself**
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
164
|
+
- **If prior analysis is needed**: Create a TASK in `QUEUE.md` assigned **EXCLUSIVELY** to **OpenCode** to explore the context
|
|
165
|
+
- **Wait for the report**: OpenCode writes findings to `progress/PROGRESS-OpenCode.md` and notifies in `INBOX.md`
|
|
166
|
+
- **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)
|
|
167
|
+
- **OpenCode DOES NOT implement** — its TASKs are **ONLY for analysis**; implementation **ALWAYS** goes to Codex or Claude-Worker
|
|
168
|
+
- **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.
|
|
162
169
|
|
|
163
170
|
2. Write TASKs in `QUEUE.md` with this format:
|
|
164
171
|
|
|
@@ -177,11 +184,12 @@ Rules:
|
|
|
177
184
|
|
|
178
185
|
Routing preferences:
|
|
179
186
|
|
|
180
|
-
1.
|
|
181
|
-
2.
|
|
182
|
-
3.
|
|
183
|
-
4.
|
|
184
|
-
5.
|
|
187
|
+
1. Use OpenCode for exploration, audits, and **implementation (with Mistral Medium 3.5 128B or advanced models)**.
|
|
188
|
+
2. Use Codex as the **primary implementation agent** when the spec is clear.
|
|
189
|
+
3. Use OpenCode as the **secondary implementation agent** (when using advanced models).
|
|
190
|
+
4. Keep Claude-Worker available as automatic fallback for Codex/OpenCode and for overflow tasks.
|
|
191
|
+
5. For frontend, use Codex for narrow tasks and Frontend/Claude-Worker for broad UI work.
|
|
192
|
+
6. Do not assign all tasks to Claude just because Claude is the orchestrator.
|
|
185
193
|
|
|
186
194
|
## Hard Rules
|
|
187
195
|
|
|
@@ -195,6 +203,10 @@ Routing preferences:
|
|
|
195
203
|
8. Use Engram for durable decisions, bugs, discoveries, and session summaries.
|
|
196
204
|
9. Use `openspec/changes/<change-name>/` for large changes.
|
|
197
205
|
10. Claude remains the final reviewer before work is considered accepted.
|
|
206
|
+
11. **MANDATORY VERIFICATION:** Before creating any implementation TASK, **READ AND CONFIRM THAT:**
|
|
207
|
+
- There is an OpenCode report in `INBOX.md` or `progress/PROGRESS-OpenCode.md` for the requested analysis.
|
|
208
|
+
- The implementation TASK is based **EXCLUSIVELY** on OpenCode's report.
|
|
209
|
+
- **YOU (Claude-Orchestrator) HAVE NOT** analyzed the code yourself.
|
|
198
210
|
|
|
199
211
|
## TUI Controls
|
|
200
212
|
|
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
|
-
5
|
|
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 | Default Model | Implementation? | Notes |
|
|
32
|
+
|-------|-----|----------------|----------------|-------|
|
|
33
|
+
| **Claude-Orchestrator** | - | - | ❌ No | Session coordinator only |
|
|
34
|
+
| **Codex** | `codex` | gpt-5.5 | ✅ Yes | Primary implementation |
|
|
35
|
+
| **OpenCode** | `opencode` | auto | ✅ **Yes** (with Mistral Medium 3.5 128B) | Secondary implementation |
|
|
36
|
+
| **Claude-Worker** (Backend/Frontend) | `claude` | sonnet | ✅ 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, if using Mistral Medium 3.5 128B) → **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
|
npm i -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
|
+
npm 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,141 @@ 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", "model": "sonnet" },
|
|
157
|
-
"Frontend": { "cli": "claude", "model": "sonnet" },
|
|
158
|
-
"Codex": { "cli": "codex", "model": "gpt-5.5" },
|
|
159
|
-
"OpenCode": { "cli": "opencode", "model": "
|
|
173
|
+
"Backend": { "cli": "claude", "defaultRepo": "backend", "model": "sonnet" },
|
|
174
|
+
"Frontend": { "cli": "claude", "defaultRepo": "frontend", "model": "sonnet" },
|
|
175
|
+
"Codex": { "cli": "codex", "defaultRepo": "backend", "model": "gpt-5.5" },
|
|
176
|
+
"OpenCode": { "cli": "opencode", "defaultRepo": "frontend", "model": "auto" }
|
|
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
|
+
- Use `"model": "auto"` to let the agent use your default configured model (e.g., Mistral Medium 3.5 128B for OpenCode).
|
|
183
|
+
- Specify a model explicitly (e.g., `"model": "gpt-5.5"`) to override.
|
|
184
|
+
|
|
185
|
+
## 🔄 Workflow Example
|
|
186
|
+
|
|
187
|
+
1. **User Request**: `"Add JWT authentication to the backend."`
|
|
188
|
+
2. **Claude-Orchestrator**:
|
|
189
|
+
- Creates `TASK-001` (OpenCode): `"Analyze current auth system"`
|
|
190
|
+
- Waits for OpenCode's report in `progress/PROGRESS-OpenCode.md`
|
|
191
|
+
3. **OpenCode**:
|
|
192
|
+
- Analyzes the codebase.
|
|
193
|
+
- Writes findings to `progress/PROGRESS-OpenCode.md` and `INBOX.md`.
|
|
194
|
+
4. **Claude-Orchestrator**:
|
|
195
|
+
- Reads OpenCode's report.
|
|
196
|
+
- Creates `TASK-002` (Codex): `"Implement JWT auth"` (depends on TASK-001).
|
|
197
|
+
5. **Codex/OpenCode**:
|
|
198
|
+
- Implements the feature (Codex first, OpenCode second if using Mistral Medium 3.5 128B).
|
|
199
|
+
- Reports completion in `progress/PROGRESS-*.md`.
|
|
200
|
+
6. **TUI**:
|
|
201
|
+
- Shows real-time updates (task status, agent activity, costs).
|
|
202
|
+
|
|
203
|
+
## 📊 Supported Agents & Models
|
|
204
|
+
|
|
205
|
+
| Agent | CLI | Default Model | Implementation? | Notes |
|
|
206
|
+
|-------|-----|----------------|----------------|-------|
|
|
207
|
+
| Backend | `claude` | sonnet | ✅ Yes | Claude-Worker for backend tasks |
|
|
208
|
+
| Frontend | `claude` | sonnet | ✅ Yes | Claude-Worker for frontend tasks |
|
|
209
|
+
| Codex | `codex` | gpt-5.5 | ✅ Yes | Primary implementation |
|
|
210
|
+
| OpenCode | `opencode` | auto | ✅ **Yes** (with Mistral Medium 3.5 128B) | Secondary implementation |
|
|
211
|
+
| Gemini | `gemini` | auto | ❌ No | Audits/reviews only |
|
|
212
|
+
| Cursor | `cursor` | auto | ❌ No | Bulk edits only |
|
|
213
|
+
| Abacus | `abacusai` | auto | ❌ No | Small focused tasks |
|
|
214
|
+
|
|
215
|
+
## 🛡️ Safety & Best Practices
|
|
216
|
+
|
|
217
|
+
- **No auto-commits**: Agents never run `git commit` or `git push`.
|
|
218
|
+
- **No YOLO by default**: Safe permissions mode is enabled unless `--yolo` is used.
|
|
219
|
+
- **Claude as reviewer**: Claude-Orchestrator validates all work before user approval.
|
|
220
|
+
- **Clean repos**: Project files stay untouched; orchestrator files live in the sibling workspace.
|
|
221
|
+
- **Fallback safety**: Tasks are automatically reassigned if an agent fails.
|
|
222
|
+
|
|
223
|
+
## 📚 Documentation
|
|
224
|
+
|
|
225
|
+
- **Core Rules**: See `ORCHESTRATOR.md` in the generated workspace.
|
|
226
|
+
- **Agent Routing**: See `CLAUDE.md`.
|
|
227
|
+
- **Architecture**: See `docs/architecture.md`.
|
|
228
|
+
- **OpenSpec**: See `openspec/FLOW.md`.
|
|
229
|
+
|
|
230
|
+
## 🤝 Acknowledgements
|
|
231
|
+
|
|
232
|
+
Inspired by [Orquestador-AI](https://github.com/ariellontero/Orquestador-AI) by Ariel Lontero (MIT).
|
|
233
|
+
Built from scratch with a modern architecture: **Ink TUI + React, npm package, real-time fs.watch, multi-language templates, and multi-agent coordination**.
|
|
@@ -2,40 +2,85 @@
|
|
|
2
2
|
|
|
3
3
|
## Role
|
|
4
4
|
|
|
5
|
-
OpenCode is
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
OpenCode is a **multi-purpose agent** that can perform **analysis, exploration AND CODE IMPLEMENTATION**.
|
|
6
|
+
When using powerful models like **Mistral Medium 3.5 128B**, OpenCode is capable of:
|
|
7
|
+
- Analyzing existing code
|
|
8
|
+
- Implementing new features
|
|
9
|
+
- Fixing complex bugs
|
|
10
|
+
- Refactoring code
|
|
8
11
|
|
|
9
12
|
## Scope
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
14
|
+
### Analysis (Always available)
|
|
15
|
+
- Codebase audits
|
|
16
|
+
- Flow and architecture exploration
|
|
17
|
+
- Context reading before implementation
|
|
18
|
+
- Read-only smoke tests
|
|
19
|
+
- Structured Markdown reports
|
|
20
|
+
- Identifying dead code, missing dependencies, inconsistencies
|
|
21
|
+
|
|
22
|
+
### Implementation (With advanced models like Mistral Medium 3.5 128B)
|
|
23
|
+
- Implementing new features
|
|
24
|
+
- Modifying project files
|
|
25
|
+
- Writing new tests
|
|
26
|
+
- Refactoring code
|
|
27
|
+
- Fixing bugs
|
|
19
28
|
|
|
20
|
-
## Rules
|
|
29
|
+
## General Rules
|
|
21
30
|
|
|
22
31
|
1. Do not commit or push.
|
|
23
|
-
2.
|
|
24
|
-
3.
|
|
25
|
-
4.
|
|
26
|
-
|
|
32
|
+
2. If the task is **analysis**: deliver findings in Markdown tables and write the report in `progress/PROGRESS-OpenCode.md`
|
|
33
|
+
3. If the task is **implementation**: modify the necessary files and document the changes
|
|
34
|
+
4. Always deliver a TASK_REPORT at the end
|
|
35
|
+
|
|
36
|
+
## Assignment Priority
|
|
37
|
+
|
|
38
|
+
- **First choice for implementation**: Codex (when available)
|
|
39
|
+
- **Second choice for implementation**: OpenCode (with Mistral Medium 3.5 128B or equivalent models)
|
|
40
|
+
- **Third choice**: Claude-Worker (Backend/Frontend)
|
|
41
|
+
|
|
42
|
+
## Model-Specific Behavior
|
|
27
43
|
|
|
28
|
-
|
|
44
|
+
### With analysis models (e.g., small models or low-context):
|
|
45
|
+
- **Analysis only**: Do not implement code
|
|
46
|
+
- Report in TASK_REPORT: `status: blocked`, `issues: "Model not suitable for implementation — reassign to Codex or Claude-Worker"`
|
|
29
47
|
|
|
30
|
-
|
|
48
|
+
### With implementation models (e.g., Mistral Medium 3.5 128B, GPT-4, etc.):
|
|
49
|
+
- **You CAN implement code** when the task is clearly defined
|
|
50
|
+
- Ensure that any required prior analysis is already complete
|
|
51
|
+
- Follow the same quality rules as Codex
|
|
31
52
|
|
|
32
|
-
|
|
53
|
+
## Completion Report (REQUIRED)
|
|
54
|
+
|
|
55
|
+
### For analysis tasks:
|
|
56
|
+
```
|
|
57
|
+
TASK_REPORT
|
|
58
|
+
status: completed | failed | blocked
|
|
59
|
+
files_modified: none
|
|
60
|
+
files_created: none
|
|
61
|
+
files_deleted: none
|
|
62
|
+
summary: 1-3 sentences describing findings
|
|
63
|
+
issues: problems or "none"
|
|
64
|
+
TASK_REPORT_END
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### For implementation tasks:
|
|
68
|
+
```
|
|
69
|
+
TASK_REPORT
|
|
70
|
+
status: completed | failed | blocked
|
|
71
|
+
files_modified: ["src/file1.js", "src/file2.ts"]
|
|
72
|
+
files_created: ["src/new-file.js"]
|
|
73
|
+
files_deleted: ["src/old-file.js"]
|
|
74
|
+
summary: 1-3 sentences describing the changes made
|
|
75
|
+
issues: problems or "none"
|
|
76
|
+
TASK_REPORT_END
|
|
77
|
+
```
|
|
33
78
|
TASK_REPORT
|
|
34
79
|
status: completed | failed | blocked
|
|
35
|
-
files_modified:
|
|
36
|
-
files_created:
|
|
37
|
-
files_deleted:
|
|
38
|
-
summary: 1-3 sentences
|
|
80
|
+
files_modified: none
|
|
81
|
+
files_created: none
|
|
82
|
+
files_deleted: none
|
|
83
|
+
summary: 1-3 sentences describing findings
|
|
39
84
|
issues: problems or "none"
|
|
40
85
|
TASK_REPORT_END
|
|
41
86
|
```
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
// Lee NOTIFY.md del workspace y vuelca el contenido a stdout para que
|
|
4
|
+
// el hook de Claude Code lo inyecte en la sesión interactiva.
|
|
5
|
+
// El archivo se elimina después de leerse para no repetir la notificación.
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
|
|
9
|
+
const notifyFile = path.join(process.cwd(), 'NOTIFY.md');
|
|
10
|
+
if (!fs.existsSync(notifyFile)) process.exit(0);
|
|
11
|
+
|
|
12
|
+
const content = fs.readFileSync(notifyFile, 'utf8').trim();
|
|
13
|
+
if (!content) {
|
|
14
|
+
try { fs.unlinkSync(notifyFile); } catch {}
|
|
15
|
+
process.exit(0);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
try { fs.unlinkSync(notifyFile); } catch {}
|
|
19
|
+
|
|
20
|
+
process.stdout.write('\n' + content + '\n');
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"Stop": [
|
|
4
|
+
{
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "node .claude/hooks/notify-check.js"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"UserPromptSubmit": [
|
|
14
|
+
{
|
|
15
|
+
"hooks": [
|
|
16
|
+
{
|
|
17
|
+
"type": "command",
|
|
18
|
+
"command": "node .claude/hooks/notify-check.js"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|