build-until-pass
Use when a build, typecheck, lint, or test command is failing and you want the agent to drive it to green on its own — run the…
Use when an agent will work for hours or days across many files and multiple vertical slices. Drives a three-level Project → Sprint → Task hierarchy with isolated per-task execution, a review round-loop, context packs for subagent reviewers, governance-as-code, and
$ npx -y skills add lichamnesia/lich-skills --skill spec-driven-dev-v2 --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/spec-driven-dev-v2Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when an agent will work for hours or days across many files and multiple vertical slices. Drives a three-level Project → Sprint → Task hierarchy with isolated per-task execution, a review round-loop, context packs for subagent reviewers, governance-as-code, and
name: spec-driven-dev-v2 description: Use when an agent will work for hours or days across many files and multiple vertical slices. Drives a three-level Project → Sprint → Task hierarchy with isolated per-task execution, a review round-loop, context packs for subagent reviewers, governance-as-code, and orchestrator-readable state. Designed for long-running drivers like /loop, autoresearch:ship, and goal-driven.
v1 assumed one agent shipping one feature in one session. v2 assumes an orchestrator (or a human) driving the agent across many sessions — possibly for days — and keeps work correct the entire time.
v2 adds:
1. **Three-layer hierarchy** — Project → Sprint → Task 2. **Per-task state** — JSON files an orchestrator can read to resume cold 3. **Review round-loop** — review → feedback → modify → re-review until clean 4. **Worktree isolation** — every task runs in a clean checkout, revertable alone 5. **Context pack** — the briefing a reasoning-blind subagent reviewer needs 6. **Mechanical task gate** — sizing/acceptance/rollback checks enforced by script 7. **Governance-as-code** — boundary rules live in lint/CI, not markdown 8. **Artifact registry** — new rules captured from reviews graduate to lint
Use v2 if any of:
For one-session features, use `spec-driven-dev` (v1) — v2 is overhead for them.
context/
dev/
projects-001-<slug>/ # one project = one RFC
RFC.md # the contract: what & why
PLAN.md # sprint list + dependency graph
STATE.json # {current_sprint, status}
sprints-001-<slug>/ # one sprint = one checkpoint
SPRINT.md # goal, scope, exit criteria
TASKS.md # task status tracker
REVIEWS.md # review round log
STATE.json # {current_task, current_round, next_action}
tasks/
TK-001-<slug>.md # one task = one worktree
TK-002-<slug>.md
reviews/
RV-001-round1.md # round 1 for TK-001
RV-001-round2.md # after modify, round 2
RV-001-round3.md # …until verdict=approve
sprints-002-<slug>/
…
artifact-registry/
rules/
RULE-001-<slug>.md # captured pattern → lint rule
scripts/
governance-check.sh # boundary + state validator
task-lint.sh # mechanical task gateAll state is on disk. No in-memory plan. This is the contract with the orchestrator: it can read `STATE.json`, pick up where the last session left off, and advance one step.
Planner and Builder may be the same model. Reviewer **must** be a fresh subagent with no access to Builder's conversation — that is what makes review work.
**Goal.** Produce the RFC and sprint plan. No code.
1. Draft `RFC.md` from `templates/project/RFC.md` — restate request, list assumptions, define measurable success, set Always/Ask/Never boundaries. 2. Draft `PLAN.md` from `templates/project/PLAN.md` — decompose into sprints. Each sprint must have a shippable checkpoint (even if behind a flag). 3. Initialize `STATE.json` with `current_sprint: "sprints-001-<slug>"`. 4. Human approves RFC and PLAN before any sprint opens.
**Exit criteria.**
**Goal.** Expand one sprint into atomic, independently-reviewable tasks.
1. Write `SPRINT.md` from `templates/sprint/SPRINT.md` — goal, scope, exit criteria, what's deferred. 2. Write one `tasks/TK-NNN-<slug>.md` per task, from `templates/task/TASK.md`. 3. Write `TASKS.md` from `templates/sprint/TASKS.md` — flat status table. 4. Run `scripts/task-lint.sh <sprint-dir>` — every task must pass:
5. Initialize sprint `STATE.json` with `current_task: "TK-001"`, `current_round: 0`. 6. Human approves the sprint.
**Exit criteria.**
Every task runs in a **fresh git worktree** (or branch on a clean tree). This is non-negotiable — it is what makes review and rollback possible.
**Steps.**
1. Orchestrator reads sprint `STATE.json`, picks `current_task`. 2. Create worktree: `git worktree add ../wt-TK-NNN -b tk-NNN-<slug>`. 3. Builder reads **only** the task file + files it lists. No sprint-wide browsing. 4. Implement. Commit in thin slices. Every commit leaves tree green. 5. Run the task's `verify:` command. If red, fix. Do not claim done on red. 6. Update `TASKS.md`: status `built`, link commit range. 7. Update `STATE.json`: `next_action: "review"`, `current_round: 1`.
**Scope discipline.** Touch only files listed in the task. If you
Personal skill collection for Claude Code, Gemini CLI, and OpenAI Codex — by @LichAmnesia. Telegraph-style, opinionated, no filler. Engineering judgment skills plus high-leverage utility tools. 中文版:README-zh.md
Use when a build, typecheck, lint, or test command is failing and you want the agent to drive it to green on its own — run the…
Use when debugging any non-trivial bug — wrong output, crash, flaky test, performance regression, or "it works locally but not in…
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web…
Use BEFORE any spec, plan, or code exists — the Stage 0 gate that decides whether a project should start at all. NO-GO is the…
Analyze Google Analytics 4 data — review website performance, identify traffic patterns, diagnose high-bounce pages, compare time…
Generate or edit images with Google's Nano Banana 2 (`gemini-3.1-flash-image-preview`). Use when the user asks to generate an…