Expand description
Claude-Code-parity settings ladder for apr code
(PMAT-CODE-CONFIG-LADDER-001).
Implements the same user-global → project-local → CLI-override
precedence ladder Claude Code uses for ~/.claude/settings.json,
adapted to the apr-code surface:
| Layer | Path | Notes |
|---|---|---|
| User-global | $APR_CONFIG/settings.json (override) or ~/.config/apr/settings.json | machine-wide defaults |
| Project-local | <project_root>/.apr/settings.json | repo-specific overrides |
| CLI flags | --model, --max-turns, --manifest | always wins |
§Precedence
Latter layers override earlier ones field-by-field. Missing files at any layer are non-errors (the layer just contributes no fields). Malformed JSON is a hard error so the operator notices the broken file rather than silently running on partial config (Poka-Yoke).
§Why JSON, not TOML
apr code’s legacy --manifest flag accepts TOML
(AgentManifest). The settings ladder
is additive: settings.json carries the small set of fields a typical
user wants to set machine-wide (model, max_turns, system prompt extras),
and matches Claude Code’s settings.json format so users coming from
Claude Code can copy their settings file with minimal edits.
For full agent specification (capabilities, hooks, MCP servers,
resource quotas), use --manifest path/to/manifest.toml — it
short-circuits the ladder.
Structs§
- AprSettings
- Claude-Code-parity settings layer (
apr code).