(MOT-4187) feat(iii-directory): pre-generate skills-index guidance hook - #574
(MOT-4187) feat(iii-directory): pre-generate skills-index guidance hook#574rohitg00 wants to merge 4 commits into
Conversation
Agents discover functions live but nothing tells them the skills layer exists. Bind a harness::hook::pre-generate trigger (fail_open, mandatory: pre_generate defaults fail-closed) that appends a short pointer to directory::skills::index to the system prompt while this worker is connected. Pointer only, not content: the index body costs context only when an agent actually calls the function. No-op when the base prompt is empty or already mentions the index. Mirrors the fp worker's guidance hook, including the registry publish-gate schema test.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 7 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 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 |
skill-check — worker0 verified, 48 skipped (no docs/).
Four for four. Nicely done. |
Problem
Harness agents discover functions live (
engine::functions::list/info) but nothing tells them the skills layer exists.directory::skills::indexrenders a token-light per-worker map, yet an agent only reaches for it by luck: asked "what can each connected worker do", a test agent dumped the raw functions list and answered from ids alone.Change
New
src/guidance.rs, mirroring the fp worker's guidance hook: registerdirectory::inject-guidanceand bind it toharness::hook::pre-generatewithon_error: fail_open(mandatory: pre_generate defaults fail-closed, and a missing pointer must never block a turn). While iii-directory is connected andinject_guidance: trueis set, a short pointer todirectory::skills::indexis appended to the system prompt.The hook is gated behind a new
inject_guidanceconfig field, defaultfalse: iii-directory sits in the default harness stack (including the harness integration e2e), and mutating every deployment's prompts is an operator decision, not a side effect of installing the worker. The first push had it always-on and the harness e2e correctly failed on the changed prompts; default-off keeps a stock deployment byte-identical.Pointer, not content: roughly 120 tokens per generation, and the index body (~1k tokens) is paid only when the agent actually calls the function. No-op when the base prompt is empty (schema-drift safety, preserves the harness's assembled prompt) or when it already mentions the index function.
Proven on a live rig: with the pointer injected, the same question produced exactly one call,
directory::skills::index, and a grounded per-worker answer.Tests
Five unit tests: no-op on empty base, no-op on already-covered base, pointer append, empty-mutations wire shape, and the registry publish-gate schema test (
response_schema_passes_the_publish_typed_gate) that fp and web carry.cargo fmt --check,clippy --all-targets --all-features -D warnings,cargo test --lib(254) pass.Refs MOT-4187