builder-codex
AGENTS.md1 starsChanged 4 months agoMITView on GitHub
80% ของเวลา = Plan + Review รวมกัน Work เป็น 20% (AI เร็วอยู่แล้ว) Pattern reference: ดู BUILDER_CODEX.md § Pattern Library (P-01 → P-30) Skill reference: ดู skills/*/SKILL.md Version: AGENTS.md v3.0 sync with Builder Codex 3.0 (2026-06-20)
- Commits and pushes
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,542 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 repository9 other files it gives its agents.
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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 12
Run locally: เปิดไฟล์ใน browser หรือ python3 -m http.server 8000
- Very specific: line 31
Run npm ls หรือ check import จริง — กัน hallucination (P-23)
≈ “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
AGENTS.md
Entry point for AI coding agents. <150 lines by design. Full reference →
BUILDER_CODEX.md(Tier 3 master) +skills/(Tier 2 on-demand)
Project
Stack: Single-file HTML/JS + Firebase Realtime Database (asia-southeast1) + Cloudflare Workers Build system: None (vanilla) — เปิด HTML file ใน browser run ได้เลย Source of truth: Git repo (commit ทันทีหลัง agent เสร็จ) Audience: Thai market — UI ภาษาไทย, code/comment ภาษาอังกฤษ
Commands
- Run locally: เปิดไฟล์ใน browser หรือ
python3 -m http.server 8000 - Deploy:
git push origin main→ Cloudflare Pages auto-deploy - DB rules: Firebase Console > Realtime Database > Rules tab
Hard Rules (ห้ามฝ่าฝืน)
- Render functions =
function(){}+ string concat ONLY — ห้าม nested backtick template literal (crash root cause #1) - onclick =
data-idpattern + event delegation — ห้าม inline string escape - localStorage = check quota before setItem + fallback ทุกครั้ง (P-15, P-16)
- Firebase write = ต้องมี error handler — no exception (P-01)
- ZERO duplicate logic — extend existing function, ห้ามสร้าง parallel
- ทุก feature = single source of truth — บอกชื่อ function/section ที่เป็น SOT ก่อนแก้
Before Writing Code (Plan phase — P-29)
- ระบุ existing function/section ที่กระทบ
- ระบุ single source of truth ที่จะแก้
- List side effects ที่อาจเกิด
- ถ้า scope ไม่ชัด → ถามก่อน ห้ามเดาแล้วเขียนทับ
After Writing Code (Review phase)
- Run
npm lsหรือ check import จริง — กัน hallucination (P-23) - ตรวจ schema กับ Firebase rules จริง ไม่ใช่ memory
- ทดสอบใน sandbox 1 รอบก่อน commit
- Diff ดูว่ามี duplicate logic เกิดขึ้นไหม
Known Bug Patterns (ห้าม trigger)
- Nested backtick crash → string concat เท่านั้นใน render
- localStorage overflow > 3 เดือน → ต้องมี archive/cleanup strategy
- Context loss in long session → /compact ที่ 60% token (P-26)
- onclick escape issues → data-id + delegation
- AI hallucinated imports → verify ทุก import (P-23)
File Layout
project_root/
├── *.html ← single-file app(s)
├── AGENTS.md ← this file
├── CAPTURE_LOG.md ← session learnings
├── BUILDER_CODEX.md ← master reference
└── skills/ ← on-demand SKILL.mdCompounding Loop (ทุก session ต้องวิ่ง)
Plan (อ่าน Codex + Capture Log) → Work (ตาม plan) → Review (เทียบ pattern) → Compound (เขียน Capture entry)
80% ของเวลา = Plan + Review รวมกัน Work เป็น 20% (AI เร็วอยู่แล้ว)
Solo Builder Constraints
- ไม่มี peer review → ใช้ AI #2 review (P-30) ก่อน merge
- เครื่องเดียวเสีย = ทุก project หาย → backup weekly (P-24)
- ไม่มี ops team → cost dashboard ดู 1 ครั้ง/สัปดาห์ (P-25)
Communication Style
- Thai casual สำหรับ discussion
- English สำหรับ code, variable name, comment
- Direct fix > lengthy explanation
- Flag risk ก่อน implement ไม่ใช่หลัง
- Token ยาว → suggest splitting task
When in Doubt
- อ่าน
BUILDER_CODEX.mdPattern Library ที่ตรง issue - อ่าน
CAPTURE_LOG.mdมี case คล้ายกันไหม - ถาม human ก่อน assume
Forbidden
- ❌ Refactor ที่ไม่ได้ขอ
- ❌ "ปรับปรุง" structure โดยไม่ flag
- ❌ Catch error แบบเงียบ (ต้อง report/log เสมอ)
- ❌ Hide secret ใน client code (P-11)
- ❌ Revoke credential เก่าก่อนทดสอบใหม่ (P-07)
- ❌ Patch ด้วย redesign (P-21)
Pattern reference: ดู BUILDER_CODEX.md § Pattern Library (P-01 → P-30)
Skill reference: ดู skills/*/SKILL.md
Version: AGENTS.md v3.0 sync with Builder Codex 3.0 (2026-06-20)
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.

