Skip to content

Adonis0123/adonis-skills / skills/goal-gate

goal-gate

Verified

Gate whether a coding-agent task benefits from a durable, verifiable contract, then draft, validate, start, continue, or close it for Codex, Grok, Claude Code, Cursor CLI, or an unknown host. Use for explicit goal or /goal requests and autonomous multi-checkpoint coding work with one checkable end state. Native Goal creation or mutation requires an explicit user or system request. Do not use for quick one-shot work, unrelated backlogs, OKRs, reminders, or token-budget-only changes.

FileKindSize
SKILL.mdskill md14.5 KB
agents/openai.yamlconfig386 B
evals/evals.jsonconfig46.5 KB
evals/trigger-eval.jsonconfig3.7 KB
references/copy-ready-goals.mdmarkdown10.9 KB
references/examples.mdmarkdown26.7 KB
references/runtime-actions.mdmarkdown10.8 KB
scripts/lint-goal-prompt.pyexecutablescript6.2 KB
scripts/test-lint-goal-prompt.pyexecutablescript10.8 KB

references/runtime-actions.md

View on GitHub
# Runtime Actions

Load this file only when the compact runtime row in `SKILL.md` is not enough to execute `set-now` or a same-goal management action. Do not load it together with `copy-ready-goals.md` or `examples.md`.

`/goal-gate` drafts and gates contracts. Only a host with a verified goal facility can enter product goal mode. Never invent APIs that the runtime does not advertise.

## Grok tooling — goal not Active

Grok has no `create_goal` / `get_goal`. Only the user-run slash `/goal <objective>` can make the session Active; `update_goal` fails until then.

If the user or system did not explicitly request native Goal state, use `Decision: suggest`, `Next: adopt goal and continue`: start the authorized work under the transcript contract, emit no `/goal`, never call `update_goal`, and do not claim product Goal state is Active.

On explicitly authorized native `set-now`:

1. Emit the Goal Gate block **and** the full copy-ready `/goal <objective>` **before** any multi-step implementation.
2. Set `Next: wait for user /goal`. **Stop.** Do not start the implementation plan, do not call `update_goal` (`message`, `completed`, or `blocked_reason`), and do not claim durable goal mode is on.
3. One short line of truth: `/goal-gate` drafted the contract; the user must paste `/goal …` (or confirm the goal is already Active) to light product goal mode.
4. After the user pastes `/goal …`, says the goal is active, or `/goal status` shows Active — then work the contract and report with `update_goal` (`message` at checkpoints; `completed: true` only when verification proves the done condition; `blocked_reason` only when genuinely stuck).
5. Soft-adopt exception: if the user explicitly declines durable mode ("just do the work, no `/goal`", "soft only", "不要原生 goal"), set `Next: adopt goal and continue`, work without waiting, and still **never** call `update_goal` until Active.

Why an explicitly requested Grok Goal waits: Codex `create_goal` can activate from the agent. Grok cannot. Pretending `set-now` already activated Grok goal mode produces `Goal is not Active` failures and confuses `/goal-gate` with `/goal`.

On Grok when `Next: wait for user /goal`, put the copy-ready `/goal` first in the user-visible reply (right under the block), then stop. Do not bury it after implementation notes or a completion summary.

If `update_goal` returns `Goal is not Active`, stop using it, re-emit the copy-ready `/goal`, and ask the user to activate — do not retry `completed: true` hoping it works.

## Grok tooling — goal already Active

If the user explicitly continues the exact objective or a demonstrably contained checkpoint, use `Decision: set-now`, `Next: continue active goal`, work the contract, and use Grok's progress `message` as above. Do not invent `create_goal` / `get_goal`. Do not silently clear or replace the active goal; a contained checkpoint leaves completion to the parent owner, and `completed: true` is allowed only after the full Goal done condition is proven.

After Active:

1. Work the contract toward the done condition.
2. Call `update_goal` with a short `message` at checkpoints.
3. Call `update_goal` with `completed: true` **only** after the done condition is proven by surfaced evidence — never mark complete on hope, partial work, or an inactive session. Include a concise evidence-bearing `message` when closing.
4. Call `update_goal` with `blocked_reason` when a stop-or-ask condition fires after genuine stuckness (credentials, approval, repeated failure), not for routine questions.
5. Do not invent `create_goal` / `get_goal`. Do not silently clear or replace an active goal.
6. Same-goal complete uses `Next: report via update_goal` only after the terminal preconditions are proven. Never send Codex `status: "complete"` / `status: "blocked"` fields to Grok.

## Grok slash `/goal`

User asked for a copyable Grok `/goal` (or only a slash prompt). Prefer `Decision: suggest` with `Next: provide prompt` when they only want text to copy. If they also authorized immediate execution without durable mode, soft-adopt is allowed; still never call `update_goal` until Active.

Prompt craft:

- Keep the executable prefix `/goal` (not `/目标`). Body may be Chinese for Chinese-first users.
- Put a concrete, verifiable objective in the first line after `/goal` — Grok stores that string as the autonomous objective across turns.
- Require the agent to surface verification evidence in the transcript (commands, exit codes, logs, screenshots, paths). Grok goal completion may be checked adversarially against the contract; unsourced "done" claims are weak.
- Include execution strategy, iteration bounds, and pause conditions like other runtimes.
- Optionally note management commands when the user is operating an existing goal: `/goal status`, `/goal pause`, `/goal resume`, `/goal clear`.
- Mention that `/goal` appears only when the goal feature is enabled and `update_goal` is in the toolset.

