/universal:compiling-agent-goalsfrom Universal
Compiles specs, plans, or issues into bounded goal contracts for persistent-agent handoffs. Authors acceptance evidence and stopping conditions, not implementation.
Ships in Universal. 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; scripts run unread.
Compile source material into a finite completion contract for a persistent coding-agent loop.
A goal is not a compressed spec, implementation plan, backlog, aspiration, or pointer to a large document. A goal defines the smallest stable set of observable facts that lets the harness stop.
Use this skill to author, audit, shorten, or split the goal contract itself. Doing the underlying implementation work is a separate request.
A task is usually not goal-shaped when it is:
When explicitly asked for a goal anyway, state the limitation and compile the narrowest honest contract rather than pretending the work is finite.
Use this distinction throughout:
SUCCESS and BLOCKED.When a goal points to a spec, include this meaning explicitly:
Read the referenced material as implementation context. For deciding when to stop, only the finite acceptance criteria in this goal define completion.
Never produce a pointer-only goal such as "Implement everything in SPEC.md."
Read all user-supplied specs, plans, issues, design documents, repository instructions, and relevant code before drafting. In a repository, inspect the smallest set needed to identify:
Do not invent repository-specific commands when they can be discovered. Do not turn every sentence in a spec into a completion criterion. A technical choice may remain agent-discretion when several implementations satisfy the same contract; a product or policy choice that changes success must become an explicit prerequisite or BLOCKED condition.
If a literal command is unknown but a named authoritative source exists, require the worker to discover the command from that source and surface the exact command it ran. If a decisive validator, threshold, path, or decision remains indeterminate after inspecting available context, do not fabricate it and do not emit a paste-ready /goal. Return Assessment: goal definition blocked with the smallest missing inputs and, when useful, a clearly labeled non-executable draft.
Use one goal only when all of these are true:
Otherwise produce an ordered goal pack. Split by independently verifiable milestones, not by arbitrary document sections. Each goal must be useful, safe, and closed on its own. Do not activate multiple goals at once.
Classify source statements before drafting:
Create stable IDs AC1, AC2, and so on. Each acceptance criterion must be binary enough that a reviewer can answer pass or fail from surfaced evidence. Prefer outcomes over activities.
Bad criterion:
AC2: Refactor the parser and investigate edge cases.
Better criterion:
AC2: Inputs A, B, and C produce outputs X, Y, and Z, covered by the named regression tests.
Do not add, broaden, or reinterpret acceptance criteria after the loop starts. A newly discovered requirement may block the goal only when it is necessary to satisfy an existing criterion, preserve an explicit invariant, or repair a regression caused by the work. Put all other discoveries in follow-ups.
Freeze mutable work queues too. For issues, PRs, warnings, or records, snapshot the IDs or define membership as of a timestamp or immutable query result. "Process all open issues until the queue is empty" is not finite when new items can arrive.
For each acceptance criterion, name the proof the worker must surface in the conversation transcript. Use one or more of:
Do not rely on an evaluator to open files or run commands. Require the worker to expose the decisive evidence in its final turn. For bug fixes, prefer a named reproduction that fails before the change and passes afterward when practical.
For an explicit invariant or proof criterion, use verifying-invariants to scope the boundary and choose the lightest adequate evidence. Name the claim accurately: compiler restrictions, checked constructors, sampled tests, exhaustive finite exploration, and formal proof differ; repeatability does not imply completeness. Use a durable registry only when the user requests a lasting contract or CI needs it; ordinary goals carry a scoped report instead.
For stochastic or performance work, specify the dataset or workload, number of runs, aggregation method, threshold, and failure tolerance. "Looks better" and "performance improves" are not closure conditions.
Unknown repository debt commonly creates infinite goals. Add a baseline rule whenever broad checks may already fail:
Never require "all tests in the repository pass" unless the baseline is known clean and that breadth is intentional.
Every goal must say exactly when to stop.
SUCCESS requires all acceptance criteria to pass and all decisive evidence to be surfaced. The worker must stop immediately even when additional improvements are possible.
BLOCKED ends the loop without claiming success when any of these applies:
Choose a cap proportional to the milestone: about 10 turns for a localized change, 20 by default, and no more than 30 for one goal. Split the work instead of assigning a larger cap. A blocked report must include completed criteria, remaining criteria, evidence, the blocker, and the smallest external action needed.
SUCCESS and BLOCKED are report outcomes in this contract, not portable native status names. Include the blocked branch in the terminal contract and label it BLOCKED in the transcript so termination is not mistaken for success. Follow the runtime's authority and timing rules for native status transitions; a report label does not authorize marking incomplete work complete.
Start from assets/goal-template.md. Keep the goal body at or below 3,000 characters when practical and never above 4,000 characters. The leading /goal, surrounding code fence, character-count line, and commentary are not part of the goal body.
Keep only information that changes execution or closure. Prefer literal file paths, commands, thresholds, and criterion IDs over explanation.
For a multi-turn goal, optionally require a short progress file such as .agent/goal-status.md. It may record fixed criterion states, evidence, decisions, and follow-ups, but it must never create new acceptance criteria or become an additional completion requirement.
Save only the goal body to a temporary file. Resolve the linter path relative to this skill's SKILL.md, not the project working directory, then run it with Python 3.9 or newer:
python3 /absolute/path/to/compiling-agent-goals/scripts/lint_goal.py /path/to/goal.txt
The linter is heuristic. Fix all errors, review every warning, then perform a semantic check:
Run the linter again after edits.
When source material is too large, produce an ordered pack with these rules:
When the user asks for a single goal but the source cannot close safely as one, produce the pack and explain the split in one sentence.
Unless the user requests another format, return:
Assessment: single goal, Assessment: goal pack (N), Assessment: not goal-shaped, or Assessment: goal definition blocked./goal followed by the complete inline contract.Characters: N / 4000 for each goal body, using the linter's count.Do not bury required closure information in commentary outside the block. Do not tell the user to run /goal Complete GOAL.md; a saved goal document is for editing or copying, not a substitute for putting the finite contract into the harness.
When auditing an existing goal, return the revised paste-ready goal first, followed by only the material changes and remaining warnings.
Load only what the current step needs:
scripts/lint_goal.py: deterministic structural checks and character counting.Before returning a goal, confirm the linter reports no errors, every acceptance criterion carries proof, and both terminal outcomes are labeled.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
goal-contracts, agent-handoff, task-definition, specification
npx claudepluginhub kylehughes/agent-plugins-for-making-good-software --plugin universal13 skills in this plugin
/brainstorming-design-specsDevelop an implementation-ready design through research and dialogue. Use proactively when product scope, requirements, or engineering tradeoffs remain unresolved; skip specified changes ready to implement./debugging-root-causesInvestigate bugs, crashes, regressions, and failures via minimal reproduction, competing hypotheses, and discriminating probes. Use proactively for first-pass root-cause diagnosis; skip read-only reviews and stalled escalation briefs./delivering-changesCarry a requested change through implementation, simplification, hardening, and required checks to a PR-ready handoff. Use proactively when the user delegates end-to-end delivery; preserve narrower requests and project checkpoints./designing-documentsOrganize substantive documents for understanding, decisions, action, and lookup. Use when creating, revising, or reviewing document structure, explanations, onboarding, or findability; preserve constrained edits and useful existing structures./designing-verification-strategiesDesign platform-agnostic test and verification strategies: pick test boundaries, write non-vacuous assertions, and control time, I/O, and nondeterminism. Use proactively for test planning and testability; skip formal invariant proofs./hardening-changesHarden owned changes through scoped review and fixes. Use proactively when preparing a change set for a PR or when hardening is requested; read-only review belongs to reviewing-code.Other plugins' skills for the same job