projectops 4.104.6 → 4.104.7

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 (85) hide show
  1. package/README.md +1 -1
  2. package/bin/projectops.js +4 -4
  3. package/package.json +1 -1
  4. package/src/cli/args.js +43 -43
  5. package/src/cli/errors.js +8 -8
  6. package/src/cli/help.js +4 -4
  7. package/src/commands/doctor.js +39 -39
  8. package/src/commands/full.js +29 -29
  9. package/src/commands/interactive.js +86 -86
  10. package/src/commands/issues.js +5 -5
  11. package/src/commands/skills.js +13 -13
  12. package/src/commands/version.js +8 -8
  13. package/src/commands/workflows.js +19 -19
  14. package/src/context.js +24 -24
  15. package/src/core/agent-guide.js +5 -5
  16. package/src/core/assets.js +11 -11
  17. package/src/core/baseline.js +24 -24
  18. package/src/core/branch-sub.js +23 -23
  19. package/src/core/breaking-check.js +21 -21
  20. package/src/core/breaking.js +6 -6
  21. package/src/core/ci-minutes-sub.js +13 -13
  22. package/src/core/constants.js +17 -17
  23. package/src/core/copy/coderabbit.js +10 -10
  24. package/src/core/copy/gitignore.js +9 -9
  25. package/src/core/copy/readme.js +7 -7
  26. package/src/core/copy/simple.js +35 -35
  27. package/src/core/copy/util.js +9 -9
  28. package/src/core/copy/workflows.js +99 -99
  29. package/src/core/detect-fs.js +21 -21
  30. package/src/core/detect.js +12 -12
  31. package/src/core/development-branch.js +11 -11
  32. package/src/core/exclusions.js +12 -12
  33. package/src/core/fsutil.js +9 -9
  34. package/src/core/git-branch.js +11 -11
  35. package/src/core/ide/adapter.js +23 -23
  36. package/src/core/ide/adapters/claude.js +12 -12
  37. package/src/core/ide/adapters/codex.js +4 -4
  38. package/src/core/ide/adapters/copilot.js +12 -12
  39. package/src/core/ide/adapters/cursor.js +7 -7
  40. package/src/core/ide/adapters/gemini.js +5 -5
  41. package/src/core/ide/adapters/pi-common.js +12 -12
  42. package/src/core/ide/adapters/pi-harness.js +7 -7
  43. package/src/core/ide/adapters/pi.js +3 -3
  44. package/src/core/ide/home-skills.js +6 -6
  45. package/src/core/ide/legacy.js +8 -8
  46. package/src/core/ide/registry.js +6 -6
  47. package/src/core/ide/runner.js +15 -15
  48. package/src/core/ide/skills-copy.js +34 -34
  49. package/src/core/ide/stable-entry.js +11 -11
  50. package/src/core/ide/util.js +4 -4
  51. package/src/core/incoming.js +13 -13
  52. package/src/core/label-style.js +12 -12
  53. package/src/core/migration-guide.js +19 -19
  54. package/src/core/migrations/index.js +16 -16
  55. package/src/core/migrations/registry.js +39 -39
  56. package/src/core/migrations/rules/legacy-dirs.js +6 -6
  57. package/src/core/migrations/rules/obsolete-workflows.js +4 -4
  58. package/src/core/migrations/rules/root-files.js +3 -3
  59. package/src/core/migrations/rules/settings-extractors.js +8 -8
  60. package/src/core/options-ask.js +104 -104
  61. package/src/core/options-schema.js +23 -23
  62. package/src/core/orphan-workflows.js +14 -14
  63. package/src/core/paths-resolve.js +54 -54
  64. package/src/core/paths.js +2 -2
  65. package/src/core/placeholder-triggers.js +10 -10
  66. package/src/core/repo-language.js +10 -10
  67. package/src/core/resolve-options.js +30 -30
  68. package/src/core/run-trace.js +54 -54
  69. package/src/core/store-locales-hint.js +13 -13
  70. package/src/core/verify.js +27 -27
  71. package/src/core/version-yml.js +115 -115
  72. package/src/core/wizard-env.js +42 -42
  73. package/src/core/wizard-labels.js +31 -31
  74. package/src/core/workflow-groups.js +14 -14
  75. package/src/i18n/core.en.js +1 -1
  76. package/src/i18n/doctor.en.js +1 -1
  77. package/src/i18n/ide.en.js +1 -1
  78. package/src/i18n/migrate.en.js +1 -1
  79. package/src/i18n/options.en.js +1 -1
  80. package/src/index.js +60 -60
  81. package/src/ui/ansi.js +5 -5
  82. package/src/ui/env-plan.js +44 -44
  83. package/src/ui/prompts.js +21 -21
  84. package/src/ui/readline-engine.js +38 -38
  85. package/src/ui/skills-prompts.js +4 -4
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
- // projectops CLI 진입 파이프라인 (인자 > 감지 > 모드별 통합 > 요약).
2
- // 감지 → 다운로드 → 모드 라우팅 → 통합 실행 → 정리. 비대화형(--force) 우선.
1
+ // projectops CLI entry pipeline (args > detect > per-mode integration > summary).
2
+ // Detect → download → route by mode → run integration → clean up. Non-interactive (--force) first.
3
3
  import { join, dirname } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { readFileSync, existsSync } from "node:fs";
@@ -32,7 +32,7 @@ import { runIssues } from "./commands/issues.js";
32
32
  import { runInteractive } from "./commands/interactive.js";
33
33
  import { runSkills } from "./commands/skills.js";
34
34
 
