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
@@ -1,24 +1,24 @@
1
- // package.json 내용 분류 — 원본 파일 텍스트에 대한 부분문자열 매칭.
2
- // dependencies 파싱이 아니라 raw 텍스트 검사 (깨진 JSON에도 동작).
3
- // 입력은 package.json의 원문 문자열(raw). 순서 중요.
1
+ // Classify package.json content — substring matching on the raw file text.
2
+ // Checks raw text rather than parsing dependencies (works even on broken JSON).
3
+ // Input is the raw package.json string. Order matters.
4
4
  export function classifyPackageText(raw) {
5
5
  const s = String(raw || "");
6
6
  if (s.includes("@react-native") || s.includes("react-native")) {
7
7
  return s.includes("expo") ? "react-native-expo" : "react-native";
8
8
  }
9
- // next 타입은 v4.1.0에서 react로 흡수 — "next" 의존성이 있어도 react로 판정
9
+ // The next type was merged into react in v4.1.0 — a "next" dependency still classifies as react
10
10
  if (s.includes('"react"') || s.includes('"next"')) return "react";
11
11
  return "node";
12
12
  }
13
13
 
14
- // 편의: 파싱된 객체를 받는 경우 원문으로 재직렬화해 위 규칙 적용
14
+ // Convenience: for a parsed object, re-serialize to text and apply the rules above
15
15
  export function classifyPackageJson(pkgOrRaw) {
16
16
  const raw = typeof pkgOrRaw === "string" ? pkgOrRaw : JSON.stringify(pkgOrRaw || {});
17
17
  return classifyPackageText(raw);
18
18
  }
19
19
 
