feat(repo): enhance Claude Code workflow and settings (#31405)

## Current Behavior

The Claude Code setup has basic workflow automation but lacks
comprehensive tooling permissions and detailed guidance for issue
management. The workflow documentation contains redundant sections and
some outdated commands.

## Expected Behavior

With these changes, the Claude Code integration will have:
- Enhanced tool permissions for better CI/CD workflow support
- Comprehensive GitHub CLI commands for efficient multi-issue management
- Clear mandatory requirements for PR template completion
- Streamlined documentation with accurate command references

## Related Issue(s)

This PR builds upon the initial Claude Code setup from #31380 by
refining the workflow configuration and improving the developer
experience.
This commit is contained in:
Jason Jean 2025-05-30 21:26:52 -04:00 committed by GitHub
parent e4124c1c93
commit f02cc49b06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 23 additions and 19 deletions

View File

@ -2,23 +2,6 @@
## Quick Start
### For Planning Phase
1. Comment `@claude plan` on any issue, OR
2. Add the label `claude:plan` to trigger automatic planning
### For Implementation Phase
1. Comment `@claude implement` on an issue with a plan, OR
2. Add the label `claude:implement` to trigger automatic implementation
## Workflow Labels
- `claude:plan` - Triggers the planning workflow
- `claude:planned` - Added after planning is complete
- `claude:implement` - Triggers the implementation workflow
- `claude:implemented` - Added after implementation is complete
## Expected Outputs
### Planning Phase

View File

@ -3,11 +3,15 @@
"allow": [
"Bash(find:*)",
"Bash(ls:*)",
"Bash(mkdir:*)",
"WebFetch(domain:github.com)",
"WebFetch(domain:www.typescriptlang.org)",
"Bash(git log:*)",
"Bash(gh issue list:*)",
"Bash(gh issue view:*)",
"Bash(npx prettier:*)",
"Bash(nx prepush:*)",
"Bash(pnpm commit:*)",
"Bash(rg:*)",
"mcp__nx__nx_docs",
"mcp__nx__nx_workspace",
@ -15,6 +19,7 @@
"Bash(nx show projects:*)",
"Bash(nx run-many:*)",
"Bash(nx run:*)",
"Bash(nx affected:*)",
"Bash(nx lint:*)",
"Bash(nx test:*)",
"Bash(nx build:*)",

View File

@ -89,4 +89,5 @@ jobs:
timeout-minutes: 90
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
allowed_tools: "Bash,Edit,Read,Write,Glob,Grep,LS,MultiEdit,NotebookRead,NotebookEdit"

View File

@ -58,7 +58,7 @@ After code changes are made, please make sure to format the files with prettier
```bash
# Full validation suite - run before committing
pnpm nx prepush
nx prepush
```
If the prepush validation suite fails, please fix the issues before proceeding with your work. This ensures that all code adheres to the project's standards and passes all tests.
@ -94,8 +94,22 @@ When working on a GitHub issue, follow this systematic approach:
```bash
# Get issue details using GitHub CLI (replace ISSUE_NUMBER with actual number)
gh issue view ISSUE_NUMBER
# View multiple issues efficiently in one command
gh issue list --limit 50 --json number,title,state,labels,assignees,updatedAt,body --jq '.[] | select(.number == 123 or .number == 456 or .number == 789)'
# Or filter by specific criteria to get multiple related issues
gh issue list --label "bug" --state "open" --json number,title,body,labels --jq '.[]'
gh issue list --assignee "@me" --json number,title,body,state --jq '.[]'
```
**Tip**: Instead of running `gh issue view` multiple times, use `gh issue list` with JSON output and filtering to gather information about multiple issues in a single command. This is much more efficient than viewing issues one at a time.
**Always provide clickable links**: When discussing GitHub issues or PRs, always include the full GitHub URL so the user can easily open them in their browser. For example:
- Issue #12345: https://github.com/nrwl/nx/issues/12345
- PR #67890: https://github.com/nrwl/nx/pull/67890
When cloning reproduction repos, please clone within `./tmp/claude/repro-ISSUE_NUMBER`
### 2. Analyze the Plan
@ -117,13 +131,14 @@ Use the testing workflow from the "Essential Commands" section.
### 5. Submit Pull Request
- Create a descriptive PR title that references the issue
- **Always fill in the PR template** - don't leave it empty
- Include "Fixes #ISSUE_NUMBER" in the PR description
- Provide a clear summary of changes made
- Request appropriate reviewers
## Pull Request Template
When creating a pull request, follow the template found in `.github/PULL_REQUEST_TEMPLATE.md`. The template includes:
**IMPORTANT**: When creating a pull request, you MUST fill in the template found in `.github/PULL_REQUEST_TEMPLATE.md`. Do not leave the template sections empty. The template includes:
### Required Sections