os-adr: adr-new and adr-init run through Adr::CLI command classes with an Invocation; cli_test runs in-process #640
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#640
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?
Map: #631
Blocked by #638
Problem
Child of #631. Uses the seam shape that #638 records in its ADR. Prerequisite: .sdlc/project.yaml has no
os-adrtarget, soimplementation-open --target os-adrcannot open this ticket until a target is added (code_path plugins/os-adr/lib, test_path plugins/os-adr/tests, test_commandruby plugins/os-adr/tests/all.rb).Observed
plugins/os-adr/tests/cli_test.rb forks
ruby bin/adr-new(4 tests, stdin JSON) andruby bin/adr-init(2 tests). Both bins hold their logic inline: they readDir.pwd,ARGV, and$stdin, and fail withabort. The whole os-adr suite takes 0.6 s (2026-09-23).Reproduce
Expected
One prose sentence:
Adr::CLI::NewandAdr::CLI::Inittake an Invocation and argv, return an exit status, and write only to the invocation streams; the bins only build the Invocation.Origin
Owner sketch
Acceptance criteria
invocation.stdin, whenAdr::CLI::New#run(["--root", root])runs, then the new numbered ADR path is oninvocation.stdoutand the index lists it.adr-new: 'title' is requiredis oninvocation.stderrand the status is nonzero.invocation.stderrnames adr-init and the status is nonzero.--rootargument, when New runs, then it writes underinvocation.cwd.Adr::CLI::Init#run(["--root", root])runs, then docs/adr/ and its index exist, the suppress file is gone, and the ADR dir path is on stdout.Approach
abortwith a stderr line plus a returned status of 1. Convert the six existing tests in place, including the supersession test.Required work:
bin/adr-newandbin/adr-init's logic intoAdr::CLI::New/Adr::CLI::Initbehind anInvocation, replacingabortwith a stderr line and a returned status. (check:! grep -n abort plugins/os-adr/bin/adr-new plugins/os-adr/bin/adr-init)grep -n os-adr .sdlc/project.yaml)Structural follow-through
Body before Required-work migration, 2026-09-23
Map: #631
Blocked by #638
Problem
Child of #631. Uses the seam shape that #638 records in its ADR. Prerequisite: .sdlc/project.yaml has no
os-adrtarget, soimplementation-open --target os-adrcannot open this ticket until a target is added (code_path plugins/os-adr/lib, test_path plugins/os-adr/tests, test_commandruby plugins/os-adr/tests/all.rb).Observed
plugins/os-adr/tests/cli_test.rb forks
ruby bin/adr-new(4 tests, stdin JSON) andruby bin/adr-init(2 tests). Both bins hold their logic inline: they readDir.pwd,ARGV, and$stdin, and fail withabort. The whole os-adr suite takes 0.6 s (2026-09-23).Reproduce
Expected
One prose sentence:
Adr::CLI::NewandAdr::CLI::Inittake an Invocation and argv, return an exit status, and write only to the invocation streams; the bins only build the Invocation.Origin
Owner sketch
Acceptance criteria
invocation.stdin, whenAdr::CLI::New#run(["--root", root])runs, then the new numbered ADR path is oninvocation.stdoutand the index lists it.adr-new: 'title' is requiredis oninvocation.stderrand the status is nonzero.invocation.stderrnames adr-init and the status is nonzero.--rootargument, when New runs, then it writes underinvocation.cwd.Adr::CLI::Init#run(["--root", root])runs, then docs/adr/ and its index exist, the suppress file is gone, and the ADR dir path is on stdout.Approach
abortwith a stderr line plus a returned status of 1. Convert the six existing tests in place, including the supersession test.Structural follow-through
Work started via /os-sdlc:implement on branch ticket-640 (worktree .claude/worktrees/ticket-640).
Resolution
Done: Adr::CLI::New and Adr::CLI::Init take an Invocation and argv, return an exit status, and write only to the invocation streams; bin/adr-new and bin/adr-init only build the Invocation; cli_test.rb runs in-process with no forks.
Evidence: Branch ticket-640 via os-sdlc implementation 17 (dispatches 189-200, three test-writer/reviewer rounds, all gates pass). os-adr suite: 50 runs, 168 assertions, 0 failures.
Follow-ups: none