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
@@ -1,10 +1,10 @@
1
- // 설정 이관기 (#470 확장, #478) — 구 워크플로우의 커스텀 설정을 무해화 전에 version.yml로 이관.
2
- // 원칙: 기본값과 다른 값만 이관 / issue_helper 섹션이 이미 있으면 불변(신형 우선·멱등)
3
- // / version.yml 없으면 skip / 실패해도 무해화를 막지 않는다(호출부에서 try-catch).
1
+ // Settings migrator (#470 extension, #478) — moves custom settings of old workflows into version.yml before neutralizing.
2
+ // Rules: migrate only values that differ from defaults / leave an existing issue_helper section untouched (new form wins, idempotent)
3
+ // / skip if there is no version.yml / never block neutralization on failure (caller uses try-catch).
4
4
  import { existsSync, readFileSync, writeFileSync } from "node:fs";
5
5
  import { join } from "node:path";
6
6
 
7
- // 구 MODULE 워크플로우 배포본의 with: 기본값 — 이 값 그대로면 사용자 커스텀이 아니다
7
+ // with: defaults of the shipped old MODULE workflow — values equal to these are not user customizations
8
8
  const OLD_DEFAULTS = {
9
9
  branch_prefix: "",
10
10
  max_branch_length: "100",
@@ -25,7 +25,7 @@ function parseWithValues(content) {
25
25
  return out;
26
26
  }
27
27
 
28
- // version.yml에 issue_helper 블록 삽입. 계층(metadata/template/options)이 없으면 만든다.
28
+ // Insert the issue_helper block into version.yml. Creates the hierarchy (metadata/template/options) if missing.
29
29
  function insertIssueHelperBlock(vyText, carried) {
30
30
  const lines = Object.entries(carried)
31
31
  .map(([k, v]) => ` ${k}: "${v.replace(/"/g, '\\"')}"`);
@@ -40,19 +40,19 @@ function insertIssueHelperBlock(vyText, carried) {
40
40
  return `${vyText.replace(/\n*$/, "\n")}metadata:\n template:\n options:\n${block}\n`;
41
41
  }
42
42
 
43
- // 구 SUH-ISSUE-HELPER-MODULE의 with: → options.issue_helper 이관. 반환: { carried: [키...] }
43
+ // Old SUH-ISSUE-HELPER-MODULE with: → options.issue_helper migration. Returns { carried: [keys...] }
44
44
  export function extractIssueHelperModule(targetRoot, entry) {
45
45
  const wf = join(targetRoot, ".github", "workflows", entry.file);
46
46
  const vy = join(targetRoot, "version.yml");
47
47
  if (!existsSync(wf) || !existsSync(vy)) return { carried: [] };
48
48
 
49
49
  const vyText = readFileSync(vy, "utf8");
50
- if (/^\s*issue_helper:/m.test(vyText)) return { carried: [] }; // 신형 설정 우선
50
+ if (/^\s*issue_helper:/m.test(vyText)) return { carried: [] }; // New-form settings win
51
51
 
52
52
  const vals = parseWithValues(readFileSync(wf, "utf8"));
53
53
  const carried = {};
54
54
  for (const [k, v] of Object.entries(vals)) {
55
- if (v !== OLD_DEFAULTS[k]) carried[k] = v; // 기본값과 다른 것만
55
+ if (v !== OLD_DEFAULTS[k]) carried[k] = v; // Only values that differ from defaults
56
56
  }
57
57
  if (Object.keys(carried).length === 0) return { carried: [] };
58
58
 
@@ -1,10 +1,10 @@
1
- // 배포/publish 축(#439) + Secret 백업 opt-in 질문.
1
+ // Deploy/publish axes (#439) + secret backup opt-in questions.
2
2
  //
3
- // io 주입 계약(readline-engine 시그니처):
3
+ // io injection contract (readline-engine signatures):
4
4
  // io.confirm({message, initialValue}) → bool | CANCEL(symbol)
5
- // io.select({message, options}) → value | CANCEL (deploy 택1)
6
- // io.multiselect({message, options, initialValues}) → value[] | CANCEL (publish 다중)
7
- // io.log(line) → 안내 출력 (없으면 stderr)
5
+ // io.select({message, options}) → value | CANCEL (deploy, pick one)
6
+ // io.multiselect({message, options, initialValues}) → value[] | CANCEL (publish, multiple)
7
+ // io.log(line) → notice output (stderr if missing)
8
8
  import { existsSync, readFileSync } from "node:fs";
9
9
  import { join } from "node:path";
10
10
  import { listYamlFiles } from "./fsutil.js";
@@ -14,16 +14,16 @@ import { parseTemplateOptions, inferIntent } from "./version-yml.js";
14
14
  import { branchStatus, createBranch, pushBranch } from "./git-branch.js";
15
15
  import { DEPLOY_TARGETS, PUBLISH_TARGETS, CHANGELOG_PROVIDERS, DEFAULT_CODE_REVIEW_CODERABBIT } from "./constants.js";
16
16
 
17
- // 개발(배포) 브랜치 존재 확인 + 생성 제안 (#477) — 대화형 전용.
18
- // 로컬에 없고 원격에도 없(거나 불명이)면 기본 브랜치에서 생성을 제안하고, 생성 후 push 여부도 묻는다.
19
- // git 미설치·비레포·질문 불가(io.confirm 없음)면 조용히 통과 — 마법사 진행을 막지 않는다.
20
- // 반환 ready (#490 — 완료 요약이 "브랜치 만들어라" 재지시를 접을지 판단):
21
- // true = 브랜치가 이미 있거나 이번 실행에서 생성함 → 요약에서 생성 안내 불필요
22
- // false = 없는데 사용자가 거절/생성 실패 → 안내 유지
23
- // null = 확인 자체를 못 함(비레포·질문 불가) → 안내 유지(보수적)
24
- // 반환 state (#715 — 비대화형 결과 기록용): not-checked · not-a-repo · exists-local · exists-remote ·
17
+ // Check the development (release) branch exists + offer to create it (#477) — interactive only.
18
+ // If missing locally and missing (or unknown) on the remote, offer to create it from the default branch, then ask whether to push.
19
+ // No git, not a repo, or cannot ask (no io.confirm) → pass quietly — never block the wizard.
20
+ // Returns ready (#490 — lets the finish summary decide whether to drop the "create the branch" reminder):
21
+ // true = the branch already existed or was created in this run → no creation notice in the summary
22
+ // false = missing and the user declined or creation failed → keep the notice
23
+ // null = could not check at all (not a repo, cannot ask) → keep the notice (conservative)
24
+ // Returns state (#715 — for recording non-interactive results): not-checked · not-a-repo · exists-local · exists-remote ·
25
25
  // declined · create-failed · push-declined · pushed · push-failed
26
- // isNonInteractive: 원격 조회·push 에서 자격 증명 질문 차단 (#988 — 대화형은 기존 그대로)
26
+ // isNonInteractive: blocks credential prompts in remote lookup and push (#988 — interactive unchanged)
27
27
  export async function ensureDeployBranch({ targetRoot = ".", deployBranch = "", defaultBranch = "", io = {}, say = () => {}, isNonInteractive = false }) {
28
28
  if (!deployBranch || typeof io.confirm !== "function") return { created: false, pushed: false, ready: null, state: "not-checked" };
29
29
  const st = branchStatus(targetRoot, deployBranch, { isNonInteractive });
@@ -44,7 +44,7 @@ export async function ensureDeployBranch({ targetRoot = ".", deployBranch = "",
44
44
  return { created: false, pushed: false, ready: false, state: "create-failed" };
45
45
  }
46
46
  say(msg("options.branch.created", { branch: deployBranch }));
47
- // #481 — push 질문에 브랜치명 명시 ("어느 브랜치를 push하는지" 불명확 방지)
47
+ // #481 — name the branch in the push question (avoids "which branch is being pushed" confusion)
48
48
  const up = await io.confirm({ message: msg("options.branch.pushPrompt", { branch: deployBranch }), initialValue: true });
49
49
  if (up !== true) return { created: true, pushed: false, ready: true, state: "push-declined" };
50
50
  if (pushBranch(targetRoot, deployBranch, { isNonInteractive })) {
@@ -55,17 +55,17 @@ export async function ensureDeployBranch({ targetRoot = ".", deployBranch = "",
55
55
  return { created: true, pushed: false, ready: true, state: "push-failed" };
56
56
  }
57
57
 
58
- // 재노출 — 파서 본체는 version-yml.js에 있다 (순환 import 방지: options-ask → version-yml 방향만 허용)
58
+ // Re-export — the parser itself lives in version-yml.js (avoids circular import: only options-ask → version-yml is allowed)
59
59
  export { parseTemplateOptions };
60
60
 
61
- // 값 목록은 core/constants.js 가 정본이다. 기존 import 경로를 깨지 않도록 다시 내보낸다.
61
+ // core/constants.js owns the value lists. Re-exported so existing import paths keep working.
62
62
  export { DEPLOY_TARGETS, PUBLISH_TARGETS, CHANGELOG_PROVIDERS };
63
63
 
64
- // #498 — 타입별 적용 가능 deploy/publish 타겟 선언.
65
- // 빈 배열 = 그 축이 개념상 성립하지 않는 타입. 모바일 앱(flutter/react-native/expo)은 스토어 배포
66
- // (Play Store/TestFlight/Firebase 등) 워크플로우가 타입 자체에 항상 포함되므로 서버 deploy 축과
67
- // 무관하고, 레지스트리 publish 개념도 없다. 두 축이 모두 빈 타입만 선택되면 질문 자체를 스킵한다.
68
- // 서버형 타입은 현행 선택지 전체를 유지한다 (동작 무변경 — 타입별 세분화는 후속 과제).
64
+ // #498 — deploy/publish targets applicable per type.
65
+ // Empty array = the axis does not apply to that type. Mobile apps (flutter/react-native/expo) always include store deploy
66
+ // (Play Store/TestFlight/Firebase, etc.) workflows in the type itself, so the server deploy axis does not
67
+ // apply and there is no registry publish either. If only types with both axes empty are selected, the questions are skipped.
68
+ // Server types keep all current choices (behavior unchanged — per-type refinement is follow-up work).
69
69
  export const TYPE_DEPLOY_TARGETS = {
70
70
  spring: ["docker-ssh", "vercel"],
71
71
  react: ["docker-ssh", "vercel"],
@@ -87,8 +87,8 @@ export const TYPE_PUBLISH_TARGETS = {
87
87
  basic: [],
88
88
  };
89
89
 
90
- // 선택된 타입 집합의 합집합으로 적용 가능 타겟 산출 (#498). 'none'은 항상 허용이라 목록에서 제외.
91
- // 미선언 타입은 보수적으로 전체 허용(질문 유지) — 새 타입 추가 시 위 선언도 함께 넣는 게 원칙.
90
+ // Applicable targets = union over the selected types (#498). 'none' is always allowed, so it is left out of the list.
91
+ // Undeclared types allow everything conservatively (question kept) — when adding a new type, add its declaration above too.
92
92
  export function applicableTargets(types = []) {
93
93
  const deployAll = DEPLOY_TARGETS.filter((t) => t !== "none");
94
94
  return {
@@ -96,14 +96,14 @@ export function applicableTargets(types = []) {
96
96
  publish: PUBLISH_TARGETS.filter((t) => types.some((ty) => (TYPE_PUBLISH_TARGETS[ty] ?? PUBLISH_TARGETS).includes(t))),
97
97
  };
98
98
  }
99
- // changelog 생성기 provider (#455, #566에서 재정비).
100
- // 기본값은 commit — 외부 의존이 없어 어떤 환경에서도 결과가 나온다. AI를 쓰려면
101
- // 서비스별 키(GEMINI_API_KEY 등)를 등록하면 사다리가 자동으로 집어 쓴다(마법사는 묻지 않는다).
102
- // MODEL_API_KEY 는 구 이름이라 하위호환으로만 읽는다.
103
- // github-ai는 GitHub Models 종료(2026-07-30)로 제외됐다.
99
+ // changelog generator provider (#455, reworked in #566).
100
+ // Default is commit — no external dependency, so it works in any environment. To use AI,
101
+ // register a per-service key (GEMINI_API_KEY, etc.) and the ladder picks it up (the wizard does not ask).
102
+ // MODEL_API_KEY is the old name and is read only for backward compatibility.
103
+ // github-ai was dropped because GitHub Models shut down (2026-07-30).
104
104
 
105
- // 더 이상 동작하지 않는 저장값을 살아있는 값으로 옮긴다 (#566).
106
- // 기존 저장소가 업데이트만 돌려도 죽은 설정에서 벗어나게 하는 유일한 경로다.
105
+ // Move saved values that no longer work to working ones (#566).
106
+ // The only way an existing repo escapes a dead setting just by running an update.
107
107
  const RETIRED_PROVIDERS = { "github-ai": "commit" };
108
108
  export function migrateProvider(saved) {
109
109
  if (saved == null) return null;
@@ -112,18 +112,18 @@ export function migrateProvider(saved) {
112
112
 
113
113
  const isCancel = (v) => typeof v === "symbol";
114
114
 
115
- // Secret 백업 등 폴더 기반 opt-in 1종 질문.
116
- // 반환: true/false/null(폴더 없음·파일 0개로 질문 자체 생략 → 현재값 유지).
115
+ // One folder-based opt-in question, such as secret backup.
116
+ // Returns true/false/null (no folder or 0 files skips the question → keep the current value).
117
117
  async function askOptionalWorkflow({ dir, icon, short, desc, current, force, tty, io, forceAsk, say }) {
118
- // 폴더가 없거나 yaml이 0개면 조용히 건너뜀 — 질문 자체가 성립 안 함
118
+ // Skip quietly when the folder is missing or has 0 yaml files — the question does not apply
119
119
  if (!existsSync(dir)) return current;
120
120
  const files = listYamlFiles(dir);
121
121
  if (files.length === 0) return current;
122
122
 
123
- // 이미 값이 설정돼 있고 force-ask 아니면 유지 (CLI/version.yml 우선)
123
+ // Keep an already-set value unless force-ask (CLI/version.yml first)
124
124
  if (!forceAsk && (current === true || current === false)) return current;
125
125
 
126
- // 비대화형(--force 또는 TTY 없음)이면 기본 제외
126
+ // Non-interactive (--force or no TTY) excludes by default
127
127
  if (force || !tty) return false;
128
128
 
129
129
  say("");
@@ -142,26 +142,26 @@ async function askOptionalWorkflow({ dir, icon, short, desc, current, force, tty
142
142
  return include;
143
143
  }
144
144
 
145
- // 옵션 질문의 축 키 (#483 수정 스코프 단위) — 수정 메뉴가 이 단위로 한 축만 재질문한다.
146
- // intent(#485)는 프로젝트 성격 — 재질문 시 deploy/publish 축을 재유도한다.
145
+ // Axis keys of the option questions (#483 edit scope unit) — the edit menu re-asks one axis at a time.
146
+ // intent (#485) is the project nature — re-asking it re-derives the deploy/publish axes.
147
147
  export const OPTION_AXES = ["intent", "deploy", "publish", "code-review", "changelog", "release-branch", "secret"];
148
148
 
149
- // intent → 어떤 배포 축을 물을지 (#485). manual은 둘 다(기존 순차 질문), 나머지는 유도.
149
+ // intent → which deploy axes to ask (#485). manual asks both (old sequential questions); the rest are derived.
150
150
  const INTENT_ASKS_DEPLOY = { app: true, both: true, manual: true, library: false, none: false };
151
151
  const INTENT_ASKS_PUBLISH = { library: true, both: true, manual: true, app: false, none: false };
152
152
 
153
- // 배포/publish 축 + Secret 백업을 순서대로 질문.
154
- // tempDir: 템플릿 다운로드 루트 — project-types는 {tempDir}/.github/workflows/project-types
155
- // current: { deploy: string|null, publish: string[]|null, secretBackup: bool|null } — CLI 명시값
156
- // scope: null이면 전 축(초기 통합·전체 재질문). Set/배열이면 그 축만 forceAsk 대상 (#483 수정 메뉴 격리).
157
- // 스코프 밖 축은 forceAsk여도 current/저장값을 그대로 유지하고 다시 묻지 않는다.
158
- // 반환: { deploy, publish, secretBackup, codeReviewCoderabbit, aiPrSummary, changelogProvider, changelogBaseUrl, deployBranch }
153
+ // Ask the deploy/publish axes + secret backup in order.
154
+ // tempDir: template download root — project-types is at {tempDir}/.github/workflows/project-types
155
+ // current: { deploy: string|null, publish: string[]|null, secretBackup: bool|null } — explicit CLI values
156
+ // scope: null means all axes (initial integration, re-ask all). A Set/array limits forceAsk to those axes (#483 edit menu isolation).
157
+ // Axes outside the scope keep current/saved values even with forceAsk and are not asked again.
158
+ // Returns { deploy, publish, secretBackup, codeReviewCoderabbit, aiPrSummary, changelogProvider, changelogBaseUrl, deployBranch }
159
159
  export async function askAllOptionalWorkflows({
160
160
  tempDir, types = [], current = {}, targetRoot = ".",
161
161
  force = false, tty = true, io = {}, forceAsk = false, defaultBranch = "", scope = null,
162
162
  }) {
163
163
  const say = io.log || ((m) => process.stderr.write(`${m}\n`));
164
- // 축별 재질문 여부: 전역 forceAsk이고, scope가 없거나 그 축을 포함할 때만 강제 질문.
164
+ // Per-axis re-ask: forced only with global forceAsk and when scope is absent or includes that axis.
165
165
  const scopeSet = scope == null ? null : new Set(scope);
166
166
  const ask = (axis) => forceAsk && (scopeSet === null || scopeSet.has(axis));
167
167
  let deploy = current.deploy ?? null;
@@ -171,20 +171,20 @@ export async function askAllOptionalWorkflows({
171
171
  let aiPrSummary = current.aiPrSummary ?? null;
172
172
  let changelogProvider = current.changelogProvider ?? null;
173
173
  let changelogBaseUrl = current.changelogBaseUrl ?? null;
174
- let deployBranch = current.deployBranch ?? null; // #456 릴리스 PR head 브랜치
175
- let deployBranchReady = null; // #490 — 이번 실행에서 브랜치 존재/생성이 확인됐는지 (null=확인 안 함)
176
- let deployBranchCreated = null; // #493 — 이번 실행에서 마법사가 직접 생성했는지 (가이드 기록용)
177
- let intent = current.intent ?? null; // #485 프로젝트 성격 (app/library/both/none/manual)
174
+ let deployBranch = current.deployBranch ?? null; // #456 release PR head branch
175
+ let deployBranchReady = null; // #490 — whether the branch was confirmed/created in this run (null = not checked)
176
+ let deployBranchCreated = null; // #493 — whether the wizard created it in this run (for the guide record)
177
+ let intent = current.intent ?? null; // #485 project nature (app/library/both/none/manual)
178
178
 
179
- // 두 축이 모두 빈 타입 조합(#498 — basic 단독, flutter 등 모바일 앱 단독)은 서버 배포도
180
- // 라이브러리 publish도 개념상 성립하지 않는다. 질문을 전부 건너뛰고 none·[]로 조용히 확정한다
181
- // (모바일 스토어 배포는 타입 워크플로우가 항상 포함되므로 안내조차 불필요 — 타입 변경 시 재질문됨).
182
- // 구 isBasicOnly 특례를 일반화한 판정이다.
179
+ // Type combinations with both axes empty (#498 — basic alone, or a mobile app like flutter alone) have neither server deploy
180
+ // nor library publish. Skip every question and settle quietly on none·[]
181
+ // (mobile store deploy is always included by the type workflows, so no notice is needed — re-asked when the type changes).
182
+ // A generalization of the old isBasicOnly special case.
183
183
  const applicable = applicableTargets(types);
184
184
  const noAxes = types.length > 0 && applicable.deploy.length === 0 && applicable.publish.length === 0;
185
185
 
186
- // ① --force-ask가 아니면 version.yml 저장값을 먼저 읽어 재질문을 건너뛴다.
187
- // CLI 명시값(current)이 이미 있으면 그쪽이 우선 — 저장값은 빈 자리만 채운다.
186
+ // ① Unless --force-ask, read saved version.yml values first to skip re-asking.
187
+ // Explicit CLI values (current) win — saved values only fill the gaps.
188
188
  if (!forceAsk) {
189
189
  const vy = join(targetRoot, PATHS.versionFile);
190
190
  if (existsSync(vy)) {
@@ -201,43 +201,43 @@ export async function askAllOptionalWorkflows({
201
201
  secretBackup = saved.secretBackup;
202
202
  say(msg("options.saved.secret", { value: secretBackup }));
203
203
  }
204
- // #455 changelog/code_review 저장값 재사용
204
+ // #455 reuse saved changelog/code_review values
205
205
  if (codeReviewCoderabbit === null && saved.codeReviewCoderabbit !== null) codeReviewCoderabbit = saved.codeReviewCoderabbit;
206
206
  if (aiPrSummary === null && saved.aiPrSummary != null) aiPrSummary = saved.aiPrSummary;
207
207
  if (changelogProvider === null && saved.changelogProvider !== null) changelogProvider = saved.changelogProvider;
208
208
  if (changelogBaseUrl === null && saved.changelogBaseUrl !== null) changelogBaseUrl = saved.changelogBaseUrl;
209
- // #456 개발 브랜치 저장값 재사용
209
+ // #456 reuse the saved development branch
210
210
  if (deployBranch === null && saved.deployBranch != null) deployBranch = saved.deployBranch;
211
- // #485 intent 저장값 재사용 — 없으면 저장된 deploy/publish에서 역추론(구 version.yml 하위호환)
211
+ // #485 reuse the saved intent — if missing, infer it from saved deploy/publish (compat with old version.yml)
212
212
  if (intent === null) intent = saved.intent ?? inferIntent(saved.deploy, saved.publish);
213
213
  }
214
214
  }
215
215
 
216
- // 적용 불가 타겟 조용한 정리 (#498) — 구버전에서 저장된 무의미 값(예: flutter 단독 + docker-ssh)은
217
- // 어차피 복사 결과가 동일하므로 경고 없이 none/교집합으로 정리한다 (SSOT — 무의미 값 잔존 금지).
216
+ // Quietly clean up non-applicable targets (#498) — meaningless values saved by old versions (e.g. flutter alone + docker-ssh)
217
+ // produce the same copy result anyway, so they are reduced to none/the intersection without warning (SSOT — no meaningless leftovers).
218
218
  if (deploy !== null && deploy !== "none" && !applicable.deploy.includes(deploy)) deploy = "none";
219
219
  if (Array.isArray(publish)) publish = publish.filter((t) => applicable.publish.includes(t));
220
220
 
221
- // ── ② intent(프로젝트 성격) 우선 분기 → 배포 축 유도 (#485) ──
222
- // 두 축 모두 빈 타입 조합이면 intent 개념 자체가 없어 질문 스킵, none/[]로 확정 (#498).
221
+ // ── ② intent (project nature) first → derive the deploy axes (#485) ──
222
+ // For type combinations with both axes empty, intent does not apply: skip the question and settle on none/[] (#498).
223
223
  if (noAxes) {
224
224
  if (deploy === null) deploy = "none";
225
225
  if (publish === null) publish = [];
226
226
  intent = "none";
227
227
  } else {
228
- // 수정 메뉴에서 deploy/publish 축만 콕 집어 고칠 때(scope에 그 축이 있고 intent는 없음)는
229
- // intent 질문·게이팅을 건너뛰고 그 축만 바로 편집한다 (#483 격리 존중). intent는 값 유지·역추론.
228
+ // When the edit menu targets only the deploy/publish axis (that axis in scope, no intent),
229
+ // skip the intent question and gating and edit that axis directly (#483 isolation). intent keeps its value or is inferred.
230
230
  const scopedAxisOnly = scopeSet !== null && !scopeSet.has("intent");
231
231
  if (scopedAxisOnly) {
232
232
  if (intent === null) intent = inferIntent(deploy, publish) ?? "manual";
233
233
  } else {
234
- // intent 질문: 미확정이거나(초기 통합) intent 축을 강제 재질문(수정 메뉴 "프로젝트 성격")일 때.
234
+ // intent question: when unsettled (initial integration) or the intent axis is force re-asked (edit menu "project nature").
235
235
  const askIntent = ask("intent") || intent === null;
236
236
  if (askIntent) {
237
237
  if (force || !tty || typeof io.select !== "function") {
238
- // 비대화형: CLI intent 미지정이면 deploy/publish에서 역추론, 그래도 없으면 manual(기존 동작)
239
- // 축이 아직 안 정해졌으면 비대화형(resolve-options.js)과 같은 기본 축으로 추론한다 (#851).
240
- // null 로 추론하면 "manual" 이 기록되어 같은 레포에서 두 경로의 결과가 갈린다.
238
+ // Non-interactive: if the CLI gave no intent, infer from deploy/publish; failing that, manual (old behavior)
239
+ // If the axes are not set yet, infer from the same default axes as non-interactive (resolve-options.js) (#851).
240
+ // Inferring from null would record "manual", splitting the results of the two paths for the same repo.
241
241
  const defaultDeploy = applicable.deploy.includes("docker-ssh") ? "docker-ssh" : "none";
242
242
  intent = intent ?? inferIntent(deploy ?? defaultDeploy, publish ?? []) ?? "manual";
243
243
  } else {
@@ -256,30 +256,30 @@ export async function askAllOptionalWorkflows({
256
256
  intent = (!isCancel(ans) && INTENT_ASKS_DEPLOY[ans] !== undefined) ? ans : (intent ?? "manual");
257
257
  say(msg("options.intent.chosen", { value: intent }));
258
258
  }
259
- // intent 확정 후 유도: 안 묻는 축은 값 확정, 묻는 축은 재질문 대상으로 되돌린다.
259
+ // After intent is settled: axes not asked get their values settled; asked axes go back to be re-asked.
260
260
  if (!INTENT_ASKS_DEPLOY[intent]) deploy = "none";
261
261
  if (!INTENT_ASKS_PUBLISH[intent]) publish = [];
262
262
  if (INTENT_ASKS_DEPLOY[intent] && ask("intent")) deploy = null;
263
263
  if (INTENT_ASKS_PUBLISH[intent] && ask("intent")) publish = null;
264
264
  }
265
265
  }
266
- // intent가 정해진 뒤, 유도 규칙에 따라 각 축을 물을지 결정 (#485).
267
- // scopedAxisOnly(수정 메뉴 단일 축)면 intent 게이트를 무시하고 그 축을 편집하게 한다.
266
+ // Once intent is set, decide per axis whether to ask, by the derivation rules (#485).
267
+ // With scopedAxisOnly (single axis from the edit menu), ignore the intent gate and edit that axis.
268
268
  const deployGate = scopedAxisOnly ? true : INTENT_ASKS_DEPLOY[intent];
269
269
  const publishGate = scopedAxisOnly ? true : INTENT_ASKS_PUBLISH[intent];
270
270
  const willAskDeploy = deployGate && (ask("deploy") || deploy === null);
271
271
  const willAskPublish = publishGate && (ask("publish") || publish === null);
272
- // 유도로 안 묻는 축은 기본값 확정.
272
+ // Axes not asked by derivation get their defaults.
273
273
  if (!deployGate && deploy === null) deploy = "none";
274
274
  if (!publishGate && publish === null) publish = [];
275
- // manual(직접 고르기)에서 둘 다 물을 땐 두 축이 별개임을 한 번 안내 (#480 계승).
275
+ // When manual (pick yourself) asks both, explain once that the two axes are separate (carried over from #480).
276
276
  if (intent === "manual" && willAskDeploy && willAskPublish && tty && typeof io.select === "function") {
277
277
  say("");
278
278
  say(msg("options.axes.intro"));
279
279
  say(msg("options.axes.one"));
280
280
  say(msg("options.axes.two"));
281
281
  }
282
- // 비대화형/폴백 기본값 (#498) — docker-ssh가 적용 가능할 때만 기본, 아니면 none.
282
+ // Non-interactive/fallback default (#498) — docker-ssh only when applicable, else none.
283
283
  const deployDefault = applicable.deploy.includes("docker-ssh") ? "docker-ssh" : "none";
284
284
  if (willAskDeploy) {
285
285
  if (force || !tty || typeof io.select !== "function") {
@@ -288,7 +288,7 @@ export async function askAllOptionalWorkflows({
288
288
  say("");
289
289
  say(msg("options.deploy.intro"));
290
290
  say(msg("options.deploy.hint"));
291
- // 선택지는 적용 가능 타겟으로 필터링 (#498) — 'none'은 항상 노출.
291
+ // Filter choices to applicable targets (#498) — 'none' is always shown.
292
292
  const deployLabels = [
293
293
  { value: "docker-ssh", label: msg("options.deploy.dockerSsh") },
294
294
  { value: "vercel", label: "Vercel" },
@@ -305,7 +305,7 @@ export async function askAllOptionalWorkflows({
305
305
  }
306
306
  }
307
307
 
308
- // ── ③ publish 타겟 (다중 선택) ──
308
+ // ── ③ publish targets (multi-select) ──
309
309
  if (willAskPublish) {
310
310
  if (force || !tty || typeof io.multiselect !== "function") {
311
311
  publish = publish ?? [];
@@ -313,7 +313,7 @@ export async function askAllOptionalWorkflows({
313
313
  say("");
314
314
  say(msg("options.publish.intro"));
315
315
  say(msg("options.publish.hint"));
316
- // 선택지는 적용 가능 타겟으로 필터링 (#498)
316
+ // Filter choices to applicable targets (#498)
317
317
  const publishLabels = [
318
318
  { value: "nexus", label: msg("options.publish.nexus") },
319
319
  { value: "npm", label: msg("options.publish.npm") },
@@ -333,13 +333,13 @@ export async function askAllOptionalWorkflows({
333
333
  }
334
334
  }
335
335
 
336
- // ── pr_comment: PR에 달 리뷰·요약 (#566에서 통합) ──
337
- // CodeRabbit 과 AI 변경 요약은 같은 자리(PR 댓글)를 놓고 경쟁하므로 한 번에 고르게 한다
338
- // (따로 물으면 둘 다 안 다는 저장소가 생긴다).
336
+ // ── pr_comment: review and summary posted on PRs (merged in #566) ──
337
+ // CodeRabbit and the AI change summary compete for the same spot (PR comments), so they are chosen together
338
+ // (asking separately leaves repos with neither).
339
339
  if (ask("code-review") || codeReviewCoderabbit === null || aiPrSummary === null) {
340
340
  if (force || !tty || typeof io.select !== "function") {
341
- // 비대화형 기본값: CodeRabbit은 별도 앱 설치가 있어야 실제로 동작하므로
342
- // 자동화 환경에서 켜봐야 의미가 없다. 설정 없이 바로 도는 요약만 켠다.
341
+ // Non-interactive default: CodeRabbit works only with a separate app install, so
342
+ // turning it on in automation is pointless. Only the summary, which works with no setup, is on.
343
343
  codeReviewCoderabbit = codeReviewCoderabbit ?? DEFAULT_CODE_REVIEW_CODERABBIT;
344
344
  aiPrSummary = aiPrSummary ?? true;
345
345
  } else {
@@ -357,13 +357,13 @@ export async function askAllOptionalWorkflows({
357
357
  { value: "none", label: msg("options.pr.none") },
358
358
  ],
359
359
  });
360
- // 취소·미응답은 추천값으로 — 다른 축과 같은 방어 패턴이다.
360
+ // Cancel or no answer → the recommended value — the same defensive pattern as the other axes.
361
361
  const PR_COMMENT_CHOICES = ["summary", "coderabbit", "both", "none"];
362
362
  const pick = (!isCancel(ans) && PR_COMMENT_CHOICES.includes(ans)) ? ans : "summary";
363
363
  codeReviewCoderabbit = pick === "coderabbit" || pick === "both";
364
364
  aiPrSummary = pick === "summary" || pick === "both";
365
365
  say(msg("options.pr.chosen", { value: msg(`options.pr.label.${pick}`) }));
366
- // #481 — "사용"만으로는 안 붙는다. 앱 설치 + 레포 접근 권한이 있어야 실제로 리뷰가 달린다.
366
+ // #481 — "use" alone is not enough. Reviews appear only with the app installed and repo access granted.
367
367
  if (codeReviewCoderabbit) {
368
368
  say(msg("options.pr.crWarn"));
369
369
  say(msg("options.pr.crStep1"));
@@ -373,14 +373,14 @@ export async function askAllOptionalWorkflows({
373
373
  }
374
374
  }
375
375
 
376
- // ── changelog: 생성기를 묻지 않는다 (#566) ──
377
- // 사용자의 목적은 "릴리스 노트가 잘 나오는 것"이지 provider 선택이 아니다. 무엇을 고를지
378
- // 알 수 없는 질문이었고 기본값(github-ai)마저 죽어 있었다. 이제 워크플로우가 스스로
379
- // 최선을 찾는다 — PR 본문 존중 → Copilot → 외부 AI(키 있으면) → 커밋 분석.
380
- // 저장값은 그대로 두되 죽은 값만 살아있는 것으로 옮긴다.
376
+ // ── changelog: the generator is not asked (#566) ──
377
+ // The user wants "good release notes", not a provider choice. Nobody knew what to pick,
378
+ // and even the default (github-ai) was dead. Now the workflow finds the best option
379
+ // itself — respect the PR body → Copilot → external AI (if a key exists) → commit analysis.
380
+ // Saved values stay; only dead values are moved to working ones.
381
381
  changelogProvider = migrateProvider(changelogProvider) ?? "commit";
382
382
 
383
- // ollama 선택 시에만 base_url 질문 (나머지 provider는 preset base_url 자동 — #455)
383
+ // Ask base_url only when ollama is chosen (other providers get a preset base_url — #455)
384
384
  if (changelogProvider === "ollama" && (ask("changelog") || changelogBaseUrl === null || changelogBaseUrl === "")) {
385
385
  if (force || !tty || typeof io.text !== "function") {
386
386
  changelogBaseUrl = changelogBaseUrl ?? "";
@@ -393,15 +393,15 @@ export async function askAllOptionalWorkflows({
393
393
  changelogBaseUrl = "";
394
394
  }
395
395
 
396
- // ── 릴리스 소스(개발) 브랜치 (#456, version.yml development_branch — #915) ──
397
- // 이 값은 릴리스 PR(개발→기본)의 head, 즉 개발한 걸 모아 기본 브랜치로 올리는 브랜치다.
398
- // "배포 브랜치"가 아니다 — 배포가 도는 곳은 기본 브랜치(default) 쪽 개념. #482 참조.
396
+ // ── Release source (development) branch (#456, version.yml development_branch — #915) ──
397
+ // This is the head of the release PR (development → default), the branch that collects work and goes up to the default branch.
398
+ // Not a "deploy branch" — deploys run on the default branch side. See #482.
399
399
  if (ask("release-branch") || deployBranch === null) {
400
400
  if (force || !tty || typeof io.text !== "function") {
401
- // 묻지 못했으면 값을 지어내지 않는다 (#851) — 비어 있으면 기록하지 않고 스킬이 develop 으로 폴백한다.
401
+ // Do not make up a value when we could not ask (#851) — if empty, nothing is recorded and skills fall back to develop.
402
402
  deployBranch = deployBranch ?? "";
403
403
  } else {
404
- const base = defaultBranch || "main"; // git으로 감지된 기본 브랜치 (#481 동적 안내)
404
+ const base = defaultBranch || "main"; // Default branch detected via git (#481 dynamic notice)
405
405
  say("");
406
406
  say(msg("options.devBranch.intro"));
407
407
  say(msg("options.devBranch.detected", { base }));
@@ -409,15 +409,15 @@ export async function askAllOptionalWorkflows({
409
409
  const ans = await io.text({ message: msg("options.devBranch.prompt"), initialValue: deployBranch ?? "develop" });
410
410
  deployBranch = (typeof ans === "string" && !isCancel(ans) && ans.trim()) ? ans.trim() : (deployBranch ?? "develop");
411
411
  say(msg("options.devBranch.chosen", { value: deployBranch }));
412
- // 브랜치 존재 확인 + 생성 제안 (#477) — 없으면 릴리스 파이프라인이 조용히 놀게 된다
413
- // #490 — 결과(ready)를 완료 요약에 전달해 이미 생성/확인한 브랜치를 재지시하지 않는다
412
+ // Check the branch exists + offer to create it (#477) — otherwise the release pipeline sits idle silently
413
+ // #490 — pass the result (ready) to the finish summary so an already created/confirmed branch is not re-requested
414
414
  const br = await ensureDeployBranch({ targetRoot, deployBranch, defaultBranch, io, say });
415
415
  deployBranchReady = br.ready;
416
416
  deployBranchCreated = br.created;
417
417
  }
418
418
  }
419
419
 
420
- // ── ④ Secret 백업: 공통 폴더 (배포축 아님 — 기존 폴더 질문 유지) ──
420
+ // ── ④ Secret backup: common folder (not a deploy axis — keeps the existing folder question) ──
421
421
  const real = join(tempDir, PATHS.workflowsDir, PATHS.projectTypesDir);
422
422
  const ptDir = existsSync(real) ? real : join(tempDir, PATHS.projectTypesDir);
423
423
  secretBackup = await askOptionalWorkflow({
@@ -426,21 +426,21 @@ export async function askAllOptionalWorkflows({
426
426
  current: secretBackup, force, tty, io, forceAsk: ask("secret"), say,
427
427
  });
428
428
 
429
- // 최종 폴백도 적용 가능 타겟 기준 (#498) — 모바일/basic 조합에서 docker-ssh가 새어 나가지 않게.
429
+ // The final fallback also uses applicable targets (#498) — so docker-ssh does not leak into mobile/basic combinations.
430
430
  const finalDeploy = deploy ?? (applicable.deploy.includes("docker-ssh") ? "docker-ssh" : "none");
431
431
  const finalPublish = publish ?? [];
432
432
  return {
433
433
  deploy: finalDeploy, publish: finalPublish, secretBackup: secretBackup === true,
434
434
  codeReviewCoderabbit: codeReviewCoderabbit === true,
435
- // #566 — AI 변경 요약 워크플로우 포함 여부. 기본 true(추가 설정 없이 바로 동작).
435
+ // #566 — whether the AI change summary workflow is included. Default true (works with no extra setup).
436
436
  aiPrSummary: aiPrSummary !== false,
437
437
  changelogProvider: changelogProvider ?? "commit",
438
438
  changelogBaseUrl: changelogBaseUrl ?? "",
439
439
  deployBranch: deployBranch ?? "",
440
- deployBranchReady, // #490 — true=존재/생성 확인됨, false=거절/실패, null=확인 안 함
441
- deployBranchCreated, // #493 — true=이번 실행에서 마법사가 생성, null=확인 안 함
440
+ deployBranchReady, // #490 — true = confirmed/created, false = declined/failed, null = not checked
441
+ deployBranchCreated, // #493 — true = created by the wizard in this run, null = not checked
442
442
 
443
- // #485 intent — 확정값 우선, 없으면 최종 deploy/publish에서 역추론(basic·비대화형 경로 보정)
443
+ // #485 intent — settled value first, else inferred from the final deploy/publish (fixes basic and non-interactive paths)
444
444
  intent: intent ?? inferIntent(finalDeploy, finalPublish) ?? "manual",
445
445
  };
446
446
  }