| name | next-ai-prompt |
| description | Triggers when a skill needs to leave a structured handoff prompt for the next AI session. Called by /night-run finisher, or invoked manually. Writes .for_bepy/NEXT_AI_PROMPT.md with caller attribution. Never auto-triggers on its own. |
| argument-hint | --caller <name> [--mode night-run|close|manual] |
/next-ai-prompt
Write a structured morning handoff prompt for the next AI session. Single canonical template - all callers use this, never copy-paste their own version.
When to call this
/night-run finisher tick (all tasks [x] or [!])
/close end-of-session persist phase (when session had meaningful work)
- Any future skill that wants to leave a handoff
Arguments
--caller <name>: required. Who is calling (e.g. night-run tick 3, /close, manual). Stamped in the file header.
--mode night-run|close|manual: optional. Controls which sections are included. Defaults to manual if not passed.
Step 1 - Gather context
Mode: night-run
git rev-parse --abbrev-ref HEAD → branch
git log --oneline → find first and last night-run tick commit SHAs
- Read
docs/night_run/INDEX.md → failed plans ([!] lines), all slugs
git diff --name-only <first-sha>..HEAD → files changed (filter out INDEX/log/.for_bepy)
- Compose: context summary, verify checklist (concrete sanity-check commands from plan deliverables), open decisions, failed plans
Mode: close
git rev-parse --abbrev-ref HEAD → branch
git log --oneline -10 → recent commits this session
git diff --name-only or unpushed commits → files changed
- Pull open decisions + suggested next steps from Phase 1 retrospective (already in context)
- No "Failed plans" section - omit it
Mode: manual
- Gather whatever context is available. Fill what you can, write
N/A for sections you can't populate.
Step 2 - Write the file
Path: .for_bepy/NEXT_AI_PROMPT.md (relative to repo root). OVERWRITE if file already exists.
Use this fixed template. Fill every section. Keep prose terse, caveman-acceptable. Do not add or remove sections.
# Tomorrow's AI Prompt
Generated by: <--caller value>
Generated: <YYYY-MM-DD HH:MM UTC>
Branch: <branch>
<If mode=night-run: First commit: <short SHA> | Last commit: <short SHA>>
## Context
<2-4 sentences. What was accomplished. What shipped, what didn't.>
## Verify checklist
- [ ] `git pull`
- [ ] <first concrete sanity-check - e.g. "run dev server, open X, verify Y">
- [ ] <second action>
- [ ] <add up to 6 total, skip if nothing concrete to verify>
## Open decisions
<bulleted list of decisions Joe needs to make. If none, write "None.">
## Files changed
<bulleted list. Group by feature/slug if night-run, flat list otherwise. Omit INDEX/log/.for_bepy files.>
<If mode=night-run only:>
## Failed plans
<for each [!] task: slug, side branch name, one-line BLOCKER cause. If none: "Nothing failed.">
</end night-run only>
## Suggested next steps
<2-4 bullets. Concrete things to work on next session.>
<If mode=night-run and AI_MESSAGES exist: >
## Tick notes
<paste full contents of .for_bepy/AI_MESSAGES_TO_TOMORROWS_AI.md here verbatim. If file doesn't exist, omit this section entirely.>
</end night-run only>
Step 3 - Do NOT commit
The caller is responsible for staging and committing the file. Return after writing.
Night-run step 10 commits it. /close Phase 5 commits it. Do not double-commit.
Notes
- If
.for_bepy/ doesn't exist, create it.
- If repo root is unclear, use
git rev-parse --show-toplevel.
/pickup reads and deletes this file (NEXT_AI_PROMPT.md). Do not write sensitive data.
- The "Tick notes" section is only relevant for night-run mode. In close/manual mode, omit it and the AI_MESSAGES check entirely.