workflow-supervisor 0.1.0 → 0.1.1
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 +375 -171
- package/adapters/claude-code/adapter.json +7 -1
- package/adapters/codex/adapter.json +7 -1
- package/bin/workflow-skills.mjs +1103 -20
- package/docs/artifacts.md +4 -2
- package/docs/cli.md +77 -15
- package/docs/compatibility.md +11 -37
- package/docs/portable-delegation.md +189 -0
- package/docs/skill-reference.md +4 -4
- package/docs/troubleshooting.md +1 -1
- package/package.json +3 -4
- package/schemas/dossier-v1.schema.json +139 -0
- package/schemas/worker-report-v1.schema.json +119 -0
- package/skills/acceptance-matrix/SKILL.md +2 -2
- package/skills/dossier-builder/SKILL.md +22 -8
- package/skills/dossier-builder/agents/openai.yaml +2 -2
- package/skills/loop-policy/SKILL.md +10 -10
- package/skills/loop-policy/agents/openai.yaml +1 -1
- package/skills/work-unit/SKILL.md +3 -3
- package/skills/worker-roles/SKILL.md +10 -10
- package/skills/worker-roles/agents/openai.yaml +2 -2
- package/skills/workflow-docs/SKILL.md +12 -9
- package/skills/workflow-docs/agents/openai.yaml +2 -2
- package/skills/workflow-docs/references/documentation-production.md +2 -0
- package/skills/workflow-docs/references/goal-resume.md +2 -0
- package/skills/workflow-docs/references/templates.md +4 -2
- package/skills/workflow-docs/references/workflow-control.md +16 -12
- package/skills/workflow-supervisor/SKILL.md +65 -43
- package/adapters/hermesagent/adapter.json +0 -8
- package/adapters/opencode/adapter.json +0 -8
package/README.md
CHANGED
|
@@ -1,266 +1,470 @@
|
|
|
1
1
|
# Workflow Supervisor
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Workflow Supervisor is a small skill pack and npm helper for making coding agents handle complex work with discipline.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
It turns a vague request like:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```text
|
|
8
|
+
Use workflow-supervisor to migrate the database from SQLite to LanceDB.
|
|
9
|
+
```
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
into a supervised workflow with intake, source grounding, bounded work units, concrete worker dossiers, independent verification, repair loops, and evidence-backed output.
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
- split a fuzzy goal into bounded work units
|
|
13
|
-
- create concrete handoffs between agents or threads
|
|
14
|
-
- choose between autonomous goal execution and human-in-the-loop execution
|
|
15
|
-
- fan out path-gated dossiers into named worker threads
|
|
16
|
-
- separate implementation from verification
|
|
17
|
-
- turn acceptance criteria into evidence-backed checks
|
|
18
|
-
- control repair loops, retries, budgets, and stop gates
|
|
19
|
-
- leave reusable Markdown state so another agent can resume
|
|
13
|
+
It currently supports certified automated worker delegation for **Codex** and **Claude Code**.
|
|
20
14
|
|
|
21
|
-
|
|
15
|
+

|
|
22
16
|
|
|
23
|
-
##
|
|
17
|
+
## What It Is
|
|
24
18
|
|
|
25
|
-
|
|
19
|
+
Workflow Supervisor is not another agent product. It is a thin coordination layer for agents that already exist.
|
|
26
20
|
|
|
27
|
-
|
|
28
|
-
sources -> work units -> execution path -> named threads -> verification -> repair -> disposition
|
|
29
|
-
```
|
|
21
|
+
The supervisor is the visible agent in the conversation. It owns the plan, asks the user questions, creates work units, validates worker contracts, launches workers, reads reports, and decides what happens next.
|
|
30
22
|
|
|
31
|
-
|
|
23
|
+
Workers are short-lived CLI runs:
|
|
32
24
|
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
workflow-supervisor --+-- work-unit
|
|
37
|
-
| |
|
|
38
|
-
| +-- dossier-builder
|
|
39
|
-
| |
|
|
40
|
-
| +-- worker-roles
|
|
41
|
-
| |
|
|
42
|
-
| +-- acceptance-matrix
|
|
43
|
-
| |
|
|
44
|
-
| +-- loop-policy
|
|
45
|
-
|
|
|
46
|
-
+-- workflow-docs
|
|
25
|
+
```bash
|
|
26
|
+
workflow-supervisor delegate --agent codex --role implementer --unit U1 --dossier .workflow/dossiers/U1.yaml
|
|
27
|
+
workflow-supervisor delegate --agent claude-code --role verifier --unit U1 --dossier .workflow/dossiers/U1.yaml
|
|
47
28
|
```
|
|
48
29
|
|
|
49
|
-
|
|
30
|
+
Each worker gets only the context it needs. It returns one structured report. The supervisor remains the coordinator.
|
|
50
31
|
|
|
51
|
-
##
|
|
32
|
+
## The Moat
|
|
52
33
|
|
|
53
|
-
The
|
|
34
|
+
The moat is not a clever prompt. The moat is the set of gates that prevent agents from drifting.
|
|
54
35
|
|
|
55
|
-
|
|
56
|
-
- `autonomous_goal`: after complete intake, the agent can continue through planning, implementation, verification, repair, and final disposition only when the execution-path intake answer selects `autonomous_goal`.
|
|
36
|
+
Workflow Supervisor enforces:
|
|
57
37
|
|
|
58
|
-
|
|
38
|
+
- complete intake before work starts
|
|
39
|
+
- no keyword-based skipping
|
|
40
|
+
- bounded work units before implementation
|
|
41
|
+
- machine-checkable `DossierV1` before workers start
|
|
42
|
+
- role separation between implementer, verifier, repair, and documenter
|
|
43
|
+
- normalized `WorkerReportV1` output from every worker
|
|
44
|
+
- evidence required for PASS
|
|
45
|
+
- automatic BLOCKED reports for vague dossiers, missing CLIs, auth failures, invalid output, timeouts, forbidden edits, or verifier mutations
|
|
59
46
|
|
|
60
|
-
|
|
47
|
+
That means the system does not merely ask agents to behave. It blocks unsafe or vague execution before it happens.
|
|
61
48
|
|
|
62
|
-
|
|
49
|
+
## What It Solves
|
|
63
50
|
|
|
64
|
-
|
|
51
|
+
Large agent tasks fail in predictable ways:
|
|
65
52
|
|
|
66
|
-
|
|
53
|
+
- the agent starts before asking enough questions
|
|
54
|
+
- "autonomous" or "use workflow supervisor" gets treated as permission to act
|
|
55
|
+
- the context window fills with unrelated history
|
|
56
|
+
- handoffs are vague
|
|
57
|
+
- implementers verify their own work
|
|
58
|
+
- verifiers say "looks good" without evidence
|
|
59
|
+
- repair work expands scope
|
|
60
|
+
- progress disappears after context compaction
|
|
61
|
+
- every platform has a different output style
|
|
67
62
|
|
|
68
|
-
|
|
63
|
+
Workflow Supervisor solves this by making the workflow explicit and resumable.
|
|
69
64
|
|
|
70
|
-
|
|
65
|
+
The conversation holds the supervisor. The `.workflow/` artifacts hold durable state. Workers get small, role-specific dossiers instead of the full conversation. Reports come back in one schema.
|
|
71
66
|
|
|
72
|
-
##
|
|
67
|
+
## Architecture
|
|
73
68
|
|
|
74
|
-
|
|
69
|
+
Workflow Supervisor has two halves: a portable skill pack that teaches an agent how to supervise work, and a small npm CLI that installs those skills, validates contracts, and runs one-shot worker delegations.
|
|
75
70
|
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
The current chat agent is always the supervisor. It owns intake, planning, source grounding, work-unit boundaries, dossiers, verification decisions, repair routing, and final disposition. The CLI never becomes a workflow daemon or queue. It is a helper that copies skills into supported agent directories, emits portable Markdown context, validates schema-backed artifacts, and invokes a single role-scoped worker process when delegation is authorized.
|
|
72
|
+
|
|
73
|
+
```mermaid
|
|
74
|
+
flowchart TB
|
|
75
|
+
User["User"] --> Supervisor["Supervisor agent in current chat"]
|
|
76
|
+
Supervisor --> Skills["Installed skills: SKILL.md and agent metadata"]
|
|
77
|
+
Supervisor --> State["Durable state: .workflow/ in the target workspace"]
|
|
78
|
+
Supervisor --> CLI["workflow-supervisor CLI: bin/workflow-skills.mjs"]
|
|
79
|
+
|
|
80
|
+
subgraph Package["npm package"]
|
|
81
|
+
SkillsSource["skills/"]
|
|
82
|
+
AdapterDefs["adapters/"]
|
|
83
|
+
SchemaDefs["schemas/"]
|
|
84
|
+
Docs["docs/"]
|
|
85
|
+
CLI
|
|
86
|
+
end
|
|
78
87
|
|
|
79
|
-
|
|
88
|
+
CLI --> SkillsSource
|
|
89
|
+
CLI --> AdapterDefs
|
|
90
|
+
CLI --> SchemaDefs
|
|
91
|
+
CLI --> Docs
|
|
92
|
+
CLI --> Adapters["Adapter command array"]
|
|
93
|
+
Adapters --> Codex["Codex CLI worker"]
|
|
94
|
+
Adapters --> Claude["Claude Code CLI worker"]
|
|
95
|
+
Codex --> Report["WorkerReportV1 JSON"]
|
|
96
|
+
Claude --> Report
|
|
97
|
+
Report --> Supervisor
|
|
80
98
|
```
|
|
81
99
|
|
|
82
|
-
The
|
|
100
|
+
The package layout is intentionally simple:
|
|
101
|
+
|
|
102
|
+
- `skills/` contains the opt-in supervisor skills and OpenAI metadata prompts.
|
|
103
|
+
- `bin/workflow-skills.mjs` contains the installer, validator, context emitter, delegation wrapper, surface guard, and command dispatch.
|
|
104
|
+
- `schemas/` defines `DossierV1` and `WorkerReportV1`.
|
|
105
|
+
- `adapters/` defines certified Codex and Claude Code command arrays.
|
|
106
|
+
- `docs/` explains CLI usage, portable delegation semantics, compatibility, artifacts, and troubleshooting.
|
|
107
|
+
- `.workflow/` is created in consuming projects as private supervisor working memory, not as package state.
|
|
108
|
+
|
|
109
|
+
```mermaid
|
|
110
|
+
flowchart LR
|
|
111
|
+
Package["workflow-supervisor package"] --> Install["install"]
|
|
112
|
+
Package --> Emit["emit-context"]
|
|
113
|
+
Package --> Validate["validate and validate-dossier"]
|
|
114
|
+
Package --> Delegate["delegate and delegate-doctor"]
|
|
115
|
+
|
|
116
|
+
Install --> CodexTarget["Codex target: ~/.agents/skills or project .agents/skills"]
|
|
117
|
+
Install --> ClaudeTarget["Claude target: ~/.claude/skills or project .claude/skills"]
|
|
118
|
+
Install --> Gitignore["Project .gitignore contains .workflow/"]
|
|
119
|
+
|
|
120
|
+
Emit --> PortableFile["Portable context file: AGENTS.md or CLAUDE.md"]
|
|
121
|
+
Validate --> SkillGate["Skill, schema, adapter, and dossier gates"]
|
|
122
|
+
Delegate --> WorkerRun["One role-scoped worker CLI process"]
|
|
123
|
+
```
|
|
83
124
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
125
|
+
Delegation is a guarded subprocess, not an open-ended conversation between agents. The supervisor creates a concrete `DossierV1`, the CLI validates it before any worker starts, the adapter receives a role-scoped prompt and the `WorkerReportV1` schema, and the wrapper normalizes failure modes into structured `BLOCKED` reports.
|
|
126
|
+
|
|
127
|
+
```mermaid
|
|
128
|
+
sequenceDiagram
|
|
129
|
+
participant S as Supervisor
|
|
130
|
+
participant C as "workflow-supervisor delegate"
|
|
131
|
+
participant D as "DossierV1 validator"
|
|
132
|
+
participant G as "Surface guard"
|
|
133
|
+
participant A as "Agent adapter"
|
|
134
|
+
participant W as "Worker CLI"
|
|
135
|
+
|
|
136
|
+
S->>C: Role, unit ID, workspace, dossier path
|
|
137
|
+
C->>D: Parse JSON, YAML, or fenced YAML
|
|
138
|
+
D-->>C: Valid dossier or BLOCKED invalid_dossier
|
|
139
|
+
C->>G: Snapshot git status or explicit surfaces
|
|
140
|
+
C->>A: Build command from adapters/<agent>/adapter.json
|
|
141
|
+
A->>W: Run one CLI process with role prompt and schema
|
|
142
|
+
W-->>A: stdout, stderr, exit code, timeout signal
|
|
143
|
+
A-->>C: Raw worker output
|
|
144
|
+
C->>C: Extract and validate WorkerReportV1
|
|
145
|
+
C->>G: Compare after-state against allowed and forbidden surfaces
|
|
146
|
+
C-->>S: PASS, FAIL, or normalized BLOCKED WorkerReportV1
|
|
93
147
|
```
|
|
94
148
|
|
|
95
|
-
|
|
149
|
+
The supervisor loop is therefore stateful at the workflow level but stateless at the worker level. Every worker run is fresh, bounded by one dossier, and reduced back to one report before the supervisor decides the next step.
|
|
150
|
+
|
|
151
|
+
```mermaid
|
|
152
|
+
stateDiagram-v2
|
|
153
|
+
[*] --> Intake
|
|
154
|
+
Intake --> SourceGrounding: Complete intake
|
|
155
|
+
SourceGrounding --> WorkUnits: Sources ranked
|
|
156
|
+
WorkUnits --> AcceptanceMatrix: Units bounded
|
|
157
|
+
AcceptanceMatrix --> Dossier: Evidence rows ready
|
|
158
|
+
Dossier --> Delegation: DossierV1 valid
|
|
159
|
+
Delegation --> Verification: WorkerReportV1 returned
|
|
160
|
+
Verification --> Repair: FAIL or actionable BLOCKED
|
|
161
|
+
Repair --> Verification: Repair report returned
|
|
162
|
+
Verification --> Documentation: PASS with evidence
|
|
163
|
+
Documentation --> FinalDisposition: Outcome recorded
|
|
164
|
+
FinalDisposition --> [*]
|
|
165
|
+
Dossier --> Intake: Missing decision
|
|
166
|
+
Delegation --> Intake: Worker BLOCKED with human question
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## What It Is Used For
|
|
170
|
+
|
|
171
|
+
Use it for work that is:
|
|
172
|
+
|
|
173
|
+
- broad or ambiguous
|
|
174
|
+
- multi-step
|
|
175
|
+
- high-risk
|
|
176
|
+
- likely to need repair loops
|
|
177
|
+
- likely to exceed one context window
|
|
178
|
+
- important enough to require independent verification
|
|
179
|
+
- easier to handle as several bounded units
|
|
180
|
+
|
|
181
|
+
Good examples:
|
|
182
|
+
|
|
183
|
+
- migrate SQLite storage to LanceDB
|
|
184
|
+
- refactor authentication across several modules
|
|
185
|
+
- update docs from a new API spec
|
|
186
|
+
- implement a feature with tests and verification
|
|
187
|
+
- review and repair a messy PR
|
|
188
|
+
- produce durable workflow docs for a long-running task
|
|
189
|
+
|
|
190
|
+
Do not use it for:
|
|
191
|
+
|
|
192
|
+
- tiny edits
|
|
193
|
+
- one-off shell commands
|
|
194
|
+
- obvious single-file changes
|
|
195
|
+
- quick explanations
|
|
196
|
+
- tasks where a normal agent turn is enough
|
|
96
197
|
|
|
97
|
-
|
|
198
|
+
## How It Works
|
|
199
|
+
|
|
200
|
+
The lifecycle is:
|
|
98
201
|
|
|
99
202
|
```text
|
|
100
|
-
|
|
203
|
+
intake
|
|
204
|
+
-> source grounding
|
|
205
|
+
-> work units
|
|
206
|
+
-> acceptance matrix
|
|
207
|
+
-> DossierV1
|
|
208
|
+
-> worker delegation
|
|
209
|
+
-> WorkerReportV1
|
|
210
|
+
-> verification
|
|
211
|
+
-> repair if needed
|
|
212
|
+
-> re-verification
|
|
213
|
+
-> documentation
|
|
214
|
+
-> final disposition
|
|
101
215
|
```
|
|
102
216
|
|
|
217
|
+
### 1. Intake
|
|
218
|
+
|
|
219
|
+
The supervisor must ask the user for every required decision before it plans deeply or starts work:
|
|
220
|
+
|
|
103
221
|
```text
|
|
104
|
-
|
|
222
|
+
1. Objective and source
|
|
223
|
+
2. Execution path: autonomous_goal or human_in_loop
|
|
224
|
+
3. Mode: sequential, parallel where safe, or staged parallel
|
|
225
|
+
4. Delegation: automated workers, native subagents if available, or same-session phased
|
|
226
|
+
5. Final disposition: keep local, open PR, push, deploy, publish, or ask at end
|
|
227
|
+
6. Boundaries: installs, network, credentials, destructive operations, forbidden surfaces
|
|
228
|
+
7. State artifacts: .workflow docs, another directory, or inline state
|
|
105
229
|
```
|
|
106
230
|
|
|
231
|
+
If any answer is missing or vague, the supervisor asks again and stops.
|
|
232
|
+
|
|
233
|
+
### 2. Source Grounding
|
|
234
|
+
|
|
235
|
+
The supervisor identifies the source of truth: files, specs, docs, tickets, user decisions, commands, or external constraints.
|
|
236
|
+
|
|
237
|
+
If source authority is unclear, the first work unit becomes discovery instead of implementation.
|
|
238
|
+
|
|
239
|
+
### 3. Work Units
|
|
240
|
+
|
|
241
|
+
The supervisor splits the objective into bounded units.
|
|
242
|
+
|
|
243
|
+
For a SQLite to LanceDB migration, units might be:
|
|
244
|
+
|
|
107
245
|
```text
|
|
108
|
-
|
|
246
|
+
U1 dependency and config
|
|
247
|
+
U2 storage adapter
|
|
248
|
+
U3 data migration path
|
|
249
|
+
U4 tests and regression checks
|
|
250
|
+
U5 docs and outcome report
|
|
109
251
|
```
|
|
110
252
|
|
|
111
|
-
|
|
253
|
+
### 4. DossierV1
|
|
112
254
|
|
|
113
|
-
|
|
255
|
+
Before any worker starts, the supervisor creates a concrete `DossierV1`.
|
|
114
256
|
|
|
115
|
-
|
|
116
|
-
git clone https://github.com/NikolaCehic/workflow-supervisor.git
|
|
117
|
-
cd workflow-supervisor
|
|
118
|
-
npm run validate
|
|
119
|
-
node ./bin/workflow-skills.mjs install --agent codex --scope user
|
|
120
|
-
```
|
|
257
|
+
A dossier names:
|
|
121
258
|
|
|
122
|
-
|
|
259
|
+
- the exact work unit
|
|
260
|
+
- the worker role
|
|
261
|
+
- allowed surfaces
|
|
262
|
+
- forbidden surfaces
|
|
263
|
+
- must-read sources
|
|
264
|
+
- acceptance rows
|
|
265
|
+
- required evidence
|
|
266
|
+
- adversarial checks
|
|
267
|
+
- stop gates
|
|
268
|
+
- required report schema
|
|
269
|
+
|
|
270
|
+
Then the package validates it:
|
|
123
271
|
|
|
124
272
|
```bash
|
|
125
|
-
|
|
273
|
+
workflow-supervisor validate-dossier .workflow/dossiers/U2-implementer.yaml --role implementer --unit U2 --json
|
|
126
274
|
```
|
|
127
275
|
|
|
128
|
-
|
|
276
|
+
If the dossier says `all files`, `TBD`, `unknown`, `as needed`, or leaves open questions unresolved, it fails. No worker starts.
|
|
129
277
|
|
|
130
|
-
|
|
131
|
-
node ./bin/workflow-skills.mjs install --agent all --scope project --project /path/to/project
|
|
132
|
-
```
|
|
278
|
+
### 5. Worker Delegation
|
|
133
279
|
|
|
134
|
-
|
|
280
|
+
The supervisor launches one role-scoped worker through Codex or Claude Code.
|
|
135
281
|
|
|
136
282
|
```bash
|
|
137
|
-
|
|
283
|
+
workflow-supervisor delegate --agent codex --role implementer --unit U2 --dossier .workflow/dossiers/U2-implementer.yaml
|
|
138
284
|
```
|
|
139
285
|
|
|
140
|
-
|
|
286
|
+
The worker does not get the whole chat. It receives the dossier and report schema.
|
|
141
287
|
|
|
142
|
-
|
|
143
|
-
node ./bin/workflow-skills.mjs install --agent codex --skills workflow-supervisor,loop-policy,workflow-docs
|
|
144
|
-
```
|
|
288
|
+
### 6. Verification And Repair
|
|
145
289
|
|
|
146
|
-
|
|
290
|
+
A verifier checks the implementer's work against acceptance rows.
|
|
147
291
|
|
|
148
|
-
|
|
149
|
-
node ./bin/workflow-skills.mjs uninstall --agent codex --scope user
|
|
150
|
-
```
|
|
292
|
+
If verification fails, the supervisor creates repair work. Repairs must point back to verifier findings or acceptance rows. After repair, verification runs again.
|
|
151
293
|
|
|
152
|
-
|
|
294
|
+
### 7. Final Disposition
|
|
153
295
|
|
|
154
|
-
|
|
155
|
-
|
|
296
|
+
The supervisor applies the final disposition chosen during intake:
|
|
297
|
+
|
|
298
|
+
- keep changes local
|
|
299
|
+
- open a PR
|
|
300
|
+
- push
|
|
301
|
+
- deploy
|
|
302
|
+
- publish
|
|
303
|
+
- ask at the end
|
|
304
|
+
|
|
305
|
+
No final irreversible action is inferred from vibes.
|
|
306
|
+
|
|
307
|
+
## What The User Sees
|
|
308
|
+
|
|
309
|
+
The user sees the supervisor, not worker chatter.
|
|
310
|
+
|
|
311
|
+
In `human_in_loop`, the user sees:
|
|
312
|
+
|
|
313
|
+
```text
|
|
314
|
+
intake question
|
|
315
|
+
approval packet
|
|
316
|
+
progress summaries
|
|
317
|
+
blocker questions if needed
|
|
318
|
+
final report
|
|
156
319
|
```
|
|
157
320
|
|
|
158
|
-
|
|
321
|
+
In `autonomous_goal`, the user sees:
|
|
159
322
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
323
|
+
```text
|
|
324
|
+
intake question
|
|
325
|
+
execution plan
|
|
326
|
+
periodic progress summaries
|
|
327
|
+
blockers only when needed
|
|
328
|
+
final report
|
|
329
|
+
```
|
|
163
330
|
|
|
164
|
-
|
|
331
|
+
Workers do not ask the user questions directly. They return `BLOCKED` and the supervisor decides how to route it.
|
|
165
332
|
|
|
166
|
-
|
|
167
|
-
|---|---|---|
|
|
168
|
-
| Codex | `~/.agents/skills` | `<project>/.agents/skills` |
|
|
169
|
-
| Claude Code | `${CLAUDE_HOME:-~/.claude}/skills` | `<project>/.claude/skills` |
|
|
170
|
-
| OpenCode | `${OPENCODE_HOME:-~/.config/opencode}/skills` | `<project>/.opencode/skills` |
|
|
171
|
-
| HermesAgent | `${HERMESAGENT_HOME:-${HERMES_HOME:-~/.hermes}}/skills` | `<project>/.hermes/skills` |
|
|
172
|
-
| Generic | custom `--target` | custom `--target` |
|
|
333
|
+
## What The Output Is
|
|
173
334
|
|
|
174
|
-
|
|
335
|
+
Workflow Supervisor produces three kinds of output.
|
|
175
336
|
|
|
176
|
-
|
|
337
|
+
### 1. Durable Workflow State
|
|
177
338
|
|
|
178
|
-
|
|
179
|
-
|---|---|
|
|
180
|
-
| `$workflow-supervisor` | Coordinates the whole loop: source grounding, work units, autonomous or human-in-loop execution path, thread orchestration, dossiers, verification, repair, stop gates, goal state, final PR/push/local disposition, and outcome reporting. |
|
|
181
|
-
| `$source-corpus` | Identifies and ranks sources of truth, then flags stale, missing, contradictory, inaccessible, or non-blocking evidence gaps. |
|
|
182
|
-
| `$work-unit` | Turns broad goals into bounded units with objective, dependencies, scope, done criteria, and sequencing. |
|
|
183
|
-
| `$dossier-builder` | Creates a concrete handoff contract for one unit: sources, allowed surfaces, forbidden surfaces, checks, stop gates, and report shape. |
|
|
184
|
-
| `$worker-roles` | Defines narrow role contracts for implementer, verifier, researcher, repair author, documenter, reviewer, and synthesizer. |
|
|
185
|
-
| `$acceptance-matrix` | Converts goals into testable criteria with evidence requirements, adversarial checks, PASS/FAIL/BLOCKED states, and residual risk. |
|
|
186
|
-
| `$loop-policy` | Controls autonomous vs human-in-loop execution, sequential/parallel mode, retry limits, approvals, budgets, escalation, no-progress detection, and continuation rules. |
|
|
187
|
-
| `$workflow-docs` | Generates the smallest useful set of durable workflow-state and documentation-production artifacts. |
|
|
339
|
+
Usually under `.workflow/`:
|
|
188
340
|
|
|
189
|
-
|
|
341
|
+
```text
|
|
342
|
+
WORKFLOW.md
|
|
343
|
+
SOURCE-CORPUS.md
|
|
344
|
+
WORK-UNITS.md
|
|
345
|
+
DOSSIER.md
|
|
346
|
+
WORKER-MAP.md
|
|
347
|
+
ACCEPTANCE-MATRIX.md
|
|
348
|
+
VERIFICATION-REPORT.md
|
|
349
|
+
REPAIR-TICKETS.md
|
|
350
|
+
DECISIONS.md
|
|
351
|
+
HANDOFF.md
|
|
352
|
+
OUTCOME.md
|
|
353
|
+
GOAL-STATE.md
|
|
354
|
+
```
|
|
190
355
|
|
|
191
|
-
|
|
356
|
+
These files make the workflow resumable after context compaction or handoff.
|
|
357
|
+
|
|
358
|
+
### 2. Worker Reports
|
|
359
|
+
|
|
360
|
+
Every worker returns `WorkerReportV1`:
|
|
361
|
+
|
|
362
|
+
```json
|
|
363
|
+
{
|
|
364
|
+
"schema": "WorkerReportV1",
|
|
365
|
+
"status": "PASS",
|
|
366
|
+
"role": "verifier",
|
|
367
|
+
"unit_id": "U2",
|
|
368
|
+
"summary": "Verified LanceDB-backed search path.",
|
|
369
|
+
"changed_surfaces": [],
|
|
370
|
+
"evidence": ["pytest tests/test_search.py passed"],
|
|
371
|
+
"checks_run": ["pytest tests/test_search.py"],
|
|
372
|
+
"skipped_checks": [],
|
|
373
|
+
"findings": [],
|
|
374
|
+
"blocking_question": null,
|
|
375
|
+
"next_action": "supervisor_review",
|
|
376
|
+
"adapter": null,
|
|
377
|
+
"guard": null,
|
|
378
|
+
"reason": null
|
|
379
|
+
}
|
|
380
|
+
```
|
|
192
381
|
|
|
193
|
-
|
|
382
|
+
### 3. Final Supervisor Report
|
|
194
383
|
|
|
195
|
-
|
|
384
|
+
The final report names:
|
|
196
385
|
|
|
197
|
-
-
|
|
198
|
-
-
|
|
199
|
-
-
|
|
200
|
-
-
|
|
201
|
-
-
|
|
202
|
-
-
|
|
203
|
-
-
|
|
204
|
-
-
|
|
205
|
-
-
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
- `.workflow/GOAL-STATE.md`
|
|
386
|
+
- execution path
|
|
387
|
+
- goal status
|
|
388
|
+
- sources used
|
|
389
|
+
- work units completed
|
|
390
|
+
- workers delegated
|
|
391
|
+
- checks run
|
|
392
|
+
- skipped checks
|
|
393
|
+
- repairs performed
|
|
394
|
+
- residual risks
|
|
395
|
+
- final disposition
|
|
396
|
+
- next action
|
|
209
397
|
|
|
210
|
-
|
|
398
|
+
## How To Install
|
|
211
399
|
|
|
212
|
-
|
|
213
|
-
- `.workflow/CONTENT-INVENTORY.md`
|
|
214
|
-
- `.workflow/OUTLINE.md`
|
|
215
|
-
- `.workflow/CONTENT-DRAFT.md`
|
|
216
|
-
- `.workflow/CLAIMS-REGISTER.md`
|
|
217
|
-
- `.workflow/STYLE-GUIDE.md`
|
|
218
|
-
- `.workflow/GLOSSARY.md`
|
|
219
|
-
- `.workflow/ASSET-REGISTER.md`
|
|
220
|
-
- `.workflow/REVIEW-PLAN.md`
|
|
221
|
-
- `.workflow/REVISION-QUEUE.md`
|
|
222
|
-
- `.workflow/PUBLISHING-CHECKLIST.md`
|
|
223
|
-
- `.workflow/PUBLICATION-LOG.md`
|
|
224
|
-
- `.workflow/MAINTENANCE-PLAN.md`
|
|
400
|
+
From a local checkout:
|
|
225
401
|
|
|
226
|
-
|
|
402
|
+
```bash
|
|
403
|
+
git clone https://github.com/NikolaCehic/workflow-supervisor.git
|
|
404
|
+
cd workflow-supervisor
|
|
405
|
+
npm run validate
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
Install for Codex:
|
|
227
409
|
|
|
228
|
-
|
|
410
|
+
```bash
|
|
411
|
+
npx workflow-supervisor install --agent codex --scope user
|
|
412
|
+
```
|
|
229
413
|
|
|
230
|
-
|
|
414
|
+
Install for Claude Code:
|
|
231
415
|
|
|
232
416
|
```bash
|
|
233
|
-
workflow-supervisor
|
|
234
|
-
workflow-supervisor validate
|
|
235
|
-
workflow-supervisor doctor --agent codex
|
|
236
|
-
workflow-supervisor install --agent codex --dry-run
|
|
237
|
-
workflow-supervisor install --agent all --scope project --project .
|
|
238
|
-
workflow-supervisor install --agent generic --target ./agent-skills
|
|
239
|
-
workflow-supervisor install --agent codex --skills workflow-supervisor,loop-policy
|
|
240
|
-
workflow-supervisor uninstall --agent codex --scope user
|
|
241
|
-
workflow-supervisor emit-context --agent opencode --skills workflow-supervisor,workflow-docs --out AGENTS.md
|
|
417
|
+
npx workflow-supervisor install --agent claude-code --scope user
|
|
242
418
|
```
|
|
243
419
|
|
|
244
|
-
|
|
420
|
+
Install for both in a project:
|
|
245
421
|
|
|
246
|
-
|
|
422
|
+
```bash
|
|
423
|
+
npx workflow-supervisor install --agent all --scope project --project .
|
|
424
|
+
```
|
|
247
425
|
|
|
248
|
-
|
|
426
|
+
Project installs also add `.workflow/` to the target project's `.gitignore`. Workflow state is local working memory by default; it should not be pushed with the consuming codebase unless the user explicitly chooses that.
|
|
427
|
+
|
|
428
|
+
Export generic Markdown instructions:
|
|
249
429
|
|
|
250
430
|
```bash
|
|
251
|
-
|
|
252
|
-
node ./bin/workflow-skills.mjs install --agent generic --target ./agent-skills --dry-run
|
|
431
|
+
npx workflow-supervisor emit-context --agent generic --out AGENTS.md
|
|
253
432
|
```
|
|
254
433
|
|
|
255
|
-
##
|
|
434
|
+
## How To Use
|
|
435
|
+
|
|
436
|
+
In Codex or Claude Code, ask explicitly:
|
|
256
437
|
|
|
257
438
|
```text
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
439
|
+
Use $workflow-supervisor to migrate this repo from SQLite to LanceDB.
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
The correct next step is not implementation. The correct next step is the intake packet.
|
|
443
|
+
|
|
444
|
+
After intake is complete, the supervisor proceeds through work units, dossiers, workers, verification, repair, and final disposition.
|
|
445
|
+
|
|
446
|
+
Useful CLI commands:
|
|
447
|
+
|
|
448
|
+
```bash
|
|
449
|
+
workflow-supervisor validate
|
|
450
|
+
workflow-supervisor validate-dossier .workflow/dossiers/U2-implementer.yaml --role implementer --unit U2 --json
|
|
451
|
+
workflow-supervisor delegate --agent codex --role implementer --unit U2 --dossier .workflow/dossiers/U2-implementer.yaml
|
|
452
|
+
workflow-supervisor delegate --agent claude-code --role verifier --unit U2 --dossier .workflow/dossiers/U2-verifier.yaml
|
|
453
|
+
workflow-supervisor delegate-doctor --agent all --probe --require-pass
|
|
262
454
|
```
|
|
263
455
|
|
|
264
|
-
##
|
|
456
|
+
## For Agents
|
|
457
|
+
|
|
458
|
+
If you are an AI agent reading this README, follow these rules:
|
|
459
|
+
|
|
460
|
+
1. Do not start work before complete intake.
|
|
461
|
+
2. Do not infer missing permissions from user intent.
|
|
462
|
+
3. Do not delegate without a valid `DossierV1`.
|
|
463
|
+
4. Do not accept worker prose as completion.
|
|
464
|
+
5. Trust only `WorkerReportV1` reports.
|
|
465
|
+
6. Treat verifier edits as invalid.
|
|
466
|
+
7. Ask the user only through the supervisor.
|
|
467
|
+
8. Before creating `.workflow/` in a codebase, ensure `.gitignore` contains `.workflow/`.
|
|
468
|
+
9. Preserve enough `.workflow/` state for another agent to resume, but do not stage or publish it unless explicitly requested.
|
|
265
469
|
|
|
266
|
-
The
|
|
470
|
+
The point is not to add ceremony. The point is to make complex agent work hard to derail.
|
|
@@ -3,5 +3,11 @@
|
|
|
3
3
|
"status": "portable",
|
|
4
4
|
"defaultTarget": "${CLAUDE_HOME:-~/.claude}/skills",
|
|
5
5
|
"metadata": "SKILL.md",
|
|
6
|
-
"fallback": "workflow-supervisor emit-context --agent claude-code --out CLAUDE.md"
|
|
6
|
+
"fallback": "workflow-supervisor emit-context --agent claude-code --out CLAUDE.md",
|
|
7
|
+
"delegate": {
|
|
8
|
+
"command": ["claude", "-p", "--output-format", "json"],
|
|
9
|
+
"promptMode": "arg",
|
|
10
|
+
"schemaMode": "json",
|
|
11
|
+
"schemaFlag": "--json-schema"
|
|
12
|
+
}
|
|
7
13
|
}
|