joycraft 0.7.4 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -1
- package/dist/chunk-Q7TCWFTF.js +133 -0
- package/dist/chunk-Q7TCWFTF.js.map +1 -0
- package/dist/{chunk-IKP7PRXH.js → chunk-W3EFZZ5L.js} +348 -42
- package/dist/chunk-W3EFZZ5L.js.map +1 -0
- package/dist/cli.js +5 -5
- package/dist/cli.js.map +1 -1
- package/dist/{init-ATLPMPFW.js → init-UI7EPVCX.js} +18 -8
- package/dist/init-UI7EPVCX.js.map +1 -0
- package/dist/{init-autofix-G2VVAAS6.js → init-autofix-VIKKRWFX.js} +2 -2
- package/dist/{upgrade-KYDEI3S6.js → upgrade-GN4ZTBKT.js} +35 -7
- package/dist/upgrade-GN4ZTBKT.js.map +1 -0
- package/package.json +3 -2
- package/dist/chunk-EBOHEHSG.js +0 -44
- package/dist/chunk-EBOHEHSG.js.map +0 -1
- package/dist/chunk-IKP7PRXH.js.map +0 -1
- package/dist/init-ATLPMPFW.js.map +0 -1
- package/dist/upgrade-KYDEI3S6.js.map +0 -1
- /package/dist/{init-autofix-G2VVAAS6.js.map → init-autofix-VIKKRWFX.js.map} +0 -0
package/README.md
CHANGED
|
@@ -126,6 +126,15 @@ What this does to an existing setup:
|
|
|
126
126
|
specs, confidence anchors, and optimize v2 with the Reaper. The gates you'll
|
|
127
127
|
feel first: decompose blocks on open decisions, and invented spec premises
|
|
128
128
|
stop at a human review before any spec file is written.
|
|
129
|
+
- **Gates get succinct (0.7.6).** Every approval bookend (brief, design,
|
|
130
|
+
decompose, research, decide, plus the tune and optimize reports) renders an
|
|
131
|
+
auto-opened HTML artifact and caps its chat message at ~10 fixed slots — the
|
|
132
|
+
markdown stays the canonical record agents read. Handoffs become fenced,
|
|
133
|
+
copy-pasteable briefing prompts. `upgrade` adds an `## Execution Profile`
|
|
134
|
+
section to AGENTS.md (swarm opt-in + per-harness model/effort) that flows
|
|
135
|
+
into those briefings. And a stale CLI now re-runs itself through
|
|
136
|
+
`npx joycraft@<latest>` instead of telling you to update separately —
|
|
137
|
+
upgrade is one command again.
|
|
129
138
|
|
|
130
139
|
**Or let your agent drive it.** Paste this prompt into Claude Code, Codex, Pi,
|
|
131
140
|
or GitHub Copilot inside your project and it will run the upgrade, show you
|
|
@@ -166,7 +175,7 @@ npx joycraft init
|
|
|
166
175
|
|
|
167
176
|
- **AGENTS.md** with behavioral boundaries (Always / Ask First / Never) and correct build/test/lint commands — the single shared instruction file when more than one tool is selected
|
|
168
177
|
- **CLAUDE.md** — on a multi-tool install this is [Anthropic's documented import pattern](https://code.claude.com/docs/en/memory): `@AGENTS.md` plus a `## Claude Code` section for Claude-specific additions, so every tool reads one source and nothing drifts. A Claude-only install gets the classic full CLAUDE.md instead
|
|
169
|
-
- **
|
|
178
|
+
- **22 skills** installed to the selected harnesses — `.claude/skills/` (Claude Code), `.agents/skills/` (Codex), `.pi/skills/` (Pi), and/or `.github/skills/` (GitHub Copilot) — see [Which skill do I need?](#which-skill-do-i-need) below
|
|
170
179
|
- **Pi pipeline runtime** in `.pi/scripts/joycraft/` (when Pi is selected) — the headless spec-execution driver and its helpers
|
|
171
180
|
- **Agent teams enabled** — when Claude Code is selected, `init` sets `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` in `.claude/settings.json` so subagent-driven skills like `/joycraft-research` work out of the box (idempotent — it never clobbers a value you already set)
|
|
172
181
|
- **docs/** structure: `docs/context/` is created up front; feature work lands in `docs/features/<slug>/{brief.md, research.md, design.md, specs/}` and deferred work in `docs/backlog/` — these are created lazily by the skills that write to them. Joycraft's own upgrade state lives hidden at `docs/.joycraft/state.json` (harness-neutral, gitignored — never committed)
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/execution-profile.ts
|
|
4
|
+
import { createInterface } from "readline";
|
|
5
|
+
var EXECUTION_PROFILE_OPEN = "<!-- joycraft:execution-profile -->";
|
|
6
|
+
var EXECUTION_PROFILE_CLOSE = "<!-- /joycraft:execution-profile -->";
|
|
7
|
+
var EXECUTION_PROFILE_HEADING = "## Execution Profile";
|
|
8
|
+
var SESSION_DEFAULT = "session default";
|
|
9
|
+
function defaultExecutionProfile(harnesses) {
|
|
10
|
+
return {
|
|
11
|
+
entries: harnesses.map((harness) => ({
|
|
12
|
+
harness,
|
|
13
|
+
swarmDecompose: false,
|
|
14
|
+
swarmImplement: false,
|
|
15
|
+
model: SESSION_DEFAULT,
|
|
16
|
+
effort: SESSION_DEFAULT
|
|
17
|
+
}))
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function yn(value) {
|
|
21
|
+
return value ? "yes" : "no";
|
|
22
|
+
}
|
|
23
|
+
function hasExecutionProfile(content) {
|
|
24
|
+
return content.includes(EXECUTION_PROFILE_OPEN);
|
|
25
|
+
}
|
|
26
|
+
function renderExecutionProfileSection(profile) {
|
|
27
|
+
const lines = [EXECUTION_PROFILE_HEADING, "", EXECUTION_PROFILE_OPEN];
|
|
28
|
+
for (const e of profile.entries) {
|
|
29
|
+
lines.push(
|
|
30
|
+
`- ${e.harness}: Swarms: decompose ${yn(e.swarmDecompose)} \xB7 implement ${yn(e.swarmImplement)} \xB7 model ${e.model} \xB7 effort ${e.effort}`
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
lines.push(EXECUTION_PROFILE_CLOSE);
|
|
34
|
+
return lines.join("\n");
|
|
35
|
+
}
|
|
36
|
+
function ensureExecutionProfileSection(existing, profile) {
|
|
37
|
+
if (!profile || hasExecutionProfile(existing)) return existing;
|
|
38
|
+
return existing.trimEnd() + "\n\n" + renderExecutionProfileSection(profile) + "\n";
|
|
39
|
+
}
|
|
40
|
+
function ask(question) {
|
|
41
|
+
return new Promise((resolve) => {
|
|
42
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
43
|
+
let settled = false;
|
|
44
|
+
const done = (value) => {
|
|
45
|
+
if (settled) return;
|
|
46
|
+
settled = true;
|
|
47
|
+
rl.close();
|
|
48
|
+
resolve(value);
|
|
49
|
+
};
|
|
50
|
+
rl.once("close", () => done(""));
|
|
51
|
+
try {
|
|
52
|
+
rl.question(question, (answer) => done(answer.trim()));
|
|
53
|
+
} catch {
|
|
54
|
+
done("");
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
async function askYesNo(question) {
|
|
59
|
+
for (let attempt = 0; attempt < 5; attempt++) {
|
|
60
|
+
const answer = (await ask(`${question} [y/N]: `)).toLowerCase();
|
|
61
|
+
if (answer === "" || answer === "n" || answer === "no") return false;
|
|
62
|
+
if (answer === "y" || answer === "yes") return true;
|
|
63
|
+
console.log("Please answer 'y' or 'n'.");
|
|
64
|
+
}
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
async function promptExecutionProfileInteractive(harnesses) {
|
|
68
|
+
console.log("\nExecution profile \u2014 how should agents run on this project?");
|
|
69
|
+
console.log(" (Recorded in AGENTS.md as data. Press Enter to accept the default.)");
|
|
70
|
+
const entries = [];
|
|
71
|
+
for (const harness of harnesses) {
|
|
72
|
+
console.log(`
|
|
73
|
+
${harness}:`);
|
|
74
|
+
const swarmDecompose = await askYesNo(" Use swarms for decompose?");
|
|
75
|
+
const swarmImplement = await askYesNo(" Use swarms for implement?");
|
|
76
|
+
const model = await ask(` Model (${SESSION_DEFAULT}): `) || SESSION_DEFAULT;
|
|
77
|
+
const effort = await ask(` Effort (${SESSION_DEFAULT}): `) || SESSION_DEFAULT;
|
|
78
|
+
entries.push({ harness, swarmDecompose, swarmImplement, model, effort });
|
|
79
|
+
}
|
|
80
|
+
return { entries };
|
|
81
|
+
}
|
|
82
|
+
async function resolveExecutionProfile(harnesses, interactive) {
|
|
83
|
+
if (harnesses.length === 0) return { entries: [] };
|
|
84
|
+
if (interactive) return promptExecutionProfileInteractive(harnesses);
|
|
85
|
+
return defaultExecutionProfile(harnesses);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// src/gitattributes.ts
|
|
89
|
+
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
90
|
+
import { join } from "path";
|
|
91
|
+
var GITATTRIBUTES_COMMENT = "# Joycraft: collapse generated workflow docs in PR review (expand with one click)";
|
|
92
|
+
var GITATTRIBUTES_ENTRIES = [
|
|
93
|
+
"docs/features/** linguist-generated=true",
|
|
94
|
+
"docs/bugfixes/** linguist-generated=true",
|
|
95
|
+
"docs/discoveries/** linguist-generated=true",
|
|
96
|
+
"docs/templates/** linguist-generated=true"
|
|
97
|
+
];
|
|
98
|
+
function applyGitattributes(targetDir) {
|
|
99
|
+
const gitattributesPath = join(targetDir, ".gitattributes");
|
|
100
|
+
const current = existsSync(gitattributesPath) ? readFileSync(gitattributesPath, "utf-8") : "";
|
|
101
|
+
const present = new Set(current.split("\n").map((l) => l.trim()));
|
|
102
|
+
const missing = GITATTRIBUTES_ENTRIES.filter((e) => !present.has(e.trim()));
|
|
103
|
+
if (missing.length === 0) return [];
|
|
104
|
+
const lines = present.has(GITATTRIBUTES_COMMENT) ? missing : [GITATTRIBUTES_COMMENT, ...missing];
|
|
105
|
+
const sep = current.length > 0 && !current.endsWith("\n") ? "\n" : "";
|
|
106
|
+
writeFileSync(gitattributesPath, current + sep + lines.join("\n") + "\n", "utf-8");
|
|
107
|
+
return missing;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// src/package-version.ts
|
|
111
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
112
|
+
import { fileURLToPath } from "url";
|
|
113
|
+
import { dirname, join as join2 } from "path";
|
|
114
|
+
var __dirname = dirname(fileURLToPath(import.meta.url));
|
|
115
|
+
function getPackageVersion() {
|
|
116
|
+
const pkgPath = join2(__dirname, "..", "package.json");
|
|
117
|
+
const raw = readFileSync2(pkgPath, "utf-8");
|
|
118
|
+
const pkg = JSON.parse(raw);
|
|
119
|
+
if (typeof pkg.version !== "string" || pkg.version.length === 0) {
|
|
120
|
+
throw new Error(`Joycraft package.json at ${pkgPath} is missing a version field`);
|
|
121
|
+
}
|
|
122
|
+
return pkg.version;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export {
|
|
126
|
+
defaultExecutionProfile,
|
|
127
|
+
renderExecutionProfileSection,
|
|
128
|
+
ensureExecutionProfileSection,
|
|
129
|
+
resolveExecutionProfile,
|
|
130
|
+
applyGitattributes,
|
|
131
|
+
getPackageVersion
|
|
132
|
+
};
|
|
133
|
+
//# sourceMappingURL=chunk-Q7TCWFTF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/execution-profile.ts","../src/gitattributes.ts","../src/package-version.ts"],"sourcesContent":["import { createInterface } from 'node:readline';\nimport type { Harness } from './harness.js';\n\n/**\n * The per-project **Execution Profile** (decision D6 of the succinct-gates\n * feature): which harness agents may fan out into swarms, and which model +\n * effort those agents should run at.\n *\n * It lives in exactly one home — a sentinel-delimited `## Execution Profile`\n * section in AGENTS.md. No state.json mirror: the profile is team-shared data\n * the human owns and hand-edits, and two homes for one fact violate ONE_HOME.\n *\n * It is **data only**. Nothing here recommends a model, ranks tiers, or routes\n * a stage to an agent — opinionated defaults stay in the backlogged\n * model-tiering feature (`docs/backlog/2026-07-20-model-tiering.md`, D7).\n * That is also why model and effort are free text: model names age faster than\n * Joycraft releases, so an enum here would be wrong within a minor version.\n */\n\n/** Opening sentinel — the only machine contract; everything inside is user-owned. */\nexport const EXECUTION_PROFILE_OPEN = '<!-- joycraft:execution-profile -->';\n/** Closing sentinel. */\nexport const EXECUTION_PROFILE_CLOSE = '<!-- /joycraft:execution-profile -->';\n\n/** The markdown heading the section is written under. */\nexport const EXECUTION_PROFILE_HEADING = '## Execution Profile';\n\n/**\n * The value written for model/effort when nobody was asked (non-interactive\n * init). Deliberately not a model name — it tells downstream skills \"use\n * whatever the session is already running\", which is the only answer that\n * can't go stale.\n */\nexport const SESSION_DEFAULT = 'session default';\n\nexport interface ExecutionProfileEntry {\n harness: Harness;\n /** Fan out to a swarm of subagents during `/joycraft-decompose`? */\n swarmDecompose: boolean;\n /** Fan out to a swarm of subagents during `/joycraft-implement`? */\n swarmImplement: boolean;\n /** Free-text model name, or SESSION_DEFAULT. Never validated against a list. */\n model: string;\n /** Free-text reasoning effort, or SESSION_DEFAULT. */\n effort: string;\n}\n\nexport interface ExecutionProfile {\n entries: ExecutionProfileEntry[];\n}\n\n/**\n * The profile written when nobody could be asked: skipping is first-class, so\n * the section is still written — with explicit \"no\" answers — rather than being\n * omitted. Downstream skills then read an explicit answer, never an absence.\n */\nexport function defaultExecutionProfile(harnesses: readonly Harness[]): ExecutionProfile {\n return {\n entries: harnesses.map((harness) => ({\n harness,\n swarmDecompose: false,\n swarmImplement: false,\n model: SESSION_DEFAULT,\n effort: SESSION_DEFAULT,\n })),\n };\n}\n\nfunction yn(value: boolean): string {\n return value ? 'yes' : 'no';\n}\n\n/** True when the document already carries a profile region (matched on the sentinel, not the heading). */\nexport function hasExecutionProfile(content: string): boolean {\n return content.includes(EXECUTION_PROFILE_OPEN);\n}\n\n/**\n * Render the section. One line per selected harness, so a single-harness\n * project never sees rows it didn't ask for.\n */\nexport function renderExecutionProfileSection(profile: ExecutionProfile): string {\n const lines: string[] = [EXECUTION_PROFILE_HEADING, '', EXECUTION_PROFILE_OPEN];\n for (const e of profile.entries) {\n lines.push(\n `- ${e.harness}: Swarms: decompose ${yn(e.swarmDecompose)} · implement ${yn(e.swarmImplement)} · model ${e.model} · effort ${e.effort}`\n );\n }\n lines.push(EXECUTION_PROFILE_CLOSE);\n return lines.join('\\n');\n}\n\n/**\n * Insert the section into an existing document when absent; return the document\n * untouched when a profile is already there. The sentinels make the region\n * opaque — a hand-edit inside them (even a malformed one) is preserved verbatim,\n * because the content is the user's data, not our schema (D7).\n */\nexport function ensureExecutionProfileSection(\n existing: string,\n profile: ExecutionProfile | undefined\n): string {\n if (!profile || hasExecutionProfile(existing)) return existing;\n return existing.trimEnd() + '\\n\\n' + renderExecutionProfileSection(profile) + '\\n';\n}\n\n/**\n * Ask one question, following the one-interface-per-prompt idiom the rest of\n * the CLI uses (`harness.ts`, `gitignore.ts`): open readline, ask, close.\n *\n * EOF matters more here than for those one-shot prompts, because this\n * interview asks several questions in a row: a stdin that runs out mid-way\n * (piped input, a redirect, Ctrl-D) must degrade every remaining question to\n * its stated default rather than hang or throw. Configuration questions never\n * abort an init.\n */\nfunction ask(question: string): Promise<string> {\n return new Promise((resolve) => {\n const rl = createInterface({ input: process.stdin, output: process.stdout });\n let settled = false;\n const done = (value: string): void => {\n if (settled) return;\n settled = true;\n rl.close();\n resolve(value);\n };\n rl.once('close', () => done(''));\n try {\n rl.question(question, (answer) => done(answer.trim()));\n } catch {\n done('');\n }\n });\n}\n\nasync function askYesNo(question: string): Promise<boolean> {\n for (let attempt = 0; attempt < 5; attempt++) {\n const answer = (await ask(`${question} [y/N]: `)).toLowerCase();\n if (answer === '' || answer === 'n' || answer === 'no') return false;\n if (answer === 'y' || answer === 'yes') return true;\n console.log(\"Please answer 'y' or 'n'.\");\n }\n // Repeated unparseable input (or a closed stream): take the default rather\n // than looping forever.\n return false;\n}\n\n/**\n * Interactive capture, one small block per selected harness. Follows the\n * harness-selection idiom in `harness.ts`: same readline interface, empty\n * answer means the stated default, unrecognized input re-asks.\n */\nasync function promptExecutionProfileInteractive(\n harnesses: readonly Harness[]\n): Promise<ExecutionProfile> {\n console.log('\\nExecution profile — how should agents run on this project?');\n console.log(' (Recorded in AGENTS.md as data. Press Enter to accept the default.)');\n const entries: ExecutionProfileEntry[] = [];\n for (const harness of harnesses) {\n console.log(`\\n ${harness}:`);\n const swarmDecompose = await askYesNo(' Use swarms for decompose?');\n const swarmImplement = await askYesNo(' Use swarms for implement?');\n const model = (await ask(` Model (${SESSION_DEFAULT}): `)) || SESSION_DEFAULT;\n const effort = (await ask(` Effort (${SESSION_DEFAULT}): `)) || SESSION_DEFAULT;\n entries.push({ harness, swarmDecompose, swarmImplement, model, effort });\n }\n return { entries };\n}\n\n/**\n * Resolve the profile for an init run:\n * - interactive (TTY): ask per selected harness\n * - non-interactive: the explicit-no default — never blocks a scripted run\n */\nexport async function resolveExecutionProfile(\n harnesses: readonly Harness[],\n interactive: boolean\n): Promise<ExecutionProfile> {\n if (harnesses.length === 0) return { entries: [] };\n if (interactive) return promptExecutionProfileInteractive(harnesses);\n return defaultExecutionProfile(harnesses);\n}\n","import { existsSync, readFileSync, writeFileSync } from 'node:fs';\nimport { join } from 'node:path';\n\n/**\n * Paths Joycraft marks `linguist-generated=true` so GitHub collapses them in\n * PR review and drops them from diff stats. These are workflow exhaust —\n * briefs, specs, discoveries, installed templates — historical artifacts by\n * the time a PR is opened (the spec was reviewed conversationally when it was\n * written). Reviewers can still expand any of them with one click.\n *\n * Deliberately NOT listed (durable knowledge that deserves review eyes):\n * CLAUDE.md, AGENTS.md, docs/context/ (steers every future agent run), and\n * docs/backlog/ (human-authored idea capture).\n */\nexport const GITATTRIBUTES_COMMENT =\n '# Joycraft: collapse generated workflow docs in PR review (expand with one click)';\n\nexport const GITATTRIBUTES_ENTRIES = [\n 'docs/features/** linguist-generated=true',\n 'docs/bugfixes/** linguist-generated=true',\n 'docs/discoveries/** linguist-generated=true',\n 'docs/templates/** linguist-generated=true',\n];\n\n/**\n * Append-only, create-if-absent, idempotent .gitattributes writer — the same\n * contract as ensureGitignoreEntries: never rewrites, reorders, or removes\n * existing lines; only appends entries not already present (matched exactly,\n * after trimming). The comment header is only added when at least one entry\n * is missing, so a fully-applied file is never touched. Returns the entries\n * actually added (empty when everything was already present).\n */\nexport function applyGitattributes(targetDir: string): string[] {\n const gitattributesPath = join(targetDir, '.gitattributes');\n const current = existsSync(gitattributesPath) ? readFileSync(gitattributesPath, 'utf-8') : '';\n const present = new Set(current.split('\\n').map((l) => l.trim()));\n const missing = GITATTRIBUTES_ENTRIES.filter((e) => !present.has(e.trim()));\n if (missing.length === 0) return [];\n\n const lines = present.has(GITATTRIBUTES_COMMENT) ? missing : [GITATTRIBUTES_COMMENT, ...missing];\n const sep = current.length > 0 && !current.endsWith('\\n') ? '\\n' : '';\n writeFileSync(gitattributesPath, current + sep + lines.join('\\n') + '\\n', 'utf-8');\n return missing;\n}\n","import { readFileSync } from 'node:fs';\nimport { fileURLToPath } from 'node:url';\nimport { dirname, join } from 'node:path';\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nexport function getPackageVersion(): string {\n const pkgPath = join(__dirname, '..', 'package.json');\n const raw = readFileSync(pkgPath, 'utf-8');\n const pkg = JSON.parse(raw) as { version?: unknown };\n if (typeof pkg.version !== 'string' || pkg.version.length === 0) {\n throw new Error(`Joycraft package.json at ${pkgPath} is missing a version field`);\n }\n return pkg.version;\n}\n"],"mappings":";;;AAAA,SAAS,uBAAuB;AAoBzB,IAAM,yBAAyB;AAE/B,IAAM,0BAA0B;AAGhC,IAAM,4BAA4B;AAQlC,IAAM,kBAAkB;AAuBxB,SAAS,wBAAwB,WAAiD;AACvF,SAAO;AAAA,IACL,SAAS,UAAU,IAAI,CAAC,aAAa;AAAA,MACnC;AAAA,MACA,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB,OAAO;AAAA,MACP,QAAQ;AAAA,IACV,EAAE;AAAA,EACJ;AACF;AAEA,SAAS,GAAG,OAAwB;AAClC,SAAO,QAAQ,QAAQ;AACzB;AAGO,SAAS,oBAAoB,SAA0B;AAC5D,SAAO,QAAQ,SAAS,sBAAsB;AAChD;AAMO,SAAS,8BAA8B,SAAmC;AAC/E,QAAM,QAAkB,CAAC,2BAA2B,IAAI,sBAAsB;AAC9E,aAAW,KAAK,QAAQ,SAAS;AAC/B,UAAM;AAAA,MACJ,KAAK,EAAE,OAAO,uBAAuB,GAAG,EAAE,cAAc,CAAC,mBAAgB,GAAG,EAAE,cAAc,CAAC,eAAY,EAAE,KAAK,gBAAa,EAAE,MAAM;AAAA,IACvI;AAAA,EACF;AACA,QAAM,KAAK,uBAAuB;AAClC,SAAO,MAAM,KAAK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