Delete worktree-before-remove and --implementation from os:worktree finish #842
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#842
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
plugins/os/bin/worktree finishruns eachworktree-before-remove=COMMANDline from.cc-os/config(ADR-0240). The feature has no users. Its only user was the os-sdlc usage sweep,os-sdlc-implementation-report --sweep-only {implementation}, and #836 deletes that sweep..cc-os/confighas noworktree-before-removelines now.The feature also keeps an os-sdlc idea inside the generic
osplugin: the--implementationflag and the{implementation}placeholder. Agents still pass--implementation <id>from habit, because theos:worktreeskill tells them to.Observed
(no output)
Reproduce
n/a: design removal; nothing fails.
Approach
Delete the whole before-remove feature.
finishmerges, refreshes the plugin cache whenplugins/changed, and removes the worktree. It runs no config hooks. ADR-0252 supersedes ADR-0240.Required work:
plugins/os/lib/worktree/before_remove.rbandplugins/os/tests/support/before_remove_test_case.rb(tests keep the key: acceptance criterion 1 writes aworktree-before-remove=line) — check: absentbefore_removeinplugins/os/lib/**/*.rbplugins/os/lib/worktree/finish_command.rb, delete thebefore_remove:keyword,@before_remove, its call inrun, therefuse_missing_before_removerefusal, andEXIT_BEFORE_REMOVE_NOT_FOUND = 6— check: absentbefore_removeinplugins/os/lib/worktree/finish_command.rbplugins/os/lib/worktree/cli.rb, delete the--implementationoption, the privatebefore_removemethod, and@search_path; inplugins/os/bin/worktree, delete thesearch_path:argument — check: absentsearch_pathinplugins/os/lib/worktree/cli.rbConfig#linesinplugins/os/lib/worktree/config.rb; its only caller was the before-remove method. KeepConfig#list— check: absentdef linesinplugins/os/lib/worktree/config.rbDocumentation, done by the orchestrator, not by a pipeline agent:
plugins/os/skills/worktree/SKILL.mdfinish step 3 and its exit list (lines 26, 27, 33) without--implementation, before-remove text, or exit 6.plugins/os-sdlc/skills/implement/SKILL.md, delete "Pass the implementation id received at open when the worktree ran an os-sdlc implementation."docs/implementation-status/os.md.bin/refresh-pluginsright after the skill edits; until then, active sessions still pass--implementation.Rejected: keep the generic hook and delete only
{implementation}— the hook has no user; keeping it is a speculative feature.Acceptance criteria
.cc-os/configwith aworktree-before-remove=line, whenworktree finish <name>runs, then it merges and removes the worktree and does not run the line.worktree finish <name> --implementation 4, when it runs, then it fails with an unknown-option usage error and makes no change.Owner sketch
Retired tests
plugins/os/tests/worktree/finish_command_refuses_before_remove_not_on_path_test.rb
plugins/os/tests/worktree/finish_command_runs_before_remove_commands_test.rb
plugins/os/tests/worktree/bin_worktree_finish_runs_before_remove_test.rb
plugins/os/tests/worktree/finish_command_without_before_remove_key_test.rb
Origin
/os-sdlc:implement #836hand-finish; the orchestrator plannedworktree finish ticket-836 --implementation 4from the skill textfinishwithout--implementation--implementationpassed from habit ←os:worktreeSKILL.md:26 tells agents to pass it ←{implementation}placeholder served only the--sweep-onlyline ← DESIGN: ADR-0240; #836 deletes the sweepUser decision 2026-09-30: delete the whole feature (option B). Follows #836.
VERDICT: CREATE — user-requested hard floor; ADR-0252 records the decision (ticket-skeptic, 2026-09-30).
Work started on branch ticket-842 (worktree .claude/worktrees/ticket-842) via /os-sdlc:implement.
Resolution
Done: Deleted the worktree before-remove hook: before_remove.rb, the --implementation option, exit 6, search_path:, Config#lines, and 4 test files. finish runs no config commands; unknown options are a usage error. os:worktree finish step rewritten as one command plus an exit table; implement skill no longer passes an implementation id. ADR-0252 supersedes ADR-0240.
Evidence: Commit
6cd75d59on ticket-842. ruby plugins/os/tests/all.rb: 22 runs, 0 failures. New tests: finish_command_ignores_before_remove_config_test.rb (AC1, AC2). Pipeline implementation 5: all gates passed except suite-check verdict:error, caused by ticket check 1 grepping plugins/os/tests; check corrected in the body; hand-finished.Follow-ups: none (the verdict:error on a failed required-work check is already #841)