Conversation
Agent Skills environments (Grok Build, Codex, Antigravity) have no runtime `!cat`, so the transformer inlined every referenced lib into SKILL.md. That put all four reviewer BACKEND loops — copilot, github, local-agent, ollama — into each of the seven commands that run a review, ~130KB (~33K tokens) of which a run uses at most one. `/do:better-swift` reached 414KB, and the whole skill set 2.8MB. Those four are now written into the skill's own `lib/` directory and cited by a relative path with an imperative read directive; the dispatcher (`multi-reviewer-loop.md`) stays inline, since it is always on the taken path and is what names the backend to load. Skill set drops to 1.82MB (-35%); per-command 32-52% on everything that reviews. Supporting changes: - A bundled child is transformed against the parent's present-set, so it cites the dispatcher it was split from rather than re-appending it. Without this each backend file came out larger than its source and the split saved nothing at read time. - The backticked see-also form (`lib/x.md`) now resolves too, since that token denotes a real bundled file once bundling exists. It renames only — routing it through the appendix queue pulled whole docs into skills that merely name-drop them, inflating /do:config from 19KB to 91KB. - Uninstall removes the bundle directory rather than stranding it beside a deleted SKILL.md. Claude Code and OpenCode keep runtime `!cat` and never reach this path; their output is byte-identical, verified against all 21 installed command files. Content reachability verified across 8657 substantive lines: nothing dropped.
Two places in next.md state the same thing twice, which is drift risk more
than it is bulk:
- The Phase 1 pre-flight bash comment restated the whole GH_HOST derivation
("seed with $ORIGIN_HOST, then apply the snippet's fallbacks and per-host
auth precheck") that the prose immediately above the `!cat` states again.
The comment now keeps only what is unique to it — why `gh api` needs an
explicit --hostname — and defers the rest to the one authoritative spot.
- The deletions-win conflict rule appeared in Phase 5 and again in Phase 6,
and the two had already drifted: only Phase 6 carried the load-bearing ban
on `git add -A` while paths are unmerged. Phase 5 is now the complete
statement, including that ban, and Phase 6 refers to it.
Deliberate repetition elsewhere in this file is left alone. The four
DEFAULT_BRANCH derivations and the two jq probes are separate shell
invocations that cannot share variables — the file says so at each site —
and the Parse Arguments flag reference legitimately restates what the
execution steps do.
…ow out Extends the bundling mechanism from the four reviewer backends to every lib that sits on a branch a run may not take, and splits the one large conditional section that lived inline rather than in lib/. Newly deferred, each verified conditional at its include site: - plan-issue-mode (18.9K x6) and epic-children (8.9K x2) — issues mode only; PLAN.md mode, the default, never opens the tracker. - The six review lenses (46K) — review-agent-selection dispatches only the lenses a diff signals, often one or two, sometimes none. - enhance-loop (23.7K) — its heading already reads "only when --enhance-with". - ci-flake-handling (3.4K x2) — reached only when a check fails like a flake. - next-swarm (32.8K, new) — /do:next's --swarm flow, extracted from next.md. A single-issue run, the default, no longer carries the parallel-batch flow. Deliberately NOT deferred: code-review-checklist sits under a REQUIRED GATE, and Phase 1 of /do:better-swift says to load swift-gotchas "into your context" before launching agents. Both are always on the taken path, where deferring buys an extra read and risks the agent skipping content it always needed. That rule is now written down beside the list. DEFERRED_LIBS becomes ON_DEMAND_LIBS, a map carrying `when` (the branch that makes the read required) and `what` (the content) per entry. Both render into the directive, so the agent is told when it must read a file instead of being left to infer it. Skill set 2.80MB -> 1.55MB (-45%, ~314K tokens); /do:review -56%, /do:plan-task -84%, /do:rpr -60%. No skill grew. Two contract suites read commands/do/next.md directly and would have lost sight of the swarm rules once they moved. Their readers now resolve `!cat` includes, so they scan the composed document the agent actually sees. Claude/OpenCode keep runtime `!cat`; next-swarm.md installs into ~/.claude/lib like any other lib and composes back to the same content.
…e multi-reviewer-loop docs
perf: load conditional-path libs on demand instead of inlining every branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release v3.35.2
Released: 2026-08-28
Highlights
agy), Codex, and Grok Build, slashdo now bundles conditional-path libraries into a locallib/directory alongsideSKILL.mdand loads them on demand with an explicit read directive, rather than inlining every branch intoSKILL.md. This significantly trims the token footprint of installed skills like/do:review,/do:pr, and/do:next./do:nextswarm flow extracted. The parallel swarm dispatch logic (Phases A–D) is now split intolib/next-swarm.md, keeping single-issue/do:nextstreamlined while providing the full swarm orchestration when--swarmis invoked.assertSafeBundlePath) during install, update, and uninstall. Empty skill directories are now cleanly removed upon uninstallation for directory-namespaced environments.Added
lib/next-swarm.md: standalone library containing the complete parallel swarm workflow (Phases A–D) for/do:next --swarm.test/installer.test.js&test/transformer.test.js: new test suites covering deferred lib bundling, cycle termination, list health with bundled dependencies, symlink traversal security guards, and uninstallation cleanup.Changed
src/transformer.js: addedON_DEMAND_LIBS,DEFERRED_LIBS,deferredLibDirective, and AST-free markdown path transformation supporting sibling bundle references and relative linking.src/installer.js: addedsyncBundledLibs,bundledLibsAreEqual, stale bundle pruning, andassertSafeBundlePathsecurity checks.commands/do/next.md: replaced inline swarm execution phases with a reference tolib/next-swarm.md.install.sh&uninstall.sh: addednext-swarmto the curl installer's library allowlist.Fixed
lib/multi-reviewer-loop.md: updated documentation to reflect on-demand library resolution for Agent Skills hosts instead of legacy full inlining.src/installer.js: ensured empty parent skill directories are removed during uninstallation of directory-namespaced skills.Full Changelog
Full Diff: v3.35.1...v3.35.2