@decantr/cli 3.6.2 → 3.7.0

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
@@ -19,11 +19,11 @@ npx @decantr/cli new my-app --blueprint=esports-hq
19
19
  ```
20
20
 
21
21
  Use `decantr setup` when you are unsure which path applies. It detects whether the repo is empty, already attached, or a Brownfield app and recommends the right entry path.
22
- Use `decantr scan` when you want a zero-commit Brownfield preview. It reads local files, detects framework/routes/styling/static-hosting/assistant-rule signals, previews typed Contract graph readiness in memory when a Decantr contract already exists, reports the contract capsule source-handle count and limit, prints a terminal report, and writes no `.decantr` files or report artifacts. Add `--json` when automation needs the `ScanReportV1` payload.
22
+ Use `decantr scan` when you want a zero-commit Brownfield preview. It reads local files through the shared verifier discovery substrate, detects workspace/app scope, package manager, framework, language, route signals, taskable routes, component inventory confidence, styling/static-hosting/assistant-rule signals, previews typed Contract graph readiness in memory when a Decantr contract already exists, reports the contract capsule source-handle count and limit, prints a terminal report, and writes no `.decantr` files or report artifacts. Add `--json` when automation needs the `ScanReportV2` payload.
23
23
  Use `decantr new` for a greenfield workspace in a fresh directory. With a starter-kit blueprint or archetype it uses the runnable adapter and Decantr CSS; without certified vocabulary content it creates a contract-only workspace unless you explicitly pass `--adoption=decantr-css`.
24
24
  Use `decantr adopt` when you already have an app and want Decantr governance without adopting a blueprint. Brownfield attach is proposal-driven: Decantr inventories the app, writes an observed essence proposal, hydrates hosted execution packs when online, and only applies the contract when you explicitly accept or merge it.
25
25
  Use `decantr studio` after adoption when you want a local Control Room for routes, findings, evidence, authority, and next actions. Use `decantr connect cursor` when the opened workspace should get Cursor Agent MCP and project-rule activation; in monorepos use `decantr connect cursor --project apps/web` so the rule keeps the app scope. Use `decantr doctor` when the next step is unclear, `decantr task <route> "<intent>"` before asking an LLM to modify a route, `decantr verify` after the edit, `decantr resolve` when source and contract disagree, and `decantr ci` in required automation. If runtime source and Decantr context disagree, report the drift instead of guessing; in Brownfield the existing source is observed truth, accepted local law/style bridge is project authority where present, Essence V4 is the structural contract, and hosted packs stay advisory until mapped into local law. Use `decantr graph` when you want the Decantr 3 typed Contract graph, typed graph diff summary, manifest, content-addressed snapshot history, and cache-friendly contract capsule written under `.decantr/graph`; the capsule includes a bounded SourceArtifact path index so agents can discover valid file-impact handles without reading the full snapshot, and `--capsule-source-limit <count>` can tune that index for large repos. Add `--route /feed --task "improve loading" --json` when you want the exact task-ranked route-scoped subgraph an agent should inspect before editing, `--node cmp:button --impact --json` when you need the graph-shaped blast radius for a component, token, rule, finding, or source artifact, or `--file src/app/page.tsx --impact --json` when the agent knows the source file it is about to change. Route and impact ranking use deterministic weighted traversal plus local personalized PageRank and task boosts. Use `--snapshot-id <id>` to inspect a replayable history snapshot and `--compare-to <id> --include-diff-ops --json` to compare the selected/current graph against a prior snapshot. Use `decantr codify --from-audit --style-bridge` when you want project-owned UI patterns, optional `behavior_obligations`, local rules, and token/class bridge mappings such as button/card/shell/theme standards to appear in future task context and verification. Once accepted, that local law is the first Hybrid lane: the app still owns source and styling, but Decantr treats accepted local patterns, behavior obligations, rules, and style bridge mappings as project authority.
26
- In monorepos, app-scoped commands accept `--project <app-path>`. `setup` shows attach guidance before adoption and the day-two loop after adoption. Candidate discovery ranks product UI apps ahead of docs, Storybook, API, MCP helper, workbench, and package surfaces; `decantr workspace list --json` includes rank, category, score, and reason metadata so automation can explain why `apps/web`, `apps/remix`, or `apps/dashboard` was suggested first. Hosted pack hydration also follows the essence path: `decantr registry compile-packs apps/web/decantr.essence.json --write-context` writes into `apps/web/.decantr/context`. In contract-only/offline Brownfield, deferred hosted packs are optional context unless a present manifest references missing files.
26
+ In monorepos, app-scoped commands accept `--project <app-path>`. `setup` shows attach guidance before adoption and the day-two loop after adoption. Candidate discovery ranks product UI apps ahead of docs, Storybook, API, MCP helper, workbench, and package surfaces; `decantr workspace list --json` includes rank, category, score, and reason metadata so automation can explain why `apps/web`, `apps/remix`, or `apps/dashboard` was suggested first. Once an app path is selected, scan/setup/adopt/doctor/task/verify/ci/connect preserve that app scope and inherit package-manager evidence from the workspace root, so a React app inside a pnpm Angular/React monorepo is reported as the React app, not the root or sibling app. Hosted pack hydration also follows the essence path: `decantr registry compile-packs apps/web/decantr.essence.json --write-context` writes into `apps/web/.decantr/context`. In contract-only/offline Brownfield, deferred hosted packs are optional context unless a present manifest references missing files.
27
27
  Use `decantr init`, `decantr analyze`, `decantr check`, and `decantr health` as advanced primitives when you need direct control over one step.
28
28
 
29
29
  App-scoped primitives now share the same `--project` posture as the primary workflow commands. From a workspace root, `health`, `status`, `upgrade`, `add`, `remove`, `theme`, `export`, `suggest`, `magic`, `rules`, and `telemetry` target the selected app instead of the root. Task/read paths, local-law summaries, and refresh change summaries are printed as openable workspace paths. Nonexistent project paths fail immediately, and Brownfield adoption refuses component packages unless you intentionally pass `--force-package`.
@@ -102,6 +102,7 @@ Assistant rule integration is preview-first: `--assistant-bridge=preview` writes
102
102
 
103
103
  - scaffolds Decantr projects from blueprints, archetypes, or prompts
104
104
  - previews existing apps with read-only Brownfield scan reports
105
+ - emits `scan-report.v2` JSON with discovery evidence, app scope, route signal/taskable route counts, component inventory confidence, and limitations
105
106
  - guides users through human workflow commands: setup, adopt, doctor, task, verify, ci, codify, and connect
106
107
  - supports explicit workflow lanes: greenfield blueprint, greenfield contract-only, brownfield adoption, Hybrid local law, Hybrid style bridge, Hybrid Decantr CSS, and hybrid composition
107
108
  - ranks monorepo app candidates with explainable metadata so product UI apps come before docs, Storybook, API, helper packages, and workbench surfaces
package/dist/bin.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-4HFBFQNN.js";
3
- import "./chunk-SIDKK73N.js";
2
+ import "./chunk-O7N4CCWS.js";
3
+ import "./chunk-NDH3BDXY.js";
4
4
  import "./chunk-56HUEUO3.js";
5
5
  import "./chunk-WAGVDMJV.js";
6
6
  import "./chunk-24JR4ZNG.js";
@@ -5075,65 +5075,65 @@ function generateSyntheticSlots(patternId, description) {
5075
5075
  const desc = description.toLowerCase();
5076
5076
  const syntheticSlots = {};
5077
5077
  if (patternId.includes("feature") || desc.includes("feature")) {
5078
- syntheticSlots["grid"] = "Grid of feature cards (icon + title + description)";
5078
+ syntheticSlots.grid = "Grid of feature cards (icon + title + description)";
5079
5079
  syntheticSlots["feature-card"] = "Individual feature with icon, heading, and description text";
5080
5080
  }
5081
5081
  if (patternId.includes("pricing") || desc.includes("pricing")) {
5082
- syntheticSlots["tiers"] = "Pricing tier cards (name, price, features list, CTA button)";
5083
- syntheticSlots["toggle"] = "Monthly/annual billing toggle (optional)";
5082
+ syntheticSlots.tiers = "Pricing tier cards (name, price, features list, CTA button)";
5083
+ syntheticSlots.toggle = "Monthly/annual billing toggle (optional)";
5084
5084
  }
5085
5085
  if (patternId.includes("testimonial") || desc.includes("testimonial")) {
5086
- syntheticSlots["quotes"] = "Testimonial cards (quote text, author name, role, avatar)";
5086
+ syntheticSlots.quotes = "Testimonial cards (quote text, author name, role, avatar)";
5087
5087
  }
5088
5088
  if (patternId.includes("cta") || desc.includes("call-to-action") || desc.includes("call to action")) {
5089
- syntheticSlots["headline"] = "CTA headline text";
5090
- syntheticSlots["description"] = "Supporting description text";
5091
- syntheticSlots["actions"] = "CTA button(s)";
5089
+ syntheticSlots.headline = "CTA headline text";
5090
+ syntheticSlots.description = "Supporting description text";
5091
+ syntheticSlots.actions = "CTA button(s)";
5092
5092
  }
5093
5093
  if (patternId.includes("how-it-works") || desc.includes("how it works") || desc.includes("timeline") || desc.includes("steps")) {
5094
- syntheticSlots["steps"] = "Numbered steps (step number, title, description)";
5094
+ syntheticSlots.steps = "Numbered steps (step number, title, description)";
5095
5095
  }
5096
5096
  if (patternId.includes("team") || desc.includes("team")) {
5097
- syntheticSlots["members"] = "Team member cards (avatar, name, role)";
5097
+ syntheticSlots.members = "Team member cards (avatar, name, role)";
5098
5098
  }
5099
5099
  if (patternId.includes("story") || desc.includes("story") || desc.includes("about")) {
5100
- syntheticSlots["content"] = "Story/about narrative text content";
5100
+ syntheticSlots.content = "Story/about narrative text content";
5101
5101
  }
5102
5102
  if (patternId.includes("values") || desc.includes("values")) {
5103
- syntheticSlots["values"] = "Value cards (icon/emoji, title, description)";
5103
+ syntheticSlots.values = "Value cards (icon/emoji, title, description)";
5104
5104
  }
5105
5105
  if (patternId.includes("form") || desc.includes("form") || desc.includes("contact")) {
5106
- syntheticSlots["fields"] = "Form fields (name, email, message, etc.)";
5107
- syntheticSlots["submit"] = "Submit button";
5106
+ syntheticSlots.fields = "Form fields (name, email, message, etc.)";
5107
+ syntheticSlots.submit = "Submit button";
5108
5108
  }
5109
5109
  if (patternId.includes("content") || desc.includes("legal") || desc.includes("privacy") || desc.includes("policy")) {
5110
- syntheticSlots["body"] = "Long-form text content with headings and paragraphs";
5111
- syntheticSlots["toc"] = "Table of contents sidebar (optional)";
5110
+ syntheticSlots.body = "Long-form text content with headings and paragraphs";
5111
+ syntheticSlots.toc = "Table of contents sidebar (optional)";
5112
5112
  }
5113
5113
  if (patternId.includes("settings") || desc.includes("settings") || desc.includes("preferences")) {
5114
- syntheticSlots["sections"] = "Settings sections (label, description, input/toggle)";
5114
+ syntheticSlots.sections = "Settings sections (label, description, input/toggle)";
5115
5115
  }
5116
5116
  if (patternId.includes("security") || desc.includes("security") || desc.includes("password")) {
5117
- syntheticSlots["sections"] = "Security sections (password change, MFA toggle, session list)";
5117
+ syntheticSlots.sections = "Security sections (password change, MFA toggle, session list)";
5118
5118
  }
5119
5119
  if (patternId.includes("session") || desc.includes("session")) {
5120
- syntheticSlots["list"] = "Active sessions list (device, location, last active, revoke button)";
5120
+ syntheticSlots.list = "Active sessions list (device, location, last active, revoke button)";
5121
5121
  }
5122
5122
  if (patternId.includes("message") || desc.includes("message") || desc.includes("chat")) {
5123
- syntheticSlots["messages"] = "Message bubbles (user/assistant, content, timestamp)";
5123
+ syntheticSlots.messages = "Message bubbles (user/assistant, content, timestamp)";
5124
5124
  }
5125
5125
  if (patternId.includes("input") && desc.includes("chat")) {
5126
- syntheticSlots["textarea"] = "Auto-expanding message input";
5127
- syntheticSlots["actions"] = "Attach file button, send button";
5126
+ syntheticSlots.textarea = "Auto-expanding message input";
5127
+ syntheticSlots.actions = "Attach file button, send button";
5128
5128
  }
5129
5129
  if (patternId.includes("empty") || desc.includes("empty")) {
5130
- syntheticSlots["illustration"] = "Empty state illustration or icon";
5131
- syntheticSlots["message"] = "Welcome/empty state message";
5132
- syntheticSlots["suggestions"] = "Suggested actions or prompts";
5130
+ syntheticSlots.illustration = "Empty state illustration or icon";
5131
+ syntheticSlots.message = "Welcome/empty state message";
5132
+ syntheticSlots.suggestions = "Suggested actions or prompts";
5133
5133
  }
5134
5134
  if (patternId.includes("header") && desc.includes("chat")) {
5135
- syntheticSlots["title"] = "Conversation title or model name";
5136
- syntheticSlots["actions"] = "Header action buttons (new chat, settings)";
5135
+ syntheticSlots.title = "Conversation title or model name";
5136
+ syntheticSlots.actions = "Header action buttons (new chat, settings)";
5137
5137
  }
5138
5138
  return syntheticSlots;
5139
5139
  }