feat(harness): registry-grounded system prompt with coder routing and SDK-doc gate#245
Conversation
… SDK-doc gate Extend the turn-orchestrator identity prompt (all four provider variants) from engine-only discovery to the full capability ladder: registered function -> install from the public registry -> author a worker. - Registry flow: search directory::registry::workers::list/info, announce, install via worker::add, re-verify via prefix list; bootstrap or degrade when the directory worker is absent. Both catalogue calls are documented in-prompt and exempt from the fetch-contract-first rule. - Worked example grounded in the live registry: the published "email" worker (email::send) replaces the unpublished "resend"; the example now models the worker::add contract fetch and a plain announce line. - Coder routing: create/edit/move/delete code files go through coder::*, including coder::move for renames (never delete-then-recreate); the enumeration is non-exhaustive with the prefix list as inventory, and the shell::fs boundary is drawn for non-code browsing. - SDK-doc gate: fetch the per-language iii.dev SDK reference before the first line of worker code, scoped to new workers/registrations, with llms.txt recovery, graceful degradation, and the ordinary-call guard. - web::fetch mandate extended to localhost/just-bound triggers with an explicit success criterion (read ok/status/body), no curl exception. - Tests: 146 pins incl. a directory::* allowlist invariant (registry catalogue only), coder::move, capability-ladder ordering, and the email example (mutation-tested as load-bearing). - Permissions: allow the read-only ids the prompt mandates (registry catalogue reads, read-only coder surface, web::fetch); worker::add and mutating coder ops stay approval-gated. Architecture/worker docs updated to the engine-grounded framing.
skill-check — worker0 verified, 15 skipped (no docs/).
Four for four. Nicely done. |
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThis PR shifts the iii agent turn-orchestrator from a self-contained to an "engine-grounded" system: agents discover capabilities from the live engine and public registry, route code operations through a specialized ChangesEngine-grounded agent system with registry discovery and specialized worker routing
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Extends the turn-orchestrator identity prompt (all four provider variants: anthropic, gpt, kimi, default) from engine-only discovery to the full capability ladder: registered function → install from the public registry → author a worker. Hardened by a 5-dimension adversarially-verified review of the draft; all confirmed findings are fixed in this PR.
Prompt changes (byte-equivalent semantics across all 4 variants)
directory::registry::workers::list/info→ announce →worker::add { source: { kind: "registry", name } }→ re-verify viaengine::functions::list { prefix }. Bootstraps a missing directory worker (iii-directory) and degrades gracefully when the registry is unreachable. Both catalogue calls are documented in-prompt and exempt from the fetch-contract-first rule (resolving a contradiction with RULE 2).emailworker (email::send); the previous draft modeledresend, whichGET /w?search=resendreturns empty for today. The example now also models fetching theworker::addcontract and announcing the install as a plain assistant line.coder::*, includingcoder::movefor renames (never delete-then-recreate). The function list reads as non-exhaustive with the prefix list as the inventory, there is a post-install re-check, and theshell::fsboundary is drawn for non-code browsing.llms.txtrecovery on fetch failure, graceful degradation when docs are unreachable, and the never-fetch-docs-for-an-ordinary-call guard.web::fetch(no curl exception), with an explicit success criterion: read the envelope (ok,status, body matches the handler).Tests (142 → 146)
directory::*allowlist invariant replaces the substring bans: everydirectory::id in the prompt must start withdirectory::registry::workers::(also blocks the legacydirectory::engine::*doc proxies).coder::move, non-exhaustive inventory + no delete-then-recreate, ordinary-call guard, degradation,.mdtrick, engine-sdk fallback, llms.txt recovery, capability-ladder ordering (registry → coder → authoring), and the email example (mutation-tested: deleting the block fails the suite).Permissions + docs
iii-permissions.yaml: allow the read-only ids the prompt now mandates — registry catalogue reads, read-onlycoder::*surface, andweb::fetch(size/timeout caps + server-side SSRF protection; load-bearing for the SDK gate and trigger verification).worker::addand mutatingcoder::*ops stay approval-gated.harness/docs/architecture.mdallow-rule enumeration updated to match; stale "engine-only / discovers everything from the live engine" framing replaced with "engine-grounded" inturn-orchestrator.mdand thesystem-prompt.tsJSDoc.Test plan
pnpm vitest run tests— 1371/1371 pass (122 files), including the policy suite against the edited yamlnpx tsc --noEmitclean;biome checkclean on touched files<example>block byte-identical across all 4 variantsemailworker verified published withemail::send;resendconfirmed absentweb::fetch(not curl) for trigger verification and fetches the SDK reference before authoringSummary by CodeRabbit
Release Notes
Documentation
New Features
Tests
Chores