Evict process_invocation, init_command, report_builder from os-sdlc cli/ #780

Closed
opened 2026-09-27 20:56:52 +00:00 by jared · 1 comment
Owner

Problem

Three files in plugins/os-sdlc/lib/os_sdlc/cli/ are not boundary classes. process_invocation.rb reads the live process and builds a value; init_command.rb drives a workflow; evidence_cli/report_builder.rb fetches and assembles a report. Their directory says CLI, so a reader expects argv parsing and finds none. Lens A1 places them in adapter/, command/, and query/.

Reproduce

n/a: placement defect, no runtime failure.

Approach

Structure-only commit. No behavior change.

Required work:

  1. Move cli/process_invocation.rb to adapter/process_invocation.rb; constant stays OsSdlc::ProcessInvocation.
  2. Move cli/init_command.rb to command/init_command.rb; constant stays OsSdlc::InitCommand.
  3. Move cli/evidence_cli/report_builder.rb to query/evidence/report_builder.rb; constant becomes OsSdlc::Evidence::ReportBuilder with a root file if A2 requires one.
  4. Update the Zeitwerk inflection entries and the inward-dependency lint baseline; run bin/refresh-plugins.

Rejected: leave them in cli/ until the controller/ move. The moves are independent and cheaper alone.

Acceptance criteria

  1. Given the moved files, when the full suite runs, then it is green with the same run count.
  2. Given bin/os-sdlc lint-init, bin/evidence collect, and every bin/os-sdlc-* script, when run against the recorded fixtures, then stdout is byte-identical.
  3. Given plugins/os-sdlc/lib/os_sdlc/cli/, when listed, then it holds only cli.rb, dispatch_scripts.rb, evidence_cli.rb, lsp_probe_cli.rb.

Owner sketch

module OsSdlc::ProcessInvocation   # adapter/
class OsSdlc::InitCommand          # command/
class OsSdlc::Evidence::ReportBuilder  # query/evidence/

Non-goals

Renaming cli/ or hook/. That is the controller/ ticket.

Origin

  • Trigger: session 12 design read of plugins/os-sdlc/lib/os_sdlc/cli/ and hook/ after the user challenged the value of the cli/ classes
  • Improvised this session: none
  • Chain: boundary classes named by transport ← RunnerCLI/Pipe removal (#767, #768) left cli/ and hook/ as one role with two names ← DESIGN (ADR-0222 role layout lists no boundary role)
  • Root candidate: this ticket
  • Where: plugins/os-sdlc/lib/os_sdlc/cli/
  • Session: 363157fa-82c5-4379-aec1-7c12405e4075
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-pass-os-sdlc/363157fa-82c5-4379-aec1-7c12405e4075.jsonl
## Problem Three files in `plugins/os-sdlc/lib/os_sdlc/cli/` are not boundary classes. `process_invocation.rb` reads the live process and builds a value; `init_command.rb` drives a workflow; `evidence_cli/report_builder.rb` fetches and assembles a report. Their directory says CLI, so a reader expects argv parsing and finds none. Lens A1 places them in adapter/, command/, and query/. ## Reproduce n/a: placement defect, no runtime failure. ## Approach Structure-only commit. No behavior change. Required work: 1. Move cli/process_invocation.rb to adapter/process_invocation.rb; constant stays OsSdlc::ProcessInvocation. 2. Move cli/init_command.rb to command/init_command.rb; constant stays OsSdlc::InitCommand. 3. Move cli/evidence_cli/report_builder.rb to query/evidence/report_builder.rb; constant becomes OsSdlc::Evidence::ReportBuilder with a root file if A2 requires one. 4. Update the Zeitwerk inflection entries and the inward-dependency lint baseline; run bin/refresh-plugins. Rejected: leave them in cli/ until the controller/ move. The moves are independent and cheaper alone. ## Acceptance criteria 1. Given the moved files, when the full suite runs, then it is green with the same run count. 2. Given `bin/os-sdlc lint-init`, `bin/evidence collect`, and every bin/os-sdlc-* script, when run against the recorded fixtures, then stdout is byte-identical. 3. Given `plugins/os-sdlc/lib/os_sdlc/cli/`, when listed, then it holds only cli.rb, dispatch_scripts.rb, evidence_cli.rb, lsp_probe_cli.rb. ## Owner sketch ```ruby module OsSdlc::ProcessInvocation # adapter/ class OsSdlc::InitCommand # command/ class OsSdlc::Evidence::ReportBuilder # query/evidence/ ``` ## Non-goals Renaming cli/ or hook/. That is the controller/ ticket. ## Origin - Trigger: session 12 design read of plugins/os-sdlc/lib/os_sdlc/cli/ and hook/ after the user challenged the value of the cli/ classes - Improvised this session: none - Chain: boundary classes named by transport ← RunnerCLI/Pipe removal (#767, #768) left cli/ and hook/ as one role with two names ← DESIGN (ADR-0222 role layout lists no boundary role) - Root candidate: this ticket - Where: plugins/os-sdlc/lib/os_sdlc/cli/ - Session: 363157fa-82c5-4379-aec1-7c12405e4075 - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os--claude-worktrees-crc-pass-os-sdlc/363157fa-82c5-4379-aec1-7c12405e4075.jsonl
Author
Owner

Resolution

Done: cli/ now holds only cli.rb, dispatch_scripts.rb, evidence_cli.rb, lsp_probe_cli.rb. process_invocation.rb -> adapter/, init_command.rb -> command/, evidence_cli/report_builder.rb -> query/evidence/ as Evidence::ReportBuilder (no root file: single member, lens A2 has no defect).

Evidence: commits 991363c9 (items 1-2, swept in with the ADR-0235 commit by a staged git mv) and 132df5ae (item 3) on crc-pass-os-sdlc; suite 1314 runs 0 failures before and after; lint-inward-dependencies 64 -> 64; bin/evidence --help, bin/os-sdlc --help, bin/os-sdlc-gate --help byte-identical

Follow-ups: none

## Resolution **Done:** cli/ now holds only cli.rb, dispatch_scripts.rb, evidence_cli.rb, lsp_probe_cli.rb. process_invocation.rb -> adapter/, init_command.rb -> command/, evidence_cli/report_builder.rb -> query/evidence/ as Evidence::ReportBuilder (no root file: single member, lens A2 has no defect). **Evidence:** commits 991363c9 (items 1-2, swept in with the ADR-0235 commit by a staged git mv) and 132df5ae (item 3) on crc-pass-os-sdlc; suite 1314 runs 0 failures before and after; lint-inward-dependencies 64 -> 64; bin/evidence --help, bin/os-sdlc --help, bin/os-sdlc-gate --help byte-identical **Follow-ups:** none
jared closed this issue 2026-09-27 21:11:26 +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#780
No description provided.