-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy paththresholds.toml
More file actions
56 lines (51 loc) · 2.98 KB
/
Copy paththresholds.toml
File metadata and controls
56 lines (51 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Fitness-check thresholds for this repo's own CI gate (`ci fitness-check`,
# same checks the `fitness_report` MCP tool queries mid-session). [[boundaries]],
# [config_drift], and one numeric threshold ([thresholds] below) are declared
# here; every other numeric threshold keeps FitnessThresholds::default().
[thresholds]
# NOTE (2026-08-05, re-verified against `calm fitness-check --config
# thresholds.toml` and `git log --since="6 months ago"`): the story below
# about common.rs driving this metric predates this repo's current git
# history, which starts 2026-07-30 (50 commits total as of this note) — the
# 2026-07-28 split and its "~41 commits/6mo" figure no longer correspond to
# any commit this repo's log actually has. Today's max hotspot risk is 0.15,
# driven by tools.rs (15 commits/6mo, complexity 73.7); common.rs is down to
# 7 commits/6mo and a hotspot_risk of ~0.14, no longer the leader. 0.80 has
# ~0.65 of margin right now, not the ~0.01 the story below once described.
#
# Left at 0.80 rather than reverted to the 0.75 default because churn counts
# are still artificially low from the recent history reset and will climb as
# the 6-month window fills back in — revisit downward once churn stabilizes
# and the true steady-state max is known.
max_hotspot_risk = 0.80
# Layering rules Rust's own crate/module visibility does NOT already enforce
# (unlike e.g. "calm-core must not depend on calm-server", which is structurally
# impossible since calm-core/Cargo.toml doesn't list calm-server as a dependency —
# declaring that here would be a no-op). Both verified at 0 violations against
# the current import_edges graph before being added.
[[boundaries]]
from = "crates/calm-core/src/indexer/"
to = "crates/calm-core/src/analysis/"
reason = "indexer (extraction) must stay upstream of analysis (derived intelligence: dead-code, hotspots, fitness) — not the other way around"
[[boundaries]]
from = "crates/calm-server/src/watcher.rs"
to = "crates/calm-server/src/tools/"
reason = "the background reindex/watch loop must not depend on the MCP tool-handler layer it runs independently of"
[config_drift]
# Verified 2026-07-05 by actually running `ci fitness-check --config
# thresholds.toml` against this repo: architecture-design.md,
# migration-plan-v3.md, rust-support-research.md, and mcp-client-setup.md
# were tried first but produced 18 false positives — the first three are
# full of illustrative example paths (`src/user.py`, `foo.rs`) and
# retired-Python-era migration narrative (`generate_oracle.py`), which read
# as "dangling references" to a path-existence scanner but aren't; the last
# has a real reference to `release.yml` written without its directory
# (`.github/workflows/release.yml`) that the suffix-match heuristic doesn't
# catch for single-segment filenames. Trimmed to the 4 docs that came back
# clean in that same run — operational/factual, not full of code examples.
doc_paths = [
"AGENTS.md",
"README.md",
"docs/comparison.md",
"docs/cloud-environment-setup.md",
]