ワンクリックで
rai-story-close
Merge story branch to dev and update tracking. Use after story review.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Merge story branch to dev and update tracking. Use after story review.
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-story-close |
| description | Merge story branch to dev and update tracking. Use after story review. |
| allowed-tools | ["Read","Edit","Write","Grep","Glob","Bash(rai:*)","Bash(git:*)"] |
| license | MIT |
| metadata | {"raise.work_cycle":"story","raise.frequency":"per-story","raise.fase":"8","raise.prerequisites":"story-review","raise.next":"","raise.gate":"","raise.adaptable":"true","raise.version":"3.0.0","raise.visibility":"public","raise.inputs":"- retrospective_md: file_path, required, previous_skill\n- tests_passing: boolean, required, cli\n- dev_branch: string, required, config\n","raise.outputs":"- merge_commit: string, git\n"} |
Complete a story by verifying the retrospective, merging locally to the development branch, and updating epic tracking. Remote push and merge requests happen at epic level (see /rai-epic-close).
When to use: After /rai-story-review retrospective is complete. Story is verified and tests pass.
When to skip: Story abandoned (document why, delete branch without merge, update epic as "Abandoned").
Inputs: Completed retrospective, passing test suite, story branch ready for merge.
Branch config: Read branches.development from .raise/manifest.yaml for {dev_branch}. Default: main.
RETRO="work/epics/e{N}-{name}/stories/{story_id}-retrospective.md"
[ -f "$RETRO" ] && echo "✓ Retrospective" || echo "ERROR: Run /rai-story-review first"
Run all four gates before pushing. Resolve commands from .raise/manifest.yaml or use defaults (see /rai-story-implement Step 3 for the full table):
project.test_command or language defaultproject.lint_command or language defaultproject.format_command or language default (e.g. uv run ruff format --check src/ tests/)project.type_check_command or language default (e.g. uv run pyright)| Condition | Action |
|---|---|
| Retro exists + all 4 gates green | Continue |
| Retro missing | Run /rai-story-review first — no exceptions |
| Any gate failing | Fix before push — CI will reject the same errors |
Check for structural drift: if this story added modules or changed directory structure, update module docs in governance/architecture/modules/ before closing.
git status --short
| Condition | Action |
|---|---|
| Working tree clean | Continue to merge |
| Uncommitted changes from this story | Commit them before merge — artifacts must not be orphaned |
| Unrelated changes | Stash or commit separately with chore: prefix |
NEVER merge with uncommitted story artifacts. Files created during design, plan, or implementation that aren't committed will be silently lost or orphaned on the target branch.
`git status` shows clean working tree (or only unrelated files explicitly acknowledged).Merge the story branch into {dev_branch} locally with --no-ff to preserve story history:
git checkout {dev_branch}
git merge story/s{N}.{M}/{slug} --no-ff -m "Merge branch 'story/s{N}.{M}/{slug}' into {dev_branch}
S{N}.{M}: {story-name} — {1-line summary}
Tracker: {JIRA_KEY} / E{N}"
Remote push and merge requests are handled at epic level during /rai-epic-close.
| Condition | Action |
|---|---|
| Merge succeeds | Continue to Step 4 |
| Merge conflicts | Resolve on story branch first, then retry merge |
Mark story complete in work/epics/e{N}-{name}/scope.md:
- [x] S{N}.{M} {name} ✓Delete the local story branch (already merged to {dev_branch}):
git branch -d story/s{N}.{M}/{slug}
Local story branch deleted.
If the story has a backlog ticket: rai backlog transition {story_key} done
| Condition | Action |
|---|---|
| Transition succeeds | Continue |
| Transition fails | Log warning and continue — backlog errors are non-blocking for lifecycle |
| No ticket | Skip backlog transition |
| Item | Destination |
|---|---|
| Local merge | {story_branch} merged to {dev_branch} via --no-ff |
| Epic update | work/epics/e{N}-{name}/scope.md |
| Branch cleanup | Local story branch deleted |
| Backlog update | via rai backlog transition (best-effort) |
| Remote push + MR | Deferred to /rai-epic-close |
Close is a merge-only operation. The following are explicitly forbidden:
{dev_branch} — prior story work is settledConflict resolution: When merge conflicts occur, resolve ONLY the conflicting hunks using the mechanical merge strategy (accept both sides where possible, prefer story branch for story-owned files). Do NOT use conflicts as an opportunity to audit or "correct" surrounding code.
Allowed writes during close (exhaustive list):
work/epics/e{N}-{name}/scope.md — update progress tracking onlyAnything not on this list is out of scope. If you believe something needs fixing, return it as a finding — do not act on it.
{dev_branch} via --no-ff/rai-epic-close), not per story/rai-story-review/rai-story-startwork/epics/e{N}-{name}/scope.md