Background
INTENT.md §4 (architectural properties, v2) added "Cost transparency": every Claude session clauck spawns derives sizing from a single shared formula in lib/sizing.py keyed on a task_complexity_scale float. The scope statement named the semantic interpreter as a known compliance gap that must be closed before the v3 contract amendment:
Scope of compliance at v2 adoption: doctor, scheduler, CLI surfaces (clauck size, clauck validate, clauck inspect), and all marketplace jobs are fully compliant. The natural-language semantic interpreter (clauck <anything>, clauck work <text>) still emits its own stage-2 execution params directly — a known compliance gap tracked for follow-up.
What's non-compliant
_build_interpreter_prompt in lib/clauck (search: def _build_interpreter_prompt) instructs the classifier to emit:
{
"command_type": "semantic",
"interpretation": "...",
"enhanced_prompt": "...",
"exec_model": "haiku|sonnet|opus",
"exec_effort": "low|medium|high",
"exec_max_turns": <int>,
"exec_max_budget_usd": <float>
}
The last four fields are exactly the literal-anchoring failure mode that drove PR #101 for doctor: classifiers under load grab literal dollar values from the prompt instead of computing, producing the $0.25 budget-exceeded cluster that broke doctor in practice. Every clauck <anything> invocation rides that same risk today.
The docstring at _build_interpreter_prompt acknowledges the gap with a pointer at INTENT.md §4, but that doesn't close it.
What the fix looks like (follows the doctor migration pattern from PR #101)
- Classifier output shrinks to scale-only: emit
{command_type, interpretation, enhanced_prompt, task_complexity_scale} — drop the four exec fields entirely.
cmd_semantic computes params via sizing.compute_sizing using the emitted scale, same way cmd_doctor does today.
- Update the prompt's "Sizing the semantic execution" section with scale anchors matching the job-creation guidance already in that file (0.10 trivial / 0.25 focused / 0.40 multi-source / 0.55 investigation / 0.75 DAG / 0.95 architectural).
- Keep the job-creation guidance as-is — it already correctly directs Claude to emit
complexity: in new job frontmatter, not raw params.
Doctor's migration is the reference: see _build_doctor_interpreter_prompt + the cmd_doctor routing block around the sizing.compute_sizing call.
Why this is tracked vs. just done in PR #128
PR #128's scope was "make the plugin the canonical install path." The semantic-interpreter migration is its own refactor with its own review surface — crosses the cmd_semantic execution path, changes the routing JSON schema, and touches the only remaining consumer of the scale-less flow. Bundling would have ballooned that PR; tracking as follow-up was the right call.
Acceptance
References
Background
INTENT.md §4(architectural properties, v2) added "Cost transparency": every Claude session clauck spawns derives sizing from a single shared formula inlib/sizing.pykeyed on atask_complexity_scalefloat. The scope statement named the semantic interpreter as a known compliance gap that must be closed before the v3 contract amendment:What's non-compliant
_build_interpreter_promptinlib/clauck(search:def _build_interpreter_prompt) instructs the classifier to emit:{ "command_type": "semantic", "interpretation": "...", "enhanced_prompt": "...", "exec_model": "haiku|sonnet|opus", "exec_effort": "low|medium|high", "exec_max_turns": <int>, "exec_max_budget_usd": <float> }The last four fields are exactly the literal-anchoring failure mode that drove PR #101 for doctor: classifiers under load grab literal dollar values from the prompt instead of computing, producing the
$0.25budget-exceeded cluster that broke doctor in practice. Everyclauck <anything>invocation rides that same risk today.The docstring at
_build_interpreter_promptacknowledges the gap with a pointer at INTENT.md §4, but that doesn't close it.What the fix looks like (follows the doctor migration pattern from PR #101)
{command_type, interpretation, enhanced_prompt, task_complexity_scale}— drop the four exec fields entirely.cmd_semanticcomputes params viasizing.compute_sizingusing the emitted scale, same waycmd_doctordoes today.complexity:in new job frontmatter, not raw params.Doctor's migration is the reference: see
_build_doctor_interpreter_prompt+ thecmd_doctorrouting block around thesizing.compute_sizingcall.Why this is tracked vs. just done in PR #128
PR #128's scope was "make the plugin the canonical install path." The semantic-interpreter migration is its own refactor with its own review surface — crosses the
cmd_semanticexecution path, changes the routing JSON schema, and touches the only remaining consumer of the scale-less flow. Bundling would have ballooned that PR; tracking as follow-up was the right call.Acceptance
_build_interpreter_promptemitstask_complexity_scaleonly for the semantic branch; no model/effort/turns/budget fields.cmd_semanticderives all four params viasizing.compute_sizing(including MCP auto-promote for non-strict_mcp_configruns).clauck "list my jobs"stays cheap; aclauck "audit every job for cost overruns"routes to sonnet/high with a budget the formula produces, not a classifier-guessed literal.References
INTENT.md§4 — Cost transparency architectural propertylib/sizing.py— the shared formulalib/clauck—_build_interpreter_prompt(classifier) +cmd_semantic(stage-2 routing)