mayros plan

Semantic plan mode — create, explore, assert, approve, and execute structured plans with full audit trail in AIngle Cortex.

Plans follow a four-phase workflow:

  1. Explore — discover codebase structure, record findings
  2. Assert — define verifiable assertions about planned changes
  3. Approve — review the decision graph and approve for execution
  4. Execute — run the plan with full Cortex audit trail

Plan state is persisted as RDF triples so it survives across CLI invocations.

Global options

  • --cortex-host <host> — Cortex host (default: 127.0.0.1 or from config)
  • --cortex-port <port> — Cortex port (default: 8080 or from config)
  • --cortex-token <token> — Cortex auth token (or set CORTEX_AUTH_TOKEN)

Subcommands

plan start <task>

Create a new plan with a task description. The plan starts in the explore phase.

plan explore <planId>

Add a discovery entry to a plan. Only works during the explore phase.

Required options:

FlagDescription
--kind <kind>Discovery kind: file, function, dependency, test, pattern, note
--subject <subject>What was discovered (e.g. file path, function name)
--detail <detail>Description of the discovery

plan assert <planId>

Add a verifiable assertion to a plan. Transitions the plan to the assert phase if still in explore.

Options:

FlagDescription
--statement <statement>(required) Assertion statement
--verifyImmediately verify the assertion via Cortex Proof of Logic

plan show [planId]

Show plan details including discoveries and assertions. Omit the ID to show the most recent plan.

Options: --format <fmt> (terminal or json)

plan approve <planId>

Mark a plan as approved. Shows a summary and warns about unverified assertions.

plan execute <planId>

Begin executing an approved plan. Only approved plans can be executed.

plan done <planId>

Mark an executing plan as completed.

plan list

List all plans with their ID, phase, last update, and task description.

Options: --format <fmt> (terminal or json)

plan status [planId]

Show plan status with a progress indicator across all phases. Omit the ID for the most recent plan.

Examples

bash
mayros plan start "Refactor auth module to use JWT"
mayros plan explore a1b2c3d4 --kind file --subject "src/auth.ts" --detail "Main auth module"
mayros plan explore a1b2c3d4 --kind dependency --subject "jsonwebtoken" --detail "JWT library"
mayros plan assert a1b2c3d4 --statement "Existing tests pass after refactor" --verify
mayros plan show a1b2c3d4
mayros plan approve a1b2c3d4
mayros plan execute a1b2c3d4
mayros plan done a1b2c3d4
mayros plan list
mayros plan status