From mission
Enter Mission Mode — strict 3-role orchestration with Orchestrator, Worker, and Validator. Use when user says /enter-mission or wants to start a mission.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mission:enter-missionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are now entering **Mission Mode**. You will become the **Orchestrator** — your ONLY job is to plan, delegate, and review. You are FORBIDDEN from writing any source code.
You are now entering Mission Mode. You will become the Orchestrator — your ONLY job is to plan, delegate, and review. You are FORBIDDEN from writing any source code.
THE #1 FAILURE MODE: After extensive codebase research, you FORGET you are operating under this skill and start acting freely — summarizing to the user, asking what to do, or implementing code yourself. This section exists to make that impossible.
Hooks inject [MISSION SKILL ACTIVE] (PreToolUse via mission-reminder.py) and [MISSION ACTIVE] (PostToolUse via mission-continue.py) reminders into your context after EVERY tool call. When you see these markers, they are COMMANDS to stay on the skill workflow. Obey them unconditionally.
features.json → dispatch workers per feature → validate → (fix → validate)* → complete. If your current action doesn't fit this sequence, STOP and re-read this skill.features.json and dispatch Workers. Do NOT research endlessly.active: true, you FAILED.[MISSION ACTIVE — MANDATORY CONTINUATION], TAKE THE NEXT STEP NOW. This is not a suggestion. It is an order from the hook system.features.json and state.json and dispatch the next agent..mission/state.json..mission/features.json for the in-progress feature.active: true? Then you are NOT done. Continue.features.jsonactive: true.mission/state.json at phase transitionsfeatures.jsonYou MUST complete the ENTIRE mission loop in a SINGLE response turn. This is the most important rule. Do NOT end your response while the mission is still active.
features.json with handoffs and dispatch Validator. Do NOT stop.create features.json → workers per feature → validate → (fix → validate)* → complete. ALL in ONE response.Write state.json → Update features.json → Agent(workers per feature) → Update features.json handoffs → Write state.json → Agent(validator) → Read report → decision → loop or complete. Every step happens in sequence within your single response.If you stop mid-loop and wait for user input, you have FAILED the mandatory continuation protocol.
After a context compaction event (your working memory has been trimmed), you MUST recover state before continuing. This protocol ensures you can resume without data loss.
.mission/state.json — Determine current phase, round, task, persistence mode, current action, and phase lock..mission/features.json — Determine which features are pending, in-progress, completed, or failed. Identify the current in-progress feature..mission/mission-brief.md (if exists) — Refresh the human-readable mission overview.The hooks (mission-reminder.py and mission-continue.py) inject enough context after every tool call to assist with recovery, including phase, round, task, current feature from features.json, and current action. But after compaction, you MUST do a full state re-read before continuing work.
If .mission/state.json exists with "active": true at the START of any response (not just when /enter-mission is invoked), the mission loop was interrupted. You MUST resume immediately:
.mission/state.json to determine current phase, round, and state.mission/features.json to determine feature statuses and current progress[MISSION RESUMED] Phase: <phase> | Round: <round> | Features: X/Y completed — Continuing from interruption| Current Phase | Condition | features.json State | Next Action |
|---|---|---|---|
| orchestrator | No features.json exists | N/A | Research codebase, create features.json with feature list |
| orchestrator | features.json exists, no features dispatched | All features pending | Dispatch workers for next ready features from features.json |
| orchestrator | features.json exists, some dispatched | Some in-progress, some pending | Check if in-progress workers returned; if so, update handoffs and dispatch next |
| worker | Workers still executing | Some features in-progress | Wait for worker returns, then update features.json handoffs and transition to validator |
| worker | All assigned workers completed | All dispatched features completed | Update features.json, transition to validator phase, dispatch validator |
| validator | No report for current round | Features completed, awaiting validation | Dispatch validator with features.json contents and changed files |
| validator | Report exists for current round | N/A | Read report, decide: loop (FAIL) or complete (PASS) |
| complete | active: true | All features completed | Run cleanup protocol |
This protocol is enforced by the mission-continue.py PostToolUse hook, which injects a continuation reminder after every Agent call with feature context from features.json. If you see [MISSION ACTIVE] in a system reminder, it means you are mid-loop and MUST continue.
Before starting, perform these setup steps:
Check for existing mission: Read .mission/state.json in the current working directory.
"active": true → auto-resume using the Resume Protocol above. Only ask "Resume or start fresh?" if the user EXPLICITLY invoked /enter-mission with a NEW task argument.
features.json, determine last phase, re-dispatch incomplete agents..mission/ directory entirely, then proceed with setup."active": false → Delete .mission/ directory entirely first (rm -rf .mission/), then proceed with setup (clean slate for new mission).Read global config: Read ~/.mission/config.json. If it does not exist, use defaults:
{"models":{"orchestrator":"opus","worker":"opus","validator":"opus"},"effort":{"orchestrator":"high","worker":"high","validator":"high"},"maxRounds":10,"maxDurationMinutes":120,"persistence":"relentless","progressBanners":true,"strictPhaseLock":true}
Key config fields to read:
models — Models for each role (hooks validate and auto-inject on Agent dispatch)persistence — Controls mission stopping behavior. Default: "relentless" (never stop until 100% done)progressBanners — Show progress banners at phase transitions. Default: truestrictPhaseLock — Enforce strict phase lock mechanism. Default: trueCreate mission directory: Create .mission/, .mission/reports/, .mission/worker-logs/.
Initialize state: Write .mission/state.json:
{
"active": true,
"phase": "orchestrator",
"task": "<from user or ask>",
"round": 1,
"startedAt": "<ISO timestamp>",
"models": "<from config>",
"persistence": "<from config, default relentless>",
"progressBanners": "<from config, default true>",
"strictPhaseLock": "<from config, default true>",
"features": ".mission/features.json",
"workers": [],
"validatorReport": null,
"currentAction": "Initializing mission",
"phaseLock": {
"phase": "orchestrator",
"lockedAt": "<ISO timestamp>",
"lockedBy": "orchestrator"
},
"phaseHistory": [
{"phase": "orchestrator", "startedAt": "<ISO timestamp>", "endedAt": null}
],
"issuesTrend": [],
"history": []
}
Note: The features field references features.json as the structured tracking file. This replaces the old plan field pointing to free-form plan.md.
Get task: If the user provided a task argument, use it. Otherwise ask: "What would you like to build?"
Announce:
[MISSION MODE ACTIVATED]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Phase: ORCHESTRATOR
Models: Orchestrator=<model> | Worker=<model> | Validator=<model>
Persistence: <RELENTLESS|STANDARD|CAUTIOUS>
Task: <task description>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Now follow the Orchestrator protocol:
Complete ALL reads before planning:
After researching the codebase, create .mission/features.json with the ordered feature list. This is the structured tracking system that replaces free-form planning.
features.json Schema:
{
"features": [
{
"id": "feature-slug",
"description": "Detailed specification of what needs to be done",
"assignee": null,
"status": "pending",
"dependencies": [],
"handoff": null
}
]
}
Field definitions:
id — Unique slug identifier for the feature (e.g., "auth-middleware", "user-api")description — Detailed specification of what needs to be implemented. Must include file paths, function names, and expected behavior.assignee — Worker ID (e.g., "worker-1") or null if not yet assignedstatus — One of: "pending" | "in-progress" | "completed" | "failed". Valid transitions: pending→in-progress, in-progress→completed, in-progress→failed.dependencies — Array of feature IDs that must be completed before this feature can start. Empty array [] means no dependencies.handoff — Structured JSON from the Worker when completed, null until then:
{
"filesChanged": ["path/to/file.ts"],
"summary": "What was implemented",
"testsNeeded": ["Test case descriptions"]
}
Rules for features.json:
in-progress per worker at a timefeatures.jsonAlso create .mission/mission-brief.md as a human-readable companion document. While features.json is the machine-tracked source of truth for feature statuses and handoffs, mission-brief.md provides the high-level context, rationale, and approach in prose form for human readers and for context after compaction recovery.
Workers are dispatched per feature from features.json. This ensures structured tracking, clear ownership, and deterministic progress measurement.
Dispatch process:
Select features ready for work: Read features.json and find features where:
status is "pending"dependencies have status: "completed"Update features.json: For each selected feature:
status to "in-progress"assignee to the worker ID (e.g., "worker-1")Dispatch Worker via Agent tool:
subagent_type: "mission-worker"model: use the worker model from config (hooks validate and auto-inject)features.json:
features.json for context on the full feature setParallel vs Sequential:
Process Worker returns:
features.json: set feature status to "completed", store the handoff objectstatus to "failed", retry up to 3 times per Relentless ProtocolBefore changing phase, update .mission/state.json with BOTH:
"phase": "<new_phase>""phaseLock": {"phase": "<new_phase>", "lockedAt": "<ISO timestamp>", "lockedBy": "orchestrator"}Phase and phaseLock.phase MUST always match. Append to phaseHistory and update currentAction.
.mission/state.json: phase → "validator"features.json to compile the list of all changed files from Worker handoffssubagent_type: "mission-validator"model: use the validator model from config (hooks validate and auto-inject)features.json contents (features + handoffs), list of all files changed, and the round number.mission/reports/round-N.mdVerdict: PASS → proceed to Completion Gate immediately in this same responseissuesTrend in state.json: {"round": N, "critical": C, "high": H, "medium": M, "low": L, "total": T}features.json or add new fix featuresWhen persistence is "relentless" (default):
When persistence is "standard":
When persistence is "cautious":
When progressBanners is enabled (default: true), output a progress banner at EVERY phase transition.
Before dispatching workers:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[MISSION] Phase: ORCHESTRATOR → WORKER | Round N | Xm elapsed
Dispatching: worker-1 (feature-id-1), worker-2 (feature-id-2)
Features: X/Y completed | Z in-progress
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
After workers return, before validators:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[MISSION] Phase: WORKER → VALIDATOR | Round N | Xm elapsed
Workers: ✓ worker-1 | ✓ worker-2 | ✗ worker-3 (failed, retrying)
Features: X/Y completed
Dispatching validator...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
After validator returns:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[MISSION] Validator Report | Round N | Xm elapsed
Verdict: PASS/FAIL
Issues: C critical, H high, M medium, L low
Trend: Round 1: 6 → Round 2: 2 (▼ improving)
Features validated: feature-id-1, feature-id-2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
features.json.ALL must be TRUE before cleanup — the gate checks feature statuses from features.json:
features.json have status: "completed" — no pending, in-progress, or failed features remainVerdict: PASS (0 issues).mission/summary.md generated (cleanup guard will block without it).mission/worker-logs/ empty (cleanup guard will block with leftover logs)Do NOT proceed to cleanup until every feature in features.json has status: "completed". The feature statuses are the primary gate — if any feature is pending, in-progress, or failed, the mission is NOT complete regardless of what the Validator report says.
Only when the completion gate is fully satisfied:
.mission/summary.md with full mission summary — MUST include per-feature summary from features.json. The cleanup guard hook checks this file EXISTS before allowing deactivation..mission/worker-logs/*.md — Run: rm -f .mission/worker-logs/*.md. The cleanup guard hook checks this directory is EMPTY before allowing deactivation."active": false, "completedAt": "<ISO timestamp>" — hook allows only after 1+2.[MISSION COMPLETE]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Task: <task description>
Rounds: <N>
Duration: <minutes>
Features: <N> completed
Files created: <N>
Files modified: <N>
Tests written: <N>
Tests passing: <N>/<N>
Build: PASS
Types: PASS
Lint: PASS
Cleanup: .mission/ directory removed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
.mission/ directory entirely: rm -rf .mission/ — safe because hooks exit early when active != true.The Python hook engine (hooks/engine.py) provides shared state parsing, path canonicalization, and model validation. Three Python hooks enforce the mission protocol at the tool-call level:
| # | Defense | Enforces | Blocks |
|---|---|---|---|
| 1 | Completion Guard | Mission can't complete without valid report | phase: "complete" without .mission/reports/round-N.md |
| 2 | Mandatory Cleanup Guard | Cleanup before deactivation | active: false + completedAt without summary.md or with leftover worker-logs |
| 3 | Worker Test File Block | Role separation | Workers writing *.test.*, *.spec.*, tests/*, __tests__/* |
| 4 | Validator Path Restriction | Role separation | Validators writing to .mission/ except .mission/reports/* |
| 5 | Anti-Premature-Completion | Relentless integrity | Completion in relentless mode when report says FAIL |
| 6 | Model Enforcement | Correct model usage | Wrong model on Agent dispatch, auto-injects missing model |
| 7 | Phase Lock | Single-role guarantee | Tool calls when phase ≠ phaseLock.phase |
| 8 | Unknown Phase Block | Safety | All tool calls when phase is not in valid set |
| Hook | Event | Purpose |
|---|---|---|
mission-reminder.py | PreToolUse | Injects [MISSION SKILL ACTIVE — DO NOT DEVIATE] BEFORE every tool call. Role-specific: orchestrator gets dispatch directives, workers get feature assignment + handoff reminder, validators get validation directives. Feature-aware — reads features.json for current feature context. |
mission-continue.py | PostToolUse | Injects [MISSION ACTIVE] AFTER every tool call. Strength gradient: STRONGEST (Agent+orchestrator with full recovery context from features.json), STRONG (Agent+worker/validator), MEDIUM (Read/Write/Edit/Bash), LIGHT (Grep/Glob). Feature-aware — shows only in-progress feature. |
These hooks ensure that even after 20+ Read/Grep/Glob research calls, the model's context always contains a fresh reminder that:
features.json)For the Orchestrator: You will see [MISSION SKILL ACTIVE — DO NOT DEVIATE] before tool calls and [MISSION ACTIVE — MANDATORY CONTINUATION] after Agent calls. These are your guardrails. FOLLOW THEM.
For Workers: Reminders include feature assignment from features.json and structured handoff instructions.
For Validators: Reminders include the feature being validated and reporting directives.
If the user sends a message at any time:
features.json if needed — add/remove/reprioritize featuresmission-brief.md if the mission scope has changedmodel: "opus"model: "sonnet"model: "haiku"npx claudepluginhub ryan-mt/missionGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Implements work from a spec or tickets using TDD at agreed seams, with regular typechecking and test runs, followed by code review.