# Prompt: Bootstrap Project Docs dari AI-Agent-Standards > **Cara pakai:** Salin seluruh isi file ini ke chat agent, lalu isi blok **INPUT** di bawah (atau sebutkan path/nama project di pesan Anda). > **Alias:** `/bootstrap-docs` > **Tujuan:** Agent membaca template di `AI-Agent-Standards/` lalu **membuat** struktur dokumentasi standar untuk satu atau lebih subproject baru di monorepo. --- ## INPUT (isi sebelum / saat menjalankan) Salin dan lengkapi: ```yaml projects: - path: {path/relatif/dari/root monorepo} # contoh: lagercloud.com/my-service name: {Nama Project} description: {1-2 kalimat} stack: {tech stack singkat} type: app | api | library | infra | docs-only has_api: true | false # true => buat docs/api/ has_guide: true | false # true => buat docs/guide/ version: 0.1.0 servers: # opsional; wajib diisi jika sudah diketahui - host: "{IP atau hostname}" env: dev|staging|prod role: app|db|reverse-proxy|worker apps: # docker, nginx, IIS, Apache, SQL Server, PostgreSQL, ... - name: "{service}" kind: Docker|nginx|IIS|Apache|SQL Server|PostgreSQL|other port: "{port}" path_or_container: "{compose service / site / instance}" critical_rules: # 3-7 bullet - "{aturan kritis 1}" - "{aturan kritis 2}" initial_todos: # opsional - priority: High item: "{task}" ``` Jika user hanya memberi daftar path tanpa YAML, tanyakan field yang kurang **sekali**, lalu lanjut. Jangan tanya berulang. **Asumsi default jika tidak disebut:** - `type: app` - `has_api: false` (kecuali type = api atau nama/deskripsi menyebut API) - `has_guide: false` - `version: 0.1.0` - `critical_rules`: minimal "No commit kecuali user minta", "No hardcoded URL/domain/IP — pakai .env.example", "Jangan commit .env", "Pengetahuan penting wajib ke docs bukan hanya chat" --- ## Objective Untuk **setiap** project di INPUT: 1. Baca template dari `AI-Agent-Standards/templates/repo/` 2. Buat struktur file sesuai standar 3. Isi field wajib (bukan meninggalkan semua placeholder `{...}`) 4. Daftarkan project di `Workspace-Context.md` (root monorepo) 5. Laporkan hasil ke user **Jangan** commit/push kecuali user meminta. **Jangan** menimpa file yang sudah ada tanpa konfirmasi (kecuali user bilang "overwrite"). --- ## Sumber template (WAJIB dibaca dulu) Baca file berikut sebelum menulis (cukup file ini + template yang akan di-copy): | File | Kegunaan | |------|----------| | `AI-Agent-Standards/README.md` | Ringkasan standar | | `AI-Agent-Standards/templates/repo/AGENTS.md` | Cold start (ke ROOT project) | | `AI-Agent-Standards/templates/repo/ai-session-summary.md` | Rolling session memory | | `AI-Agent-Standards/templates/repo/context-index.md` | Peta domain | | `AI-Agent-Standards/templates/repo/todo.md` | Priority | | `AI-Agent-Standards/templates/repo/changelog.md` | Keep a Changelog | | `AI-Agent-Standards/templates/repo/version.md` | Poin versi | | `AI-Agent-Standards/templates/repo/issues.md` | Issues | | `AI-Agent-Standards/templates/repo/project-status.md` | Status | | `AI-Agent-Standards/templates/repo/adr-template.md` | ADR template | | `AI-Agent-Standards/templates/repo/api/README.md` | Hanya jika has_api | | `AI-Agent-Standards/templates/repo/guide/README.md` | Hanya jika has_guide | | `AI-Agent-Standards/templates/repo/server.md` | Inventori server (selalu dibuat) | | `templates/repo/system-requirements.md` | System requirements (selalu dibuat) | | `templates/repo/.env.example` | Template URL/env (selalu dibuat) | | `templates/repo/guide/migration.md` | Migrasi server/domain (selalu dibuat) | | `Workspace-Context.md` | Daftarkan project + indeks server | Encoding: tulis file sebagai **UTF-8** (tanpa UTF-16). --- ## Struktur yang harus dibuat (per project) ``` {path}/ ├── AGENTS.md # cold start ├── .env.example # template URL/env (WAJIB, commit OK) └── docs/ ├── ai-session-summary.md ├── context-index.md ├── project-status.md ├── todo.md ├── changelog.md ├── version.md ├── issues.md ├── adr/ │ └── 000-template.md # dari adr-template.md ├── server.md # WAJIB - inventori host/IP/runtime/DB ├── system-requirements.md # WAJIB - OS, runtime, tool minimum ├── api/ # HANYA jika has_api: true │ └── README.md └── guide/ # WAJIB (minimal migration.md) ├── README.md └── migration.md # migrasi server/domain ``` ### Mapping copy | Sumber (`AI-Agent-Standards/templates/repo/`) | Tujuan | |-----------------------------------------------|--------| | `AGENTS.md` | `{path}/AGENTS.md` | | `ai-session-summary.md` | `{path}/docs/ai-session-summary.md` | | `context-index.md` | `{path}/docs/context-index.md` | | `project-status.md` | `{path}/docs/project-status.md` | | `todo.md` | `{path}/docs/todo.md` | | `changelog.md` | `{path}/docs/changelog.md` | | `version.md` | `{path}/docs/version.md` | | `issues.md` | `{path}/docs/issues.md` | | `server.md` | `{path}/docs/server.md` | | `system-requirements.md` | `{path}/docs/system-requirements.md` | | `.env.example` | `{path}/.env.example` | | `guide/migration.md` | `{path}/docs/guide/migration.md` | | `adr-template.md` | `{path}/docs/adr/000-template.md` | | `api/README.md` | `{path}/docs/api/README.md` (jika has_api) | | `guide/README.md` | `{path}/docs/guide/README.md` | --- ## Isi wajib (ganti placeholder) ### 1. `{path}/AGENTS.md` (max ~40 baris) - Project path monorepo - **Apa ini?** = `description` - **Aturan kritis** = `critical_rules` (+ default jika kurang dari 3) - Sertakan aturan **no hardcoded URL** + link `.env.example`, `docs/system-requirements.md`, `docs/guide/migration.md` - Pertahankan urutan baca stop-early dari template ### 2. `{path}/docs/context-index.md` **Zona A** wajib diisi: - Nama, path, deskripsi/stack, tipe, versi, link AGENTS + session + todo - Last updated = tanggal hari ini **Zona B:** biarkan tabel kosong atau minimal; hapus baris api/guide jika `has_api`/`has_guide` false. ### 3. `{path}/docs/ai-session-summary.md` (max 80 baris) Isi sesi init: ```yaml session: {YYYY-MM-DD}-init project: {path} version: {version} status: ready next: {item High pertama dari initial_todos, atau "Isi todo dan mulai implementasi"} agent: {nama agent jika diketahui, else Unknown} branch: main ``` **TL;DR:** - Bootstrap dokumentasi standar AI-Agent-Standards - Project `{name}` siap dilanjutkan agent berikutnya **Lanjut dari sini:** 1. {dari initial_todos High, atau "Lengkapi spesifikasi / implementasi"} **Jangan:** - Jangan simpan pengetahuan penting hanya di chat - Jangan commit secret Hapus blok Detail jika tidak perlu. ### 4. `{path}/docs/version.md` Entri pertama: ```markdown ## [{version}] - {YYYY-MM-DD} - Bootstrap dokumentasi standar (AGENTS.md + docs/) - Inisialisasi project `{name}` ``` ### 5. `{path}/docs/changelog.md` Di `[Unreleased]` atau langsung versi: ```markdown ## [{version}] - {YYYY-MM-DD} ### Added - Struktur dokumentasi standar AI-Agent-Standards ``` ### 6. `{path}/docs/todo.md` - Masukkan `initial_todos` ke High/Medium/Low - Seksi "Selesai (Sesi Ini)": bootstrap docs ### 7. `{path}/docs/project-status.md` - Ringkasan = description - Progress: Documentation = Done; implementasi sesuai status awal - Next priority link ke todo.md ### 8. `{path}/docs/issues.md` Biarkan struktur template (belum ada issue), ganti placeholder generik seminimal mungkin. ### 9. `{path}/docs/server.md` (WAJIB) Salin dari `templates/repo/server.md`, lalu: - Isi **Project** path dan **Last updated** - Jika INPUT punya `servers:`: isi tabel Host/Server, Aplikasi & Runtime, Database, Endpoint - Isi **Mapping ke path project** dengan path monorepo project ini - Jika server belum diketahui: biarkan tabel dengan satu baris placeholder dan catatan `TODO: isi saat infra diketahui` — **jangan hapus file** - Credential location saja, **jangan** password/secret ### 10. `{path}/docs/system-requirements.md` (WAJIB) - Isi tipe project, stack dari INPUT - Tabel runtime/tool (JDK, Docker, Android Studio, SQL, dll.) — placeholder OK dengan TODO - Seksi **Variabel URL & konfigurasi** — list variabel dari `.env.example` - Cantumkan aturan no hardcode ### 11. `{path}/.env.example` (WAJIB, root project) - Salin dari `templates/repo/.env.example` - Sesuaikan nama variabel project (`API_BASE_URL`, dll.) - Nilai = placeholder dev, **bukan** production secret - Tambah komentar variabel khusus project (Android: `AGENT_API_BASE_URL`, dll.) ### 12. `{path}/docs/guide/migration.md` (WAJIB) - Salin template; isi tabel inventori **jika** server/domain sudah diketahui - Jika belum: biarkan checklist + catatan `TODO: isi saat migrasi pertama` - Pastikan `guide/README.md` mengindeks migration.md --- ## Update Workspace-Context.md (root monorepo) Untuk setiap project baru, **tambah baris** di tabel Project Aktif: | Repository | Path | Deskripsi | Status | Cold start | Context | |------------|------|-----------|--------|------------|---------| | `{name}` | `{path}/` | `{description}` | New | [`AGENTS.md`]({path}/AGENTS.md) | [`docs/context-index.md`]({path}/docs/context-index.md) | Tambah baris Quick Navigation: | Mulai kerja `{name}` | `{path}/AGENTS.md` -> `docs/ai-session-summary.md` | Jangan hapus project yang sudah ada. Jika ada seksi **Server Index** di `Workspace-Context.md`, tambah baris per host yang diketahui: | Host / IP | Project | Role | Runtime ringkas | Detail | |-----------|---------|------|-----------------|--------| | {ip} | `{path}` | {role} | {docker/nginx/SQL/...} | [server.md]({path}/docs/server.md) | Jika seksi belum ada, buat seksi `## Server Index (lintas project)` dengan tabel di atas (hanya indeks + link, detail di `docs/server.md`). **Jangan** overwrite `Workspace-Session.md` kecuali user minta (boleh sebut di laporan bahwa sesi berikutnya bisa menambahkan Active focus). --- ## Aturan keamanan & kualitas - Encoding UTF-8 - Tidak menulis secret/credential - Tidak menghapus project/docs existing tanpa izin - Jika `{path}` sudah punya `AGENTS.md` atau `docs/`: **stop dan tanya** overwrite / merge / skip - Ikuti single owner: jangan menduplikasi backlog ke session summary - Pengetahuan penting tidak boleh hanya di chat (sudah masuk docs lewat bootstrap ini) --- ## Urutan eksekusi ``` 1. Parse INPUT (semua project) 2. Baca template AI-Agent-Standards 3. Untuk tiap project: a. Cek path belum ada konflik b. Buat folder c. Copy + isi file wajib 4. Update Workspace-Context.md 5. Final report ``` --- ## Final Report (wajib ke user) Untuk setiap project: - Path dibuat - File dibuat (daftar) - has_api / has_guide - server.md, system-requirements.md, .env.example, guide/migration.md - Version awal - Link cold start: `{path}/AGENTS.md` Workspace: - Baris yang ditambahkan ke `Workspace-Context.md` Langkah user berikutnya: ``` Buka {path}/AGENTS.md lalu docs/ai-session-summary.md untuk lanjut kerja. Akhir sesi: ikuti AI-Agent-Standards/prompts/end-of-session-handover.md ``` --- ## Contoh pemanggilan singkat (user) ``` Ikuti AI-Agent-Standards/prompts/bootstrap-new-project.md projects: - path: lagercloud.com/billing name: Billing description: Service tagihan Training Center stack: Python FastAPI type: api has_api: true has_guide: false - path: lagercloud.com/notify name: Notify description: Notifikasi WA/email stack: Python type: app has_api: true has_guide: true - path: tools/report-cli name: Report CLI description: CLI laporan internal stack: Node.js type: app ``` Agent wajib membuat ketiga project sesuai template tanpa menunggu instruksi tambahan selain field yang benar-benar hilang.