Skip to content

ruleprobe v0.3.0rc1

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 12 Oct 23:00
d3ab542

Added

  • The package metadata links the reference site, https://ruleprobe.jakeselby.com, as its
    Documentation URL (#67). The site is built
    from the README, this changelog and the planning corpus at each release tag.
  • ruleprobe corpus scores the rule binder over a synthetic rules zoo shipped at
    ruleprobe/corpus/rules-zoo.json, and prints its precision and recall per catalog entry under
    the detector table; --json carries them under binding. Any false bind fails the command
    whatever --floor says, and on the shipped zoo recall fails under a recorded floor that rises as
    binding improves (#139).
  • The catalog binds rules about the four shipped detectors it left unbound: never compact the
    context (cache-hygiene/compact), never switch models mid-session
    (cache-hygiene/model-switch), never write a secret into a file (secrets/secret-in-write)
    and filter every find (transcript-hygiene/unfiltered-find). A bound rule is measured by the
    shipped detector, and a rule narrower than what the detector counts, such as "never compact
    more than once", "never switch models mid-task" or "never paste secrets", binds nothing, and ruleprobe detectors now marks all six shipped detectors catalog. The
    rules zoo gains positives and near-misses for each; binding recall on it
    rises to 0.71 with no false bind, and the recorded recall floor with it
    (#143).
  • ruleprobe report with no --rules finds your rule files itself: ~/.claude/CLAUDE.md,
    ~/.codex/AGENTS.md and ~/.gemini/GEMINI.md, and each runtime's project rule files at every
    working directory the transcripts recorded, following Claude Code and Gemini @path imports of
    markdown five hops deep. It names each rule by where its file is, reads a file with the same
    bytes as another once, and says in the coverage block that the rule text is today's. A found
    file binds through the catalog alone, since it may be a clone of somebody else's repository: its
    front matter is ignored, every file and import must resolve inside its project (a global file
    anywhere under the home folder), and a file over 1 MB or past 200 in one rules folder is
    skipped; refused and skipped files are counted, never read or named. --no-config turns it off. A section a word unbound now names its nearest catalog entry beside
    that word (#149).
  • ruleprobe bind binds the rule sections the catalog left unmeasured to detectors you choose.
    bind --plan prints each one in sorted order with its nearest catalog detectors and the reason
    it did not bind, and writes nothing; bind --apply FILE records the choices from the edited
    plan in ~/.config/ruleprobe/bindings.yaml, or with --project in the repository's
    .ruleprobe/bindings.yaml. report shows such a rule as user-bound, counts it under
    coverage.user, marks it stale when its section's text changes, and reads no bindings file
    from a project it found through the transcripts. Catalog binding is unchanged
    (#154).

Changed

  • A tool call counts only when it ran, on all three readers. A call the user refused or
    cancelled, a permission denial, and a call stopped before its tool ran make no event, so
    detectors stop counting them: a cancelled Gemini write_file of a key is no longer a
    secrets/secret-in-write hit. A call that ran and failed still counts, so a test run that
    exits non-zero still follows a change for testing/test-after-change. A call interrupted
    part-way, and any Gemini call whose status is cancelled or error, is left out too
    (#114).
  • The origins section names Model Citizen (formerly agent-harness) and links to the current
    repository while preserving Ruleprobe's extraction history
    (#146).
  • "exempt", "exempted", "exempting", "exempts" and "exemptions" join the exception words, so "Run the tests before
    finishing. Docs-only changes are exempt." leaves its section unmeasured rather than binding it
    (#139).
  • Rule sections bind the catalog one sentence at a time, so a section stating several rules is
    measured by each detector its sentences bind, and the coverage block lists them all on the
    section's line. An exception or permission word anywhere in a section still unbinds every rule
    in it, and a condition or contrast word still unbinds only its own sentence; a sentence no longer
    ends inside parentheses or after e.g., i.e., etc., vs. or cf.; and a negated marker such as "no
    exceptions" or "admit no exception" unbinds nothing where its clause ends. ruleprobe corpus
    scores binding per labelled line, on the line each bind's sentence starts on, and the zoo gains
    six near-misses. On the rules zoo, binding recall rises from 0.44 to 0.66 (27/41) with no false
    bind, and the recorded recall floor rises to 0.65
    (#141).
  • The seven original catalog shapes read more of the ways people phrase them, such as "Before
    you hand back, run the tests", "Prefer uv over pip" and "Keep credentials out of source
    control", and each binds only a sentence it covers whole. Anything more, a scope, an aside or
    a second clause, leaves the rule unmeasured, so "Never force-push on Fridays to main", "Use uv,
    not pip, in production" and "Never commit .env files (in the public repo)" bind nothing. A rule
    narrower than its detector by name no longer binds either: "Never skip pre-commit hooks" and
    "Do not pass --no-verify to git commit" leave out the pushes verification/no-verify
    counts, and "Never commit a .env file" names one kind of secret-shaped file. ruleprobe corpus also scores binding on ruleprobe/corpus/rules-heldout.json, 80 sentences written
    from each detector's claim by an author who never saw the patterns, gated on zero false binds
    and a recall floor of its own. Binding recall, with no false bind anywhere: 0.12 (5/40) on
    that independent set, the honest figure for phrasings the catalog was not written against;
    0.61 on a 65-item set added to the zoo, tuned against; 0.67 on the zoo's older held-out
    labels; 0.69 over the whole zoo, whose floor is now 0.68
    (#151).

Fixed

  • Over one --root, --runtime gemini no longer skips a Gemini session outside any chats
    directory without a word while auto reads it. It still reads only files below a chats
    directory at or under the root, and now notes each such session in errors with error set to
    readers.OUTSIDE_CHATS; the report counts them apart from failures. Over the shipped corpus that
    is gemini-writes.jsonl. --root . from inside a chats directory now reads it. A file that
    cannot be opened under auto now lands in errors instead of vanishing
    (#113).
  • secrets/secret-in-write counts a live credential and stops counting text about secrets: a
    variable's name, a placeholder (changeme, your-token, xxx, ${VAR}, one repeated
    character), a pattern source, redaction code, and a value a test file marks
    fake on its own line. A value in an issuer's shape must sit behind its key or prefix, mix
    letters and digits where it is a prefixed token, and be on a line that is no pattern or
    redaction code, so aws_secret_access_key or client_secret with no literal value is no
    hit, while a prefixed name such as GOOGLE_CLIENT_SECRET=... still is. Anthropic and
    OpenAI project keys and GitHub tokens past ghp_ now count. SECRET_PATTERNS and redact are
    unchanged (#110).
  • A JSON detector or bindings file nested too deeply is a finding naming the file, not a
    RecursionError, and one repeating a key in an object is a finding rather than read with the
    last value (#154).
  • transcript-hygiene/whole-file-cat no longer counts a cat inside a { ...; } group or
    ( ... ) subshell whose output is redirected or piped, such as
    { cat header.txt; echo; } > out.txt, which puts nothing in the transcript;
    transcript-hygiene/unfiltered-find skips a find in one the same way. The shell parse reads
    a redirect after a group as a redirect of every command in it, so the redirect and
    sole_segment keys of a command matcher in your own detectors read groups the same way, and
    are undecided, so no hit, in a group the parse cannot follow, such as one never closed
    (#111).

Install: pip install ruleprobe==0.3.0rc1, or run it with uvx ruleprobe@0.3.0rc1 report.