joycraft 0.7.17 → 1.0.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.
Files changed (109) hide show
  1. package/README.md +148 -140
  2. package/dist/cli.js +1593 -373
  3. package/dist/cli.js.map +1 -1
  4. package/dist/joycraft-release.json +1 -1
  5. package/package.json +9 -3
  6. package/payload/.agents/skills/joycraft-context/SKILL.md +36 -0
  7. package/payload/.agents/skills/joycraft-decompose/SKILL.md +68 -0
  8. package/payload/.agents/skills/joycraft-entry/SKILL.md +109 -0
  9. package/payload/.agents/skills/joycraft-implement/SKILL.md +118 -0
  10. package/payload/.agents/skills/joycraft-retro/SKILL.md +54 -0
  11. package/payload/.agents/skills/joycraft-retro/agents/openai.yaml +5 -0
  12. package/payload/.agents/skills/joycraft-session-end/SKILL.md +82 -0
  13. package/payload/.agents/skills/joycraft-testing/SKILL.md +60 -0
  14. package/payload/.agents/skills/joycraft-ui-slice/SKILL.md +59 -0
  15. package/payload/.agents/skills/joycraft-ui-slice/scripts/serve.mjs +97 -0
  16. package/payload/.agents/skills/joycraft-verify/SKILL.md +103 -0
  17. package/payload/.claude/agents/joycraft-implementer.md +36 -0
  18. package/payload/.claude/agents/joycraft-reviewer.md +35 -0
  19. package/payload/.joycraft/assets/artifacts/kit.css +102 -0
  20. package/payload/.joycraft/assets/artifacts/kit.js +301 -0
  21. package/payload/.joycraft/assets/artifacts/transports.js +236 -0
  22. package/payload/.joycraft/contracts/types.d.ts +185 -0
  23. package/payload/.joycraft/references/architecture.md +90 -0
  24. package/payload/.joycraft/references/archive.md +211 -0
  25. package/payload/.joycraft/references/artifacts.md +176 -0
  26. package/payload/.joycraft/references/completion.md +109 -0
  27. package/payload/.joycraft/references/context.md +85 -0
  28. package/payload/.joycraft/references/delivery.md +32 -0
  29. package/payload/.joycraft/references/dispatch.md +231 -0
  30. package/payload/.joycraft/references/recurring-failures.md +33 -0
  31. package/payload/.joycraft/references/retro.md +94 -0
  32. package/payload/.joycraft/references/setup.md +295 -0
  33. package/payload/.joycraft/references/testing.md +120 -0
  34. package/payload/.joycraft/references/update.md +44 -0
  35. package/payload/.joycraft/references/workflow.md +113 -0
  36. package/payload/.joycraft/references/worktrees.md +174 -0
  37. package/payload/.joycraft/runtime/archive.mjs +463 -0
  38. package/payload/.joycraft/runtime/artifacts/cli.mjs +61 -0
  39. package/payload/.joycraft/runtime/artifacts/decisions.mjs +214 -0
  40. package/payload/.joycraft/runtime/artifacts/model.mjs +161 -0
  41. package/payload/.joycraft/runtime/artifacts/preferences.mjs +127 -0
  42. package/payload/.joycraft/runtime/artifacts/render.mjs +21 -0
  43. package/payload/.joycraft/runtime/artifacts/server.mjs +40 -0
  44. package/payload/.joycraft/runtime/completion.mjs +300 -0
  45. package/payload/.joycraft/runtime/context/cli.mjs +75 -0
  46. package/payload/.joycraft/runtime/context/index.mjs +29 -0
  47. package/payload/.joycraft/runtime/context/search.mjs +149 -0
  48. package/payload/.joycraft/runtime/coordinator.mjs +169 -0
  49. package/payload/.joycraft/runtime/delivery.mjs +142 -0
  50. package/payload/.joycraft/runtime/dispatch-preflight.mjs +535 -0
  51. package/payload/.joycraft/runtime/dispatch-start.mjs +106 -0
  52. package/payload/.joycraft/runtime/evidence.mjs +137 -0
  53. package/payload/.joycraft/runtime/identity.mjs +486 -0
  54. package/payload/.joycraft/runtime/kickoff.mjs +174 -0
  55. package/payload/.joycraft/runtime/redact.mjs +9 -0
  56. package/payload/.joycraft/runtime/retro.mjs +151 -0
  57. package/payload/.joycraft/runtime/review-tools.json +34 -0
  58. package/payload/.joycraft/runtime/review-tools.mjs +331 -0
  59. package/payload/.joycraft/runtime/scope.mjs +129 -0
  60. package/payload/.joycraft/runtime/status.mjs +96 -0
  61. package/payload/.joycraft/runtime/update-check.mjs +142 -0
  62. package/payload/.joycraft/runtime/worktrees.mjs +201 -0
  63. package/payload/.joycraft/templates/README.md +7 -0
  64. package/payload/.joycraft/templates/artifact.json +33 -0
  65. package/payload/.joycraft/templates/brief.md +35 -0
  66. package/payload/.joycraft/templates/decisions.md +13 -0
  67. package/payload/.joycraft/templates/project-context.md +36 -0
  68. package/payload/.joycraft/templates/queue.json +27 -0
  69. package/payload/.joycraft/templates/spec.md +39 -0
  70. package/payload/.joycraft/templates/ui-slice.html +71 -0
  71. package/payload/PIN +77 -0
  72. package/payload/scripts/export.mjs +301 -0
  73. package/payload/scripts/hook-paths.mjs +35 -0
  74. package/payload/scripts/legacy-hooks.mjs +128 -0
  75. package/payload/scripts/legacy-inventory.json +117 -0
  76. package/dist/chunk-35RQLGKM.js +0 -2167
  77. package/dist/chunk-35RQLGKM.js.map +0 -1
  78. package/dist/chunk-7BPB2IKY.js +0 -255
  79. package/dist/chunk-7BPB2IKY.js.map +0 -1
  80. package/dist/chunk-B73DPYYC.js +0 -377
  81. package/dist/chunk-B73DPYYC.js.map +0 -1
  82. package/dist/chunk-K4AI6FKB.js +0 -417
  83. package/dist/chunk-K4AI6FKB.js.map +0 -1
  84. package/dist/chunk-KKDKC4FM.js +0 -115
  85. package/dist/chunk-KKDKC4FM.js.map +0 -1
  86. package/dist/chunk-OMFGDJW4.js +0 -97
  87. package/dist/chunk-OMFGDJW4.js.map +0 -1
  88. package/dist/chunk-YLWBDXF4.js +0 -3999
  89. package/dist/chunk-YLWBDXF4.js.map +0 -1
  90. package/dist/chunk-Z5JFEGWG.js +0 -563
  91. package/dist/chunk-Z5JFEGWG.js.map +0 -1
  92. package/dist/init-O2QC5X57.js +0 -60
  93. package/dist/init-O2QC5X57.js.map +0 -1
  94. package/dist/init-autofix-2DMBO4QN.js +0 -122
  95. package/dist/init-autofix-2DMBO4QN.js.map +0 -1
  96. package/dist/install-manifest-EQHT4474.js +0 -37
  97. package/dist/install-manifest-EQHT4474.js.map +0 -1
  98. package/dist/release-artifact-4TL5L2ZY.js +0 -14
  99. package/dist/release-artifact-4TL5L2ZY.js.map +0 -1
  100. package/dist/release-resolver-P2H46QTU.js +0 -293
  101. package/dist/release-resolver-P2H46QTU.js.map +0 -1
  102. package/dist/telemetry-store-IBO5GRTA.js +0 -14
  103. package/dist/telemetry-store-IBO5GRTA.js.map +0 -1
  104. package/dist/update-LYHS4FBH.js +0 -21
  105. package/dist/update-LYHS4FBH.js.map +0 -1
  106. package/dist/update-check-YT765NE7.js +0 -36
  107. package/dist/update-check-YT765NE7.js.map +0 -1
  108. package/dist/upgrade-GMP6JQ52.js +0 -28
  109. package/dist/upgrade-GMP6JQ52.js.map +0 -1
package/dist/cli.js CHANGED
@@ -1,429 +1,1649 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- resolveUpdatePath
4
- } from "./chunk-OMFGDJW4.js";
5
- import {
6
- PRIVATE_DIRS_DISPLAY
7
- } from "./chunk-Z5JFEGWG.js";
8
- import "./chunk-KKDKC4FM.js";
9
- import "./chunk-B73DPYYC.js";
10
- import "./chunk-K4AI6FKB.js";
11
2
 
12
3
  // src/cli.ts
13
4
  import { Command } from "commander";
14
- import { readFileSync } from "fs";
5
+ import { readFileSync as readFileSync5 } from "fs";
6
+ import { fileURLToPath as fileURLToPath2 } from "url";
7
+ import { dirname as dirname5, join as join5, resolve as resolve4 } from "path";
8
+ import { createInterface } from "readline/promises";
9
+
10
+ // src/install-v1.ts
11
+ import { copyFileSync, existsSync as existsSync2, lstatSync, mkdirSync, readFileSync as readFileSync2, renameSync, rmSync, writeFileSync } from "fs";
12
+ import { dirname as dirname2, join as join2, resolve, sep } from "path";
13
+
14
+ // src/payload.ts
15
+ import { createHash } from "crypto";
16
+ import { existsSync, readFileSync } from "fs";
17
+ import { dirname, join } from "path";
15
18
  import { fileURLToPath } from "url";
16
- import { dirname as dirname2, join as join2 } from "path";
19
+ var HOSTS = ["claude", "codex", "pi", "omp", "copilot", "opencode"];
20
+ var HOST_LABELS = {
21
+ claude: "Claude Code",
22
+ codex: "Codex",
23
+ pi: "Pi",
24
+ omp: "Oh My Pi",
25
+ copilot: "GitHub Copilot CLI",
26
+ opencode: "OpenCode"
27
+ };
28
+ var sha256 = (bytes) => createHash("sha256").update(bytes).digest("hex");
29
+ function payloadRoot(start = dirname(fileURLToPath(import.meta.url))) {
30
+ for (let dir = start; ; dir = dirname(dir)) {
31
+ if (existsSync(join(dir, "payload", "PIN"))) return join(dir, "payload");
32
+ if (dirname(dir) === dir) throw new Error("This Joycraft package has no payload/PIN");
33
+ }
34
+ }
35
+ function readPin(root = payloadRoot()) {
36
+ const pin = JSON.parse(readFileSync(join(root, "PIN"), "utf8"));
37
+ if (pin.schemaVersion !== 1 || typeof pin.commit !== "string" || !pin.files) throw new Error("Unsupported payload PIN");
38
+ return pin;
39
+ }
40
+ function filesForHosts(hosts, root = payloadRoot(), pin = readPin(root)) {
41
+ const claude = hosts.includes("claude");
42
+ const shared = hosts.some((host) => host !== "claude");
43
+ const out2 = [];
44
+ for (const source of Object.keys(pin.files).sort()) {
45
+ const bytes = readFileSync(join(root, source));
46
+ if (source.startsWith(".joycraft/")) out2.push({ path: source, source, bytes });
47
+ else if (source.startsWith(".agents/skills/")) {
48
+ if (shared) out2.push({ path: source, source, bytes });
49
+ if (claude) {
50
+ const path = source.replace(/^\.agents\/skills\//, ".claude/skills/");
51
+ const text = source.endsWith(".md") ? Buffer.from(bytes.toString("utf8").replaceAll(".agents/skills/", ".claude/skills/")) : bytes;
52
+ out2.push({ path, source, bytes: text });
53
+ }
54
+ } else if (source.startsWith(".claude/agents/")) {
55
+ if (claude) out2.push({ path: source, source, bytes });
56
+ }
57
+ }
58
+ return out2.sort((a, b) => a.path.localeCompare(b.path));
59
+ }
60
+ function detectHost(env = process.env) {
61
+ if (env.CLAUDECODE || env.CLAUDE_CODE_ENTRYPOINT) return "claude";
62
+ if (Object.keys(env).some((name) => name.startsWith("CODEX_"))) return "codex";
63
+ if (env.OPENCODE || Object.keys(env).some((name) => name.startsWith("OPENCODE_"))) return "opencode";
64
+ if (Object.keys(env).some((name) => name.startsWith("COPILOT_"))) return "copilot";
65
+ if (env.OMP_CODING_AGENT || Object.keys(env).some((name) => name.startsWith("OMP_"))) return "omp";
66
+ if (env.PI_CODING_AGENT) return "pi";
67
+ return null;
68
+ }
69
+ function parseHosts(value) {
70
+ const tokens = value.split(/[\s,]+/).map((token) => token.trim().toLowerCase()).filter(Boolean).map((token) => token === "github-copilot" ? "copilot" : token);
71
+ const unknown = tokens.filter((token) => !HOSTS.includes(token));
72
+ if (unknown.length) throw new Error(`Unknown host: ${unknown.join(", ")}. Use ${HOSTS.join(", ")}`);
73
+ return HOSTS.filter((host) => tokens.includes(host));
74
+ }
17
75
 
18
- // src/migration.ts
19
- import {
20
- cpSync,
21
- existsSync,
22
- lstatSync,
23
- mkdirSync,
24
- readdirSync,
25
- renameSync,
26
- rmSync
27
- } from "fs";
28
- import { dirname, isAbsolute, join, relative, resolve, sep } from "path";
29
- import { randomUUID } from "crypto";
30
- var DATE_PREFIX_RE = /^\d{4}-\d{2}-\d{2}-(.+)$/;
31
- function deriveSlug(filename) {
32
- return filename.replace(/\.md$/, "");
33
- }
34
- function slugWithoutDate(slug) {
35
- const m = slug.match(DATE_PREFIX_RE);
36
- return m ? m[1] : null;
37
- }
38
- function listMdFiles(dir) {
39
- if (!existsSync(dir)) return [];
76
+ // src/install-v1.ts
77
+ var MANIFEST_PATH = ".joycraft/installation.json";
78
+ var JOURNAL_PATH = ".joycraft/local/update-journal.json";
79
+ var BACKUP_ROOT = ".joycraft-backups";
80
+ var IGNORE_LINES = [".joycraft/local/", ".joycraft-backups/"];
81
+ function inside(root, path) {
82
+ const full = resolve(root, path);
83
+ if (full !== root && !full.startsWith(root + sep)) throw new Error(`Path escapes the project: ${path}`);
84
+ return full;
85
+ }
86
+ function readBytes(root, path) {
87
+ const full = inside(root, path);
40
88
  try {
41
- return readdirSync(dir).filter((f) => f.endsWith(".md"));
42
- } catch {
43
- return [];
89
+ const stat = lstatSync(full);
90
+ if (stat.isSymbolicLink() || !stat.isFile()) throw new Error(`Not a plain file: ${path}`);
91
+ return readFileSync2(full);
92
+ } catch (error) {
93
+ if (error.code === "ENOENT") return null;
94
+ throw error;
44
95
  }
45
96
  }
46
- function listSubdirs(dir) {
47
- if (!existsSync(dir)) return [];
48
- try {
49
- return readdirSync(dir).filter((name) => {
50
- try {
51
- return lstatSync(join(dir, name)).isDirectory();
52
- } catch {
53
- return false;
54
- }
55
- });
56
- } catch {
57
- return [];
97
+ function readManifest(root) {
98
+ const bytes = readBytes(root, MANIFEST_PATH);
99
+ if (!bytes) return null;
100
+ const manifest = JSON.parse(bytes.toString("utf8"));
101
+ if (manifest?.schemaVersion !== 1 || !Array.isArray(manifest.files)) throw new Error(`Unsupported ${MANIFEST_PATH}; review it before updating`);
102
+ return manifest;
103
+ }
104
+ function packageVersion() {
105
+ const pkg2 = JSON.parse(readFileSync2(join2(payloadRoot(), "..", "package.json"), "utf8"));
106
+ return String(pkg2.version);
107
+ }
108
+ function planInstall(dir, hosts) {
109
+ const root = resolve(dir);
110
+ if (!hosts.length) throw new Error("Choose at least one host");
111
+ const pin = readPin();
112
+ const installed = readManifest(root);
113
+ const previous = new Map((installed?.files ?? []).map((file) => [file.path, file.sha256]));
114
+ const wanted = filesForHosts(hosts);
115
+ const actions = [];
116
+ let unchanged = 0;
117
+ for (const file of wanted) {
118
+ const current = readBytes(root, file.path);
119
+ if (!current) actions.push({ kind: "add", path: file.path });
120
+ else if (current.equals(file.bytes)) unchanged += 1;
121
+ else if (previous.get(file.path) === sha256(current)) actions.push({ kind: "replace", path: file.path });
122
+ else if (previous.has(file.path)) actions.push({ kind: "replace-edited", path: file.path });
123
+ else actions.push({ kind: "conflict", path: file.path });
124
+ }
125
+ const keep = new Set(wanted.map((file) => file.path));
126
+ for (const [path, hash] of previous) {
127
+ if (keep.has(path)) continue;
128
+ const current = readBytes(root, path);
129
+ if (current) actions.push({ kind: "remove", path, edited: sha256(current) !== hash });
130
+ }
131
+ const ignore = readBytes(root, ".gitignore")?.toString("utf8") ?? "";
132
+ const present = new Set(ignore.split("\n").map((line) => line.trim()));
133
+ return {
134
+ root,
135
+ hosts: [...hosts],
136
+ from: installed ? { tag: installed.tag, sourceRevision: installed.sourceRevision } : null,
137
+ to: { tag: pin.tag, sourceRevision: pin.commit, joycraft: packageVersion() },
138
+ actions,
139
+ unchanged,
140
+ gitignore: IGNORE_LINES.filter((line) => !present.has(line) && !present.has(`/${line}`))
141
+ };
142
+ }
143
+ function formatPlan(plan) {
144
+ const count = (kind) => plan.actions.filter((action) => action.kind === kind).length;
145
+ const lines = [
146
+ `Joycraft ${plan.to.joycraft} (${plan.to.tag}) for ${plan.hosts.join(", ")}${plan.from ? `, from ${plan.from.tag}` : ""}`,
147
+ ` add ${count("add")} \xB7 replace ${count("replace")} \xB7 replace edited ${count("replace-edited")} (backed up) \xB7 remove ${count("remove")} \xB7 unchanged ${plan.unchanged}`
148
+ ];
149
+ for (const action of plan.actions.filter((item) => item.kind === "replace-edited" || item.kind === "conflict" || item.kind === "remove" && item.edited)) {
150
+ lines.push(` ${action.kind === "conflict" ? "CONFLICT (not Joycraft's, kept)" : action.kind === "remove" ? "remove edited (backed up)" : "edited, backed up then replaced"}: ${action.path}`);
58
151
  }
152
+ if (plan.gitignore.length) lines.push(` .gitignore gains: ${plan.gitignore.join(" ")}`);
153
+ return lines.join("\n");
154
+ }
155
+ function writeFile(root, path, bytes) {
156
+ const full = inside(root, path);
157
+ mkdirSync(dirname2(full), { recursive: true });
158
+ const temp = `${full}.joycraft-${process.pid}.tmp`;
159
+ writeFileSync(temp, bytes);
160
+ renameSync(temp, full);
161
+ }
162
+ function stamp() {
163
+ return (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
59
164
  }
60
- function destinationMove(from, to, kind) {
61
- return { from, to, kind };
62
- }
63
- function planMigration(projectDir) {
64
- const root = resolve(projectDir);
65
- const briefsDir = join(root, "docs", "briefs");
66
- const researchDir = join(root, "docs", "research");
67
- const designsDir = join(root, "docs", "designs");
68
- const specsDir = join(root, "docs", "specs");
69
- const moves = [];
70
- const skipped = [];
71
- const slugSet = /* @__PURE__ */ new Set();
72
- const addFileMoves = (dir, kind, targetName) => {
73
- for (const file of listMdFiles(dir)) {
74
- const slug = deriveSlug(file);
75
- slugSet.add(slug);
76
- const move = destinationMove(join(dir, file), join(root, "docs", "features", slug, targetName), kind);
77
- (existsSync(move.to) ? skipped : moves).push(move);
165
+ function applyInstall(plan, { backupName = `update-${stamp()}` } = {}) {
166
+ const { root } = plan;
167
+ if (existsSync2(join2(root, JOURNAL_PATH))) throw new Error("An interrupted Joycraft update is pending; run `joycraft update --recover` first");
168
+ const byPath = new Map(filesForHosts(plan.hosts).map((file) => [file.path, file]));
169
+ const backup = join2(BACKUP_ROOT, backupName);
170
+ const touched = plan.actions.filter((action) => action.kind !== "conflict").map((action) => action.path);
171
+ const saved = [];
172
+ for (const path of [...touched, MANIFEST_PATH, ".gitignore"]) {
173
+ const bytes = readBytes(root, path);
174
+ if (bytes) {
175
+ mkdirSync(dirname2(inside(root, join2(backup, "files", path))), { recursive: true });
176
+ copyFileSync(inside(root, path), inside(root, join2(backup, "files", path)));
177
+ saved.push(path);
78
178
  }
179
+ }
180
+ if (saved.length) writeFile(root, join2(backup, ".gitignore"), "*\n");
181
+ writeFile(root, JOURNAL_PATH, `${JSON.stringify({ schemaVersion: 1, backup, saved, created: touched.filter((path) => !saved.includes(path)) }, null, 2)}
182
+ `);
183
+ const written = [];
184
+ const removed = [];
185
+ for (const action of plan.actions) {
186
+ if (action.kind === "conflict") continue;
187
+ if (action.kind === "remove") {
188
+ rmSync(inside(root, action.path));
189
+ removed.push(action.path);
190
+ continue;
191
+ }
192
+ writeFile(root, action.path, byPath.get(action.path).bytes);
193
+ written.push(action.path);
194
+ }
195
+ if (plan.gitignore.length) {
196
+ const ignore = readBytes(root, ".gitignore")?.toString("utf8") ?? "";
197
+ writeFile(root, ".gitignore", `${ignore}${ignore && !ignore.endsWith("\n") ? "\n" : ""}${plan.gitignore.join("\n")}
198
+ `);
199
+ }
200
+ const pin = readPin();
201
+ const files = [...byPath.values()].filter((file) => !plan.actions.some((action) => action.kind === "conflict" && action.path === file.path)).map((file) => ({ path: file.path, sha256: sha256(file.bytes) }));
202
+ const manifest = {
203
+ schemaVersion: 1,
204
+ joycraft: plan.to.joycraft,
205
+ tag: pin.tag,
206
+ sourceRevision: pin.commit,
207
+ harness: plan.hosts.includes("claude") ? "claude" : plan.hosts[0],
208
+ hosts: plan.hosts,
209
+ files
79
210
  };
80
- addFileMoves(briefsDir, "brief", "brief.md");
81
- addFileMoves(researchDir, "research", "research.md");
82
- addFileMoves(designsDir, "design", "design.md");
83
- const briefSlugs = Array.from(slugSet);
84
- const orphanSpecsDirs = [];
85
- for (const subdir of listSubdirs(specsDir)) {
86
- const matchedSlug = briefSlugs.includes(subdir) ? subdir : briefSlugs.find((slug) => slugWithoutDate(slug) === subdir) ?? null;
87
- const kind = matchedSlug ? "specs-dir" : "bugfix-dir";
88
- const target = matchedSlug ? join(root, "docs", "features", matchedSlug, "specs") : join(root, "docs", "bugfixes", subdir);
89
- const move = destinationMove(join(specsDir, subdir), target, kind);
90
- if (!matchedSlug) orphanSpecsDirs.push(subdir);
91
- (existsSync(move.to) ? skipped : moves).push(move);
92
- }
93
- const plan = { projectDir: root, moves, slugs: Array.from(slugSet), orphans: { specsDirs: orphanSpecsDirs } };
94
- if (skipped.length > 0) plan.skipped = skipped;
95
- return plan;
96
- }
97
- function relativePath(root, path) {
98
- return relative(root, path).split("\\").join("/") || ".";
99
- }
100
- function pathSelection(root, selection) {
101
- return isAbsolute(selection) ? resolve(selection) : resolve(root, selection);
102
- }
103
- function selectedCollision(root, move, selections) {
104
- return selections.some((selection) => {
105
- const selected = pathSelection(root, selection);
106
- return selected === resolve(move.to) || selected === resolve(move.from) || selection === relativePath(root, move.to) || selection === relativePath(root, move.from);
107
- });
211
+ writeFile(root, MANIFEST_PATH, `${JSON.stringify(manifest, null, 2)}
212
+ `);
213
+ rmSync(join2(root, JOURNAL_PATH));
214
+ return { backup: saved.length ? backup : null, written, removed, conflicts: plan.actions.filter((action) => action.kind === "conflict").map((action) => action.path) };
108
215
  }
109
- function isInside(root, candidate) {
110
- const rel = relative(root, candidate);
111
- return rel === "" || rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel);
112
- }
113
- function inspectPath(root, path, allowMissing) {
114
- const rootAbsolute = resolve(root);
115
- const candidate = resolve(path);
116
- if (!isInside(rootAbsolute, candidate)) throw new Error(`Migration path escapes the project root: '${path}'.`);
117
- const rel = relativePath(rootAbsolute, candidate);
118
- if (rel === ".") return;
119
- resolveUpdatePath(rootAbsolute, rel);
120
- if (!allowMissing && !existsSync(candidate)) throw new Error(`Migration source is missing: '${path}'.`);
121
- }
122
- function unsafeTreeReason(path) {
123
- let stat;
124
- try {
125
- stat = lstatSync(path);
126
- } catch (error) {
127
- const code = error.code;
128
- return code === "ENOENT" ? void 0 : `Unable to inspect migration path '${path}': ${String(error)}`;
216
+ function recoverInstall(dir) {
217
+ const root = resolve(dir);
218
+ const bytes = readBytes(root, JOURNAL_PATH);
219
+ if (!bytes) return { restored: 0, deleted: 0 };
220
+ const journal = JSON.parse(bytes.toString("utf8"));
221
+ for (const path of journal.saved) copyFileSync(inside(root, join2(journal.backup, "files", path)), inside(root, path));
222
+ for (const path of journal.created) rmSync(inside(root, path), { force: true });
223
+ if (!journal.saved.includes(MANIFEST_PATH)) rmSync(inside(root, MANIFEST_PATH), { force: true });
224
+ rmSync(join2(root, JOURNAL_PATH));
225
+ return { restored: journal.saved.length, deleted: journal.created.length };
226
+ }
227
+ function doctor(dir) {
228
+ const root = resolve(dir);
229
+ const manifest = readManifest(root);
230
+ if (!manifest) return { ok: false, installed: false, tag: null, missing: [], edited: [] };
231
+ const missing = [];
232
+ const edited = [];
233
+ for (const file of manifest.files) {
234
+ const bytes = readBytes(root, file.path);
235
+ if (!bytes) missing.push(file.path);
236
+ else if (sha256(bytes) !== file.sha256) edited.push(file.path);
237
+ }
238
+ const pending = existsSync2(join2(root, JOURNAL_PATH));
239
+ return { ok: !missing.length && !pending, installed: true, tag: manifest.tag, missing, edited };
240
+ }
241
+ function recordedHosts(dir) {
242
+ const manifest = readManifest(resolve(dir));
243
+ const hosts = manifest?.hosts?.filter((host) => HOSTS.includes(host));
244
+ return hosts?.length ? hosts : null;
245
+ }
246
+
247
+ // src/legacy-07.ts
248
+ import { copyFileSync as copyFileSync2, existsSync as existsSync3, lstatSync as lstatSync2, mkdirSync as mkdirSync2, readdirSync, readFileSync as readFileSync3, renameSync as renameSync2, rmdirSync, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "fs";
249
+ import { dirname as dirname3, join as join3, resolve as resolve2, sep as sep2 } from "path";
250
+
251
+ // src/data/install-inventory.json
252
+ var install_inventory_default = {
253
+ schemaVersion: 1,
254
+ source: "npm joycraft",
255
+ versions: [
256
+ "0.7.0",
257
+ "0.7.1",
258
+ "0.7.2",
259
+ "0.7.3",
260
+ "0.7.4",
261
+ "0.7.5",
262
+ "0.7.6",
263
+ "0.7.7",
264
+ "0.7.8",
265
+ "0.7.9",
266
+ "0.7.10",
267
+ "0.7.11",
268
+ "0.7.12",
269
+ "0.7.13",
270
+ "0.7.14",
271
+ "0.7.15",
272
+ "0.7.16",
273
+ "0.7.17"
274
+ ],
275
+ files: {
276
+ ".agents/skills/joycraft-add-context/SKILL.md": [
277
+ "3552459f82bae9592c4a39d0e79755199eef7ec70d0277da513151b807704d9c",
278
+ "42d8dfbc2726121000983a765416362631d30da6ad3407cc451d472e874ba866",
279
+ "524cebc35209abf1376c7f91166b966e259bfd5f7fbab257a1ff61f34cc935e9"
280
+ ],
281
+ ".agents/skills/joycraft-add-fact/SKILL.md": [
282
+ "0a7714a9486d0e7ddba1a4d172ffe2b92be66d614f777a7120913fed62ff683f",
283
+ "3bfa28388bc8f855167ea12e979daaddb8b05c894693501e73c642f0bac51d56",
284
+ "5ea873c4b23e3343a27a5e7d3b7bf1fa68eeb6643085150b1d9185f6df714c0a",
285
+ "87a3e4423cb21ae648ecd730e43d2f17bac72ee0f9bd14f2bd20f41d6550634a"
286
+ ],
287
+ ".agents/skills/joycraft-bugfix/SKILL.md": [
288
+ "035ee49dd48a5122fe5d34dfeb1d6e2de68b244fd24e9a8ed6349351725c311d",
289
+ "1606b355cde55f02b5c00575ce5a4059e0e87a898cbd2ae35b0e95f4e3c966fa",
290
+ "393fe6351ba3828df23bff13cfafdcb358a15e75c235dad4f6e1e0ea0e325d77",
291
+ "ba99f7520355b1bfc8283f09eff096501eda3f03fc31f67f38b7110e7b180443",
292
+ "da58b059d600c8ab5efa2f0f98118c639e5af416c524ff0acf9af440d2aba822",
293
+ "f4527630a23deede8f68aba8c3b64ea564e65a47fbde2b3a1be847988fe9bae5"
294
+ ],
295
+ ".agents/skills/joycraft-collaborative-setup/SKILL.md": [
296
+ "2461307868cd5a2dd5393cddd81edb95c213ea595ed8b6e1c65157432f39e64f",
297
+ "a1e0e91afcbb5bdf088e2204fe4c40bb7427c4cf14d9f1d18ebc06c09af9adb2",
298
+ "af5f665b53717af8c140020a44e414f1980b5e4966fc790d69fe4258a2de6b21"
299
+ ],
300
+ ".agents/skills/joycraft-decide/SKILL.md": [
301
+ "0bea63b35e2b8c862066a7ac9a62c5d0065de8da833ab7a76d1b581b94a3b522",
302
+ "2c729d3d91e5ff70ecb8733488366fced7aa524261450b258b23a5d056e72f03",
303
+ "8aa34fd72ce7f45ec137b51c559a850910ccd7c6bfda3ee9aaa3ce4b7a08b506",
304
+ "9dda5a4dfd14d3ef8726359f974dbfaf6f8aae4ca5daabcd9a4debed5516e8e5",
305
+ "9e01a048ec30d9982281bed2d66af8ceceb714eafdf1006ba27a1ce57277b569",
306
+ "d375f28bbc231ceea69521b28b92ec2910f882647599f7b2af83daea00667b46"
307
+ ],
308
+ ".agents/skills/joycraft-decompose/SKILL.md": [
309
+ "0f02cb2615a35257e3f9b660b0426d98a0528c05ba09d96e5dc07fc7481be447",
310
+ "258d2fc4c73075064fae36892c5148cf3059febb62daaa071ca59f185fbdba2a",
311
+ "98daa692bcec5474d1e03bf9e897dd6956cd444566d928d51323837aa12a7dda",
312
+ "a3e6db3844284a56a0b3378a4f9fe89981e97ef9a3b973249b250a75ab50a695",
313
+ "ca128f4caf382952aafc662ee7f49f963d32a3b7a231a8f7d212b4495e2651bb",
314
+ "d8dbb33fd4320712f66cd88f0cf4fcd35e61f0459edfe689cc91bb90924eab83",
315
+ "fe4e8759aeb6a28f7d46a8ec12c7b764e463fe45ed392e7e8ffb01c5ba8db2c3"
316
+ ],
317
+ ".agents/skills/joycraft-design/SKILL.md": [
318
+ "4b4886b28871551d84fb9bd2ce3593117c13e274e7303b22eca7b3516a0d5786",
319
+ "4f928454c9db8ae87958865a9ec8332b529d245f68c217cd900a04920766ea49",
320
+ "60063279325326986e191677f00e98562bcf1e9de3704a1b8f21cb61e1376588",
321
+ "9344c55aeb84f234665356230d57dfe8d755390e8b6a395a59197163203419e9",
322
+ "c5041350ff0d52cbaefd9d0de6b384d2e05d4b5925d55650022bf10289671f3f",
323
+ "dd6931eefdd515ba174cb0eb71ccf92b31538479075195a0e06fe08d75e2fdc8",
324
+ "eacfdd6285c79a647ae4bd97337b7ebe8910fbf91ca7a737c73aa84cc56d82dd"
325
+ ],
326
+ ".agents/skills/joycraft-gather-context/SKILL.md": [
327
+ "18b228d0c63fea402a498bcba179c6536471ac40df08107d871932572764ee7b",
328
+ "2c6ac1e77c7d8e4ef14e4a1439eb124dc96036380db1925a5be067119e682eea",
329
+ "9e1785b6f038cbef36ff40e2506b1bf873edc5870c9881fbbbb5266e931e0463"
330
+ ],
331
+ ".agents/skills/joycraft-harden/SKILL.md": [
332
+ "03215b96db25b9c22c73dbc337af09c0f0773ab8bab185d417afdcc68f8d47c8",
333
+ "2461393ee8ed7f7a861e00d9970447d8b40db383ef8416b303db4bce49efe654",
334
+ "3fb9b50cc34f8289d2669dfc432cbc07ccb9d737e6741fd5163667b9e9d6356b"
335
+ ],
336
+ ".agents/skills/joycraft-implement-feature/SKILL.md": [
337
+ "28ab498b0f2fddc9b645aec22222b662d60b98028e7056c0f5d4f9ce637f5bd7",
338
+ "54036db549ecddbc4bbc10f2cb12cec7d826b7cbdcb9a6e1d71323abe06bf0c0",
339
+ "b1ed63f1ba856702179a99fc6ae79b501eeed1a056870da54d8667b4039fb953"
340
+ ],
341
+ ".agents/skills/joycraft-implement-level5/SKILL.md": [
342
+ "1409cc994f0b4a04e7bc517759aeed767a925e69592ea088b5151825020a913b",
343
+ "796b6430db87a59ef2408ebaf0b416db7b80562fca82ba753f760742fdfdfede",
344
+ "bd719467d595d284b45c65ff8540a187ae933a573a4dd830247d5dd3f887881f",
345
+ "db21c8481b9a2e02af2ff10f303e2741780b8ffae1d9d3c4d341dc7acb4f2178"
346
+ ],
347
+ ".agents/skills/joycraft-implement/SKILL.md": [
348
+ "2236e108047211a29089018e7c861d0f0120d9590d8665a040626b61036284b4",
349
+ "3f1402f33d880861370d933be46efee8a53ea18ca8549f60d5e45b04738c78e7",
350
+ "57547087d09edb764ada5acc4b895221ba2e01826797af7e108b34e8ce4f8b82",
351
+ "604aaa84a81badaecd847e57820def32da072feb42bf856a6757095a66f3eb0d"
352
+ ],
353
+ ".agents/skills/joycraft-interview/SKILL.md": [
354
+ "3e647685a5b880464716df2ab772d350ead1e2c13d90f3235d3e04a5146205c9",
355
+ "5edf0da054e9b40545a12fbd4713d77f782d3842533849bf732a591421c054c6",
356
+ "5fe3b36a2bfbec31ff401586b4393549dbee22beba0acdbd08577bdff504300f",
357
+ "616e5c327904b1b1acd4ddde59405087f6d742d80b28767f187a6200ee651e90",
358
+ "80833462ce43eff4ff01f7a5d070f22583f555449cca8b99aa861b763096b924",
359
+ "81a7a9314867de9fdc06db1aa57b5c82e3d0ca7c54cc6495f2d44db6e4aa4afe",
360
+ "ac051446717562321ef531551dec8456e91db5d36cbcbe2dd92a9ee30ab12401",
361
+ "e19870b9c1356a11a4a9c85fd17f01b25837e56d85f3938282cfdb9712455856",
362
+ "e27694e78fe72f06e15728b44c0ad66d47582191fb0174ca2caa2e69d9ece96e"
363
+ ],
364
+ ".agents/skills/joycraft-lockdown/SKILL.md": [
365
+ "04a9ec840a0d0f3a20aa859ee5e1eb1cdf0e6a50e1c8f2122e2ada132b77898c",
366
+ "0ac193acb9d2a3e8720c1fd344eaf4bcd5918174fad502c55f0dd6e8219beed1",
367
+ "c4c605ff7340b870d83aafa80bb9b6334377a9f77912954169c44caa089a2a9a"
368
+ ],
369
+ ".agents/skills/joycraft-new-feature/SKILL.md": [
370
+ "250c28b083bd2cdcbff717154033713eea0a6c3bbe77681ba33f5e59d1561dbb",
371
+ "27ceb25d4ad94af4cb9da18e5e904377e5aacdf8421fa2389ac57eb85fb52940",
372
+ "4f7d5582df3ba76cf49fb1f353ee527766aec1d9afc36b5ec84c8776cd86f401",
373
+ "b9f65b7d2658007aa7b08877ab3aa53941fafea67245879139e7f13ed15100b6",
374
+ "baed27584bd48b6155b736fc55ebfe61a5218917d7a726bfc7f2584b2d6424c1",
375
+ "c83e3052ded8a01ddcff6d9362590e3b18eb5a382cde26240a08a52e2094d83f",
376
+ "eab5f59c8ebb896f9a814dbff9f7f9b8fdfbdbcb974f82bc0c296d64ce34920b"
377
+ ],
378
+ ".agents/skills/joycraft-optimize/SKILL.md": [
379
+ "0b26f7b85950f565c556cd52b9a6807c677f53b366ade7490ec5f4fc2668468a",
380
+ "0f36af9ecf21593ddc4eff9bd0a674f109e618a88cd85610f542acd85056a994",
381
+ "1ac6956ea99dfde76bd09b84e0dd9dc992ef12b96dbb24a3e8252a2d2c1c0ff2",
382
+ "23f1d24e918dc52c7278b6002aa39582569fa2a5244204c6aa78cc754fdc654d",
383
+ "37b8050071221474a7819f79566dc43aac4d57fd9d2c9d4c15f8e5aa33058281",
384
+ "54b7557ee411ffb2f47adc4c7aa05a8c4559956cd7fd8b54215c686ffb983adb",
385
+ "60faf2670549859a5813f6ce4b1194e2e5b4c5a2c664c89cec4d647b0d0b7628",
386
+ "797b0749fb5656576e4574127cec2537429a8387eff629f44a744598966ce8f5"
387
+ ],
388
+ ".agents/skills/joycraft-research/SKILL.md": [
389
+ "08bae7c5fe747b0dbdc4107cfba032e5d83224a82e5e9be64bbc8a84b6e9a4b7",
390
+ "48ab9f6eeda0f9683de6ce5f54ea844cb902c7c5f4843eaa0740fb2d9847d02f",
391
+ "8b8bd4965c82dfbd51d689824a9f28a3863afba7cff7bedbe3f301fda777a412",
392
+ "a4ab3eed85ae567956fea6c8adea2f6ec3685306619e141d3c9759109004e8c0",
393
+ "f643a163bbe4bba4341faad87c8ca8fd24d3ac9a067e780b28fc6db0ac944936"
394
+ ],
395
+ ".agents/skills/joycraft-session-end/SKILL.md": [
396
+ "139024fb7b2c3fa57662f7d54cd1e5678316b9ca91dce2730b1b7a7fefdf78ed",
397
+ "64da17d75c2b5d2a9053fe4f73a6fca04bedc5987723a6e379f411e2dfd51084",
398
+ "cb94e48273a5ceacf229c4f6849d8f39bbb3d1b582c284302068fad2648d1cb2",
399
+ "cbbe16935bcf4aa580a8e72839571d0910a9a79455c09f20672c30f28b6cb695",
400
+ "cf9fd4d514eb12e899eb3198a5f6458df767e4e91c6f7fbf6a7c6fa0f6cc6962",
401
+ "fe859e65347284e23154133e4e43c06ebd1bec7794524f5a5a167a6435ea6756"
402
+ ],
403
+ ".agents/skills/joycraft-setup/SKILL.md": [
404
+ "1a3ad70a42ba6c15fb3dccd115656e04823aecb196de2092b3755fc62c56b5cd",
405
+ "c291966d67d0298c3c9cbd7d1f3765770532e48f568a218304a67131be7f285f"
406
+ ],
407
+ ".agents/skills/joycraft-spec-done/SKILL.md": [
408
+ "35dc99b7feaa220929548f50fc96d88ff62b17af4e81666cf5f8cf1d2e09497c",
409
+ "4018ed142f00ca4d2934c0f213a1047a9dc92d3348d89aa0565198dd6ba118cf"
410
+ ],
411
+ ".agents/skills/joycraft-tune/SKILL.md": [
412
+ "03cab8773c3d5956b83ef88eca5fba84bc696c544fb2bafb54a5b96ef0ad6ff6",
413
+ "12489de7eb9bc4f118f11378938d6d6bdb97b1bd608afc8eed7f654412846d10",
414
+ "17a41a8ad2717ec60bdc248b2634a97574946315492026874efdd496e659ae89",
415
+ "1b434cb1fbcec9596865267f7fa1a3ed86c3ff3e1b676d9449e9040c953519b2",
416
+ "215125740a765855203ebf78f2f0211b58a654fdd4431afaf0a8e58c09edcc7f",
417
+ "953bc53b32f5d3962a4d53cf062cb572e1fe3cf26e1beefd4b516464f102ee6f",
418
+ "9c54e8bc558d7c782b16836c2c9b5d40835e19bcfcf4792ca1c13e34437d3137",
419
+ "b8947f89104ae15d1a4ce89cdbc0f29f508a174d5fc6051d32a80dfda32be75f",
420
+ "c6b065726e03d5895943522567acf8f74d37a02b5a7af5a93dfdc8603dffe182"
421
+ ],
422
+ ".agents/skills/joycraft-verify/SKILL.md": [
423
+ "3dd8dbf143143092e2dcd5dedf9a6690af86e20cfb6695b1f9beb0e8816e2cdf",
424
+ "800a2891c66edce4cbf243f6619540f8fa6f8ddc69f55d6e44a2f4844273c17b",
425
+ "a672d21028c8e9c98f577d5b10d6fd7a2e2b52e1f4f328ec64c0688ce366af35",
426
+ "d7ab9b37166f7db05f85800143204f7fa7fb31edf15ca88a4cb282e4c618eeb2"
427
+ ],
428
+ ".claude/hooks/joycraft-version-check.mjs": [
429
+ "0278e6080b532d372f4a639e534fc7a6a0f2a065d8c0db1a94a8e497925c6784",
430
+ "6bb3f624676067f66bd2b31dba5551f4af65164267abc449cb2fe7cc8771fb31",
431
+ "974cd86fba4bb643aca6ccf2fe01c5f9bbbcad69ac463b90fc534cda16dcd10c"
432
+ ],
433
+ ".claude/hooks/joycraft/block-dangerous.sh": [
434
+ "804a8cf8a03fc3fa44ced1b81e6c71b5c953d0561e2f871a9f83fb5bb37e34ef",
435
+ "e58f11ebaf1eac1c4bd1b95f89b51c0ed5b403a547ae8fc592047878d04af59d"
436
+ ],
437
+ ".claude/hooks/joycraft/deny-patterns.txt": [
438
+ "90a835dc97522d05c232a44de6c89dae3a9d679ec5a1eacf3ad46862441bb84e"
439
+ ],
440
+ ".claude/skills/joycraft-add-context/SKILL.md": [
441
+ "422d7a90d925c078131abacb8b879f011eca41e8a957c01e12c607978fa9f311",
442
+ "5956306bfb46f0e8902ac600c836286f2eb5d9c08337dcceddbed22e3e11f4e7",
443
+ "65d668e04dcfce62d7c0519314520c254a38533a482a7a1ca3b3c2c7da45bad8"
444
+ ],
445
+ ".claude/skills/joycraft-add-fact/SKILL.md": [
446
+ "095b8672fba2ec6ffc3390749cab92ff7f1ed52d09a02c7e832ef1a1323d4fcd",
447
+ "1d0afcee0e802f964e2ee026a30044128c9ef5203386c29dc0fbaea649ca1fab",
448
+ "78de4864957d916edb2063bd8d596b92d5be29953a4feb4e15cfa0281135c860",
449
+ "b841673c45fcd626abdd274f0de62f6c8d83ad6cba49ccc49fa67685569be74d"
450
+ ],
451
+ ".claude/skills/joycraft-bugfix/SKILL.md": [
452
+ "08979481d775e49213687937f3b4d4d156d6942e48dac0d981d8671cce0f1cac",
453
+ "1b1ac3ff486cf7f1956a2d774b347e44d14d8f21a3bb2b2028d375bb7499859d",
454
+ "3e4b31920091f2c6b57b86d414720f036d07ea47a42507735c92f310d29f585c",
455
+ "8129c78043f1f01feb491c13fb97100debb7a984b32befc33251ed91b5b5b96e",
456
+ "8d3f71d22b0de6363a2f4c51485e62c64e2b37e0c33a8005fafc5959e75585f9",
457
+ "93f4cf2f828e4f5c0b9b1651dbf15d72e5ef5e039ed7af7a940b07f65555ebbd",
458
+ "d01a615d6749f3cb377896cbbbebfdbca33e071805568b046d412243c53f512d"
459
+ ],
460
+ ".claude/skills/joycraft-collaborative-setup/SKILL.md": [
461
+ "07f6cbcdbbab9e0c61e5786f39170ddaa274262e313b376acb0b61078a21186e",
462
+ "3f410c8c5b618112f9ecdd9efaaebe7bf96e5909560b9a9bb9588835560bb760",
463
+ "6cbfd209846cabe2cb3aa98ab412c51cac297f81383b3719bc121272376e2dca",
464
+ "c81c26b581089a406ca2ff6b8f3a42ae50601b4bd09bcfe0859bc5ec06a1dc51"
465
+ ],
466
+ ".claude/skills/joycraft-decide/SKILL.md": [
467
+ "7177a6d000028ecfd8cfce4e7da05062a1fedfc510983235c108ff2b50c9f01b",
468
+ "72622864f0be18847ead655e6be9bd5a4dcf4da4dc611f2ee56e89295d9eab66",
469
+ "7acb7508a75b472635ed651d2c9891a281961d8d0e1c591ac32587a55e47f572",
470
+ "83c8748634497b00092c440fa3d2851da4fba58de0e2dc6c6a72e8ac247c8d58",
471
+ "b7a53c226973b075fdd65cb65c46d2de943fc819e29da6d9f7ca936a2c8e2aae",
472
+ "d0abebf687aa4539d805984a5698bf6ac76b4cb9487dea61d101bbf2da9bf2b3"
473
+ ],
474
+ ".claude/skills/joycraft-decompose/SKILL.md": [
475
+ "14996547618e6c561d551d0a48c6d17afa678d8a380ff25935cb4bed93b92ab3",
476
+ "16c1f1f7162d1eff36c5be5cc47b2aa4bde62abb63153f65607e690dc7dd4583",
477
+ "2a2da73d5754fd13799eb91e3e51e7f3e2f422a63c9a50d6fe35b24796bc797a",
478
+ "40a935fd36ab5bcb147896ebe7080836e231330a45c282441aa99048b919f97a",
479
+ "720622807f1fa5ecaec86d46f01d940a77cb4dd4332c4219ee51e515dbd57efd",
480
+ "778bbc08b82d12c01a4e8ebe8c71ad8a2e845f1e043fd484b3c5c93c41fc7f7e",
481
+ "9f63d051233864f3511a12094a2572a2c064775330e08c236bfb5e4d3df89ca8"
482
+ ],
483
+ ".claude/skills/joycraft-design/SKILL.md": [
484
+ "3f0a3d703658b11c9c718d9d01e579aa62ec082968050bd32b10c48c49948f4b",
485
+ "59a4e5d21eab39518b7865a140a28f09dcedc0e96e30c83148abe8c082f6dbfc",
486
+ "5d751702fe7e2b6fec1d3f225a68396e3d8b3fd87b7b48b4d3a42922012c139a",
487
+ "7a49aa9a967c7fd4208701db47dd4d3388bd43300f4e17dac5c98110c0d8b5c2",
488
+ "8625f3f35b8c7c5b34b13b0dad2618b9b9bae3c2987ea096ffed190c63ba7d6f",
489
+ "a81a21fdff058316ac16fed36ee0b4a5f9b3046f9be7340c9a24777655822aba",
490
+ "e8bab2ddf332681c20b68afd974e60215653c9ea541a09ec9506386e31a15092"
491
+ ],
492
+ ".claude/skills/joycraft-gather-context/SKILL.md": [
493
+ "0c7fbae801a26e37d861da81d5f729771717361b19c6627e68c4a74fe96d9746",
494
+ "78e5a4195128ff8e8fd2a07c4f90e5625ca1e60706bb4c71d0fc11e7593f84eb",
495
+ "a85d7899b4727ba440c3cdab8c0c52066e1f93180a6fd0bacd2abb17aff532d5",
496
+ "c54bccb39f80c9ca26316d208737514a1598b47fa258322d85b9d7f9598bfaf3"
497
+ ],
498
+ ".claude/skills/joycraft-harden/SKILL.md": [
499
+ "21974dea7172fbbabc9c281d411facc4a6a7480f7b3b1c1ea4b29006ecf00843",
500
+ "cbe0a8dd5b82e28833187abafaf9b9b3e46490cbaf38640111a41ef97e0208f0",
501
+ "f1547439de361eac876b46e2493038db3e80b0a5316746ba7ce1fd94a0edaa80"
502
+ ],
503
+ ".claude/skills/joycraft-implement-feature/SKILL.md": [
504
+ "2139f5a2f82095532c829592be4997e248e95ea463a4d2a831a5aaa89b4ecbb7",
505
+ "bdc53bcb7d6d7ff86642638a4a85c5446d57ca8d4603e3638e33e6cb6211aee7",
506
+ "dc514d4f2fb414b7b5740a07385f4a537d29371cb585e421f53466c7d9b432a9",
507
+ "ef1122a4c05374c0b15173f49de7fe1b7d2d475c224fe0f2eadf86d5721a9680",
508
+ "f8fdd9b885d044d86ce6325cfcf9fbe240628159768aeda0af30b14e1e41ae0b",
509
+ "fc313168df9501a38527a0db3c29fd3194a7aaf746c85279e45bf8c94133c466"
510
+ ],
511
+ ".claude/skills/joycraft-implement-level5/SKILL.md": [
512
+ "2f7e4a78d138b041b60ae67aaca960837ce8ad5e6b8f4008bc92ff1b8dff8445",
513
+ "321dc2781f7f219757ae1cfd790c596e297489b0abfa74f9319b32ccd7531e65",
514
+ "763a4a4ff3ceabd2fd4c291eb47f8341226d3ab61a9ffbd5c28ccdaecd38e57e",
515
+ "db070acbd2f6f60d50a13e7e63aa9fd245379b491a81a1fe25a7c735568d9552"
516
+ ],
517
+ ".claude/skills/joycraft-implement/SKILL.md": [
518
+ "0df1df7b8f25d35603da22d15a77e7edf7f8eb47469af87cf0c70bd3c725db99",
519
+ "5797660ec30302197b3210a603bc5c21093cabb96624b922d217c5cd7f4c4e6d",
520
+ "58f8097e0b82bb140ae9e2628b544d3b20b0837643c24c7e6dee75e2c227d598",
521
+ "9b9ead82296c76b083002250337df214517c4932c0b187bc3022a34aa4b0a1cf"
522
+ ],
523
+ ".claude/skills/joycraft-interview/SKILL.md": [
524
+ "3f740216b1a2ce9047f5307f38c11ae14fbd38ee26717679b4c26255a2323843",
525
+ "4f3217517a3be64a089b4def7124c0f97f8db10560e45a742142bcd7a8519fcd",
526
+ "5509a4d5ee265c86f6df14313460cd2a75b58a1fed35e47ee90c8c80a454f7e4",
527
+ "55b91b4e161ad050ce6c9ca4671800fd7026e050930625c74cea8d1014ff1dff",
528
+ "56b8905cf2bfe55c734d200d3e3e75f7d8aa6b228c2c49850d7e6068048d82e7",
529
+ "8385a018988ddb83c80446c583b87db9587544b7dfd85ae1a2b3930239ae191d",
530
+ "911bb82dbc1d3c6c8ebe67e310a1f593352b216069f4ed162e5ca659e4a0caff",
531
+ "bee108c272f4b73da3f01cc3b9d100d3b055e68af0b617dceee9876dd7ac693d",
532
+ "f8689487ec7fc206611f4581f3459ada7c83e9e5d89d0ae7a332c1cdd23744a9",
533
+ "fd9798100a3774b5fa58508368adf0c5de8f711c47cad982e7f7caaa32b48565"
534
+ ],
535
+ ".claude/skills/joycraft-lockdown/SKILL.md": [
536
+ "35ed61fe3fa8bf70a36e05232b8083431c36594dd56e69a716648d29588fbb71",
537
+ "75f884647a9d7c0fd68cb261239d2df16863260f07f4c6db846e8c97021e3a5c",
538
+ "b64483b7d29c9bfaf58366db2fcef6eaf80b8eae14c5013f220498f97af47a16"
539
+ ],
540
+ ".claude/skills/joycraft-new-feature/SKILL.md": [
541
+ "1b6597fdbe1e6103c1f3f39a30bc1805e275d372e864fa2dbe5475280a8c491c",
542
+ "6152441857133539aaa1bea3afa8036796e4b5c1d33192ed65dc85a2ea5397d1",
543
+ "7d47e166a73a5ee182432ecd3264cde3ddd7752fa49675533561a1fc10fd1c81",
544
+ "cf58d515575543c43a8b7c1af3d6308aa6a20b344365b4e21dd5bad95b246893",
545
+ "fd3e2f3ffcb97cecd7e998b4e932e1283dde6f72f45f1902aae20f851ec23630",
546
+ "fe78b2ae0f3bec1dd6f3aec660d92c8faf1bac92a82bf5d598be7451e80781d9",
547
+ "ffb41c11d0cc6a978dbc5274d6323acee22c3d3e2c3c5befc6602673b6418959"
548
+ ],
549
+ ".claude/skills/joycraft-optimize/SKILL.md": [
550
+ "09798521677eedcf9d18ed7ac98f16bc1088f650b12b7ededa03928eca5d286e",
551
+ "1fc81f18fdfdd383bdd5a290e20de3d420ece4ca397ea800c0ac8e4a687af235",
552
+ "253df153f3ebbe16d2372fc857287278157195017130ff9ecaa1a88b4f959498",
553
+ "42050916e99ca10f1d720ebd761e161f9d0cfd0ba84a4802c03436e783e65fc6",
554
+ "57959b2d357bd298e532d80da355b4fdccfdc60dd60a8e8a8f9edae8f0530a67",
555
+ "72e16081a0c53a1c8fc16f86f588db8116fc611e98939098d68b2c1357282b09",
556
+ "9767adc7bc2c0f511155e0f81a1f4b38f13bf034ff4eb0bae5e1d38b58c0c7bb",
557
+ "bd7ea7943e62b822ae48cadd4261ad01836d60a03e48f134bea532e25a0272e0"
558
+ ],
559
+ ".claude/skills/joycraft-research/SKILL.md": [
560
+ "2185e117117888cc6bc5348f64b641db2fc206e7293c63c5f2a76f91b8e6e1bf",
561
+ "51f802e10a86687e085d1c44c7b969a203ae4cfb28d4c494f9755367b1c3c587",
562
+ "571130ad533ca130bb5f518d4d9c90101122d5be116bd5ba111ac80d5ed89af4",
563
+ "8a2120c05d362e7b6bbdfe3621a2297bcaf08e5059c35b5b449a9018d5d6510f",
564
+ "cf309582f921cad4db0a4c75c2436e02399a39c373378566e404449e1aa2460c"
565
+ ],
566
+ ".claude/skills/joycraft-session-end/SKILL.md": [
567
+ "20ee12dfad74d4d4ef8983b431520e732cb9e4e20b3177f2905cf1be43ae8501",
568
+ "32f8e8e20bff25860a3b6c0e63469ca19234da17c0c2cf0f21560bd4cd7304c7",
569
+ "41a82971e86919e126cc7735592a722a024b54b5be465e02b382c6eefca926ec",
570
+ "8ff62c9cd634c4d68191ff3eb24a868c8f15e1324680526c6dd062f749cceb25",
571
+ "b57ffb3a1ec68044986f2f117b9a1266bde7649be8cc9594499fb42b8d163d24",
572
+ "baf5495f5f874fef5c96abcd356fbafac2da0e69e630b2ded52b779e57c13f77",
573
+ "ee4334e289644b378402de4436b2f9079956be63078860815e80ced90eb6a311"
574
+ ],
575
+ ".claude/skills/joycraft-setup/SKILL.md": [
576
+ "3538abc932cfda18fe7d92afded2a59474fb8fab9e0224fe39dda25ce5c61435",
577
+ "4c8b65e1a308378ce45ae48a2470a3978fbd3641be674d13cd807ecb1c935899",
578
+ "6b2eb9056d963762385312f2bf7fe1dd18fe2cc2520056585a3adfc30978d53a"
579
+ ],
580
+ ".claude/skills/joycraft-spec-done/SKILL.md": [
581
+ "3931b2e8eeb8cab2a4216181f73e83e99e8c6266486217adc4bbcdd0870d8dd9",
582
+ "4cf646f86a8ab5e1245843342f750aea1573c637e75fe90a95f496368970c10c"
583
+ ],
584
+ ".claude/skills/joycraft-tune/SKILL.md": [
585
+ "1ec1b7e264f33bc581d22c019f7ed57181e78e649d218693f725766abd311090",
586
+ "292bb214c6b3cfaddcd6a55961d5dac7492778991f28d51f926342945d345137",
587
+ "6b33db5ca466bd92fbed34d0708008c8d079a9e072fd545f5f1e70182ed5638a",
588
+ "7956c129712ae48a680cb8ee072a63593dc53ac0656baed4d391fe8fedd5c294",
589
+ "8eb291f883e974cdcdd1fc250aeb167a39d6c3ced2df70c67e81c7487303b162",
590
+ "c86baf48f55f9d11b01ef83b59fa9690b36a3d951716293949c929b32ce5752d",
591
+ "ca7c90631f9b5aafab53c24850c3e78013b62aad7b0bb45525875a1987da5c70",
592
+ "cb46be7b0a485ffdd7b4e75924ce76ccac9646688ec84945da58e93b856dfafc",
593
+ "d698d8ccc1c24bbbaf76f4ec1b5991b170984185f440ae96a94c884beac3f23e"
594
+ ],
595
+ ".claude/skills/joycraft-verify/SKILL.md": [
596
+ "3b565db4b26f52bc59e6f3a8640ebe94ddef16b2ac79172e3b73e093dedc6e36",
597
+ "3e8faeaf735c0b5b2ee8e5103107cb11c7de278d62dcc05d28515230adafaba6",
598
+ "b0f7dd11c6c0913687b2b9ffc49c5b99589515e1896694b3571ca6ea2f6fed2e",
599
+ "bca24134425277cf4f12ad9ad19db4c37f4d8f7e24be726921d70425fd02a151"
600
+ ],
601
+ ".github/skills/joycraft-add-context/SKILL.md": [
602
+ "b961cd0ae2adcefa9c4194dd5d5314dba036f39a4cd5597f9ad6a649e62e42f2",
603
+ "bcd9dfeea6696b1d8c46fefb91748e98f65562391b73aec02217bad19cf9064a"
604
+ ],
605
+ ".github/skills/joycraft-add-fact/SKILL.md": [
606
+ "73780708477a99aa72a9faa2edf7883d2de2816dc422fafecb1d5b573d399fbc",
607
+ "ba3bd056314310ee1a9c24c7276b866af9bba5b802c6badea0f4924d7df6d66c",
608
+ "f616995bc510f2df856a1f41471955982431559a467f279a7d48f80cc4905220"
609
+ ],
610
+ ".github/skills/joycraft-bugfix/SKILL.md": [
611
+ "06c729090e403c11a3a45b591bcf924e8bbec2cf49cded9cccd6b0072300c594",
612
+ "636d9c100100810098d3802562576bd3ebc122f15ecc8773f432be08bcf15210",
613
+ "cb615340d6a60bc7a28019a9f273f34455ae392a1c879ca432faa3fcb19b585a",
614
+ "da9b7788a8bf381abbe5162e54ed2a32bb0750e126a9a3726a818114b1185024",
615
+ "fbc89b6e13fe3d8674b25a777586539789b115dc53b000888b28c4aca6033d77"
616
+ ],
617
+ ".github/skills/joycraft-collaborative-setup/SKILL.md": [
618
+ "01582b65a0ca8c7977be4167e504ad33960cb63be22d48989d978c65ae85efe6",
619
+ "15d9b050be7341ce8180cae7906ace21801a27f0b15ac3f06f28cca685051964",
620
+ "4aec08e6e554d39dc38fd353e1ad732192cadf479f782e2a79b7b50a3748ed6b"
621
+ ],
622
+ ".github/skills/joycraft-decide/SKILL.md": [
623
+ "0a779f7488a329953701c83db7fd5974af28f347a807f6216304aa6ff4422c2e",
624
+ "2dc651105c2dc0b085c1de1bb03b4e549b33fdf45cbe8f9cd9c89559a64e48e5",
625
+ "395148307d45559261ec8fbd2928be3c4893c46f0b7c41a070563efbc616252f",
626
+ "d8c69e8483d9546b43b23f8839f612cfff53de42dbdb13086d716fce38127efd",
627
+ "e5de5f7cc0a6a441bc9591758498efbbc0e0466a566135c71fe94f07c01b0829"
628
+ ],
629
+ ".github/skills/joycraft-decompose/SKILL.md": [
630
+ "19912952448ed4782ac1bf13997e07a2d6b92273b93e50720576004f501d659c",
631
+ "5bad0e306ace484231f24f7f6d7ce61832c446f473a44ffeef718d7dd79ff72a",
632
+ "816e0329004001315ee0eb35b0042083b3ac83262e67298a1c667e2ae46fa915",
633
+ "9c1e9ad3b82ba8cc45cd66ae0e6b4185b5ec5161ea7efba395fb82d01ea1e4d3",
634
+ "b22e8121cd610dde1555fde3ce1b484270d017627611fe5f5d2f51c9d5066d70"
635
+ ],
636
+ ".github/skills/joycraft-design/SKILL.md": [
637
+ "59497b08e8d97e40b2727832e546571dee0deaf075836b225d621640c6cd6246",
638
+ "6fc8724ea86bd2397bcb03535040a07abe942c3c7cce3a1da24117e2df9fac5e",
639
+ "89f2012e1e55b4c2eb2428254bd71afed0fbdc1935686b7590cc4b03a5fdf292",
640
+ "9f28763319476658da96fe0bd39b29e1626a11be2108ef96e0fce6c0b3527aaf",
641
+ "c31ee67b53b4b8b3f34dd630eedb87276e98b13a1db00c43e7585cf8e2f59dae"
642
+ ],
643
+ ".github/skills/joycraft-gather-context/SKILL.md": [
644
+ "8ed3263a3b277f14e6ddfcd747e6c20792763146b9ad12e625f114a9c53cd4ec",
645
+ "91be1d0bef0c26198986b296bddc3ff1e16236d0ebd32cd00d39dfe715fcc6f4",
646
+ "d461a02635b13de5c329f650c5879508093cde0de03d34a5b57c95bbf023791e"
647
+ ],
648
+ ".github/skills/joycraft-harden/SKILL.md": [
649
+ "0e5a12b087e590a5522f2d2635dc49a4dc9a0eeb903309a49b16e68296005dd7",
650
+ "6cdcc9c155ffc1e59167f1f3cd12079605bb8d587b7d1311f6b272ccdbb5ee90",
651
+ "f1a19dbedfef6fcef084c4c31847519ada534e3c06b0a2593e2bd08de533742a"
652
+ ],
653
+ ".github/skills/joycraft-implement-feature/SKILL.md": [
654
+ "28fad474d2219bfdc2574927cbac1655ccdd9900b0a749ea72ffd269190c957c",
655
+ "9822a6158057d6b819e4c6fd496adab7e7a1c66eab5e0b1eab86624419c542c3"
656
+ ],
657
+ ".github/skills/joycraft-implement-level5/SKILL.md": [
658
+ "04c4c3e1d4abcdd59d6cf864c07a367beeb9fc720af50fb306f8584d4b7ae0de",
659
+ "3d1b772ef7c7883b258bb8849b87decec94bf8e915ddf81ec46cf01be693060d",
660
+ "c8ac5d3eaa4414c5b6a18ca945af1c6eaaeec60e01225b848b55767a8c601c01"
661
+ ],
662
+ ".github/skills/joycraft-implement/SKILL.md": [
663
+ "224b238bc596507a138af5c0872904e2a34a0e2f6ab137ce03800dc5ff1a8c7b",
664
+ "621c53a6101d77ce9f39e102b99ab0aef9230efa47ef780bca2dac9edf99efa7",
665
+ "805ef3ae9466348c2d3cab20435cdac5ba6ef4182b4fa6dcad2c80798ab68b33"
666
+ ],
667
+ ".github/skills/joycraft-interview/SKILL.md": [
668
+ "07b1e407e91903b19fb99d1cee1e25979cb0582e318ab2b678ba438d6b6a9f9a",
669
+ "123fc27c112c939c0ab0d12f574d331c22bcf48ca1e6f00b8fb4bc310fef2c3d",
670
+ "53ad04915880a87316416be68dfd9c5e5ea8091d5cf5705043aa93ad6eb54626",
671
+ "7d2822d9cc1ab68bb53655c6a743910818cef0445f797a10ddd34ec51689924e",
672
+ "9a886f7d0342efa0ee1861d3b55aa62ce02abfdb73d1da995716365aead90479",
673
+ "9baa37fc3f1468ec4f87246a6ae587352554ce7df495c02d39f0bef9c045034a",
674
+ "d04036fd98abfdbc02f10cd202a30f18f444559565bd41457561190ba3c0473c",
675
+ "e295f13c214181f5d7a6c65e55134397a626888632fe4b2a0005f2044a6c8105"
676
+ ],
677
+ ".github/skills/joycraft-lockdown/SKILL.md": [
678
+ "2610c6656b2222a0aefff9a066badf66a7f4e21e94ce94f9502002818eee50a3",
679
+ "c8984e19a6e2103ef10ebf6771aa5f2538ada430d74048651a84ea155b15edff"
680
+ ],
681
+ ".github/skills/joycraft-new-feature/SKILL.md": [
682
+ "13511a13b3d52b9d6ac09db2f72ff6e2b46bda4480027b14c8d3d634b2878b9b",
683
+ "40a6f77a5d9b76053221b467396fff3118b11b6ac255b2812b989d0cb42629c8",
684
+ "73cfba2ba9d6b8f0df2564d574a28fd0f97ea935b3b1bd4e338cda68a50150bb",
685
+ "e206eaaeab02be57a611a080b4345575b1c3e1b50fb220e3162a4c0830fc2570",
686
+ "f8cf93aec7629d060257e8aa8b4539122128e5c50d76c2b8c05db89b96fb2829"
687
+ ],
688
+ ".github/skills/joycraft-optimize/SKILL.md": [
689
+ "010d9a97e2f9d188ee6bb5501ee2fb4d38f36a96c74832fdae363e27f0783c43",
690
+ "1219b71fd8e0c11e1982945c8111a7217f3e099325be1467638b32caf9e2f9d3",
691
+ "32ce07554fc02c71a70f62a7817bf8516be9a0cca82875f4651013e03699e160",
692
+ "77ca92867b36047844127d0ab2f7e40910fb95b2aff3180a3b8c9cbe5827ccda",
693
+ "83ada4b1f9d3d5087b633a9d8768c2542fa1135d32bb5f554acab8f4f1d9f02a",
694
+ "ae4bbccf1df17a0bdd48ddae1805742fc1d5c4520e0c47f513c47f2d75a76718"
695
+ ],
696
+ ".github/skills/joycraft-research/SKILL.md": [
697
+ "1926ced6d1fc06b6ff9d2a82ffebed98afa93956baef2b15847926a036e20699",
698
+ "28f7021dcefa01db167c6334f904cba15186b4860bf5db4fefe5bf8a4ebb5cb3",
699
+ "6ded30d6a931e0bdf35746720ed10a76db6e8438f5544f28b4c4b3052d791ba9",
700
+ "f85fa50f4e4cf8e0e97bcff981be42a6a23b2c4c6b8a9b624d398bf26ed0e540"
701
+ ],
702
+ ".github/skills/joycraft-session-end/SKILL.md": [
703
+ "14f2cec27b9d7265ad2886798b21370e69093321930aabf2ab7f044b6eda57e4",
704
+ "7743d50d97aa6cd9c4d2292ba78b3778afc91c66d798ab6739670cca6a41f436",
705
+ "892adb5468ccbabdadf77db375f3e939863cdcb9e64013dfb43bf25f4b3f7674",
706
+ "8ba7560d9a6c30763342f7ccf2cadc096376a21cabc4beeb93a2b120408f5a5c",
707
+ "a380a3f5a32d1748caa6efc9f184fbac63076aaf93664777fcdf14f175e5923d"
708
+ ],
709
+ ".github/skills/joycraft-setup/SKILL.md": [
710
+ "216a39a4deb5ec40db80056975f39c9b63be9c339b6e979a083074d56bf081e1",
711
+ "d7e114fc92a04ab06af23c72609dcd525f38b02d479500e9be037aeaa4aa228d"
712
+ ],
713
+ ".github/skills/joycraft-spec-done/SKILL.md": [
714
+ "24f5153eb732b258a911e41e02a7928480b92a8e64e391590d784bf6713decbe",
715
+ "ed5482818c0bcff7d105c0feadc32b949e7d8e031ea86ce6cf5b9aa1727667e4"
716
+ ],
717
+ ".github/skills/joycraft-tune/SKILL.md": [
718
+ "123fc60e3f58e53b87fe62b2bccd91a77f346fed4bcda5c1a432aae1e1feb0de",
719
+ "3c8558855b0c8d264accd9149a672d26ab95cf29ae789e040b1347b6248610b1",
720
+ "4d2e4874b55d9a1fc8f704a8dade9edb2a9b1af236bf5ff4f623747df7e367b2",
721
+ "a7f379b3737747082e96688c814a37425dfd732d54199873a212ecc4a4c17aa8",
722
+ "df4344970387526790d7620319dc9d8096a133438f90dd751f53efc9b9449aab",
723
+ "fbe2adb05d0da8d2fb164fb5b104f2748dcf172bba547b2d6b2df3a550ae2170",
724
+ "feee5740b8eaa7da8e43d595b90d3a34c4db4d8efcc0ffa529278841179dbf92"
725
+ ],
726
+ ".github/skills/joycraft-verify/SKILL.md": [
727
+ "6e5bccac5a820d811af25ed3b4bb5d7a779ef74dc88209c912fdd1c2f3e432ae",
728
+ "b957dc8bfb3fab27b4b41ff4c1fa23c2d2c4a9e6705842807602357e7d6c2b44"
729
+ ],
730
+ ".omp/skills/joycraft-add-context/SKILL.md": [
731
+ "3d1a3fa78813c50e7ecbc27dc5687200bcf1497e0a16633bceb11301c862ef1e",
732
+ "cd0ee4cdf4bacfe4e48222efd5d8182becf19250023072c0666337713eb320f5"
733
+ ],
734
+ ".omp/skills/joycraft-add-fact/SKILL.md": [
735
+ "00b8fc234071f965a600c15261e012da5066b4d0b6343eb7f68106c0c1fb6dc9",
736
+ "29b59ec0709ef983ee1540ba54d31f4a9ce8d799fbbd2ab2755a00f9d65434a7"
737
+ ],
738
+ ".omp/skills/joycraft-bugfix/SKILL.md": [
739
+ "45e73578c69bf3ed21238e73a7fdbf0f9fd75011da26a38d2b8a543d9da89a64",
740
+ "c83b646c56c0e1bbd7b71e9fc37d093ef7563804c865920f1979f31d096f54e7",
741
+ "df70b84b4dea273496f395a43f478036a951340e43656f3fb2918728109e36f3"
742
+ ],
743
+ ".omp/skills/joycraft-collaborative-setup/SKILL.md": [
744
+ "4affb1f3f5a11da8bf1d7757ed82d82d0761f2d126fb9323dbcf7bb53f5965a7",
745
+ "53b4ce246a434d193562a76251aa2652f16fd73b6fe6f6b0a01d6e18dadf5aef"
746
+ ],
747
+ ".omp/skills/joycraft-decide/SKILL.md": [
748
+ "3c0623e4e827c22d9521c42973f35847e8ecad5f6400528d9f2ce545e113d8cb",
749
+ "c9c4f6d2d73359799b999e6b8fe4760a1dd63d544bb848d6021675d319a1b8b3",
750
+ "f65f76163f8273125ddeaafde0a20f340826d9dccc98702e328e92801ab79056"
751
+ ],
752
+ ".omp/skills/joycraft-decompose/SKILL.md": [
753
+ "73d20caa10c063d8beda9be7eb104fe60f5b2fb58f01a25cc2f3eaac2dbd174f",
754
+ "cd59505f93010872c2afafe57e764bac151af33e1f23410bf6b3b6abc3c41d7c",
755
+ "f44ad20ae535a5899085db367e783fa7bb37be326a30c8a920c5028f702daf56"
756
+ ],
757
+ ".omp/skills/joycraft-design/SKILL.md": [
758
+ "2308f5f3748744db39cb3d1d1397273d61823a856cb63a4277e0220e019c23a2",
759
+ "2ef2a7a1c66e3f9731515cc4ce1a954aa2305dd9f9299b74fc8705c146b69a7f",
760
+ "ed4980c7568239adbdefa7d55e9eb387fa39e15ebb34573c9636f5367b51a3a5"
761
+ ],
762
+ ".omp/skills/joycraft-gather-context/SKILL.md": [
763
+ "80dcc2d4e355fd84370a63daa6e30544a2ab1130038c49129ba3680311533468",
764
+ "b751d9eabdd0e84ac7b8187f86ac0d0eabaafd90b8a8f05cea6ed05e12a65e3e"
765
+ ],
766
+ ".omp/skills/joycraft-harden/SKILL.md": [
767
+ "03215b96db25b9c22c73dbc337af09c0f0773ab8bab185d417afdcc68f8d47c8",
768
+ "3fb9b50cc34f8289d2669dfc432cbc07ccb9d737e6741fd5163667b9e9d6356b"
769
+ ],
770
+ ".omp/skills/joycraft-implement-feature/SKILL.md": [
771
+ "5aa8fb0089e1101b8a508f4fbefdb9543f180bebe2b732b23fb98cc0c7ce2a74",
772
+ "e0e398906cba11fefeeb681fbc1fd9159aa633a2def02dac29c0283349e29711"
773
+ ],
774
+ ".omp/skills/joycraft-implement-level5/SKILL.md": [
775
+ "10550c9753c673e9f5127809a4940725ab8f955dedf2b87e3220fd8da3175405",
776
+ "cb224a2328ed7784f27a4f9270165fc6f8055719c9310d0bde2663e726468444"
777
+ ],
778
+ ".omp/skills/joycraft-implement/SKILL.md": [
779
+ "3e4a8960cf0310ea47b55a90aaf77626a677d08dfbd3719dbcbfa8eba52fb6e4",
780
+ "4ec06d09f4e012e96d4c8b964a2cb244ee41d8571e28f1a7a55868365eede832",
781
+ "8a700b9bec9462943fd25bddeb7f4d31ded9309d9874f17536317f5a64bae7f7"
782
+ ],
783
+ ".omp/skills/joycraft-interview/SKILL.md": [
784
+ "6f065646e013c0bb7ee25ad439f67b088ec70cb0bd553a0454b4bd4c6fa49a17",
785
+ "e7053515107baf5d0bc6ab9adbd7435c56fc6468661c80486bc1db52f1354e86",
786
+ "ff5dbc40bea55e857f085c2473d75be9f683b1940e07128525ae6aeaee0a80b4"
787
+ ],
788
+ ".omp/skills/joycraft-lockdown/SKILL.md": [
789
+ "e29dc5430e1709a37e5141fa0029206c54b62a7ad51c94d29c80ce1168872a2c",
790
+ "faf63c69e401fc63474d284d207c98b2ddb19c1489229c8d110c32ebf1732d05"
791
+ ],
792
+ ".omp/skills/joycraft-new-feature/SKILL.md": [
793
+ "9d0acdca3853a9d270a60160813ebeeb1e7ec6b1a633379f46caa5f96076ccd8",
794
+ "b92a952a3286ba9c3d223914cf743470af6eac5c2fa00c913d5a8db899c33c73",
795
+ "ce25fecbc9d93bf234e2fb5efa36926be1b709cd4665440f917ebf1c88f879ad"
796
+ ],
797
+ ".omp/skills/joycraft-optimize/SKILL.md": [
798
+ "5a5bb97c3b7cb7ff8edccfc23be69438b5247c5747662322e7fd249d9380cd44",
799
+ "5f017b022cdc1ee3275be7a3651a8659b23c3cb722bd1f7e49c80054e0a923ed",
800
+ "bb309543e159b7262a7876a5bca9358a9a33c53e95710c1764a796ad669d8970"
801
+ ],
802
+ ".omp/skills/joycraft-research/SKILL.md": [
803
+ "6b4662bf006dca3c39324f129b651dfd4227a66f36a2f16c801631a8a73a1ccf",
804
+ "d4ea66f26e02f9cab16448eb7db04e285ab43e57b7211ff3aa44d354e80d0953",
805
+ "f1092455698eaf360765db7235a54450cfc0f13e79d986556b69fff1ec154646"
806
+ ],
807
+ ".omp/skills/joycraft-session-end/SKILL.md": [
808
+ "18c9948869727d416bdcec653ed60da8e815140aedc7974e6e25c556bdd499c9",
809
+ "9e921c45fe21e57fa865d82d0dc9a8503ac1f82900f649b401b3f0de750bfe6f",
810
+ "fc8bcff0224621e353025b0620a7c34e6b2097495a55c0731a64e1d499a84562"
811
+ ],
812
+ ".omp/skills/joycraft-setup/SKILL.md": [
813
+ "21c2d14bd09641e80eb8af50bc9f648f5f1ddc7c1f99261173eb712f4fa9901e",
814
+ "ad6d2ad75e358f8b3535f6ed6e04f9e30122a9cfbc2042bfae2786129fd356dd"
815
+ ],
816
+ ".omp/skills/joycraft-spec-done/SKILL.md": [
817
+ "4d0afb784a6ce605f6bef00f575dbf8e00a27171d4907cf021436db6c608b498",
818
+ "6a3fbbcfdd08c77593b03c444c211496f407bddcbde89256015c1a662337dd65"
819
+ ],
820
+ ".omp/skills/joycraft-tune/SKILL.md": [
821
+ "466635cdddbcb464fddddd6bd385be32614465d3417ff76d4e862ce147cfc4a9",
822
+ "7ed1742e1adc5a5d5cb631a892a63fe3306983ac49ba455849b818cbbc01d119",
823
+ "de87cab0162e82318a6cb15510bc53ae04be9e795437870393b49c41f31bf730"
824
+ ],
825
+ ".omp/skills/joycraft-verify/SKILL.md": [
826
+ "78ecec32976db26be3335e31fb35d02992e456b532e019384f3bc1c5d75059a2",
827
+ "f5dbcebb65f1af1c1d2f93445907f4b53f9f6fc5db2b137c1c0bccce9ede71c5"
828
+ ],
829
+ ".pi/agents/joycraft-researcher.md": [
830
+ "70051be1f163572f6925ebc46c0e39d5114ecb72695c82328a78e8a0d40d47a8"
831
+ ],
832
+ ".pi/agents/joycraft-verifier.md": [
833
+ "23839a8cb03a10042907c1fa130adf4ad71b8aa070aed08d7281fa8da50c4049"
834
+ ],
835
+ ".pi/extensions/joycraft-pipeline.ts": [
836
+ "ef5468ee36fd6c5c7358153b498c5b6b383e9f5be4138751e0e695c8468b02a8"
837
+ ],
838
+ ".pi/scripts/joycraft/README.md": [
839
+ "40659c6e6a986be27a0d8f785cae7e2c7ff0262c57fc3e69e281697bd51cdecc"
840
+ ],
841
+ ".pi/scripts/joycraft/joycraft-implement-loop": [
842
+ "999203536df774e88b4821001ec70cf36669eba99788cb17062f8cf9ac818aa7"
843
+ ],
844
+ ".pi/scripts/joycraft/joycraft-mark-done": [
845
+ "2a62b21779dde88b49580a35d4f18a65caeb1fac69abd65c4c932abdb67391ff",
846
+ "6866f34ef3cde1f3d4a3b8c7ad67e03f20395a716fb9577706625a4a4e47cc78"
847
+ ],
848
+ ".pi/scripts/joycraft/joycraft-next-spec": [
849
+ "018b0ebb5347e681ee094201277cf93992f79cbed489f4fc308f27eb67193327",
850
+ "ae0e357078e729eb2dd304721cb3d09ad620cf388bac28ce19bb58884d78d4a7"
851
+ ],
852
+ ".pi/scripts/joycraft/joycraft-session-end": [
853
+ "134d0d6403a5c2178e1c8d3c03098e0f6c828a11091a9962ac63b399aa9f1b69"
854
+ ],
855
+ ".pi/scripts/joycraft/joycraft-spec-status": [
856
+ "005551b6e16a70a10702f798f1367fd7c540c462bf3354ffd1b0de9766418a7e",
857
+ "bf69022ec498c89bb7efd7abbc4902b84bc5203cab9d5380eeca8f1bd87036ed"
858
+ ],
859
+ ".pi/skills/joycraft-add-context/SKILL.md": [
860
+ "35d6e9a35842a0606700666b3fe908cea270a989bd9401351e4f306f9f0698df",
861
+ "3d1a3fa78813c50e7ecbc27dc5687200bcf1497e0a16633bceb11301c862ef1e",
862
+ "cd0ee4cdf4bacfe4e48222efd5d8182becf19250023072c0666337713eb320f5"
863
+ ],
864
+ ".pi/skills/joycraft-add-fact/SKILL.md": [
865
+ "00b8fc234071f965a600c15261e012da5066b4d0b6343eb7f68106c0c1fb6dc9",
866
+ "29b59ec0709ef983ee1540ba54d31f4a9ce8d799fbbd2ab2755a00f9d65434a7",
867
+ "a14e07b28edabb638709441ddda26c0ad5db353718645b1c1d00230f3003861d",
868
+ "f943e502484da00e9ed1a93465de5a7f506bfa8ea6af0de37cc2544a48d6a6cf"
869
+ ],
870
+ ".pi/skills/joycraft-bugfix/SKILL.md": [
871
+ "45e73578c69bf3ed21238e73a7fdbf0f9fd75011da26a38d2b8a543d9da89a64",
872
+ "55edc5ae8aaa148f9ca796216c3296d61d3f2435a82d158759df0717e4f8df91",
873
+ "c83b646c56c0e1bbd7b71e9fc37d093ef7563804c865920f1979f31d096f54e7",
874
+ "c92205765a7995bd6bf06905caed0f4ac57b5788064b2de013354af58944757e",
875
+ "df70b84b4dea273496f395a43f478036a951340e43656f3fb2918728109e36f3",
876
+ "f9b26cbbaedf20a6d5fc3eb8b7bd6991f3535efca06aa0d0c471229c7a37a8eb"
877
+ ],
878
+ ".pi/skills/joycraft-collaborative-setup/SKILL.md": [
879
+ "4affb1f3f5a11da8bf1d7757ed82d82d0761f2d126fb9323dbcf7bb53f5965a7",
880
+ "53b4ce246a434d193562a76251aa2652f16fd73b6fe6f6b0a01d6e18dadf5aef",
881
+ "bdc8aac19caaaad57c6691cf9b35153ca2062ad68f5b0038973053283ab2fe2e"
882
+ ],
883
+ ".pi/skills/joycraft-decide/SKILL.md": [
884
+ "1e0561abe3ad35cfef54bae74e88890c13947a0569c6dc852c2e1035b9c05a92",
885
+ "3c0623e4e827c22d9521c42973f35847e8ecad5f6400528d9f2ce545e113d8cb",
886
+ "3c966e125280cfbec243659ede151379b6d3d85926b0f11409d87fe815e5a6f1",
887
+ "b98b5f9eb0d043720c36305f8ed59a8e43ba785b973123218441ef4546e9d36c",
888
+ "c9c4f6d2d73359799b999e6b8fe4760a1dd63d544bb848d6021675d319a1b8b3",
889
+ "f65f76163f8273125ddeaafde0a20f340826d9dccc98702e328e92801ab79056"
890
+ ],
891
+ ".pi/skills/joycraft-decompose/SKILL.md": [
892
+ "2860b07ad91bd17f965dbe4d489c3e786246465a9ddee2c42a37651dd90ffc67",
893
+ "68153b6959105a564952f28eb0440711cb366c662848af6e27a0ad819ecbce82",
894
+ "84491f1d7c13b568dd75699143390b256fedc0f33adb015b744df49bc0cad97d",
895
+ "9eb5160b88c7ecadccb8d2fe86dd6d9ead74e724c5d3f9590f980db37a4c0b84",
896
+ "b31b18976b9c47353dcb472c6c584f2e69e22966542f221b03c1ca876b2a234b",
897
+ "c11e473fb9ac2ddccdf513eee645886271a699bf49430d52ead91e4b3bb5430d",
898
+ "d6fe114e9c65fdfc84135a1d0e20ae63cfedb49bdd7bfef1b925b8ac42375023"
899
+ ],
900
+ ".pi/skills/joycraft-design/SKILL.md": [
901
+ "0517f54d94904c3a7ce3f89a6787a14702f0e73677f1acfccd7561a1f27f2081",
902
+ "2308f5f3748744db39cb3d1d1397273d61823a856cb63a4277e0220e019c23a2",
903
+ "28ee838fd55dd136428235752143412998436b9f68adb17e6a6a8dadd1b50795",
904
+ "2ef2a7a1c66e3f9731515cc4ce1a954aa2305dd9f9299b74fc8705c146b69a7f",
905
+ "6f4679679dbb358cbebcedf1c8b5d935fd5afb24342e51c70c34c8abc983f260",
906
+ "e65ab080f45a325bad41b2b89030d0c170120c024654c1b52c6ad06e600e9053",
907
+ "ed4980c7568239adbdefa7d55e9eb387fa39e15ebb34573c9636f5367b51a3a5"
908
+ ],
909
+ ".pi/skills/joycraft-gather-context/SKILL.md": [
910
+ "80dcc2d4e355fd84370a63daa6e30544a2ab1130038c49129ba3680311533468",
911
+ "b751d9eabdd0e84ac7b8187f86ac0d0eabaafd90b8a8f05cea6ed05e12a65e3e",
912
+ "ed2e1d8f76a7fe952147d837f177db537ceb2c4c5f1debeb9f46ac60b509cb91"
913
+ ],
914
+ ".pi/skills/joycraft-harden/SKILL.md": [
915
+ "03215b96db25b9c22c73dbc337af09c0f0773ab8bab185d417afdcc68f8d47c8",
916
+ "2461393ee8ed7f7a861e00d9970447d8b40db383ef8416b303db4bce49efe654",
917
+ "3fb9b50cc34f8289d2669dfc432cbc07ccb9d737e6741fd5163667b9e9d6356b"
918
+ ],
919
+ ".pi/skills/joycraft-implement-feature/SKILL.md": [
920
+ "be6224f2551d77d51c4fc8f9866104cea80b9e94e2a194963fdac4a98c6444a5",
921
+ "d251410f7137dd2b792ea5fff3c8bcc7c74b7599aa1b54ce792e2380727c48cd",
922
+ "d6b3a0d3ab443318fe40243b67df925b94b79d26fb5dd318bcfa24ec2e71f557"
923
+ ],
924
+ ".pi/skills/joycraft-implement-level5/SKILL.md": [
925
+ "10550c9753c673e9f5127809a4940725ab8f955dedf2b87e3220fd8da3175405",
926
+ "81768e8977a5d8c3ae28744fc7730283306d17b0628d07f87992195674bda36c",
927
+ "c7d389b6bd6410d47ad80e4fc05a102ff6321456f3da7c43eb636617d0f3fe19",
928
+ "cb224a2328ed7784f27a4f9270165fc6f8055719c9310d0bde2663e726468444"
929
+ ],
930
+ ".pi/skills/joycraft-implement/SKILL.md": [
931
+ "99b4c7f44b537e80de24164509176ed9503f4e603c2ed8599fff6369aeadf710",
932
+ "9fecb2fcf98ee7ecb09c4decb4ba451fedd63dea9e81558f3e2e3b10d42f0c92",
933
+ "c22d084b70b4326cd8a30a6543ce17a63bbbf1792984e3250e1c9374c3b64be0",
934
+ "fa40e17418231cbb75773c7a8772e357327cc59d0280d91f9dbfe346d5f14399"
935
+ ],
936
+ ".pi/skills/joycraft-interview/SKILL.md": [
937
+ "11778db95e2752182ad635c908ec3d20667d89b8be26863b383a83f13ac93acd",
938
+ "21ef5013ffb5f28ba7db8c80cf5e7ca3f45ff9f1af930c96263892dbca2e2953",
939
+ "6c92e9756bfdc671a9b945566b92425939508ce9a638e434e595293d5a62df59",
940
+ "6f065646e013c0bb7ee25ad439f67b088ec70cb0bd553a0454b4bd4c6fa49a17",
941
+ "75169ea22acd6e1e733e564d82489a030b91c82e6f1fd94c913a4eda5e811d5a",
942
+ "a57ed088023eeb35968503b5d4b60099d09a6de053365d6ac7162d3b337063b8",
943
+ "e31e9e71f53d6476c8e0f2dc04f1f2d88dbbf054c11816e2f6faf3017fe62b14",
944
+ "e7053515107baf5d0bc6ab9adbd7435c56fc6468661c80486bc1db52f1354e86",
945
+ "ff5dbc40bea55e857f085c2473d75be9f683b1940e07128525ae6aeaee0a80b4"
946
+ ],
947
+ ".pi/skills/joycraft-lockdown/SKILL.md": [
948
+ "cb9709713620ae59659863d98a36c3bfee0a9969e94bcd68fdd07b78c28f3e07",
949
+ "e29dc5430e1709a37e5141fa0029206c54b62a7ad51c94d29c80ce1168872a2c",
950
+ "faf63c69e401fc63474d284d207c98b2ddb19c1489229c8d110c32ebf1732d05"
951
+ ],
952
+ ".pi/skills/joycraft-new-feature/SKILL.md": [
953
+ "00a23e75ac1f0b9f75598df2a8d7463ea3abfa5219d77d43e651350e7d21e630",
954
+ "67a19750fa3a88f70d0491a5188c4377ce91227889829cfe3226551cf34650b7",
955
+ "83df4914f6c4869c5fa0b5cbf9935e6ce32017024db1f2b85624ab7361585209",
956
+ "885646a3e83b5898223ce9285b2b9173667e609bdd67c238a5f22a5a060c8458",
957
+ "9d0acdca3853a9d270a60160813ebeeb1e7ec6b1a633379f46caa5f96076ccd8",
958
+ "b92a952a3286ba9c3d223914cf743470af6eac5c2fa00c913d5a8db899c33c73",
959
+ "ce25fecbc9d93bf234e2fb5efa36926be1b709cd4665440f917ebf1c88f879ad"
960
+ ],
961
+ ".pi/skills/joycraft-optimize/SKILL.md": [
962
+ "0b9ee4aec4e73b6eaa1869ac912a3c5aa46b856875ddcab1799b041299abb390",
963
+ "9099c180a9b07e650608bc7b829520929e74c6996e83a51ea06b94c497ccd824",
964
+ "dc200f50234a0aee612be6969bc8156a6331608409e12ab121b32f7c2d919fa8",
965
+ "df84c944e6f3a37a00f5ca7de1e8822aa878732b1c51e882afeb53bd4f5ce906",
966
+ "e238c3578e0c523989ff960201bbb7db7f84f166894855b765eb6a5aa77ec124",
967
+ "e3760f2a19b6f3e10c6a0f67659fa96d37aae0daf09f782235e6bbd352be03d2",
968
+ "e6910ce240167f3d80df13ae6c6dd6584feca493e4df8b3c98c4355476e90728",
969
+ "fa7a2ef7c96c3319b8bb1be96215e52fd0d1d45101360435999d33eaff49eff5"
970
+ ],
971
+ ".pi/skills/joycraft-research/SKILL.md": [
972
+ "096cdcfb6ed5b0b83774ed10e0c59dc11b8cf9e2d0685be6130fffc2c470ffa0",
973
+ "38191bb51d505f0bb0f89cc086a4d8d8eb08ecdcbf88f93a9eff70b53a8e6331",
974
+ "5480bcd76875a2fbbae3b28e0a068a035ca9c638b9277a82c111f869ba47a461",
975
+ "b87bc8c95eeedc608c02c887319880f0ccf74843eced28549ec3a382766586ab",
976
+ "baa61e8e117b0b8e79f98083840b795f348ca41c47175e8b205b06c3943da7e9"
977
+ ],
978
+ ".pi/skills/joycraft-session-end/SKILL.md": [
979
+ "18c9948869727d416bdcec653ed60da8e815140aedc7974e6e25c556bdd499c9",
980
+ "3c407729e00038fa4bc5566ce0b31c0353edd1d4c2f2417b890522517f750c03",
981
+ "9e921c45fe21e57fa865d82d0dc9a8503ac1f82900f649b401b3f0de750bfe6f",
982
+ "c7abec5f483e1ccfc32edcff392460c4b79e204395a75628f9ea51d20ae67a97",
983
+ "ddf10ecf802fdb25d6fa63848f42ea2d0eb768c5c02dfa4fa8a3d599d0b54647",
984
+ "fc8bcff0224621e353025b0620a7c34e6b2097495a55c0731a64e1d499a84562"
985
+ ],
986
+ ".pi/skills/joycraft-setup/SKILL.md": [
987
+ "21c2d14bd09641e80eb8af50bc9f648f5f1ddc7c1f99261173eb712f4fa9901e",
988
+ "ad6d2ad75e358f8b3535f6ed6e04f9e30122a9cfbc2042bfae2786129fd356dd"
989
+ ],
990
+ ".pi/skills/joycraft-spec-done/SKILL.md": [
991
+ "0fee49af8ae9d58c63c106495cb86c1c0800044977e5b8942e77f522a95e1876",
992
+ "71fa49c0a8624d2a45f1b6f6de00cf7ec119cb1c4eaa139cc440af669948beb1"
993
+ ],
994
+ ".pi/skills/joycraft-tune/SKILL.md": [
995
+ "0ef7bb55eff4f0dc520eddc140e3242d77c2ff1cd843d5b41e9447a210b21e33",
996
+ "4c4002ffcbebdac184c379d67b2bff0674c7929fff23442c3e6228575d0a0add",
997
+ "54340444586caaa7cfe9079fa404d3f4204d3a77c92e9016545a954ed7907b5f",
998
+ "777c938e1e22654bd49fdbb2d9a1ab18003240fef18ffd152778e4cef99261b2",
999
+ "8363020a7504fc514a8a311771376153721e08245e0e2bf6221a244d831c5e2f",
1000
+ "a561270d17eba22f34211fa28a53eeb3b2ab4014749ba5f8ddc1aa88651db5eb",
1001
+ "ae4ce8182ca28a80a382735ea7385dcefdd8c687c4fe9d96f7baad8148608535",
1002
+ "d391d24224459867b7f5c1bc64b4834fa9bd7fff4ac01b95e11ab49b8c3e25c6",
1003
+ "fa6e150c0182f3414ec909908eec8374ed7373de80d8896f0e553626e08813ed"
1004
+ ],
1005
+ ".pi/skills/joycraft-verify/SKILL.md": [
1006
+ "307c0ffb489ce51c08e91b61fbf08109efe7eac5e765cc2052ca1f2f7ff46f8c",
1007
+ "73730cd9f202bfbd04ee97b7375871fcdc60abe71d60ecae2f11f3262767a8b4",
1008
+ "d299792d21212978e943c69cf93610e984bd44fc15aeaf8073003194e5101cfe",
1009
+ "e5cb5a8b244b9064bd8ad7ba9ccb13233417698208f0a7d68f160ed1d5498816"
1010
+ ],
1011
+ "docs/.joycraft/check.mjs": [
1012
+ "711a731296f392656f869fe9264f88d4c3717a0e63f1e121f0e00ca6dacbfb89"
1013
+ ],
1014
+ "docs/.joycraft/local/last-successful.json": [
1015
+ "010044d01811aefe87ff164e92726191ee7b9f23d95d21b9874985c62f13846a",
1016
+ "1fa5e2151c2ce60bd95451c2b3d085f9613dc4f201b9992f5d308fc6d5beffdf",
1017
+ "6614bee97709f13c79f8c53ae6207c750e134ed2646f20d13bb01d053b50c39e",
1018
+ "698f385bc4748b9d803e0fe15f60916a20c54daaf308e0d77c77b944bb8c3bae"
1019
+ ],
1020
+ "docs/backlog/README.md": [
1021
+ "a85cda945db80c794b2ff1eb7016bb460a498e0fd5ab939f77cfc1509500be64"
1022
+ ],
1023
+ "docs/intent/README.md": [
1024
+ "f93afb8b7abbb1274aec57c5c8a390b54f1789237ddb0242556ef2e0c1dbbdc2"
1025
+ ],
1026
+ "docs/templates/CHECKPOINT_TEMPLATE.html": [
1027
+ "d3f113e71c32ebf94af20c1dfe472d60a28b17227ddf79b42e354184c271dccd"
1028
+ ],
1029
+ "docs/templates/CONTRIBUTING-joycraft-template.md": [
1030
+ "38815e8c1094e0258809518db39b2a9ae3decaee4bf27dc4f9b66ea56f71573b",
1031
+ "e204c6a68168784133481cddd14cda80719a25c0b889f6ce96bb229f2657dee0"
1032
+ ],
1033
+ "docs/templates/DECISION_DOSSIER_TEMPLATE.html": [
1034
+ "2547d26dcc6eacb559e98418334d8ef9faa9b9aed98f5a62fd5fe29dd2621d9e"
1035
+ ],
1036
+ "docs/templates/INTENT_TEMPLATE.md": [
1037
+ "178852bcbf8fd5102e34795fef22508c143605159b23523ae499e6bf45852620"
1038
+ ],
1039
+ "docs/templates/REVIEW_GATE_TEMPLATE.html": [
1040
+ "8a6087d778e9b0549a76b11207afde00260d9a1516e02b4b39b81aa8f71ab98e",
1041
+ "96ae08e4b00da8d8a3625d6aa07221fad860ebb5347be4cc2fefda60f7c42545",
1042
+ "ac1f82b21ecef0285dbf9959458cc4492a6d7c8440c5f5e4b6502a235c8a65d8"
1043
+ ],
1044
+ "docs/templates/context/anchors.md": [
1045
+ "6d2d1655715e55c4d9773cb822dabbac3593189a8078affe08f6da46ce983d2a"
1046
+ ],
1047
+ "docs/templates/context/dangerous-assumptions.md": [
1048
+ "3a284c31bf6b11a47d9b6a0ac3280835c04e816c6001ca7b5bb38c144f30f1e0"
1049
+ ],
1050
+ "docs/templates/context/decision-log.md": [
1051
+ "2cba6fe33e7ec97141fc2aaa7765d60de5bc5be84dfb56042e11287718cfaf9d"
1052
+ ],
1053
+ "docs/templates/context/institutional-knowledge.md": [
1054
+ "b2087bcbf493864a54e1eb463803d0df3b2594757db2b61c26b1c9b017e5ce78"
1055
+ ],
1056
+ "docs/templates/context/production-map.md": [
1057
+ "d6cee1d5335deac40d9a2e56b2fc27bc2122eef77f6cf77c015e34d6e24ead07"
1058
+ ],
1059
+ "docs/templates/context/reference/backend.md": [
1060
+ "25e2ccb9970be0cef7d0a587af8a0e7aa4d4261c48e0aa090209b83eca0a2c14"
1061
+ ],
1062
+ "docs/templates/context/reference/design-system.md": [
1063
+ "d6fea157017f70429b2f8af54dbf609c24892a95c08b787211d01b6cdbe9de7f"
1064
+ ],
1065
+ "docs/templates/context/reference/frontend-methodology.md": [
1066
+ "d555c5c29d49caacba2cd3ab6d39a600fc23afeb5aafe0fe5a8868c2d99acaad"
1067
+ ],
1068
+ "docs/templates/context/reference/reference-doc.md": [
1069
+ "e04f93e74041b4b3e74dbdcfc67f01ffd54070fe90d4a22d4226ba2b8fdb9460"
1070
+ ],
1071
+ "docs/templates/context/reference/testing.md": [
1072
+ "c4994726c1246cfc07a14fc8aedbec8bc4ef6a7f17f7ba7db7d5bfb9f0c471ef"
1073
+ ],
1074
+ "docs/templates/context/troubleshooting.md": [
1075
+ "08256329808b2d51c45ec23ac7b3efd163dacea172cb491bf57cfdf54cdb35f1"
1076
+ ],
1077
+ "docs/templates/evals/README.md": [
1078
+ "d75c82bcc30316296835d9fe2023fdb4714ac35a906143b5c0444dd7cae32e76"
1079
+ ],
1080
+ "docs/templates/evals/agent-evals.yml": [
1081
+ "b0e4043627315f3d053397e0795f61760bbf465a58dfee4aef1db59b2a9113ec"
1082
+ ],
1083
+ "docs/templates/evals/check.sh": [
1084
+ "4da0f28da3bcd498bdbd2a13aac1ce9e565f94e2de3a35da9f69a1d78615d804"
1085
+ ],
1086
+ "docs/templates/evals/example-task.json": [
1087
+ "1898f9cb144e7202f81b51a2d608a15a52287e1bfcaf3d78de2e37fc4cd60425"
1088
+ ],
1089
+ "docs/templates/examples/example-brief.md": [
1090
+ "9c3a3f36aaf9779936bfc980edb66c0bacee001ca0fe33ba53d676da4487855f"
1091
+ ],
1092
+ "docs/templates/examples/example-spec.md": [
1093
+ "a7279dcb57e68fa0996d14ddd60b6b1a1194d188db87e35a6e24ee05986d2bfd"
1094
+ ],
1095
+ "docs/templates/hooks/README.md": [
1096
+ "3c2b5b3dfe1e65147b43b246fdb3d2234dbfeeff83a9e37e82f0b8e5e9d64716"
1097
+ ],
1098
+ "docs/templates/hooks/exit-code-gate.sh": [
1099
+ "e4ce9cd9a266830469ce16f3aeb6556ca783c921f402fc51599cf4bd8e35f08e"
1100
+ ],
1101
+ "docs/templates/hooks/plan-sync-on-completion.sh": [
1102
+ "27e9b6fa449a22abd4b7ab7580a62ac938b2be9aba18f8336390dd0cec75c0e5"
1103
+ ],
1104
+ "docs/templates/hooks/protected-path-guard.sh": [
1105
+ "470cc2e87a9651990a1473c52f4214d517123e8edb6b29a18e117dd243760bd4"
1106
+ ],
1107
+ "docs/templates/hooks/test-file-lock.sh": [
1108
+ "226c6dc279a490ddc040f41ba11ab9146d3dbf3e9624c5162080e216a5a30889"
1109
+ ],
1110
+ "docs/templates/intent/README.md": [
1111
+ "f93afb8b7abbb1274aec57c5c8a390b54f1789237ddb0242556ef2e0c1dbbdc2"
1112
+ ],
1113
+ "docs/templates/output/README.md": [
1114
+ "e6a4e51f42e2085545ec514cad65e39e93663fd6b5b07708ca6ba97f3f00048d"
1115
+ ],
1116
+ "docs/templates/reference/interactive-checkpoint.md": [
1117
+ "e69432b78d73865f0821606e8ed0740745b48d08815d4716961df3282a806471"
1118
+ ],
1119
+ "docs/templates/reference/knowledge-lifecycle.md": [
1120
+ "68fd4ec1f92b44d6ea46e6b203e25163cbf0cb1a2812ac814a2cc18e6a2787d7",
1121
+ "f696671dae7d3bb9a99279b933eb0b3a52195bddf91e778f633bb840f99943ee"
1122
+ ],
1123
+ "docs/templates/reference/model-profile-claude-fable-5-1.md": [
1124
+ "c3c335f88ee96eba3d885d27be928fc6b2b03bbc215f7bafda645dbe2fd0a97e"
1125
+ ],
1126
+ "docs/templates/reference/output-style.md": [
1127
+ "2015dee2e47a471bc6107cbc2b674004c747a79e7b19dadae2ef9b79b516933c",
1128
+ "6d122b22fc358e017eb936ed0505d33bca34c48090262b2b5e3fb0ce922a23b1"
1129
+ ],
1130
+ "docs/templates/reference/spec-status-lifecycle.md": [
1131
+ "8accc0acee84301f98a2124b675bb9916bfe3174072fc96409d8d7cc6cec54f0"
1132
+ ],
1133
+ "docs/templates/scenarios/README.md": [
1134
+ "137780df224ca45c402c66861e12d7a9c34b7435e82a89924fd7be363b5389dc",
1135
+ "cea4b8350dda224d497585daf9e411563e7c4ecc2da85de1975dd842ff2d9b59"
1136
+ ],
1137
+ "docs/templates/scenarios/example-scenario.test.ts.template": [
1138
+ "ca55be6f7a0f11bda7cc51aa5f8ba93ea363d1e6ada67c48287010c7e4a6e559"
1139
+ ],
1140
+ "docs/templates/scenarios/package.json": [
1141
+ "9c1bf58f3cd555bc2c805bf9910eed0eb8768adc3b3cbd74906fbf8f57f0e9fc"
1142
+ ],
1143
+ "docs/templates/scenarios/prompts/scenario-agent.md": [
1144
+ "f37ed346807ce667473af9db227ed7d5f043c97b01bc97fb1887696346f476c6"
1145
+ ],
1146
+ "docs/templates/scenarios/workflows/generate.yml": [
1147
+ "bc2cc231148eb5d7224b5a7e5e982fc85f6aac7166baea1ea6a377b8ecad5a56"
1148
+ ],
1149
+ "docs/templates/scenarios/workflows/run.yml": [
1150
+ "c50fa2d0ba201eba842ba87f140d0531e86d43339e17bcfc4ced0600e2e6869c"
1151
+ ],
1152
+ "docs/templates/workflows/autofix.yml": [
1153
+ "d3900967afe005a8ebd524f7a18a7e06b40ec73db01c921b76c6429abc36fe3f"
1154
+ ],
1155
+ "docs/templates/workflows/scenarios-dispatch.yml": [
1156
+ "ca325380f86f834c54d5290f4b8cff4064ae3fb5be31b51ded1ad44aa10d306f"
1157
+ ],
1158
+ "docs/templates/workflows/scenarios-rerun.yml": [
1159
+ "7bffeac1e8f49bdef2d6978c2df21c51d896befde02d5fb6b2bf3d6db12e6301"
1160
+ ],
1161
+ "docs/templates/workflows/spec-dispatch.yml": [
1162
+ "44fed6ef0edf25f0c3d7caffadbf20a480bb2e31c9ad182b864438e193bd2ad0"
1163
+ ]
129
1164
  }
130
- if (stat.isSymbolicLink()) return `Migration path traverses a symlink: '${path}'.`;
131
- if (!stat.isDirectory()) return void 0;
1165
+ };
1166
+
1167
+ // src/legacy-07.ts
1168
+ var MIGRATE_JOURNAL = ".joycraft/local/migrate-journal.json";
1169
+ var MIGRATION_RECORD = "migration.json";
1170
+ var GUIDE_URL = "https://github.com/maksutovic/joycraft/blob/main/docs/migrating-from-0.7.md";
1171
+ var STAY_COMMAND = "npx joycraft@0.7.17 update";
1172
+ var ownedRoots = [
1173
+ /^\.(claude|agents|pi|github|omp|codex)\/skills\/joycraft-[^/]+\//,
1174
+ /^\.(pi|omp)\/(extensions|scripts)\/joycraft[^/]*/,
1175
+ /^\.claude\/hooks\/joycraft-version-check\.mjs$/,
1176
+ /^docs\/templates\//,
1177
+ /^docs\/\.joycraft\/(check\.mjs|manifest\.json|state\.json|telemetry\.json)$/,
1178
+ /^\.claude\/\.joycraft\/state\.json$/
1179
+ ];
1180
+ var bookkeeping = /^(docs\/\.joycraft\/(check\.mjs|manifest\.json|state\.json|telemetry\.json)|\.claude\/\.joycraft\/state\.json)$/;
1181
+ var KEPT = [
1182
+ "AGENTS.md",
1183
+ "CLAUDE.md",
1184
+ "docs/context/",
1185
+ "docs/features/",
1186
+ "docs/.joycraft/local/",
1187
+ ".claude/hooks/joycraft/block-dangerous.sh",
1188
+ ".claude/hooks/joycraft/deny-patterns.txt",
1189
+ ".claude/settings.json"
1190
+ ];
1191
+ var LEGACY_ONLY_SKILLS = [
1192
+ "add-context",
1193
+ "add-fact",
1194
+ "bugfix",
1195
+ "collaborative-setup",
1196
+ "decide",
1197
+ "design",
1198
+ "gather-context",
1199
+ "harden",
1200
+ "implement-feature",
1201
+ "implement-level5",
1202
+ "interview",
1203
+ "lockdown",
1204
+ "new-feature",
1205
+ "optimize",
1206
+ "research",
1207
+ "setup",
1208
+ "spec-done",
1209
+ "tune"
1210
+ ];
1211
+ var knownHashes = () => install_inventory_default;
1212
+ function inside2(root, path) {
1213
+ const full = resolve2(root, path);
1214
+ if (full !== root && !full.startsWith(root + sep2)) throw new Error(`Path escapes the project: ${path}`);
1215
+ return full;
1216
+ }
1217
+ function walk(root, dir = "") {
132
1218
  let names;
133
1219
  try {
134
- names = readdirSync(path);
135
- } catch (error) {
136
- return `Unable to inspect migration directory '${path}': ${String(error)}`;
137
- }
138
- for (const name of names) {
139
- const reason = unsafeTreeReason(join(path, name));
140
- if (reason) return reason;
1220
+ names = readdirSync(join3(root, dir));
1221
+ } catch {
1222
+ return [];
141
1223
  }
142
- return void 0;
1224
+ return names.sort().flatMap((name) => {
1225
+ const rel = dir ? `${dir}/${name}` : name;
1226
+ if (rel === ".git" || rel === "node_modules" || rel === BACKUP_ROOT) return [];
1227
+ const stat = lstatSync2(join3(root, rel));
1228
+ if (stat.isSymbolicLink()) return [];
1229
+ return stat.isDirectory() ? walk(root, rel) : [rel];
1230
+ });
143
1231
  }
144
- function moveFsItem(from, to) {
145
- mkdirSync(dirname(to), { recursive: true });
1232
+ var readJson = (root, path) => {
146
1233
  try {
147
- renameSync(from, to);
148
- } catch (err) {
149
- if (err.code !== "EXDEV") throw err;
150
- cpSync(from, to, { recursive: true, force: false, errorOnExist: true });
151
- rmSync(from, { recursive: true, force: false });
1234
+ return JSON.parse(readFileSync3(join3(root, path), "utf8"));
1235
+ } catch {
1236
+ return null;
1237
+ }
1238
+ };
1239
+ function detectLegacy(dir) {
1240
+ const root = resolve2(dir);
1241
+ const signals = [];
1242
+ const manifest = readJson(root, "docs/.joycraft/manifest.json");
1243
+ const state = readJson(root, "docs/.joycraft/state.json") ?? readJson(root, ".claude/.joycraft/state.json");
1244
+ if (manifest) signals.push("docs/.joycraft/manifest.json");
1245
+ if (state) signals.push("0.7 state.json");
1246
+ if (existsSync3(join3(root, ".claude/hooks/joycraft-version-check.mjs"))) signals.push(".claude/hooks/joycraft-version-check.mjs");
1247
+ for (const tree of [".claude", ".agents", ".pi", ".github", ".omp"]) {
1248
+ for (const name of LEGACY_ONLY_SKILLS) if (existsSync3(join3(root, tree, "skills", `joycraft-${name}`))) {
1249
+ signals.push(`${tree}/skills (0.7 skills)`);
1250
+ break;
1251
+ }
152
1252
  }
1253
+ if (!signals.length) return null;
1254
+ const hosts = (manifest?.harnesses ?? state?.harnesses ?? ["claude"]).map((name) => name === "github-copilot" ? "copilot" : name).filter((name) => ["claude", "codex", "pi", "omp", "copilot", "opencode"].includes(name));
1255
+ return { version: manifest?.targetVersion ?? state?.version ?? null, hosts: hosts.length ? hosts : ["claude"], signals: [...new Set(signals)] };
1256
+ }
1257
+ function isKnown(path, bytes, manifest, state) {
1258
+ if (bookkeeping.test(path)) return true;
1259
+ const hash = sha256(bytes);
1260
+ if (knownHashes().files[path]?.includes(hash)) return true;
1261
+ if (manifest?.files?.[path]?.vendorHash === hash) return true;
1262
+ const recorded = state?.files?.[path];
1263
+ return typeof recorded === "string" && recorded.length >= 12 && hash.startsWith(recorded);
153
1264
  }
154
- function replaceMove(from, to, move) {
155
- const displaced = `${to}.joycraft-migration-${randomUUID()}`;
156
- let movedAside = false;
157
- if (existsSync(to)) {
158
- renameSync(to, displaced);
159
- movedAside = true;
1265
+ function migratedSettings(text) {
1266
+ const settings = JSON.parse(text);
1267
+ let versionHookRemoved = 0;
1268
+ let safeguardResolved = 0;
1269
+ for (const [event, groups] of Object.entries(settings.hooks ?? {})) {
1270
+ if (!Array.isArray(groups)) continue;
1271
+ settings.hooks[event] = groups.map((group) => ({
1272
+ ...group,
1273
+ hooks: (group.hooks ?? []).filter((hook) => {
1274
+ const drop = typeof hook?.command === "string" && hook.command.includes("joycraft-version-check.mjs");
1275
+ if (drop) versionHookRemoved += 1;
1276
+ return !drop;
1277
+ }).map((hook) => {
1278
+ const match = typeof hook?.command === "string" && /^(?:\.\/)?(\.claude\/hooks\/joycraft\/[\w.-]+)$/.exec(hook.command.trim());
1279
+ if (!match) return hook;
1280
+ safeguardResolved += 1;
1281
+ return { ...hook, command: `"$CLAUDE_PROJECT_DIR"/${match[1]}` };
1282
+ })
1283
+ })).filter((group) => group.hooks.length);
1284
+ if (!settings.hooks[event].length) delete settings.hooks[event];
160
1285
  }
161
- try {
162
- move(from, to);
163
- } catch (error) {
164
- if (movedAside && existsSync(displaced)) {
165
- if (existsSync(to)) {
166
- throw new Error(`${String(error)}; original destination retained at '${displaced}', interrupted move content retained at '${to}'.`);
167
- }
168
- try {
169
- renameSync(displaced, to);
170
- } catch (restoreError) {
171
- throw new Error(`${error instanceof Error ? error.message : String(error)}; original destination retained at '${displaced}' (${String(restoreError)}).`);
172
- }
173
- }
174
- throw error;
1286
+ return { text: `${JSON.stringify(settings, null, 2)}
1287
+ `, versionHookRemoved, safeguardResolved };
1288
+ }
1289
+ function planLegacy(dir, hosts) {
1290
+ const root = resolve2(dir);
1291
+ const legacy = detectLegacy(root);
1292
+ if (!legacy) throw new Error("No Joycraft 0.7 install found");
1293
+ const manifest = readJson(root, "docs/.joycraft/manifest.json");
1294
+ const state = readJson(root, "docs/.joycraft/state.json") ?? readJson(root, ".claude/.joycraft/state.json");
1295
+ const archive = [];
1296
+ const customized = [];
1297
+ for (const path of walk(root)) {
1298
+ if (!ownedRoots.some((pattern) => pattern.test(path))) continue;
1299
+ (isKnown(path, readFileSync3(join3(root, path)), manifest, state) ? archive : customized).push(path);
175
1300
  }
176
- if (movedAside) {
1301
+ const kept = walk(root).filter((path) => KEPT.some((entry) => entry.endsWith("/") ? path.startsWith(entry) : path === entry));
1302
+ const settingsText = existsSync3(join3(root, ".claude/settings.json")) ? readFileSync3(join3(root, ".claude/settings.json"), "utf8") : null;
1303
+ let settings = null;
1304
+ if (settingsText) {
177
1305
  try {
178
- rmSync(displaced, { recursive: true, force: false });
179
- } catch (error) {
180
- throw new Error(`Move applied; previous destination backup remains at '${displaced}': ${String(error)}`);
1306
+ const next = migratedSettings(settingsText);
1307
+ if (next.versionHookRemoved || next.safeguardResolved) settings = { versionHookRemoved: next.versionHookRemoved, safeguardResolved: next.safeguardResolved };
1308
+ } catch {
1309
+ throw new Error(".claude/settings.json is not valid JSON; fix it before migrating");
181
1310
  }
182
1311
  }
1312
+ const install2 = planInstall(root, hosts?.length ? hosts : legacy.hosts);
1313
+ const moving = new Set(archive.concat(customized));
1314
+ install2.actions = install2.actions.map((action) => action.kind === "conflict" && moving.has(action.path) ? { kind: "add", path: action.path } : action);
1315
+ return { legacy, archive, customized, kept, install: install2, settings };
1316
+ }
1317
+ function formatLegacyPlan(plan, nextStep = true) {
1318
+ const lines = [
1319
+ `Joycraft ${plan.legacy.version ?? "0.7"} found (${plan.legacy.signals.join(", ")}). Nothing has changed.`,
1320
+ "",
1321
+ `Archive to ${BACKUP_ROOT}/ (untouched 0.7 files): ${plan.archive.length}`,
1322
+ `Customized 0.7 files (you choose keep or archive; never lost): ${plan.customized.length}`,
1323
+ ...plan.customized.map((path) => ` ${path}`),
1324
+ `Kept as they are: ${plan.kept.length} (AGENTS.md, CLAUDE.md, docs/context/, docs/features/, your safeguard and settings)`,
1325
+ ...plan.settings ? [`.claude/settings.json: remove ${plan.settings.versionHookRemoved} 0.7 version-check hook(s); resolve ${plan.settings.safeguardResolved} safeguard path(s) from the project root`] : [],
1326
+ `Install 1.0: ${formatPlan(plan.install).split("\n").slice(1).join(" ").trim()}`
1327
+ ];
1328
+ if (nextStep) {
1329
+ lines.push(
1330
+ "",
1331
+ "Choose one:",
1332
+ " Migrate: npx joycraft@latest update --migrate (add --keep-custom or --archive-custom to skip the questions)",
1333
+ ` Stay: ${STAY_COMMAND}`,
1334
+ ` Read: ${GUIDE_URL}`
1335
+ );
1336
+ }
1337
+ return lines.join("\n");
183
1338
  }
184
- function emptyResult() {
185
- return { status: "complete", applied: 0, skipped: 0, replaced: [], preserved: [], errors: [] };
186
- }
187
- function applyMigration(plan, options = {}) {
188
- const root = resolve(plan.projectDir ?? inferProjectDir(plan));
189
- const result = emptyResult();
190
- const replacements = options.replaceCollisions ?? [];
191
- const mover = options.move ?? moveFsItem;
192
- const allMoves = [...plan.moves, ...plan.skipped ?? []];
193
- for (const move of plan.preserved ?? []) {
194
- result.skipped++;
195
- result.preserved.push(move.from);
196
- }
197
- const seen = /* @__PURE__ */ new Set();
198
- for (const move of allMoves) {
199
- const key = `${move.from}\0${move.to}`;
200
- if (seen.has(key)) continue;
201
- seen.add(key);
1339
+ function move(root, from, to) {
1340
+ mkdirSync2(dirname3(inside2(root, to)), { recursive: true });
1341
+ renameSync2(inside2(root, from), inside2(root, to));
1342
+ }
1343
+ function pruneEmpty(root, path, stop = /* @__PURE__ */ new Set([".claude", ".agents", ".pi", ".github", ".omp", ".codex", "docs", ".joycraft"])) {
1344
+ for (let dir = dirname3(path); dir !== "." && !stop.has(dir); dir = dirname3(dir)) {
202
1345
  try {
203
- inspectPath(root, move.from, false);
204
- inspectPath(root, move.to, true);
205
- const unsafeSource = unsafeTreeReason(move.from);
206
- const unsafeDestination = existsSync(move.to) ? unsafeTreeReason(move.to) : void 0;
207
- if (unsafeSource || unsafeDestination) throw new Error(unsafeSource ?? unsafeDestination);
208
- const collides = existsSync(move.to);
209
- if (collides && !selectedCollision(root, move, replacements)) {
210
- result.skipped++;
211
- result.preserved.push(move.to);
212
- continue;
213
- }
214
- if (collides) {
215
- replaceMove(move.from, move.to, mover);
216
- result.replaced.push(move.to);
217
- } else {
218
- mover(move.from, move.to);
219
- }
220
- result.applied++;
221
- } catch (error) {
222
- result.errors.push({ move, error: error instanceof Error ? error.message : String(error) });
1346
+ rmdirSync(inside2(root, dir));
1347
+ } catch {
1348
+ return;
223
1349
  }
224
1350
  }
225
- result.status = result.errors.length > 0 ? "incomplete" : "complete";
226
- return result;
227
- }
228
- function inferProjectDir(plan) {
229
- const first = plan.moves[0] ?? plan.skipped?.[0];
230
- if (!first) return process.cwd();
231
- const marker = join("docs", "");
232
- const index = first.from.lastIndexOf(marker);
233
- return index >= 0 ? first.from.slice(0, index) : dirname(first.from);
234
- }
235
- function selectedPlan(root, raw, includeUnknown) {
236
- const selections = Array.isArray(includeUnknown) ? includeUnknown : [];
237
- const unknownCandidates = [...raw.moves, ...raw.skipped ?? []].filter((move) => move.kind === "bugfix-dir");
238
- const acceptedUnknown = unknownCandidates.filter((move) => includeUnknown === true || selectedCollision(root, move, selections));
239
- const unknown = unknownCandidates.filter((move) => !acceptedUnknown.includes(move));
240
- const moves = [...raw.moves.filter((move) => move.kind !== "bugfix-dir"), ...acceptedUnknown];
241
- const skipped = [...(raw.skipped ?? []).filter((move) => move.kind !== "bugfix-dir")];
242
- return { ...raw, moves, skipped, preserved: [...raw.preserved ?? [], ...unknown] };
243
- }
244
- function runMigration(projectDir, options = {}) {
245
- const root = resolve(projectDir);
246
- const plan = selectedPlan(root, planMigration(root), options.includeUnknown);
247
- if (options.dryRun) return { ...emptyResult(), skipped: (plan.skipped?.length ?? 0) + (plan.preserved?.length ?? 0), preserved: [...(plan.skipped ?? []).map((move) => move.to), ...(plan.preserved ?? []).map((move) => move.from)], plan };
248
- return { ...applyMigration(plan, options), plan };
249
- }
250
- function formatMigrationPlan(plan) {
251
- const root = plan.projectDir ?? inferProjectDir(plan);
252
- const lines = ["Joycraft migration plan:"];
253
- if (plan.moves.length === 0 && !plan.skipped?.length && !plan.preserved?.length) lines.push(" No migration candidates found.");
254
- for (const move of plan.moves) lines.push(` ${relativePath(root, move.from)} \u2192 ${relativePath(root, move.to)}`);
255
- for (const move of plan.skipped ?? []) lines.push(` Preserve collision: ${relativePath(root, move.to)} (source: ${relativePath(root, move.from)})`);
256
- for (const move of plan.preserved ?? []) lines.push(` Preserve unowned document: ${relativePath(root, move.from)} (candidate: ${relativePath(root, move.to)})`);
257
- return lines.join("\n");
258
1351
  }
259
- function formatMigrationOutcome(result, json = false, includePlan = true) {
260
- if (json) return JSON.stringify({ status: result.status, exitCode: result.status === "complete" ? 0 : 1, applied: result.applied, skipped: result.skipped, replaced: result.replaced, preserved: result.preserved, errors: result.errors, plan: result.plan });
261
- const lines = [...includePlan ? [formatMigrationPlan(result.plan)] : [], `Migration ${result.status}.`];
262
- if (result.applied) lines.push(` Applied: ${result.applied}`);
263
- if (result.skipped) lines.push(` Preserved collisions: ${result.skipped}`);
264
- for (const entry of result.errors) lines.push(` \u26A0 ${entry.error}`);
265
- return lines.join("\n");
1352
+ function migrateLegacy(plan, { keep = [], stamp: stamp2 = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-") } = {}) {
1353
+ const root = plan.install.root;
1354
+ if (existsSync3(join3(root, MIGRATE_JOURNAL))) throw new Error("An interrupted migration is pending; run `joycraft update --recover` first");
1355
+ const install2 = new Set(plan.install.actions.map((action) => action.path));
1356
+ const keptCustom = plan.customized.filter((path) => keep.includes(path) && !install2.has(path));
1357
+ const moves = [...plan.archive, ...plan.customized.filter((path) => !keptCustom.includes(path))].map((path) => ({ from: path, to: join3(BACKUP_ROOT, `migrate-${stamp2}`, "archive", path) }));
1358
+ const backup = join3(BACKUP_ROOT, `migrate-${stamp2}`);
1359
+ const settingsBackup = plan.settings ? join3(backup, "files", ".claude/settings.json") : null;
1360
+ mkdirSync2(inside2(root, backup), { recursive: true });
1361
+ writeFileSync2(join3(root, backup, ".gitignore"), "*\n");
1362
+ mkdirSync2(dirname3(join3(root, MIGRATE_JOURNAL)), { recursive: true });
1363
+ writeFileSync2(join3(root, MIGRATE_JOURNAL), `${JSON.stringify({ schemaVersion: 1, backup, moves, settingsBackup }, null, 2)}
1364
+ `);
1365
+ if (settingsBackup) {
1366
+ const original = readFileSync3(join3(root, ".claude/settings.json"), "utf8");
1367
+ mkdirSync2(dirname3(join3(root, settingsBackup)), { recursive: true });
1368
+ writeFileSync2(join3(root, settingsBackup), original);
1369
+ writeFileSync2(join3(root, ".claude/settings.json"), migratedSettings(original).text);
1370
+ }
1371
+ for (const { from, to } of moves) {
1372
+ move(root, from, to);
1373
+ pruneEmpty(root, from);
1374
+ }
1375
+ const fresh = planInstall(root, plan.install.hosts);
1376
+ const result = applyInstall(fresh, { backupName: `migrate-${stamp2}/install` });
1377
+ writeFileSync2(join3(root, backup, MIGRATION_RECORD), `${JSON.stringify({
1378
+ schemaVersion: 1,
1379
+ from: plan.legacy.version,
1380
+ to: fresh.to,
1381
+ moves,
1382
+ settingsBackup,
1383
+ installBackup: result.backup,
1384
+ created: result.written.filter((path) => !fresh.actions.some((action) => action.path === path && action.kind !== "add"))
1385
+ }, null, 2)}
1386
+ `);
1387
+ rmSync2(join3(root, MIGRATE_JOURNAL));
1388
+ return { backup, archived: moves.map((item) => item.from), keptCustom, install: result };
1389
+ }
1390
+ function recoverLegacy(dir) {
1391
+ const root = resolve2(dir);
1392
+ if (!existsSync3(join3(root, MIGRATE_JOURNAL))) return false;
1393
+ recoverInstall(root);
1394
+ const journal = JSON.parse(readFileSync3(join3(root, MIGRATE_JOURNAL), "utf8"));
1395
+ for (const { from, to } of journal.moves) if (existsSync3(inside2(root, to)) && !existsSync3(inside2(root, from))) move(root, to, from);
1396
+ if (journal.settingsBackup && existsSync3(inside2(root, journal.settingsBackup))) copyFileSync2(inside2(root, journal.settingsBackup), join3(root, ".claude/settings.json"));
1397
+ rmSync2(join3(root, MIGRATE_JOURNAL));
1398
+ pruneEmpty(root, MIGRATE_JOURNAL, /* @__PURE__ */ new Set());
1399
+ return true;
266
1400
  }
267
1401
 
268
- // src/cli.ts
269
- var __dirname = dirname2(fileURLToPath(import.meta.url));
270
- var pkg = JSON.parse(readFileSync(join2(__dirname, "..", "package.json"), "utf-8"));
271
- var GITIGNORE_OPTION_DESC = `Gitignore profile: 'shared' (commit skills) or 'private' (gitignore ${PRIVATE_DIRS_DISPLAY})`;
272
- var program = new Command();
273
- program.name("joycraft").description("Scaffold and upgrade AI development harnesses").version(pkg.version, "-v, --version");
274
- program.command("update").description("Safely install or update Joycraft in a project").argument("[dir]", "Target directory", ".").option("--harnesses <list>", "Harnesses to install (comma or space separated)").option("--yes", "Apply safe updates without prompting").option("--non-interactive", "Never prompt; apply safe actions only").option("--replace-customized <paths...>", "Explicitly replace these customized paths").option("--repair <paths...>", "Explicitly restore these missing managed files").option("--gitignore <profile>", GITIGNORE_OPTION_DESC).option("--json", "Print a structured JSON outcome").option("--recover", "Recover the interrupted update transaction").option("--rollback", "Rollback the last successful update").option("--preview", "Show planned changes without applying them").option("--auto-safe", "Require local opt-in and verified automatic-update safety").action(async (dir, opts) => {
275
- const { update, formatUpdateOutcome } = await import("./update-LYHS4FBH.js");
276
- try {
277
- let verifiedArtifact;
278
- if (opts.autoSafe) {
279
- if (opts.recover || opts.rollback || opts.repair?.length || opts.replaceCustomized?.length || opts.gitignore || opts.harnesses) {
280
- throw new Error("Automatic updates cannot include recovery, configuration, or customization choices.");
281
- }
282
- const { readUpdatePolicy } = await import("./update-check-YT765NE7.js");
283
- if (readUpdatePolicy(dir) !== "auto-safe") throw new Error("Automatic updates require the explicitly configured local auto-safe policy.");
284
- const { readInstallationManifestInfo } = await import("./install-manifest-EQHT4474.js");
285
- const authorities = ["shared", "private"].map((profile) => readInstallationManifestInfo(dir, profile));
286
- if (authorities.filter((info) => info.status !== "missing").length !== 1 || !authorities.some((info) => info.status === "valid")) {
287
- throw new Error("Automatic updates require one valid existing installation manifest; run an explicit update first.");
288
- }
289
- const { resolveExactRelease } = await import("./release-resolver-P2H46QTU.js");
290
- const { fetchVerifiedReleaseArtifact } = await import("./release-artifact-4TL5L2ZY.js");
291
- const resolution = await resolveExactRelease({ version: pkg.version });
292
- if (!resolution.ok) throw new Error(resolution.error);
293
- verifiedArtifact = await fetchVerifiedReleaseArtifact(resolution.release);
1402
+ // src/rollback.ts
1403
+ import { copyFileSync as copyFileSync3, existsSync as existsSync4, mkdirSync as mkdirSync3, readdirSync as readdirSync2, readFileSync as readFileSync4, rmdirSync as rmdirSync2, rmSync as rmSync3, statSync } from "fs";
1404
+ import { dirname as dirname4, join as join4, relative, resolve as resolve3, sep as sep3 } from "path";
1405
+ function inside3(root, path) {
1406
+ const full = resolve3(root, path);
1407
+ if (full !== root && !full.startsWith(root + sep3)) throw new Error(`Path escapes the project: ${path}`);
1408
+ return full;
1409
+ }
1410
+ function filesUnder(root, dir) {
1411
+ const full = inside3(root, dir);
1412
+ if (!existsSync4(full)) return [];
1413
+ return readdirSync2(full).flatMap((name) => {
1414
+ const path = join4(dir, name);
1415
+ return statSync(inside3(root, path)).isDirectory() ? filesUnder(root, path) : [path];
1416
+ });
1417
+ }
1418
+ function listMigrations(dir) {
1419
+ const root = resolve3(dir);
1420
+ const base = join4(root, BACKUP_ROOT);
1421
+ if (!existsSync4(base)) return [];
1422
+ return readdirSync2(base).filter((name) => name.startsWith("migrate-") && existsSync4(join4(base, name, MIGRATION_RECORD))).sort();
1423
+ }
1424
+ function planRollback(dir, stamp2, { force = false } = {}) {
1425
+ const root = resolve3(dir);
1426
+ const all = listMigrations(root);
1427
+ const name = stamp2 ? all.find((item) => item === stamp2 || item === `migrate-${stamp2}`) : all.at(-1);
1428
+ if (!name) throw new Error(stamp2 ? `No migration backup ${stamp2} in ${BACKUP_ROOT}/` : `No migration backup in ${BACKUP_ROOT}/`);
1429
+ const backup = join4(BACKUP_ROOT, name);
1430
+ const record = JSON.parse(readFileSync4(join4(root, backup, MIGRATION_RECORD), "utf8"));
1431
+ const restore = [];
1432
+ const blocked = [];
1433
+ const remove = [];
1434
+ const edited = [];
1435
+ const manifest = readManifest(root);
1436
+ for (const file of manifest?.files ?? []) {
1437
+ const full = inside3(root, file.path);
1438
+ if (!existsSync4(full)) continue;
1439
+ if (sha256(readFileSync4(full)) === file.sha256 || force) remove.push(file.path);
1440
+ else edited.push(file.path);
1441
+ }
1442
+ if (manifest) remove.push(MANIFEST_PATH);
1443
+ const removing = new Set(remove);
1444
+ for (const { from } of record.moves) {
1445
+ if (existsSync4(inside3(root, from)) && !removing.has(from)) blocked.push(from);
1446
+ else restore.push(from);
1447
+ }
1448
+ return { root, backup, restore, remove, edited, blocked };
1449
+ }
1450
+ function formatRollback(plan) {
1451
+ return [
1452
+ `Roll back to before ${plan.backup}:`,
1453
+ ` restore ${plan.restore.length} 0.7 file(s) \xB7 remove ${plan.remove.length} 1.0 file(s)`,
1454
+ ...plan.edited.map((path) => ` kept, edited after the migration (use --force to remove): ${path}`),
1455
+ ...plan.blocked.map((path) => ` not restored, a file is already there: ${path}`),
1456
+ ` The backup stays in ${plan.backup}.`
1457
+ ].join("\n");
1458
+ }
1459
+ function prune(root, path) {
1460
+ for (let dir = dirname4(path); dir !== "."; dir = dirname4(dir)) {
1461
+ try {
1462
+ rmdirSync2(inside3(root, dir));
1463
+ } catch {
1464
+ return;
294
1465
  }
295
- const result = await update(dir, {
296
- harnesses: opts.harnesses,
297
- yes: opts.yes ?? false,
298
- nonInteractive: opts.nonInteractive ?? false,
299
- replaceCustomized: opts.replaceCustomized,
300
- repair: opts.repair,
301
- gitignore: opts.gitignore,
302
- recovery: opts.recover ? "recover" : opts.rollback ? "rollback" : void 0,
303
- preview: opts.preview,
304
- json: opts.json,
305
- automatic: opts.autoSafe,
306
- verifiedArtifact
307
- });
308
- if (opts.preview) {
309
- const actions = result.plan?.actions.map(({ path, kind, selected, reason }) => ({ path, kind, selected, reason })) ?? [];
310
- if (opts.json) console.log(JSON.stringify({ ...JSON.parse(formatUpdateOutcome(result, true)), preview: true, actions }));
311
- else console.log(["Preview only; no files changed.", ...actions.map((action) => `${action.selected ? "Planned" : "Preserved"}: ${action.kind} ${action.path}`), ...result.diagnostics].join("\n"));
312
- } else console.log(formatUpdateOutcome(result, opts.json === true));
313
- process.exitCode = result.exitCode;
314
- } catch (err) {
315
- const message = err instanceof Error ? err.message : String(err);
316
- if (opts.json) console.log(JSON.stringify({ status: "failed", exitCode: 1, applied: [], preserved: [], conflicts: [], diagnostics: [message] }));
317
- else console.error(message);
318
- process.exitCode = 1;
319
1466
  }
320
- });
321
- program.command("init").description("Scaffold the Joycraft harness into the current project").argument("[dir]", "Target directory", ".").option("--force", "Overwrite existing files").option("--harnesses <list>", "Harnesses to install (comma or space separated)").option("--yes", "Apply safe updates without prompting").option("--non-interactive", "Never prompt; apply safe actions only").option("--replace-customized <paths...>", "Explicitly replace these customized paths").option("--gitignore <profile>", GITIGNORE_OPTION_DESC).option("--json", "Print a structured JSON outcome").action(async (dir, opts) => {
322
- const { init, formatInitOutcome } = await import("./init-O2QC5X57.js");
323
- try {
324
- const result = await init(dir, {
325
- force: opts.force ?? false,
326
- harnesses: opts.harnesses,
327
- yes: opts.yes ?? false,
328
- nonInteractive: opts.nonInteractive ?? false,
329
- replaceCustomized: opts.replaceCustomized,
330
- gitignore: opts.gitignore,
331
- json: opts.json
332
- });
333
- if (result) {
334
- console.log(formatInitOutcome(result, opts.json === true));
335
- if (!opts.json && opts.harnesses === void 0 && process.stdin.isTTY !== true) console.log(" Compatibility: init selected all harnesses for this non-interactive run.");
1467
+ }
1468
+ function applyRollback(plan) {
1469
+ const { root } = plan;
1470
+ const record = JSON.parse(readFileSync4(join4(root, plan.backup, MIGRATION_RECORD), "utf8"));
1471
+ for (const path of plan.remove) {
1472
+ rmSync3(inside3(root, path), { force: true });
1473
+ prune(root, path);
1474
+ }
1475
+ if (record.installBackup) {
1476
+ const files = join4(record.installBackup, "files");
1477
+ for (const path of filesUnder(root, files)) {
1478
+ const target = relative(files, path);
1479
+ mkdirSync3(dirname4(inside3(root, target)), { recursive: true });
1480
+ copyFileSync3(inside3(root, path), inside3(root, target));
336
1481
  }
337
- if (result) process.exitCode = result.exitCode;
338
- } catch (err) {
339
- const message = err instanceof Error ? err.message : String(err);
340
- if (opts.json) console.log(JSON.stringify({ status: "failed", exitCode: 1, applied: [], preserved: [], conflicts: [], diagnostics: [message] }));
341
- else console.error(message);
342
- process.exitCode = 1;
343
1482
  }
344
- });
345
- program.command("upgrade").description("Upgrade installed Joycraft templates and skills to latest").argument("[dir]", "Target directory", ".").option("--yes", "Apply safe updates and preserve customizations without prompting").option("--non-interactive", "Never prompt; apply safe actions only").option("--harnesses <list>", "Harnesses to update (comma or space separated)").option("--replace-customized <paths...>", "Explicitly replace these customized paths").option("--gitignore <profile>", GITIGNORE_OPTION_DESC).option("--json", "Print a structured JSON outcome").action(async (dir, opts) => {
346
- const { upgrade } = await import("./upgrade-GMP6JQ52.js");
347
- try {
348
- const result = await upgrade(dir, { yes: opts.yes ?? false, nonInteractive: opts.nonInteractive ?? false, harnesses: opts.harnesses, replaceCustomized: opts.replaceCustomized, gitignore: opts.gitignore, json: opts.json });
349
- if (!opts.json) {
350
- const { formatUpdateOutcome } = await import("./update-LYHS4FBH.js");
351
- console.log(formatUpdateOutcome(result, false));
352
- } else {
353
- const { formatUpdateOutcome } = await import("./update-LYHS4FBH.js");
354
- console.log(formatUpdateOutcome(result, true));
1483
+ if (record.settingsBackup) copyFileSync3(inside3(root, record.settingsBackup), join4(root, ".claude/settings.json"));
1484
+ const restoring = new Set(plan.restore);
1485
+ for (const { from, to } of record.moves) {
1486
+ if (!restoring.has(from) || !existsSync4(inside3(root, to))) continue;
1487
+ mkdirSync3(dirname4(inside3(root, from)), { recursive: true });
1488
+ copyFileSync3(inside3(root, to), inside3(root, from));
1489
+ }
1490
+ for (const dir of [".joycraft/local", ".joycraft"]) {
1491
+ try {
1492
+ rmdirSync2(join4(root, dir));
1493
+ } catch {
355
1494
  }
356
- process.exitCode = result.exitCode;
357
- } catch (err) {
358
- const message = err instanceof Error ? err.message : String(err);
359
- if (opts.json) console.log(JSON.stringify({ status: "failed", exitCode: 1, applied: [], preserved: [], conflicts: [], diagnostics: [message] }));
360
- else console.error(message);
361
- process.exitCode = 1;
362
1495
  }
363
- });
364
- program.command("migrate").description("Preview or explicitly apply the flat-docs to per-feature migration").argument("[dir]", "Target directory", ".").option("--apply", "Apply the displayed migration plan").option("--replace-collision <paths...>", "Replace these existing destination paths explicitly").option("--include-unknown <paths...>", "Explicitly establish ownership for orphan spec directories").option("--json", "Print a structured JSON outcome").action((dir, opts) => {
1496
+ }
1497
+
1498
+ // src/cli.ts
1499
+ var __dirname = dirname5(fileURLToPath2(import.meta.url));
1500
+ var pkg = JSON.parse(readFileSync5(join5(__dirname, "..", "package.json"), "utf-8"));
1501
+ var interactive = () => Boolean(process.stdin.isTTY && process.stdout.isTTY);
1502
+ async function ask(question) {
1503
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
365
1504
  try {
366
- const preview = runMigration(dir, { dryRun: true, includeUnknown: opts.includeUnknown });
367
- if (!opts.apply) {
368
- if (opts.json) console.log(JSON.stringify({ status: "preview", exitCode: 0, plan: preview.plan }));
369
- else console.log(formatMigrationPlan(preview.plan));
1505
+ return (await rl.question(question)).trim();
1506
+ } finally {
1507
+ rl.close();
1508
+ }
1509
+ }
1510
+ async function confirm(question) {
1511
+ return /^y(es)?$/i.test(await ask(`${question} [y/N] `));
1512
+ }
1513
+ function out(json, value, text) {
1514
+ console.log(json ? JSON.stringify(value, null, 2) : text);
1515
+ }
1516
+ async function chooseHosts(root, opts, fallback) {
1517
+ if (opts.harness) return parseHosts(opts.harness);
1518
+ const recorded = recordedHosts(root) ?? fallback;
1519
+ if (recorded?.length) return recorded;
1520
+ const detected = detectHost();
1521
+ const suggestion = detected ?? "claude";
1522
+ if (!interactive() || opts.yes) return [suggestion];
1523
+ console.log(`Hosts: ${HOSTS.map((host) => `${host} (${HOST_LABELS[host]})`).join(", ")}`);
1524
+ const answer = await ask(`Install for which hosts? [${suggestion}] `);
1525
+ return answer ? parseHosts(answer) : [suggestion];
1526
+ }
1527
+ async function approved(opts, text, question) {
1528
+ if (opts.yes) return true;
1529
+ console.log(text);
1530
+ if (!interactive()) {
1531
+ console.log("\nNothing changed. Re-run with --yes to apply.");
1532
+ process.exitCode = 1;
1533
+ return false;
1534
+ }
1535
+ if (await confirm(question)) return true;
1536
+ console.log("Nothing changed.");
1537
+ return false;
1538
+ }
1539
+ async function install(dir, opts, mode) {
1540
+ const root = resolve4(dir);
1541
+ if (opts.recover) {
1542
+ const migrated = recoverLegacy(root);
1543
+ const result2 = migrated ? null : recoverInstall(root);
1544
+ out(
1545
+ opts.json,
1546
+ { recovered: migrated ? "migration" : result2?.restored || result2?.deleted ? "update" : null },
1547
+ migrated ? "Recovered the interrupted migration; the project is as it was before." : result2 && (result2.restored || result2.deleted) ? `Recovered the interrupted update (${result2.restored} restored, ${result2.deleted} removed).` : "Nothing to recover."
1548
+ );
1549
+ return;
1550
+ }
1551
+ const legacy = detectLegacy(root);
1552
+ if (legacy) {
1553
+ const hosts2 = opts.harness ? parseHosts(opts.harness) : legacy.hosts;
1554
+ const plan2 = planLegacy(root, hosts2);
1555
+ if (opts.plan || !opts.migrate) {
1556
+ out(
1557
+ opts.json,
1558
+ { legacy: plan2.legacy, archive: plan2.archive, customized: plan2.customized, kept: plan2.kept, settings: plan2.settings, install: plan2.install.actions },
1559
+ formatLegacyPlan(plan2, !opts.migrate)
1560
+ );
1561
+ if (!opts.migrate) process.exitCode = 1;
370
1562
  return;
371
1563
  }
372
- if (!opts.json) console.log(formatMigrationPlan(preview.plan));
373
- const applied = applyMigration(preview.plan, { replaceCollisions: opts.replaceCollision });
374
- const result = { ...applied, plan: preview.plan };
375
- console.log(formatMigrationOutcome(result, opts.json === true, false));
376
- process.exitCode = result.status === "complete" ? 0 : 1;
377
- } catch (err) {
378
- const message = err instanceof Error ? err.message : String(err);
379
- if (opts.json) console.log(JSON.stringify({ status: "incomplete", exitCode: 1, applied: 0, skipped: 0, replaced: [], preserved: [], errors: [message] }));
380
- else console.error(message);
1564
+ let keep = [];
1565
+ if (plan2.customized.length) {
1566
+ if (opts.keepCustom) keep = plan2.customized;
1567
+ else if (!opts.archiveCustom) {
1568
+ if (!interactive()) {
1569
+ console.log(formatLegacyPlan(plan2, false));
1570
+ console.log("\nNothing changed. Add --keep-custom or --archive-custom to decide the customized files.");
1571
+ process.exitCode = 1;
1572
+ return;
1573
+ }
1574
+ for (const path of plan2.customized) if (/^k/i.test(await ask(`Customized ${path}: keep it in place or archive it? [k/A] `))) keep.push(path);
1575
+ }
1576
+ }
1577
+ if (!await approved(opts, formatLegacyPlan(plan2, false), "Migrate to Joycraft 1.0?")) return;
1578
+ const result2 = migrateLegacy(plan2, { keep });
1579
+ out(opts.json, result2, [
1580
+ `Migrated to Joycraft ${plan2.install.to.joycraft}. ${result2.archived.length} 0.7 file(s) archived in ${result2.backup}/.`,
1581
+ ...result2.keptCustom.length ? [`Kept in place: ${result2.keptCustom.join(", ")}`] : [],
1582
+ `Undo with: npx joycraft@latest rollback`
1583
+ ].join("\n"));
1584
+ return;
1585
+ }
1586
+ const installed = readManifest(root);
1587
+ if (mode === "update" && !installed) {
1588
+ console.log("Joycraft is not installed here. Install it with: npx joycraft@latest init");
381
1589
  process.exitCode = 1;
1590
+ return;
382
1591
  }
383
- });
384
- program.command("telemetry").description("Scan AI-harness transcripts into knowledge-layer read telemetry").argument("[dir]", "Target directory", ".").action(async (dir) => {
385
- const { runTelemetryScan, formatTelemetrySummary } = await import("./telemetry-store-IBO5GRTA.js");
386
- const { resolve: resolve2 } = await import("path");
387
- try {
388
- const result = await runTelemetryScan(resolve2(dir));
389
- console.log(formatTelemetrySummary(result));
390
- } catch (err) {
391
- console.error(err instanceof Error ? err.message : String(err));
392
- process.exit(1);
1592
+ const hosts = await chooseHosts(root, opts);
1593
+ const plan = planInstall(root, hosts);
1594
+ if (opts.plan) {
1595
+ out(opts.json, plan, formatPlan(plan));
1596
+ return;
393
1597
  }
394
- });
395
- program.command("check").description("Check for a newer Joycraft release using local cached state").argument("[dir]", "Target directory", ".").option("--json", "Print a structured JSON result").option("--explicit", "Bypass local acknowledgement and postponement").option("--session <id>", "Reuse one conversation identity for update notices").action(async (dir, opts) => {
396
- const { resolve: resolve2 } = await import("path");
397
- const { acknowledgeUpdate, checkForUpdate, resolveCheckSessionId } = await import("./update-check-YT765NE7.js");
1598
+ if (!plan.actions.some((action) => action.kind !== "conflict") && !plan.gitignore.length) {
1599
+ out(opts.json, { status: "noop", exitCode: 0, version: plan.to.joycraft, hosts, plan }, `Joycraft ${plan.to.joycraft} is up to date for ${hosts.join(", ")}.`);
1600
+ return;
1601
+ }
1602
+ if (!await approved(opts, formatPlan(plan), installed ? "Update Joycraft?" : "Install Joycraft?")) return;
1603
+ const result = applyInstall(plan);
1604
+ out(opts.json, { status: "applied", exitCode: 0, version: plan.to.joycraft, hosts, ...result }, [
1605
+ `${installed ? "Updated" : "Installed"} Joycraft ${plan.to.joycraft} for ${hosts.join(", ")}: ${result.written.length} written, ${result.removed.length} removed.`,
1606
+ ...result.backup ? [`Previous files are in ${result.backup}/.`] : [],
1607
+ ...result.conflicts.map((path) => `Kept your file (not installed): ${path}`),
1608
+ ...installed ? [] : ["Next: open your coding agent here and say what you want to build. Joycraft sets up the rest."]
1609
+ ].join("\n"));
1610
+ }
1611
+ var program = new Command();
1612
+ program.name("joycraft").description("Install and update Joycraft in a project").version(pkg.version, "-v, --version");
1613
+ var installCommand = (name, description) => program.command(name).description(description).argument("[dir]", "Project directory", ".").option("--harness <list>", `Hosts to install for (${HOSTS.join(", ")}), comma or space separated`).option("--yes", "Apply without asking").option("--plan", "Show what would change and exit; writes nothing").option("--json", "Print machine-readable output").option("--migrate", "Migrate a Joycraft 0.7 install to 1.0").option("--keep-custom", "Migration: keep customized 0.7 files in place").option("--archive-custom", "Migration: archive customized 0.7 files with the rest").option("--recover", "Undo an interrupted update or migration").action(async (dir, opts) => {
398
1614
  try {
399
- const root = resolve2(dir);
400
- const session = resolveCheckSessionId(opts.session);
401
- const result = await checkForUpdate(root, { explicit: opts.explicit === true, sessionId: session });
402
- if (opts.json) console.log(JSON.stringify(result));
403
- else if (result.display && result.availableVersion) {
404
- console.log(`Joycraft ${result.availableVersion} available (you have ${result.installedVersion ?? "unknown"}). Run: npx joycraft@${result.availableVersion} update`);
405
- acknowledgeUpdate(root, { release: result.availableVersion, session });
406
- }
407
- } catch {
1615
+ await install(dir, opts, name);
1616
+ } catch (error) {
1617
+ console.error(`Error: ${error.message}`);
1618
+ process.exitCode = 1;
408
1619
  }
409
1620
  });
410
- program.command("init-autofix").description("Set up the Level 5 auto-fix loop with holdout scenarios").argument("[dir]", "Target directory", ".").option("--scenarios-repo <name>", "Name for scenarios repo").option("--app-id <id>", "GitHub App ID for Joycraft Autofix").option("--force", "Overwrite existing workflow files").option("--dry-run", "Show what would be created without creating it").action(async (dir, opts) => {
411
- const { initAutofix } = await import("./init-autofix-2DMBO4QN.js");
412
- await initAutofix(dir, opts);
413
- });
414
- program.command("check-version").description("Check if a newer version of Joycraft is available").action(async () => {
1621
+ installCommand("init", "Install Joycraft into a project");
1622
+ installCommand("update", "Update Joycraft, or migrate a 0.7 install with --migrate");
1623
+ program.command("rollback").description("Undo a 0.7 \u2192 1.0 migration from its backup").argument("[backup]", "Backup folder name or timestamp (default: the latest migration)").option("--dir <dir>", "Project directory", ".").option("--yes", "Apply the rollback").option("--force", "Also remove 1.0 files edited after the migration").action((backup, opts) => {
415
1624
  try {
416
- const { acknowledgeUpdate, checkForUpdate, resolveCheckSessionId } = await import("./update-check-YT765NE7.js");
417
- const root = process.cwd();
418
- const session = resolveCheckSessionId();
419
- const result = await checkForUpdate(root, { explicit: true, sessionId: session });
420
- if (result.display && result.availableVersion) {
421
- console.log(`Joycraft ${result.availableVersion} available (you have ${result.installedVersion ?? "unknown"}). Run: npx joycraft@${result.availableVersion} update`);
422
- acknowledgeUpdate(root, { release: result.availableVersion, session });
1625
+ const plan = planRollback(opts.dir, backup, { force: opts.force });
1626
+ console.log(formatRollback(plan));
1627
+ if (!opts.yes) {
1628
+ console.log("\nNothing changed. Re-run with --yes to roll back.");
1629
+ return;
423
1630
  }
424
- } catch {
1631
+ applyRollback(plan);
1632
+ console.log("Rolled back.");
1633
+ } catch (error) {
1634
+ console.error(`Error: ${error.message}`);
1635
+ process.exitCode = 1;
425
1636
  }
426
1637
  });
1638
+ program.command("doctor").description("Check the Joycraft install against its manifest").argument("[dir]", "Project directory", ".").option("--json", "Print machine-readable output").action((dir, opts) => {
1639
+ const result = doctor(dir);
1640
+ out(opts.json, result, !result.installed ? "Joycraft is not installed here." : [
1641
+ `Joycraft ${result.tag}: ${result.ok ? "ok" : "needs attention"}`,
1642
+ ...result.missing.map((path) => ` missing: ${path}`),
1643
+ ...result.edited.map((path) => ` edited: ${path}`)
1644
+ ].join("\n"));
1645
+ if (!result.ok) process.exitCode = 1;
1646
+ });
427
1647
  if (process.argv.length <= 2) {
428
1648
  program.outputHelp();
429
1649
  process.exit(0);