readfirst

v0.34.0
io.github.jeonghun917/readfirst Checked 19 days ago stale Published 15 days ago

What to read and check before changing a file: project rules, risks, checks and tests per file.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

read_list

What to read and check before changing these files: the project rules and risks that apply, the checks to run, the tests that reach the code and the files that use it, and where the file broke before (from git history). Call it before editing.

ParameterTypeDescription
files *arraypaths relative to the repository root

changed_read_list

The same read list for every file changed on this branch since the base (default origin/main, else main), each rule and risk judged against the change, under a verdict: what to do, what is blocked, what was not checked, other repositories. Call it before finishing, then run the checks it lists.

ParameterTypeDescription
basestringgit ref to compare against

find_existing

Before writing a new function, helper or module: the functions, classes, files and map entries that may already do it, matched by words (not meaning) against names and paths. Give a few words about what it does, e.g. "payment retry" or "csv export". If one fits, use or extend it instead of writing another.

ParameterTypeDescription
query *stringa few words about what you are about to write

check_map

Whether .readfirst/map.json still covers the code: files in no group, patterns that match nothing, broken rules.

pending_map_edits

Map edits the hosted upkeep proposed that nobody has merged yet: how many merges they cover and how long they have waited on the readfirst/upkeep branch (from the clone's refs, as of the last fetch). Tell the user when there are any, so the map stays in step.

audit_repo

The whole repository against .readfirst/map.json, as a report: rules and risks whose files changed a lot since they were written, hot spots that moved, groups never filled in, code no test reaches through imports, what readfirst could not see, and the files that broke most in the last 12 months (this part needs no map). Use it before larger work, or to decide what to add to the map.