From agent-atelier
Validation evidence recording — register a validation run manifest with check results and link it to the work item. Use when a validator finishes a validation run, when recording test evidence, or when the orchestrator needs to formally register a validation outcome. Triggers on 'validate', 'record validation', 'register run', 'validation complete', 'validation failed', 'record evidence', 'VRM done', or 'validation manifest'.
npx claudepluginhub ether-moon/agent-atelier --plugin agent-atelierThis skill uses the workspace's default tool permissions.
Registers a validation run manifest (test results, check outcomes) and updates work item status based on the outcome. Bridges the validator finishing its work and the orchestration system knowing the result.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Guides code writing, review, and refactoring with Karpathy-inspired rules to avoid overcomplication, ensure simplicity, surgical changes, and verifiable success criteria.
Share bugs, ideas, or general feedback.
Registers a validation run manifest (test results, check outcomes) and updates work item status based on the outcome. Bridges the validator finishing its work and the orchestration system knowing the result.
candidate_validating statusactive_candidate_set in loop-stateTwo-phase write — the manifest and orchestration state have different ownership.
Phase 1 — Write manifest to .agent-atelier/validation/<run-id>/manifest.json via Write tool (Validator-owned directory, not state-commit). Create the directory if needed.
Phase 2 — Update orchestration state via state-commit:
echo '<transaction-json>' | <plugin-root>/scripts/state-commit --root <repo-root>
Phase 1 must succeed before Phase 2. If Phase 2 fails (stale revision), the manifest is a harmless orphan — re-read and retry Phase 2 only.
recordRegisters a validation run manifest and updates the work item status based on the outcome.
Parse the validation payload. Required fields:
id — run identifier (e.g., RUN-2026-04-08-01). Generate from date if not provided.candidate_set_id — required (must match active_candidate_set.id)work_item_ids — required array of WI IDs (must match active_candidate_set.work_item_ids)candidate_branch — requiredcandidate_commit — requiredstarted_at — required (UTC ISO-8601)finished_at — required (UTC ISO-8601)status — required, must be one of: passed, failed, environment_errorchecks — required array of {"name": "...", "status": "passed|failed"} objectsevidence_refs — array of paths to evidence files (optional but recommended)Read state. Read .agent-atelier/work-items.json and .agent-atelier/loop-state.json. Note both revisions.
Validate preconditions. Active candidate set must exist; candidate_set_id, work_item_ids, candidate_branch, and candidate_commit must all match the active set. All WIs must exist with status candidate_validating.
Verify evidence. If evidence_refs provided, verify each path exists on disk. Warn (do not block) if empty — evidence may be generated separately.
Phase 1: Write manifest. Create directory .agent-atelier/validation/<run-id>/ if needed. Write the full manifest JSON to .agent-atelier/validation/<run-id>/manifest.json.
{
"id": "RUN-2026-04-08-01",
"candidate_set_id": "CS-001",
"work_item_ids": ["WI-018", "WI-019", "WI-020", "WI-021"],
"candidate_branch": "feat/phase-2",
"candidate_commit": "abc1234",
"started_at": "2026-04-08T14:10:00Z",
"finished_at": "2026-04-08T14:17:00Z",
"status": "passed",
"checks": [
{"name": "pnpm test checkout", "status": "passed"}
],
"evidence_refs": [
".agent-atelier/validation/RUN-2026-04-08-01/report.md"
]
}
Phase 2: Update orchestration state. The update depends on the manifest status:
If passed:
status → reviewing. Bump each item revision.If failed: (atomic demotion + candidate set clear — fate-sharing)
status → readypromotion.candidate_branch → nullpromotion.candidate_commit → nullpromotion.status → not_readyrevisionactive_candidate_set → null. Bump revision, set updated_at.candidate clear needed).TaskList for a task whose subject starts with "WI-NNN:". If found, call TaskUpdate with status: "pending". If 2+ matches, use the highest-ID task. Sync is best-effort — failures do not block the state commit.If environment_error:
candidate_validating. The environment issue is not the code's fault.Check commit result. If stale revision, re-read and retry Phase 2 only.
Arguments:
<json-or-fields> — manifest data as inline JSON or structured fields--manifest-path <path> — read an already-written manifest; perform Phase 2 onlyRecord a passed validation run (inline JSON):
validate record --request-id REQ-401 --json '{"id":"RUN-2026-04-08-01","candidate_set_id":"CS-001","work_item_ids":["WI-018"],"candidate_branch":"feat/phase-2","candidate_commit":"abc1234","started_at":"2026-04-08T14:10:00Z","finished_at":"2026-04-08T14:17:00Z","status":"passed","checks":[{"name":"pnpm test","status":"passed"}]}'
Result: manifest written, WIs move to reviewing, "changed": true.
Record a failed run from an existing manifest:
validate record --request-id REQ-402 --manifest-path .agent-atelier/validation/RUN-2026-04-08-02/manifest.json
Result: WIs demoted to ready, candidate set cleared, native tasks synced to pending.
Environment error (no state changes):
validate record --request-id REQ-403 --json '{"id":"RUN-2026-04-08-03",...,"status":"environment_error",...}'
Result: manifest written, "changed": false. Orchestrator decides next steps.
All timestamps are UTC ISO-8601 with Z suffix: 2026-04-08T12:00:00Z
| Code | Meaning |
|---|---|
0 | Success |
1 | Usage/validation error (missing fields, invalid status, evidence missing) |
2 | Precondition failed (wrong WI status, branch/commit mismatch) or stale revision |
3 | Work item not found |
4 | Runtime failure (disk write, directory creation) |
Payload via --json '<inline>', --input <path>, or --manifest-path <path> (Phase 2 only).
Required: --request-id <id> for idempotency tracking.
Revision handling: track the current revision of every JSON file you mutate and use the matching expected_revision per file in the state-commit transaction. Do not collapse multi-file revisions into one shared value.
Returns JSON to stdout:
{
"request_id": "REQ-401",
"accepted": true,
"committed_revision": 13,
"changed": true,
"artifacts": [".agent-atelier/validation/RUN-.../manifest.json", ".agent-atelier/work-items.json"]
}
Artifacts vary by status: passed includes work-items.json; failed includes both work-items.json and loop-state.json (atomic demotion + set clear); environment_error returns "changed": false with only the manifest. Diagnostics go to stderr.
request_id + same payload → return previous result with "changed": false, "replayed": truerequest_id + different payload → reject with exit code 1based_on_revision → reject with exit code 2| Condition | Exit | Action |
|---|---|---|
| WI not found | 3 | Report missing WI, list available IDs |
WI not candidate_validating | 2 | Report current status, explain expected |
| WIs not in active candidate set | 2 | Report active set, suggest waiting |
candidate_set_id mismatch | 2 | Report manifest vs active set mismatch |
| Branch/commit mismatch | 2 | Report manifest vs active set mismatch |
| Evidence file missing | 1 | List missing evidence_refs paths |
| Manifest already exists | 0 | Report path, suggest checking for duplicates |
| Invalid manifest status | 1 | Report value, list valid statuses |
| Stale revision | 2 | Report current vs expected, ask to re-read |
passed, failed, environment_error. Do not use running — record only after the run finishes.../../references/wi-schema.md for normalization rules on all work item writes.