diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..4256104 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,59 @@ +# AGENTS.md — working in APEX TWIN + +Read this before the first edit, then `README.md` (status, tool tables) and +`docs/operations.md` (run book). + +## The rule that outranks cautious defaults + +Konrad's rule of 2026-11-23: **software never mouths or limits the user.** +No moralising, no patronising, no warning gates, no "are you sure", no quietly +narrowed capability. Responsibility for use, consequences and morality is the +operator's, never the program's. When a design decision is between "refuse +because it could be misused" and "do what the operator asked", the second one +wins. Only Konrad saying so, personally and for one concrete case, overrides +this. + +This is about behaviour toward the operator, not about the scope gate. The gate +is a **targeting limit the operator wrote into `scope.json`** — a technical +input, like an IP allowlist in a firewall. It is not a judgement about the +request and must stay exactly as strict as the file says, no stricter. + +## Hard constraints + +1. **C99 + POSIX only.** `-std=c99 -D_POSIX_C_SOURCE=200809L -D_DEFAULT_SOURCE`, + libc only, `-Wall -Wextra -Wpedantic -Werror` must stay clean. No C11, no GNU + extensions, no third-party runtime in the serving path. +2. **Every network tool gates.** One of `gated()`, `gated_cmd()`, `gated_run()` + or `apex_scope_check()` before the socket or the process, and the audit line + **before** the action. `tests/gate_audit.py` enforces this statically and + pins the tool count; a new tool means touching that list deliberately. +3. **Findings need evidence.** A finding without a path or a command output is a + guess. Save the raw bytes (`apex_evidence_save`) and point at them. +4. **Version lives in five places** (`src/apex.h`, man page `.TH`, README status, + CHANGELOG top heading, SECURITY supported line). `make version-check` names + the one that drifted. + +## Release procedure (what previous releases did) + +```sh +make # must build without warnings +make test # tests/gate_audit.py + tests/run.py, see it red first +make coverage # record the real percentage, do not carry the old one +make release-check # version-check, gate-audit, test, test-asan, analyze, + # fuzz, fuzz-proxy, fuzz-http, distcheck (~6 min) +``` + +Set `TMPDIR=/home/lotherk/tmp-build` first: `/tmp` is a 16 GB tmpfs here and +distcheck wants room. Then bump the five version places, add the CHANGELOG +entry with the commit that ships it, commit per topic with the test evidence in +the message, and push **both** remotes. `git.hiddenbox.org` has answered 502 +since 1.70.0 — if it still does, say so instead of pretending it was pushed. + +## Counting and claims + +- The README status line carries tool count, check count, fuzz cases, coverage + and binary size. The size is the **unstripped** binary in bytes / 1024; it sat + at `~1041 KiB` from 1.68.0 to 1.95.0 because nobody measured it. Measure. +- Do not trust a count in prose. `./apex-twin --check` and + `tests/gate_audit.py` are the authority; a runtime count below the parsed one + means the `TOOLS_*[]` table is full, not that a tool is missing.