Skip to content

Public ultracode: deterministic multi-agent workflow engine (+ phase-8 receipts/verifier) - #1

Merged
trollbot2012 merged 2 commits into
mainfrom
phase8-receipts-verifier
Jul 8, 2026
Merged

trollbot2012 merged 2 commits into
mainfrom
phase8-receipts-verifier

Conversation

@trollbot2012

Copy link
Copy Markdown
Owner

What

Adds ultracode (agent_ultra.ultracode) — a deterministic multi-agent workflow engine proving the pattern fan-out -> journal -> resume -> receipt -> status — plus the phase-8 receipts-bus/verifier work already on this branch.

ultracode

  • Workflow scripts: META + async def run(wf) with wf.agent (one model call, optional JSON-Schema validation + feedback retries), wf.parallel (barrier), wf.pipeline (no barrier), hard wf.budget ceilings (HOLD on exhaustion), broker-gated wf.run_check (CRITIC mode).
  • Journal + resume: completed calls replay from the journal; unchanged resume = 0 model calls.
  • Checksummed receipt: verify_receipt() rejects hand-edited receipts.
  • Terminal-safe status card: plain ASCII unless stdout is a proven interactive UTF terminal; rendering can never crash a run.
  • CLI: agent-ultra ultracode run|list|status|resume with --mock (offline, keyless).
  • Bundled examples: smoke, review (finders -> skeptic votes -> synthesis).
  • doctor + demo now cover it; friend-ready guide at docs/ultracode.md.

Proof (local, from a clean home)

  • leak gate: PASS (no private strings)
  • pytest: 140 passed
  • doctor: 13 pass, 0 warn, 0 fail
  • demo: ends DEMO PASSED
  • mock run: COMPLETE; resume: calls_spent: 0

🤖 Generated with Claude Code

justkidding2047 and others added 2 commits July 7, 2026 19:27
…fier

Adds two clean-room modules and a release-safety gate.

receipts_bus: authenticated receipt index over SQLite (WAL, default
autocheckpoint). Two hashes over the canonical body — receipt_sha256
(integrity) and a keyed receipt_hmac (authenticity), kept separate so a
sha256-valid but unsigned envelope is authentic=False and rejected in
enforce mode. Closed kind/actor/verdict enums validated at write time.
Failed reads raise BusUnavailable, never []. resolve/binds implement the
claim-binding rule (cited / verify-command with scope+freshness / task_ref;
command/manual/repair/route_health never complete; verifier binds only on
claim_sha256 match; weak evidence -> ledger-weak). Hash-chained gate_audit
with append/verify/get. CLI: receipts list|show|verify|why|attest.

verifier: refute-first verification with injected run_check and judge (no
network, no host commands by default). Engine re-check wins when a verify
command is declared; otherwise a refute-first judge that defaults to refuted
on insufficient evidence; neither channel -> refuted. Emits a kind=verifier
receipt stamped with claim_sha256; a refuted verdict is non-acceptable so it
cannot satisfy a gate. Verifier wraps it with an escalation budget
(per-session/per-window caps + dedup).

leakgate: scans the whole tree + commit message against a base64 denylist
decoded at runtime (tests/private_strings.txt), case-insensitive except a
whole-word case-sensitive collision token, path-separator-normalised, no
whitelist. Exposed as agent-ultra-leakgate and wired into CI.

Also renames the optional memory adapter to external_memory
(ExternalMemoryHooks) and reworks the worker-layer leakage test to consume
the shared base64 denylist, removing host-specific identifiers from the tree.

Offline test suites for all three (FakeClient/injected fakes). doctor and
demo exercise both new modules. Full suite: 126 passed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Port the multi-agent workflow pattern into the public kit as `ultracode`:
scripts (META + async run(wf)) fan work across bounded agents via
wf.agent/parallel/pipeline under hard budgets, with a replayable journal,
per-agent artifacts, a checksummed receipt, and a terminal-safe status card.

- engine reuses the kit's RoutePool / OpenAIChatClient / MockUltracodeClient
  / CommandBroker; stdlib core, offline keyless --mock route
- CLI: `agent-ultra ultracode run|list|status|resume`
- bundled examples: smoke (fan-out + pipeline), review (finders -> skeptic
  votes -> synthesis)
- resume replays completed calls from the journal (0 model calls unchanged)
- receipt checksum: a hand-edited receipt fails verify_receipt()
- status card is plain ASCII unless stdout is a proven interactive UTF
  terminal; rendering never crashes the run
- doctor + demo now cover ultracode (demo ends "DEMO PASSED")
- docs/ultracode.md: one-command install, doctor, demo, first run,
  troubleshooting
- 14 offline tests; full suite 140 passed; leak gate clean

Proves the pattern: multi-agent fan-out -> journal -> resume -> receipt
-> status.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@trollbot2012
trollbot2012 merged commit 3159ec4 into main Jul 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants