Your first project
Create a small Snake project, adopt its requirements, connect an agent, and inspect the implementation and verification records it produces. The tutorial also resolves a question the requirements left open and traces a file to the decision behind it.
Before you start
phasoron yourPATH, and an identity: see Install.- An agent in an MCP client that can start a local MCP server over stdio and can read and write files in the project folder.
- Python, for this example only: the project rule in step 2 asks for it.
The outputs shown are examples. Your identifiers and paths will differ.
-
Define the requirements
Create a folder named
snakeand save this file in it. Files at the project root are intent: the requirements, in prose. Any text format is accepted. In Markdown, each heading starts a section.snake/game.md # The game ## The board The board is 20 squares wide and 20 high. The snake starts in the middle, three squares long, moving right. ## Moving Each tick the snake moves one square in the direction it faces. The arrow keys turn it. It cannot turn straight back on itself. ## Walls If the head leaves the board the game is over.
-
Initialize the project
cd snake phasor init Started a Phasor project in /home/ada/snake: 1 intent file project rules go in memory: `phasor remember rules/project '<text>'` (a rules.md at the root is intent)
phasor initcreates.phasor/in the folder: the record in.phasor/record/, and the work folder for code and tests,.phasor/work/. It also writes agent instructions toAGENTS.mdat the root, with a pointer file,CLAUDE.md, for clients that look for that name.Record one project rule. Rules are kept in memory and delivered to agents with their work.
phasor remember rules/project "Python standard library only. Tests use unittest and run from .phasor/work." -
Adopt the intent
An intent file has no effect until it is adopted. Adoption records the file's current version and makes it open work.
phasor adopt Adopted game.md (adoption a09e0c72b873) phasor status 1 intent file, 1 open (game.md), nothing waiting on you, nothing changed in .phasor/work 1 step, head a09e0c72b873
-
Connect an agent
phasor mcpserves the project's operations to an agent as MCP tools. If your MCP client reads.mcp.jsonfrom the project folder, save this there. For other clients, see Agent integration.snake/.mcp.json {"mcpServers": {"phasor": { "command": "phasor", "args": ["mcp", "-C", "C:\\Users\\ada\\snake"], "env": {"PHASOR_AGENT": "builder-1", "PHASOR_MODEL": "<the model id>"} }}}Start the agent in the folder and ask it to work on what is next.
AGENTS.mddescribes the workflow. If your client does not load that file by itself, tell the agent to read it. The agent callsnextand receives the open intent with its context. -
Inspect the implementation
Following its instructions, the agent writes code and tests in
.phasor/work/, adds a check that runs the tests, and lands the work with a rationale. The landing runs the check and records the result. Once it has landed,game.mdis no longer open.phasor status 1 intent file, nothing waiting on you, nothing changed in .phasor/work 2 steps, head fd7c74069e90 phasor audit game.md --paths .phasor/work/.checks/unit.json .phasor/work/snake/__init__.py .phasor/work/snake/game.py .phasor/work/tests/test_game.py
phasor auditfollows an intent file forward to the files that answer it. Without--pathsit prints each landing's rationale and check results, as JSON. -
Resolve an open question
game.mddoes not say what happens when the snake runs into itself. The agent instructions leave a point the intent does not decide to the agent, which records its decision in a thread. An agent can also ask. In this run it built what was written and opened a thread blocked on the owner. A thread is not a step, so the head is unchanged.phasor status 1 intent file, 1 waiting on you, nothing changed in .phasor/work waiting on you: game.md does not say what happens when the snake runs into its own body. I built walls only; the sna... (thread 77b84a2fb424): the owner's call on the snake's own body 2 steps, head fd7c74069e90 phasor discuss post 77b84a2fb424 "Decision: yes. Running into its own body ends the game." --marker concluded
The question and the decision are now in the record. Threads that reference
game.mdare delivered with later work on that file. -
Revise the intent
The decision changes what the software is required to do, so it belongs in the intent. Add a section to
game.md, then adopt it with the reason and the thread it answers.snake/game.md, added at the end ## Its own body If the head runs into any part of the snake's own body the game is over.
phasor adopt --context "Answering the builder's question." --context-ref 77b84a2fb424 Adopted game.md (adoption c36e7edbedee) phasor status 1 intent file, 1 open (game.md), nothing waiting on you, nothing changed in .phasor/work 3 steps, head c36e7edbedee
The adoption opens only the section that changed.
phasor nextoffersgame.md#its-own-body, with the context given at adoption. -
Inspect implementation provenance
After the agent has landed the change,
phasor tracefollows a file back through its versions.phasor trace .phasor/work/snake/game.py { "end": "creation", "ok": true, "walk": [ { "content": "e9281d305177", "context": { "68a1f9c16656": { "refs": [ "77b84a2fb424" ], "text": "Running into its own body ends the game, as the owner decided." } }, "covers": { "68a1f9c16656": [ "4f3e847d004c#its-own-body" ] }, "producedBy": "68a1f9c16656", "version": "677c77c6bccf" }, … the version before it, with its own rationale ] }
The newest version of the file was produced by one landing. The entry gives that landing's rationale, the section of intent it covers, and the thread that held the decision. Provenance is recorded for each version of a file, not for each line.