crc-refactor split trigger misses mixed-job classes: the "and" test never fires #944

Closed
opened 2026-10-04 20:20:25 +00:00 by jared · 1 comment
Owner

Problem

/os-sdlc:crc-refactor marks a ledger row split only when the file's job sentence needs "and". The rule sits in plugins/os-sdlc/skills/crc-refactor/references/ledger.md:38, references/prompts/role-morph.md:22, and prompts/inventory.md:12. The agent writes purpose-level sentences, so the test never fires on a mixed-job class.

Observed

In the os-adr run (docs/crc/os-adr/ledger.tsv, branch crc-os-adr-2026-10-04), wave 1 wrote purpose-level sentences. Example: Migrator (142 lines, two entry points migrate! and apply_fills!) got "This object owns the conversion of legacy decision records to ADR format." The verdict was move.
CLI::New (90 lines), Finder (72 lines), and Index (60 lines) got the same treatment.
Two independent Codex reviews judged all four classes mixed-job. The run's own R5 lens challenge ruled that Index must split.
Only 2 of 11 lib files split. Haiku also broke the "and" rule in 7 of 23 sentences (docs/crc/os-adr/HANDOFF.md:51).

Evidence on candidate deterministic triggers (scratch Prism prototypes):

  • Plain LCOM4 (ivar and sibling-call connectivity) flagged 0 of 4. The shared @repository connects every method.
  • Effect mix (class has direct-effect methods and pure methods) flagged 4 of 4. It also flagged 3 to 6 of 11 os-adr classes that reviewers kept whole (Repository, Initialization, Template, Inventory, LegacyFile, Report). It is blind to effects behind collaborators and Sequel. It misses non-effect splits such as plugins/os-sdlc/lib/.../model/dispatch.rb (27 methods). It is not usable alone. Adding exemptions or name lists was rejected as tuned heuristics.
  • Proposed, untested: assign each method a job category from a closed list (model, query, presenter, parser, command, adapter), using Prism facts per method (effects, ivars read, siblings called). Split when a class's public-method closures span 2 or more categories.
  • Open question: those categories mainly pick role directories. The user is moving away from role directories for os-adr (domain-first layout). Does the vocabulary survive as job kinds?

Reproduce

n/a: design gap in a skill rule; evidence is the os-adr ledger and HANDOFF.

Approach

Build a harness first. Run the candidate trigger on the 14 os-adr lib classes and the 10 os-sdlc classes. Compare it with reviewer judgments from haiku and sonnet. Report precision and recall.
Then bring the ADR-0270 amendment to the user for a ruling. ADR-0270 decision 2 reads: "The job sentence finds the mixed job." Make no skill edits before the ruling.

Required work: none beyond the acceptance criteria.

Orchestrator work: harness run, precision/recall report, ADR-0270 amendment decision memo to the user.

Acceptance criteria

  1. Given the 14 os-adr and 10 os-sdlc lib classes, when the harness runs the candidate trigger and the haiku and sonnet reviewers, then a precision and recall report exists for each.
  2. Given the report, when the user reviews it, then the user rules on the ADR-0270 decision 2 amendment before any edit to the crc-refactor skill.

Non-goals

The os-adr extractions themselves. They run separately as wave 5 on the known split rows.

