Skip to main content

sensez

PyPI npm CI Website Documentation License: MIT

Coding agents produce tech debt. Bring them to their senses.

Coding agents drift. CI catches the result too late, and non-blocking reports become Jira tickets nobody picks up. Most static analysis tools are too slow or too noisy to run on every agent turn.

sensez closes the loop with fast, structured feedback agents can act on before moving on.

sensez runs inside the coding-agent loop, giving agents fast, structured feedback on duplication, dead code, cycles, architecture violations, and design smells—so they fix problems before technical debt compounds.

In controlled evaluations, agents using Sensez produced 86% fewer quality issues, 90% less duplicated code, and 67% fewer lines.

Website · Documentation · MCP and agent guide · Configuration reference

Quick start

Python

uv add --dev sensez      # or install globally: uv tool install sensez
uv run sensez init       # writes a starter config and registers the MCP server
uv run sensez noze .     # scan once — no install needed with: uvx sensez noze .

JavaScript and TypeScript

npm install --save-dev sensez
npx sensez init
npx sensez noze .

sensez init writes a commented starter sensez.toml and registers Sensez as an MCP server with your coding agent — Claude Code, Cursor, Cline, Codex, OpenCode, and Pi are supported. Restart the agent afterwards so the server is picked up. sensez . and sensez noze . both run the default scan.

A report is one screen, focused on what to fix first:

$ sensez noze .
sensez — structural maintainability report

Circular imports (1)
    [warning] ↻ shop.promo → shop.cart
        ./shop/promo.py:1  shop.promo → shop.cart
        ./shop/cart.py:1  shop.cart → shop.promo

Duplication (1)
    [advisory] structural clone (53):
      ./shop/clone_a.py:1-12
      ./shop/clone_b.py:1-12

Dead code candidates (2)
    [advisory] ./shop/legacy.py:1  shop.legacy::orphan_helper (function) [high]
    [advisory] ./shop/promo.py:10  shop.promo::recap (function) [high]

Code smells (0)

Boundary violations (not configured)

Why Sensez?

Coding agents are excellent at producing code—and, occasionally, at producing the same helper three times, gently ignoring architecture notes, and replacing type-safe models with dict[str, Any]. The vibes are immaculate; the result can still be a slopocalypse that takes hours to untangle.

Sensez closes that feedback loop while an edit is still fresh. It gives agents short, structured feedback on the repository's shape, so problems can be fixed before they become load-bearing.

The gap is especially visible in agent-driven work:

  • Context rots. Architecture guidance fades across long, summarized turns.
  • CI is too late. Small, non-blocking structural warnings are easy to defer.
  • Slow checks do not fit the turn. If a check takes minutes, it cannot run in every feedback loop—and debt has time to accumulate.
[Agent proposes turn finish] ──> [Sensez MCP sniff] ──> [Finds cycle / clone / smell]
                                      │
                                      └──> Immediate, actionable feedback

Sensez complements—not replaces—Ruff, ty, mypy, ESLint, TypeScript, rustc, and Clippy. Use those tools for local correctness; use Sensez for the structural relationships across the codebase.

What it finds

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 that cross configured architecture rules.
Smells smells Design pressure inside functions, classes, modules, and the graph.

Some examples of the included smells:

Smell Why Sensez flags it
tuple_packing Positional tuples hide meaning; tuple[int, str, int] is not a data model.
loose_typing Any, schema-erasing maps, and primitive containers erase caller contracts.
boolean_blindness do_thing(True, False) makes argument meaning a guessing game.
implicit_schema Repeated string-key access often means a real shape is hiding in a dict.
mutated_parameter A function returns a parameter after chewing it up.
feature_envy A method that mostly uses another object's data may belong elsewhere.
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 || "" or or "" hides a string that should be required.
split_variable Multiple reassignments of a variable in one scope add hidden state.
nested_loop Beta, opt-in: nested iteration may have unintended complexity.
nested_ternary Nested conditional expressions make agent-generated decisions hard to follow.
n_plus_one_call Beta, opt-in: one-by-one external calls may need batching.

