> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sertifikasitrainer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Prompt master (bukti)

> System prompt enricher dan fokus per grup untuk bukti-1 s/d bukti-8.

Dokumen master yang `aiMode: assist` memakai **AI enricher** (`apps/api/src/generation/enrichers/ai-enricher.ts`).

* **System prompt:** `SYSTEM_PROMPT` (versi `master-enricher-v3`)
* **User prompt:** dibangun di `buildPrompt()` — menyertakan `canonical_facts`, `allowed_fields`, `base_payload`, dan opsional `sectionFocus`

## Aturan inti system prompt

Ringkasan (baca file lengkap untuk edit):

1. Output **hanya JSON** — nested sesuai `base_payload`
2. Hanya ubah field di `allowed_fields`
3. Narasi **minimal 4–6 kalimat** per field string; array minimal 3 item
4. **Dilarang** kata meta: "simulasi", "contoh", "AI", "belum tersedia", dll.
5. **SKKNI:** pakai `skkni_unit_reference` lengkap (kode + Nomor Kepmen + Tahun) di bukti-1 & bukti-2
6. Angka responden/peserta harus konsisten dengan `reference_figures` di canonical facts

## Grup prompt per dokumen

### bukti-1 — TNA Makro

| Grup ID         | Label                            | Fokus singkat                                    |
| --------------- | -------------------------------- | ------------------------------------------------ |
| `intro-region`  | Pendahuluan & Konteks Wilayah    | Latar belakang, masalah, profil wilayah & bisnis |
| `method-data`   | Metodologi & Pengumpulan Data    | Mixed-method, survei, wawancara, data sekunder   |
| `analysis`      | Analisis Kebutuhan               | Kondisi vs ideal, gap, `priority_needs`          |
| `findings-reco` | Temuan, Rekomendasi & Kesimpulan | Min. 3 `key_findings` + 3 `recommendations`      |

### bukti-2 — TNA Mikro

| Grup ID           | Label                             | Fokus                                             |
| ----------------- | --------------------------------- | ------------------------------------------------- |
| `profile-role`    | Profil Organisasi & Peran Sasaran | Profil org, masalah inti, tugas & standar kinerja |
| `competency-gap`  | Analisis Kebutuhan Kompetensi     | Asesmen, skor, gap, kompetensi prioritas          |
| `recommendations` | Rekomendasi & Kesimpulan          | Rekomendasi pelatihan + penutup                   |

### bukti-6 / bukti-6-deck — Rencana Pemasaran

`enrichmentGroup: marketing-plan-bukti6` — AI sekali, dipakai docx + pptx.

| Grup ID               | Label                      | Field utama                                                                    |
| --------------------- | -------------------------- | ------------------------------------------------------------------------------ |
| `summary-market`      | Ringkasan & Analisis Pasar | `executive_summary`, `market_analysis.*`                                       |
| `objectives-segments` | Tujuan, Segmen, Kompetitor | `marketing_objectives`, `market_segments`, `competitor_analysis`, diferensiasi |
| `strategy-budget`     | Strategi, Anggaran, KPI    | `marketing_strategy`, `budget_breakdown`, `timeline`, `kpi`, `conclusion`      |

### bukti-7 — Perjanjian Kerjasama

| Grup ID         | Label                                       |
| --------------- | ------------------------------------------- |
| `premise-scope` | Premis, ruang lingkup, hak & kewajiban      |
| `terms-closing` | Pembiayaan, jangka waktu, sengketa, penutup |

### bukti-7 — field exact (tidak disentuh AI)

`party_one.organization_name`, `representative_name`, `agreement_location`, `agreement_date`

### bukti-8 — Laporan Evaluasi

| Grup ID            | Label                                                          |
| ------------------ | -------------------------------------------------------------- |
| `objective-method` | Tujuan, metodologi, grafik kepuasan (`chart.bars`, min. 5 bar) |
| `results-analysis` | Hasil per bagian, analisis, kesimpulan, rekomendasi            |

## Dokumen tanpa AI narasi

| Dokumen          | Isi dari mana                                    |
| ---------------- | ------------------------------------------------ |
| bukti-3, bukti-4 | Composer deterministik + data unit WSP           |
| bukti-5          | Composer + `enrichBukti5` (screenshot Classroom) |

### Prompt khusus bukti-5 (Classroom)

File: `apps/api/src/generation/composers/master/generate-classroom-assignment-content.ts`

AI menghasilkan JSON: `assignment_title`, `video_title`, `assignment_instructions` (3 langkah), `video_duration_minutes` — untuk tugas Google Classroom di bukti pelaksanaan.

## Contoh struktur user prompt (setelah system)

```
document_type: bukti-1

canonical_facts (gunakan sebagai grounding):
{ ... program, unit, skkni_unit_reference, reference_figures ... }

allowed_fields:
  - introduction.background
  - ...

FOKUS BAGIAN: Pendahuluan & Konteks Wilayah
<teks focus dari enrichmentGroups>

base_payload:
{ ... skeleton dari composeBukti1 ... }
```

## Fallback

Jika AI gagal parse JSON / timeout → enricher mengembalikan `base_payload` asli (`source: fallback`). Job tidak stuck.

## Di mana mengedit fokus per bukti

Ubah string `focus` dan `fieldPaths` di:

`apps/api/src/generation/document-definitions/master-definitions.ts`

Lalu deploy API worker. Tidak perlu ubah frontend.
