@adobe/data-ai 0.10.22 → 0.10.23

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adobe-data-ai",
3
- "version": "0.10.22",
3
+ "version": "0.10.23",
4
4
  "description": "Architecture skills for @adobe/data — data-oriented modelling, archetype iteration, hot-path performance, and related conventions.",
5
5
  "author": {
6
6
  "name": "Adobe"
package/README.md CHANGED
@@ -55,6 +55,14 @@ self-update**, editing your `package.json` and `.gitignore` to:
55
55
  scripts, so a `postinstall` shipped inside the package would silently not fire;
56
56
  3. gitignore the managed bundle folders.
57
57
 
58
+ Each managed folder also gets a short "externally managed — do not edit" notice so
59
+ an agent that opens it is warned before touching the regenerated files. The notice
60
+ follows your repo's instruction convention: it is written as `AGENTS.md` by default
61
+ (the cross-agent standard, which Claude Code also reads) and only as `CLAUDE.md` for a
62
+ repo that is still CLAUDE.md-only. `install` never drops a `CLAUDE.md` into a repo that
63
+ uses `AGENTS.md` — a stray `CLAUDE.md` anywhere makes Claude Code ignore every
64
+ `AGENTS.md` project-wide.
65
+
58
66
  The copied files are regenerated artifacts — never committed, never edited in
59
67
  place. The wiring is idempotent, so re-running is harmless; with `--global` or in a
60
68
  directory with no `package.json`, `install` just copies (no wiring).
package/bin/cli.mjs CHANGED
@@ -41,10 +41,13 @@ const { name: PKG_NAME, version: VERSION } = pkg;
41
41
  // each agent root.
42
42
  const BUNDLE = "adobe-data-ai";
43
43
 
44
- // A do-not-edit notice dropped at each bundle root. Claude Code loads nested
45
- // CLAUDE.md files when working in a subtree, so an agent that opens one of these
46
- // folders sees the notice before touching anything. `extra` adds a pointer to
47
- // the companion bundle.
44
+ // A do-not-edit notice dropped at each bundle root so an agent that opens one of
45
+ // these managed folders sees it before touching anything. The file is named for the
46
+ // project's instruction convention (see `noticeFilename`) — never unconditionally
47
+ // `CLAUDE.md`: Claude Code treats any CLAUDE.md in the tree as switching the whole
48
+ // project into CLAUDE.md mode and then ignores every AGENTS.md project-wide (observed
49
+ // on Claude Code 2.1.286), which would silently blank out instructions in an
50
+ // AGENTS.md-based repo. `extra` adds a pointer to the companion bundle.
48
51
  function notice(extra) {
49
52
  return `# Externally managed — do not edit
50
53
 
@@ -58,11 +61,23 @@ version, then reinstall — do not modify these files in place.
58
61
  ${extra ? `\n${extra}\n` : ""}`;
59
62
  }
60
63
 
61
- function writeMeta(bundleDir, noticeBody, extraMeta) {
62
- writeFileSync(join(bundleDir, "CLAUDE.md"), noticeBody);
64
+ // Choose the managed notice's filename from the project's instruction convention.
65
+ // Preference is AGENTS.md (the cross-agent standard, which Claude Code also reads); we
66
+ // fall back to CLAUDE.md only for a repo still on the CLAUDE.md convention (a root
67
+ // CLAUDE.md and no AGENTS.md), so the notice keeps auto-loading there. An AGENTS.md
68
+ // repo (and a greenfield one) therefore never receives a data-ai CLAUDE.md — a stray
69
+ // CLAUDE.md anywhere flips Claude Code out of AGENTS.md mode for the whole project.
70
+ function noticeFilename(base) {
71
+ const hasClaude = existsSync(join(base, "CLAUDE.md"));
72
+ const hasAgents = existsSync(join(base, "AGENTS.md"));
73
+ return hasClaude && !hasAgents ? "CLAUDE.md" : "AGENTS.md";
74
+ }
75
+
76
+ function writeMeta(bundleDir, noticeBody, extraMeta, noticeFile) {
77
+ writeFileSync(join(bundleDir, noticeFile), noticeBody);
63
78
  writeFileSync(
64
79
  join(bundleDir, ".data-ai.json"),
65
- JSON.stringify({ package: PKG_NAME, version: VERSION, ...extraMeta }, null, 2) + "\n",
80
+ JSON.stringify({ package: PKG_NAME, version: VERSION, notice: noticeFile, ...extraMeta }, null, 2) + "\n",
66
81
  );
67
82
  }
68
83
 
@@ -107,6 +122,7 @@ function installSkills(base, skills) {
107
122
  bundleDir,
108
123
  notice("The architecture rules these skills follow are installed at\n`.claude/rules/adobe-data-ai/` (referenced by name from each SKILL.md)."),
109
124
  { skills },
125
+ noticeFilename(base),
110
126
  );
111
127
  return bundleDir;
112
128
  }
@@ -118,7 +134,7 @@ function installRules(base) {
118
134
  // Copy the whole rules tree, minus the top-level README.md meta doc.
119
135
  const readme = join(rulesSrc, "README.md");
120
136
  cpSync(rulesSrc, bundleDir, { recursive: true, filter: (src) => src !== readme });
121
- writeMeta(bundleDir, notice(), { rules: countRules(rulesSrc) });
137
+ writeMeta(bundleDir, notice(), { rules: countRules(rulesSrc) }, noticeFilename(base));
122
138
  return bundleDir;
123
139
  }
124
140
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/data-ai",
3
- "version": "0.10.22",
3
+ "version": "0.10.23",
4
4
  "description": "Cross-agent architecture skills for @adobe/data — installable as a Claude Code plugin or copied into any Agent-Skills-compatible agent (Cursor, Codex).",
5
5
  "type": "module",
6
6
  "private": false,
@@ -29,12 +29,12 @@
29
29
  "skills"
30
30
  ],
31
31
  "peerDependencies": {
32
- "@adobe/data": "0.10.22"
32
+ "@adobe/data": "0.10.23"
33
33
  },
34
34
  "devDependencies": {
35
35
  "typescript": "^5.8.3",
36
36
  "vitest": "^1.6.0",
37
- "@adobe/data": "0.10.22"
37
+ "@adobe/data": "0.10.23"
38
38
  },
39
39
  "license": "MIT",
40
40
  "scripts": {