Phase 4 — Rubric and classification #4
Notifications
Due Date
No due date set.
Blocks
Depends on
#5 Phase 5 — Snapshots and trend
kotkan/claude-plugin-inference-arbitrage
#6 Phase 6 — Output paths
kotkan/claude-plugin-inference-arbitrage
#3 Phase 3 — Dynamic pass
kotkan/claude-plugin-inference-arbitrage
Reference: kotkan/claude-plugin-inference-arbitrage#4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Per design/tasks.md Phase 4. Depends on Phase 3 (closed).
references/boundary-rubric.md=design/rubric.mdverbatimskills/boundary-rubric/SKILL.md— usable standalone on a single stepagents/offload-analyst.md— hard gate: no overrule case → boundary question, never filedhigh-confidence candidates (PASS). worktree-discipline withbin/worktree-auditmasked → known cut flaggedhigh(PASS). One real iteration recorded (measurement was wrongly gating correctness, not just value — fixed).Implemented in
38e1adb,8da16ad. Independently verified: both calibration gate fixtures inspected directly (T1-T5 judgments are rigorously argued, not rubber-stamped — e.g. the worktree overrule case is a real edge case, a clean-but-live sibling-session checkout).bash tests/run-all.sh: 67 assertions, exit 0. See comment below for full detail.Phase 4 delivered — rubric agent + calibration gate
Commits
38e1adb,8da16adonmain. Plugin version0.1.0→0.2.0.tasks.md checklist
references/boundary-rubric.md=design/rubric.mdverbatim (diff -qclean; both files were given identical markdownlint fixes so they stay byte-identical).skills/boundary-rubric/SKILL.md— standalone on a single step, before any code exists. Carries the five tests, four positions, four positioning questions, both failure modes with the asymmetry, the falsifiability triple, and the §6 confidence table as an operational procedure.agents/offload-analyst.md—model: sonnet,tools: Bash, Read, Grep, Glob, Skill, Agent. Read-only w.r.t. the target; leads with coverage; names skills not UUIDs; ranks by measuredoffload_value; "nothing to offload here" is a complete answer; hard gate stated.Methodology/Calibration.mdappend (not written by me, per instruction).New:
bin/boundary-classifyA deviation from plan.md §2's three-script layout, and the reason matters. The determinism-test outcomes and the falsifiability triple are irreducibly inference (T2 and T4 are semantic). But grading them into a confidence and a file/don't-file verdict is a pure lookup table — rubric §6 plus the §5.2.7 threshold. Leaving that in agent prose would have the model re-derive a fixed table every invocation, which is exactly the anti-pattern this plugin reports on (FR-8.1). So it is a script, and the FR-4.2 hard gate is now mechanically enforced rather than merely asserted in prose.
Calibration evidence
Gate 1 —
token-budget→ zerohigh-confidence. PASS.Two candidates were surfaced and both declined on the rubric, rather than none being looked at. The opening-sequence candidate fails T4: which diagnostic to open with depends on what the user asked, and that is not in the inputs. No overrule case is producible — and the reason is rubric §5's inverse paragraph: a human would overrule it often, so it is not a position-1 script. The dispatch-table candidate fails T1/T2/T4.
Static signals that could have produced a false positive and did not: verb ratios of 0.667 and 0.714 are both above the 0.6 smell threshold. They do not fire because the smell is a conjunction — high verb ratio with no
bin/script behind it — and every command those skills prescribe is an invocation of the 606-LOCcc-tokens. The agent body states this as a conjunction explicitly.Gate 2 —
worktree-disciplinewithbin/worktree-auditmasked → known cut rediscovered athigh. PASS.The mask (
tests/calibration/mask-worktree-audit.py, reproducible, never touches the target checkout) dropsscript_loc1730 → 407 andscript_coverage0.353 → 0.083, and removes the one command block that invoked the masked script. What is left insweep-worktreesis the raw plumbing the skill prescribed, including the recorded correction:That annotation is why the cut is rediscoverable from the inventory JSON alone, without appealing to outside knowledge of the
@{u}incident — the edge case in the triple is exactly that trap.Two negative controls in the same run are as important as the positive one:
dev-server-syncis the loudest cost signal in the target — 76% of audited spend,read_amplification392.5 — and the rubric declines it. The amplification is from reading the user's project files, not a procedure the plugin owns: T1/T2/T4 all fail, MTR is 0.057, no recurring n-gram. Scripting it would be premature crystallization.drift-noteverdict and a documentation fix ("point athooks/policy.sh, stop restating the env-var contract"), never competing on token value in the offload table.Iteration required
One real iteration. The first passing run graded the masked worktree candidate
highbut returnedboundary-questioninstead offile, because I had made thin dynamic evidence (1 invocation, 43 turns) block filing outright. That was wrong: measurement gates the value claim, not the correctness claim, and blocking on it contradicts FR-2.4, under which a plugin with zero transcript history must stay auditable on its definition alone. Changed so thatmeasured(≥3 invocations, ≥30 attributed turns) applies the §5.2.7 2%-of-spend threshold as written, whilethin/unmeasuredfiles on the static case with the value claim explicitly marked unproven. Both gates still pass; the known-correct cut now correctly reachesfile.Coverage-denominator decision (the Phase 3 open finding)
Decided: keep the session-wide denominator, add no second one, and relabel it. A tighter "turns within invocation windows" denominator is near-tautological — an invocation window is a contiguous run of attributed turns, so that ratio is ~1.0 by construction. It would read as a reassuring number while measuring nothing.
The session-wide ratio does not measure completeness at all; it measures dilution (how much of those sessions was other work), which is the real content of the 0.021 finding against
anxious. So the agent reports it as dilution and reports completeness instead via absolute counts plus named structural blind spots — hook-driven work carries no attribution, so the agent must name the target's hooks and say their cost is invisible. Rationale is recorded as a comment in the agent body, not left as a TODO.Tests
tests/classify.test.sh— synthetic hand-computable cases for every row of the confidence table, the FR-4.2 hard gate, the 2% threshold, position-2-without-staleness-plan, plus both calibration gates asserted end to end. The mask check skips cleanly when no siblingworktree-disciplinecheckout exists, so CI is unaffected.bash tests/run-all.sh→ exit 0, 67 assertions, nothing from Phase 2/3 broken. shellcheck clean; all pre-push gates green (BFM ✅ RUF ✅ SHF ✅ MDL ✅ WPC ✅ BIO ✅ RUL ✅ SHC ✅ CPV ✅).Not done, deliberately
Filing is Phase 6. The agent body instructs it to report and file nothing, including candidates
boundary-classifyreturns with"verdict": "file", until that path exists.Leaving this open for your review.