Compress Skywalker classification and anti-cascade sections - #965
Conversation
Audit (builder) — HOLD honored, comment-only, no code changesNo merge from this review — the hold stands. No code touched. Compression verified, behavior-preserving. Classification block 27→17 lines (~-35%); anti-cascade trimmed by roughly a third with tighter COMMUNICATION-first wording; net file 211→198 lines. The cuts are wording, not behavior — with the deliberate exceptions below, each covered by a pin. Pins hold. The follow-up commit restores the two load-bearing guardrails the compress dropped: the plan gate (“builder blocks if the plan is still missing”) and the permission-asks/long-clock anti-dig line, each with a test pin. The new report-envelope header test (Summary / Findings / Blockers / Paths) is a good pin against future compressions silently dropping the worker contract. Workflow-list ownership split with CL-7654. The removed 5-step workflow list (interview → explorer → greybeard → counsel → track) no longer lives in the prompt; that sequencing now belongs to CL-7654. Acceptable, but it is a real dependency: if CL-7654 slips, the prompt alone no longer teaches the full chain. Keep the link explicit at merge. Per-stall cap retained via “MAY spawn one successor”. Failed-wait / incomplete-report keeps one successor with a changed brief — one per stall, still fail-closed against re-dispatching the same brief, and now correctly scoped to IMPLEMENTATION handoffs (“do not search the repo as a substitute for that failed IMPLEMENTATION handoff”). No unbounded retry ladder introduced. Diff read: |
94fa6db to
86714ec
Compare
|
Hold lifted per operator — the Rebased onto Verification on the rebased tip (
No merge — leaving it for the review fleet. |
Implements CL-7665: compress the
Skywalker classification opening and the anti-cascade section in
src/agent/directors/skywalker/package.ts(SKYWALKER_SECTIONSonly).What changed
PRIMARY INTENT): one short paragraph — DIYtiny edits, Delegate substantial work to specialists, answer questions
yourself (COMMUNICATION first, never a fleet). Drops the "mandatory
workflow before responding" framing.
restructured around the two lanes (tiny → DIY, substantial → spawn with
counsel/
/planplan in the brief) plus docs-routing and the explicitplan-optional carve-out for tiny parent-DIY edits.
changed brief, no successor on cancel, interrupt-is-resume. Fixes:
COMMUNICATION may use parent read/search (explorer only on a single
unknown path, no numeric cap); the "do not search as substitute" rule is
scoped to failed-worker IMPLEMENTATION follow-up.
Untouched:
spawnGraph,GUIDELINE_SUB_BLOCKS, and all other sections(sibling CL-7654 owns nearby sections; second-to-land rebases).
Token counts (chars / words / ~tokens at chars/4)
systemPrompttotalAnti-cascade shrinks less because the mandated fixes add scoping words; the
section is net-negative while carrying the new COMMUNICATION and
IMPLEMENTATION-handoff qualifications.
Verification
bun test src/agent/directors/skywalker/ src/prompts.test.ts src/agent/prompt-sizes.test.ts— pass (67 + 292 across director suites; prompt-quality markers and envelope assertions hold)bun run check(lint + typecheck + build + guarded suite) — exit 0: 7132 pass, 0 fail, 25731 expectssrc/prompts.test.ts"agent identity"(
buildChatRolemust contain "Delegate"); the compressed opening now keeps"Delegate substantial work to specialists". No test changes for that — the
existing pin stands.
Eval plan (no live spend in-branch)
Prompt-behavior confirmation for the parent, per
evals/capability/README.mdconfirmation gate (5 repeats, frozen baseline
evals/capability/results/baseline-0286.json):Gates: no per-cell pass-rate regression vs baseline;
turnsandmanage_tasksmedians not rising; both gpt and kimi cells green. Refreeze thebaseline only if a behavior change is accepted.