This file is the router for agents and contributors. Keep it short.
- Read
README.mdfor the CLI contract, anddocs/for each command. - Read
CONTRIBUTING.mdfor the build, the checks and the DCO. - Load the workflow from
.agents/skills/<name>/SKILL.md. Each objective goes throughimplement,review,shipandsweep. The objective is done only when the definition of done inimplementis true.
Before you edit, check the branch and the worktree. Other agents can work in the same checkout. Read a file again immediately before you edit it.
cargo metadata -> workspace model -> gates -> report -> render
src/lib.rsholds the modules and the one public function,run.src/main.rsis a thin binary that callsrun.src/workspace.rsreadscargo metadata --no-depsand builds the model.src/check/holds thecheckcommand: the static checks in one run and the combined report.src/gates.rsholds the name of each gate, and computes the parse gate.src/finding.rsholds the shared finding shape and the CodeClimate output.src/section.rsholds the output of one check in each format.src/health.rscomputes the health score of the Rust code.src/report.rsholds the report versions.src/render/writes the human and SARIF output ofdeps,mutantsand the parse gate.src/error.rsholds the CLI errors and their codes.src/parse.rsholds the bounded parse. Each parse goes through this module.src/modules.rsholds the module walk frommoddeclarations. Themutantscommand and the module graph use it. Do not add a second walk.src/attrs.rsreads attributes and names from the syntax tree.src/graph/holds the workspace module graph: crates, modules, items, imports and references, and the name resolution inresolve.rs.src/deps/holds thedepscommand: the unused dependency rules on top of the module graph andcargo metadatawith the resolve.src/visibility/holds thevisibilitycommand.precise/holds--precisemode: a worker process on thera_ap_*crates, behind thepreciseCargo feature. Keep eachra_ap_*crate on one version.src/structure/holds theboundaries,size,complexityanddupescommands.src/structure/mod.rslists its parts. Their configuration is under[workspace.metadata.fallow].src/structure/git.rsspawnsgitfor the size check, and only reads.src/mutation/holds themutantscommand.src/mutation/mod.rslists its parts. A mutated binary runs only throughprocess::run_to_files, under a time limit and the memory guard.
Internal parts are modules, not crates. Shared wire types come from
fallow-report-protocol. Do not define a second copy of them here.
- Use
--format jsonfor machine output and--quietto hide progress. - Exit
0when no enforced gate failed. - Exit
1when an enforced gate failed. - Exit
2for invalid input or an execution error. - With
--format json, an error is a JSON error document on stdout. - Output paths are relative to the workspace root, with
/separators. - The package never installs a binary named
fallow.
cargo fmt --check
cargo clippy --all-targets --locked -- -D warnings
cargo test --locked
cargo deny checkThe Quality gates section in CONTRIBUTING.md lists every gate.
hk run pre-commit --all and hk run pre-push --all run the hook gates.
Write code comments, docs, commit messages, PR text, and changelog entries
for a reader who did not see the session. Do not put the conversation, the
prompt, discarded attempts, or the edit history into them. Describe the code
as it is now. For a regression, state what breaks without the code, and link
the issue. scripts/check-comment-quality.mjs blocks narration and history
comments in the pre-commit hook, the JS Lint CI job, and Claude edits.
.agents/skills/ holds the source of each skill. .claude/skills/ holds
the Claude adapters. scripts/generate-agent-adapters.mjs writes them.
Edit only the source, then run npm run generate:agent-adapters. CI runs
npm run check:agent-adapters.
- Sign commits with
git commit -S -s. The-sflag adds the DCO sign-off. - Use conventional commit prefixes:
feat:,fix:,chore:,docs:,refactor:,test:,ci:. - Do not add AI attribution or
Co-Authored-Bytrailers. - Before you commit, check
git statusand the staged paths.