@decantr/cli 2.9.4 → 2.9.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 CHANGED
@@ -189,6 +189,8 @@ decantr workspace health --json --output .decantr/workspace-health.json
189
189
  decantr verify --workspace --changed --since origin/main
190
190
  ```
191
191
 
192
+ In observed Brownfield projects, common section shorthands are accepted for page and feature additions when they resolve unambiguously. For example, `decantr add page app/settings --route /settings --project apps/web` and `decantr add feature saved-recipes --section app --project apps/web` resolve `app` to the single primary section, such as `observed-primary`, so docs and LLM prompts do not have to guess generated section IDs first.
193
+
192
194
  `decantr studio` starts a local-only dashboard powered by the same report. It uses Node built-ins only and serves `GET /`, `GET /api/health`, and `POST /api/refresh`.
193
195
 
194
196
  ```bash
package/dist/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-GDGZFGMK.js";
2
+ import "./chunk-32H5SFKV.js";
3
3
  import "./chunk-RXF7ZYGK.js";
4
4
  import "./chunk-VCUFZB45.js";
5
5
  import "./chunk-FACL3NXU.js";
@@ -1743,6 +1743,7 @@ import { join as join6 } from "path";
1743
1743
  import { isV4 as isV42 } from "@decantr/essence-spec";
1744
1744
  var GREEN = "\x1B[32m";
1745
1745
  var RED = "\x1B[31m";
1746
+ var YELLOW = "\x1B[33m";
1746
1747
  var DIM = "\x1B[2m";
1747
1748
  var RESET = "\x1B[0m";
