You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Restructure AI Development Workflow with stacked branch clarifications
Enhanced the workflow documentation to clarify stacked branch handling
and ensure consistent high-quality PR descriptions:
- Added Workflow Overview with decision tree and label definitions
- Clarified stacked-branch label usage for branches based on PR branches
- Created shared "Creating High-Quality PR Descriptions" section
- Updated "Moving to Review" for standard PRs (pr-created + in-review labels)
- Updated "Stacked PRs" workflow (pr-created label only, draft status)
- Enhanced "Promoting Stacked PR" to add in-review label on promotion
- Emphasized human review as bottleneck requiring effortless reviews
Key improvements:
- Consistent PR description quality across both workflows
- Clear label lifecycle (pr-created vs in-review timing)
- Stacked beads must depend on parent bead
- Both workflows reference shared description format
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
@@ -168,10 +168,42 @@ This project is tracked in Jira under the **AIML** project. When creating Jira t
168
168
169
169
**Access**: Use the Atlassian MCP server to read or write Jira tickets programmatically.
170
170
171
+
----
171
172
172
173
## AI Development Workflow
173
174
174
-
This section defines the complete workflow for AI agents working with beads and Jira tickets in this project.
175
+
This section defines the complete workflow for a Developer using AI agents working with beads and Jira tickets in this project.
176
+
177
+
### Workflow Overview
178
+
179
+
**Key Labels:**
180
+
-`stacked-branch` - Branch is based on another PR branch (not main)
181
+
-`pr-created` - Pull request has been created
182
+
-`in-review` - Pull request is ready for human review (not draft)
183
+
184
+
**Decision Tree:**
185
+
186
+
```
187
+
Branch Creation:
188
+
├─ Based on main → No special label
189
+
└─ Based on another PR branch → Label with `stacked-branch`
190
+
191
+
PR Creation:
192
+
├─ Has `stacked-branch` label?
193
+
│ └─ YES → Create DRAFT PR (Stacked PRs workflow)
194
+
│ - Base: parent PR's branch
195
+
│ - Labels: `pr-created` (NOT `in-review` yet)
196
+
│ - Add warning banner + dependency context
197
+
│
198
+
└─ NO → Create ready PR (Moving to Review workflow)
199
+
- Base: main
200
+
- Labels: `pr-created`, `in-review`
201
+
- Standard PR description
202
+
203
+
Promoting Stacked PR (after base PR merges):
204
+
└─ Rebase onto main, update base branch, remove warnings
205
+
Add `in-review` label, mark PR ready
206
+
```
175
207
176
208
### Starting Work on a Bead
177
209
@@ -181,15 +213,19 @@ This section defines the complete workflow for AI agents working with beads and
181
213
- Show recently updated branches (sorted by most recent commits/PRs)
182
214
- User may be working with stacked branches where each new branch comes off the previous PR branch
183
215
- Name the branch with Jira ID prefix (e.g., `AIML-224-description`)
216
+
-**If based on another PR branch (not main)**: Label bead with `stacked-branch`
184
217
-**Bead is a child of Jira-linked bead**: Use the same branch as the parent bead
185
218
-**Bead has no Jira association and no parent**:
186
219
-**Ask user if it should have a Jira ticket**
187
220
- Most code changes need a Jira ticket and branch before merging
188
221
- Code changes should generally have a Jira ticket in scope
189
222
190
-
**2. Update bead status:**
223
+
**2. Update bead status and labels:**
191
224
- Set bead status to `in_progress`
192
225
- Record the branch name in the bead (so it's easily found later)
226
+
-**If this is a stacked branch** (based on another PR branch):
227
+
- Label the bead with `stacked-branch`
228
+
- Create parent-child dependency: the stacked bead depends on the bead of the branch it's based on
193
229
194
230
**3. Update Jira (if applicable):**
195
231
- If bead has a linked Jira ticket:
@@ -236,41 +272,77 @@ All code changes require corresponding test coverage. Do not move to review with
236
272
237
273
See INTEGRATION_TESTS.md for integration test setup and credentials.
238
274
275
+
### Creating High-Quality PR Descriptions
276
+
277
+
**This section defines the shared approach for creating PR descriptions used by both "Moving to Review" and "Stacked PRs" workflows.**
278
+
279
+
Human review is the bottleneck in AI-assisted development. Creating exceptional PR descriptions that make review effortless is critical to development velocity.
- All beads that have been worked on for this branch
283
+
- All git commits in the branch (`git log`, `git diff`)
284
+
- Voice notes that relate to this work
285
+
- Any related Jira tickets
286
+
287
+
**PR Description Structure:**
288
+
289
+
1.**Why**: Explain the problem or need that motivated this change
290
+
- What problem are we solving?
291
+
- What value does this provide?
292
+
- What was the business or technical driver?
293
+
294
+
2.**What**: Describe what changes were made at a high level
295
+
- What components/files were modified?
296
+
- What new capabilities exist?
297
+
- What behavior changed?
298
+
299
+
3.**How**: Explain how it was implemented
300
+
- Technical approach and architecture decisions
301
+
- Key implementation choices and trade-offs
302
+
- Design patterns used
303
+
- Integration points
304
+
305
+
4.**Step-by-step walkthrough**: Guide the reviewer through the changes in logical order
306
+
- Walk through the diff in a sensible sequence
307
+
- Explain complex sections
308
+
- Call out important details
309
+
- Help reviewer understand the flow
310
+
311
+
5.**Testing**: Summarize test coverage and results
312
+
- Unit test coverage added
313
+
- Integration test coverage added
314
+
- Test results (pass/fail counts)
315
+
- Manual testing performed
316
+
- Edge cases covered
317
+
318
+
**Goal**: Make reviewing effortless by providing all information the reviewer needs to understand and evaluate the changes with confidence and speed. The reviewer should not need to ask clarifying questions.
319
+
239
320
### Moving to Review
240
321
241
-
**When user says "move to review" or "ready for review":**
322
+
**When user says "move to review" or "ready for review" for a bead WITHOUT the `stacked-branch` label:**
323
+
324
+
This workflow creates a standard PR ready for immediate review, targeting the `main` branch.
242
325
243
-
1.**Label the bead(s):**
244
-
- Create/apply label `in-review` to the bead
326
+
**1. Label the bead(s):**
327
+
- Create/apply labels: `pr-created` and `in-review`
245
328
- Apply to all beads worked on in this branch
246
329
247
-
2.**Push to remote:**
330
+
**2. Push to remote:**
248
331
- Push the feature branch to remote repository
249
332
250
-
3.**Create or update Pull Request:**
251
-
- If PR doesn't exist, create it
333
+
**3. Create or update Pull Request:**
334
+
- If PR doesn't exist, create it with base branch `main`
252
335
- If PR exists, update the description
336
+
- PR should be ready for review (NOT draft)
253
337
254
-
4.**Generate comprehensive PR description:**
255
-
256
-
**Research phase** - Gather context from:
257
-
- All beads that have been worked on for this branch
258
-
- All git commits in the branch (`git log`, `git diff`)
259
-
- Voice notes that relate to this work
260
-
- Any related Jira tickets
261
-
262
-
**Write PR description** that includes:
263
-
-**Why**: Explain the problem or need that motivated this change
264
-
-**What**: Describe what changes were made at a high level
265
-
-**How**: Explain how it was implemented (technical approach, key decisions)
266
-
-**Step-by-step walkthrough**: Guide reviewer through the changes in logical order
267
-
-**Testing**: Summarize test coverage and results
268
-
269
-
**Goal**: Make reviewing the PR easy by providing all information the reviewer needs to understand and evaluate the changes effectively.
338
+
**4. Generate comprehensive PR description:**
339
+
- Follow the **"Creating High-Quality PR Descriptions"** section above
340
+
- Use the standard structure: Why / What / How / Walkthrough / Testing
341
+
- No special warnings or dependency context needed
270
342
271
343
### Stacked PRs (Ready for Draft Review)
272
344
273
-
**When user says "ready for stacked PR", "ready for draft review", or indicates this is a stacked PR:**
345
+
**When user says "ready for stacked PR", "ready for draft review", or when creating a PR for a bead WITH the `stacked-branch` label:**
274
346
275
347
This workflow creates a draft PR that depends on another unmerged PR (stacked branches).
276
348
@@ -279,7 +351,9 @@ This workflow creates a draft PR that depends on another unmerged PR (stacked br
279
351
- Note the PR number and URL
280
352
281
353
**2. Label the bead(s):**
282
-
- Create/apply label `in-review` to the bead
354
+
- Create/apply label `pr-created` to the bead
355
+
-**Do NOT add `in-review` label yet** (only added when promoted to ready-for-review)
356
+
- Apply to all beads worked on in this branch
283
357
284
358
**3. Push to remote:**
285
359
- Push the feature branch: `git push -u origin <branch-name>`
@@ -288,22 +362,29 @@ This workflow creates a draft PR that depends on another unmerged PR (stacked br
288
362
-**Base branch**: Set to the parent PR's branch (NOT main)
289
363
-**Status**: MUST be draft
290
364
-**Title**: Include `[STACKED]` indicator
291
-
-**Body**: MUST start with prominent warning:
365
+
-**Body**: Start with prominent warning, then add dependency context, followed by standard PR description:
292
366
```
293
367
**⚠️ DO NOT MERGE - WAITING FOR <link to base PR>**
294
368
295
369
This is a stacked PR based on #<base-pr-number>.
296
370
Please review and merge #<base-pr-number> first,
297
371
then rebase this PR onto `main` before merging.
298
372
373
+
---
374
+
375
+
**Dependency Context:**
376
+
This PR builds on the work from #<base-pr-number>. [Briefly explain
377
+
what the base PR did and why this PR follows it]
378
+
299
379
---
300
380
```
301
-
- Include full PR description after the warning (Why/What/How/Testing)
381
+
- After the warning and dependency context, follow the **"Creating High-Quality PR Descriptions"** section
382
+
- Use the standard structure: Why / What / How / Walkthrough / Testing
302
383
303
384
**5. Verify configuration:**
304
385
- Confirm PR is in draft status
305
386
- Confirm base branch is the parent PR's branch
306
-
- Confirm warning is prominently displayed
387
+
- Confirm warning and dependency context are prominently displayed
307
388
308
389
**Example command:**
309
390
```bash
@@ -330,11 +411,12 @@ EOF
330
411
331
412
### Promoting Stacked PR to Ready for Review
332
413
333
-
**When user says "move stacked PR to ready for review", "promote stacked PR", or "finalize stacked PR":**
414
+
**When user says "move stacked PR to ready for review", "promote stacked PR", or "finalize stacked PR" for a bead WITH the `stacked-branch` label:**
334
415
335
416
This workflow promotes a draft stacked PR to ready-for-review after its base PR has been merged to main.
336
417
337
418
**Prerequisites:**
419
+
- Bead must have `stacked-branch` label
338
420
- Base PR must be merged to main
339
421
- All tests must be passing on the stacked branch
340
422
- PR is currently in draft status targeting the base PR's branch
@@ -408,9 +490,10 @@ This workflow promotes a draft stacked PR to ready-for-review after its base PR
408
490
- Address any failures before proceeding
409
491
- Check CI status on GitHub
410
492
411
-
**9. Update bead (if applicable):**
493
+
**9. Update bead:**
494
+
-**Add `in-review` label to the bead** (PR is now truly ready for human review)
412
495
- Update bead notes with PR status: "Rebased onto main, ready for review"
413
-
- Keep bead in `in_progress` status with `in-review` label
0 commit comments