description: End session - update context and commit changes allowed-tools: Bash(git:), Bash(rm:), Bash(mv:), Bash(mkdir:), Read, Write, Glob, AskUserQuestion
Run git rev-parse --show-toplevel to locate the repository root.
Review what was accomplished this session by examining:
Update <git-root>/.bonfire/index.md:
Update the session entry with:
Update "Next Session Priorities" based on remaining work
Update "Current State" to reflect new status
Check if <git-root>/.bonfire/scripts/ exists and contains any files.
If scripts exist, use AskUserQuestion to ask what to do with each script:
"What should happen to these session scripts?" (Header: "Scripts", multiSelect: false)
For each script found, present options:
.bonfire/scripts/ for next session<git-root>/scripts/ (create if needed)Execute the user's choices:
mkdir -p <git-root>/scripts/ && mv <script> <git-root>/scripts/rm <script>If no scripts exist, skip this step.
Read <git-root>/.bonfire/config.json to check gitStrategy.
If gitStrategy is "ignore-all": Skip committing - nothing is tracked. Tell the user session context was updated locally.
If gitStrategy is "hybrid" or "commit-all":
git status .bonfire/ to see what files are not ignoredgit add -f - if a file is gitignored, respect thatStage only unignored files:
git add .bonfire/
Check if anything was staged: Run git diff --cached --quiet .bonfire/
If changes staged, commit:
git commit -m "docs: update session context"
If the commit fails due to hooks, help resolve the issue (but never bypass hooks with --no-verify).
Summarize:
Let the user know they can run /bonfire:archive when this work is merged and complete.