一键导入
session-summary
Generate session recap in .ai-sessions/ and capture lessons learned
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate session recap in .ai-sessions/ and capture lessons learned
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Load saved review feedback from /bpe:review and apply changes to the reviewed artifact
Iterative Q&A to develop a thorough project specification (spec.md)
Generate a commit message explaining what was changed and write it to commit-msg.md
Implement the next unchecked step from plan.md by executing its sub-steps as written (RED-GREEN-REFACTOR for Feature steps; Scope/Tooling/Do/Verify/Document for Task steps)
Fetch a GitHub issue and route to brainstorm or plan based on detail level
Autonomous-mode BPE run via /goal. Modes — full (default) | section <name> | step. Pre-flights branch safety (refuses on main), resolves the project verification command (test-runner autodetect, spec.md fallback, or ask), builds a verifiable completion condition, and writes the assembled /goal block (condition + validator-aware orchestrator playbook + per-commit verification) to goal.md at the repo root for you to paste. Requires Claude Code v2.1.139+; put your session in auto mode before pasting for unattended execution.
| name | session-summary |
| description | Generate session recap in .ai-sessions/ and capture lessons learned |
| model | sonnet |
| disable-model-invocation | true |
Create a complete session summary and capture lessons learned. This command performs two actions:
.ai-sessions/.ai-sessions/lessons.mdRead the canonical format reference at ${CLAUDE_PLUGIN_ROOT}/references/session-management.md. Treat that file as the single source of truth for templates, naming conventions, and lesson capture guidance — do not restate or reinterpret its rules in this command.
If .ai-sessions/ does not exist, create it:
mkdir -p .ai-sessions
Generate the timestamp using this exact command:
date +%Y%m%d-%H%M
Create .ai-sessions/session-{timestamp}-{slug}.md per the naming convention and section template in the format reference ("Session Summary Template" section).
Populate every required section. Pull content from this conversation:
/goal ran in this session — see "Goal Context Populating Rule" in the reference; omit the section entirely otherwise)/bpe:execute-plan should invoke at its hardened skill-loading step — see "Suggested Skills Populating Rule" in the reference)If .ai-sessions/implementation-notes.md exists and contains a ## Step <N> section for the step this summary covers, extract its bullets and add a ## Deviations from Plan section to the session summary with them.
Then remove that ## Step N section from implementation-notes.md: keep the file if other sections remain, else delete the file.
The entry format (- Plan said: <what> / - Deviated: <what actually happened> / - Impact: <consequence> under a ## Step N heading) is defined in the format reference ("implementation-notes.md Format" section).
If the session has no clear single focus, use mixed-work as the slug.
Update .ai-sessions/lessons.md per the rules in the format reference ("Capturing Lessons" and "Lessons.md Template" sections). In short:
lessons.md does not exist, initialize it from the template in the reference.## Recent section with a (YYYY-MM-DD) date suffix; cap Recent at 10 entries (move overflow into category-only).Check .ai-sessions/handoffs/ for any .md files (per the "Handoff files" section of the format reference). For each one present, ask the user whether it can be removed now that this session is wrapping up. Default to keep on uncertainty; delete only on explicit confirmation. This prevents stale handoffs from being accidentally committed alongside the session summary.
Skip this step entirely when this procedure runs inline inside a bpe:step-executor dispatch (mode=finalize): there is no user to ask, and todo.md still has unchecked items mid-run. The prompt belongs to the interactive parent session after the loop ends.
Otherwise, detect whether this session was driven by /goal per the "Goal Context Populating Rule" in the format reference. Offer the archive prompt only when all of these hold:
/goal-driven and the loop has ended (goal condition met, or the user stopped iterating; do not prompt mid-loop while top-level todo items remain unchecked and the loop is still running).todo.md exists at the repo root.todo.md has a non-zero count of checked top-level items.If all hold, ask: "Archive plan.md and todo.md to .ai-sessions/<slug>/?"
${CLAUDE_PLUGIN_ROOT}/skills/plan/SKILL.md inline, including its slug confirmation, but stop after writing accomplishment.md. Do not run the routine's final step (generating a fresh plan); that belongs to /bpe:plan.plan.md and todo.md at the repo root, and note that the next /bpe:plan invocation will refuse until they are archived (or discarded with --regen).If any condition fails, skip silently.
After completing both files, display:
.ai-sessions/<slug>/, or declined)Ask the user if they want to adjust anything before the session ends.