@byh3071/vhk 0.5.2 โ†’ 0.5.3

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 (3) hide show
  1. package/README.md +13 -2
  2. package/dist/index.js +70 -5
  3. package/package.json +62 -56
package/README.md CHANGED
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  id: vhk-readme
3
3
  date: 2026-05-23
4
- tags: [vhk, cli, readme, v0.5.2]
4
+ tags: [vhk, cli, readme, v0.5.3]
5
5
  ---
6
6
 
7
7
  # ๐Ÿ”ง VHK โ€” Vibe Harness Kit
8
8
 
9
- > AI ์ฝ”๋”ฉ ์—์ด์ „ํŠธ๋ฅผ ๋ถ€๋ฆฌ๋Š” ์‚ฌ๋žŒ์„ ์œ„ํ•œ **ํ•œ๊ตญ์–ด ํ’€์‚ฌ์ดํด CLI** (v0.5.2)
9
+ > AI ์ฝ”๋”ฉ ์—์ด์ „ํŠธ๋ฅผ ๋ถ€๋ฆฌ๋Š” ์‚ฌ๋žŒ์„ ์œ„ํ•œ **ํ•œ๊ตญ์–ด ํ’€์‚ฌ์ดํด CLI** (v0.5.3)
10
+ >
11
+ > ๐Ÿฝ๏ธ **VHK๋Š” VHK๋กœ ๋ถ€ํŠธ์ŠคํŠธ๋žฉ๋จ** โ€” ์ด ๋ ˆํฌ์˜ `docs/`, `CLAUDE.md`, `.cursorrules`๋„ `vhk init`์ด ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค.
10
12
 
11
13
  ๋ช…๋ น์–ด๋ฅผ ์™ธ์šฐ์ง€ ์•Š์•„๋„ ๋ฉ๋‹ˆ๋‹ค. `vhk`๋งŒ ์น˜๋ฉด ๋ฉ”๋‰ด๊ฐ€ ๋‚˜์˜ค๊ณ , ํ•œ๊ตญ์–ด๋กœ ๋งํ•ด๋„ ์•Œ์•„๋“ฃ์Šต๋‹ˆ๋‹ค.
12
14
 
@@ -103,6 +105,15 @@ vhk ๊ธฐํš ๋๋‚ฌ๊ณ  ๋ฐ”๋กœ ์‹œ์ž‘
103
105
  |------|------|
104
106
  | `--since YYYY-MM-DD` | ๋ถ„์„ ์‹œ์ž‘์ผ (๊ธฐ๋ณธ: ์˜ค๋Š˜) |
105
107
 
108
+ ## v0.5.3 ํ•˜์ด๋ผ์ดํŠธ
109
+
110
+ | ๊ธฐ๋Šฅ | ์„ค๋ช… |
111
+ |------|------|
112
+ | **์…€ํ”„ํ˜ธ์ŠคํŒ…** | `vhk init`์ด vhk-cli ๋ ˆํฌ ์ž์ฒด๋ฅผ ๋ถ€ํŠธ์ŠคํŠธ๋žฉ โ€” ์ž๊ธฐ ๋„๊ตฌ๋กœ ์ž๊ธฐ ๋ ˆํฌ ๋งŒ๋“ค๊ธฐ |
113
+ | **CHANGELOG.md** | ๋ณ€๊ฒฝ ์ด๋ ฅ ํ‘œ์ค€ ํŒŒ์ผ ์‹ ์„ค. `vhk ship`์ด `[Unreleased]` โ†’ `[๋ฒ„์ „]` ์ž๋™ ์ด๋™ |
114
+ | **doctor ์—…๋ฐ์ดํŠธ ์•Œ๋ฆผ** | `vhk doctor`๊ฐ€ npm ์ตœ์‹  ๋ฒ„์ „ ๋น„๊ต ํ›„ `๐Ÿ†• v0.X.X ์‚ฌ์šฉ ๊ฐ€๋Šฅ` ํ•œ ์ค„ ํ‘œ์‹œ |
115
+ | **init ์•ˆ์ „์„ฑ** | ์˜ต์…˜๊ฐ’ ํฌํ•จ ๋ช…๋ น ๋ผ์šฐํŒ… ๋ฒ„๊ทธ ํ”ฝ์Šค, ์‚ฌ์šฉ์ž ์ •์˜ `package.json` scripts ๋ณด์กด |
116
+
106
117
  ## v0.5.0 ํ•˜์ด๋ผ์ดํŠธ
107
118
 
108
119
  | ๊ธฐ๋Šฅ | ์„ค๋ช… |