The default report is intentionally fixable in one screen: each pillar shows its top five offenders, each smell kind shows its total plus its top three examples, and dead-code output includes high-confidence findings only. Use --all for every finding, or --max N to set another cap.

# Focus a CI check on the pillars you care about
sensez noze . --duplicates
sensez noze . --duplicates --dead-code --json

Performance

Sensez evaluates all structural pillars in one pass.

Python: pylint benchmark

Python benchmark: Sensez 0.27 s, Vulture 1.29 s, Repowise 17.26 s, Symilar 234.12 s

Tool Time Scope
sensez 0.27 s All structural pillars in one pass
vulture 1.29 s Python dead code
repowise 17.26 s Repository intelligence, including dead code
symilar 234.12 s Line-based duplication

JavaScript / TypeScript: zod benchmark

JavaScript and TypeScript benchmark: Sensez 0.16 s, Fallow 0.48 s, Repowise 5.75 s

Tool Time Scope
sensez 0.16 s All structural pillars in one pass
fallow 0.48 s JS/TS structural dead-code and dependency findings
repowise 5.75 s Repository intelligence, including dead code

Agent impact

The same coding agent completed 70 real-world Python tasks from SWE-PolyBench and SWE-bench Verified, plus 21 synthetic tasks designed to trigger specific maintainability traps. Both variants received SOLID/DRY principles. The Sensez variant additionally had to call noze_sniff in a feedback loop before it could declare a task complete.

New quality issues Clone tokens New clones Lines written Tokens used
Without Sensez 14 1,251 129 2,080 1.23M
With Sensez 2 126 0 682 1.34M
Reduction 86% 90% 100% 67% +8.7% overhead

Sensez agents produced structurally cleaner code with 67% fewer lines. Benchmarks used SWE-PolyBench_500, SWE-bench Verified, and synthetic pillar tests. See the evaluation suite for the methodology and per-benchmark results.

MCP for agents

MCP is the recommended integration when Sensez should run repeatedly during a coding session rather than as a one-off shell command. sensez init registers the server with your coding agent, which then launches it automatically at startup — there is nothing to run by hand.

Tool Use
noze_sniff Scan the repository for smells and structural issues.
noze_gate Experimental end-of-turn diff gate; may be noisy for short or Q&A turns.
noze_explain Explain a finding category.
get_configuration_summary Summarize the effective configuration and noisiest rules when tuning.
brainz_report Summarize local usage and resolution metrics.
brainz_triage Record user-approved debt or false-positive verdicts.
eyez_search_docs Disabled unless eyez is enabled; searches docstrings and comments.

Sensez can also run standalone in GitHub Actions. See the GitHub Action guide.

Configuration

Sensez reads sensez.toml from the project root, or [tool.sensez] from pyproject.toml when sensez.toml is absent.

sensez init

The main configuration areas are:

  • [duplication] for clone thresholds
  • [dead_code] for dynamic entry points
  • [smells] for smell toggles and thresholds
  • [[boundaries.forbidden]] for architecture contracts
  • [action] for how strongly agents and gates treat each pillar
  • [accept] for shared accepted findings
  • [self_improvement] for local metrics
  • [cache] for opt-in persistent analysis snapshots to make warm-runs almost instant
[duplication]
threshold = 50

[dead_code]
entrypoint_names = ["register", "main", "setup"]

[smells.rules.long_function]
max_lines = 80
action = "warning"

# The beta performance heuristics are disabled by default.
[smells.rules.nested_loop]
enabled = true

[smells.rules.n_plus_one_call]
enabled = true

Smell rules can also be overridden per language, and every finding carries an action level (infomust_fix) that drives gates and CI. See the Configuration reference for action levels, per-language overrides, boundary patterns, and accepting findings.

Local-only metrics and privacy

brainz records scans, gate blocks, triage decisions, resolved findings, regressions, detector precision, and usage reports locally.

sensez brainz report .
sensez brainz report . --json

Everything remains under .sensez/local-metrics/. Sensez sends no telemetry and uploads no source code. Disable local metrics for a repository with:

