Skip to content
Skill Authoring
Skill

/hai-goal

Creates or rewrites a goal document for ambiguous, multi-phase, high-risk, or explicitly planned execution: verifiable outcome, boundary, current state, phases, proof-bearing todos, dry-run, and Go/No-Go. Use when the user asks for a goal, plan, phases, todos, or to re-anchor an

From plugin
hai-stack
39519 skills

Claude Code

$ npx -y skills add hylarucoder/hai-stack --skill hai-goal --agent claude-code

SKILL.md

hai-goal.SKILL.md
name: hai-goal
description: |
  Creates or rewrites a goal document for ambiguous, multi-phase, high-risk, or explicitly planned execution: verifiable outcome, boundary, current state, phases, proof-bearing todos, dry-run, and Go/No-Go. Use when the user asks for a goal, plan, phases, todos, or to re-anchor an existing plan(定目标、拆阶段、执行计划). Do not interpose it on a small implementation whose outcome and verification are clear; hand ready work to normal execution, using hai-tdd only for suitable behavior changes.

Hai Goal

For Chinese readers, see `SKILL.zh_CN.md`. The English `SKILL.md` is the execution source of truth.

Overview

Use this skill when execution is ambiguous, spans meaningful phases, carries material risk, or the user explicitly asks for a plan. It turns the work into a verifiable target, boundary, route, and proof. It also rewrites an existing plan around a newly stated target. A small task with an obvious outcome and verification should proceed directly without ceremony.

Core Principle

Write the goal before you go.

When this skill's trigger conditions apply, do not start implementation while hoping execution will clarify the target. The "run and watch" failure mode looks like:

  • Start implementation before the target is stable.
  • Discover missing decisions halfway through.
  • Patch local problems instead of shaping the whole route.
  • Let phase boundaries emerge accidentally.
  • Forget to define what counts as done.
  • Treat validation as an afterthought.

Complex or unclear work should first become a goal document with boundaries, phases, dependencies, and proof. When a plan already exists, the target takes priority over the old plan shape.

The Goal Document

A goal document is a runnable plan for execution. It answers:

  • **Target**: what are we trying to make true?
  • **Boundary**: what is included, excluded, and intentionally deferred?
  • **Current state**: what exists now, with known constraints and risks?
  • **Route**: what phases get us there?
  • **Rules**: what constraints or working agreements govern each phase?
  • **Todos**: what concrete tasks belong in each phase?
  • **Progress management**: for multi-phase execution, what checklist should stay current?
  • **Verification**: how do we prove each phase, and the whole goal, is done?
  • **Stop conditions**: when should we pause, ask, or revise the plan?

The exact output shape — including the conditional rewrite sections — lives in `references/output-template.md`. Read it before finalizing; do not re-derive the field list here.

A fresh goal document and a plan rewrite use the same template; the rewrite case additionally fills the **Plan Rewrite Notes** and **Drift Diagnosis** sections (see step 4).

Workflow

This single sequence covers every case — making a goal from vague intent, crafting phases for a known goal, and rewriting an existing plan around a target. Run step 4 only when an existing plan is provided.

1. **Freeze the intent.** What does the user want to start? What outcome would make the work worth doing? What must not be broken? What is still unknown?

2. **Make the goal verifiable.** Rewrite vague activity into a target outcome. Define the boundary (included, excluded, deferred). Choose the strongest available evidence source — test, metric, review, artifact, command, behavior, user signal, or trace — and a clear pass/fail rule with a confidence note, and name the judgment owner — who or what is authorized to declare it done. Quantify when useful, but do not invent fake metrics. If one intent contains multiple goals, split them.

3. **Convert the goal into a goal document.** Record assumptions and unresolved decisions, identify affected surfaces (docs, code, schema, API, UI, tests, workflows, links), and define what "ready to execute" means.

4. **If rewriting an existing plan, re-anchor it to the target.** Extract the plan's phases, todos, assumptions, dependencies, and highlighted focus points. Diagnose drift — goal drift, phase drift, validation drift, compatibility drift, cleanup drift — and decide per item what to keep, reorder, merge, or remove. Move high-risk, high-uncertainty, or high-leverage work earlier unless dependencies forbid it. Keep old wording only when it remains accurate under the new target.

5. **Split into phases.** Each phase should produce a reviewable state. Split by learning, risk reduction, user-visible value, system boundary, dependency order, vertical slice, decision boundary, or validation boundary — never by department, file type, arbitrary chronology, or topic heading. Avoid phases that only say "implement X" without proof.

6. **Define phase rules.** For each phase, state what is allowed, what is explicitly not allowed yet, what compatibility or migration rule applies, what documentation update is required, and what validation must pass before moving on. Concrete patterns to draw from:

  • Do not touch implementation until the target doc is updated.
  • This phase may rename internal callers directly; no compatibility shim unless a public contract exists.
  • This phase may only change docs and tests, not production code.
  • This phase exits only when the command/test/check passes.
  • Stop if a todo requires a product decision not present in the goal document.

7. **Create todos with action + surface + proof** (see template). Make them concrete enough to execute without guessing, mark dependencies and blockers that affect order, and keep unrelated cleanup out unless the phase goal requires it.

8. **Add progress management when execution will continue across phases or sessions.** Use one phase checklist with nested proof-bearing todos. Mark a phase complete only after its exit proof passes, and record any reprioritization instead of silently following stale order. Omit this machinery for a short one-session plan.

9. **Dry-run the route.** Walk the phases in order without executi

Read more
@hylarucoder
Ships withhai-stack

让 Coding Agent 把软件迭代做对:从真实问题出发,完成改动,用证据确认结果。 支持:大多数能读取 Skills(SKILL.md)的 Coding Agent,例如 Claude Code、Codex。 hai-stack 由 @海拉鲁编程客 创建。它把一次软件迭代拆成判断、设计、动手、确认、沉淀五步,每一步都有对应的技能。

Stars on GitHub

Momentum

stars in total
395
Star history of hylarucoder/hai-stack on GitHub, a chart by star-history.com

Other skills on hai-stack.

geju

geju

Challenges an overly conservative, incremental, or compatibility-led proposal with a bold target model, a concrete…

goudi

goudi

Pressure-tests an ambitious proposal and returns a landing judgment, one minimum viable proof, explicit cuts, success/failure…

hai-architecture

hai-architecture

Investigates architecture and change complexity from repository runtime paths to bounded modules, React components, and shared…

hai-ast-grep

hai-ast-grep

Produces a ready-to-run ast-grep command or reusable YAML lint/codemod rule, validated against positive and negative fixtures.…

More skills from other plugins.

gstack-openclaw-ceo-review

gstack-openclaw-ceo-re…

Use when asked to review a plan, challenge a proposal, run a CEO review, poke holes in an approach, think bigger about scope, or…

gstack2w138k
@garrytan@garrytanInstall Skill
book-to-skill

book-to-skill

Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…

@virgiliojr94@virgiliojr94Install Skill
distilly

distilly

Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…

@titanwings@titanwingsInstall Skill

Questions about hai-goal.

Which coding agents can use hai-goal?
hai-goal installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.