Mordenkainen’s Sword
Summon a standing process that keeps cutting through one job until dismissed.
Overview
Mordenkainen’s Sword is interpreted here as a metaphorical spell with a prototype execution model.
Canonical source: Mordenkainen’s Sword (spell)
Provider target: OpenClaw
When To Use
- You need a long-running background process, scheduled task, or watcher with a single clear mandate.
- A recurring precise action should persist without manual babysitting once it is safely launched.
- The right abstraction is a narrow autonomous worker, not a broad orchestration system.
Workflow
- Define the worker's single mandate, cadence, start conditions, and stop conditions.
- Design the loop for idempotence, observability, safe retries, and deliberate dismissal.
- Return a runnable spec with lifecycle hooks, failure handling, and operator controls.
Deliverables
- A daemon, cron, or persistent worker design for the task.
- Lifecycle and cancellation rules for starting, monitoring, and stopping it safely.
- Monitoring, error-recovery, and escalation notes for ongoing operation.
Guardrails
- Do not give the process broader authority than the single job requires.
- Ensure repeated actions are idempotent or explicitly bounded so persistence does not accumulate damage.
Default Invocation
Use $mordenkainen-s-sword to design a persistent worker for this single job, including how it starts, reports, and stops.