Skip to content

Commit d45c077

Browse files
joshsmithxrmclaude
andauthored
chore: enhance triage workflow with autonomous analysis and batch planning (#245)
- /triage: Add autonomous analysis mode (Claude determines field values) - Target assignment criteria (This Week, Next, CLI v1.0.0, Q1 2026) - Batch recommendations for /plan-work integration - /create-issue: Complete rewrite with project integration - GraphQL mutations to set all 5 project fields - Support for --type, --priority, --size, --target, --parent options - /plan-work: Add project-aware options - --target: Select issues by Target field - --batch: Predefined batch groups (tui-enhancements, phase-3-traces, etc.) - --epic: Select children of an epic - Validation of project fields before creating worktrees - Issue templates: Add optional Priority/Size dropdowns - CLAUDE.md: Add rule to link related issues in PR body - Settings: Reduce approval interruptions for routine operations Relates to #238 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e317e58 commit d45c077

File tree

7 files changed

+449
-56
lines changed

7 files changed

+449
-56
lines changed

.claude/commands/create-issue.md

Lines changed: 209 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,42 @@
11
# Create Issue
22

3-
Create a GitHub issue in any PPDS ecosystem repository.
3+
Create a GitHub issue with automatic project triage in the PPDS ecosystem.
44

55
## Usage
66

7-
`/create-issue [repo]`
7+
`/create-issue [options]`
88

9-
Where `[repo]` is one of:
10-
- `extension` - power-platform-developer-suite
11-
- `sdk` - ppds-sdk
12-
- `tools` - ppds-tools
13-
- `alm` - ppds-alm
14-
- `demo` - ppds-demo
9+
Examples:
10+
- `/create-issue` - Interactive mode
11+
- `/create-issue --type feature --title "Add X feature"` - Quick mode
12+
- `/create-issue --parent 210` - Create child of epic #210
13+
14+
## Options
15+
16+
| Option | Description |
17+
|--------|-------------|
18+
| `--type` | feature, bug, chore, docs, refactor |
19+
| `--title` | Issue title (imperative, concise) |
20+
| `--priority` | P0-Critical, P1-High, P2-Medium, P3-Low |
21+
| `--size` | XS, S, M, L, XL |
22+
| `--target` | This Week, Next, CLI v1.0.0, Q1 2026 |
23+
| `--parent` | Parent issue number for epic children |
24+
| `--labels` | Comma-separated labels |
25+
| `--repo` | Repository (default: sdk) |
1526

1627
## Process
1728

1829
### 1. Gather Information
19-
Ask user for:
30+
31+
If options not provided, ask user for:
2032
- Issue type: `feat`, `fix`, `chore`, `docs`
2133
- Title (concise, imperative)
2234
- Description (problem, solution, context)
23-
- Labels (if known)
35+
- Priority (suggest based on type)
36+
- Size (suggest based on scope)
37+
- Target (suggest based on priority)
2438

25-
### 2. Format Issue
39+
### 2. Format Issue Body
2640

2741
```markdown
2842
## Summary
@@ -52,14 +66,139 @@ Related: [links to related issues if any]
5266
### 3. Create Issue
5367

5468
```bash
55-
gh issue create --repo joshsmithxrm/[repo-name] --title "[type]: [title]" --body "[body]"
69+
gh issue create --repo joshsmithxrm/ppds-sdk \
70+
--title "[type]: [title]" \
71+
--body "[body]" \
72+
--label "[labels]"
73+
```
74+
75+
Capture the issue URL from output to extract issue number.
76+
77+
### 4. Add to Project
78+
79+
```bash
80+
gh project item-add 3 --owner joshsmithxrm \
81+
--url https://github.com/joshsmithxrm/ppds-sdk/issues/{number}
82+
```
83+
84+
Capture the project item ID from response.
85+
86+
### 5. Set Project Fields
87+
88+
Use GraphQL mutations to set all fields:
89+
90+
**Project and Field IDs (hardcoded):**
91+
```bash
92+
PROJECT_ID=PVT_kwHOAGk32c4BLj-0
93+
TYPE_FIELD_ID=PVTSSF_lAHOAGk32c4BLj-0zg7GUbM
94+
PRIORITY_FIELD_ID=PVTSSF_lAHOAGk32c4BLj-0zg7GUbQ
95+
SIZE_FIELD_ID=PVTSSF_lAHOAGk32c4BLj-0zg7GUbU
96+
STATUS_FIELD_ID=PVTSSF_lAHOAGk32c4BLj-0zg7GUaE
97+
TARGET_FIELD_ID=PVTF_lAHOAGk32c4BLj-0zg7GVcU
98+
```
99+
100+
**Option IDs:**
101+
```bash
102+
# Type options
103+
TYPE_FEATURE=926164fe
104+
TYPE_BUG=3bbc2d7f
105+
TYPE_CHORE=48a397b9
106+
TYPE_DOCS=979a58c4
107+
TYPE_REFACTOR=ef097e31
108+
109+
# Priority options
110+
PRIORITY_P0=d88b54f7
111+
PRIORITY_P1=549be3a3
112+
PRIORITY_P2=7cb98b83
113+
PRIORITY_P3=78b4c9e9
114+
115+
# Size options
116+
SIZE_XS=ff10330e
117+
SIZE_S=11435dea
118+
SIZE_M=da30bc48
119+
SIZE_L=00540448
120+
SIZE_XL=ac8ac48e
121+
122+
# Status options
123+
STATUS_TODO=f75ad846
124+
STATUS_IN_PROGRESS=47fc9ee4
125+
STATUS_DONE=98236657
126+
```
127+
128+
**Set single-select fields (Type, Priority, Size, Status):**
129+
```bash
130+
gh api graphql -f query='
131+
mutation {
132+
updateProjectV2ItemFieldValue(
133+
input: {
134+
projectId: "PVT_kwHOAGk32c4BLj-0"
135+
itemId: "{item-id}"
136+
fieldId: "{field-id}"
137+
value: {
138+
singleSelectOptionId: "{option-id}"
139+
}
140+
}
141+
) {
142+
projectV2Item {
143+
id
144+
}
145+
}
146+
}
147+
'
148+
```
149+
150+
**Set text field (Target):**
151+
```bash
152+
gh api graphql -f query='
153+
mutation {
154+
updateProjectV2ItemFieldValue(
155+
input: {
156+
projectId: "PVT_kwHOAGk32c4BLj-0"
157+
itemId: "{item-id}"
158+
fieldId: "PVTF_lAHOAGk32c4BLj-0zg7GVcU"
159+
value: {
160+
text: "{target-value}"
161+
}
162+
}
163+
) {
164+
projectV2Item {
165+
id
166+
}
167+
}
168+
}
169+
'
56170
```
57171

58-
### 4. Link Cross-Repo Issues
172+
### 6. Link Parent Issue (if specified)
59173

60-
If this issue relates to issues in other repos:
61-
- Add "Related:" links in body
62-
- Comment on related issues with link to new issue
174+
If `--parent` is provided, add comment linking to parent:
175+
176+
```bash
177+
gh issue comment {number} --body "Child of #{parent-number}"
178+
gh issue comment {parent-number} --body "Child issue: #{number}"
179+
```
180+
181+
### 7. Report Success
182+
183+
```markdown
184+
## Issue Created
185+
186+
Created: https://github.com/joshsmithxrm/ppds-sdk/issues/{number}
187+
188+
Project fields set:
189+
- Type: feature
190+
- Priority: P2-Medium
191+
- Size: M
192+
- Status: Todo
193+
- Target: CLI v1.0.0
194+
195+
Parent: #210 (linked)
196+
197+
Next steps:
198+
- Move to In Progress when starting work
199+
- Create branch: `git checkout -b feature/{short-name}`
200+
- Reference issue in commits: "feat: add X (#number)"
201+
```
63202

64203
## Repository Mapping
65204

@@ -77,14 +216,36 @@ If this issue relates to issues in other repos:
77216
|------|---------------|
78217
| Feature | `enhancement` |
79218
| Bug | `bug` |
80-
| Tech Debt | `tech-debt` |
81-
| Documentation | `documentation` |
82-
| Cross-repo | `cross-repo` |
219+
| Chore | - |
220+
| Docs | `documentation` |
221+
| Refactor | - |
222+
223+
## Suggested Field Values
83224

84-
## Example
225+
When user doesn't specify, suggest based on context:
226+
227+
| Type | Default Priority | Default Size |
228+
|------|-----------------|--------------|
229+
| bug | P1-High | S |
230+
| feature | P2-Medium | M |
231+
| chore | P3-Low | S |
232+
| docs | P3-Low | XS |
233+
| refactor | P2-Medium | M |
234+
235+
## Edge Cases
236+
237+
| Scenario | Handling |
238+
|----------|----------|
239+
| Parent issue not found | Warn but continue without linking |
240+
| Project add fails | Show error, issue still created |
241+
| Field update fails | Show partial success with what failed |
242+
| Invalid type/priority | Show valid options, ask again |
243+
| Duplicate title | Warn, ask to confirm or modify |
244+
245+
## Example Session
85246

86247
```
87-
User: /create-issue sdk
248+
User: /create-issue
88249
89250
Claude: What type of issue?
90251
- feat (new feature)
@@ -96,14 +257,37 @@ User: feat
96257
97258
Claude: Title? (imperative, concise)
98259
99-
User: Add interactive plugin registration CLI commands
260+
User: Add query result export to CSV
100261
101262
Claude: Description? (problem, solution, context)
102263
103-
User: [provides description]
264+
User: The query command should support exporting results to CSV format for data analysis
265+
266+
Claude: Suggested triage values:
267+
- Priority: P2-Medium (useful feature)
268+
- Size: S (straightforward implementation)
269+
- Target: CLI v1.0.0 (enhances query functionality)
270+
271+
Create with these values? (yes/modify)
272+
273+
User: yes
104274
105275
Claude: Creating issue...
106-
[Creates issue with gh CLI]
107276
108-
Created: https://github.com/joshsmithxrm/ppds-sdk/issues/70
277+
Created: https://github.com/joshsmithxrm/ppds-sdk/issues/245
278+
279+
Project fields set:
280+
✓ Type: feature
281+
✓ Priority: P2-Medium
282+
✓ Size: S
283+
✓ Status: Todo
284+
✓ Target: CLI v1.0.0
285+
286+
Ready for development!
109287
```
288+
289+
## Related
290+
291+
- **/triage**: Batch triage existing issues
292+
- **/plan-work**: Create worktrees for issues
293+
- **ROADMAP.md**: Field definitions and guidelines

0 commit comments

Comments
 (0)