record_run
Append a validated RunRecord to .squad/runs.jsonl, enforcing schema v2 and 4KB size limit. Designed for single-writer use by lifecycle-owning skills to persist run data.
Instructions
Append one RunRecord to .squad/runs.jsonl. Single-writer contract: only the lifecycle-owning skills should call this — squad (Phase 1 + Phase 10), debug (Phase A + Phase C), question (Phase 1.5 + Phase 3.5), brainstorm (Step 1.5 + Step 5.5). Validates against the RunRecord schema_version:2 and enforces MAX_RECORD_BYTES (4000) via RECORD_TOO_LARGE on overflow. Caller is responsible for matching in_flight↔terminal rows by id. File mode is 0o600 (user-only) on first create. mode_warning.message is stripped of control chars at write time.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_root | Yes | ||
| record | Yes |