From 7827eb7f2d9bf9696b6a63eb1247addf3b96f2c6 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Sun, 26 Jul 2026 11:46:14 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20add=20principle=20#29=20=E2=80=94=20Nev?= =?UTF-8?q?er=20Assume,=20Show=20Evidence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Every claim must have evidence from codebase, docs, or verified output - No guessing on file structure, API signatures, errors, config, versions - Must search before answering, ask when uncertain - Updated hook to reinforce 'never assume' rule --- hooks/scripts/detect-project.sh | 3 +++ skills/engineering-principles/SKILL.md | 31 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/hooks/scripts/detect-project.sh b/hooks/scripts/detect-project.sh index bd7652e..96fbb9c 100755 --- a/hooks/scripts/detect-project.sh +++ b/hooks/scripts/detect-project.sh @@ -82,4 +82,7 @@ fi echo "" echo "For any skill not loaded above, use the Skill tool to load it." +echo "" +echo "IMPORTANT: Never assume or guess. Always find evidence in the codebase," +echo "documentation, or by asking the user. Show your sources." echo "" \ No newline at end of file diff --git a/skills/engineering-principles/SKILL.md b/skills/engineering-principles/SKILL.md index deef9bf..7b76245 100644 --- a/skills/engineering-principles/SKILL.md +++ b/skills/engineering-principles/SKILL.md @@ -283,3 +283,34 @@ git commit --no-verify # only for emergencies, not routine ``` Lint yang di-skip adalah bug yang diundang. Kalau kamu bisa `#[allow]` itu, kamu juga bisa perbaiki itu. + +## 29. Never Assume — Show Evidence for Everything + +Jangan pernah nebak, ngira-ngira, atau asumsi. **Setiap klaim, saran, atau kode yang kamu hasilkan harus punya bukti atau dokumentasi.** + +### Aturan: +1. **Kode yang kamu tulis** — harus berdasarkan kode yang sudah ada di codebase, dokumentasi resmi framework/library, atau output compiler/type-checker. Bukan "seingat saya" atau "dari training data." +2. **File structure** — jangan nebak di mana file disimpan. Cari dulu (`grep`, `find`, glob). Kalau gak ketemu, tanya user. +3. **API / function signature** — jangan nebak parameter atau return type. Baca kodenya langsung. Kalau library eksternal, cek dokumentasinya (Context7, web search, atau baca file `node_modules/` / `vendor/`). +4. **Error / bug** — jangan tebak penyebabnya. Cari bukti: log error, stack trace, output test, atau kode yang jelas-jelas salah. +5. **Config / environment** — jangan nebak value variable atau path. Cari file konfigurasi, `.env.example`, atau tanya user. +6. **Dependency version** — jangan nebak versi. Cek `package.json`, `Cargo.toml`, `go.mod`, `requirements.txt`, `Cargo.lock`, dll. +7. **Citing source** — kalau merujuk ke dokumentasi, sebut sumbernya: "per docs di `docs/add-new-app.md`" bukan "seperti yang saya tahu." +8. **"Apa ini?" / "Bagaimana cara kerja X?"** — jangan jawab dari training data. Baca kodenya dulu (`grep -r`, baca file relevan), baru jawab berdasarkan kode yang sebenarnya. + +### Kalau gak yakin: +- **Cari dulu.** Jangan jawab dari hafalan. Kalau informasinya gak ada di codebase atau output tool, cari via web search. +- **Tanya user.** Kalau udah nyari tapi gak ketemu, tanya. Jangan dibuat-buat. +- **Akui keterbatasan.** "Saya gak yakin dengan X, tapi berdasarkan Y yang saya lihat..." lebih baik dari asumsi yang salah. + +### Contoh: +``` +❌ "Sepertinya function ini return Promise" +✅ "Saya lihat di src/users/service.ts:42, function getUser return type-nya Promise" + +❌ "Mungkin config ada di .env" +✅ "Saya cari .env dan gak ketemu. Ada .env.example — mungkin itu template-nya. Bisa dicek?" + +❌ "Biasanya Dockerfile ada di root" +✅ "Saya find untuk Dockerfile: infra/docker/hub.Dockerfile" +```