@ojokesusu/lintasai 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/.github/workflows/publish-npm.yml +40 -0
  2. package/.github/workflows/validate.yml +93 -0
  3. package/AUDIT_POST_SETUP_PROMPT_v1.md +280 -0
  4. package/BOOTSTRAP_PROJECT_DOCS_PROMPT_v1.md +3 -0
  5. package/CHANGELOG.md +313 -0
  6. package/CLAUDE_universal_v1.md +1021 -0
  7. package/CONTRIBUTING.md +101 -0
  8. package/FIRST_SESSION_PROMPT_v1.md +7 -0
  9. package/JALANKAN_KIT.md +188 -0
  10. package/LICENSE +21 -0
  11. package/MULAI_DI_SINI.md +145 -0
  12. package/PROJECT_KICKOFF_PROMPT_v1.md +3 -0
  13. package/PROJECT_LIFECYCLE_PROMPT_v1.md +536 -0
  14. package/PROJECT_MIGRATION_PROMPT_v1.md +3 -0
  15. package/README.md +505 -0
  16. package/SETUP_POLA_B_PROMPT_v1.md +5 -0
  17. package/SPLIT_REPO_MIGRATION_PROMPT_v1.md +485 -0
  18. package/TEAM_ROLLOUT_GUIDE_v1.md +172 -0
  19. package/UPDATE_DOCS_PROMPT_v1.md +3 -0
  20. package/UPDATE_KIT_PROMPT_v1.md +213 -0
  21. package/bin/lintasai.js +81 -0
  22. package/docs/SIGNED_RELEASE.md +162 -0
  23. package/install-windows.ps1 +225 -0
  24. package/kit.ps1 +508 -0
  25. package/lib/agents-md.ps1 +174 -0
  26. package/lib/git-helpers.ps1 +104 -0
  27. package/lib/kit-files.psd1 +133 -0
  28. package/lib/manifest-signing.ps1 +65 -0
  29. package/lib/manifest.ps1 +267 -0
  30. package/lib/rollback.ps1 +241 -0
  31. package/lib/safety.ps1 +193 -0
  32. package/lib/template-deploy.ps1 +242 -0
  33. package/lib/version-detect.ps1 +161 -0
  34. package/package.json +36 -0
  35. package/setup-pola-b.ps1 +687 -0
  36. package/templates/ANALOGI_LIBRARY.md +7 -0
  37. package/templates/CLAUDE_TEAM_GUIDE.md +505 -0
  38. package/templates/CROSS_REPO_TYPES_PIPELINE.md +473 -0
  39. package/templates/DB_SCHEMA_SCAN_PROMPT.md +194 -0
  40. package/templates/DISCORD_BOT_INTEGRATION.md +187 -0
  41. package/templates/GLOSSARY_NON_PROGRAMMER.md +361 -0
  42. package/templates/INDEX.md +157 -0
  43. package/templates/MCP_SETUP.md +1145 -0
  44. package/templates/MIGRATE_TO_SUBFOLDER_PROMPT_v1.md +220 -0
  45. package/templates/ONBOARDING.md +172 -0
  46. package/templates/PROJECT_STARTER_TEMPLATES.md +264 -0
  47. package/templates/PROMPT_LIBRARY.md +790 -0
  48. package/templates/RLS_SETUP_PROMPT.md +167 -0
  49. package/templates/SECURITY_INCIDENT_PLAYBOOK.md +191 -0
  50. package/templates/SPLIT_REPO_AGENTS_TEMPLATES.md +32 -0
  51. package/templates/SPLIT_REPO_NON_PROGRAMMER_PROMPTS.md +604 -0
  52. package/templates/SPLIT_REPO_TOOLS_SETUP.md +388 -0
  53. package/templates/STACK_DETECTION_PATTERN.md +261 -0
  54. package/templates/STACK_GUIDE.md +564 -0
  55. package/templates/STACK_MIGRATION_GUIDE.md +154 -0
  56. package/templates/STACK_VERSIONS.md +31 -0
  57. package/templates/UPDATE_GUIDE.md +246 -0
  58. package/templates/_EXAMPLE.md +110 -0
  59. package/templates/_PATTERNS.md +173 -0
  60. package/templates/architecture.md +180 -0
  61. package/templates/architecture_auto.md +61 -0
  62. package/templates/decisions/README.md +108 -0
  63. package/templates/decisions/_TEMPLATE.md +84 -0
  64. package/templates/feature-flags-advanced.md +171 -0
  65. package/templates/github/CODEOWNERS.template +61 -0
  66. package/templates/github/GENERATE_TYPES_SCRIPT.md +77 -0
  67. package/templates/github/PUBLISH_SHARED_WORKFLOW.yml +52 -0
  68. package/templates/github/RECEIVE_BACKEND_UPDATE.yml +106 -0
  69. package/templates/github/RENOVATE_FRONTEND.json +28 -0
  70. package/templates/github/TRIGGER_FRONTEND_UPDATE.yml +29 -0
  71. package/templates/github/pull_request_template.md +44 -0
  72. package/templates/github/scripts/ai-review.js +153 -0
  73. package/templates/github/workflows/ai-review.yml +61 -0
  74. package/templates/github/workflows/backup-schemas.yml +169 -0
  75. package/templates/glossary.md +110 -0
  76. package/templates/split-agents/BACKEND.md +149 -0
  77. package/templates/split-agents/FRONTEND.md +141 -0
  78. package/templates/split-agents/SHARED.md +82 -0
  79. package/templates/split-agents/TOOLS.md +77 -0
  80. package/tests/Run-Tests.ps1 +19 -0
  81. package/tests/lib-safety.Tests.ps1 +66 -0
  82. package/tests/rollback.Tests.ps1 +66 -0
  83. package/tests/uninstall.Tests.ps1 +265 -0
  84. package/tests/update-kit.Tests.ps1 +78 -0
  85. package/uninstall.ps1 +794 -0
  86. package/update-kit.ps1 +907 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,313 @@
