check-post 0.1.0 → 0.2.0

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 (40) hide show
  1. package/README.md +66 -60
  2. package/dist/cli.js +18 -18
  3. package/dist/commands/init.js +37 -36
  4. package/dist/commands/list.js +1 -1
  5. package/dist/commands/run.js +8 -8
  6. package/dist/commands/shared.js +2 -2
  7. package/dist/commands/status.js +3 -3
  8. package/dist/core/adapters/claude-code.js +12 -12
  9. package/dist/core/adapters/index.js +2 -2
  10. package/dist/core/discovery.js +8 -8
  11. package/dist/core/gate.js +13 -13
  12. package/dist/core/process.js +2 -2
  13. package/dist/core/project.js +5 -5
  14. package/dist/core/runners/ai.js +9 -9
  15. package/dist/core/runners/command.js +3 -3
  16. package/dist/core/scheduler.js +11 -10
  17. package/dist/core/stage-file.js +4 -4
  18. package/dist/core/types.js +4 -2
  19. package/dist/ui/format.js +1 -1
  20. package/dist/ui/plain.js +2 -2
  21. package/dist/ui/tui/App.js +13 -13
  22. package/package.json +2 -2
  23. package/presets/angular/04-security/01-secrets.md +12 -12
  24. package/presets/angular/04-security/02-xss-audit.md +9 -9
  25. package/presets/angular/04-security/03-env-audit.md +7 -7
  26. package/presets/angular/04-security/_group.md +1 -1
  27. package/presets/angular/05-code-standard.md +8 -8
  28. package/presets/angular/context.md +2 -2
  29. package/presets/nextjs/04-security/01-secrets.md +12 -12
  30. package/presets/nextjs/04-security/02-xss-audit.md +8 -8
  31. package/presets/nextjs/04-security/03-env-audit.md +7 -7
  32. package/presets/nextjs/04-security/_group.md +1 -1
  33. package/presets/nextjs/05-code-standard.md +8 -8
  34. package/presets/nextjs/context.md +1 -1
  35. package/presets/node/04-security/01-secrets.md +12 -12
  36. package/presets/node/04-security/02-injection-audit.md +7 -7
  37. package/presets/node/04-security/03-env-audit.md +7 -7
  38. package/presets/node/04-security/_group.md +1 -1
  39. package/presets/node/05-code-standard.md +8 -8
  40. package/presets/node/context.md +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # checkpost
1
+ # check-post
2
2
 
3
- Pipeline mirip CI/CD yang berjalan di komputer sendiri. Stage didefinisikan sebagai file Markdown, dan stage yang butuh penilaian dijalankan oleh AI CLI (saat ini Claude Code). Kalau semua stage green, gate menyatakan project boleh deploy.
3
+ A CI/CD-style pipeline that runs on your own machine. Stages are Markdown files, and stages that need judgment are run by an AI CLI (currently Claude Code). When every stage is green, the gate says the project is ready to deploy.
4
4
 
5
5
  ```
6
6
  Checkpost · claude-code · main@a1b2c3d
@@ -8,73 +8,73 @@ Pipeline mirip CI/CD yang berjalan di komputer sendiri. Stage didefinisikan seba
8
8
  ✔ lint 4.1s
9
9
  ✔ unit-test 12.4s
10
10
  ✔ build 31.0s
11
- ⠹ security (paralel)
11
+ ⠹ security (parallel)
12
12
  ├ ✔ secrets [AI] 9.8s
13
- ├ ✖ xss-audit [AI] 22.3s 2 temuan (1 blokir)
13
+ ├ ✖ xss-audit [AI] 22.3s 2 findings (1 blocking)
14
14
  ├ ⠹ env-audit [AI] 18.0s
15
15
  ○ code-standard [AI]
16
16
  ```
17
17
 
18
- ## Syarat
18
+ ## Requirements
19
19
  - Node.js 22+
