How It Works
Single Task — /quest
Run /quest for any non-trivial task. Four phases, three gates — one leaving Research, Plan, and Implement. Nothing leaves Review; the quest ends inside it, when the PR is open.
Phase 1: Research
Provisions an isolated git worktree and picks up any checkpoint left by a previous session. Loads task-relevant context, scans past failures and sibling quests’ discoveries, explores the codebase with subagents, and studies reference files for the conventions in play.
Explore agentsPhase 2: Plan
Enters plan mode. Creates an implementation plan with file:line references and a test strategy. Presents the plan for your approval.
plan mode, writing-plansPhase 3: Implement
TDD red-green-refactor against a todo checklist. Writes the failing test, implements, verifies, commits. If stuck: commits partial work, records a failure, and returns to Plan.
test-driven-developmentPhase 4: Review
The balrog agent attacks the implementation first — edge cases, error paths, targeted tests — and its findings are fixed. Then convention review via /warden, a code-quality review, and verification. Finally the PR, and the worktree is cleaned up. No gate leaves Review: the quest ends here.
/warden, verification-before-completion, finishing-a-development-branchMultiple Tasks — /fellowship
Run /fellowship for multiple independent tasks. Gandalf coordinates parallel agents.
Describe
You describe multiple tasks (quests and scouts)
Analyze
Gandalf analyzes them and registers each in the store
Spawn
Spawns quest teammates in isolated worktrees
Scout
Spawns scout agents for research questions
Monitor
Palantir reports the CLI's health sweep (at 2+ quests; Gandalf runs it directly below that)
Gate
Gates surface to you for approval
Status
Say "status" anytime for a progress table
Deliver
Each quest produces a PR; scouts produce reports
Research — /scout
For questions that need investigation but not code changes.
Investigate
Explores codebase, reads docs, runs searches
Validate optional
Spawns fresh adversarial subagent to challenge findings
Deliver
Structured report with confidence levels
Gate Enforcement
Gates aren't just prompts — they're structurally enforced.
Hook-Blocked Tools
Plugin hooks block tool access (Edit, Write, Bash, etc.) after gate submission.
Lead Approval Required
Tools stay blocked until the lead approves with fellowship gate approve.
Verified Prerequisites
Running /lembas and confirming the phase with fellowship phase confirm are verified before gate submission.
No Self-Approval
Self-approval is structurally impossible. The agent that submits the gate cannot approve it.