一键导入
rai-epic-close
Close epic with retrospective, push, and merge request. Use after all stories done.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Close epic with retrospective, push, and merge request. Use after all stories done.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Interactive adapter setup for Jira and Confluence. Detects available backends, discovers projects/spaces, generates validated YAML config. 3-4 questions max.
Evaluate design proportionality using Beck's four rules. Use after implementation.
Root cause analysis using the method best suited to the bug. Phase 3 of bugfix pipeline.
Push branch, create MR, verify artifacts complete. Phase 7 of bugfix pipeline.
Execute fix tasks with TDD and all validation gates. Phase 5 of bugfix pipeline.
Decompose fix into atomic TDD tasks. Phase 4 of bugfix pipeline.
| name | rai-epic-close |
| description | Close epic with retrospective, push, and merge request. Use after all stories done. |
| allowed-tools | ["Read","Edit","Write","Grep","Glob","Bash(rai:*)","Bash(git:*)"] |
| license | MIT |
| metadata | {"raise.work_cycle":"epic","raise.frequency":"per-epic","raise.fase":"9","raise.prerequisites":"all stories complete","raise.next":"","raise.gate":"","raise.adaptable":"true","raise.version":"3.2.0","raise.visibility":"public","raise.inputs":"- scope: file_path, required, previous_skill\n- all_retrospectives: boolean, required, git\n- dev_branch: string, required, config\n","raise.outputs":"- retrospective: file_path, file\n- tag: string, git\n","raise.aspects":"introspection","raise.introspection":{"phase":"epic.close","context_source":"all epic artifacts","affected_modules":[],"max_tier1_queries":2,"max_jit_queries":3,"tier1_queries":["retrospective patterns for {domain} epics","process improvement patterns from similar epics"]}} |
Complete an epic by conducting a retrospective, tagging the milestone, and updating tracking. No branch merge needed — stories already merged to the development branch during story-close.
When to use: All stories complete and merged to {dev_branch}. Ready to close the epic lifecycle.
When to skip: Epic abandoned (document why, update backlog as "Abandoned").
Inputs: Epic scope document, all story retrospectives, passing test suite.
Branch config: Read branches.development from .raise/manifest.yaml for {dev_branch}. Default: main.
Before starting Step 1, you MUST execute the PRIME protocol:
rai graph query. If graph is unavailable, note and continue.Check all stories are done in the epic scope document:
grep -E "^\s*-\s*\[ \]" "work/epics/e{N}-{name}/scope.md"
| Condition | Action |
|---|---|
| All stories checked | Continue |
| Incomplete stories | Complete them first or explicitly descope |
All stories marked complete in epic scope.JIT: Before descoping decisions, query graph for completion patterns and prior descoping outcomes →
aspects/introspection.md § JIT Protocol
Determine which test command to run using this priority chain:
.raise/manifest.yaml for project.test_command — if set, use it directly (configuration over convention)project.project_type in manifest, or scan file extensions of changed files (git diff --name-only)| Language | Extensions | Default Test Command |
|---|---|---|
| Python | .py, .pyi | uv run pytest --tb=short |
| TypeScript | .ts, .tsx | npx vitest run or npm test |
| JavaScript | .js, .jsx | npx vitest run or npm test |
| C# | .cs | dotnet test --verbosity quiet |
| Go | .go | go test ./... |
| PHP | .php | vendor/bin/phpunit |
| Dart | .dart | flutter test |
| Unknown | — | Ask developer |
The table is a fallback — project.test_command always wins when present.
JIT: Before writing retrospective, query graph for process improvement patterns from similar epics →
aspects/introspection.md § JIT Protocol
Create retrospective at work/epics/e{N}-{name}/retrospective.md using templates/retrospective.md. Fill from story retrospectives and git history.
Tag the current {dev_branch} HEAD to mark epic completion:
git tag -a "epic/e{N}-complete" -m "Epic E{N}: {Epic Name} complete
Delivered: [key deliverables]
Stories: N stories
Co-Authored-By: Rai <rai@humansys.ai>"
Commit retrospective and any final artifacts:
git add -A
git commit -m "epic(e{N}): close with retrospective
Co-Authored-By: Rai <rai@humansys.ai>"
Tag created. Retrospective committed.
Push {dev_branch} to origin and create a merge request. This is the single MR for the entire epic — all stories were merged locally during /rai-story-close.
# Push dev with all epic commits
git push origin {dev_branch}
# Create merge request via glab (dev → main for releases, or just push dev)
glab mr create \
--source-branch {dev_branch} \
--target-branch {main_branch} \
--title "epic(e{N}): {Epic Name}" \
--description "## Epic E{N}: {Epic Name}
### Stories delivered
- S{N}.1: {name}
- S{N}.2: {name}
- ...
### Key changes
- {summary of deliverables}
### Retrospective
- {top learnings}
Co-Authored-By: Rai <rai@humansys.ai>" \
--no-editor
Present the MR URL to the developer for review.
| Condition | Action |
|---|---|
| MR to main needed | Create MR as above |
| No release planned | Push dev only, skip MR to main |
glab not available | Provide the GitLab URL from git push output for manual MR creation |
| Push rejected | git pull --rebase origin {dev_branch}, resolve conflicts, push again |
rai backlog transition {JIRA_KEY} "Done" -a jirarai backlog search "summary ~ '{epic name}'" -a jira to find it, then transition
Backlog reflects completion.
| Item | Destination |
|---|---|
| Retrospective | work/epics/e{N}-{name}/retrospective.md |
| Tag | epic/e{N}-complete on {dev_branch} |
| Push | {dev_branch} pushed to origin |
| Merge request | GitLab MR: {dev_branch} → {main_branch} (if release) |
| Backlog update | Tracker via rai backlog CLI |
{dev_branch}rai backlog transition CLItemplates/retrospective.md/rai-story-close completionsrai backlog CLI/rai-epic-design for next epic