Preview agent loops and write durable Goals for coding, game development, and research, with evidence, drift control, proportional verification, and clear stop conditions.
·
Keep a long agent workflow tied to one outcome.
Preview the loop. Keep the next step clear. Finish with evidence.
An MIT-licensed skill for Codex that turns a broad request into a Goal with acceptance criteria, a bounded work loop, checkpoints, and clear stop conditions. Built from multi-day game development and software-delivery workflows.
Watch the 48-second recorded example · English case studies · Real usage and evidence · Where to share a skill
Inspect a recorded CLI task: original request, generated Goal, final code, 19 passing tests, and the actual check record. The maintainer's agent ran one focused suite and one final full suite, then stopped. Try your own task and share a report. We are looking for our first 3–5 independent reports; successful and unsuccessful attempts are welcome.
1. Install for Codex.
npx skills add wu736139669/goal-instruction-writer \
--skill goal-instruction-writer -g -a codex -y2. Paste this into a Codex chat in a repository.
Use $goal-instruction-writer in Preview mode.
Design a read-only Goal to audit local Markdown links in README.md and report
broken targets with proposed fixes. Limit the eventual audit to two passes.
Show the outcome, acceptance evidence, loop, checkpoint, and stop conditions.
Do not perform the audit or edit files yet.The preview should make it clear which links are in scope, what evidence proves each finding, what the next step is, and when the audit will stop. Review it, then ask for the final Goal if the proposed loop fits your task.
Try three short examples · Other installation options · Preview, confirm, and execute
If this workflow helps you, star the repository to keep it handy and follow new examples.
Long agent tasks can lose their original scope, repeat broad checks, or leave
the next turn without a usable handoff. goal-instruction-writer
turns “keep improving until it feels right” into a Goal that can be reviewed,
bounded, paused, and finished against observable criteria.
The host agent supplies execution, persistence, tools, and permissions. This skill supplies the instruction contract; it does not start an unattended runtime.
A concrete example is a multi-day Factory Town Idle Godot port. Project records cover analysis and architecture on October 13, playable systems on October 14, and a 0.49 local candidate with Mac and Android packages on October 17. The workflow carried forward production, construction, research, cross-town effects, save/load behavior, and a durable next step. Read the case study and delivery timeline.
The maintainer estimates a longest game-development workflow at more than 60 hours. The inspected records establish multi-day work and concrete stage deliveries; they do not measure uninterrupted agent compute time. At the case snapshot, the full recreation Goal was still active. The agent, engine, asset tools, and human decisions do the work; this skill supplies the instruction contract that keeps it connected.
| Real work | What the Goal needs to preserve | Evidence available |
|---|---|---|
| Game development | A playable result, coherent progression, runtime checks, and a build handoff across a long run | Factory Town Idle: analysis → 0.49 local candidate, the maintainer's 60+ hour report, and separately identified public game recordings |
| Research and handoff | Source identities, rule coverage, tool limits, and explicit runtime gaps before implementation | A source-led research archive with 4,920 indexed methods; an earlier stage of the same game project |
| Android SDK delivery | Feature work, compatibility, integration, and artifact provenance with checks selected by change | An SDK software handoff: 505 SDK tests per variant, eight artifact types, and 14 recorded Gradle calls totaling 9m 32s |
| Open-source collaboration | A reviewable submission, finite follow-up, external maintainer ownership, and accepted improvements | A public contribution and feedback trace through v0.2.3 and v0.2.4, alongside the earlier bounded evaluation |
The case library links each outcome to its evidence and provides short contracts to adapt. It identifies private-record audits, public contribution traces, and the limits of each recorded checkpoint.
Use it for game development, feature delivery, migrations, research, or launch work that needs several iterations. A small one-shot task usually needs only a normal prompt. It does not add execution permissions or keep a host running by itself; continuation, tools, and context recovery come from your agent runtime.
flowchart TD
A["Vague request<br/>Keep improving until it feels right"] --> B{"Preview first?"}
B -->|Long / costly / uncertain| C["Loop Preview<br/>States · branches · evidence · stops"]
B -->|Short / reversible| D["Draft Goal"]
C --> E{"User confirms the loop"}
E -->|Revise| C
E -->|Confirm| D
D --> F["Goal Anchor<br/>Outcome · criteria · scope · authority"]
F --> G["One iteration<br/>Inspect → Select → Act → Verify"]
G --> H{"Alignment check"}
H -->|ON_TARGET| I["Record evidence and cursor"]
I --> J{"Criteria still open?"}
J -->|Yes| G
J -->|No| K["GOAL COMPLETE"]
H -->|SIDE_QUEST| L["Defer with a revisit condition"]
L --> G
H -->|DRIFTED| M["Pause and realign"]
M --> N["GOAL REALIGNMENT REQUIRED"]
G --> O{"Blocked / budgeted / owner-stopped?"}
O -->|Blocked| P["GOAL BLOCKED"]
O -->|Budget exhausted| Q["GOAL TIMEBOXED"]
O -->|Cancelled or beyond authority| R["GOAL STOPPED"]| Common failure | The contract adds |
|---|---|
| The goal is just “make it better” | An observable outcome and acceptance evidence |
| The loop is just “keep trying” | One smallest work unit and an expected delta per iteration |
| New discoveries silently change direction | A Goal Anchor that freezes outcome, criteria, scope, and authority |
| Useful side work consumes the main task | A SIDE_QUEST label and a deferred list |
| The agent keeps working without progress | Realignment after two equivalent actionable attempts add no progress or new relevant evidence |
| Small edits repeatedly trigger full validation and packaging | Focused iteration checks, required delivery gates, and reuse of valid evidence |
| An external dependency creates endless waiting | A next-check trigger and durable wait checkpoint; a named blocker when no resume trigger is supported |
| Layer | Question | Reviewable proof |
|---|---|---|
| Goal | What observable result should exist? | A file, behavior, decision, or verified fact |
| Loop | How does one iteration create progress? | Target criterion, expected delta, verification, and cursor |
| Termination | When must the work legally stop? | COMPLETE, BLOCKED, PAUSED, TIMEBOXED, or STOPPED |
Long-running work also gets a Goal Anchor:
Goal Anchor: <one immutable outcome>
Success criteria: C1 <...>; C2 <...>; C3 <...>
Frozen scope: <invariants and forbidden side effects>
Allowed authority: <tools, files, systems, and approvals>
Current phase: <phase or milestone>For feedback, adoption, pilot, launch, or validation Goals, define what counts
as evidence before execution: an entry point, at least N non-author
responses, or a named cohort. Add the feedback window and do not count
author-only activity unless the Goal explicitly chooses it.
Goals also define a verification strategy: use focused checks during edits, complete required broader checks when the implementation is stable, and tie results to their relevant inputs and artifacts. Rerun checks when changes or new evidence invalidate them; report-only commits can reuse unrelated runtime results. Expensive checks get suitable bounds, and timed-out criteria stay open. Explicit acceptance and release requirements still apply.
flowchart LR
A["Goal Anchor"] --> B["Iteration record<br/>criterion · expected delta · scope reason"]
B --> C["Act and verify"]
C --> D{"Alignment"}
D -->|ON_TARGET| E["Keep evidence<br/>choose the next cursor"]
E --> B
D -->|SIDE_QUEST| F["Defer<br/>add a revisit condition"]
F --> B
D -->|DRIFTED| G["Pause<br/>preserve the checkpoint"]
G --> H["Re-anchor after an owner decision"]
H --> BActivity is not progress. An iteration counts only when it advances a named criterion and leaves evidence another agent can inspect.
npx skills add wu736139669/goal-instruction-writer \
--skill goal-instruction-writer -g -a codex -yThe command is verified against this repository and detects one skill:
goal-instruction-writer.
The skills-only plugin ZIP packages the same instruction contract for OpenAI plugin upload. See the build and validation notes and privacy statement. Public directory review and publication are separate from this downloadable package.
SKILL_ROOT="${CODEX_HOME:-$HOME/.codex}"
git clone https://github.com/wu736139669/goal-instruction-writer.git \
"$SKILL_ROOT/skills/goal-instruction-writer"After installation, invoke it explicitly as $goal-instruction-writer, or
let Codex discover it automatically for Goal-shaped requests.
Use $goal-instruction-writer in Preview mode.
Do not execute yet. Show the objective, loop steps, success and failure branches,
evidence, drift checks, and terminal conditions.The preview should expose the loop before any external side effect:
Inspect baseline → choose one criterion → make one bounded change
→ verify evidence → classify ON_TARGET / SIDE_QUEST / DRIFTED
→ continue, defer, block, or realignThe loop is confirmed. Keep the current scope and terminal rules, then generate
the final Goal instruction.Before each iteration, state the target criterion, expected evidence, and scope reason.
After each iteration, state the actual evidence, alignment label, remaining gap,
and next cursor.
For an external wait, save the pending criterion, next check time/event, and deadline.
Before the trigger, continue independent work or yield without another lookup.
On a later invocation, read the checkpoint and check limits before querying.
Waiting and due observations of "still pending" are not failed actionable attempts.
If two equivalent actionable attempts add neither acceptance progress nor new
relevant evidence, stop with:
GOAL REALIGNMENT REQUIRED.For a short, reversible task, skip Preview and ask directly:
Use $goal-instruction-writer to draft the final Goal for this task.| Mode | Use it when | Output |
|---|---|---|
| Preview | You want to inspect the loop, branches, and stops first | A reviewable flow; no executable Goal yet |
| Draft | You have a rough request | A complete, ready-to-paste Goal |
| Refine | An existing Goal is missing fields or boundaries | A minimal revision that preserves intent |
| Audit | You suspect drift, repetition, or unauthorized transitions | Findings and the smallest fixes |
| Convert | You have a ticket, checklist, or project brief | A Goal without silent scope expansion |
Weak request
Fix the importer and keep trying until it works.Reviewable Goal
Objective: make fixtures/quoted_multiline.csv load into the existing record model
without truncation or row-count drift.
Loop: inspect the current failure → choose one parsing hypothesis → make one
focused change → run the focused test → record the diff and result → choose the
next unmet criterion.
Drift control: bind every iteration to one criterion, expected evidence, and
scope reason; put unrelated cleanup in the deferred list.
Termination: emit GOAL COMPLETE when all criteria pass; emit
GOAL BLOCKED: <reason> after two equivalent failures; emit
GOAL TIMEBOXED: <state> after the four-iteration limit.Use $goal-instruction-writer to preview a Goal for a playable Godot game slice.
First show the outcome, scope, one iteration, evidence, and stop conditions.
Include a playable core loop, one coherent progression path, runtime playtest
evidence, save/load behavior, and a reproducible build handoff.
Keep the game concept and platform fixed. Park unrelated features.
Use focused checks during edits and the required broader checks at delivery.
Preserve the Goal Anchor and the next cursor across turns.
Do not execute the development task until I confirm the loop and ask you to run it.After confirming the preview, ask for the ready-to-paste Goal, then run it in your agent's supported long-running workflow. A Goal is an instruction contract; the exact start, resume, and status commands depend on that host.
The skill designs and audits the instruction contract. Runtime access, permissions, tool availability, and approval for external side effects remain controlled by the host agent and the user.
For external gates, preserve the open criterion, evidence, next check time/event, and deadline or unblock condition. Continue independent work or yield until the trigger; waiting does not consume the actionable no-progress allowance. Actual queries and elapsed time still count toward host limits. See the scheduled-wait rules.
The skill supports continuation after time or event triggers through its Goal instructions. A single Goal can alternate between active iterations and waiting. Its outcome and acceptance criteria stay the same; the next action depends on what can usefully advance now.
| Situation | What the generated Goal tells the agent to do |
|---|---|
| An authorized work unit can advance a criterion | Inspect, act, verify, record evidence, then choose the next bounded work unit |
| A criterion depends on a later time or external response | Preserve the pending criterion, next check time or relevant notification, and deadline; continue independent work or yield with the checkpoint saved |
| The task is invoked again | Read the checkpoint and check limits; query the pending dependency only when its recorded time/event condition is met, then verify the response and continue |
This makes waiting a branch of the same Goal. A time or relevant notification can permit another check. Waiting and a due observation of "still pending" do not count as failed actionable attempts; actual queries, deadlines, and host budgets still apply.
The skill defines what to save, when another check is allowed, and how to resume. A host timer, relevant event, or authorized message can provide the next invocation with access to the saved checkpoint. The host supplies persistence and invocation, including any automatic delivery at the requested time. When automatic wake-up is unavailable, a later authorized invocation can resume the same workflow from its checkpoint. The documented waiting branch has not yet been validated by a live wait/resume test. See the waiting rules and English example.
Have a real use case, a confusing preview, or a better drift rule? Open a Discussion for a workflow question, or open an issue for a focused change. Small pull requests are welcome when they preserve the three-layer contract and include a clear reason or example.
Before opening a pull request, run:
npx --yes skills add . --listThe same packaging check runs automatically in GitHub Actions.
MIT. See LICENSE.
Paste this prompt into your agent. It reads this page and does the setup for you.
Read https://aiagentslisting.com/skill/goal-instruction-writer to learn what the "goal-instruction-writer" skill does and how to install it. Install it for my coding agent as documented on that page, then confirm the skill is available and summarize what it can do.Agents can also browse this directory over MCP at https://aiagentslisting.com/api/mcp
git clone --depth 1 https://github.com/wu736139669/goal-instruction-writer.git ~/.claude/skills/goal-instruction-writer
rm -rf ~/.claude/skills/goal-instruction-writer/.git~/.claude/skills/goal-instruction-writer
├── SKILL.md
├── .github
├── .gitignore
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── agents
├── assets
├── docs
├── examples
├── packaging
├── references
├── scripts
└── videosFor a single project, put the folder in .claude/skills inside the repo instead.
git clone --depth 1 https://github.com/wu736139669/goal-instruction-writer.gitTurn a vague request into a ready-to-run Goal instruction that an agent can execute without guessing what success, progress, or stopping means. Preserve the user's intent, language, authority boundaries, and requested scope. This skill designs and audits the instruction contract; runtime access, permissions, and external approvals still come from the host agent and user. Describe the checks while writing a Goal; execute the underlying task only when the user has also requested execution.
Read references/goal-contract.md when drafting or auditing a Goal. Read references/examples.md only when a worked example would clarify the requested task. For work that spans multiple phases, artifacts, or more than a few iterations, also read references/drift-control.md. For preview-first workflows, read references/loop-preview.md.
If the mode is not stated, infer it from the input. Ask only questions whose answers would change the objective, authority, acceptance evidence, or legal terminal state. Otherwise state assumptions and continue.
Use preview-first when the user asks to “先看循环”, “preview”, “先设计流程”, or similar. Also prefer it for multi-stage, costly, irreversible, or materially uncertain work. For a short, reversible task, a direct draft is enough.
The preview is a design checkpoint, not an approval to execute:
When the user confirms, carry the accepted preview into the final Goal without quietly changing its loop, scope, or terminal rules. If the user revises it, regenerate the preview or record the changed decision first. A preview response must not claim that the Goal is complete and must not perform external side effects merely because a loop was described.
Write one sentence with an observable end state. It should say what artifact, behavior, decision, or verified change will exist when the work is complete. Then make the contract concrete:
For Goals about feedback, adoption, pilots, launches, or validation, define a
feedback evidence threshold before drafting: what counts as feedback,
whether an entry point is enough or at least N non-author responses are
required, and the timebox or attempt window. Do not count author-only activity
unless the user explicitly chooses that threshold.
Prefer one load-bearing outcome per Goal. Split unrelated outcomes into separate Goals. Replace vague verbs such as “improve,” “handle,” or “finish” with a measurable result.
For a long or multi-stage Goal, freeze a compact Goal Anchor before the first iteration: the one-sentence outcome, criterion IDs, frozen scope, and current phase. Treat it as an invariant. A new discovery may change the plan, but it must not silently change the outcome, acceptance criteria, or authority. An explicit owner decision creates a new Goal version or scope-change record.
At every iteration, record three links before acting:
After verification, classify the result as:
ON_TARGET: the named criterion moved or new relevant evidence supports a
justified next step.SIDE_QUEST: useful but not required for this Goal; park it in a deferred
list instead of expanding the loop.DRIFTED: the action changed the goal or scope without authorization, the
next step cannot be justified from the Anchor, or the no-progress threshold
is reached; stop and realign.Run a phase gate every 3–5 iterations by default, at each milestone, and before an irreversible or high-cost action. Re-read the Anchor, compare the current state with the baseline, mark criteria open or verified, review deferred side quests, and choose one justified next action. Never rewrite criteria to make completed work appear on target.
Use a bounded iteration with a visible progress signal:
ON_TARGET, SIDE_QUEST, or DRIFTED and apply
the corresponding drift rule.State the iteration limit that fits the task: a timebox, tool or token budget, maximum attempts, or a finite work-unit list. Add a no-op rule: do not repeat the same action without new information; after a repeated failure, change the hypothesis or stop with the blocker. The loop must be able to explain why the next iteration is different from the previous one.
For external dependencies, record the unmet criterion, next check time or relevant notification, and deadline. Before that trigger, continue independent work or yield with the checkpoint preserved. Waiting and a due check that confirms the dependency is still pending do not count as failed actionable attempts toward the default two-equivalent-no-progress threshold. Actual tool calls and elapsed time still count against host limits. See scheduled waits for polling, resumption, and deadline rules.
Include a short verification strategy in the Goal. Preserve explicit user and repository acceptance requirements while controlling when checks run:
Make the terminal states explicit and mutually understandable:
GOAL REALIGNMENT REQUIRED when a local terminal label is needed.Blocked is a claim about the world, not a way to end a hard turn. It qualifies only when all three hold: the dependency is named and verifiable, the agent cannot resolve it without new input or permission, and the report states what would unblock it. Difficulty, slowness, uncertainty, an ambiguous requirement, a failure a different approach could resolve, and a preference the agent could ask about are not blockers. Change approach, ask one scoped question, or realign instead. If another criterion is still actionable, keep working it and record the blocked criterion separately. A blocked claim that turns out to be false is a defect in the report, not a neutral stop.
Do not use “continue until satisfied,” “try indefinitely,” or a success claim based only on effort. If the task has a local convention for terminal strings, preserve it; otherwise give each state a short, exact label and require the final response to include it. A goal or acceptance criterion cannot be changed just because the current work became difficult or interesting.
Return the result in the user's language. Unless they request another format, use this order:
Objective, Goal anchor, Baseline and scope, Acceptance criteria, Feedback evidence when applicable,
Verification strategy, Execution loop, Drift control, Limits and no-op rule, Termination, and Reporting sections.The ready-to-paste block must be executable as an instruction, not a discussion of how one might write an instruction. Keep acceptance checks and terminal states concrete enough that a later reviewer can decide them from evidence.
Use for Vercel cost and performance optimization on deployed projects, especially Next.js, SvelteKit
By a 12-year product manager who builds 0-to-1: takes a beginner from a vague idea to a buildable pl
This skill allows you to create a professional, engaging, and user-friendly website in seconds using
v0.2.5v0.2.5 — Auditable blocked claimsRelease notesv0.2.4v0.2.4 — Bounded external waitsRelease notesv0.2.3v0.2.3 — Separate realignment and owner pausesRelease notesv0.2.2v0.2.2 — English case studyRelease notesv0.2.1v0.2.1 — A real multi-day game caseRelease notesv0.2.0v0.2.0 — Proportional verification and real-use demosRelease notesv0.1.0v0.1.0 — Preview loops before GoalsRelease notesConnect to the AI Agents Listing MCP server at https://aiagentslisting.com/api/mcp using the HTTP transport and complete the sign-in when it asks. Then call the submit_review tool for the listing "goal-instruction-writer" with a rating from 1 to 5 and a short note on what worked and what did not.No reviews yet
Be the first to share your experience with this tool.
Use for Vercel cost and performance optimization on deployed projects, especially Next.js, SvelteKit
Coding & Review
By a 12-year product manager who builds 0-to-1: takes a beginner from a vague idea to a buildable pl
Ops & Automation
This skill allows you to create a professional, engaging, and user-friendly website in seconds using
Ops & Automation
One email a week. New agents, MCP servers and skills, and what is actually getting traction.