/agent-almanac:decompose-into-pointer-unitsfrom agent-almanac
Splits large reviews, audits, or migrations into many small agent units whose work list is derived mechanically from source artifacts. Each unit gets pointers (file/line numbers, names, issue numbers) and a shared brief, with no per-unit prose written by the lead.
Ships in agent-almanac. 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.
Read when SKILL.md points to them.
Split a job that is too large for one agent into many narrow units without letting the lead's judgement leak into each unit as hand-written prose. The work list comes from a script reading source artifacts; each unit gets pointers, a shared brief and one template per kind. The lead's judgement lives in reviewable places: the derivation script, the brief, the templates, and the critic prompts whose gaps the owner may approve as later units. Narrow units exist for scoping, provenance and auditability — never to bypass what a unit is allowed to do, and the brief never withholds the run's purpose from units.
unleash-the-agents), and not when each step depends on the last (use a team)node, jq and rg on PATH; gh when issues are a source; GNU coreutils and findutils (sha256sum -c --quiet, mv --backup, xargs -r, find -print0). All shell snippets target bash or zsh without set -e or set -o pipefail (several intentionally let rg or awk exit 1 on normal paths)manage-token-budget)Compute every input a unit will cite before any unit runs — units read frozen files under $RUN_DIR/mechanical/ and never recompute them. Run the freeze snippet in ledger-snippets.md to verify tools, refuse re-freezing an existing MECH-SHA256SUMS, create $RUN_DIR/{mechanical,specs,gaps,owner,repo} + UNIT-LOG.txt, freeze source artifacts, and record MECH-SHA256SUMS.
Expected: $MECH holds every input the brief names; MECH-SHA256SUMS covers all files under it (re-checked byte-for-byte in Steps 7 and 10). Keep one $RUN_DIR for the whole job and reserve top-level .txt files strictly for unit reports, V-/X- files, and UNIT-LOG.txt (Step 10 treats any other top-level .txt as a report); put BRIEF.md in .md and store repo records in repo/, owner decisions in owner/, and no-result partials in partials/.
On failure: A missing: line names a tool to install first. If gh fails, stop rather than run with an empty list or live issue reads. If an input cannot be computed yet, compute it before proceeding.
A spec carries only kind, a stable id ([A-Za-z0-9._-]+, never starting with V- or X-), and pointers — never lead prose. Run derive-specs.mjs, the coverage/uniqueness checks, and the one-time WORK-SHA256SUMS recorder in ledger-snippets.md (other spec kinds and derivers live in EXAMPLES.md).
Expected: Source item counts equal covered and unique counts; all ids are unique across clusters and match ^[A-Za-z0-9._-]+$ (none prefixed V- or X-); WORK-SHA256SUMS records every spec file once. Later spec/gaps files are added only via the checked snippets in EXAMPLES.md, never by hand.
On failure: A count mismatch means the parser skipped items — fix and regenerate before recording WORK-SHA256SUMS. Once any unit has launched, never re-derive or hand-edit a recorded spec file (that is a re-run under Step 8 item 2): derive only missed items into a new spec file with new ids and record it via the added-specs check in EXAMPLES.md.
Every unit reads one plain-text brief ($RUN_DIR/BRIEF.md) holding everything shared across units:
FRAME Who the run works for, the whole run's purpose stated plainly, the question every unit
answers, what a unit must not produce.
EVIDENCE Each file in mechanical/ with one line on what it holds and its known artifacts.
TOOLS Read-only commands only; how to count; what must never be executed.
METHOD Numbered rules, each naming the past mistake it prevents.
CLASSIFY A closed vocabulary: category, severity, and any field your domain needs.
OUTPUT Sections that each start a line with VERDICT:, EVIDENCE: or OPEN:, in several short
writes; structured fields are paraphrase only. If your work is stopped, write
"STOPPED: <safety classifier|policy hook|reviewer>" under OPEN, set the summary's stop
field to safety-classifier, policy-hook or reviewer, and end; otherwise set stop to
none. Say what you could not determine.
Keep the section markers VERDICT:, EVIDENCE:, OPEN:, STOPPED:, the stop enum values, and ## Answered (Step 9) in English even in translated briefs, because the scripts read them literally.
Expected: One brief at $RUN_DIR/BRIEF.md, under ~200 lines; FRAME states the whole run's purpose; no sentence names a single unit.
On failure: A rule for one kind belongs in its Step 4 template; a rule for one unit means the spec kind is wrong.
Build every prompt mechanically from a fixed HEAD (read brief, stay in scope, no side effects), the unit id, report path ${DIR}/${s.id}.txt, scope(s) (one neutral template per kind filling pointers only, throwing on unknown kinds), and STOP_LINE. See stop-and-batch-rules.md for the scope() template and EXAMPLES.md for the tested Workflow skeleton (adapt with create-workflow).
Expected: Any prompt can be rebuilt from its spec, brief, and template. Same-kind units differ only in pointers (except owner specs, which quote the owner's Answered line verbatim).
On failure: Unknown kinds, cl specs missing args.source, owner specs missing unit/scope/STOP-<n> answer, or non-array held arguments throw before any agent starts. If a kind needs per-unit prose, split the kind or add a pointer field.
Each unit writes ${DIR}/${s.id}.txt in several short writes (VERDICT:, then EVIDENCE: per item, then OPEN:) so mid-report deaths still leave a verdict on disk, and returns a flat structured summary (DSCHEMA: unit, report_path, items, non_benign, open, and required stop enum none | safety-classifier | policy-hook | reviewer — full schema in stop-and-batch-rules.md). Verifiers and critics return the same stop field; detailed findings live in report files because message channels truncate.
Expected: Every finished unit has a report file matching its summary's non_benign lines, with stop: "none" unless stopped.
On failure: Structured-output retry exhaustion usually means units are pasting raw code/quotes into summary fields — tighten HEAD's paraphrase rule for unlaunched units, and handle units that returned nothing under Step 8's no-result rule. Never write unit results by hand.
V-<unit>-<n>.txt. A stopped or missing verifier is recorded and its claim stays unverified.covers_held on any gap touching held pointers.covers_held, recording dropped copies' questions/flags for the owner — snippet in stop-and-batch-rules.md). No gap runs in the run that found it; stopped critics' outputs are discarded.Expected: One verifier file per non-benign item, ceil(finished / group size) accuracy files plus one completeness file, every gap routed to the owner batch, and zero units outside input specs run.
On failure: A verifier returning nothing or a stop is not a confirmation — record it and apply Step 8. Assign await parallel(...) to a variable before calling .filter(...).
Before the pilot, record git -C <repo> rev-parse HEAD and git -C <repo> status --porcelain under $RUN_DIR/repo/ (compare both after every run; git status alone misses commits). Run one pilot cluster alone, run the checksum & section glance in ledger-snippets.md, and read 2–3 pilot reports end to end (checking pointer citations, summary parity, verifier runs, and STOPPED: vs. stop field agreement). Only then launch remaining clusters in parallel under unique tags with held ids stripped into held (EXAMPLES.md).
Expected: Pilot reports pass all checks before any other cluster starts, and target-repo HEAD and status remain unchanged.
On failure: Fix template defects before launching other clusters. Re-run the pilot only if UNIT-LOG.txt has zero STOP/NORESULT entries across all six lists and no STOPPED: disagreement; otherwise route to the owner batch. For externally halted runs that return no lists, follow the halted-run logging procedure in stop-and-batch-rules.md.
A stop (from a safety classifier, policy hook, or reviewer) is a decision about that work, never a puzzle to solve. After every run — before Step 9 or any later launch — read every unit, verifier, and critic transcript by structure (not substring) because an agent refused part way can still write stop: none.
Follow the seven stop rules and unit-log grammar in stop-and-batch-rules.md, using the exact writers and checks in ledger-snippets.md:
STOP-<n> unit=<id> ..., stage=after-run when found in transcripts), holds (HELD), no-results (NORESULT, moving any partial to partials/), and owner-named re-runs (RERUN-<n>).RERUN-<n> line — except one transient no-result re-run released via BY=transient:<transcript> (verifiers/critics also require the pre-rerun check).OWNER-QUESTIONS.md (Step 9) with plain options: hold (recommended), owner sets a different scope, or owner does the work.owner spec (OW-<n>) quoting the owner's STOP-<n> Answered line verbatim, validated by the owner-spec check in EXAMPLES.md.HELD unit=<id> reason=overlaps-STOP-<n> for unlaunched overlapping specs (never HELD on specs that already reported — list those under the stop entry as reported-not-used).Expected: Every stop, no-result, and overlap hold is logged in UNIT-LOG.txt and routed to the owner batch; no stopped unit was re-run/reworded outside an authorised owner spec, and no held id ran before its RELEASED line.
On failure: If a stopped unit was re-run or reworded by mistake, discard that output, log the deviation, and report it in the owner batch.
Collect every pending owner decision once in $RUN_DIR/OWNER-QUESTIONS.md with context, evidence paths, options, and recommendation (always hold for stops; never propose narrowed/reworded scopes or substitute another unit's output):
- **B1. STOP-1, unit CL1.5.0-02.** Stopped while writing its report; report partial.
Evidence: UNIT-LOG.txt line 1, CL1.5.0-02.txt (partial).
Options: (a) you name a different scope for this unit, (b) you do the work, (c) hold.
Recommendation: (c).
Before presenting the batch: (1) run read-only faithfulness and completeness checkers (never reading stopped reports); (2) gate topic-level gap derivation with all three independent signals — lead marks (owner/<tag>-marked-gaps.txt), critic covers_held, and an independent second read (owner/<tag>-second-read.tsv: COVERS | BORDERLINE | CLEAR); and (3) record owner answers in the exact one-line ## Answered syntax parsed by the release and owner-spec scripts. Full rules and line formats in stop-and-batch-rules.md.
Expected: Every stop, unresolved no-result, held id, and pending re-run appears once with evidence paths; checker corrections sit in question text or beside gap questions; dependent questions follow their prerequisites.
On failure: When a checker contradicts a question, re-open the primary file before editing. Record answers as they arrive so an interrupted session loses none.
Compute coverage strictly from files on disk — never from idle status or memory. Run the reconciliation snippet in ledger-snippets.md to verify UNIT-LOG.txt format, MECH-SHA256SUMS, WORK-SHA256SUMS, duplicate spec ids, and the seven ledger counts (specs, reported, stopped, held, unaccounted, extra, held_ran).
Expected: Both checksums match, zero duplicate spec ids, extra=0, held_ran=0, every unaccounted id is an open or released-not-yet-rerun no-result, and specs equals Step 2's total plus approved gap/owner specs. The coverage statement quotes all seven counts, lists stopped/held ids and verifier/critic stops or no-results (with unverified claims), and names gaps sent to the owner.
On failure: Apply Step 8's no-result rule to any unaccounted id; discard any held_ran report; investigate any extra report before use; on any checksum mismatch or duplicate id, do not use reports over changed pointers until the owner decides (edge cases in stop-and-batch-rules.md).
mechanical/, recorded gaps, or batch-verified owner specs, recorded in WORK-SHA256SUMS, with pointer-only fields (except verbatim owner scope)^[A-Za-z0-9._-]+$, none prefixed V- or X-)HEAD + id + report_path + scope(spec) + STOP_LINE, and scope throws on unknown kindsHEAD and status stayed unchanged; no re-run occurred after a stop/no-result without owner authorisation (except one logged transient re-run)UNIT-LOG.txt and batched; no stopped unit was re-run/reworded outside an item-5 owner spec; verifier/critic stops and no-results appear in the coverage statementOWNER-QUESTIONS.md passed faithfulness review and owner/<tag>-second-read.tsv named every gap onceextra=0 and held_ran=0, both checksums match, and all unaccounted ids are explainedstop enum field AND inspect transcripts by structure (Step 8).create-workflow — author the Workflow script that carries the templates, verifiers and criticsverify-agent-output — the evidence-trail and external-anchor discipline each verifier appliesunleash-the-agents — the alternative when the domain is unknown and no artifact yields a work listcreate-work-breakdown-structure — the project-management analogue: decomposing scope into work packagesmanage-token-budget — size chunk and critic group against cost before launchingWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
multi-agent, decomposition, audit, migration, provenance, workflow
Generated from the plugin's indexed repository (pjt222/agent-almanac) — no native marketplace selected
npx claudepluginhub p/pjt222-agent-almanac377 skills in this plugin
/adapt-architectureExecute structural metamorphosis using strangler fig migration, chrysalis phases, and interface preservation. Covers transformation planning, parallel running, progressive cutover, rollback design, and post-metamorphosis stabilization for system architecture evolution. Use when assess-form has classified the system as READY for transformation, when migrating from monolith to microservices, when replacing a core subsystem while dependents continue operating, or when any architectural change must be gradual rather than big-bang.
/adapticMaster skill composing the 5-step synoptic cycle for panoramic synthesis across multiple domains. Orchestrates meditate, expand-awareness, observe, awareness, integrate-gestalt, and express-insight into a coherent process that produces unified understanding rather than sequential compromise. Use when a problem genuinely spans 3+ domains and the interactions between domains matter more than depth in any one, when sequential analysis feels like compromise rather than integration, or before major architectural decisions affecting multiple stakeholders.
/add-puzzle-typeScaffold a new puzzle type across all 10+ pipeline integration points in jigsawR. Creates the core puzzle module, wires it into the unified pipeline (generation, positioning, rendering, adjacency), adds ggpuzzle geom/stat layers, updates DESCRIPTION and config.yml, extends the Shiny app, and creates a comprehensive test suite. Use when adding a completely new puzzle type to the package or following the 10-point integration checklist to ensure nothing is missed end-to-end.
/add-rcpp-integrationAdd Rcpp or RcppArmadillo integration to an R package for high-performance C++ code. Covers setup, writing C++ functions, RcppExports generation, testing compiled code, and debugging. Use when an R function is too slow and profiling confirms a bottleneck, when you need to interface with existing C/C++ libraries, or when implementing algorithms (loops, recursion, linear algebra) that benefit from compiled code.
/aikidoPractice aikido as a defensive martial art emphasizing harmony, redirection, and controlled resolution. Covers centering and grounding, ukemi (safe falling and rolling), core techniques (irimi-nage, shiho-nage, kote-gaeshi, ikkyo), blending and tai sabaki (body movement), randori (multiple attacker practice), weapons awareness, and applying principles off the mat. Use when learning a defensive martial art that prioritizes de-escalation, developing the ability to redirect aggression without causing unnecessary harm, building safe falling skills, or cultivating calm centeredness under physical pressure.
/analyze-codebase-for-mcpAnalyze an arbitrary codebase to identify functions, APIs, and data sources suitable for exposure as MCP tools, producing a tool specification document. Use when planning an MCP server for an existing project, auditing a codebase before wrapping it as an AI-accessible tool surface, comparing what a codebase can do versus what is already exposed via MCP, or generating a tool spec to hand off to scaffold-mcp-server.
Other plugins' skills for the same job