metaphasor
Docs menu

Intent

Intent defines what a Phasor project is required to do. The owner writes it as files and adopts each change. An adopted change is work to be implemented and verified, and a landing references the intent file, or the section of it, that it answers.

Authoring intent

game.md, one section
## Its own body
If the head runs into any part of the snake's own body the game is over.

Adoption

Editing an intent file has no effect on the project. phasor adopt records the file's current version as an adoption, which is a step in the project's history, and the change becomes open work.

phasor adopt --context "Answering the builder's question." --context-ref 77b84a2fb424
Adopted game.md (adoption c36e7edbedee)

Who can adopt. Only the project's owner: the identity that created the project or, for a clone, the identity that cloned it. An adoption signed by any other identity is refused. An agent started from your Phasor home signs with your identity, so this check does not tell you from your agents. What keeps an implementing agent from adopting is its instructions and the tools it is served, and neither is an access control: see Tool sets and access.

Intent states

Each adopted intent file, or section, is in one state. Phasor computes the state from the record. It cannot be set by hand.

StateMeaning
not adoptedWritten or edited, and not yet adopted
openAdopted, and no landing in force covers it
unverifiedCovered by a landing, and a check bound to it has no passing result for the current inputs: the check has not run on them, or the run ended in error
resolvedCovered by a landing, and every check bound to it has a passing result for the current inputs
regressedA check bound to it has a failing result

Inspecting intent

phasor outline
game.md (version 88003dd48b5e#intent/game.md, edited, not adopted)
  # The game
  ## The board
  ## Moving
  ## Walls
  ## Its own body
phasor show game.md --section "Its own body"
## Its own body
If the head runs into any part of the snake's own body the game is over.

Version history

Every adopted version of an intent file is kept. Read one by its id, or ask for what has changed since it.

phasor show game.md@88003dd48b5e
# 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.
phasor show game.md --since 88003dd48b5e
{
  "diff": " If the head leaves the board the game is over.\n+\n+## Its own body\n+If the head runs into any part of the snake's own body the game is over.",
  "from": "88003dd48b5e#intent/game.md",
  "ok": true,
  "path": "game.md"
}

Revising and reopening intent