@liriraid/agentflow-ai 1.0.10
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/LICENSE +21 -0
- package/README.md +79 -0
- package/bin/agentflow.mjs +332 -0
- package/orchestrator.js +1585 -0
- package/package.json +64 -0
- package/scripts/scaffold-agent-configs.mjs +100 -0
- package/scripts/scaffold-openspec-change.mjs +84 -0
- package/scripts/update-skill-registry.mjs +174 -0
- package/src/ink/app.mjs +240 -0
- package/src/ink/index.mjs +400 -0
- package/templates/en/.atl/skill-registry.md +27 -0
- package/templates/en/.claude/README.md +7 -0
- package/templates/en/.claude/skills/orchestrator-apply/SKILL.md +31 -0
- package/templates/en/.claude/skills/orchestrator-archive/SKILL.md +26 -0
- package/templates/en/.claude/skills/orchestrator-design/SKILL.md +27 -0
- package/templates/en/.claude/skills/orchestrator-explore/SKILL.md +29 -0
- package/templates/en/.claude/skills/orchestrator-init/SKILL.md +32 -0
- package/templates/en/.claude/skills/orchestrator-memory/SKILL.md +26 -0
- package/templates/en/.claude/skills/orchestrator-openspec/SKILL.md +35 -0
- package/templates/en/.claude/skills/orchestrator-propose/SKILL.md +26 -0
- package/templates/en/.claude/skills/orchestrator-queue-planning/SKILL.md +31 -0
- package/templates/en/.claude/skills/orchestrator-spec/SKILL.md +27 -0
- package/templates/en/.claude/skills/orchestrator-tasks/SKILL.md +27 -0
- package/templates/en/.claude/skills/orchestrator-verify/SKILL.md +27 -0
- package/templates/en/.codex/README.md +7 -0
- package/templates/en/.opencode/README.md +7 -0
- package/templates/en/AGENT-CONFIG.md +75 -0
- package/templates/en/CLAUDE.md +91 -0
- package/templates/en/ENGRAM.md +50 -0
- package/templates/en/ORCHESTRATOR.md +192 -0
- package/templates/en/PROJECT.md +70 -0
- package/templates/en/QUEUE.md +17 -0
- package/templates/en/README.md +188 -0
- package/templates/en/agents/ABACUS.md +36 -0
- package/templates/en/agents/BACKEND.md +37 -0
- package/templates/en/agents/CODEX.md +45 -0
- package/templates/en/agents/CURSOR.md +37 -0
- package/templates/en/agents/FRONTEND.md +36 -0
- package/templates/en/agents/GEMINI.md +37 -0
- package/templates/en/agents/OPENCODE.md +41 -0
- package/templates/en/docs/README.md +14 -0
- package/templates/en/docs/agents.md +33 -0
- package/templates/en/docs/architecture.md +43 -0
- package/templates/en/docs/components.md +14 -0
- package/templates/en/docs/engram.md +16 -0
- package/templates/en/docs/openspec.md +32 -0
- package/templates/en/docs/usage.md +66 -0
- package/templates/en/openspec/FLOW.md +24 -0
- package/templates/en/openspec/README.md +29 -0
- package/templates/en/openspec/changes/.gitkeep +1 -0
- package/templates/en/openspec/changes/archive/.gitkeep +1 -0
- package/templates/en/openspec/specs/.gitkeep +1 -0
- package/templates/en/openspec/templates/archive-report.md +21 -0
- package/templates/en/openspec/templates/change-metadata.yaml +9 -0
- package/templates/en/openspec/templates/design.md +26 -0
- package/templates/en/openspec/templates/proposal.md +27 -0
- package/templates/en/openspec/templates/spec.md +18 -0
- package/templates/en/openspec/templates/tasks.md +14 -0
- package/templates/en/openspec/templates/verify-report.md +21 -0
- package/templates/en/orchestrator.config.json +99 -0
- package/templates/es/.atl/skill-registry.md +133 -0
- package/templates/es/.claude/README.md +7 -0
- package/templates/es/.claude/skills/orchestrator-apply/SKILL.md +32 -0
- package/templates/es/.claude/skills/orchestrator-archive/SKILL.md +28 -0
- package/templates/es/.claude/skills/orchestrator-design/SKILL.md +32 -0
- package/templates/es/.claude/skills/orchestrator-explore/SKILL.md +31 -0
- package/templates/es/.claude/skills/orchestrator-init/SKILL.md +32 -0
- package/templates/es/.claude/skills/orchestrator-memory/SKILL.md +31 -0
- package/templates/es/.claude/skills/orchestrator-openspec/SKILL.md +55 -0
- package/templates/es/.claude/skills/orchestrator-propose/SKILL.md +33 -0
- package/templates/es/.claude/skills/orchestrator-queue-planning/SKILL.md +35 -0
- package/templates/es/.claude/skills/orchestrator-spec/SKILL.md +28 -0
- package/templates/es/.claude/skills/orchestrator-tasks/SKILL.md +32 -0
- package/templates/es/.claude/skills/orchestrator-verify/SKILL.md +31 -0
- package/templates/es/.codex/README.md +7 -0
- package/templates/es/.opencode/README.md +7 -0
- package/templates/es/AGENT-CONFIG.md +83 -0
- package/templates/es/CLAUDE.md +136 -0
- package/templates/es/ENGRAM.md +70 -0
- package/templates/es/ORCHESTRATOR.md +199 -0
- package/templates/es/PROJECT.md +237 -0
- package/templates/es/QUEUE.md +17 -0
- package/templates/es/README.md +568 -0
- package/templates/es/agents/ABACUS.md +25 -0
- package/templates/es/agents/BACKEND.md +28 -0
- package/templates/es/agents/CODEX.md +37 -0
- package/templates/es/agents/CURSOR.md +27 -0
- package/templates/es/agents/FRONTEND.md +29 -0
- package/templates/es/agents/GEMINI.md +26 -0
- package/templates/es/agents/OPENCODE.md +32 -0
- package/templates/es/docs/README.md +12 -0
- package/templates/es/docs/agents.md +57 -0
- package/templates/es/docs/architecture.md +41 -0
- package/templates/es/docs/components.md +33 -0
- package/templates/es/docs/engram.md +30 -0
- package/templates/es/docs/openspec.md +34 -0
- package/templates/es/docs/usage.md +54 -0
- package/templates/es/openspec/FLOW.md +139 -0
- package/templates/es/openspec/README.md +77 -0
- package/templates/es/openspec/changes/.gitkeep +1 -0
- package/templates/es/openspec/changes/archive/.gitkeep +1 -0
- package/templates/es/openspec/specs/.gitkeep +1 -0
- package/templates/es/openspec/templates/archive-report.md +23 -0
- package/templates/es/openspec/templates/change-metadata.yaml +9 -0
- package/templates/es/openspec/templates/design.md +33 -0
- package/templates/es/openspec/templates/proposal.md +36 -0
- package/templates/es/openspec/templates/spec.md +33 -0
- package/templates/es/openspec/templates/tasks.md +22 -0
- package/templates/es/openspec/templates/verify-report.md +24 -0
- package/templates/es/orchestrator.config.json +99 -0
|
@@ -0,0 +1,31 @@
|
|
|
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.0"
|
|
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
|
+
## Critical Rules
|
|
18
|
+
|
|
19
|
+
- Create small, concrete, executable TASKs.
|
|
20
|
+
- Every TASK must include agent, priority, repo, and a clear description.
|
|
21
|
+
- Use `> after:TASK-NNN` for dependencies.
|
|
22
|
+
- Do not implement the task directly as Claude-Orchestrator.
|
|
23
|
+
- Prefer assigning first executable work to `Codex` or `OpenCode` when they are suitable.
|
|
24
|
+
- Use Claude-Worker only for fallback, extra capacity, sensitive work, broad implementation, or when explicitly requested.
|
|
25
|
+
- Codex can work in `repo=frontend`, but only for narrow, clear, verifiable tasks.
|
|
26
|
+
- Broad frontend work should go to `Frontend`/Claude-Worker.
|
|
27
|
+
- Keep `QUEUE.md` aligned with the user's current objective.
|
|
28
|
+
|
|
29
|
+
## Expected Result
|
|
30
|
+
|
|
31
|
+
`QUEUE.md` contains clear TASKs ready for the TUI to run.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orchestrator-spec
|
|
3
|
+
description: >
|
|
4
|
+
Create or update the behavioral specification for a change.
|
|
5
|
+
license: MIT
|
|
6
|
+
metadata:
|
|
7
|
+
owner: agentflow
|
|
8
|
+
version: "1.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Skill: orchestrator-spec
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Turn the proposal into clear required behavior and acceptance criteria.
|
|
16
|
+
|
|
17
|
+
## Critical Rules
|
|
18
|
+
|
|
19
|
+
- Use `openspec/changes/<change-name>/specs/spec.md`.
|
|
20
|
+
- Focus on observable behavior.
|
|
21
|
+
- Include acceptance criteria when useful.
|
|
22
|
+
- Do not mix implementation details into the spec unless needed for clarity.
|
|
23
|
+
- Do not implement code directly.
|
|
24
|
+
|
|
25
|
+
## Expected Result
|
|
26
|
+
|
|
27
|
+
A spec that can guide design, tasks, implementation, and verification.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orchestrator-tasks
|
|
3
|
+
description: >
|
|
4
|
+
Break a change into implementation tasks that can later be translated into QUEUE.md.
|
|
5
|
+
license: MIT
|
|
6
|
+
metadata:
|
|
7
|
+
owner: agentflow
|
|
8
|
+
version: "1.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Skill: orchestrator-tasks
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Convert proposal, spec, and design into concrete implementation tasks.
|
|
16
|
+
|
|
17
|
+
## Critical Rules
|
|
18
|
+
|
|
19
|
+
- Use `openspec/changes/<change-name>/tasks.md`.
|
|
20
|
+
- Tasks should be small, ordered, and delegable.
|
|
21
|
+
- Mark dependencies clearly.
|
|
22
|
+
- Mark which tasks are ready to become `QUEUE.md` entries.
|
|
23
|
+
- Do not implement tasks directly.
|
|
24
|
+
|
|
25
|
+
## Expected Result
|
|
26
|
+
|
|
27
|
+
A task list ready for queue planning.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orchestrator-verify
|
|
3
|
+
description: >
|
|
4
|
+
Verify that implementation matches proposal, spec, design, tasks, and user intent.
|
|
5
|
+
license: MIT
|
|
6
|
+
metadata:
|
|
7
|
+
owner: agentflow
|
|
8
|
+
version: "1.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Skill: orchestrator-verify
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Let Claude-Orchestrator review worker output before accepting it.
|
|
16
|
+
|
|
17
|
+
## Critical Rules
|
|
18
|
+
|
|
19
|
+
- Read proposal, spec, design, tasks, queue entries, logs, and reports when present.
|
|
20
|
+
- Compare implementation against the requested behavior.
|
|
21
|
+
- Identify gaps, regressions, missing tests, or unclear results.
|
|
22
|
+
- Do not accept worker output blindly.
|
|
23
|
+
- Create follow-up TASKs in `QUEUE.md` if verification finds work to do.
|
|
24
|
+
|
|
25
|
+
## Expected Result
|
|
26
|
+
|
|
27
|
+
A clear verification decision and any required follow-up tasks.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# OpenCode Local Config
|
|
2
|
+
|
|
3
|
+
This folder reserves project-local configuration for OpenCode.
|
|
4
|
+
|
|
5
|
+
- Use it as the reusable local base for OpenCode.
|
|
6
|
+
- It can later hold prompts, rules, profiles, or conventions.
|
|
7
|
+
- The workflow should not depend only on global user config.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Agent Config
|
|
2
|
+
|
|
3
|
+
This file documents the reusable agent configuration layer.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
Separate two levels:
|
|
8
|
+
|
|
9
|
+
1. **Runtime config**
|
|
10
|
+
- Lives in `orchestrator.config.json` under `agents` and `repos`.
|
|
11
|
+
- Controls which agents the engine can launch and which repos they work on.
|
|
12
|
+
|
|
13
|
+
2. **Agent profile config**
|
|
14
|
+
- Lives in `orchestrator.config.json` under `agentProfiles`.
|
|
15
|
+
- Describes local config folders and shared settings for each CLI family.
|
|
16
|
+
|
|
17
|
+
This allows the workspace to run one agent, the default three-agent setup, or a larger future setup without redesigning the config.
|
|
18
|
+
|
|
19
|
+
## Design Rule
|
|
20
|
+
|
|
21
|
+
- `agents`: operational worker instances visible to the TUI.
|
|
22
|
+
- `agentProfiles`: reusable configuration by agent family.
|
|
23
|
+
|
|
24
|
+
Examples:
|
|
25
|
+
|
|
26
|
+
- `Backend` and `Frontend` share the `claude` profile.
|
|
27
|
+
- `Codex` uses the `codex` profile.
|
|
28
|
+
- `OpenCode` uses the `opencode` profile.
|
|
29
|
+
|
|
30
|
+
## Claude-Orchestrator vs Claude-Worker
|
|
31
|
+
|
|
32
|
+
The `claude` profile can appear in two operational roles:
|
|
33
|
+
|
|
34
|
+
- **Claude-Orchestrator**: the interactive session that reads `ORCHESTRATOR.md`, updates `QUEUE.md`, delegates, monitors, and reviews.
|
|
35
|
+
- **Claude-Worker**: workers such as `Backend` and `Frontend`, launched by the TUI, that can edit code when they receive a TASK.
|
|
36
|
+
|
|
37
|
+
Claude-Orchestrator must not modify the real project directly. If Claude should work on code, assign a TASK to `Backend` or `Frontend`.
|
|
38
|
+
|
|
39
|
+
Default routing should put executable work on Codex or OpenCode first when they are suitable. Claude-Worker is used for fallback, extra capacity, sensitive work, or broad frontend/backend implementation.
|
|
40
|
+
|
|
41
|
+
## Suggested `agentProfiles` Fields
|
|
42
|
+
|
|
43
|
+
| Field | Required | Purpose |
|
|
44
|
+
| --- | --- | --- |
|
|
45
|
+
| `enabled` | No | Whether the profile is active for the project |
|
|
46
|
+
| `localConfigDir` | No | Local project folder for that agent |
|
|
47
|
+
| `skillsDir` | No | Local skills folder, when applicable |
|
|
48
|
+
| `primary` | No | Whether this profile is the main orchestrator profile |
|
|
49
|
+
| `useForOrchestration` | No | Whether this profile can orchestrate |
|
|
50
|
+
| `notes` | No | Operational notes or restrictions |
|
|
51
|
+
|
|
52
|
+
## Initial Convention
|
|
53
|
+
|
|
54
|
+
- `claude` is the primary profile.
|
|
55
|
+
- `codex` and `opencode` are support profiles.
|
|
56
|
+
- Other profiles can exist while remaining disabled by default.
|
|
57
|
+
|
|
58
|
+
## Suggested Local Folders
|
|
59
|
+
|
|
60
|
+
- `.claude/`
|
|
61
|
+
- `.codex/`
|
|
62
|
+
- `.opencode/`
|
|
63
|
+
|
|
64
|
+
These folders are project-local. They should not depend only on the user's global home configuration.
|
|
65
|
+
|
|
66
|
+
## Priority
|
|
67
|
+
|
|
68
|
+
If both global and local agent configuration exist, the local project config should win for this orchestrator workflow.
|
|
69
|
+
|
|
70
|
+
## Relationship With Skills
|
|
71
|
+
|
|
72
|
+
- Claude uses `.claude/skills/` as the main project skill base.
|
|
73
|
+
- 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 the TASK is clear.
|
|
75
|
+
- The design should allow richer local layers for additional agents later.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Claude Project Routing
|
|
2
|
+
|
|
3
|
+
This file defines how Claude Code should behave inside this orchestrator workspace.
|
|
4
|
+
|
|
5
|
+
## Resolution Priority
|
|
6
|
+
|
|
7
|
+
1. Prefer local project skills in `./.claude/skills/`.
|
|
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.
|
|
13
|
+
|
|
14
|
+
## Intent Routing
|
|
15
|
+
|
|
16
|
+
### Orchestrator Startup
|
|
17
|
+
|
|
18
|
+
If the user says:
|
|
19
|
+
|
|
20
|
+
- `read ORCHESTRATOR.md and start`
|
|
21
|
+
- `lee ORCHESTRATOR.md y arranca`
|
|
22
|
+
- `start orchestrator`
|
|
23
|
+
- `initialize the orchestrator`
|
|
24
|
+
|
|
25
|
+
use:
|
|
26
|
+
|
|
27
|
+
- `orchestrator-init`
|
|
28
|
+
|
|
29
|
+
Startup means reading context and becoming ready. It does not mean implementing the user's first task directly.
|
|
30
|
+
|
|
31
|
+
### Exploration
|
|
32
|
+
|
|
33
|
+
If the user asks to explore, analyze, investigate, or review before implementation, use:
|
|
34
|
+
|
|
35
|
+
- `orchestrator-explore`
|
|
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.
|
|
81
|
+
|
|
82
|
+
## Key Files
|
|
83
|
+
|
|
84
|
+
- `ORCHESTRATOR.md`: core role and execution rules
|
|
85
|
+
- `QUEUE.md`: active execution queue
|
|
86
|
+
- `orchestrator.config.json`: agents, repos, and models
|
|
87
|
+
- `ENGRAM.md`: durable memory rules
|
|
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
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Engram Memory
|
|
2
|
+
|
|
3
|
+
This file defines how the orchestrator workspace should use persistent memory.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Engram keeps project continuity outside the short chat context. Use it to preserve decisions, discoveries, bugs, handoffs, and session summaries.
|
|
8
|
+
|
|
9
|
+
## When To Save Memory
|
|
10
|
+
|
|
11
|
+
Save memory after:
|
|
12
|
+
|
|
13
|
+
- architectural decisions
|
|
14
|
+
- routing or agent-policy changes
|
|
15
|
+
- bug fixes
|
|
16
|
+
- important discoveries
|
|
17
|
+
- setup or configuration changes
|
|
18
|
+
- completed sessions with useful context
|
|
19
|
+
- non-obvious tradeoffs
|
|
20
|
+
|
|
21
|
+
## Recommended Format
|
|
22
|
+
|
|
23
|
+
Use concise structured notes:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
**What**: What changed or was discovered
|
|
27
|
+
**Why**: Why it matters
|
|
28
|
+
**Where**: Files or areas affected
|
|
29
|
+
**Learned**: Gotchas or durable lessons
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Relationship With The Orchestrator
|
|
33
|
+
|
|
34
|
+
Engram complements:
|
|
35
|
+
|
|
36
|
+
- `ORCHESTRATOR.md`
|
|
37
|
+
- `CLAUDE.md`
|
|
38
|
+
- `QUEUE.md`
|
|
39
|
+
- `openspec/`
|
|
40
|
+
- handoff files
|
|
41
|
+
|
|
42
|
+
It does not replace the queue or the TUI. Runtime work still goes through `QUEUE.md`.
|
|
43
|
+
|
|
44
|
+
## Rules
|
|
45
|
+
|
|
46
|
+
- Save memory only for information that will matter in a future session.
|
|
47
|
+
- Do not store secrets, API keys, credentials, or private customer data.
|
|
48
|
+
- Prefer short, searchable titles.
|
|
49
|
+
- Use project-level memory for this repo's architecture and workflow.
|
|
50
|
+
- At the end of meaningful work, save a session summary.
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Orchestrator Session Start
|
|
2
|
+
|
|
3
|
+
> This file is the entry point for every orchestrator session.
|
|
4
|
+
> Start prompt: `Read <absolute-path-to-this-file> and start`.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Your Role
|
|
9
|
+
|
|
10
|
+
You are the **Orchestrator** for this multi-agent workspace. Your interactive Claude session must not implement project work directly. Your job is to read context, split work, write executable TASKs into `QUEUE.md`, monitor results, and review outcomes.
|
|
11
|
+
|
|
12
|
+
The TUI (`orchestrator.js`) reads `QUEUE.md` and launches the real worker agents.
|
|
13
|
+
|
|
14
|
+
## Claude Roles
|
|
15
|
+
|
|
16
|
+
There are two different Claude roles:
|
|
17
|
+
|
|
18
|
+
1. **Claude-Orchestrator**: the interactive session that reads this file, plans, updates `QUEUE.md`, reviews logs, and decides next steps. This role does not edit the real project directly.
|
|
19
|
+
2. **Claude-Worker**: workers launched by the TUI through the `claude` CLI, such as `Backend` and `Frontend`. These workers can edit code only when a TASK explicitly assigns work to them.
|
|
20
|
+
|
|
21
|
+
Do not confuse these roles. If the user asks for implementation, Claude-Orchestrator should create or update TASKs in `QUEUE.md` instead of implementing the request itself.
|
|
22
|
+
|
|
23
|
+
## Default Execution Policy
|
|
24
|
+
|
|
25
|
+
By default, use only these agent families:
|
|
26
|
+
|
|
27
|
+
- **Codex**
|
|
28
|
+
- **OpenCode**
|
|
29
|
+
- **Claude-Worker** only as fallback or extra capacity
|
|
30
|
+
|
|
31
|
+
Do not assign tasks to Gemini, Cursor, or Abacus unless the user explicitly enables them for the current session.
|
|
32
|
+
|
|
33
|
+
### First-Routing Rule
|
|
34
|
+
|
|
35
|
+
When the user requests work after startup:
|
|
36
|
+
|
|
37
|
+
1. Do not implement the work in the interactive Claude session.
|
|
38
|
+
2. Convert the request into one or more TASKs in `QUEUE.md`.
|
|
39
|
+
3. Prefer assigning the first executable work to `Codex` or `OpenCode`.
|
|
40
|
+
4. Assign a Claude-Worker only when:
|
|
41
|
+
- Codex and/or OpenCode already have useful work in flight,
|
|
42
|
+
- a task is blocked by Codex/OpenCode quota, rate limit, token limits, or repeated failure,
|
|
43
|
+
- the task is highly sensitive and needs Claude as the worker,
|
|
44
|
+
- the user explicitly asks Claude to take the worker task.
|
|
45
|
+
|
|
46
|
+
For frontend work, prefer `Codex` for narrow, well-scoped tasks and `OpenCode` for exploration/audits. Use `Frontend`/Claude-Worker for broader UI implementation, fallback, or when the other allowed agents are already occupied.
|
|
47
|
+
|
|
48
|
+
## Startup Checklist
|
|
49
|
+
|
|
50
|
+
When the user says something like `Read ORCHESTRATOR.md and start`, do this:
|
|
51
|
+
|
|
52
|
+
1. Read this file completely.
|
|
53
|
+
2. Read `<projectName>-plan.md`, `PLAN.md`, or `plan.md` if present.
|
|
54
|
+
3. Read the newest `handoffs/HANDOFF-*.md` if the folder exists.
|
|
55
|
+
4. Read `QUEUE.md` to understand pending, active, and completed work.
|
|
56
|
+
5. Read `orchestrator.config.json` to know available agents and repos.
|
|
57
|
+
6. Read all `progress/PROGRESS-*.md` files if present.
|
|
58
|
+
7. Read `ENGRAM.md` and follow the memory rules.
|
|
59
|
+
8. Use `openspec/` for large or multi-phase changes.
|
|
60
|
+
9. Tell the user the orchestrator is ready and ask what to prioritize.
|
|
61
|
+
|
|
62
|
+
Startup is context loading only. Do not create project code changes during startup.
|
|
63
|
+
|
|
64
|
+
## Away Mode
|
|
65
|
+
|
|
66
|
+
If the user says something like:
|
|
67
|
+
|
|
68
|
+
- `I will be away for 2 hours`
|
|
69
|
+
- `monitor while I am gone`
|
|
70
|
+
- `keep checking`
|
|
71
|
+
- `continue while I am away`
|
|
72
|
+
|
|
73
|
+
enter **Away Mode** for that session.
|
|
74
|
+
|
|
75
|
+
In Away Mode:
|
|
76
|
+
|
|
77
|
+
1. Check work state every 5 minutes.
|
|
78
|
+
2. Read `QUEUE.md`, completed tasks, active tasks, idle agents, progress files, and blocked tasks.
|
|
79
|
+
3. Assign new useful TASKs when agents become idle, as long as the work stays within the user's stated goal.
|
|
80
|
+
4. Update `QUEUE.md` and `TASKS.md` when work needs splitting, dependency cleanup, or a next batch.
|
|
81
|
+
5. Keep progress moving without inventing new product scope.
|
|
82
|
+
|
|
83
|
+
Away Mode limits:
|
|
84
|
+
|
|
85
|
+
- Do not change the user's objective.
|
|
86
|
+
- Do not open unrelated work streams.
|
|
87
|
+
- Do not use Gemini, Cursor, or Abacus without explicit permission.
|
|
88
|
+
- If a decision is risky or ambiguous, leave a note in `QUEUE.md` or a handoff instead of guessing.
|
|
89
|
+
|
|
90
|
+
## Fallback Policy
|
|
91
|
+
|
|
92
|
+
If Codex or OpenCode fail persistently because of quota, rate limits, token limits, expired sessions, repeated provider errors, or CLI downtime:
|
|
93
|
+
|
|
94
|
+
1. Detect that the issue is no longer transient.
|
|
95
|
+
2. Add a clear note in `QUEUE.md`, `TASKS.md`, or a handoff.
|
|
96
|
+
3. Reassign the TASK to a Claude-Worker (`Backend` or `Frontend`, based on the repo).
|
|
97
|
+
4. Include the available context so the Claude-Worker can continue instead of restarting from zero.
|
|
98
|
+
|
|
99
|
+
The priority is continuity. Do not leave tasks looping forever.
|
|
100
|
+
|
|
101
|
+
## Agents
|
|
102
|
+
|
|
103
|
+
Check `orchestrator.config.json -> agents`. Each agent has:
|
|
104
|
+
|
|
105
|
+
- `cli`: the real CLI (`claude`, `codex`, `opencode`, etc.)
|
|
106
|
+
- `defaultRepo`: the default repo key from `repos`
|
|
107
|
+
- `model`: optional model selection
|
|
108
|
+
- `instructionsFile`: the agent-specific Markdown instructions
|
|
109
|
+
|
|
110
|
+
Default agent summary:
|
|
111
|
+
|
|
112
|
+
| Name | CLI | Best For |
|
|
113
|
+
| --- | --- | --- |
|
|
114
|
+
| Backend | claude | Backend code through Claude-Worker |
|
|
115
|
+
| Frontend | claude | Broad frontend work through Claude-Worker |
|
|
116
|
+
| Codex | codex | Structured implementation, tests, docs, narrow frontend support |
|
|
117
|
+
| OpenCode | opencode | Exploration, audits, structured reports, scoped implementation |
|
|
118
|
+
| Gemini | gemini | Optional audits and reviews only when explicitly enabled |
|
|
119
|
+
| Cursor | cursor | Optional mechanical bulk edits only when explicitly enabled |
|
|
120
|
+
| Abacus | abacusai | Optional small focused tasks only when explicitly enabled |
|
|
121
|
+
|
|
122
|
+
## How To Assign Work
|
|
123
|
+
|
|
124
|
+
Write TASKs in `QUEUE.md` with this format:
|
|
125
|
+
|
|
126
|
+
```text
|
|
127
|
+
TASK-NNN | short title | Agent | P1 | repo | detailed description
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Rules:
|
|
131
|
+
|
|
132
|
+
1. `Agent` must match a key in `orchestrator.config.json.agents`.
|
|
133
|
+
2. `repo` must match a key in `orchestrator.config.json.repos`.
|
|
134
|
+
3. Add `> after:TASK-NNN` at the end of the description for dependencies.
|
|
135
|
+
4. Use `TASKS.md` under `### TASK-NNN` for longer task specs when needed.
|
|
136
|
+
5. Use `briefs/TASK-NNN-BRIEF.md` for very detailed briefs when needed.
|
|
137
|
+
6. After changing `QUEUE.md`, tell the user to press `R` in the TUI, and `S` if the TUI is paused.
|
|
138
|
+
|
|
139
|
+
Routing preferences:
|
|
140
|
+
|
|
141
|
+
1. Start with Codex/OpenCode when a task is clear enough for them.
|
|
142
|
+
2. Keep Claude-Worker available as fallback or extra capacity.
|
|
143
|
+
3. For frontend, use Codex for narrow tasks and Frontend/Claude-Worker for broad UI or complex interaction work.
|
|
144
|
+
4. Use OpenCode for exploration, audits, and scoped implementation.
|
|
145
|
+
5. Do not assign all tasks to Claude just because Claude is the orchestrator.
|
|
146
|
+
|
|
147
|
+
## Hard Rules
|
|
148
|
+
|
|
149
|
+
1. Claude-Orchestrator never edits project code directly.
|
|
150
|
+
2. All implementation must go through `QUEUE.md` and worker agents unless the user explicitly overrides this rule.
|
|
151
|
+
3. Never commit or push from worker tasks. Git control belongs to the user.
|
|
152
|
+
4. Use internal subagents only for quick research, not for real project execution.
|
|
153
|
+
5. Keep `QUEUE.md` and `TASKS.md` synchronized.
|
|
154
|
+
6. Track the next `TASK-NNN` to avoid duplicate IDs.
|
|
155
|
+
7. Write a `handoffs/HANDOFF-<date>.md` at the end of meaningful sessions.
|
|
156
|
+
8. Use Engram for durable decisions, bugs, discoveries, and session summaries.
|
|
157
|
+
9. Use `openspec/changes/<change-name>/` for large changes.
|
|
158
|
+
10. Claude remains the final reviewer before work is considered accepted.
|
|
159
|
+
|
|
160
|
+
## TUI Controls
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
cd <workspace-path>
|
|
164
|
+
node orchestrator.js
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
- `R`: reload `QUEUE.md`
|
|
168
|
+
- `S`: start or resume
|
|
169
|
+
- `P`: pause
|
|
170
|
+
- `Q`: quit and stop agents
|
|
171
|
+
|
|
172
|
+
Rate limits are retried near reset time. Completed tasks persist across TUI restarts.
|
|
173
|
+
|
|
174
|
+
## Session State
|
|
175
|
+
|
|
176
|
+
Update this section at the beginning and end of meaningful sessions:
|
|
177
|
+
|
|
178
|
+
- **Latest handoff:** none yet
|
|
179
|
+
- **Next TASK ID:** TASK-001
|
|
180
|
+
- **QUEUE:** summarize current state
|
|
181
|
+
- **Notes:** important context for the next session
|
|
182
|
+
|
|
183
|
+
## Reference Files
|
|
184
|
+
|
|
185
|
+
- Project plan: `<projectName>-plan.md`, `PLAN.md`, or `plan.md`
|
|
186
|
+
- Agent instructions: `agents/*.md`
|
|
187
|
+
- Persistent memory rules: `ENGRAM.md`
|
|
188
|
+
- OpenSpec artifacts: `openspec/`
|
|
189
|
+
- Detailed task specs: `TASKS.md`
|
|
190
|
+
- Agent progress: `progress/PROGRESS-<AgentName>.md`
|
|
191
|
+
- Handoffs: `handoffs/HANDOFF-<date>.md`
|
|
192
|
+
- Logs: `logs/`
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Project Notes
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
`agentflow` is a reusable workspace for coordinating multiple coding agents around a real project without placing orchestrator files inside the product repo.
|
|
6
|
+
|
|
7
|
+
The intended layout is:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
project-workspace/
|
|
11
|
+
RealProject/
|
|
12
|
+
orchestrator-realproject/
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The real project stays clean. The orchestrator workspace keeps queue, docs, skills, OpenSpec artifacts, memory conventions, logs, and handoffs.
|
|
16
|
+
|
|
17
|
+
## Product Direction
|
|
18
|
+
|
|
19
|
+
The package should provide:
|
|
20
|
+
|
|
21
|
+
- a sibling orchestrator workspace per real project
|
|
22
|
+
- a TUI for live queue execution
|
|
23
|
+
- Claude as orchestrator and final reviewer
|
|
24
|
+
- Codex and OpenCode as default support workers
|
|
25
|
+
- Claude-Workers for fallback, extra capacity, and broad implementation
|
|
26
|
+
- durable memory through Engram conventions
|
|
27
|
+
- OpenSpec artifacts for large changes
|
|
28
|
+
- local skills and agent instructions
|
|
29
|
+
|
|
30
|
+
## Default Operating Model
|
|
31
|
+
|
|
32
|
+
1. Install or initialize an orchestrator workspace next to the real project.
|
|
33
|
+
- Use `--lang en` or `--lang es`, or let the CLI ask interactively.
|
|
34
|
+
2. Configure `orchestrator.config.json`.
|
|
35
|
+
3. Start the TUI.
|
|
36
|
+
4. Open Claude Code inside the orchestrator workspace.
|
|
37
|
+
5. Tell Claude: `Read ORCHESTRATOR.md and start`.
|
|
38
|
+
6. Claude-Orchestrator reads context and asks what to prioritize.
|
|
39
|
+
7. User requests work.
|
|
40
|
+
8. Claude-Orchestrator writes TASKs into `QUEUE.md`.
|
|
41
|
+
9. The TUI launches workers.
|
|
42
|
+
10. Claude-Orchestrator reviews outputs and plans the next batch.
|
|
43
|
+
|
|
44
|
+
## Important Behavioral Rule
|
|
45
|
+
|
|
46
|
+
Claude-Orchestrator must not implement project work directly. Even if the user asks for implementation, the orchestrator should create TASKs in `QUEUE.md` and route them to worker agents first.
|
|
47
|
+
|
|
48
|
+
## Active Default Agents
|
|
49
|
+
|
|
50
|
+
- `Codex`: structured implementation, tests, docs, narrow frontend support
|
|
51
|
+
- `OpenCode`: exploration, audits, reports, scoped implementation
|
|
52
|
+
- `Backend` / `Frontend`: Claude-Workers used for fallback, extra capacity, or broad backend/frontend work
|
|
53
|
+
|
|
54
|
+
Gemini, Cursor, and Abacus can remain configured but should not be used unless the user enables them for that session.
|
|
55
|
+
|
|
56
|
+
## Git Rule
|
|
57
|
+
|
|
58
|
+
No agent should commit or push unless the user explicitly asks in the current session.
|
|
59
|
+
|
|
60
|
+
## Future Product Work
|
|
61
|
+
|
|
62
|
+
Possible next steps:
|
|
63
|
+
|
|
64
|
+
- binary distribution
|
|
65
|
+
- embedded templates and skills
|
|
66
|
+
- `doctor` command
|
|
67
|
+
- migration/version checks
|
|
68
|
+
- backup and restore
|
|
69
|
+
- stronger tests
|
|
70
|
+
- workspace sync and upgrade flow
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Queue
|
|
2
|
+
|
|
3
|
+
> Format: `id | title | agent | priority | repo | description`
|
|
4
|
+
> Dependencies: append `> after:TASK-NNN` to the description.
|
|
5
|
+
> Comments: lines that start with `#`.
|
|
6
|
+
|
|
7
|
+
## Pending
|
|
8
|
+
|
|
9
|
+
# === Example tasks. Delete these before adding real project work. ===
|
|
10
|
+
|
|
11
|
+
TASK-001 | Create initial backend structure | Backend | P1 | backend | Create base folders, boilerplate, and initial tests
|
|
12
|
+
TASK-002 | Build landing page | Frontend | P1 | frontend | Build a responsive hero section and first viewport
|
|
13
|
+
TASK-003 | Document API endpoints | Codex | P2 | backend | Document REST endpoints in docs/api-reference.md > after:TASK-001
|
|
14
|
+
|
|
15
|
+
## In Progress
|
|
16
|
+
|
|
17
|
+
## Completed
|