codex/skills/negative-ledger/SKILL.md
Capture, query, map, compact, reopen, and hand off evidence-backed failed hypotheses, reverted approaches, benchmark regressions, no-effect attempts, and strategy pivots so future work avoids repeated dead ends while stale evidence remains reopenable. Trigger cues: negative ledger, failed attempts, what have we already tried, avoid retrying dead ends, benchmark regressions, reverted approaches, strategy pivot, why did the last approach fail, before another optimization, search-space pruning.
npx skillsauth add tkersey/dotfiles negative-ledgerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
negative-ledger is a reusable protocol for handling disconfirmed hypotheses. Its job is to preserve decision-shaping negative evidence, prune repeated dead ends, and keep old failures reopenable when the artifact state changes.
It is not a generic reviewer and not a final gate. Negative evidence is advisory unless its witness and applicability conditions bind the current artifact state.
learnings as the preferred durable source and write path for reusable negative evidence.fixed-point-driver when negative evidence participates in a full build-review-improve-verify loop.negative-ledger-mapper as the read-only specialist when the work is search-heavy and prior failures materially change routing.negative-ledger-mapper or any read-only specialist is used, require the shared specialist packet contract at ../references/specialist-packet-contract.md; reject stale, wrong-scope, wrapper-leaking, acknowledgement-only, or no-evidence packets before converting them into exclusions.Use this skill when the user asks about or the task contains:
negative ledgerDo not trigger for a trivial one-pass task unless the user explicitly asks for negative-evidence handling.
capture: record a newly witnessed failed or disconfirmed attempt.query: retrieve relevant negative evidence before new work.map: convert prior evidence into current routing constraints and next-search hints.reopen: decide whether stale negative evidence has become eligible again.compact: dedupe and compress repeated failed attempts into narrower entries.handoff: summarize active exclusions, stale/reopened entries, and promising frontier.Prefer sources in this order:
.learnings.jsonl loaded through the learnings CLI.user-context until independently witnessed.A source can seed an entry, but it does not make the entry active. Active negative evidence needs a witness, current-state applicability, an exclusion rule, and reopening criteria.
Use the learnings skill CLI as the preferred durable source when a real repo root and compatible CLI are available.
Before a meaningful query, map, or optimization route choice, build a compact topical query with 4-8 task-defining terms: component, failure surface, benchmark/test, and hypothesis family. Then run read-only recall:
run_learnings_tool recall --query "<component failure-surface hypothesis-family>" --limit 8 --drop-superseded
If the user asks to browse or explore history rather than implement, start with:
run_learnings_tool recent --limit 15
run_learnings_tool query --spec "@$LEARNINGS_SPECS_DIR/status-rank.json"
Treat recall/query hits as candidate evidence. Check the hit's evidence anchors and decide whether its applicability conditions match the current artifact state before creating an active exclusion.
After a witnessed failed attempt, regression, revert, no-effect attempt, or strategy pivot, append through learnings append only when the learning is decision-shaping, transferable, and counterfactually useful.
Use action-oriented statuses:
avoid_for_now: active negative evidence with current applicability.investigate_more: evidence is incomplete or applicability is uncertain.do_less: repeated low-value pattern or no-effect attempt.codify_now: repeated negative evidence should be promoted into a skill, guardrail, or test fixture.review_later: weak but potentially important evidence that should not yet prune routes.Example writeback:
run_learnings_tool append \
--status avoid_for_now \
--learning "When optimizing MVCC small-write throughput, avoid same-leaf bookkeeping batching unless the small-N regression fixture has changed because the prior prototype regressed the representative write loop." \
--evidence "bench: write-small-n regressed 7% on run 2026-05-09 after same-leaf batching prototype" \
--application "Before proposing same-leaf batching again, verify the benchmark fixture and MVCC bookkeeping path changed, then rerun the representative small-N benchmark." \
--tag negative-evidence \
--tag benchmark-regression \
--tag perf
If learnings is unavailable or the workspace is not a verified repo root, keep the ledger in-session and report why durable capture was skipped.
A negative ledger entry is usable only if it has:
If any required part is missing, mark the entry unknown, stale, or need-evidence rather than using it as an exclusion rule.
learnings recall/query when available.For direct use, end with:
negative_evidence_ledger:
- neg_id: NEG-001
hypothesis: "..."
attempted_change: "..."
source_refs:
- kind: benchmark | test | revert | review | trace | diff | learning | user-context | ledger
ref: "..."
summary: "..."
learning_source_ids:
- "lrn-..."
evidence:
- "..."
observed_outcome: "..."
failure_class: no-effect | local-regression | global-regression | unsound | too-complex | stale | unknown
applicability_conditions:
- "..."
current_status: active | stale | superseded | reopened | unknown
exclusion_rule: "..."
reopening_criteria:
- "..."
confidence: high | medium | low | unknown
next_search_hint: "..."
Then add a bottom-line handoff:
### Negative Ledger Handoff
- active_exclusions: ...
- stale_or_superseded: ...
- reopened: ...
- need_evidence: ...
- safest_next_frontier: ...
- learnings_source_ids: ...
- durable_capture: appended: id=... | duplicate-skip: ... | 0 records appended: ... | not-attempted: ...
learnings hit suppress current work without checking evidence and applicability..learnings.jsonl by hand; use the learnings CLI when durable writeback is appropriate..learnings.jsonl until volume or schema pressure justifies a dedicated store.testing
Use before local patching when bugs, regressions, malformed state, crashes, parser failures, migrations, cache drift, protocol problems, compatibility requests, tolerant readers, fallbacks, coercions, retries, catch-and-continue logic, or local workarounds may broaden accepted invalid state.
testing
Use for bug reports, PR/issue prose, reviewer comments, user diagnoses, generated summaries, memories, retrieved context, public tracker context, claimed root causes, proposed fixes, fake-minimal repro risk, or any investigation where natural-language context could anchor the implementation scope.
development
Use when non-trivial work needs Challenge Escalation, latent-intelligence activation, frame-market selection, doctrine operators, dominant-move selection, ablation/surface-tax judgment, reification, review comment law, negative capability, route receipts, or proof-bearing refusal to mutate.
development
Apply Algebra-Driven Design. Use for ADD, denotational design, combinator models, law-driven architecture, domain algebra, property tests, codebase modeling, event sourcing, workflow design, or agentic skill design. If the canonical bundle is unavailable, use this wrapper as the minimal ADD kernel and report the missing bundle path.