Skip to content

Commit a6304aa

Browse files
author
Per G. da Silva
committed
Switch SDD workflow from roadmap-based to GitHub issue-driven
Replace the roadmap.md phase-picking flow with GitHub issue discovery. The /sdd-plan-next-phase command now searches for epics labeled `epic` and `refined` that are unassigned and have all dependency issues resolved (marked `done`). On selection, it assigns the epic and creates a branch. The /sdd-ship command offers to label the epic as `done` after PR creation. Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
1 parent d7c0c70 commit a6304aa

6 files changed

Lines changed: 57 additions & 24 deletions

File tree

.claude/commands/sdd-implement.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Implement the current phase spec for operator-controller.
1+
Implement the current epic spec for operator-controller.
22

33
## Steps
44

5-
1. Identify the active phase spec. Look for a `specs/*/plan.md` file on the current branch. If multiple exist or none are found, use AskUserQuestion to clarify which phase to implement.
5+
1. Identify the active epic spec. Look for a `specs/*/plan.md` file on the current branch. If multiple exist or none are found, use AskUserQuestion to clarify which epic to implement.
66

77
2. Read all spec files for the phase:
88
- `plan.md` — understand the goals and approach
Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Plan the next development phase for operator-controller.
1+
Plan the next development phase for operator-controller by selecting an eligible GitHub epic.
22

33
## Steps
44

@@ -9,31 +9,46 @@ Plan the next development phase for operator-controller.
99
git checkout main && git pull upstream main
1010
```
1111

12-
3. Read `specs/roadmap.md` and find the next undefined phase (look for "TBD" or the last numbered phase and increment).
12+
3. Search for eligible epics on the upstream repository. An eligible epic has labels `epic` and `refined`, is unassigned, and has no unresolved dependencies:
13+
```
14+
gh issue list --repo operator-framework/operator-controller --label epic --label refined --assignee "" --state open --json number,title,body,labels,url --limit 20
15+
```
16+
17+
4. For each candidate epic, check its linked issues to verify dependencies are resolved. Use the GitHub API to inspect linked issues:
18+
```
19+
gh api repos/operator-framework/operator-controller/issues/{number}/timeline --jq '.[] | select(.event=="cross-referenced" or .event=="connected")'
20+
```
21+
An epic is eligible only if all blocking/dependency issues have the `done` label. Epics with no dependencies are also eligible.
22+
23+
5. Present the eligible epics to the user via AskUserQuestion, showing the issue number, title, and a brief summary. Let the user pick which epic to work on.
24+
25+
6. Assign the selected epic to the current git user:
26+
```
27+
gh issue edit {number} --repo operator-framework/operator-controller --add-assignee @me
28+
```
1329

14-
4. Create a new branch:
30+
7. Create a new branch named after the epic:
1531
```
16-
git checkout -b phase-{N}-{short-name}
32+
git checkout -b epic-{number}-{short-name}
1733
```
1834

19-
5. Use AskUserQuestion to gather details about the upcoming phase:
20-
- What is the focus area for this phase?
21-
- What are the key deliverables (3-6 items)?
22-
- Are there any dependencies or blockers?
23-
- What validation criteria define "done" for this phase?
35+
8. Use AskUserQuestion to gather implementation details about the epic:
36+
- What is the approach for this epic?
37+
- How should the work be broken into task groups?
38+
- What validation criteria define "done"?
2439

25-
6. Create the phase spec directory and files:
40+
9. Create the phase spec directory and files:
2641
```
27-
specs/YYYY-MM-DD-phase-{N}-{name}/
28-
plan.md — overview, goals, approach
42+
specs/{epic-number}-{name}/
43+
plan.md — overview, goals, approach (link back to the GitHub issue)
2944
requirements.md — detailed requirements and task groups
3045
validation.md — acceptance criteria and test plan
3146
```
3247

33-
7. Reference `specs/mission.md` for alignment with project goals and design principles. Reference `specs/tech-stack.md` for implementation constraints (build commands, test frameworks, CI requirements).
48+
10. Reference `specs/mission.md` for alignment with project goals and design principles. Reference `specs/tech-stack.md` for implementation constraints (build commands, test frameworks, CI requirements).
3449

35-
8. After writing the spec files, run a self-review:
36-
- Check internal consistency across plan, requirements, and validation
37-
- Verify alignment with mission goals and non-goals
38-
- Ensure deliverables are concrete and testable
39-
- Flag any gaps or ambiguities using AskUserQuestion
50+
11. After writing the spec files, run a self-review:
51+
- Check internal consistency across plan, requirements, and validation
52+
- Verify alignment with mission goals and non-goals
53+
- Ensure deliverables are concrete and testable
54+
- Flag any gaps or ambiguities using AskUserQuestion

.claude/commands/sdd-ship.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,9 @@ Verify, commit, and publish the current branch for operator-controller.
8080
)"
8181
```
8282

83-
6. Report the PR URL when done.
83+
6. If this branch is linked to a GitHub epic (check `specs/*/plan.md` for an issue reference), use AskUserQuestion to ask whether to add the `done` label to the epic:
84+
```
85+
gh issue edit {number} --repo operator-framework/operator-controller --add-label done
86+
```
87+
88+
7. Report the PR URL when done.

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ This project uses spec-driven development. Governing specs live in `specs/`:
357357

358358
| Command | Purpose |
359359
|---|---|
360-
| `/sdd-plan-next-phase` | Plan the next development phase: create branch and spec directory |
360+
| `/sdd-plan-next-phase` | Pick an eligible GitHub epic (`epic`+`refined`, unassigned, deps resolved), assign it, create branch and spec directory |
361361
| `/sdd-implement` | Implement a phase spec: follow task groups, run checks |
362362
| `/sdd-review` | Review branch changes for consistency with specs and conventions |
363363
| `/sdd-ship` | Verify, commit, and publish: run checks, create PR with conventions |

specs/conventions.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ Examples:
7878
- **Release branches:** `release-v{MAJOR}.{MINOR}` (e.g., `release-v1.2`)
7979
- **Feature branches:** Created from `main`, typically in contributor forks, merged via PR
8080

81+
## Issue Labels
82+
83+
| Label | Purpose |
84+
|---|---|
85+
| `epic` | Marks an issue as an epic (a significant body of work) |
86+
| `refined` | Indicates the epic has been refined and is ready for implementation |
87+
| `done` | Marks a completed epic; used to resolve dependency chains |
88+
89+
An epic is eligible for work when it has both `epic` and `refined` labels, is unassigned, and all linked blocking issues carry the `done` label.
90+
8191
## Git Remotes
8292

8393
Fork-based development workflow:

specs/roadmap.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ This document captures the historical evolution of operator-controller in phases
8484

8585
## Next Steps
8686

87-
<!-- The team will iterate on these. Add upcoming phases here as priorities become clear. -->
87+
Future work is tracked via GitHub issues on the upstream repository rather than phases in this file. The `/sdd-plan-next-phase` command discovers the next available epic automatically.
8888

89-
- **Phase 7:** _TBD - to be defined by the team_
89+
An issue is eligible for work when it has:
90+
- Labels: `epic` and `refined`
91+
- No assignee
92+
- No unresolved dependencies (all linked blocking issues have the `done` label)

0 commit comments

Comments
 (0)