3.8 KiB
3.8 KiB
Proposal: calibrate-assessment-inventory
Why
Wayfinder map #49 locked the design (in lifecycle-spec.md, committed 2026-07-15) for persisting the full :calibrate assessment inventory — today only confirmed rules survive a calibration pass, so keep verdicts, human declines, and open consults evaporate and get re-litigated every pass. The design also fixed two judge-quality defects observed in calibration pass #1 (widening to container globs; no memory of prior rejections). This change implements that locked design; every decision is already made — see tickets #51–#57, #59 on the map.
What Changes
- Nominations memory: the project rules file (
.dochygiene-rules.json) gains a top-levelnominationskey withconsultsandrejectedsub-keys (additive toschema_version1).rulebook.pystays nomination-unaware. NominationIntakeFilter(new class incalibrate_helpers.py): deterministic Step 3.5 of the calibrate pipeline — drops exact glob+lifetime repeats of recorded rejections, annotates related (match-set-intersecting) history for the judge.- Canonical-writer extension (
calibrate_helpers.py): all rules-file writes go through one writer enforcing canonical ordering (rules grouped delete-once-served / temporary / keep, glob-sorted;nominationsafterrules,consultsbeforerejected; unknown fields warned, round-tripped). No hook enforcement. - Pipeline wiring: Step 3.5 (intake filter) before the judge; Step 5 report gains an "Open consults" section; Step 6 persistence extended — keep verdicts persist as plain keep rules (incl. exact-path singletons, per the keep-tier relaxation), human declines persist as
rejectedentries, consult verdicts dedupe intoconsults. - Extract-op append:
:clean's extract-then-delete op appends a pointer entry to the per-directoryextracted.mdindex, atomically within the single hygiene commit (the global**/extracted.md → keeprule is already inrulebook.json). - Two unit-test suites (no new eval harnesses, per ticket #59): intake filter (exact-repeat drops, relatedness annotations incl. the two #52 worked cases) and writer (round-trip ordering, unknown-field warnings).
Capabilities
New Capabilities
(none — every change extends an existing capability)
Modified Capabilities
lifecycle-rulebook: envelope gains the optional project-file-onlynominationskey (consults/rejected schemas); writes are writer-enforced into canonical ordering; loader remains nomination-unaware and add-only merge is unchanged.calibrate: new deterministic intake-filter requirement (Step 3.5); Persistence Rules by Scope extended to keep verdicts / rejections / consults; judge intake gains nominations-memory context (rejections are variants-not-vetoes, open consults must resurface); Rule-Quality Class-Never-Path gains the keep-tier relaxation and the enumerate-siblings-never-widen-to-container test.doc-clean: the extract-then-delete op additionally appends theextracted.mdpointer entry in the same per-file transaction / single hygiene commit.
Impact
- Code:
scripts/calibrate_helpers.py(NominationIntakeFilter + canonical writer),skills/calibrate/SKILL.md+workflows/*.md(Step 3.5/5/6 wiring — judge.md context sections already landed with the design commit),scripts/patch_applier.py(extract-op append). - Tests:
tests/test_calibrate_helpers.pyextended (or split) for the two suites; existing 407-test suite must stay green. - Data:
.dochygiene-rules.jsonfiles may now carrynominations; older readers unaffected (additive,rulebook.pyignores it). - Source of truth:
plugins/os-doc-hygiene/lifecycle-spec.md§1 (extract index), §2 (nominations memory, canonical ordering), §8 (steps 3/6, test coverage); ADR-0038/0039 amendments 2026-07-15. - Post-implementation: run
bin/refresh-plugins.