Start structuring intent

Everything you need is free and open on GitHub. The notation is a draft, and it will evolve with the field.

In five minutes

  1. Pick a template. There are three in templates/: one for a single function, one for a service, and one for lifting intent from existing code before a migration.
  2. Fill it in, or let an AI help. Copy the author prompt for something new, or the lift prompt for existing code, into any AI assistant.
  3. Check it. Run the validator: python3 tools/validate.py your.intent.yaml.
  4. Lower it. Use the lower prompt to generate an implementation, and record its evidence in the intent: what was proven, tested or only assumed.

See it working

The TransferFunds example is one intent with two implementations, in Rust and Python. Each reports honestly how strongly it keeps each promise. A mutation test measures how complete the intent is, and it found a real gap that passing tests alone would have missed.

What an intent looks like

structured_intent: "0.1"
intent: TransferFunds
version: 3
goal: Move money between two accounts, safely and at most once per request.

ensures:
  - id: E1
    text: The total of all balances is unchanged by every transfer attempt.
never:
  - id: N1
    text: No balance is ever negative.
priority: [correctness, auditability, latency, throughput]

origin:
  E1: { source: legacy/ledger.c:180, road: lift, status: intended, decided_by: ledger-owner }

evidence:
  rust:
    N1: { method: type-checked, tool: rustc, status: passing }
  python:
    N1: { method: runtime-checked, status: passing }

The full notation is in the spec.

Prompts for every road

Road Prompt
Author intent for something new author.md
Lift intent from existing code lift.md
Merge intent from several systems merge.md
Discover intent from research discover.md
Lower intent into an implementation lower.md
Review an intent review.md

Contribute

Criticism is as welcome as code. Open an issue, propose a change to the notation, or add a binding in another language. See CONTRIBUTING.