crc os-adr wave 4: Migration concept into role directories #928

Closed
opened 2026-10-04 16:37:06 +00:00 by jared · 3 comments
Owner

Problem

Move Migration concept files into role directories by their job (verb). Implement Migrator, MigrationReport, and Migrator::Extraction movements under Migration as the concept root.

Reproduce

n/a: structure-only refactor, no behavior change

Approach

Required work:

  1. plugins/os-adr/lib/adr/migrator.rb: move to plugins/os-adr/lib/adr/command/migration.rb, constant Adr::Migration, test plugins/os-adr/tests/command/migration_test.rb
  2. plugins/os-adr/lib/adr/migration_report.rb: move to plugins/os-adr/lib/adr/presenter/migration/report.rb, constant Adr::Migration::Report
  3. plugins/os-adr/lib/adr/migrator/extraction.rb: move to plugins/os-adr/lib/adr/parser/migration/legacy_record.rb, constant Adr::Migration::LegacyRecord

Governed by rulings: R1, R2, R3, R4, R5, R9
Rejected: none (all rows apply)

Acceptance criteria

  • All three files moved to their role directories under Migration concept
  • Loader plugins/os-adr/lib/adr.rb collapses the six role directories model/, query/, presenter/, parser/, command/, adapter/
  • tests/command/migration_test.rb mirrors the lib path
  • ruby plugins/os-adr/tests/all.rb passes with 0 failures
  • ruby -e 'require "./plugins/os-adr/lib/adr"; Adr.loader.eager_load' runs silently
  • All existing callers updated to use new constant names (bin/adr-migrate, lib/adr/repository.rb, tests)
  • migrator/ directory is empty after extraction moves to parser/migration/

Owner sketch

Familiar with Ruby, Zeitwerk, os-adr architecture, and the Migration workflow (bin/adr-migrate). Move Migrator first (it owns MigrationReport), then MigrationReport, then Migrator::Extraction. Update loader and verify tests and lint.

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

## Problem Move Migration concept files into role directories by their job (verb). Implement Migrator, MigrationReport, and Migrator::Extraction movements under Migration as the concept root. ## Reproduce n/a: structure-only refactor, no behavior change ## Approach Required work: 1. plugins/os-adr/lib/adr/migrator.rb: move to plugins/os-adr/lib/adr/command/migration.rb, constant Adr::Migration, test plugins/os-adr/tests/command/migration_test.rb 2. plugins/os-adr/lib/adr/migration_report.rb: move to plugins/os-adr/lib/adr/presenter/migration/report.rb, constant Adr::Migration::Report 3. plugins/os-adr/lib/adr/migrator/extraction.rb: move to plugins/os-adr/lib/adr/parser/migration/legacy_record.rb, constant Adr::Migration::LegacyRecord Governed by rulings: R1, R2, R3, R4, R5, R9 Rejected: none (all rows apply) ## Acceptance criteria - All three files moved to their role directories under Migration concept - Loader plugins/os-adr/lib/adr.rb collapses the six role directories model/, query/, presenter/, parser/, command/, adapter/ - tests/command/migration_test.rb mirrors the lib path - ruby plugins/os-adr/tests/all.rb passes with 0 failures - ruby -e 'require "./plugins/os-adr/lib/adr"; Adr.loader.eager_load' runs silently - All existing callers updated to use new constant names (bin/adr-migrate, lib/adr/repository.rb, tests) - migrator/ directory is empty after extraction moves to parser/migration/ ## Owner sketch Familiar with Ruby, Zeitwerk, os-adr architecture, and the Migration workflow (bin/adr-migrate). Move Migrator first (it owns MigrationReport), then MigrationReport, then Migrator::Extraction. Update loader and verify tests and lint. ## 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
Author
Owner

0bd3fa93; rows applied 3/3; rows deviated 0; rows blocked 0

0bd3fa93; rows applied 3/3; rows deviated 0; rows blocked 0
Author
Owner

Correction: commit is 4103590f (amended); rows applied 3/3; rows deviated 0; rows blocked 0

Correction: commit is 4103590f (amended); rows applied 3/3; rows deviated 0; rows blocked 0
Author
Owner

Resolution

Done: Migrator to command/migration.rb as Migration; MigrationReport to Migration::Report; Migrator::Extraction to Migration::LegacyRecord

Evidence: 4103590f on 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

## Resolution **Done:** Migrator to command/migration.rb as Migration; MigrationReport to Migration::Report; Migrator::Extraction to Migration::LegacyRecord **Evidence:** 4103590f on 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
jared closed this issue 2026-10-04 17:15:03 +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#928
No description provided.