Project setup
Set up a project
phax init writes phax.json at the root of your repository, with the JSON Schemas your editor uses to check it (phax.schema.json, phax.user.schema.json). In a terminal it asks a few questions, pre-filled from your package.json: the project's name, its gate commands, whether to review and publish runs automatically. Elsewhere it takes the detected defaults.
A phax.json looks like this:
nameis the namespace of your runs: a run is<name>.<run name>.commands.setupruns in each phase's fresh worktree before the agent starts;commands.cleanupruns in it once the phase has committed, to free space (node_modules, build output).gateProfilesholds your checks. Each step has acommand, afiring(every-phase, orterminalfor the last phase only) and asurfacethat says what it verifies (local,structuralorproduct). phax records each step's surface and result, and the run's summary lists the surfaces it verified. A step can also return structured findings instead of a log — see Extend phax.review.complianceandpublishrun a compliance review and open a pull request when a run reaches review — see Review and land.review.codesets the model forphax review-code, andauthoring.specandauthoring.planthe model for headless authoring.security.profilesets the default security mode (secureunless you say otherwise) — see Providers and security.agent.maxFixAttemptsis how many times a failing gate goes back to the agent (1 by default).fileReconciliation.modeisreport_only(default) orwarn, to also log each deviation from the planned files.recordsis written byphax records init— see Records.
Layers. phax.json is the team's baseline. Two more files can add to it: ~/.phax/config.json for your machine, and phax.local.json (gitignored) for you in this repository. A scalar takes the most personal value. An allowlist (security.filesystem.allowRead|allowWrite, security.agentCommands, security.mcp.allow) is the union of all layers, so a personal layer can add to the project's security baseline but never remove from it. Gate profiles merge by name.
Check and upgrade.