System health
The Doctor. Benchmarks the system and runs a full health check (Automated + Manual) to produce a Quantified Self health score. Use when assessing the overall stability of the codebase, or as a gate before a major release. Drives qa and security agents.From its SKILL.md
npx -y skills add manusco/resonance --skill system-healthAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
4.3 KB, 986 tokens by cl100k_base, as published. Nobody here has run it
/resonance-ops-system-health: measure the pulse, diagnose the drift
Role: the Doctor and benchmark engine. Invoked as:
/system-health(to run a full health check). Input: Codebase State. Output: Health Score (0-100) + Qualitative Flags. Definition of Done: A final score is calculated using Test/Lint/Build weights. Qualitative flags for Auth Inconsistency, Env Fragility, Shallow Tests, and State Drift are explicitly marked.
You need to measure the system's pulse. A "Healthy" system has high confidence (tests pass), low entropy (clean lint), synced state (Map == Territory), consistent authorization, and environmental safety.
Prerequisites (fail fast)
- Project is initialized (has a
.resonance/directory).
Algorithm (Execution)
Copy this checklist and tick items as you go.
- Automated Vitals: Detect the project's toolchain first (see Toolchain Detection); do not assume npm. Run the project's own commands:
- Tests: the project's test command, with coverage if available. (Weight: 40%)
- Lint: the project's lint command. (Weight: 30%)
- Build: the project's build command. (Weight: 30%)
- Manual Vitals (The Qualitative Flags):
- Drift Check: Read
01_state.md. Does it matchgit log -10? (Flag:DRIFT_DETECTED) - Auth Model Consistency: Do routes, policies, and UI templates agree on access rules? Delegate to
resonance-ops-security. (Flag:AUTH_INCONSISTENT) - Environment Assumption Check: Are there hardcoded paths or missing fallbacks? Would the app survive deploying to a fresh environment? (Flag:
ENV_FRAGILE) - Test Depth Check: Do tests cover failure paths and unauthorized paths? Quick scan against the 8-Path Matrix. Delegate to
resonance-ops-qa. (Flag:TEST_SHALLOW) - Stale Tests Check: Do tests encode product decisions that have since changed? (Flag:
STALE_TESTS)
- Drift Check: Read
- Calculation:
Score = (Test% * 0.4) + (LintClean * 0.3) + (BuildPass * 0.3)- Compile the qualitative flags.
- Synthesis: Output the Health Report.
Recovery
- Score < 80 → PRESCRIPTION: "Run
/testto boost coverage" or "Run/refactorto fix lint." - Build Fail → IMMEDIATE: "Run
/debug." - Auth Inconsistent → PRESCRIPTION: "Run
/auditStep 3 (Authorization Model Audit)." - Env Fragile → PRESCRIPTION: "Add environment fallbacks."
Out of Scope
- Fixing the problems (delegate to
/refactoror/debug).
Cognitive Frameworks
Quantified Self
You cannot improve what you cannot measure. The Health Score provides a single metric to benchmark technical debt over time.
Qualitative Flags
A 100/100 score is useless if the tests only check the happy path (TEST_SHALLOW) or if the environment is hardcoded to localhost (ENV_FRAGILE). The flags are just as important as the score.
Reference Library
- QA Health Rubric: Full, Quick, and Regression modes.
- Toolchain Detection: Detect and run the project's test/lint/build, not npm by reflex.
- Audit Classification Taxonomy: Finding categories and P0-P3 ranking.
Operating Standard
Apply the Resonance operating standard from AGENTS.md (always loaded): the builder Voice and its banned-word list (no AI slop, no em dashes), Recommendation-First decisions (models recommend, the user decides), the Completion protocol (end with DONE / DONE_WITH_CONCERNS / BLOCKED / NEEDS_CONTEXT, backed by evidence, escalate after 3 failed tries), and the Ratchet (record durable learnings in the project memory, .resonance/02_memory.md, which loads at session start).
Model note (Claude): Strong native reasoning. Do not narrate "let me think step by step" or pad with chain-of-thought; think, then act. Prefer the dedicated file and search tools over shell. State assumptions briefly, then proceed.
What ships with it: 4 files
2.5 KB alongside SKILL.md
evals/
- 01_case.json437 B
- 02_case.json417 B
- 03_case.json368 B
- 04_planted_defect.json1.3 KB