[self_improvement]
enabled = false

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.
  • 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: starter configuration, MCP registration, and hook setup.

Disclaimer

Please review DISCLAIMER.md for the project disclaimer.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

sensez-0.3.0-py3-none-win_amd64.whl (3.0 MB view details)

Uploaded Python 3Windows x86-64

sensez-0.3.0-py3-none-manylinux_2_39_x86_64.whl (3.4 MB view details)

Uploaded Python 3manylinux: glibc 2.39+ x86-64

sensez-0.3.0-py3-none-manylinux_2_39_aarch64.whl (3.4 MB view details)

Uploaded Python 3manylinux: glibc 2.39+ ARM64

sensez-0.3.0-py3-none-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

sensez-0.3.0-py3-none-macosx_10_12_x86_64.whl (3.2 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file sensez-0.3.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: sensez-0.3.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sensez-0.3.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 251a818e0707e208c1d17150190264a1aa05d2887d0cf7d9541a5431b0333016
MD5 74f5568ff2ffd6a3a417801c4dce4fa2
BLAKE2b-256 52a9b924f7296812acdd08f3543f28ffb3c03fbf29c4623a2af2e197623f906f

See more details on using hashes here.

Provenance

The following attestation bundles were made for sensez-0.3.0-py3-none-win_amd64.whl:

Publisher: release.yml on popov95s/sensez

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sensez-0.3.0-py3-none-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for sensez-0.3.0-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 4a3bc2419960b4ce31dc5b89f4a9425698dc26f808264f46eaca0b50b38b057f
MD5 71c3e1793fe49a99704d59ef0e471b37
BLAKE2b-256 d8a418cf28fa96baac7845c7eeb5ab3384b82627de7be88a97d441e42c5f7dd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for sensez-0.3.0-py3-none-manylinux_2_39_x86_64.whl:

Publisher: release.yml on popov95s/sensez

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sensez-0.3.0-py3-none-manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for sensez-0.3.0-py3-none-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 0c12006aba4b8f626b5ecc895aa0033840b4cb4ca1d55a980751a9705bcf7dcd
MD5 16c1e5328ac992c3d833b14f2e445102
BLAKE2b-256 c2f951ac38282ca7268628823f89e05963e7729461b5d3ab46f8364f52f71b05

See more details on using hashes here.

Provenance

The following attestation bundles were made for sensez-0.3.0-py3-none-manylinux_2_39_aarch64.whl:

Publisher: release.yml on popov95s/sensez

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sensez-0.3.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for sensez-0.3.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 05aaa4454366a05658d9166eef5e8fadf99bf023e86862fbe11a08770a586ae2
MD5 c4ad9205944ed12f6dcafe6d3c726e3b
BLAKE2b-256 a03b9f93db24dc0c27c1352a7a927b8cd07e8e26b9a0dc7c32eb4086e82d2ef3

See more details on using hashes here.

Provenance

The following attestation bundles were made for sensez-0.3.0-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on popov95s/sensez

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sensez-0.3.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for sensez-0.3.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 cbcbfe548e9f83eda219af3c474e0fa16d1d1ecada4378797a4befb510bee327
MD5 66379fac7fa670ddae553fe85372c423
BLAKE2b-256 7fd8f41bcb2e8e287dd8c44d4c50d00dfba69cbea805228ce2d5635621447551

See more details on using hashes here.

Provenance

The following attestation bundles were made for sensez-0.3.0-py3-none-macosx_10_12_x86_64.whl:

Publisher: release.yml on popov95s/sensez

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.1

5 files

This release

0.3.0 This release

5 files

0.2.5

5 files

0.2.4

5 files

0.2.3

5 files

0.2.2

5 files

0.2.1

5 files

0.2.0

5 files

0.1.12

5 files

0.1.11

5 files

0.1.10

5 files

0.1.9

5 files

0.1.8

5 files

0.1.7

5 files

0.1.6

5 files

0.1.5

5 files

0.1.4

5 files

0.1.3

5 files

0.1.1

5 files

0.1.0

5 files

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