## Codex tooling

Call `get_goal` first when Goal state is relevant. If no goal is active, call `create_goal` only when the user or system explicitly requested native Goal creation (`Decision: set-now`, `Next: create goal`); do not set a token budget unless the user asked for one. Without explicit Goal authorization, use `Decision: suggest`, `Next: adopt goal and continue`, start the authorized task, and do not call `create_goal` or claim product Goal state is Active.

If the active Goal is the exact objective, or demonstrably contains the requested checkpoint in its frozen scope and Done condition, set `Next: continue active goal` and keep working without calling `create_goal` or a terminal `update_goal`. A contained checkpoint never owns parent completion. Work until the Goal owner's full done condition is proven; then call Codex `update_goal({status: "complete"})` when that tool/schema is exposed (`Next: report via update_goal`). Mark `blocked` only after the same blocking condition has persisted for at least three consecutive goal turns and no meaningful progress is possible; ordinary questions, incomplete work, or low remaining budget are not blockers.

If an active goal conflicts with a new objective, ask before mutation (`Decision: defer`). For an explicit exact-same or compatible-contained continuation, keep the Goal active and work with `Next: continue active goal`; Codex's status-only `update_goal` is terminal, not a progress channel.

Use only the advertised Codex schema: `status: "complete"` after evidence proves the full objective, or `status: "blocked"` only after the same blocker persists for at least three consecutive goal turns. Never send Grok's `message`, `completed`, or `blocked_reason` fields to Codex.

## Codex slash `/goal`

There is no create-goal API to call, so adopt the goal contract yourself — keep working toward the done condition, reporting at the checkpoints, until it is met or a stop-or-ask condition fires (`Next: adopt goal and continue`). Emit a reusable `/goal` prompt only when the user asks for one or wants to hand the work to a fresh session; otherwise `Prompt: none`, because the block already is the contract.

Include the same durable contract and validation loop. If goals may be disabled, tell the user to enable goals before running the prompt.

## Claude Code slash `/goal`

Same adopt pattern as Codex slash: `Next: adopt goal and continue`; add a reusable `/goal` prompt only on request or for a fresh-session handoff.

Ensure the verification evidence will appear in the conversation, because the evaluator judges from surfaced transcript evidence rather than independently reading files or running commands.

The evaluator gets the condition text and the conversation, not the turn that ran `/goal`, so the condition must stand alone as one end state checkable from the transcript, with its check and an optional bound ("skm Portal steps 1–3 done, tests and page checks shown in the conversation, or stop after 20 turns"). A bare go-ahead ("去做吧", "continue", "do it") reads as "the user said so", which the transcript never shows: it keeps blocking stops until the evaluator rules it impossible (https://code.claude.com/docs/en/goal.md).

## Cursor CLI

There is no verified product goal API or `/goal` command. Cursor skills may be invoked from `/`, but that invokes the skill, not a product Goal.

- For a high-fit executable request in a mode that permits the work, use `Decision: set-now`, `Next: adopt goal and continue`, emit no `/goal`, and work the contract in the current chat. Report checkpoints and terminal evidence in the transcript only.
- If the same Cursor chat is resumed and its transcript contains the exact adopted contract, use `Next: continue adopted goal`; do not draft a second contract or claim a product Goal is Active.
- In a new chat, draft a fresh contract instead of claiming an old goal is Active.
- Cursor's advertised chat commands restore conversation context, not product goal state: `cursor-agent --resume [chatId]` selects a chat (the supplied ID selects a specific one), `cursor-agent --continue` or `cursor-agent resume` restores the most recent chat, and `cursor-agent ls` opens chat selection. Confirm installed help before promising any option. None creates, pauses, completes, or restores product goal state.
- If the user asks only for text to review or copy, use `Decision: suggest`, `Next: provide prompt`, and provide a plain Cursor prompt without a slash prefix.
- If Ask/Plan mode blocks required writes, surface that runtime constraint and do not claim execution started.

## Unknown

Capabilities are uncertain, so do not auto-execute. Emit a portable contract with `Next: ask approval` and let the user start it. Output a contract, not an executable command.

## Unattended Continuation Discipline

Only for unattended or autonomous runs; leave it out of human-in-the-loop sessions, where someone is there to answer.

- A text-only end of turn is a report, not proof the contract is done. Keep the Done items in a checklist the agent updates (to-do tool or file). If a turn ends with items open and no blocker stated, continue, or have the harness or parent send a short message naming the open items. Stop after two or three automatic continuations on the same task so a genuinely stuck run ends and can be reviewed.
- If a background command or subagent the agent started is still running, wait for it and use its output instead of treating the contract as done.
- Unwanted stops while owed work remains: (1) a long summary that announces the next step with no tool call; (2) an offer to carry on unless the user prefers otherwise; (3) a list of decisions for the user when none blocks the rest; (4) stopping to report because the turn was long or a milestone is done. Put status notes and recommendations in the same message as the next tool call. Wanted stops: nothing can move without the user, or the blocker is deliberately protected. This never overrides the Safety Gate or confirmation for risky or destructive actions.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall