opencode-manifold 0.5.14 → 0.5.16
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 +86 -80
- package/dist/index.js +314 -451
- package/dist/tui.js +7 -16
- package/package.json +1 -1
- package/src/templates/agents/erlang.md +30 -0
- package/src/templates/agents/lead.md +37 -0
- package/src/templates/agents/manifold.md +68 -125
- package/src/templates/agents/systems.md +30 -0
- package/src/templates/agents/todo.md +69 -160
- package/src/templates/skills/caveman/SKILL.md +0 -4
- package/src/templates/agents/clerk.md +0 -50
- package/src/templates/agents/debug.md +0 -76
- package/src/templates/agents/junior-dev.md +0 -81
- package/src/templates/agents/senior-dev.md +0 -73
- package/src/templates/manifold/graph/.gitkeep +0 -0
- package/src/templates/manifold/index.md +0 -11
- package/src/templates/manifold/log.md +0 -10
- package/src/templates/manifold/plans.json +0 -1
- package/src/templates/manifold/schema.md +0 -234
- package/src/templates/manifold/state.json +0 -11
- package/src/templates/skills/clerk-orchestration/SKILL.md +0 -139
- package/src/templates/skills/research/SKILL.md +0 -75
- package/src/templates/skills/wiki-ingest/SKILL.md +0 -139
- package/src/templates/skills/wiki-query/SKILL.md +0 -94
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@ A Lead Dev agent walks through a task plan, a deterministic plugin state machine
|
|
|
6
6
|
|
|
7
7
|
**Core principle:** Deterministic orchestration + scoped LLM execution + persistent knowledge = agents that learn and don't repeat mistakes.
|
|
8
8
|
|
|
9
|
+
> **v2 Update:** The orchestration state machine now lives in plugin TypeScript code, not agent prompts. Agents are pure workers — the plugin decides when to call whom. This eliminates the "agent ignores protocol" problem and makes the system reliable.
|
|
10
|
+
|
|
9
11
|
---
|
|
10
12
|
|
|
11
13
|
## Requirements
|
|
@@ -72,115 +74,119 @@ Open Manifold requires:
|
|
|
72
74
|
1. **Install** using one of the methods above
|
|
73
75
|
2. **Run `/manifold-init`** in the opencode TUI to set up agents, skills, and the Manifold directory
|
|
74
76
|
3. **Create a plan** — any format (markdown, TODO list, email, meeting notes)
|
|
75
|
-
4. **
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
|
|
77
|
+
4. **Run `/manifold-plan <path>`** — the Planner agent interviews you to clarify the plan
|
|
78
|
+
5. **Answer the questions** and run `/manifold-plan-answers`
|
|
79
|
+
6. **Run `/manifold-decompose <plan>`** — Todo agent breaks it into tasks
|
|
80
|
+
7. **Run `/manifold-execute <tasks>`** — the plugin orchestrates Clerk → Senior → Junior loop
|
|
81
|
+
8. **Run `/manifold-continue`** for each subsequent task
|
|
82
|
+
|
|
83
|
+
The plugin code (not agents) handles all orchestration:
|
|
84
|
+
- Clerk researches, returns findings
|
|
85
|
+
- Senior Dev implements
|
|
86
|
+
- Junior Dev reviews (strict COMPLETE/QUESTIONS)
|
|
87
|
+
- Loop repeats up to 3×, then Debug intervenes
|
|
88
|
+
- All decisions logged to `Manifold/`
|
|
81
89
|
|
|
82
90
|
---
|
|
83
91
|
|
|
84
|
-
## Architecture:
|
|
85
|
-
|
|
86
|
-
Think of a plan as a circuit board design:
|
|
92
|
+
## Architecture: Plugin-Driven Orchestration
|
|
87
93
|
|
|
88
|
-
|
|
89
|
-
|-------|------|----------|
|
|
90
|
-
| **Manifold** | Board Designer | "What is this board's intended function?" |
|
|
91
|
-
| **Clerk** | Systems Integrator | "How does this board interface with existing system?" |
|
|
92
|
-
| **Todo** | Process Engineer | "What's the assembly sequence?" |
|
|
94
|
+
In Manifold v2, the **plugin TypeScript code** is the conductor. Agents are pure musicians who play what they're told. This eliminates prompt-drift and protocol-ignoring.
|
|
93
95
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
| Component | Role |
|
|
97
|
+
|-----------|------|
|
|
98
|
+
| **Plugin Code** | Orchestrator — decides when to call whom, manages state, enforces loops |
|
|
99
|
+
| **Planner** | Interview agent — asks clarifying questions, refines plan |
|
|
100
|
+
| **Todo** | Decomposer — breaks refined plan into tasks |
|
|
101
|
+
| **Clerk** | Researcher — searches codebase, returns structured findings |
|
|
102
|
+
| **Senior Dev** | Implementer — receives scoped prompt, produces code |
|
|
103
|
+
| **Junior Dev** | Reviewer — strict COMPLETE/QUESTIONS parsing |
|
|
104
|
+
| **Debug** | Strategist — fresh perspective after 3 failed loops |
|
|
105
|
+
| **Manifold/** | Persistent knowledge — task logs, index, graph |
|
|
99
106
|
|
|
100
107
|
---
|
|
101
108
|
|
|
102
109
|
## Architecture
|
|
103
110
|
|
|
104
|
-
### Planning Phase (
|
|
111
|
+
### Planning Phase (Plugin-Orchestrated)
|
|
105
112
|
|
|
106
113
|
```
|
|
107
|
-
User →
|
|
114
|
+
User → /manifold-plan <plan-file>
|
|
115
|
+
│
|
|
116
|
+
▼ Plugin creates session, invokes Planner
|
|
117
|
+
Planner → analyzes plan → returns JSON questions
|
|
118
|
+
│
|
|
119
|
+
▼ Plugin presents questions in chat
|
|
120
|
+
User → answers (numbered list)
|
|
108
121
|
│
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
│
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
│
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
↓
|
|
121
|
-
Manifold (Phase 3: Design Review)
|
|
122
|
-
│ Validates task list satisfies plan intent
|
|
123
|
-
│ Kickback to Todo if needed
|
|
124
|
-
↓
|
|
125
|
-
Clerk (Phase 4: Interface Validation)
|
|
126
|
-
│ Validates fitment against codebase
|
|
127
|
-
│ Kickback to Todo if needed
|
|
128
|
-
↓
|
|
129
|
-
User Approval
|
|
130
|
-
↓
|
|
122
|
+
▼ Plugin invokes Planner with Q&A
|
|
123
|
+
Planner → returns refined plan markdown
|
|
124
|
+
│
|
|
125
|
+
▼ Plugin saves to Manifold/plans/<slug>-plan.md
|
|
126
|
+
User → /manifold-decompose <plan>
|
|
127
|
+
│
|
|
128
|
+
▼ Plugin invokes Todo agent
|
|
129
|
+
Todo → decomposes into task list
|
|
130
|
+
│
|
|
131
|
+
▼ Plugin saves to Manifold/plans/<slug>-tasks.md
|
|
132
|
+
User reviews → approves → /manifold-execute
|
|
131
133
|
```
|
|
132
134
|
|
|
133
|
-
### Implementation Phase
|
|
135
|
+
### Implementation Phase (Plugin State Machine)
|
|
134
136
|
|
|
135
137
|
```
|
|
136
|
-
Plugin
|
|
137
|
-
│
|
|
138
|
-
├── Phase 1: Clerk research (per task)
|
|
139
|
-
│ ├── codebase-index search + wiki lookback + graph entries
|
|
140
|
-
│ ├── Composes scoped prompt
|
|
141
|
-
│ └── Creates task log file
|
|
142
|
-
│
|
|
143
|
-
├── Phase 2: Senior/Junior/Debug loop
|
|
144
|
-
│ ├── Spawn Senior Dev → implementation
|
|
145
|
-
│ ├── Spawn Junior Dev → review (first word: COMPLETE or QUESTIONS)
|
|
146
|
-
│ ├── Loop up to 3×, then escalate to Debug
|
|
147
|
-
│ └── Debug → one loop with Senior+Debug, then escalate to Clerk retry
|
|
138
|
+
Plugin Code (TypeScript, deterministic)
|
|
148
139
|
│
|
|
149
|
-
├──
|
|
150
|
-
│ ├──
|
|
151
|
-
│
|
|
152
|
-
│
|
|
140
|
+
├── For each task:
|
|
141
|
+
│ ├── Create session → invoke Clerk
|
|
142
|
+
│ │ └── Clerk researches → returns findings
|
|
143
|
+
│ │
|
|
144
|
+
│ ├── Extract scoped prompt from Clerk output
|
|
145
|
+
│ │
|
|
146
|
+
│ ├── Dev Loop (up to 3 iterations):
|
|
147
|
+
│ │ ├── Create session → invoke Senior Dev with scoped prompt
|
|
148
|
+
��� │ ├── Create session → invoke Junior Dev with implementation
|
|
149
|
+
│ │ ├── Parse response: COMPLETE → done, QUESTIONS → loop
|
|
150
|
+
│ │ └── Feed Junior feedback to Senior on next iteration
|
|
151
|
+
│ │
|
|
152
|
+
│ ├── If loops exhausted:
|
|
153
|
+
│ │ ├── Create session → invoke Debug for fresh perspective
|
|
154
|
+
│ │ ├── One final Senior attempt with Debug suggestion
|
|
155
|
+
│ │ └── Final Junior review → if still fails, escalate
|
|
156
|
+
│ │
|
|
157
|
+
│ ├── Log result to Manifold/tasks/<id>.md
|
|
158
|
+
│ ├── Update index.md, log.md, graph/
|
|
159
|
+
│ └── Save orchestrator state
|
|
153
160
|
│
|
|
154
|
-
└──
|
|
155
|
-
├── If test defined → run, check output
|
|
156
|
-
└── If no test → complete
|
|
161
|
+
└── User runs /manifold-continue for next task
|
|
157
162
|
```
|
|
158
163
|
|
|
159
164
|
---
|
|
160
165
|
|
|
161
166
|
## Agents
|
|
162
167
|
|
|
163
|
-
| Agent | Model | Role |
|
|
164
|
-
|
|
165
|
-
| `
|
|
166
|
-
| `
|
|
167
|
-
| `
|
|
168
|
-
| `senior-dev` | coding | Implementation specialist |
|
|
169
|
-
| `junior-dev` | cheap/small coding | Review agent |
|
|
170
|
-
| `debug` | coding + troubleshooting | Fresh perspective after 3 failed loops |
|
|
168
|
+
| Agent | Model | Role | Called By |
|
|
169
|
+
|-------|-------|------|-----------|
|
|
170
|
+
| `planner` | planning | Interview Agent — asks clarifying questions, refines plans | Plugin (interview phase) |
|
|
171
|
+
| `todo` | planning | Process Engineer — decomposes refined plans into tasks | Plugin (decomposition phase) |
|
|
172
|
+
| `clerk` | conceptualizing + large context | Researcher — searches codebase, returns structured findings | Plugin (per task) |
|
|
173
|
+
| `senior-dev` | coding | Implementation specialist | Plugin (per loop) |
|
|
174
|
+
| `junior-dev` | cheap/small coding | Review agent — strict COMPLETE/QUESTIONS | Plugin (per loop) |
|
|
175
|
+
| `debug` | coding + troubleshooting | Fresh perspective after 3 failed loops | Plugin (escalation) |
|
|
176
|
+
| `manifold` | good tool calling + planning | User-facing guide — explains system, presents results | User |
|
|
171
177
|
|
|
172
178
|
### Agent Specialization
|
|
173
179
|
|
|
174
|
-
**Planning Phase:**
|
|
175
|
-
- **
|
|
176
|
-
- **
|
|
177
|
-
-
|
|
180
|
+
**Planning Phase (Plugin-orchestrated):**
|
|
181
|
+
- **Planner** analyzes plan, generates questions, produces refined document
|
|
182
|
+
- **Todo** decomposes with full architectural awareness from Clerk research
|
|
183
|
+
- Plugin presents questions to user and manages the flow
|
|
178
184
|
|
|
179
|
-
**Implementation Phase:**
|
|
180
|
-
- **Clerk**
|
|
181
|
-
- **Senior Dev** implements
|
|
182
|
-
- **Junior Dev** reviews
|
|
183
|
-
- **Debug**
|
|
185
|
+
**Implementation Phase (Plugin-orchestrated):**
|
|
186
|
+
- **Clerk** researches codebase, returns structured findings (no orchestration)
|
|
187
|
+
- **Senior Dev** implements scoped prompt (no self-managed loops)
|
|
188
|
+
- **Junior Dev** reviews — strict first-word parsing by plugin code
|
|
189
|
+
- **Debug** provides fresh perspective when loop is stuck
|
|
184
190
|
|
|
185
191
|
The sr/jr/debug loop enables cost-efficient workflows: a strong sr-dev paired with a cheaper junior for review, and a different model for debug (fresh perspective). The key is diversity between sr and debug, not raw power. Junior's role as reviewer means a smaller/cheaper model works well — the sr/jr loop catches most issues, and debug's different reasoning approach breaks deadlocks.
|
|
186
192
|
|