Sweep all disciplines
A declared second species in this plugin: NOT a corrector. Every sibling
skill re-anchors ONE discipline; this one carries no discipline of its own. It is a pure router that COMPOSES the correctors into a single batched
re-anchor pass. It holds zero discipline text: the disciplines live in the
correctors, the shared method lives in
${CLAUDE_PLUGIN_ROOT}/context/re-anchor-audit-correct.md,
and membership + order live in each corrector's own tier metadata. This skill
names no members. It globs and reads them, so the bundle cannot drift from a
hand-maintained list.
Two modes
- Session-start digest (cheap, default when nothing has happened yet).
Derive the posture from the skill listing and each corrector's tier
metadata. NO corrector bodies load, NO audit runs. Report which
correctors are core (run every session), which are situational
(relevance-gated), and which are never-batched. This is the
conversation-start case: set posture, audit nothing.
- Full batch pass (mid-session, or on explicit request). Preflight that
the fan-out can inherit this conversation (mandatory. See Preflight), then
fan out an audit-only subagent per in-scope corrector and apply their
corrections once, on the main thread, in a fixed order (below). A failed
preflight degrades to mode 1 with the exact degrade token as the report's
first line (see Preflight).
Resolving membership (never named inline)
Glob the sibling corrector directories and read each one's
metadata.discipline-batch (core / situational / never) and
metadata.discipline-batch-rank.
- core. In scope every session.
- situational. In scope only when relevant to THIS conversation. Route
from the corrector's own listing description (its trigger phrases and
"at conversation start on …" clause), not from a guess. Report which
situational correctors were included and which were skipped and why. A
skip is always reported, never silent.
- never. Excluded from the batch by execution or interaction class
(heavier fan-out tiers; correctors that need a non-fork fresh context or
stop to remediate with the user). Membership is whichever correctors
declare
discipline-batch: never. Report that they exist (from the glob)
and are invoked directly, not batched.
The userConfig overlay (see Configuration below) applies after tier
resolution and can change the resolved set; report the net effect when it does.
Preflight: prove the fan-out can inherit (before step 1)
The batched pass is only meaningful if its subagents actually inherit this conversation, and its
step 4 writes their remedies to the working tree. Establish inheritance before dispatching, never
by assuming it. Read reference/inheritance-preflight.md now,
before the first dispatch of a full-batch pass: it owns the three stages, the canary, the
fail-closed verify, the degrade path when inheritance cannot be proved, and what is gated on the
result. Session-start digest mode never runs the preflight and never reads that file.
The batched pass, a declared delta from the shared loop
Read reference/batched-pass.md once the preflight has proved
inheritance, and before beginning step 1: it owns the five steps, the declared delta from the
shared loop's correct-forward-now step, the per-member ledger contract, the root-cause dedup, the
rank-ordered single correction pass, and the consolidated report. Do not begin step 1 from the
preflight's output alone. Session-start digest mode never reaches it.
Member human-gates survive batching
The batch never converts a member's human gate into an autonomous action.
The shared method's outward-artifact carve-out (no PR, issue, or published
comment without explicit opt-in) holds, as do follow-our-standards'
upstream-divergence routing (draft and route, do not file),
pick-for-the-problem's incumbent-replacement decisions, and
recheck-against-upstream's undocumented-divergence calls. The batch
surfaces these for the user; it does not resolve them unasked.
Configuration
The overlay reads three personal-scalar userConfig options (configured
through Claude Code's native plugin-config flow, see the plugin README, never a hand-edited member), substituted here at load:
- Excluded correctors:
${user_config.batch_exclude}
- Promoted to always-run:
${user_config.batch_promote}
- Demoted to relevance-gated:
${user_config.batch_demote}
Each is a comma-separated list of corrector names. An unset option does not
reliably substitute to empty: on a zero-config or headless install, or for a
user who never ran plugin-config, the literal ${user_config.…} token
survives instead. Treat BOTH an empty value AND a surviving literal
placeholder as unset, no overlay from that key, and never read the literal
token as a corrector name. Apply
after tier resolution: batch_exclude drops a member, batch_promote lifts a
situational corrector to always-run, batch_demote drops a core corrector to
relevance-gated. batch_promote accepts situational names only. For each
promote entry, resolve the name against the globbed correctors' tier metadata:
- situational. Promote to always-run (the only successful case).
- never. Visible warning; do not promote; leave excluded from the batch.
- core. Visible warning; do not promote; leave as always-run core (a
no-op that must not look like a successful promote).
- unknown (matches no installed corrector). Visible warning; ignore.
Report the net effect whenever the overlay changes the set, and surface every
never/core/unknown promote warning in that report, never silently drop them.
What this skill does NOT do
- Not a corrector. It owns no discipline and re-anchors nothing itself.
- Not
use-your-skills. That corrector routes to the ONE skill fitting a
task; this composes the whole posture bundle.
- Not a session or SDLC orchestrator. Staged navigation and session
lifecycle belong to the
session-flow plugin; this only sequences the
re-anchor correctors.
- Does not batch the
never tier. Correctors that declare
discipline-batch: never are invoked directly.
- Does not define membership by inline names. Membership is each
corrector's own tier metadata (glob + read). Inline names elsewhere in this
file illustrate rank-order intent or overlay examples, never the member set.
- Does not silently accept a non-situational
batch_promote. Never,
core, and unknown promote entries warn and are not promoted.
Gotchas
- Fork, not fresh/typed, and not skill-level
context: fork. Only the
Agent-tool subagent_type: "fork" inherits the conversation the audit
reads; the other two start blank.
- Audit in the forks, correct on the main thread. Parallel forks that
wrote would race and re-dilute salience; the value is one ordered
correction pass.
- The forks' no-writes rule is trusted, not enforced. Say so. A named
subagent's tool access can be narrowed with
tools / disallowedTools; a
fork's cannot. Forks "skip both filters and receive the main conversation's
exact tool pool", and a fork's system prompt and tools are "Same as main
session" (https://code.claude.com/docs/en/sub-agents; the dated record for
every fork claim in this skill is
reference/inheritance-preflight.md,
whose stamp opens that file). So every audit fork
holds Write, Edit, and Bash and is only asked not to use them. Never
present the audit fan-out's read-only posture as harness-enforced. If you
want assurance that the fan-out honored it, capture the working tree's state
before the FIRST dispatch (the canary included) and compare afterwards, and
treat any difference as a fork that wrote. Untrusted output, stop rather
than correct on top of it. That is detection after the fact, not prevention,
and a robust comparison is more than a git status diff; this skill does not
specify one.
- Do not pass
isolation: "worktree" on the audit forks. The Agent tool
accepts it on a fork, but a git worktree is created from a commit, so the
fork would not see the uncommitted work in flight, which is usually the very
thing the audit exists to inspect. It also would not bound a write addressed
by an absolute path, and inherited history is full of absolute paths. It
trades a real loss of audit fidelity for partial containment.
- The preflight is the guard, not an optimization. Skipping it does not
make the sweep cheaper. It makes every ledger unfalsifiable, and the
batched pass's step 4 writes those ledgers' remedies to the working tree.
- Forks run at the parent model's cost. An Agent-tool fork ignores a model
override and inherits the whole conversation, so each in-scope corrector's
audit runs at the parent model over the full transcript; the wave cap bounds
burst, not per-fork cost. Keeping the
never tier out and relevance-gating
the situational tier are what hold the fan-out small. Order of magnitude from
a real full-batch run on a mid-length session: each fork consumed
~170K tokens (inherited transcript), so an 8-in-scope pass ran ~1.4M tokens
for the audit phase alone, plus one more fork for the proof-only canary.
Budget the sweep as a
deliberate spend, not a reflex. On a long transcript the per-fork cost only
grows.
tighten-your-output stays last. Tightening before the other
corrections would tighten text they then rewrite.
- A situational skip is reported, not silent, the user sees what was
left out and why.
1---2name: sweep-all3description: Compose this plugin's discipline correctors into ONE batched pass. Requires conversation-inheriting fork subagents (`subagent_type: fork`); without fork mode it degrades to the posture digest and audits nothing. At conversation start it instead reports a cheap posture digest (which disciplines are in scope) with no audit. Use when: 'sweep all disciplines', 'ground ourselves', 're-anchor everything', 'run the whole re-anchor bundle', 'posture batch', 'set our posture before we start', 'batch the correctors', or at conversation start to set posture across every standing discipline at once. Membership is each corrector's own tier metadata; for a single discipline, invoke that corrector directly.4---56# Sweep all disciplines78A **declared second species** in this plugin: NOT a corrector. Every sibling9skill re-anchors ONE discipline; this one carries no discipline of its own. It is a pure router that COMPOSES the correctors into a single batched10re-anchor pass. It holds zero discipline text: the disciplines live in the11correctors, the shared method lives in12[`${CLAUDE_PLUGIN_ROOT}/context/re-anchor-audit-correct.md`](../../context/re-anchor-audit-correct.md),13and membership + order live in each corrector's own tier metadata. This skill14names no members. It globs and reads them, so the bundle cannot drift from a15hand-maintained list.1617## Two modes18191. **Session-start digest (cheap, default when nothing has happened yet).**20 Derive the posture from the skill listing and each corrector's tier21 metadata. NO corrector bodies load, NO audit runs. Report which22 correctors are core (run every session), which are situational23 (relevance-gated), and which are never-batched. This is the24 conversation-start case: set posture, audit nothing.252. **Full batch pass (mid-session, or on explicit request).** Preflight that26 the fan-out can inherit this conversation (mandatory. See Preflight), then27 fan out an audit-only subagent per in-scope corrector and apply their28 corrections once, on the main thread, in a fixed order (below). A failed29 preflight degrades to mode 1 with the exact degrade token as the report's30 first line (see Preflight).3132## Resolving membership (never named inline)3334Glob the sibling corrector directories and read each one's35`metadata.discipline-batch` (`core` / `situational` / `never`) and36`metadata.discipline-batch-rank`.3738- **core**. In scope every session.39- **situational**. In scope only when relevant to THIS conversation. Route40 from the corrector's own listing description (its trigger phrases and41 "at conversation start on …" clause), not from a guess. Report which42 situational correctors were included and which were skipped and why. A43 skip is always reported, never silent.44- **never**. Excluded from the batch by execution or interaction class45 (heavier fan-out tiers; correctors that need a non-fork fresh context or46 stop to remediate with the user). Membership is whichever correctors47 declare `discipline-batch: never`. Report that they exist (from the glob)48 and are invoked directly, not batched.4950The **userConfig overlay** (see Configuration below) applies after tier51resolution and can change the resolved set; report the net effect when it does.5253## Preflight: prove the fan-out can inherit (before step 1)5455The batched pass is only meaningful if its subagents actually inherit this conversation, and its56step 4 writes their remedies to the working tree. Establish inheritance before dispatching, never57by assuming it. Read [reference/inheritance-preflight.md](reference/inheritance-preflight.md) now,58before the first dispatch of a full-batch pass: it owns the three stages, the canary, the59fail-closed verify, the degrade path when inheritance cannot be proved, and what is gated on the60result. Session-start digest mode never runs the preflight and never reads that file.6162## The batched pass, a declared delta from the shared loop6364Read [reference/batched-pass.md](reference/batched-pass.md) once the preflight has proved65inheritance, and before beginning step 1: it owns the five steps, the declared delta from the66shared loop's correct-forward-now step, the per-member ledger contract, the root-cause dedup, the67rank-ordered single correction pass, and the consolidated report. Do not begin step 1 from the68preflight's output alone. Session-start digest mode never reaches it.6970## Member human-gates survive batching7172The batch never converts a member's human gate into an autonomous action.73The shared method's outward-artifact carve-out (no PR, issue, or published74comment without explicit opt-in) holds, as do `follow-our-standards`'75upstream-divergence routing (draft and route, do not file),76`pick-for-the-problem`'s incumbent-replacement decisions, and77`recheck-against-upstream`'s undocumented-divergence calls. The batch78surfaces these for the user; it does not resolve them unasked.7980## Configuration8182The overlay reads three personal-scalar `userConfig` options (configured83through Claude Code's native plugin-config flow, see the plugin README, never a hand-edited member), substituted here at load:8485- Excluded correctors: `${user_config.batch_exclude}`86- Promoted to always-run: `${user_config.batch_promote}`87- Demoted to relevance-gated: `${user_config.batch_demote}`8889Each is a comma-separated list of corrector names. An unset option does not90reliably substitute to empty: on a zero-config or headless install, or for a91user who never ran plugin-config, the literal `${user_config.…}` token92survives instead. Treat BOTH an empty value AND a surviving literal93placeholder as unset, no overlay from that key, and never read the literal94token as a corrector name. Apply95after tier resolution: `batch_exclude` drops a member, `batch_promote` lifts a96situational corrector to always-run, `batch_demote` drops a core corrector to97relevance-gated. **`batch_promote` accepts situational names only.** For each98promote entry, resolve the name against the globbed correctors' tier metadata:99100- **situational**. Promote to always-run (the only successful case).101- **never**. Visible warning; do not promote; leave excluded from the batch.102- **core**. Visible warning; do not promote; leave as always-run core (a103 no-op that must not look like a successful promote).104- **unknown** (matches no installed corrector). Visible warning; ignore.105106Report the net effect whenever the overlay changes the set, and surface every107never/core/unknown promote warning in that report, never silently drop them.108109## What this skill does NOT do110111- **Not a corrector.** It owns no discipline and re-anchors nothing itself.112- **Not `use-your-skills`.** That corrector routes to the ONE skill fitting a113 task; this composes the whole posture bundle.114- **Not a session or SDLC orchestrator.** Staged navigation and session115 lifecycle belong to the `session-flow` plugin; this only sequences the116 re-anchor correctors.117- **Does not batch the `never` tier**. Correctors that declare118 `discipline-batch: never` are invoked directly.119- **Does not define membership by inline names**. Membership is each120 corrector's own tier metadata (glob + read). Inline names elsewhere in this121 file illustrate rank-order intent or overlay examples, never the member set.122- **Does not silently accept a non-situational `batch_promote`**. Never,123 core, and unknown promote entries warn and are not promoted.124125## Gotchas126127- **Fork, not fresh/typed, and not skill-level `context: fork`.** Only the128 Agent-tool `subagent_type: "fork"` inherits the conversation the audit129 reads; the other two start blank.130- **Audit in the forks, correct on the main thread.** Parallel forks that131 wrote would race and re-dilute salience; the value is one ordered132 correction pass.133- **The forks' no-writes rule is trusted, not enforced. Say so.** A named134 subagent's tool access can be narrowed with `tools` / `disallowedTools`; a135 fork's cannot. Forks "skip both filters and receive the main conversation's136 exact tool pool", and a fork's system prompt and tools are "Same as main137 session" (<https://code.claude.com/docs/en/sub-agents>; the dated record for138 every fork claim in this skill is139 [`reference/inheritance-preflight.md`](reference/inheritance-preflight.md),140 whose stamp opens that file). So every audit fork141 holds Write, Edit, and Bash and is only *asked* not to use them. Never142 present the audit fan-out's read-only posture as harness-enforced. If you143 want assurance that the fan-out honored it, capture the working tree's state144 before the FIRST dispatch (the canary included) and compare afterwards, and145 treat any difference as a fork that wrote. Untrusted output, stop rather146 than correct on top of it. That is detection after the fact, not prevention,147 and a robust comparison is more than a `git status` diff; this skill does not148 specify one.149- **Do not pass `isolation: "worktree"` on the audit forks.** The Agent tool150 accepts it on a fork, but a git worktree is created from a commit, so the151 fork would not see the uncommitted work in flight, which is usually the very152 thing the audit exists to inspect. It also would not bound a write addressed153 by an absolute path, and inherited history is full of absolute paths. It154 trades a real loss of audit fidelity for partial containment.155- **The preflight is the guard, not an optimization.** Skipping it does not156 make the sweep cheaper. It makes every ledger unfalsifiable, and the157 batched pass's step 4 writes those ledgers' remedies to the working tree.158- **Forks run at the parent model's cost.** An Agent-tool fork ignores a model159 override and inherits the whole conversation, so each in-scope corrector's160 audit runs at the parent model over the full transcript; the wave cap bounds161 burst, not per-fork cost. Keeping the `never` tier out and relevance-gating162 the situational tier are what hold the fan-out small. Order of magnitude from163 a real full-batch run on a mid-length session: each fork consumed164 ~170K tokens (inherited transcript), so an 8-in-scope pass ran ~1.4M tokens165 for the audit phase alone, plus one more fork for the proof-only canary.166 Budget the sweep as a167 deliberate spend, not a reflex. On a long transcript the per-fork cost only168 grows.169- **`tighten-your-output` stays last**. Tightening before the other170 corrections would tighten text they then rewrite.171- **A situational skip is reported, not silent**, the user sees what was172 left out and why.