Apex-core
AGENTS.md1 starsChanged 3 months agoMITView on GitHub
Universal, polyglot operating protocol for AI coding agents. Inspect the target file and root manifest together. Load only relevant domain adapters; high-risk work loads the adapter matching the touched stack. Low-risk work touching 1–3 files uses R0–R4 without loading adapters. For Auth, RBAC, money, PII, schemas, concurrency/OCC, or breaking APIs, load the adapter matching the touched stack: web-fullstack.md for UI, backend-data.md for Node/Prisma, or polyglot-core.md for Python/.NET. Load multiple adapters only for cross-stack changes. S1 Discovery → S2 Adaptive Plan…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository5 other files it gives its agents.
- apex-coreSkill
- backend-dataSkill
- cartographySkill
- frontendSkill
- quality-verifySkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Read-only intent (explain, audit, why, เช็คให้หน่อย without an action verb) means diagnose only.
- Distinctive: line 11
Before destructive changes (schema drops, data truncation, auth/session replacement, important file deletion), summarize impact and get …
- Very specific: line 13
[R2] In-RAM Fast Targeted Verification: Run a fast, project-native targeted check (for example vue-tsc --noEmit, tsc --noEmit, pytest -q, …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Apex Micro-Kernel (v7.0.0)
Universal, polyglot operating protocol for AI coding agents.
1. Golden Rules
- [R0] Absolute Context Grounding: Act objectively; challenge weak assumptions. Distinguish
[Direct]from[Inferred]; avoid flattery and false certainty; lead with the conclusion. Apex means Apex-core. Keep all agent instructions in thisAGENTS.md; do not create parallel agent config files. - [R1] 3-Tier Dynamic Intent:
- Read-only intent (
explain,audit,why,เช็คให้หน่อยwithout an action verb) means diagnose only; make no edits. - Actionable intent (
fix,add,refactor,implement) means diagnose, implement, and verify in one turn. - Before destructive changes (schema drops, data truncation, auth/session replacement, important file deletion), summarize impact and get explicit approval.
- 1–3 files: fast track, no plan file. 4+ files or architecture changes: create a concise plan in
docs/plans/YYYY-MM-DD-<slug>.md; mark it Commit or Ephemeral. Keep strategic memory in Nexus.
- Read-only intent (
- [R2] In-RAM Fast Targeted Verification: Run a fast, project-native targeted check (for example
vue-tsc --noEmit,tsc --noEmit,pytest -q, ordotnet test). Do not run production builds for minor edits. - [R3] Strict Seam Binding: Include terminal results and label the seam
[Verified: Test],[Verified: Compiler],[Syntax-Only], or[Unverified: Visual]. Never invent tests or stall when a suitable check is unavailable; state the fallback. After two consecutive unexpected failures, stop and report root cause and repair options. For legacy failures, prevent regressions rather than requiring an impossible clean baseline. - [R4] Surgical Diffs & Working Tree Purity: Change only what the defect requires; avoid drive-by refactors. Do not commit scratch/demo/dummy tests. Put architecture, PRD, and test specs under
docs/; keep root to manifests, README, and configuration.
2. Deterministic JIT Adapter Bus & Risk Override Gate
Inspect the target file and root manifest together. Load only relevant domain adapters; high-risk work loads the adapter matching the touched stack.
| Signal | Adapter | Fast check |
package.json uses Next, Nuxt, React, or Vue | adapters/web-fullstack.md | vue-tsc --noEmit or tsc --noEmit |
Prisma, Drizzle, or server/api | adapters/backend-data.md | Targeted API/route test |
pyproject.toml, *.csproj, or *.sh | adapters/polyglot-core.md | pytest -q, dotnet test, or bash -n |
| Universal principles or security | core/principles.md | Apply universal baseline |
Low-risk work touching 1–3 files uses R0–R4 without loading adapters. For Auth, RBAC, money, PII, schemas, concurrency/OCC, or breaking APIs, load the adapter matching the touched stack: web-fullstack.md for UI, backend-data.md for Node/Prisma, or polyglot-core.md for Python/.NET. Load multiple adapters only for cross-stack changes.
3. Execution Loop
S1 Discovery → S2 Adaptive Plan → S3 Execution → S4 Fast Verify
For new systems or substantial features, load Build workflow. Plan by uncertainty, dependencies, and risk as well as file count; retain the low-risk fast track. Use quality-verify for completion review. Kernel invariants govern references and adapters; user instructions and project conventions take precedence.
Optional Nexus MCP: When available, call nexus_get_state at project start and nexus_save_session at completion. Never invent memory when it is unavailable.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

