dme-agent 7.4.2 → 9.69.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/install.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * DME bootstrap installer — detect-only by default, AGENTS.md conflict prompts.
3
+ * v9.69 — full skill set, 9.69 asset names with fallbacks.
3
4
  */
4
5
 
5
6
  import fs from "node:fs";
@@ -26,9 +27,15 @@ import { agentsConflictPromptInline, multiSelect, printScanTable } from "./tui.m
26
27
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
27
28
  const PKG_ROOT = path.resolve(__dirname, "..");
28
29
  const ASSETS = path.join(PKG_ROOT, "assets");
29
- const VERSION = "7.4.2";
30
- const MARKER_BEGIN = "<!-- DME-AGENT-7.4 BEGIN -->";
31
- const MARKER_END = "<!-- DME-AGENT-7.4 END -->";
30
+ const VERSION = "9.69.1";
31
+ const VERSION_SHORT = "9.69";
32
+ const MARKER_BEGIN = "<!-- DME-AGENT-9.69 BEGIN -->";
33
+ const MARKER_END = "<!-- DME-AGENT-9.69 END -->";
34
+ /** Also strip/recognize older installs */
35
+ const LEGACY_MARKERS = [
36
+ { begin: "<!-- DME-AGENT-7.4 BEGIN -->", end: "<!-- DME-AGENT-7.4 END -->" },
37
+ { begin: "<!-- DME-AGENT-9.69 BEGIN -->", end: "<!-- DME-AGENT-9.69 END -->" },
38
+ ];
32
39
 
