diff --git a/package.json b/package.json index d95022a1..3c5fbe1b 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "dev-gpu": "pnpm --parallel --filter @adobe/data --filter @adobe/data-gpu --filter data-gpu-samples run dev", "link": "pnpm -r --filter @adobe/data* run link", "publish": "sh -c 'for x in \"$@\"; do OTP=\"$x\"; done; export NPM_CONFIG_OTP=\"$OTP\"; pnpm -r --filter @adobe/data --filter @adobe/data-ai --filter @adobe/data-react --filter @adobe/data-lit --filter @adobe/data-solid --filter @adobe/data-gpu run publish-public' sh", - "bump": "pnpm version patch --no-git-tag-version && V=$(node -p \"require('$PWD/package.json').version\") && pnpm -r exec pnpm version $V --no-git-tag-version --allow-same-version", + "bump": "pnpm version patch --no-git-tag-version && V=$(node -p \"require('$PWD/package.json').version\") && pnpm -r exec pnpm version $V --no-git-tag-version --allow-same-version && node -e \"const fs=require('fs');const p='packages/data-ai/.claude-plugin/plugin.json';const j=JSON.parse(fs.readFileSync(p,'utf8'));j.version=process.argv[1];fs.writeFileSync(p,JSON.stringify(j,null,2)+'\\n')\" $V", "release": "pnpm bump && pnpm publish", "bp": "pnpm bump && pnpm run publish" }, diff --git a/packages/data-ai/.claude-plugin/plugin.json b/packages/data-ai/.claude-plugin/plugin.json index 4da64cc3..9e87fdcb 100644 --- a/packages/data-ai/.claude-plugin/plugin.json +++ b/packages/data-ai/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "adobe-data-ai", - "version": "0.9.75", + "version": "0.9.83", "description": "Architecture skills for @adobe/data — data-oriented modelling, archetype iteration, hot-path performance, and related conventions.", "author": { "name": "Adobe" diff --git a/packages/data-ai/bin/cli.mjs b/packages/data-ai/bin/cli.mjs index 071ebb41..c182daf1 100644 --- a/packages/data-ai/bin/cli.mjs +++ b/packages/data-ai/bin/cli.mjs @@ -36,6 +36,20 @@ const { name: PKG_NAME, version: VERSION } = pkg; // Namespaced bundle folder — the whole directory belongs to this package. const BUNDLE = "adobe-data-ai"; +// Written into the bundle root on every install. Claude Code loads nested +// CLAUDE.md files when working in a subtree, so an agent that opens a skill +// here sees the do-not-edit notice before touching it. +const CLAUDE_MD = `# Externally managed — do not edit + +The skills in this folder are installed and managed by the \`@adobe/data-ai\` +package. This entire directory is **deleted and rebuilt** on every +\`npx @adobe/data-ai install\`, so any local edit here is silently discarded +on the next reinstall or version upgrade. + +To change a skill, edit it upstream in the \`@adobe/data-ai\` package and +publish a new version, then reinstall — do not modify these files in place. +`; + function discoverSkills() { if (!existsSync(skillsSrc)) return []; return readdirSync(skillsSrc, { withFileTypes: true }) @@ -51,6 +65,7 @@ function installTo(bundleDir, skills) { for (const name of skills) { cpSync(join(skillsSrc, name), join(bundleDir, name), { recursive: true }); } + writeFileSync(join(bundleDir, "CLAUDE.md"), CLAUDE_MD); writeFileSync( join(bundleDir, ".data-ai.json"), JSON.stringify({ package: PKG_NAME, version: VERSION, skills }, null, 2) + "\n",