Origin

  • Trigger: /os-sdlc:crc-refactor run on os-adr; reviewers disagreed with the move verdicts.
  • Improvised this session: none
  • Chain: mixed-job classes marked move ← job sentence written at purpose level ← the "and" test depends on sentence wording (DESIGN: ADR-0270 decision 2)
  • Root candidate: none
  • Where: plugins/os-sdlc/skills/crc-refactor/references/ledger.md
  • Session: ed701ed0-1700-4d83-93da-30abc0fa9a77
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-os-adr-2026-10-04/ed701ed0-1700-4d83-93da-30abc0fa9a77.jsonl
## Problem `/os-sdlc:crc-refactor` marks a ledger row `split` only when the file's job sentence needs "and". The rule sits in `plugins/os-sdlc/skills/crc-refactor/references/ledger.md:38`, `references/prompts/role-morph.md:22`, and `prompts/inventory.md:12`. The agent writes purpose-level sentences, so the test never fires on a mixed-job class. ## Observed In the os-adr run (`docs/crc/os-adr/ledger.tsv`, branch `crc-os-adr-2026-10-04`), wave 1 wrote purpose-level sentences. Example: Migrator (142 lines, two entry points `migrate!` and `apply_fills!`) got "This object owns the conversion of legacy decision records to ADR format." The verdict was `move`. CLI::New (90 lines), Finder (72 lines), and Index (60 lines) got the same treatment. Two independent Codex reviews judged all four classes mixed-job. The run's own R5 lens challenge ruled that Index must split. Only 2 of 11 lib files split. Haiku also broke the "and" rule in 7 of 23 sentences (`docs/crc/os-adr/HANDOFF.md:51`). Evidence on candidate deterministic triggers (scratch Prism prototypes): - Plain LCOM4 (ivar and sibling-call connectivity) flagged 0 of 4. The shared `@repository` connects every method. - Effect mix (class has direct-effect methods and pure methods) flagged 4 of 4. It also flagged 3 to 6 of 11 os-adr classes that reviewers kept whole (Repository, Initialization, Template, Inventory, LegacyFile, Report). It is blind to effects behind collaborators and Sequel. It misses non-effect splits such as `plugins/os-sdlc/lib/.../model/dispatch.rb` (27 methods). It is not usable alone. Adding exemptions or name lists was rejected as tuned heuristics. - Proposed, untested: assign each method a job category from a closed list (model, query, presenter, parser, command, adapter), using Prism facts per method (effects, ivars read, siblings called). Split when a class's public-method closures span 2 or more categories. - Open question: those categories mainly pick role directories. The user is moving away from role directories for os-adr (domain-first layout). Does the vocabulary survive as job kinds? ## Reproduce n/a: design gap in a skill rule; evidence is the os-adr ledger and HANDOFF. ## Approach Build a harness first. Run the candidate trigger on the 14 os-adr lib classes and the 10 os-sdlc classes. Compare it with reviewer judgments from haiku and sonnet. Report precision and recall. Then bring the ADR-0270 amendment to the user for a ruling. ADR-0270 decision 2 reads: "The job sentence finds the mixed job." Make no skill edits before the ruling. Required work: none beyond the acceptance criteria. Orchestrator work: harness run, precision/recall report, ADR-0270 amendment decision memo to the user. ## Acceptance criteria 1. Given the 14 os-adr and 10 os-sdlc lib classes, when the harness runs the candidate trigger and the haiku and sonnet reviewers, then a precision and recall report exists for each. 2. Given the report, when the user reviews it, then the user rules on the ADR-0270 decision 2 amendment before any edit to the crc-refactor skill. ## Non-goals The os-adr extractions themselves. They run separately as wave 5 on the known `split` rows. ## Origin - Trigger: `/os-sdlc:crc-refactor` run on os-adr; reviewers disagreed with the `move` verdicts. - Improvised this session: none - Chain: mixed-job classes marked `move` ← job sentence written at purpose level ← the "and" test depends on sentence wording (DESIGN: ADR-0270 decision 2) - Root candidate: none - Where: plugins/os-sdlc/skills/crc-refactor/references/ledger.md - Session: ed701ed0-1700-4d83-93da-30abc0fa9a77 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-os-adr-2026-10-04/ed701ed0-1700-4d83-93da-30abc0fa9a77.jsonl
Author
Owner

Resolution

Done: Predicted ruling (g), 75%, flagged for Jared: no amendment to ADR-0270 decision 2. The job sentence stays the finder of a mixed job; the noun-pair test is a brief rule (inventory-brief.md and role-morph.md step 5, ebe3a71e). No script trigger (ruling c).

Evidence: os-backlog 'and' test, docs/crc/os-backlog/HANDOFF.md section '"and" test (Phase 3, ruling c)' on branch crc-os-backlog-2026-10-16: 10 lib files, blind opus read vs wave 1 'and' signal; split side 3/5 agree (precision 0.6), keep side 5/5 (no under-firing, recall 1.0 on this sample). Phases 5-7: the wave 5 re-run loop found one more mixed class (CliExit, split in #1037) and kept 22 parts. Limits: n=10, not the 14 os-adr + 10 os-sdlc classes the acceptance criteria name; the os-sdlc target run is the larger check.

Follow-ups: none: the os-sdlc run (PLAN.md Phase 5) measures the trigger on a larger sample; no separate ticket

## Resolution **Done:** Predicted ruling (g), 75%, flagged for Jared: no amendment to ADR-0270 decision 2. The job sentence stays the finder of a mixed job; the noun-pair test is a brief rule (inventory-brief.md and role-morph.md step 5, ebe3a71e). No script trigger (ruling c). **Evidence:** os-backlog 'and' test, docs/crc/os-backlog/HANDOFF.md section '"and" test (Phase 3, ruling c)' on branch crc-os-backlog-2026-10-16: 10 lib files, blind opus read vs wave 1 'and' signal; split side 3/5 agree (precision 0.6), keep side 5/5 (no under-firing, recall 1.0 on this sample). Phases 5-7: the wave 5 re-run loop found one more mixed class (CliExit, split in #1037) and kept 22 parts. Limits: n=10, not the 14 os-adr + 10 os-sdlc classes the acceptance criteria name; the os-sdlc target run is the larger check. **Follow-ups:** none: the os-sdlc run (PLAN.md Phase 5) measures the trigger on a larger sample; no separate ticket
jared closed this issue 2026-10-16 19:28:53 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#944
No description provided.