@ojokesusu/lintasai 1.1.2 → 1.1.3
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.
- package/.gitignore +55 -0
- package/AGENTS.md.template +91 -0
- package/CHANGELOG.md +20 -0
- package/bin/lintasai.js +7 -1
- package/package.json +8 -2
- package/setup-pola-b.ps1 +51 -2
package/.gitignore
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# File yang JANGAN di-commit ke repo standar tim
|
|
2
|
+
# (Kit ini sendiri tidak generate file build, tapi standar untuk repo)
|
|
3
|
+
|
|
4
|
+
# OS
|
|
5
|
+
.DS_Store
|
|
6
|
+
Thumbs.db
|
|
7
|
+
desktop.ini
|
|
8
|
+
ehthumbs.db
|
|
9
|
+
ehthumbs_vista.db
|
|
10
|
+
|
|
11
|
+
# Editor / IDE
|
|
12
|
+
.vscode/
|
|
13
|
+
.idea/
|
|
14
|
+
*.swp
|
|
15
|
+
*.swo
|
|
16
|
+
*~
|
|
17
|
+
.history/
|
|
18
|
+
.project
|
|
19
|
+
.classpath
|
|
20
|
+
|
|
21
|
+
# Backup yang dihasilkan install-windows.ps1 saat re-install
|
|
22
|
+
*.backup-*
|
|
23
|
+
*.bak
|
|
24
|
+
*.old
|
|
25
|
+
|
|
26
|
+
# Log
|
|
27
|
+
*.log
|
|
28
|
+
npm-debug.log*
|
|
29
|
+
yarn-debug.log*
|
|
30
|
+
|
|
31
|
+
# Secret — JANGAN PERNAH commit
|
|
32
|
+
.env
|
|
33
|
+
.env.local
|
|
34
|
+
.env.*.local
|
|
35
|
+
*.pem
|
|
36
|
+
*.key
|
|
37
|
+
credentials*
|
|
38
|
+
secrets/
|
|
39
|
+
|
|
40
|
+
# Build / output (kalau kit di-extend dengan tools nantinya)
|
|
41
|
+
node_modules/
|
|
42
|
+
dist/
|
|
43
|
+
build/
|
|
44
|
+
out/
|
|
45
|
+
.next/
|
|
46
|
+
.cache/
|
|
47
|
+
|
|
48
|
+
# Test coverage
|
|
49
|
+
coverage/
|
|
50
|
+
*.lcov
|
|
51
|
+
|
|
52
|
+
# Paket lokal saat zipping/testing
|
|
53
|
+
*.zip
|
|
54
|
+
*.tar.gz
|
|
55
|
+
*.tgz
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# AGENTS.md — Aturan Proyek <NAMA_PROYEK>
|
|
2
|
+
|
|
3
|
+
> v1 · <TANGGAL_HARI_INI> · ikut standar tim IT (Pola B)
|
|
4
|
+
|
|
5
|
+
<!-- Header di atas auto-isi oleh setup-pola-b.ps1 (nama proyek dari folder root, tanggal dari sistem). Kalau setup manual, isi sendiri. -->
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Pengantar
|
|
10
|
+
|
|
11
|
+
Proyek ini ikut **standar kerja tim IT** (kit terpasang di `./.claude-kit/`).
|
|
12
|
+
Aturan utama (cara coding, dokumentasi, larangan) ada di **`./.claude-kit/CLAUDE_universal_v1.md`** — wajib dibaca AI tiap sesi.
|
|
13
|
+
File ini cuma berisi **override khusus proyek** + instruksi resolusi path supaya AI tidak nyasar ke folder global.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Path resolution (PENTING — instruksi untuk AI)
|
|
18
|
+
|
|
19
|
+
Kit ini di-embed di subfolder `./.claude-kit/` (bukan di `%USERPROFILE%\.claude\`).
|
|
20
|
+
Saat baca/merujuk file kit, **kamu (AI) wajib mengganti** path lama jadi path lokal:
|
|
21
|
+
|
|
22
|
+
- `%USERPROFILE%\.claude\<NAMA_FILE>` → `./.claude-kit/<NAMA_FILE>`
|
|
23
|
+
- `~/.claude/<NAMA_FILE>` → `./.claude-kit/<NAMA_FILE>`
|
|
24
|
+
|
|
25
|
+
Kalau install global **dan** `./.claude-kit/` sama-sama ada → **`./.claude-kit/` menang** (version-locked per proyek).
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Versi kit aktif
|
|
30
|
+
|
|
31
|
+
- Versi kit di `./.claude-kit/`: **<VERSI_KIT>** <!-- ISI manual setelah cek `./.claude-kit/CHANGELOG.md`. Tulis literal (tanpa kurung siku). -->
|
|
32
|
+
- Sumber kit (repo standar tim): **<URL_REPO_STANDAR>** <!-- ISI: URL repo git tempat kit dirilis. -->
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Override khusus proyek
|
|
37
|
+
|
|
38
|
+
Centang `[x]` cuma yang **beda dari default kit**. Yang tidak dicentang = ikut default.
|
|
39
|
+
Contoh: `- [x] Bahasa docs: EN (override dari default ID karena klien minta)`.
|
|
40
|
+
|
|
41
|
+
- [ ] Bahasa docs: <!-- default ID -->
|
|
42
|
+
- [ ] Format commit: <!-- default Conventional Commits -->
|
|
43
|
+
- [ ] Folder `docs/`: <!-- default ikut `./.claude-kit/templates/architecture.md` -->
|
|
44
|
+
- [ ] Tech stack: <!-- default React/Next.js + Tailwind + shadcn -->
|
|
45
|
+
- [ ] Branch utama: <!-- default `main` -->
|
|
46
|
+
- [ ] Pakai GitHub Issue: <!-- default Tidak — pakai chat. Ubah ke `Ya` kalau ada klien eksternal yang tracking via Issue. -->
|
|
47
|
+
- [ ] Channel chat task: <!-- link Slack/Discord/Telegram/WhatsApp tempat staff posting task -->
|
|
48
|
+
- [ ] Lain-lain:
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Workflow & Komunikasi Task
|
|
53
|
+
|
|
54
|
+
Tim ini pakai workflow chat-driven (tanpa GitHub Issue by default). Detail di `./.claude-kit/templates/CLAUDE_TEAM_GUIDE.md` section 5b.
|
|
55
|
+
|
|
56
|
+
- **Channel chat task**: <!-- ISI: link Slack/Discord/Telegram/WhatsApp -->
|
|
57
|
+
- **Pakai GitHub Issue?** Tidak (default tim). Ubah ke "Ya" kalau proyek punya klien eksternal yang tracking via Issue.
|
|
58
|
+
- **Format prompt task**: lihat `./.claude-kit/templates/PROMPT_LIBRARY.md` section "Prompts untuk Workflow Chat-Driven Task".
|
|
59
|
+
- **Risk Level decision tree**: lihat `./.claude-kit/templates/CLAUDE_TEAM_GUIDE.md` section 7b (Low/Medium/High klasifikasi task).
|
|
60
|
+
- **Rollback playbook**: lihat `./.claude-kit/templates/CLAUDE_TEAM_GUIDE.md` section 13b (git revert <5 menit).
|
|
61
|
+
- **Feature flag** = advanced/post-launch (kit early-stage default = staging-only). Lihat `./.claude-kit/templates/feature-flags-advanced.md` kalau butuh.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Skenario adopsi (pilih SATU, hapus 3 sisanya)
|
|
66
|
+
|
|
67
|
+
- **(a) Proyek baru / from scratch** → `./.claude-kit/PROJECT_LIFECYCLE_PROMPT_v1.md` (Stage A: Kickoff)
|
|
68
|
+
- **(b) Proyek lama tanpa docs** → `./.claude-kit/PROJECT_LIFECYCLE_PROMPT_v1.md` (Stage B: Bootstrap Docs)
|
|
69
|
+
- **(c) Proyek setengah jadi (sudah ada sebagian docs)** → `./.claude-kit/PROJECT_LIFECYCLE_PROMPT_v1.md` (Stage D: Migration)
|
|
70
|
+
- **(d) Sudah siap kerja task biasa (tidak butuh kickoff/migrasi)** → langsung pakai
|
|
71
|
+
|
|
72
|
+
Sesi pertama tim member baru: jalankan `./.claude-kit/SETUP_POLA_B_PROMPT_v1.md`.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Catatan tim
|
|
77
|
+
|
|
78
|
+
<!-- Kosongkan section ini kalau proyek solo. -->
|
|
79
|
+
|
|
80
|
+
- Owner standar tim: <!-- nama + email/handle PIC kit -->
|
|
81
|
+
- Channel diskusi: <!-- link Slack/Discord/Telegram -->
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Riwayat update kit di proyek ini
|
|
86
|
+
|
|
87
|
+
| Versi kit | Tanggal update | Siapa update | Catatan |
|
|
88
|
+
|-----------|--------------------|--------------|----------------------|
|
|
89
|
+
| <VERSI_KIT> | <TANGGAL_HARI_INI> | <NAMA_KAMU> | Setup awal Pola B |
|
|
90
|
+
|
|
91
|
+
<!-- Tambah baris baru tiap update isi `./.claude-kit/` ke versi lebih baru. -->
|
package/CHANGELOG.md
CHANGED
|
@@ -20,6 +20,26 @@ Slot tambahan untuk perubahan berikutnya sebelum versi v1.0.2.
|
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
+
## v1.1.3 [2026-06-06]
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
#### NPX Invocation Bugs (Distribution Blocker)
|
|
28
|
+
- **Bug 1**: AGENTS.md.template tidak ter-bundle ke npm tarball — fix di package.json files array (added "*.template", "AGENTS.md.template", "decisions/", "LICENSE")
|
|
29
|
+
- **Bug 2**: bin/lintasai.js tidak pass user CWD ke setup-pola-b.ps1, sehingga script salah deteksi "Root proyek" sebagai npm cache folder bukan user folder
|
|
30
|
+
- Fix: bin/lintasai.js sekarang pass `-ProjectRoot $process.cwd()` untuk command init/update/uninstall
|
|
31
|
+
- Fix: setup-pola-b.ps1 sekarang accept `-ProjectRoot` parameter
|
|
32
|
+
- Fix: setup-pola-b.ps1 detect "npx mode" (kit source di npm cache vs project) lalu COPY kit ke $ProjectRoot/.claude-kit/
|
|
33
|
+
|
|
34
|
+
### Migration
|
|
35
|
+
Staff yang baru install via `npx @ojokesusu/lintasai init` sekarang akan dapat behavior yang benar:
|
|
36
|
+
- Kit copy dari npm cache ke <user-project>/.claude-kit/
|
|
37
|
+
- "Root proyek" = folder user CWD
|
|
38
|
+
- "Nama proyek" = nama folder user
|
|
39
|
+
- AGENTS.md.template ada di tarball, deploy berhasil
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
23
43
|
## v1.1.2 [2026-06-06]
|
|
24
44
|
|
|
25
45
|
### Changed
|
package/bin/lintasai.js
CHANGED
|
@@ -66,16 +66,22 @@ if (!target) {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
// Build powershell command
|
|
69
|
+
const userCwd = process.cwd();
|
|
70
|
+
// For init/update/uninstall: pass user CWD explicitly so script knows real project root
|
|
71
|
+
const shouldPassProjectRoot = ["init", "update", "uninstall"].includes(command);
|
|
69
72
|
let psArgs;
|
|
70
73
|
if (Array.isArray(target)) {
|
|
71
74
|
// kit.ps1 subcommand
|
|
72
75
|
psArgs = ["-NoProfile", "-ExecutionPolicy", "Bypass", "-File", path.join(KIT_ROOT, target[0]), target[1], ...args];
|
|
76
|
+
} else if (shouldPassProjectRoot) {
|
|
77
|
+
// Direct script call with -ProjectRoot
|
|
78
|
+
psArgs = ["-NoProfile", "-ExecutionPolicy", "Bypass", "-File", path.join(KIT_ROOT, target), "-ProjectRoot", userCwd, ...args];
|
|
73
79
|
} else {
|
|
74
80
|
// Direct script call
|
|
75
81
|
psArgs = ["-NoProfile", "-ExecutionPolicy", "Bypass", "-File", path.join(KIT_ROOT, target), ...args];
|
|
76
82
|
}
|
|
77
83
|
|
|
78
|
-
const child = spawn("powershell.exe", psArgs, { stdio: "inherit" });
|
|
84
|
+
const child = spawn("powershell.exe", psArgs, { stdio: "inherit", cwd: userCwd });
|
|
79
85
|
child.on("close", (code) => {
|
|
80
86
|
process.exit(code || 0);
|
|
81
87
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ojokesusu/lintasai",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "AI workflow kit untuk Claude Code dengan tier model + cross-repo automation (Windows-first)",
|
|
5
5
|
"bin": {
|
|
6
6
|
"lintasai": "./bin/lintasai.js"
|
|
@@ -8,12 +8,18 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
"bin/",
|
|
10
10
|
"*.ps1",
|
|
11
|
+
"*.psm1",
|
|
11
12
|
"lib/",
|
|
12
13
|
"templates/",
|
|
13
14
|
"docs/",
|
|
14
15
|
"tests/",
|
|
15
16
|
"*.md",
|
|
16
|
-
"
|
|
17
|
+
"*.template",
|
|
18
|
+
"AGENTS.md.template",
|
|
19
|
+
".github/",
|
|
20
|
+
"decisions/",
|
|
21
|
+
"LICENSE",
|
|
22
|
+
".gitignore"
|
|
17
23
|
],
|
|
18
24
|
"scripts": {
|
|
19
25
|
"test": "echo \"Pester tests run via ./tests/Run-Tests.ps1\" && exit 0"
|
package/setup-pola-b.ps1
CHANGED
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
param(
|
|
39
39
|
[switch]$Force,
|
|
40
40
|
[switch]$DryRun,
|
|
41
|
-
[switch]$SkipTeamFiles
|
|
41
|
+
[switch]$SkipTeamFiles,
|
|
42
|
+
[string]$ProjectRoot = $null
|
|
42
43
|
)
|
|
43
44
|
|
|
44
45
|
$ErrorActionPreference = 'Stop'
|
|
@@ -46,6 +47,50 @@ $ErrorActionPreference = 'Stop'
|
|
|
46
47
|
# ---- Resolve folder kit (tempat script ini berada) ----
|
|
47
48
|
$KitDir = if ($PSScriptRoot) { $PSScriptRoot } elseif ($MyInvocation.MyCommand.Path) { Split-Path -Parent $MyInvocation.MyCommand.Path } else { (Get-Location).Path }
|
|
48
49
|
|
|
50
|
+
# ---- Resolve ProjectRoot (npm wrapper vs traditional invocation) ----
|
|
51
|
+
# Traditional: kit lives at <project>/.claude-kit/, $ProjectRoot = parent of $KitDir.
|
|
52
|
+
# NPX wrapper: $ProjectRoot passed explicitly; kit source at $KitDir (npm cache) must
|
|
53
|
+
# be COPIED to $ProjectRoot/.claude-kit/ before setup continues.
|
|
54
|
+
$script:__lintasAI_NpxMode = $false
|
|
55
|
+
if (-not $ProjectRoot) {
|
|
56
|
+
# Traditional invocation - kit lives at <project>/.claude-kit/, parent is project
|
|
57
|
+
$ProjectRoot = Split-Path -Parent $KitDir
|
|
58
|
+
} else {
|
|
59
|
+
# NPX wrapper invocation - $ProjectRoot passed explicitly
|
|
60
|
+
Write-Host "[npx] Mode: explicit ProjectRoot = $ProjectRoot" -ForegroundColor Cyan
|
|
61
|
+
$script:__lintasAI_NpxMode = $true
|
|
62
|
+
}
|
|
63
|
+
$ProjectRoot = (Resolve-Path $ProjectRoot -ErrorAction Stop).Path
|
|
64
|
+
|
|
65
|
+
# ---- NPX mode: copy kit from $KitDir (npm cache) to $ProjectRoot/.claude-kit/ ----
|
|
66
|
+
# Detection: if $KitDir is NOT already inside $ProjectRoot/.claude-kit/, we need to copy.
|
|
67
|
+
$expectedKitDir = Join-Path $ProjectRoot '.claude-kit'
|
|
68
|
+
$kitDirResolved = (Resolve-Path $KitDir -ErrorAction Stop).Path
|
|
69
|
+
$expectedKitDirNormalized = $expectedKitDir.TrimEnd('\','/')
|
|
70
|
+
$kitDirNormalized = $kitDirResolved.TrimEnd('\','/')
|
|
71
|
+
if ($script:__lintasAI_NpxMode -and ($kitDirNormalized -ne $expectedKitDirNormalized)) {
|
|
72
|
+
Write-Host "[npx] Copy kit: $KitDir -> $expectedKitDir" -ForegroundColor Cyan
|
|
73
|
+
if (-not $DryRun) {
|
|
74
|
+
if (-not (Test-Path $expectedKitDir)) {
|
|
75
|
+
New-Item -ItemType Directory -Path $expectedKitDir -Force | Out-Null
|
|
76
|
+
}
|
|
77
|
+
# Robocopy or Copy-Item: use Copy-Item for cross-platform-ish behavior
|
|
78
|
+
Get-ChildItem -Path $KitDir -Force | ForEach-Object {
|
|
79
|
+
$destPath = Join-Path $expectedKitDir $_.Name
|
|
80
|
+
if ($_.PSIsContainer) {
|
|
81
|
+
Copy-Item -Path $_.FullName -Destination $destPath -Recurse -Force
|
|
82
|
+
} else {
|
|
83
|
+
Copy-Item -Path $_.FullName -Destination $destPath -Force
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
Write-Host "[npx] Kit copied successfully." -ForegroundColor Green
|
|
87
|
+
} else {
|
|
88
|
+
Write-Host "[DRY] [npx] Would copy kit contents from $KitDir to $expectedKitDir" -ForegroundColor Yellow
|
|
89
|
+
}
|
|
90
|
+
# Pivot $KitDir to the deployed location so rest of script operates on project copy
|
|
91
|
+
$KitDir = $expectedKitDir
|
|
92
|
+
}
|
|
93
|
+
|
|
49
94
|
# ---- Dot-source library helpers (heavy-lifting) ----
|
|
50
95
|
# Order penting: agents-md.ps1 dot-source SEBELUM manifest.ps1.
|
|
51
96
|
# agents-md.ps1 punya guard `if ($script:__lintasAI_AgentsMdLoaded)` (anti-redefine).
|
|
@@ -130,7 +175,11 @@ if ($kitFolderName -ne '.claude-kit') {
|
|
|
130
175
|
}
|
|
131
176
|
|
|
132
177
|
# ---- Resolve root proyek (parent dari folder kit) ----
|
|
133
|
-
$ProjectRoot
|
|
178
|
+
# NOTE: $ProjectRoot sudah di-resolve di atas (param eksplisit atau Split-Path -Parent $KitDir).
|
|
179
|
+
# Re-derive di sini HANYA kalau belum di-set (defensif). Skip kalau npx mode (sudah eksplisit).
|
|
180
|
+
if (-not $ProjectRoot) {
|
|
181
|
+
$ProjectRoot = Split-Path -Parent $KitDir
|
|
182
|
+
}
|
|
134
183
|
$ProjectName = Split-Path -Leaf $ProjectRoot
|
|
135
184
|
$Today = Get-Date -Format 'yyyy-MM-dd'
|
|
136
185
|
$Timestamp = Get-Date -Format 'yyyyMMdd-HHmmss'
|