sensez 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -44
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,22 +1,69 @@
|
|
|
1
|
-
#
|
|
1
|
+
# sensez
|
|
2
2
|
|
|
3
|
-
[](https://pypi.org/project/sensez/) [](https://www.npmjs.com/package/sensez) [](https://github.com/popov95s/sensez/actions/workflows/ci.yml) [](https://sensez.dev) [](https://popov95s.github.io/sensez/latest/) [](https://github.com/popov95s/sensez/blob/main/LICENSE
|
|
3
|
+
[](https://pypi.org/project/sensez/) [](https://www.npmjs.com/package/sensez) [](https://github.com/popov95s/sensez/actions/workflows/ci.yml) [](https://sensez.dev) [](https://popov95s.github.io/sensez/latest/) [](https://github.com/popov95s/sensez/blob/main/LICENSE)
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**Coding agents produce tech debt. Bring them to their senses.**
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
and type-checker. It finds cross-file problems that those tools do not usually
|
|
9
|
-
own: duplication, dead code, import cycles, architecture-boundary violations,
|
|
10
|
-
and design smells.
|
|
7
|
+
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.
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
sensez closes the loop with fast, structured feedback agents can act on before moving on.
|
|
10
|
+
|
|
11
|
+
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.
|
|
12
|
+
|
|
13
|
+
In controlled evaluations, agents using Sensez produced 86% fewer quality issues, 90% less duplicated code, and 67% fewer lines.
|
|
15
14
|
|
|
16
15
|
**[Website](https://sensez.dev)** ·
|
|
17
16
|
**[Documentation](https://popov95s.github.io/sensez/latest/)** ·
|
|
18
17
|
**[MCP and agent guide](https://popov95s.github.io/sensez/latest/usage/mcp-and-agents/)** ·
|
|
19
|
-
**[Configuration reference](https://popov95s.github.io/sensez/latest/reference/configuration/)**
|
|
18
|
+
**[Configuration reference](https://popov95s.github.io/sensez/latest/reference/configuration/)**
|
|
19
|
+
|
|
20
|
+
## Quick start
|
|
21
|
+
|
|
22
|
+
### Python
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
uv add --dev sensez # or install globally: uv tool install sensez
|
|
26
|
+
uv run sensez init # writes a starter config and registers the MCP server
|
|
27
|
+
uv run sensez noze . # scan once — no install needed with: uvx sensez noze .
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### JavaScript and TypeScript
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install --save-dev sensez
|
|
34
|
+
npx sensez init
|
|
35
|
+
npx sensez noze .
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`sensez init` writes a commented starter `sensez.toml` and registers Sensez as
|
|
39
|
+
an MCP server with your coding agent — Claude Code, Cursor, Cline, Codex,
|
|
40
|
+
OpenCode, and Pi are supported. **Restart the agent afterwards** so the server
|
|
41
|
+
is picked up. `sensez .` and `sensez noze .` both run the default scan.
|
|
42
|
+
|
|
43
|
+
A report is one screen, focused on what to fix first:
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
$ sensez noze .
|
|
47
|
+
sensez — structural maintainability report
|
|
48
|
+
|
|
49
|
+
Circular imports (1)
|
|
50
|
+
[warning] ↻ shop.promo → shop.cart
|
|
51
|
+
./shop/promo.py:1 shop.promo → shop.cart
|
|
52
|
+
./shop/cart.py:1 shop.cart → shop.promo
|
|
53
|
+
|
|
54
|
+
Duplication (1)
|
|
55
|
+
[advisory] structural clone (53):
|
|
56
|
+
./shop/clone_a.py:1-12
|
|
57
|
+
./shop/clone_b.py:1-12
|
|
58
|
+
|
|
59
|
+
Dead code candidates (2)
|
|
60
|
+
[advisory] ./shop/legacy.py:1 shop.legacy::orphan_helper (function) [high]
|
|
61
|
+
[advisory] ./shop/promo.py:10 shop.promo::recap (function) [high]
|
|
62
|
+
|
|
63
|
+
Code smells (0)
|
|
64
|
+
|
|
65
|
+
Boundary violations (not configured)
|
|
66
|
+
```
|
|
20
67
|
|
|
21
68
|
## Why Sensez?
|
|
22
69
|
|
|
@@ -46,37 +93,6 @@ Sensez complements—not replaces—Ruff, ty, mypy, ESLint, TypeScript, `rustc`,
|
|
|
46
93
|
and Clippy. Use those tools for local correctness; use Sensez for the structural
|
|
47
94
|
relationships across the codebase.
|
|
48
95
|
|
|
49
|
-
## Quick start
|
|
50
|
-
|
|
51
|
-
### Python
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
# Add to a project; run it with `uv run sensez ...`
|
|
55
|
-
uv add --dev sensez
|
|
56
|
-
uv run sensez init
|
|
57
|
-
|
|
58
|
-
# Or install a global CLI
|
|
59
|
-
uv tool install sensez
|
|
60
|
-
sensez init
|
|
61
|
-
|
|
62
|
-
# Or run a one-off scan
|
|
63
|
-
uvx sensez noze .
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### JavaScript and TypeScript
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
# Add as a development dependency
|
|
70
|
-
npm install --save-dev sensez
|
|
71
|
-
|
|
72
|
-
# Generate a starter config and scan
|
|
73
|
-
npx sensez init .
|
|
74
|
-
npx sensez noze .
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
`sensez .` and `sensez noze .` both run the default scan. The explicit form
|
|
78
|
-
`sensez noze sniff .` remains available for agent-oriented workflows.
|
|
79
|
-
|
|
80
96
|
## What it finds
|
|
81
97
|
|
|
82
98
|
| Area | Output key | What it catches |
|
|
@@ -102,6 +118,7 @@ Some examples of the included smells:
|
|
|
102
118
|
| `magic_string_default` | <code>|| ""</code> or <code>or ""</code> hides a string that should be required. |
|
|
103
119
|
| `split_variable` | Multiple reassignments of a variable in one scope add hidden state. |
|
|
104
120
|
| `nested_loop` | **Beta, opt-in:** nested iteration may have unintended complexity. |
|
|
121
|
+
| `nested_ternary` | Nested conditional expressions make agent-generated decisions hard to follow. |
|
|
105
122
|
| `n_plus_one_call` | **Beta, opt-in:** one-by-one external calls may need batching. |
|
|
106
123
|
|
|
107
124
|
The default report is intentionally fixable in one screen: each pillar shows its
|
|
@@ -162,13 +179,16 @@ for the methodology and per-benchmark results.
|
|
|
162
179
|
## MCP for agents
|
|
163
180
|
|
|
164
181
|
MCP is the recommended integration when Sensez should run repeatedly during a
|
|
165
|
-
coding session rather than as a one-off shell command.
|
|
182
|
+
coding session rather than as a one-off shell command. `sensez init` registers
|
|
183
|
+
the server with your coding agent, which then launches it automatically at
|
|
184
|
+
startup — there is nothing to run by hand.
|
|
166
185
|
|
|
167
186
|
| Tool | Use |
|
|
168
187
|
| --- | --- |
|
|
169
188
|
| `noze_sniff` | Scan the repository for smells and structural issues. |
|
|
170
189
|
| `noze_gate` | Experimental end-of-turn diff gate; may be noisy for short or Q&A turns. |
|
|
171
190
|
| `noze_explain` | Explain a finding category. |
|
|
191
|
+
| `get_configuration_summary` | Summarize the effective configuration and noisiest rules when tuning. |
|
|
172
192
|
| `brainz_report` | Summarize local usage and resolution metrics. |
|
|
173
193
|
| `brainz_triage` | Record user-approved debt or false-positive verdicts. |
|
|
174
194
|
| `eyez_search_docs` | Disabled unless `eyez` is enabled; searches docstrings and comments. |
|
|
@@ -194,6 +214,7 @@ The main configuration areas are:
|
|
|
194
214
|
- `[action]` for how strongly agents and gates treat each pillar
|
|
195
215
|
- `[accept]` for shared accepted findings
|
|
196
216
|
- `[self_improvement]` for local metrics
|
|
217
|
+
- `[cache]` for opt-in persistent analysis snapshots to make warm-runs almost instant
|
|
197
218
|
|
|
198
219
|
```toml
|
|
199
220
|
[duplication]
|
|
@@ -214,6 +235,12 @@ enabled = true
|
|
|
214
235
|
enabled = true
|
|
215
236
|
```
|
|
216
237
|
|
|
238
|
+
Smell rules can also be overridden per language, and every finding carries an
|
|
239
|
+
action level (`info` → `must_fix`) that drives gates and CI. See the
|
|
240
|
+
[Configuration reference](https://popov95s.github.io/sensez/latest/reference/configuration/)
|
|
241
|
+
for action levels, per-language overrides, boundary patterns, and accepting
|
|
242
|
+
findings.
|
|
243
|
+
|
|
217
244
|
## Local-only metrics and privacy
|
|
218
245
|
|
|
219
246
|
`brainz` records scans, gate blocks, triage decisions, resolved findings,
|
|
@@ -237,7 +264,7 @@ enabled = false
|
|
|
237
264
|
- `spine`: file discovery, parsing, shared IR, and dependency graph.
|
|
238
265
|
- `profiles`: language adapters for Python, JS/TS, TSX, and Rust.
|
|
239
266
|
- `noze`: duplication, dead code, cycles, and design smells.
|
|
240
|
-
- `bonez`: architecture-boundary auditing
|
|
267
|
+
- `bonez`: architecture-boundary auditing.
|
|
241
268
|
- `brainz`: local-only metrics and feedback memory.
|
|
242
269
|
- `eyez`: optional doc/comment search; not yet enabled.
|
|
243
270
|
- `mcp`: JSON-RPC/MCP surface for agent integration.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sensez",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Sensez CLI launcher for structural maintainability checks",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"readme": "README.md",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"README.md"
|
|
19
19
|
],
|
|
20
20
|
"optionalDependencies": {
|
|
21
|
-
"sensez-darwin-arm64": "0.
|
|
22
|
-
"sensez-darwin-x64": "0.
|
|
23
|
-
"sensez-linux-arm64-gnu": "0.
|
|
24
|
-
"sensez-linux-x64-gnu": "0.
|
|
21
|
+
"sensez-darwin-arm64": "0.3.0",
|
|
22
|
+
"sensez-darwin-x64": "0.3.0",
|
|
23
|
+
"sensez-linux-arm64-gnu": "0.3.0",
|
|
24
|
+
"sensez-linux-x64-gnu": "0.3.0"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"provenance": true
|