modular-monolith-code-guide
AGENTS.md0 starsChanged 2 months agoMITView on GitHub
Ini adalah standing instructions untuk AI coding agent (Codex, Cursor, Gemini CLI, Antigravity, Claude Code, dsb.) yang bekerja di project yang mengadopsi konvensi ini. Empat dokumen referensi lengkap ada di references/ — baca hanya file yang relevan dengan task yang sedang dikerjakan, jangan load semuanya sekaligus kalau task-nya cuma menyentuh satu layer. Keempat dokumen saling mereferensikan satu sama lain — kalau menemukan referensi silang yang relevan dengan pekerjaan yang sedang dilakukan, buka juga dokumen yang dirujuk. Setiap dokumen adalah template,…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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.
- .cursor/rules/backend-go-modular-monolith.mdcCursor rule
- .cursor/rules/database-postgres.mdcCursor rule
- .cursor/rules/frontend-nextjs-atomic-design.mdcCursor rule
- .cursor/rules/git-workflow.mdcCursor rule
- modular-monolith-code-guideSkill
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Git: commit granular per module/per layer (bukan satu commit besar per fitur), tag rilis dan aksi berdampak luas (repo baru, deploy …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
Modular Monolith Code Guide — Agent Instructions
Ini adalah standing instructions untuk AI coding agent (Codex, Cursor, Gemini CLI, Antigravity, Claude Code, dsb.) yang bekerja di project yang mengadopsi konvensi ini. Empat dokumen referensi lengkap ada di references/ — baca hanya file yang relevan dengan task yang sedang dikerjakan, jangan load semuanya sekaligus kalau task-nya cuma menyentuh satu layer.
Kapan baca panduan yang mana
| Situasi | Baca |
| Scaffold/rapikan backend Go (struktur module, layer interface/service/repository/handler, komunikasi antar module, testing, containerization) | references/BACKEND_GUIDE.md |
| Desain skema database, migrasi, boundary data lintas module, indexing, konvensi penamaan tabel/kolom | references/DATABASE_GUIDE.md |
| Scaffold/rapikan frontend Next.js (App Router, Atomic Design, struktur komponen, komunikasi ke backend) | references/FRONTEND_GUIDE.md |
| Strategi branching, format commit, tagging/versioning, aturan CI/CD, aksi yang butuh konfirmasi user | references/GIT_GUIDE.md |
Keempat dokumen saling mereferensikan satu sama lain — kalau menemukan referensi silang yang relevan dengan pekerjaan yang sedang dilakukan, buka juga dokumen yang dirujuk.
Cara pakai panduan ini di project nyata
Setiap dokumen adalah template, bukan konfigurasi siap pakai:
- Ganti placeholder (
{module},{domain},{subdomain},{route-name},{project}, dst.) dengan nama nyata sesuai domain bisnis project yang sedang dikerjakan. Jangan biarkan placeholder literal muncul di kode/commit message yang dihasilkan. - Perhatikan tag
[Opsional]— bagian yang ditandai begitu (mis. pola multi-tenant diDATABASE_GUIDE.md, CLI tool terpisah diBACKEND_GUIDE.md, multi-domain frontend diFRONTEND_GUIDE.md) hanya relevan kalau arsitektur project memang membutuhkannya. Kalau project-nya single-tenant/single-app biasa, lewati bagian itu. - Dokumen sumber project menang. Kalau project punya PRD/architecture decision record sendiri yang bertentangan dengan aturan di sini, ikuti dokumen sumber project itu dan beri tahu user soal pertentangannya — jangan diam-diam memilih salah satu.
- Jalankan checklist di akhir tiap dokumen sebelum melaporkan sebuah module/halaman/perubahan skema/rilis sebagai "selesai".
Prinsip inti yang mengikat keempat dokumen
- Backend: satu binary, banyak module, komunikasi antar module wajib lewat interface Go langsung (bukan HTTP), boundary ditegakkan disiplin+review bukan compiler.
- Database: migrasi lewat
golang-migrate(bukanAutoMigrate), satu module tidak boleh query tabel module lain secara langsung, payload JSON fleksibel dipertahankan sebagaijsonbbebas (bukan dipecah jadi kolom demi "kerapian" semu). - Frontend: Atomic Design ketat — tiap komponen wajib folder sendiri +
.module.csspasangan,page.tsxhanya fetch data lalu panggil Template, tidak ada logic UI langsung di routing layer. - Git: commit granular per module/per layer (bukan satu commit besar per fitur), tag rilis dan aksi berdampak luas (repo baru, deploy production, migrasi massal) selalu menunggu instruksi eksplisit user — lihat
references/GIT_GUIDE.md§5 untuk daftar lengkap aksi yang butuh konfirmasi.
Bahasa
Seluruh isi dokumen referensi ditulis dalam Bahasa Indonesia dengan gaya "aturan mutlak" (source of truth) — tegas, langsung ke aturan, lengkap dengan tabel dan checklist.
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.