1748
1749
  function readV4Essence(projectRoot) {
@@ -1786,6 +1787,36 @@ function normalizeRoute(route) {
1786
1787
  if (!trimmed || trimmed === "/") return "/";
1787
1788
  return trimmed.startsWith("/") ? trimmed : `/${trimmed}`;
1788
1789
  }
1790
+ function resolveSectionForPage(sections, requestedSectionId) {
1791
+ const exact = sections.find((section) => section.id === requestedSectionId);
1792
+ if (exact) return { section: exact, resolvedFromAlias: false };
1793
+ const lower = requestedSectionId.toLowerCase();
1794
+ const roleByAlias = {
1795
+ app: "primary",
1796
+ main: "primary",
1797
+ primary: "primary",
1798
+ public: "public",
1799
+ marketing: "public",
1800
+ auth: "gateway",
1801
+ gateway: "gateway",
1802
+ auxiliary: "auxiliary"
1803
+ };
1804
+ const desiredRole = roleByAlias[lower];
1805
+ if (!desiredRole) return null;
1806
+ const roleMatches = sections.filter((section) => section.role === desiredRole);
1807
+ if (roleMatches.length === 1) return { section: roleMatches[0], resolvedFromAlias: true };
1808
+ if (roleMatches.length > 1) return null;
1809
+ const observedMatch = sections.find((section) => section.id === `observed-${desiredRole}`);
1810
+ return observedMatch ? { section: observedMatch, resolvedFromAlias: true } : null;
1811
+ }
1812
+ function printSectionNotFound(sectionId, sections, pageId) {
1813
+ console.error(`${RED}Section "${sectionId}" not found.${RESET}`);
1814
+ console.error(`${DIM}Available sections: ${sections.map((s) => s.id).join(", ")}${RESET}`);
1815
+ if (pageId && sections.length > 0) {
1816
+ const primary = sections.find((section) => section.role === "primary") ?? sections[0];
1817
+ console.error(`${DIM}Try: decantr add page ${primary.id}/${pageId}${RESET}`);
1818
+ }
1819
+ }
1789
1820
  async function cmdAddSection(archetypeId, args, projectRoot = process.cwd()) {
1790
1821
  if (!archetypeId) {
1791
1822
  console.error(`${RED}Usage: decantr add section <archetypeId>${RESET}`);
@@ -1849,15 +1880,18 @@ async function cmdAddPage(path, args, projectRoot = process.cwd()) {
1849
1880
  if (!loaded) return;
1850
1881
  const { essence, essencePath } = loaded;
1851
1882
  const sections = essence.blueprint.sections;
1852
- const section = sections.find((s) => s.id === sectionId);
1853
- if (!section) {
1854
- console.error(`${RED}Section "${sectionId}" not found.${RESET}`);
1855
- console.error(`${DIM}Available sections: ${sections.map((s) => s.id).join(", ")}${RESET}`);
1883
+ const resolved = resolveSectionForPage(sections, sectionId);
1884
+ if (!resolved) {
1885
+ printSectionNotFound(sectionId, sections, pageId);
1856
1886
  process.exitCode = 1;
1857
1887
  return;
1858
1888
  }
1889
+ const { section } = resolved;
1890
+ const resolvedSectionId = section.id;
1859
1891
  if (section.pages.find((p) => p.id === pageId)) {
1860
- console.error(`${RED}Page "${pageId}" already exists in section "${sectionId}".${RESET}`);
1892
+ console.error(
1893
+ `${RED}Page "${pageId}" already exists in section "${resolvedSectionId}".${RESET}`
1894
+ );
1861
1895
  process.exitCode = 1;
1862
1896
  return;
1863
1897
  }
@@ -1877,10 +1911,15 @@ async function cmdAddPage(path, args, projectRoot = process.cwd()) {
1877
1911
  route,
1878
1912
  layout: ["hero"]
1879
1913
  });
1880
- routes[route] = { section: sectionId, page: pageId };
1914
+ routes[route] = { section: resolvedSectionId, page: pageId };
1881
1915
  writeEssence(essencePath, essence);
1916
+ if (resolved.resolvedFromAlias) {
1917
+ console.log(
1918
+ `${YELLOW}Resolved section alias "${sectionId}" to "${resolvedSectionId}".${RESET}`
1919
+ );
1920
+ }
1882
1921
  console.log(
1883
- `${GREEN}Added page "${pageId}" to section "${sectionId}" at route "${route}".${RESET}`
1922
+ `${GREEN}Added page "${pageId}" to section "${resolvedSectionId}" at route "${route}".${RESET}`
1884
1923
  );
1885
1924
  const registryClient = new RegistryClient({
1886
1925
  cacheDir: join6(projectRoot, ".decantr", "cache")
@@ -1901,16 +1940,23 @@ async function cmdAddFeature(feature, args, projectRoot = process.cwd()) {
1901
1940
  sectionId = readFlagValue(args, "section");
1902
1941
  if (sectionId) {
1903
1942
  const sections = essence.blueprint.sections;
1904
- const section = sections.find((s) => s.id === sectionId);
1905
- if (!section) {
1906
- console.error(`${RED}Section "${sectionId}" not found.${RESET}`);
1907
- console.error(`${DIM}Available sections: ${sections.map((s) => s.id).join(", ")}${RESET}`);
1943
+ const resolved = resolveSectionForPage(sections, sectionId);
1944
+ if (!resolved) {
1945
+ printSectionNotFound(sectionId, sections);
1908
1946
  process.exitCode = 1;
1909
1947
  return;
1910
1948
  }
1949
+ const { section } = resolved;
1950
+ const resolvedSectionId = section.id;
1911
1951
  if (!section.features.includes(feature)) {
1912
1952
  section.features.push(feature);
1913
1953
  }
1954
+ if (resolved.resolvedFromAlias) {
1955
+ console.log(
1956
+ `${YELLOW}Resolved section alias "${sectionId}" to "${resolvedSectionId}".${RESET}`
1957
+ );
1958
+ }
1959
+ sectionId = resolvedSectionId;
1914
1960
  }
1915
1961
  if (!essence.blueprint.features.includes(feature)) {
1916
1962
  essence.blueprint.features.push(feature);
@@ -2958,7 +3004,7 @@ var DIM2 = "\x1B[2m";
2958
3004
  var RESET2 = "\x1B[0m";
2959
3005
  var GREEN2 = "\x1B[32m";
2960
3006
  var CYAN = "\x1B[36m";
2961
- var YELLOW = "\x1B[33m";
3007
+ var YELLOW2 = "\x1B[33m";
2962
3008
  async function cmdAnalyze(projectRoot = process.cwd(), workspace) {
2963
3009
  const startedAt = Date.now();
2964
3010
  console.log(`
@@ -3126,7 +3172,7 @@ ${DIM2}Written to:${RESET2} ${outputPath}`);
3126
3172
  console.log(`${DIM2}Enrichment backlog:${RESET2} ${intelligenceArtifacts.backlogPath}`);
3127
3173
  console.log(
3128
3174
  `
3129
- ${YELLOW}Next step:${RESET2} Review ${BOLD}${reportDisplayPath}${RESET2}, then run ${BOLD}${recommendedAttachCommand}${RESET2} to attach Decantr using the observed proposal.
3175
+ ${YELLOW2}Next step:${RESET2} Review ${BOLD}${reportDisplayPath}${RESET2}, then run ${BOLD}${recommendedAttachCommand}${RESET2} to attach Decantr using the observed proposal.
3130
3176
  `
3131
3177
  );
3132
3178
  await sendAnalyzeCompletedTelemetry({
@@ -4257,7 +4303,7 @@ var BOLD3 = "\x1B[1m";
4257
4303
  var DIM4 = "\x1B[2m";
4258
4304
  var GREEN4 = "\x1B[32m";
4259
4305
  var RED3 = "\x1B[31m";
4260
- var YELLOW2 = "\x1B[33m";
4306
+ var YELLOW3 = "\x1B[33m";
4261
4307
  var CYAN2 = "\x1B[36m";
4262
4308
  var RESET4 = "\x1B[0m";
4263
4309
  function readJson2(path) {
@@ -4596,7 +4642,7 @@ function buildDoctorReport(root, args) {
4596
4642
  function colorForStatus(status) {
4597
4643
  if (status === "healthy") return GREEN4;
4598
4644
  if (status === "needs-setup" || status === "needs-migration") return RED3;
4599
- return YELLOW2;
4645
+ return YELLOW3;
4600
4646
  }
4601
4647
  function formatDoctorText(report) {
4602
4648
  const lines = [
@@ -4640,7 +4686,7 @@ function formatDoctorText(report) {
4640
4686
  lines.push(` ${GREEN4}No doctor findings.${RESET4}`);
4641
4687
  } else {
4642
4688
  for (const issue of report.issues) {
4643
- const color = issue.severity === "error" ? RED3 : issue.severity === "warn" ? YELLOW2 : CYAN2;
4689
+ const color = issue.severity === "error" ? RED3 : issue.severity === "warn" ? YELLOW3 : CYAN2;
4644
4690
  lines.push(
4645
4691
  ` ${color}[${issue.severity.toUpperCase()}]${RESET4} ${issue.category}: ${issue.message}`
4646
4692
  );
@@ -4946,7 +4992,7 @@ var DIM6 = "\x1B[2m";
4946
4992
  var RESET6 = "\x1B[0m";
4947
4993
  var GREEN6 = "\x1B[32m";
4948
4994
  var CYAN3 = "\x1B[36m";
4949
- var YELLOW3 = "\x1B[33m";
4995
+ var YELLOW4 = "\x1B[33m";
4950
4996
  var MAGENTA = "\x1B[35m";
4951
4997
  function success(text) {
4952
4998
  return `${GREEN6}${text}${RESET6}`;
@@ -5167,7 +5213,7 @@ async function cmdMagic(prompt, projectRoot, options) {
5167
5213
  const essencePath = join20(projectRoot, "decantr.essence.json");
5168
5214
  if (existsSync18(essencePath)) {
5169
5215
  const projectFlag = options.projectLabel ? ` --project ${options.projectLabel}` : "";
5170
- console.log(`${YELLOW3} Decantr is already attached to this project.${RESET6}`);
5216
+ console.log(`${YELLOW4} Decantr is already attached to this project.${RESET6}`);
5171
5217
  console.log(
5172
5218
  dim(" decantr magic is greenfield-first; use task-time context for existing apps.")
5173
5219
  );
@@ -5180,7 +5226,7 @@ async function cmdMagic(prompt, projectRoot, options) {
5180
5226
  }
5181
5227
  const detected = detectProject(projectRoot);
5182
5228
  if (hasExistingProjectFootprint(detected)) {
5183
- console.log(`${YELLOW3} Existing project detected.${RESET6}`);
5229
+ console.log(`${YELLOW4} Existing project detected.${RESET6}`);
5184
5230
  console.log(
5185
5231
  dim(
5186
5232
  " decantr magic stays greenfield-first and will not silently bootstrap over an existing app."
@@ -5490,7 +5536,7 @@ ${GREEN6}${BOLD4}Quality summary:${RESET6}`);
5490
5536
  );
5491
5537
  console.log(` CSS: tokens.css + treatments.css + global.css`);
5492
5538
  console.log(
5493
- ` @layer cascade: ${hasLayers ? GREEN6 + "yes" + RESET6 : YELLOW3 + "missing" + RESET6}`
5539
+ ` @layer cascade: ${hasLayers ? GREEN6 + "yes" + RESET6 : YELLOW4 + "missing" + RESET6}`
5494
5540
  );
5495
5541
  console.log("");
5496
5542
  console.log(`${BOLD4} Ready!${RESET6} Next steps:`);
@@ -5519,7 +5565,7 @@ import {
5519
5565
  } from "@decantr/essence-spec";
5520
5566
  var GREEN7 = "\x1B[32m";
5521
5567
  var RED5 = "\x1B[31m";
5522
- var YELLOW4 = "\x1B[33m";
5568
+ var YELLOW5 = "\x1B[33m";
5523
5569
  var RESET7 = "\x1B[0m";
5524
5570
  var DIM7 = "\x1B[2m";
5525
5571
  function migrateEssenceFile(essencePath) {
@@ -5619,7 +5665,7 @@ async function cmdMigrate(projectRoot = process.cwd(), args = []) {
5619
5665
  console.log(`${GREEN7}Derived context and execution packs refreshed.${RESET7}`);
5620
5666
  }
5621
5667
  console.log("");
5622
- console.log(`${YELLOW4}Review the migrated file and run \`decantr check\` to verify.${RESET7}`);
5668
+ console.log(`${YELLOW5}Review the migrated file and run \`decantr check\` to verify.${RESET7}`);
5623
5669
  }
5624
5670
 
5625
5671
  // src/commands/new-project.ts
@@ -5686,7 +5732,7 @@ var RESET8 = "\x1B[0m";
5686
5732
  var RED6 = "\x1B[31m";
5687
5733
  var GREEN8 = "\x1B[32m";
5688
5734
  var CYAN4 = "\x1B[36m";
5689
- var YELLOW5 = "\x1B[33m";
5735
+ var YELLOW6 = "\x1B[33m";
5690
5736
  function heading(text) {
5691
5737
  return `
5692
5738
  ${BOLD5}${text}${RESET8}
@@ -5836,7 +5882,7 @@ async function cmdNewProject(projectName, options) {
5836
5882
  );
5837
5883
  } else {
5838
5884
  console.log(
5839
- `${YELLOW5} No greenfield bootstrap adapter is available yet for target "${bootstrapTarget.target}" (${bootstrapTarget.packAdapter}).${RESET8}`
5885
+ `${YELLOW6} No greenfield bootstrap adapter is available yet for target "${bootstrapTarget.target}" (${bootstrapTarget.packAdapter}).${RESET8}`
5840
5886
  );
5841
5887
  console.log(
5842
5888
  dim2(
@@ -5852,7 +5898,7 @@ async function cmdNewProject(projectName, options) {
5852
5898
  } catch {
5853
5899
  console.log(
5854
5900
  `
5855
- ${YELLOW5}Dependency install failed. Run \`${packageManager} install\` manually.${RESET8}`
5901
+ ${YELLOW6}Dependency install failed. Run \`${packageManager} install\` manually.${RESET8}`
5856
5902
  );
5857
5903
  }
5858
5904
  }
@@ -5864,7 +5910,7 @@ ${YELLOW5}Dependency install failed. Run \`${packageManager} install\` manually.
5864
5910
  console.log(dim2(` Seeded offline registry content from ${seeded.strategy}.`));
5865
5911
  } else if (requiresOfflineContent) {
5866
5912
  console.log(
5867
- `${YELLOW5} Offline blueprint/archetype resolution requires local registry content.${RESET8}`
5913
+ `${YELLOW6} Offline blueprint/archetype resolution requires local registry content.${RESET8}`
5868
5914
  );
5869
5915
  console.log(
5870
5916
  dim2(
@@ -5894,7 +5940,7 @@ ${YELLOW5}Dependency install failed. Run \`${packageManager} install\` manually.
5894
5940
  } catch {
5895
5941
  console.log(
5896
5942
  `
5897
- ${YELLOW5}Decantr init encountered issues. Run \`decantr init\` manually inside ${projectName}/.${RESET8}`
5943
+ ${YELLOW6}Decantr init encountered issues. Run \`decantr init\` manually inside ${projectName}/.${RESET8}`
5898
5944
  );
5899
5945
  }
5900
5946
  console.log(success2(`
@@ -6237,7 +6283,7 @@ var GREEN10 = "\x1B[32m";
6237
6283
  var RED8 = "\x1B[31m";
6238
6284
  var DIM10 = "\x1B[2m";
6239
6285
  var CYAN5 = "\x1B[36m";
6240
- var YELLOW6 = "\x1B[33m";
6286
+ var YELLOW7 = "\x1B[33m";
6241
6287
  var RESET10 = "\x1B[0m";
6242
6288
  var ALL_CONTENT_TYPES = [...API_CONTENT_TYPES];
6243
6289
  async function cmdRegistryMirror(projectRoot, options = {}) {
@@ -6301,7 +6347,7 @@ Mirroring registry content to ${DIM10}.decantr/cache/${RESET10}
6301
6347
  const totalItems = Object.values(counts).reduce((a, b) => a + b, 0);
6302
6348
  console.log("");
6303
6349
  if (failed.length > 0) {
6304
- console.log(`${YELLOW6}Mirrored ${totalItems} items (${failed.length} type(s) failed)${RESET10}`);
6350
+ console.log(`${YELLOW7}Mirrored ${totalItems} items (${failed.length} type(s) failed)${RESET10}`);
6305
6351
  } else {
6306
6352
  console.log(
6307
6353
  `${GREEN10}Mirrored ${totalItems} items across ${Object.keys(counts).length} types${RESET10}`
@@ -6489,7 +6535,7 @@ import { existsSync as existsSync26, readFileSync as readFileSync19, writeFileSy
6489
6535
  import { join as join28 } from "path";
6490
6536
  var GREEN12 = "\x1B[32m";
6491
6537
  var RED10 = "\x1B[31m";
6492
- var YELLOW7 = "\x1B[33m";
6538
+ var YELLOW8 = "\x1B[33m";
6493
6539
  var RESET12 = "\x1B[0m";
6494
6540
  var DIM12 = "\x1B[2m";
6495
6541
  var BOLD6 = "\x1B[1m";
@@ -6530,7 +6576,7 @@ ${BOLD6}Unresolved Drift Entries (${unresolved.length})${RESET12}
6530
6576
  `);
6531
6577
  for (let i = 0; i < unresolved.length; i++) {
6532
6578
  const entry = unresolved[i];
6533
- const severityColor = entry.severity === "error" ? RED10 : YELLOW7;
6579
+ const severityColor = entry.severity === "error" ? RED10 : YELLOW8;
6534
6580
  const icon = entry.severity === "error" ? "x" : "!";
6535
6581
  console.log(
6536
6582
  ` ${severityColor}${icon}${RESET12} ${BOLD6}#${i + 1}${RESET12} [${entry.rule}] ${entry.message}`
@@ -6814,7 +6860,7 @@ import { join as join29 } from "path";
6814
6860
  import { isV4 as isV48 } from "@decantr/essence-spec";
6815
6861
  var GREEN14 = "\x1B[32m";
6816
6862
  var RED11 = "\x1B[31m";
6817
- var YELLOW8 = "\x1B[33m";
6863
+ var YELLOW9 = "\x1B[33m";
6818
6864
  var DIM14 = "\x1B[2m";
6819
6865
  var RESET14 = "\x1B[0m";
6820
6866
  var VALID_THEME_SHAPES = ["sharp", "rounded", "pill"];
@@ -6909,7 +6955,7 @@ async function cmdThemeSwitch(themeName, args, projectRoot = process.cwd()) {
6909
6955
  console.log(
6910
6956
  `${GREEN14}Derived files refreshed (tokens.css, treatments.css, all contexts).${RESET14}`
6911
6957
  );
6912
- console.log(`${YELLOW8}Guard will flag code using old tokens. Run \`decantr check\`.${RESET14}`);
6958
+ console.log(`${YELLOW9}Guard will flag code using old tokens. Run \`decantr check\`.${RESET14}`);
6913
6959
  }
6914
6960
 
6915
6961
  // src/prompts.ts
@@ -6918,7 +6964,7 @@ var BOLD8 = "\x1B[1m";
6918
6964
  var DIM15 = "\x1B[2m";
6919
6965
  var RESET15 = "\x1B[0m";
6920
6966
  var GREEN15 = "\x1B[32m";
6921
- var YELLOW9 = "\x1B[33m";
6967
+ var YELLOW10 = "\x1B[33m";
6922
6968
  var CYAN8 = "\x1B[36m";
6923
6969
  function ask(question, defaultValue) {
6924
6970
  const rl = createInterface({ input: process.stdin, output: process.stdout });
@@ -6958,7 +7004,7 @@ async function confirm(question, defaultYes = true) {
6958
7004
  }
6959
7005
  function warn(message) {
6960
7006
  console.log(`
6961
- ${YELLOW9} Warning: ${message}${RESET15}`);
7007
+ ${YELLOW10} Warning: ${message}${RESET15}`);
6962
7008
  }
6963
7009
  function showDetection(detected) {
6964
7010
  console.log(`
@@ -6977,7 +7023,7 @@ ${CYAN8}Detected project configuration:${RESET15}`);
6977
7023
  console.log(` Tailwind CSS: ${GREEN15}yes${RESET15}`);
6978
7024
  }
6979
7025
  if (detected.existingEssence) {
6980
- console.log(` Existing essence: ${YELLOW9}yes${RESET15}`);
7026
+ console.log(` Existing essence: ${YELLOW10}yes${RESET15}`);
6981
7027
  }
6982
7028
  }
6983
7029
  async function runInteractivePrompts(detected, archetypes, blueprints, themes, workflowSeed) {
@@ -7379,7 +7425,7 @@ var RESET16 = "\x1B[0m";
7379
7425
  var RED12 = "\x1B[31m";
7380
7426
  var GREEN16 = "\x1B[32m";
7381
7427
  var CYAN9 = "\x1B[36m";
7382
- var YELLOW10 = "\x1B[33m";
7428
+ var YELLOW11 = "\x1B[33m";
7383
7429
  function heading2(text) {
7384
7430
  return `
7385
7431
  ${BOLD9}${text}${RESET16}
@@ -8422,7 +8468,7 @@ function printBlueprintPortfolioNotice(blueprint) {
8422
8468
  if (!portfolio) return;
8423
8469
  if (portfolio.visibility === "hidden" || portfolio.maturity === "fold-candidate") {
8424
8470
  console.log(
8425
- `${YELLOW10} Warning:${RESET16} blueprint "${blueprint.id}" is folded out of public browsing.`
8471
+ `${YELLOW11} Warning:${RESET16} blueprint "${blueprint.id}" is folded out of public browsing.`
8426
8472
  );
8427
8473
  if (portfolio.recommended_alternative) {
8428
8474
  console.log(
@@ -8435,7 +8481,7 @@ function printBlueprintPortfolioNotice(blueprint) {
8435
8481
  }
8436
8482
  if (portfolio.visibility === "labs") {
8437
8483
  console.log(
8438
- `${YELLOW10} Note:${RESET16} blueprint "${blueprint.id}" is a Labs blueprint; direct scaffolding is supported, but it is not a default recommendation yet.`
8484
+ `${YELLOW11} Note:${RESET16} blueprint "${blueprint.id}" is a Labs blueprint; direct scaffolding is supported, but it is not a default recommendation yet.`
8439
8485
  );
8440
8486
  }
8441
8487
  }
@@ -8724,7 +8770,7 @@ async function cmdValidate(path) {
8724
8770
  console.log(heading2("Guard violations:"));
8725
8771
  for (const v of violations) {
8726
8772
  const vr = v;
8727
- console.log(` ${YELLOW10}[${vr.rule}]${RESET16} ${vr.message}`);
8773
+ console.log(` ${YELLOW11}[${vr.rule}]${RESET16} ${vr.message}`);
8728
8774
  if (vr.suggestion) {
8729
8775
  console.log(` ${DIM16}Suggestion: ${vr.suggestion}${RESET16}`);
8730
8776
  }
@@ -9058,7 +9104,7 @@ async function cmdInit(args) {
9058
9104
  console.log(dim3(" Found .decantr/init-seed.json brownfield guidance."));
9059
9105
  }
9060
9106
  if (detected.existingEssence && !args.existing) {
9061
- console.log(`${YELLOW10}Warning: decantr.essence.json already exists.${RESET16}`);
9107
+ console.log(`${YELLOW11}Warning: decantr.essence.json already exists.${RESET16}`);
9062
9108
  const overwrite = await confirm("Overwrite existing configuration?", false);
9063
9109
  if (!overwrite) {
9064
9110
  console.log(dim3("Cancelled."));
@@ -9161,7 +9207,7 @@ async function cmdInit(args) {
9161
9207
  } else if (shouldUseRegistry && !apiAvailable) {
9162
9208
  if (!args.blueprint) {
9163
9209
  console.log(`
9164
- ${YELLOW10}You're offline. Scaffolding minimal Decantr project.${RESET16}`);
9210
+ ${YELLOW11}You're offline. Scaffolding minimal Decantr project.${RESET16}`);
9165
9211
  console.log(
9166
9212
  dim3("Run `decantr sync` or `decantr upgrade` when online to pull full registry content.\n")
9167
9213
  );
@@ -9210,7 +9256,7 @@ ${YELLOW10}You're offline. Scaffolding minimal Decantr project.${RESET16}`);
9210
9256
  return;
9211
9257
  }
9212
9258
  console.log(`
9213
- ${YELLOW10}You're offline. Scaffolding Decantr default.${RESET16}`);
9259
+ ${YELLOW11}You're offline. Scaffolding Decantr default.${RESET16}`);
9214
9260
  console.log(dim3("Run `decantr upgrade` when online, or visit decantr.ai/registry\n"));
9215
9261
  selectedBlueprint = "default";
9216
9262
  } else if (shouldUseRegistry) {
@@ -9392,7 +9438,7 @@ ${YELLOW10}You're offline. Scaffolding Decantr default.${RESET16}`);
9392
9438
  return;
9393
9439
  }
9394
9440
  console.log(
9395
- `${YELLOW10} Warning: Could not fetch blueprint "${options.blueprint}". Using defaults.${RESET16}`
9441
+ `${YELLOW11} Warning: Could not fetch blueprint "${options.blueprint}". Using defaults.${RESET16}`
9396
9442
  );
9397
9443
  }
9398
9444
  } else if (shouldUseRegistry && options.archetype) {
@@ -9407,7 +9453,7 @@ ${YELLOW10}You're offline. Scaffolding Decantr default.${RESET16}`);
9407
9453
  return;
9408
9454
  }
9409
9455
  console.log(
9410
- `${YELLOW10} Warning: Could not fetch archetype "${options.archetype}". Using defaults.${RESET16}`
9456
+ `${YELLOW11} Warning: Could not fetch archetype "${options.archetype}". Using defaults.${RESET16}`
9411
9457
  );
9412
9458
  }
9413
9459
  }
@@ -9424,7 +9470,7 @@ ${YELLOW10}You're offline. Scaffolding Decantr default.${RESET16}`);
9424
9470
  return;
9425
9471
  }
9426
9472
  console.log(
9427
- `${YELLOW10} Warning: Could not fetch theme "${options.theme}". Using defaults.${RESET16}`
9473
+ `${YELLOW11} Warning: Could not fetch theme "${options.theme}". Using defaults.${RESET16}`
9428
9474
  );
9429
9475
  }
9430
9476
  }
@@ -9629,7 +9675,7 @@ async function cmdStatus(projectRoot = process.cwd()) {
9629
9675
  ` Guard: ${v4.meta.guard.mode} (DNA: ${v4.meta.guard.dna_enforcement}, Blueprint: ${v4.meta.guard.blueprint_enforcement})`
9630
9676
  );
9631
9677
  } else {
9632
- console.log(` ${YELLOW10}Run \`decantr migrate --to v4\` to upgrade this project.${RESET16}`);
9678
+ console.log(` ${YELLOW11}Run \`decantr migrate --to v4\` to upgrade this project.${RESET16}`);
9633
9679
  }
9634
9680
  } catch (e) {
9635
9681
  console.log(` ${RED12}Error reading essence: ${e.message}${RESET16}`);
@@ -9642,15 +9688,15 @@ async function cmdStatus(projectRoot = process.cwd()) {
9642
9688
  const syncStatus = projectJson.sync?.status || "unknown";
9643
9689
  const lastSync = projectJson.sync?.lastSync || "never";
9644
9690
  const source = projectJson.sync?.registrySource || "unknown";
9645
- const statusColor = syncStatus === "synced" ? GREEN16 : YELLOW10;
9691
+ const statusColor = syncStatus === "synced" ? GREEN16 : YELLOW11;
9646
9692
  console.log(` Status: ${statusColor}${syncStatus}${RESET16}`);
9647
9693
  console.log(` Last sync: ${dim3(lastSync)}`);
9648
9694
  console.log(` Source: ${dim3(source)}`);
9649
9695
  } catch {
9650
- console.log(` ${YELLOW10}Could not read project.json${RESET16}`);
9696
+ console.log(` ${YELLOW11}Could not read project.json${RESET16}`);
9651
9697
  }
9652
9698
  } else {
9653
- console.log(` ${YELLOW10}No .decantr/project.json found${RESET16}`);
9699
+ console.log(` ${YELLOW11}No .decantr/project.json found${RESET16}`);
9654
9700
  console.log(dim3(' Run "decantr init" to create project files.'));
9655
9701
  }
9656
9702
  }
@@ -9663,12 +9709,12 @@ async function cmdSync() {
9663
9709
  console.log(success3("Sync completed successfully."));
9664
9710
  console.log(` Synced: ${result.synced.join(", ")}`);
9665
9711
  if (result.failed.length > 0) {
9666
- console.log(` ${YELLOW10}Failed: ${result.failed.join(", ")}${RESET16}`);
9712
+ console.log(` ${YELLOW11}Failed: ${result.failed.join(", ")}${RESET16}`);
9667
9713
  }
9668
9714
  } else {
9669
- console.log(`${YELLOW10}Could not sync: API unavailable${RESET16}`);
9715
+ console.log(`${YELLOW11}Could not sync: API unavailable${RESET16}`);
9670
9716
  if (result.failed.length > 0) {
9671
- console.log(` ${YELLOW10}Failed: ${result.failed.join(", ")}${RESET16}`);
9717
+ console.log(` ${YELLOW11}Failed: ${result.failed.join(", ")}${RESET16}`);
9672
9718
  }
9673
9719
  }
9674
9720
  }
@@ -9678,7 +9724,7 @@ function printVerificationFindings(findings) {
9678
9724
  return;
9679
9725
  }
9680
9726
  for (const finding of findings) {
9681
- const color = finding.severity === "error" ? RED12 : finding.severity === "warn" ? YELLOW10 : CYAN9;
9727
+ const color = finding.severity === "error" ? RED12 : finding.severity === "warn" ? YELLOW11 : CYAN9;
9682
9728
  console.log(
9683
9729
  ` ${color}[${finding.severity.toUpperCase()}]${RESET16} ${finding.category}: ${finding.message}`
9684
9730
  );
@@ -10319,7 +10365,7 @@ async function cmdAdoptWorkflow(args) {
10319
10365
  )
10320
10366
  );
10321
10367
  } catch (e) {
10322
- console.log(`${YELLOW10}Pack hydration skipped:${RESET16} ${e.message}`);
10368
+ console.log(`${YELLOW11}Pack hydration skipped:${RESET16} ${e.message}`);
10323
10369
  console.log(
10324
10370
  dim3(
10325
10371
  `Run ${compilePacksCommandForProject(projectArg)} after adoption if you want hosted page/review packs.`
@@ -10452,7 +10498,7 @@ async function cmdVerifyWorkflow(args) {
10452
10498
  if (!quietOutput) {
10453
10499
  console.log("");
10454
10500
  console.log(
10455
- `${YELLOW10}Local pattern pack missing.${RESET16} Run ${cyan3(withProject("decantr codify --from-audit", projectArg))}, review the proposal, then run ${cyan3(withProject("decantr codify --accept", projectArg))}.`
10501
+ `${YELLOW11}Local pattern pack missing.${RESET16} Run ${cyan3(withProject("decantr codify --from-audit", projectArg))}, review the proposal, then run ${cyan3(withProject("decantr codify --accept", projectArg))}.`
10456
10502
  );
10457
10503
  }
10458
10504
  process.exitCode = process.exitCode || 1;
@@ -10468,11 +10514,11 @@ async function cmdVerifyWorkflow(args) {
10468
10514
  console.log(`${GREEN16}Local rule manifest found:${RESET16} ${validation.rulesPath}`);
10469
10515
  } else {
10470
10516
  console.log(
10471
- `${YELLOW10}Local rule manifest missing.${RESET16} Run ${cyan3("decantr codify --from-audit")} to propose .decantr/rules.json.`
10517
+ `${YELLOW11}Local rule manifest missing.${RESET16} Run ${cyan3("decantr codify --from-audit")} to propose .decantr/rules.json.`
10472
10518
  );
10473
10519
  }
10474
10520
  for (const warning of validation.warnings.slice(0, 8)) {
10475
- console.log(`${YELLOW10}warn${RESET16} ${warning}`);
10521
+ console.log(`${YELLOW11}warn${RESET16} ${warning}`);
10476
10522
  }
10477
10523
  if (validation.findings.length > 0) {
10478
10524
  console.log("");
@@ -10625,7 +10671,7 @@ async function cmdTaskWorkflow(args) {
10625
10671
  console.log("");
10626
10672
  console.log(`${BOLD9}Project-owned local law:${RESET16}`);
10627
10673
  console.log(
10628
- ` ${YELLOW10}Not codified yet.${RESET16} Run ${cyan3(withProject("decantr codify --from-audit", projectArg))} after adoption.`
10674
+ ` ${YELLOW11}Not codified yet.${RESET16} Run ${cyan3(withProject("decantr codify --from-audit", projectArg))} after adoption.`
10629
10675
  );
10630
10676
  }
10631
10677
  if (context.changedFiles.length > 0) {
@@ -11424,7 +11470,7 @@ async function main() {
11424
11470
  case "heal": {
11425
11471
  if (command === "heal") {
11426
11472
  console.log(
11427
- `${YELLOW10}Note: \`decantr heal\` is deprecated. Use \`decantr check\` instead.${RESET16}`
11473
+ `${YELLOW11}Note: \`decantr heal\` is deprecated. Use \`decantr check\` instead.${RESET16}`
11428
11474
  );
11429
11475
  }
11430
11476
  const { cmdHeal } = await import("./heal-ZQHEHBUJ.js");
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./chunk-GDGZFGMK.js";
1
+ import "./chunk-32H5SFKV.js";
2
2
  import "./chunk-RXF7ZYGK.js";
3
3
  import "./chunk-VCUFZB45.js";
4
4
  import "./chunk-FACL3NXU.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decantr/cli",
3
- "version": "2.9.4",
3
+ "version": "2.9.6",
4
4
  "description": "Decantr CLI - scaffold, audit, inspect Project Health, and maintain Decantr projects from the terminal",
5
5
  "keywords": [
6
6
  "decantr",
@@ -49,10 +49,10 @@
49
49
  "dependencies": {
50
50
  "ajv": "^8.20.0",
51
51
  "@decantr/core": "2.1.0",
52
- "@decantr/essence-spec": "2.0.1",
53
52
  "@decantr/registry": "2.2.0",
54
- "@decantr/telemetry": "2.2.1",
55
- "@decantr/verifier": "2.3.3"
53
+ "@decantr/essence-spec": "2.0.1",
54
+ "@decantr/verifier": "2.3.3",
55
+ "@decantr/telemetry": "2.2.1"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsup",