@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.
Files changed (110) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +79 -0
  3. package/bin/agentflow.mjs +332 -0
  4. package/orchestrator.js +1585 -0
  5. package/package.json +64 -0
  6. package/scripts/scaffold-agent-configs.mjs +100 -0
  7. package/scripts/scaffold-openspec-change.mjs +84 -0
  8. package/scripts/update-skill-registry.mjs +174 -0
  9. package/src/ink/app.mjs +240 -0
  10. package/src/ink/index.mjs +400 -0
  11. package/templates/en/.atl/skill-registry.md +27 -0
  12. package/templates/en/.claude/README.md +7 -0
  13. package/templates/en/.claude/skills/orchestrator-apply/SKILL.md +31 -0
  14. package/templates/en/.claude/skills/orchestrator-archive/SKILL.md +26 -0
  15. package/templates/en/.claude/skills/orchestrator-design/SKILL.md +27 -0
  16. package/templates/en/.claude/skills/orchestrator-explore/SKILL.md +29 -0
  17. package/templates/en/.claude/skills/orchestrator-init/SKILL.md +32 -0
  18. package/templates/en/.claude/skills/orchestrator-memory/SKILL.md +26 -0
  19. package/templates/en/.claude/skills/orchestrator-openspec/SKILL.md +35 -0
  20. package/templates/en/.claude/skills/orchestrator-propose/SKILL.md +26 -0
  21. package/templates/en/.claude/skills/orchestrator-queue-planning/SKILL.md +31 -0
  22. package/templates/en/.claude/skills/orchestrator-spec/SKILL.md +27 -0
  23. package/templates/en/.claude/skills/orchestrator-tasks/SKILL.md +27 -0
  24. package/templates/en/.claude/skills/orchestrator-verify/SKILL.md +27 -0
  25. package/templates/en/.codex/README.md +7 -0
  26. package/templates/en/.opencode/README.md +7 -0
  27. package/templates/en/AGENT-CONFIG.md +75 -0
  28. package/templates/en/CLAUDE.md +91 -0
  29. package/templates/en/ENGRAM.md +50 -0
  30. package/templates/en/ORCHESTRATOR.md +192 -0
  31. package/templates/en/PROJECT.md +70 -0
  32. package/templates/en/QUEUE.md +17 -0
  33. package/templates/en/README.md +188 -0
  34. package/templates/en/agents/ABACUS.md +36 -0
  35. package/templates/en/agents/BACKEND.md +37 -0
  36. package/templates/en/agents/CODEX.md +45 -0
  37. package/templates/en/agents/CURSOR.md +37 -0
  38. package/templates/en/agents/FRONTEND.md +36 -0
  39. package/templates/en/agents/GEMINI.md +37 -0
  40. package/templates/en/agents/OPENCODE.md +41 -0
  41. package/templates/en/docs/README.md +14 -0
  42. package/templates/en/docs/agents.md +33 -0
  43. package/templates/en/docs/architecture.md +43 -0
  44. package/templates/en/docs/components.md +14 -0
  45. package/templates/en/docs/engram.md +16 -0
  46. package/templates/en/docs/openspec.md +32 -0
  47. package/templates/en/docs/usage.md +66 -0
  48. package/templates/en/openspec/FLOW.md +24 -0
  49. package/templates/en/openspec/README.md +29 -0
  50. package/templates/en/openspec/changes/.gitkeep +1 -0
  51. package/templates/en/openspec/changes/archive/.gitkeep +1 -0
  52. package/templates/en/openspec/specs/.gitkeep +1 -0
  53. package/templates/en/openspec/templates/archive-report.md +21 -0
  54. package/templates/en/openspec/templates/change-metadata.yaml +9 -0
  55. package/templates/en/openspec/templates/design.md +26 -0
  56. package/templates/en/openspec/templates/proposal.md +27 -0
  57. package/templates/en/openspec/templates/spec.md +18 -0
  58. package/templates/en/openspec/templates/tasks.md +14 -0
  59. package/templates/en/openspec/templates/verify-report.md +21 -0
  60. package/templates/en/orchestrator.config.json +99 -0
  61. package/templates/es/.atl/skill-registry.md +133 -0
  62. package/templates/es/.claude/README.md +7 -0
  63. package/templates/es/.claude/skills/orchestrator-apply/SKILL.md +32 -0
  64. package/templates/es/.claude/skills/orchestrator-archive/SKILL.md +28 -0
  65. package/templates/es/.claude/skills/orchestrator-design/SKILL.md +32 -0
  66. package/templates/es/.claude/skills/orchestrator-explore/SKILL.md +31 -0
  67. package/templates/es/.claude/skills/orchestrator-init/SKILL.md +32 -0
  68. package/templates/es/.claude/skills/orchestrator-memory/SKILL.md +31 -0
  69. package/templates/es/.claude/skills/orchestrator-openspec/SKILL.md +55 -0
  70. package/templates/es/.claude/skills/orchestrator-propose/SKILL.md +33 -0
  71. package/templates/es/.claude/skills/orchestrator-queue-planning/SKILL.md +35 -0
  72. package/templates/es/.claude/skills/orchestrator-spec/SKILL.md +28 -0
  73. package/templates/es/.claude/skills/orchestrator-tasks/SKILL.md +32 -0
  74. package/templates/es/.claude/skills/orchestrator-verify/SKILL.md +31 -0
  75. package/templates/es/.codex/README.md +7 -0
  76. package/templates/es/.opencode/README.md +7 -0
  77. package/templates/es/AGENT-CONFIG.md +83 -0
  78. package/templates/es/CLAUDE.md +136 -0
  79. package/templates/es/ENGRAM.md +70 -0
  80. package/templates/es/ORCHESTRATOR.md +199 -0
  81. package/templates/es/PROJECT.md +237 -0
  82. package/templates/es/QUEUE.md +17 -0
  83. package/templates/es/README.md +568 -0
  84. package/templates/es/agents/ABACUS.md +25 -0
  85. package/templates/es/agents/BACKEND.md +28 -0
  86. package/templates/es/agents/CODEX.md +37 -0
  87. package/templates/es/agents/CURSOR.md +27 -0
  88. package/templates/es/agents/FRONTEND.md +29 -0
  89. package/templates/es/agents/GEMINI.md +26 -0
  90. package/templates/es/agents/OPENCODE.md +32 -0
  91. package/templates/es/docs/README.md +12 -0
  92. package/templates/es/docs/agents.md +57 -0
  93. package/templates/es/docs/architecture.md +41 -0
  94. package/templates/es/docs/components.md +33 -0
  95. package/templates/es/docs/engram.md +30 -0
  96. package/templates/es/docs/openspec.md +34 -0
  97. package/templates/es/docs/usage.md +54 -0
  98. package/templates/es/openspec/FLOW.md +139 -0
  99. package/templates/es/openspec/README.md +77 -0
  100. package/templates/es/openspec/changes/.gitkeep +1 -0
  101. package/templates/es/openspec/changes/archive/.gitkeep +1 -0
  102. package/templates/es/openspec/specs/.gitkeep +1 -0
  103. package/templates/es/openspec/templates/archive-report.md +23 -0
  104. package/templates/es/openspec/templates/change-metadata.yaml +9 -0
  105. package/templates/es/openspec/templates/design.md +33 -0
  106. package/templates/es/openspec/templates/proposal.md +36 -0
  107. package/templates/es/openspec/templates/spec.md +33 -0
  108. package/templates/es/openspec/templates/tasks.md +22 -0
  109. package/templates/es/openspec/templates/verify-report.md +24 -0
  110. package/templates/es/orchestrator.config.json +99 -0
