Skip to Content
MeowKit

Adaptive Density

How /mk:autobuild scales its scaffolding to the model: the dead-weight thesis, the three density modes and how the mode is chosen.

Every harness component assumes something the model cannot do. A sprint contract assumes the model cannot derive testable criteria on its own. A context reset assumes working memory degrades over a long session. An iteration loop assumes one pass misses issues. The assumptions were right for the models of their day, and models improve.

A capable model forced through scaffolding built for a weaker one gets friction instead of help. Anthropic's harness research found that the full harness on Opus 4.6 gave worse output than a leaner configuration. Adaptive density picks the amount of scaffolding that fits the model.

The modes

.claude/skills/autobuild/references/adaptive-density-matrix.md holds the full matrix with the rationale for each cell. This is the short form.

ModeModelPlannerContractIterationContext resetRubric
MINIMALHaikuSkipped, runs mk:cookSkippedSkippedSkippedSkipped
FULLSonnetProduct-levelRequired1 to 3 roundsOptionalFull
FULLOpus 4.5 and olderProduct-levelRequired2 to 3 roundsRequiredFull
LEANOpus 4.6, 4.7, Opus 5, FableProduct-levelOptional (skip under 5 criteria)0 to 1 roundsSkippedFull

MINIMAL hands the task to mk:cook, because Haiku cannot drive a multi-hour iteration loop usefully. FULL keeps the contract to stop silent feature substitution and keeps the loop to catch self-praise. LEAN builds in one session, because these models can draft their own criteria and auto-compaction handles long contexts. Forcing a context reset on them breaks their reasoning continuity. Rubric rigor is the same in every mode except MINIMAL.

Opus 5 and Fable take LEAN by the same rule as Opus 4.6, but neither has been replayed against the calibration set. Set MEOWKIT_AUTOBUILD_MODE=FULL if a LEAN run under-delivers.

How the mode is chosen

mk:scale-routing recommends a density from task complexity, and the autobuild step resolves the final one:

  1. MEOWKIT_AUTOBUILD_MODE (MINIMAL, FULL or LEAN) or the --tier flag on /mk:autobuild (auto, minimal, full, lean). Either one overrides detection.
  2. The model-detector.cjs SessionStart handler, which reads the model field of the SessionStart input and writes the tier and density to .meowkit/state/detected-model.json. The autobuild.mode setting, when set to a valid density, overrides what the handler detected.
  3. MEOWKIT_MODEL_HINT, used when the host sends no model.
  4. With no signal at all, STANDARD tier and FULL density. Detection never picks LEAN by accident.

The handler maps model ids with one shared table (.claude/hooks/lib/density-lookup.cjs):

Model id containsTierDensity
fable, opus-4-6, opus-4-7, opus-5COMPLEXLEAN
other opus ids, such as opus-4-5COMPLEXFULL
sonnetSTANDARDFULL
haikuTRIVIALMINIMAL

To set a tier by hand:

export MEOWKIT_MODEL_HINT=opus-4-6
/mk:autobuild "build a kanban app" --tier lean
export MEOWKIT_AUTOBUILD_MODE=LEAN

The run report's "Density Decision" section records the density and where it came from. When the fallback fired it reads Source: auto-fallback (no model env var detected).

Density does not lower the bar

MEOWKIT_AUTOBUILD_MODE=LEAN changes how much scaffolding runs. These apply in every mode:

  1. The ship check runs lint, related tests and a type-check before a commit, push, merge or PR.
  2. The plan is agreed before the build and the reviewer writes a verdict. Both are practices, and no hook blocks on them.
  3. A sprint contract that exists is read by the developer before source edits. No hook checks it.
  4. The evaluator drives the running build. A PASS with no evidence is converted to FAIL.

Dead-weight audit

On a major model upgrade, maintainers measure each harness component by running the benchmark canary suite with the component on and off. This runs from the source repository, because the published kit does not carry mk:benchmark.

Delta (baseline minus disabled)Decision
0 or belowPrune candidate
Above 0 and below 0.02Watch, revisit next cycle
0.02 or aboveKeep, with the delta recorded as evidence

A component must show a delta under 1 point across two consecutive model versions before it is pruned. Security rules, the evaluator's active verification and the ship check are never pruned. See Trace and benchmark.

On this page