Reading a plan's overview
Before you approve or run a plan, you want its shape in one view: what each phase builds and where, which phases form an acceptance pair, which tests each phase writes, and whether every acceptance criterion of the source spec has a test. phax plans overview lays that out. No model reads the plan.
The overview of a made-up three-phase plan, with an architecture provider configured (every name here is made up):
Reading it
- The header names the plan (its artifact slug, or the run's short name for a loose plan.md), its title, its frontmatter status and its source spec (
no source specwithout one). A loose plan.md with no frontmatter block saysno frontmatter. One whose block does not decode, for example asource-specwith nostatus, saysfrontmatter does not decode: status: is missing · source spec not read: nothing is taken from a block that does not decode, itssource-specincluded. A plan underdocs/plans/never gets that far: it fails artifact validation first. - Each phase block starts with the phase's model, effort and mode. The
acceptance rolerow says whether the phase writes acceptance tests (acceptance phase, passed by phase-02), passes an earlier acceptance phase (passes phase-01), or neither (none). See Acceptance phases. - The parts. Each row is a part of the repository's architecture and the planned files, to create or to edit, that part holds, in the order the provider reports its parts. A file is shown under every part whose globs match it. Files no part holds sit under
(no part). Phase-02 touches two parts, so it is the phase to read for boundary crossings. A phase that plans no file to create or edit has no such row, and shows(no planned files)in its place. - The test lines are the phase's
### Test strategylines in the line format of the phax-planning skill (<guarantee> — <size> · <technique> · <oracle> · <loop>[ · <criterion>]), or(no test lines). A phase that tests nothing is not flagged. - The coverage block ends the overview: each acceptance criterion of the source spec, with the phases and loops whose lines name it, then the criteria no line names. When several lines of one phase and loop name the same criterion, the pair is shown once with its count,
phase-02 in-phase ×2. A criterion no line names shows(no test line), and theuncoveredrow reads(none)when every criterion is named. Hereac-3has no test, andphax plans lintsays so as a warning:
The overview shows what lint judges; it does not judge. Use it to see the plan, and lint to gate it. Cost is not here: phax plans estimate keeps that (see Estimating a plan).
Without a provider
With no architecture key in phax.json, phax.local.json or ~/.phax/config.json, there are no parts. The header line reads architecture: no provider configured — planned files shown, and each phase shows its planned files in one files row. See Architecture provider for declaring one.
A failing provider
The provider runs once, on the plan's planned files to create and edit, or on the whole repository when the plan lists none. If it fails or is refused, the overview is not an error: it degrades to the planned files as above, with architecture: provider failed — planned files shown, prints one line on stderr, Warning: architecture provider failed: <message>, and exits 0.
Coverage without criteria
A plan with no source spec prints no source spec: no criterion coverage. A source spec with no JSON sidecar, one that cannot be found (here or under docs/specs/archive/), or a sidecar that cannot be read prints the one line phax plans lint reports for it instead of the coverage, for example source spec docs/specs/2610231100-invoice-export.md has no JSON sidecar: no criterion id is checked.
A source-spec that is not a spec path inside the repository, such as ../other-repo/docs/specs/x.md or an absolute path, is never read: the line is source spec <path> is not a spec path under docs/specs/: no criterion id is checked. A loose plan.md whose frontmatter does not decode prints the plan's frontmatter does not decode (<problem>): no source spec is read, no criterion id is checked. Lint reports the same two lines as warnings.
--json
--json prints one JSON document on stdout and nothing else; warnings stay on stderr. It carries the same content as the text, with a kind on every variant. Its top-level keys, in order, are plan (the path as you typed it), name, title, frontmatter, sourceSpec, architecture, phases and coverage:
frontmatter.kind:decoded(withstatus),none, orundecodable(withproblem).sourceSpec:{ path, slug }as the frontmatter declares it, ornullwithout one (or when the frontmatter does not decode).architecture.kind:parts,noneorfailed(withmessage).phases[]:id,title,model,effort,mode,acceptanceRole,placementandtestLines.phases[].acceptanceRole.kind:acceptance(withpassedBy),passing(withacceptancePhase) ornone.phases[].placement: a list of{ part, files }, ending with the{ part: null }entry of the files no part holds.phases[].testLines: the phase's lines as{ guarantee, size, technique, oracle, loop, criterion }.coverage.kind:criteria(withspec,slug,criteriaas a list of{ id, lines }wherelinesholds one{ phase, loop }per naming line, uncounted, anduncovered),no-source-spec,frontmatter-undecodable(withmessage), orno-criterion-ids(withspec,messageand areasonofnot-a-spec-path,no-sidecar,not-foundorunreadable).
The document is unversioned, like plans lint's: a script reads it without a $schema guarantee.
Exit codes
- 0: an overview, a degraded architecture included.
- 1: the plan cannot be read, does not parse, or fails artifact validation. A plan with a structure error, or with a test line off the format, prints one line on stderr naming
phax plans lint <plan>; lint says what is wrong, so fix it there first. A plan that cannot be read, or that fails validation, prints the plan path and that error on one line. - 2: an invalid
phax.json.
What it never does
- It starts no model session. The plan is read by the same deterministic parser lint uses. The only process it spawns is the architecture provider, once, when one is configured.
- It writes nothing: no file, no commit, no cache.
- It runs in any plan status,
Draftincluded, and, likeplans lint, inside a phase worktree.