summaryrefslogtreecommitdiffhomepage
path: root/ORCHESTRATOR.md
AgeCommit message (Collapse)Author
5 daysdocs: update paths from arch-rewrite to dispatch-backendAdam Malczewski
After consolidating to the dev branch and renaming the worktree, update all path references in ORCHESTRATOR.md and .skills/ORCHESTRATOR.md.
5 daysfix(kernel+tool-shell): abort hanging tool calls without bricking the ↵Adam Malczewski
conversation kernel: executeToolCall now races tool.execute against the abort signal via Promise.race; on abort resolves (not rejects) with an "Aborted" result so the step completes normally → finishReason "aborted" → turn seals cleanly (done event) → finally clears activeTurns → conversation freed, next message accepted. run-turn strips tool-call chunks from the assistant message on abort (keeps text/thinking) and omits tool-result messages to avoid persisting dangling tool calls that would 400 the provider next turn. tool-shell: realSpawn spawns detached (own process group); on abort AND timeout kills the entire group (process.kill(-pgid, SIGKILL)) and resolves immediately — no child.on("close") dependency, so a grandchild holding the pipes can't stall the spawn promise or leak. Also: ORCHESTRATOR.md migrated to dispatch CLI summon mechanism; .skills summary; bin/sync-env PATH injection; frontend handoff docs. 1453 vitest pass · tsc -b EXIT 0 · biome clean.
2026-06-12docs(harness): Task-tool summon mechanism rework (briefs, ORCHESTRATOR, ↵Adam Malczewski
HANDOFF) + .skills
2026-06-07docs(harness): biome-clean rule + parallel-wave orchestrationAdam Malczewski
- add .dispatch/rules/biome-clean.md (0 warnings/0 infos; no `!`/useLiteralKeys), wired into the every-agent scoping map + canonical invocation - package-agent: note biome zero-tolerance; verify line clarifies 0 warnings AND 0 infos - ORCHESTRATOR: document parallel-execution waves (2a) + agent-failure recovery patterns (5a) + concurrency caveats
2026-06-06docs(harness): author extension-logging rule (close the pending logging gap)Adam Malczewski
The .dispatch/rules/extension-logging.md rule was '(pending)' in ORCHESTRATOR §3 for the entire life of the observability substrate, so every extension summon was built without logging/self-redaction guidance — leaving most extensions silent (a coverage audit found conversation-store, transport-http, credential-store, tool-read-file, storage-sqlite, auth-apikey, surface-* all with zero logger refs). - Author .dispatch/rules/extension-logging.md (tribal-knowledge only, P6/P7): self-redact your own secrets in your own code (no shared helper; §6 tiers), use injected host.logger/ctx.log, flat scalar attrs, no token-delta logging, one-way logs, edge verbatim capture. - Wire it into ORCHESTRATOR §3 as 'every extension' — include on EVERY extension summon; remove the (pending) note. - Record the coverage audit + remaining instrumentation debt (#1 reconcile.repair span in conversation-store, #2 transport-edge logging) in tasks.md. Future extensions now get logging by construction.
2026-06-06feat(frontend,wire): surface system (FE slice 1) + @dispatch/wire types-only ↵Adam Malczewski
split (B2) FE slice 1 — backend-declared, frontend-agnostic surface system (verified live): new types-only @dispatch/ui-contract (SurfaceSpec / field kinds / region / ActionRef / catalog), surface-registry (typed service handle), transport-ws (Bun WS :24205, path-agnostic upgrade), surface-loaded-extensions (first real surface); kernel HostAPI.getExtensions; host-bin wiring; bin/up. Harness: retire AGENTS 'backend only', ORCHESTRATOR §3/§7/§8, frontend-design.md locked. B2 — wire-types split (chat-slice prerequisite): new types-only @dispatch/wire single-sources the wire ABI (AgentEvent + 11 variants; conversation model Chunk/ChatMessage/Role/TurnId/StepId + 6 chunk variants; Usage) with zero @dispatch/* deps. @dispatch/kernel re-exports via shims so its public surface is byte-identical (zero consumer blast radius). transport-contract re-exports AgentEvent from @dispatch/wire and drops its @dispatch/kernel dependency, so HTTP clients (the web frontend) consume the wire without the kernel runtime. tsc -b + biome clean; 460 vitest + 77 bun pass.
2026-06-06docs: complete repo geography in ORCHESTRATOR.md §7 — add .dispatch/ ↵Adam Malczewski
briefs + all notes/ with descriptions
2026-06-06refactor(orchestrator): standardized owner-agent briefs (package + extension)Adam Malczewski
- .dispatch/package-agent.md: base brief for every package owner (dir-scoped ownership, visibility, engineering standard, isolated verify, report). - .dispatch/extension-agent.md: thin supplement (manifest, activate/host, tighter quarantine); references the package brief inline (injected), never instructs the agent to read a file. - ORCHESTRATOR.md: §2 summon now concatenates briefs + scoped rules + TASK; §3 slimmed so each prompts/<unit>.md is JUST the TASK block.
2026-06-06revert: undo parallel owner-agent brief refactor (dd249ed, bf0c4d1)Adam Malczewski
Superseded by the package/extension owner-agent briefs iterated with the user. Reverts only the 3 markdown files (.dispatch/extension-agent.md, .dispatch/package-agent.md, ORCHESTRATOR.md); no code was involved.
2026-06-06fix: remove placeholder from skill files — orchestrator appends TASK as a ↵Adam Malczewski
separate message
2026-06-06refactor(orchestrator): standardized owner-agent briefs — package-agent.md ↵Adam Malczewski
+ extension-agent.md Rework ORCHESTRATOR §2 (summon) and §3 (TASK block): prompts are now assembled from standardized briefs (.dispatch/package-agent.md + .dispatch/extension-agent.md for extensions) + cat'd scoped .dispatch/rules/* + a TASK block the orchestrator fills per summon. The old per-unit prompts/<unit>.md workflow is retired. The agent never reads files — everything is inlined by the orchestrator.
2026-06-05feat(cli): one-shot terminal client (models, chat, ↵Adam Malczewski
--text/--file/--cwd/--conversation) HTTP client of transport-contract; pure-core arg/render/ndjson + injected fetch/fs shell. Docs: GLOSSARY (credential/key/model name/model catalog), tasks.md milestone, ORCHESTRATOR geography.
2026-06-05docs(orchestrator): live-validation process cleanup — the [x] bracket ↵Adam Malczewski
trick (pkill self-match scar) A plain pkill -f 'host-bin/src/main.ts' matches its own command line and kills the parent shell (no output -> looks like a wedged/timed-out session). Use the [h]ost-bin bracket trick in ps/pgrep/pkill, and always clean up the backgrounded app + spawned collector after each live run (leaked processes inflated counts and made a correct supervisor look buggy).
2026-06-05docs(orchestrator): tighten visibility — edit only ↵Adam Malczewski
contracts/build-config/docs, delegate all implementation Remove the 'conflict exception' for reading implementation: the orchestrator diagnoses from typecheck/test output + lsp references on contracts + agent reports, then summons the owning agent to fix. Enumerates what the orchestrator MAY edit directly (contracts, build wiring/config, harness docs) vs. delegate (all executable .ts incl. tests + composition roots); roadblocks surface to the user.
2026-06-05feat(observability): Phase A logging substrate — Logger/Span ABI + journal ↵Adam Malczewski
sink (250 tests) Structured, agent-first logging captured durably to an append-only journal file. Kernel (contracts/logging.ts): leveled/attributed Logger + Span, auto-scoped per extension (host stamps manifest.id, unspoofable), incremental span records (open/close) for crash-reconstructable traces, injected LogSink (pure record-builder). ctx.log on ToolContract; runTurn opens turn/step/tool-call spans and captures the verbatim pre-mutation prompt (the 'before') on the step span. journal-sink (new package, bootstrap dep — not an extension): LogSink appending NDJSON to a rotating journal; pure serialize + thin fs edge; fail-safe drop, never blocks a turn. host-bin injects it via HostDeps; session-orchestrator threads host.logger (childed per turn) into runTurn. Redaction is per-extension self-redaction (no shared helper — isolation over DRY). The out-of-process collector + SQLite store + the verbatim 'after' provider.request capture are Phase B / next (notes/observability-design.md §10/§11). Verified: tsc -b clean, 250 tests (218→+32), biome clean. Live boot: a turn's journal holds host logs + turn/step spans (open+close) + the prompt:before record with the verbatim messages array. Harness: ORCHESTRATOR §3 rule-scoping map; .dispatch/rules/isolation-over-dry.md; notes/observability-design.md (design D1–D10 + Phase A/B plan).
2026-06-05docs(orchestrator): mimo-v2.5-pro model; mandate logging summon output to ↵Adam Malczewski
file; restrict implementation-file reading to conflicts only (orchestrator + subagents)
2026-06-05chore(cleanup): align glossary (conversation/conversationId + drift note), ↵Adam Malczewski
ORCHESTRATOR↔plan §5/§3.6, add HANDOFF.md, host-bin reads BACKEND_PORT (24203)
2026-06-05docs: ORCHESTRATOR.md — complete orchestrator workflow (summon via ↵Adam Malczewski
opencode, prompt recipe, verification, error/contract resolution, invariants)