33
40
  const SKILL_NAMES = [
34
41
  "dme-design",
@@ -38,6 +45,10 @@ const SKILL_NAMES = [
38
45
  "dme-dashboard",
39
46
  "dme-landing",
40
47
  "dme-ux",
48
+ "dme-motion",
49
+ "dme-icons",
50
+ "dme-app-shell",
51
+ "dme-welcome",
41
52
  ];
42
53
 
43
54
  function ensureDir(dir) {
@@ -50,6 +61,15 @@ function readAsset(...parts) {
50
61
  return fs.readFileSync(p, "utf8");
51
62
  }
52
63
 
64
+ /** Prefer 9.69 filenames, fall back to older names */
65
+ function readAssetPrefer(candidates) {
66
+ for (const parts of candidates) {
67
+ const content = readAsset(...parts);
68
+ if (content) return content;
69
+ }
70
+ return null;
71
+ }
72
+
53
73
  function escapeRe(s) {
54
74
  return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
55
75
  }
@@ -67,13 +87,21 @@ function mergeBlock(filePath, content) {
67
87
  fs.writeFileSync(filePath, block, "utf8");
68
88
  return "created";
69
89
  }
70
- const existing = fs.readFileSync(filePath, "utf8");
71
- const re = new RegExp(
90
+ let existing = fs.readFileSync(filePath, "utf8");
91
+ // strip any known DME marker blocks first
92
+ for (const { begin, end } of LEGACY_MARKERS) {
93
+ const re = new RegExp(
94
+ `${escapeRe(begin)}[\\s\\S]*?${escapeRe(end)}\\n?`,
95
+ "m"
96
+ );
97
+ existing = existing.replace(re, "");
98
+ }
99
+ const reCurrent = new RegExp(
72
100
  `${escapeRe(MARKER_BEGIN)}[\\s\\S]*?${escapeRe(MARKER_END)}\\n?`,
73
101
  "m"
74
102
  );
75
- if (re.test(existing)) {
76
- fs.writeFileSync(filePath, existing.replace(re, block), "utf8");
103
+ if (reCurrent.test(existing)) {
104
+ fs.writeFileSync(filePath, existing.replace(reCurrent, block), "utf8");
77
105
  return "updated";
78
106
  }
79
107
  fs.writeFileSync(filePath, existing.trimEnd() + "\n\n" + block, "utf8");
@@ -92,17 +120,20 @@ function copySkill(skillName, destRoot) {
92
120
 
93
121
  function systemPrompt() {
94
122
  return (
95
- readAsset("agent", "DME-Agent-v7.4-SYSTEM.md") ||
96
- readAsset("agent", "SYSTEM.md") ||
97
- "# DME 7.4\n"
123
+ readAssetPrefer([
124
+ ["agent", "DME-Agent-v9.69-SYSTEM.md"],
125
+ ["agent", "DME-Agent-v7.4-SYSTEM.md"],
126
+ ["agent", "SYSTEM.md"],
127
+ ]) || `# DME ${VERSION_SHORT}\n`
98
128
  );
99
129
  }
100
130
 
101
131
  function agentsDoctrine() {
102
132
  return (
103
- readAsset("agent", "AGENTS.md") ||
104
- readAsset("agent", "PROMPT-COMPACT.md") ||
105
- systemPrompt()
133
+ readAssetPrefer([
134
+ ["agent", "AGENTS.md"],
135
+ ["agent", "PROMPT-COMPACT.md"],
136
+ ]) || systemPrompt()
106
137
  );
107
138
  }
108
139
 
@@ -112,18 +143,25 @@ function compactPrompt() {
112
143
 
113
144
  function manifesto() {
114
145
  return (
115
- readAsset("manifesto", "DME-Agent-v7.4.md") ||
116
- agentsDoctrine()
146
+ readAssetPrefer([
147
+ ["manifesto", "DME-Agent-v9.69.md"],
148
+ ["manifesto", "DME-Agent-v7.4.md"],
149
+ ]) || agentsDoctrine()
117
150
  );
118
151
  }
119
152
 
120
153
  function agentProfile() {
121
- return readAsset("agent", "dme-v7.4.md") || systemPrompt();
154
+ return (
155
+ readAssetPrefer([
156
+ ["agent", "dme-v9.69.md"],
157
+ ["agent", "dme-v7.4.md"],
158
+ ]) || systemPrompt()
159
+ );
122
160
  }
123
161
 
124
162
  function cursorRule() {
125
163
  return `---
126
- description: DME Agent 7.4.2 — Neominimal Identity Engine. Apply on any UI/UX/frontend work.
164
+ description: DME Agent ${VERSION} — Neominimal Identity Engine. Apply on any UI/UX/frontend work.
127
165
  globs:
128
166
  - "**/*.{tsx,jsx,vue,svelte,css,html}"
129
167
  - "**/components/**"
@@ -159,17 +197,17 @@ async function resolveAgentsPolicy(filePath, opts) {
159
197
  }
160
198
  if (opts.force) return "merge";
161
199
  if (opts.dryRun) return "merge";
162
- if (!fs.existsSync(filePath)) return "overwrite"; // new file — write full doctrine
200
+ if (!fs.existsSync(filePath)) return "overwrite";
163
201
 
164
202
  const existing = fs.readFileSync(filePath, "utf8");
165
- // already only DME? safe to overwrite
166
203
  if (
167
- existing.includes("DME Agent 7.4") &&
168
- existing.includes("Neominimal Identity") &&
204
+ (existing.includes("DME Agent 9.69") ||
205
+ existing.includes("DME Agent 7.4") ||
206
+ existing.includes("Neominimal Identity")) &&
169
207
  existing.length < 12000 &&
170
- !existing.includes(MARKER_BEGIN)
208
+ !existing.includes(MARKER_BEGIN) &&
209
+ !existing.includes("<!-- DME-AGENT-7.4 BEGIN -->")
171
210
  ) {
172
- // might be previous full DME — overwrite with stronger version
173
211
  return "overwrite";
174
212
  }
175
213
 
@@ -203,7 +241,6 @@ async function writeAgentsFile(filePath, doctrine, opts, row) {
203
241
  console.log(warn(`AGENTS overwrite ${filePath}`));
204
242
  return;
205
243
  }
206
- // merge
207
244
  const mode = mergeBlock(filePath, doctrine);
208
245
  row.files.push(`${filePath} (${mode})`);
209
246
  console.log(ok(`AGENTS ${mode.padEnd(9)} ${filePath}`));
@@ -225,14 +262,12 @@ export async function installDme(opts = {}) {
225
262
  const interactive = opts.interactive !== false && process.stdin.isTTY;
226
263
  let targetIds = opts.targets;
227
264
 
228
- // Default = detected only
229
265
  if (!targetIds || targetIds.length === 0) {
230
266
  targetIds = ["detected"];
231
267
  }
232
268
 
233
269
  let targets = resolveInstallTargets(targetIds, { force: opts.force });
234
270
 
235
- // Interactive multi-select among detected
236
271
  if (
237
272
  interactive &&
238
273
  opts.pick !== false &&
@@ -241,10 +276,8 @@ export async function installDme(opts = {}) {
241
276
  ) {
242
277
  const detected = getDetectedTargets();
243
278
  if (detected.length === 0) {
244
- console.log(asciiLogo(VERSION));
245
- console.log(
246
- fail("No AI CLIs detected on this machine.")
247
- );
279
+ console.log(asciiLogo(VERSION_SHORT));
280
+ console.log(fail("No AI CLIs detected on this machine."));
248
281
  console.log(
249
282
  info("Run with --targets all or --targets claude,cursor to force.")
250
283
  );
@@ -285,7 +318,7 @@ export async function installDme(opts = {}) {
285
318
  const profile = agentProfile();
286
319
  const compact = compactPrompt();
287
320
 
288
- console.log(asciiLogo(VERSION));
321
+ console.log(asciiLogo(VERSION_SHORT));
289
322
  console.log(hr());
290
323
  console.log(step(1, total, "Loading DME doctrine…"));
291
324
  if (!doctrine || doctrine.length < 80) {
@@ -313,7 +346,6 @@ export async function installDme(opts = {}) {
313
346
  );
314
347
  const row = { id: t.id, name: t.name, files: [], errors: [] };
315
348
  try {
316
- // skills
317
349
  for (const skillDir of t.skillDirs) {
318
350
  if (opts.dryRun) {
319
351
  row.files.push(`[dry] skills → ${skillDir}`);
@@ -327,7 +359,6 @@ export async function installDme(opts = {}) {
327
359
  console.log(ok(`skills → ${skillDir}`));
328
360
  }
329
361
 
330
- // agent profiles
331
362
  for (const af of t.agentFiles) {
332
363
  if (opts.dryRun) {
333
364
  row.files.push(`[dry] agent → ${af}`);
@@ -341,18 +372,15 @@ export async function installDme(opts = {}) {
341
372
  row.files.push(af);
342
373
  }
343
374
 
344
- // Canonical AGENTS.md for this CLI
345
375
  if (t.agentsMd) {
346
376
  await writeAgentsFile(t.agentsMd, doctrine, opts, row);
347
377
  }
348
378
 
349
- // Other rules files
350
379
  for (const rf of t.rulesFiles) {
351
380
  if (opts.dryRun) {
352
381
  row.files.push(`[dry] rules → ${rf}`);
353
382
  continue;
354
383
  }
355
- // skip if same as agentsMd (already handled)
356
384
  if (t.agentsMd && path.resolve(rf) === path.resolve(t.agentsMd)) {
357
385
  continue;
358
386
  }
@@ -381,13 +409,15 @@ export async function installDme(opts = {}) {
381
409
  row.files.push(rf);
382
410
  }
383
411
 
384
- // manifesto + system in CLI root
385
412
  if (!opts.dryRun && t.root) {
386
413
  try {
387
414
  ensureDir(t.root);
388
- writeRaw(path.join(t.root, "DME-Agent-v7.4.md"), full);
415
+ const manName = "DME-Agent-v9.69.md";
416
+ writeRaw(path.join(t.root, manName), full);
389
417
  writeRaw(path.join(t.root, "DME-SYSTEM.md"), sys);
390
- row.files.push(path.join(t.root, "DME-Agent-v7.4.md"));
418
+ // keep legacy filename for older tooling that looks for 7.4
419
+ writeRaw(path.join(t.root, "DME-Agent-v7.4.md"), full);
420
+ row.files.push(path.join(t.root, manName));
391
421
  } catch {
392
422
  /* ignore */
393
423
  }
@@ -438,11 +468,12 @@ export async function installDme(opts = {}) {
438
468
  console.log(step(5, total, "Next"));
439
469
  console.log(
440
470
  box(
441
- "DME is live",
471
+ "DME 9.69 is live",
442
472
  [
443
473
  "Restart agent sessions (Claude / Cursor / Grok…)",
444
474
  "AGENTS.md is in each CLI’s correct path",
445
- "Skills: /dme-design /dme-dashboard /dme-landing /dme-ux",
475
+ "Skills: design · dashboard · landing · motion · icons",
476
+ "app-shell · welcome · ux · shadcn · research · critique",
446
477
  "dme doctor · dme scan · dme uninstall",
447
478
  ],
448
479
  "green"
@@ -455,7 +486,6 @@ export async function installDme(opts = {}) {
455
486
 
456
487
  async function installProjectLocal({ opts, doctrine, sys, full, compact, targets }) {
457
488
  const cwd = process.cwd();
458
- // Only drop project skill folders for CLIs that were actually installed
459
489
  const skillRoots = new Set();
460
490
  for (const t of targets) {
461
491
  if (t.id === "claude") skillRoots.add(path.join(cwd, ".claude", "skills"));
@@ -464,7 +494,6 @@ async function installProjectLocal({ opts, doctrine, sys, full, compact, targets
464
494
  if (t.id === "codex") skillRoots.add(path.join(cwd, ".codex", "skills"));
465
495
  if (t.id === "zed") skillRoots.add(path.join(cwd, ".agents", "skills"));
466
496
  }
467
- // always allow generic project skills
468
497
  skillRoots.add(path.join(cwd, ".agents", "skills"));
469
498
 
470
499
  if (!opts.dryRun) {
@@ -472,6 +501,7 @@ async function installProjectLocal({ opts, doctrine, sys, full, compact, targets
472
501
  ensureDir(lr);
473
502
  for (const skill of SKILL_NAMES) copySkill(skill, lr);
474
503
  }
504
+ writeRaw(path.join(cwd, ".dme", "DME-Agent-v9.69.md"), full);
475
505
  writeRaw(path.join(cwd, ".dme", "DME-Agent-v7.4.md"), full);
476
506
  writeRaw(path.join(cwd, ".dme", "SYSTEM.md"), sys);
477
507
  writeRaw(path.join(cwd, ".dme", "AGENTS.md"), doctrine);
@@ -487,7 +517,7 @@ async function installProjectLocal({ opts, doctrine, sys, full, compact, targets
487
517
  }
488
518
 
489
519
  export function doctor() {
490
- console.log(asciiLogo(VERSION));
520
+ console.log(asciiLogo(VERSION_SHORT));
491
521
  console.log(step(1, 1, "Scanning DME install health…"));
492
522
  console.log(hr());
493
523
  const report = formatScanReport();
@@ -503,14 +533,20 @@ export function doctor() {
503
533
  }
504
534
  if (t.agentsMd && fs.existsSync(t.agentsMd)) {
505
535
  const txt = fs.readFileSync(t.agentsMd, "utf8");
506
- if (txt.includes("DME") || txt.includes("7.4")) hits.push("agents.md");
536
+ if (txt.includes("DME") || txt.includes("9.69") || txt.includes("7.4"))
537
+ hits.push("agents.md");
507
538
  else hits.push("agents.md(no-dme)");
508
539
  }
509
- const man = path.join(t.root, "DME-Agent-v7.4.md");
510
- if (fs.existsSync(man)) hits.push("manifesto");
540
+ const man969 = path.join(t.root, "DME-Agent-v9.69.md");
541
+ const man74 = path.join(t.root, "DME-Agent-v7.4.md");
542
+ if (fs.existsSync(man969) || fs.existsSync(man74)) hits.push("manifesto");
511
543
 
512
544
  if (hits.length && row.detected) {
513
- console.log(ok(`${t.name.padEnd(24)} ${hits.length} hits ${c.dim}${hits.slice(0, 5).join(", ")}${c.reset}`));
545
+ console.log(
546
+ ok(
547
+ `${t.name.padEnd(24)} ${hits.length} hits ${c.dim}${hits.slice(0, 5).join(", ")}${c.reset}`
548
+ )
549
+ );
514
550
  } else if (row.detected) {
515
551
  console.log(warn(`${t.name.padEnd(24)} detected but DME not installed`));
516
552
  } else {
@@ -532,11 +568,10 @@ export function scan() {
532
568
  }
533
569
 
534
570
  export function uninstall(opts = {}) {
535
- console.log(asciiLogo(VERSION));
536
- console.log(warn("Removing DME files & <!-- DME-AGENT-7.4 --> blocks…"));
571
+ console.log(asciiLogo(VERSION_SHORT));
572
+ console.log(warn("Removing DME files & DME-AGENT marker blocks…"));
537
573
  console.log(hr());
538
574
 
539
- // Only uninstall from detected unless --all
540
575
  const targets = opts.all
541
576
  ? getTargets()
542
577
  : getDetectedTargets().length
@@ -568,17 +603,24 @@ export function uninstall(opts = {}) {
568
603
  continue;
569
604
  }
570
605
  let txt = fs.readFileSync(rf, "utf8");
571
- const re = new RegExp(
572
- `${escapeRe(MARKER_BEGIN)}[\\s\\S]*?${escapeRe(MARKER_END)}\\n?`,
573
- "g"
574
- );
575
- if (re.test(txt)) {
576
- txt = txt.replace(re, "");
606
+ let changed = false;
607
+ for (const { begin, end } of LEGACY_MARKERS) {
608
+ const re = new RegExp(
609
+ `${escapeRe(begin)}[\\s\\S]*?${escapeRe(end)}\\n?`,
610
+ "g"
611
+ );
612
+ if (re.test(txt)) {
613
+ txt = txt.replace(re, "");
614
+ changed = true;
615
+ }
616
+ }
617
+ if (changed) {
577
618
  fs.writeFileSync(rf, txt, "utf8");
578
619
  console.log(ok(`stripped DME block from ${rf}`));
579
620
  }
580
621
  }
581
622
  for (const p of [
623
+ path.join(t.root, "DME-Agent-v9.69.md"),
582
624
  path.join(t.root, "DME-Agent-v7.4.md"),
583
625
  path.join(t.root, "DME-SYSTEM.md"),
584
626
  ]) {
@@ -590,3 +632,5 @@ export function uninstall(opts = {}) {
590
632
  }
591
633
  console.log(ok("Uninstall complete."));
592
634
  }
635
+
636
+ export { SKILL_NAMES, VERSION, VERSION_SHORT };
@@ -7,10 +7,10 @@ try {
7
7
  const d = process.stdout.isTTY ? "\x1b[2m" : "";
8
8
  const r = process.stdout.isTTY ? "\x1b[0m" : "";
9
9
  console.log("");
10
- console.log(`${y} DME Agent installed.${r}`);
10
+ console.log(`${y} DME Agent 9.69 installed.${r}`);
11
11
  console.log(`${d} Run: npx dme-agent${r}`);
12
12
  console.log(`${d} dme install (detect-only)${r}`);
13
- console.log(`${d} dme scan${r}`);
13
+ console.log(`${d} dme scan · dme skills${r}`);
14
14
  console.log("");
15
15
  } catch {
16
16
  /* ignore */
package/src/ui.mjs CHANGED
@@ -64,7 +64,7 @@ export function showCursor() {
64
64
  }
65
65
 
66
66
  /** Big DME ASCII mark */
67
- export function asciiLogo(version = "7.4.2") {
67
+ export function asciiLogo(version = "9.69") {
68
68
  const y = esc.brightYellow;
69
69
  const m = esc.magenta;
70
70
  const cy = esc.brightCyan;
@@ -82,12 +82,12 @@ export function asciiLogo(version = "7.4.2") {
82
82
  `${cy} ─────────────────────────────────────${r}`,
83
83
  `${m}${b} A G E N T${r} ${d}v${version}${r} ${cy}· Neominimal Identity${r}`,
84
84
  `${d} less, but better — with a face${r}`,
85
- `${d} shadcn first · UX for humans · detect-only install${r}`,
85
+ `${d} shadcn · palette ask · motion bible · detect-only${r}`,
86
86
  "",
87
87
  ].join("\n");
88
88
  }
89
89
 
90
- export function banner(version = "7.4.2") {
90
+ export function banner(version = "9.69") {
91
91
  return asciiLogo(version);
92
92
  }
93
93