بنقرة واحدة
rai-session-close
Capture session outcomes and update memory. Use to close a working session.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Capture session outcomes and update memory. Use to close a working session.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
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.
استنادا إلى تصنيف SOC المهني
| name | rai-session-close |
| description | Capture session outcomes and update memory. Use to close a working session. |
| allowed-tools | ["Read","Grep","Glob","Bash(rai:*)"] |
| license | MIT |
| metadata | {"raise.work_cycle":"session","raise.frequency":"per-session","raise.fase":"end","raise.prerequisites":"","raise.next":"","raise.gate":"","raise.adaptable":"true","raise.version":"4.1.0","raise.visibility":"public","raise.inputs":"- session_id: string, required, previous_skill\n","raise.outputs":"- session_record: file_path, file\n- patterns: list, cli\n"} |
Close a session by reflecting on outcomes and feeding structured data to the CLI for atomic persistence.
When to use: At the end of every working session.
Quick close: For short sessions, use CLI flags directly instead of a state file:
rai session close --summary "Quick fix session" --type maintenance --project .
Generate a descriptive session title (max 80 chars) that captures what was accomplished — not planned, accomplished. Include the epic/story name (not just the number) so the title is self-explanatory without looking up Jira. Use the format: SES-{ID}: {title}.
Good (descriptive, includes context):
SES-321: E355 Branch Model Evolution cerrado + backlog review y priorización E354SES-318: E347 Backlog Automation — epic completo, 7 stories, merge a devSES-316: Backlog sync + Semgrep MCP investigationBad (too terse, requires lookup):
SES-321: E355 complete + backlog reviewSES-318: E347 doneThe title will be used in the summary field of the state file AND presented to the human for /rename.
Use inference to reflect on the session and write a YAML state file.
IMPORTANT: Read .raise/rai/personal/session-output.yaml first if it exists — Claude Code requires reading a file before overwriting it. Same for dev/parking-lot.md when capturing tangents.
State file structure:
# .raise/rai/personal/session-output.yaml
session_id: "{SES-ID}"
summary: "{session_title}" # The concise title from Step 1
type: feature # feature | research | maintenance | infrastructure | ideation
outcomes:
- "Concrete deliverable 1"
patterns:
- description: "Pattern learned"
context: "tag1,tag2"
type: process
corrections:
- what: "Behavioral observation"
lesson: "Lesson learned"
coaching: # Only include fields that changed
trust_level: "established"
strengths: ["structured thinking"]
growth_edge: "async patterns"
autonomy: "high within defined scope"
relationship:
quality: "productive"
trajectory: "stable"
current_work:
release: V3.0
epic: E15
story: S15.7
phase: implement
branch: story/s15.7/session-protocol
pending:
decisions: []
blockers: []
next_actions: ["Continue with Task 7"]
narrative: |
## Decisions
- Key decisions and WHY
## Research
- Conclusions with file paths
## Artifacts
- Files created/modified
## Branch State
- Branch and commits ahead of base
next_session_prompt: |
Forward-looking guidance to future Rai. What to prioritize,
what to watch for, what context will be critical.
Capture tangents: Check conversation for ideas → add to dev/parking-lot.md.
Before closing, ensure no uncommitted changes are left behind:
git statusgit restore the files (confirm first)rai session close --state-file .raise/rai/personal/session-output.yaml --session {SES-ID} --project .
This atomically: records session in index, appends patterns, updates coaching, writes session state, clears active session.
Present the closing card:
## Session Closed: SES-{ID} {session_title}
**Type:** {type}
**Outcomes:**
- {outcome 1}
- {outcome 2}
**Patterns:** {N new} | **Working tree:** {clean | N files uncommitted}
### Next Session
**Continue:** [next step]
**Open:** [unresolved questions, if any]
| File | Update | Writer |
|---|---|---|
.raise/rai/personal/sessions/index.jsonl | Session record | CLI |
.raise/rai/memory/patterns.jsonl | New patterns | CLI |
~/.rai/developer.yaml | Coaching + clear session | CLI |
.raise/rai/session-state.yaml | Working state | CLI |
dev/parking-lot.md | Tangents | Skill (Edit) |
/rai-session-start.raise/rai/session-state.yamldev/parking-lot.md