crc os-adr wave 5: split Detector: file reads leave the classifying model #929
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#929
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
Split Detector: extract classification rules into a model; keep file reading in a query. Detector currently does two jobs: classifying legacy decision file structure and reading files from disk. Separate data and vocabulary split this cleanly per R6 and R7.
Reproduce
n/a: structure-only refactor, no behavior change
Approach
Required work:
Recipe from R7:
The classification leaves to a model under
model/migration/:Unit,UNIT_HEADING,PROSE_DECISION,DECISION_MARKERS,classify_file,split_units,unit_title,single_title,relative. Its public message takes the source text and its relative path and returnsUnits; it reads no file. What stays becomes a query underquery/migration/:CANDIDATE_DIRS,GENERATED_BASENAMES,candidate_files,generated?,already_migrated?, andunits, which reads each candidate file and passes the text to the model. The query keeps the publicnew(root:)andunits, sobin/adr-detect:11,bin/adr-migrate:18,migrator.rb:38, andmigration_report.rb:34change only the constant name.Governed by rulings: R1, R6, R7
Rejected: none (R7 governs the split)
Acceptance criteria
Owner sketch
Familiar with Ruby, Zeitwerk, os-adr architecture, and the Migration/Detection workflow. Understand the two jobs: classifying legacy file structure (model responsibility) and discovering candidate files (query responsibility). The model is stateless; the query holds root and discovers files.
Non-goals
No behavior change; no new tests; no deletion of code that has callers.
Origin
Session: a20defa9-036a-415a-9dde-2ed833c727cb
Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-refactor-docs/a20defa9-036a-415a-9dde-2ed833c727cb.jsonl
Where: crc-refactor run on plugins/os-adr, worktree crc-os-adr-2026-10-04, ledger docs/crc/os-adr/ledger.tsv
Commit
12acff91(Detector split into Migration::Classification, Migration::Unit, Migration::Inventory); rows applied 1/1; rows deviated 1 (relative stays in query); rows blocked 0Resolution
Done: Detector split per R7: Migration::Inventory (query), classification model (later Migration::LegacyFile by #932), Migration::Unit
Evidence:
12acff91on branch crc-os-adr-2026-10-04 (not merged; user review pending); suite: 51 runs, 168 assertions, 0 failures, 0 errors, 0 skips; eager load silent; inward lint: none (os-adr has none)Follow-ups: none for this ticket; run-level follow-ups filed as #934 and #935; dropped items listed in docs/crc/os-adr/HANDOFF.md Review