Add PPL bugfix skill for Claude Code#5307
Add PPL bugfix skill for Claude Code#5307qianheng-aws wants to merge 9 commits intoopensearch-project:mainfrom
Conversation
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 42caa29.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
PR Reviewer Guide 🔍(Review updated until commit 42caa29)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 42caa29 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 45bbb51
Suggestions up to commit ce54987
Suggestions up to commit 6b29b60
Suggestions up to commit 638f0ce
Suggestions up to commit 57bfdb0
|
- ppl-bugfix-harness.md: systematic bugfix SOP distilled from 15+ historical commits, covering triage, TDD-style fix paths (A-E by bug layer), test templates (UT/IT/YAML), verification, PR creation, decision log, and post-PR follow-up - .claude/commands/ppl-bugfix.md: slash command that auto-resolves issue↔PR, dispatches subagent with worktree isolation and scoped permissions, handles both initial fix and follow-up flows - CLAUDE.md: reference to /ppl-bugfix as the entry point for PPL bugs - .gitignore: allow .claude/commands/ and settings.json to be tracked Signed-off-by: Heng Qian <qianheng@amazon.com>
… reorg - Add --safe/--yolo permission mode flags (default: bypassPermissions) - Support multiple issue/PR references for parallel processing - Move harness files to .claude/harness/ directory - Add ppl-bugfix-followup.md for post-PR follow-up workflow - Add .claude/settings.json with pre-approved tool permissions - Add CLAUDE_GUIDE.md documenting all slash commands Signed-off-by: Heng Qian <qianheng@amazon.com>
71227a2 to
d4b9b01
Compare
|
Persistent review updated to latest commit d4b9b01 |
The Reconstruct Context section now explicitly loads all PR comments (bot and human) and categorizes bot suggestions as actionable review feedback, not just CI checks and human reviews. Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Persistent review updated to latest commit b9584ee |
- Add missing git merge permission to settings.json (used in harness merge steps) - Search all PR closing keyword variants (Resolves/Fixes/Closes) for issue-PR linkage - Replace grep -oP with portable grep -oE for macOS compatibility - Use --force-with-lease instead of --force in cherry-pick cleanup flow - Make post-merge test re-run mandatory with explicit command - Add --repo opensearch-project/sql to gh pr create for correct targeting Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Persistent review updated to latest commit 57bfdb0 |
- Replace broad `git push:*` with `git push -u:*` and `git push --force-with-lease:*` to prevent accidental force-pushes to upstream - Restrict `git reset:*` to `git reset --soft:*` since the harness only uses soft reset - Update followup harness push commands to use `-u` flag consistently Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Persistent review updated to latest commit 638f0ce |
Followup agent now reflects on each feedback comment to identify gaps in the harness that should have prevented the issue, and fixes them in the same commit. Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Persistent review updated to latest commit 6b29b60 |
- Add fork remote discovery step to both harness and followup (replace <your_fork_remote> placeholder with concrete instructions) - Remove redundant follow-up type from command dispatch — subagent discovers it from PR state via followup harness categorization table - Fix Phase 0.1: remove fake REST API call, use integration test only - Add no-coauthor rule to followup harness (was only in harness) - Add --repo flag to gh pr checkout in followup for worktree context Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Persistent review updated to latest commit ce54987 |
Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Persistent review updated to latest commit 45bbb51 |
Subagent was ignoring the "stop and report back" instruction and still creating regression tests + PRs for bugs that no longer reproduce. - Harness: clarify definition of "not reproducible", replace soft "stop and report back" with explicit HARD STOP + forbidden actions - Skill: add CRITICAL instruction in subagent dispatch prompt so it sees the constraint before even reading the harness Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Persistent review updated to latest commit 42caa29 |
Summary
Adds a
/ppl-bugfixslash command for Claude Code that automates PPL bug fixing end-to-end: triage, classification, TDD-style fix, testing, and PR creation — all driven by a structured harness.Who is this for?
Developers working on the OpenSearch SQL plugin who use Claude Code as their coding assistant. The command turns a GitHub issue number into a draft PR with fix, tests, and decision log.
How it works
Each issue/PR dispatches an autonomous subagent in an isolated git worktree (no interference with your working directory). The subagent follows a structured harness:
Permission modes control how much autonomy the subagent has:
--yolo(default) —bypassPermissions, zero prompts, fastest--safe—acceptEditsonly, Bash commands require manual approvalFiles
.claude/commands/ppl-bugfix.md.claude/harness/ppl-bugfix-harness.md.claude/harness/ppl-bugfix-followup.md.claude/settings.jsonCLAUDE_GUIDE.mdExample PRs produced by this command
node must be a booleanwhen mapping conflicts #5269)Test plan
/ppl-bugfix #<issue>on a real open issue — verify subagent dispatches in worktree, follows harness phases, creates draft PR/ppl-bugfix PR#<number>on an existing PR with review comments — verify follow-up agent addresses feedback/ppl-bugfix #1234 #5678— verify parallel dispatch of multiple subagents/ppl-bugfix #1234 --safe— verify acceptEdits mode (Bash commands prompt for approval)