Local repository scanner

What instructions has your repository accumulated?

AI-assisted projects can preserve old rulings, rejected approaches, and missing documents as if they were still current. Hygiene finds the residue so a person can decide what still belongs.

  • No API key
  • No model calls
  • No telemetry
  • MIT licensed

hygiene / scan

$ ./bin/hygiene scan ./project

Scanning source comments and repository prose…

src/checkout.ts:84

GOVERNANCE Owner ruling: NEVER change this flow.

src/worker.js:31

PHANTOM See OLD-DESIGN.md (not found)

2 candidates for human review read-only ✓

Illustrative output using the repository's documented synthetic examples.

Is your coding agent getting sloppy or following old instructions?

Developers often call the experience context rot, context bloat, or context drift. Those phrases describe symptoms, not a single cause.

Ignoring repository instructions

Claude Code or another agent appears to ignore CLAUDE.md, AGENTS.md, or a recent project decision.

Repeating rejected approaches

Cursor, Copilot, Codex, or another agent returns to an approach the team already ruled out.

Hallucinating old architecture

The agent refers to deleted documents, old code structure, or authority that is no longer present.

Accumulating context noise

Comments, instruction files, and Markdown keep growing while their current authority becomes harder to judge.

What Hygiene can establish

Hygiene was created after repository residue caused friction, context bloat, and unintended governance in a real AI-assisted project. Cleaning it improved that workflow. When an agent loads governance comments or stale prose, that material consumes input tokens; contradictions create conflicting context; and prescriptive comments can become unintended governance. Hygiene shows what is stored. The tool and task determine what gets loaded.

Understand context rot, context bloat, and instruction residue ↗

Repositories remember more than code.

Comments and Markdown can carry decisions from a conversation long after the surrounding code changes. A temporary instruction can become apparent policy. A record of disagreement can look like a product requirement. A deleted document can still lend authority to a comment that points to it.

Whether an agent reads or follows any of this depends on its tools and task. Hygiene does not claim to observe a model's context or diagnose its behavior. It asks a smaller, testable question: what instruction-like material is present in this repository?

01A decision is made

Useful context enters a comment or document.

02The project moves on

Code changes; the old instruction remains.

03Authority becomes unclear

People and tools must guess what still applies.

Signals for review.
Not verdicts.

Hygiene uses explicit heuristics. A match is a prompt for human review, and a clean report only means there were no matches under the current patterns and exemptions.

01

Governance in comments

Rules, rulings, and instruction-like language embedded in source comments.

02

Argument residue

Records of rejection or disagreement that may outlive the discussion that produced them.

03

Phantom authority

Comments that cite a document the scanner cannot find in the working tree.

04

Prose growth

Comment and Markdown volume, plus documents whose history shows no net-shrinking revision.

05

Deleted documents

Repository prose that remains retrievable from Git history after deletion.

Design principle
“Precision is the product.”

False positives are treated as first-class bugs. Pattern changes require positive and nearby negative tests.

Small enough to inspect.

Runs locally

Your repository contents are not sent to a service.

Bash + Git

No runtime package installation for the core scanner and hooks.

Read-only first

scan writes nothing and always exits zero.

Hooks are optional

Install commit checks only after reviewing the scan.

One scan. Then tell us what happened.

Clone the repository and point Hygiene at a project you use with a coding agent. Useful findings, false positives, and clean scans are all valuable public-beta evidence.

git clone https://github.com/nouvic/hygiene.git
cd hygiene
./bin/hygiene scan /path/to/your-project

The scan is informational. It does not change hooks, agent settings, or project files.

Works on Linux and macOS with Bash and Git.

Questions worth answering plainly.

Hygiene is intentionally narrow. These answers define what it can establish and where human judgment begins.

Can it fix context rot or a coding agent that is getting sloppy?

Hygiene began with an observed case: repository residue made later AI-assisted work harder to steer, and cleaning it reduced that friction. Loaded repository text consumes context; stale facts conflict with current facts; and prescriptive comments create unintended governance. Hygiene identifies those stored conditions.

What is instruction residue?

Rule-like or decision-like prose that remains in source comments and repository documents after its original context has changed or disappeared.

What does Hygiene scan?

Source comments and repository prose for explicit signals: governance language, argument residue, references to missing documents, prose growth, and deleted documents recoverable from Git history.

Does it send code to an AI service?

No. Hygiene runs locally with Bash and Git. It uses no API key, model calls, or telemetry.

Does a finding mean a comment is wrong?

No. Every finding is a candidate for human review, not a verdict. A clean scan only means the current patterns and exemptions produced no matches.

Does a scan modify the repository?

No. scan is read-only, writes nothing, and always exits zero. Optional Git hooks are installed only when you run the separate install command.

Built from a problem found in real repositories.

Vicky Durel built Hygiene after accumulated residue in an AI-assisted project created context bloat, unintended governance, and friction in later work. Cleaning the repository improved that workflow. The first release turns that observed failure mode into explicit, inspectable heuristics instead of asking another model to judge the repository.

The public beta is the next test: findings, false positives, and clean scans will show where the premise holds and where the patterns need to change.

Read why Hygiene exists ↗

The broader problem has evidence. This tool still needs trials.

Input context is metered in tokens, and both Anthropic and OpenAI publish input-token pricing. An ETH Zurich study found no task-success improvement and over 20% higher inference cost from context files in its evaluated settings.

The originating project shows that this residue can create real friction; the external sources support the broader concern. Public-beta trials will show how often the patterns appear elsewhere and how much cleanup changes outcomes.

Free and open source

Make the repository explain
what still belongs.