package/dist/index.js CHANGED
@@ -657,11 +657,11 @@ function detectNaturalLanguageInput(argv) {
657
657
  if (rest.length === 0) return null;
658
658
  const first = rest[0];
659
659
  if (isOptionToken(first)) return null;
660
+ if (rest.some(isOptionToken)) return null;
660
661
  const input = rest.join(" ").trim();
661
662
  if (!input) return null;
662
663
  const firstIsKnown = KNOWN_COMMAND_TOKENS.has(first);
663
664
  if (firstIsKnown && rest.length === 1) return null;
664
- if (firstIsKnown && rest.slice(1).every(isOptionToken)) return null;
665
665
  if (firstIsKnown && rest.length > 1) {
666
666
  if (routeNaturalLanguage(input)) return input;
667
667
  return null;
@@ -854,7 +854,9 @@ var ko = {
854
854
  projectFiles: "\u{1F4C1} \uD504\uB85C\uC81D\uD2B8 \uD30C\uC77C \uD655\uC778:",
855
855
  envNotIgnored: "\u26A0\uFE0F .env\uAC00 .gitignore\uC5D0 \uC5C6\uC74C! \uCD94\uAC00\uD558\uC138\uC694",
856
856
  nextOkMessage: "\uD658\uACBD \uC810\uAC80 \uD1B5\uACFC! \uC774\uC81C \uD504\uB85C\uC81D\uD2B8\uB97C \uC2DC\uC791\uD558\uC138\uC694.",
857
- nextRetryMessage: "\uC704 \uB3C4\uAD6C\uB97C \uC124\uCE58\uD55C \uD6C4 \uB2E4\uC2DC \uC810\uAC80\uD558\uC138\uC694."
857
+ nextRetryMessage: "\uC704 \uB3C4\uAD6C\uB97C \uC124\uCE58\uD55C \uD6C4 \uB2E4\uC2DC \uC810\uAC80\uD558\uC138\uC694.",
858
+ updateAvailable: (latest) => `\u{1F195} v${latest} \uC0AC\uC6A9 \uAC00\uB2A5 \u2014 npm i -g @byh3071/vhk`,
859
+ updateCurrent: "\uCD5C\uC2E0 \uBC84\uC804\uC744 \uC4F0\uACE0 \uC788\uC5B4\uC694"
858
860
  },
859
861
  nlp: {
860
862
  matched: "\uC774\uAC8C \uB9DE\uB098\uC694?",
@@ -909,7 +911,10 @@ var ko = {
909
911
  checkSecurity: "\uBCF4\uC548 \uC2A4\uCE94\uC744 \uB3CC\uB838\uB098\uC694?",
910
912
  hintSecurity: "vhk \uBCF4\uC548 scan",
911
913
  checkCommit: "\uBAA8\uB4E0 \uBCC0\uACBD\uC774 \uCEE4\uBC0B\uB418\uC5C8\uB098\uC694?",
912
- hintCommit: "git status \uD655\uC778"
914
+ hintCommit: "git status \uD655\uC778",
915
+ changelogUpdated: (version) => `CHANGELOG.md \uAC31\uC2E0\uB428 \u2014 [Unreleased] \u2192 [${version}] \uC139\uC158\uC73C\uB85C \uC774\uB3D9`,
916
+ changelogNoUnreleased: "CHANGELOG.md\uC5D0 [Unreleased] \uC139\uC158\uC774 \uC5C6\uC5B4 \uC790\uB3D9 \uAC31\uC2E0\uC744 \uC2A4\uD0B5\uD588\uC5B4\uC694",
917
+ changelogMissing: "CHANGELOG.md\uAC00 \uC5C6\uC5B4\uC694. \uB9CC\uB4E4\uBA74 ship\uC774 \uC790\uB3D9\uC73C\uB85C [Unreleased] \u2192 \uBC84\uC804 \uC139\uC158\uC73C\uB85C \uC62E\uACA8\uC90D\uB2C8\uB2E4."
913
918
  }
914
919
  };
915
920
  function lookup(path15) {
@@ -1730,7 +1735,7 @@ function enhancePackageScripts(projectDir) {
1730
1735
  const pkgPath = path3.join(projectDir, "package.json");
1731
1736
  if (!fs3.existsSync(pkgPath)) return false;
1732
1737
  const pkg = JSON.parse(fs3.readFileSync(pkgPath, "utf-8"));
1733
- pkg.scripts = { ...pkg.scripts, ...VHK_PACKAGE_SCRIPTS };
1738
+ pkg.scripts = { ...VHK_PACKAGE_SCRIPTS, ...pkg.scripts };
1734
1739
  fs3.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n", "utf-8");
1735
1740
  return true;
1736
1741
  }
@@ -2796,6 +2801,27 @@ function getVhkVersion() {
2796
2801
  }
2797
2802
  return void 0;
2798
2803
  }
2804
+ function fetchLatestNpmVersion(packageName) {
2805
+ try {
2806
+ const result = execSync(`npm view ${packageName} version`, {
2807
+ encoding: "utf-8",
2808
+ timeout: 5e3,
2809
+ stdio: ["ignore", "pipe", "ignore"]
2810
+ }).trim();
2811
+ if (/^\d+\.\d+\.\d+/.test(result)) return result;
2812
+ return void 0;
2813
+ } catch {
2814
+ return void 0;
2815
+ }
2816
+ }
2817
+ function compareSemver(a, b) {
2818
+ const parse = (v) => v.replace(/^v/i, "").split("-")[0].split(".").map((n) => parseInt(n, 10) || 0);
2819
+ const [a1 = 0, a2 = 0, a3 = 0] = parse(a);
2820
+ const [b1 = 0, b2 = 0, b3 = 0] = parse(b);
2821
+ if (a1 !== b1) return a1 - b1;
2822
+ if (a2 !== b2) return a2 - b2;
2823
+ return a3 - b3;
2824
+ }
2799
2825
  async function doctor() {
2800
2826
  console.log(chalk10.bold(`
2801
2827
  ${ko.doctor.title}
@@ -2823,6 +2849,14 @@ ${ko.doctor.title}
2823
2849
  } else {
2824
2850
  console.log(chalk10.green(" \u2705 VHK") + chalk10.dim(" \u2014 \uC124\uCE58\uB428"));
2825
2851
  }
2852
+ if (vhkVersion) {
2853
+ const latest = fetchLatestNpmVersion("@byh3071/vhk");
2854
+ if (latest && compareSemver(latest, vhkVersion) > 0) {
2855
+ console.log(chalk10.yellow(` ${ko.doctor.updateAvailable(latest)}`));
2856
+ } else if (latest) {
2857
+ console.log(chalk10.dim(` ${ko.doctor.updateCurrent}`));
2858
+ }
2859
+ }
2826
2860
  console.log("");
2827
2861
  console.log(chalk10.bold(` ${ko.doctor.projectFiles}`));
2828
2862
  const cwd = process.cwd();
@@ -2885,6 +2919,29 @@ var CHECKLIST = [
2885
2919
  function sanitizeVersion(version) {
2886
2920
  return version.trim().replace(/^v/i, "").replace(/[^a-zA-Z0-9._-]/g, "-") || "0.0.0";
2887
2921
  }
2922
+ function updateChangelogUnreleased(cwd, version, date) {
2923
+ const changelogPath = path13.join(cwd, "CHANGELOG.md");
2924
+ if (!fs13.existsSync(changelogPath)) return { status: "missing" };
2925
+ const content = fs13.readFileSync(changelogPath, "utf-8");
2926
+ const unreleasedHeading = /^## \[Unreleased\][^\n]*$/m;
2927
+ if (!unreleasedHeading.test(content)) return { status: "no-unreleased" };
2928
+ const blankUnreleased = [
2929
+ "## [Unreleased]",
2930
+ "",
2931
+ "### Added",
2932
+ "- ",
2933
+ "",
2934
+ "### Fixed",
2935
+ "- ",
2936
+ "",
2937
+ "---",
2938
+ "",
2939
+ `## [${version}] \u2014 ${date}`
2940
+ ].join("\n");
2941
+ const updated = content.replace(unreleasedHeading, blankUnreleased);
2942
+ fs13.writeFileSync(changelogPath, updated, "utf-8");
2943
+ return { status: "updated", version };
2944
+ }
2888
2945
  async function ship() {
2889
2946
  console.log(chalk11.bold(`
2890
2947
  ${ko.ship.title}
@@ -2976,6 +3033,14 @@ ${ko.ship.title}
2976
3033
  fs13.writeFileSync(filePath, content, "utf-8");
2977
3034
  console.log(chalk11.green(`
2978
3035
  ${ko.ship.buildLogDone(path13.relative(cwd, filePath))}`));
3036
+ const changelogResult = updateChangelogUnreleased(cwd, versionSlug, today);
3037
+ if (changelogResult.status === "updated") {
3038
+ log.success(ko.ship.changelogUpdated(changelogResult.version));
3039
+ } else if (changelogResult.status === "no-unreleased") {
3040
+ log.warn(ko.ship.changelogNoUnreleased);
3041
+ } else {
3042
+ log.info(ko.ship.changelogMissing);
3043
+ }
2979
3044
  printNextStep({
2980
3045
  message: ko.ship.deployMessage,
2981
3046
  command: "npm publish --access=public",
@@ -3564,7 +3629,7 @@ var KO_ALIASES = {
3564
3629
  status: "\uC0C1\uD0DC",
3565
3630
  diff: "\uBCC0\uACBD"
3566
3631
  };
3567
- program.name("vhk").description("VHK \u2014 \uBC14\uC774\uBE0C\uCF54\uB529 \uD504\uB85C\uC81D\uD2B8 \uCF54\uCE58 (\uD55C\uAD6D\uC5B4\uB85C \uC548\uB0B4\uD569\uB2C8\uB2E4)").version("0.5.2");
3632
+ program.name("vhk").description("VHK \u2014 \uBC14\uC774\uBE0C\uCF54\uB529 \uD504\uB85C\uC81D\uD2B8 \uCF54\uCE58 (\uD55C\uAD6D\uC5B4\uB85C \uC548\uB0B4\uD569\uB2C8\uB2E4)").version("0.5.3");
3568
3633
  program.configureHelp({
3569
3634
  formatHelp(cmd, helper) {
3570
3635
  if (cmd.parent) {
package/package.json CHANGED
@@ -1,56 +1,62 @@
1
- {
2
- "name": "@byh3071/vhk",
3
- "version": "0.5.2",
4
- "description": "Vibe Harness Kit โ€” ๋ฐ”์ด๋ธŒ์ฝ”๋”ฉ ํ’€์‚ฌ์ดํด CLI",
5
- "bin": {
6
- "vhk": "./dist/index.js"
7
- },
8
- "type": "module",
9
- "scripts": {
10
- "dev": "tsx src/index.ts",
11
- "build": "tsup",
12
- "test": "vitest",
13
- "test:run": "vitest --run",
14
- "prepublishOnly": "pnpm build && pnpm test:run"
15
- },
16
- "files": [
17
- "dist",
18
- "README.md",
19
- "LICENSE"
20
- ],
21
- "keywords": [
22
- "vibe-coding",
23
- "harness",
24
- "cli",
25
- "scaffold",
26
- "session-log",
27
- "rules-sync"
28
- ],
29
- "author": "byh3071 <byh3071@gmail.com>",
30
- "license": "MIT",
31
- "repository": {
32
- "type": "git",
33
- "url": "https://github.com/byh3071-cpu/vhk.git"
34
- },
35
- "engines": {
36
- "node": ">=20"
37
- },
38
- "dependencies": {
39
- "@notionhq/client": "^5.22.0",
40
- "chalk": "^5.6.2",
41
- "commander": "^14.0.3",
42
- "handlebars": "^4.7.9",
43
- "inquirer": "^9.3.8",
44
- "ora": "^9.4.0",
45
- "simple-git": "^3.36.0"
46
- },
47
- "devDependencies": {
48
- "@types/inquirer": "^9.0.9",
49
- "@types/node": "^25.9.1",
50
- "ignore": "^7.0.5",
51
- "tsup": "^8.5.1",
52
- "tsx": "^4.22.3",
53
- "typescript": "^6.0.3",
54
- "vitest": "^4.1.7"
55
- }
56
- }
1
+ {
2
+ "name": "@byh3071/vhk",
3
+ "version": "0.5.3",
4
+ "description": "Vibe Harness Kit โ€” ๋ฐ”์ด๋ธŒ์ฝ”๋”ฉ ํ’€์‚ฌ์ดํด CLI",
5
+ "bin": {
6
+ "vhk": "dist/index.js"
7
+ },
8
+ "type": "module",
9
+ "scripts": {
10
+ "dev": "tsx src/index.ts",
11
+ "build": "tsup",
12
+ "test": "vitest",
13
+ "test:run": "vitest --run",
14
+ "prepublishOnly": "pnpm build && pnpm test:run",
15
+ "save": "vhk save",
16
+ "check": "vhk check",
17
+ "scan": "vhk secure scan",
18
+ "recap": "vhk recap",
19
+ "ship": "vhk ship",
20
+ "doctor": "vhk doctor"
21
+ },
22
+ "files": [
23
+ "dist",
24
+ "README.md",
25
+ "LICENSE"
26
+ ],
27
+ "keywords": [
28
+ "vibe-coding",
29
+ "harness",
30
+ "cli",
31
+ "scaffold",
32
+ "session-log",
33
+ "rules-sync"
34
+ ],
35
+ "author": "byh3071 <byh3071@gmail.com>",
36
+ "license": "MIT",
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/byh3071-cpu/vhk.git"
40
+ },
41
+ "engines": {
42
+ "node": ">=20"
43
+ },
44
+ "dependencies": {
45
+ "@notionhq/client": "^5.22.0",
46
+ "chalk": "^5.6.2",
47
+ "commander": "^14.0.3",
48
+ "handlebars": "^4.7.9",
49
+ "inquirer": "^9.3.8",
50
+ "ora": "^9.4.0",
51
+ "simple-git": "^3.36.0"
52
+ },
53
+ "devDependencies": {
54
+ "@types/inquirer": "^9.0.9",
55
+ "@types/node": "^25.9.1",
56
+ "ignore": "^7.0.5",
57
+ "tsup": "^8.5.1",
58
+ "tsx": "^4.22.3",
59
+ "typescript": "^6.0.3",
60
+ "vitest": "^4.1.7"
61
+ }
62
+ }