20
- // 마커 스캔 (동작명세 §3.1). has(relpath)=>bool 주입. node는 다른 타입 있으면 미추가.
21
- // read(relpath)=>string|null 로 package.json 원문을 받아 classifyPackageText에 넘긴다.
20
+ // Marker scan (behavior spec §3.1). Injects has(relpath)=>bool. node is not added when another type exists.
21
+ // Receives raw package.json via read(relpath)=>string|null and passes it to classifyPackageText.
22
22
  export function detectTypesFromMarkers({ has, read }) {
23
23
  const types = [];
24
24
  if (has("pubspec.yaml")) types.push("flutter");
@@ -34,7 +34,7 @@ export function detectTypesFromMarkers({ has, read }) {
34
34
 
35
35
  const VERSION_RE = /^\d+\.\d+\.\d+$/;
36
36
 
37
- // 버전 감지 (동작명세 §3.3) — 순서대로 첫 성공. read(relpath)=>string|null 주입.
37
+ // Version detection (behavior spec §3.3) — first success in order. Injects read(relpath)=>string|null.
38
38
  export function detectVersionFromFiles({ read, readJson, hasJq, gitTag }) {
39
39
  const pkg = readJson?.("package.json");
40
40
  if (hasJq && pkg?.version && VERSION_RE.test(pkg.version)) return pkg.version;
@@ -61,10 +61,10 @@ export function extraMarkers(type) {
61
61
  return { python: ["setup.py", "requirements.txt"], spring: ["build.gradle.kts", "pom.xml"] }[type] || [];
62
62
  }
63
63
 
64
- // 확장자 빈도 스캔 추천 (마커 없을 때 2단계, #458).
65
- // 마커가 전혀 없을 때(=basic 폴백)만 쓰는 2차 추천. files = 프루닝된 상대경로 목록.
66
- // 임계: dart≥1→flutter, java+kt+gradle≥3→spring, tsx+jsx≥3→react, py≥3→python,
67
- // 아무것도 없고 ts+js≥3→node. 반환은 메뉴 정의 순서로 정렬.
64
+ // Extension frequency scan recommendation (step 2 when there are no markers, #458).
65
+ // Secondary recommendation used only when there are no markers at all (= basic fallback). files = pruned relative paths.
66
+ // Thresholds: dart≥1→flutter, java+kt+gradle≥3→spring, tsx+jsx≥3→react, py≥3→python,
67
+ // none of those and ts+js≥3→node. Returned in menu definition order.
68
68
  export function suggestTypesByExtScan(files) {
69
69
  const count = (re) => files.filter((f) => re.test(f)).length;
70
70
  const found = new Set();
@@ -1,9 +1,9 @@
1
- // 비대화형 개발(릴리스 소스) 브랜치 생성 (#715) — --create-development-branch 를 준 실행에서만.
2
- // 대화형 ensureDeployBranch 를 "모든 질문에 예"로 다시 쓴다: 존재 판단·생성·push 경로를 한 벌로 유지.
3
- // 실패해도 예외를 던지지 않는다 — 통합 전체를 실패시키지 않고 수동 명령만 남긴다.
1
+ // Non-interactive development (release source) branch creation (#715) — only when --create-development-branch is given.
2
+ // Reuses the interactive ensureDeployBranch as "yes to every question": one code path for existence check, creation and push.
3
+ // Never throws on failure — leaves a manual command instead of failing the whole integration.
4
4
  import { ensureDeployBranch } from "./options-ask.js";
5
5
 
6
- // ensureDeployBranch state > 결과 3종 (created · skipped · failed)
6
+ // ensureDeployBranch state > 3 results (created · skipped · failed)
7
7
  const STATUS_BY_STATE = {
8
8
  "exists-local": "skipped",
9
9
  "exists-remote": "skipped",
@@ -14,7 +14,7 @@ const STATUS_BY_STATE = {
14
14
  "not-checked": "failed",
15
15
  };
16
16
 
17
- // 실패 사유별 수동 명령 (push 실패는 로컬 브랜치가 이미 생겼으므로 push 만)
17
+ // Manual command per failure reason (push failure: the local branch already exists, so push only)
18
18
  function manualCommandFor(state, branch, base) {
19
19
  if (state === "push-failed") return `git push -u origin ${branch}`;
20
20
  if (state === "create-failed" && base) return `git branch ${branch} ${base} && git push -u origin ${branch}`;
@@ -22,12 +22,12 @@ function manualCommandFor(state, branch, base) {
22
22
  }
23
23
 
24
24
  /**
25
- * 개발 브랜치 확인 > 없으면 기본 브랜치에서 생성 > origin push
26
- * 반환: { status, reason, branch, base, pushed, manualCommand(실패 시만) }
25
+ * Check the development branch > create it from the default branch if missing > push to origin
26
+ * Returns { status, reason, branch, base, pushed, manualCommand (on failure only) }
27
27
  */
28
28
  export async function createDevelopmentBranchUnattended({ targetRoot = ".", branch = "develop", defaultBranch = "", say = () => {} }) {
29
29
  const answerYes = { confirm: async () => true };
30
- // 무인 실행: 자격 증명을 묻지 않고 실패시켜 failed 경로(수동 명령)로 보낸다 (#988)
30
+ // Unattended run: fail instead of asking for credentials, sending it to the failed path (manual command) (#988)
31
31
  const outcome = await ensureDeployBranch({ targetRoot, deployBranch: branch, defaultBranch, io: answerYes, say, isNonInteractive: true });
32
32
  const status = STATUS_BY_STATE[outcome.state] ?? "failed";
33
33
  return {
@@ -41,8 +41,8 @@ export async function createDevelopmentBranchUnattended({ targetRoot = ".", bran
41
41
  }
42
42
 
43
43
  /**
44
- * 실행 단계 래퍼: 플래그 확인 > 생성 시도 > 실행 기록(trace) 남김
45
- * 플래그가 없으면 만들지 않고 "왜 안 만들었는지"만 기록. 반환: 결과 | null(플래그 없음)
44
+ * Step wrapper: check the flag > try to create > write the run trace
45
+ * Without the flag, creates nothing and records only why. Returns result | null (no flag)
46
46
  */
47
47
  export async function runDevelopmentBranchStep({ isRequested = false, targetRoot, branch, defaultBranch, trace = null, say = () => {} }) {
48
48
  const name = branch || "develop";
@@ -51,7 +51,7 @@ export async function runDevelopmentBranchStep({ isRequested = false, targetRoot
51
51
  return null;
52
52
  }
53
53
  const result = await createDevelopmentBranchUnattended({ targetRoot, branch: name, defaultBranch, say });
54
- // action 이 곧 결과 — failed 는 로그에서 ERROR 로 보인다 (run-trace levelOf)
54
+ // action is the result — failed shows as ERROR in the log (run-trace levelOf)
55
55
  trace?.event("dev-branch", result.status, name, {
56
56
  base: defaultBranch || null, reason: result.reason, pushed: result.pushed, manualCommand: result.manualCommand,
57
57
  });
@@ -1,7 +1,7 @@
1
- // 템플릿 다운로드 후 제거하는 항목 (복사 제외 목록).
2
- // ⚠️ "템플릿 전용 파일 추가" 규칙(docs/architecture/agent/scripts.md)의 동기화 지점:
3
- // template_initializer.py(삭제) / 이 파일(복사 제외)
4
- // (여기가 유일한 복사 제외 지점)
1
+ // Items removed after downloading the template (copy exclusion list).
2
+ // ⚠️ Sync point of the "adding template-only files" rule (docs/architecture/agent/scripts.md):
3
+ // template_initializer.py (delete) / this file (copy exclusion)
4
+ // (this is the only copy-exclusion point)
5
5
  export const DOCS_TO_REMOVE = [
6
6
  "CONTRIBUTING.md",
7
7
  "SECURITY.md",
@@ -12,15 +12,15 @@ export const DOCS_TO_REMOVE = [
12
12
  "GEMINI.md",
13
13
  "llms.txt",
14
14
  "gemini-extension.json",
15
- // 릴리스마다 changelog-deploy 파이프라인이 재생성하는 이 레포 전용 작업 산출물.
16
- // 사용자 프로젝트에는 의미가 없으므로 복사하지 않는다.
15
+ // This repo's own work output, regenerated by the changelog-deploy pipeline on every release.
16
+ // Meaningless for user projects, so it is not copied.
17
17
  "pr_body.md",
18
18
  ];
19
19
 
20
- // ⚠️ `.github/i18n`(한국어 템플릿 오버레이, #769)은 여기에 넣지 않는다. 이 목록은 내려받은 템플릿 폴더에서
21
- // 항목을 지우는데, 오버레이는 language: ko 설치 때 그 폴더에서 읽어 와야 한다. 사용자 레포로는
22
- // copyIssueTemplates 가 ISSUE_TEMPLATE/PULL_REQUEST_TEMPLATE 만 골라 복사하므로 새지 않는다.
23
- // ("Use this template" 경로는 template_initializer.py 가 지운다.)
20
+ // ⚠️ Do not add `.github/i18n` (Korean template overlay, #769) here. This list deletes entries from the downloaded
21
+ // template folder, but the overlay must be read from that folder for language: ko installs. It does not leak into user repos
22
+ // because copyIssueTemplates copies only ISSUE_TEMPLATE/PULL_REQUEST_TEMPLATE.
23
+ // (The "Use this template" path is cleaned up by template_initializer.py.)
24
24
  export const PLUGIN_ITEMS_TO_REMOVE = [
25
25
  ".claude-plugin",
26
26
  ".codex-plugin",
@@ -30,7 +30,7 @@ export const PLUGIN_ITEMS_TO_REMOVE = [
30
30
  "package.json",
31
31
  "harness",
32
32
  "plugins",
33
- // Claude Code 플러그인 훅 (#953) — 사용자 레포의 hooks/ 와 섞이지 않게
33
+ // Claude Code plugin hooks (#953) — kept apart from the user repo's hooks/
34
34
  "hooks",
35
35
  "bin",
36
36
  "src",
@@ -43,4 +43,4 @@ export const PLUGIN_ITEMS_TO_REMOVE = [
43
43
  ".github/workflows/PROJECT-TEMPLATE-ISSUE-ASSIGNMENT.yaml",
44
44
  ".github/config/community-labels.yml",
45
45
  ];
46
- // ⚠️ skills/ 는 제외하지 않는다 (Cursor 설치 소스로 보존)
46
+ // ⚠️ skills/ is not excluded (kept as the Cursor install source)
@@ -1,4 +1,4 @@
1
- // 파일시스템 공용 유틸 (LF 보존 바이트 복사). 텍스트는 그대로 복사해 원본 줄바꿈 유지.
1
+ // Shared filesystem utilities (byte copy that keeps LF). Text is copied as is to keep the original line endings.
2
2
  import {
3
3
  copyFileSync as copyFileBytes, existsSync, lstatSync, readFileSync, readlinkSync, symlinkSync,
4
4
  writeFileSync, mkdirSync, readdirSync, rmSync,
@@ -13,14 +13,14 @@ export function writeText(p, s) {
13
13
  writeFileSync(p, s);
14
14
  }
15
15
 
16
- // 단일 파일 복사 (부모 디렉토리 자동 생성, 바이트 그대로)
16
+ // Copy a single file (creates parent directories, byte for byte)
17
17
  export function copyFileSync(src, dst) {
18
18
  mkdirSync(dirname(dst), { recursive: true });
19
19
  copyFileBytes(src, dst);
20
20
  }
21
21
 
22
- // 파일·폴더·심볼릭 링크 재귀 복사. fs.cpSync 는 쓰지 않는다:
23
- // Windows + Node 22 이상에서 경로에 한글이 있으면 메시지 없이 프로세스가 죽는다.
22
+ // Recursive copy of files, folders and symlinks. Avoids the built-in fs recursive copy (cp-sync):
23
+ // on Windows with Node 22+, a non-ASCII (e.g. Korean) path kills the process with no message.
24
24
  export function copyPathSync(src, dst, filter) {
25
25
  if (filter && !filter(src)) return;
26
26
  const stat = lstatSync(src);
@@ -35,20 +35,20 @@ export function copyPathSync(src, dst, filter) {
35
35
  }
36
36
  }
37
37
 
38
- // 디렉토리 재귀 복사 (내용을 dst 하위로)
38
+ // Recursive directory copy (contents go under dst)
39
39
  export function copyDirSync(src, dst, { filter } = {}) {
40
40
  mkdirSync(dst, { recursive: true });
41
41
  copyPathSync(src, dst, filter);
42
42
  }
43
43
 
44
- // 파일/폴더 삭제 (없어도 무해)
44
+ // Delete a file/folder (harmless if missing)
45
45
  export function remove(p) {
46
46
  rmSync(p, { recursive: true, force: true });
47
47
  }
48
48
 
49
- // 디렉토리 직하위 .yaml/.yml 파일명 목록. 하위 폴더 제외.
50
- // 정렬: 확장자로 1차 그룹(.yaml 먼저 → .yml 나중), 각 그룹 안에서 알파벳순.
51
- // (순회 순서가 version.yml deploy 블록의 키 순서를 정함 — 기존 설치본과 바이트 동일 유지)
49
+ // Names of .yaml/.yml files directly under a directory. Subfolders excluded.
50
+ // Sort: group by extension first (.yaml before .yml), alphabetical within each group.
51
+ // (Iteration order sets the key order of the version.yml deploy block — keeps output byte-identical to existing installs)
52
52
  export function listYamlFiles(dir) {
53
53
  if (!existsSync(dir)) return [];
54
54
  const names = readdirSync(dir, { withFileTypes: true })
@@ -1,5 +1,5 @@
1
- // 브랜치 존재 확인·생성 헬퍼 (#477) — 마법사의 개발 브랜치 생성 제안에 사용.
2
- // 모든 함수는 실패 시 조용히 false/null을 반환한다 (git 미설치·비레포·원격 없음에서 마법사가 죽지 않게).
1
+ // Branch existence check and creation helpers (#477) — used by the wizard's offer to create the development branch.
2
+ // Every function quietly returns false/null on failure (so the wizard survives no git, no repo, or no remote).
3
3
  import { execFileSync } from "node:child_process";
4
4
 
5
5
  function git(root, args, env = undefined) {
@@ -9,9 +9,9 @@ function git(root, args, env = undefined) {
9
9
  }
10
10
 
11
11
  /**
12
- * 비대화형 원격 접근용 환경 (#988): 자격 증명 질문 차단 > 즉시 실패 > 수동 명령 안내
13
- * 차단 4개: 터미널 프롬프트, askpass(GIT_/SSH_), Git Credential Manager 창, ssh 비밀번호 질문
14
- * ssh 는 사용자 지정 명령(GIT_SSH_COMMAND·GIT_SSH·core.sshCommand)이 없을 때만 BatchMode 로 덮는다
12
+ * Environment for non-interactive remote access (#988): block credential prompts > fail at once > show manual command
13
+ * 4 blocks: terminal prompt, askpass (GIT_/SSH_), Git Credential Manager window, ssh password prompt
14
+ * ssh is forced to BatchMode only when there is no user-set command (GIT_SSH_COMMAND, GIT_SSH, core.sshCommand)
15
15
  */
16
16
  export function nonInteractiveGitEnv(baseEnv = process.env, { hasCustomSshCommand = false } = {}) {
17
17
  const env = { ...baseEnv, GIT_TERMINAL_PROMPT: "0", GIT_ASKPASS: "", SSH_ASKPASS: "", GCM_INTERACTIVE: "never" };
@@ -19,14 +19,14 @@ export function nonInteractiveGitEnv(baseEnv = process.env, { hasCustomSshComman
19
19
  return env;
20
20
  }
21
21
 
22
- // 원격 명령 환경: 대화형은 상속(undefined), 비대화형은 질문 차단 환경
22
+ // Remote command env: interactive inherits (undefined), non-interactive blocks prompts
23
23
  function remoteEnv(root, isNonInteractive) {
24
24
  if (!isNonInteractive) return undefined;
25
25
  const hasCustomSshCommand = Boolean(git(root, ["config", "--get", "core.sshCommand"]));
26
26
  return nonInteractiveGitEnv(process.env, { hasCustomSshCommand });
27
27
  }
28
28
 
29
- // 브랜치 존재 상태. remote는 origin 조회 실패(원격 없음·네트워크) 시 null(불명).
29
+ // Branch existence state. remote is null (unknown) when the origin lookup fails (no remote, network).
30
30
  export function branchStatus(root, name, { isNonInteractive = false } = {}) {
31
31
  const isRepo = git(root, ["rev-parse", "--git-dir"]) !== null;
32
32
  if (!isRepo || !name) return { isRepo, local: false, remote: null };
@@ -36,8 +36,8 @@ export function branchStatus(root, name, { isNonInteractive = false } = {}) {
36
36
  return { isRepo, local, remote };
37
37
  }
38
38
 
39
- // fromBranch(기본 브랜치)에서 로컬 브랜치 생성 — checkout하지 않는다.
40
- // 로컬에 fromBranch가 없으면 origin/fromBranch → HEAD 순으로 폴백.
39
+ // Create a local branch from fromBranch (the default branch) — no checkout.
40
+ // If fromBranch is not local, fall back to origin/fromBranch → HEAD in that order.
41
41
  export function createBranch(root, name, fromBranch = "") {
42
42
  if (fromBranch) {
43
43
  if (git(root, ["branch", name, fromBranch]) !== null) return true;
@@ -46,8 +46,8 @@ export function createBranch(root, name, fromBranch = "") {
46
46
  return git(root, ["branch", name]) !== null;
47
47
  }
48
48
 
49
- // 원격(origin)에 브랜치 push (-u). 자격/네트워크 실패 시 false.
50
- // 비대화형은 자격 증명을 묻지 않고 바로 실패 (#988 — 묻는 순간 무인 실행이 멈춘다)
49
+ // Push a branch to the remote (origin) with -u. false on credential/network failure.
50
+ // Non-interactive fails right away without asking for credentials (#988 — asking stalls an unattended run)
51
51
  export function pushBranch(root, name, { isNonInteractive = false } = {}) {
52
52
  return git(root, ["push", "-u", "origin", name], remoteEnv(root, isNonInteractive)) !== null;
53
53
  }
@@ -1,36 +1,36 @@
1
- // IDE 어댑터 공통 계약 (확장 포인트의 핵심).
1
+ // Shared IDE adapter contract (the core of the extension point).
2
2
  //
3
- // 새 IDE(에디터/에이전트 CLI)를 지원하려면 이 shape을 만족하는 객체 하나를
4
- // src/core/ide/adapters/<name>.js 에 만들고 registry.js 배열에 추가하기만 하면 된다.
5
- // 오케스트레이터(commands/skills.js)는 어댑터의 필드만 알고, 개별 IDE 로직은 전혀 모른다.
3
+ // To support a new IDE (editor/agent CLI), create one object satisfying this shape
4
+ // in src/core/ide/adapters/<name>.js and add it to the registry.js array — that is all.
5
+ // The orchestrator (commands/skills.js) knows only adapter fields, nothing about individual IDE logic.
6
6
  //
7
7
  // @typedef {Object} IdeStatus
8
- // installed: boolean 설치돼 있는가
9
- // version: string|null 설치 버전(알 수 있으면)
10
- // cliMissing: boolean 전용 CLI가 없어 설치 불가한 상태인가 (안내만 가능)
11
- // note: string 상태 표시줄에 덧붙일 짧은 메모(선택)
8
+ // installed: boolean whether it is installed
9
+ // version: string|null installed version (if known)
10
+ // cliMissing: boolean whether install is impossible because the dedicated CLI is missing (notice only)
11
+ // note: string short note appended to the status line (optional)
12
12
  //
13
13
  // @typedef {Object} IdeAdapter
14
- // id: string 내부 고유키 (예: "claude"). 라우팅·preselect에 사용
15
- // label: string 사람에게 보이는 이름 (예: "Claude Code")
16
- // order: number 상태·메뉴 표시 순서 (작을수록 먼저)
17
- // detect(io): IdeStatus 현재 설치 상태
18
- // apply(io, ctx): boolean 설치 또는 업데이트(멱등). 성공 true
19
- // remove(io, ctx): boolean 제거(미설치면 no-op, true)
20
- // manualHint(io): string CLI 없을 때 보여줄 수동 설치 명령(선택)
14
+ // id: string internal unique key (e.g. "claude"). Used for routing and preselect
15
+ // label: string name shown to people (e.g. "Claude Code")
16
+ // order: number status/menu display order (smaller first)
17
+ // detect(io): IdeStatus current install status
18
+ // apply(io, ctx): boolean install or update (idempotent). true on success
19
+ // remove(io, ctx): boolean remove (no-op if not installed, true)
20
+ // manualHint(io): string manual install command shown when the CLI is missing (optional)
21
21
  //
22
- // io = runner.defaultIo() 또는 테스트 stub: { which, run, home, log, projectopsHome?(없으면 home/.projectops) }
23
- // ctx = { templateVersion, sourceSkillsDir } — 버전 표기·Cursor 복사 소스 등 공용 컨텍스트
22
+ // io = runner.defaultIo() or a test stub: { which, run, home, log, projectopsHome? (default home/.projectops) }
23
+ // ctx = { templateVersion, sourceSkillsDir } — shared context such as version display and the Cursor copy source
24
24
  //
25
- // 규칙:
26
- // - apply/remove/detect는 예외를 던지지 않는다(내부에서 흡수). 실패는 log + false로 표현.
27
- // - CLI 미존재는 에러가 아니라 cliMissing 상태 + manualHint로 안내한다.
28
- // - 어댑터는 io를 통해서만 외부와 상호작용한다(직접 spawnSync/console 금지) — 테스트 가능성.
25
+ // Rules:
26
+ // - apply/remove/detect never throw (absorbed internally). Failure is expressed as log + false.
27
+ // - A missing CLI is not an error but a cliMissing state + manualHint notice.
28
+ // - Adapters interact with the outside only through io (no direct spawnSync/console) — for testability.
29
29
 
30
- // 어댑터가 최소 계약을 지키는지 개발 중 검증하는 헬퍼(런타임 방어).
30
+ // Helper that checks during development that adapters keep the minimum contract (runtime guard).
31
31
  export function assertAdapter(a) {
32
32
  for (const k of ["id", "label", "detect", "apply", "remove"]) {
33
- if (a[k] == null) throw new Error(`IDE 어댑터 '${a?.id || "?"}'에 필수 필드 '${k}'가 없습니다`);
33
+ if (a[k] == null) throw new Error(`IDE adapter '${a?.id || "?"}' is missing required field '${k}'`);
34
34
  }
35
35
  return a;
36
36
  }
@@ -1,5 +1,5 @@
1
- // Claude Code 어댑터 (플러그인 설치·제거, 플러그인 데이터 정리).
2
- // 마켓플레이스 Cassiiopeia/projectops, 플러그인 projectops@projectops-marketplace.
1
+ // Claude Code adapter (plugin install/remove, plugin data cleanup).
2
+ // Marketplace Cassiiopeia/projectops, plugin projectops@projectops-marketplace.
3
3
  import { join } from "node:path";
4
4
  import { existsSync, readdirSync, mkdirSync, copyFileSync, rmSync } from "node:fs";
5
5
  import { compareCacheName } from "../util.js";
@@ -23,25 +23,25 @@ function detect(io) {
23
23
  const name = String(p.name || p.id || "");
24
24
  if (name.includes("projectops@") || name === "projectops") { scope = p.scope || ""; version = p.version || null; break; }
25
25
  }
26
- } catch { /* 파싱 실패 → 미설치 취급 */ }
26
+ } catch { /* Parse failure → treat as not installed */ }
27
27
  return { installed: !!scope, version, cliMissing: false, scope };
28
28
  }
29
29
 
30
30
  function apply(io, ctx = {}) {
31
31
  const st = detect(io);
32
32
  if (st.cliMissing) { io.log(manualHint(io)); return false; }
33
- migrateLegacy(io); // 옛 cassiiopeia 플러그인/마켓 정리
34
- migrateConfigRoot(io); // 공용 config 루트 이관
35
- const st2 = detect(io); // 정리 후 재감지
33
+ migrateLegacy(io); // Clean up the old cassiiopeia plugin/marketplace
34
+ migrateConfigRoot(io); // Migrate the shared config root
35
+ const st2 = detect(io); // Re-detect after cleanup
36
36
  if (st2.installed) return update(io, st2.scope);
37
37
  return install(io, "user");
38
38
  }
39
39
 
40
- // 옛 이름(cassiiopeia) 플러그인·마켓 정리. 조용히, 로그만. 실패 무해(없으면 no-op).
40
+ // Clean up the old-name (cassiiopeia) plugin and marketplace. Quietly, log only. Failure is harmless (no-op if missing).
41
41
  function migrateLegacy(io) {
42
42
  const r = io.run("claude", ["plugin", "list", "--json"]);
43
43
  let list = [];
44
- try { const arr = JSON.parse(r.stdout || "[]"); list = Array.isArray(arr) ? arr : (arr.plugins || []); } catch { /* 무시 */ }
44
+ try { const arr = JSON.parse(r.stdout || "[]"); list = Array.isArray(arr) ? arr : (arr.plugins || []); } catch { /* ignore */ }
45
45
  for (const legacy of LEGACY_PLUGINS) {
46
46
  const hit = list.find((p) => {
47
47
  const name = String(p.name || p.id || "");
@@ -54,7 +54,7 @@ function migrateLegacy(io) {
54
54
  }
55
55
  }
56
56
  for (const mp of LEGACY_MARKETPLACES) {
57
- io.run("claude", ["plugin", "marketplace", "remove", mp]); // 없으면 no-op
57
+ io.run("claude", ["plugin", "marketplace", "remove", mp]); // No-op if missing
58
58
  }
59
59
  }
60
60
 
@@ -94,7 +94,7 @@ function manualHint() {
94
94
  return t("ide.claude.manual", { market: MARKETPLACE, plugin: PLUGIN });
95
95
  }
96
96
 
97
- // ── 내부 헬퍼 ──
97
+ // ── Internal helpers ──
98
98
  function latestCacheDir(root) {
99
99
  if (!existsSync(root)) return "";
100
100
  const dirs = readdirSync(root, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name).sort(compareCacheName);
@@ -109,11 +109,11 @@ function migrateConfig(io, oldCache, newCache) {
109
109
  let copied = 0;
110
110
  for (const f of readdirSync(oldCfg)) if (f.endsWith(".json")) { copyFileSync(join(oldCfg, f), join(newCfg, f)); copied++; }
111
111
  if (copied) io.log(t("ide.claude.configMigrated"));
112
- } catch { /* 무해 */ }
112
+ } catch { /* harmless */ }
113
113
  }
114
114
  function removePluginData(io) {
115
115
  const dataDir = join(io.home(), ".claude/plugins/data", PLUGIN);
116
- if (existsSync(dataDir)) { try { rmSync(dataDir, { recursive: true, force: true }); io.log(t("ide.claude.dataRemoved")); } catch { /* 무해 */ } }
116
+ if (existsSync(dataDir)) { try { rmSync(dataDir, { recursive: true, force: true }); io.log(t("ide.claude.dataRemoved")); } catch { /* harmless */ } }
117
117
  }
118
118
 
119
119
  export const claudeAdapter = {
@@ -1,5 +1,5 @@
1
- // Codex CLI 어댑터 (skills 관리·마켓플레이스 등록·제거).
2
- // marketplace 등록/업그레이드가 주 경로. native ~/.agents/skills/projectops 심링크는 감지·제거에 사용.
1
+ // Codex CLI adapter (skills management, marketplace registration/removal).
2
+ // Marketplace add/upgrade is the main path. The native ~/.agents/skills/projectops symlink is used for detection and removal.
3
3
  import { join } from "node:path";
4
4
  import { existsSync, lstatSync, rmSync } from "node:fs";
5
5
  import { migrateConfigRoot } from "../legacy.js";
@@ -47,12 +47,12 @@ function remove(io) {
47
47
 
48
48
  function manualHint() { return ` 💡 Codex CLI: codex plugin marketplace add ${MARKETPLACE}`; }
49
49
 
50
- // 옛 native skills 폴더/심링크 + 옛 marketplace 정리. 실패 무해.
50
+ // Clean up the old native skills folder/symlink + old marketplace. Failure is harmless.
51
51
  function migrateLegacy(io) {
52
52
  for (const name of LEGACY_NATIVES) {
53
53
  const old = join(io.home(), ".agents/skills", name);
54
54
  if (existsSync(old) || isSymlink(old)) {
55
- try { rmSync(old, { recursive: true, force: true }); io.log(t("ide.codex.legacy", { name })); } catch { /* 무시 */ }
55
+ try { rmSync(old, { recursive: true, force: true }); io.log(t("ide.codex.legacy", { name })); } catch { /* ignore */ }
56
56
  }
57
57
  }
58
58
  if (io.which("codex")) for (const mp of LEGACY_MARKETPLACES) io.run("codex", ["plugin", "marketplace", "remove", mp]);
@@ -1,8 +1,8 @@
1
- // GitHub Copilot 어댑터 (agent skills 복사·메타 기록·제거).
2
- // 개인 스킬 폴더 ~/.copilot/skills/<이름>/SKILL.md 를 VS Code·Copilot CLI·JetBrains 플러그인이 모두 기본으로 읽는다
3
- // (JetBrains 1.18 기본 위치: .agents/.github/.claude skills + ~/.agents·~/.copilot·~/.claude skills)
4
- // ~/.copilot/intellij-skills 는 JetBrains 플러그인이 내장 스킬을 덮어쓰는 관리 폴더라 쓰지 않는다.
5
- // 스킬 이름(frontmatter name)은 폴더명과 같아야 로드된다 — pro-* 폴더가 이미 그 규칙을 지킨다.
1
+ // GitHub Copilot adapter (copy agent skills, record meta, remove).
2
+ // The personal skill folder ~/.copilot/skills/<name>/SKILL.md is read by default by VS Code, Copilot CLI and the JetBrains plugin
3
+ // (JetBrains 1.18 default locations: .agents/.github/.claude skills + ~/.agents, ~/.copilot, ~/.claude skills)
4
+ // ~/.copilot/intellij-skills is not used — it is a managed folder where the JetBrains plugin overwrites built-in skills.
5
+ // A skill loads only when its name (frontmatter name) matches the folder name — pro-* folders already follow that rule.
6
6
  import { join } from "node:path";
7
7
  import { existsSync, readdirSync } from "node:fs";
8
8
  import { migrateConfigRoot } from "../legacy.js";
@@ -12,14 +12,14 @@ import { applyHomeSkills, removeHomeSkills } from "../home-skills.js";
12
12
 
13
13
  const META_FILE_NAME = "copilot-skills-meta.json";
14
14
  const MESSAGE_PREFIX = "ide.copilot";
15
- // Copilot 사용 흔적 4종: copilot CLI, ~/.copilot 폴더(CLI·JetBrains 가 만듦), VS Code 확장, JetBrains 플러그인
15
+ // 4 signs of Copilot use: copilot CLI, ~/.copilot folder (made by the CLI and JetBrains), VS Code extension, JetBrains plugin
16
16
  const COPILOT_CLI_NAME = "copilot";
17
17
  const COPILOT_HOME_DIR = ".copilot";
18
18
  const VSCODE_EXTENSION_DIRS = [".vscode/extensions", ".vscode-insiders/extensions"];
19
- // VS Code 확장 폴더명: github.copilot-1.2.3 · github.copilot-chat-0.30.0
19
+ // VS Code extension folder names: github.copilot-1.2.3 · github.copilot-chat-0.30.0
20
20
  const VSCODE_EXTENSION_PREFIX = "github.copilot";
21
- // IDE 설정 루트 (macOS · Windows · Linux) > <제품><버전>/plugins/github-copilot-intellij
22
- // Linux 는 플러그인이 <제품><버전>/ 바로 아래에 깔린다. Android Studio 도 같은 플러그인을 쓴다.
21
+ // IDE settings roots (macOS · Windows · Linux) > <product><version>/plugins/github-copilot-intellij
22
+ // On Linux the plugin sits directly under <product><version>/. Android Studio uses the same plugin.
23
23
  const JETBRAINS_CONFIG_ROOTS = [
24
24
  "Library/Application Support/JetBrains", "AppData/Roaming/JetBrains", ".local/share/JetBrains",
25
25
  "Library/Application Support/Google", "AppData/Roaming/Google", ".local/share/Google",
@@ -30,7 +30,7 @@ function skillsDir(io) { return join(io.home(), COPILOT_HOME_DIR, "skills"); }
30
30
  function metaPath(io) { return join(skillsDir(io), META_FILE_NAME); }
31
31
  function homeSkillsOptions(io) { return { skillsDest: skillsDir(io), metaFileName: META_FILE_NAME, messagePrefix: MESSAGE_PREFIX }; }
32
32
 
33
- // 쓰지 않는 사람 홈에 ~/.copilot 을 만들지 않도록, 흔적이 있을 때만 설치 후보로 둔다
33
+ // Only an install candidate when there are signs of use, so ~/.copilot is not created in the home of non-users
34
34
  function isCopilotDetected(io) {
35
35
  if (io.which(COPILOT_CLI_NAME)) return true;
36
36
  if (existsSync(join(io.home(), COPILOT_HOME_DIR))) return true;
@@ -65,11 +65,11 @@ function detect(io) {
65
65
 
66
66
  function apply(io, ctx = {}) {
67
67
  if (detect(io).cliMissing) { io.log(manualHint()); return false; }
68
- migrateConfigRoot(io); // 공용 config 루트 이관
68
+ migrateConfigRoot(io); // Migrate the shared config root
69
69
  return applyHomeSkills(io, ctx, homeSkillsOptions(io));
70
70
  }
71
71
 
72
- // 사용자가 직접 넣은 스킬이 남으면 폴더 유지
72
+ // Keep the folder if skills the user added remain
73
73
  function remove(io, ctx = {}) {
74
74
  return removeHomeSkills(io, ctx, homeSkillsOptions(io));
75
75
  }
@@ -1,5 +1,5 @@
1
- // Cursor 어댑터 (skills 복사·메타 기록·제거).
2
- // 마켓플레이스 없음 → ~/.cursor/skills/ 에 skills/ 폴더, ~/.cursor/scripts/ 에 공용 파이썬을 복사하고 meta.json으로 버전 추적.
1
+ // Cursor adapter (copy skills, record meta, remove).
2
+ // No marketplace → copy the skills/ folder to ~/.cursor/skills/ and the shared Python to ~/.cursor/scripts/, tracking the version in meta.json.
3
3
  import { join } from "node:path";
4
4
  import { existsSync, readFileSync, rmSync } from "node:fs";
5
5
  import { migrateConfigRoot, isLegacyVersion } from "../legacy.js";
@@ -22,17 +22,17 @@ function detect(io) {
22
22
  }
23
23
 
24
24
  function apply(io, ctx = {}) {
25
- migrateLegacy(io, ctx); // 옛 이름/버전 감지 시 projectops 소유 항목 선별 삭제
26
- migrateConfigRoot(io); // 공용 config 루트 이관
25
+ migrateLegacy(io, ctx); // On an old name/version, selectively delete projectops-owned entries
26
+ migrateConfigRoot(io); // Migrate the shared config root
27
27
  return applyHomeSkills(io, ctx, homeSkillsOptions(io));
28
28
  }
29
29
 
30
- // 타 스킬(somansa-tools 등) 남으면 폴더 유지
30
+ // Keep the folder if other skills (somansa-tools, etc.) remain
31
31
  function remove(io, ctx = {}) {
32
32
  return removeHomeSkills(io, ctx, homeSkillsOptions(io));
33
33
  }
34
34
 
35
- // 옛 이름/버전 meta면 projectops 소유 항목만 선별 삭제 → apply가 신규 재설치.
35
+ // If meta has an old name/version, selectively delete only projectops-owned entries → apply reinstalls fresh.
36
36
  function migrateLegacy(io, ctx) {
37
37
  const mp = metaPath(io);
38
38
  if (!existsSync(mp)) return;
@@ -42,7 +42,7 @@ function migrateLegacy(io, ctx) {
42
42
  const oldVer = isLegacyVersion(meta.version, LEGACY_MAX_VERSION);
43
43
  if (!(oldName || oldVer)) return;
44
44
  for (const name of ownedEntries(skillsDir(io), ctx, META_FILE_NAME)) {
45
- try { rmSync(join(skillsDir(io), name), { recursive: true, force: true }); } catch { /* 무시 */ }
45
+ try { rmSync(join(skillsDir(io), name), { recursive: true, force: true }); } catch { /* ignore */ }
46
46
  }
47
47
  io.log(t("ide.cursor.legacy", { name: meta.name, version: meta.version }));
48
48
  }
@@ -1,5 +1,5 @@
1
- // Gemini CLI 어댑터 (확장 설치·제거).
2
- // extension install/update/uninstall. 마켓플레이스 대신 git URL 확장.
1
+ // Gemini CLI adapter (extension install/remove).
2
+ // extension install/update/uninstall. A git URL extension instead of a marketplace.
3
3
  import { migrateConfigRoot } from "../legacy.js";
4
4
  import { t } from "../../../i18n/index.js";
5
5
  import { TEMPLATE_REPO_WEB_URL } from "../../paths.js";
@@ -10,7 +10,7 @@ const LEGACY_EXTS = ["SUH-DEVOPS-TEMPLATE"];
10
10
 
11
11
  function detect(io) {
12
12
  if (!io.which("gemini")) return { installed: false, version: null, cliMissing: true, note: t("ide.cliMissing") };
13
- // gemini 설치 상태는 정밀 조회하지 않고 "설치 가능"으로만 표기 → installed 미상.
13
+ // gemini install status is not queried precisely, only shown as "installable" → installed unknown.
14
14
  return { installed: false, version: null, cliMissing: false, note: t("ide.installable") };
15
15
  }
16
16
 
@@ -30,12 +30,12 @@ function remove(io) {
30
30
  if (!io.which("gemini")) { io.log(t("ide.gemini.notFound")); return true; }
31
31
  if (io.run("gemini", ["extensions", "uninstall", EXT]).code === 0) { io.log(t("ide.gemini.removed")); return true; }
32
32
  io.log(t("ide.gemini.removeFailed", { ext: EXT }));
33
- return true; // 미설치 제거는 실패로 보지 않음
33
+ return true; // Removing something not installed is not a failure
34
34
  }
35
35
 
36
36
  function manualHint() { return ` 💡 Gemini CLI: gemini extensions install ${URL}`; }
37
37
 
38
- // 옛 이름 extension 정리. 없으면 실패 무시.
38
+ // Clean up the old-name extension. Ignore failure if missing.
39
39
  function migrateLegacy(io) {
40
40
  for (const e of LEGACY_EXTS) io.run("gemini", ["extensions", "uninstall", e]);
41
41
  }