Prompt Rencana Sebelum Coding
Prompt perencanaan yang mencakup bisnis, domain, tech design, dan langkah kerja, lalu mendaftar keputusan yang perlu Anda ambil.
- Claude Code
- Cursor
- Claude.ai
1 file2.3 KB.md
Prompt read-only yang memetakan repository asing: fungsinya, cara menjalankannya, alur request, dan area yang berisiko.
Oleh Matthews WongDiperbarui
Poin utama
Tempel prompt ini sebelum meminta agent mengubah repository yang belum pernah dilihatnya. Agent membaca instruksi, manifest, entry point, satu fitur dari ujung ke ujung, test, dan commit terbaru, lalu menulis satu laporan: fungsi sistem, cara menjalankan dan mengetesnya, peta modul, alur request, konvensi, area berisiko, dan pertanyaan terbuka. Tidak ada file yang diubah.
Persis isi unduhannya. Baca dulu, lalu salin atau unduh.
You are onboarding onto a repository you have never seen. Your job is to map it, not to change it.
Repository: [REPOSITORY PATH OR URL]
What I plan to work on next: [THE AREA OR TASK I CARE ABOUT, OR "NOT DECIDED YET"]
## Rules
- Read-only. Do not create, edit, move or delete any file. Do not install dependencies, run migrations, commit or push.
- You may run commands that only read: listing files, searching, printing git history. Ask before running anything else, including the test suite.
- Report only what you saw in a file, and give the path for every claim. If you inferred something, label it "inferred".
- If you cannot open the repository, say so and ask me to paste the file tree, the README and the manifest files. Do not describe a codebase you have not read.
## Read in this order
1. README, CONTRIBUTING, and any agent instruction files (CLAUDE.md, AGENTS.md, editor rules).
2. Manifests and build files: package.json, pyproject.toml, pom.xml, go.mod, Makefile, Dockerfile, CI workflows.
3. The entry points: where the process starts, and where routes, commands or jobs are registered.
4. One complete feature, followed end to end from the entry point to the data store and back.
5. The tests: where they live, how they are run, what they cover.
6. The last 20 commits: what changes often, and how commits are written.
## Output
Write one Markdown report with these sections, in this order:
1. **What the system does**: three to five sentences on who uses it and for what.
2. **Run and test**: the exact commands to install, run, test, lint and build, each with the file that declares it. Mark any you did not find.
3. **Module map**: a table of the main directories or modules, with one line each on what it owns.
4. **How a request flows**: the feature you traced, as numbered steps with file paths.
5. **Conventions to follow**: naming, folder layout, error handling, test style and commit style, each with one example file.
6. **Risky areas**: code with no tests, very large files, shared state, authentication, migrations, anything a small change could break.
7. **Open questions**: what the code could not tell you, phrased as questions for me.
If I named an area or task above, end with the five files I should read first for it, and why.
Stop after the report. Do not propose a refactor and do not start the task.
Jalankan Claude Code atau Cursor di folder proyek supaya agent bisa membaca file sendiri. Di jendela chat tanpa akses ke kode, lampirkan atau tempel struktur folder, README, dan file manifest; prompt ini menyuruh agent memintanya.
Isi path atau URL repository, lalu area atau tugas yang Anda pedulikan. Kalau belum diputuskan, tulis saja begitu. Menyebut tugas menambah daftar penutup berisi lima file yang perlu dibaca lebih dulu.
Setiap klaim membawa path file. Buka tiga di antaranya dan jalankan perintah instal serta test yang tercantum di laporan. Perintah yang salah lebih murah ditemukan sekarang daripada di tengah pengerjaan tugas.
Bagian terakhir berisi hal yang tidak bisa dijawab kode. Jawab pertanyaan itu, lalu simpan laporan yang sudah dikoreksi di repository atau pindahkan perintah dan konvensinya ke CLAUDE.md, supaya sesi berikutnya berangkat dari sana.
Prompt ini melarang membuat, mengubah, atau menghapus file, menginstal dependency, menjalankan migration, dan melakukan commit. Agent yang mulai memperbaiki sambil menjelajah meninggalkan diff yang tidak Anda minta dan peta yang tidak bisa dipercaya.
Instruksi, manifest, entry point, satu fitur dari ujung ke ujung, test, lalu 20 commit terakhir. Tanpa urutan, agent membaca file apa pun yang terbuka lebih dulu dan menggambarkan sudut itu seolah-olah seluruh sistem.
Agent hanya melaporkan apa yang dilihatnya di file dan menandai sisanya sebagai inferred. Itulah yang membuat laporan bisa dicek acak dalam beberapa menit, dan mencegah agent menggambarkan arsitektur yang tidak ada di kode.
Laporan mengikuti satu fitur dari entry point ke data store dan kembali, berupa langkah bernomor dengan path file. Daftar folder memberi tahu letak file. Request yang ditelusuri memberi tahu ke mana perubahan Anda harus masuk.
Dua bagian terakhir menyebut kode yang bisa rusak oleh perubahan kecil dan hal yang tidak terjawab oleh kode. Bagian inilah yang biasanya tidak ada di README, dan yang Anda perlukan sebelum memperkirakan sebuah tugas.
Jawaban singkat sebelum Anda mengunduhnya.
Pelajaran dan artikel gratis di situs ini yang menjelaskan gagasan di baliknya.
Prompt perencanaan yang mencakup bisnis, domain, tech design, dan langkah kerja, lalu mendaftar keputusan yang perlu Anda ambil.
1 file2.3 KB.md
Prompt debugging yang mewajibkan agent mereproduksi bug dan membuktikan penyebabnya sebelum menyentuh kode.
1 file2.3 KB.md
Prompt review yang melaporkan bug lengkap dengan file, baris, skenario gagal, severity, dan fix, tanpa komentar soal gaya.
1 file2.3 KB.md