Project Settings — `.codeadd/settings.json`
<!-- uses:
- command: /add-qa-setup
- command: /add-setup
- script: qa-preflight.cjs
- script: status.cjs
- skill: add--setup-contract
- skill: add--doc-schemas
- agent: e2e-agent
-->
Overview
.codeadd/settings.json is the one project settings file. It is project-owned, versioned and committed to git. It holds one top-level section per command: the values the command scaffolded, its receipt state and its decision log. A command that needs to persist project configuration writes its section here and never invents a new file.
When to Use
- A command stores project-specific values or a setup receipt.
- A script or agent needs to read those values.
- You are changing the shape of a section.
When NOT to Use
- Feature and plugin toggles — they stay in
.codeadd/manifest.json, which is CLI-owned, per machine and gitignored. - Editor settings — those belong to the editor's own file, not to this one.
Location and Ownership
- Location: always the project root's
.codeadd/settings.json, also on a--globalinstall, because settings are per project. - Top level:
{ "schema": 1, "qa": {…}, "setup": {…} }. One section per command; a section appears when its command first writes it. - Only commands write it, each only its own section.
/add-qa-setupwritesqa./add-setupwritessetup. - Scripts only read it (
qa-preflight.cjs,status.cjs). A malformed file reads asbrokenor STALE, never as a crash. - The CLI writes it only through migration
0005-qa-settings. It never rewrites it on install, update or modify. - Always say
.codeadd/settings.jsonin full. The bare name is ambiguous with the editor's own settings file.
Read → Merge → Write
IF A COMMAND WRITES ITS SECTION:
⛔ DO NOT: Write the file from a template, or replace the whole file
⛔ DO NOT: Drop a key you do not know — unknown keys inside any section are the user's
⛔ DO NOT: Touch another command's section
✅ DO: Read the file (absent = `{ "schema": 1 }`), merge your section key by key, write it back
- A file that does not parse is never overwritten. Report it and stop.
- Keys are written in the order the schema lists them. The file is pretty-printed with two spaces and ends with a newline, so a diff shows only what changed.
Content Rule
Values, short descriptions and decisions go in .codeadd/settings.json. Only prompt-like or long guidance text goes in a .md file, referenced from the JSON by a relative path (for example "notes": "settings/<name>.md"). No prompts in JSON.
bootHint is a one-line hint, so it stays a string.
No credential, password or token value goes in .codeadd/settings.json — it is committed. A secret is only ever referred to by the NAME of the environment variable that holds it.
Section `qa`
Written by /add-qa-setup. Value fields first, then receipt fields.
{
"schema": 1,
"qa": {
"baseUrl": "http://localhost:<port>",
"viewports": { "desktop": [1440, 900], "tablet": [768, 1024], "mobile": [375, 812] },
"bootHint": "<command that starts the app>",
"seed": { "command": "<command that runs the seed in .codeadd/qa/>", "env": ["<ENV_VAR_NAME>"] },
"setup-shape": "sha256:<16 hex>",
"framework-version": "1.7.0",
"first-run": "2026-07-27",
"last-run": "2026-10-25",
"materialized": [
{ "path": ".codeadd/settings.json", "owner": "shared", "hash": null },
{ "path": ".codeadd/qa/", "owner": "shared", "hash": null },
{ "path": ".claude/skills/qa-project/SKILL.md", "owner": "setup", "hash": "sha256:<hex>" }
],
"prereqs": { "playwright-test": "installed", "chromium": "already-present", "playwright-mcp": "declined" },
"qa-pipeline-feature": "enabled",
"migration": { "detected": ["cypress"], "decision": "declined", "decided-at": "2026-07-27" },
"log": [
{ "date": "2026-07-27", "item": "playwright-mcp", "decision": "declined", "reason": "QA runs in CI only", "shape": "sha256:<hex>" }
]
}
}
Value fields
| Field | Rule |
|---|---|
| qa.baseUrl | URL the app answers on. Required for QA to run; the config probe reads it |
| qa.viewports | Map of viewport name to [width, height] |
| qa.bootHint | One line: the command that starts the app |
| qa.seed.command | How to run the seed in .codeadd/qa/ — a command in the project's own runtime, with no bash dependency. Required for QA to run |
| qa.seed.env | Array of env var NAMES the seed needs, never values. May be empty or absent when the seed needs none. /add-qa-setup writes it; @e2e-agent may merge one new name into it when a feature's seed update needs it |
Value fields follow the per-key merge rule in {{skill:add--setup-contract/SKILL.md}}: keys the user authored are kept.
Section `setup`
Written by /add-setup, which has no ## Materializes block, so setup-shape is the literal "none". It records what was offered, what the user decided and why. It uses the receipt fields below and the same read → merge → write rule.
{
"schema": 1,
"setup": {
"setup-shape": "none",
"framework-version": "1.7.0",
"first-run": "2026-10-25",
"last-run": "2026-10-25",
"offered": {
"qa-pipeline": "enabled", "playwright": "enabled", "gitnexus": "declined", "design": "enabled",
"agent-mode": "declined", "tdd-pipeline": "already-on", "docs-pruning": "declined",
"qa-setup": "enabled", "wiki": "enabled", "version-record": "enabled"
},
"log": [
{ "date": "2026-10-25", "item": "gitnexus", "decision": "declined", "reason": "team already uses another code index" }
]
}
}
| Field | Rule |
|---|---|
| setup.offered.<item> | One key per item ever offered: each feature and plugin by its name in the ecosystem Features and Plugins tables, plus qa-setup, wiki and version-record. One of: enabled (this run turned it on), already-on (it was on before the run), declined (offered, user said no), unavailable (legacy, no longer written; an item recorded unavailable is offered again as new), failed (attempted, the check still fails). An item that did not run keeps its previous value |
| setup.log[] | Append-only. Entry: { date, item, decision, reason }. One entry per item decided in a run, declined included. A reversed decision is a NEW entry. reason is the user's reason, or the detected one when the user gave none |
An item is new when its name is absent from offered. framework-version is never compared to decide that.
Receipt Fields
A receipt is the record a command leaves so a later framework release can compute whether the project's state is current, and so a deliberate no is never mistaken for an unfinished install. The receipt fields live in the command's section, next to its values. They are the generic part of the schema: any command with a section uses the same names.
| Field | Rule |
|---|---|
| setup-shape | The shipped shape hash in force when the recorded state was materialized: sha256: + 16 hex, or the literal "none" for a section whose command declares no ## Materializes. Read by status.cjs and qa-preflight.cjs |
| framework-version | Informational only. Never compared to compute staleness — a release that did not touch the command must stay silent |
| first-run | ISO date of the first setup run. Never rewritten once set |
| last-run | ISO date of the most recent run, including a verified-current no-op. A run that changed nothing still advances it |
| materialized[].path | Path of a file the command wrote. For a section of this file, .codeadd/settings.json |
| materialized[].owner | setup (this command is the sole writer) or shared (another command also writes it). .codeadd/settings.json is always shared |
| materialized[].hash | sha256:<hex> of the file content for owner: setup. MUST be null for owner: shared — hashing a co-owned file produces permanent false drift |
| prereqs.<name> | One of: installed (this run installed it), already-present (functionally verified before this run), declined (offered, user said no), failed (attempted, verification still fails), not-offered (never reached) |
| qa-pipeline-feature | One of: enabled, already-enabled, declined, enable-noop |
| migration.detected | List of tooling ids, sorted alphabetically, from the scan. [] when nothing was found. This list IS the fingerprint — do not hash it |
| migration.decision | One of: none-found, declined, migrated, not-offered |
| migration.decided-at | ISO date the decision was taken. Absent when decision: none-found |
| log[] | Append-only decision log. Entry: { date, item, decision, reason, shape } |
Log rules
- Append-only. Never edit or delete an existing entry. A reversed decision is a NEW entry, not an edit.
- Decisions only, never instructions. An entry records a choice that changes behaviour: a declined prerequisite, a declined migration, a STALE re-materialize. Never step-by-step narration, never "next time do X".
- One entry per decision, with the
setup-shapein force when it was taken — a section withsetup-shape: "none"carries noshapekey.
Hard bans
- A
materializedentry withowner: sharedcarrying a non-nullhash. - A
setup-shapevalue that is not a baresha256:+ 16 hex in a section whose command has a contract, and neither a baresha256:+ 16 hex nor"none"in a section whose command has no contract. - Editing or removing an existing
logentry. - Narration, instructions or aspirational language in any
logentry. - Rewriting
first-run. - A value outside the declared vocabulary of a field.
How Scripts Read It
qa-preflight.cjsreadsqa.seedforQA_SEED(configuration only; it never runs the seed),qa.baseUrlforQA_CONFIG, andqa["setup-shape"]withqa["framework-version"]forQA_RECEIPT.status.cjsreadsqa["setup-shape"]forSETUP_QA.- No script reads
setup. - A file with no
qasection reads as missing config and missing receipt. A file that does not parse reads asbrokeninqa-preflight.cjsand as STALE instatus.cjs.
Git
.codeadd/* is gitignored, so the managed .gitignore block adds exceptions: !.codeadd/settings.json, !.codeadd/wiki/ and !.codeadd/qa/. The exception for a directory works because .codeadd/* ignores only the direct children of .codeadd/. Commit .codeadd/settings.json and the generated QA seed in .codeadd/qa/ (env var names only).
Related
{{skill:add--setup-contract/SKILL.md}}— the shape comparison that reads the receipt fields.{{skill:add--doc-schemas/SKILL.md}}— the legacy markdown receipt category, now a pointer to this skill.
Rules
ALWAYS:
- Read, merge and write only your own section
- Say
.codeadd/settings.jsonin full
NEVER:
- Hash a
sharedentry - Edit or delete an existing
logentry