workflow-supervisor 0.1.1 → 0.1.2
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 +380 -318
- package/package.json +1 -1
- package/skills/workflow-supervisor/SKILL.md +59 -9
package/README.md
CHANGED
|
@@ -1,212 +1,142 @@
|
|
|
1
1
|
# Workflow Supervisor
|
|
2
2
|
|
|
3
|
-
Workflow Supervisor is a
|
|
3
|
+
Workflow Supervisor is a strict supervision skill pack for agent work that needs to stay organized, resumable, and evidence-backed.
|
|
4
4
|
|
|
5
|
-
It turns a
|
|
5
|
+
It is for moments when you do not want an agent to jump straight into implementation, lose the thread halfway through, verify its own work, or quietly skip important handoffs. You ask for the supervisor, the supervisor asks the right setup questions, turns the work into small units, creates worker dossiers, delegates scoped work to real worker agents when possible, verifies the results, and leaves a clear outcome trail.
|
|
6
|
+
|
|
7
|
+
Example prompt:
|
|
6
8
|
|
|
7
9
|
```text
|
|
8
|
-
Use workflow-supervisor to
|
|
10
|
+
Use $workflow-supervisor to build a FastAPI Naive RAG demo for a healthcare specialist agent.
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
It currently supports certified automated worker delegation for **Codex** and **Claude Code**.
|
|
13
|
+
The correct first response is not code. The correct first response is an intake packet. That is intentional.
|
|
14
14
|
|
|
15
15
|

|
|
16
16
|
|
|
17
|
-
## What
|
|
18
|
-
|
|
19
|
-
Workflow Supervisor is not another agent product. It is a thin coordination layer for agents that already exist.
|
|
20
|
-
|
|
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.
|
|
22
|
-
|
|
23
|
-
Workers are short-lived CLI runs:
|
|
24
|
-
|
|
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
|
|
28
|
-
```
|
|
17
|
+
## What You Get
|
|
29
18
|
|
|
30
|
-
|
|
19
|
+
Workflow Supervisor gives you a repeatable workflow for serious agent tasks:
|
|
31
20
|
|
|
32
|
-
|
|
21
|
+
- a complete intake before work starts
|
|
22
|
+
- a source map, even when the only source is the user prompt
|
|
23
|
+
- bounded work units, including `WU-001` for tiny tasks
|
|
24
|
+
- dossiers that tell each worker exactly what to do and what not to touch
|
|
25
|
+
- separate implementer, verifier, repair, and documenter responsibilities
|
|
26
|
+
- structured worker reports instead of loose prose
|
|
27
|
+
- evidence-based verification
|
|
28
|
+
- repair loops that stay tied to failed acceptance rows
|
|
29
|
+
- durable `.workflow/` state when the work needs to survive context loss
|
|
30
|
+
- a final report with checks, risks, workers, and next actions
|
|
33
31
|
|
|
34
|
-
The
|
|
32
|
+
The main design choice is simple: the supervisor coordinates, workers do scoped work, and the CLI stays small.
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
## The Mental Model
|
|
37
35
|
|
|
38
|
-
|
|
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
|
|
36
|
+
Think of Workflow Supervisor as a project lead inside the current agent conversation.
|
|
46
37
|
|
|
47
|
-
|
|
38
|
+
The supervisor:
|
|
48
39
|
|
|
49
|
-
|
|
40
|
+
- asks the user for missing decisions
|
|
41
|
+
- decides when work is ready to start
|
|
42
|
+
- creates the plan, units, dossiers, and acceptance rows
|
|
43
|
+
- hands work to role-specific workers
|
|
44
|
+
- reads worker reports
|
|
45
|
+
- routes blockers and repairs
|
|
46
|
+
- decides when verification is good enough
|
|
47
|
+
- applies the final disposition policy
|
|
50
48
|
|
|
51
|
-
|
|
49
|
+
Workers:
|
|
52
50
|
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
- repair work expands scope
|
|
60
|
-
- progress disappears after context compaction
|
|
61
|
-
- every platform has a different output style
|
|
51
|
+
- receive one scoped dossier
|
|
52
|
+
- perform one role
|
|
53
|
+
- return one structured report
|
|
54
|
+
- do not talk to the human directly
|
|
55
|
+
- do not choose final disposition
|
|
56
|
+
- do not message each other
|
|
62
57
|
|
|
63
|
-
|
|
58
|
+
The CLI:
|
|
64
59
|
|
|
65
|
-
|
|
60
|
+
- installs the skills
|
|
61
|
+
- validates skill and schema files
|
|
62
|
+
- validates `DossierV1`
|
|
63
|
+
- invokes one worker process
|
|
64
|
+
- validates `WorkerReportV1`
|
|
65
|
+
- returns a normalized report to the supervisor
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
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.
|
|
70
|
-
|
|
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.
|
|
67
|
+
It is not a daemon, queue, dashboard, scheduler, or full agent harness.
|
|
72
68
|
|
|
73
69
|
```mermaid
|
|
74
70
|
flowchart TB
|
|
75
|
-
User["User"] --> Supervisor["Supervisor agent in current chat"]
|
|
76
|
-
Supervisor -->
|
|
77
|
-
Supervisor -->
|
|
78
|
-
Supervisor -->
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
CLI
|
|
86
|
-
end
|
|
87
|
-
|
|
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"]
|
|
71
|
+
User["User"] --> Supervisor["Supervisor agent in the current chat"]
|
|
72
|
+
Supervisor --> Intake["Complete intake"]
|
|
73
|
+
Supervisor --> Sources["Source corpus"]
|
|
74
|
+
Supervisor --> Units["Work units"]
|
|
75
|
+
Supervisor --> Matrix["Acceptance matrix"]
|
|
76
|
+
Supervisor --> Dossiers["DossierV1 files"]
|
|
77
|
+
Supervisor --> CLI["workflow-supervisor CLI"]
|
|
78
|
+
CLI --> Codex["Codex worker"]
|
|
79
|
+
CLI --> Claude["Claude Code worker"]
|
|
80
|
+
Codex --> Report["WorkerReportV1"]
|
|
96
81
|
Claude --> Report
|
|
97
82
|
Report --> Supervisor
|
|
83
|
+
Supervisor --> Docs[".workflow/ state"]
|
|
84
|
+
Supervisor --> Outcome["Final report"]
|
|
98
85
|
```
|
|
99
86
|
|
|
100
|
-
|
|
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
|
-
```
|
|
124
|
-
|
|
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.
|
|
87
|
+
## What Happens When You Invoke It
|
|
126
88
|
|
|
127
|
-
|
|
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
|
|
147
|
-
```
|
|
89
|
+
When you explicitly invoke `workflow-supervisor`, `$workflow-supervisor`, or say to use the skill, the workflow enters `strict_full_workflow`.
|
|
148
90
|
|
|
149
|
-
|
|
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
|
-
```
|
|
91
|
+
Strict mode means task size does not matter. Even if the request is "make a function that adds two numbers", explicit supervisor invocation still means the full workflow:
|
|
168
92
|
|
|
169
|
-
|
|
93
|
+
1. Ask the complete intake packet.
|
|
94
|
+
2. Build or record the source corpus.
|
|
95
|
+
3. Create at least one work unit.
|
|
96
|
+
4. Create acceptance rows.
|
|
97
|
+
5. Create dossiers for the planned workers.
|
|
98
|
+
6. Create a worker-agent plan.
|
|
99
|
+
7. Ask for approval when the selected path is human-in-loop.
|
|
100
|
+
8. Delegate scoped work to real workers when the environment supports it.
|
|
101
|
+
9. Verify with evidence.
|
|
102
|
+
10. Route repair work if verification fails.
|
|
103
|
+
11. Refresh docs or outcome state.
|
|
104
|
+
12. Report final status and next action.
|
|
170
105
|
|
|
171
|
-
|
|
106
|
+
This rule exists to prevent the agent from deciding that a task is "too simple" and quietly skipping the supervisor.
|
|
172
107
|
|
|
173
|
-
|
|
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
|
|
108
|
+
## Intake
|
|
180
109
|
|
|
181
|
-
|
|
110
|
+
The supervisor must get explicit answers to these seven items before planning deeply, creating a goal, delegating workers, implementing, publishing, or taking irreversible action:
|
|
182
111
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
112
|
+
```text
|
|
113
|
+
1. Objective and source: what artifact, spec, repo path, document, ticket, or source set controls the work?
|
|
114
|
+
2. Execution path: autonomous_goal or human_in_loop?
|
|
115
|
+
3. Mode: sequential, parallel where safe, or staged parallel?
|
|
116
|
+
4. Delegation: automated worker delegation, native threads/subagents if available, or same-session phased?
|
|
117
|
+
5. Final disposition: keep local, open PR, push main, deploy/publish, or ask at the end?
|
|
118
|
+
6. Boundaries: may I install dependencies, call external services, use credentials, or only edit local files?
|
|
119
|
+
7. State artifacts: create .workflow docs, use another artifact directory, or keep state inline?
|
|
120
|
+
```
|
|
189
121
|
|
|
190
|
-
|
|
122
|
+
If any answer is missing or vague, the supervisor asks only for the missing pieces and stops. Phrases like "work autonomously", "just do it", or "use your judgment" do not fill in the missing intake fields.
|
|
191
123
|
|
|
192
|
-
|
|
193
|
-
- one-off shell commands
|
|
194
|
-
- obvious single-file changes
|
|
195
|
-
- quick explanations
|
|
196
|
-
- tasks where a normal agent turn is enough
|
|
124
|
+
Expected human pauses are normal. A workflow can move from `WAITING_FOR_HUMAN` back to `ACTIVE` after the user approves a plan or answers a blocker question.
|
|
197
125
|
|
|
198
|
-
##
|
|
126
|
+
## The Workflow
|
|
199
127
|
|
|
200
|
-
The
|
|
128
|
+
The full loop looks like this:
|
|
201
129
|
|
|
202
130
|
```text
|
|
203
|
-
intake
|
|
204
|
-
-> source
|
|
131
|
+
complete intake
|
|
132
|
+
-> source corpus
|
|
205
133
|
-> work units
|
|
134
|
+
-> loop policy
|
|
206
135
|
-> acceptance matrix
|
|
207
|
-
->
|
|
208
|
-
->
|
|
209
|
-
->
|
|
136
|
+
-> dossiers
|
|
137
|
+
-> approval or autonomous path gate
|
|
138
|
+
-> worker handoff
|
|
139
|
+
-> worker report
|
|
210
140
|
-> verification
|
|
211
141
|
-> repair if needed
|
|
212
142
|
-> re-verification
|
|
@@ -214,257 +144,389 @@ intake
|
|
|
214
144
|
-> final disposition
|
|
215
145
|
```
|
|
216
146
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
The supervisor must ask the user for every required decision before it plans deeply or starts work:
|
|
147
|
+
The worker lifecycle is tracked separately:
|
|
220
148
|
|
|
221
149
|
```text
|
|
222
|
-
|
|
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
|
|
150
|
+
planned -> handed_off -> acknowledged -> reported -> verified -> closed
|
|
229
151
|
```
|
|
230
152
|
|
|
231
|
-
|
|
153
|
+
This makes it possible to see where the workflow is, which worker owns which piece, what evidence exists, and what should happen next.
|
|
232
154
|
|
|
233
|
-
|
|
155
|
+
## Skills In The Pack
|
|
234
156
|
|
|
235
|
-
The
|
|
157
|
+
The skill pack is made of small focused skills. The supervisor can use them as phase instructions.
|
|
236
158
|
|
|
237
|
-
|
|
159
|
+
| Skill | What it does |
|
|
160
|
+
|---|---|
|
|
161
|
+
| `workflow-supervisor` | Coordinates the whole workflow, gates, workers, verification, repair, and final disposition. |
|
|
162
|
+
| `source-corpus` | Lists and ranks sources, gaps, contradictions, authority, freshness, and allowed next action. |
|
|
163
|
+
| `work-unit` | Turns the objective into bounded units with dependencies, surfaces, readiness, and done criteria. |
|
|
164
|
+
| `loop-policy` | Defines execution path, mode, approval gates, repair limits, budgets, goal policy, and resume behavior. |
|
|
165
|
+
| `acceptance-matrix` | Turns requirements into evidence rows with PASS, FAIL, BLOCKED, and waiver handling. |
|
|
166
|
+
| `dossier-builder` | Creates concrete `DossierV1` contracts for workers. |
|
|
167
|
+
| `worker-roles` | Defines role boundaries so implementers, verifiers, repair authors, and documenters do not blur together. |
|
|
168
|
+
| `workflow-docs` | Creates or refreshes durable `.workflow/` artifacts when state needs to persist. |
|
|
238
169
|
|
|
239
|
-
|
|
170
|
+
Loading a skill does not spawn a worker. A skill is instruction context for the current supervisor. A worker is a separate role-scoped execution run.
|
|
240
171
|
|
|
241
|
-
|
|
172
|
+
## Files The Workflow Creates
|
|
242
173
|
|
|
243
|
-
|
|
174
|
+
Workflow state lives under `.workflow/` by default. The directory is local supervisor memory, not product code.
|
|
175
|
+
|
|
176
|
+
In a Git-backed project, `.workflow/` must be in `.gitignore` before these files are written. Project installs do this automatically.
|
|
177
|
+
|
|
178
|
+
Common workflow files:
|
|
179
|
+
|
|
180
|
+
| File | Created from | Purpose |
|
|
181
|
+
|---|---|---|
|
|
182
|
+
| `.workflow/WORKFLOW.md` | `workflow-supervisor`, `loop-policy`, `workflow-docs` | Main state, objective, execution path, policy, stop gates, next action. |
|
|
183
|
+
| `.workflow/SOURCE-CORPUS.md` | `source-corpus`, `workflow-docs` | Source ranking, missing sources, contradictions, assumptions. |
|
|
184
|
+
| `.workflow/WORK-UNITS.md` | `work-unit`, `workflow-docs` | Unit list, dependencies, sequencing, blocked units. |
|
|
185
|
+
| `.workflow/DOSSIER.md` or `.workflow/dossiers/*.yaml` | `dossier-builder`, `workflow-docs` | Worker contracts for implementation, verification, repair, or documentation. |
|
|
186
|
+
| `.workflow/WORKER-MAP.md` | `workflow-supervisor`, `worker-roles`, `workflow-docs` | Worker names, roles, transports, lifecycle, reports, blockers. |
|
|
187
|
+
| `.workflow/ACCEPTANCE-MATRIX.md` | `acceptance-matrix`, `workflow-docs` | Evidence rows and material PASS, FAIL, BLOCKED states. |
|
|
188
|
+
| `.workflow/VERIFICATION-REPORT.md` | verifier worker, `acceptance-matrix`, `workflow-docs` | Verification evidence, findings, skipped checks, residual risks. |
|
|
189
|
+
| `.workflow/REPAIR-TICKETS.md` | repair worker, `workflow-docs` | Repair tasks tied to failed rows or verifier findings. |
|
|
190
|
+
| `.workflow/DECISIONS.md` | supervisor, `workflow-docs` | User decisions, assumptions, reversals, unresolved questions. |
|
|
191
|
+
| `.workflow/HANDOFF.md` | supervisor, `workflow-docs` | Resume pack for another agent or later session. |
|
|
192
|
+
| `.workflow/OUTCOME.md` | supervisor, documenter worker, `workflow-docs` | Final status, checks, risks, disposition, next action. |
|
|
193
|
+
| `.workflow/GOAL-STATE.md` | supervisor, `workflow-docs` | Codex goal mirror when goal state needs durable backup. |
|
|
194
|
+
|
|
195
|
+
For documentation-heavy workflows, `workflow-docs` can also create:
|
|
244
196
|
|
|
245
197
|
```text
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
198
|
+
.workflow/DOCUMENTATION-BRIEF.md
|
|
199
|
+
.workflow/CONTENT-INVENTORY.md
|
|
200
|
+
.workflow/OUTLINE.md
|
|
201
|
+
.workflow/CONTENT-DRAFT.md
|
|
202
|
+
.workflow/CLAIMS-REGISTER.md
|
|
203
|
+
.workflow/STYLE-GUIDE.md
|
|
204
|
+
.workflow/GLOSSARY.md
|
|
205
|
+
.workflow/ASSET-REGISTER.md
|
|
206
|
+
.workflow/REVIEW-PLAN.md
|
|
207
|
+
.workflow/REVISION-QUEUE.md
|
|
208
|
+
.workflow/PUBLISHING-CHECKLIST.md
|
|
209
|
+
.workflow/PUBLICATION-LOG.md
|
|
210
|
+
.workflow/MAINTENANCE-PLAN.md
|
|
251
211
|
```
|
|
252
212
|
|
|
253
|
-
|
|
213
|
+
It should not create all of these by default. It should create the smallest useful set.
|
|
254
214
|
|
|
255
|
-
|
|
215
|
+
## Dossiers
|
|
256
216
|
|
|
257
|
-
A dossier
|
|
217
|
+
A dossier is the worker contract. It is how the supervisor prevents vague delegation.
|
|
258
218
|
|
|
259
|
-
|
|
260
|
-
|
|
219
|
+
Before any worker starts, the supervisor creates a concrete `DossierV1` with:
|
|
220
|
+
|
|
221
|
+
- workflow name
|
|
222
|
+
- work unit
|
|
223
|
+
- dossier id
|
|
224
|
+
- worker name
|
|
225
|
+
- worker role
|
|
226
|
+
- delegation transport
|
|
227
|
+
- start condition
|
|
228
|
+
- objective and non-goals
|
|
229
|
+
- source corpus and must-read sources
|
|
261
230
|
- allowed surfaces
|
|
262
231
|
- forbidden surfaces
|
|
263
|
-
- must-read sources
|
|
264
232
|
- acceptance rows
|
|
265
|
-
- required evidence
|
|
266
233
|
- adversarial checks
|
|
234
|
+
- required commands or evidence
|
|
235
|
+
- worker prompt
|
|
236
|
+
- supervisor checkpoints
|
|
237
|
+
- report schemas
|
|
267
238
|
- stop gates
|
|
268
|
-
-
|
|
239
|
+
- assumptions
|
|
240
|
+
- open questions
|
|
269
241
|
|
|
270
|
-
|
|
242
|
+
Validate a dossier before delegation:
|
|
271
243
|
|
|
272
244
|
```bash
|
|
273
|
-
workflow-supervisor validate-dossier .workflow/dossiers/
|
|
245
|
+
workflow-supervisor validate-dossier .workflow/dossiers/WU-001-implementer.yaml --role implementer --unit WU-001 --json
|
|
274
246
|
```
|
|
275
247
|
|
|
276
|
-
|
|
248
|
+
The validator rejects things like `TBD`, `unknown`, `all files`, `entire repo`, unresolved open questions, role mismatches, unit mismatches, missing forbidden surfaces, and prompts that do not require `WorkerReportV1`.
|
|
277
249
|
|
|
278
|
-
|
|
250
|
+
## Workers
|
|
279
251
|
|
|
280
|
-
The
|
|
252
|
+
The required worker responsibilities are:
|
|
281
253
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
254
|
+
| Responsibility | CLI role value | What it does |
|
|
255
|
+
|---|---|---|
|
|
256
|
+
| Implementer | `implementer` | Changes only the allowed surfaces named in the dossier. |
|
|
257
|
+
| Verifier | `verifier` | Checks the work against acceptance rows and must not edit implementation. |
|
|
258
|
+
| Repair author | `repair` | Converts failed rows or verifier findings into actionable repair work. |
|
|
259
|
+
| Documenter | `documenter` | Updates workflow or outcome docs from evidence. |
|
|
285
260
|
|
|
286
|
-
The
|
|
261
|
+
The skill text may say "repair-author" because that is the human role. The CLI schema uses `repair`.
|
|
287
262
|
|
|
288
|
-
|
|
263
|
+
Workers receive only their scoped handoff:
|
|
289
264
|
|
|
290
|
-
|
|
265
|
+
- role
|
|
266
|
+
- dossier
|
|
267
|
+
- sources
|
|
268
|
+
- acceptance rows
|
|
269
|
+
- stop gates
|
|
270
|
+
- report schema
|
|
271
|
+
|
|
272
|
+
They return one terminal `WorkerReportV1`.
|
|
273
|
+
|
|
274
|
+
## Worker Reports
|
|
275
|
+
|
|
276
|
+
Every delegated worker returns this machine-shaped report:
|
|
277
|
+
|
|
278
|
+
```json
|
|
279
|
+
{
|
|
280
|
+
"schema": "WorkerReportV1",
|
|
281
|
+
"status": "PASS",
|
|
282
|
+
"role": "verifier",
|
|
283
|
+
"unit_id": "WU-001",
|
|
284
|
+
"summary": "Verified the API responses and retrieval behavior against the acceptance rows.",
|
|
285
|
+
"changed_surfaces": [],
|
|
286
|
+
"evidence": ["pytest tests/test_api.py passed", "manual inspection of /health response"],
|
|
287
|
+
"checks_run": ["pytest tests/test_api.py"],
|
|
288
|
+
"skipped_checks": [],
|
|
289
|
+
"findings": [],
|
|
290
|
+
"blocking_question": null,
|
|
291
|
+
"next_action": "supervisor_review",
|
|
292
|
+
"adapter": null,
|
|
293
|
+
"guard": null,
|
|
294
|
+
"reason": null
|
|
295
|
+
}
|
|
296
|
+
```
|
|
291
297
|
|
|
292
|
-
|
|
298
|
+
The supervisor trusts the report shape, not loose prose. A PASS without evidence is invalid. A verifier that edits implementation is invalid. A worker that asks the human directly is converted into a blocker for the supervisor to route.
|
|
293
299
|
|
|
294
|
-
|
|
300
|
+
## How The Supervisor Talks To Workers
|
|
295
301
|
|
|
296
|
-
The
|
|
302
|
+
The portable worker path is one CLI command:
|
|
297
303
|
|
|
298
|
-
|
|
299
|
-
-
|
|
300
|
-
-
|
|
301
|
-
|
|
302
|
-
-
|
|
303
|
-
|
|
304
|
+
```bash
|
|
305
|
+
workflow-supervisor delegate \
|
|
306
|
+
--agent <codex|claude-code> \
|
|
307
|
+
--role <implementer|verifier|repair|documenter> \
|
|
308
|
+
--unit <unit-id> \
|
|
309
|
+
--cwd <workspace> \
|
|
310
|
+
--dossier <path>
|
|
311
|
+
```
|
|
304
312
|
|
|
305
|
-
|
|
313
|
+
The command:
|
|
306
314
|
|
|
307
|
-
|
|
315
|
+
1. Validates the dossier as `DossierV1`.
|
|
316
|
+
2. Builds a scoped worker prompt.
|
|
317
|
+
3. Starts the selected agent CLI with an adapter command array.
|
|
318
|
+
4. Captures stdout, stderr, exit code, and timeout.
|
|
319
|
+
5. Extracts and validates `WorkerReportV1`.
|
|
320
|
+
6. Runs surface and role guards.
|
|
321
|
+
7. Prints one normalized JSON report for the supervisor.
|
|
308
322
|
|
|
309
|
-
|
|
323
|
+
Certified worker adapters:
|
|
310
324
|
|
|
311
|
-
|
|
325
|
+
- `codex`
|
|
326
|
+
- `claude-code`
|
|
312
327
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
328
|
+
The `generic` target is for Markdown instruction export. It is not a certified automated worker adapter.
|
|
329
|
+
|
|
330
|
+
Check local adapter readiness:
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
workflow-supervisor delegate-doctor --agent all --probe --require-pass
|
|
319
334
|
```
|
|
320
335
|
|
|
321
|
-
|
|
336
|
+
If a worker adapter is missing, unauthenticated, times out, returns invalid output, edits forbidden surfaces, or returns PASS without evidence, the delegate command returns a structured `BLOCKED` report.
|
|
337
|
+
|
|
338
|
+
## No Silent Fallbacks
|
|
339
|
+
|
|
340
|
+
If the environment can create, message, or delegate to worker agents, the supervisor must use real workers for implementation, verification, repair, and documentation responsibilities.
|
|
341
|
+
|
|
342
|
+
If it cannot, it must record:
|
|
322
343
|
|
|
323
344
|
```text
|
|
324
|
-
|
|
325
|
-
execution plan
|
|
326
|
-
periodic progress summaries
|
|
327
|
-
blockers only when needed
|
|
328
|
-
final report
|
|
345
|
+
worker_agent_unavailable
|
|
329
346
|
```
|
|
330
347
|
|
|
331
|
-
|
|
348
|
+
Then it must stop for a human decision unless complete intake explicitly selected `same_session_phased`.
|
|
349
|
+
|
|
350
|
+
Same-session phased work is allowed only when selected. Verification in that mode is a `self-check`, not an `independent-verifier`.
|
|
332
351
|
|
|
333
|
-
##
|
|
352
|
+
## Install
|
|
334
353
|
|
|
335
|
-
|
|
354
|
+
Install from npm once published:
|
|
336
355
|
|
|
337
|
-
|
|
356
|
+
```bash
|
|
357
|
+
npm install -g workflow-supervisor
|
|
358
|
+
workflow-supervisor validate
|
|
359
|
+
```
|
|
338
360
|
|
|
339
|
-
|
|
361
|
+
Use with `npx`:
|
|
340
362
|
|
|
341
|
-
```
|
|
342
|
-
|
|
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
|
|
363
|
+
```bash
|
|
364
|
+
npx workflow-supervisor list
|
|
354
365
|
```
|
|
355
366
|
|
|
356
|
-
|
|
367
|
+
Install skills for Codex:
|
|
357
368
|
|
|
358
|
-
|
|
369
|
+
```bash
|
|
370
|
+
npx workflow-supervisor install --agent codex --scope user
|
|
371
|
+
```
|
|
359
372
|
|
|
360
|
-
|
|
373
|
+
Install skills for Claude Code:
|
|
361
374
|
|
|
362
|
-
```
|
|
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
|
-
}
|
|
375
|
+
```bash
|
|
376
|
+
npx workflow-supervisor install --agent claude-code --scope user
|
|
380
377
|
```
|
|
381
378
|
|
|
382
|
-
|
|
379
|
+
Install both certified targets into a project:
|
|
383
380
|
|
|
384
|
-
|
|
381
|
+
```bash
|
|
382
|
+
npx workflow-supervisor install --agent all --scope project --project .
|
|
383
|
+
```
|
|
385
384
|
|
|
386
|
-
-
|
|
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
|
|
385
|
+
Project installs copy the skill folders into project-level agent directories and ensure the target project `.gitignore` contains:
|
|
397
386
|
|
|
398
|
-
|
|
387
|
+
```gitignore
|
|
388
|
+
.workflow/
|
|
389
|
+
```
|
|
399
390
|
|
|
400
391
|
From a local checkout:
|
|
401
392
|
|
|
402
393
|
```bash
|
|
403
394
|
git clone https://github.com/NikolaCehic/workflow-supervisor.git
|
|
404
395
|
cd workflow-supervisor
|
|
396
|
+
npm install
|
|
405
397
|
npm run validate
|
|
406
398
|
```
|
|
407
399
|
|
|
408
|
-
|
|
400
|
+
## Basic Use
|
|
409
401
|
|
|
410
|
-
|
|
411
|
-
|
|
402
|
+
After installing the skills, ask your agent:
|
|
403
|
+
|
|
404
|
+
```text
|
|
405
|
+
Use $workflow-supervisor to implement a healthcare specialist FastAPI Naive RAG demo.
|
|
412
406
|
```
|
|
413
407
|
|
|
414
|
-
|
|
408
|
+
You should expect:
|
|
409
|
+
|
|
410
|
+
1. The supervisor asks the complete intake packet.
|
|
411
|
+
2. You answer every intake item.
|
|
412
|
+
3. If the path is `human_in_loop`, the supervisor gives you an approval packet before implementation.
|
|
413
|
+
4. The supervisor creates work units, acceptance rows, and dossiers.
|
|
414
|
+
5. The supervisor delegates scoped work to workers when supported.
|
|
415
|
+
6. Workers return structured reports.
|
|
416
|
+
7. The supervisor verifies, routes repairs if needed, and gives you the final result.
|
|
417
|
+
|
|
418
|
+
If you only want a normal quick edit, do not invoke `$workflow-supervisor`.
|
|
419
|
+
|
|
420
|
+
## CLI Reference
|
|
421
|
+
|
|
422
|
+
Common commands:
|
|
415
423
|
|
|
416
424
|
```bash
|
|
417
|
-
|
|
425
|
+
workflow-supervisor list
|
|
426
|
+
workflow-supervisor validate
|
|
427
|
+
workflow-supervisor doctor --agent all
|
|
428
|
+
workflow-supervisor install --agent codex --scope user
|
|
429
|
+
workflow-supervisor install --agent claude-code --scope user
|
|
430
|
+
workflow-supervisor install --agent all --scope project --project .
|
|
431
|
+
workflow-supervisor emit-context --agent generic --out AGENTS.md
|
|
432
|
+
workflow-supervisor validate-dossier .workflow/dossiers/WU-001-implementer.yaml --role implementer --unit WU-001 --json
|
|
433
|
+
workflow-supervisor delegate --agent codex --role implementer --unit WU-001 --cwd . --dossier .workflow/dossiers/WU-001-implementer.yaml
|
|
434
|
+
workflow-supervisor delegate --agent claude-code --role verifier --unit WU-001 --cwd . --dossier .workflow/dossiers/WU-001-verifier.yaml
|
|
435
|
+
workflow-supervisor delegate-doctor --agent all --probe --require-pass
|
|
418
436
|
```
|
|
419
437
|
|
|
420
|
-
|
|
438
|
+
The package exposes two binary names:
|
|
421
439
|
|
|
422
|
-
```
|
|
423
|
-
|
|
440
|
+
```text
|
|
441
|
+
workflow-supervisor
|
|
442
|
+
workflow-skills
|
|
424
443
|
```
|
|
425
444
|
|
|
426
|
-
|
|
445
|
+
`workflow-skills` is kept as an alias. Prefer `workflow-supervisor` in user-facing instructions.
|
|
446
|
+
|
|
447
|
+
## Codex, Claude Code, And Generic Targets
|
|
427
448
|
|
|
428
|
-
|
|
449
|
+
Codex support uses:
|
|
450
|
+
|
|
451
|
+
- `SKILL.md`
|
|
452
|
+
- `agents/openai.yaml`
|
|
453
|
+
- the `codex` CLI adapter for delegated workers
|
|
454
|
+
|
|
455
|
+
Claude Code support uses:
|
|
456
|
+
|
|
457
|
+
- the same `SKILL.md` folders
|
|
458
|
+
- the `claude` CLI adapter for delegated workers
|
|
459
|
+
- optional emitted context through `CLAUDE.md`
|
|
460
|
+
|
|
461
|
+
The presence of `agents/openai.yaml` does not mean Claude Code is unsupported. It only means Codex has a specific metadata format.
|
|
462
|
+
|
|
463
|
+
Generic support is for custom Markdown-reading agent setups:
|
|
429
464
|
|
|
430
465
|
```bash
|
|
431
|
-
npx workflow-supervisor emit-context --agent generic --out AGENTS.md
|
|
466
|
+
npx workflow-supervisor emit-context --agent generic --skills workflow-supervisor,workflow-docs --out AGENTS.md
|
|
432
467
|
```
|
|
433
468
|
|
|
434
|
-
|
|
469
|
+
Generic is not a certified worker delegation target.
|
|
435
470
|
|
|
436
|
-
|
|
471
|
+
## Package Layout
|
|
437
472
|
|
|
438
473
|
```text
|
|
439
|
-
|
|
474
|
+
skills/ Skill instructions
|
|
475
|
+
skills/*/agents/ Agent metadata, including Codex openai.yaml files
|
|
476
|
+
schemas/ DossierV1 and WorkerReportV1 schemas
|
|
477
|
+
adapters/ Codex and Claude Code delegate command arrays
|
|
478
|
+
docs/ CLI, artifact, compatibility, and troubleshooting docs
|
|
479
|
+
assets/ README image assets
|
|
480
|
+
bin/workflow-skills.mjs Installer, validator, delegation wrapper, and command dispatch
|
|
440
481
|
```
|
|
441
482
|
|
|
442
|
-
The
|
|
483
|
+
The npm package includes:
|
|
484
|
+
|
|
485
|
+
```text
|
|
486
|
+
skills
|
|
487
|
+
adapters
|
|
488
|
+
schemas
|
|
489
|
+
docs
|
|
490
|
+
assets
|
|
491
|
+
bin
|
|
492
|
+
README.md
|
|
493
|
+
LICENSE
|
|
494
|
+
```
|
|
443
495
|
|
|
444
|
-
|
|
496
|
+
## Publishing Checklist
|
|
445
497
|
|
|
446
|
-
|
|
498
|
+
Before publishing:
|
|
447
499
|
|
|
448
500
|
```bash
|
|
449
|
-
|
|
450
|
-
|
|
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
|
|
501
|
+
npm run validate
|
|
502
|
+
npm pack --dry-run
|
|
454
503
|
```
|
|
455
504
|
|
|
456
|
-
|
|
505
|
+
`npm run validate` checks skill structure, adapter metadata, schema artifacts, and the test suite.
|
|
506
|
+
|
|
507
|
+
`npm pack --dry-run` shows exactly what will be included in the npm package.
|
|
508
|
+
|
|
509
|
+
The package also has:
|
|
510
|
+
|
|
511
|
+
- `prepublishOnly`: runs `npm run validate`
|
|
512
|
+
- `engines.node`: `>=18`
|
|
513
|
+
- `license`: `MIT`
|
|
514
|
+
- `bin.workflow-supervisor`: `bin/workflow-skills`
|
|
515
|
+
- `bin.workflow-skills`: `bin/workflow-skills`
|
|
516
|
+
|
|
517
|
+
## Rules For Agents Reading This README
|
|
457
518
|
|
|
458
|
-
If you are an
|
|
519
|
+
If you are an agent using this package:
|
|
459
520
|
|
|
460
521
|
1. Do not start work before complete intake.
|
|
461
|
-
2. Do not infer missing permissions from
|
|
462
|
-
3.
|
|
463
|
-
4. Do not
|
|
464
|
-
5.
|
|
465
|
-
6.
|
|
466
|
-
7.
|
|
467
|
-
8.
|
|
468
|
-
9.
|
|
469
|
-
|
|
470
|
-
|
|
522
|
+
2. Do not infer missing permissions from words like "autonomous", "generate", or "work until done".
|
|
523
|
+
3. If `$workflow-supervisor` is explicit, always create at least one work unit.
|
|
524
|
+
4. Do not delegate without a valid `DossierV1`.
|
|
525
|
+
5. Use separate worker agents when supported by the environment.
|
|
526
|
+
6. Do not silently collapse worker agents into same-session roleplay.
|
|
527
|
+
7. Treat same-session verification as `self-check`, not `independent-verifier`.
|
|
528
|
+
8. Trust only structured `WorkerReportV1` results from delegated workers.
|
|
529
|
+
9. Treat verifier edits as invalid.
|
|
530
|
+
10. Keep `.workflow/` ignored and local unless the user explicitly asks to publish it.
|
|
531
|
+
|
|
532
|
+
The promise is not magic autonomy. The promise is disciplined supervision: clear setup, bounded work, scoped workers, structured reports, evidence, repair, and a clean final handoff.
|
package/package.json
CHANGED
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: workflow-supervisor
|
|
3
|
-
description: Coordinate
|
|
3
|
+
description: Coordinate supervised multi-agent workflows. Trigger whenever the user explicitly invokes workflow-supervisor, $workflow-supervisor, supervised workflow, dossiers, work units, worker agents, handoffs, approval gates, durable resume, or workflow-state documentation. When explicitly invoked, always run the full strict supervisor workflow regardless of task size; do not downscope, skip human approval or complete intake, skip dossiers, skip work units, skip worker-agent contracts, skip worker handoffs, or skip verification because a task appears simple. When not explicitly invoked, use only for workflows with hard supervisor triggers such as multi-agent handoff, durable resume, high-risk verification, contradictory or missing sources, multi-unit scope, repair loops, approval gates, or workflow-state documentation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Workflow Supervisor
|
|
7
7
|
|
|
8
|
-
Use this skill as the coordinating spine for
|
|
8
|
+
Use this skill as the coordinating spine for supervised multi-agent work. The supervisor owns decomposition, worker-agent handoff quality, loop discipline, stop gates, and outcome reporting. It may do source discovery and reporting itself, but implementation, verification, repair-ticket writing, and documentation must be treated as separate worker-agent responsibilities when an automated worker path is available. Native threads, subagents, or the portable delegate command are transports for those worker agents.
|
|
9
|
+
|
|
10
|
+
## Strict Explicit Invocation Contract
|
|
11
|
+
|
|
12
|
+
When the user explicitly invokes `workflow-supervisor`, `$workflow-supervisor`, or says to use this skill, the workflow is in `strict_full_workflow` mode. Task size is irrelevant. Do not decide that a request is too small, too easy, local-only, or single-file to receive the full workflow.
|
|
13
|
+
|
|
14
|
+
Strict mode always requires:
|
|
15
|
+
|
|
16
|
+
1. Complete intake before planning, goal creation, worker delegation, implementation, publication, or irreversible action.
|
|
17
|
+
2. A human approval question before implementation unless completed intake explicitly selects `autonomous_goal`.
|
|
18
|
+
3. A source corpus map, even if the source corpus is only "user prompt plus current workspace".
|
|
19
|
+
4. At least one bounded work unit, even for a tiny change. Use `WU-001` when there is only one unit.
|
|
20
|
+
5. A dossier for each implementation work unit before implementation begins.
|
|
21
|
+
6. An acceptance matrix or acceptance draft with evidence expectations before implementation begins.
|
|
22
|
+
7. A worker-agent plan with implementer, verifier, repair-author, and documenter agents.
|
|
23
|
+
8. A worker lifecycle record using `planned -> handed_off -> acknowledged -> reported -> verified -> closed`.
|
|
24
|
+
9. Verification labeled as `self-check`, `focused-check`, or `independent-verifier`.
|
|
25
|
+
10. A final disposition question or recorded completed-intake final disposition after verification.
|
|
26
|
+
|
|
27
|
+
Worker agents are mandatory when the environment provides worker, subagent, thread, or portable delegation tools. The supervisor must hand off implementation, verification, repair-authoring when needed, and documentation to separate agents with scoped dossiers and the required report schema. Run worker agents sequentially by default unless completed intake explicitly authorizes parallelism.
|
|
28
|
+
|
|
29
|
+
If the environment cannot create, message, or delegate to worker agents, record `worker_agent_unavailable` and stop for the human decision unless completed intake explicitly selected `same_session_phased`. Do not silently collapse worker agents into same-session work.
|
|
30
|
+
|
|
31
|
+
Do not nest supervisors recursively. A worker agent that receives a supervisor-scoped dossier must perform its assigned role instead of spawning another supervisor layer unless the parent supervisor explicitly asks for a child supervisor.
|
|
9
32
|
|
|
10
33
|
## Domain Neutrality
|
|
11
34
|
|
|
@@ -25,7 +48,7 @@ Use this lifecycle:
|
|
|
25
48
|
4. If an active relevant goal exists, reuse it.
|
|
26
49
|
5. If an active unrelated goal exists, do not create, reuse, complete, block, or update it. Ask the user whether to switch goals or continue with goal binding skipped.
|
|
27
50
|
6. If no active goal exists and completed intake authorizes goal binding, call `create_goal` at most once with a concrete objective.
|
|
28
|
-
7. Do not create a goal for
|
|
51
|
+
7. Do not create a goal for incomplete intake or when the user says not to.
|
|
29
52
|
8. Keep the goal objective stable. Track tactical steps in the plan, dossier, workflow docs, or `.workflow/GOAL-STATE.md` rather than trying to rewrite the goal.
|
|
30
53
|
9. Use `update_goal` only for terminal `complete` or `blocked` states when the environment supports that action.
|
|
31
54
|
10. Mark the goal complete only after acceptance evidence supports completion and no required supervisor work remains.
|
|
@@ -41,12 +64,13 @@ If the environment has no goal tool or goal creation is not permitted, state the
|
|
|
41
64
|
- Run the complete intake gate before goal creation, worker delegation, implementation, publication, or other irreversible action.
|
|
42
65
|
- Do not infer execution path, mode, delegation, final disposition, or boundaries from keywords, action verbs, or intent guesses.
|
|
43
66
|
- Classify the workflow as `autonomous_goal` or `human_in_loop` only from completed intake answers before delegating workers or beginning implementation.
|
|
67
|
+
- Explicit invocation always requires complete intake, work units, dossiers, worker-agent contracts, scoped handoffs, report schema, and verification; do this even for trivial tasks.
|
|
44
68
|
- Always produce a plan after complete intake. In `human_in_loop`, make it an approval packet and stop for approval. In `autonomous_goal`, make it an execution plan and continue only when the completed intake authorizes that path.
|
|
45
|
-
- Do not begin implementation until complete intake and the path gate are satisfied, at least one concrete dossier exists, and no stop gate applies.
|
|
46
|
-
- Delegate workers only through an automated supported delegation transport after complete intake and the path gate authorize delegation. If no supported transport exists, use same-session phased mode only when intake allowed it; otherwise stop as `
|
|
69
|
+
- Do not begin implementation until complete intake and the path gate are satisfied, at least one work unit exists, at least one concrete dossier exists, worker-agent contracts exist, and no stop gate applies.
|
|
70
|
+
- Delegate workers only through an automated supported delegation transport after complete intake and the path gate authorize delegation. If no supported transport exists, use same-session phased mode only when intake allowed it; otherwise stop as `worker_agent_unavailable`.
|
|
47
71
|
- Do not start implementer, verifier, repair-author, or documenter workers before complete intake and the path gate are satisfied; role-specific start conditions are additional gates after that.
|
|
48
72
|
- Keep roles separate: implementers implement, verifiers verify, repair authors write tickets, documenters update workflow artifacts, and the supervisor coordinates.
|
|
49
|
-
- Treat same-session verification as a self-check, not independent verification.
|
|
73
|
+
- Treat same-session verification as a self-check, not independent verification. Separate verifier-agent verification may be labeled `independent-verifier` only when genuinely performed by a separate worker agent or thread.
|
|
50
74
|
- Prefer explicit PASS/FAIL/BLOCKED states over soft completion language.
|
|
51
75
|
- Stop instead of improvising when sources are missing, contradictory, materially stale, or too vague to produce acceptance criteria.
|
|
52
76
|
- Keep provenance optional; require enough outcome detail for another agent to resume.
|
|
@@ -64,7 +88,29 @@ Treat these as distinct mechanisms:
|
|
|
64
88
|
- Native thread or subagent: an environment-specific transport a worker adapter may use when it is available and authorized.
|
|
65
89
|
- Same-session phased mode: the current agent performs roles sequentially. Verification in this mode is a self-check, not independent verification.
|
|
66
90
|
|
|
67
|
-
Start workers only after complete intake and the path gate are satisfied, a concrete dossier exists, the loop policy authorizes delegation, and the environment exposes an automated supported transport. If environment rules require explicit user approval for user-visible native thread creation, obtain it before using that transport. Do not use manual copy/paste handoff as the primary path. If automated delegation is unavailable, mark the unit `
|
|
91
|
+
Start workers only after complete intake and the path gate are satisfied, at least one work unit exists, a concrete dossier exists, the loop policy authorizes delegation, and the environment exposes an automated supported transport. If environment rules require explicit user approval for user-visible native thread creation, obtain it before using that transport. Do not use manual copy/paste handoff as the primary path. If automated delegation is unavailable, mark the unit `worker_agent_unavailable` unless completed intake explicitly selected same-session phased work.
|
|
92
|
+
|
|
93
|
+
## Worker Report Schema
|
|
94
|
+
|
|
95
|
+
Every worker report back to the supervisor must use this schema:
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
status: PASS | FAIL | BLOCKED | PARTIAL
|
|
99
|
+
worker_id:
|
|
100
|
+
role: implementer | verifier | repair-author | documenter
|
|
101
|
+
work_unit_id:
|
|
102
|
+
dossier_id:
|
|
103
|
+
summary:
|
|
104
|
+
changed_files:
|
|
105
|
+
acceptance_evidence:
|
|
106
|
+
checks_run:
|
|
107
|
+
skipped_checks:
|
|
108
|
+
blockers:
|
|
109
|
+
residual_risks:
|
|
110
|
+
next_recommended_action:
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Implementers may edit only allowed surfaces from the dossier. Verifiers must not edit. Repair authors write repair tickets from failed acceptance rows and must not expand scope. Documenters update only approved workflow or documentation surfaces after source, implementation, verification, or repair evidence exists.
|
|
68
114
|
|
|
69
115
|
## Intake Gate
|
|
70
116
|
|
|
@@ -109,7 +155,7 @@ Negative example: "Using Workflow Supervisor, generate an API and create the pro
|
|
|
109
155
|
2. Restate the objective, constraints, non-goals, known sources, and unknowns from the completed intake.
|
|
110
156
|
3. Bind or reconcile the Codex goal only after complete intake and only when no unrelated active goal prevents binding.
|
|
111
157
|
4. Build or request a source corpus map. Use `$source-corpus` when source authority, freshness, or contradictions matter.
|
|
112
|
-
5. Split the objective into bounded work units. Use `$work-unit` for ambiguous or multi-phase goals.
|
|
158
|
+
5. Split the objective into bounded work units. Use `$work-unit` for ambiguous or multi-phase goals. If the task is tiny, create exactly one work unit named `WU-001`.
|
|
113
159
|
6. Choose a loop policy before starting work: sequential or parallel, retry limits, approval gates, budgets, goal update cadence, and blocker rules. Use `$loop-policy` when the policy is not obvious.
|
|
114
160
|
7. Build dossiers for the first implementation units and any planned verification, repair, or documentation workers. Use `$dossier-builder` when delegating work to another agent or when the task has boundaries.
|
|
115
161
|
8. Assign worker roles with explicit allowed and forbidden behavior. Use `$worker-roles` for multi-agent, native-thread, or portable-worker work.
|
|
@@ -184,7 +230,7 @@ workflow-supervisor validate-dossier <path> --role <role> --unit <unit-id> --jso
|
|
|
184
230
|
|
|
185
231
|
If the dossier does not pass `DossierV1` validation, do not start the worker. Create a discovery dossier, ask for the missing decision, or mark the unit BLOCKED.
|
|
186
232
|
|
|
187
|
-
Adapters may use native threads, native subagents, or one-shot CLI execution underneath, but the supervisor consumes only the normalized worker report. Use `workflow-supervisor delegate-doctor --agent <agent> --probe` to test the installed local adapter before relying on it for a workflow. If automated delegation is unavailable, mark execution as `
|
|
233
|
+
Adapters may use native threads, native subagents, or one-shot CLI execution underneath, but the supervisor consumes only the normalized worker report. Use `workflow-supervisor delegate-doctor --agent <agent> --probe` to test the installed local adapter before relying on it for a workflow. If automated delegation is unavailable, mark execution as `worker_agent_unavailable` unless completed intake selected `same_session_phased`.
|
|
188
234
|
|
|
189
235
|
Name workers deterministically from the workflow, unit, role, and dossier:
|
|
190
236
|
|
|
@@ -247,6 +293,7 @@ Stop when:
|
|
|
247
293
|
- source authority cannot be established
|
|
248
294
|
- sources contradict each other on a material requirement
|
|
249
295
|
- the requested scope cannot fit into a bounded work unit
|
|
296
|
+
- mandatory approval packet, work unit, dossier, worker-agent contract, or acceptance matrix is missing
|
|
250
297
|
- allowed and forbidden surfaces cannot be named
|
|
251
298
|
- acceptance cannot be verified with evidence
|
|
252
299
|
- a verifier is asked to edit or an implementer is asked to self-approve
|
|
@@ -267,7 +314,10 @@ Report:
|
|
|
267
314
|
- Objective handled
|
|
268
315
|
- Sources used and gaps
|
|
269
316
|
- Work units completed or remaining
|
|
317
|
+
- Approval question id and whether `WAITING_FOR_HUMAN -> ACTIVE` occurred
|
|
318
|
+
- Dossiers created or missing
|
|
270
319
|
- Workers delegated, blocked, unavailable, or skipped
|
|
320
|
+
- Worker lifecycle status for each role
|
|
271
321
|
- Verification evidence
|
|
272
322
|
- Repairs performed or recommended
|
|
273
323
|
- Checks run and skipped
|