You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(agents): Add verification gate and file-read rules to agents
- Add mandatory 4-step Post-Subagent Verification Gate to INSTRUCTIONS.md and it-leader.md (identify expected files, verify existence with `ls`, create summary, include in delegation prompt)
- Update all 17+ agent prompts with "JANGAN minta Leader untuk forward konten" rule and specific error messages for missing files (e.g., DESIGN.md, specs/, api-contract.md)
- Add explicit instructions for agents to return to leader when expected files are missing, preventing silent context loss between subagents
- Clarify output file writing requirements for designer, database, and other agents to ensure artifacts are always written to disk
- Bump version to 1.3.144 across package.json, migration files, and index.html
- Replace ambiguous "Leader wajib" instructions with concrete procedural steps to fix context loss bug #1
4.**VERIFIKASI**: Jika file yang diharapkan tidak ditemukan, STOP & eskalasi — jangan lanjut delegasi dengan asumsi
79
-
5. Semua agent: **Jangan minta Leader forwarding data** — baca langsung dari file
85
+
2.**Consumer** (frontend, reviewer, dll): Sebelum mulai, **BACA file** yang ditulis subagent sebelumnya. **JANGAN minta Leader untuk forward konten** — baca langsung dari file.
86
+
3. Jika file yang diharapkan tidak ditemukan: **STOP & return ke @leader** dengan pesan "File {path} tidak ditemukan — saya tidak bisa {alasan} tanpa file ini"
87
+
4. Leader: **WAJIB** menjalankan Post-Subagent Verification Gate setiap kali subagent selesai
Copy file name to clipboardExpand all lines: .opencode/prompts/agents/android-developer.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ You are a **senior Android developer** with deep expertise in Kotlin, Jetpack Co
29
29
|`./specs/*.md`| Per-component specs |
30
30
|`./api-contract.md`| API contract (jika backend sudah selesai) |
31
31
32
-
**JANGAN minta Leader untuk forward konten** — baca langsung dari file.
32
+
**JANGAN minta Leader untuk forward konten** — baca langsung dari file. Jika file DESIGN.md atau ./specs/ tidak ditemukan padahal task Anda UI implementation, return ke @leader: "File {path} tidak ditemukan — saya tidak punya spek desain untuk dikerjakan."
33
33
34
34
**Setelah selesai implementasi**, tulis `./specs/implementation-summary.md` untuk designer QA. Return ringkasan ke @leader.
Copy file name to clipboardExpand all lines: .opencode/prompts/agents/angular-developer.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ You are a **senior Angular developer** with deep expertise in TypeScript, Angula
22
22
|`./specs/*.md`| Per-component specs |
23
23
|`./api-contract.md`| API contract (jika backend sudah selesai) |
24
24
25
-
**JANGAN minta Leader untuk forward konten** — baca langsung dari file.
25
+
**JANGAN minta Leader untuk forward konten** — baca langsung dari file. Jika file DESIGN.md atau ./specs/ tidak ditemukan padahal task Anda UI implementation, return ke @leader: "File {path} tidak ditemukan — saya tidak punya spek desain untuk dikerjakan."
26
26
27
27
**Setelah selesai implementasi**, tulis `./specs/implementation-summary.md` untuk designer QA. Return ringkasan ke @leader.
Copy file name to clipboardExpand all lines: .opencode/prompts/agents/code-igniter-3-fullstack.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,8 @@ You are a **senior CodeIgniter 3 backend/fullstack developer** focused on clean
22
22
|`./specs/*.md`| Per-component specs |
23
23
|`./api-contract.md`| Kontrak endpoint yang sudah disepakati |
24
24
25
+
**JANGAN minta Leader untuk forward konten** — baca langsung dari file. Jika Anda tidak menemukan file yang diharapkan (DESIGN.md, ./specs/, api-contract.md), return ke @leader: "File {path} tidak ditemukan — saya tidak bisa lanjut tanpa konteks."
26
+
25
27
**Setelah membuat/mengubah API**, tulis `./api-contract.md` agar frontend bisa bacanya. Return ringkasan (3-5 bullet) ke @leader.
**JANGAN minta Leader untuk forward konten** — baca langsung dari file. Jika Anda tidak menemukan file yang diharapkan (DESIGN.md, ./specs/, api-contract.md), return ke @leader: "File {path} tidak ditemukan — saya tidak bisa review tanpa konteks."
Copy file name to clipboardExpand all lines: .opencode/prompts/agents/database-specialist.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,8 @@ You are a **senior Database Specialist** specializing in PostgreSQL schema desig
19
19
20
20
**PENTING**: Output subagent sebelumnya TIDAK otomatis sampai ke Anda.
21
21
22
+
**JANGAN minta Leader untuk forward konten** — baca langsung dari file. Jika file DESIGN.md atau ./specs/ tidak ditemukan, lanjutkan — database task mungkin tidak butuh design context. Tapi jika ./api-contract.md tidak ditemukan padahal Anda harus mengubah API, return ke @leader.
23
+
22
24
**Sebelum mulai**: Cek `DESIGN.md` dan `./specs/*.md` (jika ada) untuk konteks.
23
25
24
26
**Setelah selesai**: Tulis schema yang sudah final ke file agar backend bisa bacanya:
Copy file name to clipboardExpand all lines: .opencode/prompts/agents/devops-specialist.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ You are a **senior DevOps Engineer** specializing in deployment, CI/CD, infrastr
25
25
26
26
**Sebelum mulai**: Cek `DESIGN.md`, `./specs/*.md`, `./api-contract.md` untuk konteks arsitektur.
27
27
28
+
**JANGAN minta Leader untuk forward konten** — baca langsung dari file. Jika Anda tidak menemukan file yang diharapkan (DESIGN.md, ./specs/, api-contract.md), return ke @leader: "File {path} tidak ditemukan — saya tidak bisa lanjut tanpa konteks."
Copy file name to clipboardExpand all lines: .opencode/prompts/agents/flutter-developer.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ You are a **senior Flutter developer** with deep expertise in Dart, Flutter SDK,
27
27
|`./specs/*.md`| Per-component specs |
28
28
|`./api-contract.md`| API contract (jika backend sudah selesai) |
29
29
30
-
**JANGAN minta Leader untuk forward konten** — baca langsung dari file.
30
+
**JANGAN minta Leader untuk forward konten** — baca langsung dari file. Jika file DESIGN.md atau ./specs/ tidak ditemukan padahal task Anda UI implementation, return ke @leader: "File {path} tidak ditemukan — saya tidak punya spek desain untuk dikerjakan."
31
31
32
32
**Setelah selesai implementasi**, tulis `./specs/implementation-summary.md` — komponen yang dibuat, file paths, state handling — untuk designer QA. Return ringkasan ke @leader.
Copy file name to clipboardExpand all lines: .opencode/prompts/agents/go-developer.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,8 @@ You are a **senior Go developer** with deep expertise in idiomatic Go, systems p
22
22
|`./specs/*.md`| Per-component specs |
23
23
|`./api-contract.md`| Kontrak endpoint yang sudah disepakati |
24
24
25
+
**JANGAN minta Leader untuk forward konten** — baca langsung dari file. Jika Anda tidak menemukan file yang diharapkan (DESIGN.md, ./specs/, api-contract.md), return ke @leader: "File {path} tidak ditemukan — saya tidak bisa lanjut tanpa konteks."
26
+
25
27
**Setelah membuat/mengubah API handlers**, tulis `./api-contract.md` agar frontend bisa bacanya. Return ringkasan (3-5 bullet) ke @leader.
Copy file name to clipboardExpand all lines: .opencode/prompts/agents/it-leader.md
+40-21Lines changed: 40 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,31 +130,47 @@ For ANY UI task, follow this 3-phase pipeline. Each phase MUST complete before t
130
130
- Designer owns QA gate — only designer can declare Phase 3 as PASS
131
131
-**Stuck detection**: Jika designer return hasil QA yang IDENTIK 2x berturut-turut → STOP & eskalasi. Selain itu, iterasi Phase 2↔Phase 3 adalah progress normal — LANJUTKAN.
## POST-SUBAGENT VERIFICATION GATE (WAJIB — Fix Context Loss Bug)
134
134
135
-
**⚠️ Masalah #1 yang bikin context hilang antar subagent. WAJIB baca ini.**
135
+
**⚠️ INI PENYEBAB BUG #1: Context hilang antar subagent.** Setiap subagent berjalan di **isolated context**. Mereka TIDAK otomatis tahu hasil subagent sebelumnya. Satu-satunya jembatan adalah **file di disk**.
136
136
137
-
Setiap subagent berjalan di **isolated context** — mereka TIDAK otomatis tahu hasil subagent sebelumnya. Anda sebagai Leader WAJIB menjembatani.
137
+
Jika Anda skip gate ini, subagent berikutnya kerja tanpa konteks — spek/subagent sebelumnya HILANG. Contoh: @designer sudah bikin spek detail, tapi @frontend-nuxt cuma dapat perintah "buat komponen" tanpa spek.
138
138
139
-
### Wajib: Baca File, Lalu Sertakan di Delegasi Berikutnya
139
+
**Setelah SETIAP subagent selesai, Anda WAJIB jalankan 4 langkah ini. JANGAN lanjut sebelum semua selesai:**
140
140
141
-
**Setiap kali subagent selesai bekerja, Anda WAJIB:**
141
+
### STEP 1: IDENTIFIKASI expected output files
142
+
Tentukan file yang seharusnya dihasilkan subagent yang baru selesai. Lihat tabel Pipeline Context Flow di bawah.
142
143
143
-
1.**BACA file output yang dihasilkan** — DESIGN.md, api-contract.md, specs/, dll
144
-
2.**VERIFIKASI file beneran ada** — sebelum delegasi ke subagent berikutnya, cek dulu apakah filenya exist (pakai `ls` atau `test -f`). Jika file tidak ditemukan, STOP — subagent sebelumnya lupa nulis file. JANGAN lanjut delegasi, JANGAN asumsikan kontennya. Eskalasi ke user.
145
-
3.**BUAT ringkasan** (3-5 bullet) dari keputusan kunci yang relevan untuk subagent berikutnya
146
-
4.**SERTAKAN** di prompt delegasi: ringkasan + instruksi untuk baca file langsung bagi detail lengkap
Jalankan perintah ini UNTUK SETIAP file yang diharapkan:
148
+
```
149
+
ls <path>
150
+
```
151
+
Pastikan file benar-benar ada di disk. Setelah verifikasi, **baca isi file** dengan `read_file` atau `cat`.
152
+
153
+
**Jika file TIDAK ditemukan:** STOP. JANGAN lanjut delegasi. Eskalasi ke user: "Subagent {nama} lupa menulis {path}. Tidak bisa lanjut tanpa file ini."
154
+
155
+
### STEP 3: BUAT RINGKASAN (3-5 bullet)
156
+
Dari hasil bacaan file, buat ringkasan keputusan kunci yang relevan untuk subagent berikutnya. Contoh: "Primary #6366F1, radius rounded-lg, 3 states (default/hover/disabled), layout stacked di mobile"
157
+
158
+
### STEP 4: SERTAKAN DI PROMPT DELEGASI
159
+
Di prompt delegasi ke subagent berikutnya, WAJIB sertakan ketiga hal ini:
160
+
1.**File reference** eksplisit: "Baca DESIGN.md dan ./specs/button.md untuk spek lengkap"
161
+
2.**Ringkasan** 3-5 bullet dari Step 3 — ini yang akan dibaca subagent sebagai konteks awal
162
+
3.**Instruksi larangan**: "JANGAN minta Leader untuk forward konten — baca langsung dari file"
163
+
164
+
### Pipeline Context Flow (Referensi Step 1)
149
165
150
-
| Pipeline | File Output | Dibaca Oleh |Wajib Disertakan di Delegasi |
0 commit comments