@kenkyou/supekku 0.1.0-alpha.0 → 0.1.0-alpha.1

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.
package/README.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  以規格驅動 AI Agent 開發:討論、提案、規格/設計、Tasks、驗證、TDD/Review、正式規格合併與封存。Artifact 是可選的討論材料;純本機開發流程不需要 Web 帳號或 Google 登入。
4
4
 
5
- 目前為 `0.1.0-alpha.0` 預覽候選。此版本尚在發布準備;以下 npm 指令在套件發布後才可使用。
5
+ 此套件為 `0.1.0-alpha.1` 預覽版,建議明確使用 `@next`;預覽版不代表穩定版。
6
6
 
7
7
  ## 安裝
8
8
 
9
- 需要 Node.js **24.22.1 或以上**。發布後安裝指定的預覽標籤:
9
+ 需要 Node.js **24.22.1 或以上**。安裝指定的預覽標籤:
10
10
 
11
11
  ```sh
12
12
  npm install -g @kenkyou/supekku@next
@@ -37,7 +37,7 @@ supekku doctor --project /path/to/project --target .agents/skills --json
37
37
 
38
38
  兩套隨附 skill 為 `supekku-development` 與 `supekku-artifacts`。請選擇 Agent 支援的目錄並重新載入;安裝不代表 Agent 已載入。使用 development skill 完成提案到封存;CLI 不會因評論或規格確認自動授權實作。
39
39
 
40
- 正式文件保存在 `.supekku/`,建議進 Git;`.supekku/.local/` 是私有日誌,不進 Git,也不是可隨意刪除的快取。已有上層 Supekku 專案時不能再建立巢狀根目錄。
40
+ 正式文件保存在 `.supekku/`,建議進 Git;`.supekku/.local/` 是私有日誌,不進 Git,也不是可隨意刪除的快取。預設拒絕在上層 Supekku 專案內初始化;新版原始碼支援明確指定 `local init --project <root> --independent` 建立獨立根目錄,不修改上層資料。此選項自 0.1.0-alpha.1 提供。
41
41
 
42
42
  ## 選用 Web 協作
43
43
 
@@ -52,7 +52,7 @@ supekku artifact template document review-notes --json
52
52
 
53
53
  ## 平台與更新
54
54
 
55
- 目前 macOS arm64 有本機驗證;macOS x64、Linux x64 glibc、Windows x64 的這個發布候選尚待獨立驗證,不把安裝成功或預覽標籤當成四平台認證。原生依賴需要對應預編譯產物。
55
+ 0.1.0-alpha.0 已在 macOS arm64/x64、Linux x64 glibc、Windows x64 的 CI 以同一份 tarball 通過乾淨安裝與 CLI 行為驗證,停用安裝腳本以確認不依賴現場編譯。此結果不代表最低 OS/glibc 或所有遠端憑證操作已驗證。
56
56
 
57
57
  由早期內部 `@supekku/cli` 改名為 `@kenkyou/supekku`。舊套件與既有專案不會自動搬移;舊 scope 的 skill 收據會被當成不同套件,請保留自訂內容、使用新的支援目錄安裝,不修改收據來繞過保護。
58
58
 
@@ -1,6 +1,6 @@
1
1
  # Agent 安裝與專案啟用
2
2
 
3
- 需要 Node 24.22.1 或以上的受測版本。請使用已建置/安裝的新版 `@kenkyou/supekku`;`--version` 取自執行套件的 package.json。目前候選預覽版本為 0.1.0-alpha.0,不代表已公開發布或完成四平台發行認證。專案裡若還有舊版同名 CLI,先確認你執行的檔案路徑;以下 `supekku` 都指新版安裝後的 bin。
3
+ 需要 Node 24.22.1 或以上的受測版本。請使用已建置/安裝的新版 `@kenkyou/supekku`;`--version` 取自執行套件的 package.json。本指南對應 0.1.0-alpha.1;發行驗證以各版 release 紀錄為準。專案裡若還有舊版同名 CLI,先確認你執行的檔案路徑;以下 `supekku` 都指新版安裝後的 bin。
4
4
 
5
5
  ## 第一次使用
6
6
 
@@ -14,6 +14,18 @@ supekku doctor --project /path/to/project --target .agents/skills --json
14
14
 
15
15
  `local init` 建立 .supekku/.local 的本機 journal 與排除規則,不登入、不綁 Web,也不建立提案。既有根目錄可重複執行;在已管理專案的子目錄初始化會被拒絕並指出既有根目錄,不自動另建巢狀專案。舊 supekku/ 必須明確 migrate-directory;舊 journal 必須明確 db upgrade,不刪除資料繞過。
16
16
 
17
+ ### 在上層專案內明確建立獨立根目錄
18
+
19
+ 若上層有舊 `supekku/` 或 `.supekku/`,但目標資料夾應是另一個專案,可以明確指定:
20
+
21
+ ```sh
22
+ supekku local init --project /path/to/hakulax --independent --json
23
+ ```
24
+
25
+ 此選項僅適用 local init,必須同時提供 --project。只初始化指定資料夾,不掃描或遷移上層管理資料。後續指令從新根目錄或其子目錄尋找最近的 `.supekku/`。不加此選項時仍保留原本拒絕巢狀初始化的行為。
26
+
27
+ 目標本身若有舊 supekku/、新舊目錄衝突、symlink 或不安全 journal,仍拒絕;沒有 force 覆寫。此功能不會安裝 skills、綁定網站或授權實作。不要把獨立子專案目錄列入父專案 Task scope。此選項自 0.1.0-alpha.1 提供,alpha.0 不支援。
28
+
17
29
  `--target` 是專案根目錄相對路徑,必須明確指定。`.agents/skills` 是一個例子;只有所用 Agent 支援該位置時才使用。也可指定支援的專案內 `.codex/skills`。不支援全域路徑、自動偵測 Agent 或改寫 AGENTS.md。安裝後請依 Agent 的設定重新載入/重開對話,doctor 不會假裝能確認 Agent 已載入。
18
30
 
19
31
  兩套隨執行中 CLI 發行的 skill 都會安裝:`supekku-development`(提案、TDD、Review、封存)與 `supekku-artifacts`(可選的討論材料與發布)。此流程完全離線;只有需要 Web 發布/評論時再依 CLI 發布指南 connect。
@@ -1,5 +1,5 @@
1
1
  import { t as CoreError } from "./src-CRhxwFAN.mjs";
2
- import { n as directoryPresence, o as projectObservation } from "./project-YL4kEL7c.mjs";
2
+ import { n as directoryPresence, o as projectObservation } from "./project-CdWOw1Ab.mjs";
3
3
  import { t as nodeSupported } from "./package-Ci4aNmkW.mjs";
4
4
  import { i as targetPath, r as skillStatus } from "./skills-BmMLLF83.mjs";
5
5
  import { join } from "node:path";
package/dist/index.mjs CHANGED
@@ -20,7 +20,7 @@ const commands = {
20
20
  "operation show": 1
21
21
  };
22
22
  const help = [
23
- "local init [--project <root>] [--lock-wait <0..60000>] [--json]",
23
+ "local init [--project <root>] [--independent] [--lock-wait <0..60000>] [--json]",
24
24
  "skills install|status --target <project-relative-directory> [--project <path>] [--json]",
25
25
  "doctor [--project <path>] [--target <project-relative-directory>] [--json]",
26
26
  "change archive-list [--all] [--project <path>] [--json]",
@@ -62,13 +62,14 @@ function parseArguments(raw) {
62
62
  "skills status",
63
63
  "local init"
64
64
  ].includes(command)) throw new CoreError("INVALID_ARGUMENT", "Unknown onboarding command");
65
- let project = process.cwd(), target, json = false, waitMs = 0;
65
+ let project = process.cwd(), target, json = false, waitMs = 0, independent = false;
66
66
  const seen = /* @__PURE__ */ new Set();
67
67
  for (let i = command === "doctor" ? 1 : 2; i < raw.length; i++) {
68
68
  const key = raw[i];
69
69
  if (seen.has(key)) throw new CoreError("INVALID_ARGUMENT", "Duplicate onboarding option");
70
70
  seen.add(key);
71
- if (key === "--json") json = true;
71
+ if (key === "--independent" && command === "local init") independent = true;
72
+ else if (key === "--json") json = true;
72
73
  else if (key === "--project" || key === "--target" && command !== "local init") {
73
74
  const value = raw[++i];
74
75
  if (!value || value.startsWith("--")) throw new CoreError("INVALID_ARGUMENT", "Expected an option path");
@@ -81,12 +82,14 @@ function parseArguments(raw) {
81
82
  } else throw new CoreError("INVALID_ARGUMENT", "Unexpected onboarding option");
82
83
  }
83
84
  if (command.startsWith("skills ") && target === void 0) throw new CoreError("INVALID_ARGUMENT", "Expected --target <project-relative-directory>");
85
+ if (independent && !seen.has("--project")) throw new CoreError("INVALID_ARGUMENT", "--independent requires explicit --project <root>");
84
86
  return {
85
87
  command,
86
88
  args: target === void 0 ? [] : [target],
87
89
  project,
88
90
  json,
89
- waitMs
91
+ waitMs,
92
+ independent
90
93
  };
91
94
  }
92
95
  if (raw[0] === "change" && raw[1] === "archive-list") {
@@ -489,11 +492,11 @@ try {
489
492
  const { packageIdentity } = await import("./package-Dg68Av6x.mjs");
490
493
  const identity = await packageIdentity();
491
494
  if (command === "doctor") {
492
- const { doctor } = await import("./doctor-DYGXldO4.mjs");
495
+ const { doctor } = await import("./doctor-CPnbf1nt.mjs");
493
496
  data = await doctor(parsed.project ?? process.cwd(), args[0], identity);
494
497
  if (!data.ready) process.exitCode = 2;
495
498
  } else {
496
- const { initializedProject, nativeProject } = await import("./project-B4BDXHwA.mjs");
499
+ const { initializedProject, nativeProject } = await import("./project-B-H-RbPP.mjs");
497
500
  const root = await (command === "skills install" ? initializedProject : nativeProject)(parsed.project ?? process.cwd());
498
501
  const { installSkills, skillStatus } = await import("./skills-CtT50_yk.mjs");
499
502
  data = command === "skills install" ? await installSkills(root, args[0], identity) : await skillStatus(root, args[0], identity);
@@ -580,8 +583,8 @@ try {
580
583
  signal: controller.signal
581
584
  }, async () => {
582
585
  if (command === "local init") {
583
- const { initializeProject } = await import("./project-B4BDXHwA.mjs");
584
- return initializeProject(parsed.project ?? process.cwd());
586
+ const { initializeProject } = await import("./project-B-H-RbPP.mjs");
587
+ return initializeProject(parsed.project ?? process.cwd(), "independent" in parsed && parsed.independent);
585
588
  }
586
589
  if (command === "operation show" || command === "operation list") {
587
590
  const local = await import("./local-DrJ8z2qm.mjs");
@@ -1 +1 @@
1
- export { r as initializeProject, i as initializedProject, a as nativeProject } from "./project-YL4kEL7c.mjs";
1
+ export { r as initializeProject, i as initializedProject, a as nativeProject } from "./project-CdWOw1Ab.mjs";
@@ -34,7 +34,7 @@ async function canonicalRoot(start) {
34
34
  root: await realpath(requested)
35
35
  };
36
36
  }
37
- async function projectObservation(start) {
37
+ async function projectObservation(start, exact = false) {
38
38
  const { requested, root } = await canonicalRoot(start);
39
39
  let candidate = root;
40
40
  for (;;) {
@@ -47,7 +47,7 @@ async function projectObservation(start) {
47
47
  state: current && legacy ? "conflict" : legacy ? "legacy" : "current"
48
48
  };
49
49
  const parent = dirname(candidate);
50
- if (parent === candidate) return {
50
+ if (exact || parent === candidate) return {
51
51
  requested,
52
52
  root,
53
53
  discoveredRoot: null,
@@ -68,8 +68,8 @@ async function initializedProject(start) {
68
68
  if (!await directoryPresence(join(root, ".supekku/.local"))) throw new CoreError("NOT_INITIALIZED", "Run local init --project <root> first");
69
69
  return root;
70
70
  }
71
- async function initializeProject(start) {
72
- const observed = await projectObservation(start);
71
+ async function initializeProject(start, independent = false) {
72
+ const observed = await projectObservation(start, independent);
73
73
  if (observed.state === "conflict") throw new CoreError("INVALID_PATH", "Both .supekku and supekku exist; never merge automatically");
74
74
  if (observed.state === "legacy") throw new CoreError("MIGRATION_REQUIRED", "Run project migrate-directory explicitly");
75
75
  if (observed.discoveredRoot && observed.discoveredRoot !== observed.root) throw new CoreError("LOCAL_CONFLICT", `An existing project is rooted at ${observed.discoveredRoot}; initialize that exact root instead`);
@@ -1,6 +1,6 @@
1
1
  # Agent 安裝與專案啟用
2
2
 
3
- 需要 Node 24.22.1 或以上的受測版本。請使用已建置/安裝的新版 `@kenkyou/supekku`;`--version` 取自執行套件的 package.json。目前候選預覽版本為 0.1.0-alpha.0,不代表已公開發布或完成四平台發行認證。專案裡若還有舊版同名 CLI,先確認你執行的檔案路徑;以下 `supekku` 都指新版安裝後的 bin。
3
+ 需要 Node 24.22.1 或以上的受測版本。請使用已建置/安裝的新版 `@kenkyou/supekku`;`--version` 取自執行套件的 package.json。本指南對應 0.1.0-alpha.1;發行驗證以各版 release 紀錄為準。專案裡若還有舊版同名 CLI,先確認你執行的檔案路徑;以下 `supekku` 都指新版安裝後的 bin。
4
4
 
5
5
  ## 第一次使用
6
6
 
@@ -14,6 +14,18 @@ supekku doctor --project /path/to/project --target .agents/skills --json
14
14
 
15
15
  `local init` 建立 .supekku/.local 的本機 journal 與排除規則,不登入、不綁 Web,也不建立提案。既有根目錄可重複執行;在已管理專案的子目錄初始化會被拒絕並指出既有根目錄,不自動另建巢狀專案。舊 supekku/ 必須明確 migrate-directory;舊 journal 必須明確 db upgrade,不刪除資料繞過。
16
16
 
17
+ ### 在上層專案內明確建立獨立根目錄
18
+
19
+ 若上層有舊 `supekku/` 或 `.supekku/`,但目標資料夾應是另一個專案,可以明確指定:
20
+
21
+ ```sh
22
+ supekku local init --project /path/to/hakulax --independent --json
23
+ ```
24
+
25
+ 此選項僅適用 local init,必須同時提供 --project。只初始化指定資料夾,不掃描或遷移上層管理資料。後續指令從新根目錄或其子目錄尋找最近的 `.supekku/`。不加此選項時仍保留原本拒絕巢狀初始化的行為。
26
+
27
+ 目標本身若有舊 supekku/、新舊目錄衝突、symlink 或不安全 journal,仍拒絕;沒有 force 覆寫。此功能不會安裝 skills、綁定網站或授權實作。不要把獨立子專案目錄列入父專案 Task scope。此選項自 0.1.0-alpha.1 提供,alpha.0 不支援。
28
+
17
29
  `--target` 是專案根目錄相對路徑,必須明確指定。`.agents/skills` 是一個例子;只有所用 Agent 支援該位置時才使用。也可指定支援的專案內 `.codex/skills`。不支援全域路徑、自動偵測 Agent 或改寫 AGENTS.md。安裝後請依 Agent 的設定重新載入/重開對話,doctor 不會假裝能確認 Agent 已載入。
18
30
 
19
31
  兩套隨執行中 CLI 發行的 skill 都會安裝:`supekku-development`(提案、TDD、Review、封存)與 `supekku-artifacts`(可選的討論材料與發布)。此流程完全離線;只有需要 Web 發布/評論時再依 CLI 發布指南 connect。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kenkyou/supekku",
3
- "version": "0.1.0-alpha.0",
3
+ "version": "0.1.0-alpha.1",
4
4
  "bin": {
5
5
  "supekku": "dist/index.mjs"
6
6
  },