@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.
- package/.github/workflows/publish-npm.yml +40 -0
- package/.github/workflows/validate.yml +93 -0
- package/AUDIT_POST_SETUP_PROMPT_v1.md +280 -0
- package/BOOTSTRAP_PROJECT_DOCS_PROMPT_v1.md +3 -0
- package/CHANGELOG.md +313 -0
- package/CLAUDE_universal_v1.md +1021 -0
- package/CONTRIBUTING.md +101 -0
- package/FIRST_SESSION_PROMPT_v1.md +7 -0
- package/JALANKAN_KIT.md +188 -0
- package/LICENSE +21 -0
- package/MULAI_DI_SINI.md +145 -0
- package/PROJECT_KICKOFF_PROMPT_v1.md +3 -0
- package/PROJECT_LIFECYCLE_PROMPT_v1.md +536 -0
- package/PROJECT_MIGRATION_PROMPT_v1.md +3 -0
- package/README.md +505 -0
- package/SETUP_POLA_B_PROMPT_v1.md +5 -0
- package/SPLIT_REPO_MIGRATION_PROMPT_v1.md +485 -0
- package/TEAM_ROLLOUT_GUIDE_v1.md +172 -0
- package/UPDATE_DOCS_PROMPT_v1.md +3 -0
- package/UPDATE_KIT_PROMPT_v1.md +213 -0
- package/bin/lintasai.js +81 -0
- package/docs/SIGNED_RELEASE.md +162 -0
- package/install-windows.ps1 +225 -0
- package/kit.ps1 +508 -0
- package/lib/agents-md.ps1 +174 -0
- package/lib/git-helpers.ps1 +104 -0
- package/lib/kit-files.psd1 +133 -0
- package/lib/manifest-signing.ps1 +65 -0
- package/lib/manifest.ps1 +267 -0
- package/lib/rollback.ps1 +241 -0
- package/lib/safety.ps1 +193 -0
- package/lib/template-deploy.ps1 +242 -0
- package/lib/version-detect.ps1 +161 -0
- package/package.json +36 -0
- package/setup-pola-b.ps1 +687 -0
- package/templates/ANALOGI_LIBRARY.md +7 -0
- package/templates/CLAUDE_TEAM_GUIDE.md +505 -0
- package/templates/CROSS_REPO_TYPES_PIPELINE.md +473 -0
- package/templates/DB_SCHEMA_SCAN_PROMPT.md +194 -0
- package/templates/DISCORD_BOT_INTEGRATION.md +187 -0
- package/templates/GLOSSARY_NON_PROGRAMMER.md +361 -0
- package/templates/INDEX.md +157 -0
- package/templates/MCP_SETUP.md +1145 -0
- package/templates/MIGRATE_TO_SUBFOLDER_PROMPT_v1.md +220 -0
- package/templates/ONBOARDING.md +172 -0
- package/templates/PROJECT_STARTER_TEMPLATES.md +264 -0
- package/templates/PROMPT_LIBRARY.md +790 -0
- package/templates/RLS_SETUP_PROMPT.md +167 -0
- package/templates/SECURITY_INCIDENT_PLAYBOOK.md +191 -0
- package/templates/SPLIT_REPO_AGENTS_TEMPLATES.md +32 -0
- package/templates/SPLIT_REPO_NON_PROGRAMMER_PROMPTS.md +604 -0
- package/templates/SPLIT_REPO_TOOLS_SETUP.md +388 -0
- package/templates/STACK_DETECTION_PATTERN.md +261 -0
- package/templates/STACK_GUIDE.md +564 -0
- package/templates/STACK_MIGRATION_GUIDE.md +154 -0
- package/templates/STACK_VERSIONS.md +31 -0
- package/templates/UPDATE_GUIDE.md +246 -0
- package/templates/_EXAMPLE.md +110 -0
- package/templates/_PATTERNS.md +173 -0
- package/templates/architecture.md +180 -0
- package/templates/architecture_auto.md +61 -0
- package/templates/decisions/README.md +108 -0
- package/templates/decisions/_TEMPLATE.md +84 -0
- package/templates/feature-flags-advanced.md +171 -0
- package/templates/github/CODEOWNERS.template +61 -0
- package/templates/github/GENERATE_TYPES_SCRIPT.md +77 -0
- package/templates/github/PUBLISH_SHARED_WORKFLOW.yml +52 -0
- package/templates/github/RECEIVE_BACKEND_UPDATE.yml +106 -0
- package/templates/github/RENOVATE_FRONTEND.json +28 -0
- package/templates/github/TRIGGER_FRONTEND_UPDATE.yml +29 -0
- package/templates/github/pull_request_template.md +44 -0
- package/templates/github/scripts/ai-review.js +153 -0
- package/templates/github/workflows/ai-review.yml +61 -0
- package/templates/github/workflows/backup-schemas.yml +169 -0
- package/templates/glossary.md +110 -0
- package/templates/split-agents/BACKEND.md +149 -0
- package/templates/split-agents/FRONTEND.md +141 -0
- package/templates/split-agents/SHARED.md +82 -0
- package/templates/split-agents/TOOLS.md +77 -0
- package/tests/Run-Tests.ps1 +19 -0
- package/tests/lib-safety.Tests.ps1 +66 -0
- package/tests/rollback.Tests.ps1 +66 -0
- package/tests/uninstall.Tests.ps1 +265 -0
- package/tests/update-kit.Tests.ps1 +78 -0
- package/uninstall.ps1 +794 -0
- package/update-kit.ps1 +907 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<#
|
|
2
|
+
.SYNOPSIS
|
|
3
|
+
lib/version-detect.ps1 - Shared kit version detection untuk lintasAI kit scripts.
|
|
4
|
+
|
|
5
|
+
.DESCRIPTION
|
|
6
|
+
Module ini berisi helper detect versi kit yang dipakai bersama oleh script
|
|
7
|
+
(kit.ps1, setup-pola-b.ps1, doctor, dst.). Sebelumnya logic ini di-duplicate
|
|
8
|
+
di tiap script dengan regex yang slightly berbeda - berisiko drift kalau
|
|
9
|
+
format CHANGELOG.md berubah. Library ini jadi satu sumber kebenaran.
|
|
10
|
+
|
|
11
|
+
Helpers yang di-export:
|
|
12
|
+
- Get-KitVersionFromChangelog : Parse versi dari CHANGELOG.md. Support
|
|
13
|
+
DUA format header (current + strict).
|
|
14
|
+
Returns string dengan prefix 'v' atau $null.
|
|
15
|
+
- Get-KitVersionFromManifest : Read metadata.kit_version dari
|
|
16
|
+
.install-manifest.json di project root.
|
|
17
|
+
Returns string atau $null.
|
|
18
|
+
- Get-KitVersionFallback : Defense-in-depth chain:
|
|
19
|
+
manifest -> $script:KIT_VERSION ->
|
|
20
|
+
CHANGELOG regex -> "unknown".
|
|
21
|
+
|
|
22
|
+
Format CHANGELOG yang di-support (regex):
|
|
23
|
+
1. "## vX.Y.Z [date]" (current lintasAI style, mis. "## v1.5.0 [2026-06-01]")
|
|
24
|
+
2. "## [X.Y.Z]" (Keep-a-Changelog strict, mis. "## [1.5.0]")
|
|
25
|
+
|
|
26
|
+
Kedua format di-coba berurutan; format current style ditest lebih dulu
|
|
27
|
+
karena itu yang dominan di kit ini.
|
|
28
|
+
|
|
29
|
+
.NOTES
|
|
30
|
+
Versi : 1.0.0
|
|
31
|
+
Tanggal: 2026-06-06
|
|
32
|
+
Target : PowerShell 5.1+ (Windows PowerShell).
|
|
33
|
+
Catatan: Function-only module. Caller harus dot-source: . .\lib\version-detect.ps1
|
|
34
|
+
#>
|
|
35
|
+
|
|
36
|
+
# ---- Helper: parse versi dari CHANGELOG.md ----
|
|
37
|
+
# Support 2 format header:
|
|
38
|
+
# "## vX.Y.Z [date]" (current style) - DICOBA DULU karena dominan
|
|
39
|
+
# "## [X.Y.Z]" (Keep-a-Changelog strict)
|
|
40
|
+
# Returns: string 'vX.Y.Z' (selalu prefix 'v') atau $null kalau tidak ketemu.
|
|
41
|
+
# Tidak throw - caller yang memutuskan fallback.
|
|
42
|
+
function Get-KitVersionFromChangelog {
|
|
43
|
+
[CmdletBinding()]
|
|
44
|
+
param(
|
|
45
|
+
[Parameter(Mandatory)]
|
|
46
|
+
[string]$ChangelogPath
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
if (-not (Test-Path -LiteralPath $ChangelogPath)) {
|
|
50
|
+
return $null
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
try {
|
|
54
|
+
# Strategi 1: "## vX.Y.Z [date]" - format current lintasAI style.
|
|
55
|
+
# Pakai Get-Content + Where-Object supaya bisa ambil entry pertama
|
|
56
|
+
# (latest version, asumsi CHANGELOG newest-first).
|
|
57
|
+
$first = Get-Content -LiteralPath $ChangelogPath -Encoding UTF8 -ErrorAction Stop |
|
|
58
|
+
Where-Object { $_ -match '^##\s+v\d+\.' } |
|
|
59
|
+
Select-Object -First 1
|
|
60
|
+
|
|
61
|
+
if ($first -and ($first -match '(v\d+\.\d+\.\d+)')) {
|
|
62
|
+
return $matches[1]
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
# Strategi 2: "## [X.Y.Z]" - format Keep-a-Changelog strict.
|
|
66
|
+
# Pakai Select-String -List supaya match pertama (latest).
|
|
67
|
+
$bracket = Select-String -Path $ChangelogPath `
|
|
68
|
+
-Pattern '^##\s+\[(\d+\.\d+\.\d+)\]' `
|
|
69
|
+
-List -ErrorAction SilentlyContinue
|
|
70
|
+
|
|
71
|
+
if ($bracket) {
|
|
72
|
+
return 'v' + $bracket.Matches[0].Groups[1].Value
|
|
73
|
+
}
|
|
74
|
+
} catch {
|
|
75
|
+
# Read error / encoding error - treat sebagai "tidak ketemu"
|
|
76
|
+
# supaya caller bisa fallback ke source lain.
|
|
77
|
+
return $null
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return $null
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
# ---- Helper: parse versi dari .install-manifest.json ----
|
|
84
|
+
# Manifest = PRIMARY source (what was actually installed, bukan apa yang ada
|
|
85
|
+
# di file kit sekarang). Penting kalau user pakai kit lama tapi CHANGELOG-nya
|
|
86
|
+
# nge-track kit yang lebih baru.
|
|
87
|
+
#
|
|
88
|
+
# Returns: string (mis. 'v1.5.0' atau '1.5.0' - tergantung apa yang tersimpan)
|
|
89
|
+
# atau $null kalau manifest tidak ada / corrupt / tidak ada metadata.kit_version.
|
|
90
|
+
function Get-KitVersionFromManifest {
|
|
91
|
+
[CmdletBinding()]
|
|
92
|
+
param(
|
|
93
|
+
[Parameter(Mandatory)]
|
|
94
|
+
[string]$ProjectRoot
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
$manifestPath = Join-Path $ProjectRoot '.install-manifest.json'
|
|
98
|
+
if (-not (Test-Path -LiteralPath $manifestPath)) {
|
|
99
|
+
return $null
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
try {
|
|
103
|
+
# Pakai [System.IO.File]::ReadAllText supaya force UTF-8 read
|
|
104
|
+
# (Get-Content default encoding di PS 5.1 bisa ANSI / unreliable).
|
|
105
|
+
$json = [System.IO.File]::ReadAllText($manifestPath, [System.Text.Encoding]::UTF8)
|
|
106
|
+
$m = ConvertFrom-Json $json -ErrorAction Stop
|
|
107
|
+
|
|
108
|
+
if ($m.metadata -and $m.metadata.kit_version) {
|
|
109
|
+
return [string]$m.metadata.kit_version
|
|
110
|
+
}
|
|
111
|
+
} catch {
|
|
112
|
+
# JSON parse error / file unreadable - fallback ke source lain.
|
|
113
|
+
return $null
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return $null
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
# ---- Helper: full fallback chain ----
|
|
120
|
+
# Defense-in-depth: coba semua source berurutan, return yang pertama berhasil.
|
|
121
|
+
# Last resort = "unknown" (bukan "not installed" - kit-nya ada, cuma versi-nya
|
|
122
|
+
# tidak ke-detect).
|
|
123
|
+
#
|
|
124
|
+
# Order:
|
|
125
|
+
# 1. Manifest (.install-manifest.json) - PRIMARY (what was installed)
|
|
126
|
+
# 2. $script:KIT_VERSION constant - kit.ps1's own awareness
|
|
127
|
+
# 3. CHANGELOG.md regex - last code-based source
|
|
128
|
+
# 4. "unknown" - last resort
|
|
129
|
+
#
|
|
130
|
+
# -ProjectRoot : folder yang ada .install-manifest.json (biasanya = KitDir).
|
|
131
|
+
# -ChangelogPath : optional override path CHANGELOG. Default = $ProjectRoot\CHANGELOG.md.
|
|
132
|
+
function Get-KitVersionFallback {
|
|
133
|
+
[CmdletBinding()]
|
|
134
|
+
param(
|
|
135
|
+
[Parameter(Mandatory)]
|
|
136
|
+
[string]$ProjectRoot,
|
|
137
|
+
|
|
138
|
+
[string]$ChangelogPath
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
# Source 1: manifest
|
|
142
|
+
$ver = Get-KitVersionFromManifest -ProjectRoot $ProjectRoot
|
|
143
|
+
if ($ver) { return $ver }
|
|
144
|
+
|
|
145
|
+
# Source 2: $script:KIT_VERSION constant (caller-scoped, optional).
|
|
146
|
+
# Catatan: ini akses scope variable di caller. Di PS 5.1, $script:
|
|
147
|
+
# me-resolve ke script scope yang dot-sourcing kita.
|
|
148
|
+
if ($script:KIT_VERSION) {
|
|
149
|
+
return $script:KIT_VERSION
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
# Source 3: CHANGELOG regex
|
|
153
|
+
if (-not $ChangelogPath) {
|
|
154
|
+
$ChangelogPath = Join-Path $ProjectRoot 'CHANGELOG.md'
|
|
155
|
+
}
|
|
156
|
+
$ver = Get-KitVersionFromChangelog -ChangelogPath $ChangelogPath
|
|
157
|
+
if ($ver) { return $ver }
|
|
158
|
+
|
|
159
|
+
# Last resort
|
|
160
|
+
return 'unknown'
|
|
161
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ojokesusu/lintasai",
|
|
3
|
+
"version": "1.1.2",
|
|
4
|
+
"description": "AI workflow kit untuk Claude Code dengan tier model + cross-repo automation (Windows-first)",
|
|
5
|
+
"bin": {
|
|
6
|
+
"lintasai": "./bin/lintasai.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin/",
|
|
10
|
+
"*.ps1",
|
|
11
|
+
"lib/",
|
|
12
|
+
"templates/",
|
|
13
|
+
"docs/",
|
|
14
|
+
"tests/",
|
|
15
|
+
"*.md",
|
|
16
|
+
".github/"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"test": "echo \"Pester tests run via ./tests/Run-Tests.ps1\" && exit 0"
|
|
20
|
+
},
|
|
21
|
+
"keywords": ["ai", "claude-code", "powershell", "kit", "workflow"],
|
|
22
|
+
"author": "ojokesusu",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=18"
|
|
26
|
+
},
|
|
27
|
+
"os": ["win32"],
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/ojokesusu/lintasAI.git"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public",
|
|
34
|
+
"provenance": false
|
|
35
|
+
}
|
|
36
|
+
}
|