Import CoBuilder orchestration-services pattern (ADR-0009)#50
Merged
Conversation
Adds non-persona orchestration services so Oscar delegates repeatable administrative work (wrap, handoff/priority compaction, teardown, audits) to faster/cheaper models via bounded, write-audited service packets, instead of spending lead-model context. Realizes the sub-agents/services clause already in ADR-0008, so Oz is unchanged. - lib/services.mjs engine: build/validate/execute packet + deterministic git write-audit (blocks out-of-scope writes even on a claimed PASS) - 2 hand-written contracts (declaration + packet) via existing contracts.mjs (no AJV); 11 service declarations, paths scrubbed to CoCoder layout - 5 CLI commands; separate cursor-agent-service headless adapter (interactive cursor-agent untouched); debugger guidance + session-wrap fragment bullet - ADR-0009, v0.5-orchestration-services priority, PORT-NOTES scrub log Tests: core 346/346, oz-daemon 8/8, oz-dashboard 10/10. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… 1-3) Make v0.5-orchestration-services launch-ready on this branch so a fresh oscar-lead run picks up the full plan: - README "Next Session Start Here": Phase 1 (land PR #50 — Bob fixes wrap-execution requiredChecks, Oscar rebases onto main + squash-merges), Phase 2 (reconcile PR #51), Phase 3 (adoption + v0.1 carryover/ADR-0011 + archive v0.1-foundation + ghost/dangling guard). Route, broadened-Bob boundary, stop conditions, required tests, founder decisions recorded. - Sequencing DECIDED: v0.5 runs before v0.4 (founder 2026-05-27). - PRIORITIES.md: promote v0.5 to Active with Phase-1 next-action + parser block updated (launch from orchestration-services-import). Context: PR #50 was orphaned (engine + ADR-0009 + this priority never merged to main), leaving a ghost v0.5 row in the route + a dangling ADR-0009 ref. Phase 1 fixes that. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…v0.5 launchable Founder-authorized one-time config convergence (the orphaned-PR orchestration failure). Merges current main into the PR #50 branch and adds the launch config v0.5 was missing: - wrap-execution.json: drop orchestrator-commit + finalize-run-status from requiredChecks (Oscar route-control steps, per CoBuilder prior-fix); purpose clarified (service must not commit/finalize/supersede). - routes/oscar-lead.json: writePolicy one-writer -> bounded-writers; add v0.4 + v0.5 to supportedPriorityOwners (main code already honors bounded-writers — identical to oz-control-plane-design). - priority-boundaries/v0.5-orchestration-services-oscar-lead.boundary.json brought. - PRIORITIES.md: v0.5 promoted to Active (+ parser block); v0.1 row refreshed (v0.1.0 tagged; archival folded into v0.5 Phase 3). - v0.5 README: Phase 1 marked done; next = Phase 2/3. - SESSION_LOG: convergence entry. After squash-merge to main, v0.5-orchestration-services is launchable from Oz. Unrelated PrioritiesPage.tsx left unstaged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Imports CoBuilder's non-persona orchestration services pattern: the lead orchestrator (Oscar) delegates repeatable, mechanical administrative work — wrap cleanup, handoff/priority compaction, run summaries, teardown/commit-boundary/startup-context audits, result-contract repair — to faster/cheaper models via bounded, write-audited service packets, instead of spending expensive lead-model context.
This realizes the "sub-agents/services that independently select CLI + model" clause already reserved in ADR-0008 point 6 — which is why Oz needs no changes: services run externally and surface as ordinary run artifacts.
Decision record: ADR-0009.
How it works
packages/core/services/<id>.json(moderead-only | bounded-write,purpose,executionmodel guidance,allowedWriteScopes,requiredChecks). Adding a service is a new declaration, never alib/services.mjsedit.build-service-packetnarrows the declaration's scopes to exactallowedWrites, freezesdecisionAuthority: oscar-only+executionAuthority: orchestration-service+forbiddenDecisions.execute-service-packetruns the packet (defaultcursor-agent, argv array) under<runDir>/services/<packetId>/; a before/aftergit statusaudit blocks acceptance even on a claimed PASS if any write lands outsideallowedWrites. Failures return diagnosis + proposedFix to Oscar.Changes
lib/contracts.mjsvalidator — no AJV introduced (consistent with the other 12 core contracts; ADR-0004's Zod rule governspackages/schemasonly).lib/services.mjsengine; 5 CLI commands; separatecursor-agent-serviceheadless adapter (the interactivecursor-agentadapter is left untouched).v0.5-orchestration-servicespriority, PORT-NOTES scrub log, SESSION_LOG entry.Decisions taken (founder-approved)
cursor-agent-service(interactive one untouched) · artifact layout:<runDir>/services/<packetId>/(services aren't lanes).Verification
node scripts/test.mjs) · oz-daemon 8/8 · oz-dashboard 10/10validate-orchestration-servicesgreen against all 11 shipped declarations end-to-end.Follow-on (tracked in
v0.5-orchestration-services)Wire services into Oscar's live wrap/teardown flow, prove real headless
cursor-agentexecution end-to-end, confirm Oz run-detail surfacing, and founder sequencing of the slug.🤖 Generated with Claude Code