Determine the goal scope with this source-of-truth order:
- the user's explicit goal request
- current session decisions, review outcomes, blockers, or accepted follow-ups
- local backlog, specs, planning docs, release notes, or project instructions
- the current worktree as evidence of in-progress work
Match the ambition of the user's request. If the user describes a finished
outcome (a completed refactor, a released feature, a passing test suite),
the goal must describe the whole outcome, not a hand-picked starter slice.
The skill compresses the user's stated objective into a bounded field; it
does not substitute a smaller objective the agent considers safer.
Capture intent, not procedure. When the user's ask is about an outcome
("make the UI feel like the reference app", "auth should be proper", "the
editor should work"), the goal must encode that outcome and its quality bar,
not a hand-derived checklist of files, feature rows, or setup steps. A goal
that can be satisfied by green checks while the user-visible product still
feels wrong is under-specified.
Reference-product parity needs explicit comparison criteria:
- Name the reference product, screenshots, repo, command, or workflow the
next agent must compare against.
- State that feature-count parity, smoke tests, or docs alignment are not
completion proxies for look-and-feel parity.
- Require evidence from the actual user-facing surface, such as screenshots,
terminal captures, interaction transcripts, or browser/TTY automation.
- Pin the exact invocation, runtime mode, environment, initial state, and
keystroke/click sequence that counts. Do not let the next agent verify a
special debug flag, alternate runtime, fake provider, or different trigger
unless the user explicitly accepts that as the product path.
- Include the reference's visible state fields in the quality bar when they
matter (theme colors, provider/model label, working directory, footer,
command palette trigger, selection highlight, and status text). "Similar
structure" is not enough when the complaint names concrete visual or
interaction differences.
- Include at least one fake-completion blocker: e.g. "not done if the
startup screen still differs materially from the reference", "not done if
tab completion is absent", or "not done if the reference command list
exists only in docs."
For web UI/browser visual parity, require visual or render evidence that
would catch missing CSS, fonts, images, JavaScript, layout, or interaction
assets. A route returning 200, containing expected text, passing a content
marker test, or showing a green smoke test is not enough when the user asked
for a comparison frontend or visual parity. Require screenshots and/or
computed-style/image-load assertions against the named reference, including
representative image naturalWidth > 0 and key typography/layout checks
when relevant.
For multi-route web UI parity, require evidence for every route/page in
scope, or explicitly name sampled routes and why the unsampled routes are
out of scope. Homepage-only visual checks cannot satisfy a site-wide parity
goal. If a route has distinct widgets or layouts, require route-specific
assertions for those widgets, such as profile images, tabs, cards,
galleries, forms, calendars, lightboxes, or maps.
Classify the goal before drafting:
- Full-task goal — default when the user describes an outcome.
- Slice goal — only when the user explicitly asked for a small named slice
("just the test-isolation step", "only the first move", etc.).
If unclear whether the user wants a full-task goal or a slice goal, ask one
concise question before drafting.
For phased or long-running goals, classify each phase before drafting:
- Required phases — must be completed before the goal can be marked done.
- Conditional phases — must be evaluated and implemented only if their
trigger conditions are met.
- Out-of-scope phases — must not be pulled into the goal.
If the user wants a full-task goal and the source plan contains optional,
conditional, or later phases, state that boundary explicitly. Do not use
vague wording such as "continue through the phases" when it lets the next
agent stop after the first phase or treat optional work as required.