Make handoff-dir permission rules tolerate trailing args#29
Merged
Conversation
The handoff-directory allow-rules in .claude/settings.json (and the template copy) were brittle exact-match Bash forms. The §2 sweep `ls ~/.claude-handoffs/cdd/ 2>/dev/null` failed the exact rule `Bash(ls ~/.claude-handoffs/cdd/)` because the trailing `2>/dev/null` made the command non-exact, forcing a re-prompt on every run. Switch the mkdir/ls rules to no-space trailing `*` globs, which match the bare command, trailing arguments, and trailing redirections alike (`:*`/` *` forms require a space and would miss the bare command). The rm rule already used a `.md`-anchored glob and is left as-is. Rules stay scoped to the project's own handoff dir; no broadening to a shared namespace. Both settings files kept identical except cdd <-> <PROJECT_DIR>. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Broadens the handoff-directory Bash permission rules in
.claude/settings.json(and its template counterpart) so they tolerate trailing arguments on the commands the CDD workflow actually emits.Bash(mkdir -p ~/.claude-handoffs/<dir>)→…/<dir>*Bash(ls ~/.claude-handoffs/<dir>/)→…/<dir>/*The old exact-match rules failed to match commands carrying trailing tokens (e.g.
ls ~/.claude-handoffs/cdd/ 2>/dev/nullemitted by/cdd-next-step). Thecdd*vscdd/*asymmetry is intentional:mkdirtargets the directorycdditself, whilelstargets contents undercdd/; both end in*to absorb trailing args. Repo and template are changed in lockstep.Verification
bash -nclean across scripts/tools/demoCloses #19
🤖 Generated with Claude Code