Skip to content

Technical Papers

Design papers and architecture documentation exploring PEtFiSh's engineering decisions.

- :material-layers-outline: **[System Prompt Architecture](sysprompt-design.md)** --- How PEtFiSh structures AI agent instructions with layered injection and on-demand loading. - :material-currency-usd: **[Token Cost Engineering](compaction.md)** --- Reducing session costs by 20% through compaction frequency reduction and behavioral change. - :material-gate: **[Companion Gateway Architecture](companion-gateway.md)** --- How the always-on interception layer works β€” design rationale, step evolution, and implementation mechanics.