boxglow 0.4.0 → 0.4.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/bin/boxglow.js CHANGED
@@ -45,6 +45,9 @@ var canvasReview = {
45
45
 
46
46
  // src/i18n/en/gui.ts
47
47
  var gui = {
48
+ "\u56DE\u7B54\u5F85\u3061 {n}": "Awaiting answers: {n}",
49
+ "AI\u672A\u78BA\u8A8D {n}": "Unacknowledged: {n}",
50
+ "Status \u3067\u78BA\u8A8D": "View in Status",
48
51
  "\u984C\u540D": "Title",
49
52
  "\u540D\u524D": "Name",
50
53
  "\u8AAC\u660E": "Description",
@@ -518,6 +521,30 @@ var cli = {
518
521
  "(Ctrl+C \u3067\u7D42\u4E86)": "(Ctrl+C to stop)",
519
522
  "\u8A08\u753B\u304C\u4ED6\u306E\u5909\u66F4\u3067\u66F4\u65B0\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u6700\u65B0\u306E\u5185\u5BB9\u3092\u8AAD\u307F\u76F4\u3057\u3066\u304B\u3089\u3084\u308A\u76F4\u3057\u3066\u304F\u3060\u3055\u3044 (\u4ECA\u56DE\u306E\u5909\u66F4\u306F\u66F8\u304D\u8FBC\u3093\u3067\u3044\u307E\u305B\u3093)": "The plan changed. Reload its latest context and retry; your changes were not written.",
520
523
  "\u4ED6\u306E Boxglow \u304C\u8A08\u753B\u30D5\u30A1\u30A4\u30EB\u306B\u66F8\u304D\u8FBC\u307F\u4E2D\u3067\u3059 (\u30ED\u30C3\u30AF\u4E2D)\u3002\u7D42\u308F\u3063\u3066\u304B\u3089\u3084\u308A\u76F4\u3057\u3066\u304F\u3060\u3055\u3044": "Another Boxglow writer holds the file lock. Retry after it finishes.",
524
+ "\u4E0D\u660E": "unknown",
525
+ "{n} \u79D2\u524D": "{n} s ago",
526
+ "\u5BFE\u8C61: {file}": "File: {file}",
527
+ "\u30ED\u30C3\u30AF\u306E\u6301\u3061\u4E3B: pid {pid} / \u30DE\u30B7\u30F3 {host} / OS {platform} / \u53D6\u5F97 {at} ({age})": "Lock owner: pid {pid} / host {host} / OS {platform} / taken {at} ({age})",
528
+ "\u5224\u5B9A: {reason}": "Verdict: {reason}",
529
+ "\u56DE\u53CE\u4E2D\u3001\u307E\u305F\u306F\u56DE\u53CE\u306E\u8A18\u9332\u304C\u6B8B\u3063\u3066\u3044\u307E\u3059: pid {pid} / \u30DE\u30B7\u30F3 {host} / OS {platform} ({reason})": "Recovery in progress, or a recovery marker remains: pid {pid} / host {host} / OS {platform} ({reason})",
530
+ "\u4ED6\u306E\u66F8\u304D\u624B\u304C\u56DE\u53CE\u30FB\u89E3\u9664\u306E\u9014\u4E2D\u306E\u53EF\u80FD\u6027\u304C\u3042\u308A\u3001\u89E3\u9664\u306E\u6A29\u5229\u3092\u53D6\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002boxglow unlock \u3067\u72B6\u614B\u3092\u3082\u3046\u4E00\u5EA6\u78BA\u304B\u3081\u3066\u304F\u3060\u3055\u3044": "Another writer may be recovering or removing this lock; the right to remove it could not be taken. Check the status again with boxglow unlock",
531
+ "\u5F85\u3063\u3066\u3082\u89E3\u3051\u306A\u3044\u3068\u304D\u306F boxglow unlock \u3067\u72B6\u614B\u3092\u78BA\u304B\u3081\u3001\u4EBA\u306B\u89E3\u9664\u3092\u983C\u3093\u3067\u304F\u3060\u3055\u3044 (AI \u306F\u81EA\u5206\u3067\u30ED\u30C3\u30AF\u3092\u6D88\u3055\u306A\u3044)": "If waiting does not help, check it with boxglow unlock and ask a person to remove it (an agent never removes the lock itself)",
532
+ "\u6301\u3061\u4E3B\u306E\u8A18\u9332\u304C\u7121\u3044\u3001\u307E\u305F\u306F\u8AAD\u3081\u307E\u305B\u3093": "The owner record is missing or unreadable",
533
+ "\u65E7\u7248\u306E Boxglow \u304C\u53D6\u3063\u305F\u30ED\u30C3\u30AF\u3067\u3001\u6301\u3061\u4E3B\u306E\u74B0\u5883\u3092\u78BA\u304B\u3081\u3089\u308C\u307E\u305B\u3093": "Taken by an older Boxglow; the owner's environment cannot be verified",
534
+ "\u5225\u306E\u30DE\u30B7\u30F3\u306E\u66F8\u304D\u624B\u306E\u30ED\u30C3\u30AF\u3067\u3059 (\u3053\u3061\u3089\u304B\u3089\u306F\u751F\u6B7B\u3092\u78BA\u304B\u3081\u3089\u308C\u307E\u305B\u3093)": "Held by a writer on another machine (its liveness cannot be checked from here)",
535
+ "\u30DE\u30B7\u30F3\u540D\u306F\u540C\u3058\u3067\u3059\u304C OS \u304C\u9055\u3044\u307E\u3059 (Windows \u3068 WSL \u306A\u3069)\u3002\u3053\u3061\u3089\u304B\u3089\u306F\u6301\u3061\u4E3B\u306E\u751F\u6B7B\u3092\u78BA\u304B\u3081\u3089\u308C\u307E\u305B\u3093": "Same machine name but a different OS (for example Windows and WSL); the owner's liveness cannot be checked from here",
536
+ "\u30D7\u30ED\u30BB\u30B9\u756A\u53F7\u306E\u7A7A\u9593\u304C\u9055\u3046\u304B\u3001\u78BA\u304B\u3081\u3089\u308C\u307E\u305B\u3093 (\u5225\u306E\u30B3\u30F3\u30C6\u30CA\u30FB\u518D\u8D77\u52D5\u306E\u524D\u5F8C\u306A\u3069)": "The process-ID space differs or cannot be verified (another container, before/after a reboot, ...)",
537
+ "\u6301\u3061\u4E3B\u306E\u30D7\u30ED\u30BB\u30B9\u306F\u7D42\u4E86\u3057\u3066\u3044\u307E\u3059": "The owner process has exited",
538
+ "\u6301\u3061\u4E3B\u306E\u30D7\u30ED\u30BB\u30B9\u306F\u7D42\u4E86\u3057\u3066\u3044\u307E\u3059 (\u540C\u3058\u756A\u53F7\u3067\u5225\u306E\u30D7\u30ED\u30BB\u30B9\u304C\u52D5\u3044\u3066\u3044\u307E\u3059)": "The owner process has exited (another process now runs with the same pid)",
539
+ "\u6301\u3061\u4E3B\u306E\u30D7\u30ED\u30BB\u30B9\u306F\u52D5\u3044\u3066\u3044\u307E\u3059": "The owner process is running",
540
+ "\u6301\u3061\u4E3B\u306E\u30D7\u30ED\u30BB\u30B9\u306F\u3053\u306E\u30DE\u30B7\u30F3\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u304C\u3001\u3053\u306E OS \u3067\u306F\u540C\u3058\u30DE\u30B7\u30F3\u306E\u30ED\u30C3\u30AF\u304B\u3092\u78BA\u304B\u3081\u3089\u308C\u307E\u305B\u3093": "The owner process was not found on this machine, but on this OS it cannot be verified that the lock was taken on this machine",
541
+ "\u30ED\u30C3\u30AF\u306F\u3042\u308A\u307E\u305B\u3093: {path}": "No lock: {path}",
542
+ "\u6301\u3061\u4E3B\u304C\u52D5\u3044\u3066\u3044\u308B\u306E\u3067\u3001\u89E3\u9664\u3067\u304D\u307E\u305B\u3093\u3002\u4FDD\u5B58\u304C\u7D42\u308F\u308B\u306E\u3092\u5F85\u3064\u304B\u3001\u305D\u306E\u30D7\u30ED\u30BB\u30B9\u3092\u6B62\u3081\u3066\u304B\u3089\u3082\u3046\u4E00\u5EA6\u78BA\u304B\u3081\u3066\u304F\u3060\u3055\u3044": "The owner is running, so the lock cannot be removed. Wait for the save to finish, or stop that process and check again",
543
+ "\u89E3\u9664\u3059\u308B\u306B\u306F\u3001\u3053\u306E\u8A08\u753B\u3092\u958B\u3044\u3066\u3044\u308B Boxglow (CLI\u30FBserve\u30FBVS Code\u3002\u5225\u306E OS \u3084\u30DE\u30B7\u30F3\u306E\u3082\u306E\u3082\u542B\u3080) \u3092\u6B62\u3081\u3066\u304B\u3089\u3001\u4EBA\u304C\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044: boxglow unlock --remove --lock-token {token} --actor human": "To remove it, stop every Boxglow that has this plan open (CLI, serve, VS Code; including ones on another OS or machine), then a person runs: boxglow unlock --remove --lock-token {token} --actor human",
544
+ "\u30ED\u30C3\u30AF\u306E\u89E3\u9664\u306F\u4EBA\u304C\u884C\u3044\u307E\u3059\u3002AI \u306F boxglow unlock \u306E\u8868\u793A\u3092\u4EBA\u306B\u898B\u305B\u3066\u3001\u89E3\u9664\u3092\u983C\u3093\u3067\u304F\u3060\u3055\u3044 (\u81EA\u5206\u3067 --actor human \u3092\u4ED8\u3051\u305F\u308A\u3001\u30ED\u30C3\u30AF\u3092\u76F4\u63A5\u6D88\u3057\u305F\u308A\u3057\u306A\u3044)": "Removing a lock is done by a person. An agent shows the boxglow unlock output and asks a person (never add --actor human yourself or delete the lock directly)",
545
+ "--lock-token <boxglow unlock \u304C\u8868\u793A\u3057\u305F\u5370> \u3092\u4ED8\u3051\u3066\u304F\u3060\u3055\u3044 (\u8868\u793A\u306E\u3042\u3068\u3067\u5225\u306E\u30ED\u30C3\u30AF\u306B\u66FF\u308F\u3063\u3066\u3044\u306A\u3044\u304B\u3092\u78BA\u304B\u3081\u308B\u305F\u3081)": "Pass --lock-token <token shown by boxglow unlock> (it confirms the lock has not been replaced since it was shown)",
546
+ "\u30ED\u30C3\u30AF\u3092\u89E3\u9664\u3057\u307E\u3057\u305F: {path}": "Lock removed: {path}",
547
+ "\u8868\u793A\u306E\u3042\u3068\u3067\u5225\u306E\u30ED\u30C3\u30AF\u306B\u66FF\u308F\u3063\u3066\u3044\u307E\u3059\u3002boxglow unlock \u3067\u3082\u3046\u4E00\u5EA6\u78BA\u304B\u3081\u3066\u304F\u3060\u3055\u3044": "The lock was replaced after it was shown. Check again with boxglow unlock",
521
548
  "\u5148\u306B boxglow context {block} \u3092\u8AAD\u307F\u3001--context-token <contextToken> \u3092\u4ED8\u3051\u3066\u3084\u308A\u76F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u6307\u793A\u30FB\u56DE\u7B54\u30FB\u5F15\u304D\u7D99\u304E\u304C\u672A\u8AAD\u304B\u3001\u8AAD\u3093\u3060\u5F8C\u306B\u5909\u66F4\u3055\u308C\u3066\u3044\u307E\u3059": "Read boxglow context {block}, then retry with --context-token <contextToken>. Instructions, answers or handoff notes are unread or changed.",
522
549
  "guard on|off \u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044": "Usage: boxglow guard on|off",
523
550
  "\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u306E\u8981\u6C42 (guard): {state}": "Context guard: {state}",
@@ -767,7 +794,7 @@ function t(ja, vars) {
767
794
  if (typeof document !== "undefined") document.documentElement.lang = current;
768
795
 
769
796
  // package.json
770
- var version = "0.4.0";
797
+ var version = "0.4.1";
771
798
 
772
799
  // src/model/version.ts
773
800
  var APP_VERSION = version;
@@ -903,7 +930,7 @@ import { spawn } from "node:child_process";
903
930
 
904
931
  // cli/file-store.ts
905
932
  import { createHash, randomUUID } from "node:crypto";
906
- import { closeSync, existsSync, fchmodSync, fsyncSync, mkdirSync, openSync, readFileSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
933
+ import { closeSync, existsSync, fchmodSync, fsyncSync, mkdirSync, openSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
907
934
  import { hostname } from "node:os";
908
935
  import { dirname, join, resolve } from "node:path";
909
936
  var revisionOf = (text2) => `"${createHash("sha256").update(text2).digest("hex")}"`;
@@ -913,17 +940,23 @@ var FileConflict = class extends Error {
913
940
  }
914
941
  };
915
942
  var FileBusy = class extends Error {
916
- constructor() {
917
- super(t("\u4ED6\u306E Boxglow \u304C\u8A08\u753B\u30D5\u30A1\u30A4\u30EB\u306B\u66F8\u304D\u8FBC\u307F\u4E2D\u3067\u3059 (\u30ED\u30C3\u30AF\u4E2D)\u3002\u7D42\u308F\u3063\u3066\u304B\u3089\u3084\u308A\u76F4\u3057\u3066\u304F\u3060\u3055\u3044"));
943
+ /** ロックの状態 (持ち主・判定)。このプロセス自身が持っているロックのときは無い */
944
+ status;
945
+ constructor(status) {
946
+ const base = t("\u4ED6\u306E Boxglow \u304C\u8A08\u753B\u30D5\u30A1\u30A4\u30EB\u306B\u66F8\u304D\u8FBC\u307F\u4E2D\u3067\u3059 (\u30ED\u30C3\u30AF\u4E2D)\u3002\u7D42\u308F\u3063\u3066\u304B\u3089\u3084\u308A\u76F4\u3057\u3066\u304F\u3060\u3055\u3044");
947
+ super(status ? `${base}
948
+ ${describeLock(status)}` : base);
949
+ this.status = status;
918
950
  }
919
951
  };
920
952
  var canonical = (file) => existsSync(file) ? realpathSync(file) : resolve(file);
921
- var LOCK_STALE_MS = 3e4;
922
- var LOCK_HARD_STALE_MS = 5 * 60 * 1e3;
923
953
  var LOCK_WAIT_MS = 3e3;
924
954
  var LOCK_RETRY_MS = 25;
925
955
  var RENAME_RETRIES = 8;
956
+ var LOCK_HINT_MS = 6e4;
957
+ var RELEASE_RETRIES = 3;
926
958
  var heldLocks = /* @__PURE__ */ new Set();
959
+ var failedReleases = /* @__PURE__ */ new Map();
927
960
  function sleepSync(ms) {
928
961
  Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
929
962
  }
@@ -932,88 +965,358 @@ function isAlive(pid) {
932
965
  process.kill(pid, 0);
933
966
  return true;
934
967
  } catch (e) {
935
- return e.code === "EPERM";
968
+ return e.code !== "ESRCH";
969
+ }
970
+ }
971
+ function procStat(who) {
972
+ try {
973
+ const text2 = readFileSync(`/proc/${who}/stat`, "utf8");
974
+ const open = text2.indexOf("("), close = text2.lastIndexOf(")");
975
+ if (open < 0 || close < open) return null;
976
+ const pid = Number(text2.slice(0, open).trim());
977
+ const start = text2.slice(close + 1).trim().split(/\s+/)[19];
978
+ return Number.isSafeInteger(pid) && /^\d+$/.test(start ?? "") ? { pid, start } : null;
979
+ } catch {
980
+ return null;
981
+ }
982
+ }
983
+ var cachedSpace;
984
+ function pidSpace() {
985
+ if (cachedSpace !== void 0) return cachedSpace;
986
+ cachedSpace = null;
987
+ if (process.platform !== "linux") return cachedSpace;
988
+ try {
989
+ if (procStat("self")?.pid !== process.pid) return cachedSpace;
990
+ const boot = readFileSync("/proc/sys/kernel/random/boot_id", "utf8").trim();
991
+ const ns = readlinkSync("/proc/self/ns/pid");
992
+ if (boot && ns) cachedSpace = `${boot}/${ns}`;
993
+ } catch {
994
+ }
995
+ return cachedSpace;
996
+ }
997
+ function selfOwner(token) {
998
+ return {
999
+ pid: process.pid,
1000
+ host: hostname(),
1001
+ at: (/* @__PURE__ */ new Date()).toISOString(),
1002
+ token,
1003
+ platform: process.platform,
1004
+ space: pidSpace(),
1005
+ start: process.platform === "linux" ? procStat("self")?.start ?? null : null
1006
+ };
1007
+ }
1008
+ function validOwner(value) {
1009
+ if (!value || typeof value !== "object") return null;
1010
+ const o = value;
1011
+ const optional = (v, ok) => v === void 0 || v === null || ok(v);
1012
+ const text2 = (x) => typeof x === "string" && x.length > 0;
1013
+ if (!Number.isSafeInteger(o.pid) || o.pid <= 0) return null;
1014
+ if (!text2(o.host) || !text2(o.at) || !text2(o.token)) return null;
1015
+ if (o.platform !== void 0 && !text2(o.platform)) return null;
1016
+ if (!optional(o.space, text2)) return null;
1017
+ if (!optional(o.start, (x) => typeof x === "string" && /^\d+$/.test(x))) return null;
1018
+ return o;
1019
+ }
1020
+ function readRecord(path) {
1021
+ try {
1022
+ return validOwner(JSON.parse(readFileSync(path, "utf8")));
1023
+ } catch {
1024
+ return null;
1025
+ }
1026
+ }
1027
+ var readOwner = (lock) => readRecord(join(lock, "owner.json"));
1028
+ function generationOf(lock) {
1029
+ const owner = readOwner(lock);
1030
+ if (owner) return owner.token;
1031
+ try {
1032
+ const st = statSync(lock);
1033
+ return `none-${st.ino}-${Math.floor(st.birthtimeMs)}`;
1034
+ } catch {
1035
+ return null;
1036
+ }
1037
+ }
1038
+ function judge(owner) {
1039
+ const unknown = (reason) => ({ verdict: "unknown", reason });
1040
+ if (!owner) return unknown(t("\u6301\u3061\u4E3B\u306E\u8A18\u9332\u304C\u7121\u3044\u3001\u307E\u305F\u306F\u8AAD\u3081\u307E\u305B\u3093"));
1041
+ if (typeof owner.platform !== "string") return unknown(t("\u65E7\u7248\u306E Boxglow \u304C\u53D6\u3063\u305F\u30ED\u30C3\u30AF\u3067\u3001\u6301\u3061\u4E3B\u306E\u74B0\u5883\u3092\u78BA\u304B\u3081\u3089\u308C\u307E\u305B\u3093"));
1042
+ if (owner.host !== hostname()) return unknown(t("\u5225\u306E\u30DE\u30B7\u30F3\u306E\u66F8\u304D\u624B\u306E\u30ED\u30C3\u30AF\u3067\u3059 (\u3053\u3061\u3089\u304B\u3089\u306F\u751F\u6B7B\u3092\u78BA\u304B\u3081\u3089\u308C\u307E\u305B\u3093)"));
1043
+ if (owner.platform !== process.platform) return unknown(t("\u30DE\u30B7\u30F3\u540D\u306F\u540C\u3058\u3067\u3059\u304C OS \u304C\u9055\u3044\u307E\u3059 (Windows \u3068 WSL \u306A\u3069)\u3002\u3053\u3061\u3089\u304B\u3089\u306F\u6301\u3061\u4E3B\u306E\u751F\u6B7B\u3092\u78BA\u304B\u3081\u3089\u308C\u307E\u305B\u3093"));
1044
+ const alive = isAlive(owner.pid);
1045
+ if (process.platform === "linux") {
1046
+ const mine = pidSpace();
1047
+ if (!mine || !owner.space || owner.space !== mine) return unknown(t("\u30D7\u30ED\u30BB\u30B9\u756A\u53F7\u306E\u7A7A\u9593\u304C\u9055\u3046\u304B\u3001\u78BA\u304B\u3081\u3089\u308C\u307E\u305B\u3093 (\u5225\u306E\u30B3\u30F3\u30C6\u30CA\u30FB\u518D\u8D77\u52D5\u306E\u524D\u5F8C\u306A\u3069)"));
1048
+ if (!alive) return { verdict: "dead", reason: t("\u6301\u3061\u4E3B\u306E\u30D7\u30ED\u30BB\u30B9\u306F\u7D42\u4E86\u3057\u3066\u3044\u307E\u3059") };
1049
+ const now2 = procStat(owner.pid)?.start;
1050
+ if (typeof owner.start === "string" && typeof now2 === "string" && now2 !== owner.start) return { verdict: "dead", reason: t("\u6301\u3061\u4E3B\u306E\u30D7\u30ED\u30BB\u30B9\u306F\u7D42\u4E86\u3057\u3066\u3044\u307E\u3059 (\u540C\u3058\u756A\u53F7\u3067\u5225\u306E\u30D7\u30ED\u30BB\u30B9\u304C\u52D5\u3044\u3066\u3044\u307E\u3059)") };
1051
+ return { verdict: "live", reason: t("\u6301\u3061\u4E3B\u306E\u30D7\u30ED\u30BB\u30B9\u306F\u52D5\u3044\u3066\u3044\u307E\u3059") };
1052
+ }
1053
+ if (alive) return { verdict: "live", reason: t("\u6301\u3061\u4E3B\u306E\u30D7\u30ED\u30BB\u30B9\u306F\u52D5\u3044\u3066\u3044\u307E\u3059") };
1054
+ return unknown(t("\u6301\u3061\u4E3B\u306E\u30D7\u30ED\u30BB\u30B9\u306F\u3053\u306E\u30DE\u30B7\u30F3\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u304C\u3001\u3053\u306E OS \u3067\u306F\u540C\u3058\u30DE\u30B7\u30F3\u306E\u30ED\u30C3\u30AF\u304B\u3092\u78BA\u304B\u3081\u3089\u308C\u307E\u305B\u3093"));
1055
+ }
1056
+ function inspectLock(file) {
1057
+ const target = canonical(file);
1058
+ const lock = `${target}.boxglow-lock`;
1059
+ const generation = generationOf(lock);
1060
+ if (generation === null) return null;
1061
+ const owner = readOwner(lock);
1062
+ const age = owner ? Date.now() - Date.parse(owner.at) : NaN;
1063
+ const top = listClaims(lock)?.at(-1);
1064
+ const reclaim2 = !!top;
1065
+ const claimer = top ? readClaim(lock, top.name) : null;
1066
+ return {
1067
+ lock,
1068
+ file: target,
1069
+ owner,
1070
+ ...judge(owner),
1071
+ ageMs: Number.isNaN(age) ? null : age,
1072
+ reclaim: reclaim2,
1073
+ reclaimer: reclaim2 ? { owner: claimer, ...judge(claimer) } : null,
1074
+ generation
1075
+ };
1076
+ }
1077
+ function describeLock(s) {
1078
+ const unknown = t("\u4E0D\u660E");
1079
+ const o = s.owner;
1080
+ const age = s.ageMs === null ? unknown : t("{n} \u79D2\u524D", { n: Math.max(0, Math.round(s.ageMs / 1e3)) });
1081
+ const lines = [
1082
+ t("\u5BFE\u8C61: {file}", { file: s.file }),
1083
+ t("\u30ED\u30C3\u30AF\u306E\u6301\u3061\u4E3B: pid {pid} / \u30DE\u30B7\u30F3 {host} / OS {platform} / \u53D6\u5F97 {at} ({age})", { pid: o?.pid ?? unknown, host: o?.host ?? unknown, platform: o?.platform ?? unknown, at: o?.at ?? unknown, age }),
1084
+ t("\u5224\u5B9A: {reason}", { reason: s.reason })
1085
+ ];
1086
+ if (s.reclaimer) {
1087
+ const c = s.reclaimer.owner;
1088
+ lines.push(t("\u56DE\u53CE\u4E2D\u3001\u307E\u305F\u306F\u56DE\u53CE\u306E\u8A18\u9332\u304C\u6B8B\u3063\u3066\u3044\u307E\u3059: pid {pid} / \u30DE\u30B7\u30F3 {host} / OS {platform} ({reason})", { pid: c?.pid ?? unknown, host: c?.host ?? unknown, platform: c?.platform ?? unknown, reason: s.reclaimer.reason }));
1089
+ }
1090
+ if (s.verdict !== "live" || s.reclaim || s.ageMs === null || s.ageMs >= LOCK_HINT_MS) {
1091
+ lines.push(t("\u5F85\u3063\u3066\u3082\u89E3\u3051\u306A\u3044\u3068\u304D\u306F boxglow unlock \u3067\u72B6\u614B\u3092\u78BA\u304B\u3081\u3001\u4EBA\u306B\u89E3\u9664\u3092\u983C\u3093\u3067\u304F\u3060\u3055\u3044 (AI \u306F\u81EA\u5206\u3067\u30ED\u30C3\u30AF\u3092\u6D88\u3055\u306A\u3044)"));
936
1092
  }
1093
+ return lines.join("\n");
937
1094
  }
938
- function readOwner(lock) {
1095
+ var lockTokenOf = (s) => s.generation;
1096
+ var CLAIM_NAME = /^reclaim(?:\.(\d+))?$/;
1097
+ function listClaims(lock) {
1098
+ let names;
939
1099
  try {
940
- const o = JSON.parse(readFileSync(join(lock, "owner.json"), "utf8"));
941
- return typeof o.pid === "number" && typeof o.host === "string" && typeof o.at === "string" && typeof o.token === "string" ? o : null;
1100
+ names = readdirSync(lock);
942
1101
  } catch {
943
1102
  return null;
944
1103
  }
1104
+ return names.flatMap((name) => {
1105
+ const m = CLAIM_NAME.exec(name);
1106
+ return m ? [{ name, n: m[1] ? Number(m[1]) : 1 }] : [];
1107
+ }).sort((a, b) => a.n - b.n);
945
1108
  }
946
- function isStale(lock, owner, staleMs) {
947
- if (!owner) {
1109
+ var readClaim = (lock, name) => readRecord(join(lock, name, "owner.json"));
1110
+ function placeClaim(lock, name, claimToken) {
1111
+ const claim = join(lock, name);
1112
+ const temp = join(lock, `.${randomUUID()}.claim`);
1113
+ const cleanup = () => {
948
1114
  try {
949
- return Date.now() - statSync(lock).mtimeMs > staleMs;
1115
+ rmSync(temp, { recursive: true, force: true });
950
1116
  } catch {
951
- return false;
952
1117
  }
1118
+ };
1119
+ try {
1120
+ mkdirSync(temp);
1121
+ writeFileSync(join(temp, "owner.json"), JSON.stringify(selfOwner(claimToken)), "utf8");
1122
+ } catch (e) {
1123
+ cleanup();
1124
+ if (e.code === "ENOENT") return "gone";
1125
+ throw e;
1126
+ }
1127
+ try {
1128
+ renameSync(temp, claim);
1129
+ return "ok";
1130
+ } catch (e) {
1131
+ cleanup();
1132
+ const code = e.code;
1133
+ if (code === "ENOENT") return "gone";
1134
+ if (code === "ENOTEMPTY" || code === "EEXIST" || code === "ENOTDIR" || code === "EPERM" || code === "EACCES" || code === "EBUSY") return "exists";
1135
+ throw e;
1136
+ }
1137
+ }
1138
+ function claimLock(lock, expected, takeOver = false) {
1139
+ const claimToken = randomUUID();
1140
+ let mine;
1141
+ const unclaim = () => {
1142
+ if (!mine) return;
1143
+ const name = mine.name;
1144
+ mine = void 0;
1145
+ try {
1146
+ if (readClaim(lock, name)?.token !== claimToken) return;
1147
+ const aside = join(lock, `.${randomUUID()}.unclaimed`);
1148
+ renameSync(join(lock, name), aside);
1149
+ rmSync(aside, { recursive: true, force: true });
1150
+ } catch {
1151
+ }
1152
+ };
1153
+ const anyLive = (claims) => claims.some((c) => c.name !== mine?.name && judge(readClaim(lock, c.name)).verdict === "live");
1154
+ for (let attempt = 0; attempt < 5; attempt++) {
1155
+ const claims = listClaims(lock);
1156
+ if (claims === null) return { state: "gone" };
1157
+ const top = claims.at(-1);
1158
+ if (top && (!takeOver || anyLive(claims))) return { state: "busy" };
1159
+ const want = top ? { name: `reclaim.${top.n + 1}`, n: top.n + 1 } : { name: "reclaim", n: 1 };
1160
+ const placed = placeClaim(lock, want.name, claimToken);
1161
+ if (placed === "gone") {
1162
+ if (existsSync(lock)) continue;
1163
+ return { state: "gone" };
1164
+ }
1165
+ if (placed === "exists") {
1166
+ if (!takeOver) return { state: "busy" };
1167
+ continue;
1168
+ }
1169
+ mine = want;
1170
+ const after = listClaims(lock);
1171
+ if (after === null) return { state: "gone" };
1172
+ if (after.some((c) => c.n > want.n) || anyLive(after)) {
1173
+ unclaim();
1174
+ return { state: "busy" };
1175
+ }
1176
+ if (generationOf(lock) !== expected) {
1177
+ unclaim();
1178
+ return { state: "changed" };
1179
+ }
1180
+ return { state: "ok", unclaim };
1181
+ }
1182
+ return { state: "busy" };
1183
+ }
1184
+ function moveAway(lock, tag) {
1185
+ const aside = join(dirname(lock), `.${randomUUID()}.${tag}.boxglow-lock`);
1186
+ renameWithRetry(lock, aside);
1187
+ try {
1188
+ rmSync(aside, { recursive: true, force: true, maxRetries: 3, retryDelay: 20 });
1189
+ } catch {
953
1190
  }
954
- const age = Date.now() - Date.parse(owner.at);
955
- if (Number.isNaN(age)) return true;
956
- if (owner.host === hostname() && owner.pid !== process.pid) {
957
- if (!isAlive(owner.pid)) return true;
958
- return age > LOCK_HARD_STALE_MS;
1191
+ }
1192
+ function removeLock(file, expected) {
1193
+ const s = inspectLock(file);
1194
+ if (!s) return "none";
1195
+ if (s.generation !== expected) return "changed";
1196
+ if (s.verdict === "live") return "live";
1197
+ const claimed = claimLock(s.lock, expected, true);
1198
+ if (claimed.state === "gone") return "none";
1199
+ if (claimed.state !== "ok") return claimed.state;
1200
+ try {
1201
+ moveAway(s.lock, "unlock");
1202
+ return "removed";
1203
+ } catch (e) {
1204
+ claimed.unclaim();
1205
+ throw e;
959
1206
  }
960
- return age > staleMs;
961
1207
  }
962
1208
  function reclaim(lock, judged) {
963
- const aside = `${lock}.${randomUUID()}.stale`;
1209
+ let claimed;
964
1210
  try {
965
- renameSync(lock, aside);
1211
+ claimed = claimLock(lock, judged.token);
1212
+ } catch {
1213
+ return false;
1214
+ }
1215
+ if (claimed.state !== "ok") return false;
1216
+ try {
1217
+ moveAway(lock, "stale");
1218
+ return true;
966
1219
  } catch {
1220
+ claimed.unclaim();
1221
+ return false;
1222
+ }
1223
+ }
1224
+ function retryFailedRelease(lock) {
1225
+ const failed = failedReleases.get(lock);
1226
+ if (!failed) return;
1227
+ const now2 = existsSync(lock) ? readOwner(lock) : null;
1228
+ if (!now2 || now2.token !== failed.token) {
1229
+ failedReleases.delete(lock);
967
1230
  return;
968
1231
  }
969
- const moved = readOwner(aside);
970
- if ((moved?.token ?? null) !== (judged?.token ?? null)) {
1232
+ if (failed.tries >= RELEASE_RETRIES) return;
1233
+ failed.tries++;
1234
+ try {
1235
+ releaseOwn(lock, failed.token);
1236
+ failedReleases.delete(lock);
1237
+ } catch {
1238
+ }
1239
+ }
1240
+ var lastAcquireError;
1241
+ function tryAcquire(lock, token) {
1242
+ const temp = join(dirname(lock), `.${randomUUID()}.new.boxglow-lock`);
1243
+ const cleanup = () => {
971
1244
  try {
972
- renameSync(aside, lock);
973
- return;
1245
+ rmSync(temp, { recursive: true, force: true });
974
1246
  } catch {
975
1247
  }
1248
+ };
1249
+ try {
1250
+ mkdirSync(temp);
1251
+ writeFileSync(join(temp, "owner.json"), JSON.stringify(selfOwner(token)), "utf8");
1252
+ } catch (e) {
1253
+ cleanup();
1254
+ throw e;
976
1255
  }
977
1256
  try {
978
- rmSync(aside, { recursive: true, force: true });
979
- } catch {
1257
+ renameSync(temp, lock);
1258
+ return true;
1259
+ } catch (e) {
1260
+ cleanup();
1261
+ const code = e.code;
1262
+ if (code === "ENOTEMPTY" || code === "EEXIST" || code === "EPERM" || code === "EACCES" || code === "EBUSY") {
1263
+ lastAcquireError = e;
1264
+ return false;
1265
+ }
1266
+ throw e;
1267
+ }
1268
+ }
1269
+ var RELEASE_WAIT_MS = 500;
1270
+ function releaseOwn(lock, token) {
1271
+ const deadline = Date.now() + RELEASE_WAIT_MS;
1272
+ for (; ; ) {
1273
+ const claimed = claimLock(lock, token);
1274
+ if (claimed.state === "gone" || claimed.state === "changed") return;
1275
+ if (claimed.state === "ok") {
1276
+ try {
1277
+ moveAway(lock, "released");
1278
+ return;
1279
+ } catch (e) {
1280
+ claimed.unclaim();
1281
+ throw e;
1282
+ }
1283
+ }
1284
+ if (Date.now() >= deadline) throw new Error("lock release is blocked by a recovery marker");
1285
+ sleepSync(LOCK_RETRY_MS);
980
1286
  }
981
1287
  }
982
1288
  function lockFile(file, opts = {}) {
983
- const lock = `${canonical(file)}.boxglow-lock`;
1289
+ const target = canonical(file);
1290
+ const lock = `${target}.boxglow-lock`;
984
1291
  const waitMs = opts.waitMs ?? LOCK_WAIT_MS;
985
- const staleMs = opts.staleMs ?? LOCK_STALE_MS;
986
1292
  const deadline = Date.now() + waitMs;
1293
+ const token = randomUUID();
987
1294
  for (; ; ) {
988
1295
  if (heldLocks.has(lock)) throw new FileBusy();
989
- try {
990
- mkdirSync(lock);
991
- break;
992
- } catch (e) {
993
- if (e.code !== "EEXIST") throw e;
994
- }
1296
+ retryFailedRelease(lock);
1297
+ if (!existsSync(lock) && tryAcquire(lock, token)) break;
995
1298
  const owner = readOwner(lock);
996
- if (isStale(lock, owner, staleMs)) {
997
- reclaim(lock, owner);
998
- continue;
1299
+ if (owner && judge(owner).verdict === "dead" && reclaim(lock, owner)) continue;
1300
+ if (Date.now() >= deadline) {
1301
+ const status = inspectLock(target);
1302
+ if (status) throw new FileBusy(status);
1303
+ lastAcquireError = void 0;
1304
+ if (tryAcquire(lock, token)) break;
1305
+ if (!existsSync(lock) && lastAcquireError) throw lastAcquireError;
1306
+ throw new FileBusy(inspectLock(target) ?? void 0);
999
1307
  }
1000
- if (Date.now() >= deadline) throw new FileBusy();
1001
1308
  sleepSync(LOCK_RETRY_MS);
1002
1309
  }
1003
- const token = randomUUID();
1004
- try {
1005
- const owner = { pid: process.pid, host: hostname(), at: (/* @__PURE__ */ new Date()).toISOString(), token };
1006
- writeFileSync(join(lock, "owner.json"), JSON.stringify(owner), "utf8");
1007
- } catch {
1008
- }
1009
1310
  heldLocks.add(lock);
1311
+ let released = false;
1010
1312
  return () => {
1313
+ if (released) return;
1314
+ released = true;
1011
1315
  heldLocks.delete(lock);
1012
1316
  try {
1013
- const now2 = readOwner(lock);
1014
- if (now2 && now2.token !== token) return;
1015
- rmSync(lock, { recursive: true, force: true });
1317
+ releaseOwn(lock, token);
1016
1318
  } catch {
1319
+ failedReleases.set(lock, { token, tries: 0 });
1017
1320
  }
1018
1321
  };
1019
1322
  }
@@ -2925,16 +3228,16 @@ ${h.note}`),
2925
3228
  import { existsSync as existsSync5, readFileSync as readFileSync4, writeFileSync as writeFileSync3 } from "node:fs";
2926
3229
 
2927
3230
  // docs/AGENTS_SNIPPET.md
2928
- var AGENTS_SNIPPET_default = '# Boxglow \u3092\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306B\u4F7F\u308F\u305B\u308B\u6307\u793A\u66F8 (AGENTS.md / CLAUDE.md \u306B\u8CBC\u308B)\n\n\u4E0B\u306E\u300C---\u300D\u306E\u9593\u3092\u305D\u306E\u307E\u307E\u30EA\u30DD\u30B8\u30C8\u30EA\u306E AGENTS.md (Codex) \u3084 CLAUDE.md (Claude Code) \u306B\u8CBC\u308B\u3002\nboxglow.json \u306F\u30EA\u30DD\u30B8\u30C8\u30EA\u76F4\u4E0B\u306B\u7F6E\u304F (`npx boxglow init --name "<\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D>"`)\u3002\n\n---\n\n## Boxglow (\u8A08\u753B\u3068\u9032\u6357\u306E\u5171\u6709)\n\n\u3053\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u8A08\u753B\u3068\u9032\u6357\u306F `boxglow.json` \u304C\u6B63\u672C\u3002\u4EBA\u9593\u306F Boxglow \u306E\u753B\u9762\u3067\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u898B\u3066\u3044\u308B\u3002\n\u30D5\u30A1\u30A4\u30EB\u3092\u76F4\u63A5\u7DE8\u96C6\u305B\u305A\u3001\u5FC5\u305A `npx boxglow` \u30B3\u30DE\u30F3\u30C9\u3067\u66F4\u65B0\u3059\u308B\u3053\u3068 (\u7D50\u7DDA\u30EB\u30FC\u30EB\u3068\u5C65\u6B74\u304C\u4FDD\u305F\u308C\u308B)\u3002\n\n\u30D6\u30ED\u30C3\u30AF = \u300C\u5165\u529B\u304B\u3089\u51FA\u529B (\u6210\u679C\u7269) \u3092\u4F5C\u308B\u30BF\u30B9\u30AF\u300D\u3002\u51FA\u529B\u306E\u6210\u679C\u7269\u304C\u78BA\u5B9A\u3057\u305F\u3089\u5B8C\u4E86 (WhiteBox)\u3002\n\u72B6\u614B: BlackBox (\u51FA\u529B\u3060\u3051\u6C7A\u3081\u305F) \u2192 GrayBox (\u5206\u89E3\u4E2D\u30FB\u7740\u624B\u4E2D) \u2192 WhiteBox (\u5B8C\u4E86)\u3002\n\n### \u4F5C\u696D\u306E\u305F\u3073\u306B\u5B88\u308B\u3053\u3068\n\n1. **\u6700\u521D\u306B\u8AAD\u3080**: `npx boxglow resume` (\u307E\u305F\u306F `npx boxglow status --brief`) \u3067\u3001\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u30FBAI \u672A\u78BA\u8A8D\u306E\u56DE\u7B54\u30FB\u5224\u65AD\u5F85\u3061\u30FB\u4F5C\u696D\u4E2D\u30FB\u6B21\u306E\u5019\u88DC\u3092\u8AAD\u3080\u3002\u524D\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u7D9A\u304D\u306F\u3001\u3053\u3053\u306B\u51FA\u308B\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u304B\u3089\u518D\u958B\u3059\u308B\u3002`npx boxglow show <block>` \u3067\u62C5\u5F53\u3059\u308B\u30DC\u30C3\u30AF\u30B9\u306E\u5165\u51FA\u529B\u3092\u78BA\u8A8D\u3059\u308B\n2. **\u7740\u624B\u3092\u8A18\u9332**: \u30DC\u30C3\u30AF\u30B9\u306B\u53D6\u308A\u304B\u304B\u308B\u3068\u304D `npx boxglow start <block> --note "<\u4F55\u3092\u3059\u308B\u304B>"`\u3002\u540C\u6642\u306B\u9032\u3081\u308B\u30DC\u30C3\u30AF\u30B9\u306F 1\u301C2 \u500B\u307E\u3067\u3002\n \u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u306E\u8981\u6C42 (guard) \u304C\u6709\u52B9\u306A\u8A08\u753B\u3067\u306F\u3001\u5148\u306B `npx boxglow context <block>` \u3092\u8AAD\u307F\u3001\u51FA\u529B\u306E `contextToken` (\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3) \u3092\u4ED8\u3051\u308B:\n `npx boxglow start <block> --note "<\u4F55\u3092\u3059\u308B\u304B>" --context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>` (\u4E0B\u306E\u300C\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3068\u5F15\u304D\u7D99\u304E\u300D\u3092\u53C2\u7167)\n3. **\u5206\u89E3**: 1 \u3064\u306E\u30DC\u30C3\u30AF\u30B9\u3067\u51FA\u529B\u3092\u4F5C\u308B\u898B\u901A\u3057\u304C\u7ACB\u305F\u306A\u3044\u3068\u304D\u306F\u3001`npx boxglow split <block> --spec \'<JSON>\'` \u3067\u4E2D\u306B\u5C0F\u3055\u306A\u30DC\u30C3\u30AF\u30B9\u3092\u7F6E\u304F\u3002\u5404\u30DC\u30C3\u30AF\u30B9\u306B\u51FA\u529B (\u6210\u679C\u7269) \u3092\u5FC5\u305A\u6C7A\u3081\u308B\u3002\u5165\u529B\u306F\u4E0D\u660E\u306A\u3089\u7701\u7565\u3057\u3066\u3088\u3044 (\u81EA\u52D5\u3067\u4E0A\u306E\u968E\u5C64\u306E\u5165\u529B\u306B\u306A\u308B)\n4. **\u5B8C\u4E86\u3092\u8A18\u9332**: \u51FA\u529B\u306E\u6210\u679C\u7269\u304C\u3067\u304D\u305F\u3089 `npx boxglow done <block> --artifact "<\u540D\u524D>=<\u30EA\u30DD\u30B8\u30C8\u30EA\u5185\u306E\u30D1\u30B9>"`\u3002\n guard \u304C\u6709\u52B9\u306A\u3089 `--context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>` \u3092\u4ED8\u3051\u308B (\u76F4\u524D\u306E\u81EA\u5206\u306E\u64CD\u4F5C\u306E\u51FA\u529B\u306B\u300C\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3: <token>\u300D\u304C\u51FA\u3066\u3044\u308C\u3070\u3001\u305D\u308C\u3092\u4F7F\u3046)\u3002\n HEAD \u306B\u30B3\u30DF\u30C3\u30C8\u6E08\u307F\u3067\u5185\u5BB9\u304C\u4E00\u81F4\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u306F\u300C\u30B3\u30DF\u30C3\u30C8 + \u30D1\u30B9 + \u4E2D\u8EAB\u306E\u30CF\u30C3\u30B7\u30E5\u300D\u3067\u8A18\u9332\u3055\u308C\u308B (\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306F\u3057\u306A\u3044)\u3002\u672A\u30B3\u30DF\u30C3\u30C8\u30FB\u672A\u8FFD\u8DE1\u306E\u30D5\u30A1\u30A4\u30EB\u306F\u30ED\u30FC\u30AB\u30EB\u53C2\u7167\u3068\u3057\u3066\u6B8B\u308A\u3001\u30B3\u30DF\u30C3\u30C8\u3057\u305F\u5F8C\u306E `npx boxglow check` \u3067 Git \u306E\u53C2\u7167\u306B\u88DC\u5B8C\u3055\u308C\u308B\u3002\u8A18\u9332\u306E\u305F\u3081\u3060\u3051\u306B\u30B3\u30DF\u30C3\u30C8\u3057\u306A\u3044\u3002\u5168\u968E\u5C64\u304C\u5FC5\u8981\u306A\u3089 `npx boxglow status` \u3092\u8AAD\u3080\u3002PR \u3084\u5916\u90E8\u8CC7\u6599\u306F URL \u3067\u3082\u3088\u3044\u3002\n \u6210\u679C\u7269\u3060\u3051\u5148\u306B\u4ED8\u3051\u308B\u306A\u3089 `npx boxglow artifact <block> <\u30D1\u30B9>`\u3002\u9032\u6357\u306E\u9014\u4E2D\u7D4C\u904E\u306F `npx boxglow set <block> --progress 60`\n5. **\u4EBA\u9593\u306E\u5224\u65AD\u304C\u8981\u308B**: `npx boxglow ask <block> "<\u8CEA\u554F>" --options "A|B"`\u3002\u56DE\u7B54\u304C\u3042\u308B\u307E\u3067\u305D\u306E\u30DC\u30C3\u30AF\u30B9\u306F\u9032\u3081\u305A\u3001\u4ED6\u306E\u30DC\u30C3\u30AF\u30B9\u3078\u79FB\u308B\u3002\u4EBA\u306E\u56DE\u7B54\u306F `status` \u306E\u300C\u56DE\u7B54\u3042\u308A\u300D\u306B\u51FA\u308B\u3002\u8AAD\u3093\u3060\u3089 `npx boxglow ack <block>` \u3067\u5F15\u304D\u53D6\u308B (\u305D\u306E\u30DC\u30C3\u30AF\u30B9\u306E `start` / `done` / `set` \u306A\u3069\u3067\u3082\u81EA\u52D5\u3067\u5F15\u304D\u53D6\u3089\u308C\u308B)\u3002\u5F15\u304D\u53D6\u308B\u307E\u3067\u4EBA\u306E\u753B\u9762\u306B\u306F\u300CAI \u672A\u78BA\u8A8D\u300D\u3068\u3057\u3066\u6B8B\u308A\u3001\u4EBA\u304C\u7B54\u3048\u3092\u76F4\u305B\u308B\u3002\u56DE\u7B54\u306E\u4E2D\u306B\u554F\u3044\u8FD4\u3057\u304C\u3042\u308C\u3070\u3001`ask` \u3068 `answer --by <\u81EA\u5206>` \u3067\u81EA\u5206\u306E\u7B54\u3048\u3082\u8A18\u9332\u3059\u308B\n6. **\u8A70\u307E\u3063\u305F\u3089**: `npx boxglow blocked <block> --note "<\u56F0\u3063\u3066\u3044\u308B\u3053\u3068>"`\n7. **\u6210\u679C\u7269\u306E\u78BA\u8A8D**: \u30D5\u30A1\u30A4\u30EB\u3092\u79FB\u52D5\u30FB\u6539\u540D\u3057\u305F\u3089 `npx boxglow check` \u3092\u5B9F\u884C\u3059\u308B (\u79FB\u52D5\u3092\u691C\u51FA\u3057\u3066\u30D1\u30B9\u3092\u4ED8\u3051\u66FF\u3048\u308B\u3002\u898B\u3064\u304B\u3089\u306A\u3051\u308C\u3070\u5370\u304C\u4ED8\u304F)\n8. **\u4E2D\u65AD\u30FB\u5F15\u304D\u7D99\u304E\u306E\u524D\u306B**: \u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u7D42\u308F\u308A\u30FB\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u5727\u7E2E\u30FB\u4ED6\u306E AI \u3084\u4EBA\u3078\u306E\u5F15\u304D\u7D99\u304E\u306E\u524D\u306B\u3001`npx boxglow checkpoint <block> --note "\u5206\u304B\u3063\u305F\u3053\u3068; \u6B21\u306B\u3059\u308B\u3053\u3068; \u672A\u89E3\u6C7A\u306E\u3053\u3068"` \u3067\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u3092\u6B8B\u3059 (guard \u304C\u6709\u52B9\u306A\u3089 `--context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>` \u3092\u4ED8\u3051\u308B)\u3002\u4F1A\u8A71\u306E\u5C65\u6B74\u304C\u6D88\u3048\u3066\u3082\u8A08\u753B\u306E\u4E2D\u306B\u6B8B\u308A\u3001\u6B21\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u304C `resume` \u3068 `context` \u3067\u8AAD\u3080\n9. **\u5831\u544A**: \u4F5C\u696D\u306E\u6700\u5F8C\u306B `npx boxglow status --brief` \u306E\u5185\u5BB9\u3092\u8981\u7D04\u3057\u3066\u5831\u544A\u3059\u308B\n\n### \u69CB\u9020\u306E\u7D04\u675F\n\n- \u6700\u4E0A\u4F4D\u306B\u306F\u300C\u5165\u529B\u30CE\u30FC\u30C9\u300D\u300C\u6700\u7D42\u6210\u679C\u7269\u30CE\u30FC\u30C9\u300D\u3068\u300C\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30DC\u30C3\u30AF\u30B9\u300D\u3060\u3051\u304C\u3042\u308B\u3002\u30BF\u30B9\u30AF\u306F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30DC\u30C3\u30AF\u30B9\u306E\u4E2D\u306B\u7F6E\u304F (`add` \u306E\u65E2\u5B9A\u306E\u89AA\u306F\u6700\u521D\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30DC\u30C3\u30AF\u30B9)\n- \u968E\u5C64\u306E\u6DF1\u3055\u306B\u5236\u9650\u306F\u306A\u3044\u3002`split` \u306F\u4F55\u6BB5\u3067\u3082\u4F7F\u3048\u308B\n- \u5225\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3067\u3082\u4F7F\u3048\u305D\u3046\u306A\u30DC\u30C3\u30AF\u30B9 (\u4F8B: \u5165\u529B\u753B\u50CF\u306E\u30E2\u30CE\u30AF\u30ED\u5316) \u306F `npx boxglow export-block <block> --out <\u540D\u524D>.boxglow-block.json` \u3067\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306B\u3057\u3001\n `npx boxglow import-block <path> --parent <block>` \u3067\u633F\u5165\u3059\u308B\u3002\u30EA\u30DD\u30B8\u30C8\u30EA\u306E `boxglow-blocks/` \u306B\u7F6E\u3044\u3066\u5171\u6709\u3057\u3066\u3088\u3044\n\n\u6700\u4E0A\u4F4D\u306E\u5165\u529B\u304C\u591A\u3044\u3068\u304D\u306F `npx boxglow group "<\u30B0\u30EB\u30FC\u30D7\u540D>"` \u3067\u30B0\u30EB\u30FC\u30D7\u3092\u4F5C\u308A\u3001`npx boxglow group-set <\u5165\u529B\u540D> <\u30B0\u30EB\u30FC\u30D7\u540D>` \u3067\u5206\u3051\u308B (\u4F8B: PCIe \u4ED5\u69D8\u66F8 / DDR \u4ED5\u69D8\u66F8)\u3002\n\n### split \u306E JSON \u5F62\u5F0F\n\n```json\n{\n "blocks": [\n { "title": "\u8A2D\u8A08", "description": "\u3084\u308B\u3053\u3068", "inputs": ["\u4ED5\u69D8"], "outputs": ["\u8A2D\u8A08\u66F8"] },\n { "title": "\u5B9F\u88C5", "inputs": ["\u8A2D\u8A08\u66F8"], "outputs": ["\u30B3\u30FC\u30C9"] }\n ],\n "connections": [\n { "from": "parent.\u4ED5\u69D8", "to": "\u8A2D\u8A08.\u4ED5\u69D8" },\n { "from": "\u8A2D\u8A08.\u8A2D\u8A08\u66F8", "to": "\u5B9F\u88C5.\u8A2D\u8A08\u66F8" },\n { "from": "\u5B9F\u88C5.\u30B3\u30FC\u30C9", "to": "parent.\u51FA\u529B" }\n ]\n}\n```\n\n`parent.<\u540D\u524D>` \u306F\u5206\u89E3\u3059\u308B\u30DC\u30C3\u30AF\u30B9\u81EA\u8EAB\u306E\u5165\u529B / \u51FA\u529B\u3002`<block>` \u306F\u77ED\u3044 ID (B12 \u306A\u3069\u3002status \u306B\u51FA\u308B) \u304B\u984C\u540D\u3002\n\u4E0B\u306E\u968E\u5C64\u3092\u6301\u305F\u306A\u3044\u30DC\u30C3\u30AF\u30B9\u306E\u51FA\u529B\u306F 1 \u672C (outputs \u306F 1 \u3064\u3060\u3051\u66F8\u304F)\u3002\u984C\u540D\u306F\u300C\u4F55\u3092\u4F5C\u308B\u304B\u300D\u304C\u5206\u304B\u308B\u77ED\u3044\u8A00\u8449\u306B\u3059\u308B\u3002\n\u671F\u65E5\u3084\u6642\u9593\u306F `npx boxglow set <block> --due 2026-10-15 --start 2026-10-01 --estimate 8 --hours 3.5` \u3067\u8A18\u9332\u3059\u308B\u3002\n\u30DC\u30C3\u30AF\u30B9\u306B\u306F\u4ED5\u4E8B\u306E\u7A2E\u985E (\u30AB\u30C6\u30B4\u30EA) \u3092\u4ED8\u3051\u308B: `--category design` (\u8A2D\u8A08) / build (\u5B9F\u88C5) / verify (\u691C\u8A3C) / evaluate (\u8A55\u4FA1) / study (\u691C\u8A0E) / research (\u8ABF\u67FB) / ui (\u30C7\u30B6\u30A4\u30F3) / improve (\u6539\u5584) / fix (\u8AB2\u984C\u89E3\u6C7A) / docs (\u6587\u66F8) / ops (\u904B\u7528) / other (\u305D\u306E\u4ED6: \u8FF7\u3063\u305F\u3068\u304D)\u3002add \u306E\u3068\u304D\u306B\u4ED8\u3051\u3001\u5909\u3048\u308B\u306A\u3089 `npx boxglow set <block> --category verify`\u3002\n\u7D50\u7DDA\u306E\u53D7\u3051\u5074\u306F\u984C\u540D\u3060\u3051\u3067\u3088\u3044 (`npx boxglow connect "A.\u8A2D\u8A08\u66F8" "B"` \u3067 B \u306B\u5165\u529B\u300C\u8A2D\u8A08\u66F8\u300D\u304C\u4F5C\u3089\u308C\u3066\u3064\u306A\u304C\u308B\u3002split \u306E connections \u3082 `to: "B"` \u3067\u3088\u3044)\u3002\u3064\u306A\u3044\u3060\u5165\u529B\u306E\u540D\u524D\u306F\u4F9B\u7D66\u5143\u306E\u51FA\u529B\u540D\u306B\u306A\u308A\u3001\u5165\u529B\u5074\u3067\u306F\u5909\u3048\u3089\u308C\u306A\u3044 (\u5909\u3048\u308B\u306A\u3089\u4F9B\u7D66\u5143\u306E\u51FA\u529B\u306E\u540D\u524D\u3092\u5909\u3048\u308B\u3002\u3064\u306A\u304C\u308B\u5148\u3082\u4E00\u7DD2\u306B\u5909\u308F\u308B)\u3002\u65E2\u5B58\u306E\u30DC\u30C3\u30AF\u30B9\u306B\u5165\u51FA\u529B\u3092\u8DB3\u3059 / \u540D\u524D\u3092\u5909\u3048\u308B\u306E\u306F `npx boxglow port <block> --in <\u540D\u524D> --out <\u540D\u524D> --rename <\u65E7>=<\u65B0>` (`project` = \u6700\u521D\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30DC\u30C3\u30AF\u30B9\u3002\u6700\u7D42\u6210\u679C\u7269\u306E\u540D\u524D\u3082\u3053\u308C\u3067\u5909\u3048\u308B)\u3002\u7DDA\u3092\u5916\u3059\u306E\u306F `npx boxglow disconnect <\u984C\u540D.\u51FA\u529B\u540D> <\u984C\u540D.\u5165\u529B\u540D>`\u3001\u30DC\u30C3\u30AF\u30B9\u305D\u306E\u3082\u306E\u3092\u6D88\u3059\u306E\u306F `npx boxglow remove <block>` (\u4E2D\u306B\u30DC\u30C3\u30AF\u30B9\u304C\u3042\u308C\u3070 `--force`)\u3002MCP \u30C4\u30FC\u30EB (`boxglow_status` / `boxglow_start` / `boxglow_done` / `boxglow_ask` \u306A\u3069\u3002\u5229\u7528\u3059\u308B\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306B\u767B\u9332\u6E08\u307F\u306A\u3089\u4F7F\u3048\u308B\u3002`.mcp.json` \u306F Claude Code \u5411\u3051\u3067\u3001Codex \u306F\u5225\u9014\u767B\u9332\u3059\u308B) \u306F\u540C\u3058\u30B3\u30DE\u30F3\u30C9\u306E\u5225\u306E\u5165\u53E3\u3067\u3001\u3069\u3061\u3089\u3067\u66F8\u3044\u3066\u3082\u540C\u3058\u30D5\u30A1\u30A4\u30EB\u304C\u66F4\u65B0\u3055\u308C\u308B\u3002\u8A08\u753B\u306E\u6587\u66F8\u306F `npx boxglow export --out docs/ROADMAP.md`\u3002\n\u65B0\u3057\u3044\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3067\u306F\u3001\u65B9\u91DD (README \u3084\u4F9D\u983C\u6587) \u304B\u3089\u6700\u4E0A\u4F4D\u306E\u5927\u9805\u76EE 3\u301C7 \u500B\u3092\u5148\u306B\u4F5C\u308A\u3001\u4EBA\u306B `ask` \u3067\u78BA\u8A8D\u3057\u3066\u304B\u3089\u3001\u7740\u624B\u3059\u308B\u5927\u9805\u76EE\u3060\u3051\u3092 `split` \u3067\u5206\u89E3\u3059\u308B (\u5148\u306E\u6BB5\u968E\u306F\u7C97\u3044\u307E\u307E)\u3002`ask` \u306E\u8CEA\u554F\u306F\u305D\u308C\u3060\u3051\u3067\u5224\u65AD\u3067\u304D\u308B\u3088\u3046\u306B\u66F8\u304D\u3001\u524D\u63D0\u30FB\u6BD4\u8F03\u30FB\u5F71\u97FF\u306F `--context` \u306B\u5165\u308C\u308B (\u300C\u3053\u308C\u3067\u3088\u3044\u3067\u3059\u304B\u300D\u306E\u3088\u3046\u306B\u5916\u3092\u6307\u3055\u306A\u3044)\u3002\u5019\u88DC\u304B\u3089 1 \u3064\u3092\u9078\u3076\u5834\u9762\u3067\u306F\u3001\u81EA\u5206\u3067\u6C7A\u3081\u308B\u3068\u304D\u3082 `ask ... --options "A|B|C"` \u3068 `answer --by <\u81EA\u5206>` \u3067\u8A18\u9332\u3057\u3001\u9078\u3070\u306A\u304B\u3063\u305F\u5019\u88DC\u3092\u6B8B\u3059\u3002\u65B9\u91DD\u8EE2\u63DB\u306F `reopen <block> --note <\u7406\u7531>`\u3002\u3059\u3079\u3066 CLI \u3060\u3051\u3067\u6210\u7ACB\u3059\u308B (\u753B\u9762\u306F\u4EBA\u304C\u898B\u308B\u305F\u3081\u306E\u3082\u306E)\u3002\u4EBA\u304C\u3044\u306A\u3044\u904B\u7528\u306A\u3089\u3001AI \u304C `answer --by <\u81EA\u5206>` \u3067\u5224\u65AD\u3092\u8A18\u9332\u3057\u3066\u9032\u3081\u308B\u3002\n\u51FA\u529B\u306E\u540D\u524D\u306F\u300C\u5177\u4F53\u7684\u306A\u6210\u679C\u7269\u300D\u306B\u3059\u308B (\u4F8B: `\u8A2D\u8A08\u66F8 docs/design.md`\u3001`PR #12`\u3001`\u516C\u958B URL`\u3001`\u30C6\u30B9\u30C8\u7D50\u679C (vitest 53 \u4EF6)`)\u3002\u300C\u6A5F\u80FD\u4E00\u5F0F\u300D\u300C\u6240\u898B\u300D\u306E\u3088\u3046\u306A\u62BD\u8C61\u7684\u306A\u540D\u524D\u306F\u907F\u3051\u3001done \u306E\u3068\u304D\u306F\u5FC5\u305A --artifact \u3067\u30D5\u30A1\u30A4\u30EB\u30FBURL\u30FB\u30B3\u30DF\u30C3\u30C8\u3092\u4ED8\u3051\u308B\u3002\n\u3059\u3079\u3066\u306E\u30DC\u30C3\u30AF\u30B9\u306F\u300C\u5165\u529B \u2192 \u51FA\u529B\u300D\u304C\u4F55\u304B\u306B\u3064\u306A\u304C\u3063\u3066\u3044\u308B\u3088\u3046\u306B\u3059\u308B (\u3064\u306A\u304C\u3063\u3066\u3044\u306A\u3044\u30DC\u30C3\u30AF\u30B9\u306F\u8A08\u753B\u306E\u7A74\u3002\u6700\u4E0A\u4F4D\u306E\u5165\u529B\u30CE\u30FC\u30C9\u306F\u3001\u672A\u63A5\u7D9A\u306E\u5165\u529B\u304C\u81EA\u52D5\u3067\u4E0A\u304C\u308B)\u3002\n\u8907\u6570\u4EBA\u3067\u540C\u3058 boxglow.json \u3092\u7DE8\u96C6\u3059\u308B\u306A\u3089\u3001\u5404\u81EA\u306E clone \u3067\u4E00\u5EA6 `npx boxglow git-setup` \u3092\u5B9F\u884C\u3059\u308B (\u30DC\u30C3\u30AF\u30B9\u306E\u5358\u4F4D\u3067\u81EA\u52D5\u30DE\u30FC\u30B8\u3055\u308C\u3001\u5225\u306E\u30DC\u30C3\u30AF\u30B9\u306E\u5909\u66F4\u306F\u885D\u7A81\u3057\u306A\u3044)\u3002\n\u8907\u6570\u30EA\u30DD\u30B8\u30C8\u30EA\u3092 1 \u3064\u306E\u8A08\u753B\u3067\u7BA1\u7406\u3059\u308B\u3068\u304D\u306F\u3001boxglow.json \u3092\u4E0A\u306E\u30D5\u30A9\u30EB\u30C0\u306B\u7F6E\u304D\u3001\u5404\u30EA\u30DD\u30B8\u30C8\u30EA\u3067\u306F\u74B0\u5883\u5909\u6570 BOXGLOW_FILE \u306B\u305D\u306E\u5834\u6240\u3092\u5165\u308C\u308B (\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30DC\u30C3\u30AF\u30B9\u306F\u30EA\u30DD\u30B8\u30C8\u30EA\u3054\u3068\u306B 1 \u3064\u3002`npx boxglow project "\u540D\u524D" --repo <\u30D1\u30B9>`)\u3002\n\u5165\u529B\u306F\u65E2\u5B9A\u3067\u5FC5\u9808\u3002\u7121\u304F\u3066\u3082\u7740\u624B\u3067\u304D\u308B\u5165\u529B\u306F\u753B\u9762\u3067\u300C\u4EFB\u610F\u300D\u306B\u3059\u308B\u3002status \u306E\u300C\u6B21\u306E\u5019\u88DC\u300D\u306F\u5FC5\u9808\u306E\u5165\u529B\u304C\u305D\u308D\u3063\u305F\u30DC\u30C3\u30AF\u30B9\u304B\u3089\u4E26\u3076 (\u300C\u7740\u624B\u3067\u304D\u308B\u300D/\u300C\u5FC5\u9808\u306E\u5165\u529B\u5F85\u3061\u300D\u304C\u4ED8\u304F)\u3002\n\u5165\u529B\u306E\u8AAC\u660E\u306F\u66F8\u304B\u306A\u3044 (\u3064\u306A\u304C\u3063\u305F\u51FA\u529B\u5074\u306E\u8AAC\u660E\u304C\u4F7F\u308F\u308C\u308B)\u3002\u51FA\u529B\u306E\u8AAC\u660E\u306B\u5F62\u5F0F\u30FB\u5236\u7D04\u3092\u66F8\u304F\u3002\n\n\n### \u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3068\u5F15\u304D\u7D99\u304E\n\n\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u306E\u8981\u6C42 (guard) \u306F\u3001AI \u304C\u53E4\u3044\u6307\u793A\u306E\u307E\u307E\u4F5C\u696D\u3092\u9032\u3081\u308B\u306E\u3092\u9632\u3050\u4ED5\u7D44\u307F\u3002`setup-agent` \u304C\u6709\u52B9\u306B\u3059\u308B (\u305D\u308C\u4EE5\u5916\u306E\u8A08\u753B\u3067\u306F `npx boxglow guard on`)\u3002\n\u6709\u52B9\u306A\u8A08\u753B\u3067\u306F\u3001AI \u306E `start` / `done` / `set` / `split` / `artifact` / `ack` / `blocked` / `review` / `leave` / `checkpoint` \u306B `--context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>` \u304C\u8981\u308B\u3002\u4EBA\u306E\u64CD\u4F5C (`--actor human`) \u306B\u306F\u8981\u6C42\u3055\u308C\u306A\u3044\u3002\n\n```\nnpx boxglow context B12 # \u5224\u65AD (\u5F15\u304D\u53D6\u308A\u6E08\u307F\u306E\u56DE\u7B54\u3092\u542B\u3080)\u30FB\u5165\u51FA\u529B\u306E\u6761\u4EF6\u30FB\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u3092\u8AAD\u3080\u3002\u51FA\u529B\u306E contextToken \u304C\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\nnpx boxglow start B12 --note "<\u4F55\u3092\u3059\u308B\u304B>" --context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>\nnpx boxglow ask B12 "<\u8CEA\u554F>" --options "A|B" --context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>\n# \u2192 \u51FA\u529B\u306E\u6700\u5F8C\u306E\u884C: \u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3: <token>\nnpx boxglow done B12 --artifact "<\u540D\u524D>=<\u30D1\u30B9>" --context-token <\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>\n```\n\n- **\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u5909\u308F\u308B\u5834\u5408 (\u8AAD\u307F\u76F4\u3057\u304C\u8981\u308B)**: \u4EBA\u304C\u56DE\u7B54\u3057\u305F\u30FB\u56DE\u7B54\u3092\u76F4\u3057\u305F\u3001\u4EBA\u304C\u6307\u793A (\u984C\u540D\u30FB\u8AAC\u660E\u30FB\u5165\u51FA\u529B\u306E\u6761\u4EF6) \u3092\u5909\u3048\u305F\u3001\u4ED6\u306E AI \u3084\u4EBA\u304C\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u3092\u66F4\u65B0\u3057\u305F\u3002\u89AA\u3084\u5165\u529B\u5143\u306E\u30DC\u30C3\u30AF\u30B9\u3067\u8D77\u304D\u305F\u5834\u5408\u3082\u540C\u3058\u3002\u53E4\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u306F\u62D2\u5426\u3055\u308C\u308B\u306E\u3067\u3001`context` \u3092\u8AAD\u307F\u76F4\u3057\u3001\u5909\u308F\u3063\u305F\u5185\u5BB9\u3092\u4F5C\u696D\u306B\u53CD\u6620\u3057\u3066\u304B\u3089\u3084\u308A\u76F4\u3059\n- **\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u5909\u308F\u3089\u306A\u3044\u5834\u5408**: `start` / `blocked` / `review` / `leave` / `ack`\u3001\u9032\u6357\u30FB\u72B6\u614B\u30FB\u671F\u65E5\u30FB\u30AB\u30C6\u30B4\u30EA\u306E\u5909\u66F4\u3001`check` \u306B\u3088\u308B\u6210\u679C\u7269\u306E\u78BA\u8A8D\u3001\u753B\u9762\u3067\u306E\u914D\u7F6E\u306E\u5909\u66F4\u3002\u540C\u3058\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3092\u4F7F\u3044\u7D9A\u3051\u3089\u308C\u308B\n- **\u81EA\u5206\u3067\u66F4\u65B0\u3067\u304D\u308B\u5834\u5408**: \u81EA\u5206\u306E `ask` / `artifact` / `done` / `set` / `split` / `checkpoint` \u306A\u3069\u3067\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u5909\u308F\u3063\u305F\u3068\u304D\u306F\u3001\u305D\u306E\u51FA\u529B\u306E\u6700\u5F8C\u306E\u884C\u306B\u300C\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3: <token>\u300D\u304C\u51FA\u308B\u3002\u81EA\u5206\u3067\u5909\u3048\u305F\u5185\u5BB9\u306F\u5206\u304B\u3063\u3066\u3044\u308B\u306E\u3067\u3001\u8AAD\u307F\u76F4\u3055\u305A\u306B\u6B21\u306E\u64CD\u4F5C\u3078\u4F7F\u3046\u3002`ask` / `decision` / `answer` / `reopen` \u306F\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u7121\u3057\u3067\u3082\u5B9F\u884C\u3067\u304D\u308B\u304C\u3001\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u51FA\u308B\u306E\u306F\u6700\u65B0\u306E\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3092\u4ED8\u3051\u305F\u3068\u304D\u3060\u3051\n- \u53E4\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3092\u901A\u3059\u305F\u3081\u306B guard \u3092\u7121\u52B9\u306B\u3057\u306A\u3044 (AI \u304C `guard off` \u3059\u308B\u306B\u306F\u6700\u65B0\u306E\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u8981\u308B)\n- MCP \u3067\u306F `boxglow_context` \u3068\u3001\u5404\u30C4\u30FC\u30EB\u306E `contextToken` \u5F15\u6570\u3092\u4F7F\u3046 (\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u306F\u30C4\u30FC\u30EB\u306E\u7D50\u679C\u306E\u6700\u5F8C\u306E\u884C\u306B\u51FA\u308B)\n\n---\n';
3231
+ var AGENTS_SNIPPET_default = '# Boxglow \u3092\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306B\u4F7F\u308F\u305B\u308B\u6307\u793A\u66F8 (AGENTS.md / CLAUDE.md \u306B\u8CBC\u308B)\n\n\u4E0B\u306E\u300C---\u300D\u306E\u9593\u3092\u305D\u306E\u307E\u307E\u30EA\u30DD\u30B8\u30C8\u30EA\u306E AGENTS.md (Codex) \u3084 CLAUDE.md (Claude Code) \u306B\u8CBC\u308B\u3002\nboxglow.json \u306F\u30EA\u30DD\u30B8\u30C8\u30EA\u76F4\u4E0B\u306B\u7F6E\u304F (`npx boxglow init --name "<\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D>"`)\u3002\n\n---\n\n## Boxglow (\u8A08\u753B\u3068\u9032\u6357\u306E\u5171\u6709)\n\n\u3053\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u8A08\u753B\u3068\u9032\u6357\u306F `boxglow.json` \u304C\u6B63\u672C\u3002\u4EBA\u9593\u306F Boxglow \u306E\u753B\u9762\u3067\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u898B\u3066\u3044\u308B\u3002\n\u30D5\u30A1\u30A4\u30EB\u3092\u76F4\u63A5\u7DE8\u96C6\u305B\u305A\u3001\u5FC5\u305A `npx boxglow` \u30B3\u30DE\u30F3\u30C9\u3067\u66F4\u65B0\u3059\u308B\u3053\u3068 (\u7D50\u7DDA\u30EB\u30FC\u30EB\u3068\u5C65\u6B74\u304C\u4FDD\u305F\u308C\u308B)\u3002\n\n\u30D6\u30ED\u30C3\u30AF = \u300C\u5165\u529B\u304B\u3089\u51FA\u529B (\u6210\u679C\u7269) \u3092\u4F5C\u308B\u30BF\u30B9\u30AF\u300D\u3002\u51FA\u529B\u306E\u6210\u679C\u7269\u304C\u78BA\u5B9A\u3057\u305F\u3089\u5B8C\u4E86 (WhiteBox)\u3002\n\u72B6\u614B: BlackBox (\u51FA\u529B\u3060\u3051\u6C7A\u3081\u305F) \u2192 GrayBox (\u5206\u89E3\u4E2D\u30FB\u7740\u624B\u4E2D) \u2192 WhiteBox (\u5B8C\u4E86)\u3002\n\n### \u4F5C\u696D\u306E\u305F\u3073\u306B\u5B88\u308B\u3053\u3068\n\n1. **\u6700\u521D\u306B\u8AAD\u3080**: `npx boxglow resume` (\u307E\u305F\u306F `npx boxglow status --brief`) \u3067\u3001\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u30FBAI \u672A\u78BA\u8A8D\u306E\u56DE\u7B54\u30FB\u5224\u65AD\u5F85\u3061\u30FB\u4F5C\u696D\u4E2D\u30FB\u6B21\u306E\u5019\u88DC\u3092\u8AAD\u3080\u3002\u524D\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u7D9A\u304D\u306F\u3001\u3053\u3053\u306B\u51FA\u308B\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u304B\u3089\u518D\u958B\u3059\u308B\u3002`npx boxglow show <block>` \u3067\u62C5\u5F53\u3059\u308B\u30DC\u30C3\u30AF\u30B9\u306E\u5165\u51FA\u529B\u3092\u78BA\u8A8D\u3059\u308B\n2. **\u7740\u624B\u3092\u8A18\u9332**: \u30DC\u30C3\u30AF\u30B9\u306B\u53D6\u308A\u304B\u304B\u308B\u3068\u304D `npx boxglow start <block> --note "<\u4F55\u3092\u3059\u308B\u304B>"`\u3002\u540C\u6642\u306B\u9032\u3081\u308B\u30DC\u30C3\u30AF\u30B9\u306F 1\u301C2 \u500B\u307E\u3067\u3002\n \u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u306E\u8981\u6C42 (guard) \u304C\u6709\u52B9\u306A\u8A08\u753B\u3067\u306F\u3001\u5148\u306B `npx boxglow context <block>` \u3092\u8AAD\u307F\u3001\u51FA\u529B\u306E `contextToken` (\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3) \u3092\u4ED8\u3051\u308B:\n `npx boxglow start <block> --note "<\u4F55\u3092\u3059\u308B\u304B>" --context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>` (\u4E0B\u306E\u300C\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3068\u5F15\u304D\u7D99\u304E\u300D\u3092\u53C2\u7167)\n3. **\u5206\u89E3**: 1 \u3064\u306E\u30DC\u30C3\u30AF\u30B9\u3067\u51FA\u529B\u3092\u4F5C\u308B\u898B\u901A\u3057\u304C\u7ACB\u305F\u306A\u3044\u3068\u304D\u306F\u3001`npx boxglow split <block> --spec \'<JSON>\'` \u3067\u4E2D\u306B\u5C0F\u3055\u306A\u30DC\u30C3\u30AF\u30B9\u3092\u7F6E\u304F\u3002\u5404\u30DC\u30C3\u30AF\u30B9\u306B\u51FA\u529B (\u6210\u679C\u7269) \u3092\u5FC5\u305A\u6C7A\u3081\u308B\u3002\u5165\u529B\u306F\u4E0D\u660E\u306A\u3089\u7701\u7565\u3057\u3066\u3088\u3044 (\u81EA\u52D5\u3067\u4E0A\u306E\u968E\u5C64\u306E\u5165\u529B\u306B\u306A\u308B)\n4. **\u5B8C\u4E86\u3092\u8A18\u9332**: \u51FA\u529B\u306E\u6210\u679C\u7269\u304C\u3067\u304D\u305F\u3089 `npx boxglow done <block> --artifact "<\u540D\u524D>=<\u30EA\u30DD\u30B8\u30C8\u30EA\u5185\u306E\u30D1\u30B9>"`\u3002\n guard \u304C\u6709\u52B9\u306A\u3089 `--context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>` \u3092\u4ED8\u3051\u308B (\u76F4\u524D\u306E\u81EA\u5206\u306E\u64CD\u4F5C\u306E\u51FA\u529B\u306B\u300C\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3: <token>\u300D\u304C\u51FA\u3066\u3044\u308C\u3070\u3001\u305D\u308C\u3092\u4F7F\u3046)\u3002\n HEAD \u306B\u30B3\u30DF\u30C3\u30C8\u6E08\u307F\u3067\u5185\u5BB9\u304C\u4E00\u81F4\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u306F\u300C\u30B3\u30DF\u30C3\u30C8 + \u30D1\u30B9 + \u4E2D\u8EAB\u306E\u30CF\u30C3\u30B7\u30E5\u300D\u3067\u8A18\u9332\u3055\u308C\u308B (\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306F\u3057\u306A\u3044)\u3002\u672A\u30B3\u30DF\u30C3\u30C8\u30FB\u672A\u8FFD\u8DE1\u306E\u30D5\u30A1\u30A4\u30EB\u306F\u30ED\u30FC\u30AB\u30EB\u53C2\u7167\u3068\u3057\u3066\u6B8B\u308A\u3001\u30B3\u30DF\u30C3\u30C8\u3057\u305F\u5F8C\u306E `npx boxglow check` \u3067 Git \u306E\u53C2\u7167\u306B\u88DC\u5B8C\u3055\u308C\u308B\u3002\u8A18\u9332\u306E\u305F\u3081\u3060\u3051\u306B\u30B3\u30DF\u30C3\u30C8\u3057\u306A\u3044\u3002\u5168\u968E\u5C64\u304C\u5FC5\u8981\u306A\u3089 `npx boxglow status` \u3092\u8AAD\u3080\u3002PR \u3084\u5916\u90E8\u8CC7\u6599\u306F URL \u3067\u3082\u3088\u3044\u3002\n \u6210\u679C\u7269\u3060\u3051\u5148\u306B\u4ED8\u3051\u308B\u306A\u3089 `npx boxglow artifact <block> <\u30D1\u30B9>`\u3002\u9032\u6357\u306E\u9014\u4E2D\u7D4C\u904E\u306F `npx boxglow set <block> --progress 60`\n5. **\u4EBA\u9593\u306E\u5224\u65AD\u304C\u8981\u308B**: `npx boxglow ask <block> "<\u8CEA\u554F>" --options "A|B"`\u3002\u56DE\u7B54\u304C\u3042\u308B\u307E\u3067\u305D\u306E\u30DC\u30C3\u30AF\u30B9\u306F\u9032\u3081\u305A\u3001\u4ED6\u306E\u30DC\u30C3\u30AF\u30B9\u3078\u79FB\u308B\u3002\u4EBA\u306E\u56DE\u7B54\u306F `status` \u306E\u300C\u56DE\u7B54\u3042\u308A\u300D\u306B\u51FA\u308B\u3002\u8AAD\u3093\u3060\u3089 `npx boxglow ack <block>` \u3067\u5F15\u304D\u53D6\u308B (\u305D\u306E\u30DC\u30C3\u30AF\u30B9\u306E `start` / `done` / `set` \u306A\u3069\u3067\u3082\u81EA\u52D5\u3067\u5F15\u304D\u53D6\u3089\u308C\u308B)\u3002\u5F15\u304D\u53D6\u308B\u307E\u3067\u4EBA\u306E\u753B\u9762\u306B\u306F\u300CAI \u672A\u78BA\u8A8D\u300D\u3068\u3057\u3066\u6B8B\u308A\u3001\u4EBA\u304C\u7B54\u3048\u3092\u76F4\u305B\u308B\u3002\u56DE\u7B54\u306E\u4E2D\u306B\u554F\u3044\u8FD4\u3057\u304C\u3042\u308C\u3070\u3001`ask` \u3068 `answer --by <\u81EA\u5206>` \u3067\u81EA\u5206\u306E\u7B54\u3048\u3082\u8A18\u9332\u3059\u308B\n6. **\u8A70\u307E\u3063\u305F\u3089**: `npx boxglow blocked <block> --note "<\u56F0\u3063\u3066\u3044\u308B\u3053\u3068>"`\n7. **\u6210\u679C\u7269\u306E\u78BA\u8A8D**: \u30D5\u30A1\u30A4\u30EB\u3092\u79FB\u52D5\u30FB\u6539\u540D\u3057\u305F\u3089 `npx boxglow check` \u3092\u5B9F\u884C\u3059\u308B (\u79FB\u52D5\u3092\u691C\u51FA\u3057\u3066\u30D1\u30B9\u3092\u4ED8\u3051\u66FF\u3048\u308B\u3002\u898B\u3064\u304B\u3089\u306A\u3051\u308C\u3070\u5370\u304C\u4ED8\u304F)\n8. **\u4E2D\u65AD\u30FB\u5F15\u304D\u7D99\u304E\u306E\u524D\u306B**: \u30BB\u30C3\u30B7\u30E7\u30F3\u306E\u7D42\u308F\u308A\u30FB\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u5727\u7E2E\u30FB\u4ED6\u306E AI \u3084\u4EBA\u3078\u306E\u5F15\u304D\u7D99\u304E\u306E\u524D\u306B\u3001`npx boxglow checkpoint <block> --note "\u5206\u304B\u3063\u305F\u3053\u3068; \u6B21\u306B\u3059\u308B\u3053\u3068; \u672A\u89E3\u6C7A\u306E\u3053\u3068"` \u3067\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u3092\u6B8B\u3059 (guard \u304C\u6709\u52B9\u306A\u3089 `--context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>` \u3092\u4ED8\u3051\u308B)\u3002\u4F1A\u8A71\u306E\u5C65\u6B74\u304C\u6D88\u3048\u3066\u3082\u8A08\u753B\u306E\u4E2D\u306B\u6B8B\u308A\u3001\u6B21\u306E\u30BB\u30C3\u30B7\u30E7\u30F3\u304C `resume` \u3068 `context` \u3067\u8AAD\u3080\n9. **\u5831\u544A**: \u4F5C\u696D\u306E\u6700\u5F8C\u306B `npx boxglow status --brief` \u306E\u5185\u5BB9\u3092\u8981\u7D04\u3057\u3066\u5831\u544A\u3059\u308B\n\n### \u69CB\u9020\u306E\u7D04\u675F\n\n- \u6700\u4E0A\u4F4D\u306B\u306F\u300C\u5165\u529B\u30CE\u30FC\u30C9\u300D\u300C\u6700\u7D42\u6210\u679C\u7269\u30CE\u30FC\u30C9\u300D\u3068\u300C\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30DC\u30C3\u30AF\u30B9\u300D\u3060\u3051\u304C\u3042\u308B\u3002\u30BF\u30B9\u30AF\u306F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30DC\u30C3\u30AF\u30B9\u306E\u4E2D\u306B\u7F6E\u304F (`add` \u306E\u65E2\u5B9A\u306E\u89AA\u306F\u6700\u521D\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30DC\u30C3\u30AF\u30B9)\n- \u968E\u5C64\u306E\u6DF1\u3055\u306B\u5236\u9650\u306F\u306A\u3044\u3002`split` \u306F\u4F55\u6BB5\u3067\u3082\u4F7F\u3048\u308B\n- \u5225\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3067\u3082\u4F7F\u3048\u305D\u3046\u306A\u30DC\u30C3\u30AF\u30B9 (\u4F8B: \u5165\u529B\u753B\u50CF\u306E\u30E2\u30CE\u30AF\u30ED\u5316) \u306F `npx boxglow export-block <block> --out <\u540D\u524D>.boxglow-block.json` \u3067\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306B\u3057\u3001\n `npx boxglow import-block <path> --parent <block>` \u3067\u633F\u5165\u3059\u308B\u3002\u30EA\u30DD\u30B8\u30C8\u30EA\u306E `boxglow-blocks/` \u306B\u7F6E\u3044\u3066\u5171\u6709\u3057\u3066\u3088\u3044\n\n\u6700\u4E0A\u4F4D\u306E\u5165\u529B\u304C\u591A\u3044\u3068\u304D\u306F `npx boxglow group "<\u30B0\u30EB\u30FC\u30D7\u540D>"` \u3067\u30B0\u30EB\u30FC\u30D7\u3092\u4F5C\u308A\u3001`npx boxglow group-set <\u5165\u529B\u540D> <\u30B0\u30EB\u30FC\u30D7\u540D>` \u3067\u5206\u3051\u308B (\u4F8B: PCIe \u4ED5\u69D8\u66F8 / DDR \u4ED5\u69D8\u66F8)\u3002\n\n### split \u306E JSON \u5F62\u5F0F\n\n```json\n{\n "blocks": [\n { "title": "\u8A2D\u8A08", "description": "\u3084\u308B\u3053\u3068", "inputs": ["\u4ED5\u69D8"], "outputs": ["\u8A2D\u8A08\u66F8"] },\n { "title": "\u5B9F\u88C5", "inputs": ["\u8A2D\u8A08\u66F8"], "outputs": ["\u30B3\u30FC\u30C9"] }\n ],\n "connections": [\n { "from": "parent.\u4ED5\u69D8", "to": "\u8A2D\u8A08.\u4ED5\u69D8" },\n { "from": "\u8A2D\u8A08.\u8A2D\u8A08\u66F8", "to": "\u5B9F\u88C5.\u8A2D\u8A08\u66F8" },\n { "from": "\u5B9F\u88C5.\u30B3\u30FC\u30C9", "to": "parent.\u51FA\u529B" }\n ]\n}\n```\n\n`parent.<\u540D\u524D>` \u306F\u5206\u89E3\u3059\u308B\u30DC\u30C3\u30AF\u30B9\u81EA\u8EAB\u306E\u5165\u529B / \u51FA\u529B\u3002`<block>` \u306F\u77ED\u3044 ID (B12 \u306A\u3069\u3002status \u306B\u51FA\u308B) \u304B\u984C\u540D\u3002\n\u4E0B\u306E\u968E\u5C64\u3092\u6301\u305F\u306A\u3044\u30DC\u30C3\u30AF\u30B9\u306E\u51FA\u529B\u306F 1 \u672C (outputs \u306F 1 \u3064\u3060\u3051\u66F8\u304F)\u3002\u984C\u540D\u306F\u300C\u4F55\u3092\u4F5C\u308B\u304B\u300D\u304C\u5206\u304B\u308B\u77ED\u3044\u8A00\u8449\u306B\u3059\u308B\u3002\n\u671F\u65E5\u3084\u6642\u9593\u306F `npx boxglow set <block> --due 2026-10-15 --start 2026-10-01 --estimate 8 --hours 3.5` \u3067\u8A18\u9332\u3059\u308B\u3002\n\u30DC\u30C3\u30AF\u30B9\u306B\u306F\u4ED5\u4E8B\u306E\u7A2E\u985E (\u30AB\u30C6\u30B4\u30EA) \u3092\u4ED8\u3051\u308B: `--category design` (\u8A2D\u8A08) / build (\u5B9F\u88C5) / verify (\u691C\u8A3C) / evaluate (\u8A55\u4FA1) / study (\u691C\u8A0E) / research (\u8ABF\u67FB) / ui (\u30C7\u30B6\u30A4\u30F3) / improve (\u6539\u5584) / fix (\u8AB2\u984C\u89E3\u6C7A) / docs (\u6587\u66F8) / ops (\u904B\u7528) / other (\u305D\u306E\u4ED6: \u8FF7\u3063\u305F\u3068\u304D)\u3002add \u306E\u3068\u304D\u306B\u4ED8\u3051\u3001\u5909\u3048\u308B\u306A\u3089 `npx boxglow set <block> --category verify`\u3002\n\u7D50\u7DDA\u306E\u53D7\u3051\u5074\u306F\u984C\u540D\u3060\u3051\u3067\u3088\u3044 (`npx boxglow connect "A.\u8A2D\u8A08\u66F8" "B"` \u3067 B \u306B\u5165\u529B\u300C\u8A2D\u8A08\u66F8\u300D\u304C\u4F5C\u3089\u308C\u3066\u3064\u306A\u304C\u308B\u3002split \u306E connections \u3082 `to: "B"` \u3067\u3088\u3044)\u3002\u3064\u306A\u3044\u3060\u5165\u529B\u306E\u540D\u524D\u306F\u4F9B\u7D66\u5143\u306E\u51FA\u529B\u540D\u306B\u306A\u308A\u3001\u5165\u529B\u5074\u3067\u306F\u5909\u3048\u3089\u308C\u306A\u3044 (\u5909\u3048\u308B\u306A\u3089\u4F9B\u7D66\u5143\u306E\u51FA\u529B\u306E\u540D\u524D\u3092\u5909\u3048\u308B\u3002\u3064\u306A\u304C\u308B\u5148\u3082\u4E00\u7DD2\u306B\u5909\u308F\u308B)\u3002\u65E2\u5B58\u306E\u30DC\u30C3\u30AF\u30B9\u306B\u5165\u51FA\u529B\u3092\u8DB3\u3059 / \u540D\u524D\u3092\u5909\u3048\u308B\u306E\u306F `npx boxglow port <block> --in <\u540D\u524D> --out <\u540D\u524D> --rename <\u65E7>=<\u65B0>` (`project` = \u6700\u521D\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30DC\u30C3\u30AF\u30B9\u3002\u6700\u7D42\u6210\u679C\u7269\u306E\u540D\u524D\u3082\u3053\u308C\u3067\u5909\u3048\u308B)\u3002\u7DDA\u3092\u5916\u3059\u306E\u306F `npx boxglow disconnect <\u984C\u540D.\u51FA\u529B\u540D> <\u984C\u540D.\u5165\u529B\u540D>`\u3001\u30DC\u30C3\u30AF\u30B9\u305D\u306E\u3082\u306E\u3092\u6D88\u3059\u306E\u306F `npx boxglow remove <block>` (\u4E2D\u306B\u30DC\u30C3\u30AF\u30B9\u304C\u3042\u308C\u3070 `--force`)\u3002MCP \u30C4\u30FC\u30EB (`boxglow_status` / `boxglow_start` / `boxglow_done` / `boxglow_ask` \u306A\u3069\u3002\u5229\u7528\u3059\u308B\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306B\u767B\u9332\u6E08\u307F\u306A\u3089\u4F7F\u3048\u308B\u3002`.mcp.json` \u306F Claude Code \u5411\u3051\u3067\u3001Codex \u306F\u5225\u9014\u767B\u9332\u3059\u308B) \u306F\u540C\u3058\u30B3\u30DE\u30F3\u30C9\u306E\u5225\u306E\u5165\u53E3\u3067\u3001\u3069\u3061\u3089\u3067\u66F8\u3044\u3066\u3082\u540C\u3058\u30D5\u30A1\u30A4\u30EB\u304C\u66F4\u65B0\u3055\u308C\u308B\u3002\u8A08\u753B\u306E\u6587\u66F8\u306F `npx boxglow export --out docs/ROADMAP.md`\u3002\n\u65B0\u3057\u3044\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3067\u306F\u3001\u65B9\u91DD (README \u3084\u4F9D\u983C\u6587) \u304B\u3089\u6700\u4E0A\u4F4D\u306E\u5927\u9805\u76EE 3\u301C7 \u500B\u3092\u5148\u306B\u4F5C\u308A\u3001\u4EBA\u306B `ask` \u3067\u78BA\u8A8D\u3057\u3066\u304B\u3089\u3001\u7740\u624B\u3059\u308B\u5927\u9805\u76EE\u3060\u3051\u3092 `split` \u3067\u5206\u89E3\u3059\u308B (\u5148\u306E\u6BB5\u968E\u306F\u7C97\u3044\u307E\u307E)\u3002`ask` \u306E\u8CEA\u554F\u306F\u305D\u308C\u3060\u3051\u3067\u5224\u65AD\u3067\u304D\u308B\u3088\u3046\u306B\u66F8\u304D\u3001\u524D\u63D0\u30FB\u6BD4\u8F03\u30FB\u5F71\u97FF\u306F `--context` \u306B\u5165\u308C\u308B (\u300C\u3053\u308C\u3067\u3088\u3044\u3067\u3059\u304B\u300D\u306E\u3088\u3046\u306B\u5916\u3092\u6307\u3055\u306A\u3044)\u3002\u5019\u88DC\u304B\u3089 1 \u3064\u3092\u9078\u3076\u5834\u9762\u3067\u306F\u3001\u81EA\u5206\u3067\u6C7A\u3081\u308B\u3068\u304D\u3082 `ask ... --options "A|B|C"` \u3068 `answer --by <\u81EA\u5206>` \u3067\u8A18\u9332\u3057\u3001\u9078\u3070\u306A\u304B\u3063\u305F\u5019\u88DC\u3092\u6B8B\u3059\u3002\u65B9\u91DD\u8EE2\u63DB\u306F `reopen <block> --note <\u7406\u7531>`\u3002\u3059\u3079\u3066 CLI \u3060\u3051\u3067\u6210\u7ACB\u3059\u308B (\u753B\u9762\u306F\u4EBA\u304C\u898B\u308B\u305F\u3081\u306E\u3082\u306E)\u3002\u4EBA\u304C\u3044\u306A\u3044\u904B\u7528\u306A\u3089\u3001AI \u304C `answer --by <\u81EA\u5206>` \u3067\u5224\u65AD\u3092\u8A18\u9332\u3057\u3066\u9032\u3081\u308B\u3002\n\u51FA\u529B\u306E\u540D\u524D\u306F\u300C\u5177\u4F53\u7684\u306A\u6210\u679C\u7269\u300D\u306B\u3059\u308B (\u4F8B: `\u8A2D\u8A08\u66F8 docs/design.md`\u3001`PR #12`\u3001`\u516C\u958B URL`\u3001`\u30C6\u30B9\u30C8\u7D50\u679C (vitest 53 \u4EF6)`)\u3002\u300C\u6A5F\u80FD\u4E00\u5F0F\u300D\u300C\u6240\u898B\u300D\u306E\u3088\u3046\u306A\u62BD\u8C61\u7684\u306A\u540D\u524D\u306F\u907F\u3051\u3001done \u306E\u3068\u304D\u306F\u5FC5\u305A --artifact \u3067\u30D5\u30A1\u30A4\u30EB\u30FBURL\u30FB\u30B3\u30DF\u30C3\u30C8\u3092\u4ED8\u3051\u308B\u3002\n\u3059\u3079\u3066\u306E\u30DC\u30C3\u30AF\u30B9\u306F\u300C\u5165\u529B \u2192 \u51FA\u529B\u300D\u304C\u4F55\u304B\u306B\u3064\u306A\u304C\u3063\u3066\u3044\u308B\u3088\u3046\u306B\u3059\u308B (\u3064\u306A\u304C\u3063\u3066\u3044\u306A\u3044\u30DC\u30C3\u30AF\u30B9\u306F\u8A08\u753B\u306E\u7A74\u3002\u6700\u4E0A\u4F4D\u306E\u5165\u529B\u30CE\u30FC\u30C9\u306F\u3001\u672A\u63A5\u7D9A\u306E\u5165\u529B\u304C\u81EA\u52D5\u3067\u4E0A\u304C\u308B)\u3002\n\u8907\u6570\u4EBA\u3067\u540C\u3058 boxglow.json \u3092\u7DE8\u96C6\u3059\u308B\u306A\u3089\u3001\u5404\u81EA\u306E clone \u3067\u4E00\u5EA6 `npx boxglow git-setup` \u3092\u5B9F\u884C\u3059\u308B (\u30DC\u30C3\u30AF\u30B9\u306E\u5358\u4F4D\u3067\u81EA\u52D5\u30DE\u30FC\u30B8\u3055\u308C\u3001\u5225\u306E\u30DC\u30C3\u30AF\u30B9\u306E\u5909\u66F4\u306F\u885D\u7A81\u3057\u306A\u3044)\u3002\n\u8907\u6570\u30EA\u30DD\u30B8\u30C8\u30EA\u3092 1 \u3064\u306E\u8A08\u753B\u3067\u7BA1\u7406\u3059\u308B\u3068\u304D\u306F\u3001boxglow.json \u3092\u4E0A\u306E\u30D5\u30A9\u30EB\u30C0\u306B\u7F6E\u304D\u3001\u5404\u30EA\u30DD\u30B8\u30C8\u30EA\u3067\u306F\u74B0\u5883\u5909\u6570 BOXGLOW_FILE \u306B\u305D\u306E\u5834\u6240\u3092\u5165\u308C\u308B (\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30DC\u30C3\u30AF\u30B9\u306F\u30EA\u30DD\u30B8\u30C8\u30EA\u3054\u3068\u306B 1 \u3064\u3002`npx boxglow project "\u540D\u524D" --repo <\u30D1\u30B9>`)\u3002\n\u5165\u529B\u306F\u65E2\u5B9A\u3067\u5FC5\u9808\u3002\u7121\u304F\u3066\u3082\u7740\u624B\u3067\u304D\u308B\u5165\u529B\u306F\u753B\u9762\u3067\u300C\u4EFB\u610F\u300D\u306B\u3059\u308B\u3002status \u306E\u300C\u6B21\u306E\u5019\u88DC\u300D\u306F\u5FC5\u9808\u306E\u5165\u529B\u304C\u305D\u308D\u3063\u305F\u30DC\u30C3\u30AF\u30B9\u304B\u3089\u4E26\u3076 (\u300C\u7740\u624B\u3067\u304D\u308B\u300D/\u300C\u5FC5\u9808\u306E\u5165\u529B\u5F85\u3061\u300D\u304C\u4ED8\u304F)\u3002\n\u5165\u529B\u306E\u8AAC\u660E\u306F\u66F8\u304B\u306A\u3044 (\u3064\u306A\u304C\u3063\u305F\u51FA\u529B\u5074\u306E\u8AAC\u660E\u304C\u4F7F\u308F\u308C\u308B)\u3002\u51FA\u529B\u306E\u8AAC\u660E\u306B\u5F62\u5F0F\u30FB\u5236\u7D04\u3092\u66F8\u304F\u3002\n\n\n### \u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3068\u5F15\u304D\u7D99\u304E\n\n\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u306E\u8981\u6C42 (guard) \u306F\u3001AI \u304C\u53E4\u3044\u6307\u793A\u306E\u307E\u307E\u4F5C\u696D\u3092\u9032\u3081\u308B\u306E\u3092\u9632\u3050\u4ED5\u7D44\u307F\u3002`setup-agent` \u304C\u6709\u52B9\u306B\u3059\u308B (\u305D\u308C\u4EE5\u5916\u306E\u8A08\u753B\u3067\u306F `npx boxglow guard on`)\u3002\n\u6709\u52B9\u306A\u8A08\u753B\u3067\u306F\u3001AI \u306E `start` / `done` / `set` / `split` / `artifact` / `ack` / `blocked` / `review` / `leave` / `checkpoint` \u306B `--context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>` \u304C\u8981\u308B\u3002\u4EBA\u306E\u64CD\u4F5C (`--actor human`) \u306B\u306F\u8981\u6C42\u3055\u308C\u306A\u3044\u3002\n\n```\nnpx boxglow context B12 # \u5224\u65AD (\u5F15\u304D\u53D6\u308A\u6E08\u307F\u306E\u56DE\u7B54\u3092\u542B\u3080)\u30FB\u5165\u51FA\u529B\u306E\u6761\u4EF6\u30FB\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u3092\u8AAD\u3080\u3002\u51FA\u529B\u306E contextToken \u304C\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\nnpx boxglow start B12 --note "<\u4F55\u3092\u3059\u308B\u304B>" --context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>\nnpx boxglow ask B12 "<\u8CEA\u554F>" --options "A|B" --context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>\n# \u2192 \u51FA\u529B\u306E\u6700\u5F8C\u306E\u884C: \u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3: <token>\nnpx boxglow done B12 --artifact "<\u540D\u524D>=<\u30D1\u30B9>" --context-token <\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>\n```\n\n- **\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u5909\u308F\u308B\u5834\u5408 (\u8AAD\u307F\u76F4\u3057\u304C\u8981\u308B)**: \u4EBA\u304C\u56DE\u7B54\u3057\u305F\u30FB\u56DE\u7B54\u3092\u76F4\u3057\u305F\u3001\u4EBA\u304C\u6307\u793A (\u984C\u540D\u30FB\u8AAC\u660E\u30FB\u5165\u51FA\u529B\u306E\u6761\u4EF6) \u3092\u5909\u3048\u305F\u3001\u4ED6\u306E AI \u3084\u4EBA\u304C\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u3092\u66F4\u65B0\u3057\u305F\u3002\u89AA\u3084\u5165\u529B\u5143\u306E\u30DC\u30C3\u30AF\u30B9\u3067\u8D77\u304D\u305F\u5834\u5408\u3082\u540C\u3058\u3002\u53E4\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u306F\u62D2\u5426\u3055\u308C\u308B\u306E\u3067\u3001`context` \u3092\u8AAD\u307F\u76F4\u3057\u3001\u5909\u308F\u3063\u305F\u5185\u5BB9\u3092\u4F5C\u696D\u306B\u53CD\u6620\u3057\u3066\u304B\u3089\u3084\u308A\u76F4\u3059\n- **\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u5909\u308F\u3089\u306A\u3044\u5834\u5408**: `start` / `blocked` / `review` / `leave` / `ack`\u3001\u9032\u6357\u30FB\u72B6\u614B\u30FB\u671F\u65E5\u30FB\u30AB\u30C6\u30B4\u30EA\u306E\u5909\u66F4\u3001`check` \u306B\u3088\u308B\u6210\u679C\u7269\u306E\u78BA\u8A8D\u3001\u753B\u9762\u3067\u306E\u914D\u7F6E\u306E\u5909\u66F4\u3002\u540C\u3058\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3092\u4F7F\u3044\u7D9A\u3051\u3089\u308C\u308B\n- **\u81EA\u5206\u3067\u66F4\u65B0\u3067\u304D\u308B\u5834\u5408**: \u81EA\u5206\u306E `ask` / `artifact` / `done` / `set` / `split` / `checkpoint` \u306A\u3069\u3067\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u5909\u308F\u3063\u305F\u3068\u304D\u306F\u3001\u305D\u306E\u51FA\u529B\u306E\u6700\u5F8C\u306E\u884C\u306B\u300C\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3: <token>\u300D\u304C\u51FA\u308B\u3002\u81EA\u5206\u3067\u5909\u3048\u305F\u5185\u5BB9\u306F\u5206\u304B\u3063\u3066\u3044\u308B\u306E\u3067\u3001\u8AAD\u307F\u76F4\u3055\u305A\u306B\u6B21\u306E\u64CD\u4F5C\u3078\u4F7F\u3046\u3002`ask` / `decision` / `answer` / `reopen` \u306F\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u7121\u3057\u3067\u3082\u5B9F\u884C\u3067\u304D\u308B\u304C\u3001\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u51FA\u308B\u306E\u306F\u6700\u65B0\u306E\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3092\u4ED8\u3051\u305F\u3068\u304D\u3060\u3051\n- \u53E4\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3092\u901A\u3059\u305F\u3081\u306B guard \u3092\u7121\u52B9\u306B\u3057\u306A\u3044 (AI \u304C `guard off` \u3059\u308B\u306B\u306F\u6700\u65B0\u306E\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u8981\u308B)\n- MCP \u3067\u306F `boxglow_context` \u3068\u3001\u5404\u30C4\u30FC\u30EB\u306E `contextToken` \u5F15\u6570\u3092\u4F7F\u3046 (\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u306F\u30C4\u30FC\u30EB\u306E\u7D50\u679C\u306E\u6700\u5F8C\u306E\u884C\u306B\u51FA\u308B)\n- \u300C\u4ED6\u306E Boxglow \u304C\u66F8\u304D\u8FBC\u307F\u4E2D (\u30ED\u30C3\u30AF\u4E2D)\u300D\u3068\u51FA\u3066\u3001\u5C11\u3057\u5F85\u3063\u3066\u3084\u308A\u76F4\u3057\u3066\u3082\u89E3\u3051\u306A\u3044\u3068\u304D\u306F\u3001`npx boxglow unlock` \u306E\u8868\u793A (\u6301\u3061\u4E3B\u3068\u5224\u5B9A) \u3092\u4EBA\u306B\u898B\u305B\u3066\u89E3\u9664\u3092\u983C\u3080\u3002\u81EA\u5206\u3067 `--actor human` \u3092\u4ED8\u3051\u305F\u308A\u3001\u30ED\u30C3\u30AF\u306E\u30D5\u30A9\u30EB\u30C0\u3092\u76F4\u63A5\u6D88\u3057\u305F\u308A\u3057\u306A\u3044\n\n---\n';
2929
3232
 
2930
3233
  // docs/AGENTS_SNIPPET.en.md
2931
- var AGENTS_SNIPPET_en_default = '# Instructions for agents using Boxglow (paste into AGENTS.md / CLAUDE.md)\n\nPaste the part between the "---" lines below, as is, into your repository\'s AGENTS.md (Codex) or CLAUDE.md (Claude Code).\nPut boxglow.json at the repository root (`npx boxglow init --name "<project name>"`).\n\n---\n\n## Boxglow (shared plan and progress)\n\n`boxglow.json` is the source of truth for this repository\'s plan and progress. Humans watch this file on the Boxglow screen.\nDo not edit the file directly; always update it with `npx boxglow` commands (this keeps the wiring rules and the history intact).\n\nA block = "a task that turns inputs into an output (deliverable)". It is done (WhiteBox) once the output\'s deliverable is settled.\nStatus: BlackBox (only the output is decided) \u2192 GrayBox (being broken down or worked on) \u2192 WhiteBox (done).\n\n### What to do every time you work\n\n1. **Read first**: read `npx boxglow resume` (or `npx boxglow status --brief`) for handoff notes, answers not yet read by the AI, pending decisions, work in progress and next candidates. To continue a previous session, start from the handoff notes shown there. Check the inputs and outputs of your box with `npx boxglow show <block>`\n2. **Record the start**: when you take on a box, run `npx boxglow start <block> --note "<what you will do>"`. Work on at most 1-2 boxes at a time.\n On a plan with the context guard on, first read `npx boxglow context <block>` and pass the `contextToken` (context token) from its output:\n `npx boxglow start <block> --note "<what you will do>" --context-token <context token>` (see "Context token and handoff" below)\n3. **Split**: when you cannot see how to produce the output with a single box, place smaller boxes inside it with `npx boxglow split <block> --spec \'<JSON>\'`. Always decide the output (deliverable) of each box. Inputs can be omitted if unknown (they automatically become inputs of the level above)\n4. **Record completion**: when the output\'s deliverable exists, run `npx boxglow done <block> --artifact "<name>=<path in the repository>"`.\n With the guard on, add `--context-token <context token>` (if your previous command printed "New context token: <token>", use that one).\n An unchanged file already committed to HEAD is recorded as "commit + path + content hash" (nothing is uploaded). Uncommitted or untracked files remain local file references, and `npx boxglow check` turns them into Git references once they are committed; do not create a commit solely to satisfy Boxglow. Use full `npx boxglow status` when you need the entire tree. For PRs and external material, a URL is fine.\n To attach a deliverable ahead of completion, use `npx boxglow artifact <block> <path>`. Record progress along the way with `npx boxglow set <block> --progress 60`\n5. **When a human decision is needed**: `npx boxglow ask <block> "<question>" --options "A|B"`. Do not proceed with that box until it is answered; move on to another box. A human\'s answer appears under "Answered" in `status`. After reading it, acknowledge it with `npx boxglow ack <block>` (`start` / `done` / `set` etc. on that box also acknowledge it automatically). Until you acknowledge it, it stays on the human\'s screen as "Not read by the AI yet" and the human can still revise the answer. If the answer contains a question back to you, record your own answer too with `ask` and `answer --by <yourself>`\n6. **When you are stuck**: `npx boxglow blocked <block> --note "<what is in the way>"`\n7. **Check deliverables**: after moving or renaming files, run `npx boxglow check` (it detects the move and updates the path; if the file cannot be found, it is flagged)\n8. **Before an interruption or a handoff**: before the session ends, the context is compacted, or you hand over to another AI or a person, save a handoff note with `npx boxglow checkpoint <block> --note "Findings; next steps; unresolved questions"` (with the guard on, add `--context-token <context token>`). It stays in the plan even when the chat history is gone, and the next session reads it with `resume` and `context`\n9. **Report**: at the end of your work, summarize `npx boxglow status --brief` and report it\n\n### Structural rules\n\n- The top level contains only the "input node", the "final deliverable node" and "project boxes". Tasks go inside a project box (the default parent of `add` is the first project box)\n- There is no limit on depth. `split` can be used at any level\n- A box that could be reused in another project (e.g. converting input images to monochrome) can be turned into a template with `npx boxglow export-block <block> --out <name>.boxglow-block.json` and\n inserted with `npx boxglow import-block <path> --parent <block>`. You may share templates by putting them in the repository\'s `boxglow-blocks/`\n\nWhen there are many top-level inputs, create a group with `npx boxglow group "<group name>"` and sort inputs into it with `npx boxglow group-set <input name> <group name>` (e.g. PCIe spec / DDR spec).\n\n### JSON format for split\n\n```json\n{\n "blocks": [\n { "title": "Design", "description": "What to do", "inputs": ["Spec"], "outputs": ["Design doc"] },\n { "title": "Build", "inputs": ["Design doc"], "outputs": ["Code"] }\n ],\n "connections": [\n { "from": "parent.Spec", "to": "Design.Spec" },\n { "from": "Design.Design doc", "to": "Build.Design doc" },\n { "from": "Build.Code", "to": "parent.Output" }\n ]\n}\n```\n\n`parent.<name>` is an input / output of the box being split. `<block>` is a short ID (such as B12; shown in status) or a title.\nA box with no children has a single output (write just one entry in outputs). Make the title a short phrase that tells "what is made".\nRecord dates and hours with `npx boxglow set <block> --due 2026-10-15 --start 2026-10-01 --estimate 8 --hours 3.5`.\nGive each box a kind of work (category): `--category design` / build / verify / evaluate / study / research / ui / improve / fix / docs / ops / other (other: when unsure). Set it at add time; to change it, use `npx boxglow set <block> --category verify`.\nThe receiving side of a connection can be just a title (`npx boxglow connect "A.Design doc" "B"` creates an input "Design doc" on B and connects it. In split\'s connections, `to: "B"` also works). A connected input takes the name of the source output and cannot be renamed on the input side (to change it, rename the source output; everything connected to it changes with it). To add inputs / outputs to an existing box or rename them, use `npx boxglow port <block> --in <name> --out <name> --rename <old>=<new>` (`project` = the first project box. This also renames the final deliverable). Remove a wire with `npx boxglow disconnect <title.output name> <title.input name>`, and remove a box itself with `npx boxglow remove <block>` (`--force` if it has boxes inside). The MCP tools (`boxglow_status` / `boxglow_start` / `boxglow_done` / `boxglow_ask` etc.; available after registration in your agent; `.mcp.json` is the Claude Code configuration) are another entry point to the same commands, and either way updates the same file. Export the plan as a document with `npx boxglow export --out docs/ROADMAP.md`.\nIn a new project, first create 3-7 top-level items from the direction (the README or the request), confirm them with a human via `ask`, and then `split` only the item you are about to start (leave later stages coarse). Write each `ask` question so that it can be decided on its own, and put the premises, comparison and impact in `--context` (do not point outside the question, as in "Is this OK?"). When choosing one of several candidates, even if you decide by yourself, record it with `ask ... --options "A|B|C"` and `answer --by <yourself>` so that the candidates you did not choose are kept. To change direction, use `reopen <block> --note <reason>`. Everything works with the CLI alone (the screen is for humans to watch). If no human is in the loop, the AI records its decisions with `answer --by <yourself>` and proceeds.\nName each output after a "concrete deliverable" (e.g. `Design doc docs/design.md`, `PR #12`, `Public URL`, `Test results (vitest, 53 tests)`). Avoid abstract names such as "feature set" or "findings", and always attach a file, URL or commit with --artifact when you run done.\nMake sure every box\'s "input \u2192 output" is connected to something (an unconnected box is a hole in the plan. Unconnected inputs are raised to the top-level input node automatically).\nIf several people edit the same boxglow.json, each of them runs `npx boxglow git-setup` once in their own clone (changes are merged automatically per box, and changes to different boxes do not conflict).\nTo manage several repositories with one plan, put boxglow.json in the folder above them and set the environment variable BOXGLOW_FILE to its location in each repository (one project box per repository: `npx boxglow project "name" --repo <path>`).\nInputs are required by default. On the screen, mark an input as "Optional" if work can start without it. "Next candidates" in status lists boxes whose required inputs are ready first (each is marked "ready to start" or "waiting for required inputs").\nDo not write descriptions for inputs (the description of the connected output is used). Write the format and constraints in the output\'s description.\n\n\n### Context token and handoff\n\nThe context guard keeps an AI from continuing work on outdated instructions. `setup-agent` turns it on (on other plans, run `npx boxglow guard on`).\nWhile it is on, an AI\'s `start` / `done` / `set` / `split` / `artifact` / `ack` / `blocked` / `review` / `leave` / `checkpoint` need `--context-token <context token>`. Commands run by a person (`--actor human`) do not.\n\n```\nnpx boxglow context B12 # read the decisions (including acknowledged answers), input/output contracts and handoff notes. contextToken in the output is the context token\nnpx boxglow start B12 --note "<what you will do>" --context-token <context token>\nnpx boxglow ask B12 "<question>" --options "A|B" --context-token <context token>\n# -> last line of the output: New context token: <token>\nnpx boxglow done B12 --artifact "<name>=<path>" --context-token <new context token>\n```\n\n- **The context token changes (you must reread)** when a person answers a decision or revises an answer, a person changes the instructions (title, description, input/output contracts), or another AI or a person updates the handoff note. The same applies when this happens on a parent box or an input provider. The old context token is rejected: reread `context`, take the change into account in your work, then retry\n- **The context token does not change** on `start` / `blocked` / `review` / `leave` / `ack`, on changes to progress, status, dates or category, when `check` verifies deliverables, or when boxes are moved on the screen. Keep using the same context token\n- **You can update it yourself**: when your own `ask` / `artifact` / `done` / `set` / `split` / `checkpoint` etc. changes the context, the last line of its output is "New context token: <token>". You already know what you changed, so use it for the next command without rereading. `ask` / `decision` / `answer` / `reopen` run without a context token, but they print the new context token only when you pass the latest one\n- Do not turn the guard off to get past an old context token (an AI needs the latest context token to run `guard off`)\n- With MCP, use `boxglow_context` and the `contextToken` argument of each tool (the new context token is the last line of the tool result)\n\n---\n';
3234
+ var AGENTS_SNIPPET_en_default = '# Instructions for agents using Boxglow (paste into AGENTS.md / CLAUDE.md)\n\nPaste the part between the "---" lines below, as is, into your repository\'s AGENTS.md (Codex) or CLAUDE.md (Claude Code).\nPut boxglow.json at the repository root (`npx boxglow init --name "<project name>"`).\n\n---\n\n## Boxglow (shared plan and progress)\n\n`boxglow.json` is the source of truth for this repository\'s plan and progress. Humans watch this file on the Boxglow screen.\nDo not edit the file directly; always update it with `npx boxglow` commands (this keeps the wiring rules and the history intact).\n\nA block = "a task that turns inputs into an output (deliverable)". It is done (WhiteBox) once the output\'s deliverable is settled.\nStatus: BlackBox (only the output is decided) \u2192 GrayBox (being broken down or worked on) \u2192 WhiteBox (done).\n\n### What to do every time you work\n\n1. **Read first**: read `npx boxglow resume` (or `npx boxglow status --brief`) for handoff notes, answers not yet read by the AI, pending decisions, work in progress and next candidates. To continue a previous session, start from the handoff notes shown there. Check the inputs and outputs of your box with `npx boxglow show <block>`\n2. **Record the start**: when you take on a box, run `npx boxglow start <block> --note "<what you will do>"`. Work on at most 1-2 boxes at a time.\n On a plan with the context guard on, first read `npx boxglow context <block>` and pass the `contextToken` (context token) from its output:\n `npx boxglow start <block> --note "<what you will do>" --context-token <context token>` (see "Context token and handoff" below)\n3. **Split**: when you cannot see how to produce the output with a single box, place smaller boxes inside it with `npx boxglow split <block> --spec \'<JSON>\'`. Always decide the output (deliverable) of each box. Inputs can be omitted if unknown (they automatically become inputs of the level above)\n4. **Record completion**: when the output\'s deliverable exists, run `npx boxglow done <block> --artifact "<name>=<path in the repository>"`.\n With the guard on, add `--context-token <context token>` (if your previous command printed "New context token: <token>", use that one).\n An unchanged file already committed to HEAD is recorded as "commit + path + content hash" (nothing is uploaded). Uncommitted or untracked files remain local file references, and `npx boxglow check` turns them into Git references once they are committed; do not create a commit solely to satisfy Boxglow. Use full `npx boxglow status` when you need the entire tree. For PRs and external material, a URL is fine.\n To attach a deliverable ahead of completion, use `npx boxglow artifact <block> <path>`. Record progress along the way with `npx boxglow set <block> --progress 60`\n5. **When a human decision is needed**: `npx boxglow ask <block> "<question>" --options "A|B"`. Do not proceed with that box until it is answered; move on to another box. A human\'s answer appears under "Answered" in `status`. After reading it, acknowledge it with `npx boxglow ack <block>` (`start` / `done` / `set` etc. on that box also acknowledge it automatically). Until you acknowledge it, it stays on the human\'s screen as "Not read by the AI yet" and the human can still revise the answer. If the answer contains a question back to you, record your own answer too with `ask` and `answer --by <yourself>`\n6. **When you are stuck**: `npx boxglow blocked <block> --note "<what is in the way>"`\n7. **Check deliverables**: after moving or renaming files, run `npx boxglow check` (it detects the move and updates the path; if the file cannot be found, it is flagged)\n8. **Before an interruption or a handoff**: before the session ends, the context is compacted, or you hand over to another AI or a person, save a handoff note with `npx boxglow checkpoint <block> --note "Findings; next steps; unresolved questions"` (with the guard on, add `--context-token <context token>`). It stays in the plan even when the chat history is gone, and the next session reads it with `resume` and `context`\n9. **Report**: at the end of your work, summarize `npx boxglow status --brief` and report it\n\n### Structural rules\n\n- The top level contains only the "input node", the "final deliverable node" and "project boxes". Tasks go inside a project box (the default parent of `add` is the first project box)\n- There is no limit on depth. `split` can be used at any level\n- A box that could be reused in another project (e.g. converting input images to monochrome) can be turned into a template with `npx boxglow export-block <block> --out <name>.boxglow-block.json` and\n inserted with `npx boxglow import-block <path> --parent <block>`. You may share templates by putting them in the repository\'s `boxglow-blocks/`\n\nWhen there are many top-level inputs, create a group with `npx boxglow group "<group name>"` and sort inputs into it with `npx boxglow group-set <input name> <group name>` (e.g. PCIe spec / DDR spec).\n\n### JSON format for split\n\n```json\n{\n "blocks": [\n { "title": "Design", "description": "What to do", "inputs": ["Spec"], "outputs": ["Design doc"] },\n { "title": "Build", "inputs": ["Design doc"], "outputs": ["Code"] }\n ],\n "connections": [\n { "from": "parent.Spec", "to": "Design.Spec" },\n { "from": "Design.Design doc", "to": "Build.Design doc" },\n { "from": "Build.Code", "to": "parent.Output" }\n ]\n}\n```\n\n`parent.<name>` is an input / output of the box being split. `<block>` is a short ID (such as B12; shown in status) or a title.\nA box with no children has a single output (write just one entry in outputs). Make the title a short phrase that tells "what is made".\nRecord dates and hours with `npx boxglow set <block> --due 2026-10-15 --start 2026-10-01 --estimate 8 --hours 3.5`.\nGive each box a kind of work (category): `--category design` / build / verify / evaluate / study / research / ui / improve / fix / docs / ops / other (other: when unsure). Set it at add time; to change it, use `npx boxglow set <block> --category verify`.\nThe receiving side of a connection can be just a title (`npx boxglow connect "A.Design doc" "B"` creates an input "Design doc" on B and connects it. In split\'s connections, `to: "B"` also works). A connected input takes the name of the source output and cannot be renamed on the input side (to change it, rename the source output; everything connected to it changes with it). To add inputs / outputs to an existing box or rename them, use `npx boxglow port <block> --in <name> --out <name> --rename <old>=<new>` (`project` = the first project box. This also renames the final deliverable). Remove a wire with `npx boxglow disconnect <title.output name> <title.input name>`, and remove a box itself with `npx boxglow remove <block>` (`--force` if it has boxes inside). The MCP tools (`boxglow_status` / `boxglow_start` / `boxglow_done` / `boxglow_ask` etc.; available after registration in your agent; `.mcp.json` is the Claude Code configuration) are another entry point to the same commands, and either way updates the same file. Export the plan as a document with `npx boxglow export --out docs/ROADMAP.md`.\nIn a new project, first create 3-7 top-level items from the direction (the README or the request), confirm them with a human via `ask`, and then `split` only the item you are about to start (leave later stages coarse). Write each `ask` question so that it can be decided on its own, and put the premises, comparison and impact in `--context` (do not point outside the question, as in "Is this OK?"). When choosing one of several candidates, even if you decide by yourself, record it with `ask ... --options "A|B|C"` and `answer --by <yourself>` so that the candidates you did not choose are kept. To change direction, use `reopen <block> --note <reason>`. Everything works with the CLI alone (the screen is for humans to watch). If no human is in the loop, the AI records its decisions with `answer --by <yourself>` and proceeds.\nName each output after a "concrete deliverable" (e.g. `Design doc docs/design.md`, `PR #12`, `Public URL`, `Test results (vitest, 53 tests)`). Avoid abstract names such as "feature set" or "findings", and always attach a file, URL or commit with --artifact when you run done.\nMake sure every box\'s "input \u2192 output" is connected to something (an unconnected box is a hole in the plan. Unconnected inputs are raised to the top-level input node automatically).\nIf several people edit the same boxglow.json, each of them runs `npx boxglow git-setup` once in their own clone (changes are merged automatically per box, and changes to different boxes do not conflict).\nTo manage several repositories with one plan, put boxglow.json in the folder above them and set the environment variable BOXGLOW_FILE to its location in each repository (one project box per repository: `npx boxglow project "name" --repo <path>`).\nInputs are required by default. On the screen, mark an input as "Optional" if work can start without it. "Next candidates" in status lists boxes whose required inputs are ready first (each is marked "ready to start" or "waiting for required inputs").\nDo not write descriptions for inputs (the description of the connected output is used). Write the format and constraints in the output\'s description.\n\n\n### Context token and handoff\n\nThe context guard keeps an AI from continuing work on outdated instructions. `setup-agent` turns it on (on other plans, run `npx boxglow guard on`).\nWhile it is on, an AI\'s `start` / `done` / `set` / `split` / `artifact` / `ack` / `blocked` / `review` / `leave` / `checkpoint` need `--context-token <context token>`. Commands run by a person (`--actor human`) do not.\n\n```\nnpx boxglow context B12 # read the decisions (including acknowledged answers), input/output contracts and handoff notes. contextToken in the output is the context token\nnpx boxglow start B12 --note "<what you will do>" --context-token <context token>\nnpx boxglow ask B12 "<question>" --options "A|B" --context-token <context token>\n# -> last line of the output: New context token: <token>\nnpx boxglow done B12 --artifact "<name>=<path>" --context-token <new context token>\n```\n\n- **The context token changes (you must reread)** when a person answers a decision or revises an answer, a person changes the instructions (title, description, input/output contracts), or another AI or a person updates the handoff note. The same applies when this happens on a parent box or an input provider. The old context token is rejected: reread `context`, take the change into account in your work, then retry\n- **The context token does not change** on `start` / `blocked` / `review` / `leave` / `ack`, on changes to progress, status, dates or category, when `check` verifies deliverables, or when boxes are moved on the screen. Keep using the same context token\n- **You can update it yourself**: when your own `ask` / `artifact` / `done` / `set` / `split` / `checkpoint` etc. changes the context, the last line of its output is "New context token: <token>". You already know what you changed, so use it for the next command without rereading. `ask` / `decision` / `answer` / `reopen` run without a context token, but they print the new context token only when you pass the latest one\n- Do not turn the guard off to get past an old context token (an AI needs the latest context token to run `guard off`)\n- With MCP, use `boxglow_context` and the `contextToken` argument of each tool (the new context token is the last line of the tool result)\n- If "Another Boxglow writer holds the file lock" persists after waiting and retrying, show the output of `npx boxglow unlock` (owner and verdict) to a person and ask them to remove it. Never add `--actor human` yourself or delete the lock folder directly\n\n---\n';
2932
3235
 
2933
3236
  // .claude/skills/boxglow/SKILL.md
2934
- var SKILL_default = '---\nname: boxglow\ndescription: Boxglow (boxglow.json) \u3067\u8A08\u753B\u3068\u9032\u6357\u3092\u4EBA\u9593\u3068\u5171\u6709\u3059\u308B\u3002\u4F5C\u696D\u306E\u958B\u59CB\u30FB\u5206\u89E3\u30FB\u5B8C\u4E86\u30FB\u5224\u65AD\u5F85\u3061\u3092 npx boxglow \u3067\u8A18\u9332\u3059\u308B\u3002\u300C\u9032\u6357\u3092 Boxglow \u306B\u8A18\u9332\u3057\u3066\u300D\u300Cboxglow \u3067\u72B6\u6CC1\u3092\u898B\u3066\u300D\u300C/boxglow\u300D\u3067\u4F7F\u7528\u3002\n---\n\n# Boxglow \u3067\u8A08\u753B\u3068\u9032\u6357\u3092\u5171\u6709\u3059\u308B\n\n\u30EA\u30DD\u30B8\u30C8\u30EA\u76F4\u4E0B\u306E `boxglow.json` \u304C\u8A08\u753B\u306E\u6B63\u672C\u3002\u4EBA\u9593\u306F Boxglow \u306E\u753B\u9762 (https://boxglow.pages.dev/ \u3067\u300Cboxglow.json \u3092\u958B\u304F\u300D) \u3067\u898B\u3066\u3044\u308B\u3002\n\u76F4\u63A5\u7DE8\u96C6\u305B\u305A `npx boxglow` \u3067\u66F4\u65B0\u3059\u308B\u3002\n\n## \u6700\u521D\u306E\u8A08\u753B\u3065\u304F\u308A (\u65B0\u3057\u3044\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u3068\u304D)\n\n1. \u65B9\u91DD (README\u3001\u4F9D\u983C\u6587\u3001\u8981\u4EF6\u30E1\u30E2) \u3092\u8AAD\u307F\u3001`npx boxglow init --name "<\u540D\u524D>"` \u306E\u3042\u3068\u3001\u6700\u4E0A\u4F4D\u306B\u5927\u9805\u76EE (3\u301C7 \u500B) \u3092 `add` \u3067\u7F6E\u304F\u3002\n \u5404\u5927\u9805\u76EE\u306B\u306F\u300C\u5165\u529B (\u4F55\u3092\u4F7F\u3046\u304B)\u300D\u3068\u300C\u51FA\u529B (\u5177\u4F53\u7684\u306A\u6210\u679C\u7269: \u30D5\u30A1\u30A4\u30EB\u30FBURL\u30FBPR)\u300D\u3092\u5FC5\u305A\u66F8\u304D\u3001\u6700\u7D42\u6210\u679C\u7269\u307E\u3067\u7DDA\u3067\u3064\u306A\u3050 (`connect`)\n2. \u4F5C\u3063\u305F\u3089 `npx boxglow ask <\u6700\u521D\u306E\u5927\u9805\u76EE> "\u3053\u306E\u5927\u9805\u76EE\u306E\u5206\u3051\u65B9\u3067\u3088\u3044\u3067\u3059\u304B?" --options "\u3088\u3044|\u76F4\u3057\u305F\u3044"` \u3067\u4EBA\u306E\u78BA\u8A8D\u3092\u53D6\u308B\u3002\n \u4EBA\u306F\u753B\u9762\u3067\u3082\u3001`npx boxglow answer <block> "<\u56DE\u7B54>"` \u3067\u3082\u3001\u30C1\u30E3\u30C3\u30C8\u3067\u3082\u7B54\u3048\u3089\u308C\u308B\u3002\u30C1\u30E3\u30C3\u30C8\u3067\u7B54\u3048\u304C\u8FD4\u3063\u305F\u3089 AI \u304C `answer --by human` \u3067\u8A18\u9332\u3059\u308B\u3002\n \u4EBA\u304C\u753B\u9762\u3092\u4F7F\u308F\u306A\u3044\u904B\u7528 (AI \u3060\u3051\u3067\u9032\u3081\u308B\u6307\u793A\u304C\u3042\u308B\u3068\u304D) \u306F\u3001AI \u81EA\u8EAB\u304C `answer --by claude-code "<\u5224\u65AD\u3068\u7406\u7531>"` \u3067\u8A18\u9332\u3057\u3066\u5148\u3078\u9032\u3080\u3002\u5224\u65AD\u306E\u8A18\u9332\u3092\u6B8B\u3059\u3053\u3068\u304C\u76EE\u7684\u3067\u3001\u753B\u9762\u306F\u5FC5\u9808\u3067\u306F\u306A\u3044\n3. \u7740\u624B\u3059\u308B\u5927\u9805\u76EE\u3060\u3051\u3092 `split` \u3067\u5206\u89E3\u3059\u308B (\u5148\u306E\u6BB5\u968E\u306F\u7C97\u3044\u307E\u307E\u3002\u9032\u3081\u306A\u304C\u3089\u7D30\u304B\u304F\u3059\u308B)\n\n## \u624B\u9806\n\n1. `npx boxglow resume` (\u307E\u305F\u306F `npx boxglow status --brief`) \u3092\u8AAD\u3080\u3002\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u3001AI \u672A\u78BA\u8A8D\u306E\u56DE\u7B54\u3001\u5224\u65AD\u5F85\u3061\u3001\u4F5C\u696D\u4E2D\u306E\u30DC\u30C3\u30AF\u30B9\u3001\u6B21\u306E\u5019\u88DC\u3092\u628A\u63E1\u3059\u308B\u3002\u5168\u968E\u5C64\u304C\u8981\u308B\u3068\u304D\u306F `npx boxglow status`\n2. \u62C5\u5F53\u3059\u308B\u30DC\u30C3\u30AF\u30B9\u3092\u6C7A\u3081\u305F\u3089 `npx boxglow show <block>` \u3067\u5165\u51FA\u529B\u3092\u78BA\u8A8D\u3057\u3001`npx boxglow start <block> --note "<\u4F55\u3092\u3059\u308B\u304B>"`\u3002\n \u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u306E\u8981\u6C42 (guard) \u304C\u6709\u52B9\u306A\u8A08\u753B\u3067\u306F\u3001\u5148\u306B `npx boxglow context <block>` \u3092\u8AAD\u307F\u3001\u51FA\u529B\u306E `contextToken` (\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3) \u3092 `--context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>` \u3067\u4ED8\u3051\u308B\n3. \u5927\u304D\u3044\u30DC\u30C3\u30AF\u30B9\u306F `npx boxglow split <block> --spec \'<JSON>\'` \u3067\u5206\u89E3\u3059\u308B (\u5F62\u5F0F\u306F `npx boxglow help`)\u3002\u5404\u30DC\u30C3\u30AF\u30B9\u306E\u51FA\u529B\u3092\u5FC5\u305A\u6C7A\u3081\u308B\n4. \u6210\u679C\u7269\u304C\u3067\u304D\u305F\u3089 `npx boxglow done <block> --artifact "<\u540D\u524D>=<URL \u307E\u305F\u306F\u30D1\u30B9>"` (guard \u304C\u6709\u52B9\u306A\u3089 `--context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>` \u3092\u4ED8\u3051\u308B\u3002\u76F4\u524D\u306E\u81EA\u5206\u306E\u64CD\u4F5C\u306E\u51FA\u529B\u306B\u300C\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3: <token>\u300D\u304C\u51FA\u3066\u3044\u308C\u3070\u3001\u305D\u308C\u3092\u4F7F\u3046)\n5. \u4EBA\u9593\u306E\u5224\u65AD\u304C\u8981\u308B\u3068\u304D\u306F `npx boxglow ask <block> "<\u8CEA\u554F>" --options "A|B"` \u3057\u3066\u4ED6\u306E\u30DC\u30C3\u30AF\u30B9\u3078\u79FB\u308B\n6. \u8A70\u307E\u3063\u305F\u3089 `npx boxglow blocked <block> --note "<\u56F0\u3063\u3066\u3044\u308B\u3053\u3068>"`\n7. \u4E2D\u65AD\u30FB\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u5727\u7E2E\u30FB\u5F15\u304D\u7D99\u304E\u306E\u524D\u306B `npx boxglow checkpoint <block> --note "\u5206\u304B\u3063\u305F\u3053\u3068; \u6B21\u306B\u3059\u308B\u3053\u3068; \u672A\u89E3\u6C7A\u306E\u3053\u3068"` \u3067\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u3092\u6B8B\u3059\n8. \u6700\u5F8C\u306B `npx boxglow status --brief` \u3092\u8981\u7D04\u3057\u3066\u5831\u544A\u3059\u308B\n\n## \u7D04\u675F\n\n- `ask` \u306E\u8CEA\u554F\u306F\u3001\u305D\u308C\u3060\u3051\u3067\u5224\u65AD\u3067\u304D\u308B\u3088\u3046\u306B\u66F8\u304F\u3002\u300C\u3053\u308C\u3067\u3088\u3044\u3067\u3059\u304B\u300D\u300C\u4E0A\u8A18\u306E\u6848\u300D\u306E\u3088\u3046\u306B\u5916\u3092\u6307\u3055\u305A\u3001\u524D\u63D0\u30FB\u6BD4\u8F03\u30FB\u5F71\u97FF\u3092 `--context` \u306B\u66F8\u304F (\u4EBA\u306F\u4E00\u89A7\u306E\u4E2D\u306E\u8CEA\u554F\u3060\u3051\u3092\u8AAD\u3093\u3067\u7B54\u3048\u308B)\n- \u5019\u88DC\u304B\u3089 1 \u3064\u3092\u9078\u3076\u5834\u9762 (\u65B9\u5F0F\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u30FB\u8A2D\u8A08\u306E\u9078\u629E) \u3067\u306F\u3001AI \u304C\u81EA\u5206\u3067\u6C7A\u3081\u308B\u3068\u304D\u3082 `ask <block> "<\u554F\u3044>" --options "A|B|C"` \u2192 `answer --by claude-code "<\u9078\u3093\u3060\u3082\u306E>\u3002\u7406\u7531: ..."` \u306E\u5F62\u3067\u8A18\u9332\u3057\u3001\u9078\u3070\u306A\u304B\u3063\u305F\u5019\u88DC\u3092\u30DC\u30C3\u30AF\u30B9\u306B\u6B8B\u3059 (\u65B9\u91DD\u8EE2\u63DB\u306E\u3068\u304D\u306B\u623B\u308C\u308B)\n- \u65B9\u91DD\u8EE2\u63DB\u306F `reopen <block> --note "<\u7406\u7531>"` \u3067\u524D\u306E\u7B54\u3048\u3092\u5C65\u6B74\u306B\u6B8B\u3057\u3066\u9078\u3073\u76F4\u3059 (\u5019\u88DC\u306F\u6D88\u3055\u306A\u3044)\n\n- \u540C\u6642\u306B\u4F5C\u696D\u4E2D\u306B\u3059\u308B\u30DC\u30C3\u30AF\u30B9\u306F 1\u301C2 \u500B\u307E\u3067\n- \u6210\u679C\u7269 (artifact) \u306F\u5F8C\u304B\u3089\u4EBA\u304C\u958B\u3051\u308B\u3082\u306E (\u30B3\u30DF\u30C3\u30C8\u3001PR\u3001\u30D5\u30A1\u30A4\u30EB\u306E\u30D1\u30B9) \u306B\u3059\u308B\n- \u51FA\u529B\u306F\u5177\u4F53\u7684\u306A\u6210\u679C\u7269\u306E\u540D\u524D\u306B\u3059\u308B (\u30D5\u30A1\u30A4\u30EB\u30FBPR\u30FBURL\u30FB\u30C6\u30B9\u30C8\u7D50\u679C)\u3002\u62BD\u8C61\u7684\u306A\u540D\u524D (\u6A5F\u80FD\u4E00\u5F0F\u3001\u6240\u898B) \u306F\u907F\u3051\u308B\n- \u7D50\u7DDA\u306E\u53D7\u3051\u5074\u306F\u984C\u540D\u3060\u3051\u3067\u3088\u3044 (`connect "A.\u8A2D\u8A08\u66F8" "B"` \u3067 B \u306B\u5165\u529B\u300C\u8A2D\u8A08\u66F8\u300D\u304C\u4F5C\u3089\u308C\u308B)\u3002\u5165\u529B\u540D\u306F\u4F9B\u7D66\u5143\u306E\u51FA\u529B\u540D\u3067\u6C7A\u307E\u308A\u3001\u5165\u529B\u5074\u3067\u306F\u5909\u3048\u306A\u3044\n- \u30DC\u30C3\u30AF\u30B9\u306F\u5FC5\u305A\u300C\u5165\u529B \u2192 \u51FA\u529B\u300D\u3067\u3064\u306A\u3050\u3002\u8DB3\u308A\u306A\u3044\u5165\u51FA\u529B\u306F `port`\u3001\u5916\u3059\u306E\u306F `disconnect`\u3001\u30DC\u30C3\u30AF\u30B9\u305D\u306E\u3082\u306E\u3092\u6D88\u3059\u306E\u306F `remove`\u3002\u6587\u66F8\u5316\u306F `export --out docs/ROADMAP.md`\n- \u30DC\u30C3\u30AF\u30B9\u3092 add \u3059\u308B\u3068\u304D\u306F\u4ED5\u4E8B\u306E\u7A2E\u985E\u3092 `--category` \u3067\u4ED8\u3051\u308B (design \u8A2D\u8A08 / build \u5B9F\u88C5 / verify \u691C\u8A3C / evaluate \u8A55\u4FA1 / study \u691C\u8A0E / research \u8ABF\u67FB / ui \u30C7\u30B6\u30A4\u30F3 / improve \u6539\u5584 / fix \u8AB2\u984C\u89E3\u6C7A / docs \u6587\u66F8 / ops \u904B\u7528 / other \u305D\u306E\u4ED6)\u3002\u753B\u9762\u3067\u306F\u8272\u306E\u5E2F\u3068\u672D\u306B\u306A\u308B\n- boxglow.json \u304C\u307E\u3060\u7121\u3051\u308C\u3070 `npx boxglow init --name "<\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D>"` \u3067\u4F5C\u308A\u3001\u6700\u7D42\u6210\u679C\u7269\u3068\u6700\u4E0A\u4F4D\u306E\u30DC\u30C3\u30AF\u30B9\u3092 `add` \u3067\u7F6E\u304F\n\n## \u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3068\u5F15\u304D\u7D99\u304E\n\n\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u306E\u8981\u6C42 (guard) \u306F\u3001AI \u304C\u53E4\u3044\u6307\u793A\u306E\u307E\u307E\u4F5C\u696D\u3092\u9032\u3081\u308B\u306E\u3092\u9632\u3050\u4ED5\u7D44\u307F\u3002`setup-agent` \u304C\u6709\u52B9\u306B\u3059\u308B (\u305D\u308C\u4EE5\u5916\u306E\u8A08\u753B\u3067\u306F `npx boxglow guard on`)\u3002\n\u6709\u52B9\u306A\u8A08\u753B\u3067\u306F\u3001AI \u306E `start` / `done` / `set` / `split` / `artifact` / `ack` / `blocked` / `review` / `leave` / `checkpoint` \u306B `--context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>` \u304C\u8981\u308B\u3002\u4EBA\u306E\u64CD\u4F5C (`--actor human`) \u306B\u306F\u8981\u6C42\u3055\u308C\u306A\u3044\u3002\n\n```\nnpx boxglow context B12 # \u5224\u65AD (\u5F15\u304D\u53D6\u308A\u6E08\u307F\u306E\u56DE\u7B54\u3092\u542B\u3080)\u30FB\u5165\u51FA\u529B\u306E\u6761\u4EF6\u30FB\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u3092\u8AAD\u3080\u3002\u51FA\u529B\u306E contextToken \u304C\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\nnpx boxglow start B12 --note "<\u4F55\u3092\u3059\u308B\u304B>" --context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>\nnpx boxglow ask B12 "<\u8CEA\u554F>" --options "A|B" --context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>\n# \u2192 \u51FA\u529B\u306E\u6700\u5F8C\u306E\u884C: \u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3: <token>\nnpx boxglow done B12 --artifact "<\u540D\u524D>=<\u30D1\u30B9>" --context-token <\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>\n```\n\n- **\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u5909\u308F\u308B\u5834\u5408 (\u8AAD\u307F\u76F4\u3057\u304C\u8981\u308B)**: \u4EBA\u304C\u56DE\u7B54\u3057\u305F\u30FB\u56DE\u7B54\u3092\u76F4\u3057\u305F\u3001\u4EBA\u304C\u6307\u793A (\u984C\u540D\u30FB\u8AAC\u660E\u30FB\u5165\u51FA\u529B\u306E\u6761\u4EF6) \u3092\u5909\u3048\u305F\u3001\u4ED6\u306E AI \u3084\u4EBA\u304C\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u3092\u66F4\u65B0\u3057\u305F\u3002\u89AA\u3084\u5165\u529B\u5143\u306E\u30DC\u30C3\u30AF\u30B9\u3067\u8D77\u304D\u305F\u5834\u5408\u3082\u540C\u3058\u3002\u53E4\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u306F\u62D2\u5426\u3055\u308C\u308B\u306E\u3067\u3001`context` \u3092\u8AAD\u307F\u76F4\u3057\u3001\u5909\u308F\u3063\u305F\u5185\u5BB9\u3092\u4F5C\u696D\u306B\u53CD\u6620\u3057\u3066\u304B\u3089\u3084\u308A\u76F4\u3059\n- **\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u5909\u308F\u3089\u306A\u3044\u5834\u5408**: `start` / `blocked` / `review` / `leave` / `ack`\u3001\u9032\u6357\u30FB\u72B6\u614B\u30FB\u671F\u65E5\u30FB\u30AB\u30C6\u30B4\u30EA\u306E\u5909\u66F4\u3001`check` \u306B\u3088\u308B\u6210\u679C\u7269\u306E\u78BA\u8A8D\u3001\u753B\u9762\u3067\u306E\u914D\u7F6E\u306E\u5909\u66F4\u3002\u540C\u3058\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3092\u4F7F\u3044\u7D9A\u3051\u3089\u308C\u308B\n- **\u81EA\u5206\u3067\u66F4\u65B0\u3067\u304D\u308B\u5834\u5408**: \u81EA\u5206\u306E `ask` / `artifact` / `done` / `set` / `split` / `checkpoint` \u306A\u3069\u3067\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u5909\u308F\u3063\u305F\u3068\u304D\u306F\u3001\u305D\u306E\u51FA\u529B\u306E\u6700\u5F8C\u306E\u884C\u306B\u300C\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3: <token>\u300D\u304C\u51FA\u308B\u3002\u8AAD\u307F\u76F4\u3055\u305A\u306B\u6B21\u306E\u64CD\u4F5C\u3078\u4F7F\u3046\u3002`ask` / `decision` / `answer` / `reopen` \u306F\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u7121\u3057\u3067\u3082\u5B9F\u884C\u3067\u304D\u308B\u304C\u3001\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u51FA\u308B\u306E\u306F\u6700\u65B0\u306E\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3092\u4ED8\u3051\u305F\u3068\u304D\u3060\u3051\n- \u53E4\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3092\u901A\u3059\u305F\u3081\u306B guard \u3092\u7121\u52B9\u306B\u3057\u306A\u3044 (AI \u304C `guard off` \u3059\u308B\u306B\u306F\u6700\u65B0\u306E\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u8981\u308B)\n- \u518D\u958B\u3059\u308B\u3068\u304D\u306F `npx boxglow resume` \u3092\u8AAD\u307F\u3001\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u306E\u3042\u308B\u30DC\u30C3\u30AF\u30B9\u306F `context` \u3067\u4E2D\u8EAB\u3092\u78BA\u304B\u3081\u3066\u304B\u3089\u7D9A\u3051\u308B\u3002\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u306F\u4F1A\u8A71\u306E\u5C65\u6B74\u3084\u6D3B\u52D5\u30ED\u30B0\u306E\u4E0A\u9650\u3068\u306F\u5225\u306B\u3001\u8A08\u753B\u306E\u4E2D\u306B\u6B8B\u308B\n- MCP \u3067\u306F `boxglow_context` \u3068\u3001\u5404\u30C4\u30FC\u30EB\u306E `contextToken` \u5F15\u6570\u3092\u4F7F\u3046\n';
3237
+ var SKILL_default = '---\nname: boxglow\ndescription: Boxglow (boxglow.json) \u3067\u8A08\u753B\u3068\u9032\u6357\u3092\u4EBA\u9593\u3068\u5171\u6709\u3059\u308B\u3002\u4F5C\u696D\u306E\u958B\u59CB\u30FB\u5206\u89E3\u30FB\u5B8C\u4E86\u30FB\u5224\u65AD\u5F85\u3061\u3092 npx boxglow \u3067\u8A18\u9332\u3059\u308B\u3002\u300C\u9032\u6357\u3092 Boxglow \u306B\u8A18\u9332\u3057\u3066\u300D\u300Cboxglow \u3067\u72B6\u6CC1\u3092\u898B\u3066\u300D\u300C/boxglow\u300D\u3067\u4F7F\u7528\u3002\n---\n\n# Boxglow \u3067\u8A08\u753B\u3068\u9032\u6357\u3092\u5171\u6709\u3059\u308B\n\n\u30EA\u30DD\u30B8\u30C8\u30EA\u76F4\u4E0B\u306E `boxglow.json` \u304C\u8A08\u753B\u306E\u6B63\u672C\u3002\u4EBA\u9593\u306F Boxglow \u306E\u753B\u9762 (https://boxglow.pages.dev/ \u3067\u300Cboxglow.json \u3092\u958B\u304F\u300D) \u3067\u898B\u3066\u3044\u308B\u3002\n\u76F4\u63A5\u7DE8\u96C6\u305B\u305A `npx boxglow` \u3067\u66F4\u65B0\u3059\u308B\u3002\n\n## \u6700\u521D\u306E\u8A08\u753B\u3065\u304F\u308A (\u65B0\u3057\u3044\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u3068\u304D)\n\n1. \u65B9\u91DD (README\u3001\u4F9D\u983C\u6587\u3001\u8981\u4EF6\u30E1\u30E2) \u3092\u8AAD\u307F\u3001`npx boxglow init --name "<\u540D\u524D>"` \u306E\u3042\u3068\u3001\u6700\u4E0A\u4F4D\u306B\u5927\u9805\u76EE (3\u301C7 \u500B) \u3092 `add` \u3067\u7F6E\u304F\u3002\n \u5404\u5927\u9805\u76EE\u306B\u306F\u300C\u5165\u529B (\u4F55\u3092\u4F7F\u3046\u304B)\u300D\u3068\u300C\u51FA\u529B (\u5177\u4F53\u7684\u306A\u6210\u679C\u7269: \u30D5\u30A1\u30A4\u30EB\u30FBURL\u30FBPR)\u300D\u3092\u5FC5\u305A\u66F8\u304D\u3001\u6700\u7D42\u6210\u679C\u7269\u307E\u3067\u7DDA\u3067\u3064\u306A\u3050 (`connect`)\n2. \u4F5C\u3063\u305F\u3089 `npx boxglow ask <\u6700\u521D\u306E\u5927\u9805\u76EE> "\u3053\u306E\u5927\u9805\u76EE\u306E\u5206\u3051\u65B9\u3067\u3088\u3044\u3067\u3059\u304B?" --options "\u3088\u3044|\u76F4\u3057\u305F\u3044"` \u3067\u4EBA\u306E\u78BA\u8A8D\u3092\u53D6\u308B\u3002\n \u4EBA\u306F\u753B\u9762\u3067\u3082\u3001`npx boxglow answer <block> "<\u56DE\u7B54>"` \u3067\u3082\u3001\u30C1\u30E3\u30C3\u30C8\u3067\u3082\u7B54\u3048\u3089\u308C\u308B\u3002\u30C1\u30E3\u30C3\u30C8\u3067\u7B54\u3048\u304C\u8FD4\u3063\u305F\u3089 AI \u304C `answer --by human` \u3067\u8A18\u9332\u3059\u308B\u3002\n \u4EBA\u304C\u753B\u9762\u3092\u4F7F\u308F\u306A\u3044\u904B\u7528 (AI \u3060\u3051\u3067\u9032\u3081\u308B\u6307\u793A\u304C\u3042\u308B\u3068\u304D) \u306F\u3001AI \u81EA\u8EAB\u304C `answer --by claude-code "<\u5224\u65AD\u3068\u7406\u7531>"` \u3067\u8A18\u9332\u3057\u3066\u5148\u3078\u9032\u3080\u3002\u5224\u65AD\u306E\u8A18\u9332\u3092\u6B8B\u3059\u3053\u3068\u304C\u76EE\u7684\u3067\u3001\u753B\u9762\u306F\u5FC5\u9808\u3067\u306F\u306A\u3044\n3. \u7740\u624B\u3059\u308B\u5927\u9805\u76EE\u3060\u3051\u3092 `split` \u3067\u5206\u89E3\u3059\u308B (\u5148\u306E\u6BB5\u968E\u306F\u7C97\u3044\u307E\u307E\u3002\u9032\u3081\u306A\u304C\u3089\u7D30\u304B\u304F\u3059\u308B)\n\n## \u624B\u9806\n\n1. `npx boxglow resume` (\u307E\u305F\u306F `npx boxglow status --brief`) \u3092\u8AAD\u3080\u3002\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u3001AI \u672A\u78BA\u8A8D\u306E\u56DE\u7B54\u3001\u5224\u65AD\u5F85\u3061\u3001\u4F5C\u696D\u4E2D\u306E\u30DC\u30C3\u30AF\u30B9\u3001\u6B21\u306E\u5019\u88DC\u3092\u628A\u63E1\u3059\u308B\u3002\u5168\u968E\u5C64\u304C\u8981\u308B\u3068\u304D\u306F `npx boxglow status`\n2. \u62C5\u5F53\u3059\u308B\u30DC\u30C3\u30AF\u30B9\u3092\u6C7A\u3081\u305F\u3089 `npx boxglow show <block>` \u3067\u5165\u51FA\u529B\u3092\u78BA\u8A8D\u3057\u3001`npx boxglow start <block> --note "<\u4F55\u3092\u3059\u308B\u304B>"`\u3002\n \u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u306E\u8981\u6C42 (guard) \u304C\u6709\u52B9\u306A\u8A08\u753B\u3067\u306F\u3001\u5148\u306B `npx boxglow context <block>` \u3092\u8AAD\u307F\u3001\u51FA\u529B\u306E `contextToken` (\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3) \u3092 `--context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>` \u3067\u4ED8\u3051\u308B\n3. \u5927\u304D\u3044\u30DC\u30C3\u30AF\u30B9\u306F `npx boxglow split <block> --spec \'<JSON>\'` \u3067\u5206\u89E3\u3059\u308B (\u5F62\u5F0F\u306F `npx boxglow help`)\u3002\u5404\u30DC\u30C3\u30AF\u30B9\u306E\u51FA\u529B\u3092\u5FC5\u305A\u6C7A\u3081\u308B\n4. \u6210\u679C\u7269\u304C\u3067\u304D\u305F\u3089 `npx boxglow done <block> --artifact "<\u540D\u524D>=<URL \u307E\u305F\u306F\u30D1\u30B9>"` (guard \u304C\u6709\u52B9\u306A\u3089 `--context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>` \u3092\u4ED8\u3051\u308B\u3002\u76F4\u524D\u306E\u81EA\u5206\u306E\u64CD\u4F5C\u306E\u51FA\u529B\u306B\u300C\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3: <token>\u300D\u304C\u51FA\u3066\u3044\u308C\u3070\u3001\u305D\u308C\u3092\u4F7F\u3046)\n5. \u4EBA\u9593\u306E\u5224\u65AD\u304C\u8981\u308B\u3068\u304D\u306F `npx boxglow ask <block> "<\u8CEA\u554F>" --options "A|B"` \u3057\u3066\u4ED6\u306E\u30DC\u30C3\u30AF\u30B9\u3078\u79FB\u308B\n6. \u8A70\u307E\u3063\u305F\u3089 `npx boxglow blocked <block> --note "<\u56F0\u3063\u3066\u3044\u308B\u3053\u3068>"`\n7. \u4E2D\u65AD\u30FB\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u5727\u7E2E\u30FB\u5F15\u304D\u7D99\u304E\u306E\u524D\u306B `npx boxglow checkpoint <block> --note "\u5206\u304B\u3063\u305F\u3053\u3068; \u6B21\u306B\u3059\u308B\u3053\u3068; \u672A\u89E3\u6C7A\u306E\u3053\u3068"` \u3067\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u3092\u6B8B\u3059\n8. \u6700\u5F8C\u306B `npx boxglow status --brief` \u3092\u8981\u7D04\u3057\u3066\u5831\u544A\u3059\u308B\n\n## \u7D04\u675F\n\n- `ask` \u306E\u8CEA\u554F\u306F\u3001\u305D\u308C\u3060\u3051\u3067\u5224\u65AD\u3067\u304D\u308B\u3088\u3046\u306B\u66F8\u304F\u3002\u300C\u3053\u308C\u3067\u3088\u3044\u3067\u3059\u304B\u300D\u300C\u4E0A\u8A18\u306E\u6848\u300D\u306E\u3088\u3046\u306B\u5916\u3092\u6307\u3055\u305A\u3001\u524D\u63D0\u30FB\u6BD4\u8F03\u30FB\u5F71\u97FF\u3092 `--context` \u306B\u66F8\u304F (\u4EBA\u306F\u4E00\u89A7\u306E\u4E2D\u306E\u8CEA\u554F\u3060\u3051\u3092\u8AAD\u3093\u3067\u7B54\u3048\u308B)\n- \u5019\u88DC\u304B\u3089 1 \u3064\u3092\u9078\u3076\u5834\u9762 (\u65B9\u5F0F\u30FB\u30E9\u30A4\u30D6\u30E9\u30EA\u30FB\u8A2D\u8A08\u306E\u9078\u629E) \u3067\u306F\u3001AI \u304C\u81EA\u5206\u3067\u6C7A\u3081\u308B\u3068\u304D\u3082 `ask <block> "<\u554F\u3044>" --options "A|B|C"` \u2192 `answer --by claude-code "<\u9078\u3093\u3060\u3082\u306E>\u3002\u7406\u7531: ..."` \u306E\u5F62\u3067\u8A18\u9332\u3057\u3001\u9078\u3070\u306A\u304B\u3063\u305F\u5019\u88DC\u3092\u30DC\u30C3\u30AF\u30B9\u306B\u6B8B\u3059 (\u65B9\u91DD\u8EE2\u63DB\u306E\u3068\u304D\u306B\u623B\u308C\u308B)\n- \u65B9\u91DD\u8EE2\u63DB\u306F `reopen <block> --note "<\u7406\u7531>"` \u3067\u524D\u306E\u7B54\u3048\u3092\u5C65\u6B74\u306B\u6B8B\u3057\u3066\u9078\u3073\u76F4\u3059 (\u5019\u88DC\u306F\u6D88\u3055\u306A\u3044)\n\n- \u540C\u6642\u306B\u4F5C\u696D\u4E2D\u306B\u3059\u308B\u30DC\u30C3\u30AF\u30B9\u306F 1\u301C2 \u500B\u307E\u3067\n- \u6210\u679C\u7269 (artifact) \u306F\u5F8C\u304B\u3089\u4EBA\u304C\u958B\u3051\u308B\u3082\u306E (\u30B3\u30DF\u30C3\u30C8\u3001PR\u3001\u30D5\u30A1\u30A4\u30EB\u306E\u30D1\u30B9) \u306B\u3059\u308B\n- \u51FA\u529B\u306F\u5177\u4F53\u7684\u306A\u6210\u679C\u7269\u306E\u540D\u524D\u306B\u3059\u308B (\u30D5\u30A1\u30A4\u30EB\u30FBPR\u30FBURL\u30FB\u30C6\u30B9\u30C8\u7D50\u679C)\u3002\u62BD\u8C61\u7684\u306A\u540D\u524D (\u6A5F\u80FD\u4E00\u5F0F\u3001\u6240\u898B) \u306F\u907F\u3051\u308B\n- \u7D50\u7DDA\u306E\u53D7\u3051\u5074\u306F\u984C\u540D\u3060\u3051\u3067\u3088\u3044 (`connect "A.\u8A2D\u8A08\u66F8" "B"` \u3067 B \u306B\u5165\u529B\u300C\u8A2D\u8A08\u66F8\u300D\u304C\u4F5C\u3089\u308C\u308B)\u3002\u5165\u529B\u540D\u306F\u4F9B\u7D66\u5143\u306E\u51FA\u529B\u540D\u3067\u6C7A\u307E\u308A\u3001\u5165\u529B\u5074\u3067\u306F\u5909\u3048\u306A\u3044\n- \u30DC\u30C3\u30AF\u30B9\u306F\u5FC5\u305A\u300C\u5165\u529B \u2192 \u51FA\u529B\u300D\u3067\u3064\u306A\u3050\u3002\u8DB3\u308A\u306A\u3044\u5165\u51FA\u529B\u306F `port`\u3001\u5916\u3059\u306E\u306F `disconnect`\u3001\u30DC\u30C3\u30AF\u30B9\u305D\u306E\u3082\u306E\u3092\u6D88\u3059\u306E\u306F `remove`\u3002\u6587\u66F8\u5316\u306F `export --out docs/ROADMAP.md`\n- \u30DC\u30C3\u30AF\u30B9\u3092 add \u3059\u308B\u3068\u304D\u306F\u4ED5\u4E8B\u306E\u7A2E\u985E\u3092 `--category` \u3067\u4ED8\u3051\u308B (design \u8A2D\u8A08 / build \u5B9F\u88C5 / verify \u691C\u8A3C / evaluate \u8A55\u4FA1 / study \u691C\u8A0E / research \u8ABF\u67FB / ui \u30C7\u30B6\u30A4\u30F3 / improve \u6539\u5584 / fix \u8AB2\u984C\u89E3\u6C7A / docs \u6587\u66F8 / ops \u904B\u7528 / other \u305D\u306E\u4ED6)\u3002\u753B\u9762\u3067\u306F\u8272\u306E\u5E2F\u3068\u672D\u306B\u306A\u308B\n- boxglow.json \u304C\u307E\u3060\u7121\u3051\u308C\u3070 `npx boxglow init --name "<\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D>"` \u3067\u4F5C\u308A\u3001\u6700\u7D42\u6210\u679C\u7269\u3068\u6700\u4E0A\u4F4D\u306E\u30DC\u30C3\u30AF\u30B9\u3092 `add` \u3067\u7F6E\u304F\n\n## \u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3068\u5F15\u304D\u7D99\u304E\n\n\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u306E\u8981\u6C42 (guard) \u306F\u3001AI \u304C\u53E4\u3044\u6307\u793A\u306E\u307E\u307E\u4F5C\u696D\u3092\u9032\u3081\u308B\u306E\u3092\u9632\u3050\u4ED5\u7D44\u307F\u3002`setup-agent` \u304C\u6709\u52B9\u306B\u3059\u308B (\u305D\u308C\u4EE5\u5916\u306E\u8A08\u753B\u3067\u306F `npx boxglow guard on`)\u3002\n\u6709\u52B9\u306A\u8A08\u753B\u3067\u306F\u3001AI \u306E `start` / `done` / `set` / `split` / `artifact` / `ack` / `blocked` / `review` / `leave` / `checkpoint` \u306B `--context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>` \u304C\u8981\u308B\u3002\u4EBA\u306E\u64CD\u4F5C (`--actor human`) \u306B\u306F\u8981\u6C42\u3055\u308C\u306A\u3044\u3002\n\n```\nnpx boxglow context B12 # \u5224\u65AD (\u5F15\u304D\u53D6\u308A\u6E08\u307F\u306E\u56DE\u7B54\u3092\u542B\u3080)\u30FB\u5165\u51FA\u529B\u306E\u6761\u4EF6\u30FB\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u3092\u8AAD\u3080\u3002\u51FA\u529B\u306E contextToken \u304C\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\nnpx boxglow start B12 --note "<\u4F55\u3092\u3059\u308B\u304B>" --context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>\nnpx boxglow ask B12 "<\u8CEA\u554F>" --options "A|B" --context-token <\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>\n# \u2192 \u51FA\u529B\u306E\u6700\u5F8C\u306E\u884C: \u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3: <token>\nnpx boxglow done B12 --artifact "<\u540D\u524D>=<\u30D1\u30B9>" --context-token <\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3>\n```\n\n- **\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u5909\u308F\u308B\u5834\u5408 (\u8AAD\u307F\u76F4\u3057\u304C\u8981\u308B)**: \u4EBA\u304C\u56DE\u7B54\u3057\u305F\u30FB\u56DE\u7B54\u3092\u76F4\u3057\u305F\u3001\u4EBA\u304C\u6307\u793A (\u984C\u540D\u30FB\u8AAC\u660E\u30FB\u5165\u51FA\u529B\u306E\u6761\u4EF6) \u3092\u5909\u3048\u305F\u3001\u4ED6\u306E AI \u3084\u4EBA\u304C\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u3092\u66F4\u65B0\u3057\u305F\u3002\u89AA\u3084\u5165\u529B\u5143\u306E\u30DC\u30C3\u30AF\u30B9\u3067\u8D77\u304D\u305F\u5834\u5408\u3082\u540C\u3058\u3002\u53E4\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u306F\u62D2\u5426\u3055\u308C\u308B\u306E\u3067\u3001`context` \u3092\u8AAD\u307F\u76F4\u3057\u3001\u5909\u308F\u3063\u305F\u5185\u5BB9\u3092\u4F5C\u696D\u306B\u53CD\u6620\u3057\u3066\u304B\u3089\u3084\u308A\u76F4\u3059\n- **\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u5909\u308F\u3089\u306A\u3044\u5834\u5408**: `start` / `blocked` / `review` / `leave` / `ack`\u3001\u9032\u6357\u30FB\u72B6\u614B\u30FB\u671F\u65E5\u30FB\u30AB\u30C6\u30B4\u30EA\u306E\u5909\u66F4\u3001`check` \u306B\u3088\u308B\u6210\u679C\u7269\u306E\u78BA\u8A8D\u3001\u753B\u9762\u3067\u306E\u914D\u7F6E\u306E\u5909\u66F4\u3002\u540C\u3058\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3092\u4F7F\u3044\u7D9A\u3051\u3089\u308C\u308B\n- **\u81EA\u5206\u3067\u66F4\u65B0\u3067\u304D\u308B\u5834\u5408**: \u81EA\u5206\u306E `ask` / `artifact` / `done` / `set` / `split` / `checkpoint` \u306A\u3069\u3067\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u5909\u308F\u3063\u305F\u3068\u304D\u306F\u3001\u305D\u306E\u51FA\u529B\u306E\u6700\u5F8C\u306E\u884C\u306B\u300C\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3: <token>\u300D\u304C\u51FA\u308B\u3002\u8AAD\u307F\u76F4\u3055\u305A\u306B\u6B21\u306E\u64CD\u4F5C\u3078\u4F7F\u3046\u3002`ask` / `decision` / `answer` / `reopen` \u306F\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u7121\u3057\u3067\u3082\u5B9F\u884C\u3067\u304D\u308B\u304C\u3001\u65B0\u3057\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u51FA\u308B\u306E\u306F\u6700\u65B0\u306E\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3092\u4ED8\u3051\u305F\u3068\u304D\u3060\u3051\n- \u53E4\u3044\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u3092\u901A\u3059\u305F\u3081\u306B guard \u3092\u7121\u52B9\u306B\u3057\u306A\u3044 (AI \u304C `guard off` \u3059\u308B\u306B\u306F\u6700\u65B0\u306E\u78BA\u8A8D\u30C8\u30FC\u30AF\u30F3\u304C\u8981\u308B)\n- \u518D\u958B\u3059\u308B\u3068\u304D\u306F `npx boxglow resume` \u3092\u8AAD\u307F\u3001\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u306E\u3042\u308B\u30DC\u30C3\u30AF\u30B9\u306F `context` \u3067\u4E2D\u8EAB\u3092\u78BA\u304B\u3081\u3066\u304B\u3089\u7D9A\u3051\u308B\u3002\u5F15\u304D\u7D99\u304E\u30E1\u30E2\u306F\u4F1A\u8A71\u306E\u5C65\u6B74\u3084\u6D3B\u52D5\u30ED\u30B0\u306E\u4E0A\u9650\u3068\u306F\u5225\u306B\u3001\u8A08\u753B\u306E\u4E2D\u306B\u6B8B\u308B\n- MCP \u3067\u306F `boxglow_context` \u3068\u3001\u5404\u30C4\u30FC\u30EB\u306E `contextToken` \u5F15\u6570\u3092\u4F7F\u3046\n- \u300C\u4ED6\u306E Boxglow \u304C\u66F8\u304D\u8FBC\u307F\u4E2D (\u30ED\u30C3\u30AF\u4E2D)\u300D\u3068\u51FA\u3066\u3001\u5C11\u3057\u5F85\u3063\u3066\u3084\u308A\u76F4\u3057\u3066\u3082\u89E3\u3051\u306A\u3044\u3068\u304D\u306F\u3001`npx boxglow unlock` \u306E\u8868\u793A (\u6301\u3061\u4E3B\u3068\u5224\u5B9A) \u3092\u4EBA\u306B\u898B\u305B\u3066\u89E3\u9664\u3092\u983C\u3080\u3002\u81EA\u5206\u3067 `--actor human` \u3092\u4ED8\u3051\u305F\u308A\u3001\u30ED\u30C3\u30AF\u306E\u30D5\u30A9\u30EB\u30C0\u3092\u76F4\u63A5\u6D88\u3057\u305F\u308A\u3057\u306A\u3044\n';
2935
3238
 
2936
3239
  // .claude/skills/boxglow/SKILL.en.md
2937
- var SKILL_en_default = '---\nname: boxglow\ndescription: Share the plan and progress with humans through Boxglow (boxglow.json). Record starting, splitting, finishing and pending decisions with npx boxglow. Use for "record progress in Boxglow", "check the status with boxglow", or "/boxglow".\n---\n\n# Share the plan and progress with Boxglow\n\n`boxglow.json` at the repository root is the source of truth for the plan. Humans watch it on the Boxglow screen (https://boxglow.pages.dev/, "Open boxglow.json").\nDo not edit it directly; update it with `npx boxglow`.\n\n## Making the first plan (for a new project)\n\n1. Read the direction (README, the request, requirement notes), run `npx boxglow init --name "<name>"`, then place the top-level items (3-7 of them) with `add`.\n For each item, always write its "inputs (what it uses)" and "output (a concrete deliverable: file, URL, PR)", and connect them all the way to the final deliverable (`connect`)\n2. Once created, get a human\'s confirmation with `npx boxglow ask <first top-level item> "Is this breakdown into top-level items OK?" --options "OK|Needs changes"`.\n The human can answer on the screen, with `npx boxglow answer <block> "<answer>"`, or in chat. If the answer comes back in chat, the AI records it with `answer --by human`.\n If the human does not use the screen (when you are told to proceed with the AI alone), the AI records its own decision with `answer --by claude-code "<decision and reason>"` and moves on. The point is to keep a record of decisions; the screen is not required\n3. `split` only the item you are about to start (leave later stages coarse, and refine them as you go)\n\n## Steps\n\n1. Read `npx boxglow resume` (or `npx boxglow status --brief`). Take in the handoff notes, the answers not yet read by the AI, the pending decisions, the boxes in progress and the next candidates. Use `npx boxglow status` when you need the whole tree\n2. Once you have chosen a box, check its inputs and outputs with `npx boxglow show <block>`, then run `npx boxglow start <block> --note "<what you will do>"`.\n On a plan with the context guard on, first read `npx boxglow context <block>` and pass the `contextToken` (context token) from its output as `--context-token <context token>`\n3. Split a large box with `npx boxglow split <block> --spec \'<JSON>\'` (see `npx boxglow help` for the format). Always decide the output of each box\n4. When the deliverable exists, run `npx boxglow done <block> --artifact "<name>=<URL or path>"` (with the guard on, add `--context-token <context token>`; if your previous command printed "New context token: <token>", use that one)\n5. When a human decision is needed, run `npx boxglow ask <block> "<question>" --options "A|B"` and move on to another box\n6. When you are stuck, run `npx boxglow blocked <block> --note "<what is in the way>"`\n7. Before an interruption, context compaction or a handoff, save a handoff note with `npx boxglow checkpoint <block> --note "Findings; next steps; unresolved questions"`\n8. At the end, summarize `npx boxglow status --brief` and report it\n\n## Rules\n\n- Write each `ask` question so that it can be decided on its own. Do not point outside the question, as in "Is this OK?" or "the plan above"; put the premises, comparison and impact in `--context` (the human reads only the question in a list and answers it)\n- When choosing one of several candidates (an approach, a library, a design choice), even if the AI decides by itself, record it as `ask <block> "<question>" --options "A|B|C"` \u2192 `answer --by claude-code "<the choice>. Reason: ..."` so that the candidates not chosen stay on the box (you can come back to them when the direction changes)\n- To change direction, use `reopen <block> --note "<reason>"`: the previous answer stays in the history and you choose again (candidates are not deleted)\n\n- Keep at most 1-2 boxes in progress at a time\n- Make deliverables (artifacts) something a human can open later (a commit, a PR, a file path)\n- Name outputs after concrete deliverables (file, PR, URL, test results). Avoid abstract names (feature set, findings)\n- The receiving side of a connection can be just a title (`connect "A.Design doc" "B"` creates an input "Design doc" on B). An input\'s name is determined by the source output\'s name and is not changed on the input side\n- Always connect boxes as "input \u2192 output". Add missing inputs / outputs with `port`, remove a wire with `disconnect`, and remove a box itself with `remove`. Export a document with `export --out docs/ROADMAP.md`\n- When you add a box, give it a kind of work with `--category` (design / build / verify / evaluate / study / research / ui / improve / fix / docs / ops / other). On the screen it becomes a colored band and a tag\n- If boxglow.json does not exist yet, create it with `npx boxglow init --name "<project name>"` and place the final deliverable and the top-level boxes with `add`\n\n## Context token and handoff\n\nThe context guard keeps an AI from continuing work on outdated instructions. `setup-agent` turns it on (on other plans, run `npx boxglow guard on`).\nWhile it is on, an AI\'s `start` / `done` / `set` / `split` / `artifact` / `ack` / `blocked` / `review` / `leave` / `checkpoint` need `--context-token <context token>`. Commands run by a person (`--actor human`) do not.\n\n```\nnpx boxglow context B12 # read the decisions (including acknowledged answers), input/output contracts and handoff notes. contextToken in the output is the context token\nnpx boxglow start B12 --note "<what you will do>" --context-token <context token>\nnpx boxglow ask B12 "<question>" --options "A|B" --context-token <context token>\n# -> last line of the output: New context token: <token>\nnpx boxglow done B12 --artifact "<name>=<path>" --context-token <new context token>\n```\n\n- **The context token changes (you must reread)** when a person answers a decision or revises an answer, a person changes the instructions (title, description, input/output contracts), or another AI or a person updates the handoff note. The same applies when this happens on a parent box or an input provider. The old context token is rejected: reread `context`, take the change into account in your work, then retry\n- **The context token does not change** on `start` / `blocked` / `review` / `leave` / `ack`, on changes to progress, status, dates or category, when `check` verifies deliverables, or when boxes are moved on the screen. Keep using the same context token\n- **You can update it yourself**: when your own `ask` / `artifact` / `done` / `set` / `split` / `checkpoint` etc. changes the context, the last line of its output is "New context token: <token>". Use it for the next command without rereading. `ask` / `decision` / `answer` / `reopen` run without a context token, but they print the new context token only when you pass the latest one\n- Do not turn the guard off to get past an old context token (an AI needs the latest context token to run `guard off`)\n- When resuming, read `npx boxglow resume`, and check a box that has a handoff note with `context` before continuing. Handoff notes stay in the plan, independent of the chat history and the activity-log limit\n- With MCP, use `boxglow_context` and the `contextToken` argument of each tool\n';
3240
+ var SKILL_en_default = '---\nname: boxglow\ndescription: Share the plan and progress with humans through Boxglow (boxglow.json). Record starting, splitting, finishing and pending decisions with npx boxglow. Use for "record progress in Boxglow", "check the status with boxglow", or "/boxglow".\n---\n\n# Share the plan and progress with Boxglow\n\n`boxglow.json` at the repository root is the source of truth for the plan. Humans watch it on the Boxglow screen (https://boxglow.pages.dev/, "Open boxglow.json").\nDo not edit it directly; update it with `npx boxglow`.\n\n## Making the first plan (for a new project)\n\n1. Read the direction (README, the request, requirement notes), run `npx boxglow init --name "<name>"`, then place the top-level items (3-7 of them) with `add`.\n For each item, always write its "inputs (what it uses)" and "output (a concrete deliverable: file, URL, PR)", and connect them all the way to the final deliverable (`connect`)\n2. Once created, get a human\'s confirmation with `npx boxglow ask <first top-level item> "Is this breakdown into top-level items OK?" --options "OK|Needs changes"`.\n The human can answer on the screen, with `npx boxglow answer <block> "<answer>"`, or in chat. If the answer comes back in chat, the AI records it with `answer --by human`.\n If the human does not use the screen (when you are told to proceed with the AI alone), the AI records its own decision with `answer --by claude-code "<decision and reason>"` and moves on. The point is to keep a record of decisions; the screen is not required\n3. `split` only the item you are about to start (leave later stages coarse, and refine them as you go)\n\n## Steps\n\n1. Read `npx boxglow resume` (or `npx boxglow status --brief`). Take in the handoff notes, the answers not yet read by the AI, the pending decisions, the boxes in progress and the next candidates. Use `npx boxglow status` when you need the whole tree\n2. Once you have chosen a box, check its inputs and outputs with `npx boxglow show <block>`, then run `npx boxglow start <block> --note "<what you will do>"`.\n On a plan with the context guard on, first read `npx boxglow context <block>` and pass the `contextToken` (context token) from its output as `--context-token <context token>`\n3. Split a large box with `npx boxglow split <block> --spec \'<JSON>\'` (see `npx boxglow help` for the format). Always decide the output of each box\n4. When the deliverable exists, run `npx boxglow done <block> --artifact "<name>=<URL or path>"` (with the guard on, add `--context-token <context token>`; if your previous command printed "New context token: <token>", use that one)\n5. When a human decision is needed, run `npx boxglow ask <block> "<question>" --options "A|B"` and move on to another box\n6. When you are stuck, run `npx boxglow blocked <block> --note "<what is in the way>"`\n7. Before an interruption, context compaction or a handoff, save a handoff note with `npx boxglow checkpoint <block> --note "Findings; next steps; unresolved questions"`\n8. At the end, summarize `npx boxglow status --brief` and report it\n\n## Rules\n\n- Write each `ask` question so that it can be decided on its own. Do not point outside the question, as in "Is this OK?" or "the plan above"; put the premises, comparison and impact in `--context` (the human reads only the question in a list and answers it)\n- When choosing one of several candidates (an approach, a library, a design choice), even if the AI decides by itself, record it as `ask <block> "<question>" --options "A|B|C"` \u2192 `answer --by claude-code "<the choice>. Reason: ..."` so that the candidates not chosen stay on the box (you can come back to them when the direction changes)\n- To change direction, use `reopen <block> --note "<reason>"`: the previous answer stays in the history and you choose again (candidates are not deleted)\n\n- Keep at most 1-2 boxes in progress at a time\n- Make deliverables (artifacts) something a human can open later (a commit, a PR, a file path)\n- Name outputs after concrete deliverables (file, PR, URL, test results). Avoid abstract names (feature set, findings)\n- The receiving side of a connection can be just a title (`connect "A.Design doc" "B"` creates an input "Design doc" on B). An input\'s name is determined by the source output\'s name and is not changed on the input side\n- Always connect boxes as "input \u2192 output". Add missing inputs / outputs with `port`, remove a wire with `disconnect`, and remove a box itself with `remove`. Export a document with `export --out docs/ROADMAP.md`\n- When you add a box, give it a kind of work with `--category` (design / build / verify / evaluate / study / research / ui / improve / fix / docs / ops / other). On the screen it becomes a colored band and a tag\n- If boxglow.json does not exist yet, create it with `npx boxglow init --name "<project name>"` and place the final deliverable and the top-level boxes with `add`\n\n## Context token and handoff\n\nThe context guard keeps an AI from continuing work on outdated instructions. `setup-agent` turns it on (on other plans, run `npx boxglow guard on`).\nWhile it is on, an AI\'s `start` / `done` / `set` / `split` / `artifact` / `ack` / `blocked` / `review` / `leave` / `checkpoint` need `--context-token <context token>`. Commands run by a person (`--actor human`) do not.\n\n```\nnpx boxglow context B12 # read the decisions (including acknowledged answers), input/output contracts and handoff notes. contextToken in the output is the context token\nnpx boxglow start B12 --note "<what you will do>" --context-token <context token>\nnpx boxglow ask B12 "<question>" --options "A|B" --context-token <context token>\n# -> last line of the output: New context token: <token>\nnpx boxglow done B12 --artifact "<name>=<path>" --context-token <new context token>\n```\n\n- **The context token changes (you must reread)** when a person answers a decision or revises an answer, a person changes the instructions (title, description, input/output contracts), or another AI or a person updates the handoff note. The same applies when this happens on a parent box or an input provider. The old context token is rejected: reread `context`, take the change into account in your work, then retry\n- **The context token does not change** on `start` / `blocked` / `review` / `leave` / `ack`, on changes to progress, status, dates or category, when `check` verifies deliverables, or when boxes are moved on the screen. Keep using the same context token\n- **You can update it yourself**: when your own `ask` / `artifact` / `done` / `set` / `split` / `checkpoint` etc. changes the context, the last line of its output is "New context token: <token>". Use it for the next command without rereading. `ask` / `decision` / `answer` / `reopen` run without a context token, but they print the new context token only when you pass the latest one\n- Do not turn the guard off to get past an old context token (an AI needs the latest context token to run `guard off`)\n- When resuming, read `npx boxglow resume`, and check a box that has a handoff note with `context` before continuing. Handoff notes stay in the plan, independent of the chat history and the activity-log limit\n- With MCP, use `boxglow_context` and the `contextToken` argument of each tool\n- If "Another Boxglow writer holds the file lock" persists after waiting and retrying, show the output of `npx boxglow unlock` (owner and verdict) to a person and ask them to remove it. Never add `--actor human` yourself or delete the lock folder directly\n';
2938
3241
 
2939
3242
  // src/model/export.ts
2940
3243
  var STATUS_LABEL = {
@@ -3208,11 +3511,11 @@ function mergeArrayById(path, base, ours, theirs, r) {
3208
3511
  const order = [...ours.map((x) => x.id), ...theirs.map((x) => x.id).filter((id) => !ours.some((x) => x.id === id))];
3209
3512
  return order.filter((id) => merged[id]).map((id) => merged[id]);
3210
3513
  }
3211
- function restoreDeleted(out2, deleter, keeper) {
3514
+ function restoreDeleted(out2, deleter, keeper, explicitlyDeleted) {
3212
3515
  const blocks = out2.blocks;
3213
3516
  const ports = out2.ports;
3214
3517
  const edges = out2.edges;
3215
- const onlyInKeeper = (id) => !deleter.blocks[id] && !!keeper.blocks[id];
3518
+ const onlyInKeeper = (id) => !deleter.blocks[id] && !!keeper.blocks[id] && !explicitlyDeleted("blocks", id);
3216
3519
  const seeds = /* @__PURE__ */ new Set();
3217
3520
  for (const id of Object.keys(blocks)) if (onlyInKeeper(id)) seeds.add(id);
3218
3521
  for (const port2 of Object.values(ports)) {
@@ -3230,21 +3533,21 @@ function restoreDeleted(out2, deleter, keeper) {
3230
3533
  for (let grew = true; grew; ) {
3231
3534
  grew = false;
3232
3535
  for (const b of Object.values(keeper.blocks)) {
3233
- if (b.parentId && restored.has(b.parentId) && !restored.has(b.id)) {
3536
+ if (b.parentId && restored.has(b.parentId) && !restored.has(b.id) && !explicitlyDeleted("blocks", b.id)) {
3234
3537
  restored.add(b.id);
3235
3538
  grew = true;
3236
3539
  }
3237
3540
  }
3238
3541
  }
3239
3542
  for (const id of restored) if (!blocks[id]) blocks[id] = keeper.blocks[id];
3240
- for (const port2 of Object.values(keeper.ports)) if (restored.has(port2.blockId) && !ports[port2.id]) ports[port2.id] = port2;
3543
+ for (const port2 of Object.values(keeper.ports)) if (restored.has(port2.blockId) && !ports[port2.id] && !explicitlyDeleted("ports", port2.id)) ports[port2.id] = port2;
3241
3544
  if (keeper.handoffs) {
3242
3545
  const handoffs = out2.handoffs ?? {};
3243
- for (const id of restored) if (keeper.handoffs[id] && !handoffs[id]) handoffs[id] = keeper.handoffs[id];
3546
+ for (const id of restored) if (keeper.handoffs[id] && !handoffs[id] && !explicitlyDeleted("handoffs", id)) handoffs[id] = keeper.handoffs[id];
3244
3547
  out2.handoffs = handoffs;
3245
3548
  }
3246
3549
  for (const e of Object.values(keeper.edges)) {
3247
- if (edges[e.id] || !ports[e.from.portId] || !ports[e.to.portId]) continue;
3550
+ if (edges[e.id] || !ports[e.from.portId] || !ports[e.to.portId] || explicitlyDeleted("edges", e.id)) continue;
3248
3551
  const from = keeper.ports[e.from.portId]?.blockId;
3249
3552
  const to = keeper.ports[e.to.portId]?.blockId;
3250
3553
  if (from && restored.has(from) || to && restored.has(to)) edges[e.id] = e;
@@ -3260,8 +3563,13 @@ function mergeProjects(base, ours, theirs, choices = {}) {
3260
3563
  for (const k of ["blocks", "ports", "edges", "agents", "handoffs"]) {
3261
3564
  out2[k] = mergeMap([k], b?.[k], o[k] ?? {}, th[k] ?? {}, r);
3262
3565
  }
3263
- restoreDeleted(out2, ours, theirs);
3264
- restoreDeleted(out2, theirs, ours);
3566
+ const explicitlyDeleted = (kind, id) => {
3567
+ const choice = choices[JSON.stringify([kind, id])];
3568
+ if (!choice) return false;
3569
+ return (choice === "ours" ? o : th)[kind]?.[id] === void 0;
3570
+ };
3571
+ restoreDeleted(out2, ours, theirs, explicitlyDeleted);
3572
+ restoreDeleted(out2, theirs, ours, explicitlyDeleted);
3265
3573
  const mergedBlocks = out2.blocks;
3266
3574
  const mergedPorts = out2.ports;
3267
3575
  const mergedEdges = out2.edges;
@@ -3835,6 +4143,8 @@ boxglow CLI: AI \u30A8\u30FC\u30B8\u30A7\u30F3\u30C8 (Claude Code / Codex \u306A
3835
4143
  blocked / review / leave / checkpoint \u306F --context-token <context \u3067\u5F97\u305F contextToken> \u304C\u8981\u308B (\u8AAD\u3093\u3060\u5F8C\u306B\u6307\u793A\u30FB\u56DE\u7B54\u30FB\u5F15\u304D\u7D99\u304E\u304C\u5909\u308F\u3063\u3066\u3044\u305F\u3089\u62D2\u5426)\u3002
3836
4144
  \u4EBA (--actor human) \u306B\u306F\u8981\u6C42\u3057\u306A\u3044\u3002AI \u304C off \u306B\u3059\u308B\u3068\u304D\u306F --context-token \u304C\u8981\u308B
3837
4145
  version [--json] boxglow \u306E\u7248\u3068\u3001\u4FDD\u5B58\u306E\u53D6\u308A\u6C7A\u3081\u306E\u7248\u3092\u51FA\u3059 (--version \u3067\u3082\u53EF)
4146
+ unlock [--remove --lock-token <\u5370> --actor human] \u6B8B\u3063\u305F\u4FDD\u5B58\u30ED\u30C3\u30AF\u306E\u72B6\u614B (\u6301\u3061\u4E3B\u30FB\u5224\u5B9A) \u3092\u51FA\u3059 (\u8AAD\u3080\u3060\u3051\u3002AI \u3082\u4F7F\u3048\u308B)\u3002--remove \u306F\u4EBA\u304C\u89E3\u9664\u3059\u308B:
4147
+ \u3053\u306E\u8A08\u753B\u3092\u958B\u3044\u3066\u3044\u308B Boxglow \u3092\u6B62\u3081\u3066\u304B\u3089\u3001\u8868\u793A\u3055\u308C\u305F\u5370\u3092\u4ED8\u3051\u3066\u5B9F\u884C\u3059\u308B\u3002\u6301\u3061\u4E3B\u304C\u52D5\u3044\u3066\u3044\u308B\u30ED\u30C3\u30AF\u306F\u89E3\u9664\u3067\u304D\u306A\u3044
3838
4148
  status [--brief] [--json] \u5168\u4F53\u306E\u72B6\u6CC1 (Markdown)\u3002--brief \u306F\u5168\u968E\u5C64\u3092\u7701\u7565\u3057\u3001\u5224\u65AD\u30FB\u56DE\u7B54\u30FB\u6D3B\u52D5\u30FB\u6B21\u306E\u5019\u88DC\u3092\u8868\u793A
3839
4149
  export [--format md|json] [--out <path>] \u8A08\u753B\u5168\u4F53\u3092 Markdown (\u307E\u305F\u306F JSON) \u306B\u66F8\u304D\u51FA\u3059 (\u30ED\u30FC\u30C9\u30DE\u30C3\u30D7\u306E\u6587\u66F8\u5316\u306B)
3840
4150
  show <block> \u30D6\u30ED\u30C3\u30AF\u306E\u8A73\u7D30
@@ -3902,6 +4212,8 @@ Usage (npx boxglow <command> ...):
3902
4212
  blocked / review / leave / checkpoint need --context-token <contextToken from context> (rejected if instructions, answers or handoff notes changed after reading).
3903
4213
  People (--actor human) are not asked for it. An AI needs --context-token to turn it off
3904
4214
  version [--json] Print the boxglow version and the save-protocol version (--version also works)
4215
+ unlock [--remove --lock-token <token> --actor human] Show a leftover save lock (owner and verdict; read-only, agents may use it). --remove is for a person:
4216
+ stop every Boxglow that has this plan open, then run it with the token shown. A lock whose owner is running cannot be removed
3905
4217
  status [--brief] [--json] Overall status (Markdown). --brief omits the tree; keeps decisions, answers, activity and next actions
3906
4218
  export [--format md|json] [--out <path>] Write the whole plan out as Markdown (or JSON) (for documenting the roadmap)
3907
4219
  show <block> Details of a block
@@ -3978,6 +4290,36 @@ function main(argv2) {
3978
4290
  return;
3979
4291
  }
3980
4292
  const actor = actorOf(str(options.actor));
4293
+ if (cmd === "unlock") {
4294
+ const path2 = locateFile(str(options.file));
4295
+ if (!explicitLang(options)) {
4296
+ try {
4297
+ setLang(load(path2).lang ?? "ja");
4298
+ } catch {
4299
+ }
4300
+ }
4301
+ const status = inspectLock(path2);
4302
+ if (!status) {
4303
+ out(t("\u30ED\u30C3\u30AF\u306F\u3042\u308A\u307E\u305B\u3093: {path}", { path: path2 }));
4304
+ return;
4305
+ }
4306
+ if (!options.remove) {
4307
+ out(describeLock(status));
4308
+ if (status.verdict === "live") out(t("\u6301\u3061\u4E3B\u304C\u52D5\u3044\u3066\u3044\u308B\u306E\u3067\u3001\u89E3\u9664\u3067\u304D\u307E\u305B\u3093\u3002\u4FDD\u5B58\u304C\u7D42\u308F\u308B\u306E\u3092\u5F85\u3064\u304B\u3001\u305D\u306E\u30D7\u30ED\u30BB\u30B9\u3092\u6B62\u3081\u3066\u304B\u3089\u3082\u3046\u4E00\u5EA6\u78BA\u304B\u3081\u3066\u304F\u3060\u3055\u3044"));
4309
+ else out(t("\u89E3\u9664\u3059\u308B\u306B\u306F\u3001\u3053\u306E\u8A08\u753B\u3092\u958B\u3044\u3066\u3044\u308B Boxglow (CLI\u30FBserve\u30FBVS Code\u3002\u5225\u306E OS \u3084\u30DE\u30B7\u30F3\u306E\u3082\u306E\u3082\u542B\u3080) \u3092\u6B62\u3081\u3066\u304B\u3089\u3001\u4EBA\u304C\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044: boxglow unlock --remove --lock-token {token} --actor human", { token: lockTokenOf(status) }));
4310
+ return;
4311
+ }
4312
+ if (!isHumanActor(actor)) throw new Error(t("\u30ED\u30C3\u30AF\u306E\u89E3\u9664\u306F\u4EBA\u304C\u884C\u3044\u307E\u3059\u3002AI \u306F boxglow unlock \u306E\u8868\u793A\u3092\u4EBA\u306B\u898B\u305B\u3066\u3001\u89E3\u9664\u3092\u983C\u3093\u3067\u304F\u3060\u3055\u3044 (\u81EA\u5206\u3067 --actor human \u3092\u4ED8\u3051\u305F\u308A\u3001\u30ED\u30C3\u30AF\u3092\u76F4\u63A5\u6D88\u3057\u305F\u308A\u3057\u306A\u3044)"));
4313
+ const expected = str(options["lock-token"]);
4314
+ if (!expected) throw new Error(t("--lock-token <boxglow unlock \u304C\u8868\u793A\u3057\u305F\u5370> \u3092\u4ED8\u3051\u3066\u304F\u3060\u3055\u3044 (\u8868\u793A\u306E\u3042\u3068\u3067\u5225\u306E\u30ED\u30C3\u30AF\u306B\u66FF\u308F\u3063\u3066\u3044\u306A\u3044\u304B\u3092\u78BA\u304B\u3081\u308B\u305F\u3081)"));
4315
+ const result = removeLock(path2, expected);
4316
+ if (result === "removed") out(t("\u30ED\u30C3\u30AF\u3092\u89E3\u9664\u3057\u307E\u3057\u305F: {path}", { path: path2 }));
4317
+ else if (result === "none") out(t("\u30ED\u30C3\u30AF\u306F\u3042\u308A\u307E\u305B\u3093: {path}", { path: path2 }));
4318
+ else if (result === "busy") throw new Error(t("\u4ED6\u306E\u66F8\u304D\u624B\u304C\u56DE\u53CE\u30FB\u89E3\u9664\u306E\u9014\u4E2D\u306E\u53EF\u80FD\u6027\u304C\u3042\u308A\u3001\u89E3\u9664\u306E\u6A29\u5229\u3092\u53D6\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002boxglow unlock \u3067\u72B6\u614B\u3092\u3082\u3046\u4E00\u5EA6\u78BA\u304B\u3081\u3066\u304F\u3060\u3055\u3044"));
4319
+ else if (result === "live") throw new Error(t("\u6301\u3061\u4E3B\u304C\u52D5\u3044\u3066\u3044\u308B\u306E\u3067\u3001\u89E3\u9664\u3067\u304D\u307E\u305B\u3093\u3002\u4FDD\u5B58\u304C\u7D42\u308F\u308B\u306E\u3092\u5F85\u3064\u304B\u3001\u305D\u306E\u30D7\u30ED\u30BB\u30B9\u3092\u6B62\u3081\u3066\u304B\u3089\u3082\u3046\u4E00\u5EA6\u78BA\u304B\u3081\u3066\u304F\u3060\u3055\u3044"));
4320
+ else throw new Error(t("\u8868\u793A\u306E\u3042\u3068\u3067\u5225\u306E\u30ED\u30C3\u30AF\u306B\u66FF\u308F\u3063\u3066\u3044\u307E\u3059\u3002boxglow unlock \u3067\u3082\u3046\u4E00\u5EA6\u78BA\u304B\u3081\u3066\u304F\u3060\u3055\u3044"));
4321
+ return;
4322
+ }
3981
4323
  if (cmd === "init") {
3982
4324
  const path2 = locateFile(str(options.file), true);
3983
4325
  if (existsSync5(path2) && !options.force) throw new Error(t("{path} \u306F\u65E2\u306B\u3042\u308A\u307E\u3059 (--force \u3067\u4E0A\u66F8\u304D)", { path: path2 }));