Replace os-sdlc cli/ and hook/ with one controller/ role directory nested by noun #781
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#781
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
After #767/#768 every class in
cli/andhook/runs one sequence: receive a process invocation, parse it, call a core command, render the result, set an exit code. The two directories name the input source, not the role. Class names (CLI,DispatchScripts,SubagentStart,PostToolUse) name transport or harness events, not the noun they act on. Three copies of the hook envelope, three spellings of the exit-3 policy, and four spellings of event parsing exist because no one object owns the boundary.Reproduce
n/a: naming and duplication; see the shared-sequence table in the session transcript.
Approach
One role directory
controller/, nested by noun per lens A1, with a single process-IO owner. Structure commit first, then the DRY commit.Required work:
Rejected: group by transport (argv/, event/). Splits each script/hook twin across two directories.
Rejected: name the directory boundary/. Two-way door; controller is the common word for receive, route, render.
Acceptance criteria
Owner sketch
Non-goals
Moving the PostToolUse decision into the core (its own ticket, must land first). Changing any Thor subclass to live in bin (ADR-0123 stays).
Origin
Resolution
Done: lib/os_sdlc/controller/ replaces cli/ and hook/, nested by noun: ProcessIO (sole envelope and exit-3 site), ArgvOption, Project::SetupCLI, Implementation::Scripts, Dispatch::Scripts, Dispatch::ArrivalHook/CompletionHook/AsyncLaunchHook, Evidence::ReportCLI, Lsp::ProbeCLI. Hook entry scripts are one exit line over ProcessIO.from_process; hooks write through injected IO. args_holder and start_subagent raise LoudFailure; SystemExit rescues removed from tests. ADR-0236 amends ADR-0222/0231/0232/0194 item 6; plugins/os-sdlc/CLAUDE.md hook contract, docs/architecture/os-sdlc-profile.md, lsp-navigate cheatsheet updated; bin/refresh-plugins run.
Evidence: commits
7d8d908f(structure),bbca07a0(DRY),84ca0618(ADR) on crc-pass-os-sdlc; suite 1314 runs 0 failures after each commit; lint-inward-dependencies 64 unchanged; 25 bin/hook commands byte-identical on stdout/stderr/exit vs132df5ae, plus uncovered refusal paths diffed in a scratch project; grep hookSpecificOutput hits one fileFollow-ups: Lens A2 root files missing for the implicit CLI namespace (TargetFlag, OptionParserBuilder, TargetSelectionError, ProjectConfigCommand, ErrorMessage should move under Project::), Evidence, and Lsp; remaining warn+exit 1 on the SetupCLI path (CommandSupport.fail_soft, ProjectConfigCommand, InitCommand, WorklistReport); dead evidence entries in the collapse list and ROLE_LAYER, InwardDependencies::INFLECTIONS never read. All three recorded in docs/crc/os-sdlc/HANDOFF.md next steps for the user to ticket or drop; not filed as tickets because they are AI-initiated follow-ups of an AI-shaped ticket.