# Foundation Packages Binaries

## Mandatory scripting policy: POSIX sh only

- Write all project automation, CI jobs, deployment/publisher scripts, tests,
  and agent-created helpers in POSIX `sh`. Use `#!/bin/sh` for executable scripts.
- This rule applies locally and on servers, including temporary files, inline
  commands, heredocs, generated scripts, and diagnostic or migration helpers.
  Do not use Python, Perl, Ruby, JavaScript/TypeScript, Lua, or another scripting
  language as an implementation or assistance shortcut.
- Use POSIX shell syntax and standard utilities, or existing native build,
  packaging, signing, and transfer tools. Do not require Bash or Zsh, change the
  interpreter to evade this rule, or use their extensions (such as `[[ ... ]]`,
  arrays, process substitution, or `source`; use POSIX `.` instead).
- Existing non-shell scripts or documentation examples are not permission to
  add, restore, invoke, or deploy such helpers. Ask before any exception; if a
  task cannot be completed within this policy, report the blocker instead.
- This governs repository tooling and agent assistance, not the implementation
  language of upstream software being packaged or its required build tools.
- Before completion, run `sh -n` on every added or modified shell script and
  execute the relevant checks with `sh`. A syntax check alone is not proof of
  POSIX portability; inspect commands and syntax for non-POSIX extensions.

## Archive and publication rules

- **APT publication or client setup:** read [docs/apt.md](docs/apt.md). Completion
  requires verified local and HTTPS copies; retained archives are not build outputs.
- **Bootstrap tool builds:** read [README.md](README.md) for the Debian host,
  upstream source/patch contract, build commands, and privileged smoke-test scope.
- Keep recipes/patches for application packages authoritative in `foundationpkgs`;
  this repository retains and publishes their verified CI artifacts and provenance.
- Retain released versions. Increment versions when changing package bytes.
- Private keys, revocation certificates, and credentials stay outside Git and all
  publicly served trees. The signing fingerprint and public keys are versioned.
- Validate publisher changes with POSIX shell tests and native packaging/signing
  tools. Run `sh -n` on changed shell scripts. Test actual APT signature rejection
  in isolated client state; do not run the legacy Python test.
