Borrowing it
Nothing to install: this file belongs to pulseaiclub/phi. 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/pulseaiclub/phi/main/AGENTS.mdgit clone --depth 1 https://github.com/pulseaiclub/phiWrote 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/pulseaiclub/phi/agents-md)<a href="https://agentmods.dev/instructions/pulseaiclub/phi/agents-md"><img src="https://agentmods.dev/badge/instructions/pulseaiclub/phi/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/pulseaiclub/phi/agents-md"><img src="https://agentmods.dev/badge/instructions/pulseaiclub/phi/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.01063 | $0.01063 |
| Opus 5.5 | $0.00425 | $0.00425 |
| Sonnet 5.5 | $0.00213 | $0.00213 |
| Haiku 4.5 | $0.00106 | $0.00106 |
Grade A, and why
phi 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 22d 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 — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Phi
Lean, high-performance Go terminal coding-agent harness. Layout: doc/project-layout.md. Humans: CONTRIBUTING.md.
Communication Preferences
- Dry, concise, low-key humor. No flattery, no forced memes. Skip preambles and postambles.
- Comments explain "why", not "what". English only — this repo was migrated off Chinese comments.
- Error messages: actionable and specific. No vague "something went wrong".
Constraints
- Tool loop is ExtensionPre → Gate/Ask → Run → ExtensionPost. Don't bypass the permission gate when changing the executor. Don't put MCP server tool schemas on the model — MCP rides
ls/read/writeviamcp://URLs. - Extensions are PXB subprocesses (
phi.yaml+ native binary under~/.phi/extensions/.phi/extensions). Wire:ext/go/pxb. Author SDK: Goext/go/phi(modulegithub.com/pulseaiclub/phi/ext/go). Host:internal/extension. See doc/extensions.md. - PXB message payloads are generated. Fields are declared once in
ext/go/pxb/schema.go(pxb:"<tag>[,opt]");make generatewritesmsg_gen.go. Never hand-editmsg_gen.goor add encode/decode switches —make checkrunsgenerate-checkand fails on drift. The Rust side (ext/rust/src/pxb/msg.rs) mirrors the same tags by hand. - Keep
editfail-closed. Edits are anchored sloppy patches (*** SM:EDIT/*** SM:FIND/*** SM:PUT|*** SM:AFTER) applied atomically; a missing or ambiguous anchor must fail with actionable guidance, never fall back to whole-file rewrite. - Sub-agent transcripts stay under
~/.phi/jobs/<id>/. Parent context gets the wait/task summary only. Child engines have noagent_*tools (no nesting). Default child role is explore (no write/edit; bash allowed except hard denies). - UI split:
internal/componentsrender;internal/tuiwires the shell. Non-shell pieces live underinternal/tui/controller(Engine/Bus/Msg),internal/tui/transcript(Mapper); version ininternal/version. Keep widgets dumb. - TUI assembly:
cmdconstructscontroller.Bus/controller.Controller/ App and passes them intoeditor.NewEditor(...), which builds the commands registry (commands.NewBuiltinRegistry). Do not hideGetDefaultProjectinsidetuiconstructors; do not return half-initialized Controllers (engineErrzombies). Prefer constructor parameters overXxxDepsbags. - Stay lean and fast. Direct module deps are few on purpose. Don't add a dependency without a clear need. Prefer changes that keep startup, idle RSS, and rebuild time small.
- Format with
make fmt(gofumpt / goimports / golines, 120 cols, local prefixgithub.com/pulseaiclub/phi). Don't hand-fight import groups. testing/testifystay in*_test.go.depguardwill fail the lint otherwise.- Tests use testify (
assert/require) for assertions — no rawt.Fatalfchecks. - After dependency changes:
go mod tidy.go.modis not generated.
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.
- 22d ago Changed · +2 tokens per session 2b291e465de9
- 1mo ago Changed · +32 tokens per session e05ad0522dd3
- 1mo ago Changed · +2 lines · +114 tokens per session f123b91a2438
- 1mo ago Changed · +19 tokens per session 9ada29491b70
- 1mo ago Changed · +7 tokens per session 910c4cc526c0
- 2mo ago Changed · +33 tokens per session ccd345f1ea7f
- 2mo ago First seen · 54 lines · 856 tokens per session scan A 854300692db5
phi AGENTS.md is an instructions file published in the GitHub repository pulseaiclub/phi (887 stars, last pushed yesterday), licensed MIT. It adds 1,063 tokens to every session, about $0.0043 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.
phi AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| phi AGENTS.mdpulseaiclub/phi | Instructions file | 887 | yesterday | MIT | A | 1,063 | 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 |