Borrowing it
Nothing to install: this file belongs to lisachenko/z-engine. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/lisachenko/z-engine/8.4/AGENTS.mdgit clone --depth 1 https://github.com/lisachenko/z-engineWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/lisachenko/z-engine/agents-md)<a href="https://agentmods.dev/instructions/lisachenko/z-engine/agents-md"><img src="https://agentmods.dev/badge/instructions/lisachenko/z-engine/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/lisachenko/z-engine/agents-md"><img src="https://agentmods.dev/badge/instructions/lisachenko/z-engine/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.05224 | $0.05224 |
| Opus 5.5 | $0.02090 | $0.02090 |
| Sonnet 5.5 | $0.01045 | $0.01045 |
| Haiku 4.5 | $0.00522 | $0.00522 |
Grade A, and why
z-engine AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 365 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Working on z-engine
z-engine reaches into the Zend Engine's own memory through PHP FFI. That makes it uniquely powerful and uniquely fragile: a wrong struct offset or a call against the wrong PHP version does not throw — it corrupts memory and segfaults the interpreter. These rules exist to keep that from happening. They apply to human contributors and automated agents alike.
The one rule that is non-negotiable: version matching
Never run z-engine code or tests against a PHP minor version other than the
one the current branch targets. The engine's C structures change between
every minor version (zend_class_entry alone changed size in 8.1, 8.3 and
8.4). z-engine reads those structures by offset. Run it on a mismatched
version and you are reading and writing the wrong memory — the result is a
crash, or worse, silent corruption.
mastertargets the newest supported PHP minor (currently 8.5).- Branch
8.4targets PHP 8.4. - Branch
8.0is the frozen legacy line for PHP 8.0.
Core::init() enforces this at runtime and refuses to boot on the wrong minor.
Do not try to defeat that guard.
Branch model
Fixes land on the minimum affected version branch and are merged upward,
never cherry-picked downward. The succession is declared in
.github/branch-flow.json and automated by .github/workflows/merge-up.yml,
which opens a merge-up PR when a version branch is pushed.
8.0 (frozen) 8.4 ──► master (8.5)
So a bug that exists in both 8.4 and 8.5 is fixed on 8.4, and the cascade
carries it into master. A bug that only exists on 8.5 is fixed on master
directly. When resolving a merge-up conflict inside include/, do not
merge the generated headers textually — regenerate them on the target branch
(composer gen-headers) instead.
Generated engine definitions — never hand-edit
Everything under include/<minor>/<os>-<arch>-<ts>/ is generated:
| File | What it is |
|---|---|
engine.h |
FFI header (structs, functions, globals) sliced from the PHP source |
constants.php |
#define/enum/opcode values, the ground truth for the PHP class constants |
layouts.json |
sizeof/offsetof of every dereferenced struct, from the C compiler |
probe.c |
the generated C probe (kept so a probe-only run can reuse it) |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 365 lines · 5,224 tokens per session scan A c16a48ded4fe
z-engine AGENTS.md is an instructions file published in the GitHub repository lisachenko/z-engine (456 stars, last pushed 25d ago), licensed MIT. It adds 5,224 tokens to every session, about $0.0209 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
z-engine AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| z-engine AGENTS.mdlisachenko/z-engine | Instructions file | 456 | 25d ago | MIT | A | 5,224 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |