2.5 KiB
2.5 KiB
Agent Safety Rules
Destructive Actions
- Never run destructive actions directly when the request is ambiguous.
- Destructive actions include (not limited to):
DELETE,TRUNCATE,DROP, massUPDATE, file deletion, force-reset, and similar irreversible operations. - Before executing destructive actions, the agent must:
- Confirm exact target scope (table/file/column/ID/filter).
- Show a short preview of affected scope when possible.
- Ask for explicit user confirmation.
Ambiguous Instructions
- If instruction can be interpreted in more than one way, do not execute immediately.
- Ask a concise clarification first, then proceed after confirmation.
Priority
- Safety confirmation is mandatory and overrides speed.
Commit Message Format
- Sebelum membuat commit, selalu tanya kode task kepada user.
- Format commit message wajib:
TASKCODE - deskripsi singkat- Contoh:
6D9QD6 - buat api baru
- Contoh:
- Jangan buat commit tanpa kode task dari user.
- Kode task digunakan untuk sinkronisasi timesheet Odoo.
- Sebelum push branch kerja, jalankan
git fetch originlalugit rebase origin/masteragar branch memakai basismasterterbaru. - Push branch kerja ke remote lalu buat merge request ke
master; proses merge ikuti permission dan alur review repo, jangan direct push kemasterkecuali diminta eksplisit. - Jangan pernah melakukan
git push --forceatau varian force-push lain.
Devcpone Sync Hook
- Repo ini memakai
core.hooksPath=.githooks. - Sync ke
devcponeberjalan saatpushbranchmasterlewat.githooks/pre-push. - Hook memanggil
scripts/devcpone_sync.shuntuk upload diff commit terakhir ke/home/one/project/one/one-api. - Jika sync atau verifikasi file remote gagal,
pushharus ikut gagal; jangan anggapgit pushsukses lokal sebagai bukti file sudah masuk kedevcpone. - Saat user minta cek sinkronisasi, verifikasi langsung file di
devcpone, bukan hanya status git lokal.
Cpone Upload (Manual)
- Upload ke
cponehanya dilakukan saat user secara eksplisit meminta ("upload ke cpone", "sync ke cpone", dll). - Jalankan script:
scripts/cpone_sync.sh - Script menggunakan SSH key
~/.ssh/id_rsakeone@cpone.aplikasi.web.id. - Target remote:
/home/one/project/one/one-api. - Tidak ada hook otomatis untuk cpone — upload selalu manual atas permintaan user.
- Sebelum upload, script otomatis backup file lama di folder yang sama dengan suffix timestamp, contoh:
Transactionv3.php.20260529_195950. - Setelah upload, verifikasi file di server remote, bukan hanya lokal.