Skip to content

Keep the plan as milestones and issues the tool can validate

Declare milestones as outcomes and issues as execution contracts, and let the tool say what is ready and what is blocked.

guaranteed Repository knowledgeintermediatemaintaineragentwrites state

Situation

The plan lives in a tracker nobody reads from the repository, or in a document whose status column is a matter of opinion. What is ready to start and what is blocked is an argument, not a query.

Scenario

setup: plan-model
given:
  - 'a canonical project model with one milestone and two issues, the second depending on the first'
steps:
  - id: validate
    run: ['plan', 'validate']
    note: 'every record parses, every reference resolves, the dependency graph is acyclic'
    expect:
      exit: 0
      stdout_contains: ['milestone', 'issue', '0 failure']
  - id: what-is-ready
    run: ['plan', 'ready']
    note: 'the issues nothing blocks'
    expect:
      exit: 0
      stdout_contains: ['I0001']
  - id: what-is-blocked
    run: ['plan', 'blocked']
    note: 'the issues waiting on another'
    expect:
      exit: 0
      stdout_contains: ['I0002']
then:
  - 'status is derived from the records and git, never written into them'
  - 'an issue cannot be marked done without the evidence its milestone requires'

Outcome

Milestones and issues are files under .ai/repo/project/; plan validate refuses a dangling dependency or a cycle, and plan ready and plan blocked are computed from the same records every time.

The scenario

Executed against the real tool, in a repository prepared by plan-model, every time this site is generated. What follows is not a description of what should happen; it is what happened.

given

  • a canonical project model with one milestone and two issues, the second depending on the first

when

  1. 1majordomus plan validate
  2. 2majordomus plan ready
  3. 3majordomus plan blocked

then

  • status is derived from the records and git, never written into them
  • an issue cannot be marked done without the evidence its milestone requires

What the tool did

Evidence of the run this page was generated from: pass, 3 step(s). Output is normalised: the repository's path, timestamps, ids and durations are placeholders; nothing else is edited.

Tested by test/cases/94_use_cases.sh, which runs every scenario and refuses a step whose recorded output is not what it produced.

  1. every record parses, every reference resolves, the dependency graph is acyclic

    plan validate: 1 milestone(s), 2 issue(s), 0 failure(s), 0 warning(s)
    • exit 0
    • stdout_contains /milestone/
    • stdout_contains /issue/
    • stdout_contains /0 failure/
  2. the issues nothing blocks

    I0001   w0   Issue I0001
        scope: src/I0001
    • exit 0
    • stdout_contains /I0001/
  3. the issues waiting on another

    I0002   w1   Issue I0002
        waiting on: I0001
    • exit 0
    • stdout_contains /I0002/

Why the tool knows this

The chain from this page to the code: the use case names commands, rules and claims; each rule is dispatched from the registry and each claim names the test that proves it; the scenario above executed the commands. Nothing in this chain is prose about intent.

The rules that make it hold

Guarantees exercised

Related use cases

Computed from what they share: claims, rules, commands, category, applications. Nobody maintains this list.

The moments this answers

Searches the titles and descriptions of every page this site publishes.