diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..ca80f2a16 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,367 @@ +# AGENTS.md — spack-stack + +Guidance for AI coding agents working in this repository. spack-stack is +spack-based distribution of software dependencies and packages supporting +a wide range of numerical weather prediction and data assimilation systems. + +## Ground rules for agents + +- Every change is reviewed by a human before it becomes a pull request. +- Independent work is fine when directed; independently filing pull requests + and bugs is not acceptable. +- No tool attribution (`Co-Authored-By`, "Generated with…") anywhere. +- Submodule pins (`spack/`, `repos/builtin/`) stay put unless moving them is the + task. +- Follow the output discipline in §3. Streaming spack output will overwhelm your + context window and end the session. +- Run `spack dependents ` before anything destructive — + `spack uninstall --dependents` can take down half an env. + +## Contents + +| § | Section | TL;DR | +|---|---|---| +| 1 | Orientation | Repo map, submodules, recipe paths, where docs live | +| 2 | Build procedure | The 7-step spine; admin vs non-admin prerequisites | +| 3 | Output discipline | tee output to logs and background-run for verbose and slow commands like concretize and install | +| 4 | Configuration model | Configs are snapshotted; merge precedence; promotion | +| 5 | Sharp edges | The traps that waste days | +| 6 | Debugging | Error extraction → build-env → lock queries → symptom table | +| 7 | New releases | Reconciling spack / spack-stack / machine drift | +| 8 | Caches | Staging scratch vs binary build-cache mirrors | +| 9 | Utilities and docs | `util/` catalog; Wiki vs in-repo READMEs | + +## 1. Orientation + +Wiki: [Preconfigured Sites](https://github.com/JCSDA/spack-stack/wiki/Preconfigured-Sites) (tier1) · +[Configurable Sites](https://github.com/JCSDA/spack-stack/wiki/Configurable-Sites) (tier2) + +- `configs/common/` — cross-site defaults, including per-compiler + `packages_.yaml`. +- `configs/sites/tier{1,2}//` — machine configs. **tier1** = preconfigured, + supported, often operational HPC; **tier2** = configurable/research. Orthogonal + to the admin/non-admin split in §2. +- `configs/templates/