20
- - [Claude Code](https://docs.claude.com/claude-code) terinstall dan sudah login (`claude`)
20
+ - [Claude Code](https://docs.claude.com/claude-code), installed and logged in (`claude`)
21
21
 
22
22
  ## Install
23
- Langsung pakai tanpa install:
23
+ Use it without installing:
24
24
  ```bash
25
25
  npx check-post init
26
26
  npx check-post run
27
27
  ```
28
- Atau install permanen:
28
+ Or install it globally:
29
29
  ```bash
30
30
  npm install -g check-post
31
31
  ```
32
- Perintahnya bisa ditulis `check-post` atau `checkpost`.
32
+ The command is available as both `check-post` and `checkpost`.
33
33
 
34
- Versi terbaru langsung dari GitHub:
34
+ Latest version straight from GitHub:
35
35
  ```bash
36
36
  npx github:raisulkhairi/check-post init
37
37
  ```
38
- Hindari `npm install -g github:…`. npm gagal membangun paket dari git dalam mode global (`tsc: not found`). Untuk install permanen versi GitHub:
38
+ Avoid `npm install -g github:…`: npm fails to build git packages in global mode (`tsc: not found`). For a permanent install of the GitHub version:
39
39
  ```bash
40
40
  git clone https://github.com/raisulkhairi/check-post.git
41
41
  cd check-post && npm install && npm link
42
42
  ```
43
43
 
44
- ## Mulai
45
- Jalankan di root project yang ingin diperiksa:
44
+ ## Getting started
45
+ Run these in the root of the project you want to check:
46
46
  ```bash
47
- checkpost init # wizard: deteksi project, pilih preset & stage
48
- checkpost list # cek urutan stage
49
- checkpost run # jalankan dengan tampilan terminal
47
+ checkpost init # wizard: detect the project, pick a preset and stages
48
+ checkpost list # check the stage order
49
+ checkpost run # run with the terminal UI
50
50
  checkpost status # GREEN/RED, exit code 0/1
51
51
  ```
52
- Tidak perlu membuka `claude` lebih dulu. Checkpost memanggil Claude Code sendiri untuk stage AI.
52
+ You don't need to open `claude` first. Checkpost calls Claude Code itself for AI stages.
53
53
 
54
- ## Stage = file Markdown
54
+ ## Stages are Markdown files
55
55
  ```
56
56
  checkpost/
57
- pipeline.md # config global + konteks project untuk semua stage AI
57
+ pipeline.md # global config + project context for every AI stage
58
58
  01-lint.md
59
59
  02-unit-test.md
60
60
  03-build.md
61
- 04-security/ # subfolder = grup
61
+ 04-security/ # subfolder = group
62
62
  _group.md # parallel: true
63
63
  01-secrets.md
64
64
  02-xss-audit.md
65
65
  05-code-standard.md
66
- _draft.md # awalan _ atau . = diabaikan
66
+ _draft.md # a _ or . prefix = ignored
67
67
  ```
68
68
 
69
- **Urutan** mengikuti prefix angka (`2-` sebelum `10-`). Item tanpa prefix ditaruh terakhir, urut abjad. Prefix tidak ikut ditampilkan.
69
+ **Order** follows the numeric prefix (`2-` comes before `10-`). Items without a prefix go last, alphabetically. Prefixes are not shown in the UI.
70
70
 
71
- **Jenis stage ditentukan dari isi file:**
71
+ **The stage type comes from the file's content:**
72
72
 
73
- | Isi | Perilaku | Lulus jika |
73
+ | Content | Behavior | Passes when |
74
74
  |---|---|---|
75
- | `run:` saja | jalankan perintah | exit code 0 |
76
- | body saja | body menjadi instruksi AI | tidak ada temuan ≥ `fail_on` |
77
- | `run:` + body | jalankan perintah, lalu AI meninjau output-nya | tidak ada temuan ≥ `fail_on` |
75
+ | `run:` only | runs the command | exit code 0 |
76
+ | body only | the body becomes the AI's instructions | no findings ≥ `fail_on` |
77
+ | `run:` + body | runs the command, then the AI reviews its output | no findings ≥ `fail_on` |
78
78
 
79
79
  ```md
80
80
  ---
@@ -82,61 +82,67 @@ paths: ["src/**/*.ts", "src/**/*.html"]
82
82
  fail_on: high
83
83
  ---
84
84
  # XSS audit
85
- Cari pemakaian bypassSecurityTrustHtml dan [innerHTML] berisi data dari user...
85
+ Look for bypassSecurityTrustHtml and [innerHTML] bindings fed with user data...
86
86
  ```
87
87
 
88
+ AI summaries and findings are written in the language set by `language:` in `pipeline.md` (default `English`).
89
+
88
90
  ### Frontmatter
89
91
 
90
- | Field | Di mana | Default | Keterangan |
92
+ | Field | Where | Default | Description |
91
93
  |---|---|---|---|
92
- | `run` | stage | – | perintah shell |
93
- | `timeout` | stage | 15m (command), 10m (AI) | `30s`, `5m`, `1h`, atau angka detik |
94
+ | `run` | stage | – | shell command |
95
+ | `timeout` | stage | 15m (command), 10m (AI) | `30s`, `5m`, `1h`, or a number of seconds |
94
96
  | `fail_on` | stage | `high` | `critical`, `high`, `medium`, `low`, `info` |
95
- | `paths` | stage | – | batasi file yang diperiksa AI |
96
- | `allow_failure` | stage | `false` | gagal tidak menghalangi gate |
97
- | `enabled` | stage, grup | `true` | |
98
- | `name` | stage, grup | nama file | nama tampilan |
97
+ | `paths` | stage | – | limit the files the AI inspects |
98
+ | `allow_failure` | stage | `false` | a failure does not block the gate |
99
+ | `enabled` | stage, group | `true` | |
100
+ | `name` | stage, group | file name | display name |
99
101
  | `model`, `max_budget_usd` | stage, pipeline | `sonnet`, `1` | |
100
- | `parallel` | grup | `false` | jalankan isi grup bersamaan |
101
- | `fail_fast` | grup, pipeline | `true` | berhenti di kegagalan pertama |
102
- | `require_clean_tree` | pipeline | `true` | gate RED bila ada perubahan belum di-commit |
103
- | `sensitive_paths` | pipeline | `.env*`, `.npmrc`, `*.pem`, `*.key` | path yang tidak boleh dibaca AI |
104
- | `confirm_ai` | pipeline | `true` | konfirmasi sekali sebelum memakai kuota AI |
102
+ | `language` | pipeline | `English` | language of AI summaries and findings |
103
+ | `parallel` | group | `false` | run the group's children concurrently |
104
+ | `fail_fast` | group, pipeline | `true` | stop at the first failure |
105
+ | `require_clean_tree` | pipeline | `true` | gate is RED when there are uncommitted changes |
106
+ | `sensitive_paths` | pipeline | `.env*`, `.npmrc`, `*.pem`, `*.key` | paths the AI must never read |
107
+ | `confirm_ai` | pipeline | `true` | ask once before using your AI quota |
105
108
 
106
- Body `pipeline.md` dan `_group.md` ikut menjadi konteks untuk setiap stage AI di bawahnya.
109
+ The body of `pipeline.md` and `_group.md` is passed as context to every AI stage below it.
107
110
 
108
- ## Keamanan stage AI
109
- - AI hanya diberi tool baca (Read, Grep, Glob) dan tidak bisa mengubah file atau menjalankan perintah.
110
- - `sensitive_paths` diblokir lewat aturan permission deny Claude Code. Percobaan membaca path itu tercatat di log sebagai `akses diblokir`.
111
- - Claude Code dijalankan tanpa MCP server, plugin, dan setting user, supaya konteks kecil dan biayanya sekitar sen per stage, bukan dolar.
112
- - Jawaban AI wajib berbentuk JSON terstruktur yang divalidasi. Kalau tidak valid, diminta ulang sekali. Kalau tetap tidak valid, stage berstatus `error`, bukan lulus.
111
+ ## AI stage safety
112
+ - The AI only gets read tools (Read, Grep, Glob). It cannot change files or run commands.
113
+ - `sensitive_paths` are blocked with Claude Code permission deny rules. Attempts to read them show up in the log as `access blocked`.
114
+ - Claude Code runs without MCP servers, plugins, or user settings, so the context stays small and a stage costs cents, not dollars.
115
+ - The AI must answer with validated, structured JSON. An invalid answer is retried once. If it is still invalid, the stage ends as `error`, never as passed.
113
116
 
114
117
  ## Gate
115
- `checkpost status` hanya GREEN kalau:
116
- - semua stage lulus (atau `allow_failure`),
117
- - hasil run untuk commit yang sama dengan `HEAD`,
118
- - definisi stage tidak berubah sejak run,
119
- - working tree bersih (bisa dimatikan dengan `require_clean_tree: false`).
118
+ `checkpost status` is only GREEN when:
119
+ - every stage passed (or is `allow_failure`),
120
+ - the results are for the same commit as `HEAD`,
121
+ - stage definitions have not changed since the run,
122
+ - the working tree is clean (turn off with `require_clean_tree: false`).
120
123
 
121
124
  ```bash
122
125
  checkpost status && vercel --prod
123
126
  ```
124
127
 
125
- ## Mode CI / skrip
128
+ ## CI and scripts
126
129
  ```bash
127
- checkpost run --ci # output polos + exit code
128
- checkpost run --ci --json # hasil akhir JSON di stdout, log di stderr
129
- checkpost run security # satu grup/stage saja (id atau nama)
130
+ checkpost run --ci # plain output + exit code
131
+ checkpost run --ci --json # final JSON result on stdout, logs on stderr
132
+ checkpost run security # a single group/stage (id or name)
130
133
  ```
131
- `init` juga bisa memasang slash command `/checkpost` untuk Claude Code.
134
+ `init` can also install a `/checkpost` slash command for Claude Code.
132
135
 
133
- ## Repo yang bukan milik sendiri
134
- `checkpost init --share local` menulis `checkpost/`, `.checkpost/`, dan slash command ke `.git/info/exclude`. Repo tidak berubah sama sekali.
136
+ ## Repos you don't own
137
+ `checkpost init --share local` adds `checkpost/`, `.checkpost/`, and the slash command to `.git/info/exclude`. The repo itself is not changed at all.
135
138
 
136
- ## Pengembangan
139
+ ## Development
137
140
  ```bash
138
141
  npm install
139
142
  npm test # vitest
140
143
  npm run build # tsc → dist/
141
- npm link # perintah checkpost tersedia global dari folder ini
144
+ npm link # make the checkpost command available globally from this folder
142
145
  ```
146
+
147
+ ## License
148
+ MIT
package/dist/cli.js CHANGED
@@ -7,43 +7,43 @@ import { statusCommand } from './commands/status.js';
7
7
  const program = new Command();
8
8
  program
9
9
  .name('checkpost')
10
- .description('Pipeline CI/CD lokal: stage dari file Markdown, dijalankan oleh AI CLI')
10
+ .description('Local CI/CD pipeline: stages are Markdown files, run by an AI CLI')
11
11
  .version('0.1.0')
12
- .option('-C, --cwd <dir>', 'root project', process.cwd());
12
+ .option('-C, --cwd <dir>', 'project root', process.cwd());
13
13
  const cwd = () => program.opts().cwd;
14
14
  const finish = (code) => {
15
15
  process.exitCode = code;
16
16
  };
17
17
  program
18
18
  .command('init')
19
- .description('buat folder checkpost/ dari preset')
20
- .addOption(new Option('--preset <name>', 'preset stage').choices(['angular', 'nextjs', 'node', 'empty']))
21
- .addOption(new Option('--share <mode>', 'simpan lokal saja atau bagikan ke tim').choices(['local', 'team']))
22
- .option('--no-slash-command', 'jangan pasang slash command /checkpost')
23
- .option('-y, --yes', 'pakai default tanpa bertanya')
24
- .option('--force', 'timpa folder checkpost/ yang sudah ada')
19
+ .description('create the checkpost/ folder from a preset')
20
+ .addOption(new Option('--preset <name>', 'stage preset').choices(['angular', 'nextjs', 'node', 'empty']))
21
+ .addOption(new Option('--share <mode>', 'keep local only or share with the team').choices(['local', 'team']))
22
+ .option('--no-slash-command', 'do not install the /checkpost slash command')
23
+ .option('-y, --yes', 'use defaults without prompting')
24
+ .option('--force', 'overwrite an existing checkpost/ folder')
25
25
  .action(async (o) => {
26
26
  const slashCommand = process.argv.includes('--no-slash-command') ? false : o.yes ? true : undefined;
27
27
  finish(await initCommand({ cwd: cwd(), preset: o.preset, share: o.share, slashCommand, yes: o.yes, force: o.force }));
28
28
  });
29
29
  program
30
30
  .command('list')
31
- .description('tampilkan urutan stage tanpa menjalankannya')
32
- .option('--json', 'output JSON')
31
+ .description('show the stage order without running it')
32
+ .option('--json', 'JSON output')
33
33
  .action((o) => finish(listCommand({ cwd: cwd(), json: o.json })));
34
34
  program
35
35
  .command('run')
36
- .argument('[stage]', 'jalankan satu stage atau grup saja (id atau nama)')
37
- .description('jalankan pipeline')
38
- .option('--ci', 'mode non-interaktif (otomatis bila bukan terminal)')
39
- .option('--json', 'cetak hasil akhir sebagai JSON di stdout')
40
- .option('-y, --yes', 'lewati konfirmasi pemakaian AI')
41
- .option('-v, --verbose', 'tampilkan seluruh log perintah di mode CI')
36
+ .argument('[stage]', 'run a single stage or group (id or name)')
37
+ .description('run the pipeline')
38
+ .option('--ci', 'non-interactive mode (automatic when not a terminal)')
39
+ .option('--json', 'print the final result as JSON on stdout')
40
+ .option('-y, --yes', 'skip the AI usage confirmation')
41
+ .option('-v, --verbose', 'show full command logs in CI mode')
42
42
  .action(async (stage, o) => finish(await runCommand(stage, { cwd: cwd(), ci: o.ci, json: o.json, yes: o.yes, verbose: o.verbose })));
43
43
  program
44
44
  .command('status')
45
- .description('cek gate: GREEN (boleh deploy) atau RED; exit code 0/1')
46
- .option('--json', 'output JSON')
45
+ .description('check the gate: GREEN (ok to deploy) or RED; exit code 0/1')
46
+ .option('--json', 'JSON output')
47
47
  .action(async (o) => finish(await statusCommand({ cwd: cwd(), json: o.json })));
48
48
  program.parseAsync().catch((err) => {
49
49
  console.error(err instanceof Error ? err.message : err);
@@ -14,7 +14,7 @@ const PRESETS = [
14
14
  { id: 'angular', label: 'Angular' },
15
15
  { id: 'nextjs', label: 'Next.js' },
16
16
  { id: 'node', label: 'Node.js / API' },
17
- { id: 'empty', label: 'Kosong (satu contoh stage)' },
17
+ { id: 'empty', label: 'Empty (one example stage)' },
18
18
  ];
19
19
  const EXTRA_SENSITIVE = {
20
20
  angular: ['src/environments/**'],
@@ -39,7 +39,7 @@ function presetStages(presetDir, scripts) {
39
39
  const kind = data.run ? (body ? `${data.run} + AI` : data.run) : 'AI';
40
40
  out.push({
41
41
  rel,
42
- label: `${groupName}${splitPrefix(name).name} ${pc.gray(kind)}${missingScript ? pc.yellow(` (script "${missingScript}" tidak ada)`) : ''}`,
42
+ label: `${groupName}${splitPrefix(name).name} ${pc.gray(kind)}${missingScript ? pc.yellow(` (no "${missingScript}" script)`) : ''}`,
43
43
  missingScript,
44
44
  });
45
45
  }
@@ -52,36 +52,37 @@ function pipelineMd(opts) {
52
52
  const front = [
53
53
  '---',
54
54
  'agent: claude-code',
55
- 'model: sonnet # model untuk stage AI (sonnet | opus | haiku)',
56
- 'fail_fast: true # berhenti di stage pertama yang gagal',
57
- 'require_clean_tree: true # gate hanya green bila tidak ada perubahan belum di-commit',
58
- 'max_budget_usd: 1 # batas biaya per stage AI',
55
+ 'model: sonnet # model for AI stages (sonnet | opus | haiku)',
56
+ 'fail_fast: true # stop at the first failing stage',
57
+ 'require_clean_tree: true # gate is only green with no uncommitted changes',
58
+ 'max_budget_usd: 1 # cost limit per AI stage',
59
+ 'language: English # language of AI summaries and findings',
59
60
  ];
60
61
  if (sensitive.length) {
61
- front.push('sensitive_paths: # tidak boleh dibaca AI (selain .env*, .npmrc, *.pem, *.key)');
62
+ front.push('sensitive_paths: # never read by the AI (in addition to .env*, .npmrc, *.pem, *.key)');
62
63
  for (const s of sensitive)
63
64
  front.push(` - ${s}`);
64
65
  }
65
66
  front.push('---', '');
66
67
  const body = [`Project: ${opts.label}.`, opts.context.trim()];
67
68
  if (opts.docs.length)
68
- body.push(`Konvensi project tertulis di: ${opts.docs.join(', ')}. Baca file tersebut bila relevan.`);
69
+ body.push(`Project conventions are documented in: ${opts.docs.join(', ')}. Read them when relevant.`);
69
70
  return front.join('\n') + body.join('\n\n') + '\n';
70
71
  }
71
72
  const SLASH_COMMAND = `---
72
- description: Jalankan Checkpost (stage di folder checkpost/) dan ringkas hasilnya
73
+ description: Run Checkpost (stages in checkpost/) and summarize the result
73
74
  allowed-tools: Bash(checkpost:*), Bash(npx checkpost:*)
74
75
  ---
75
- Jalankan perintah berikut di root project (bisa beberapa menit):
76
+ Run this command in the project root (it can take a few minutes):
76
77
 
77
78
  \`\`\`
78
79
  checkpost run --ci --json --yes $ARGUMENTS
79
80
  \`\`\`
80
81
 
81
- Output JSON ada di stdout. Lalu ringkas dalam bahasa Indonesia:
82
- 1. Status gate (GREEN = boleh deploy, RED = belum) dan alasannya.
83
- 2. Stage yang gagal beserta temuan utamanya (severity, file:baris, pesan).
84
- 3. Saran langkah berikutnya. Jangan mengubah kode kecuali diminta.
82
+ The JSON result is on stdout. Then summarize:
83
+ 1. Gate status (GREEN = ok to deploy, RED = not yet) and why.
84
+ 2. Failed stages with their main findings (severity, file:line, message).
85
+ 3. Suggested next steps. Do not change code unless asked.
85
86
  `;
86
87
  export async function initCommand(flags) {
87
88
  const root = path.resolve(flags.cwd);
@@ -89,29 +90,29 @@ export async function initCommand(flags) {
89
90
  const targetDir = path.join(root, PIPELINE_DIR);
90
91
  console.log(pc.bold('\n◆ Checkpost · setup\n'));
91
92
  if (existsSync(targetDir) && !flags.force) {
92
- console.error(pc.red(` ${PIPELINE_DIR}/ sudah ada. Pakai --force untuk menimpa file preset.`));
93
+ console.error(pc.red(` ${PIPELINE_DIR}/ already exists. Use --force to overwrite the preset files.`));
93
94
  return 2;
94
95
  }
95
96
  const git = await readGitState(root);
96
- console.log(git.isRepo ? pc.green(` ✔ Git repository (branch: ${git.branch})`) : pc.yellow(' ⚠ Bukan git repository: gate tidak bisa mengecek commit'));
97
+ console.log(git.isRepo ? pc.green(` ✔ Git repository (branch: ${git.branch})`) : pc.yellow(' ⚠ Not a git repository: the gate cannot check commits'));
97
98
  const project = detectProject(root);
98
- console.log(project.kind === 'unknown' ? pc.yellow(' ⚠ Jenis project tidak dikenali') : pc.green(` ✔ Project: ${project.label}`));
99
+ console.log(project.kind === 'unknown' ? pc.yellow(' ⚠ Project type not recognized') : pc.green(` ✔ Project: ${project.label}`));
99
100
  const claude = AGENTS['claude-code'].create();
100
101
  const detected = await claude.detect();
101
102
  if (!detected.installed) {
102
- console.error(pc.red(' ✖ Claude Code tidak ditemukan. Install: npm install -g @anthropic-ai/claude-code, lalu jalankan "claude" sekali untuk login.'));
103
+ console.error(pc.red(' ✖ Claude Code not found. Install it: npm install -g @anthropic-ai/claude-code, then run "claude" once to log in.'));
103
104
  return 2;
104
105
  }
105
106
  console.log(pc.green(` ✔ AI CLI: Claude Code ${detected.version ?? ''}`));
106
107
  if (project.docs.length)
107
- console.log(pc.green(` ✔ Dokumen konvensi: ${project.docs.join(', ')}`));
108
+ console.log(pc.green(` ✔ Convention docs: ${project.docs.join(', ')}`));
108
109
  console.log('');
109
110
  if (interactive) {
110
111
  await select({
111
- message: 'Pilih AI agent',
112
+ message: 'Choose an AI agent',
112
113
  choices: Object.entries(AGENTS).map(([id, a]) => ({
113
114
  value: id,
114
- name: a.available ? a.label : `${a.label} ${pc.gray('(segera)')}`,
115
+ name: a.available ? a.label : `${a.label} ${pc.gray('(coming soon)')}`,
115
116
  disabled: !a.available,
116
117
  })),
117
118
  });
@@ -119,16 +120,16 @@ export async function initCommand(flags) {
119
120
  const detectedPreset = PRESETS.find((p) => p.id === project.kind)?.id ?? 'empty';
120
121
  let preset = (flags.preset ?? detectedPreset);
121
122
  if (!PRESETS.some((p) => p.id === preset)) {
122
- console.error(pc.red(` Preset "${preset}" tidak dikenal. Pilihan: ${PRESETS.map((p) => p.id).join(', ')}`));
123
+ console.error(pc.red(` Unknown preset "${preset}". Options: ${PRESETS.map((p) => p.id).join(', ')}`));
123
124
  return 2;
124
125
  }
125
126
  if (interactive && !flags.preset) {
126
127
  preset = await select({
127
- message: 'Pilih preset stage',
128
+ message: 'Choose a stage preset',
128
129
  default: detectedPreset,
129
130
  choices: PRESETS.map((p) => ({
130
131
  value: p.id,
131
- name: p.id === detectedPreset && p.id !== 'empty' ? `${p.label} ${pc.green('(Recommended, terdeteksi)')}` : p.label,
132
+ name: p.id === detectedPreset && p.id !== 'empty' ? `${p.label} ${pc.green('(Recommended, detected)')}` : p.label,
132
133
  })),
133
134
  });
134
135
  }
@@ -141,7 +142,7 @@ export async function initCommand(flags) {
141
142
  chosen = stages.filter((s) => !s.missingScript).map((s) => s.rel);
142
143
  if (interactive) {
143
144
  chosen = await checkbox({
144
- message: 'Stage mana yang diaktifkan? (spasi = pilih, enter = lanjut)',
145
+ message: 'Which stages should be enabled? (space = toggle, enter = continue)',
145
146
  choices: stages.map((s) => ({ value: s.rel, name: s.label, checked: !s.missingScript })),
146
147
  pageSize: 15,
147
148
  });
@@ -150,18 +151,18 @@ export async function initCommand(flags) {
150
151
  let share = flags.share ?? 'local';
151
152
  if (interactive && !flags.share) {
152
153
  share = await select({
153
- message: 'Folder checkpost/ disimpan bagaimana?',
154
+ message: 'How should the checkpost/ folder be kept?',
154
155
  choices: [
155
- { value: 'local', name: `Hanya di komputer ini ${pc.gray('(.git/info/exclude, repo tidak berubah)')}` },
156
- { value: 'team', name: `Bagikan ke tim ${pc.gray('(commit checkpost/, state di .gitignore)')}` },
156
+ { value: 'local', name: `Only on this machine ${pc.gray('(.git/info/exclude, repo unchanged)')}` },
157
+ { value: 'team', name: `Share with the team ${pc.gray('(commit checkpost/, state in .gitignore)')}` },
157
158
  ],
158
159
  });
159
160
  }
160
161
  let installSlash = flags.slashCommand ?? true;
161
162
  if (interactive && flags.slashCommand === undefined) {
162
- installSlash = await confirm({ message: 'Pasang slash command /checkpost untuk Claude Code?', default: true });
163
+ installSlash = await confirm({ message: 'Install the /checkpost slash command for Claude Code?', default: true });
163
164
  }
164
- // Tulis file
165
+ // Write files
165
166
  mkdirSync(targetDir, { recursive: true });
166
167
  writeFileSync(path.join(targetDir, 'pipeline.md'), pipelineMd({ kind: preset === 'empty' ? project.kind : preset, context, docs: project.docs, label: project.label }));
167
168
  const written = ['pipeline.md'];
@@ -199,20 +200,20 @@ export async function initCommand(flags) {
199
200
  ignored.push(...(await ignorePaths(root, [`/${STATE_DIR}/`], 'gitignore')));
200
201
  }
201
202
  }
202
- console.log(pc.green('\n ✔ Dibuat:'));
203
+ console.log(pc.green('\n ✔ Created:'));
203
204
  for (const f of written.sort())
204
205
  console.log(pc.gray(` ${PIPELINE_DIR}/${f.split(path.sep).join('/')}`));
205
206
  if (installSlash)
206
207
  console.log(pc.gray(` ${SLASH_COMMAND_PATH}`));
207
208
  if (ignored.length) {
208
209
  const where = share === 'local' ? '.git/info/exclude' : '.gitignore';
209
- console.log(pc.green(` ✔ Ditambahkan ke ${where}: ${ignored.join(', ')}`));
210
+ console.log(pc.green(` ✔ Added to ${where}: ${ignored.join(', ')}`));
210
211
  }
211
212
  console.log(`
212
- Langkah berikutnya:
213
- 1. Sesuaikan isi file .md di ${PIPELINE_DIR}/ (opsional)
214
- 2. checkpost list → cek urutan stage
215
- 3. checkpost run → jalankan pipeline
213
+ Next steps:
214
+ 1. Adjust the .md files in ${PIPELINE_DIR}/ (optional)
215
+ 2. checkpost list → check the stage order
216
+ 3. checkpost run → run the pipeline
216
217
  `);
217
218
  return 0;
218
219
  }
@@ -31,7 +31,7 @@ export function listCommand(flags) {
31
31
  const num = depth === 0 ? String(++top).padStart(2) : ' ';
32
32
  const indent = depth === 0 ? '' : ' '.repeat(depth - 1) + '├ ';
33
33
  const name = (indent + node.name).padEnd(24);
34
- const kind = typeLabel(node).padEnd(13);
34
+ const kind = typeLabel(node).padEnd(15);
35
35
  let detail = '';
36
36
  if (node.kind === 'stage') {
37
37
  const bits = [];
@@ -38,7 +38,7 @@ export async function runCommand(target, flags) {
38
38
  if (target) {
39
39
  const node = findNode(pipeline.children, target);
40
40
  if (!node) {
41
- console.error(pc.red(`Stage atau grup "${target}" tidak ditemukan. Lihat "checkpost list".`));
41
+ console.error(pc.red(`Stage or group "${target}" not found. See "checkpost list".`));
42
42
  return 2;
43
43
  }
44
44
  nodes = [node];
@@ -57,13 +57,13 @@ export async function runCommand(target, flags) {
57
57
  }
58
58
  const detected = await adapter.detect();
59
59
  if (!detected.installed) {
60
- console.error(pc.red(`${adapter.label} tidak ditemukan. Install dulu: npm install -g @anthropic-ai/claude-code`));
60
+ console.error(pc.red(`${adapter.label} not found. Install it first: npm install -g @anthropic-ai/claude-code`));
61
61
  return 2;
62
62
  }
63
63
  const ui = readUiState(root);
64
64
  if (interactive && !flags.yes && pipeline.config.confirm_ai && !ui.aiConfirmed) {
65
65
  const ok = await confirm({
66
- message: `${aiStages.length} stage AI akan memakai kuota ${adapter.label} (model: ${pipeline.config.model}, batas $${pipeline.config.max_budget_usd}/stage). Lanjutkan?`,
66
+ message: `${aiStages.length} AI stage${aiStages.length === 1 ? '' : 's'} will use your ${adapter.label} quota (model: ${pipeline.config.model}, limit $${pipeline.config.max_budget_usd}/stage). Continue?`,
67
67
  default: true,
68
68
  });
69
69
  if (!ok)
@@ -71,7 +71,7 @@ export async function runCommand(target, flags) {
71
71
  writeUiState(root, { ...ui, aiConfirmed: true });
72
72
  }
73
73
  }
74
- // State run tidak boleh mengotori working tree project.
74
+ // Run state must not dirty the project's working tree.
75
75
  await ignorePaths(root, [`${STATE_DIR}/`], 'exclude');
76
76
  const git = await readGitState(root);
77
77
  const header = [
@@ -99,7 +99,7 @@ export async function runCommand(target, flags) {
99
99
  const gate = lastGate;
100
100
  return gate?.green ? 0 : 1;
101
101
  }
102
- // Mode CI / non-TTY
102
+ // CI / non-TTY mode
103
103
  const write = flags.json ? (s) => process.stderr.write(s + '\n') : undefined;
104
104
  const stageMap = new Map(allStages(pipeline.children).map((s) => [s.id, s]));
105
105
  const renderer = createPlainRenderer(stageMap, { verbose: Boolean(flags.verbose), write });
@@ -135,15 +135,15 @@ export async function runCommand(target, flags) {
135
135
  else {
136
136
  out('');
137
137
  if (gate.green)
138
- out(pc.green(pc.bold('✔ GATE GREEN · boleh deploy')));
138
+ out(pc.green(pc.bold('✔ GATE GREEN · ok to deploy')));
139
139
  else {
140
- out(pc.red(pc.bold('✖ GATE RED · belum boleh deploy')));
140
+ out(pc.red(pc.bold('✖ GATE RED · not ready to deploy')));
141
141
  for (const r of gate.reasons)
142
142
  out(pc.gray(` • ${r}`));
143
143
  }
144
144
  const cost = Object.values(gate.lastRun?.results ?? {}).reduce((sum, r) => sum + (r.costUsd ?? 0), 0);
145
145
  if (cost)
146
- out(pc.gray(` Biaya AI: $${cost.toFixed(3)}`));
146
+ out(pc.gray(` AI cost: $${cost.toFixed(3)}`));
147
147
  }
148
148
  return gate.green ? 0 : 1;
149
149
  }
@@ -1,9 +1,9 @@
1
1
  import pc from 'picocolors';
2
2
  import { DefinitionError } from '../core/stage-file.js';
3
- /** Cetak error definisi stage dan kembalikan exit code 2; error lain dilempar ulang. */
3
+ /** Print stage definition errors and return exit code 2; rethrow anything else. */
4
4
  export function printDefinitionError(err) {
5
5
  if (err instanceof DefinitionError) {
6
- console.error(pc.red(pc.bold('Definisi pipeline tidak valid:')));
6
+ console.error(pc.red(pc.bold('Invalid pipeline definition:')));
7
7
  for (const p of err.problems)
8
8
  console.error(pc.red(` • ${p}`));
9
9
  return 2;
@@ -19,12 +19,12 @@ export async function statusCommand(flags) {
19
19
  return gate.green ? 0 : 1;
20
20
  }
21
21
  const ref = gate.git.sha ? `${gate.git.branch}@${gate.git.sha.slice(0, 7)}` : '';
22
- const ago = gate.lastRun ? ` · dijalankan ${formatDuration(Date.now() - Date.parse(gate.lastRun.updatedAt))} lalu` : '';
22
+ const ago = gate.lastRun ? ` · ran ${formatDuration(Date.now() - Date.parse(gate.lastRun.updatedAt))} ago` : '';
23
23
  if (gate.green) {
24
- console.log(pc.green(pc.bold(`✔ GREEN · boleh deploy`)) + pc.gray(` · ${ref}${ago}`));
24
+ console.log(pc.green(pc.bold(`✔ GREEN · ok to deploy`)) + pc.gray(` · ${ref}${ago}`));
25
25
  return 0;
26
26
  }
27
- console.log(pc.red(pc.bold('✖ RED · belum boleh deploy')) + pc.gray(ref ? ` · ${ref}${ago}` : ''));
27
+ console.log(pc.red(pc.bold('✖ RED · not ready to deploy')) + pc.gray(ref ? ` · ${ref}${ago}` : ''));
28
28
  for (const r of gate.reasons)
29
29
  console.log(pc.gray(` • ${r}`));
30
30
  return 1;