Add settings

From brabos-ai/code-addiction · View interactive version

Add settings is an AI agent skill from the GitHub repository brabos-ai/code-addiction. Use when a command persists project configuration or a setup record — the project settings file .codeadd/settings.json, who owns it, how a command reads, merges and writes its own section, the content rule, the `qa` and `setup` section schemas and the receipt fields.

How to use this skill

Skill file

Project Settings — `.codeadd/settings.json`

<!-- uses:

-->

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

When NOT to Use

Location and Ownership

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

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

Hard bans

How Scripts Read It

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

Rules

ALWAYS:

NEVER:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.