garrison-validate
Validate a slice's Definition of Done from its durable gate markers and decide Done vs Implement - read the gate-status.json under a passed-in runDir + sliceId, check every DoD gate (tests/typecheck/lint/build/e2e exit 0, ux-qa gate clean-or-below-threshold for UI, fresh-context review approve, independent test pass, and a VERIFIED walkthrough video), write the durable `validated` gate record, and end with a parseable Done|Implement last line. NOT a test runner (that is garrison-test) and NOT a code review (that is garrison-review). Invoked by the Garrison run engine as its validation step, or standalone only when the user explicitly asks for it. Do NOT auto-invoke this skill from task inference - Garrison decides when its phase skills run.
- License 许可
- MIT
- 最近更新
- 2026-11-07
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- garrison-validate
- description
- Validate a slice's Definition of Done from its durable gate markers and decide Done vs Implement - read the gate-status.json under a passed-in runDir + sliceId, check every DoD gate (tests/typecheck/lint/build/e2e exit 0, ux-qa gate clean-or-below-threshold for UI, fresh-context review approve, independent test pass, and a VERIFIED walkthrough video), write the durable `validated` gate record, and end with a parseable Done|Implement last line. NOT a test runner (that is garrison-test) and NOT a code review (that is garrison-review). Invoked by the Garrison run engine as its validation step, or standalone only when the user explicitly asks for it. Do NOT auto-invoke this skill from task inference - Garrison decides when its phase skills run.
02 资源文件 1
- 脚本scripts/validate.mjs10.8 KB
03 SKILL.md 正文
garrison-validate
Policy-read preamble (soft - D5/D12)
At the start of every invocation, look for the compiled Orchestrator policy at
~/.garrison/orchestrator/policy.json (or $GARRISON_POLICY_PATH).
- Policy present (a Garrison run): it is the single authority. This skill
carries NO model/effort pins - its execution parameters come from the policy
matrix cell for its phase (
matrix[<phase>][<tier>]), and its gate duties from the bindable phase-skill contract (the Orchestrator fitting's PHASE_SKILL_CONTRACT.md): do the phase's work in the run context handed to you (runDir, card, phase), write the phase's gate-status entry under the runDir, and print the phase'sGATE <phase>: <verdict>line before choosing the next list. - Policy absent (standalone, any repo): proceed with the caller-supplied context and sensible defaults - NEVER stop. Report to the caller rather than writing gate-status/run artifacts, and skip any board/run-engine steps.
Standalone Definition-of-Done validator for ONE slice. Reads the slice's durable
gate markers, checks the DoD (including a verified walkthrough video), writes a
durable validated record, and ends with a parseable Done | Implement verdict.
This is the engine of the Kanban Validate list — its verdict is the single
next-list name the router-prompt turns into the card's move (Done when the DoD
holds, Implement when it fails).
It is standalone-runnable from a normal session: it never runs gates, never drives the app, never calls another model — it only reads markers that earlier steps already wrote and renders a deterministic verdict.
What it reads
<runDir>/slices/<sliceId>/gate-status.json— the authoritative per-slice marker (schema:~/.claude/skills/garrison/assets/gate-status.example.json).<runDir>/evidence-index.json— read for context if present; non-fatal when absent.
The DoD it checks (from gate-status.gates)
tests.exit === 0,typecheck.exit === 0,lint.exit === 0,build.exit === 0,e2e.exit === 0— all required.uxQa— required ONLY whenkind === "ui". Passes when NO finding is at or above the loop-back threshold (policy.uxQa.severityThreshold, defaultmajor; order blocker > major > minor > note): verdictclean(no findings), or verdictissueswith every finding below threshold (clean-with-notes). A missing orskippedgate on a UI slice FAILS. Mirrorsgarrison-ux-qa.adversarialReview.verdict === "approve"— the fresh-context Anthropic review (garrison-adversarial-review; renamed fromcodexReview— this gate is no longer a Codex call, see decisions.md). This is a per-slice DoD check only; the run-level cross-model Codex checkpoint (garrison-codex-checkpoint) lives inevidence-index.json'sglobalGate.codexCheckpointand is out of scope for a single slice's DoD.adversarialTest.result === "pass"— the independent Anthropic test pass (garrison-adversarial-test; renamed fromcodexPwTest) — required forui/mixed;n/atolerated (no running app to drive), and n/a for a pure-CLI slice.video.status === "verified"— REQUIRED. Afailed-but-unblockingor missing video FAILS the DoD (matches the global gate's "every slice video verified").
Missing gate-status.json → verdict Implement with the reason printed. Missing
optional fields are handled per the rules above.
The durable marker it writes
It adds a validated object to gate-status.json —
{ status: "Done" | "Implement", at: <iso>, failed: [<reasons>] } — via a
read-fresh → mutate → write-whole-document atomic pattern (temp file + rename),
so other fields are never clobbered.
Output contract
Prints one human-readable line per check (VALIDATE check tests: ok,
VALIDATE check video: FAIL — status="failed-but-unblocking" (need verified), …),
then a VALIDATE verdict: summary, and the FINAL non-empty stdout line is EXACTLY
Done or Implement — nothing after it. The Kanban engine parses that last line.
Invocation
node ~/.claude/skills/garrison-validate/scripts/validate.mjs <runDir> <sliceId>
# flags also accepted: --run-dir <runDir> --slice <sliceId>
# --strict additionally exits non-zero on a Fail (for standalone CLI use)
Exit code is 0 by default (the verdict is the last stdout line, not the exit code);
--strict makes a failing DoD exit non-zero.
Loop role
- In the Kanban pipeline: this is the Validate → garrison-validate list. Its
Done|Implementlast line is the next-list name —Doneadvances the card,Implementsends it back to be built again (the per-card iteration cap is the guard; this skill does NOT replicate the garrison goal loop). - Standalone: report the verdict and the failed reasons; do not run or fix gates.
04 同仓库更多 Skills
pinned-helper
An owned skill the human has pinned so the Improver must not touch it.
legacy-helper
A rarely used helper kept around from an earlier workflow.
human-notes
A human-authored skill not deployed by APM (loose, not in the lock).
garrison-helper
Helps compose and station Garrison Fittings into Faculty role slots.
walkthrough
Record a short, narrated, captioned video walkthrough that proves a finished coding task and shows how it behaves, then self-verify the video via vision on extracted frames and publish it as one scrubbable Tailscale link. Use after completing a change/fix/feature on a web project (Next.js/React etc.) when the user wants visual proof of work, a demo of a user flow, or to avoid manually retesting and watching a long raw screen recording. Triggers on requests like "record a walkthrough", "show me it working", "make a demo video of this", "prove the feature", or finishing a UI/route/form/API change worth demonstrating. Not for walking through a full from-scratch project build.
Trello
Manage tasks via Trello REST API.