Python · Rust · TypeScript · Svelte · Free and open source

Keep your codebase in shape.

Turn review comments into rules that every change has to pass.

pip install fensu
Get started View on GitHub
src/shop/├── orders/│   ├── main/_place_order.py   imports pay's private helper│   ├── _helpers/validate.py   private to orders│   └── models.py              data only└── pay/    ├── main/_pay.py           entry    └── _helpers/charge.py     private to payfensu checkFFL102  import 'shop.pay._helpers.charge' reaches into internal structure of 'shop.pay' --> src/shop/orders/main/_place_order.py:3:0  |3 | from shop.pay._helpers.charge import charge  | ^  |  = help: Import from classes, models, types, constants, exceptions, or a thin main/ entry. Found 1 fault

Adopt. Enforce. Understand.

Start from the defaults, check every change, then see how the code fits together.

Adopt

01 · Start

Start from a structure that works

fensu init finds your package, writes fensu.toml with every rule on, and checks once.

Initialise a repository

fensu init --yes --name shop-> Empty repository    Created src/shop/__init__.py    Created tests/    Wrote fensu.toml -> Found 0 faults Updated Fensu skill files:  .opencode/skills/fensu-shop/SKILL.md  .claude/skills/fensu-shop/SKILL.md  .agents/skills/fensu-shop/SKILL.md -> Next     fensu check            run anytime    fensu rule FFA001      inspect any code in the output

Enforce

02 · Check

Boundaries, roles and shape in one run

One run checks every rule. Each fault names the contract it breaks and the usual fix.

Read your first faults

fensu checkFFL102  import 'shop.pay._helpers.charge' reaches into internal structure of 'shop.pay' --> src/shop/orders/main/_place_order.py:3:0  |3 | from shop.pay._helpers.charge import charge  | ^  |  = help: Import from classes, models, types, constants, exceptions, or a thin main/ entry.… Found 3 faults
03 · Explain

Look up any rule

fensu rule shows what a code checks and how this project configures it.

Inspect a rule

fensu rule FFL102FFL102 no-cross-package-internals Authored metadata:Family: layersSeverity: errorKind: corePack: NoneAlias: NoneAnalyzers: pythonEnabled by default: yesExecution owner: fileCacheability: undeclaredSource: coreMessage: cross-package imports must use public surfaces, not helpers or internals…
04 · Agents

Give agents the same rules

Generate skills from your active rules, so coding agents follow them too.

Generate agent guidance

fensu skillsUpdated Fensu skill files:  .opencode/skills/fensu-shop/SKILL.md  .claude/skills/fensu-shop/SKILL.md  .agents/skills/fensu-shop/SKILL.md

Understand

05 · Map

See how the code fits together

Trace the Python calls Fensu can prove from any function.

Explore call maps

fensu map place_order --depth 3place_order(...)  src/shop/orders/main/_place_order.py:6├── validate(...)  src/shop/orders/_helpers/validate.py:5└── pay(...)  src/shop/pay/main/pay.py:4    └── charge(...)  src/shop/pay/_helpers/charge.py:1

Each panel shows real fensu output on a small example project.

Make architecture part of every change.

Start with the defaults, then add your own rules in Python.

Open source · Apache-2.0 · Python 3.12+