Memory, safety, and progress
Use this sub-skill when an experiment loop needs to remember what happened,
avoid repeating dead ends, detect unsafe/stale progress, or report status.
It is an operating guide for the project state contract; it is not the loop
orchestration guide and it does not launch experiments, inspect GPUs, install
skills, or mutate an Obsidian vault.
Operating rules
- Treat
PROJECT_BRIEF.md as frozen Tier 1 context. Never rewrite it as a
side effect of logging or compaction.
- Use
workspace/MEMORY_LOG.md for bounded milestones and recent decisions.
Use the ledger and journals for durable, append-only detail; do not pretend
that a compacted memory log is the complete history.
- Record every cycle outcome in
workspace/experiments.jsonl when the ledger
is enabled. One JSON object per line is the recovery boundary.
- Keep
DEAD_ENDS.md and INSIGHTS.md append-only. Rotation moves the full
old file to a uniquely named .bak; never delete an archive to make a
rotation appear successful.
- Interpret safety, stagnation, and phase-gate results as signals. They are
advisory: stop, back off, change direction, or ask for a human decision;
do not fabricate a result from a signal.
- A known failed terminal outcome stays failed everywhere. In particular,
Slurm
TIMEOUT, CANCELLED, OUT_OF_MEMORY, NODE_FAIL, and similar
terminal states must remain failed in state, ledger, and dashboards.
- For inspection, run the bundled read-only script. It reads a supplied
project and emits checks; it never writes state, journals, exports, or
archives.
First response to a progress request
- Read the brief, memory log, counter, state, ledger tail, journal tails, and
cycle-time file if present.
- Report missing, malformed, stale, or unreadable files explicitly.
- Separate observed values (ledger/state) from derived values
(best metric, stagnation, gate, rate-limit wait).
- If
state.status == "failed", show the terminal state and do not downgrade
it to completed, idle, or “probably okay”.
- If history is malformed, preserve the original bytes and use the valid
records only; recovery is append-first, not rewrite-first.
Quick inspection
From this skill directory, use:
python scripts/inspect_progress_state.py --project <project>
Useful bounded variants are --format json, --ledger-tail 10,
--journal-tail 1200, --metric-key acc, --metric-direction higher_better,
--gate-threshold 0.8, --max-cycles-per-hour 6, and --now <unix-seconds>.
Add --workspace <relative-or-absolute-workspace> when the project does not
use the default workspace directory. The script only reads; it is safe for
triage and synthetic fixtures.
Choose the right state mechanism
| Need |
Mechanism |
Truth boundary |
| Frozen goal and constraints |
PROJECT_BRIEF.md |
Human/project input |
| Small context for the next think step |
MEMORY_LOG.md |
Bounded, lossy view |
| Every cycle and outcome |
experiments.jsonl |
Append-only event history |
| “Do not retry this” |
DEAD_ENDS.md |
Append-only, rotated |
| Durable observation |
INSIGHTS.md |
Append-only, rotated |
| Current process/result snapshot |
state.json |
Mutable current state |
| Restart-safe cycle number |
.cycle_counter |
Plain integer |
| Anti-burn starts |
.cycle_times |
JSON list of timestamps |
Read the linked references for exact constructors, fields, formulas, output
formats, recovery actions, and failure handling:
- memory-ledger-journal.md
- safety-and-gates.md
- progress-export.md
- troubleshooting.md
Handoff boundaries
Route core THINK/EXECUTE/REFLECT orchestration to
autonomous-experiments. Route GPU discovery, utilization, and resource
reservation to gpu-and-resource-operations. Route source skill installation
or importing to skills-and-installation. This sub-skill may interpret their
reported state, but must not silently take over those responsibilities.
When a report is requested, include: project goal; cycle count; current state;
latest valid ledger records; metric direction and best value; stagnation and
phase-gate verdicts with their parameters; journal tails and archive presence;
active violations and rate-limit wait; export target/status; and unresolved
file or backend errors. A missing metric is “no metric yet”, not zero. An
indeterminate backend outcome is “unknown”, not success.
1---2name: memory-safety-and-progress3description: "Preserve truthful experiment context with bounded memory, append-only history, safety signals, gates, and read-only progress inspection."4disable-model-invocation: true5metadata:6 source: https://skillmd.com/skills/vectorspacelab/memory-safety-and-progress7 disco-role: operating8license: Apache 2.09---1011# Memory, safety, and progress1213Use this sub-skill when an experiment loop needs to **remember what happened,14avoid repeating dead ends, detect unsafe/stale progress, or report status**.15It is an operating guide for the project state contract; it is not the loop16orchestration guide and it does not launch experiments, inspect GPUs, install17skills, or mutate an Obsidian vault.1819## Operating rules20211. Treat `PROJECT_BRIEF.md` as frozen Tier 1 context. Never rewrite it as a22 side effect of logging or compaction.232. Use `workspace/MEMORY_LOG.md` for bounded milestones and recent decisions.24 Use the ledger and journals for durable, append-only detail; do not pretend25 that a compacted memory log is the complete history.263. Record every cycle outcome in `workspace/experiments.jsonl` when the ledger27 is enabled. One JSON object per line is the recovery boundary.284. Keep `DEAD_ENDS.md` and `INSIGHTS.md` append-only. Rotation moves the full29 old file to a uniquely named `.bak`; never delete an archive to make a30 rotation appear successful.315. Interpret safety, stagnation, and phase-gate results as signals. They are32 advisory: stop, back off, change direction, or ask for a human decision;33 do not fabricate a result from a signal.346. A known failed terminal outcome stays failed everywhere. In particular,35 Slurm `TIMEOUT`, `CANCELLED`, `OUT_OF_MEMORY`, `NODE_FAIL`, and similar36 terminal states must remain failed in state, ledger, and dashboards.377. For inspection, run the bundled read-only script. It reads a supplied38 project and emits checks; it never writes state, journals, exports, or39 archives.4041## First response to a progress request4243- Read the brief, memory log, counter, state, ledger tail, journal tails, and44 cycle-time file if present.45- Report missing, malformed, stale, or unreadable files explicitly.46- Separate **observed** values (ledger/state) from **derived** values47 (best metric, stagnation, gate, rate-limit wait).48- If `state.status == "failed"`, show the terminal state and do not downgrade49 it to `completed`, `idle`, or “probably okay”.50- If history is malformed, preserve the original bytes and use the valid51 records only; recovery is append-first, not rewrite-first.5253## Quick inspection5455From this skill directory, use:5657```bash58python scripts/inspect_progress_state.py --project <project>59```6061Useful bounded variants are `--format json`, `--ledger-tail 10`,62`--journal-tail 1200`, `--metric-key acc`, `--metric-direction higher_better`,63`--gate-threshold 0.8`, `--max-cycles-per-hour 6`, and `--now <unix-seconds>`.64Add `--workspace <relative-or-absolute-workspace>` when the project does not65use the default `workspace` directory. The script only reads; it is safe for66triage and synthetic fixtures.6768## Choose the right state mechanism6970| Need | Mechanism | Truth boundary |71|---|---|---|72| Frozen goal and constraints | `PROJECT_BRIEF.md` | Human/project input |73| Small context for the next think step | `MEMORY_LOG.md` | Bounded, lossy view |74| Every cycle and outcome | `experiments.jsonl` | Append-only event history |75| “Do not retry this” | `DEAD_ENDS.md` | Append-only, rotated |76| Durable observation | `INSIGHTS.md` | Append-only, rotated |77| Current process/result snapshot | `state.json` | Mutable current state |78| Restart-safe cycle number | `.cycle_counter` | Plain integer |79| Anti-burn starts | `.cycle_times` | JSON list of timestamps |8081Read the linked references for exact constructors, fields, formulas, output82formats, recovery actions, and failure handling:8384- [memory-ledger-journal.md](references/memory-ledger-journal.md)85- [safety-and-gates.md](references/safety-and-gates.md)86- [progress-export.md](references/progress-export.md)87- [troubleshooting.md](references/troubleshooting.md)8889## Handoff boundaries9091Route core THINK/EXECUTE/REFLECT orchestration to92`autonomous-experiments`. Route GPU discovery, utilization, and resource93reservation to `gpu-and-resource-operations`. Route source skill installation94or importing to `skills-and-installation`. This sub-skill may interpret their95reported state, but must not silently take over those responsibilities.9697When a report is requested, include: project goal; cycle count; current state;98latest valid ledger records; metric direction and best value; stagnation and99phase-gate verdicts with their parameters; journal tails and archive presence;100active violations and rate-limit wait; export target/status; and unresolved101file or backend errors. A missing metric is “no metric yet”, not zero. An102indeterminate backend outcome is “unknown”, not success.