Add a system-model gauge command with per-pattern knees and report-only bands #1547
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1547
Loading…
Reference in a new issue
No description provided.
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?
Problem
No
system-modelcommand prints the distance sweep, so the present threshold cannot be studied on a new codebase. Jared wants a sliding scale that adapts to each codebase. The only sweep code is a one-off script,docs/system-design-format/proof/distance-sweep/gauge_dump.rb. It hard-codes one machine path and two plugins, and it reads the privateOpportunityScan#matcheswithsend.Observed
A knee over all patterns is 0.333 in os-backlog and 0.375 in os-sdlc, where nearly all matches are already in. Knees per pattern are clear for REPO, LAY, and HEX. GATE has no knee in os-backlog and a knee of 0.375 in os-sdlc, which is too loose to mean "implemented".
Reproduce
n/a: this is a new command.
Approach
Add
system-model gauge <project-root> [--json]. It works on any project root that the othersystem-modelcommands accept. It prints, per pattern: filled-match counts at each sweep threshold, the knee, the knee gain, and the matches in each band.The purpose of the bands is to find code that should fit a pattern and does not. Bands: present is distance at or below 0.05, as
Match#present?defines it. Candidate is above 0.05, up to the knee. Far is above the knee. A pattern with a knee gain below the minimum gain, or with too few filled matches, has no knee, and all of its matches above 0.05 are candidates. The minimum gain (default 0.2) is data inCatalog. The gauge covers strict and loose patterns and labels each loose row, so partial matches of loose patterns reach a report. There is no cap: a band only sorts matches, and no band hides a match.The gauge also lists every match with exactly one empty role as missing-role, with the role name, the component, and the size. These matches are outside the sweep, because they have no filled assignment. They are the case where a component needs a pattern and lacks one part.
The knee is the sweep distance with the largest value of normalized count minus normalized distance. Bands are report-only. They do not change
Match#present?,Catalog.thresholds, or the ranking.Required work:
OpportunityScanmethod — check: absentsend(:matches)inplugins/os-sdlc/**/*.rbgaugecommand to the CLI — check: presentgaugeinplugins/os-sdlc/lib/os_sdlc/system_model/run.rbdocs/system-design-format/proof/distance-sweep/gauge_dump.rband point the proof file atsystem-model gauge— check: presentsystem-model gaugeindocs/system-design-format/proof/2026-11-04-distance-sweep.mdAcceptance criteria
system-model gaugeruns, then it prints for each pattern the counts per threshold, the knee, the gain, the band of each filled match, sorted by distance, and each missing-role match.opportunitiesruns, then its ranking and present list do not change.Owner sketch
Non-goals
Changing the 0.05 threshold. #1546 decides that from expert labels.
Origin
docs/system-design-format/proof/2026-11-04-distance-sweep.mdgauge_dump.rb, a one-off script that reads private matches withsendopportunitiesshows only present and ranked findings. IMPROVISATION:gauge_dump.rbplugins/os-sdlc/lib/os_sdlc/system_model/opportunity_scan.rbVERDICT: CREATE
Work started on branch ticket-1547.
Resolution
Done: Added system-model gauge: per-pattern sweep counts, knee with min-max normalization, gain, report-only bands, and every match with one or more empty roles. Deleted gauge_dump.rb.
Evidence: main; suite 3358 runs 0 failures; lint clean on 10 changed files; design audit findings all fixed; gauge run on os-backlog gives HEX 0.143, LAY 0.143, no false REPO knee.
Follow-ups: dropped: move the 0.05 literal to one owner, since Sweep and Match agree and #1546 may change it; dropped: print best-lift when no knee qualifies, since the gauge shows gain