workflow-supervisor 0.1.2 → 0.1.3
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 +33 -15
- package/bin/workflow-skills.mjs +3 -2
- package/docs/skill-reference.md +5 -5
- package/docs/troubleshooting.md +16 -0
- package/package.json +1 -1
- package/skills/acceptance-matrix/SKILL.md +29 -2
- package/skills/loop-policy/SKILL.md +5 -2
- package/skills/work-unit/SKILL.md +19 -0
- package/skills/workflow-docs/SKILL.md +2 -1
- package/skills/workflow-docs/references/goal-resume.md +48 -3
- package/skills/workflow-docs/references/templates.md +2 -0
- package/skills/workflow-docs/references/workflow-control.md +149 -0
- package/skills/workflow-supervisor/SKILL.md +123 -26
- package/skills/workflow-supervisor/agents/openai.yaml +1 -1
package/README.md
CHANGED
|
@@ -20,6 +20,8 @@ Workflow Supervisor gives you a repeatable workflow for serious agent tasks:
|
|
|
20
20
|
|
|
21
21
|
- a complete intake before work starts
|
|
22
22
|
- a source map, even when the only source is the user prompt
|
|
23
|
+
- a source-requirement coverage ledger so roadmap items and exit criteria cannot disappear
|
|
24
|
+
- a `SPEC.md` review gate where humans can ask questions, request revisions, block, defer, or approve before work units are finalized
|
|
23
25
|
- bounded work units, including `WU-001` for tiny tasks
|
|
24
26
|
- dossiers that tell each worker exactly what to do and what not to touch
|
|
25
27
|
- separate implementer, verifier, repair, and documenter responsibilities
|
|
@@ -92,16 +94,19 @@ Strict mode means task size does not matter. Even if the request is "make a func
|
|
|
92
94
|
|
|
93
95
|
1. Ask the complete intake packet.
|
|
94
96
|
2. Build or record the source corpus.
|
|
95
|
-
3. Create
|
|
96
|
-
4. Create
|
|
97
|
-
5.
|
|
98
|
-
6. Create
|
|
99
|
-
7.
|
|
100
|
-
8.
|
|
101
|
-
9.
|
|
102
|
-
10.
|
|
103
|
-
11.
|
|
104
|
-
12.
|
|
97
|
+
3. Create a source-requirement coverage ledger.
|
|
98
|
+
4. Create a `SPEC.md` review packet or file.
|
|
99
|
+
5. Pause for human Q&A, revisions, block, defer, or approval when the path is human-in-loop.
|
|
100
|
+
6. Create at least one work unit.
|
|
101
|
+
7. Create acceptance rows that preserve source-scope fidelity.
|
|
102
|
+
8. Create dossiers for the planned workers.
|
|
103
|
+
9. Create a worker-agent plan.
|
|
104
|
+
10. Ask for approval when the selected path is human-in-loop.
|
|
105
|
+
11. Delegate scoped work to real workers when the environment supports it.
|
|
106
|
+
12. Verify with evidence.
|
|
107
|
+
13. Route repair work if verification fails.
|
|
108
|
+
14. Refresh docs or outcome state.
|
|
109
|
+
15. Report final status and next action.
|
|
105
110
|
|
|
106
111
|
This rule exists to prevent the agent from deciding that a task is "too simple" and quietly skipping the supervisor.
|
|
107
112
|
|
|
@@ -123,6 +128,8 @@ If any answer is missing or vague, the supervisor asks only for the missing piec
|
|
|
123
128
|
|
|
124
129
|
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.
|
|
125
130
|
|
|
131
|
+
In `autonomous_goal`, a human clarification pause is not automatically a terminal failed goal. The supervisor records the blocker, asks the smallest needed question, updates SPEC/Q&A/coverage state when the answer arrives, refreshes only affected downstream artifacts, and resumes from the recorded next action. If an old Codex goal was already terminal-blocked, the resumed workflow references it as history and continues from workflow state or a newly authorized goal binding.
|
|
132
|
+
|
|
126
133
|
## The Workflow
|
|
127
134
|
|
|
128
135
|
The full loop looks like this:
|
|
@@ -130,6 +137,8 @@ The full loop looks like this:
|
|
|
130
137
|
```text
|
|
131
138
|
complete intake
|
|
132
139
|
-> source corpus
|
|
140
|
+
-> source-requirement coverage ledger
|
|
141
|
+
-> SPEC review and Q&A gate
|
|
133
142
|
-> work units
|
|
134
143
|
-> loop policy
|
|
135
144
|
-> acceptance matrix
|
|
@@ -152,6 +161,12 @@ planned -> handed_off -> acknowledged -> reported -> verified -> closed
|
|
|
152
161
|
|
|
153
162
|
This makes it possible to see where the workflow is, which worker owns which piece, what evidence exists, and what should happen next.
|
|
154
163
|
|
|
164
|
+
For source-of-truth builds, the coverage ledger is the guardrail against "green but incomplete" outcomes. Every material source requirement must be mapped to a work unit and acceptance row, explicitly deferred by the user, blocked as a scope decision, or marked non-material with a reason. Residual risks and future-work notes cannot contain unimplemented material source requirements in a PASS workflow.
|
|
165
|
+
|
|
166
|
+
`SPEC.md` is the human review contract before final work units. In human-in-loop mode, the supervisor stops at the draft SPEC so the human can ask questions, request revisions, mark items deferred, block the workflow, or approve. The workflow continues only after explicit approval.
|
|
167
|
+
|
|
168
|
+
When a workflow pauses for a human decision, the decision is recorded as state rather than treated as a restart. The next supervisor pass updates the affected coverage rows, SPEC fields, work units, acceptance rows, dossiers, or verification results, invalidates stale artifacts, and continues from the saved `Next Action`.
|
|
169
|
+
|
|
155
170
|
## Skills In The Pack
|
|
156
171
|
|
|
157
172
|
The skill pack is made of small focused skills. The supervisor can use them as phase instructions.
|
|
@@ -181,6 +196,7 @@ Common workflow files:
|
|
|
181
196
|
|---|---|---|
|
|
182
197
|
| `.workflow/WORKFLOW.md` | `workflow-supervisor`, `loop-policy`, `workflow-docs` | Main state, objective, execution path, policy, stop gates, next action. |
|
|
183
198
|
| `.workflow/SOURCE-CORPUS.md` | `source-corpus`, `workflow-docs` | Source ranking, missing sources, contradictions, assumptions. |
|
|
199
|
+
| `.workflow/SPEC.md` | `workflow-supervisor`, `source-corpus`, `workflow-docs` | Human-reviewable interpretation, requirement coverage, Q&A, and approval decision before work units. |
|
|
184
200
|
| `.workflow/WORK-UNITS.md` | `work-unit`, `workflow-docs` | Unit list, dependencies, sequencing, blocked units. |
|
|
185
201
|
| `.workflow/DOSSIER.md` or `.workflow/dossiers/*.yaml` | `dossier-builder`, `workflow-docs` | Worker contracts for implementation, verification, repair, or documentation. |
|
|
186
202
|
| `.workflow/WORKER-MAP.md` | `workflow-supervisor`, `worker-roles`, `workflow-docs` | Worker names, roles, transports, lifecycle, reports, blockers. |
|
|
@@ -190,7 +206,7 @@ Common workflow files:
|
|
|
190
206
|
| `.workflow/DECISIONS.md` | supervisor, `workflow-docs` | User decisions, assumptions, reversals, unresolved questions. |
|
|
191
207
|
| `.workflow/HANDOFF.md` | supervisor, `workflow-docs` | Resume pack for another agent or later session. |
|
|
192
208
|
| `.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
|
|
209
|
+
| `.workflow/GOAL-STATE.md` | supervisor, `workflow-docs` | Codex goal mirror, blocked-goal history, human-decision resume checkpoint, and durable backup. |
|
|
194
210
|
|
|
195
211
|
For documentation-heavy workflows, `workflow-docs` can also create:
|
|
196
212
|
|
|
@@ -410,10 +426,12 @@ You should expect:
|
|
|
410
426
|
1. The supervisor asks the complete intake packet.
|
|
411
427
|
2. You answer every intake item.
|
|
412
428
|
3. If the path is `human_in_loop`, the supervisor gives you an approval packet before implementation.
|
|
413
|
-
4. The supervisor creates
|
|
414
|
-
5.
|
|
415
|
-
6.
|
|
416
|
-
7. The supervisor
|
|
429
|
+
4. The supervisor creates the source-requirement coverage ledger and `SPEC.md`.
|
|
430
|
+
5. You ask questions, request revisions, block, defer, or approve the SPEC.
|
|
431
|
+
6. After approval, the supervisor creates work units, acceptance rows, and dossiers.
|
|
432
|
+
7. The supervisor delegates scoped work to workers when supported.
|
|
433
|
+
8. Workers return structured reports.
|
|
434
|
+
9. The supervisor verifies, routes repairs if needed, and gives you the final result.
|
|
417
435
|
|
|
418
436
|
If you only want a normal quick edit, do not invoke `$workflow-supervisor`.
|
|
419
437
|
|
package/bin/workflow-skills.mjs
CHANGED
|
@@ -8,8 +8,9 @@ import { fileURLToPath } from "node:url";
|
|
|
8
8
|
|
|
9
9
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
10
|
const packageRoot = path.resolve(__dirname, "..");
|
|
11
|
-
const
|
|
12
|
-
const
|
|
11
|
+
const packageJson = JSON.parse(fs.readFileSync(path.join(packageRoot, "package.json"), "utf8"));
|
|
12
|
+
const PACKAGE_NAME = packageJson.name || "workflow-supervisor";
|
|
13
|
+
const PACKAGE_VERSION = packageJson.version;
|
|
13
14
|
const WORKER_REPORT_SCHEMA_PATH = path.join(packageRoot, "schemas", "worker-report-v1.schema.json");
|
|
14
15
|
const DOSSIER_SCHEMA_PATH = path.join(packageRoot, "schemas", "dossier-v1.schema.json");
|
|
15
16
|
const ADAPTERS_ROOT = path.join(packageRoot, "adapters");
|
package/docs/skill-reference.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## `workflow-supervisor`
|
|
4
4
|
|
|
5
|
-
Coordinate explicit supervised or agent-loop workflows. It always starts with a complete intake gate before planning, implementation, goal binding, worker delegation, or final disposition. The user must answer every intake item; the supervisor must not infer or skip steps from keywords. After complete intake, it selects either autonomous goal execution or human-in-the-loop execution, then orchestrates named workers from dossiers through the portable delegate command or an approved native adapter. Loading the skill itself does not spawn workers. It binds Codex goals only after complete intake and when the user or environment authorizes goal-oriented work, checks active goal state first,
|
|
5
|
+
Coordinate explicit supervised or agent-loop workflows. It always starts with a complete intake gate before planning, implementation, goal binding, worker delegation, or final disposition. The user must answer every intake item; the supervisor must not infer or skip steps from keywords. After complete intake, it creates a source-requirement coverage ledger and SPEC review gate before work units so controlling-source deliverables, roadmap phases, and exit criteria are either implemented, explicitly deferred, blocked, or marked non-material. In human-in-loop mode, the human can ask questions, request revisions, block, defer, or approve the SPEC before final work units. In autonomous goal mode, human clarification pauses resume from recorded workflow state after the answer updates Q&A, decisions, coverage, and affected downstream artifacts. It then selects either autonomous goal execution or human-in-the-loop execution, then orchestrates named workers from dossiers through the portable delegate command or an approved native adapter. Loading the skill itself does not spawn workers. It binds Codex goals only after complete intake and when the user or environment authorizes goal-oriented work, checks active goal state first, avoids unrelated active-goal collisions, and treats terminal blocked goals as history when resuming through workflow docs.
|
|
6
6
|
|
|
7
7
|
## `source-corpus`
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ Rank and reconcile sources when authority, freshness, contradictions, access rig
|
|
|
10
10
|
|
|
11
11
|
## `work-unit`
|
|
12
12
|
|
|
13
|
-
Split broad work into bounded units with objective, scope, dependencies, readiness, done criteria, verification, sequencing, and parallel-safety notes.
|
|
13
|
+
Split broad work into bounded units with objective, scope, dependencies, readiness, done criteria, verification, sequencing, and parallel-safety notes. It prevents broad roadmap or source-of-truth requests from collapsing into one giant unit unless all current-scope material requirements can be implemented and verified in that unit.
|
|
14
14
|
|
|
15
15
|
## `dossier-builder`
|
|
16
16
|
|
|
@@ -22,12 +22,12 @@ Define role contracts and solo-mode phase separation. It prevents role bleed: ve
|
|
|
22
22
|
|
|
23
23
|
## `acceptance-matrix`
|
|
24
24
|
|
|
25
|
-
Create formal evidence-mapped acceptance rows for high-risk, supervised, ambiguous, resumable, or delegated workflows.
|
|
25
|
+
Create formal evidence-mapped acceptance rows for high-risk, supervised, ambiguous, resumable, or delegated workflows. Rows must preserve source requirement strength, including named systems, quantities, live integration language, and exit criteria; weaker proxy checks require explicit user waiver or scope narrowing.
|
|
26
26
|
|
|
27
27
|
## `loop-policy`
|
|
28
28
|
|
|
29
|
-
Define execution path, execution mode, worker delegation, approval gates, repair limits, parallel safety, no-progress rules, and Codex goal tool policy.
|
|
29
|
+
Define execution path, execution mode, worker delegation, approval gates, repair limits, parallel safety, no-progress rules, human-decision resume rules, and Codex goal tool policy.
|
|
30
30
|
|
|
31
31
|
## `workflow-docs`
|
|
32
32
|
|
|
33
|
-
Create durable workflow-state or documentation-production artifacts. Markdown artifacts default to `<workspace>/.workflow/` unless the user or project convention says otherwise. It also supports inline briefs, tickets, design annotations, runbooks, decision logs, and other usable state media.
|
|
33
|
+
Create durable workflow-state or documentation-production artifacts. Markdown artifacts default to `<workspace>/.workflow/` unless the user or project convention says otherwise. It includes `SPEC.md` for human-readable interpretation, Q&A, and approval before work units, plus `GOAL-STATE.md` and resume fields for blocked-goal history and human-decision continuation. It also supports inline briefs, tickets, design annotations, runbooks, decision logs, and other usable state media.
|
package/docs/troubleshooting.md
CHANGED
|
@@ -27,6 +27,22 @@ Use `$workflow-docs` with a minimal artifact request. The skill must reject "cre
|
|
|
27
27
|
|
|
28
28
|
Use `$acceptance-matrix` for formal evidence rows. A PASS requires row-by-row evidence or explicit waiver evidence.
|
|
29
29
|
|
|
30
|
+
## A broad roadmap becomes one giant work unit
|
|
31
|
+
|
|
32
|
+
Use the source-requirement coverage gate before work-unit finalization. Every material roadmap item, exit criterion, named integration, and numeric target should be mapped to a unit and acceptance row, explicitly deferred by the user, blocked for a decision, or marked non-material with a reason. Do not accept "future work" or residual risk notes as a substitute for work units.
|
|
33
|
+
|
|
34
|
+
## Residual risks contain required work
|
|
35
|
+
|
|
36
|
+
Treat this as FAIL or BLOCKED. Residual risks may describe remaining uncertainty after acceptance, but they must not contain unimplemented material source requirements, skipped mandatory checks, or source-of-truth deliverables that were quietly downgraded.
|
|
37
|
+
|
|
38
|
+
## Humans need to review scope before work units
|
|
39
|
+
|
|
40
|
+
Create or refresh `.workflow/SPEC.md` before final work units. The human can ask questions in the Q&A section, request revision, block the workflow, defer items, or approve. In `human_in_loop`, the supervisor must not continue to final work units, dossiers, or implementation until the SPEC decision is approved and Q&A is answered.
|
|
41
|
+
|
|
42
|
+
## Autonomous workflow paused for a human decision
|
|
43
|
+
|
|
44
|
+
Record the blocker before asking the human. When the answer arrives, update `.workflow/SPEC.md`, `.workflow/WORKFLOW.md`, `.workflow/GOAL-STATE.md`, and `DECISIONS.md` when present. Re-run only the affected coverage, SPEC, work-unit, acceptance, dossier, worker-plan, verification, or final-disposition steps. Do not restart complete intake unless the answer changes a required intake decision. If the old Codex goal is terminal blocked, reference it as history and continue from workflow state or a newly authorized goal binding.
|
|
45
|
+
|
|
30
46
|
## An existing skill folder blocks install
|
|
31
47
|
|
|
32
48
|
Use:
|
package/package.json
CHANGED
|
@@ -15,15 +15,39 @@ This skill owns evidence rows and supervisor verdict mapping. `$work-unit` may d
|
|
|
15
15
|
|
|
16
16
|
- Every requirement needs evidence.
|
|
17
17
|
- Evidence must name a source, command, artifact, UI state, test, inspection, or user decision.
|
|
18
|
+
- Acceptance rows must preserve the source requirement's strength: named systems, quantities, live/integration wording, exit criteria, and "must" language.
|
|
19
|
+
- A weaker proxy check is not equivalent evidence unless the user explicitly waives or narrows the original requirement.
|
|
18
20
|
- PASS requires all material rows to be satisfied or explicitly waived by the user.
|
|
19
21
|
- FAIL requires at least one material row with unmet evidence.
|
|
20
22
|
- BLOCKED applies when evidence cannot be obtained or sources conflict.
|
|
21
23
|
- Residual risks must not be hidden inside PASS.
|
|
24
|
+
- If residual risks, skipped checks, future work, or next recommended actions contain an unimplemented material source requirement, the matrix status is FAIL or BLOCKED, not PASS.
|
|
25
|
+
|
|
26
|
+
## Source Fidelity Rules
|
|
27
|
+
|
|
28
|
+
When a source-requirement coverage ledger exists, every `in_current_scope` material requirement needs at least one matrix row. Preserve exact source details that affect scope or verification, including:
|
|
29
|
+
|
|
30
|
+
- named integrations or providers
|
|
31
|
+
- corpus sizes, question counts, coverage thresholds, or latency/cost budgets
|
|
32
|
+
- "live" versus artifact-only behavior
|
|
33
|
+
- required data sources, credentials, services, or indexes
|
|
34
|
+
- roadmap phase exit criteria
|
|
35
|
+
- mandatory checks, screenshots, reports, or review states
|
|
36
|
+
|
|
37
|
+
Do not downgrade requirements while making them testable. Examples of invalid substitutions:
|
|
38
|
+
|
|
39
|
+
- live service load/query verification -> generated export file only
|
|
40
|
+
- required validation corpus size -> small starter fixture
|
|
41
|
+
- named provider support -> generic extension hook
|
|
42
|
+
- required analysis and report generation -> keyword metadata only
|
|
43
|
+
- provider-backed extraction or indexing -> deterministic placeholder logic
|
|
44
|
+
|
|
45
|
+
If a requirement cannot be verified in the current environment, mark it BLOCKED or require a user waiver. Do not convert it into an easier row.
|
|
22
46
|
|
|
23
47
|
## Row Shape
|
|
24
48
|
|
|
25
|
-
| ID | Requirement | Evidence Required | Verification Method | Adversarial Check | Status | Evidence |
|
|
26
|
-
|
|
49
|
+
| ID | Source Ref | Requirement | Evidence Required | Verification Method | Adversarial Check | Status | Evidence |
|
|
50
|
+
|---|---|---|---|---|---|---|---|
|
|
27
51
|
|
|
28
52
|
Use statuses: Pending, PASS, FAIL, BLOCKED, Waived.
|
|
29
53
|
|
|
@@ -46,6 +70,9 @@ Consider:
|
|
|
46
70
|
- missing citation or unsupported claim
|
|
47
71
|
- document structure regression
|
|
48
72
|
- stakeholder requirement omitted
|
|
73
|
+
- source requirement weakened or omitted
|
|
74
|
+
- roadmap exit criteria demoted to future work
|
|
75
|
+
- material requirement hidden in residual risks
|
|
49
76
|
- artifact cannot be reused by a fresh agent or human
|
|
50
77
|
|
|
51
78
|
## Verification Report Shape
|
|
@@ -21,7 +21,8 @@ For loop-oriented supervisor work, define how the workflow uses Codex goals afte
|
|
|
21
21
|
- goal_state_mirror_cadence: each work unit, each verification result, each repair loop, and final outcome
|
|
22
22
|
- goal_completion_rule: evidence required before completion
|
|
23
23
|
- goal_blocked_rule: same material blocker across the required consecutive goal turns and no meaningful progress
|
|
24
|
-
- goal_resume_rule: read active goal before workflow docs,
|
|
24
|
+
- goal_resume_rule: read active goal before workflow docs, reconcile state, and continue from the recorded next action after human decisions
|
|
25
|
+
- human_decision_resume_rule: ask the smallest blocking decision, update state, invalidate only affected downstream artifacts, and resume without restarting intake unless intake changed
|
|
25
26
|
|
|
26
27
|
Do not create goals for small direct tasks. A goal is the state container for open-ended loops, not a wrapper around every command.
|
|
27
28
|
|
|
@@ -36,7 +37,7 @@ Do not create goals for small direct tasks. A goal is the state container for op
|
|
|
36
37
|
- Budget: time, token, command, cost, or file-change limits.
|
|
37
38
|
- Escalation: when to ask the user, delegate to a specialist worker, or stop.
|
|
38
39
|
- Completion: evidence required before marking done.
|
|
39
|
-
- Resume: artifacts needed before pausing or
|
|
40
|
+
- Resume: artifacts needed before pausing, compacting, or waiting for a human decision.
|
|
40
41
|
- Mutation conflict: whether units touch the same mutable surfaces or decisions.
|
|
41
42
|
|
|
42
43
|
## Default Policy
|
|
@@ -63,6 +64,7 @@ workflow_unit_blocked_after: first material blocker may stop the unit while the
|
|
|
63
64
|
codex_goal_blocked_after: same material blocker across 3 consecutive goal turns and no meaningful progress
|
|
64
65
|
completion_requires: acceptance evidence plus residual risk report
|
|
65
66
|
resume_requires: workflow state or outcome doc for long workflows
|
|
67
|
+
human_decision_resume_rule: record blocker and next action before asking; after answer, update Q&A/decision/coverage state, re-run only affected downstream steps, invalidate stale artifacts, and continue from recorded next action
|
|
66
68
|
missing_prerequisites: discovery-first, not failure
|
|
67
69
|
goal_start: after complete intake only; create only when completed intake and environment authorize goal binding, otherwise mirror state in docs
|
|
68
70
|
goal_state_mirror_cadence: after unit terminal states and final outcome
|
|
@@ -98,6 +100,7 @@ escalation_rules:
|
|
|
98
100
|
stop_gates:
|
|
99
101
|
completion_rule:
|
|
100
102
|
resume_artifacts:
|
|
103
|
+
human_decision_resume_rule:
|
|
101
104
|
goal_policy:
|
|
102
105
|
final_disposition_policy:
|
|
103
106
|
```
|
|
@@ -43,6 +43,23 @@ Work-unit drafts coarse done criteria only. Use `$acceptance-matrix` when those
|
|
|
43
43
|
|
|
44
44
|
For over-broad one-pass requests, produce a sequencing recommendation and invoke or mirror `$loop-policy` fields for mode, parallel safety, approval gates, and repair limits.
|
|
45
45
|
|
|
46
|
+
## One-Pass Collapse Guard
|
|
47
|
+
|
|
48
|
+
Do not collapse a multi-phase roadmap, spec, or "source of truth" corpus into one broad implementation unit unless every material requirement can be completed and verified inside that unit. If the source contains phases, exit criteria, named integrations, scale targets, or different risk classes, split them into independently verifiable units.
|
|
49
|
+
|
|
50
|
+
Treat these as separate-unit signals:
|
|
51
|
+
|
|
52
|
+
- roadmap phases or milestones
|
|
53
|
+
- multiple external data sources, providers, services, or credentials
|
|
54
|
+
- live system integration plus local artifact fallback
|
|
55
|
+
- extraction/indexing/retrieval/evaluation/reporting layers with different evidence needs
|
|
56
|
+
- numeric targets such as corpus size, eval question count, latency budget, or coverage threshold
|
|
57
|
+
- implementation work that would otherwise be described as residual risk, future work, or next recommended action
|
|
58
|
+
|
|
59
|
+
If a supervisor provides a source-requirement coverage ledger, every `in_current_scope` material requirement must appear in at least one work unit's done criteria. Every `explicit_user_deferred`, `blocked_needs_decision`, or `out_of_scope_by_user` item must remain visible in `blocked_units` or a separate deferral list; do not hide it inside a unit note.
|
|
60
|
+
|
|
61
|
+
Create exactly one `WU-001` only when the task is genuinely tiny or the full current-scope ledger can be implemented, verified, and documented as one bounded unit without deferred material requirements.
|
|
62
|
+
|
|
46
63
|
## Output Shape
|
|
47
64
|
|
|
48
65
|
```yaml
|
|
@@ -60,10 +77,12 @@ units:
|
|
|
60
77
|
forbidden_surfaces:
|
|
61
78
|
readiness:
|
|
62
79
|
done_criteria:
|
|
80
|
+
source_requirements_covered:
|
|
63
81
|
verification:
|
|
64
82
|
sequence:
|
|
65
83
|
parallel_groups:
|
|
66
84
|
blocked_units:
|
|
85
|
+
deferred_or_out_of_scope_requirements:
|
|
67
86
|
first_recommended_unit:
|
|
68
87
|
```
|
|
69
88
|
|
|
@@ -62,6 +62,7 @@ For documentation work, start with `DOCUMENTATION-BRIEF.md` unless the user prov
|
|
|
62
62
|
|
|
63
63
|
- `.workflow/WORKFLOW.md`: overall objective, policy, state, units, and next action.
|
|
64
64
|
- `.workflow/SOURCE-CORPUS.md`: source map, authority ranking, contradictions, gaps.
|
|
65
|
+
- `.workflow/SPEC.md`: human-reviewable interpretation contract, requirement coverage, Q&A, and approval decision before final work units.
|
|
65
66
|
- `.workflow/WORK-UNITS.md`: decomposition and sequencing.
|
|
66
67
|
- `.workflow/DOSSIER.md`: delegation contract for one unit.
|
|
67
68
|
- `.workflow/WORKER-MAP.md`: worker names, roles, transports, dossiers, dependencies, start conditions, report status, and supervisor checkpoints.
|
|
@@ -71,7 +72,7 @@ For documentation work, start with `DOCUMENTATION-BRIEF.md` unless the user prov
|
|
|
71
72
|
- `.workflow/DECISIONS.md`: durable decisions, assumptions, and reversals.
|
|
72
73
|
- `.workflow/HANDOFF.md`: resume state for another agent or session.
|
|
73
74
|
- `.workflow/OUTCOME.md`: final status, checks, risks, and next step.
|
|
74
|
-
- `.workflow/GOAL-STATE.md`: optional fallback
|
|
75
|
+
- `.workflow/GOAL-STATE.md`: optional fallback or mirror for Codex goal state, terminal blocked-goal history, and human-decision resume checkpoints.
|
|
75
76
|
- `.workflow/DOCUMENTATION-BRIEF.md`: audience, purpose, document type, reader task, channel, owner, approvers, and success criteria.
|
|
76
77
|
- `.workflow/CONTENT-INVENTORY.md`: existing materials, reusable sections, gaps, stale areas, and owners.
|
|
77
78
|
- `.workflow/OUTLINE.md`: information architecture, section hierarchy, and required content.
|
|
@@ -12,19 +12,28 @@ In Git-backed codebases, ensure `<workspace>/.gitignore` contains `.workflow/` b
|
|
|
12
12
|
## Goal Binding
|
|
13
13
|
|
|
14
14
|
- Goal Binding: created | reused | skipped | unavailable | conflict
|
|
15
|
-
- Goal Status: active | complete | blocked | unknown
|
|
15
|
+
- Goal Status: active | complete | blocked | blocked old | unknown
|
|
16
16
|
- Last Goal Tool Action: get_goal | create_goal | update_goal | none
|
|
17
17
|
- Next Allowed Goal Action:
|
|
18
18
|
- Goal Objective:
|
|
19
|
+
- Previous Blocked Goal Reference:
|
|
20
|
+
- Human Decision Needed:
|
|
21
|
+
- Human Decision Answer:
|
|
22
|
+
- Resume From:
|
|
23
|
+
- Artifacts To Refresh:
|
|
24
|
+
- Stale Artifacts Invalidated:
|
|
19
25
|
```
|
|
20
26
|
|
|
21
27
|
## Goal-Aware OUTCOME.md Fields
|
|
22
28
|
|
|
23
29
|
```md
|
|
24
30
|
Goal Binding: created | reused | skipped | unavailable | conflict
|
|
25
|
-
Goal Status: active | complete | blocked | unknown
|
|
31
|
+
Goal Status: active | complete | blocked | blocked old | unknown
|
|
26
32
|
Last Goal Tool Action: get_goal | create_goal | update_goal | none
|
|
27
33
|
Next Allowed Goal Action:
|
|
34
|
+
Previous Blocked Goal Reference:
|
|
35
|
+
Resume From:
|
|
36
|
+
Human Decision Resume Status:
|
|
28
37
|
```
|
|
29
38
|
|
|
30
39
|
## GOAL-STATE.md
|
|
@@ -40,10 +49,18 @@ created | reused | skipped | unavailable | conflict
|
|
|
40
49
|
|
|
41
50
|
## Goal Status
|
|
42
51
|
|
|
43
|
-
active | complete | blocked | unknown
|
|
52
|
+
active | complete | blocked | blocked old | unknown
|
|
44
53
|
|
|
45
54
|
## Why A Goal Was Created Or Skipped
|
|
46
55
|
|
|
56
|
+
## Previous Blocked Goal
|
|
57
|
+
|
|
58
|
+
Goal Reference:
|
|
59
|
+
|
|
60
|
+
Reason:
|
|
61
|
+
|
|
62
|
+
Use As History Only: yes | no
|
|
63
|
+
|
|
47
64
|
## Active Goal Conflict
|
|
48
65
|
|
|
49
66
|
## Last Tool Action
|
|
@@ -56,9 +73,37 @@ get_goal | create_goal | update_goal | none
|
|
|
56
73
|
|
|
57
74
|
## Current Work Unit
|
|
58
75
|
|
|
76
|
+
## Current Blocker
|
|
77
|
+
|
|
78
|
+
## Human Decision Needed
|
|
79
|
+
|
|
80
|
+
Question:
|
|
81
|
+
|
|
82
|
+
Smallest Sufficient Answer:
|
|
83
|
+
|
|
84
|
+
## Human Decision Answer
|
|
85
|
+
|
|
86
|
+
Answer:
|
|
87
|
+
|
|
88
|
+
Decision Type: clarification | scope change | requirement waiver | explicit deferral | blocker resolution | final disposition | intake change | workflow cancellation
|
|
89
|
+
|
|
90
|
+
## Resume Checkpoint
|
|
91
|
+
|
|
92
|
+
Last Completed Step:
|
|
93
|
+
|
|
94
|
+
Next Action:
|
|
95
|
+
|
|
96
|
+
Artifacts To Refresh:
|
|
97
|
+
|
|
98
|
+
Stale Artifacts Invalidated:
|
|
99
|
+
|
|
59
100
|
## Completion Rule
|
|
60
101
|
|
|
61
102
|
## Blocked Rule
|
|
62
103
|
|
|
63
104
|
## Resume Instructions
|
|
64
105
|
```
|
|
106
|
+
|
|
107
|
+
## Human Decision Resume Rule
|
|
108
|
+
|
|
109
|
+
When a workflow pauses for a human answer, record the blocker before asking. After the answer arrives, update the decision log, SPEC Q&A, coverage dispositions, and goal mirror before continuing. Resume from the recorded next action and re-run only affected downstream steps. Do not restart complete intake unless the answer changes a required intake decision. If the previous Codex goal is terminal blocked and cannot be reopened, keep that goal reference as history and continue with workflow docs or a newly authorized goal binding.
|
|
@@ -34,6 +34,7 @@ Includes:
|
|
|
34
34
|
|
|
35
35
|
- `WORKFLOW.md`
|
|
36
36
|
- `SOURCE-CORPUS.md`
|
|
37
|
+
- `SPEC.md`
|
|
37
38
|
- `WORK-UNITS.md`
|
|
38
39
|
- `DOSSIER.md`
|
|
39
40
|
- `WORKER-MAP.md`
|
|
@@ -42,6 +43,7 @@ Includes:
|
|
|
42
43
|
- `REPAIR-TICKETS.md`
|
|
43
44
|
- `DECISIONS.md`
|
|
44
45
|
- `HANDOFF.md`
|
|
46
|
+
- `GOAL-STATE.md`
|
|
45
47
|
- `OUTCOME.md`
|
|
46
48
|
|
|
47
49
|
## Goal And Resume
|
|
@@ -38,6 +38,21 @@ Git rule: in a Git-backed codebase, ensure `<workspace>/.gitignore` contains `.w
|
|
|
38
38
|
|
|
39
39
|
## Stop Gates
|
|
40
40
|
|
|
41
|
+
## Blocking Decision
|
|
42
|
+
|
|
43
|
+
| ID | Blocked Artifact | Question | Affected Requirements | Affected Work Units | Status | Answer Source |
|
|
44
|
+
|---|---|---|---|---|---|---|
|
|
45
|
+
|
|
46
|
+
## Resume Checkpoint
|
|
47
|
+
|
|
48
|
+
Last Completed Step:
|
|
49
|
+
|
|
50
|
+
Next Action:
|
|
51
|
+
|
|
52
|
+
Artifacts To Refresh:
|
|
53
|
+
|
|
54
|
+
Stale Artifacts Invalidated:
|
|
55
|
+
|
|
41
56
|
## Next Action
|
|
42
57
|
```
|
|
43
58
|
|
|
@@ -65,6 +80,80 @@ Git rule: in a Git-backed codebase, ensure `<workspace>/.gitignore` contains `.w
|
|
|
65
80
|
## Allowed Next Action
|
|
66
81
|
```
|
|
67
82
|
|
|
83
|
+
## SPEC.md
|
|
84
|
+
|
|
85
|
+
```md
|
|
86
|
+
# SPEC
|
|
87
|
+
|
|
88
|
+
Status: Draft | Approved | Needs Revision | Blocked
|
|
89
|
+
|
|
90
|
+
## Objective
|
|
91
|
+
|
|
92
|
+
## Source Of Truth
|
|
93
|
+
|
|
94
|
+
| Source | Role | Notes |
|
|
95
|
+
|---|---|---|
|
|
96
|
+
|
|
97
|
+
## Interpreted Scope
|
|
98
|
+
|
|
99
|
+
## Non-Goals
|
|
100
|
+
|
|
101
|
+
## Requirement Coverage
|
|
102
|
+
|
|
103
|
+
| ID | Source Ref | Requirement | Proposed Disposition | Final Disposition | Decision Source | Work Unit | Acceptance Row |
|
|
104
|
+
|---|---|---|---|---|---|---|---|
|
|
105
|
+
|
|
106
|
+
## Deferred, Out-Of-Scope, Or Blocked Items
|
|
107
|
+
|
|
108
|
+
| ID | Requirement | Status | Reason | Needed Decision |
|
|
109
|
+
|---|---|---|---|---|
|
|
110
|
+
|
|
111
|
+
## Proposed Work Units
|
|
112
|
+
|
|
113
|
+
| Work Unit | Objective | Depends On | Verification |
|
|
114
|
+
|---|---|---|---|
|
|
115
|
+
|
|
116
|
+
## Acceptance Summary
|
|
117
|
+
|
|
118
|
+
## Assumptions And Risks
|
|
119
|
+
|
|
120
|
+
## Open Questions
|
|
121
|
+
|
|
122
|
+
| ID | Question | Asked By | Answer | Status |
|
|
123
|
+
|---|---|---|---|---|
|
|
124
|
+
|
|
125
|
+
## Q&A Log
|
|
126
|
+
|
|
127
|
+
| ID | Question | Answer | Spec Change Required | Status |
|
|
128
|
+
|---|---|---|---|---|
|
|
129
|
+
|
|
130
|
+
## Resume Checkpoint
|
|
131
|
+
|
|
132
|
+
Blocked At:
|
|
133
|
+
|
|
134
|
+
Required Human Decision:
|
|
135
|
+
|
|
136
|
+
Affected Requirement IDs:
|
|
137
|
+
|
|
138
|
+
Affected Work Units:
|
|
139
|
+
|
|
140
|
+
Next Action After Answer:
|
|
141
|
+
|
|
142
|
+
Artifacts To Refresh:
|
|
143
|
+
|
|
144
|
+
Stale Artifacts Invalidated:
|
|
145
|
+
|
|
146
|
+
## Human Verification
|
|
147
|
+
|
|
148
|
+
Reviewer:
|
|
149
|
+
|
|
150
|
+
Decision: Approved | Needs Revision | Blocked
|
|
151
|
+
|
|
152
|
+
Decision Source:
|
|
153
|
+
|
|
154
|
+
Notes:
|
|
155
|
+
```
|
|
156
|
+
|
|
68
157
|
## WORK-UNITS.md
|
|
69
158
|
|
|
70
159
|
```md
|
|
@@ -249,6 +338,66 @@ Acceptance Criteria:
|
|
|
249
338
|
## Next Recommended Action
|
|
250
339
|
```
|
|
251
340
|
|
|
341
|
+
## GOAL-STATE.md
|
|
342
|
+
|
|
343
|
+
```md
|
|
344
|
+
# Goal State
|
|
345
|
+
|
|
346
|
+
## Objective
|
|
347
|
+
|
|
348
|
+
## Goal Binding
|
|
349
|
+
|
|
350
|
+
created | reused | skipped | unavailable | conflict
|
|
351
|
+
|
|
352
|
+
## Goal Status
|
|
353
|
+
|
|
354
|
+
active | complete | blocked | blocked old | unknown
|
|
355
|
+
|
|
356
|
+
## Previous Blocked Goal
|
|
357
|
+
|
|
358
|
+
Goal Reference:
|
|
359
|
+
|
|
360
|
+
Reason:
|
|
361
|
+
|
|
362
|
+
Use As History Only: yes | no
|
|
363
|
+
|
|
364
|
+
## Last Tool Action
|
|
365
|
+
|
|
366
|
+
get_goal | create_goal | update_goal | none
|
|
367
|
+
|
|
368
|
+
## Next Allowed Goal Action
|
|
369
|
+
|
|
370
|
+
## Last Completed Step
|
|
371
|
+
|
|
372
|
+
## Current Work Unit
|
|
373
|
+
|
|
374
|
+
## Current Blocker
|
|
375
|
+
|
|
376
|
+
## Human Decision Needed
|
|
377
|
+
|
|
378
|
+
Question:
|
|
379
|
+
|
|
380
|
+
Smallest Sufficient Answer:
|
|
381
|
+
|
|
382
|
+
## Human Decision Answer
|
|
383
|
+
|
|
384
|
+
Answer:
|
|
385
|
+
|
|
386
|
+
Decision Type: clarification | scope change | requirement waiver | explicit deferral | blocker resolution | final disposition | intake change | workflow cancellation
|
|
387
|
+
|
|
388
|
+
## Resume Checkpoint
|
|
389
|
+
|
|
390
|
+
Next Action:
|
|
391
|
+
|
|
392
|
+
Artifacts To Refresh:
|
|
393
|
+
|
|
394
|
+
Stale Artifacts Invalidated:
|
|
395
|
+
|
|
396
|
+
## Completion Rule
|
|
397
|
+
|
|
398
|
+
## Blocked Rule
|
|
399
|
+
```
|
|
400
|
+
|
|
252
401
|
## OUTCOME.md
|
|
253
402
|
|
|
254
403
|
```md
|
|
@@ -16,13 +16,15 @@ Strict mode always requires:
|
|
|
16
16
|
1. Complete intake before planning, goal creation, worker delegation, implementation, publication, or irreversible action.
|
|
17
17
|
2. A human approval question before implementation unless completed intake explicitly selects `autonomous_goal`.
|
|
18
18
|
3. A source corpus map, even if the source corpus is only "user prompt plus current workspace".
|
|
19
|
-
4.
|
|
20
|
-
5. A
|
|
21
|
-
6.
|
|
22
|
-
7. A
|
|
23
|
-
8.
|
|
24
|
-
9.
|
|
25
|
-
10. A
|
|
19
|
+
4. A source-requirement coverage ledger before work-unit finalization.
|
|
20
|
+
5. A SPEC review packet or `.workflow/SPEC.md` before work-unit finalization.
|
|
21
|
+
6. At least one bounded work unit, even for a tiny change. Use `WU-001` when there is only one unit.
|
|
22
|
+
7. A dossier for each implementation work unit before implementation begins.
|
|
23
|
+
8. An acceptance matrix or acceptance draft with evidence expectations before implementation begins.
|
|
24
|
+
9. A worker-agent plan with implementer, verifier, repair-author, and documenter agents.
|
|
25
|
+
10. A worker lifecycle record using `planned -> handed_off -> acknowledged -> reported -> verified -> closed`.
|
|
26
|
+
11. Verification labeled as `self-check`, `focused-check`, or `independent-verifier`.
|
|
27
|
+
12. A final disposition question or recorded completed-intake final disposition after verification.
|
|
26
28
|
|
|
27
29
|
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
30
|
|
|
@@ -36,6 +38,60 @@ This workflow must work without a repository, codebase, existing docs, or instal
|
|
|
36
38
|
|
|
37
39
|
When no source corpus exists, make the first work unit a discovery/intake unit instead of inventing prerequisites. Do not require `AGENTS.md`, a repo, commands, or Markdown files unless the specific task provides them or needs them.
|
|
38
40
|
|
|
41
|
+
## Source Requirement Coverage Gate
|
|
42
|
+
|
|
43
|
+
After the source corpus map and before final work units, extract the material requirements from the controlling sources into a coverage ledger. Include explicit user constraints, source deliverables, roadmap phases, exit criteria, named integrations, scale targets, verification requirements, and forbidden surfaces.
|
|
44
|
+
|
|
45
|
+
For every source requirement, record:
|
|
46
|
+
|
|
47
|
+
- source reference: file, ticket, prompt, section, line, or artifact id when available
|
|
48
|
+
- requirement statement using the source's own strength, including numbers, named systems, and "must"/"exit criteria" language
|
|
49
|
+
- disposition: `in_current_scope`, `explicit_user_deferred`, `blocked_needs_decision`, `out_of_scope_by_user`, or `non_material_context`
|
|
50
|
+
- planned work unit id or blocking question
|
|
51
|
+
- planned acceptance row id or waiver evidence
|
|
52
|
+
|
|
53
|
+
Do not weaken requirements while translating them into units or acceptance rows. Examples of forbidden downgrades:
|
|
54
|
+
|
|
55
|
+
- "live service import and query verification" to "generated export or optional loader"
|
|
56
|
+
- "required validation corpus size" to "small starter checks exist"
|
|
57
|
+
- "named providers A and B" to "one provider plus an extension hook"
|
|
58
|
+
- "required batch analysis and report generation" to "metadata says reports are possible"
|
|
59
|
+
- "provider-backed extraction and indexing" to "deterministic placeholder logic"
|
|
60
|
+
|
|
61
|
+
Treat roadmap phases, source "Build" lists, and exit criteria as material when the user says the source is the source of truth, asks to implement everything, or does not explicitly narrow the scope. If the user wants only a first slice, record every non-slice material item as `explicit_user_deferred`; otherwise create work units for it or stop as `blocked_needs_decision`.
|
|
62
|
+
|
|
63
|
+
Create exactly one implementation work unit only when all current-scope material requirements can be implemented and verified inside that one unit without hiding source requirements in residual risks, skipped checks, future work, or next recommended actions. For multi-phase, dependency-heavy, or roadmap-driven work, create one work unit per independently verifiable phase, integration, data slice, or risk boundary.
|
|
64
|
+
|
|
65
|
+
Before final closeout, audit the coverage ledger. The workflow may be PASS only when every material requirement is mapped to a PASS acceptance row, explicitly waived by the user, or blocked and reported as not complete.
|
|
66
|
+
|
|
67
|
+
## SPEC Review And Q&A Gate
|
|
68
|
+
|
|
69
|
+
Before final work units, create a concise reviewable spec as `.workflow/SPEC.md` when workflow docs are enabled, or as an inline SPEC review packet when state is inline. The SPEC is the human-readable contract for interpretation, not the execution plan.
|
|
70
|
+
|
|
71
|
+
The SPEC must include:
|
|
72
|
+
|
|
73
|
+
- status: `Draft`, `Approved`, `Needs Revision`, or `Blocked`
|
|
74
|
+
- objective and non-goals
|
|
75
|
+
- source of truth summary
|
|
76
|
+
- interpreted scope
|
|
77
|
+
- requirement coverage ledger or summary
|
|
78
|
+
- deferred, out-of-scope, and blocked items
|
|
79
|
+
- proposed work units summary
|
|
80
|
+
- acceptance summary
|
|
81
|
+
- assumptions, risks, and open questions
|
|
82
|
+
- Q&A log
|
|
83
|
+
- human verification decision with reviewer, decision, notes, and date when known
|
|
84
|
+
|
|
85
|
+
In `human_in_loop`, stop after presenting the draft SPEC and ask for review. The human may ask questions, request revisions, block, defer requirements, change dispositions, or approve. Continue to final work units, dossiers, or implementation only after the SPEC has `Decision: Approved` or an equivalent explicit approval in the conversation.
|
|
86
|
+
|
|
87
|
+
If the human asks questions, answer them and update the Q&A log before proceeding. If the answers change scope, sources, dispositions, work units, or acceptance, revise the SPEC and ask for approval again. If the human marks `Needs Revision`, revise and re-present. If the human marks `Blocked`, stop and record the blocker.
|
|
88
|
+
|
|
89
|
+
In `autonomous_goal`, create or record the SPEC and continue only when no blocking questions remain and no higher-priority instruction requires approval. Do not fabricate human approval; use `Approval: not required by autonomous_goal intake` or equivalent wording instead.
|
|
90
|
+
|
|
91
|
+
Agents may propose dispositions such as `proposed_current_scope` or `proposed_deferred`, but only explicit user approval may convert them into `in_current_scope`, `explicit_user_deferred`, or `out_of_scope_by_user` when the distinction changes scope. Keep proposed agent interpretation separate from final human decisions.
|
|
92
|
+
|
|
93
|
+
If `autonomous_goal` finds a blocking question or human decision point, use Resume After Human Decision instead of treating the autonomous path as failed. Autonomous execution may pause for the smallest necessary decision and then continue from the saved checkpoint after the human answers.
|
|
94
|
+
|
|
39
95
|
## Codex Goal Lifecycle
|
|
40
96
|
|
|
41
97
|
This skill is loop-oriented. Complete intake is mandatory before goal binding. After all required intake decisions are answered, bind the workflow to a Codex goal only when the completed intake and governing environment both authorize goal-oriented work.
|
|
@@ -53,10 +109,31 @@ Use this lifecycle:
|
|
|
53
109
|
9. Use `update_goal` only for terminal `complete` or `blocked` states when the environment supports that action.
|
|
54
110
|
10. Mark the goal complete only after acceptance evidence supports completion and no required supervisor work remains.
|
|
55
111
|
11. Distinguish workflow/unit BLOCKED from Codex goal blocked. Mark a Codex goal blocked only after the same material blocker repeats across the required consecutive goal turns and no meaningful progress remains.
|
|
56
|
-
12. On resume after compaction or
|
|
112
|
+
12. On resume after compaction, continuation, or human answer, read the active goal first, then reconcile workflow docs and current artifacts.
|
|
113
|
+
13. If the prior Codex goal is terminal `blocked old`, do not assume it can be reopened. Continue from workflow state when safe; create or reuse a new active workflow state only when complete intake still authorizes goal binding, and reference the old blocked goal as history.
|
|
57
114
|
|
|
58
115
|
If the environment has no goal tool or goal creation is not permitted, state the intended goal objective in the supervisor report and continue with workflow docs or another state artifact as the fallback state container.
|
|
59
116
|
|
|
117
|
+
## Resume After Human Decision
|
|
118
|
+
|
|
119
|
+
Use this protocol when `autonomous_goal` or another supervised path stops to ask a human for clarification, scope disposition, approval, waiver, final disposition, or any other blocking decision.
|
|
120
|
+
|
|
121
|
+
Before asking the human:
|
|
122
|
+
|
|
123
|
+
- Record the blocker in `.workflow/SPEC.md`, `.workflow/WORKFLOW.md`, `.workflow/GOAL-STATE.md`, or the inline state packet. Include the blocked artifact, exact question, affected requirement ids, affected work units, last completed step, and recorded next action.
|
|
124
|
+
- Ask the smallest decision that can unblock progress. Do not re-ask complete intake unless a required intake decision is missing, contradicted, or directly changed by the blocker.
|
|
125
|
+
- Mark the workflow, SPEC item, unit, or worker as waiting or blocked. Do not mark the Codex goal terminal `blocked` for a first material blocker when meaningful progress can continue after the human answers.
|
|
126
|
+
|
|
127
|
+
When the human answers:
|
|
128
|
+
|
|
129
|
+
- Classify the answer as one or more of: clarification, scope change, requirement waiver, explicit deferral, blocker resolution, final disposition, intake change, or workflow cancellation.
|
|
130
|
+
- Update the SPEC Q&A log, requirement coverage dispositions, decision source, and any `DECISIONS.md`, `WORKFLOW.md`, or `GOAL-STATE.md` resume fields before continuing.
|
|
131
|
+
- Do not restart intake unless the answer changes a required intake decision: objective/source, execution path, mode, delegation, final disposition, mutation boundaries, or state artifacts. If it does, ask only the affected intake item(s), then resume.
|
|
132
|
+
- Re-run only the affected downstream steps: source coverage, SPEC, work-unit split, acceptance rows, dossiers, worker plan, verification, or final disposition. Preserve unaffected completed units and evidence.
|
|
133
|
+
- Invalidate stale work units, acceptance rows, dossiers, or worker reports whose assumptions changed. Do not reuse them as green evidence.
|
|
134
|
+
- Continue from the recorded `Next Action`. If the recorded next action is missing, derive the next action from the latest non-terminal workflow artifact and state the derivation in the report.
|
|
135
|
+
- If the old Codex goal is still active and relevant, reuse it. If it is terminal `blocked old` and cannot be reopened, reference it as history and continue with workflow docs or a newly authorized goal binding.
|
|
136
|
+
|
|
60
137
|
## Operating Contract
|
|
61
138
|
|
|
62
139
|
- After complete intake, ground the workflow in sources before creating work units.
|
|
@@ -65,6 +142,7 @@ If the environment has no goal tool or goal creation is not permitted, state the
|
|
|
65
142
|
- Do not infer execution path, mode, delegation, final disposition, or boundaries from keywords, action verbs, or intent guesses.
|
|
66
143
|
- Classify the workflow as `autonomous_goal` or `human_in_loop` only from completed intake answers before delegating workers or beginning implementation.
|
|
67
144
|
- Explicit invocation always requires complete intake, work units, dossiers, worker-agent contracts, scoped handoffs, report schema, and verification; do this even for trivial tasks.
|
|
145
|
+
- Preserve source-scope fidelity: do not translate controlling-source requirements into weaker proxy checks unless the user explicitly approves the narrower scope or waiver.
|
|
68
146
|
- 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.
|
|
69
147
|
- 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
148
|
- 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`.
|
|
@@ -73,7 +151,9 @@ If the environment has no goal tool or goal creation is not permitted, state the
|
|
|
73
151
|
- 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.
|
|
74
152
|
- Prefer explicit PASS/FAIL/BLOCKED states over soft completion language.
|
|
75
153
|
- Stop instead of improvising when sources are missing, contradictory, materially stale, or too vague to produce acceptance criteria.
|
|
154
|
+
- Treat unimplemented material source requirements found in residual risks, skipped checks, future work, or `next_recommended_action` as open work, not PASS evidence.
|
|
76
155
|
- Keep provenance optional; require enough outcome detail for another agent to resume.
|
|
156
|
+
- When resuming after a human decision, update state first, invalidate changed downstream artifacts, and continue from the recorded next action instead of restarting the whole workflow.
|
|
77
157
|
- Treat companion skills as optional phase tools, not an automatic cascade. Use the smallest set needed for the current risk.
|
|
78
158
|
|
|
79
159
|
## Skills And Workers
|
|
@@ -155,29 +235,33 @@ Negative example: "Using Workflow Supervisor, generate an API and create the pro
|
|
|
155
235
|
2. Restate the objective, constraints, non-goals, known sources, and unknowns from the completed intake.
|
|
156
236
|
3. Bind or reconcile the Codex goal only after complete intake and only when no unrelated active goal prevents binding.
|
|
157
237
|
4. Build or request a source corpus map. Use `$source-corpus` when source authority, freshness, or contradictions matter.
|
|
158
|
-
5.
|
|
159
|
-
6.
|
|
160
|
-
7.
|
|
161
|
-
8.
|
|
162
|
-
9.
|
|
238
|
+
5. Create the source-requirement coverage ledger. If any material source requirement cannot be classified, mapped to work, or explicitly deferred, stop and ask for the missing scope decision.
|
|
239
|
+
6. Create the SPEC review packet or `.workflow/SPEC.md` from the source corpus and coverage ledger.
|
|
240
|
+
7. Run the SPEC Q&A gate. In `human_in_loop`, stop until the human asks questions, receives answers or revisions, and explicitly approves the SPEC. In `autonomous_goal`, continue only when no blocking questions remain and approval is not required by intake.
|
|
241
|
+
8. Split the objective into bounded work units from the approved or non-blocked SPEC and coverage ledger. Use `$work-unit` for ambiguous or multi-phase goals. If the task is tiny and the ledger has no deferred material requirements, create exactly one work unit named `WU-001`.
|
|
242
|
+
9. 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.
|
|
243
|
+
10. 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.
|
|
244
|
+
11. Assign worker roles with explicit allowed and forbidden behavior. Use `$worker-roles` for multi-agent, native-thread, or portable-worker work.
|
|
245
|
+
12. Select the execution path:
|
|
163
246
|
- `human_in_loop`: use when selected in completed intake or when a higher-priority rule requires human approval after intake.
|
|
164
247
|
- `autonomous_goal`: use only when selected in completed intake and no higher-priority rule requires human approval.
|
|
165
|
-
|
|
166
|
-
|
|
248
|
+
13. If `.workflow/` artifacts will be used in a Git-backed codebase, ensure `.gitignore` contains `.workflow/` before writing them.
|
|
249
|
+
14. Present the path-specific plan:
|
|
167
250
|
- `human_in_loop`: approval packet with plan, work units, worker delegation plan, approval gates, stop gates, and first dossiers. Stop until the human approves or revises it.
|
|
168
251
|
- `autonomous_goal`: execution plan with the same contents plus autonomous boundaries, allowed actions, stop gates, repair limits, and final disposition policy. Continue after recording it only when complete intake authorized that path.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
252
|
+
15. After the path gate is satisfied, delegate named workers from the worker delegation plan through the selected automated transport. Send each worker only its role, dossier, sources, acceptance rows, stop gates, and report schema.
|
|
253
|
+
16. Collect one terminal report from each worker. If a worker asks a human-facing question, convert it to `BLOCKED` and have the supervisor ask the user only when the path policy permits.
|
|
254
|
+
17. Verify independently where possible. Use `$acceptance-matrix` to map every requirement to evidence. Start verifier workers only after the relevant implementer report is available.
|
|
255
|
+
18. If verification FAILs, convert findings into repair tickets and route them to a repair-author or implementer repair worker. Do not expand scope during repair.
|
|
256
|
+
19. Re-run verification after repairs. Continue only until PASS, BLOCKED, repair limit, or path stop.
|
|
257
|
+
20. Start documenter workers only after source, implementation, verification, or repair evidence exists, unless the documenter is explicitly creating planning state.
|
|
258
|
+
21. If verification BLOCKs, record the resume checkpoint, report the blocker, and stop or ask for the missing decision. When the human answers, use Resume After Human Decision.
|
|
259
|
+
22. Use `$workflow-docs` to create or refresh reusable Markdown artifacts under `<workspace>/.workflow/` when the workflow must persist across context loss, agents, or sessions.
|
|
260
|
+
23. Audit skipped checks, residual risks, future work, and next recommended actions against the source-requirement coverage ledger. If any material source requirement appears there without an explicit user deferral or waiver, mark the workflow FAIL/BLOCKED and create more work units or ask for a scope decision.
|
|
261
|
+
24. When all material acceptance rows are PASS or waived, apply the final disposition policy:
|
|
178
262
|
- `human_in_loop`: use the completed intake final disposition; if it is `ask_at_end`, ask the human to choose PR, push main, or keep local.
|
|
179
263
|
- `autonomous_goal`: use the completed intake final disposition. If it is `ask_at_end`, stop and ask before taking any final disposition action.
|
|
180
|
-
|
|
264
|
+
25. Finish with an outcome report that names execution path, goal status, sources, SPEC decision, coverage ledger disposition, work units, delegated workers, checks, skipped checks, residual risks, final disposition decision, and next action.
|
|
181
265
|
|
|
182
266
|
## Execution Paths
|
|
183
267
|
|
|
@@ -185,10 +269,12 @@ Negative example: "Using Workflow Supervisor, generate an API and create the pro
|
|
|
185
269
|
|
|
186
270
|
Use `human_in_loop` when the completed intake selects it, or when a higher-priority rule requires human approval after intake. If the user has not answered the execution-path intake item, stop and ask for that answer instead of inferring a path.
|
|
187
271
|
|
|
188
|
-
The first
|
|
272
|
+
The first review deliverable after source coverage is the SPEC review packet, not implementation. After the SPEC Q&A gate is approved, the supervisor presents the implementation approval packet. The approval packet must include:
|
|
189
273
|
|
|
190
274
|
- objective and non-goals
|
|
191
275
|
- source corpus summary and gaps
|
|
276
|
+
- source-requirement coverage ledger summary
|
|
277
|
+
- SPEC review status, Q&A summary, and decision
|
|
192
278
|
- work units and sequence
|
|
193
279
|
- worker delegation plan with names, roles, dossiers, dependencies, start conditions, and transport
|
|
194
280
|
- acceptance matrix summary
|
|
@@ -203,6 +289,8 @@ Use `autonomous_goal` only when the completed intake selects it. Phrases such as
|
|
|
203
289
|
|
|
204
290
|
- objective and non-goals
|
|
205
291
|
- source corpus summary and gaps
|
|
292
|
+
- source-requirement coverage ledger summary
|
|
293
|
+
- SPEC review status, Q&A summary, and approval policy
|
|
206
294
|
- work units and sequence
|
|
207
295
|
- worker delegation plan with names, roles, dossiers, dependencies, start conditions, and transport
|
|
208
296
|
- acceptance matrix summary
|
|
@@ -214,6 +302,8 @@ The final disposition must come from the completed intake. Direct push to the ma
|
|
|
214
302
|
|
|
215
303
|
Even in `autonomous_goal`, stop and ask when any required intake answer is missing or ambiguous, required sources are missing, acceptance cannot be verified, a worker needs scope expansion, an irreversible action lacks intake authorization, or higher-priority instructions require approval.
|
|
216
304
|
|
|
305
|
+
When `autonomous_goal` stops for a human decision, it should usually leave the Codex goal active and mark only the workflow artifact, SPEC item, work unit, or worker as waiting or blocked. After the human answers, resume from the recorded next action and refresh only the affected downstream artifacts.
|
|
306
|
+
|
|
217
307
|
## Portable Worker Delegation
|
|
218
308
|
|
|
219
309
|
After the path gate is satisfied, use the selected automated worker transport. The portable default is the package helper:
|
|
@@ -293,6 +383,9 @@ Stop when:
|
|
|
293
383
|
- source authority cannot be established
|
|
294
384
|
- sources contradict each other on a material requirement
|
|
295
385
|
- the requested scope cannot fit into a bounded work unit
|
|
386
|
+
- the coverage ledger is missing, incomplete, or contains material requirements classified as future work without explicit user deferral
|
|
387
|
+
- human-in-loop SPEC approval is missing, marked Needs Revision, marked Blocked, or has unanswered Q&A
|
|
388
|
+
- a human decision was answered but affected downstream coverage, SPEC, work units, acceptance, dossiers, or verification have not been refreshed
|
|
296
389
|
- mandatory approval packet, work unit, dossier, worker-agent contract, or acceptance matrix is missing
|
|
297
390
|
- allowed and forbidden surfaces cannot be named
|
|
298
391
|
- acceptance cannot be verified with evidence
|
|
@@ -303,6 +396,7 @@ Stop when:
|
|
|
303
396
|
- an irreversible action is requested without explicit authorization in the completed intake
|
|
304
397
|
- a worker asks to expand scope without supervisor or human approval
|
|
305
398
|
- final verification is not green and no waiver evidence exists
|
|
399
|
+
- residual risks, skipped checks, future work, or next actions contain unimplemented material source requirements
|
|
306
400
|
|
|
307
401
|
## Final Report Shape
|
|
308
402
|
|
|
@@ -313,8 +407,11 @@ Report:
|
|
|
313
407
|
- Goal status and whether a Codex goal was created, reused, skipped, completed, or blocked
|
|
314
408
|
- Objective handled
|
|
315
409
|
- Sources used and gaps
|
|
410
|
+
- SPEC status, Q&A summary, and human decision or autonomous approval policy
|
|
411
|
+
- Source-requirement coverage ledger summary, including deferred or blocked material requirements
|
|
316
412
|
- Work units completed or remaining
|
|
317
413
|
- Approval question id and whether `WAITING_FOR_HUMAN -> ACTIVE` occurred
|
|
414
|
+
- Human decision resume status, affected artifacts, and whether stale downstream artifacts were invalidated
|
|
318
415
|
- Dossiers created or missing
|
|
319
416
|
- Workers delegated, blocked, unavailable, or skipped
|
|
320
417
|
- Worker lifecycle status for each role
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Workflow Supervisor"
|
|
3
3
|
short_description: "Run autonomous or human-gated workflows"
|
|
4
|
-
default_prompt: "Use $workflow-supervisor to run the complete intake gate first. Ask every required intake question and stop until the user explicitly answers all of them. Do not infer or skip steps from keywords such as autonomous, work until done, approval, generate, or create.
|
|
4
|
+
default_prompt: "Use $workflow-supervisor to run the complete intake gate first. Ask every required intake question and stop until the user explicitly answers all of them. Do not infer or skip steps from keywords such as autonomous, work until done, approval, generate, or create. After intake, create a source-requirement coverage ledger and SPEC review gate before work units, preserve source requirements in acceptance rows, and do not hide unimplemented material requirements in residual risks or future work."
|
|
5
5
|
|
|
6
6
|
policy:
|
|
7
7
|
allow_implicit_invocation: false
|