Methodology: the Spell Loop

How Arcane ships a feature: plan, architect, then implement, test and review until the work passes, then ship. What each phase produces, and why it holds.

Documented for v1.24.1 · Checked

Arcane ships work through one repeatable lifecycle, the Spell Loop. Your AI client runs a spell for each phase. The loop records requirements, decisions, test evidence and review findings so people can see why a change was made.

The Spell Loop

The core loop, as the spells you run. The bracketed phases repeat until the work passes review.

/spell-plan → /spell-architect → [ /spell-implement → /spell-test → /spell-review ]* → /spell-ship

Two phases are optional. spell-enchant strengthens a PRD before architecture, with research, UX, accessibility, performance and security passes. spell-scope splits a PRD that is too large for one loop into epics, and each epic then runs its own loop.

Phases

Each phase has a spell and an output. Projects that use an agent roster can assign an owner to each phase.

Plan

spell-plan turns a feature description or a TODO item into a PRD that records the problem, requirements, acceptance criteria and constraints. It writes features/<slug>/PRD.md. When tracking externally and an Azure DevOps work item or GitHub issue ID is known, the folder name includes that ID.

Architect

spell-architect reads the PRD and decides the contracts, the data flow and the risks before any code moves. It writes architecture.md and stories.json beside the PRD: the decisions and a top-level stories array. Each story starts with "passes": false.

Implement

spell-implement works through stories.json one story at a time and records which stories pass. Commits require authority for the session. Each iteration appends what it learned to progress.txt.

Test

spell-test runs the suite against the project's coverage thresholds and records the evidence with the story. Failing tests send the work back to implementation.

Review

spell-review is an adversarial pass over the diff. It must cover every lens (correctness, security, performance, tests, naming and architecture) and say "no issues" where a lens is clean; there is no quota of findings to hit. Its report is saved in the feature's assessments/ folder, and critical findings send the work back to implementation.

Ship

spell-ship runs the pre-deploy checklist, checks that every phase is complete, and presents a ship report. It requires approval before merging the reviewed PR head and preserves commit attribution by merging without squashing. Production deployment has its own approval and readiness checks.

In an interactive session without a matching run grant, commit sign-off can also cover an unguarded push, PR creation and reviewer assignment when the approval explicitly names those actions and their targets. Guarded pushes, PR votes and completion require separate approval in the session that takes the action.

Artifacts

The loop records its inputs, decisions and verification so a reviewer can trace the work.

Artifact Written by Where
PRD spell-plan features/<slug>/PRD.md
Architecture and decisions spell-architect features/<slug>/architecture.md; lasting decisions in DECISIONS.md
Stories spell-architect, then spell-implement features/<slug>/stories.json
Iteration learnings spell-implement features/<slug>/progress.txt
Test evidence spell-test with each story in stories.json
Review report spell-review features/<slug>/assessments/
Ship report spell-ship presented for approval before the merge

Why the loop holds

Each implementation iteration starts with fresh context. It carries earlier work forward through stories.json, progress.txt and Git history, so the next iteration can read what was tried.

The phases form a chain: the PRD informs the architecture, the architecture informs the stories, the stories guide the code, and tests and review check the result against the requirements and the decisions. Without that chain, stories built in parallel make conflicting decisions.

A tool that wrote the code does not review it. The review runs in a separate session or by a different agent, because a tool that validates its own work cannot be trusted to catch its own mistakes.

Variants

spell-full-cycle runs the whole loop and applies the commit and merge gates for the session. For a large PRD, spell-scope produces an execution plan and each epic runs its own loop. For a bug fix or a small refactor, the quick flow skips planning and architecture: implement, test, review, ship.

spell-unattended-run is the entry point when you want delivery to continue without you watching. Before you leave, it turns issues or a brief into a bounded plan and settles the open decisions. An operator can give the run an expiring grant that names each permitted action. The spell hands each milestone to spell-full-cycle and verifies the result. A grant that explicitly permits PR completion can cover a merge after the required reviews and checks pass. The delivery includes a record of the grant marked ended to prevent reuse. If ending it removes authority for a remaining delivery step, the operator finishes that step.

Work is tracked in the repository either way. With tracking_mode: internal, the repository's own files are the source of truth; with external, they still are, and chosen milestones and work items are mirrored to Azure DevOps or GitHub.

Was this page helpful?

Your answer

Please don't include personal information.