projectops 4.104.6 → 4.104.8

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 +23 -22
  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 +117 -116
  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/README.md CHANGED
@@ -163,7 +163,7 @@ Supported types: `spring`, `flutter`, `react` (incl. Next.js), `node`, `python`,
163
163
  Everything is on the **[docs site](https://cassiiopeia.github.io/projectops/)**, in English and [Korean](https://cassiiopeia.github.io/projectops/ko/): [Getting started](https://cassiiopeia.github.io/projectops/getting-started) · [CLI](https://cassiiopeia.github.io/projectops/cli) · [Agent Skills](https://cassiiopeia.github.io/projectops/skills) · [Versioning](https://cassiiopeia.github.io/projectops/version-control) · [Changelog](https://cassiiopeia.github.io/projectops/changelog-automation) · [SSH + Docker deploy](https://cassiiopeia.github.io/projectops/ssh-docker-deployment-guide) · [Flutter CI/CD](https://cassiiopeia.github.io/projectops/flutter-cicd-overview) · [Troubleshooting](https://cassiiopeia.github.io/projectops/troubleshooting)
164
164
 
165
165
  <!-- AUTO-VERSION-SECTION: DO NOT EDIT MANUALLY -->
166
- ## Latest version : v4.104.6 (2026-11-14)
166
+ ## Latest version : v4.104.8 (2026-11-14)
167
167
 
168
168
  [View full version history](CHANGELOG.md)
169
169
 
package/bin/projectops.js CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
- // projectops CLI 엔트리 — argv를 src/index.js의 run()에 넘긴다.
2
+ // projectops CLI entry — passes argv to run() in src/index.js.
3
3
  import { fileURLToPath } from "node:url";
4
4
  import { dirname, join } from "node:path";
5
5
  import { pathToFileURL } from "node:url";
6
6
 
7
7
  const [nodeMajor, nodeMinor] = process.versions.node.split(".").map(Number);
8
8
  if (nodeMajor < 20 || (nodeMajor === 20 && nodeMinor < 12)) {
9
- console.error(`Node.js 20.12 이상이 필요합니다 (현재: ${process.versions.node})`);
9
+ console.error(`Node.js 20.12 or later is required (current: ${process.versions.node})`);
10
10
  process.exit(1);
11
11
  }
12
12
 
@@ -15,6 +15,6 @@ const indexPath = join(here, "..", "src", "index.js");
15
15
  const { run } = await import(pathToFileURL(indexPath).href);
16
16
 
17
17
  const code = await run(process.argv.slice(2), { cwd: process.cwd() });
18
- // stdout 이 파이프면 쓰기가 비동기라, 바로 exit 하면 큰 출력(--mode options --json)이 8KB 근처에서 잘린다.
19
- // 빈 write 의 콜백은 앞선 쓰기가 모두 넘겨진 뒤에 불리므로, 거기서 종료한다.
18
+ // When stdout is a pipe, writes are async, so exiting right away cuts large output (--mode options --json) near 8KB.
19
+ // The callback of an empty write fires after all earlier writes are flushed, so exit there.
20
20
  process.stdout.write("", () => process.exit(code));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projectops",
3
- "version": "4.104.6",
3
+ "version": "4.104.8",
4
4
  "description": "One npx install for GitHub release automation: semantic versioning, changelogs, release PRs, CI/CD workflows and AI agent skills",
5
5
  "keywords": [
6
6
  "github-actions",
package/src/cli/args.js CHANGED
@@ -1,4 +1,4 @@
1
- // CLI 인자 파싱.
1
+ // CLI argument parsing.
2
2
  import { existsSync, statSync, realpathSync } from "node:fs";
3
3
  import { join, relative, isAbsolute } from "node:path";
4
4
  import { VALID_TYPES } from "../context.js";
@@ -7,44 +7,44 @@ import { REPO_LANGUAGES } from "../core/repo-language.js";
7
7
 
8
8
  import { DEPLOY_TARGETS, PUBLISH_TARGETS, INTENT_VALUES, LABEL_STYLES } from "../core/constants.js";
9
9
 
10
- // 값 목록은 core/constants.js 가 정본이다. 기존 import 경로를 깨지 않도록 여기서 다시 내보낸다.
10
+ // core/constants.js owns the value lists. Re-exported here so existing import paths keep working.
11
11
  export { DEPLOY_TARGETS, PUBLISH_TARGETS, INTENT_VALUES };
12
12
  export const LABEL_STYLE_VALUES = LABEL_STYLES;
13
- // 지원 언어의 단일 목록은 repo-language.js 다 (#787). 여기서 따로 들고 있으면 두 벌이 어긋난다.
13
+ // repo-language.js holds the single list of supported languages (#787). A separate copy here would drift.
14
14
  export const LANGUAGE_VALUES = REPO_LANGUAGES;
15
15
  const SEMVER_RE = /^\d+\.\d+\.\d+$/;
16
- // 유니코드 글자·숫자 허용 (#719) — 공백·셸 메타문자는 문자 클래스에 없어 그대로 거부된다.
16
+ // Unicode letters and digits allowed (#719) — spaces and shell metacharacters are not in the class, so still rejected.
17
17
  const BRANCH_RE = /^[\p{L}\p{N}][\p{L}\p{N}._/-]*$/u;
18
- // 허용 실행 모드 (#665) — 오타가 조용히 "복사 0건 성공"으로 끝나지 않게 한다.
18
+ // Allowed run modes (#665) — keeps a typo from ending silently as "0 copies, success".
19
19
  export const MODE_VALUES = ["full", "version", "workflows", "issues", "skills", "doctor", "options", "interactive"];
20
20
 
21
- // argv(process.argv.slice(2)) → 파싱 결과. 오류 시 throw(호출부에서 exit 1).
21
+ // argv (process.argv.slice(2)) → parse result. Throws on error (caller exits 1).
22
22
  export function parseArgs(argv) {
23
23
  const result = {
24
24
  mode: "interactive",
25
- version: "", // 통합 대상 프로젝트의 초기 버전 (--project-version)
25
+ version: "", // Initial version of the target project (--project-version)
26
26
  types: [],
27
27
  primaryType: "",
28
- deployTarget: null, // 배포 축 (#439): docker-ssh|vercel|none, null=미설정
29
- publishTargets: null, // publish 축 (#439): 타겟 배열, null=미설정
30
- deployBranch: "", // 릴리스 PR head 브랜치 (#456): --deploy-branch, 빈 값=미지정
31
- deployTriggerBranch: "", // 배포 워크플로가 트리거되는 브랜치 (#1114): --deploy-trigger-branch, 빈 값=기본 브랜치
32
- language: null, // 레포 문구 언어 (#769): --language en|ko (화면 언어 --lang 과 다르다)
33
- labelStyle: null, // 상태 라벨 표기 (#776): --label-style en|ko
34
- intent: null, // 프로젝트 성격 (#485): --intent app|library|both|none|manual, null=미설정(역추론)
28
+ deployTarget: null, // Deploy axis (#439): docker-ssh|vercel|none, null = unset
29
+ publishTargets: null, // Publish axis (#439): target array, null = unset
30
+ deployBranch: "", // Release PR head branch (#456): --deploy-branch, empty = not given
31
+ deployTriggerBranch: "", // Branch that triggers deploy workflows (#1114): --deploy-trigger-branch, empty = default branch
32
+ language: null, // Repo text language (#769): --language en|ko (differs from the screen language --lang)
33
+ labelStyle: null, // Status label style (#776): --label-style en|ko
34
+ intent: null, // Project nature (#485): --intent app|library|both|none|manual, null = unset (inferred)
35
35
  includeSecretBackup: null,
36
- aiPrSummary: null, // #566 — AI 변경 요약 워크플로우 포함 여부
37
- codeReviewCoderabbit: null, // --coderabbit: CodeRabbit 코드 리뷰 설정(.coderabbit.yaml) 설치 여부 (null=미지정 → 저장값, 없으면 꺼짐)
38
- projectsSync: null, // #716 — Projects 보드 동기화 워크플로우 포함 여부 (null=미지정)
39
- ciMinutesSaver: null, // #1114 — CI 사용 시간 절약 치환 (null=미지정 → 저장값, 없으면 꺼짐)
40
- json: false, // --json: 기계가 읽는 출력 (--mode options)
41
- removeLegacy: false, // #809 — 구세대 배포 워크플로우(confirm 티어)도 .bak 으로 치운다
42
- createDevelopmentBranch: false, // #715 — 비대화형에서 개발 브랜치 생성·push (원격에 쓰므로 명시할 때만)
43
- pathsCsv: "", // "flutter=app,react=client" 원문 (정규화는 resolve 단계)
36
+ aiPrSummary: null, // #566 — whether to include the AI change summary workflow
37
+ codeReviewCoderabbit: null, // --coderabbit: whether to install the CodeRabbit code review config (.coderabbit.yaml) (null = not given → saved value, else off)
38
+ projectsSync: null, // #716 — whether to include the Projects board sync workflow (null = not given)
39
+ ciMinutesSaver: null, // #1114 — CI minutes saver substitution (null = not given → saved value, else off)
40
+ json: false, // --json: machine-readable output (--mode options)
41
+ removeLegacy: false, // #809 — also move old-generation deploy workflows (confirm tier) aside as .bak
42
+ createDevelopmentBranch: false, // #715 — create and push the development branch non-interactively (writes to the remote, so only when explicit)
43
+ pathsCsv: "", // Raw "flutter=app,react=client" (normalized in the resolve step)
44
44
  force: false,
45
45
  lang: null, // --lang en|ko (null = decided by src/i18n resolveLang)
46
46
  help: false,
47
- showVersion: false, // -v/--version → projectops 패키지 버전 출력 (npm 관례)
47
+ showVersion: false, // -v/--version → print the projectops package version (npm convention)
48
48
  };
49
49
  const args = [...argv];
50
50
  while (args.length > 0) {
@@ -60,12 +60,12 @@ export function parseArgs(argv) {
60
60
  break;
61
61
  }
62
62
  case "-v": case "--version":
63
- // npm 관례: -v/--version 은 패키지 버전 출력. (초기 버전 지정은 --project-version)
63
+ // npm convention: -v/--version prints the package version. (The initial version is set with --project-version)
64
64
  result.showVersion = true; break;
65
65
  case "--project-version":
66
66
  {
67
- // version.yml·셸 스크립트가 그대로 읽는 값이라 x.y.z 외에는 받지 않는다 (#676)
68
- // 'v1.0.0'은 사용자가 흔히 쓰는 표기라 거부하지 않고 접두사만 떼어 받는다
67
+ // version.yml and shell scripts read this value as is, so only x.y.z is accepted (#676)
68
+ // 'v1.0.0' is a common user notation, so it is accepted with the prefix stripped rather than rejected
69
69
  const v = (args.shift() ?? "").trim().replace(/^[vV](?=\d)/, "");
70
70
  if (!SEMVER_RE.test(v)) {
71
71
  throw new CliError(t("args.projectVersion", { v }));
@@ -124,9 +124,9 @@ export function parseArgs(argv) {
124
124
  break;
125
125
  }
126
126
  case "--deploy-branch": {
127
- // 릴리스 PR head 브랜치 (#456). default_branch와 별개.
127
+ // Release PR head branch (#456). Separate from default_branch.
128
128
  const v = (args.shift() ?? "").trim();
129
- // 워크플로우 yaml·셸에 그대로 삽입되므로 안전한 브랜치명만 허용 (#676)
129
+ // Inserted as is into workflow yaml and shell, so only safe branch names are allowed (#676)
130
130
  if (v && (!BRANCH_RE.test(v) || v.includes("..") || v.endsWith("/") || v.endsWith(".lock"))) {
131
131
  throw new CliError(t("args.deployBranch", { v }));
132
132
  }
@@ -134,7 +134,7 @@ export function parseArgs(argv) {
134
134
  break;
135
135
  }
136
136
  case "--deploy-trigger-branch": {
137
- // 푸시되면 배포가 도는 브랜치 (#1114). 기본 브랜치와 나눌 때만 쓴다. 워크플로 yaml에 그대로 들어가므로 --deploy-branch 와 같은 검사.
137
+ // Branch whose push runs the deploy (#1114). Used only when split from the default branch. Goes into workflow yaml as is, so same check as --deploy-branch.
138
138
  const v = (args.shift() ?? "").trim();
139
139
  if (v && (!BRANCH_RE.test(v) || v.includes("..") || v.endsWith("/") || v.endsWith(".lock"))) {
140
140
  throw new CliError(t("args.deployBranch", { v }));
@@ -143,7 +143,7 @@ export function parseArgs(argv) {
143
143
  break;
144
144
  }
145
145
  case "--intent": {
146
- // 프로젝트 성격 (#485). 미지정이면 --deploy/--publish에서 역추론.
146
+ // Project nature (#485). If not given, inferred from --deploy/--publish.
147
147
  const v = (args.shift() ?? "").trim();
148
148
  if (!INTENT_VALUES.includes(v)) {
149
149
  throw new CliError(t("args.intent", { values: INTENT_VALUES.join(" | "), v }));
@@ -152,8 +152,8 @@ export function parseArgs(argv) {
152
152
  break;
153
153
  }
154
154
  case "--language": {
155
- // 레포 문구 언어 (#769). 미지정이면 version.yml 저장값 → (신규 en / 기존 ko).
156
- // 화면 언어(--lang)와 다르다: 이쪽은 사용자 레포에 쓰이는 템플릿의 언어다.
155
+ // Repo text language (#769). If not given, saved version.yml value → (new en / existing ko).
156
+ // Differs from the screen language (--lang): this is the language of templates written into the user repo.
157
157
  const v = (args.shift() ?? "").trim();
158
158
  if (!LANGUAGE_VALUES.includes(v)) {
159
159
  throw new CliError(`--language must be one of ${LANGUAGE_VALUES.join(" | ")}: '${v}'`);
@@ -162,7 +162,7 @@ export function parseArgs(argv) {
162
162
  break;
163
163
  }
164
164
  case "--label-style": {
165
- // 상태 라벨 표기 (#776). 미지정이면 version.yml 저장값 → (신규 en / 기존 ko).
165
+ // Status label style (#776). If not given, saved version.yml value → (new en / existing ko).
166
166
  const v = (args.shift() ?? "").trim();
167
167
  if (!LABEL_STYLE_VALUES.includes(v)) {
168
168
  throw new CliError(`--label-style must be one of ${LABEL_STYLE_VALUES.join(" | ")}: '${v}'`);
@@ -170,7 +170,7 @@ export function parseArgs(argv) {
170
170
  result.labelStyle = v;
171
171
  break;
172
172
  }
173
- // ── deprecated alias (1 minor 유지 — #439) ──
173
+ // ── deprecated alias (kept for 1 minor — #439) ──
174
174
  case "--nexus":
175
175
  process.stderr.write(t("args.nexusDeprecated") + "\n");
176
176
  result.publishTargets = [...new Set([...(result.publishTargets ?? []), "nexus"])];
@@ -181,7 +181,7 @@ export function parseArgs(argv) {
181
181
  break;
182
182
  case "--secret-backup": result.includeSecretBackup = true; break;
183
183
  case "--no-secret-backup": result.includeSecretBackup = false; break;
184
- // #566 — 비대화형에서도 켜고 끌 수 있어야 한다. 없으면 자동화 환경은 선택권이 없다.
184
+ // #566 — must be switchable non-interactively too. Otherwise automation has no choice.
185
185
  case "--coderabbit": result.codeReviewCoderabbit = true; break;
186
186
  case "--no-coderabbit": result.codeReviewCoderabbit = false; break;
187
187
  case "--ai-summary": result.aiPrSummary = true; break;
@@ -211,19 +211,19 @@ export function parseArgs(argv) {
211
211
 
212
212
  export class CliError extends Error {}
213
213
 
214
- // 경로 정규화: 앞뒤 공백·\→/·끝 /·앞 ./ 제거, 빈값→"."
214
+ // Path normalization: trim spaces, \→/, strip trailing / and leading ./, empty→"."
215
215
  export function normalizePath(p) {
216
216
  let s = String(p).trim();
217
217
  s = s.replace(/\\/g, "/");
218
- s = s.replace(/\/+$/, ""); // 끝 /
219
- s = s.replace(/^\.\//, ""); // 앞 ./
218
+ s = s.replace(/\/+$/, ""); // Trailing /
219
+ s = s.replace(/^\.\//, ""); // Leading ./
220
220
  return s === "" ? "." : s;
221
221
  }
222
222
 
223
- // --paths 맵 검증 (#674) — 저장소 밖 경로는 version_manager가 그 파일을 실제로 수정하므로 가장 위험하다.
224
- // · 절대경로·`..` 세그먼트 거부 (저장소 루트 기준 상대경로만)
225
- // · --type 으로 고르지 않은 타입 키 거부
226
- // · 존재하지 않는 폴더 거부 (심볼릭 링크로 밖을 가리키는 경우도 realpath 로 막는다)
223
+ // --paths map validation (#674) — a path outside the repo is the most dangerous, since version_manager actually edits that file.
224
+ // · reject absolute paths and `..` segments (only paths relative to the repo root)
225
+ // · reject type keys not chosen with --type
226
+ // · reject folders that do not exist (realpath also blocks symlinks pointing outside)
227
227
  export function validatePathsMap(map, { root, types }) {
228
228
  for (const [type, p] of map) {
229
229
  if (!types.includes(type)) {
@@ -243,7 +243,7 @@ export function validatePathsMap(map, { root, types }) {
243
243
  }
244
244
  }
245
245
 
246
- // "flutter=app,react=client" → Map<type, normalizedPath>. 타입 검증(무효 → throw).
246
+ // "flutter=app,react=client" → Map<type, normalizedPath>. Validates types (invalid → throw).
247
247
  export function parsePathsCsv(csv) {
248
248
  const map = new Map();
249
249
  if (!csv) return map;
package/src/cli/errors.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import { t } from "../i18n/index.js";
2
2
 
3
- // 예기치 못한 예외를 사용자가 읽을 수 있는 한 줄 오류 + 조치 안내로 바꾼다 (#672).
4
- // 스택 트레이스는 사용자가 고칠 수 있는 정보가 아니므로 DEBUG 환경변수가 있을 때만 노출한다.
3
+ // Turns unexpected exceptions into a readable one-line error + action hint (#672).
4
+ // A stack trace is not something users can fix, so it is shown only when the DEBUG env var is set.
5
5
 
6
- // err → { message, hint }. 분류 근거는 Node 가 던지는 err.code / 메시지 형식이다.
6
+ // err → { message, hint }. Classified by the err.code / message format Node throws.
7
7
  export function describeError(err) {
8
8
  const msg = String(err?.message || err);
9
9
  const code = err?.code;
10
10
 
11
- // PATH 에 git 이 없음 — spawn 계열이 ENOENT 를 던진다
11
+ // git is not on PATH — spawn-family calls throw ENOENT
12
12
  if (code === "ENOENT" && /\bgit\b/.test(`${err?.path ?? ""} ${err?.syscall ?? ""} ${msg}`)) {
13
13
  return { message: t("errors.git.message"), hint: t("errors.git.hint") };
14
14
  }
15
- // 템플릿 내려받기 실패 — execFileSync 가 "Command failed: git clone ..." 를 던진다
15
+ // Template download failed — execFileSync throws "Command failed: git clone ..."
16
16
  if (/Command failed: git clone/.test(msg)) {
17
- // Windows 경로 길이 한계 — 네트워크 탓으로 안내하면 엉뚱한 곳을 보게 된다
17
+ // Windows path length limit — blaming the network would send people to the wrong place
18
18
  if (/Filename too long|cannot stat/i.test(msg)) {
19
19
  return { message: t("errors.clone.pathTooLong.message"), hint: t("errors.clone.pathTooLong.hint") };
20
20
  }
@@ -23,7 +23,7 @@ export function describeError(err) {
23
23
  hint: t("errors.clone.hint"),
24
24
  };
25
25
  }
26
- // 권한/읽기 전용 파일시스템
26
+ // Permission / read-only filesystem
27
27
  if (code === "EACCES" || code === "EPERM" || code === "EROFS") {
28
28
  const where = err?.path ? ` (${err.path})` : "";
29
29
  return {
@@ -37,7 +37,7 @@ export function describeError(err) {
37
37
  return { message: t("errors.unexpected.message", { msg }), hint: t("errors.unexpected.hint") };
38
38
  }
39
39
 
40
- // 오류를 stderr 로 출력한다. 호출부는 비0 종료코드를 돌려주면 된다.
40
+ // Print the error to stderr. The caller just returns a non-zero exit code.
41
41
  export function reportFatal(err, { env = process.env, write = (s) => process.stderr.write(s) } = {}) {
42
42
  const { message, hint } = describeError(err);
43
43
  write(`❌ ${message}\n`);
package/src/cli/help.js CHANGED
@@ -1,9 +1,9 @@
1
1
  // --help text in each supported language. English is the default (see src/i18n).
2
2
  //
3
- // 이 화면은 사람보다 AI agent 가 더 많이 읽는다. 그래서 "무엇을 하는가"만이 아니라
4
- // 언제 질문이 나오는지 · 안 주면 무엇이 되는지 · 레포에서 무엇이 바뀌는지를 적는다.
5
- // 값 목록과 플래그별 상세는 src/core/options-schema.js 가 정본이고 `--mode options --json` 이 그대로 출력한다.
6
- // test/cli-docs-sync.test.js 가 args.js 의 모든 플래그가 영·한 두 본문에 있는지 검사한다 — 새 플래그는 둘 다에 적는다.
3
+ // AI agents read this screen more than people do. So it states not only "what it does" but also
4
+ // when questions appear · what happens if omitted · what changes in the repo.
5
+ // Value lists and per-flag details live in src/core/options-schema.js (source of truth); `--mode options --json` prints them as is.
6
+ // Every flag in args.js must appear in both the English and Korean help texts — add new flags to both.
7
7
  import { getLang } from "../i18n/index.js";
8
8
 
9
9
  const HELP_EN = `projectops — installs and updates GitHub automation (versioning, release notes, CI/CD, issue templates, agent skills)
@@ -1,16 +1,16 @@
1
- // doctor 명령 (#558) — 통합 상태·저장소 설정 진단. 읽기 전용, 파일을 건드리지 않는다.
1
+ // doctor command (#558) — diagnoses integration state and repo settings. Read-only, touches no files.
2
2
  //
3
- // 출력 설계:
4
- // ① 항목 이름에 purpose("무엇을 위한 설정인지")를 병기한다. `actions: write`만 보고는
5
- // 그게 자기 릴리스 흐름의 무엇을 담당하는지 알 수 없다.
6
- // ② 도구가 "고쳐야 한다"고 판정하지 않는다. 발견한 사실만 진술하고 그것이 자신에게
7
- // 문제인지는 사용자가 판단한다 — 쓰지 않는 워크플로우의 Secret은 등록할 이유가 없다.
8
- // ③ 문제 항목만 `현상 → 영향 → 조치` 로 펼치고, 정상 항목은 한 줄로 압축한다.
9
- // ④ GitHub 설정 화면에 실제로 표시되는 문자열("Read and write permissions" 등)은
10
- // 번역하지 않는다. 번역하면 설명은 읽히지만 정작 화면에서 그 항목을 찾지 못한다.
3
+ // Output design:
4
+ // ① Item names carry their purpose ("what the setting is for"). Seeing only `actions: write`
5
+ // does not tell what it handles in your own release flow.
6
+ // ② The tool does not rule "you must fix this". It states only the facts found; whether that is a
7
+ // problem for you is the user's call — there is no reason to register secrets for workflows you do not use.
8
+ // ③ Only problem items expand as `symptom → impact → action`; healthy items collapse to one line.
9
+ // ④ Strings actually shown on GitHub settings screens ("Read and write permissions", etc.)
10
+ // are not translated. Translated, the explanation reads fine but the item cannot be found on screen.
11
11
  //
12
- // 원격 점검은 GITHUB_TOKEN이 있을 때만 한다. 없다고 실패시키지 않는다 — 로컬 점검만으로도
13
- // 대부분의 흔한 사고(치환 실패·Secret 누락)를 잡을 수 있다.
12
+ // Remote checks run only with GITHUB_TOKEN. Missing it is not a failure — local checks alone
13
+ // catch most common accidents (substitution failures, missing secrets).
14
14
  import { join } from "node:path";
15
15
  import { execFileSync } from "node:child_process";
16
16
  import { existsSync, readFileSync, readdirSync } from "node:fs";
@@ -23,18 +23,18 @@ import { detectMigrations } from "../core/migrations/index.js";
23
23
  import { scanPlaceholderTriggers } from "../core/placeholder-triggers.js";
24
24
  import { t } from "../i18n/index.js";
25
25
 
26
- // 언어 전환(withLang 등) 시점에 평가되도록 함수로 둔다
26
+ // Kept as a function so it is evaluated at language switch time (withLang, etc.)
27
27
  const permPurpose = () => t("doctor.perm.purpose");
28
28
 
29
29
  const GITHUB_CHECK_TIMEOUT_MILLISECONDS = 5000;
30
30
 
31
- // GitHub REST 호출. 실패는 예외가 아니라 {ok:false}로 돌려 진단이 중단되지 않게 한다.
31
+ // GitHub REST call. Failure returns {ok:false} instead of throwing, so the diagnosis does not stop.
32
32
  async function gh(path, token) {
33
33
  try {
34
34
  const res = await fetch(`https://api.github.com${path}`, {
35
35
  headers: { Authorization: `token ${token}`, Accept: "application/vnd.github+json",
36
36
  "User-Agent": "projectops-doctor" },
37
- signal: AbortSignal.timeout(GITHUB_CHECK_TIMEOUT_MILLISECONDS), // 막힌 네트워크에서 진단이 멈추지 않게
37
+ signal: AbortSignal.timeout(GITHUB_CHECK_TIMEOUT_MILLISECONDS), // Keeps the diagnosis from hanging on a blocked network
38
38
  });
39
39
  if (!res.ok) return { ok: false, status: res.status };
40
40
  return { ok: true, data: await res.json() };
@@ -43,7 +43,7 @@ async function gh(path, token) {
43
43
  }
44
44
  }
45
45
 
46
- // git remote에서 owner/repo 추출. 없으면 null.
46
+ // Extract owner/repo from the git remote. null if missing.
47
47
  function detectSlug(cwd) {
48
48
  try {
49
49
  const url = execFileSync("git", ["remote", "get-url", "origin"],
@@ -55,7 +55,7 @@ function detectSlug(cwd) {
55
55
  }
56
56
  }
57
57
 
58
- // ── 로컬 점검 ─────────────────────────────────────────────────────────
58
+ // ── Local checks ─────────────────────────────────────────────────────────
59
59
  export function localChecks(cwd = ".") {
60
60
  const rows = [];
61
61
  const add = (r) => rows.push(r);
@@ -68,11 +68,11 @@ export function localChecks(cwd = ".") {
68
68
  value: t("doctor.integ.noVersionYml"),
69
69
  detail: [t("doctor.integ.notIntegrated"),
70
70
  t("doctor.integ.howTo")] });
71
- return rows; // 통합 전이면 나머지 점검이 의미 없다
71
+ return rows; // Before integration the remaining checks are meaningless
72
72
  }
73
73
 
74
74
  add({ name: t("doctor.integ.name"), purpose: t("doctor.integ.purpose"), status: "OK",
75
- // 템플릿 버전이 기록돼 있지 않으면 "vunknown" 이 아니라 사람이 읽는 문구로 — 옛 설치는 version.yml 에 이 값이 없다
75
+ // Without a recorded template version, show readable text instead of "vunknown" — old installs lack this value in version.yml
76
76
  value: existing.templateVersion
77
77
  ? t("doctor.integ.versions", { tpl: existing.templateVersion, proj: existing.version })
78
78
  : t("doctor.integ.versionsNoTemplate", { proj: existing.version }) });
@@ -86,7 +86,7 @@ export function localChecks(cwd = ".") {
86
86
  detail: files.length ? null : [t("doctor.wf.none"),
87
87
  t("doctor.wf.noneHint")] });
88
88
 
89
- // 치환·Secret 판정은 설치 후 검증(#549)과 같은 모듈을 쓴다 — 두 곳에 두면 기준이 갈라진다.
89
+ // Substitution and secret checks use the same module as post-install verification (#549) — two copies would split the criteria.
90
90
  const v = verifyInstall(cwd);
91
91
  add({
92
92
  name: t("doctor.unres.name"), purpose: t("doctor.unres.purpose"),
@@ -100,7 +100,7 @@ export function localChecks(cwd = ".") {
100
100
  ],
101
101
  });
102
102
 
103
- // 자동 트리거 + 예시 값 (#662) — 미치환 토큰 검사에 안 걸리는 your-project 류 값이 실패 런을 계속 만든다
103
+ // Automatic trigger + sample values (#662) — your-project-style values slip past the unreplaced token check and keep producing failed runs
104
104
  const autoPlaceholders = scanPlaceholderTriggers(wfDir);
105
105
  add({
106
106
  name: t("doctor.ph.name"), purpose: t("doctor.ph.purpose"),
@@ -126,9 +126,9 @@ export function localChecks(cwd = ".") {
126
126
  ] : null,
127
127
  });
128
128
 
129
- // AI 요약 키 (#569) — "등록했는데 되는 건가?"를 확인할 수단이 없었다.
130
- // 로컬에서는 저장소 Secret을 읽을 수 없으므로, 어떤 이름을 쓰면 되는지와
131
- // 등록하지 않아도 무방하다는 사실을 알려준다. 실제 등록 여부는 원격 점검이 본다.
129
+ // AI summary keys (#569) — there was no way to check "I registered it, does it work?".
130
+ // Repo secrets cannot be read locally, so this tells which names to use
131
+ // and that not registering is fine. Whether they are actually registered is checked remotely.
132
132
  const AI_KEY_NAMES = ["GEMINI_API_KEY", "OPENAI_API_KEY", "ANTHROPIC_API_KEY", "GROQ_API_KEY", "MISTRAL_API_KEY"];
133
133
  const hasSummaryWf = files.some((f) => /AI-PR-SUMMARY|RELEASE-CHANGELOG/.test(f));
134
134
  if (hasSummaryWf) {
@@ -147,14 +147,14 @@ export function localChecks(cwd = ".") {
147
147
  });
148
148
  }
149
149
 
150
- // 워크플로우 파일의 permissions 선언 점검 (#558).
151
- // 저장소 설정(Settings > Actions)은 "요청할 수 있는 최대 범위"이고, 워크플로우의
152
- // permissions 블록은 "실제로 요청한 범위"다. 둘은 다른 층이라 저장소 설정이 정상이어도
153
- // 선언이 빠지면 API가 403을 준다 — #555가 정확히 그 사고였다.
150
+ // Check permissions declarations in workflow files (#558).
151
+ // Repo settings (Settings > Actions) are "the maximum that can be requested", while a workflow's
152
+ // permissions block is "what is actually requested". They are different layers, so even with healthy repo settings
153
+ // a missing declaration gets a 403 from the API — exactly the #555 accident.
154
154
  const needsActionsWrite = [];
155
155
  for (const f of files) {
156
156
  const body = readFileSync(join(wfDir, f), "utf8");
157
- // 다른 워크플로우를 깨우는 파일만 — 주석 줄의 언급(깨워지는 쪽 설명)은 호출이 아니다
157
+ // Only files that wake other workflows — a mention in a comment line (describing the woken side) is not a call
158
158
  const code = body.split("\n").filter((line) => !/^\s*#/.test(line)).join("\n");
159
159
  if (!code.includes("dispatch_downstream.py")) continue;
160
160
  const perm = body.match(/^permissions:\r?\n((?:\s+.*\r?\n)+)/m);
@@ -175,8 +175,8 @@ export function localChecks(cwd = ".") {
175
175
  });
176
176
  }
177
177
 
178
- // 은퇴한 구세대 워크플로우 (#809) — 업데이트는 감지만 하고 남겨 두므로 신형과 함께 돈다.
179
- // 로그에만 남기면 doctor 가 "문제 없음"으로 보고하므로 여기서 잡는다.
178
+ // Retired old-generation workflows (#809) — updates only detect and leave them, so they run alongside the new ones.
179
+ // Logging alone would make doctor report "no problems", so they are caught here.
180
180
  const legacy = detectMigrations(cwd).confirm;
181
181
  add({
182
182
  name: t("doctor.legacy.name"), purpose: t("doctor.legacy.purpose"),
@@ -204,9 +204,9 @@ export function localChecks(cwd = ".") {
204
204
  return rows;
205
205
  }
206
206
 
207
- // ── 원격 점검 ─────────────────────────────────────────────────────────
208
- // permissions 블록을 한 번도 선언하지 않은 워크플로우 — 이때만 저장소 기본 권한(Settings)이 그대로 적용된다.
209
- // 선언이 있으면 저장소 기본값이 read 여도 선언한 범위로 동작한다 (조직 read 기본값에서 릴리스 automerge 실측, #723).
207
+ // ── Remote checks ─────────────────────────────────────────────────────────
208
+ // Workflows that never declare a permissions block — only then do the repo default permissions (Settings) apply as is.
209
+ // With a declaration, it runs with the declared scope even if the repo default is read (measured on release automerge with an org read default, #723).
210
210
  export function workflowsWithoutPermissions(cwd = ".") {
211
211
  const wfDir = join(cwd, PATHS.workflowsDir);
212
212
  if (!existsSync(wfDir)) return [];
@@ -228,7 +228,7 @@ export async function remoteChecks(slug, token, requiredSecrets = [], undeclared
228
228
  add({ name: "Workflow permissions", purpose: permPurpose(), status: "OK",
229
229
  value: "Read and write permissions" });
230
230
  } else if (undeclared.length === 0) {
231
- // 모든 워크플로우가 permissions 를 스스로 선언 → 저장소 기본값(read)은 실제 동작에 영향이 없다
231
+ // Every workflow declares permissions itself → the repo default (read) does not affect actual behavior
232
232
  add({ name: "Workflow permissions", purpose: permPurpose(), status: "INFO",
233
233
  value: t("doctor.rm.roOk"),
234
234
  detail: [t("doctor.rm.roOkDetail")] });
@@ -269,7 +269,7 @@ export async function remoteChecks(slug, token, requiredSecrets = [], undeclared
269
269
  } else {
270
270
  const have = new Set((sec.data?.secrets || []).map((s) => s.name));
271
271
 
272
- // AI 요약 키가 실제로 등록돼 있는지 (#569) — 있으면 어느 서비스인지까지 보여준다.
272
+ // Whether AI summary keys are actually registered (#569) — if so, also shows which service.
273
273
  const AI_KEYS = { GEMINI_API_KEY: "Gemini", OPENAI_API_KEY: "OpenAI", ANTHROPIC_API_KEY: "Anthropic",
274
274
  GROQ_API_KEY: "Groq", MISTRAL_API_KEY: "Mistral", MODEL_API_KEY: t("doctor.air.legacy") };
275
275
  const foundAi = Object.entries(AI_KEYS).filter(([n]) => have.has(n));
@@ -282,7 +282,7 @@ export async function remoteChecks(slug, token, requiredSecrets = [], undeclared
282
282
  t("doctor.air.l2"),
283
283
  ],
284
284
  });
285
- // AI 키는 위에서 따로 안내하는 선택 항목이다 — '배포에 필요한 값' 미등록 목록에 섞으면 필수처럼 읽힌다 (#723)
285
+ // AI keys are optional items covered separately above — mixing them into the unregistered 'needed for deploy' list makes them read as required (#723)
286
286
  const missing = requiredSecrets.filter((n) => !have.has(n) && !(n in AI_KEYS));
287
287
  add({
288
288
  name: t("doctor.sr.name"), purpose: t("doctor.sr.purpose"),
@@ -300,14 +300,14 @@ export async function remoteChecks(slug, token, requiredSecrets = [], undeclared
300
300
  return rows;
301
301
  }
302
302
 
303
- // ── 렌더 ──────────────────────────────────────────────────────────────
303
+ // ── Render ──────────────────────────────────────────────────────────────
304
304
  const ICON = { OK: "✅", WARN: "⚠️", FAIL: "❌", INFO: "ℹ️" };
305
305
 
306
306
  export function renderRows(rows, write = (s) => process.stderr.write(s + "\n")) {
307
307
  const head = (r) => `${r.name}${r.purpose ? ` - ${r.purpose}` : ""}`;
308
308
  for (const r of rows) {
309
309
  write(`${ICON[r.status] || "·"} ${head(r)}: ${r.value}`);
310
- // 정상 항목은 한 줄로 압축한다. 펼치는 것은 사용자가 무언가 해야 할 때뿐이다.
310
+ // Healthy items collapse to one line. Expand only when the user needs to do something.
311
311
  if (r.detail && r.status !== "OK") {
312
312
  for (const line of r.detail) write(` ${line}`);
313
313
  write("");
@@ -321,7 +321,7 @@ export function renderRows(rows, write = (s) => process.stderr.write(s + "\n"))
321
321
  return warn;
322
322
  }
323
323
 
324
- // 진입점. 반환: 살펴볼 항목 수 (exit code로 쓰지 않는다 — 진단은 실패가 아니다)
324
+ // Entry point. Returns the number of items to look at (not used as the exit code — a diagnosis is not a failure)
325
325
  export async function runDoctor({ cwd = ".", token = process.env.GITHUB_TOKEN || "" } = {}) {
326
326
  const write = (s) => process.stderr.write(s + "\n");
327
327
  write("");