con un clic
mission-end
Properly close a mission with cleanup and documentation
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Properly close a mission with cleanup and documentation
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Initialize a new mission with role selection and persona naming
Claim tasks in the s9 database to take ownership and start work
Close tasks when complete or aborted using OpenCode tools
Create new tasks in the s9 task database with proper formatting and validation
Query, list, and report on tasks in the s9 database
Update task progress, notes, and time tracking using OpenCode tools
| name | mission-end |
| description | Properly close a mission with cleanup and documentation |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"all-agents","workflow":"mission-closure"} |
STOP! Read this carefully before executing this skill:
You should ONLY execute this skill if:
/dismiss command, ORDO NOT execute this skill if:
If you're unsure, ASK:
Director, are you dismissing me? Should I end my mission and close this session?
Why this matters:
s9 doctorIf you proceed incorrectly, the Director will be frustrated with you.
Assuming you have been properly dismissed, proceed with the following steps:
I help you properly end a mission on the s9 project by:
mission_end tool to close the mission in the databasemission_rename_dismissed tool to mark the session as dismissedIMPORTANT: Check if a dismissal message was provided with the /dismiss command.
If the Director provided a message (e.g., /dismiss great work today! thank you), capture it and include it in:
Format for mission file:
### HH:MM - Mission End
**Dismissal message:** "[message from Director]"
- Updated mission file
- Committed changes
- Closed task(s): TASK_ID
Format for goodbye: Display the Director's message prominently before the standard farewell:
💬 **From the Director:**
> [message]
Thank you for working with me! I'm <Persona>, signing off.
If no dismissal message was provided, skip this and proceed normally.
Find your mission file in .opencode/work/missions/:
ls -lt .opencode/work/missions/*.md | head -5
Your mission file should be the most recent one with your role and persona in the filename.
Format: .opencode/work/missions/YYYY-mm-dd.HH:MM:SS.role.persona.codename.md
If you're not sure which file is yours, check the YAML frontmatter for your persona:
grep -l "persona: your-persona" .opencode/work/missions/*.md | tail -1
Gather information about what was accomplished:
Check git status:
git status
Review commits:
git log --oneline -10
Check claimed tasks:
s9 task mine --mission-id "<your-mission-id>"
Optional: Use s9 mission summary <mission-id> to auto-generate a summary of files, commits, and tasks.
Read your mission file and update these sections:
1. Duration:
**Duration:** <start> - <end> (~X hours)
2. Files Changed:
## Files Changed
- `src/file.py` - Brief description
- `tests/test_file.py` - Brief description
3. Outcomes:
## Outcomes
- ✅ Completed successfully
- ⚠️ Partial completion
- ❌ Not completed (deferred)
4. Work Log (add final entry):
### HH:MM - Mission End
- Updated mission file
- Committed changes
- Closed task(s): TASK_ID
5. Next Steps:
## Next Steps
[What remains, or "None - work is complete"]
Note: The s9 mission end command will update frontmatter automatically in Step 8.
Close any tasks you claimed:
# Check for open tasks
s9 task mine --mission-id "<your-mission-id>" | grep UNDERWAY
# Close completed task
s9 task close TASK_ID --status COMPLETE --notes "Brief summary"
Status options: COMPLETE, PAUSED, BLOCKED
Verify task artifacts are updated:
cat .opencode/data/tasks/TASK_ID.md
Update if needed with implementation details, files changed, testing performed.
Ensure everything is committed:
git status
Commit mission file if needed:
git add .opencode/work/missions/<your-mission-file>.md
git commit -m "docs(mission): complete <persona> <role> mission <codename> [Persona: <Persona> - <Role>]"
⚠️ IMPORTANT: Remove any temporary files you created during this mission.
Check for temporary scripts:
ls .opencode/work/scripts/
Remove scripts you created:
# Delete scripts for tasks you completed
rm .opencode/work/scripts/TASK-ID-*.{py,sh,sql}
# Example:
rm .opencode/work/scripts/DOC-H-0122-*.py
Remove temporary planning documents (if any):
# Check planning directory
ls .opencode/work/planning/
# Remove your temporary planning docs
rm .opencode/work/planning/my-planning-doc.md # If you created any
What to keep:
What to remove:
.opencode/work/scripts/ for tasks you completedVerify project root is clean:
git status
If you see any uncommitted files in the project root that you created (e.g., temp.py, notes.md), either:
.opencode/work/See: .opencode/docs/guides/file-organization.md for cleanup guidelines.
THIS IS THE MOST CRITICAL STEP - If you skip this, your mission will remain in the database as an IDLE "zombie" mission forever.
Close your mission officially in the database by invoking the mission_end tool:
Invoke the mission_end tool
The tool automatically:
end_time in the missions tableENDEDIF YOU DO NOT INVOKE THIS TOOL:
s9 dashboards9 doctor will flag it as stale after 8 hours with no heartbeatThe tool will return confirmation that the mission was ended successfully. If it fails, try invoking it again.
Update the OpenCode session title to show the mission has ended by invoking the mission_rename_dismissed tool:
Invoke the mission_rename_dismissed tool
The tool automatically:
[DISMISSED] suffixAfter successful invocation:
✅ Session renamed to indicate dismissal - you can easily identify completed missions in your session list!
Example result: "Operation gamma-apex: Izanagi - Architect [DISMISSED]"
This provides clear visual feedback that the mission has ended and the mission-end protocol was followed.
Run sanity check if appropriate:
make qa
If QA fails, fix issues or document in "Next Steps".
Provide a comprehensive final summary with these specific details:
✅ **Mission Complete!**
**Summary:**
- **Duration:** ~X hours (start_time - end_time)
- **Files changed:** N files (briefly note what: renamed, updated, new, deleted)
- **Task completed:** TASK-ID - Brief title
- **Commits:** N commit(s) with short hash(es)
**What was accomplished:**
- [Detailed bullet points explaining what was done]
- [Include specifics: what changed, what was added, what was removed]
- [Note any testing or verification performed]
**Next steps:**
- [Specific remaining work OR "None - work complete!"]
Mission file: .opencode/work/missions/<filename>.md [OR "Not created (ephemeral work)"]
If a dismissal message was provided, display it prominently:
💬 **From the Director:**
> [dismissal message]
Thank you for working with me! I'm **<Persona>**, [brief persona description], signing off.
*[Add mythologically appropriate farewell - 1-2 sentences that evoke your character]*
[emoji] [DISMISSED]
If no dismissal message, use this format:
Thank you for working with me! I'm **<Persona>**, [brief persona description], signing off.
*[Add mythologically appropriate farewell - 1-2 sentences that evoke your character]*
[emoji] [DISMISSED]
Tips for a great farewell:
Example farewells by tradition:
Research your persona's mythology for inspiration! Make it memorable.
.opencode/work/scripts/ and .opencode/work/planning/.opencode/docs/guides/file-organization.md for file cleanup guidelines