Python · Rust · TypeScript · Svelte · Free and open source
Keep your codebase in shape.
Turn review comments into rules that every change has to pass.
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
src/shop/├── orders/│ ├── main/_place_order.py entry│ ├── _helpers/validate.py private to orders│ └── models.py data only, but holds a function└── pay/ ├── main/pay.py entry └── _helpers/charge.py private to payfensu checkFFR001 models role files may contain only structured runtime models --> src/shop/orders/models.py:10:0 |10 | def order_total(orders: list[Order]) -> int: | ^ | = help: Keep imports and public structured models only. Accepted models are dataclasses and Pydantic BaseModel subclasses; move functions and other declarations to their owning role module. Found 1 fault
src/shop/├── orders/│ ├── main/_place_order.py entry│ ├── _helpers/validate.py private to orders│ └── models.py data only└── pay/ ├── main/pay.py takes positional arguments └── _helpers/charge.py private to payfensu checkFFS120 function with 2 parameters has 2 positional parameters --> src/shop/pay/main/pay.py:4:0 |4 | def pay(order_id: str, cents: int) -> str: | ^ | = help: Insert * before the first non-receiver parameter so every call argument names its meaning. Dunder methods are exempt. Found 1 fault
src/shop/├── orders/│ ├── main/_place_order.py entry│ ├── _helpers/validate.py private to orders│ └── models.py data only└── pay/ ├── main/pay.py entry └── _helpers/charge.py private to payfensu checkFound 0 faults 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
Adopt. Enforce. Understand.
Start from the defaults, check every change, then see how the code fits together.
Adopt
Start from a structure that works
fensu init finds your package, writes fensu.toml with every rule on, and checks once.
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
Boundaries, roles and shape in one run
One run checks every rule. Each fault names the contract it breaks and the usual fix.
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
Look up any rule
fensu rule shows what a code checks and how this project configures it.
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…
Give agents the same rules
Generate skills from your active rules, so coding agents follow them too.
fensu skillsUpdated Fensu skill files: .opencode/skills/fensu-shop/SKILL.md .claude/skills/fensu-shop/SKILL.md .agents/skills/fensu-shop/SKILL.md
Understand
See how the code fits together
Trace the Python calls Fensu can prove from any function.
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+