validate
Use when completed changes need deterministic pre-commit validation or an existing content-bound validation receipt needs checking. NOT for ad-hoc focused tests, code review, or implementation work.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- validate
- description
- Use when completed changes need deterministic pre-commit validation or an existing content-bound validation receipt needs checking. NOT for ad-hoc focused tests, code review, or implementation work.
03 SKILL.md 正文
Deterministic validation
Trigger: When user types /validate or /validate fix
Runs one deterministic validation owner after implementation. Deep adversarial review is separate. A valid receipt can be reused across turns. Changed source, Git state, command definitions, or runtime identity require a new run.
Projects rendered from Loam share .agents/lib/validation.py between Claude and Codex.
It writes a versioned JSON receipt to .validation_passed. The commit adapter checks the
receipt against current contents. A native plugin pre-commit hook may remain as a fallback
in projects that do not ship the shared validator.
Arguments
- (none) → run the gate
fix→ after a targeted repair, re-run the gate
Prerequisites
- All implementation work for the session is complete (files saved)
- The intended source changes are staged but not committed (
git diff --cachedshows exactly the inputs for the next commit). Staging after validation changes the source fingerprint and invalidates the receipt.
Workflow
Step 0: Select the owner
if [ -f .agents/lib/validation.py ]; then
VALIDATOR=.agents/lib/validation.py
elif [ -f seed/.agents/lib/validation.py ]; then
VALIDATOR=seed/.agents/lib/validation.py
else
VALIDATOR=
fi
The root form supports Loam template development. Do not run both forms.
Custom projects configure .agents/validation.json with schema: 1 and a
checks list of {name, argv} objects. Shell checks also require
runtime_dependencies: executable names or paths for every external tool they
use. Declare [] only for checks that use shell builtins alone. These declarations
define the runtime evidence; the validator does not infer arbitrary program
dependencies. Loam receipt reuse requires a directly installed Copier executable
and all required native CLIs, without diagnostic skip overrides.
Step 1: Reuse or run
When $VALIDATOR is set, check the existing receipt first:
python3 "$VALIDATOR" check --root .
Exit 0 means the receipt matches the current validation inputs. Report that receipt and do not rerun its commands. Exit 1 means evidence is absent or invalid. Run the owner once:
python3 "$VALIDATOR" run --root . --label validate
When no shared validator exists, spawn one sam-cc-setup:build-validator agent. That is a
fallback owner, not an additional pass. Give it the changed file list and print its report.
Gate:
VERDICT: PASS→ go to Completion.VERDICT: FAIL→ go to the Fix Loop.VERDICT: BLOCKED→ report the agent's reason to the user and stop.
Fix Loop (triggered when the gate verdict is FAIL)
- Record the exact failed check, exit code, and focused evidence
- Write the smallest targeted repair plan
- Obtain approval when the repair changes the agreed scope
- Implement the repair, run the focused failing check, then re-run
/validate fix
Maximum iterations: 3. After 3 fails on the same issue → stop and escalate. Never bypass a failing check.
Completion
Report every check with its exit status and the receipt fingerprint when present. Do not run a standalone full test suite beside a configured full gate that already includes it. Do not rerun a valid receipt to make it newer. Content validity, not age, controls reuse.
04 同仓库更多 Skills
verify-loam
Prove a Loam change in a real rendered project: copier-render this checkout, then drive headless and interactive Claude Code sessions, stubbed Codex runs and copier updates in the render and capture hook, memory, deny-rule, update and check evidence. Use before shipping any seed, hook, settings or copier.yml change.
hypothesis-tree
Persistent hypothesis tree for multi-step, multi-session investigations. Use when a "why does X fail" question branches into sub-hypotheses that must survive across sessions, or when falsifiable claims need tracking with dated, linked evidence. Maintains one markdown file with add, update, review, and prune subcommands, each gated on verifying the cited evidence file exists and supports the claim. NOT for a single-session bug hunt, a one-command question, or general note-taking.
fable-prompting
Which Claude Fable 5.2 guide sections you can act on from a session, and which Claude Code already injects. Use before writing a Fable session prompt or brief.
catchup
Read-only session bootstrap briefing of git state, commits, handoff, tasks and red flags. Use when resuming work, starting a fresh session, or unsure of project state.
writing-for-agents
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
wizard
Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.