Skip to content

Commit c92e9e8

Browse files
committed
feat: add /issue slash command for drafting GitHub issues
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
1 parent 21fd287 commit c92e9e8

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.claude/commands/issue.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Create a GitHub issue markdown file from the details provided by the user.
2+
3+
The user will describe a bug, feature request, or discussion context (e.g. Slack conversations, error logs, reproduction steps). Your job is to turn that into a well-structured issue and save it to `plans/`.
4+
5+
Steps:
6+
1. Read the user's input to understand the problem, who reported it, and any logs or reproduction steps provided
7+
2. Investigate the codebase to identify relevant code paths, pinpoint where the issue likely originates, and gather context that would help a contributor understand the problem
8+
3. Write a concise GitHub issue markdown file and save it to `plans/issue-<short-slug>.md`
9+
10+
Issue format:
11+
- Start with `## <title>` as the first line (this becomes the GitHub issue title)
12+
- `### Problem` — 2-3 sentences explaining the issue and its impact
13+
- `### Steps to Reproduce` — numbered list (if applicable)
14+
- `### Expected Behavior` — 1-2 sentences
15+
- `### Actual Behavior` — include relevant log snippets in code blocks, keep them short (trim stack traces to the key lines)
16+
- `### Potential Root Cause` — based on your codebase investigation, explain where the issue likely lives. Link to source code using upstream GitHub URLs: `https://github.com/armadaproject/armada-spark/blob/master/...#L<start>-L<end>`. For Apache Spark references, link to the `apache/spark` repo at the relevant tag.
17+
- `### Affected Files` — table with file links and one-line role descriptions
18+
- `### Additional Context` — bullet points for version info, related code paths, or anything else useful
19+
20+
Style rules:
21+
- Keep it concise — the whole issue should be under 80 lines
22+
- Use code blocks sparingly — only for key log lines and small code snippets
23+
- Do not propose fixes or implementation approaches
24+
- Do not add Labels, Description, or Title as separate sections — the `##` heading is the title
25+
- Write for a contributor who knows the project but hasn't seen this specific bug
26+
- No emojis
27+
28+
$ARGUMENTS

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ This project includes a [Claude Code](https://docs.anthropic.com/en/docs/claude-
6262
| `/commit` | Create a conventional commit |
6363
| `/ci-local` | Run the full CI pipeline locally |
6464
| `/summary` | Generate a PR description from your branch |
65+
| `/issue` | Draft a GitHub issue from bug details/logs |
6566

6667
**Optional plugins:** Copy `.claude/settings.local.example.json` to `.claude/settings.local.json` and restart. Source: https://github.com/wshobson/agents
6768

0 commit comments

Comments
 (0)