AGENTS.md (Technical)
Section titled “AGENTS.md (Technical)”Audience
Section titled “Audience”This technical article is for engineers, platform operators, and maintainers who execute repository changes.
What this repository is for
Section titled “What this repository is for”- This repository is the canonical source for NutsNews product, operations, deployment, cache, automation, environment, architecture, runbook, and cross-repo documentation.
- The repository is owned by the NutsNews wiki and operations program.
Path ownership
Section titled “Path ownership”- Canonical Technical sources live at the repository root or under
archive/,ios/,reports/, andupdates/. - Each canonical
<source>.mdowns exactly three tracked companions:audiences/simple/<source>.md,audiences/technical/<source>.md, anddiagrams/<source-without-md>.mmd. - Site code and platform tooling live in
src/,scripts/wiki/,tests/wiki/,.github/workflows/,astro.config.mjs,playwright.config.mjs, and the npm manifests. src/content/docs/,_site/, test results, reports, caches, and the generated inventory are build outputs. Do not edit or commit them.
Change policy
Section titled “Change policy”- A documentation-only change may be validated, committed, and pushed directly to
mainunder repository policy. - The pinned
automated-merge-docsworkflow is the only bot exception: it may publish a complete documentation-only bundle for an already-merged NutsNews pull request after provenance, path-boundary, content, link, Mermaid, secret, and build gates pass. - A site-code, tooling, test, dependency, configuration, or workflow change requires a branch, a normal ready-to-merge pull request, passing checks, and explicit merge approval.
- A mixed documentation and site-code change follows the pull-request policy.
- Preserve existing work and operational boundaries unless the task explicitly supersedes them.
Required document bundle
Section titled “Required document bundle”- The canonical source is authoritative, but its Simple mirror, Technical mirror, and accessible Mermaid diagram must all describe the current source.
- A meaningful Technical source edit makes the prior approval stale. Manual publication requires human review. Merge-triggered publication may instead use
state: automatedonly when the trusted workflow records the source repository, every merged PR, the merge SHA, workflow run, and current Technical-source hash after Codex exits. - Codex cannot grant itself write access, commit, push, or bypass a gate. The post-agent workflow rejects prohibited paths and records automated provenance deterministically.
- Never remove or bypass approval, diagram, inventory, link, route, accessibility, secret, or build gates to publish a change.
Exact commands
Section titled “Exact commands”For a new canonical document:
npm run docs:new -- <canonical-source.md> --collection <collection> --section <section>npm run docs:prepare -- <canonical-source.md> --forceThe --force form is the intentional next step for the blocked bundle just created by docs:new; do not use it to overwrite an unrelated existing bundle.
After a human reviews the Technical source, Simple mirror, Technical mirror, and diagram:
npm run docs:approve -- <canonical-source.md> --reviewed-by "<human-reviewer>" --confirm-human-reviewdocs:auto-approve is reserved for .github/workflows/automated-merge-docs.yml. Do not run it as a substitute for human review during normal authoring.
Before committing any documentation-only update:
npm run wiki:preparenpm run validate:contentnpm run validate:linksnpm run validate:mermaidnpm run test:content-routesnpm run buildSafety notes
Section titled “Safety notes”- Do not put credentials, secrets, temporary secrets, or local environment files in sources, mirrors, diagrams, logs, or artifacts.
- Use
.gitignoreand the wiki tooling for generated files. Do not discard unrelated work or use destructive Git cleanup. - If this contract changes manually, update this canonical source, both audience mirrors, and its diagram together, then obtain current human approval.
