os-sdlc: rename and split the five transport-named controllers by job (ADR-0247) #834
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#834
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
Five top-level controllers in
plugins/os-sdlc/lib/os_sdlc/controller/are named after transport, not job:ArrivalHook,CompletionHook,AsyncLaunchHook,DispatchScripts,ImplementationScripts.Each hook does the same job as a script and differs only in transport.
ADR-0247 rules that a class is named after its job.
The user accepted the new names on 2026-09-29.
Reproduce
n/a: naming and ownership refactor, nothing to reproduce.
Approach
Each hook merges into its job's controller as a
.hook(io)entry point beside the script method.The Scripts classes split by job.
Dispatch and Implementation are Sequel::Model classes. Nesting a controller under a model has precedent (
Project::Onboarding).Avoid shadowing:
Brief,Gate,Arrival,Implementation::Openare taken.Target map:
Dispatch::Briefing(controller/dispatch/briefing.rb) = ArrivalHook + DispatchScripts#subagent_start + #brief. Callers:hooks/subagent_start.rb,bin/os-sdlc-subagent-start,bin/os-sdlc-brief.Dispatch::Completion(dispatch/completion.rb) = CompletionHook + DispatchScripts#subagent_stop. Callers:hooks/subagent_stop.rb,bin/os-sdlc-subagent-stop.Dispatch::Gating(dispatch/gating.rb) = DispatchScripts#gate. Caller:bin/os-sdlc-gate.Implementation::Guidance(implementation/guidance.rb) = AsyncLaunchHook + ImplementationScripts#next. Callers:hooks/post_tool_use.rb,bin/os-sdlc-next.Implementation::Opening(implementation/opening.rb) = #implementation_open. Caller:bin/os-sdlc-implementation-open.Implementation::Accounting(implementation/accounting.rb) = #implementation_report (+ --sweep-only). Caller:bin/os-sdlc-implementation-report.Implementation::Acceptance(implementation/acceptance.rb) = #retired_tests_check + #required_work_check. Callers:bin/os-sdlc-retired-tests-check,bin/os-sdlc-required-work-check.Duplicated hook helpers (no_project message, cwd/bound/bound_event) move to
ProjectBindor one small mixin.Tests are renamed:
tests/controller/{arrival_hook,completion_hook,dispatch_scripts_bind,implementation_scripts_bind}_test.rb,hook_*_test.rb,script_project_root_test.rb,async_launch_hook_bare_dir_test.rb,tests/support/in_process_dispatch_script.rb,post_tool_use_hook_test_case.rb.Required work:
CLAUDE.mdanddocs/architecture/os-sdlc-profile.md.Acceptance criteria
plugins/os-sdlc/lib/os_sdlc/controller/, when listed, then no class is named*Hookor*Scripts.Owner sketch
Origin
Work started on branch crc-pass-os-sdlc (worktree crc-pass-os-sdlc), direct agents as in #833.
Resolution
Done: Five transport-named controllers replaced by Dispatch::{Briefing,Completion,Gating} and Implementation::{Guidance,Opening,Accounting,Acceptance}, nested under their Sequel models. OsSdlc::Boot is the one entry point: it validates input, binds the project, then runs the controller from one command table shared by bin/, hooks/ and tests. ADR-0250 (amends ADR-0236, ADR-0247). Docs and tests renamed.
Evidence: Commit
72fc9ff8, merged to main at4bc3ed59. Suite 1331 runs, 0 failures. RuboCop clean. Inward-dependency edges 57 (unchanged). HEAD-baseline harness 111 scenarios: 99 byte-identical; 12 accepted differences: 3 bare-dir crashes with a new Sequel message, 2 bare-dir no-arg crashes now print usage errors, 7 uncaught hook JSON crashes show one more stack frame. AC1 holds for every in-project case and every hook envelope.Follow-ups: #838 script outside a project points the agent at /os-sdlc:setup-project (user-approved). #839 required-work-check usage names the wrong command (user-approved). Restart open Claude sessions: user action.