DivineSWE Overview
You are the Architect. The world exists because of your vision. You speak, and reality bends. DivineSWE is your divine apparatus — a stateful multi-agent orchestration system for agentic software engineering.
The Three Plagues of AI-Assisted Development
Three fundamental problems emerge when running multi-agent software development sessions:
1. Silent Context Degradation
Agents forget decisions, duplicate work, and contradict themselves as the context window fills and compresses older content. There is no persistence across sessions and no memory of what was already decided and why.
2. Unproven Output
AI assistants emit code that reads correctly and ships bugs, security holes, and regressions all the same. With no adversary actively trying to break it — and no verification gate it must pass — plausible-but-wrong work lands in your repo unchecked. The adversarial audit (4eyes + Loki-Exploit) and the Styx verification gate exist to close this gap.
3. No Live Observability
There is no visibility into what agents are doing, what decisions they made, or where things went wrong. Every session is a black box — unrepeatable, unauditable, and impossible to reason about after the fact.
The Covenant: Architect → Oracle → Forge Spec → Avatar
DivineSWE resolves these plagues through a covenant between the Architect and the gods who serve the vision:
You are the Architect — the seer of great possibilities. You hold the vision. You do not write tests or merge branches. You speak your intent.
The Oracle envisions. Through /divineswe:oracle-envision the Oracle looks ahead with you before anything is forged: it researches your vision, offers concepts and a pick, sweeps the chosen one for gaps and opportunities, and sets one Loki-Doubt pass against the draft — Occam weighing every doubt before you see it. A bug goes first to /divineswe:root-cause-analysis, whose diagnosis travels with the work.
The forge spec is the scripture. The Oracle writes your intent as Mandates, each carrying the Accept: line that names the proof it owes, and commits them as a forge spec. A small change needs no Oracle: the Avatar writes its own spec from your words. The spec is the contract between the seeing and the making, and its ## Fulfilment is the record of every proof paid.
The Avatar forges, and the pantheon attends. Through /divineswe:avatar-forge the god comes down into the live session and takes the tools in its own hands, forging each commit unit tests first. Thoth carves the failing tests; Monkey works the anvil; 4eyes audits every major unit, never weaker than the hand that forged it; Loki is strongly recommended against whatever touches an auth, deploy or security surface, and Occam weighs what Loki finds; Styx crosses the river when the blast radius is wide; Mason seals a commit when it deserves the full ceremony. Hermes is its messenger abroad: a summons that names a foreign model is carried out of the house, and the testimony he brings home is judged like any seat’s. At the end one closing audit reads the whole range, and the work waits for your check.
The older covenant — Books of ordered prophecies walked by Prophet — is deprecated, and it still runs only for a Book already in flight.
How It Works: The Eight-Phase Cycle (deprecated)
In the deprecated Book cycle, Prophet drives each development cycle through eight phases in strict order:
INIT → TEST → IMPLEMENT → AUDIT → MERGE → VERIFY → WRAP UP → SEAL| Phase | What Happens |
|---|---|
| INIT | Bootstrap state. Check for session resumption. Compute branch mode. |
| TEST | Thoth writes failing TDD tests. Loki-Break writes adversarial edge cases. Tests are law — carved before creation begins. |
| IMPLEMENT | Monkey agents make all tests pass in isolated git worktrees. |
| AUDIT | 4eyes reviews for correctness, architecture, and quality. Loki-Exploit attacks for vulnerabilities. Both run in parallel. |
| MERGE | Mason merges worktree branches into the main line. Conflicts trigger re-dispatch. |
| VERIFY | Styx runs the full 7-pass verification protocol. Produces an unambiguous PASS/FAIL. |
| WRAP UP | Persist state. Archive completed Books into TABLETS.md and mark their checkboxes. Mason FF-merges branches. |
| SEAL | Archival finalization. The Book file is deleted only once every task line is verified verbatim in TABLETS.md; the vow register self-heals. |
Tests First — Always
Tests are written before implementation. Every task begins with Thoth writing failing tests that define what is true and what is false. Monkey then makes those tests pass. This is not optional — it is the law of the covenant. No implementation exists without a failing test to justify it.
Audit and Verify are Mandatory Gates
After Monkey implements, the work does not proceed until it has survived two independent challenges:
- Audit (4eyes + Loki-Exploit in parallel) — correctness, architecture, security, simplify pass
- Verify (Styx) — the full test suite plus build, lint, type-check, git state, and operational readiness
A single CRITICAL finding from Loki-Exploit is a hard blocker. A Styx FAIL loops work back to the previous phase. Only PASS unlocks WRAP UP.
The Entry-Point Skills
DivineSWE exposes three primary entry points for starting a development cycle:
oracle-envision— Begin with a new project, feature or involved change. The Oracle designs it with you and writes a forge spec of Mandates; then invokeavatar-forge— or skip envisioning and describe a clear change toavatar-forgedirectly. (The Book cycle —oracle-consult book, thenprophet-fulfill— is deprecated.)root-cause-analysis— Begin with a bug or failure. Oracle performs systematic root cause analysis, produces a diagnosis, then you describe the fix toavatar-forge(afteroracle-envisionif it needs designing).prophet-full-audit— Run a standalone security and quality audit without a full development cycle. 4eyes and Loki-Exploit walk the scope throughavatar summon, Occam weighs Loki’s findings, and one report lands in.divineswe/audits/, ending in a Forge Prompt foravatar-forge. No Book required. No IMPLEMENT phase — pure adversarial inspection.
For the full skill reference, see Skills.
Externalized State — The Three Sacred Artifacts
DivineSWE solves context degradation by externalizing state into three durable artifacts:
Scrolls (divineswe/scrolls/{task-id}.md) — per-task context files recording key decisions, current state, files touched, and blockers. Monkey writes to scrolls; Prophet reads them at every re-dispatch.
Ledger (divineswe/ledger.jsonl) — an append-only event log recording every agent action, file creation, decision, and phase transition. It never lies and never forgets.
Session State (divineswe/session-state.json) — Prophet’s immortal memory. Survives process crashes. Enables the deprecated prophet-resume to re-enter the state machine at the exact phase where it left off.
The Divine Council
Eleven agents execute the covenant. Each has a single sacred role:
| Agent | Role |
|---|---|
| Prophet | Immortal orchestrator — drives the state machine, dispatches all agents |
| Oracle | Plan architect — task decomposition, architecture design, decision records |
| Preacher | Pre-flight examiner — returns GO / CAUTION / NO_GO before the cycle begins |
| Thoth | Test writer — writes the immutable laws (failing TDD tests) |
| Monkey | Implementation worker — makes all tests pass in an isolated worktree |
| 4eyes | Code auditor — correctness, architecture, security, quality |
| Mason | Merge worker — merges worktrees, commits prophecies, FF-merges branches |
| Styx | Verifier — 7-pass verification protocol, produces unambiguous PASS/FAIL |
| Loki | Adversary — three forms: Doubt (plan), Break (tests), Exploit (audit) |
| Atlas | Read-only explorer — surveys the repository and produces a navigable map of the codebase |
| Occam | Plan-time pruner — proposes cuts, merges, and unjustified tasks so proposed work earns its place |
For the full agent reference including model tiers and dispatch rules, see Agents.
Prophecies: Single-Context Mini-Pipelines
A prophecy is a self-contained mini-pipeline scoped to a single cohesive change. A Book is an ordered collection of prophecies. Each prophecy runs its own TEST → IMPLEMENT → AUDIT → VERIFY loop in sequence before the next begins. After all prophecies complete, Book-Level AUDIT and Global VERIFY run against the full Book diff.
Prophecies improve focus: agents reason over a tight scope rather than an entire Book’s worth of diffs. The trade-off is ~4x agent-dispatch overhead per Book compared to a single flat pass.
Further Reading
- Quick Start — install and run your first cycle in minutes
- Installation — all four platforms (Claude Code, Copilot CLI, Codex CLI, OpenCode)
- Workflows — the three entry paths and recovery patterns
- Skills — complete skill reference
- Architecture — full state machine, phase table, prophecy execution model
- Agents — full agent reference including model tiers and Loki’s three forms