1
+ # Changelog
2
+
3
+ Semua perubahan signifikan ke kit ini didokumentasikan di file ini.
4
+
5
+ Format mengikuti [Keep a Changelog](https://keepachangelog.com/id-ID/1.1.0/),
6
+ dan kit ini mengikuti [Semantic Versioning](https://semver.org/lang/id/).
7
+
8
+ ## Label spesial (auto-detect oleh `kit.ps1 update`)
9
+
10
+ - **[BREAKING]** — Ada perubahan tidak backward-compatible. Wajib baca migration notes.
11
+ - **[SCAN-REQUIRED]** — Wajib regenerate `docs/` (re-paste `BOOTSTRAP_PROJECT_DOCS_PROMPT_v1.md`).
12
+
13
+ Tanpa label, update aman: `docs/` user TIDAK perlu di-scan ulang.
14
+
15
+ ---
16
+
17
+ ## [Unreleased]
18
+
19
+ Slot tambahan untuk perubahan berikutnya sebelum versi v1.0.2.
20
+
21
+ ---
22
+
23
+ ## v1.1.2 [2026-06-06]
24
+
25
+ ### Changed
26
+
27
+ #### Drop --provenance flag (private repo compatibility)
28
+ - publish-npm.yml: remove `--provenance` flag dari npm publish command
29
+ - Reason: npm provenance signing requires PUBLIC GitHub source repo (npm policy). lintasAI repo is private by design (internal tool untuk staff IT).
30
+ - Trade-off: package npm tidak punya signed provenance badge
31
+ - Defense in depth tetap valid via: NPM 2FA, granular token scope @ojokesusu, token rotation 365 hari
32
+
33
+ #### Permissions cleanup
34
+ - Remove `id-token: write` permission (no longer needed tanpa provenance)
35
+ - Workflow runs with minimum required permissions (principle of least privilege)
36
+
37
+ ### Notes
38
+ - Kit content tetap distribusi via public npm package (`@ojokesusu/lintasai`)
39
+ - GitHub repo tetap private (internal access only)
40
+ - Bisa balik ke provenance nanti kalau repo dijadikan public
41
+
42
+ ---
43
+
44
+ ## v1.1.1 [2026-06-06]
45
+
46
+ ### Fixed
47
+
48
+ #### Publish Workflow Compatibility
49
+ - publish-npm.yml: "Verify version" step sekarang handle BOTH tag push (auto-trigger on `v*` push) DAN workflow_dispatch (manual "Run workflow" UI button)
50
+ - Previously: workflow_dispatch fail dengan "Tag version (refs/heads/main) does not match package.json"
51
+ - Sekarang: kalau bukan tag trigger, skip version match check + publish package.json version langsung
52
+
53
+ ### Notes
54
+ - Pertama kali publish ke npm: gunakan tag push (`git tag v1.1.1 && git push --tags`)
55
+ - Manual re-publish via "Run workflow" UI sekarang aman
56
+
57
+ ---
58
+
59
+ ## v1.1.0 [2026-06-06]
60
+
61
+ ### Added (Major Features)
62
+
63
+ #### NPM Publish Wrapper (Single-Command Bootstrap)
64
+ - New: package.json + bin/lintasai.js Node.js launcher
65
+ - Staff IT non-programmer (20-30 orang) sekarang bisa `npx @ojokesusu/lintasai init` (1 command, no git clone)
66
+ - Auto-publish to npm registry on tag push via .github/workflows/publish-npm.yml (with provenance)
67
+ - Commands supported: init, update, doctor, version, rollback, uninstall
68
+ - Windows-only enforcement (cross-platform planned v2.0+)
69
+
70
+ #### Architecture Refactor (Modularization)
71
+ - setup-pola-b.ps1: 841 LOC -> orchestrator (~250 LOC) via dot-sourcing
72
+ - Extracted 5 new lib modules:
73
+ - lib/manifest.ps1: Manifest write/sign/verify
74
+ - lib/template-deploy.ps1: Template copy with placeholder substitution
75
+ - lib/git-helpers.ps1: .git/ cleanup + MOTW unblock
76
+ - lib/agents-md.ps1: AGENTS.md fill template
77
+ - lib/version-detect.ps1: Kit version detection (supports both CHANGELOG formats)
78
+ - Maintainability: future changes to manifest/template logic now isolated to lib modules
79
+ - Backward compatible: all 27 Pester tests still pass
80
+
81
+ #### PSScriptAnalyzer CI Integration
82
+ - New job pssa-lint di .github/workflows/validate.yml
83
+ - Catches issues AI-generated code might miss (unused vars, naming convention, security warnings)
84
+ - Excludes PSAvoidUsingWriteHost + PSUseShouldProcessForStateChangingFunctions (false positives untuk CLI scripts)
85
+
86
+ ### Changed
87
+ - README.md: NPM install method sekarang PRIMARY (Cara 1), git clone Cara 2 (advanced)
88
+ - setup-pola-b.ps1: Restructured to orchestrator pattern
89
+
90
+ ### Tests
91
+ - All 27 Pester tests pass
92
+ - Lib module isolation tested
93
+ - Smoke test (setup + doctor + version) pass
94
+
95
+ ### Migration Notes
96
+ - Existing kit users (v1.0.x): no action required, refactor is internal
97
+ - New install: prefer `npx @ojokesusu/lintasai init` over git clone
98
+ - Owner setup needed for npm publish: GitHub Settings -> Secrets -> NPM_TOKEN (Automation token from npmjs.com)
99
+
100
+ ---
101
+
102
+ ## v1.0.1 [2026-06-06] - Post-Audit Fixes + Test Expansion
103
+
104
+ ### Fixed (CRITICAL from adversarial audit)
105
+ - GPG verify-tag: was verifying branch name (broken), now properly resolves tag exact dari HEAD + verify-tag tag name. Fail-closed (throw) kalau verify fail, kecuali -AllowUnsignedTag explicit.
106
+ - HMAC manifest signing: drop machine UUID binding (was not actually secret + broke cross-machine portability). Now kit-version constant key + LINTASAI_MANIFEST_SECRET env var override.
107
+ - Decoupled -Force flag: -AllowModified (uninstall), -AllowUnsignedTag (update-kit GPG), -AllowUntrustedRepo (update-kit URL). -Force still works dengan deprecation warning.
108
+ - ANALOGI_LIBRARY.md restored from deprecated state (5+ files actively reference, non-programmer team needs jargon library)
109
+
110
+ ### Added (test coverage)
111
+ - tests/uninstall.Tests.ps1 (3 Describe blocks)
112
+ - tests/update-kit.Tests.ps1 (3 Describe blocks)
113
+ - tests/rollback.Tests.ps1 (2 Describe blocks)
114
+
115
+ ### Added (UX non-programmer)
116
+ - MULAI_DI_SINI.md: 1-page bahasa awam onboarding
117
+ - templates/GLOSSARY_NON_PROGRAMMER.md: expand dengan destructive ops, force-push, rm -rf, DROP, schema, API, endpoint
118
+ - JALANKAN_KIT.md: disclaimer "INI BUAT AI BACA, BUKAN KAMU" di top
119
+
120
+ ### Changed (consistency)
121
+ - SPLIT_REPO_MIGRATION_PROMPT_v1.md: Tier A/B/C → Frontend/Backend (15+ occurrences)
122
+ - JALANKAN_KIT.md + 6 other files: deprecated file refs (BOOTSTRAP/MIGRATION/KICKOFF/UPDATE_DOCS prompts) → PROJECT_LIFECYCLE_PROMPT_v1.md (Stage A/B/C/D)
123
+ - lib/kit-files.psd1: complete (30 missing files added — deprecated stubs, team templates, decisions, github assets)
124
+
125
+ ### Versioning Policy (NEW)
126
+ - Stop force-pushing v1.0.0. Future: v1.0.x untuk fix, v1.x.0 untuk fitur, vX.0.0 untuk breaking.
127
+
128
+ ---
129
+
130
+ ## [1.0.0] — 2026-06-03
131
+
132
+ First public release lintasAI kit — standar kerja AI-first untuk tim IT non-programmer Indonesia.
133
+
134
+ ### Ditambahkan
135
+
136
+ - **Pola A** (global install via `~/.claude/`) + **Pola B** (embed kit di proyek via `.claude-kit/`) untuk version-locked per project.
137
+ - **17 file tim profesional auto-deploy** saat setup-pola-b.ps1 jalan:
138
+ - `.github/`: workflows/ai-review.yml + workflows/backup-schemas.yml + scripts/ai-review.js + CODEOWNERS + pull_request_template.md
139
+ - `docs/`: CLAUDE_TEAM_GUIDE.md + PROMPT_LIBRARY.md + ONBOARDING.md + STACK_GUIDE.md + MCP_SETUP.md + RLS_SETUP_PROMPT.md + DB_SCHEMA_SCAN_PROMPT.md + GLOSSARY_NON_PROGRAMMER.md + SECURITY_INCIDENT_PLAYBOOK.md + feature-flags-advanced.md
140
+ - `docs/decisions/`: _TEMPLATE.md + README.md
141
+ - **Single-paste workflow** `JALANKAN_KIT.md` (20-step) untuk sesi Claude pertama: scan → auto-decide grouping → bulk-bootstrap docs dengan 4 opsi (Generate ALL default / Pilih kategori / Skeleton-first / DB schema only).
142
+ - **`CLAUDE_universal_v1.md` aturan kerja universal** (auto-load tiap sesi AI) dengan section:
143
+ - 4.1 Tinjauan Multi-Divisi (12 divisi review)
144
+ - 4.2 Pattern-Driven Workflow (AI auto-apply PROMPT_LIBRARY pattern dari natural language staff)
145
+ - 4.3 Guided Step-by-Step Pattern untuk Staff Baru (6-phase universal first-time workflow)
146
+ - 7.1-7.4 Aturan dokumentasi tim profesional
147
+ - **15 prompt pattern siap-pakai** di `PROMPT_LIBRARY.md` (Prompts 1-10 generic + 11-15 chat-driven workflow + activate feature flag).
148
+ - **Multi-Schema Strategy** di `MCP_SETUP.md`: Option A (shared schema restricted) + Option B (per-staff isolated full CREATE) + Option C (hybrid sandbox + read prod) + 3-layer backup plan.
149
+ - **Workflow rollback playbook** (`CLAUDE_TEAM_GUIDE.md` section 13b): git revert via Claude <5 menit dengan post-mortem template + fire drill quarterly.
150
+ - **Security Incident Playbook** (`docs/SECURITY_INCIDENT_PLAYBOOK.md`) untuk staff IT non-programmer: 6-step STOP-DM-WAIT procedure + decision matrix per tipe token + 5 yang TIDAK BOLEH dilakukan + quick checklist printable.
151
+ - **AI Reviewer di GitHub Actions** (`templates/github/scripts/ai-review.js`) dengan secret leak detection 9 pattern (sk-ant-/eyJ/xoxb/ghp_/glpat/AKIA/service_role/postgres://password@/`.env*` files).
152
+ - **Backup automation** (`templates/github/workflows/backup-schemas.yml`) — daily pg_dump per-schema ke Supabase Storage, retention 30 hari, Slack webhook alert.
153
+ - **Glossary untuk Non-Programmer** (`docs/GLOSSARY_NON_PROGRAMMER.md`) 300+ entry dengan analogi Indonesia-context (Google Drive, Word, Notion, Canva, Discord, Tokopedia, IFTTT, Zapier, Spotify, Gojek).
154
+ - **Risk Level Decision Tree** (Low/Medium/High klasifikasi task) — pengganti feature flag default untuk early-stage project.
155
+ - **Feature flag advanced** (`templates/feature-flags-advanced.md`) — POST-LAUNCH activation via Prompt 15 saat project ready (env var Vercel `NEXT_PUBLIC_FF_<AREA>_<NAMA>` + decision tree 5 kriteria risiko tinggi + cleanup ritual + per-user hash canary).
156
+ - **`kit.ps1` single entry point**: setup / update / uninstall / doctor / scan / version / help subcommand.
157
+ - **`update-kit.ps1` atomic re-clone** dengan backup + auto-rollback kalau git clone gagal (CRITICAL FIX di v1.0.0 untuk PowerShell 5.1 stderr handling).
158
+ - **`setup-pola-b.ps1`** auto-detect Pola B nested extract + Mark-of-the-Web unblock + secure password sharing reminder + **tulis `.install-manifest.json`** (sha256 hash per file kit-template) untuk safe uninstall. **NonInteractive shell hardening**: SEMUA Read-Host (CLAUDE.md detection / auto-flatten nested extract / AGENTS.md backup confirm) di-wrap try/catch dengan default-safe fallback ([2] biarkan / 'N' abort) supaya setup tidak crash di Claude Code / VSCode tab Output / CI / `powershell -NonInteractive`. Sama untuk `install-windows.ps1` Read-Host overwrite confirm.
159
+ - **`uninstall.ps1` safe diff-based delete** — baca `.install-manifest.json`, classify file dengan 7 kategori: PRISTINE (auto-delete), MODIFIED (skip default, `-Force` = backup + hapus), SYMLINK (skip selalu — junction/symlink tidak diikuti, cegah leak isi file di luar project ke .bak), BLOCKED (path escape ke luar project root, REJECT — proteksi path traversal kalau manifest di-tamper), LOCKED (hash gagal — file di-buka editor/AV, skip + hint), MISSING (skip silent), BACKUP (preserved dari setup `-Force` re-run sebelumnya). Direktori cuma dihapus kalau EMPTY setelah file kit dibersihkan → project file kamu di `docs/` & `.github/` AMAN. **Path traversal protection**: manifest entries dengan `..\\` segments / absolute path / drive-letter prefix DITOLAK; canonical path harus StartsWith($ProjectRoot). **Reparse-point check**: leaf + tiap parent segment diperiksa, junction/symlink dimanapun di path = SKIP. **TOCTOU close**: re-hash file tepat sebelum delete, skip kalau berubah sejak plan. **project_root hard-fail**: kalau manifest tidak match lokasi sekarang → abort (override via `-AllowProjectRootMismatch`). **schema_version validation**: reject unknown schema. Default skip `AGENTS.md` (heavy customization, pakai `-DeleteAgents` override). Pakai `-Yes` untuk CI auto-confirm, `-KeepKit` suppress instruksi self-delete. Mencegah insiden seperti `rm -rf docs/` yang ikut hapus file proyek asli.
160
+ - **Manifest anonymized** — `project_root='<PROJECT_ROOT>'` + `installed_by='<USER>'` di JSON (tidak leak Windows username / absolute home path saat manifest committed ke git).
161
+ - **`.claude-kit/.gitignore` auto-generated** saat setup — ignore `.install-manifest.json` + `*.bak` + `*.env*` + `*.pem` + `*.key` (defense-in-depth supaya environment metadata + secret tidak ke-commit walaupun user run `git add .claude-kit/`).
162
+ - **Audit Post-Setup Pattern** (`AUDIT_POST_SETUP_PROMPT_v1.md` + `CLAUDE_universal_v1.md` section 4.4 + `PROMPT_LIBRARY.md` Prompt 16 + `JALANKAN_KIT.md` step 21) — workflow read-only komprehensif yang otomatis ditawarkan setelah `JALANKAN_KIT.md` (Popup #4 default "y"). Scan 8 dimensi paralel via Workflow tool (refactor / security / qa-test / database / devops / performance / docs-gap / onboarding) → adversarial verify per finding (cegah halusinasi, default `is_real=false`) → synthesize ranked 3 tier (low → high `risk_of_introducing_bug`) → **TIAP finding WAJIB punya 3-LAYER ANALOGI NON-PROGRAMMER**: (1) 🏢 sehari-hari (kantor/lemari arsip/loket bank), (2) 📱 tools digital populer Indonesia-context (Tokopedia, Gojek, WhatsApp, BCA mobile, Excel, Google Drive, Notion, Discord, dll.), (3) 🎯 contoh konkret kapan situasi muncul di proyek. Library lengkap 30 jargon di `docs/ANALOGI_LIBRARY.md` (auto-deployed oleh setup-pola-b.ps1). Contoh: N+1 query = "Tokopedia checkout 20 barang satu-satu vs masukin keranjang", missing rate-limit = "BCA mobile pencet kirim OTP unlimited → spam SMS korban", race condition = "Shopee flash sale 2 orang klik Beli detik sama", IDOR = "Tokopedia ganti `invoice=12345`→`12346` muncul invoice orang lain", God Component = "Excel 1 workbook isi stok+gaji+absensi+pivot semua tumpuk", memory leak = "WhatsApp chat masuk foto/video gak dihapus storage penuh", TOCTOU = "Shopee lihat stok 3 → checkout muncul habis", HOLD MERGE = "BCA mobile transfer di atas limit → tunggu OTP", dst. Sprint execution plan: Sprint 0 URGENCY (~30 menit stop-bleeding) → Sprint 1 quick wins (~6-8 jam zero behavior change) → Sprint 2 test foundation (~30-40 jam) → Sprint 3 medium refactor (~1-2 minggu) → Sprint 4+ HIGH RISK (HOLD MERGE, paired review, 1-2 minggu per finding). Status READONLY default; Popup #1 pilih tier 1/2/3/4 (4=semua default); Popup #2 pilih lanjutan (execute Sprint 0 / write report ke `docs/decisions/` / pick item / stop). Pattern-Driven mapping intent staff non-programmer: "audit project" / "ada bug?" / "lemot" / "ready hire staff?" / "refactor messy" auto-route ke fokus dimensi yang relevan. Mencegah refactor reckless tanpa context — semua finding ranked + verified + dengan analogi yang bisa dibaca staff IT non-programmer Day 0 (yang familiar dengan Tokopedia/Gojek/WhatsApp/Excel langsung paham tanpa background dev).
163
+ - **Update Strategy Pattern — 4-Tier Auto-Classify** (`UPDATE_KIT_PROMPT_v1.md` + `docs/UPDATE_GUIDE.md` + `CLAUDE_universal_v1.md` section 4.5 + `PROMPT_LIBRARY.md` Prompt 17 + `update-kit.ps1` enhancement). Filosofi: **AI yang lakukan update analysis + execution, staff cuma chat natural + confirm**. Staff IT non-programmer TIDAK perlu baca CHANGELOG 200 baris dan klasifikasi sendiri "ini breaking apa bukan" — itu tugas AI. **4-Tier classification** dengan analogi tools digital populer: Tier 1 silent (tanpa label, fix typo/perbaikan ringan = kayak **WhatsApp 2.23.10 → 2.23.11 auto-update background**), Tier 2 AI auto-sync (tanpa label, aturan/fitur baru = kayak **iPhone iOS 17.3 → 17.4 minor, fitur baru aktif setelah restart**), Tier 3 `[BREAKING]` (struktur/format ganti = kayak **iPhone iOS 16 → iOS 17 major, migration screen wajib**), Tier 4 `[SCAN-REQUIRED]` (bulk-bootstrap logic ganti = kayak **Tokopedia Seller ganti algoritma kategori, re-mapping produk wajib**). **Dual-mode update**: Chat-based ("lintasAI v1.2.0 rilis, update" → AI parse CHANGELOG → classify tier → compose summary → confirm → execute) untuk staff non-programmer; PS Script (`kit.ps1 update`) untuk power user / CI. **update-kit.ps1 enhancement**: 4 fungsi baru — `Get-LatestChangelogEntry` (parse versi terbaru), `Classify-UpdateTier` (regex `[BREAKING]`/`[SCAN-REQUIRED]` + keyword matching), `Format-UpdateSummary` (compose ringkasan dengan analogi tools digital), `Invoke-BackupCleanup` (auto-hapus `.bak` > 30 hari + keep max 3 latest per file). **Backup retention**: NO folder `migrations/` per breaking change (over-engineering); INSTEAD tiap `[BREAKING]` CHANGELOG entry punya inline section "Migration Steps" dengan PS commands. Backup files auto-cleanup di akhir tiap `kit.ps1 update`. AI auto-trigger update analysis kalau intent staff: "ada versi baru?" / "update kit" / "lintasAI vX.Y rilis" / "kit ku ketinggalan" / "cek update". **Mencegah** staff stress baca technical CHANGELOG + decide tier sendiri — semua otomatis dengan analogi yang familiar (WhatsApp/iPhone/Tokopedia/Google Drive/Excel).
164
+ - **Pre-launch audit comprehensive** (76-agent workflow + adversarial verify + simulate fresh clone) — confirmed 37 bug + 4 blocker fix sebelum v1.0.0 launch.
165
+
166
+ ### Catatan
167
+
168
+ - Mode: **first public release**. Akan dipakai untuk uji-coba pertama oleh tim IT non-programmer.
169
+ - Future iteration v1.0.1+: simplification opportunities (reduce README, merge ONBOARDING overlap dgn TEAM_GUIDE, fix MCP_SETUP section numbering, split STACK_GUIDE migration sections ke file terpisah, extract CLAUDE_universal section 4.1+4.3 examples ke reference files).
170
+ - Kalau ada bug di field: lapor via channel chat tim, fix akan masuk v1.0.1.
171
+
172
+ ---
173
+
174
+ ## Pre-Release Development (Internal Iteration)
175
+
176
+ > **Note:** All `v1.0.0 [REPUBLISH ...]` entries di bawah ini adalah pre-release iteration sebelum first public release. Versi tag `v1.0.0` di-force-push berulang kali selama development internal — TIDAK ada perubahan versi semver semantic. Entries dipertahankan untuk historical context + audit trail. Per `Versioning Policy` di v1.0.1: force-push v1.0.0 dihentikan, future fix pakai v1.0.x, fitur v1.x.0, breaking vX.0.0.
177
+
178
+ ### v1.0.0 [REPUBLISH 2026-06-06] - Real-Time Cross-Repo Trigger
179
+
180
+ #### Added (cross-repo real-time)
181
+ - **templates/github/TRIGGER_FRONTEND_UPDATE.yml** - Backend side: append step ke publish workflow untuk fire `repository_dispatch` event ke frontend repo. Memungkinkan frontend auto-pickup update shared package tanpa nunggu Renovate scheduled run.
182
+ - **templates/github/RECEIVE_BACKEND_UPDATE.yml** - Frontend side: listen `repository_dispatch` event + `npm install` + create PR auto. Latency 3-5 menit (vs Renovate 24 jam scheduled).
183
+
184
+ #### Changed
185
+ - **templates/CROSS_REPO_TYPES_PIPELINE.md**: tambah section "Real-Time Trigger Pattern" (recommended PRIMARY, Renovate jadi BACKUP fallback kalau dispatch event miss).
186
+ - **templates/SPLIT_REPO_NON_PROGRAMMER_PROMPTS.md**: FULL rewrite semua contoh prompt dari bahasa programming ke bahasa awam (Tokopedia admin / Gojek dispatch style). Replace "TASK-101 add field X", "type OrderTracking", "endpoint GET /api/..." dengan format awam ("Tugas baru: tambah info X", "data Y", "halaman yang nunjukkin Z"). Staff non-programmer Day 0 langsung paham tanpa background dev.
187
+
188
+ ---
189
+
190
+ ### v1.0.0 [REPUBLISH 2026-06-05 #4] - Critical Bug Fixes + Cleanup
191
+
192
+ #### Fixed (CRITICAL bugs from adversarial review)
193
+ - **TOCTOU + symlink bypass** di uninstall execute phase: re-check Test-PathHasReparsePoint sebelum Remove-Item (lib/safety.ps1 + uninstall.ps1)
194
+ - **Path containment trailing separator bug**: Resolve-SafeProjectPath enforce trailing DirectorySeparatorChar untuk prevent prefix collision (C:\proj vs C:\proj-evil)
195
+ - **GPG verification di update-kit.ps1**: `git verify-tag` SEBELUM hapus .git/. RepoUrl allowlist untuk prevent supply chain hijack.
196
+ - **HMAC manifest signing**: lib/manifest-signing.ps1 sign .install-manifest.json. uninstall.ps1 verify signature sebelum trust entries (prevent tampering attack)
197
+ - **Anti-prompt-injection rules** di CLAUDE_universal_v1.md: file content = DATA bukan instruction. External URL+pipe-to-shell = REFUSE. Identity dari .staff-profile.md, bukan prompt klaim.
198
+ - **Implicit consent removed** dari JALANKAN_KIT: destructive ops (delete, force-push, prisma migrate prod) tetap WAJIB konfirmasi 1x walau auto-confirm aktif.
199
+
200
+ #### Added (Tests + Single Source)
201
+ - **Pester test suite** untuk security boundary: tests/lib-safety.Tests.ps1 (Resolve-SafeProjectPath, Test-PathHasReparsePoint, Get-FileSha256, prefix collision case)
202
+ - **tests/Run-Tests.ps1**: Pester runner untuk lokal dev + CI
203
+ - **.github/workflows/validate.yml**: tambah pester-tests job
204
+ - **lib/kit-files.psd1**: Single source of truth untuk wajibAda (replace hard-coded list di setup-pola-b + kit.ps1)
205
+ - **lib/manifest-signing.ps1**: HMAC signing helpers
206
+ - **templates/STACK_VERSIONS.md**: Centralized version constants (Next.js, Prisma, Node, dst)
207
+
208
+ #### Changed (Inconsistency cleanup)
209
+ - **v1.1.0 references → v1.0.0** di SPLIT_REPO_MIGRATION_PROMPT_v1.md (5 occurrences fixed)
210
+ - **3 vs 4 repo inconsistency**: SPLIT_REPO_AGENTS_TEMPLATES.md + PROMPT_LIBRARY.md updated. TOOLS.md jadi OPT-IN.
211
+ - **README.md**: removed 6 deprecated file references, added 4 new prompts to table
212
+ - **MCP_SETUP.md**: renumber sections (2.0/2.0.5/2.1b chaos → 2.1-2.12 linear). Added TOC.
213
+ - **ONBOARDING.md ⇋ CLAUDE_TEAM_GUIDE.md**: merge overlap (TEAM_GUIDE section 3 jadi pointer ke ONBOARDING.md untuk detail).
214
+ - **Next.js version hardcoded → STACK_VERSIONS.md reference** di STACK_GUIDE, FRONTEND, STACK_DETECTION_PATTERN, PROJECT_STARTER_TEMPLATES.
215
+ - **JALANKAN_KIT.md RAMPING**: 5 popup → 2-3 smart popup dengan auto-decide.
216
+
217
+ #### Kept (Per User Feedback)
218
+ - MCP_SETUP.md schema isolation per-staff (user butuh untuk multi-staff)
219
+ - AI Reviewer GitHub Action (works for both solo + team)
220
+ - 17 file team auto-copy (works for both solo + team)
221
+ - Multi-Divisi 12-lens (existing)
222
+ - Split Repo Migration capability + Auto-Push 3 Repo flow
223
+ - Discord-only webhook
224
+ - Project Starter Templates catalog
225
+
226
+ #### Migration Notes
227
+ Force-push v1.0.0 (no version bump per user preference). User belum distribusi.
228
+ Setelah update, re-clone fresh: `git clone --depth 1 -b v1.0.0 https://github.com/ojokesusu/lintasAI.git .claude-kit`
229
+
230
+ ---
231
+
232
+ ### v1.0.0 [REPUBLISH 2026-06-05] - Split Repo Migration + 20 Tools
233
+
234
+ #### Added (4 new files)
235
+
236
+ - **templates/CROSS_REPO_TYPES_PIPELINE.md** - Full automation guide: backend auto-publish @<project>/shared + frontend Renovate auto-PR + Discord notif. End-to-end workflow Day 1 backend → Day 2 frontend auto-coordinate.
237
+ - **templates/github/RENOVATE_FRONTEND.json** - Renovate config template untuk frontend repo (auto-PR @<project>/shared updates).
238
+ - **templates/github/PUBLISH_SHARED_WORKFLOW.yml** - GitHub Actions template: backend push → generate types → bump version → publish ke GitHub Packages → Discord notif.
239
+ - **templates/github/GENERATE_TYPES_SCRIPT.md** - Setup tsup + Prisma generate untuk auto types pipeline.
240
+
241
+ - **SPLIT_REPO_MIGRATION_PROMPT_v1.md** (root) - Single-paste prompt untuk owner migrate monolith ke 3 repo split (default; 4 repo opt-in untuk team >20 staff atau compliance audit). AI analyze project + propose plan + execute auto-push step-by-step. Effort ~1.5 jam dengan auto-push flow (was 4-6 minggu manual).
242
+
243
+ - **templates/SPLIT_REPO_AGENTS_TEMPLATES.md** - 4 AGENTS.md template (frontend, backend, shared, tools). AI customize dengan project name.
244
+
245
+ - **templates/SPLIT_REPO_NON_PROGRAMMER_PROMPTS.md** - Cheatsheet prompt staff non-programmer dengan analogi tools digital (Tokopedia, Gojek, WhatsApp, Discord).
246
+
247
+ - **templates/SPLIT_REPO_TOOLS_SETUP.md** - Setup guide 18+ tools (Swagger, Storybook, Playwright, Discord webhook, Sentry, dst). Tier 1/2/3 priority.
248
+
249
+ - **templates/DISCORD_BOT_INTEGRATION.md** - Discord server structure + webhook setup + bot custom guide
250
+
251
+ - **templates/STACK_DETECTION_PATTERN.md** - Pattern untuk AI auto-detect stack saat user pertama kali pakai lintasAI
252
+
253
+ - **templates/PROJECT_STARTER_TEMPLATES.md** - Catalog 4 starter templates + how-to (default: project setengah jadi SKIP starter)
254
+
255
+ - **templates/split-agents/FRONTEND.md, BACKEND.md, SHARED.md, TOOLS.md** - 4 AGENTS.md template (was 1 mega-file, sekarang split)
256
+
257
+ #### Changed
258
+
259
+ - setup-pola-b.ps1: wajibAda tambah 4 file split repo
260
+ - kit.ps1: doctor wajibAda update
261
+ - templates/split-agents/FRONTEND.md: tambah section "Session Start Auto-Check" (versi compare + Swagger fetch + Discord context).
262
+ - templates/split-agents/BACKEND.md: tambah section "Auto-Publish @<project>/shared (Trigger Rule)" - WAJIB update shared sebelum commit.
263
+ - templates/PROMPT_LIBRARY.md: tambah Prompt 18-20 (split repo migration, AGENTS.md deploy, non-programmer cheatsheet)
264
+ - JALANKAN_KIT.md: tambah Popup #5 auto-offer split repo migration ke first-time user
265
+ - Discord-only webhook (user feedback): remove generic Slack/Telegram references
266
+ - Removed: TypeScript strict + AI error explainer section (already covered di docs/ generated JALANKAN_KIT.md)
267
+ - templates/SPLIT_REPO_AGENTS_TEMPLATES.md jadi index stub (point ke split-agents/ subfolder)
268
+ - templates/SPLIT_REPO_TOOLS_SETUP.md: Playwright + DevContainer elevate dari Bonus ke Tier 2 (non-programmer recommended)
269
+ - **3 repo default (was 4)**: akses-tools merged dalam backend/scripts/ dengan CODEOWNERS owner-only. Skip terpisah repo kecuali team grow >20 staff atau compliance audit.
270
+ - **Option B (Frontend Shell Wrapper) default top recommendation**: API route shell 3-baris forward ke backend. Privacy preserved (logic di compiled package @<project>/backend-client). Keep Next.js Server Action velocity.
271
+ - **Auto-Push 3 Repo Flow**: Owner pre-buat 3 repo empty di GitHub, paste URLs ke AI, AI handle file mapping + git init + commit + push ke 3 repo. Total effort ~1.5 jam.
272
+
273
+ #### Why v1.0.0 republish (bukan v1.1.0)?
274
+
275
+ User belum distribusi lintasAI ke siapapun. Tidak ada existing user yang perlu version bump. Force-push v1.0.0 lebih clean.
276
+
277
+ Catatan: setelah ada user external, baru pakai semantic versioning strict (v1.0.x patch, v1.x.0 minor, vX.0.0 major).
278
+
279
+ ---
280
+
281
+ ### v1.0.0 [REPUBLISH 2026-06-04] - Hardening
282
+
283
+ #### Added
284
+ - `kit.ps1 rollback` subcommand (auto-restore from .bak via lib/rollback.ps1) [BREAKING-safety-net]
285
+ - `kit.ps1 version` subcommand (print currently-installed kit version)
286
+ - `kit.ps1 doctor` integrity verification (sha256 diff vs manifest baseline, 3-bucket: PRISTINE/MODIFIED/MISSING)
287
+ - `update-kit.ps1` pre-clone version check (no-op if already on latest tag, saves bandwidth & time)
288
+ - `lib/rollback.ps1` (new module, exports Invoke-Rollback + Get-RollbackPreview)
289
+ - `lib/safety.ps1` (extracted from uninstall.ps1: Resolve-SafeProjectPath, Test-PathHasReparsePoint, Get-FileSha256, Read-Manifest, dst)
290
+ - `.github/workflows/validate.yml` (CI: ps-parse + smoke-setup + yaml-lint on push/PR)
291
+ - `docs/SIGNED_RELEASE.md` (GPG verification workflow untuk owner + staff; auto-deployed)
292
+ - `PROJECT_LIFECYCLE_PROMPT_v1.md` (merge of 4 stage prompts: kickoff/bootstrap-docs/update-docs/migration)
293
+
294
+ #### Changed
295
+ - Entry-point prompts: 9 -> 4 (5 deprecated jadi stub, preserve git history)
296
+ - Multi-divisi 12-lens review: sekarang auto-detect (skip untuk simple Q&A; full untuk refactor besar / arsitektur / security)
297
+ - ANALOGI 30-jargon library: deprecated, AI generate on-demand per CLAUDE rule (5 grounding samples inline)
298
+ - `uninstall.ps1`: refactor extract safety helpers ke lib/safety.ps1 (DRY, reusable dari rollback module)
299
+
300
+ #### Deprecated
301
+ - `FIRST_SESSION_PROMPT_v1.md` -> use JALANKAN_KIT.md
302
+ - `SETUP_POLA_B_PROMPT_v1.md` -> use JALANKAN_KIT.md
303
+ - `BOOTSTRAP_PROJECT_DOCS_PROMPT_v1.md` -> Stage B in PROJECT_LIFECYCLE_PROMPT_v1.md
304
+ - `PROJECT_KICKOFF_PROMPT_v1.md` -> Stage A in PROJECT_LIFECYCLE_PROMPT_v1.md
305
+ - `PROJECT_MIGRATION_PROMPT_v1.md` -> Stage D in PROJECT_LIFECYCLE_PROMPT_v1.md
306
+ - `UPDATE_DOCS_PROMPT_v1.md` -> Stage C in PROJECT_LIFECYCLE_PROMPT_v1.md
307
+ - `templates/ANALOGI_LIBRARY.md` -> AI on-demand
308
+
309
+ #### Migration steps (staff IT) [SCAN-REQUIRED untuk staff yang sudah install < v1.0.0-2026-06-04]
310
+ 1. Cek versi current: `.claude-kit\kit.ps1 version`
311
+ 2. Update: `.claude-kit\kit.ps1 update` (auto-classify Tier 3)
312
+ 3. AI baca CHANGELOG, eksekusi migration: stub files lama akan otomatis ter-replace
313
+ 4. Verify: `.claude-kit\kit.ps1 doctor` -> harus output PRISTINE: <count>, MISSING: 0