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.
| Mode | Model | Planner | Contract | Iteration | Context reset | Rubric |
|---|---|---|---|---|---|---|
| MINIMAL | Haiku | Skipped, runs mk:cook | Skipped | Skipped | Skipped | Skipped |
| FULL | Sonnet | Product-level | Required | 1 to 3 rounds | Optional | Full |
| FULL | Opus 4.5 and older | Product-level | Required | 2 to 3 rounds | Required | Full |
| LEAN | Opus 4.6, 4.7, Opus 5, Fable | Product-level | Optional (skip under 5 criteria) | 0 to 1 rounds | Skipped | Full |
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:
MEOWKIT_AUTOBUILD_MODE(MINIMAL,FULLorLEAN) or the--tierflag on/mk:autobuild(auto,minimal,full,lean). Either one overrides detection.- The
model-detector.cjsSessionStart handler, which reads themodelfield of the SessionStart input and writes the tier and density to.meowkit/state/detected-model.json. Theautobuild.modesetting, when set to a valid density, overrides what the handler detected. MEOWKIT_MODEL_HINT, used when the host sends no model.- 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 contains | Tier | Density |
|---|---|---|
fable, opus-4-6, opus-4-7, opus-5 | COMPLEX | LEAN |
other opus ids, such as opus-4-5 | COMPLEX | FULL |
sonnet | STANDARD | FULL |
haiku | TRIVIAL | MINIMAL |
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=LEANThe 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:
- The ship check runs lint, related tests and a type-check before a commit, push, merge or PR.
- The plan is agreed before the build and the reviewer writes a verdict. Both are practices, and no hook blocks on them.
- A sprint contract that exists is read by the developer before source edits. No hook checks it.
- 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 below | Prune candidate |
| Above 0 and below 0.02 | Watch, revisit next cycle |
| 0.02 or above | Keep, 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.
Related
- Autonomous build for the full pipeline
- Model routing for session tiers by task complexity
- Trace and benchmark for the audit tooling
- Skill: autobuild and skill: scale-routing
- Rules index for the harness rules
Confluence Integration
Install and authenticate Confluence access, understand the Cloud-only boundary and the write rules, and find the right skill for a task.
Session State vs Claude Code --resume
What .meowkit/state/ holds, how it differs from the conversation that Claude Code --resume restores, and which of the two to look at for a given question.