Skip to content

fix(land-plan-docs): remove leading-if from idempotency recipe (gotcha #3)#208

Merged
aagnone3 merged 1 commit into
mainfrom
claude/vigorous-chaplygin-f77249
Jul 19, 2026
Merged

fix(land-plan-docs): remove leading-if from idempotency recipe (gotcha #3)#208
aagnone3 merged 1 commit into
mainfrom
claude/vigorous-chaplygin-f77249

Conversation

@aagnone3

Copy link
Copy Markdown
Collaborator

What & why

The land-plan-docs skill's "Idempotency: detect an existing PR before branching" section led its decision with a standalone if [ -n "$EXISTING" ] ... block. Claude Code matches a skill's allowed-tools (Bash(gh *), Bash(git *), Read) by the pipeline's first token, and if is not allow-listed — so an unattended run could stall on a permission prompt.

This is the same gotcha #3 class documented in docs/solutions/integration-issues/land-plan-docs-gh-git-boundary-gotchas.md §3 and fixed for the cleanup recipes in #206 (issue #182). This idempotency block predated #206 and was left out of scope there.

Fix

  • Fold the null-check into the gh pr list --jq with // empty, so the recipe leads with gh (covered by Bash(gh *)).
  • Remove the standalone leading-if block; evaluate the existence decision in prose — mirroring how fix: make land-* post-merge cleanup worktree-aware #206 resolved the cleanup recipes (command-leading leaves, predicate in prose).
  • allowed-tools unchanged (Bash(gh *), Bash(git *), Read).

Verification

  • bun test → 513 pass, 0 fail.
  • No bare-backtick reference links introduced.
  • allowed-tools line byte-unchanged.

Docs/skill-prompt only — no code changes.


🤖 Generated with Claude Code

…#3)

The "detect an existing PR before branching" section led its decision with
a standalone `if [ -n "$EXISTING" ] ...` block. Claude Code matches a skill's
`allowed-tools` (Bash(gh *), Bash(git *), Read) by the pipeline's FIRST token,
and `if` is not allow-listed — so an unattended run could stall on a permission
prompt (the same class fixed for the cleanup recipes in PR #206 / issue #182,
which predated this block).

Fold the null-check into the `gh pr list --jq` with `// empty` so the recipe
leads with `gh` (covered by Bash(gh *)), and evaluate the existence decision in
prose — mirroring how PR #206 resolved the cleanup recipes (command-leading
leaves, predicate evaluated in prose). allowed-tools unchanged.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@aagnone3
aagnone3 merged commit d28a6c3 into main Jul 19, 2026
7 checks passed
@aagnone3
aagnone3 deleted the claude/vigorous-chaplygin-f77249 branch July 19, 2026 00:50
@github-actions github-actions Bot mentioned this pull request Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant