The code graph
How Rimfe maps your code to your docs, keeps internal code out of public patches, and flags stale claims in audits.
Rimfe keeps a map of your code and your docs. The map links a change deep in a helper to the feature it belongs to. It is built from your default branch and updated as you merge.
A pull request reviewed while the map is still catching up on a merge uses the last complete map. Rimfe reads the code merged since from the pull request's base, so new names are not reported as missing.
What the map holds
The graph connects the things your code does:
- Calls: which function uses which.
- Renders: which screen shows which component.
- Routes: which URL runs which code.
- Jobs and events: what runs in the background, and what triggers it.
- Keys: the names that code and docs share, such as environment variables, config keys and flags.
Your docs are in the map too. A statement in a page, such as "the timeout option defaults to 30 seconds", is a claim, and it is linked to the code it describes.
Which pages a change affects
For a changed function, Rimfe walks outward through the map to the things people can see or call: a route, a screen, a command, a public export. Today this walk runs beside the review and is recorded for measurement; it does not add pages to the ones checked. The walk stops at shared helpers that nearly everything uses, so a change to a logger would not point at every page. You can name those helpers with graph.hubs.
You do not need to set anything up for this. When a library has an unusual layout, entryPoints tells Rimfe where its public surface starts.
Who may see what
Every page has an audience: public users, your team, API readers, changelog readers, help center readers or coding agents (agent context files). A suggested fix is written for the audience of the page it edits.
Each audience has a list of things it must never read. Before a patch is offered, Rimfe checks it against that list:
| Audience | A patch must not name |
|---|---|
| Public and help center | Code names, internal file paths, feature flag keys, unreleased features or ticket ids. |
| API reference | Internal file paths, feature flag keys or unreleased features. |
| Changelog | Feature flag keys or internal file paths. |
| Internal and agent context files | Nothing is blocked. |
In short, a public patch never names internal code. A patch that fails the check is held back, and the finding stays so you can write the fix yourself. Set an audience for a folder in .rimfe.json when the default is wrong.
Stale claims and broken references in audits
An audit also uses the map, with no code change involved:
- A broken reference is a name or link in a page that the code or the docs no longer have.
- A stale claim is a statement whose linked code is gone. The page may still be true, so Rimfe asks you to look.
Both show as findings in the audit, like any other. See Findings and checks.
Related
Last updated