Skip to main content

Fensu
by SQLStack

Fensu checks repository architecture: import boundaries, module roles, and function shape for Python, Rust, TypeScript, JavaScript, and Svelte.

  • Boundaries: stop one domain from importing another domain’s private helpers.
  • Roles: keep entry points, helpers, models, and types in their owning modules.
  • Function shape: keep orchestrators small, dataflow explicit, and signatures clear.

Get started

Requires Python 3.12+. Install in your project’s Python environment:

pip install fensu

From an existing Python repository’s pyproject.toml directory:

fensu init --yes
fensu check

fensu init --yes detects your project, creates fensu.toml, runs an initial check, and installs agent guidance. Existing configuration is preserved.

Run fensu check locally and in CI to enforce your policy. For established repositories, adopt rules incrementally using explicit boundaries and exceptions.

See the quickstart for empty repositories, existing configuration, and language-specific setup.

A finding and its fix

An order entry point importing inventory’s private helper crosses a domain boundary:

# src/shop/orders/main/submit.py
from shop.inventory._helpers.reserve import reserve

Excerpt from a real fensu check --no-color run with FFL102 selected:

FFL102  import 'shop.inventory._helpers.reserve' reaches into internal structure of 'shop.inventory'
 --> src/shop/orders/main/submit.py:1:0
  = help: Import from classes, models, types, constants, exceptions, or a thin main/ entry.

Publish the operation through inventory’s thin main/ entry, then import that public surface instead:

from shop.inventory.main.reserve import reserve

That change clears this boundary finding; it does not disable the rule. Inspect a diagnostic’s full contract and settings with fensu rule FFL102.

The default layout

A Python domain owns its behavior and vocabulary:

src/shop/
└── inventory/
    ├── main/           # public entry points and orchestration
    │   └── reserve.py
    ├── _helpers/       # private implementation phases
    ├── classes/        # one class per module
    ├── models.py       # data models
    ├── types.py        # type declarations
    ├── constants.py
    └── exceptions.py

A leaf needs meaningful main/ behavior, not an empty placeholder. Domains can split into named subdomains; tests mirror the code they cover. Tooling has its own scope. See the architecture model for complete role contracts, layouts, and defaults.

Explore the repository

Command Purpose
fensu rule FFL102 Explain a rule and its effective settings.
fensu map submit --root src --depth 2 Show proven static Python calls, without running the program.
fensu dupes --since origin/main --diff Review changed duplicated-code clusters; advisory unless --fail-on-new is passed.
fensu skills --check Verify installed guidance matches the current policy.

Call mapping needs neither Fensu configuration nor rule adoption. It marks unresolved calls, cycles, and depth limits instead of guessing dynamic targets. See the map reference and duplicated-code guide.

Documentation

fensu.io/docs is the full manual; the README is the starting point.

Start here Reference
Quickstart Installation, initialization, and reading diagnostics.
Adoption Roll out enforcement safely on existing code.
Configuration Targets, ownership roots, selection, thresholds, exceptions, and ignores.
Architecture Roles, domain boundaries, tooling, and test layout.
Rust · Web Analyzer-specific setup and rule packs.
CLI · Agent guidance Commands, execution, and skill update safety.
Caching Cache identities, controls, and safe cleanup.
Custom rules · RuleContext API Author, configure, and test project-specific policies.

Python dead-code enforcement has a separate repository guide covering reachability, explicit dynamic roots, and adoption caveats.

Part of SQLStack

Fensu is part of SQLStack, a family of tools for data engineers.

  • SQLBuild — SQL transformations with compile-time checks, end-to-end tests, and safe renames.
  • SQLClean — Fast SQL linting and deterministic formatting.
  • SQLBabel — Translate Snowflake, Databricks, BigQuery and Postgres SQL to DuckDB, with every rule proven against real warehouse results.
  • SQLLoad — Load databases, files, APIs and Kafka into your warehouse with exact types and bounded memory.
  • SQLTide — Build, replay, and safely deploy ClickHouse streaming pipelines with SQL.

Metadata

Release files for fensu 0.32.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fensu 0.32.0
File Size Uploaded Provenance Actions
fensu-0.32.0.tar.gz 538.9 kB With provenance Details for fensu-0.32.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for fensu 0.32.0
File Actions
fensu-0.32.0-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for fensu-0.32.0-cp312-abi3-win_amd64.whl
fensu-0.32.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details for fensu-0.32.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
fensu-0.32.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.12 abi3 Linux glibc 2.17+ ARM64 Details for fensu-0.32.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
fensu-0.32.0-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for fensu-0.32.0-cp312-abi3-macosx_11_0_arm64.whl
fensu-0.32.0-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details for fensu-0.32.0-cp312-abi3-macosx_10_12_x86_64.whl

Total release size: 21.3 MB

Release files / fensu-0.32.0.tar.gz

Download URL fensu-0.32.0.tar.gz
Size 538.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e60b3383bb2379d7f839e8ca8e6e44a1e8473b190ed85a291b1e0a754f0935af
BLAKE2b-256 checksum
How to use checksums
94e51a1378fa16732f5895b82628dfd4720186563a2a5b3e602a4d522e20fe03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Release files / fensu-0.32.0-cp312-abi3-win_amd64.whl

Download URL fensu-0.32.0-cp312-abi3-win_amd64.whl
Size 4.0 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
657ef28e521f9364a253c72fa6c17464a9e58fd3fb2c2ddb40762f474743afc7
BLAKE2b-256 checksum
How to use checksums
e0a31c2bb40692eee55a2b8c887550706ab8705c9e6846697a300dc4b404d7ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Release files / fensu-0.32.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL fensu-0.32.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 4.3 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
6b7cbe31c4da0a5d33f9dfe8b21d3d4a72e241fc1292a52516ed4faf1d466d4d
BLAKE2b-256 checksum
How to use checksums
dbd16e298a885a35181fa32dc24c1628dd4eb90e3dea1e3c42cdfaf2c284f75b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Release files / fensu-0.32.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL fensu-0.32.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 4.2 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
e49f91cde9989cc5b636107035904ad2dac1ead796e2fbb06d3d0e849fa4fb9d
BLAKE2b-256 checksum
How to use checksums
87a1265465ae40401d98e7c9e8de966713e223dba4601c198f0a706620f6918e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Release files / fensu-0.32.0-cp312-abi3-macosx_11_0_arm64.whl

Download URL fensu-0.32.0-cp312-abi3-macosx_11_0_arm64.whl
Size 4.0 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
be6f333e915a5f8e495478982958b7a16ae46557f3b22cc186dc2d8425a0d1b5
BLAKE2b-256 checksum
How to use checksums
080f16a7779c066a9439a8d64f1a29de8b29b6e73f251b3797cdda62b1a1b646
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Release files / fensu-0.32.0-cp312-abi3-macosx_10_12_x86_64.whl

Download URL fensu-0.32.0-cp312-abi3-macosx_10_12_x86_64.whl
Size 4.2 MB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
e4ffe7798506df5d25fbb19203c15683a4ae4096fe95d9bf02be28120bbf75bd
BLAKE2b-256 checksum
How to use checksums
1fcd8e3e440b48247e50d6510a74bc2fd6dbd94e866585804593adef6a603500
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Security for fensu 0.32.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for fensu-0.32.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.32.0 This release

6 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page