Coldfix Library.

Look up a mistake your agent keeps making. Open the lesson to see what went wrong and whether there’s a check you can run on your own code.

Lessons
30
Portable scans
25
Rerunnable proofs
28
Judged lessons
2

Browse lessons

Rerunnable proofs include a check you can run against a fixture or public repository. Judged lessons provide reviewed guidance.

Authorize every privileged action against identity and owner

Bind every privileged action to the authenticated identity and the resource owner or tenant. Path-prefix middleware checks (startsWith) leave routes open. Check cross-origin submissions, and check scope on error and replay paths too.

Portable scan · Rerunnable proof

A test must exercise the failure it names

A test must exercise the failure it names (a "malformed 2xx" test needs a malformed body), avoid racing deadlines, assert specific values rather than aggregates, keep the imports it uses, and be registered where the runner finds it.

Portable scan · Rerunnable proof

Validate at the boundary: reject, don't coerce

Reject, don't coerce: parse dates strictly (a lenient parser normalizes 2026-02-31), never trim passwords, drain request bodies before rejecting, check that a validated object is bound to the identity, version or snapshot it was produced for, check expiry at use time, and check every field and array element, not just the first.

Portable scan · Rerunnable proof

Treat errors as states: PASS, FAIL or INCOMPLETE

Do not collapse ambiguous outcomes into success or failure: separate definitive outcomes (4xx) from uncertain ones (timeout, lost response). A checker that exits non-zero must fail the check. Exit when the upstream exits. Every failure branch must still record accounting and receipts and clean up. Return PASS, FAIL or INCOMPLETE from every check; errors and unavailable tools are INCOMPLETE, and only PASS may open a gate or advance state.

Portable scan · Rerunnable proof

Reject usage and error diagnostics in linter output

Before accepting exit code 1 as expected lint findings, scan all combined stdout and stderr for usage or bare Error: diagnostics. Accept the undocumented-exit exception only when no such operational diagnostic appears anywhere in the output.

Portable scan · Rerunnable proof

Key test results by fully qualified test ID

When parsing or comparing test results, match each result by its fully qualified ID (module, class, and method), not the bare method name. A same-named test in another class must never validate a lesson or a regression. If a bare name is ambiguous, reject it instead of guessing.

Portable scan · Rerunnable proof

Don't assume the environment

No hardcoded hosts, paths, timezones, checkout directory names, runner pools or versions. Resolve binaries in the repository checkout's context, use explicit timezones for date boundaries, and register tests and exports in the config that discovers them.

Portable scan · Rerunnable proof

Preserve relative links when moving documents

When moving a document, update its relative links to preserve their targets. Verify that every relative destination resolves from the document’s new location.

Portable scan · Rerunnable proof

Do not wrap PathChanged= values in JSON quotes

systemd's PathChanged= does not strip JSON-style quotes, so the quoting used for Environment= and ExecStart= must not be reused for path settings. Serialize Path* values with systemd escaping (for example \x20 for spaces and \x5c for backslashes, with % doubled) and check the generated unit with systemd-analyze verify before installing it. Keep the empty assignment that clears the original watch paired with a valid absolute replacement.

Portable scan · Rerunnable proof

Resolve tools before restricting the child PATH

When building a sanitized replay environment, resolve the absolute paths of tools such as tsc and node with shutil.which before replacing PATH, pass those absolute paths to the child, and invoke the tools by absolute path. Do not restrict PATH first, because the toolchain then reports as unavailable.

Portable scan · Rerunnable proof

Keep worktrees and runtime state out of git status

Each repository's own committed .gitignore must ignore /.worktrees/ and every runtime-state, snapshot, budget or host-config path the tool writes inside the checkout. git status --porcelain must be empty after a run in a fresh clone.

Portable scan · Rerunnable proof

Update every caller and test stub when a function signature changes

When you rename or remove a keyword argument, update every call site and every test stub that accepts it, and do not keep passing the removed keyword. Run the affected tests before pushing to confirm the stubs match the new signature.

Portable scan · Rerunnable proof

Run every documented command exactly as written

Every documented or emitted command (README, onboarding, fallbacks, subprocess calls) must work as written from a clean state: include required arguments and flags, never hardcode directory names, set the working directory explicitly, include staged and merge-commit changes when diffing (git diff --name-only HEAD, --cached), and regenerate generated clients before use. Run every command you document, exactly as written, in a fresh clone before pushing.

Portable scan · Rerunnable proof

Use the triggering invocation ID in async failure handlers

An asynchronous failure handler must identify the invocation that triggered it, preferring the MONITOR_INVOCATION_ID passed in by the trigger over the unit's current InvocationID. A failed or unreadable journal must return unknown so the stored state is kept, not an empty set. Test that a later run starting before the handler does not hide a new failure from the triggering run.

Portable scan · Rerunnable proof

Accept closing fences of the same length or longer, with trailing whitespace

A Markdown code fence closes on the same fence character repeated at least as many times as the opener, optionally followed by spaces or tabs. Do not require an exact string match with the opener, or later headings and the final record get swallowed. Add regression tests for a longer closer and a closer with trailing whitespace before pushing.

Portable scan · Rerunnable proof

Filter workflow runs by failure time, not creation time

When collecting workflow runs for a time window, do not exclude runs by creation time before the window, because a rerun can fail long after it was created. Gather candidates from a lookback that covers reruns, then apply the event-time cutoff on updated_at. Check truncation separately for each conclusion listing.

Portable scan · Rerunnable proof

Parse the git subcommand before applying publication restrictions

Before applying push or publication restrictions, identify the actual git executable and subcommand, including global options, so read-only commands that merely mention push in their arguments are allowed while publication subcommands stay denied.

Portable scan · Rerunnable proof

When a producer changes, change every consumer in the same change

When a producer changes (schema, model, route, flag, enum), grep every consumer and validator in the same change. A database schema change needs a migration. A UI call to a backend route needs the route to exist first. Validators must not be stricter than the producer.

Rerunnable proof

Change docs in the same commit as the code they describe

Docs describing behavior (README, runbooks, specs, templates, agent instructions, changelogs, inventories, ledgers) must change in the same commit as the code they describe. Numbers, hashes, byte sizes, dates and "last refreshed" fields must be regenerated from the final state, never typed from memory. Do not document a fix before the code implements it.

Rerunnable proof

Guard read-then-write on shared state

Use a conditional update to claim shared work. Two workers can both read a pending job before either writes, so only the worker whose update changes the row may proceed.

Judged lesson