Skip to content

Commit 605f23e

Browse files
committed
Needs to arhive
1 parent 126fbba commit 605f23e

1 file changed

Lines changed: 43 additions & 19 deletions

File tree

.claude/skills/feature-dev/SKILL.md

Lines changed: 43 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -165,20 +165,24 @@ Check for existing work that overlaps with this feature:
165165

166166
---
167167

168-
## Phase 3: Create Branch & Worktree
168+
## Phase 3: Archive, Create Branch & Worktree
169169

170-
1. _DETERMINE_ naming:
170+
1. _ARCHIVE_ previous Ralph run before any new work begins:
171+
- _SPAWN_ a subagent to run: `make -C $ORCHESTRA_PROJECT_ROOT archive`
172+
- This archives `.ralph/prd.json` and `.ralph/progress.txt` from any previous feature
173+
- **Must complete before the first push** to avoid polluting the new branch with stale artifacts
174+
2. _DETERMINE_ naming:
171175
- Branch: `feat/<issue#>-<feature-name>`
172176
- Worktree path: `$ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#>`
173-
2. _FETCH_ latest development:
177+
3. _FETCH_ latest development:
174178
- RUN `git fetch origin development`
175-
3. _CREATE_ worktree:
179+
4. _CREATE_ worktree:
176180
- RUN `git worktree add $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#> -b feat/<issue#>-<feature-name> origin/development`
177-
4. _INITIALIZE_ worktree:
181+
5. _INITIALIZE_ worktree:
178182
- RUN `cd $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#> && bash $ORCHESTRA_PROJECT_ROOT/backend/scripts/changelog.sh`
179183
- RUN `cd $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#> && git add Changelog.md && git commit -s -m "init feat/<issue#>-<feature-name>"`
180184
- RUN `cd $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#> && git push -u origin feat/<issue#>-<feature-name>`
181-
5. _UPDATE_ the GitHub issue with implementation metadata:
185+
6. _UPDATE_ the GitHub issue with implementation metadata:
182186
- RUN:
183187
```bash
184188
gh issue comment <issue#> --body "$(cat <<'EOF'
@@ -190,7 +194,26 @@ Check for existing work that overlaps with this feature:
190194
EOF
191195
)"
192196
```
193-
6. _REPORT_ "Worktree created at $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#> on branch feat/<issue#>-<feature-name>"
197+
7. _CREATE_ draft PR so all subsequent pushes are visible:
198+
- RUN:
199+
```bash
200+
cd $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#> && gh pr create \
201+
--draft \
202+
--base development \
203+
--title "FROM feat/<issue#>-<feature-name> TO development" \
204+
--body "$(cat <<'EOF'
205+
## Summary
206+
Resolves #<issue#>
207+
208+
## Status
209+
Pipeline in progress &mdash; this PR will be marked ready for review when Ralph completes.
210+
211+
Generated by `/feature-dev` skill.
212+
EOF
213+
)"
214+
```
215+
- _CAPTURE_ the PR URL from output
216+
8. _REPORT_ "Previous run archived. Worktree created at $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#> on branch feat/<issue#>-<feature-name>. Draft PR opened."
194217
195218
---
196219
@@ -269,39 +292,40 @@ This phase produces two artifacts in sequence: the PRD markdown file (via `/prd`
269292
270293
Feed `tasks/prd-<feature-name>.md` from Step 1 directly into the `/ralph` skill.
271294
272-
1. _INVOKE_ `/ralph-archive` first to archive any existing prd.json from a different feature
273-
2. _INVOKE_ the `/ralph` skill with the PRD file as input:
295+
1. _INVOKE_ the `/ralph` skill with the PRD file as input (archiving already handled in Phase 4):
274296
```
275297
Load the ralph skill and convert tasks/prd-<feature-name>.md to .ralph/prd.json
276298
277299
CRITICAL: Set branchName to "feat/<issue#>-<feature-name>" (must match the worktree branch exactly). Do NOT use the "ralph/" prefix.
278300
```
279-
3. _VERIFY_ `.ralph/prd.json` exists and contains valid JSON
280-
4. _VALIDATE_ branchName matches `feat/<issue#>-<feature-name>`:
301+
2. _VERIFY_ `.ralph/prd.json` exists and contains valid JSON
302+
3. _VALIDATE_ branchName matches `feat/<issue#>-<feature-name>`:
281303
- RUN `jq -r '.branchName' .ralph/prd.json`
282304
- _IF_ mismatch: manually fix branchName in prd.json
283-
5. _VALIDATE_ final story includes git status check:
305+
4. _VALIDATE_ final story includes git status check:
284306
- _READ_ the last user story in prd.json
285307
- _ENSURE_ its acceptance criteria include: "Verify if there are any remaining changes by running git status. If remaining changes exist, commit and push to branch."
286308
- _IF_ missing: add this criterion to the last story
287-
6. _COMMIT_ Ralph artifacts:
309+
5. _COMMIT_ Ralph artifacts:
288310
- RUN `cd $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#> && git add .ralph/prd.json .ralph/progress.txt`
289311
- RUN `cd $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#> && git commit -s -m "chore: add Ralph config for #<issue#>"`
290312
- RUN `cd $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#> && git push`
291313
7. _REPORT_ "PRD generated and Ralph config committed with <N> user stories"
292314
293315
---
294316
295-
## Phase 6: Verify Remote & Create PR
317+
## Phase 6: Final Push & Mark PR Ready
296318
297-
All artifacts have been committed and pushed incrementally in previous phases. This phase ensures everything is synced.
319+
All artifacts have been committed and pushed incrementally in previous phases. This phase catches any stragglers and marks the draft PR as ready for review.
298320
299321
1. _VERIFY_ remote is up to date:
300322
- RUN `cd $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#> && git status`
301323
- _IF_ uncommitted changes remain: stage, commit, and push them
302-
2. _ENSURE_ branch is tracking remote:
303-
- RUN `cd $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#> && git push -u origin feat/<issue#>-<feature-name>`
304-
3. _REPORT_ "All artifacts pushed to feat/<issue#>-<feature-name>"
324+
2. _PUSH_ any final changes:
325+
- RUN `cd $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#> && git push`
326+
3. _MARK_ PR ready for review:
327+
- RUN `cd $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#> && gh pr ready`
328+
4. _REPORT_ "All artifacts pushed. PR marked ready for review."
305329
306330
---
307331
@@ -329,6 +353,7 @@ All artifacts have been committed and pushed incrementally in previous phases. T
329353
**Issue**: #<issue#> - feat: <feature-name>
330354
**Branch**: feat/<issue#>-<feature-name>
331355
**Worktree**: $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#>
356+
**PR**: <PR URL> (draft &rarr; ready for review)
332357
**PRD**: tasks/prd-<feature-name>.md
333358
**Ralph config**: .ralph/prd.json (<N> user stories)
334359
**Tmux session**: feat-<issue#>
@@ -341,7 +366,6 @@ All artifacts have been committed and pushed incrementally in previous phases. T
341366
### Next Steps
342367
- Monitor: `tmux attach -t feat-<issue#>`
343368
- Progress: `cat $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#>/.ralph/progress.txt`
344-
- When complete: `cd $ORCHESTRA_PROJECT_ROOT/.worktrees/feat-<issue#> && gh pr create --base development --title "FROM feat/<issue#>-<feature-name> TO development"`
345369
```
346370
347371
---

0 commit comments

Comments
 (0)