@@ -0,0 +1,188 @@
1
+ # agentflow
2
+
3
+ A reusable multi-agent workspace for coordinating coding agents around a real project without placing orchestrator files inside the product repository.
4
+
5
+ The orchestrator lives next to the real project:
6
+
7
+ ```text
8
+ project-workspace/
9
+ RealProject/
10
+ orchestrator-realproject/
11
+ ```
12
+
13
+ The real project stays clean. The orchestrator workspace keeps queue, docs, skills, OpenSpec artifacts, memory conventions, logs, and handoffs.
14
+
15
+ ## What It Does
16
+
17
+ - Starts a TUI dashboard for live agent execution.
18
+ - Uses `QUEUE.md` as the executable task queue.
19
+ - Lets Claude act as orchestrator and final reviewer.
20
+ - Runs Codex, OpenCode, and Claude-Workers as implementation agents.
21
+ - Keeps project memory and handoffs outside the deliverable repo.
22
+ - Supports OpenSpec-style proposal, spec, design, tasks, verify, and archive artifacts.
23
+ - Allows one orchestrator workspace per client or product.
24
+
25
+ ## Core Rule
26
+
27
+ Claude-Orchestrator must not implement project work directly.
28
+
29
+ When the user asks for work, Claude should:
30
+
31
+ 1. Read context.
32
+ 2. Split the request into TASKs.
33
+ 3. Write those TASKs to `QUEUE.md`.
34
+ 4. Let the TUI launch the workers.
35
+ 5. Review the results.
36
+
37
+ Implementation should go through worker agents unless the user explicitly overrides this rule.
38
+
39
+ ## Default Agents
40
+
41
+ | Agent | CLI | Default Role |
42
+ | --- | --- | --- |
43
+ | Codex | `codex` | Structured implementation, tests, docs, narrow frontend support |
44
+ | OpenCode | `opencode` | Exploration, audits, reports, scoped implementation |
45
+ | Backend | `claude` | Claude-Worker for backend work, fallback, and extra capacity |
46
+ | Frontend | `claude` | Claude-Worker for broad frontend work, fallback, and extra capacity |
47
+
48
+ Gemini, Cursor, and Abacus can remain configured but are disabled operationally unless the user enables them for a session.
49
+
50
+ ## Install
51
+
52
+ ```bash
53
+ npm i -g @liriraid/agentflow-ai
54
+ ```
55
+
56
+ ## Create A Workspace
57
+
58
+ ```bash
59
+ agentflow init-workspace C:/code/my-project
60
+ ```
61
+
62
+ If no language is passed, the CLI asks whether to generate the workspace in **EN** or **ES**. You can also pass it directly:
63
+
64
+ ```bash
65
+ agentflow init-workspace C:/code/my-project --lang en
66
+ agentflow init-workspace C:/code/my-project --lang es
67
+ ```
68
+
69
+ This creates a sibling workspace:
70
+
71
+ ```text
72
+ C:/code/
73
+ my-project/
74
+ orchestrator-my-project/
75
+ ```
76
+
77
+ ## Configure Repos
78
+
79
+ Edit `orchestrator.config.json`:
80
+
81
+ ```json
82
+ {
83
+ "repos": {
84
+ "backend": "C:/code/my-backend",
85
+ "frontend": "C:/code/my-frontend"
86
+ }
87
+ }
88
+ ```
89
+
90
+ If the project only has frontend for now, both keys can temporarily point to the same repo. Update `backend` later when the backend exists.
91
+
92
+ ## Start The System
93
+
94
+ Open one terminal in the orchestrator workspace:
95
+
96
+ ```bash
97
+ cd C:/code/orchestrator-my-project
98
+ agentflow ink
99
+ ```
100
+
101
+ Open another terminal in the same orchestrator workspace:
102
+
103
+ ```bash
104
+ cd C:/code/orchestrator-my-project
105
+ claude
106
+ ```
107
+
108
+ Tell Claude:
109
+
110
+ ```text
111
+ Read ORCHESTRATOR.md and start.
112
+ ```
113
+
114
+ Claude should read the workspace context and become the orchestrator. It should not implement the first user request directly.
115
+
116
+ ## Normal Workflow
117
+
118
+ 1. User asks Claude-Orchestrator for a change.
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
+ ```
132
+
133
+ Example:
134
+
135
+ ```text
136
+ TASK-004 | Audit current frontend routing | OpenCode | P1 | frontend | Inspect route structure and report risks
137
+ TASK-005 | Add inbox empty-state test | Codex | P1 | frontend | Add a narrow test for the empty inbox state
138
+ TASK-006 | Implement inbox layout polish | Frontend | P1 | frontend | Update the main inbox layout after TASK-004 findings > after:TASK-004
139
+ ```
140
+
141
+ ## Routing Policy
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:
152
+
153
+ ```json
154
+ {
155
+ "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": "opencode/glm-5-free" }
160
+ }
161
+ }
162
+ ```
163
+
164
+ ## TUI Controls
165
+
166
+ - `R`: reload `QUEUE.md`
167
+ - `S`: start or resume
168
+ - `P`: pause
169
+ - `Q`: quit and stop agents
170
+
171
+ ## Local Files
172
+
173
+ - `ORCHESTRATOR.md`: core session rules
174
+ - `CLAUDE.md`: Claude routing
175
+ - `QUEUE.md`: active queue
176
+ - `orchestrator.config.json`: repos, agents, models
177
+ - `agents/*.md`: worker instructions
178
+ - `.claude/skills/`: local skills
179
+ - `openspec/`: durable change artifacts
180
+ - `ENGRAM.md`: memory conventions
181
+ - `docs/`: reusable documentation
182
+
183
+ ## Safety
184
+
185
+ - No worker commits or pushes by default.
186
+ - No bypass or YOLO mode unless the user starts the TUI with that intent.
187
+ - Claude remains the final reviewer before work is accepted.
188
+ - Customer/product repos stay clean because the orchestrator workspace is separate.
@@ -0,0 +1,36 @@
1
+ # Abacus Agent
2
+
3
+ ## Role
4
+
5
+ Optional Abacus worker for small, focused tasks with narrow scope.
6
+
7
+ Abacus is disabled by default. Use it only when the user explicitly enables it for the session.
8
+
9
+ ## Scope
10
+
11
+ - small fixes
12
+ - focused analysis
13
+ - small docs updates
14
+ - constrained implementation
15
+
16
+ ## Rules
17
+
18
+ 1. Do not commit or push.
19
+ 2. Do not take broad or ambiguous tasks.
20
+ 3. Ask for reassignment if the task needs a larger worker.
21
+ 4. Keep output concise and verifiable.
22
+
23
+ ## Completion Report
24
+
25
+ Always finish with:
26
+
27
+ ```text
28
+ TASK_REPORT
29
+ status: completed | failed | blocked
30
+ files_modified: list or "none"
31
+ files_created: list or "none"
32
+ files_deleted: list or "none"
33
+ summary: 1-3 sentences
34
+ issues: problems or "none"
35
+ TASK_REPORT_END
36
+ ```
@@ -0,0 +1,37 @@
1
+ # Backend Agent
2
+
3
+ ## Role
4
+
5
+ Backend developer. Work only inside the repo assigned by the TASK or by your `defaultRepo`.
6
+
7
+ ## Scope
8
+
9
+ - Server-side code
10
+ - APIs
11
+ - controllers
12
+ - services
13
+ - models
14
+ - migrations
15
+ - backend tests
16
+ - backend documentation
17
+
18
+ ## Boundaries
19
+
20
+ - Do not touch frontend code unless the TASK explicitly asks for cross-repo coordination.
21
+ - Do not commit or push.
22
+ - Keep changes focused on the TASK.
23
+
24
+ ## Completion Report
25
+
26
+ Always finish with:
27
+
28
+ ```text
29
+ TASK_REPORT
30
+ status: completed | failed | blocked
31
+ files_modified: list or "none"
32
+ files_created: list or "none"
33
+ files_deleted: list or "none"
34
+ summary: 1-3 sentences
35
+ issues: problems or "none"
36
+ TASK_REPORT_END
37
+ ```
@@ -0,0 +1,45 @@
1
+ # Codex Agent
2
+
3
+ ## Role
4
+
5
+ General-purpose coding agent for structured implementation, tests, documentation, migrations, and narrow support work.
6
+
7
+ Codex can work on backend or frontend when the TASK specifies the repo.
8
+
9
+ ## Scope
10
+
11
+ Follow the TASK brief. Use `defaultRepo` unless the TASK has a different `repo` field.
12
+
13
+ ## Frontend Policy
14
+
15
+ Frontend is usually led by the `Frontend` Claude-Worker. Codex can support frontend work when the task is narrow, clear, and verifiable, such as:
16
+
17
+ - tests
18
+ - technical docs
19
+ - mechanical refactors
20
+ - small fixes
21
+ - well-delimited file changes
22
+
23
+ For broad UI/UX changes, component architecture, interactive flows, or visual decisions, prefer assigning the main TASK to `Frontend` and use Codex only as support.
24
+
25
+ ## Rules
26
+
27
+ 1. Do not commit or push.
28
+ 2. Update `progress/PROGRESS-Codex.md` when the TASK is complete if that file exists or is expected.
29
+ 3. Keep the scope narrow when working in frontend.
30
+ 4. Do not redesign UI unless the TASK explicitly asks for it.
31
+
32
+ ## Completion Report
33
+
34
+ Always finish with:
35
+
36
+ ```text
37
+ TASK_REPORT
38
+ status: completed | failed | blocked
39
+ files_modified: list or "none"
40
+ files_created: list or "none"
41
+ files_deleted: list or "none"
42
+ summary: 1-3 sentences
43
+ issues: problems or "none"
44
+ TASK_REPORT_END
45
+ ```
@@ -0,0 +1,37 @@
1
+ # Cursor Agent
2
+
3
+ ## Role
4
+
5
+ Optional Cursor worker for mechanical high-volume edits.
6
+
7
+ Cursor is disabled by default. Use it only when the user explicitly enables it for the session.
8
+
9
+ ## Scope
10
+
11
+ - find-and-replace
12
+ - cleanup
13
+ - repetitive edits
14
+ - formatting passes
15
+ - file moves when clearly specified
16
+
17
+ ## Rules
18
+
19
+ 1. Do not commit or push.
20
+ 2. Do not make product or architecture decisions.
21
+ 3. Keep edits mechanical and scoped.
22
+ 4. Report every touched file.
23
+
24
+ ## Completion Report
25
+
26
+ Always finish with:
27
+
28
+ ```text
29
+ TASK_REPORT
30
+ status: completed | failed | blocked
31
+ files_modified: list or "none"
32
+ files_created: list or "none"
33
+ files_deleted: list or "none"
34
+ summary: 1-3 sentences
35
+ issues: problems or "none"
36
+ TASK_REPORT_END
37
+ ```
@@ -0,0 +1,36 @@
1
+ # Frontend Agent
2
+
3
+ ## Role
4
+
5
+ Frontend developer. Work only inside the UI/client repo assigned by the TASK or by your `defaultRepo`.
6
+
7
+ ## Scope
8
+
9
+ - UI components
10
+ - pages and routes
11
+ - state and data-fetching layers
12
+ - styling
13
+ - accessibility
14
+ - frontend tests
15
+ - frontend documentation
16
+
17
+ ## Boundaries
18
+
19
+ - Do not touch backend code unless the TASK explicitly asks for cross-repo coordination.
20
+ - Do not commit or push.
21
+ - Keep UI work aligned with the existing design system and project conventions.
22
+
23
+ ## Completion Report
24
+
25
+ Always finish with:
26
+
27
+ ```text
28
+ TASK_REPORT
29
+ status: completed | failed | blocked
30
+ files_modified: list or "none"
31
+ files_created: list or "none"
32
+ files_deleted: list or "none"
33
+ summary: 1-3 sentences
34
+ issues: problems or "none"
35
+ TASK_REPORT_END
36
+ ```
@@ -0,0 +1,37 @@
1
+ # Gemini Agent
2
+
3
+ ## Role
4
+
5
+ Optional Google Gemini CLI worker for audits, code review, pattern detection, and broad analysis.
6
+
7
+ Gemini is disabled by default. Use it only when the user explicitly enables it for the session.
8
+
9
+ ## Scope
10
+
11
+ - audits
12
+ - code review
13
+ - architecture review
14
+ - pattern detection
15
+ - backend-focused analysis
16
+
17
+ ## Rules
18
+
19
+ 1. Do not commit or push.
20
+ 2. Avoid large `node_modules` scans unless the TASK requires it.
21
+ 3. Keep reports structured and actionable.
22
+ 4. Stay within the assigned repo and TASK scope.
23
+
24
+ ## Completion Report
25
+
26
+ Always finish with:
27
+
28
+ ```text
29
+ TASK_REPORT
30
+ status: completed | failed | blocked
31
+ files_modified: list or "none"
32
+ files_created: list or "none"
33
+ files_deleted: list or "none"
34
+ summary: 1-3 sentences
35
+ issues: problems or "none"
36
+ TASK_REPORT_END
37
+ ```
@@ -0,0 +1,41 @@
1
+ # OpenCode Agent
2
+
3
+ ## Role
4
+
5
+ OpenCode is used for exploration, context reading, audits, structured reports, and scoped implementation.
6
+
7
+ It is not only an auditor. If the TASK asks for implementation and the scope is clear, make concrete code changes.
8
+
9
+ ## Scope
10
+
11
+ - codebase audits
12
+ - context exploration
13
+ - smoke tests
14
+ - endpoint verification
15
+ - structured Markdown reports
16
+ - scoped implementation
17
+ - small or medium refactors
18
+ - tests and technical docs
19
+
20
+ ## Rules
21
+
22
+ 1. Do not commit or push.
23
+ 2. Keep findings structured and actionable.
24
+ 3. Use Markdown tables for audit findings when useful.
25
+ 4. If implementing, leave the result ready for Claude-Orchestrator review.
26
+ 5. Do not stay in analysis mode when the TASK explicitly asks for implementation.
27
+
28
+ ## Completion Report
29
+
30
+ Always finish with:
31
+
32
+ ```text
33
+ TASK_REPORT
34
+ status: completed | failed | blocked
35
+ files_modified: list or "none"
36
+ files_created: list or "none"
37
+ files_deleted: list or "none"
38
+ summary: 1-3 sentences
39
+ issues: problems or "none"
40
+ TASK_REPORT_END
41
+ ```
@@ -0,0 +1,14 @@
1
+ # Documentation
2
+
3
+ This folder contains reusable documentation for the orchestrator workspace.
4
+
5
+ ## Files
6
+
7
+ - `usage.md`: recommended workflow
8
+ - `architecture.md`: system shape and execution model
9
+ - `agents.md`: supported agent families and routing policy
10
+ - `components.md`: implemented components
11
+ - `openspec.md`: OpenSpec flow
12
+ - `engram.md`: memory usage
13
+
14
+ The root files (`ORCHESTRATOR.md`, `CLAUDE.md`, `QUEUE.md`, and `orchestrator.config.json`) are the runtime source of truth.
@@ -0,0 +1,33 @@
1
+ # Agents
2
+
3
+ ## Default Operational Families
4
+
5
+ The default operational model uses:
6
+
7
+ - **Codex**: structured implementation, tests, docs, narrow frontend support
8
+ - **OpenCode**: exploration, audits, reports, scoped implementation
9
+ - **Claude-Worker**: backend/frontend implementation through `Backend` and `Frontend` when needed
10
+
11
+ Claude-Orchestrator is the interactive coordinator and final reviewer. It should not edit the real project directly.
12
+
13
+ ## Claude-Orchestrator vs Claude-Worker
14
+
15
+ - **Claude-Orchestrator** reads context, updates `QUEUE.md`, delegates, monitors, and reviews.
16
+ - **Claude-Worker** agents (`Backend`, `Frontend`) are launched by the TUI and can edit code when assigned a TASK.
17
+
18
+ If the user requests implementation, the orchestrator should create TASKs. It should not silently do the work itself.
19
+
20
+ ## Frontend Preference
21
+
22
+ Codex can work on `repo=frontend`, but with lower permission. Use it for tests, technical docs, mechanical refactors, punctual fixes, and well-delimited file edits.
23
+
24
+ Use `Frontend`/Claude-Worker for broad UI/UX changes, component architecture, interactive flows, or visual decisions.
25
+
26
+ ## Review Authority
27
+
28
+ Claude remains the final reviewer for:
29
+
30
+ - consistency with the TASK
31
+ - alignment with the user's intent
32
+ - acceptance of sensitive changes
33
+ - fallback decisions when another worker fails
@@ -0,0 +1,43 @@
1
+ # Architecture
2
+
3
+ ## General Model
4
+
5
+ The orchestrator has three layers:
6
+
7
+ 1. **Global CLI package**
8
+ - installed once with npm
9
+ - exposes `agentflow`
10
+ 2. **Orchestrator workspace per project**
11
+ - created as a sibling of the real project
12
+ - contains queue, docs, skills, logs, handoffs, and artifacts
13
+ 3. **Real project repo**
14
+ - remains clean
15
+ - referenced from `orchestrator.config.json`
16
+
17
+ ## Main Components
18
+
19
+ - **Runtime**: `orchestrator.js`, queue parser, scheduler, agent launcher
20
+ - **UI**: Ink TUI and legacy Blessed TUI
21
+ - **Routing**: `ORCHESTRATOR.md`, `CLAUDE.md`, local skills
22
+ - **Skills**: project-local skills in `.claude/skills/`
23
+ - **Memory**: Engram conventions and summaries
24
+ - **Artifacts**: OpenSpec lifecycle
25
+ - **Installer**: CLI commands for creating workspaces
26
+
27
+ ## Execution Model
28
+
29
+ Claude-Orchestrator coordinates work but does not edit the real project directly.
30
+
31
+ Workers execute TASKs:
32
+
33
+ - Codex for structured implementation
34
+ - OpenCode for exploration, audits, and scoped implementation
35
+ - Backend/Frontend as Claude-Workers for fallback, extra capacity, and broad implementation
36
+
37
+ The queue is the boundary between orchestration and execution.
38
+
39
+ ## Permissions
40
+
41
+ - Safe by default
42
+ - No commit or push from workers
43
+ - Bypass/YOLO only when explicitly started by the user
@@ -0,0 +1,14 @@
1
+ # Components
2
+
3
+ | Component | Status | Notes |
4
+ | --- | --- | --- |
5
+ | Runtime | Implemented | `orchestrator.js` reads `QUEUE.md` and launches workers |
6
+ | Ink TUI | Implemented | Main dashboard |
7
+ | Blessed TUI | Legacy | Still available from `orchestrator.js` |
8
+ | Routing | Implemented | `ORCHESTRATOR.md`, `CLAUDE.md`, and local skills |
9
+ | Skills | Implemented | `.claude/skills/` |
10
+ | OpenSpec | Implemented | Durable artifacts for large changes |
11
+ | Engram | Implemented | Memory conventions and summaries |
12
+ | Agent config | Implemented | `orchestrator.config.json` |
13
+
14
+ The runtime is queue-driven. Claude-Orchestrator should write tasks; worker agents execute them.
@@ -0,0 +1,16 @@
1
+ # Engram
2
+
3
+ Engram is used for persistent memory across orchestrator sessions.
4
+
5
+ Use it for:
6
+
7
+ - decisions
8
+ - discoveries
9
+ - bugs and fixes
10
+ - setup details
11
+ - routing changes
12
+ - session summaries
13
+
14
+ Do not store secrets, API keys, credentials, or private customer data.
15
+
16
+ Engram complements `QUEUE.md`, OpenSpec, handoffs, and docs. It does not replace the live queue.
@@ -0,0 +1,32 @@
1
+ # OpenSpec
2
+
3
+ OpenSpec is the durable planning layer for changes that are too large to keep only in chat.
4
+
5
+ Recommended flow:
6
+
7
+ ```text
8
+ explore -> proposal -> spec -> design -> tasks -> queue -> apply -> verify -> archive
9
+ ```
10
+
11
+ ## Files
12
+
13
+ Each change should live under:
14
+
15
+ ```text
16
+ openspec/changes/<change-name>/
17
+ ```
18
+
19
+ Typical files:
20
+
21
+ - `proposal.md`
22
+ - `specs/spec.md`
23
+ - `design.md`
24
+ - `tasks.md`
25
+ - `verify-report.md`
26
+ - `archive-report.md`
27
+
28
+ ## Relationship With The Queue
29
+
30
+ `tasks.md` is the durable plan. `QUEUE.md` is the live execution queue.
31
+
32
+ When implementation begins, translate ready items from `tasks.md` into concrete TASK entries in `QUEUE.md`.
@@ -0,0 +1,66 @@
1
+ # Usage
2
+
3
+ ## Recommended Flow
4
+
5
+ ### 1. Install the CLI
6
+
7
+ ```bash
8
+ npm i -g @liriraid/agentflow-ai
9
+ ```
10
+
11
+ ### 2. Create a sibling orchestrator workspace
12
+
13
+ ```bash
14
+ agentflow init-workspace C:/code/my-project
15
+ ```
16
+
17
+ If no language is passed, the CLI asks whether to generate the workspace in `EN` or `ES`. You can also pass it directly:
18
+
19
+ ```bash
20
+ agentflow init-workspace C:/code/my-project --lang en
21
+ agentflow init-workspace C:/code/my-project --lang es
22
+ ```
23
+
24
+ ### 3. Open the orchestrator workspace
25
+
26
+ Use two terminals:
27
+
28
+ - one for the TUI
29
+ - one for Claude Code
30
+
31
+ ### 4. Start the TUI
32
+
33
+ ```bash
34
+ cd C:/code/orchestrator-my-project
35
+ agentflow ink --paused
36
+ ```
37
+
38
+ ### 5. Start Claude in the orchestrator workspace
39
+
40
+ ```bash
41
+ cd C:/code/orchestrator-my-project
42
+ claude
43
+ ```
44
+
45
+ Then say:
46
+
47
+ ```text
48
+ Read ORCHESTRATOR.md and start.
49
+ ```
50
+
51
+ ### 6. Ask for work
52
+
53
+ Examples:
54
+
55
+ - `Audit the current frontend routing and create tasks.`
56
+ - `Prepare a proposal, spec, design, and tasks for the billing module.`
57
+ - `Create queue tasks for the next frontend iteration.`
58
+ - `Verify that the implementation matches the spec.`
59
+
60
+ Claude-Orchestrator should write tasks to `QUEUE.md`; it should not implement project work directly.
61
+
62
+ ### 7. Run tasks
63
+
64
+ Press `R` in the TUI to reload `QUEUE.md`. Press `S` if paused.
65
+
66
+ The TUI launches the workers and streams their progress.