code-review-and-qualit…
Reviews a code change for correctness, security, maintainability, architecture, performance, and verification gaps, or performs a…
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
$ npx -y skills add hylarucoder/hai-stack --skill hai-goal --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/hai-goalContext preview
The summary Claude sees to decide when to auto-load this skill.
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
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.
For Chinese readers, see `SKILL.zh_CN.md`. The English `SKILL.md` is the execution source of truth.
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.
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:
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.
A goal document is a runnable plan for execution. It answers:
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).
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:
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
让 Coding Agent 把软件迭代做对:从真实问题出发,完成改动,用证据确认结果。 支持:大多数能读取 Skills(SKILL.md)的 Coding Agent,例如 Claude Code、Codex。 hai-stack 由 @海拉鲁编程客 创建。它把一次软件迭代拆成判断、设计、动手、确认、沉淀五步,每一步都有对应的技能。
Reviews a code change for correctness, security, maintainability, architecture, performance, and verification gaps, or performs a…
Audits an entity model field by field: what should exist, what exists now, where each value belongs (column, config, computed…
Challenges an overly conservative, incremental, or compatibility-led proposal with a bold target model, a concrete…
Pressure-tests an ambitious proposal and returns a landing judgment, one minimum viable proof, explicit cuts, success/failure…
Investigates architecture and change complexity from repository runtime paths to bounded modules, React components, and shared…
Produces a ready-to-run ast-grep command or reusable YAML lint/codemod rule, validated against positive and negative fixtures.…