agentleFS
suryavbhat20suryavbhat20/Negatives/.claude/skills/negatives-retro/SKILL.md

negatives-retro

Skill2 starsChanged 57 days agoMITView on GitHub

Scorecard for the negative-first workflow. Audits how /negatives is performing — reads the cross-project run ledger, checks git history for deleted or weakened negative tests, probes whether the test fence has teeth, collects regression catches and escaped bugs, and emits a verdict. Use when the user says "negatives retro", "audit the fence", "is the negatives skill working", or asks to evaluate negative tests or the negatives skill in a project.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read every line. Summarize:

    line 15
  2. Distinctive:

    If the ledger is missing or empty, say so and continue with Steps 2–4 for the current repo only.

    line 22
  3. Distinctive:

    Every hit is a finding: commit, author, what was weakened

    line 31
  4. Distinctive:

    If it is NOT a git repository, append-only is UNVERIFIABLE — report that as a finding in itself and recommend version control

    line 32
  5. Very specific:

    Never infer, pad, or guess these numbers.

    line 41
  6. Very specific:

    Every confirmed escape produces a mandatory recommendation: append a new invariant + test for it via /negatives.

    line 42
  7. Distinctive:

    Default (cheap, dependency-free): the sabotage probe.

    line 46
  8. Distinctive:

    Run the negative suite: it MUST go red.

    line 49
  9. Very specific:

    Never modify, weaken, or delete a test — even one you judge broken.

    line 71
  10. Distinctive:

    Never fabricate catches or escapes.

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Negatives Retro — is the fence working?

Evaluation only: this skill NEVER modifies tests, code, or invariants. Findings become recommendations; any change goes through /negatives, which is append-only.

Ledger: ~/.claude/negatives-runs.jsonl (Windows: %USERPROFILE%\.claude\negatives-runs.jsonl). Each line is a JSON object with a type field: "run" (written by /negatives Phase 5) or "retro" (written by this skill, Step 5).

Step 1 — Read the ledger

Read every line. Summarize:

  • Runs per project; failure modes and approved invariants per run
  • checkpoint_edits distribution — if it is 0 across ALL runs, flag it: the human checkpoint may be rubber-stamping. The control point only has value if judgment is occasionally exercised
  • Any red_check that is not "clean"
  • Prior retro lines: the trend of catches vs escapes over time

If the ledger is missing or empty, say so and continue with Steps 2–4 for the current repo only.

Step 2 — Repo audit (current project)

  • Locate the negative tests (@pytest.mark.negative, or the stack's mapped idiom) and count them
  • Registry check: approved-invariant table and pinned error contract present in the module docstring; deferred long tail documented as a backlog
  • Append-only compliance, if this is a git repository:
    • git log --diff-filter=D --name-only -- <negative test paths> — deleted test files
    • git log -p -- <negative test paths> — scan history for removed assert lines, added skip/xfail marks, loosened expected statuses or detail strings
    • Every hit is a finding: commit, author, what was weakened
  • If it is NOT a git repository, append-only is UNVERIFIABLE — report that as a finding in itself and recommend version control

Step 3 — Catches and escapes (the ground truth)

Evidence first: search git history and any CI logs for later changes where a negative-test failure drove a fix (a catch). Then ask the user exactly two questions:

  1. Since this fence landed, has any negative test failed on a later change? (catches)
  2. Have any bugs been found in the fenced features since — and which red-team category does each map to? (escapes)

Never infer, pad, or guess these numbers. No answer = "unknown", reported as unknown. Every confirmed escape produces a mandatory recommendation: append a new invariant + test for it via /negatives.

Step 4 — Teeth probe

Default (cheap, dependency-free): the sabotage probe. Run it ONLY when the worktree is clean (or after copying the target file to a temp backup):

  1. Temporarily break ONE security-critical line in the fenced module — drop a tenant filter from a query, widen a field whitelist, remove an auth check
  2. Run the negative suite: it MUST go red. Record which tests fired
  3. Revert immediately and re-run to confirm green before doing anything else

A sabotage the suite does not catch is a HIGH finding: the fence has a hole at exactly the invariant that mattered.

Thorough option (Python, with the user's consent to install/run): mutmut run scoped to the fenced modules, time-boxed. Surviving mutants on tenant-filter, whitelist, or auth lines are HIGH findings.

Step 5 — Scorecard and verdict

Output a table — Metric | Value | Signal (good/bad/unknown) — covering: runs logged, checkpoint edits, red-check integrity, negative test count, append-only compliance, teeth probe result, catches, escapes, rough cost per run.

Verdict per fenced feature:

  • STRONG FENCE — teeth proven (probe caught), no escapes
  • WEAK FENCE — a sabotage survived, or a confirmed escape exists
  • UNVERIFIED — no git history, no CI signal, and no user answers to Step 3

End with the single highest-value recommendation, then append one line to the ledger:

{"type":"retro","ts":"<ISO date>","project":"<repo dir>","catches":<n or "unknown">,"escapes":<n or "unknown">,"teeth":"caught|survived|skipped","appendonly":"clean|violations|unverifiable"}

Hard rules

  • Never modify, weaken, or delete a test — even one you judge broken. Report it; changes go through /negatives.
  • Sabotage probes require a clean worktree or a temp backup, an immediate revert, and a green re-run confirmed before the retro continues.
  • Never fabricate catches or escapes; "unknown" is a valid and honest cell in the scorecard.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.