Skip to content

feat: Simplify permissions and fix statusline slash command display - #92

Merged
evansenter merged 13 commits into
mainfrom
python-tooling-permissions
Dec 31, 2025
Merged

feat: Simplify permissions and fix statusline slash command display#92
evansenter merged 13 commits into
mainfrom
python-tooling-permissions

Conversation

@evansenter

@evansenter evansenter commented Dec 31, 2025

Copy link
Copy Markdown
Owner

Summary

  • Consolidate 26 MCP permissions to 2 wildcards (mcp__github__*, mcp__event-bus__*)
  • Add Python tooling permissions (venv + global patterns)
  • Add contrib scripts, bootstrap/uninstall, cargo +nightly permissions
  • Fix statusline bugs: slash command display, add PR indicator

Changes

Permissions (settings.json):

  • MCP wildcards: 26 → 2 entries
  • Python tooling: .venv/bin/{pip,pytest,ruff}:* + global {pip,pip3,pytest,ruff}:*
  • Removed Bash(cat /tmp/*:*) - no longer needed with dedicated Read tool

Statusline (statusline-command.sh):

Test plan

  • Verify wildcards work for MCP permissions
  • Test statusline with slash commands (args extracted correctly)
  • Test statusline with plain messages (unchanged)
  • Verify PR indicator shows on feature branches

🤖 Generated with Claude Code

- Add ruff, pytest, pip, python3 permissions for Python development
- Add git -C and mkdir utility permissions
- Remove cat /tmp/* (no longer needed)

Closes #56

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Dec 31, 2025

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

Adds Python development tool permissions (ruff, pytest, pip, python3) and utility permissions (git -C, mkdir) to the global Claude Code settings, addressing issue #56.

Issues Found

Critical

None

Important

  • home/.claude/settings.json:99-102 - Several Python permissions use exact command strings instead of wildcards, making them too restrictive. For example:

    • ".venv/bin/ruff format --check ." won't match ruff format --check src/ or other paths
    • ".venv/bin/pytest -v" won't match pytest -v tests/ or other arguments

    Recommendation: Replace exact matches with wildcard patterns:

    "Bash(.venv/bin/ruff format:*)",
    "Bash(.venv/bin/ruff check:*)",
    "Bash(.venv/bin/pytest:*)"

    This matches the flexible pattern style used for cargo/git commands and would remove the redundancy with the existing .venv/bin/pytest:* entry.

  • home/.claude/settings.json - Missing generic tool patterns. Issue RFC: Add Python tooling permissions to global Claude settings #56 proposed patterns like ruff format:* (not just .venv/bin/ruff format:*) to handle cases where tools are installed globally or in non-standard locations. Consider adding:

    "Bash(ruff format:*)",
    "Bash(ruff check:*)",
    "Bash(pytest:*)",
    "Bash(pip install:*)"

Suggestions

  • home/.claude/settings.json:97 - Missing pip3 install:* which was in the original issue proposal and is commonly used
  • home/.claude/settings.json:97 - brew list:* is unrelated to Python tooling and wasn't mentioned in issue RFC: Add Python tooling permissions to global Claude settings #56. Should this be a separate change or documented in the PR body?
  • home/.claude/settings.json:99-102 - The exact-match entries (ruff format --check ., ruff check ., pytest -v, ruff format .) are redundant if wildcard patterns are used

Verdict

REQUEST_CHANGES - The Python permissions are too restrictive with exact command matches instead of wildcard patterns. This will cause permission prompts for common variations like running pytest on specific test files or ruff on specific directories.


Automated review by Claude Code

Permissions cleanup:
- Consolidate 26 MCP permissions to 2 wildcards (mcp__github__*, mcp__event-bus__*)
- Simplify Python venv permissions with wildcards (pip, pytest, ruff)
- Add contrib scripts, bootstrap/uninstall, cargo +nightly

Statusline fix:
- Handle slash commands: extract args content or command name
- Previously showed raw XML tags like (<command-args>...</command-args>)
- Now shows just the args (or /command for no-arg commands)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@evansenter evansenter changed the title feat: Add Python tooling permissions to global settings feat: Simplify permissions and fix statusline slash command display Dec 31, 2025
@claude

claude Bot commented Dec 31, 2025

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

This PR consolidates MCP permissions from 26 individual entries to 2 wildcards, adds Python venv tooling permissions, adds various utility permissions, and fixes a statusline bug that displayed raw XML tags for slash commands.

Issues Found

Critical

None

Important

  • home/.claude/settings.json:71-74 - Python permissions only cover .venv/bin/* paths, but issue RFC: Add Python tooling permissions to global Claude settings #56 proposed generic patterns like ruff format:*, pytest:*, pip install:* for globally installed tools. Users with global Python tools (via pipx, homebrew, or system packages) will still get permission prompts. Consider adding generic patterns.

Suggestions

  • home/.claude/settings.json:68 - Removed Bash(cat /tmp/*:*) without explanation in the PR body. Was this intentional? If so, worth noting in the summary.
  • home/.claude/statusline-command.sh:57-67 - The XML tag handling is functional but could be more robust. If a message contains both command-args and command-name tags (unusual but possible), only the args are extracted. The fallback sed command could also strip valid content containing angle bracket characters. This is a minor edge case concern.

Verdict

REQUEST_CHANGES - The Python permissions are limited to .venv/bin/ paths but issue #56 proposed supporting globally installed tools. Adding generic Bash(ruff:*), Bash(pytest:*), Bash(pip:*) patterns would fully address the linked issue.


Automated review by Claude Code

Addresses claude-review feedback:
- Add generic patterns: pip, pip3, pytest, ruff (not just .venv/bin/*)
- Supports globally installed tools via pipx, homebrew, or system packages

Statusline enhancement:
- Show associated PR number (#92) when branch has an open PR
- Uses gh pr view with 2s timeout to avoid blocking

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Dec 31, 2025

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

This PR consolidates 26 MCP permissions into 2 wildcards, adds Python tooling permissions (both venv-local and global patterns), adds various utility permissions, and enhances the statusline with PR indicator and slash command display fixes.

Issues Found

Critical

None

Important

None

Suggestions

  • home/.claude/statusline-command.sh:43 - The gh pr view command runs without -C "$cwd", so it may query the wrong repo if the user's working directory differs from where Claude Code is running. Consider running the command from the correct directory: (cd "$cwd" && timeout 2 gh pr view --json number -q .number 2>/dev/null)

Verdict

REQUEST_CHANGES - The PR overall looks good and addresses issue #56 with both venv and global Python tool patterns. The single suggestion about the gh pr view working directory is minor but worth fixing to ensure the PR indicator is accurate across different project contexts.


Automated review by Claude Code

Addresses claude-review feedback: ensure PR indicator queries the
correct repo by running gh pr view from $cwd.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Dec 31, 2025

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

This PR consolidates 26 MCP permissions into 2 wildcards, adds comprehensive Python tooling permissions (both venv-local and global patterns), adds utility permissions (git -C, mkdir, contrib scripts, bootstrap/uninstall), fixes statusline slash command display, and adds a PR indicator showing the associated PR number for feature branches.

Previous Feedback Status

All issues from previous reviews appear to be addressed:

  • ✓ Python global permissions added (ruff:*, pytest:*, pip:*, pip3:*)
  • gh pr view now runs from correct directory with cd "$cwd"
  • ✓ PR body explains removal of cat /tmp/* (Read tool replacement)

Issues Found

Critical

None

Important

None

Suggestions

None - the code looks clean and well-structured.

Verdict

APPROVE - Code looks good, no issues found. The MCP wildcard consolidation reduces maintenance burden, Python permissions now cover both venv and global installations addressing issue #56, and the statusline improvements handle slash commands correctly with a sensible 2s timeout on the PR indicator to avoid blocking.


Automated review by Claude Code

evansenter and others added 2 commits December 31, 2025 16:17
Use `timeout` on Linux where available, skip on macOS where it's not.
The gh pr view command is fast enough that timeout is optional.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Uses OSC 8 escape sequences for terminal hyperlinks.
Supported in iTerm2, GNOME Terminal, Windows Terminal, Konsole, etc.
Cmd+click (or ctrl+click) on #92 opens the PR in browser.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Dec 31, 2025

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

This PR consolidates 26 MCP permissions into 2 wildcards, adds comprehensive Python tooling permissions (both venv-local and global patterns), adds utility permissions for git, contrib scripts, and bootstrap/uninstall, and enhances the statusline with a PR indicator and proper slash command display.

Issues Found

Critical

None

Important

None

Suggestions

None

Verdict

APPROVE - Code looks good, no issues found.

The changes are well-structured:

  • MCP wildcard consolidation reduces maintenance overhead
  • Python permissions cover both .venv/bin/* and global installations, fully addressing issue RFC: Add Python tooling permissions to global Claude settings #56
  • Statusline improvements handle slash commands correctly, extracting <command-args> or <command-name> content
  • PR indicator uses appropriate timeout handling (2s on Linux with timeout command, no timeout on macOS where it's unavailable)
  • gh pr view correctly runs from $cwd to ensure accurate repo context

Automated review by Claude Code

@claude

claude Bot commented Dec 31, 2025

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

This PR consolidates 26 MCP permissions into 2 wildcards, adds comprehensive Python tooling permissions (both venv-local and global patterns for ruff, pytest, pip), adds utility permissions (git -C, mkdir, contrib scripts, bootstrap/uninstall, cargo +nightly), and enhances the statusline with a PR indicator and proper slash command display.

Issues Found

Critical

None

Important

None

Suggestions

None

Verdict

APPROVE - Code looks good, no issues found.

The implementation is well-structured:

  • MCP wildcard consolidation (mcp__github__*, mcp__event-bus__*) reduces 26 entries to 2, lowering maintenance burden
  • Python permissions fully address issue RFC: Add Python tooling permissions to global Claude settings #56 with both .venv/bin/* patterns and global tool patterns (ruff:*, pytest:*, pip:*, pip3:*, python3:*)
  • Statusline slash command handling correctly extracts <command-args> or <command-name> content
  • PR indicator uses appropriate timeout handling (2s on Linux, falls through on macOS) and correctly runs from $cwd for accurate repo context
  • Removal of cat /tmp/*:* is sensible given the dedicated Read tool

Automated review by Claude Code

Parses branch names for issue patterns:
- issue-42, fix-123, feature/42, bug-99
- Branches starting with number: 42-add-feature
- Branches ending with number: add-feature-42

Shows as →#42 in cyan with clickable link to issue.
Displayed before PR indicator when both exist.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Dec 31, 2025

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

This PR consolidates 26 MCP permissions into 2 wildcards (mcp__github__*, mcp__event-bus__*), adds comprehensive Python tooling permissions, adds various utility permissions, and enhances the statusline with PR/issue indicators and proper slash command display.

Issues Found

Critical

None

Important

None

Suggestions

None

Verdict

APPROVE - Code looks good, no issues found.

Permissions changes are well-designed:

  • MCP wildcard consolidation reduces 26 entries to 2
  • Python permissions address issue RFC: Add Python tooling permissions to global Claude settings #56 with both venv paths (.venv/bin/pip:*, etc.) and global patterns (pip:*, pip3:*, pytest:*, ruff:*, python3:*)
  • Additional utilities (git -C:*, mkdir:*, cargo +nightly:*, contrib scripts, bootstrap/uninstall) are sensible additions
  • Removal of Bash(cat /tmp/*:*) is appropriate since the dedicated Read tool handles this

Statusline improvements are solid:

  • Slash command handling extracts <command-args> or <command-name> content correctly
  • PR indicator uses cd "$cwd" for proper repo context
  • 2s timeout on Linux prevents blocking (gracefully skips on macOS where timeout is unavailable)
  • Issue indicator extracts issue numbers from common branch naming patterns

Automated review by Claude Code

- Support multiple issue numbers in branch name (e.g., issue-42-and-56)
- Make directory name a clickable link to repo
- Reorder: directory → PR → issues → model → git status → context → user msg
- Reuse repo_url fetch for efficiency

All links use OSC 8 hyperlinks (cmd+click in iTerm2, ctrl+click elsewhere).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Dec 31, 2025

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

This PR consolidates 26 MCP permissions into 2 wildcards (mcp__github__*, mcp__event-bus__*), adds comprehensive Python tooling permissions for both venv and global installations, adds utility permissions (git -C, mkdir, contrib scripts, bootstrap/uninstall, cargo +nightly), and enhances the statusline with clickable PR/issue indicators and proper slash command display.

Issues Found

Critical

None

Important

None

Suggestions

  • home/.claude/statusline-command.sh:68 - The issue number extraction uses grep -oE '[0-9]+' which matches ANY number in the branch name. Branches like v2-feature, update-2025, or python3-support would link to issues Add Claude Code GitHub Workflow #2, #2025, or Refactor sync to use home/ directory #3 respectively, which may not exist or be unrelated. Consider a more restrictive pattern that requires common prefixes like issue-, fix-, closes-, etc.:
    issue_nums=$(echo "$branch" | grep -oE '(issue|fix|closes|resolves|bug)-[0-9]+' | grep -oE '[0-9]+' | sort -u)
    This is a minor edge case since incorrect links just 404, but could be confusing when they link to unrelated issues.

Verdict

REQUEST_CHANGES - The issue indicator regex is overly broad and will create false positive issue links for any number in a branch name. While functional, this could create confusing clickable links to unrelated issues.


Automated review by Claude Code

Uses `gh pr list --head <branch>` to find all PRs for current branch.
Supports PRs to multiple base branches (e.g., main and develop).
Displays as comma-separated clickable links: #92,#93

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Dec 31, 2025

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

This PR consolidates 26 MCP permissions into 2 wildcards (mcp__github__*, mcp__event-bus__*), adds comprehensive Python tooling permissions (both .venv/bin/* and global patterns), adds utility permissions (git -C, mkdir, contrib scripts, bootstrap/uninstall, cargo +nightly), and enhances the statusline with clickable hyperlinks for directory/PR/issues and proper slash command display.

Issues Found

Critical

None

Important

None

Suggestions

  • home/.claude/statusline-command.sh:74 - The issue number extraction pattern grep -oE '[0-9]+' is overly permissive and will match any number in the branch name. Branches like python3-support, v2-migration, or update-2024 would incorrectly link to issues Refactor sync to use home/ directory #3, Add Claude Code GitHub Workflow #2, or #2024. Consider a more restrictive pattern that requires issue-related prefixes:
    # Only match numbers preceded by common issue prefixes
    issue_nums=$(echo "$branch" | grep -oE '(issue|fix|closes|resolves|bug|gh)-[0-9]+' | grep -oE '[0-9]+' | sort -u)
    This is a minor UX concern since incorrect links simply 404, but could be confusing when they link to unrelated issues that do exist.

Verdict

REQUEST_CHANGES - The issue indicator regex will create false positive hyperlinks for any number in a branch name. While functional, this could link to unrelated issues. Consider tightening the pattern to require common issue prefixes.


Automated review by Claude Code

- Issue detection now checks PR body for "Fixes #N" patterns first,
  then falls back to tight branch name pattern (issue-42, fix-42, etc.)
- User context extraction uses jq slurp mode to avoid picking up
  tool result messages

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Dec 31, 2025

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

This PR consolidates 26 MCP permissions into 2 wildcards (mcp__github__*, mcp__event-bus__*), adds comprehensive Python tooling permissions (both .venv/bin/* and global patterns), adds utility permissions (git -C, mkdir, contrib scripts, bootstrap/uninstall, cargo +nightly), and enhances the statusline with clickable hyperlinks for directory/PR/issues and proper slash command display.

Issues Found

Critical

None

Important

None

Suggestions

None

Verdict

APPROVE - Code looks good, no issues found.

Permissions changes (settings.json):

  • MCP wildcard consolidation reduces 26 entries to 2, lowering maintenance burden
  • Python permissions fully address issue RFC: Add Python tooling permissions to global Claude settings #56 with both venv patterns (.venv/bin/pip:*, .venv/bin/pytest:*, .venv/bin/ruff:*) and global patterns (pip:*, pip3:*, pytest:*, ruff:*, python3:*)
  • Additional utilities (git -C:*, mkdir:*, cargo +nightly:*, contrib scripts, bootstrap/uninstall) are sensible additions
  • Removal of Bash(cat /tmp/*:*) is appropriate since the dedicated Read tool handles this use case

Statusline improvements (statusline-command.sh):

  • Slash command handling correctly extracts <command-args> or <command-name> content
  • PR indicator uses cd "$cwd" for proper repo context and supports multiple PRs to different bases
  • Issue indicator now uses a tight pattern requiring common prefixes (issue|fix|bug|feat|feature|closes|resolves) to avoid false positives from arbitrary numbers in branch names - this addresses the concern raised in previous reviews
  • Directory name is now a clickable hyperlink to the repo URL
  • gh repo view for the repo URL is called once and reused for all hyperlinks

Automated review by Claude Code

When a slash command has empty <command-args></command-args>, fall back
to showing the command name instead of empty/garbage text.

Also filters out system preambles like "Caveat:..." from plain messages.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Dec 31, 2025

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

This PR consolidates 26 MCP permissions into 2 wildcards (mcp__github__*, mcp__event-bus__*), adds comprehensive Python tooling permissions (both .venv/bin/* and global patterns), adds utility permissions (git -C, mkdir, contrib scripts, bootstrap/uninstall, cargo +nightly), and enhances the statusline with clickable hyperlinks for directory/PR/issues and proper slash command display.

Issues Found

Critical

None

Important

None

Suggestions

None

Verdict

APPROVE - Code looks good, no issues found.

Permissions changes (settings.json):

  • MCP wildcard consolidation (mcp__github__*, mcp__event-bus__*) reduces 26 entries to 2, lowering maintenance burden
  • Python permissions fully address issue RFC: Add Python tooling permissions to global Claude settings #56 with both venv patterns (.venv/bin/python3:*, .venv/bin/pip:*, .venv/bin/pytest:*, .venv/bin/ruff:*) and global patterns (python3:*, pip:*, pip3:*, pytest:*, ruff:*)
  • Additional utilities (git -C:*, mkdir:*, cargo +nightly:*, ~/.claude/contrib/*:*, ./bootstrap.sh:*, ./uninstall.sh:*) are sensible additions
  • Removal of Bash(cat /tmp/*:*) aligns with the dedicated Read tool per the PR description

Statusline improvements (statusline-command.sh):

  • Slash command handling correctly extracts <command-args> content first, then falls back to <command-name>, then plain text with XML stripped
  • Uses jq -rs slurp mode to reliably get the last string message instead of line-based parsing
  • PR indicator supports multiple PRs to different base branches via gh pr list --head "$branch"
  • Issue indicator uses tight prefix pattern (issue|fix|bug|feat|feature|closes|resolves) to avoid false positives from arbitrary numbers in branch names
  • Directory name is now a clickable hyperlink to the repo URL
  • gh repo view result is fetched once and reused for directory, PR, and issue hyperlinks

Automated review by Claude Code

Session continuation summaries ("This session is being continued from
a previous conversation...") are marked as user messages but are
system-generated. Filter these out from the user context display.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@claude

claude Bot commented Dec 31, 2025

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

This PR consolidates 26 MCP permissions into 2 wildcards (mcp__github__*, mcp__event-bus__*), adds comprehensive Python tooling permissions (both .venv/bin/* and global patterns), adds utility permissions (git -C, mkdir, contrib scripts, bootstrap/uninstall, cargo +nightly), and enhances the statusline with clickable hyperlinks for directory/PR/issues and proper slash command display.

Issues Found

Critical

None

Important

None

Suggestions

None

Verdict

APPROVE - Code looks good, no issues found.

Permissions changes (settings.json):

  • MCP wildcard consolidation reduces 26 entries to 2, significantly lowering maintenance burden
  • Python permissions fully address issue RFC: Add Python tooling permissions to global Claude settings #56 with both venv patterns (.venv/bin/python3:*, .venv/bin/pip:*, .venv/bin/pytest:*, .venv/bin/ruff:*) and global patterns (python3:*, pip:*, pip3:*, pytest:*, ruff:*)
  • Sensible utility additions: git -C:*, mkdir:*, cargo +nightly:*, contrib scripts, bootstrap/uninstall
  • Removal of Bash(cat /tmp/*:*) aligns with the dedicated Read tool

Statusline improvements (statusline-command.sh):

  • Slash command handling correctly extracts <command-args><command-name> → plain text (with XML stripped)
  • Uses jq -rs slurp mode to reliably get the last string message
  • PR indicator supports multiple PRs to different base branches via gh pr list --head "$branch"
  • Issue indicator uses tight prefix pattern (issue|fix|bug|feat|feature|closes|resolves) to avoid false positives
  • Directory name and PR/issue numbers are clickable hyperlinks to the repo

Automated review by Claude Code

@claude

claude Bot commented Dec 31, 2025

Copy link
Copy Markdown

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review

Summary

This PR consolidates 26 MCP permissions into 2 wildcards (mcp__github__*, mcp__event-bus__*), adds comprehensive Python tooling permissions (both .venv/bin/* and global patterns), adds utility permissions (git -C, mkdir, contrib scripts, bootstrap/uninstall, cargo +nightly), and enhances the statusline with clickable hyperlinks for directory/PR/issues and improved slash command display.

Issues Found

Critical

None

Important

None

Suggestions

None

Verdict

APPROVE - Code looks good, no issues found.

Permissions (settings.json):

  • MCP wildcard consolidation (mcp__github__*, mcp__event-bus__*) reduces 26 entries to 2
  • Python permissions address the use case with both venv patterns (.venv/bin/python3:*, .venv/bin/pip:*, .venv/bin/pytest:*, .venv/bin/ruff:*) and global patterns (python3:*, pip:*, pip3:*, pytest:*, ruff:*)
  • Sensible utility additions: git -C:*, mkdir:*, cargo +nightly:*, contrib scripts, bootstrap/uninstall
  • Removal of Bash(cat /tmp/*:*) is appropriate given the dedicated Read tool

Statusline (statusline-command.sh):

  • Slash command handling extracts <command-args><command-name> → plain text with XML stripped
  • Uses jq -rs slurp mode for reliable last-message extraction
  • PR indicator supports multiple PRs via gh pr list --head "$branch"
  • Issue indicator uses tight prefix pattern (issue|fix|bug|feat|feature|closes|resolves) to avoid false positives from arbitrary numbers
  • Directory/PR/issue numbers are clickable OSC 8 hyperlinks

Automated review by Claude Code

@evansenter
evansenter merged commit 8e0b41c into main Dec 31, 2025
4 checks passed
@evansenter
evansenter deleted the python-tooling-permissions branch December 31, 2025 17:43
evansenter added a commit that referenced this pull request Jan 1, 2026
* feat: Add Python tooling permissions to global settings

- Add ruff, pytest, pip, python3 permissions for Python development
- Add git -C and mkdir utility permissions
- Remove cat /tmp/* (no longer needed)

Closes #56

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: Simplify permissions and fix statusline slash command display

Permissions cleanup:
- Consolidate 26 MCP permissions to 2 wildcards (mcp__github__*, mcp__event-bus__*)
- Simplify Python venv permissions with wildcards (pip, pytest, ruff)
- Add contrib scripts, bootstrap/uninstall, cargo +nightly

Statusline fix:
- Handle slash commands: extract args content or command name
- Previously showed raw XML tags like (<command-args>...</command-args>)
- Now shows just the args (or /command for no-arg commands)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: Add global Python tool patterns and PR indicator to statusline

Addresses claude-review feedback:
- Add generic patterns: pip, pip3, pytest, ruff (not just .venv/bin/*)
- Supports globally installed tools via pipx, homebrew, or system packages

Statusline enhancement:
- Show associated PR number (#92) when branch has an open PR
- Uses gh pr view with 2s timeout to avoid blocking

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Run gh pr view from correct working directory

Addresses claude-review feedback: ensure PR indicator queries the
correct repo by running gh pr view from $cwd.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Make PR indicator cross-platform (macOS + Linux)

Use `timeout` on Linux where available, skip on macOS where it's not.
The gh pr view command is fast enough that timeout is optional.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: Make PR indicator a clickable hyperlink

Uses OSC 8 escape sequences for terminal hyperlinks.
Supported in iTerm2, GNOME Terminal, Windows Terminal, Konsole, etc.
Cmd+click (or ctrl+click) on #92 opens the PR in browser.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: Add issue indicator from branch name

Parses branch names for issue patterns:
- issue-42, fix-123, feature/42, bug-99
- Branches starting with number: 42-add-feature
- Branches ending with number: add-feature-42

Shows as →#42 in cyan with clickable link to issue.
Displayed before PR indicator when both exist.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: Enhance statusline with multiple issues and clickable directory

- Support multiple issue numbers in branch name (e.g., issue-42-and-56)
- Make directory name a clickable link to repo
- Reorder: directory → PR → issues → model → git status → context → user msg
- Reuse repo_url fetch for efficiency

All links use OSC 8 hyperlinks (cmd+click in iTerm2, ctrl+click elsewhere).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: Support multiple PRs in statusline

Uses `gh pr list --head <branch>` to find all PRs for current branch.
Supports PRs to multiple base branches (e.g., main and develop).
Displays as comma-separated clickable links: #92,#93

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Improve statusline issue detection and user context extraction

- Issue detection now checks PR body for "Fixes #N" patterns first,
  then falls back to tight branch name pattern (issue-42, fix-42, etc.)
- User context extraction uses jq slurp mode to avoid picking up
  tool result messages

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Handle empty command-args in statusline

When a slash command has empty <command-args></command-args>, fall back
to showing the command name instead of empty/garbage text.

Also filters out system preambles like "Caveat:..." from plain messages.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Filter out continuation summaries from statusline user context

Session continuation summaries ("This session is being continued from
a previous conversation...") are marked as user messages but are
system-generated. Filter these out from the user context display.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: Add Notion MCP and fix statusline hyperlink issues

- Add Notion MCP server installation to bootstrap.sh
- Add mcp__notion__* permission to settings.json
- Fix statusline hyperlink escape sequences leaking (dotted underlines)
- Add atomic output to prevent interleaving with CC status messages
- Validate PR/issue numbers before creating hyperlinks
- Strip newlines to prevent tmux layout issues

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: Add Makefile for local quality gates

- `make check` - run all quality gates (lint + test)
- `make lint` - shellcheck on all .sh files (matches CI)
- `make test` - bash/zsh syntax checking
- `make install` / `make uninstall` - bootstrap/uninstall wrappers

Follows same structure as claude-event-bus and claude-session-analytics.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add CRITICAL reminder to run /pr remote after CI passes

Automated reviewers (like claude-review) post new comments on each CI
run. Must check for these before declaring a PR ready to merge.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: Trigger CI

* refactor: Align CI workflow with other repos

- Split into Lint, Test, Bootstrap jobs (matches claude-event-bus pattern)
- Each job runs specific make targets
- Update branch protection to match new job names

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Strengthen claude-review verdict compliance

The review prompt was being ignored - model approved with suggestions
despite explicit "REQUEST_CHANGES if any suggestions" rule.

Fixes:
1. Make rule a HARD CONSTRAINT with explicit "no exceptions" language
2. Add verification step: count issues before posting, check verdict
3. Add reminder comment in verdict template section
4. Explicitly forbid rationalizing "minor" suggestions as approvable

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Add reporting philosophy to prevent suggestion suppression

The model was hiding suggestions to avoid REQUEST_CHANGES. This adds
guidance that:
- Report all relevant feedback, don't suppress to achieve a verdict
- REQUEST_CHANGES is the normal outcome for thorough reviews
- Suggestions are valuable collaboration, not criticism

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* experiment: Temporarily revert prompt to test suggestion suppression

* Restore improved review prompt after testing

Experiment confirmed: prompt changes did not cause suggestion suppression.
Model variance is the cause - different runs evaluate differently.

Keeping improvements:
- Reporting Philosophy section (encourages finding suggestions)
- HARD CONSTRAINT language (enforces verdict rules)
- Verify Before Posting step (mechanical check)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: Clarify explicit stdin redirection in statusline

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
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