ace-overseer 0.30.2 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/handbook/workflow-instructions/overseer/bootstrap-delegation.wf.md +35 -298
  4. data/handbook/workflow-instructions/overseer/lab-start.wf.md +69 -105
  5. data/handbook/workflow-instructions/overseer/queue.wf.md +39 -219
  6. data/handbook/workflow-instructions/overseer/start.wf.md +66 -298
  7. data/lib/ace/overseer/atoms/start_contract.rb +2 -2
  8. data/lib/ace/overseer/cli/commands/handoff.rb +15 -3
  9. data/lib/ace/overseer/cli/commands/process_reports.rb +33 -4
  10. data/lib/ace/overseer/cli/commands/start.rb +6 -1
  11. data/lib/ace/overseer/cli/commands/status.rb +1 -1
  12. data/lib/ace/overseer/cli/commands/work_on.rb +15 -3
  13. data/lib/ace/overseer/molecules/coworker_launcher.rb +9 -3
  14. data/lib/ace/overseer/molecules/event_observation.rb +4 -0
  15. data/lib/ace/overseer/molecules/eyes_configuration.rb +26 -0
  16. data/lib/ace/overseer/molecules/eyes_evidence.rb +6 -2
  17. data/lib/ace/overseer/molecules/eyes_readiness.rb +6 -1
  18. data/lib/ace/overseer/molecules/eyes_session_evidence.rb +2 -2
  19. data/lib/ace/overseer/molecules/handoff_probe.rb +2 -1
  20. data/lib/ace/overseer/molecules/hitl_inbox.rb +2 -2
  21. data/lib/ace/overseer/molecules/local_sources.rb +25 -5
  22. data/lib/ace/overseer/molecules/manager_binding.rb +138 -0
  23. data/lib/ace/overseer/molecules/project_observations.rb +19 -43
  24. data/lib/ace/overseer/molecules/project_sessions.rb +49 -13
  25. data/lib/ace/overseer/molecules/report_completion_check.rb +3 -1
  26. data/lib/ace/overseer/molecules/session_environment.rb +3 -8
  27. data/lib/ace/overseer/molecules/worktree_provisioner.rb +2 -2
  28. data/lib/ace/overseer/organisms/handoff_orchestrator.rb +43 -1
  29. data/lib/ace/overseer/organisms/report_processor.rb +137 -17
  30. data/lib/ace/overseer/organisms/start_orchestrator.rb +28 -7
  31. data/lib/ace/overseer/organisms/status_attention.rb +27 -3
  32. data/lib/ace/overseer/organisms/status_collector.rb +22 -2
  33. data/lib/ace/overseer/organisms/work_on_orchestrator.rb +33 -7
  34. data/lib/ace/overseer/version.rb +1 -1
  35. metadata +19 -17
@@ -9,222 +9,42 @@ ace-docs:
9
9
  last-updated: '2026-10-18'
10
10
  last-checked: '2026-10-18'
11
11
  ---
12
-
13
- # Overseer Queue Workflow
14
-
15
- ## Goal
16
-
17
- Coordinate delegated work exclusively through the overseer's private task tree
18
- in `.ace-tasks/_overseer/` (gitignored, managed via `ace-task list --in _overseer`),
19
- existing subtasks/dependencies, and `ace-hitl` reports tied to a concrete step.
20
- The tree decides order, dependencies, and assignments. There is no second queue
21
- engine: no daemon, no journal, no state cache, no lease registry, and no
22
- role/name guards inside `ace-task`, `ace-assign`, or `ace-git-worktree`. Every
23
- policy below is executed by the overseer role reading and writing the ordinary
24
- task files.
25
-
26
- ## Contract rules (non-negotiable)
27
-
28
- 1. **One list, one owner.** The overseer's coordination state lives only in
29
- `.ace-tasks/_overseer/`. A coworker reports through messages (ace-hitl) and
30
- never writes the overseer's list. Reading or writing any other location
31
- must not create a hidden second list.
32
- 2. **Merge is modeled by integration steps.** A dependent step waits for the
33
- predecessor's *integration* subtask, never for "worker finished". Error,
34
- no result, or cancellation of a required predecessor is not satisfaction;
35
- an archived or skipped dependency without proof of the required result is
36
- not satisfaction either, even if a generic task sorter displays it as ready.
37
- 3. **One active executor per worktree.** Roles (planner → worker → reviewer →
38
- integrator) work sequentially in the same task worktree. The next role
39
- starts only after the previous assignment finished and handed over. A busy
40
- worktree gets no second executor; missing data or a lost session means
41
- investigate or resume, never launch a second agent.
42
- 4. **Implementation completion does not close the managing task.** While
43
- review, integration, or another required step remains, the managing task
44
- stays open.
45
- 5. **Reports are matched, then recorded, then acted on.** Match the message ID
46
- and task/assignment/step references against the current order before
47
- accepting a report. Record the result and the processed report ID in the
48
- existing managing task (no separate dedup table). A repeated report checks
49
- the recorded result and the existing assignment instead of re-running a
50
- role. A non-matching report or an escalation stays open for clarification
51
- and is never treated as success.
52
-
53
- ## Instructions
54
-
55
- Run the loaded workflow as the source of truth and execute it end-to-end
56
- instead of only summarizing it.
57
-
58
- ### 1) Ensure the private list
59
-
60
- Prepare (once) and re-verify on resume:
61
-
62
- ```bash
63
- mkdir -p .ace-tasks/_overseer
64
- git check-ignore .ace-tasks/_overseer && echo ignored
65
- git status --short -- .ace-tasks/_overseer # must print nothing
66
- ace-task list --in _overseer
67
- ```
68
-
69
- Folder creation and the `.gitignore` entry (`/.ace-tasks/_overseer/`) belong
70
- to project configuration; the installer consumes this in L8. If the folder is
71
- missing, create it before any `--in _overseer` call. If git shows files there
72
- as trackable, stop and fix the ignore rule -- do not commit overseer state.
73
-
74
- ### 2) Record received work as a managing task
75
-
76
- For each received scope of work, create an ordinary managing task and its
77
- lifecycle subtasks with explicit dependencies and a reference to the project
78
- task:
79
-
80
- ```bash
81
- ace-task create "Manage: <scope>" --in _overseer --tags queue
82
- ace-task create "Prepare <scope>" --child-of <manager-ref>
83
- ace-task update <prep-ref> --set role=planner
84
- ace-task create "Implement <scope>" --child-of <manager-ref>
85
- ace-task create "Review <scope>" --child-of <manager-ref>
86
- ace-task create "Integrate <scope>" --child-of <manager-ref>
87
- ace-task update <manager-ref> --set project_task=<project-task-ref>
88
- ace-task update <impl-ref> --set dependencies=<prep-ref>
89
- ace-task update <review-ref> --set dependencies=<impl-ref>
90
- ace-task update <integrate-ref> --set dependencies=<review-ref>
91
- ```
92
-
93
- Rules:
94
-
95
- - Add worktree/assignment references only after they really exist (the
96
- planner prepares them); never fabricate references ahead of preparation.
97
- Record them on the step that owns them, e.g.
98
- `ace-task update <step-ref> --set assignment=<actual-id> --set role=<allocated-role> --set worktree=<actual-path>`.
99
- Read back the fields; notes alone do not bind reports. `role=planner` denotes
100
- only the allocation that prepares assignments, never bootstrap-worker or
101
- confirmation of a running project. Resolve note folders from `ace-task show`;
102
- never guess their title-derived paths.
103
-
104
- - Cross-task ordering goes through the integration step: a step of task B
105
- that requires A's merge depends on A's *integrate* subtask, not on A's
106
- implement subtask:
107
- `ace-task update <B-step-ref> --set dependencies=<A-integrate-ref>`.
108
-
109
- - Read the tree back with `ace-task show <manager-ref>` and
110
- `ace-task list --in _overseer` after every structural change. The root view
111
- (`ace-task list`) must stay free of overseer tasks.
112
-
113
- ### 3) Start only unblocked steps
114
-
115
- Before starting any step:
116
-
117
- 1. Resolve its `dependencies` refs and inspect each predecessor's *status
118
- and evidence*: the required result must be produced by the predecessor's
119
- integration (merge) step, verified by tests/review records -- not merely
120
- announced.
121
- 2. Treat error, missing result, cancelled, skipped, or archived-without-proof
122
- predecessors as unsatisfied.
123
- 3. Check the step's worktree is free: the previous assignment on it must be
124
- finished and the current state read back from the task tree, worktree, and
125
- assignment files. Unknown state is not a free resource and never permits
126
- overwriting changes.
127
- 4. Only then dispatch the role for that step and mark it
128
- `ace-task update <step-ref> --set status=progress`.
129
-
130
- The start decision belongs to the overseer; this is reading dependencies and
131
- real state, not a new runtime scheduler. `ace-overseer work-on` enforces the
132
- same gate mechanically: it refuses to provision a worktree or assignment for
133
- a step whose recorded dependencies are not satisfied (predecessor status
134
- `done` = accepted and integrated), and reports the blocking reasons.
135
-
136
- ### 4) Hand the worktree to the next role
137
-
138
- Worker finishes → reviewer starts → integrator starts, in the same worktree:
139
-
140
- - The previous assignment's completion (and handover of any fixes) ends the
141
- previous allocation; only then does the next role begin there.
142
-
143
- - `ace-overseer handoff --task <project-task-ref>` enforces this gate
144
- mechanically in the prepared worktree: it reads the role-sequence
145
- assignments (ace-assign state), the per-leg start configs, and the
146
- worktree's executor truth, and hands the worktree to the next role ONLY
147
- when every earlier leg reached assignment state `completed` and no
148
- executor holds the worktree. A busy, in-flight, failed, or unreadable
149
- predecessor refuses with reasons; unknown state is never a free resource.
150
- With `--runtime herdr`, success starts the actual next executor from the
151
- existing start config and records its native identity. The accepted report
152
- retires the preceding process before this handoff. `--dry-run` checks without
153
- effects; a printed brief or dry-run result is not proof of a running agent.
154
-
155
- - Two different tasks may run in parallel in two different worktrees; one
156
- worktree never has two active executors.
157
-
158
- - Reviewer fixes belong to the reviewer's own assignment and stay inside its
159
- bounds; they do not rewrite the parent goal or the private-tree
160
- dependencies.
161
-
162
- ### 5) Process reports and continue
163
-
164
- When a report arrives (ace-hitl event or message):
165
-
166
- 1. Match its message ID plus task/assignment/step references to the current
167
- order. A report that fits no open allocation is kept for clarification,
168
- not counted as success.
169
- 2. Persist the exact accepted event ID and result on the owning step:
170
- `ace-task update <step-ref> --set processed_report=<event-id> --set report_result=<result>`.
171
- Add evidence notes in the folder returned by `ace-task show`, then update statuses:
172
- `ace-task update <step-ref> --set status=done` (or keep open / escalate).
173
- 3. For success: end the current allocation, then continue with the next
174
- unblocked step per rule 3. For a repeated report: check the recorded
175
- result and the existing allocation; do not start the next step twice.
176
- For error/escalation: keep the step open, escalate via ace-hitl.
177
- 4. After an interruption between recording a result and the next allocation,
178
- resume by re-reading the task tree and the real worktree/assignment state.
179
-
180
- `ace-overseer process-reports --owner <configured-recipient>` uses the same
181
- recipient as your eyes observer (default `overseer`). Set `--scope current|all`
182
- to match an explicit observation scope; without it, HITL uses all linked
183
- worktrees in the canonical checkout and current scope inside a task worktree.
184
- Never process another
185
- coordinator's reports; use the address configured for this commission. It
186
- executes rules 1-3 mechanically: it matches
187
- each incoming event (assignment recorded on a step, or the managing task's
188
- project_task with exactly one explicitly allocated `role=planner` non-terminal
189
- step having no assignment). Task and any supplied role must agree; an event
190
- without an ID is refused. Unassigned readiness never closes worker, verifier,
191
- integration or confirm-start allocations. Before recording assigned success, the processor reads the actual coworker role
192
- allocation and ace-assign state: exact task/assignment/role, a completed nonempty
193
- plan, and every step done are required in dry-run and apply. Unavailable owner
194
- state refuses acceptance. It records the outcome and
195
- the processed report ID on the step through the ordinary ace-task update
196
- surface, and continues with the next unblocked step through the existing
197
- gates — `ace-overseer handoff` for the next role when the family records a
198
- worktree, otherwise the `work-on` dependency gate. A repeated delivery is
199
- answered from the recorded `processed_report` and re-runs nothing; an error
200
- report or question never advances a step; a report matching no open
201
- allocation stays for clarification. A `role=confirm-start` continuation remains
202
- a coordinator operation; no generic worker is dispatched and no managing task
203
- closes until first-turn and observation evidence is accepted. `--dry-run`
204
- interprets without effects.
205
-
206
- ### 6) Close
207
-
208
- A managing task closes only when every required subtask (preparation,
209
- implementation, review, integration, and any project-required step) is
210
- terminal with verified results. Implementation completion alone never closes
211
- it. Closing a step family updates the owning project task with the results.
212
-
213
- ## Worked example
214
-
215
- Two features, B needing A's merge:
216
-
217
- ```text
218
- 8xh.t.grm Manage: deliver feature A (project_task: <A-ref>)
219
- 8xh.t.grm.0 Prepare A (done)
220
- 8xh.t.grm.1 Implement A (done, depends: grm.0)
221
- 8xh.t.grm.2 Review A (done, depends: grm.1)
222
- 8xh.t.grm.3 Integrate A (done, depends: grm.2)
223
- 8xh.t.grn Manage: deliver feature B (project_task: <B-ref>)
224
- 8xh.t.grn.0 Implement B (depends: 8xh.t.grm.3) <-- integration, not impl
225
- 8xh.t.grn.1 Integrate B (depends: grn.0)
226
- ```
227
-
228
- While `grm.1` is done but `grm.3` is not, `grn.0` stays blocked. After
229
- `grm.3` is confirmed done (merge verified), `grn.0` becomes startable. While
230
- `grm.2`/`grm.3` remain open, `8xh.t.grm` itself is not closed.
12
+ # Private coordination tasks
13
+
14
+ Use `.ace-tasks/_overseer/` through ace-task, never another queue or journal.
15
+ Keep it Git-ignored. An executable commission is a separate ordinary task. Create
16
+ the private manager and commission text, then use `work-on --manager` to bind them.
17
+ The product writes role children and references. Do not copy allocation fields.
18
+ Use explicit role sequences and dependencies; a predecessor unlocks work only after
19
+ its required integration is accepted. Reuse existing tasks on restart.
20
+
21
+ `ace_eyes` action `process-reports` owns the receipt/cleanup/continuation/ack order.
22
+ For terminal inspection `ace-overseer process-reports --json` returns the same receipts
23
+ without acknowledging the observer. Questions, mismatches and failed continuation
24
+ remain pending. No report receipt substitutes for tests, independent review or merge.
25
+ Managers remain private after completion. Bootstrap's confirm-start condition requires
26
+ first-turn and eyes evidence; pending decisions and missing integration keep work open.
27
+
28
+ ## Decision outside the mandate
29
+
30
+ 1. Reuse the decision's existing private manager and HITL case. If absent, create the
31
+ manager and `ace-hitl create --kind decision --to captain`; record `hitl_case` on
32
+ the manager. Creation is local publication, not external delivery.
33
+ 2. Create an ordinary advisor commission with `role: second-captain` and that same
34
+ `hitl_case`, the precise choices and references. Delegate with
35
+ `ace-overseer work-on --task <advisor-task> --manager <decision-manager> --runtime herdr`.
36
+ Keep a separate direct decision child open until the human answer is applied.
37
+ End the turn and continue unrelated work.
38
+ 3. Receive the advisor report through `ace_eyes process-reports`. Read the same case.
39
+ The Captain reads it directly on the VM with `ace-hitl list` / `ace-hitl show CASE`
40
+ and answers with `ace-hitl reply CASE --stdin`. Do not fabricate a reply or claim
41
+ that local publication was delivered by an external adapter. If the advisor fails,
42
+ record the missing recommendation and expose the same question; do not retry forever.
43
+ A human answer wins over a late recommendation.
44
+ 4. Apply the actual decision through its effect owner. Record `ace-hitl apply CASE
45
+ --ref <verified-effect-reference>`. Prepare the factual lesson (by, relation,
46
+ takeaway, optional refs) when a suggestion exists; close with
47
+ `ace-hitl close CASE --lesson-file <path>`. The owner writes lesson and closure
48
+ atomically. Never invent a lesson or reopen a closed case.
49
+ 5. Accept the decision child only after the effect is proven. Resume dependants;
50
+ unrelated commissions do not wait. Secrets and OTP bypass Second Captain entirely.