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-36-0.md.

phax 0.36.0

Changes since 0.35.0: v0.35.0...v0.36.0.

Highlights

  • Effect 4 migration — The migration changes how phax is written, never what phax does: a difference a consumer can observe is either named here or a defect.

Upgrading

  • phax runs on Effect 4. Files and refusals are unchanged. @lbdremy/phax-schemas exports Effect 4 Schema values (RegistrySchema, PhaxPlanSchema, …): code that composes them needs effect ^4.1.2, and code that only calls the parse functions changes nothing. The published JSON Schemas are unchanged, and phax checks the ones Effect 4 generates against them by the documents they accept.
  • The JSON Schemas phax renders read differently, with the same meaning. phax artifact schema spec|plan|verdicts, the answer schemas phax hands a provider, and the editor schemas phax schema upgrade writes accept and refuse the same documents as in 0.35.0, but their text is Effect 4's: the descriptions and titles Effect 3 wrote on its own (a string matching the pattern …, minItems(2), a number between 1 and 10) are gone, shared definitions are written inline, and keys come in another order. phax schema upgrade therefore rewrites phax.schema.json and phax.user.schema.json once: commit what it changes. A script that compared phax artifact schema with packages/schemas/json/ byte for byte compares them by the documents they accept.
  • Refusals: a value of the wrong shape reads in phax's words. Where a config file, an answer, a frontmatter or a report has a value that should be an object or an array, the refusal reads (root): Expected an object, actual null or findings: Expected an array, actual "none", not the full type description it printed before (Expected { readonly $schema?: string | undefined; … }, actual null). A script that matched the old type text matches Expected an object or Expected an array. Other lines moved too, by the rules in the next entry.
  • Refusals: phax builds every refusal line from its own refusal model. A refusal is a path, a kind (missing, unexpected, invalid-type, invalid-value or filter), an expected label and the actual value. src/schemas/refusal/render.ts words it, and src/schemas/refusal/adapter.ts is the one module that reads the schema library's issues, so a later change of Effect version moves no message. Five rules moved lines; each is shown with an example from the list below:
    • A whole type is named by its kind: an object, an array, a tuple, and one of … for a union. files: Expected readonly [NonEmptyString, ...NonEmptyString[]], actual 42 reads files: Expected one of an array | null, actual 42.
    • A union of literals is one line, its members joined by | (null and undefined count as literals): providerPriority.1: Expected "claude-code", actual "gemini-cli", then one line per other member, reads providerPriority.1: Expected "claude-code" | "mistral-vibe" | "codex-cli", actual "gemini-cli". A union with a keyword or a whole type among its members reads one of …: incomplete: Expected string, actual 3 reads incomplete: Expected one of string | null, actual 3.
    • A description is no longer a label. A title or description documents the JSON Schema and never words a refusal. phase: Expected The gated phase., actual "" reads phase: Expected a string matching the pattern ^phase-\d{2}$, actual "", and path: Expected The artifact's repo-relative path., actual "" reads path: Expected a non empty string, actual "". A leaf that was labelled by its description now shows its constraint, or its literals (verdict: Expected "authored" | "passed", actual "bogus-value").
    • A union member's shallow mismatch is not printed beside the member that got deeper. agent.maxFixAttempts: Expected an integer, actual 2.5 was followed by agent.maxFixAttempts: Expected undefined, actual 2.5 and agent: Expected undefined, actual {"maxFixAttempts":2.5}; only the first line is left.
    • A built-in constraint is labelled from its data, in the words it had: a non empty string (a minimum length of one), a string at least <n> character(s) long, a string matching the pattern <re>.
    • A union of objects told apart by a key reads the member the input chose. A member refused on one of its own keys (a literal the value misses, or a key it does not declare) gives way to a member whose type there accepts the value: decisionId: Expected string, actual 42 where a committed decision record printed outcome: Expected "failed", actual "committed".
    • A transformation that fails is named by what it decodes into, not by its schema or Effect's reason: a command-library option declared Schema.NumberFromString refuses --count x as --count: Expected number, actual "x", where it read Unable to decode "x" into a number.
  • Refusals: the moved lines. 108 lines of the corpus moved (23 in config, 7 in provider answers, 3 in documents, 75 in persisted formats and the package), each as before → after; a line of a frozen release's shape is listed once with its releases in parentheses. Line breaks of a multi-line refusal are shown as ⏎.
    • Config files (phax.json, the user overlay, providers.json, model-routing.json) (23):
      • config/model-routing, refuses a provider outside the enum: providerPriority.1: Expected "claude-code", actual "gemini-cli" ⏎ providerPriority.1: Expected "mistral-vibe", actual "gemini-cli" ⏎ providerPriority.1: Expected "codex-cli", actual "gemini-cli" → providerPriority.1: Expected "claude-code" | "mistral-vibe" | "codex-cli", actual "gemini-cli"
      • config/model-routing, refuses a relation outside the enum: equivalence.gpt-5.5.high.relation: Expected "exact", actual "sideways" ⏎ equivalence.gpt-5.5.high.relation: Expected "equivalent", actual "sideways" ⏎ equivalence.gpt-5.5.high.relation: Expected "upgrade", actual "sideways" ⏎ equivalence.gpt-5.5.high.relation: Expected "fallback", actual "sideways" ⏎ equivalence.gpt-5.5.high.relation: Expected "downgrade", actual "sideways" ⏎ equivalence.gpt-5.5.high.relation: Expected "no_equivalent", actual "sideways" → equivalence.gpt-5.5.high.relation: Expected "exact" | "equivalent" | "upgrade" | "fallback" | "downgrade" | "no_equivalent", actual "sideways"
      • config/model-routing, refuses a family outside the enum: requestedModelNormalization.gemini: Expected "claude-haiku", actual "google-gemini" ⏎ requestedModelNormalization.gemini: Expected "claude-sonnet", actual "google-gemini" ⏎ requestedModelNormalization.gemini: Expected "claude-opus", actual "google-gemini" ⏎ requestedModelNormalization.gemini: Expected "claude-fable", actual "google-gemini" ⏎ requestedModelNormalization.gemini: Expected "mistral-medium", actual "google-gemini" ⏎ requestedModelNormalization.gemini: Expected "openai-gpt", actual "google-gemini" → requestedModelNormalization.gemini: Expected "claude-haiku" | "claude-sonnet" | "claude-opus" | "claude-fable" | "mistral-medium" | "openai-gpt", actual "google-gemini"
      • config/phax-config, refuses a surface outside the enum: gateProfiles.standard.0.surface: Expected "local", actual "remote" ⏎ gateProfiles.standard.0.surface: Expected "structural", actual "remote" ⏎ gateProfiles.standard.0.surface: Expected "product", actual "remote" → gateProfiles.standard.0.surface: Expected "local" | "structural" | "product", actual "remote"
      • config/phax-config, refuses a firing outside the enum: gateProfiles.standard.0.firing: Expected "every-phase", actual "always" ⏎ gateProfiles.standard.0.firing: Expected "terminal", actual "always" → gateProfiles.standard.0.firing: Expected "every-phase" | "terminal", actual "always"
      • config/phax-config, refuses maxFixAttempts above the bound: agent.maxFixAttempts: Expected a number between 1 and 10, actual 11 ⏎ agent.maxFixAttempts: Expected undefined, actual 11 ⏎ agent: Expected undefined, actual {"maxFixAttempts":11} → agent.maxFixAttempts: Expected a number between 1 and 10, actual 11
      • config/phax-config, refuses a fractional maxFixAttempts: agent.maxFixAttempts: Expected an integer, actual 2.5 ⏎ agent.maxFixAttempts: Expected undefined, actual 2.5 ⏎ agent: Expected undefined, actual {"maxFixAttempts":2.5} → agent.maxFixAttempts: Expected an integer, actual 2.5
      • config/phax-config, refuses a protected path breaking the glob dialect: protectedPaths.0: "/etc/passwd" starts with / ⏎ protectedPaths: Expected undefined, actual ["/etc/passwd"] → protectedPaths.0: "/etc/passwd" starts with /
      • config/phax-config, refuses an empty protectedPaths list: protectedPaths.0: is missing ⏎ protectedPaths: Expected undefined, actual [] → protectedPaths.0: is missing
      • config/phax-config, refuses a records remote that is not a safe URL: records.destination.remote: records.destination.remote must be an https://, ssh://, or git@host:path URL ⏎ records: Expected undefined, actual {"transcript":false,"destination":{"kind":"repo","remote":"http://example.com/r.git"},"autoPush":false} → records.destination.remote: records.destination.remote must be an https://, ssh://, or git@host:path URL
      • config/phax-config, refuses a security profile outside the enum: security.profile: Expected "secure", actual "lax" ⏎ security.profile: Expected "unsafe", actual "lax" ⏎ security.profile: Expected "isolated", actual "lax" ⏎ security.profile: Expected undefined, actual "lax" ⏎ security: Expected undefined, actual {"profile":"lax"} → security.profile: Expected "secure" | "unsafe" | "isolated" | undefined, actual "lax"
      • config/phax-config, refuses a workspace without a path: workspaces.0.path: is missing ⏎ workspaces: Expected undefined, actual [{"id":"site","name":"Site"}] → workspaces.0.path: is missing
      • config/phax-config, reports every issue of a config at once: colour: is unexpected, expected: "$schema" | "version" | "name" | "state" | "agent" | "commands" | "fileReconciliation" | "security" | "publish" | "brief" | "planAuditor" | "architecture" | "acceptance" | "review" | "authoring" | "gateProfiles" | "workspaces" | "records" | "assignments" | "protectedPaths" ⏎ version: Expected 1, actual 2 ⏎ name: Expected a non empty string, actual "" ⏎ gateProfiles.standard.0.surface: Expected "local", actual "remote" ⏎ gateProfiles.standard.0.surface: Expected "structural", actual "remote" ⏎ gateProfiles.standard.0.surface: Expected "product", actual "remote" ⏎ gate step "pnpm test": output must be "log" or "gate-report" → colour: is unexpected, expected: "$schema" | "version" | "name" | "state" | "agent" | "commands" | "fileReconciliation" | "security" | "publish" | "brief" | "planAuditor" | "architecture" | "acceptance" | "review" | "authoring" | "gateProfiles" | "workspaces" | "records" | "assignments" | "protectedPaths" ⏎ version: Expected 1, actual 2 ⏎ name: Expected a non empty string, actual "" ⏎ gateProfiles.standard.0.surface: Expected "local" | "structural" | "product", actual "remote" ⏎ gate step "pnpm test": output must be "log" or "gate-report"
      • config/phax-user-overlay, refuses a state root that is not a string: state.root: Expected string, actual 7 ⏎ state: Expected undefined, actual {"root":7} → state.root: Expected string, actual 7
      • config/phax-user-overlay, refuses an empty state root: state.root: Expected a non empty string, actual "" ⏎ state: Expected undefined, actual {"root":""} → state.root: Expected a non empty string, actual ""
      • config/phax-user-overlay, refuses a network profile outside the enum: security.network.profile: Expected "provider-only", actual "closed" ⏎ security.network.profile: Expected "dev-allowlist", actual "closed" ⏎ security.network.profile: Expected "open", actual "closed" ⏎ security.network.profile: Expected undefined, actual "closed" ⏎ security.network: Expected undefined, actual {"profile":"closed"} ⏎ security: Expected undefined, actual {"network":{"profile":"closed"}} → security.network.profile: Expected "provider-only" | "dev-allowlist" | "open" | undefined, actual "closed"
      • config/phax-user-overlay, refuses maxFixAttempts below the bound: agent.maxFixAttempts: Expected a number between 1 and 10, actual 0 ⏎ agent.maxFixAttempts: Expected undefined, actual 0 ⏎ agent: Expected undefined, actual {"maxFixAttempts":0} → agent.maxFixAttempts: Expected a number between 1 and 10, actual 0
      • config/phax-user-overlay, refuses a missing compliance enabled: review.compliance.enabled: is missing ⏎ review.compliance: Expected undefined, actual {"model":"claude-sonnet-5-5"} ⏎ review: Expected undefined, actual {"compliance":{"model":"claude-sonnet-5-5"}} → review.compliance.enabled: is missing
      • config/phax-user-overlay, refuses a gate step output outside the enum, naming its command: gate step "pnpm lint": output must be "log" or "gate-report" ⏎ gateProfiles: Expected undefined, actual {"quick":[{"command":"pnpm lint","surface":"local","firing":"every-phase","output":"json"}]} → gate step "pnpm lint": output must be "log" or "gate-report"
      • config/provider-config, refuses a model status outside the enum: providers.claude-code.families.claude-opus.models.0.status: Expected "active", actual "retired" ⏎ providers.claude-code.families.claude-opus.models.0.status: Expected "deprecated", actual "retired" ⏎ providers.claude-code.families: Expected undefined, actual {"claude-opus":{"models":[{"id":"claude-opus-5-5","efforts":["high"],"status":"retired"}]}} → providers.claude-code.families.claude-opus.models.0.status: Expected "active" | "deprecated", actual "retired"
      • config/provider-config, refuses an effort outside the enum: providers.claude-code.families.claude-opus.models.0.efforts.0: Expected "none", actual "extreme" ⏎ providers.claude-code.families.claude-opus.models.0.efforts.0: Expected "off", actual "extreme" ⏎ providers.claude-code.families.claude-opus.models.0.efforts.0: Expected "low", actual "extreme" ⏎ providers.claude-code.families.claude-opus.models.0.efforts.0: Expected "medium", actual "extreme" ⏎ providers.claude-code.families.claude-opus.models.0.efforts.0: Expected "high", actual "extreme" ⏎ providers.claude-code.families.claude-opus.models.0.efforts.0: Expected "xhigh", actual "extreme" ⏎ providers.claude-code.families.claude-opus.models.0.efforts.0: Expected "max", actual "extreme" ⏎ providers.claude-code.families.claude-opus.models.0.efforts.0: Expected "ultracode", actual "extreme" ⏎ providers.claude-code.families.claude-opus.models.0.efforts.0: Expected "ultra", actual "extreme" ⏎ providers.claude-code.families: Expected undefined, actual {"claude-opus":{"models":[{"id":"claude-opus-5-5","efforts":["extreme"],"status":"active"}]}} → providers.claude-code.families.claude-opus.models.0.efforts.0: Expected "none" | "off" | "low" | "medium" | "high" | "xhigh" | "max" | "ultracode" | "ultra", actual "extreme"
      • config/provider-config, refuses an empty efforts list: providers.claude-code.families.claude-opus.models.0.efforts.0: is missing ⏎ providers.claude-code.families: Expected undefined, actual {"claude-opus":{"models":[{"id":"claude-opus-5-5","efforts":[],"status":"active"}]}} → providers.claude-code.families.claude-opus.models.0.efforts.0: is missing
      • config/provider-config, refuses a family with no model: providers.claude-code.families.claude-opus.models.0: is missing ⏎ providers.claude-code.families: Expected undefined, actual {"claude-opus":{"models":[]}} → providers.claude-code.families.claude-opus.models.0: is missing
    • Provider answers (authoring and plan extraction) (7):
      • answers/authoring-answer, spec: refuses another release's $schema: $schema: Expected The spec-document format's shape, exactly: https://docs.phax.run/schemas/spec-document/0.32.0.json, actual "https://docs.phax.run/schemas/spec-document/0.31.0.json" → $schema: Expected "https://docs.phax.run/schemas/spec-document/0.32.0.json", actual "https://docs.phax.run/schemas/spec-document/0.31.0.json"
      • answers/authoring-answer, spec: refuses a requirement pattern outside the enum: requirements[0].pattern: Expected "ubiquitous", actual "sometimes" → requirements[0].pattern: Expected "ubiquitous" | "event" | "state" | "unwanted" | "optional", actual "sometimes"
      • answers/authoring-answer, plan: refuses a test line size outside the enum: phase-01 test line 1 size: Expected "small", actual "huge" → phase-01 test line 1 size: Expected "small" | "medium" | "large", actual "huge"
      • answers/authoring-answer, plan: refuses an effort that is not a string: phases[0].effort: Expected "none", actual 3 → phases[0].effort: Expected "none" | "off" | "low" | "medium" | "high" | "xhigh" | "max" | "ultracode" | "ultra", actual 3
      • answers/plan-extraction, refuses another format's $schema: $schema: Expected The phax-plan-extraction format's shape, exactly: https://docs.phax.run/schemas/phax-plan-extraction/0.33.0.json, actual "https://docs.phax.run/schemas/code-review/0.33.0.json" → $schema: Expected "https://docs.phax.run/schemas/phax-plan-extraction/0.33.0.json", actual "https://docs.phax.run/schemas/code-review/0.33.0.json"
      • answers/plan-extraction, refuses an incomplete that is not a string: incomplete: Expected string, actual 3 → incomplete: Expected one of string | null, actual 3
      • answers/plan-extraction, refuses a phase effort outside the enum: plan.phases[0].effort: Expected "none", actual "huge" → plan.phases[0].effort: Expected "none" | "off" | "low" | "medium" | "high" | "xhigh" | "max" | "ultracode" | "ultra", actual "huge"
    • Documents (artifact frontmatter) (3):
      • documents/artifact-frontmatter, spec: refuses a status outside the enum: status: Expected "Draft", actual "Stale" ⏎ status: Expected "Approved", actual "Stale" ⏎ status: Expected "Abandoned", actual "Stale" ⏎ status: Expected "Completed", actual "Stale" → status: Expected "Draft" | "Approved" | "Abandoned" | "Completed", actual "Stale"
      • documents/artifact-frontmatter, spec: refuses an empty approval baseline: approved.baseline: Expected a non empty string, actual "" ⏎ approved: Expected undefined, actual {"date":"2026-11-07","baseline":""} → approved.baseline: Expected a non empty string, actual ""
      • documents/artifact-frontmatter, plan: refuses a status outside the enum: status: Expected "Draft", actual "Published" ⏎ status: Expected "Approved", actual "Published" ⏎ status: Expected "Stale", actual "Published" ⏎ status: Expected "Abandoned", actual "Published" ⏎ status: Expected "Completed", actual "Published" → status: Expected "Draft" | "Approved" | "Stale" | "Abandoned" | "Completed", actual "Published"
    • Persisted formats and the package (@lbdremy/phax-schemas) (75):
      • formats/acceptance-request, refuses verdict outside its value (current): verdict: Expected Which judgment the provider gives: the acceptance phase's tests are authored. | Which judgment the provider gives: the passing phase left no acceptance marker., actual "bogus-value" → verdict: Expected "authored" | "passed", actual "bogus-value"
      • formats/acceptance-request, refuses phase that breaks its pattern (current): phase: Expected The gated phase., actual "" → phase: Expected a string matching the pattern ^phase-\d{2}$, actual ""
      • formats/architecture-report, refuses body when empty (current): body: Expected Markdown for the agent to read. phax prints it as is, before the parts, and never parses it., actual "" → body: Expected a non empty string, actual ""
      • formats/architecture-request, refuses files of the wrong type (current): files: Expected readonly [NonEmptyString, ...NonEmptyString[]], actual 42 → files: Expected one of an array | null, actual 42
      • formats/artifact-status, refuses kind outside its values (current): kind: Expected "spec", actual "bogus-value" → kind: Expected "spec" | "plan", actual "bogus-value"
      • formats/artifact-status, refuses path when empty (current): path: Expected The artifact's repo-relative path., actual "" → path: Expected a non empty string, actual ""
      • formats/brief-record, refuses moment outside its values (current, 0.20.0): moment: Expected "pushed", actual "bogus-value" → moment: Expected "pushed" | "pulled", actual "bogus-value"
      • formats/brief-record, refuses request.phase that breaks its pattern (current, 0.20.0): request.phase: Expected The gated phase., actual "" → request.phase: Expected a string matching the pattern ^phase-\d{2}$, actual ""
      • formats/brief-request, refuses phase that breaks its pattern (current): phase: Expected The gated phase., actual "" → phase: Expected a string matching the pattern ^phase-\d{2}$, actual ""
      • formats/code-review, refuses findings[0].file when empty (0.29.0): findings[0].file: Expected The path the finding is about, as the reviewer gave it., actual "" → findings[0].file: Expected a non empty string, actual ""
      • formats/compliance-review, refuses verdict outside its values (current, 0.17.0): verdict: Expected "conformant", actual "bogus-value" → verdict: Expected "conformant" | "conformant-with-deviations" | "divergent", actual "bogus-value"
      • formats/cost-ledger, refuses entries[0].role outside its values (current): entries.0.phase: Expected null, actual "phase-01" → entries.0.role: Expected "phase" | "fix" | "handoff" | "first-turn" | "closing-turn", actual "bogus-value"
      • formats/cost-ledger, refuses entries[0].phase of the wrong type (0.25.0, 0.26.0): entries[0].role: Expected "compliance", actual "phase" → entries[0].phase: Expected string, actual 42
      • formats/cost-ledger, refuses entries[0].phase that breaks its pattern (0.25.0, 0.26.0): entries[0].role: Expected "compliance", actual "phase" → entries[0].phase: Expected a string matching the pattern ^phase-\d{2}$, actual ""
      • formats/decide-verdicts, refuses artifact when empty (current): artifact: Expected The repo-relative path of the artifact the verdicts are for. phax compares it with the artifact argument and never reads the artifact from it., actual "" → artifact: Expected a non empty string, actual ""
      • formats/decision-record-manifest, refuses decisionId that breaks its pattern (0.25.0): decisionId: Expected `<stamp>-<slug>/<NN>`, the Decision-Id trailer., actual "" → decisionId: Expected a string matching the pattern ^[^/\s]+\/\d{2,}$, actual ""
      • formats/decision-record-manifest, refuses an unexpected key (current): outcome: Expected "failed", actual "committed" → unexpectedKey: is unexpected, expected: "$schema" | "kind" | "decisionId" | "artifact" | "artifactKind" | "session" | "doctrine" | "questions" | "arbitrated" | "departed" | "sourceSha" | "shape" | "provider" | "model" | "effort" | "mode" | "outcome" | "commit" | "usage"
      • formats/decision-record-manifest, refuses decisionId of the wrong type (current, 0.28.0): outcome: Expected "failed", actual "committed" → decisionId: Expected string, actual 42
      • formats/decision-record-manifest, refuses decisionId that breaks its pattern (current, 0.28.0): outcome: Expected "failed", actual "committed" → decisionId: Expected a string matching the pattern ^[^/\s]+\/\d{2,}$, actual ""
      • formats/decision-record-manifest, refuses an unexpected key (0.28.0): outcome: Expected "failed", actual "committed" → unexpectedKey: is unexpected, expected: "$schema" | "kind" | "decisionId" | "artifact" | "artifactKind" | "session" | "doctrine" | "questions" | "arbitrated" | "departed" | "sourceSha" | "shape" | "provider" | "model" | "effort" | "requestedModel" | "mode" | "outcome" | "commit" | "usage"
      • formats/decision-record-manifest, refuses an unexpected key (0.30.0): requestedModel: is unexpected, expected: "$schema" | "kind" | "decisionId" | "artifact" | "artifactKind" | "session" | "doctrine" | "questions" | "arbitrated" | "departed" | "sourceSha" | "shape" | "provider" | "model" | "effort" | "mode" | "outcome" | "commit" | "usage" → unexpectedKey: is unexpected, expected: "$schema" | "kind" | "decisionId" | "artifact" | "artifactKind" | "session" | "doctrine" | "questions" | "arbitrated" | "departed" | "sourceSha" | "shape" | "provider" | "model" | "effort" | "requestedModel" | "mode" | "outcome" | "commit" | "failure" | "usage"
      • formats/decision-record-manifest, refuses decisionId of the wrong type (0.30.0): requestedModel: is unexpected, expected: "$schema" | "kind" | "decisionId" | "artifact" | "artifactKind" | "session" | "doctrine" | "questions" | "arbitrated" | "departed" | "sourceSha" | "shape" | "provider" | "model" | "effort" | "mode" | "outcome" | "commit" | "usage" → decisionId: Expected string, actual 42
      • formats/decision-record-manifest, refuses decisionId that breaks its pattern (0.30.0): requestedModel: is unexpected, expected: "$schema" | "kind" | "decisionId" | "artifact" | "artifactKind" | "session" | "doctrine" | "questions" | "arbitrated" | "departed" | "sourceSha" | "shape" | "provider" | "model" | "effort" | "mode" | "outcome" | "commit" | "usage" → decisionId: Expected a string matching the pattern ^[^/\s]+\/\d{2,}$, actual ""
      • formats/gate-attribution, refuses steps[0].surface outside its values (pre-schema): steps[0].surface: Expected "local", actual "bogus-value" → steps[0].surface: Expected "local" | "structural" | "product", actual "bogus-value"
      • formats/gate-attribution, refuses steps[0].surface outside its values (0.17.0, 0.20.0, 0.21.0): steps.0.surface: Expected "local", actual "bogus-value" → steps.0.surface: Expected "local" | "structural" | "product", actual "bogus-value"
      • formats/gate-request, refuses phase that breaks its pattern (current): phase: Expected The gated phase., actual "" → phase: Expected a string matching the pattern ^phase-\d{2}$, actual ""
      • formats/hand-decision-answer, refuses decisions[0].id that breaks its pattern (current, 0.25.0): decisions.0.id: Expected A question id of the artifact: no whitespace., actual "" → decisions.0.id: Expected a string matching the pattern ^\S+$, actual ""
      • formats/interactive-session, refuses provider outside its values (current, 0.26.0): provider: Expected "claude-code", actual "bogus-value" → provider: Expected "claude-code" | "codex-cli" | "mistral-vibe", actual "bogus-value"
      • the request format that acceptance-request replaced (current, 0.26.0), a verdict outside its two values: the two Which judgment the provider gives: … descriptions joined by | → the two quoted values joined by |, actual "bogus-value"
      • the same format, a phase that breaks its pattern (current, 0.26.0): phase: Expected The gated phase., actual "" (0.26.0 added , the pair's … to the description) → phase: Expected a string matching the pattern ^phase-\d{2}$, actual ""
      • formats/phase-record-manifest, refuses shape outside its values (current, 0.17.0, 0.26.0, 0.30.0, 0.33.0): shape: Expected "full", actual "bogus-value" → shape: Expected "full" | "skeleton", actual "bogus-value"
      • formats/phase-status, refuses state outside its values (current, 0.26.0): state: Expected "pending", actual "bogus-value" → state: Expected "pending" | "setting_up_worktree" | "running" | "gates_failed" | "gates_exhausted" | "fixing" | "failed" | "passed" | "committed" | "cleaning_up" | "cleaned_up" | "review_open" | "handoff_failed" | "skipped" | "rate_limited" | "awaiting_review", actual "bogus-value"
      • formats/phase-status, refuses state outside its values (0.17.0, 0.20.0): state: Expected "pending", actual "bogus-value" → state: Expected "pending" | "setting_up_worktree" | "running" | "gates_failed" | "gates_exhausted" | "fixing" | "failed" | "passed" | "committed" | "cleaning_up" | "cleaned_up" | "review_open" | "handoff_failed" | "skipped" | "rate_limited", actual "bogus-value"
      • formats/phax-plan-extraction, refuses plan.phases[0].effort outside its values (current, 0.32.0): plan.phases.0.effort: Expected "none", actual "bogus-value" → plan.phases.0.effort: Expected "none" | "off" | "low" | "medium" | "high" | "xhigh" | "max" | "ultracode" | "ultra", actual "bogus-value"
      • formats/phax-plan, refuses phases[0].effort outside its values (current): phases.0.effort: Expected "none", actual "bogus-value" → phases.0.effort: Expected "none" | "off" | "low" | "medium" | "high" | "xhigh" | "max" | "ultracode" | "ultra", actual "bogus-value"
      • formats/phax-plan, refuses phases[0].effort outside its values (0.17.0, 0.26.0, 0.28.0, 0.32.0): phases[0].effort: Expected "none", actual "bogus-value" → phases[0].effort: Expected "none" | "off" | "low" | "medium" | "high" | "xhigh" | "max" | "ultracode" | "ultra", actual "bogus-value"
      • formats/plan-hand-decision-answer, refuses decisions[0].id that breaks its pattern (current): decisions.0.id: Expected A question id of the artifact: no whitespace., actual "" → decisions.0.id: Expected a string matching the pattern ^\S+$, actual ""
      • formats/plan-lint, refuses findings[0].severity outside its values (current): findings.0.severity: Expected "error", actual "bogus-value" → findings.0.severity: Expected "error" | "warning", actual "bogus-value"
      • formats/registry, refuses runs[0].state outside its values (current): runs.0.state: Expected "created", actual "bogus-value" → runs.0.state: Expected "created" | "running" | "failed" | "review_open" | "completed" | "stopped" | "archived" | "interrupted" | "rate_limited" | "awaiting_review", actual "bogus-value"
      • formats/registry, refuses runs[0].state outside its values (0.17.0): runs[0].state: Expected "created", actual "bogus-value" → runs[0].state: Expected "created" | "running" | "failed" | "review_open" | "completed" | "stopped" | "archived" | "interrupted" | "rate_limited", actual "bogus-value"
      • formats/review-stop, refuses run when empty (current, 0.26.0): run: Expected The run's qualified name., actual "" → run: Expected a non empty string, actual ""
      • formats/run-list, refuses runs[0].state outside its values (current, 0.26.0, 0.30.0): runs.0.state: Expected "created", actual "bogus-value" → runs.0.state: Expected "created" | "running" | "failed" | "review_open" | "completed" | "stopped" | "archived" | "interrupted" | "rate_limited" | "awaiting_review", actual "bogus-value"
      • formats/run-list, refuses runs[0].qualifiedName when empty (current, 0.26.0, 0.30.0): runs.0.qualifiedName: Expected The run's qualified name: `<namespace>.<short name>`., actual "" → runs.0.qualifiedName: Expected a non empty string, actual ""
      • formats/run-status, refuses state outside its values (current, 0.26.0): state: Expected "created", actual "bogus-value" → state: Expected "created" | "running" | "failed" | "review_open" | "completed" | "stopped" | "archived" | "interrupted" | "rate_limited" | "awaiting_review", actual "bogus-value"
      • formats/run-status, refuses state outside its values (0.17.0): state: Expected "created", actual "bogus-value" → state: Expected "created" | "running" | "failed" | "review_open" | "completed" | "stopped" | "archived" | "interrupted" | "rate_limited", actual "bogus-value"
      • formats/spec-hand-decision-answer, refuses decisions[0].id that breaks its pattern (current): decisions.0.id: Expected A question id of the artifact: no whitespace., actual "" → decisions.0.id: Expected a string matching the pattern ^\S+$, actual ""
  • Refusals: the words that stayed. is missing, is unexpected, expected: …, Expected X, actual Y, Expected an object, actual null, and the config's gate step "…": output must be … and records.destination.remote must be … lines print as before. A string refused for being empty still reads a non empty string. @lbdremy/phax-schemas's Parsed failures use the same words, since the package renders through the same model. No file format, schema or exit code changes.

What's new

Effect 4 migration

The migration changes how phax is written, never what phax does: a difference a consumer can observe is either named here or a defect.

  • phax installs one Effect 4 version and no platform packages. package.json dependencies

    Now:

    "dependencies": {
      "effect": "^4.1.2",
      ...
    }
    Before
    "dependencies": {
      "@effect/platform": "^0.96.0",
      "@effect/platform-node": "^0.106.0",
      "effect": "^3.14.0",
      ...
    },
    "pnpm": { "packageExtensions": { "@effect/platform-node": {...}, "@effect/platform-node-shared": {...} } }
  • Refusals read exactly as they did before the migration. refusal lines

    Now:

    $schema: is missing; version: is unexpected
    acceptanceCriteria[2].refs[0]: is missing
      gate step "pnpm test": output must be "log" or "gate-report"
    Before
    $schema: is missing; version: is unexpected
    acceptanceCriteria[2].refs[0]: is missing
      gate step "pnpm test": output must be "log" or "gate-report"
  • A maintainer can apply the mechanical Effect 4 rewrites in one command and read what they fixed and what they left. pnpm codemod:effect4

    Now:

    $ pnpm codemod:effect4
    rule                    files  rewrites  reference
    either-to-result           61       418  v3-to-v4.md:<line>
    schema-decode-either       48       203  v3-to-v4.md:<line>
    context-tag                11        11  v3-to-v4.md:<line>
    schema-filters             37       156  v3-to-v4.md:<line>
    ...
    type errors   before  after
      src           1502    <n>
      tests         2910    <n>
    left to phases (<n>):
      schema  src/schemas/formatError.ts:4  ParseResult.ArrayFormatter -> <target>  v3-to-v4.md:<line>
      ...
    
    $ pnpm codemod:effect4 --check
    0 files would change
  • Phase sessions and the codemod read Effect's migration reference at the pinned tag from the repository. vendored reference

    Now:

    vendor/effect-migration/effect@4.1.2/
      SOURCE            # repository, tag, commit, licence
      MIGRATION.md
      v3-to-v4.md
      migration/cause.md ... migration/yieldable.md   (13 guides)
  • A plan reader sees which skill each phase follows and what that skill lets it change. migration skills

    Now:

    .claude/skills/effect4-lookup/SKILL.md     # resolve one error: reference, then guide, then node_modules/effect source
    .claude/skills/effect4-services/SKILL.md   # Context.Tag ports and layers; may change src/ports, src/infra layers, their tests
    .claude/skills/effect4-schema/SKILL.md     # Schema, formatError, JSON Schema generator, frozen decoders, packages/schemas
    .claude/skills/effect4-errors/SKILL.md     # Result, Exit, Cause, catch; may change error handling in app and infra
    
    Plan phase instructions, first line:
    - Follows skill: effect4-schema (with effect4-lookup for every symbol).
  • A migration run can stay green in each phase while type errors are worked down, and runs the full gate at its end. phax.json gate profile effect-migration

    Now:

    "gateProfiles": {
      "standard": [ ... ],
      "effect-migration": [
        { "command": "pnpm format", "surface": "local", "firing": "every-phase" },
        { "command": "pnpm codemod:effect4 --ratchet", "surface": "local", "firing": "every-phase" },
        { "command": "pnpm lint", "surface": "local", "firing": "every-phase" },
        { "command": "pnpm check:full", "surface": "local", "firing": "terminal" },
        { "command": "pnpm build", "surface": "product", "firing": "terminal" }
      ]
    }
    Before
    "gateProfiles": { "standard": [ ... ] }
  • Upgraders learn that phax now runs on Effect 4 and what that means for code composing the package's schemas. docs/upgrading.md

    Now:

    ### 0.37.0
    
    phax runs on Effect 4. Commands, files and refusals are unchanged.
    
    - @lbdremy/phax-schemas: its exported Schema values (RegistrySchema, PhaxPlanSchema, ...) are Effect 4 schemas. Code that composes them needs effect ^4.1.2; code that only calls the parse functions changes nothing.
    - The published JSON Schemas are unchanged; phax checks the ones Effect 4 generates against them by the documents they accept.
    Before
    ### 0.35.0
    ...

Fixes

  • fix(refusal): review fixes for the second groundwork (cdf3b19)
  • fix(config): name each __snapshots__ directory instead of **/__snapshots__/** (3402a64)

Other

  • feat(effect4): codemod rewrites Either.getOrThrow to Result.getOrThrow (d01fb2e)
  • feat(effect4): the Either.getOrThrow rule itself (7d1467e)