Code health, architecture & status
SkillProductivityUse when producing code-health scorecards, architecture maps, project identity/index status, registered project lookup, cross-project or cross-repo context gathering, TODO/config/runtime checks, or before/after refactor health deltas.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Code health, architecture & status skill
What this skill tells your AI
The instructions your AI receives, as published by scriptedalchemy/tracedecay in plugin/skills/code-health/SKILL.md and read by ahel’s review.
Lead with the one composite signal, then drill only into the weak dimensions and the specific scans the user asked for — don't run every tool by reflex.
Quality scorecard
- Composite signal →
tracedecay_health(details: true, optionalpath): the 0–10000 score plus the 5-dimension breakdown (acyclicity, depth, equality, redundancy, modularity) and thecoverage_disciplinepenalty. The weak dimensions choose the drill-downs. - Inequality / god files →
tracedecay_gini(metric:complexity|lines|fan_in|fan_out|members,scope,path?). - Complexity & size offenders:
tracedecay_complexity,tracedecay_largest,tracedecay_god_class,tracedecay_hotspots. - Structure drill-downs (match the weak dimension): acyclicity →
tracedecay_circular+tracedecay_recursion; modularity →tracedecay_dsm(format:stats|clusters|matrix) +tracedecay_coupling; depth →tracedecay_dependency_depth+tracedecay_inheritance_depth; relationships →tracedecay_rank(edge_kindrequired); kind mix →tracedecay_distribution. - Duplication →
tracedecay_redundancy; near-duplicate names →tracedecay_similar. Doc gaps →tracedecay_doc_coverage. Panic sites →tracedecay_unsafe_patterns. Risk-weighted test gaps →tracedecay_test_risk. Changed-files-only pass →tracedecay_simplify_scan(files).
Architecture map
- Shape & size:
tracedecay_status(node/edge/file counts),tracedecay_files+tracedecay_distribution(what lives where). - Public surface:
tracedecay_module_apiper top-level directory. - Dependency structure:
tracedecay_dsm(clusters and layering violations),tracedecay_coupling(fan_in/fan_outhubs),tracedecay_circular(cycles),tracedecay_dependency_depth(fragile long chains).
Session health delta
- Before the first edit →
tracedecay_session_start(no args): snapshots current health as the baseline (.tracedecay/session_baseline.json). - After the work →
tracedecay_session_end: the per-dimension diff — what improved, what degraded — and clears the baseline. A dropped dimension names the follow-up (redundancy fell →tracedecay_redundancy; acyclicity fell →tracedecay_circular). - Bracket only work where a before/after delta is wanted; a second
session_startsilently overwrites the baseline.
Project & index status
- Active project →
tracedecay_active_project(no args): resolved project root, scope prefix, branch identity, and the resolved active project store backing this session. Use this before describing where data lives. - Storage status →
tracedecay_storage_status(no args): resolved active project store health, graph DB path, writability, branch-fallback warnings — instead of probing.tracedecayor direct SQLite checks. - Project registry / cross-project context →
tracedecay_project_list/tracedecay_project_search/tracedecay_project_contextwhen the user asks about another project, sibling workspace, cross-repo context, or cross-project context gathering. Confirm the target store first, then passproject_id,project_path, orproject_selectortotracedecay_context,tracedecay_search, ortracedecay_message_searchinstead of scanning parent directories. - Index status →
tracedecay_status: node/edge/file counts, DB size, active branch + fallback warning, tokens saved. - Config lookups →
tracedecay_config(keyrequired, pluspathorglob): query TOML/JSON by dotted key — works even beforetracedecay init. - Outstanding work →
tracedecay_todos(kinds?,path?,limit?). - Server triage →
tracedecay_runtime(PID, memory, CPU%, DB sizes) when TraceDecay seems to hog CPU or RAM. Visual →tracedecay_dashboard(action:start|stop): hand the URL to the user.
Guardrails
- Discovery/analysis tools are read-only and parallel-safe.
tracedecay_session_start/session_endwrite/remove the baseline file andtracedecay_dashboardstarts/stops a local server — use them only when relevant and respect Cursor approval/run-mode. tracedecay_redundancyis computed lazily and cached; the first call on a fresh index can be slow — keeppath/max_pairstight.- For large audits, use scoped read-only subagents by path, weak health
dimension, or top-level directory; keep
session_start/session_endin the parent agent. - This skill reports and prioritizes; it does not edit. Hand fixes to
tracedecay:editing-safely/tracedecay:reviewing-changes, verification totracedecay:assessing-impact. Memory recall belongs totracedecay:project-memory; past-session recall totracedecay:managing-session-context.
If tools are deferred or MCP fails
- Deferred (names listed without schemas): load once with ToolSearch —
select:tracedecay_health,tracedecay_gini,tracedecay_dsm,tracedecay_status,tracedecay_active_project,tracedecay_project_list,tracedecay_project_search,tracedecay_project_context(one batched call, add others needed) — then call normally. - MCP error/timeout/disconnect: same tool, same args, via shell:
tracedecay tool <name>(seetracedecay:using-the-cli). Never query.tracedecaydatabases directly; never abandon the graph over transport.
Deliverable
Do not end this workflow without: the composite score + weak dimensions with
ranked worst offenders and a prioritized fix list; the layered module map with
dependency hotspots/violations; the per-dimension session delta; or the status
numbers, config values (with file + line), marker list, or runtime snapshot
the user asked for. Pairs with the docs-canvas plugin if installed. Report
any tracedecay_metrics: line to the user.
Signals
- GitHub stars
- 73
- Forks
- 5
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
code-health-scriptedalchemy- Source
- github.com/scriptedalchemy/tracedecay