35
- // projectops 패키지 버전 읽기 (-v/--version 출력용). src/../package.json.
35
+ // Read the projectops package version (for -v/--version output). src/../package.json.
36
36
  function readPkgVersion() {
37
37
  try {
38
38
  const here = dirname(fileURLToPath(import.meta.url));
@@ -43,7 +43,7 @@ function readPkgVersion() {
43
43
  }
44
44
  }
45
45
 
46
- // 결정적 UTC 타임스탬프 (주입 가능 — 테스트/골든용)
46
+ // Deterministic UTC timestamp (injectable — for tests/goldens)
47
47
  function utcNow(date = new Date()) {
48
48
  const p = (n) => String(n).padStart(2, "0");
49
49
  const d = `${date.getUTCFullYear()}-${p(date.getUTCMonth() + 1)}-${p(date.getUTCDate())}`;
@@ -52,14 +52,14 @@ function utcNow(date = new Date()) {
52
52
  }
53
53
 
54
54
  // run(argv, opts) → exitCode. opts: { cwd, source?, clock? }
55
- // source: acquireTemplate용 (기본 git clone). 테스트는 {type:'local', path} 주입.
56
- // clock: {now, today} 주입 (기본 현재 UTC).
55
+ // source: for acquireTemplate (default git clone). Tests inject {type:'local', path}.
56
+ // clock: inject {now, today} (default current UTC).
57
57
  export async function run(argv, options = {}) {
58
58
  try {
59
59
  return await runCore(argv, options);
60
60
  } catch (err) {
61
- // 네트워크·git·권한 같은 환경 문제는 스택 트레이스 대신 한 줄 원인 + 조치로 알린다 (#672).
62
- // 실행 기록(trace)은 runCore 의 finally 에서 이미 닫혔다.
61
+ // Environment problems like network, git or permissions are reported as a one-line cause + action instead of a stack trace (#672).
62
+ // The run trace was already closed in runCore's finally.
63
63
  reportFatal(err);
64
64
  return 1;
65
65
  }
@@ -80,7 +80,7 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
80
80
  if (opts.showVersion) { console.log(readPkgVersion()); return 0; }
81
81
  if (opts.help) { console.log(helpText()); return 0; }
82
82
 
83
- // options 모드 — 옵션 정본 출력. AI agent 가 문서를 뒤지지 않고 한 번에 읽는다. 읽기 전용·네트워크 없음.
83
+ // options mode — prints the option source of truth. AI agents read it in one go without digging through docs. Read-only, no network.
84
84
  if (opts.mode === "options") {
85
85
  const { buildSchema, renderText } = await import("./core/options-schema.js");
86
86
  const schema = buildSchema(readPkgVersion());
@@ -88,20 +88,20 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
88
88
  return 0;
89
89
  }
90
90
 
91
- // doctor 모드 (#558) — 읽기 전용 진단. 템플릿을 내려받지 않으므로 네트워크 없이도 동작한다.
91
+ // doctor mode (#558) — read-only diagnosis. Does not download the template, so it works without a network.
92
92
  if (opts.mode === "doctor") {
93
93
  const { runDoctor } = await import("./commands/doctor.js");
94
94
  await runDoctor({ cwd });
95
- return 0; // 진단은 실패가 아니다 — 살펴볼 항목이 있어도 0으로 끝낸다
95
+ return 0; // A diagnosis is not a failure — ends with 0 even when there are items to look at
96
96
  }
97
97
 
98
- // skills 모드 — IDE 스킬 설치/업데이트/제거 (템플릿 통합 없음).
99
- // Cursor 복사용 skills/ 소스가 필요하므로 템플릿을 획득한 뒤 실행한다.
98
+ // skills mode — install/update/remove IDE skills (no template integration).
99
+ // Needs the skills/ source for the Cursor copy, so it runs after fetching the template.
100
100
  if (opts.mode === "skills") {
101
101
  const tempDir = join(cwd, PATHS.tempDir);
102
102
  const interactive = !opts.force && process.stdout.isTTY;
103
103
  try {
104
- // skills 모드: 스킬 CLI 가 import 하는 scripts/common 필요 > 제외 대상에서 유지 (#994)
104
+ // skills mode: skill CLIs import scripts/common > keep it out of the exclusions (#994)
105
105
  acquireTemplate({ tempDir, source, keep: [SHARED_SCRIPTS_DIR_NAME] });
106
106
  const templateVersion = readTemplateVersion(tempDir);
107
107
  return await runSkills({ templateVersion, tempDir, interactive });
@@ -109,7 +109,7 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
109
109
  remove(tempDir);
110
110
  }
111
111
  }
112
- // 대화형 모드 — 인자 없이 실행 or --mode interactive
112
+ // Interactive mode — run with no args or --mode interactive
113
113
  if (opts.mode === "interactive") {
114
114
  if (!process.stdout.isTTY) {
115
115
  console.error(t("cli.nonTty"));
@@ -117,24 +117,24 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
117
117
  }
118
118
  return await runInteractive({}, { cwd, source, clock });
119
119
  }
120
- // 명시 모드인데 --force 없으면 (비대화형 CLI는 --force 필요)
120
+ // Explicit mode without --force (the non-interactive CLI needs --force)
121
121
  if (!opts.force && !process.stdout.isTTY) {
122
122
  console.error(t("cli.needForce"));
123
123
  return 1;
124
124
  }
125
125
 
126
- // 실행 트레이스 (#494/#561) — 감지·판단 단계부터 기록해야 "왜 이렇게 정해졌는지"가 남는다.
126
+ // Run trace (#494/#561) — recording must start at the detect/decide steps so "why it was decided this way" is kept.
127
127
  const trace = createRunTrace();
128
128
  const recordArtifacts = opts.mode === "full" || opts.mode === "workflows";
129
129
  let disarmSignals = () => {};
130
130
  if (recordArtifacts) {
131
131
  trace.mirrorStart();
132
- // Ctrl+C로 끊어도 여기까지의 기록이 남는다 (#561). 경로는 아래에서 확정되지만
133
- // 신호는 언제든 올 수 있으므로 targetRoot만으로 먼저 무장한다.
132
+ // Even when cut off with Ctrl+C, the record up to here stays (#561). The path is settled below, but
133
+ // a signal can come at any time, so arm with targetRoot alone first.
134
134
  disarmSignals = trace.armSignals({ targetRoot: cwd, now: "" });
135
135
  }
136
136
 
137
- // 기존 version.yml 로드 — version/version_code/project_paths 보존의 단일 진실
137
+ // Load the existing version.yml — single source of truth for keeping version/version_code/project_paths
138
138
  const vyPath = join(cwd, "version.yml");
139
139
  const existing = existsSync(vyPath) ? parseExisting(readFileSync(vyPath, "utf8")) : null;
140
140
  trace.event("detect", "existing-install", existing ? "found" : "none", {
@@ -143,26 +143,26 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
143
143
  types: existing?.types || null,
144
144
  });
145
145
 
146
- // 감지 (CLI 인자 우선, 없으면 자동 감지 — version.yml 우선 규칙은 detectTypes/detectVersion 내부)
146
+ // Detection (CLI args first, else auto-detect — the version.yml-first rule lives inside detectTypes/detectVersion)
147
147
  const types = opts.types.length ? opts.types : detectTypes(cwd);
148
148
  trace.event("detect", "types", types.join(",") || "(none)", {
149
149
  source: opts.types.length ? "cli-flag(--type)" : "auto-detect(marker file scan)",
150
150
  });
151
- // version: 기존 version.yml 최우선(SSoT — 재실행 시 덮어쓰기 방지) → CLI 지정 → 파일 감지
151
+ // version: existing version.yml first (SSoT — prevents overwriting on re-run) → CLI value → file detection
152
152
  const version = (existing?.version) || opts.version || detectVersion(cwd);
153
153
  trace.event("detect", "version", version, {
154
154
  source: existing?.version ? "version.yml(existing value kept)"
155
155
  : (opts.version ? "cli-flag(--project-version)" : "project file detection"),
156
156
  });
157
- const versionCode = existing?.versionCode ?? 1; // 기존 빌드번호 보존
157
+ const versionCode = existing?.versionCode ?? 1; // Keep the existing build number
158
158
  const branch = detectDefaultBranch(cwd);
159
159
  const repoName = detectRepoName(cwd);
160
160
  trace.event("detect", "repo", repoName || "(unknown)", { defaultBranch: branch, versionCode });
161
- // 경로 확정 (비대화형 — --paths 우선 → 저장값 → 후보 1개 자동 → 루트 폴백)
161
+ // Settle paths (non-interactive — --paths first → saved value → single candidate automatically → root fallback)
162
162
  let cliPaths;
163
163
  try {
164
164
  cliPaths = parsePathsCsv(opts.pathsCsv);
165
- validatePathsMap(cliPaths, { root: cwd, types }); // #674 — 파일을 쓰기 전에 거른다
165
+ validatePathsMap(cliPaths, { root: cwd, types }); // #674 — filter before writing any file
166
166
  } catch (e) {
167
167
  if (e instanceof CliError) {
168
168
  console.error(e.message);
@@ -178,7 +178,7 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
178
178
  });
179
179
 
180
180
  for (const [ty, pth] of paths) {
181
- // 근거로 "무엇을 보고 그 경로로 정했는지"까지 남긴다 — 경로가 틀렸을 때 추적의 시작점이다.
181
+ // Record the basis too: "what was seen to choose that path" — the starting point for tracing a wrong path.
182
182
  const marker = markerForType(ty);
183
183
  const at = pth === "." ? marker : `${pth}/${marker}`;
184
184
  trace.event("detect", "project-path", ty, {
@@ -192,7 +192,7 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
192
192
  const { now, today } = clock || utcNow();
193
193
  const tempDir = join(cwd, PATHS.tempDir);
194
194
 
195
- // 옵션 값은 resolve-options.js 한 곳에서 정한다 (#851) — 대화형과 같은 규칙.
195
+ // Option values are decided in one place, resolve-options.js (#851) — same rules as interactive.
196
196
  const { values: resolved, sources } = resolveOptions({
197
197
  flags: {
198
198
  intent: opts.intent, deployTarget: opts.deployTarget, publishTargets: opts.publishTargets,
@@ -204,11 +204,11 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
204
204
  });
205
205
  const { intent, deployTarget, publishTargets } = resolved;
206
206
  const { before: beforeCleanup, applicable } = sources;
207
- // 다국어 스토어인데 store_locales 미설정이면 안내만 한다 (#843) — 복사 전 상태로 판정
207
+ // Multi-language store with store_locales unset: notice only (#843) — judged on the state before copying
208
208
  const storeLocalesHint = detectStoreLocalesHint({ root: cwd, existing, paths, trace });
209
209
 
210
- // 축 확정 근거 (#561) — "왜 이 값인가"가 가장 헷갈리는 자리다.
211
- // CLI 플래그 / 저장값 / intent 유도 / 타입 적용성 정리 중 무엇이 이겼는지 남긴다.
210
+ // Basis for settling the axes (#561) — "why this value" is the most confusing spot.
211
+ // Records which won: CLI flag / saved value / intent derivation / type applicability cleanup.
212
212
  trace.event("resolve", "intent", String(intent ?? "(unset)"), { source: sources.intent });
213
213
  trace.event("resolve", "deploy", deployTarget, {
214
214
  source: sources.deploy,
@@ -227,12 +227,12 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
227
227
  mode: opts.mode, force: true, types, version, versionCode, branch, paths,
228
228
  ...resolved,
229
229
  repoName,
230
- // 실 resolver 4종 (spring-app-yml 포함)
230
+ // The 4 real resolvers (including spring-app-yml)
231
231
  resolvers: makeResolvers(cwd, repoName, paths),
232
232
  now, today,
233
233
  });
234
234
 
235
- // 최종 확정값 스냅샷 (#561) — 이 한 줄로 "무엇이 어떻게 설치될 것인지"가 고정된다.
235
+ // Snapshot of the final values (#561) — this one line pins down "what will be installed and how".
236
236
  trace.event("resolve", "context", opts.mode || "", {
237
237
  types, version, versionCode, branch,
238
238
  deploy: deployTarget, publish: publishTargets, intent,
@@ -252,11 +252,11 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
252
252
  });
253
253
 
254
254
  let result = null;
255
- // trace/recordArtifacts는 감지 단계 기록을 위해 위에서 이미 생성했다 (#561)
255
+ // trace/recordArtifacts were already created above to record the detection steps (#561)
256
256
  let breakingReport = null;
257
257
  let migrationsResult = null;
258
258
  let orphanPending = [];
259
- // 실행 경계(#561) — 로그만 보고 "무엇을 어떤 인자로 돌렸는지"를 알 수 있어야 한다.
259
+ // Run boundary (#561) — the log alone must show "what ran with which arguments".
260
260
  trace.event("run", "start", opts.mode || "", {
261
261
  cli: "non-interactive", types, version, branch,
262
262
  force: true, deploy: deployTarget, publish: publishTargets, intent,
@@ -266,10 +266,10 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
266
266
  context.templateVersion = readTemplateVersion(tempDir);
267
267
  trace.event("detect", "template-version", context.templateVersion, { tempDir: PATHS.tempDir });
268
268
 
269
- // 비대화형 축약 배너 (#446 확정 — 1줄, 로그 오염 최소)
269
+ // Short non-interactive banner (settled in #446 — 1 line, minimal log noise)
270
270
  printBannerCompact({ version: context.templateVersion, mode: opts.mode });
271
271
 
272
- // Breaking Changes 게이트 (비대화형은 경고 후 진행)
272
+ // Breaking changes gate (non-interactive warns and proceeds)
273
273
  const proceed = await trace.stepAsync("breaking-check", () => runBreakingCheck({
274
274
  cwd, tempDir, templateVersion: context.templateVersion,
275
275
  onItems: (items) => { breakingReport = items; },
@@ -280,18 +280,18 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
280
280
  return 0;
281
281
  }
282
282
 
283
- // 레거시 마이그레이션 (#470) — 워크플로우를 만지는 모드에서만. 비대화형은 safe 티어 자동 적용.
283
+ // Legacy migration (#470) — only in modes that touch workflows. Non-interactive applies the safe tier automatically.
284
284
  if (recordArtifacts) {
285
285
  migrationsResult = await trace.stepAsync("legacy-migrations", () => runMigrations({ targetRoot: cwd, removeLegacy: opts.removeLegacy === true }));
286
286
  for (const a of migrationsResult.applied ?? []) trace.event("legacy", a.action === "error" ? "error" : "neutralized", a.from ?? a.id ?? "", { to: a.to ?? "", id: a.id ?? "" });
287
287
  for (const e of migrationsResult.confirmPending ?? []) trace.event("legacy", "leftover-old-gen", e.file, { replacement: e.replacedBy ?? "", reason: e.reason ?? "" });
288
288
  }
289
289
 
290
- // 고아 타입 워크플로우 안내 (#487) — 비대화형은 자동 무해화 금지(배포 파이프라인일 수 있음), 안내만
290
+ // Orphan type workflow notice (#487) — non-interactive never neutralizes automatically (may be a deploy pipeline), notice only
291
291
  if (recordArtifacts) {
292
292
  const orphans = trace.step("orphan-scan",
293
293
  () => detectOrphanWorkflows({ tempDir, targetRoot: cwd, selectedTypes: types,
294
- // 껐는데 남아 계속 도는 워크플로우도 함께 잡는다 (#566)
294
+ // Also catch workflows that were turned off but remain and keep running (#566)
295
295
  options: { includeSecretBackup: context.includeSecretBackup, aiPrSummary: context.aiPrSummary, projectsSync: context.projectsSync, deployTarget } }),
296
296
  { selectedTypes: types });
297
297
  orphanPending = orphans.map((o) => o.filename);
@@ -307,10 +307,10 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
307
307
  case "workflows": result = trace.step("install-workflows", () => runWorkflows(context, tempDir, cwd, { trace })); break;
308
308
  case "issues": result = trace.step("install-issues", () => runIssues(context, tempDir, cwd)); break;
309
309
  default:
310
- // 알 수 없는 모드 → 복사 0건, 에러 아님
310
+ // Unknown mode → 0 copies, not an error
311
311
  break;
312
312
  }
313
- // 개발 브랜치 생성 (#715) — --create-development-branch 일 때만. 실패해도 실행은 계속(수동 명령 안내)
313
+ // Development branch creation (#715) — only with --create-development-branch. The run continues on failure (manual command shown)
314
314
  const developmentBranchResult = await runDevelopmentBranchStep({
315
315
  isRequested: opts.createDevelopmentBranch === true, targetRoot: cwd,
316
316
  branch: context.deployBranch || "develop", defaultBranch: branch, trace,
@@ -318,10 +318,10 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
318
318
  });
319
319
  const isDevelopmentBranchReady = developmentBranchResult ? developmentBranchResult.status !== "failed" : null;
320
320
 
321
- // 마이그레이션 기록 (#493/#494) — Layer 2/3 트레이스 파일 + Layer 1 가이드 엔트리
321
+ // Migration record (#493/#494) — Layer 2/3 trace files + Layer 1 guide entry
322
322
  let migrationGuidePath = null;
323
- // 기록 파일 경로는 먼저 계산하고(가이드가 참조), 실제 쓰기는 완료 화면 출력 뒤로 미룬다 —
324
- // 그래야 터미널 미러에 완료 화면까지 담긴다 (#561).
323
+ // Compute the record file paths first (the guide references them) and delay the actual write until after the finish screen —
324
+ // so the terminal mirror captures the finish screen too (#561).
325
325
  const files = recordArtifacts
326
326
  ? trace.paths({ fromVersion: existing?.templateVersion || "", toVersion: context.templateVersion, now })
327
327
  : null;
@@ -330,7 +330,7 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
330
330
  now, mode: opts.mode, types, repoName,
331
331
  templateFrom: existing?.templateVersion || "", templateTo: context.templateVersion,
332
332
  options: { deploy: deployTarget, publish: publishTargets, secretBackup: context.includeSecretBackup, coderabbit: context.codeReviewCoderabbit, changelogProvider: context.changelogProvider, intent, semverAuto: context.semverAuto , appRelease: context.appRelease, language: context.language, labelStyle: context.labelStyle, closeOnRelease: context.closeOnRelease, projectsSync: context.projectsSync, excludedWorkflows: context.excludedWorkflows, storeLocales: context.storeLocales, storeLocalesIos: context.storeLocalesIos, storeLocalesPlay: context.storeLocalesPlay },
333
- storeLocalesHint, // #843 체크리스트 한 항목
333
+ storeLocalesHint, // #843 one checklist item
334
334
  branches: { defaultBranch: branch, deployBranch: context.deployBranch || "develop", ready: isDevelopmentBranchReady,
335
335
  created: developmentBranchResult ? developmentBranchResult.status === "created" : null, result: developmentBranchResult },
336
336
  breaking: breakingReport, migrations: migrationsResult, orphans: { cleaned: [], pending: orphanPending },
@@ -339,22 +339,22 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
339
339
  }).guidePath;
340
340
  }
341
341
 
342
- // 완료 요약 (CLI 모드에서도 출력)
342
+ // Finish summary (printed in CLI mode too)
343
343
  printSummary({
344
344
  mode: opts.mode, types, version, deployBranch: context.deployBranch, migrationGuidePath,
345
- developmentBranchResult, // #715 생성 결과 (플래그 없으면 null)
346
- shouldSuggestCreateBranchFlag: !developmentBranchResult, // #715 플래그 없이 돌았으면 다음엔 쓰라고 안내
345
+ developmentBranchResult, // #715 creation result (null without the flag)
346
+ shouldSuggestCreateBranchFlag: !developmentBranchResult, // #715 ran without the flag, so suggest it next time
347
347
  counters: { workflows: result?.workflows?.copied ?? 0, workflowFiles: result?.workflows?.copiedFiles ?? [], utilModules: 0 },
348
- skippedConflicts: result?.workflows?.skippedConflicts ?? [], // #654 병합 안내
349
- replacedBak: result?.workflows?.replacedBak ?? [], // #673 기준점 없이 교체한 파일 안내
350
- legacyLeftover: migrationsResult?.confirmPending ?? [], // #809 신·구 세대 동시 실행 안내
351
- notInstalled: result?.workflows?.notInstalled ?? [], // #810 깔지 않은 워크플로우 안내
352
- semverAutoNewlyOn: sources.semverAutoNewlyOn && context.semverAuto === true, // 업데이트가 켠 사실 안내
353
- storeLocalesHint, // #843 다국어 스토어 안내
354
- verification: result?.verification, // #549 설치 후 검증 결과 (full/workflows 모드에서만 존재)
355
- // #569 — 고른 것만 안내하려면 선택값이 필요하다
348
+ skippedConflicts: result?.workflows?.skippedConflicts ?? [], // #654 merge notice
349
+ replacedBak: result?.workflows?.replacedBak ?? [], // #673 notice for files replaced without a reference point
350
+ legacyLeftover: migrationsResult?.confirmPending ?? [], // #809 notice for old and new generations running together
351
+ notInstalled: result?.workflows?.notInstalled ?? [], // #810 notice for workflows not installed
352
+ semverAutoNewlyOn: sources.semverAutoNewlyOn && context.semverAuto === true, // Notice that the update turned it on
353
+ storeLocalesHint, // #843 multi-language store notice
354
+ verification: result?.verification, // #549 post-install verification result (only in full/workflows modes)
355
+ // #569 — the chosen values are needed to mention only what was picked
356
356
  aiPrSummary: context.aiPrSummary, codeReviewCoderabbit: context.codeReviewCoderabbit,
357
- logDir: files ? MIGRATION_DIR : null, // #561 기록 위치 안내
357
+ logDir: files ? MIGRATION_DIR : null, // #561 record location notice
358
358
  logFile: files?.logFile ?? null,
359
359
  traceFile: files?.traceFile ?? null,
360
360
  }, cwd);
@@ -364,15 +364,15 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
364
364
  workflowsSkipped: result?.workflows?.skipped ?? 0,
365
365
  });
366
366
  } catch (err) {
367
- // 실패 원인을 로그에 남긴다 (#561) — 서버 로그처럼 사후에 바로 짚을 수 있어야 한다.
367
+ // Log the failure cause (#561) — like a server log, it must be easy to pinpoint afterwards.
368
368
  trace.event("run", "error", opts.mode || "", {
369
369
  message: err?.message || String(err),
370
370
  stack: String(err?.stack || "").split("\n").slice(0, 3).join(" | "),
371
371
  });
372
372
  throw err;
373
373
  } finally {
374
- // 어떤 경로로 빠져나가든 기록을 남긴다 (#561) — 조기 return·중간 취소·예외 포함.
375
- // 완료 화면 출력이 try 안에 있어야 그 화면까지 미러에 담긴 채로 여기서 닫힌다.
374
+ // Leave a record however it exits (#561) — including early return, mid-run cancel and exceptions.
375
+ // The finish screen output must be inside try so it is captured in the mirror before closing here.
376
376
  if (recordArtifacts) {
377
377
  trace.finalize({ targetRoot: cwd, fromVersion: existing?.templateVersion || "", toVersion: context.templateVersion, now });
378
378
  } else {
package/src/ui/ansi.js CHANGED
@@ -1,4 +1,4 @@
1
- // 공용 ANSI 헬퍼 — banner/status-cards가 공유 (readline-engine 내부 헬퍼와 독립, 의존성 0)
1
+ // Shared ANSI helpers — shared by banner/status-cards (independent of readline-engine's internal helpers, zero dependencies)
2
2
  const E = "\x1b[";
3
3
  export const A = {
4
4
  reset: `${E}0m`,
@@ -12,21 +12,21 @@ export const A = {
12
12
  };
13
13
  export const paint = (s, color) => `${color}${s}${A.reset}`;
14
14
 
15
- // 대략적 표시 폭 (CJK 2칸 · ANSI 시퀀스 0칸) — 박스 우변 정렬용
15
+ // Approximate display width (CJK 2 cells · ANSI sequences 0) — for aligning the box's right edge
16
16
  export function visualWidth(s) {
17
17
  const plain = String(s).replace(/\x1b\[[0-9;]*m/g, "");
18
18
  let w = 0;
19
19
  for (const ch of plain) {
20
20
  const cp = ch.codePointAt(0);
21
- // 한글·CJK·이모지 대략 2칸 (터미널 관례)
21
+ // Korean, CJK and emoji are roughly 2 cells (terminal convention)
22
22
  w += (cp >= 0x1100 && (cp <= 0x115f || (cp >= 0x2e80 && cp <= 0xa4cf) || (cp >= 0xac00 && cp <= 0xd7a3)
23
23
  || (cp >= 0xf900 && cp <= 0xfaff) || (cp >= 0xff00 && cp <= 0xff60) || cp >= 0x1f300)) ? 2 : 1;
24
24
  }
25
25
  return w;
26
26
  }
27
27
 
28
- // 시각 폭(CJK 2칸) 기준으로 오른쪽 스페이스 패딩 — 한글·영문 혼합 라벨 열 정렬용.
29
- // JS 기본 String.padEnd는 문자 수 기준이라 한글이 섞이면 열이 어긋난다.
28
+ // Pad with spaces on the right by visual width (CJK 2 cells) — for aligning columns of mixed Korean/English labels.
29
+ // JS's built-in String.padEnd counts characters, so columns drift when Korean is mixed in.
30
30
  export function padEndVisual(s, targetWidth) {
31
31
  const pad = targetWidth - visualWidth(s);
32
32
  return pad > 0 ? String(s) + " ".repeat(pad) : String(s);
@@ -1,5 +1,5 @@
1
- // @wizard env 계획 질문 UI: 사용처 조립, ask KEY 수집, 필드 카드, 기본값·개별 입력.
2
- // io 주입식 — 테스트는 {select, multiselect, text} 스텁을 넘긴다. 기본은 readline-engine 실물.
1
+ // @wizard env plan question UI: build usages, collect ask KEYs, field cards, defaults and per-field input.
2
+ // io-injected — tests pass {select, multiselect, text} stubs. Default is the real readline-engine.
3
3
  import { join } from "node:path";
4
4
  import { readFileSync } from "node:fs";
5
5
  import { stdin, stderr } from "node:process";
@@ -12,11 +12,11 @@ import { t } from "../i18n/index.js";
12
12
 
13
13
  const CANCEL = engine.CANCEL;
14
14
 
15
- // 진행 안내는 stderr로 출력 (stdout 파이프 오염 방지).
15
+ // Progress notices go to stderr (keeps the stdout pipe clean).
16
16
  const defaultLog = (s = "") => stderr.write(s + "\n");
17
17
 
18
- // 사용처 문자열 조립.
19
- // usages: [{type, workflowName}] — 타입이 여러 개면 타입만 "t1·t2", 하나면 "타입 name1·name2".
18
+ // Build the usages string.
19
+ // usages: [{type, workflowName}] — with several types, just "t1·t2"; with one, "type name1·name2".
20
20
  export function scopeString(usages = []) {
21
21
  const types = []; const names = [];
22
22
  for (const { type, workflowName } of usages) {
@@ -27,14 +27,14 @@ export function scopeString(usages = []) {
27
27
  return `${types.join("·")} ${names.join("·")}`.trim();
28
28
  }
29
29
 
30
- // ask KEY 수집 — 실제 설치되는 워크플로우와 같은 소스를 스캔한다.
31
- // tempDir: 다운로드 원본 루트. types: 설치 대상 타입 목록.
30
+ // Collect ask KEYs — scans the same source as the workflows actually installed.
31
+ // tempDir: downloaded source root. types: list of types to install.
32
32
  // opts:
33
- // resolvers - @접두 기본값(@repo 등) 해석용 (수집 시점에 해석)
34
- // deployTarget - #439 배포 축: docker-ssh(기본)일 때만 server-deploy 스캔 (복사 엔진과 일치)
35
- // publishTargets - #439 publish 축: 선택된 타겟의 publish/<target>/ 스캔
36
- // prompts - wizard-labels 파싱 객체 (워크플로우 표시명용, null이면 확장자 제거 폴백)
37
- // 반환: { keys:[], defaults:Map<key,default>, typeDefaults:Map<"type|key",default>,
33
+ // resolvers - for resolving @-prefixed defaults (@repo, etc.) (resolved at collection time)
34
+ // deployTarget - #439 deploy axis: scan server-deploy only for docker-ssh (default) (matches the copy engine)
35
+ // publishTargets - #439 publish axis: scan publish/<target>/ of the selected targets
36
+ // prompts - wizard-labels parsed object (for workflow display names; null falls back to stripping the extension)
37
+ // Returns { keys:[], defaults:Map<key,default>, typeDefaults:Map<"type|key",default>,
38
38
  // usages:Map<key,[{type,workflowName}]> }
39
39
  export function collectAsks(tempDir, types = [], opts = {}) {
40
40
  const { resolvers = {}, deployTarget = "docker-ssh", publishTargets = [], prompts = null, repoName = "" } = opts;
@@ -47,7 +47,7 @@ export function collectAsks(tempDir, types = [], opts = {}) {
47
47
  for (const type of types) {
48
48
  const typeDir = join(baseDir, type);
49
49
  if (!exists(typeDir)) continue;
50
- // 복사 엔진과 동일한 폴더 구성: 타입 직하위 + (docker-ssh면) server-deploy + 선택된 publish/<target>
50
+ // Same folder set as the copy engine: type direct children + (with docker-ssh) server-deploy + selected publish/<target>
51
51
  const dirs = [typeDir];
52
52
  if ((deployTarget || "docker-ssh") === "docker-ssh") dirs.push(join(typeDir, "server-deploy"));
53
53
  for (const pt of publishTargets) dirs.push(join(typeDir, "publish", pt));
@@ -59,12 +59,12 @@ export function collectAsks(tempDir, types = [], opts = {}) {
59
59
  if (!content.includes("@wizard")) continue;
60
60
  const workflowName = workflowDisplayName(prompts, filename);
61
61
  for (const line of content.split(/\r?\n/)) {
62
- const p = parseWizardLine(line); // KEY 정규식 [A-Z_]+
62
+ const p = parseWizardLine(line); // KEY regex [A-Z_]+
63
63
  if (!p || p.action !== "ask") continue;
64
- // 타입별 기본값: @접두면 resolver 해석, 아니면 리터럴
65
- // #489 — __PROJECT_NAME__ 등 전역 토큰은 카드 표시 전에 미리 해석한다.
66
- // 설치본(파일 복사 시 전역 치환)과 동일한 값을 보여주지 않으면
67
- // 사용자가 "리터럴이 그대로 박히나?" 오해하게 된다.
64
+ // Per-type default: resolve via resolver if @-prefixed, else literal
65
+ // #489 — global tokens like __PROJECT_NAME__ are resolved before showing the card.
66
+ // Not showing the same value as the install (global substitution when copying files)
67
+ // would make users think "the literal gets written as is?".
68
68
  const typeDefault = resolveGlobalTokens(
69
69
  p.arg.startsWith("@") ? resolveToken(p.arg.slice(1), type, resolvers) : p.arg,
70
70
  repoName,
@@ -81,13 +81,13 @@ export function collectAsks(tempDir, types = [], opts = {}) {
81
81
  return { keys, defaults, typeDefaults, usages };
82
82
  }
83
83
 
84
- // KEY가 처음 등장한 type (라벨 조회 시 타입 오버라이드 우선순위용)
84
+ // The type where the KEY first appeared (for type override priority in label lookup)
85
85
  function firstTypeFor(usages, key) {
86
86
  return usages.get(key)?.[0]?.type ?? "";
87
87
  }
88
88
 
89
- // KEY 1개를 'label·사용처·설명·예시·기본값' 카드로 출력.
90
- // info: { default, usages } — idx/tot 있으면 "(i/t)" 진행 표시. log 주입 가능(테스트 무음화).
89
+ // Print one KEY as a 'label · usages · description · example · default' card.
90
+ // info: { default, usages } — with idx/tot, shows "(i/t)" progress. log is injectable (silenced in tests).
91
91
  export function printFieldCard(prompts, key, info, idx = null, tot = null, log = defaultLog) {
92
92
  const ty = info.usages?.[0]?.type ?? "";
93
93
  const label = wfField(prompts, ty, key, "label");
@@ -104,8 +104,8 @@ export function printFieldCard(prompts, key, info, idx = null, tot = null, log =
104
104
  log("");
105
105
  }
106
106
 
107
- // 지정 KEY들을 하나씩 입력받아 values에 기록.
108
- // 빈 입력(Enter)/ESC → KEY 공통 기본값 유지.
107
+ // Ask for the given KEYs one by one and record them in values.
108
+ // Empty input (Enter)/ESC → keep the KEY's shared default.
109
109
  async function promptEach(io, prompts, asks, todoKeys, values, log) {
110
110
  const tot = todoKeys.length;
111
111
  if (tot === 0) return;
@@ -126,17 +126,17 @@ async function promptEach(io, prompts, asks, todoKeys, values, log) {
126
126
  }
127
127
  }
128
128
 
129
- // 배포 env 설정 계획.
130
- // 반환: { values: Map<key,value>, useDefaults: boolean }
131
- // - useDefaults=true → 호출부는 substituteEnv에 그대로 넘기면 타입별 기본값 경로
132
- // - useDefaults=false → values에 담긴 키만 사용자 확정값으로 치환, 나머지는 기본값
133
- // (⚠️ substituteEnv는 useDefaults=false일 때만 values를 참조하므로 이 플래그를 반드시 함께 전달)
134
- // 인자:
135
- // tempDir/types/resolvers/deployTarget/publishTargets — collectAsks와 동일 의미
136
- // targetRoot — wizard-prompts.yml 1차 탐색 위치(기본 ".")
137
- // force — true면 질문 없이 전부 기본값
138
- // io — {select, multiselect, text} 주입 (기본 readline-engine). 테스트 스텁 지점.
139
- // log — 카드·안내 출력 함수 주입 (기본 stderr)
129
+ // Deploy env setup plan.
130
+ // Returns { values: Map<key,value>, useDefaults: boolean }
131
+ // - useDefaults=true → the caller passes it as is to substituteEnv for the per-type default path
132
+ // - useDefaults=false → only keys in values are substituted with confirmed user values; the rest use defaults
133
+ // (⚠️ substituteEnv reads values only when useDefaults=false, so always pass this flag along)
134
+ // Arguments:
135
+ // tempDir/types/resolvers/deployTarget/publishTargets — same meaning as in collectAsks
136
+ // targetRoot — first place to look for wizard-prompts.yml (default ".")
137
+ // force — when true, all defaults without questions
138
+ // io — {select, multiselect, text} injection (default readline-engine). Test stub point.
139
+ // log — injected output function for cards and notices (default stderr)
140
140
  export async function promptEnvPlan({
141
141
  tempDir, types = [], io = null, force = false, resolvers = {},
142
142
  deployTarget = "docker-ssh", publishTargets = [], targetRoot = ".", repoName = "", log = defaultLog,
@@ -145,17 +145,17 @@ export async function promptEnvPlan({
145
145
  const asks = collectAsks(tempDir, types, { resolvers, deployTarget, publishTargets, prompts, repoName });
146
146
  const defaults = asks.defaults;
147
147
 
148
- // 수집 키 0개 → 질문 자체가 없음
148
+ // 0 collected keys → no questions at all
149
149
  if (asks.keys.length === 0) return { values: new Map(), useDefaults: true };
150
150
 
151
- // 비대화형: force 또는 (io 미주입 && 비TTY) → 전부 기본값
152
- // io가 주입돼 있으면(테스트/상위 마법사) TTY 여부와 무관하게 대화형으로 진행한다.
151
+ // Non-interactive: force or (no io injected && non-TTY) → all defaults
152
+ // If io is injected (tests/parent wizard), proceed interactively regardless of TTY.
153
153
  const interactive = !force && (io != null || stdin.isTTY);
154
154
  if (!interactive) return { values: new Map(defaults), useDefaults: true };
155
155
 
156
156
  const ui = io ?? engine;
157
157
 
158
- // 기본값 미리보기 카드 전체 출력
158
+ // Print the whole default preview card
159
159
  log("");
160
160
  log(t("envPlan.title"));
161
161
  log("");
@@ -176,20 +176,20 @@ export async function promptEnvPlan({
176
176
  { value: "some", label: t("envPlan.optSome") },
177
177
  ],
178
178
  });
179
- // ESC/취소 → 전부 기본값
179
+ // ESC/cancel → all defaults
180
180
  if (choice === CANCEL || choice == null || choice === "all") {
181
181
  return { values: new Map(defaults), useDefaults: true };
182
182
  }
183
183
 
184
- // 사용자가 확정한 키만 values에 담는다 — substituteEnv(useDefaults:false)가
185
- // values에 없는 키는 타입별 기본값으로 채운다 (기본값 위에 입력값 덮어쓰기).
184
+ // Only keys the user confirmed go into values — substituteEnv (useDefaults:false)
185
+ // fills keys missing from values with per-type defaults (input overrides defaults).
186
186
  const values = new Map();
187
187
  if (choice === "each") {
188
188
  await promptEach(ui, prompts, asks, asks.keys, values, log);
189
189
  return { values, useDefaults: false };
190
190
  }
191
191
 
192
- // some: 바꿀 항목만 멀티선택 → 고른 것만 입력
192
+ // some: multi-select only the items to change → input only those
193
193
  const options = asks.keys.map((key) => ({
194
194
  value: key,
195
195
  label: `${wfField(prompts, firstTypeFor(asks.usages, key), key, "label")} ${t("envPlan.defaultTag", { value: defaults.get(key) })}`,
@@ -199,11 +199,11 @@ export async function promptEnvPlan({
199
199
  options,
200
200
  initialValues: [],
201
201
  });
202
- // ESC/빈 선택 → 전부 기본값
202
+ // ESC/empty selection → all defaults
203
203
  if (selected === CANCEL || !Array.isArray(selected) || selected.length === 0) {
204
204
  return { values: new Map(defaults), useDefaults: true };
205
205
  }
206
- // 수집 키 순서 유지 + 수집된 ask KEY만 인정
206
+ // Keep the collected key order + accept only collected ask KEYs
207
207
  const todo = asks.keys.filter((k) => selected.includes(k));
208
208
  await promptEach(ui, prompts, asks, todo, values, log);
209
209
  return { values, useDefaults: false };