Skip to content

Commit e0fe9e6

Browse files
claudeNik Samokhvalov
authored andcommitted
Add slash commands for common workflows
- /pg-ready: Check patch readiness for submission - /pg-submit: Prepare patch and draft email - /pg-respond: Help respond to reviewer feedback Slash commands provide quick access to common actions.
1 parent c2ff170 commit e0fe9e6

File tree

4 files changed

+60
-15
lines changed

4 files changed

+60
-15
lines changed

REV/.claude/commands/pg-ready.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Evaluate patch readiness for pgsql-hackers submission.
2+
3+
You are a veteran Postgres hacker. Check:
4+
5+
1. **Build**: Does it compile clean? Run `make -j$(nproc) 2>&1 | grep -E 'warning:|error:'`
6+
2. **Tests**: Do all tests pass? Check `make check` status
7+
3. **Style**: Is pgindent run? Check modified .c/.h files
8+
4. **Debug code**: Any printf/elog DEBUG/#if 0 left? `git diff HEAD~1 | grep -E 'printf|elog.*DEBUG|#if 0'`
9+
5. **Docs**: For user-visible changes, is documentation updated?
10+
6. **Commit message**: Is it clear and properly formatted?
11+
12+
Give a clear **READY** or **NOT READY** verdict with specific issues to fix.

REV/.claude/commands/pg-respond.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Help respond to pgsql-hackers review feedback.
2+
3+
You are a veteran Postgres hacker. Given the feedback:
4+
5+
1. **Parse feedback**: List each point raised by reviewers
6+
2. **Categorize**:
7+
- Must fix (bugs, missing tests)
8+
- Should fix (style, suggestions from senior hackers)
9+
- Discuss (alternative approaches, disagreements)
10+
3. **Draft response**: For each point:
11+
- If accepting: "Good catch! Fixed in v2..."
12+
- If disagreeing: "I considered X, but chose Y because..."
13+
- If clarifying: "Could you elaborate on..."
14+
4. **Changelog**: Summarize changes for the email
15+
16+
Output a complete reply email ready to send.

REV/.claude/commands/pg-submit.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Prepare patch for pgsql-hackers submission.
2+
3+
You are a veteran Postgres hacker. Help prepare and submit:
4+
5+
1. **Generate patch**: `git format-patch master --base=master`
6+
2. **Verify applies**: Test that patch applies cleanly
7+
3. **Draft email**: Write cover letter with:
8+
- Clear subject: `[PATCH] Brief description`
9+
- Motivation: Why is this needed?
10+
- Implementation: Brief approach description
11+
- Testing: What was tested?
12+
- Any open questions
13+
14+
Output the complete email ready to send to pgsql-hackers@lists.postgresql.org
15+
16+
Remind about registering in CommitFest after submission.

REV/CLAUDE.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,27 +49,28 @@ Agents are defined in `.claude/agents/` and invoked via natural language:
4949

5050
---
5151

52-
## Quick Start
53-
54-
```
55-
# Set up development environment
56-
Use the pg-build subagent to help me build Postgres for development
52+
## Slash Commands
5753

58-
# Run tests after making changes
59-
Use the pg-test subagent to run regression tests
54+
Quick actions defined in `.claude/commands/`:
6055

61-
# Before submitting - check readiness
62-
Use the pg-readiness subagent to evaluate my patch
56+
| Command | Description |
57+
|---------|-------------|
58+
| `/pg-ready` | Check if patch is ready for submission |
59+
| `/pg-submit` | Prepare patch and draft submission email |
60+
| `/pg-respond` | Help respond to reviewer feedback |
6361

64-
# Create the patch
65-
Use the pg-patch-create subagent to prepare my changes
62+
---
6663

67-
# Write the email
68-
Use the pg-hackers-letter subagent to draft a submission email
64+
## Quick Start
6965

70-
# After feedback arrives
71-
Use the pg-feedback subagent to address the review comments
7266
```
67+
/pg-ready # Check if patch is ready
68+
/pg-submit # Prepare patch + draft email
69+
/pg-respond # Address reviewer feedback
70+
```
71+
72+
For detailed help, invoke agents via natural language:
73+
> "Use the pg-build subagent to help me configure a debug build"
7374
7475
---
7576

0 commit comments

Comments
 (0)