/agent-traffic-control:shared-file-redesign-parallel-author-serial-integratefrom agent-traffic-control
Writing the next session's prompts for several remaining slices that ALL edit one hot file — a template, a central view, one stylesheet block — so the usual "split only if the file sets are disjoint" rule would force everything serial. Shared file work is parallel to author and serial to integrate. Pulls the longest lead slice out first as a gating spike when a schema, storage or probe gated backend change decides a later panel's scope, fans the rest out, then merges by ascending risk — or extracts partials in a prep pull request. Not for a session editing that file right now.
Ships in agent-traffic-control. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You're authoring next-session prompts for the remaining slices of a multi-item
redesign (e.g. a /report page redesign with 9 items left across 3-4 slices).
The session-handoff skill's parallelization rule is: "split into parallel prompts
only if the file sets are disjoint; skip splitting when tasks share files." But
every remaining slice edits the same hot file (report.html, plus partly
analysis.py). By that rule you'd sequence all of them — losing the parallelism
the user explicitly asked for.
Shared-file work is not un-parallelizable. It's parallel to author, serial to integrate — and the integration can be made cheap (narrow collision marking) or eliminated entirely (partials extraction). The handoff's job is to hand the next session that structure, not to give up at "these conflict."
session_N+1* prompts) for the
remaining slices of a redesign.{% block extra_css %}),
so the naive disjoint-files check fails.Encode this shape in the orchestrator prompt:
1. Pull the riskiest/longest-lead slice out as a serial PREREQ ("gating spike"), not a peer. If one slice is a backend change that (a) reaches into a live serialization/storage pipeline, (b) needs a schema bump with back-compat, or (c) is gated on a probe that might fail (does the engine even expose the data the UI wants?) — it goes FIRST, alone. Reasons:
inherited-scope-doc-names-may-not-exist, deploy-gate-success-report-doesnt-prove-the-gated-path.2. Fan out the remaining slices (parallel AUTHORING). They're independent to
write; each on its own branch off origin/main.
3. Serial-INTEGRATE by ascending risk. Merge order = lowest-blast-radius
first (pure template) → mixed (template + new routes) → highest (cross-run lookups
/ depends on the baked backend). Each later branch rebases on origin/main after
the prior merges — small and mechanical because the collision surface is narrow
(next point).
When the per-PR gate dominates wall-clock, AUTHOR the later slice ON the
merged prior instead of parallel-author-then-rebase. "Parallel authoring" is
the prompt's suggestion, not load-bearing — what the user actually picks is
no-prep-PR (Option 1) vs partials-prep-PR (Option 2). If each slice carries a
heavy human-gated review (formal panel + integrator + CI + merge), that gate —
not authoring — is the long pole, so the parallelism you'd buy by authoring slice
N+1 before slice N merges is marginal, and you pay for it with a rebase over the
shared collision region. Cleaner: land slice N, then author N+1 on post-N main
— it sees N's real merged code at its declared anchor (e.g. the footer card it
sits above already exists), so there's zero rebase and N+1 is built against
real, not in-flight, neighbors. Reserve true parallel authoring for de-risking
research on N+1 (deps, routes, data shape) that overlaps N's authoring without
touching the hot file. (Confirmed S94: Slice C built on merged-B main, no footer
rebase.) See same-day-hotfix-write-delta-handoff-not-rewrite-shipped-next-prompt
for the analogous "build on what shipped" instinct.
4. Name the narrow collision surface and a discipline for it. For a shared template the real collisions are usually just TWO spots, not the whole file:
{% block extra_css %} <style> block every slice appends to →
give each slice a distinct marker comment (/* === Slice B === */,
/* === Slice C === */) so appends/rebases touch disjoint regions;template-inlined-css-is-one-surface-not-two,
parallel-pr-template-fork-duplicates-moved-section.5. Offer the partials-extraction trade (convert serial → true parallel). A
small Slice-0 prep PR that extracts the page body into Jinja {% include %}
partials (_report_hero.html, _report_chart.html, _report_config.html, …)
gives each slice a different file → zero overlap → merge in any order, no
rebase dance. Cost: one extra serial PR + its review gate up front. Recommend it
when all slices land this session (it pays for itself); skip it when only one or
two land. Let the user pick (AskUserQuestion) — don't decide unilaterally.
6. Anchor the slice prompts on memory + grep recipes, not line numbers. Line
numbers in a hot file drift the moment the first slice merges. Point each prompt
at the memory file + a grep for the symbol/marker.
large-redesign-parallel-branch-collision-audit too — it catches
pre-existing long-running branches (client variants) that also touch the hot
file; note them as out-of-scope so the next session isn't surprised.Slice A (hero) shipped. Remaining: B (chart-foot + scorecard anchors + config
recap — template-only), C (downloads — CSV cheap, PDF/PNG new deps), D (covariate
contributions panel + inline SCA). All edit report.html; B/C also touch
analysis.py. Disjoint-files test → "don't split."
Structured instead as: 94a Slice D-BACKEND first (covariate-weight +
spike-slab inclusion-prob extraction; probe-gated — does tfci expose inclusion
probs?; reaches into the live #275 result pipeline; SCHEMA_VERSION bump with
back-compat; must bake a real v4 run) → fan out {94b B, 94c C, 94d D-UI} →
serial-merge B → C → D-UI (ascending risk). Collision surface = the one
extra_css block (per-slice markers) + the footer (B's config card last, C's
downloads above it, D-UI's inline SCA replaces the SCA CTA mid-document).
Option-2 partials alternative offered. The advisor validated the shape; the
disjoint-files rule alone would have serialized four sessions of work.
When the parallel work is executed in ONE session (not handed to future sessions) — e.g. porting a Claude Design prototype into ~12 React components — take the "Option-2 partials" idea all the way: decompose the one hot surface into N disjoint files UP FRONT so the fan-out is genuinely disjoint and no agent ever edits a shared file.
git / generate / dev-server / full-build (the orchestrator compiles +
smokes). Return terse (files + real bindings + honest-degrade decisions) — verification is tsc +
browser-smoke, not the agent's prose.vite-hmr-transient-console-errors-verify-on-fresh-reload).Validated S12: 16 Opus subagents, both Token Torch surfaces pixel-perfect on real data, tsc/tests/
generate:verify green, one adversarial review-panel pass. The disjoint-placeholder decomposition is
what kept a 12-component fan-out collision-free.
availability-window-gate-on-renderable-not-just-present).parallel-session-coedit-via-source-mtime-and-idempotent-rebuild — the LIVE
two-session variant: co-editing an assembled deliverable in real time via
source-file mtime + a non-destructive (idempotent) rebuild — filesystem
coordination, no git, no central orchestrator.large-redesign-parallel-branch-collision-audit — audits PRE-EXISTING branches
that collide with a redesign's files; complementary (run both).parallel-pr-scope-overlap-tiebreaker-delta-check — two simultaneous PRs vs one
redesign + WIP elsewhere.parallel-pr-template-fork-duplicates-moved-section — the shared-CSS /
moved-section collision specifics.inherited-scope-doc-names-may-not-exist — why the backend gating-spike goes first and
must bake.session-handoff (Phase 3 step 18) — the disjoint-files default this skill
extends.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub wan-huiyan/agent-traffic-control --plugin agent-traffic-control118 skills in this plugin
/agent-refusal-with-evidence-beats-literal-complianceA dispatched agent that does exactly what you asked can ship a defect you would
have stopped yourself, because it can see something at the worksite that you
could not see when you wrote the brief. Use when: (1) you are writing a brief
that prescribes a specific fix, threshold, wording or value rather than the
outcome you want; (2) an agent reports that it did not do what you asked and
you are deciding whether that is insubordination or judgement; (3) an agent
asserts "this is fine" or "not needed" with no measurement behind it; (4) you
are reviewing overnight output and want to know which decisions were checked
and which were assumed. Two halves, and both are needed: give the agent
explicit permission to satisfy the INTENT of an instruction while refusing its
letter, and REQUIRE the evidence with the refusal — what it built or measured,
what that showed, what it did instead. Evidence is the whole difference between
a refusal you can bank and one you have to re-litigate. Four agents correctly
declined an instruction in a single run; one built the suggested fix, measured
that it turned a silent safe refusal into a permanently red pipeline, and
reverted it unpushed.
/auto-merge-rearms-while-agent-live-kill-then-disarm-verify