Sensez CLI and MCP server for structural maintainability checks
Project description
Why can't coding agents detect code smells? Because they don't have a noze.
Coding agents are very good at producing code. They are also very good at
producing the same helper three times, gently ignoring your architecture notes,
and using dict[str, Any] when you ask for type safety. You ask it to complete
a task like "a staff software engineer", you ask it to follow SOLID principles
and use strong type safety. It happily agrees, and starts working on the task.
The vibes are immaculate. You come back a few minutes later to a slopocalypse
that looks nothing like what your AGENTS.md says and you spend hours trying to
understand where to start.
Sensez is a suite of Rust CLIs with an MCP server for maintenance before tech debt
accumulates. It runs beside your linter and type-checker and looks for cross-file
problems they usually do not own: duplication, dead code, import cycles, boundary
violations, and design smells. It is designed to give your coding agent the
noze to detect code smells, the bonez to respect architectural boundaries,
and the spine to do it fast.
Supported language profiles currently include Python, JavaScript, TypeScript, and Rust (for dogfooding primarily).
Quick Start
Python
# Run a one-off scan with uv
uvx --from sensez sensez noze .
# Add as a project dev dependency; run it with `uv run sensez ...`
uv add --dev sensez
uv run sensez init
# Install as a global CLI so `sensez ...` works directly
uv tool install sensez
sensez init
JS/TS
# Add as a dev dependency
npm install --save-dev sensez
# Generate a sensez.toml starter config
npx sensez init .
# Run a one-off scan with npx
npx sensez noze .
sensez . and sensez noze . both run the default scan. The verbose form is
still available as sensez noze sniff ..
Performance Snapshot
xychart-beta
title "pylint benchmark seconds"
x-axis ["sensez", "vulture", "repowise", "symilar"]
y-axis "seconds" 0 --> 20
bar [0.27, 1.29, 17.26, 20]
sensez scans all structural pillars in one pass (0.27s). vulture checks
Python dead code (1.29s). repowise uses a custom ranking mechanism, including dead code (17.26s).
symilar checks line-based duplication (234.12s; chart capped at 20s).
JS/TS
xychart-beta
title "zod benchmark seconds"
x-axis ["sensez", "fallow", "repowise"]
y-axis "seconds" 0 --> 6
bar [0.16, 0.48, 5.75]
sensez scans all structural pillars in one pass (0.16s). fallow checks
JS/TS structural dead-code and dependency findings (0.48s). repowise checks
repo intelligence signals, including dead code (5.75s).
sensez tries to lower dead code noise and allows for configuration of what gets reported. It also includes a few more Python and TS/JS opinionated smells, apart from overall structural consistency metrics.
The Problem
Coding agents drift. Not due to bad intentions, but because their loop is leaky.
-
Context rots. You told the agent to respect boundaries, follow SOLID, and think like a staff engineer. Six turns later, the context has been summarized twice and the agent is confidently rewriting the same csv file parser your colleague wrote two weeks ago.
-
CI is too late. CI is great at saying "absolutely not." It is much worse at saying "hm, this duplication is small but suspicious." Non-blocking warnings have a natural habitat: ignored forever.
-
Slow checks do not fit the turn. If a check takes minutes, it should not run every agent turn. If it does not run every turn, the slop has time to ferment.
[Agent Proposes Turn Finish] ──> [ 👃 Sensez MCP Sniff ] ──> [ Catches Import Cycle / Duplication ]
│
└──> (Immediate Agent Feedback: "Loose typing violation on line 40 of code.py. Replace loose collections with dataclass/model.")
Sensez provides short, structured feedback directly to the agent while the edit is still fresh. Less archaeology, more "fix it before it becomes load-bearing."
noze
noze takes care of the gorgonzola coding agents love so much:
| Area | Output key | What it catches |
|---|---|---|
| Duplication | duplication |
Structural clones, including local rename copies. |
| Dead code | dead_code |
Unreferenced symbols with confidence tiers. |
| Cycles | cycles |
Import loops and load-order tangles. |
| Boundaries | boundaries |
Imports crossing configured architecture rules. |
| Smells | smells |
Design pressure inside functions, classes, modules, and the graph. |
Some smell examples:
| Smell | Why noze flags it |
|---|---|
tuple_packing |
Positional tuples hide meaning. tuple[int, str, int] is not a data model. |
loose_typing |
Any and vague containers erase the contract callers need. |
boolean_blindness |
do_thing(True, False) is a guessing game with arguments. |
implicit_schema |
Repeated string-key access usually means a real shape is hiding in a dict. |
mutated_parameter |
You pass a parameter and the function you sent it to returns it all chewed up. Disgusting. |
feature_envy |
A method that mostly uses another object's data may belong somewhere else. |
message_chain |
Long a.b.c.d chains couple callers to deep object plumbing. |
god_module |
One module has become the place everything depends on. |
magic_string_default |
Trying to lie to the type checker by adding an || "" or or "" to hide a string that should be required. |
split_variable |
Multiple reassignments of the same variable within the same scope. Set to 1 to keep them constant within the scope and enforce helper functions for complex assignment logic. |
nested_loops |
[BETA, can be noisy] Nested iterations may blow up exponentially if not handled properly |
n_plus_one_call |
[BETA, can be noisy] Making external calls 1 by 1 (e.g. to a database) instead of using a batched approach. |
noze is not a formatter, linter, or type-checker. Keep using Ruff, ty, mypy,
ESLint, TypeScript, rustc, and Clippy. noze sits next to them and watches the
repo-level shape.
The default report is intentionally fixable in one screen: each pillar shows
only its top 5 offenders, each smell kind shows its own total plus top 3
examples, and dead-code output includes high-confidence findings only. Use
--all to print every finding, or --max N to choose a different cap.
For CI, filter to the pillars you care about:
sensez noze . --duplicates
sensez noze . --duplicates --dead-code --json
MCP
MCP is the default integration path for agents. Use it when Sensez should run repeatedly during a coding session instead of shelling out for one-off scans.
sensez mcp serve
The MCP tools are themed but explicit:
| Tool | Use |
|---|---|
noze_sniff |
Scan the repo for smells and structure issues. |
noze_gate |
End-of-turn diff gate for agent hooks; experimental and can be noisy on short/Q&A turns. |
noze_explain |
Explain a finding category. |
brainz_report |
Summarize local usage and resolution metrics. |
brainz_triage |
Record user-approved debt or false-positive verdicts. |
eyez_search_docs |
[disabled] Search docstrings/comments when eyez is enabled. |
You can also use the sensez noze CLI standalone in GitHub Actions.
brainz
brainz is local-only memory. It records scans, gate blocks, triage decisions,
resolved findings, regressions, detector precision, and usage reports.
sensez brainz report .
sensez brainz report . --json
Everything stays under:
.sensez/local-metrics/
No telemetry. No source upload. Disable it per repo:
[self_improvement]
enabled = false
Configuration
Sensez reads sensez.toml from the project root, or [tool.sensez] from
pyproject.toml when sensez.toml is absent.
sensez init . --yes
Main knobs:
[duplication]for clone thresholds[dead_code]for dynamic entrypoints[smells]for smell toggles and thresholds[[boundaries.forbidden]]for architecture contracts[action]for how strongly agents/gates treat each pillar[accept]for shared accepted findings[self_improvement]for local metrics
Small example:
[duplication]
threshold = 50
[dead_code]
entrypoint_names = ["register", "main", "setup"]
[smells.rules.long_function]
max_lines = 80
action = "warning"
Project Anatomy
spine: file discovery, parsing, shared IR, and dependency graph.profiles: language adapters for Python, JS/TS, TSX, and Rust.noze: duplication, dead code, cycles, and design smells.bonez: architecture boundary auditing. Not yet enabled.brainz: local-only metrics and feedback memory.eyez: optional doc/comment search. Not yet enabled.mcp: JSON-RPC/MCP surface for agent integration.reporter: terminal and JSON output.setup:sensez init, starter config, MCP registration, and hook setup.
Privacy
Sensez does not send telemetry or source code anywhere. Local metrics stay under
.sensez/local-metrics/.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sensez-0.1.5-py3-none-win_amd64.whl.
File metadata
- Download URL: sensez-0.1.5-py3-none-win_amd64.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da5d0bc7bacc1795451242a13e004d462891a95512037e203fb8701667e3f35f
|
|
| MD5 |
ec80268e50ae7bb765ecb53cacc81477
|
|
| BLAKE2b-256 |
f6dae3c322e9729519611425b6540f68b51029da2e1a695dfe103c0a4ca6d4a9
|
Provenance
The following attestation bundles were made for sensez-0.1.5-py3-none-win_amd64.whl:
Publisher:
release.yml on popov95s/sensez
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sensez-0.1.5-py3-none-win_amd64.whl -
Subject digest:
da5d0bc7bacc1795451242a13e004d462891a95512037e203fb8701667e3f35f - Sigstore transparency entry: 1964982410
- Sigstore integration time:
-
Permalink:
popov95s/sensez@b5f9181dfc6dae77b029c9c552b095cd6056d311 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/popov95s
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b5f9181dfc6dae77b029c9c552b095cd6056d311 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sensez-0.1.5-py3-none-manylinux_2_39_x86_64.whl.
File metadata
- Download URL: sensez-0.1.5-py3-none-manylinux_2_39_x86_64.whl
- Upload date:
- Size: 3.1 MB
- Tags: Python 3, manylinux: glibc 2.39+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7c26902883f774c896f5ccc70140ae34c8bec57f87b3c54f6aa2ff89b098d01
|
|
| MD5 |
4247fe01919a1f59aedce5bbd3b9a550
|
|
| BLAKE2b-256 |
8ddcf1bd3f148d9687bec6342651bd659081197879094243feacb070d3378358
|
Provenance
The following attestation bundles were made for sensez-0.1.5-py3-none-manylinux_2_39_x86_64.whl:
Publisher:
release.yml on popov95s/sensez
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sensez-0.1.5-py3-none-manylinux_2_39_x86_64.whl -
Subject digest:
e7c26902883f774c896f5ccc70140ae34c8bec57f87b3c54f6aa2ff89b098d01 - Sigstore transparency entry: 1964982155
- Sigstore integration time:
-
Permalink:
popov95s/sensez@b5f9181dfc6dae77b029c9c552b095cd6056d311 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/popov95s
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b5f9181dfc6dae77b029c9c552b095cd6056d311 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sensez-0.1.5-py3-none-manylinux_2_39_aarch64.whl.
File metadata
- Download URL: sensez-0.1.5-py3-none-manylinux_2_39_aarch64.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3, manylinux: glibc 2.39+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f2363930c5470c8096f3fa1b418e291d0728366ea8cc9d72b0f38d291fa56f5
|
|
| MD5 |
9e5942f6346a974ebdce3e07ada9664d
|
|
| BLAKE2b-256 |
6e02555e991032d4236eaf0501dc807da6188a03464c2527a83b617033d111b8
|
Provenance
The following attestation bundles were made for sensez-0.1.5-py3-none-manylinux_2_39_aarch64.whl:
Publisher:
release.yml on popov95s/sensez
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sensez-0.1.5-py3-none-manylinux_2_39_aarch64.whl -
Subject digest:
7f2363930c5470c8096f3fa1b418e291d0728366ea8cc9d72b0f38d291fa56f5 - Sigstore transparency entry: 1964982273
- Sigstore integration time:
-
Permalink:
popov95s/sensez@b5f9181dfc6dae77b029c9c552b095cd6056d311 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/popov95s
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b5f9181dfc6dae77b029c9c552b095cd6056d311 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sensez-0.1.5-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: sensez-0.1.5-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.8 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b82cf473d3aa09c3728637f612424489041e839f3683ff41bfa1a7e5061173f1
|
|
| MD5 |
1ff67c19cb853213b2631a36a8a8c395
|
|
| BLAKE2b-256 |
0cf11f170bb472bff0746aa0a720129e13937370a8f46aa4ffd69e3a6959b158
|
Provenance
The following attestation bundles were made for sensez-0.1.5-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on popov95s/sensez
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sensez-0.1.5-py3-none-macosx_11_0_arm64.whl -
Subject digest:
b82cf473d3aa09c3728637f612424489041e839f3683ff41bfa1a7e5061173f1 - Sigstore transparency entry: 1964982568
- Sigstore integration time:
-
Permalink:
popov95s/sensez@b5f9181dfc6dae77b029c9c552b095cd6056d311 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/popov95s
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b5f9181dfc6dae77b029c9c552b095cd6056d311 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file sensez-0.1.5-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: sensez-0.1.5-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6eb64fe43da48c23b7166a720fe5863df312784d76a9e852c3b268faee1c7d1c
|
|
| MD5 |
004aaa1ff403e011c60d10e7094dcf30
|
|
| BLAKE2b-256 |
c4727c9b139853fb5ce0c3c9da6bdfca5b25cef4fc505d535486e23d7eb8887c
|
Provenance
The following attestation bundles were made for sensez-0.1.5-py3-none-macosx_10_12_x86_64.whl:
Publisher:
release.yml on popov95s/sensez
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sensez-0.1.5-py3-none-macosx_10_12_x86_64.whl -
Subject digest:
6eb64fe43da48c23b7166a720fe5863df312784d76a9e852c3b268faee1c7d1c - Sigstore transparency entry: 1964982713
- Sigstore integration time:
-
Permalink:
popov95s/sensez@b5f9181dfc6dae77b029c9c552b095cd6056d311 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/popov95s
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b5f9181dfc6dae77b029c9c552b095cd6056d311 -
Trigger Event:
workflow_dispatch
-
Statement type: