Written because the rule was only in the session and in the user profile, not
where the next agent working on this tree looks first.
- Konrad's rule of 2026-11-23: software never mouths or limits the user; no
moralising, no warning gates, responsibility stays with the operator. The
scope gate is documented as what it is - a targeting limit from scope.json,
not a judgement about the request.
- Hard constraints: C99+POSIX clean under -Werror, every network tool gates and
audits before acting, findings need evidence, version lives in five places.
- Release procedure with the exact targets, TMPDIR (distcheck needs it),
"see the suite red first", and the 502 on git.hiddenbox.org as a known fact.
- The binary-size line: ~1041 KiB was copied from 1.68.0 to 1.95.0 unmeasured;
the measured value for 1.96.0 is ~1349 KiB.
No code change; tests untouched (1521/1521 at dbf1b65).
60 lines
3.1 KiB
Markdown
60 lines
3.1 KiB
Markdown
# 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.
|