Framework health

From haabe/mycelium · View interactive version

Framework health is an AI agent skill from the GitHub repository haabe/mycelium. Evaluate Mycelium's own process effectiveness. Measures cycle velocity, discard trends, confidence calibration, gate effectiveness, regression rate. Run quarterly or every 20 cycles.

How to use this skill

Skill file

Framework Health Check

Mycelium evaluates its own process. This is triple-loop learning — the framework assessing whether it is getting better at producing good outcomes.

When to Use

Workflow

1. Load Cycle Data

Read .claude/canvas/cycle-history.yml.

Framework-self-host detection (per engine/cycle-learning.md#framework-on-framework-exemption): if the project root contains plugins/mycelium/plugin.json AND CLAUDE.md begins with # Mycelium:, this is the framework dogfooding itself. Skip the cycle-count gate and route to a corrections-graduation summary:

Otherwise (product project, not framework-self-host): if fewer than 5 cycles recorded, report:

"Insufficient cycle data for framework health assessment. [N] cycles recorded; minimum 5 needed. Continue recording outcomes."

2. Measure Five Dimensions

For each dimension, compute the metric and compare against trend (if prior assessments exist):

Cycle Velocity:

Discard Rate:

Confidence Calibration:

Gate Effectiveness:

this dimension previously said "count the gates" without saying from what — and the field that

engine/cycle-learning.md added expressly to close it ("was unInstrumented in cycle records")

was read by nothing. Producer specced, consumer unwired, dimension computed from air.

"no-data: 0 of N closed cycles carry gates_fired" — and say the next /mycelium:retrospective

populates it. **Do NOT reconstruct gate outcomes from memory, the transcript, or a read of the

guards.** A dimension filled by hand at assessment time reports on the assessor, not on the

cycles, and it is indistinguishable in the dashboard from one backed by records. The validator

already emits this absence as a WARN; the dashboard must not paper over what the validator flags.

Demand Mix (Seddon: value demand vs failure demand):

added, because the two fields above were specced first and read second — and were still at 0 of 16

compliance months later. **A field whose consumer is written afterwards is the gates_fired

shape**, and this dimension exists so demand type does not repeat it.

own is throughput and measures nothing** — the question is what share of the work was caused by

earlier work.

A rising release count reads as productivity; the same count with a rising failure share is a

system generating its own work. Where a project's health file already praises a rising corrections

count as "actively managed learning", that is a Goodhart inversion on this exact dimension —

surface it.

is a finding about the system, not about the people, and remediating it by re-classing cycles is

the fastest way to make the dimension useless.

closed cycles carry demand_type". *Do NOT infer demand type from commit messages, the

transcript, or your own read of what the cycle looked like.** Same rule and same reason as Gate

Effectiveness above: a dimension filled at assessment time reports on the assessor.

split.** Reconstructed demand type is the weakest form of this measurement and must not be

averaged into records made at cycle open.

Regression Rate:

named as of v0.121.0 for the same reason as Gate Effectiveness above. **Post-launch defects are

NOT regressions here** — they live in rework.post_delivery_regressions and belong to a different

question. Conflating them double-counts the second and hides the first.

recorded regressions and no field are different findings: the first is a healthy system, the

second is an unmeasured one, and reporting them the same way is how an unmeasured system reads

as healthy.

2b. Re-run Deferred Design-Verification Eval Scenarios

Re-run any eval scenario tagged regression AND router-discipline from .claude/evals/scenarios/integration/. These are deferred design-time decisions that need periodic re-verification (the AGENTS.md router design is the canonical case — see agents-md-router-discipline.yml).

For each scenario:

If a scenario fails its success_criteria for the first time, log to corrections.md as a new generalizable correction with the scenario name as evidence. Do not auto-remediate — surface the regression for human review.

3. Run Threshold Calibration

If cycle count ≥ minimum_n for any threshold in .claude/canvas/thresholds.yml:

The ratchet (added 0.216.0). validate_canvas.py now carries two findings from

check_cycle_recording.py so this step cannot be skipped silently: calibration is due when the

eligible input count for a threshold has reached its minimum_n while based_on_n is still 0, and

uncalibrated because N of M cycles are <class> cycles carrying <field> when the count is below the

minimum but the total is not, which is the case a calibration_status note blaming the cycle count

gets wrong (the dogfood canvas carried that note for three months against 17 cycles and a minimum of

10; the real reason was zero product-leaf cycles with a non-null ice_accuracy). Now

that second finding is a WARN only while thresholds.yml#_meta.calibration_status blames the count

(it speaks of minimum_n, too few cycles or the cycle count, and names neither the cycle class nor

the calibration field). Once the note names the true reason, or when there is no note, the same

state is one COVERAGE (calibration) line for all such thresholds: no edit can end it, only

recording cycles of that class with an estimate before the work and an actual after it, and a WARN

that kept printing after its note was corrected (dogfood 2026-10-10) taught the reader to scroll

past the WARN list. A third finding

names every solution leaf in a terminal state with no cycle row, because that is how the loop goes

unfed. Neither computes a value: calibrating a product threshold on meta-dogfood cycles is a category

error, and the output is the prompt with the numbers in it. Since 0.319.0 the same function also

prints one line when thresholds.yml still carries ice_advance, the threshold on the ICE total

that release retired: the line says the key is read by nothing and can be removed. It is not a

calibration that is due. Since 0.320.0 it prints the same kind of line for bakeoff_delta, the ICE

gap that decided a leaf bakeoff until that release retired it.

4. Check Goodhart Counter-Metrics

For each dimension, verify the counter-metric is not degrading:

4b. Cluster Graduation-Readiness (added 2026-05-08)

Read .claude/memory/cluster-instances.md. For each cluster:

This step closes the recursion the cluster log was created to address: graduation criteria become mechanically auditable rather than promises stored in commit messages.

4c. Receipts Highlights Rotation Cadence (added 2026-05-08)

The README's "How Mycelium got smarter" section shows 5 case headers; the full list lives in docs/receipts/cases/. Stale README highlights are a Goodhart signal: if the receipts surface freezes, the framework's "we get smarter with each cycle" claim degrades to "we got smarter once".

For each case currently on the README:

Per docs/contributing/style.md#highlights-rotation. Cases stay in docs/receipts/cases/ even when rotated off README; only the README mention rotates.

4d. Docs Health Cross-Surface (added 2026-05-08)

Run a lightweight version of /mycelium:canvas-health step 9b on docs/:

Surface in the dashboard. Full details delegate to /mycelium:canvas-health.

4e. Chat-UX Axiom Audit of Skill Output Templates (added 2026-05-30)

The chat-UX nudges in ${CLAUDE_PLUGIN_ROOT}/harness/design-principles.md ("the chat is a UI") shape live output, which has no stored corpus to audit retroactively. What is auditable is the static surface that pre-shapes live output: the ## Output/## Output Format blocks in ${CLAUDE_PLUGIN_ROOT}/skills/*/SKILL.md. Scan each for two axiom violations:

This is the buildable form of the self-audit; the live-output version is unenforceable (no corpus). Surface counts + offending skills in the dashboard. Do not auto-edit skills — flag for maintainer review (a template's flat option-list may be deliberate). Graduation path: if the same skill is flagged across two assessments, promote to a mechanical tests/bash check (then it inherits G-V12 / Check 37).

Temporal independence required. "Flagged across two assessments" means two assessments separated by independent observation windows — a quarterly run, a cycle-count-trigger run, or an explicit re-audit after deliberate skill-template edits. Same-day re-runs with no intervening skill edit are mechanically the same flag, not two observations; record the prior run's flag-set as the baseline and check the next independent run against it. Without this rule, any agent running /mycelium:framework-health twice in a row would graduate the entire flagged set on the second run. The rule applies symmetrically to 4b (cluster graduation-readiness) and 4d (docs health) — re-flagging in the same session does not count as independent confirmation.

4f. Gap-Analysis Diff Audit (added 2026-06-12)

The 2026-06-12 five-dimension gap analysis (code/hooks, doc-vs-mechanism consistency, flows/lifecycle, documentation, packaging/CI/schemas — decision-log "Five-dimension deep-dive gap analysis") is a repeatable audit shape. Its expensive failure mode was NOT finding gaps — it was stale premises: 4 of 6 backlog-derived items were already shipped or already graduated, found only by ground-truthing against the current tree.

On each quarterly run:

4g. Theory-Fidelity Cadence Trigger (added 2026-06-18)

/theory-fidelity is the semantic audit (is each theory faithfully operationalized vs distorted/over-claimed?) — it needs source-grounding and an LLM, so it runs on cadence, not every push. The check_theory_fidelity.py CI guard covers only the structural subset (references resolve, gates grounded, no name-only theory). This step is the trigger for the semantic half.

4h. Test adequacy: the mutation sample (added 0.192.0)

engine/feedback-loops.md names the mutation testing score as the counter-metric for test coverage,

and until 0.192.0 nothing computed it. Run:

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/mutation_sample.py" --root <framework repo> --modules 12 --mutants-per-module 12

It mutates code tokens in a seeded random sample of the shipped checks (never strings, comments or

docstrings), runs each module's own tests with bytecode caching disabled, and reports killed versus

survived. Report the survivor lines, not only the score: each survivor is a line whose behaviour

no test constrains. On the framework repo the first honest run (2026-09-10) read 76% over 129

mutants, with exit codes on clean paths, an OR-predicate never exercised branch by branch, and

<-versus-<= boundaries as the survivors; eleven tests were written against them the same day.

A rising score with a falling first-pass rate is the gaming shape; read it beside the coverage floor

and the negative-control check. Framework-repo only: a consumer without plugins/mycelium/scripts

gets UNKNOWN, which is not a pass. Same-session re-runs are not two observations (4e).

4i. Retirement candidates: what could go (added 0.215.0)

The framework only grows: at 0.180.4 it carried 61 skills and 23 gates with none retired, and no

mechanism reported another as unread or unfired. Run:

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/check_retirement_candidates.py" --project-dir . --window-days 60

For every skill, hook and check it prints the last evidence of use from the records this project

already writes (a dated decision-log or corrections mention, a read-log row, the newest row of the

state file the hook writes, the gate list) and who reads it (another skill, an engine doc, a hook, a

runtime manifest, the gate set). **A candidate is a mechanism with no fire in the window and no

reader.** The report prints them under "named by nothing that runs (unwired, not necessarily

dead)": "no reader" means nothing sends an agent to the mechanism, which is not the same as nobody

needing it (dogfood 2026-10-11: harms-check and friction-log were listed twice, and both were

unwired, not unneeded). Report each candidate as "wire it in where its own text says it belongs, or

retire it", never as dead. Three things to report beside the list, because each bounds what it means: the hooks that

write no record and so cannot be measured (the first fix there is a record, not retirement); the

"quiet but read" rows, which are not candidates and are listed so a reader can disagree; and that no

runtime records a skill invocation, so a skill used and never written about is invisible here. The

first dogfood run (2026-09-15, 60 days) listed 136 mechanisms, 3 candidates after the two new

checks gained their callers (/canvas-sync, last named 2026-06-14; check_gated_by.py, a

self-declared draft stub; one guard whose log file the installed plugin did not yet write), and 10

hooks with no record. Retirement happens by release with the row's evidence in the changelog. The

script removes nothing.

4j. Record the run (added v0.329.0)

This review is on the schedule (engine/review-schedule.yml, every 90 days), and the schedule does

not read decision-log headings, which were measured to undercount. When the dashboard is written, run:

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/review_schedule.py" --record framework-health --project-dir .

Without it, session start keeps reporting framework-health as past its cadence.

5. Generate Dashboard

Output

## Framework Health Dashboard

Assessment date: [date]
Cycles analyzed: [N]
Period: [date range]

### Dimensions

| Dimension | Current | Trend | Status | Counter-Metric |
|-----------|---------|-------|--------|----------------|
| Cycle velocity | [X days avg] | [improving/stable/degrading] | [healthy/warning/critical] | Outcome quality: [OK/degrading] |
| Discard rate | [avg phase X] | [earlier/stable/later] | [healthy/warning/critical] | False positive rate: [OK/rising] |
| Confidence calibration | [factor X.XX, or "empty (0 product-leaf)"] | [improving/stable/diverging/—] | [healthy/warning/critical/empty-by-design] | Decision speed: [OK/slowing] |
| Gate effectiveness | [see detail] | — | [healthy/warning/critical] | Flow speed: [OK/slowing] |
| Demand mix | [X value / Y failure, Z% failure, or "no-data: 0 of N"] | [improving/stable/degrading] | [healthy/warning/critical] | Throughput: [OK/inflating] |
| Regression rate | [X%] | [decreasing/stable/increasing] | [healthy/warning/critical] | Innovation rate: [OK/declining] |

### Threshold Calibration

*(The "ICE advance | 100" row that stood here until 0.319.0 is gone: the threshold is retired, see `engine/adaptive-thresholds.md`. If the project's `thresholds.yml` still has `ice_advance`, report it as retired and removable, not as a threshold awaiting calibration.)*

*(The "Bakeoff delta | 20%" row that stood here until 0.320.0 is gone too: no ICE gap decides a leaf bakeoff, see `engine/adaptive-thresholds.md` and `orchestration/leaf-bakeoff.md`. If the project's `thresholds.yml` still has `bakeoff_delta`, report it as retired and removable, not as a threshold awaiting calibration.)*

| Threshold | Default | Calibrated | Based On | Change |
|-----------|---------|-----------|----------|--------|
| Confidence factor | 1.0 | [value or "insufficient data"] | N cycles | [+/-] |

### Pattern Signals Active

[List any active pattern detector signals from ${CLAUDE_PLUGIN_ROOT}/engine/pattern-detector.md]

### Recommendations

[Specific actions based on findings — not generic advice]

Rules

Prior findings first (added v0.96.0)

Before producing new findings, rule on the previous run's — per ${CLAUDE_PLUGIN_ROOT}/engine/canvas-guidance.yml#prior_findings_first. For each: CLOSED (name what closed it), STILL-OPEN (carry it forward with a horizon), or DECLINED (a reason AND a re-open trigger). If there is no prior run, say so and continue.

Scoring goes first because it is the boring half. A periodic instrument that produces findings and never scores its old ones accumulates a ranking nobody reads — theory-audit-2026-04-17.md ranked its gaps and sat unconsumed for four months. Anything placed after the interesting work is what a long session drops.

A finding ranked HIGH must leave this skill with a home — tag or create an opportunity on the framework-side root of the OST (opportunities.yml, rolls_up_to), or decline it with a re-open trigger. Scoring alone does not close the loop: it fires only when someone runs this skill again, so on a slow cadence findings still sleep. An opportunity is read by instruments on their own schedule. Not human-tasks.yml — that canvas is scoped to offline HUMAN work (interviews, outreach), and an engineering finding filed there is a category error.

Theory Citations

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.