For AI agents: the complete documentation index is available at https://docs.phax.run/llms.txt, the full documentation bundle is available at https://docs.phax.run/llms-full.txt, and this page is available as Markdown at https://docs.phax.run/releases/0-29-0.md.

phax 0.29.0

Changes since 0.28.0: v0.28.0...v0.29.0.

Highlights

  • Headless code review — The code review works like the compliance review: turned on in phax.json, run at the end of the run, kept in the run folder and the records, and shown in the pull request.

What's new

Headless code review

A run reviews its own code before its pull request.

The code review works like the compliance review: turned on in phax.json, run at the end of the run, kept in the run folder and the records, and shown in the pull request.

  • Setting review.code.enabled to true in phax.json runs a code review on its own each time a run reaches review, after the compliance review and before the pull request. review.code.enabled

    Now:

    "review": {
      "compliance": { "enabled": true },
      "code": { "enabled": true, "model": "claude-opus-5-5", "effort": "high" }
    }
    Before
    "review": {
      "compliance": { "enabled": true },
      "code": { "model": "claude-opus-5-5", "effort": "high" }
    }
  • A run's code review findings are kept in code-review.json in its run folder, one entry per finding with its severity, place, lens, escape, criterion and suggestion. <run folder>/code-review.json

    Now:

    {
      "$schema": "https://docs.phax.run/schemas/code-review/0.29.0.json",
      "findings": [
        {
          "severity": "bug",
          "file": "src/cli/greet.ts",
          "line": 42,
          "message": "An empty --name prints `Hello, !` instead of being refused.",
          "lens": "surface",
          "escape": "unexplored-input",
          "criterion": "ac-empty-name",
          "suggestion": "Refuse an empty --name with exit 2 and add an example test for it."
        }
      ]
    }
  • Running phax review-code <run> --headless runs the code review without a person on a run in review, in a read-only session that leaves your worktree as it was, writes its findings to the run folder, and leaves the session ready to resume. phax review-code --headless

    Now:

    $ phax review-code greet-cli --headless
    Code review: 2 findings (1 bug, 1 concern)
    Findings: ~/.phax/runs/acme.greet-cli/code-review.json
    Fix them in the session: phax review-code greet-cli
    
    $ phax review-code greet-cli --headless
    Code review failed: answer refused: findings[0].lens: "security" is not a lens (expected one of surface, acceptance, boundary, core, edge, tests, architecture, docs). To retry, run: phax review-code greet-cli --headless
    $? = 1
    Before
    $ phax review-code greet-cli
    Starting code review session in ~/.phax/worktrees/acme.greet-cli/phase-03
  • After a run's headless code review, phax review-code <run> reopens that review's session, so you can ask it to fix what it found. phax review-code

    Now:

    $ phax review-code greet-cli
    Resuming code review session in ~/.phax/worktrees/acme.greet-cli/phase-03
    Before
    $ phax review-code greet-cli
    Starting code review session in ~/.phax/worktrees/acme.greet-cli/phase-03
  • A run's pull request lists each code review finding, with its severity, file and line, next to the compliance attention points. the pull request description

    Now:

    ## Needs your review
    
    ### Compliance attention points
    
    - Phase 02 renamed the --name flag without a plan note.
    
    ### Code review findings
    
    - **bug** `src/cli/greet.ts:42` — An empty --name prints `Hello, !` instead of being refused.
    - **concern** `tests/greet.test.ts:18` — The greeting test restates the code's output instead of ac-greet.
    
    ### Unexplained deviations
    
    None.
    Before
    ## Needs your review
    
    ### Compliance attention points
    
    - Phase 02 renamed the --name flag without a plan note.
    
    ### Unexplained deviations
    
    None.
  • A run's cost ledger counts its headless code review, as it counts its compliance review. <run folder>/cost-ledger.json

    Now:

    { "role": "compliance", "phase": null, "completeness": "complete", "provider": "claude-code", "costUsd": 0.41, … }
    { "role": "code-review", "phase": null, "completeness": "complete", "provider": "claude-code", "costUsd": 1.87, … }
    Before
    { "role": "compliance", "phase": null, "completeness": "complete", "provider": "claude-code", "costUsd": 0.41, … }
  • With records on, each run's code review and compliance review are kept in its records beside its phases, so they outlive the run folder. the run's records on phax/records/v1

    Now:

    phax/records/v1
      acme.greet-cli-3f2a/01-parser/
      acme.greet-cli-3f2a/02-cli/
      acme.greet-cli-3f2a/03-docs/
      acme.greet-cli-3f2a/compliance-review/compliance-review.json
      acme.greet-cli-3f2a/code-review/code-review.json
    Before
    phax/records/v1
      acme.greet-cli-3f2a/01-parser/
      acme.greet-cli-3f2a/02-cli/
      acme.greet-cli-3f2a/03-docs/