@decantr/cli 2.6.0 → 2.8.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
@@ -17,9 +17,11 @@ Or run it without installing:
17
17
  npx @decantr/cli new my-app --blueprint=esports-hq
18
18
  ```
19
19
 
20
+ 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 next command.
20
21
  Use `decantr new` for a greenfield workspace in a fresh directory. With a blueprint/archetype it uses the runnable adapter and Decantr CSS; without registry content it creates a contract-only workspace unless you explicitly pass `--adoption=decantr-css`.
21
- Use `decantr analyze` first 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, and only applies it when you explicitly accept or merge it.
22
- Use `decantr init` to attach Decantr contract/context files to an existing project or to create a contract-only workspace.
22
+ 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, and only applies it when you explicitly accept or merge it.
23
+ Use `decantr task` before asking an LLM to modify a route, and `decantr verify` after the edit. Use `decantr codify --from-audit` when you want project-owned UI patterns and local rules such as button/card/shell/theme standards to appear in future task context and verification.
24
+ Use `decantr init`, `decantr analyze`, `decantr check`, and `decantr health` as advanced primitives when you need direct control over one step.
23
25
 
24
26
  Current starter adapter availability:
25
27
 
@@ -35,6 +37,12 @@ Current starter adapter availability:
35
37
  Explicit workflow/adoption flags:
36
38
 
37
39
  ```bash
40
+ decantr setup
41
+ decantr adopt --base-url http://localhost:3000 --evidence --yes
42
+ decantr codify --from-audit
43
+ decantr codify --accept
44
+ decantr task /feed "add saved recipe actions"
45
+ decantr verify --brownfield --local-patterns
38
46
  decantr init --workflow=greenfield --adoption=contract-only
39
47
  decantr analyze
40
48
  decantr init --existing --accept-proposal
@@ -57,11 +65,12 @@ Monorepos store both `workspaceRoot` and `appRoot`. In non-interactive workspace
57
65
 
58
66
  Assistant rule integration is preview-first: `--assistant-bridge=preview` writes `.decantr/context/assistant-bridge.md`, `decantr rules preview` prints the bridge, and `--assistant-bridge=apply` or `decantr rules apply` mutates supported rule files with idempotent marked blocks.
59
67
 
60
- Brownfield analysis also writes `.decantr/doctrine-map.json`, a ranked source-precedence map across security/data, architecture, design-system, workflow/CI, feature/business, assistant-specific, stale, and unsafe-to-cite evidence. In 2.6 it also writes `.decantr/brownfield-intelligence.json`, `.decantr/theme-inventory.json`, and `.decantr/enrichment-backlog.md`. The proposal groups routes into observed semantic domains such as auth, RBAC, billing, reporting, facilities, settings, and public surfaces across Next App/Pages Router, React Router, Angular Router, SvelteKit, Vue Router, and Nuxt file routes. Existing styling systems such as Tailwind, Bootstrap, MUI, Chakra, plain CSS, and Decantr CSS are observed as evidence instead of replaced. Theme variants are observed in the theme inventory without changing Essence V4. `decantr check --brownfield` uses the doctrine map to flag actionable missing doctrine coverage, unsafe context, missing assistant bridges, style drift, and unsafe defaults without treating current database migrations as stale docs.
68
+ Brownfield analysis also writes `.decantr/doctrine-map.json`, a ranked source-precedence map across security/data, architecture, design-system, workflow/CI, feature/business, assistant-specific, stale, and unsafe-to-cite evidence. It also writes `.decantr/brownfield-intelligence.json`, `.decantr/theme-inventory.json`, and `.decantr/enrichment-backlog.md`. The proposal groups routes into observed semantic domains such as auth, RBAC, billing, reporting, facilities, settings, and public surfaces across Next App/Pages Router, React Router, Angular Router, SvelteKit, Vue Router, and Nuxt file routes. Existing styling systems such as Tailwind, Bootstrap, MUI, Chakra, plain CSS, and Decantr CSS are observed as evidence instead of replaced. Theme variants are observed in the theme inventory without changing Essence V4. `decantr codify --from-audit` proposes `.decantr/local-patterns.proposal.json` and `.decantr/rules.proposal.json`; after review, `decantr codify --accept` promotes `.decantr/local-patterns.json` and `.decantr/rules.json`. `decantr verify --brownfield --local-patterns` uses the Brownfield guard layer plus accepted local law to flag actionable missing doctrine coverage, unsafe context, missing assistant bridges, style drift, raw local-rule violations, and unsafe defaults without treating current database migrations as stale docs.
61
69
 
62
70
  ## What It Does
63
71
 
64
72
  - scaffolds Decantr projects from blueprints, archetypes, or prompts
73
+ - guides users through human workflow commands: setup, adopt, task, verify, and codify
65
74
  - supports explicit workflow lanes: greenfield blueprint, greenfield contract-only, brownfield adoption, and hybrid composition
66
75
  - generates execution-pack context files for AI coding assistants
67
76
  - audits projects against Decantr contracts
@@ -75,10 +84,13 @@ Brownfield analysis also writes `.decantr/doctrine-map.json`, a ranked source-pr
75
84
  ## Common Commands
76
85
 
77
86
  ```bash
87
+ decantr setup
78
88
  decantr new my-app --blueprint=esports-hq
79
- decantr analyze
80
- decantr init --existing --accept-proposal
81
- decantr check --brownfield
89
+ decantr adopt --base-url http://localhost:3000 --evidence --yes
90
+ decantr codify --from-audit
91
+ decantr codify --accept
92
+ decantr task /feed "add saved recipe actions"
93
+ decantr verify --brownfield --local-patterns
82
94
  decantr init --existing --blueprint=esports-hq
83
95
  decantr init --workflow=greenfield --adoption=contract-only
84
96
  decantr rules preview
@@ -86,12 +98,12 @@ decantr rules apply
86
98
  decantr magic "AI-native analytics workspace"
87
99
  decantr audit
88
100
  decantr check
89
- decantr health --ci --fail-on error
101
+ decantr verify --ci --fail-on error
90
102
  decantr studio --port 4319 --host 127.0.0.1
91
103
  decantr telemetry status
92
104
  decantr telemetry explain
93
105
  decantr telemetry link --enable --org <org-slug>
94
- decantr content-health --ci --fail-on error
106
+ decantr content check --ci --fail-on error
95
107
  decantr registry summary --namespace @official --json
96
108
  decantr list blueprints --blueprint-set featured
97
109
  decantr list blueprints --blueprint-set certified
@@ -103,9 +115,17 @@ decantr showcase verification --json
103
115
 
104
116
  ## Project Health And Studio
105
117
 
106
- `decantr health` is the local project observability command. It composes the existing verifier audit, guard checks, brownfield route drift checks, runtime evidence, and execution-pack files into a `ProjectHealthReport` with a status, score, route summary, pack summary, findings, and AI-ready remediation prompts.
118
+ `decantr verify` is the workflow command most users should run locally and in CI. It delegates to Project Health, can add Brownfield guard validation with `--brownfield`, requires an accepted local pattern pack with `--local-patterns`, scans `.decantr/rules.json` when present, supports workspace mode, and writes evidence to `.decantr/evidence/latest.json` by default when `--evidence` is used.
119
+
120
+ `decantr health` remains the advanced project observability primitive. It composes the existing verifier audit, guard checks, brownfield route drift checks, runtime evidence, and execution-pack files into a `ProjectHealthReport` with a status, score, route summary, pack summary, findings, and AI-ready remediation prompts.
107
121
 
108
122
  ```bash
123
+ decantr verify
124
+ decantr verify --brownfield --local-patterns
125
+ decantr verify --brownfield --local-patterns --fail-on warn
126
+ decantr verify --base-url http://localhost:3000 --evidence
127
+ decantr verify --since-baseline
128
+ decantr verify init-ci --project apps/registry
109
129
  decantr health
110
130
  decantr health --format json
111
131
  decantr health --markdown --output health.md
@@ -118,18 +138,18 @@ decantr health --save-baseline
118
138
  decantr health --since-baseline
119
139
  decantr health --design-tokens .decantr/design/figma-tokens.json
120
140
  decantr health --json --output decantr-health.json
121
- decantr health init-ci
122
- decantr health init-ci --fail-on warn --cli-version latest --force
123
- decantr health init-ci --project apps/registry
124
- decantr health init-ci --workspace
141
+ decantr verify init-ci
142
+ decantr verify init-ci --fail-on warn --cli-version latest --force
143
+ decantr verify init-ci --project apps/registry
144
+ decantr verify init-ci --workspace
125
145
  decantr workspace list
126
- decantr workspace health --changed --since origin/main
146
+ decantr verify --workspace --changed --since origin/main
127
147
  decantr export --to figma-tokens
128
148
  ```
129
149
 
130
150
  Use `--json` for machines and schema validation, `--markdown` for CI summaries, `--evidence` for the privacy-redacted Evidence Bundle, and `--prompt <finding-id>` when you want a scoped remediation prompt for an AI assistant. The prompt command prints instructions only; it does not modify source files. `--browser` uses a project-local Playwright install and a supplied base URL to capture local route screenshots under `.decantr/evidence/screenshots/` and write `.decantr/evidence/visual-manifest.json`; missing Playwright becomes a setup finding, not a crash. `--save-baseline` writes `.decantr/health-baseline.json`; `--since-baseline` writes `.decantr/health-baseline-diff.json` with changed files, route impact, finding deltas, screenshot hash drift, and contract drift. `--design-tokens <path>` compares a Tokens Studio/Figma token JSON export against Decantr CSS token names. `--ci --fail-on error` fails only when blocking errors exist; `--ci --fail-on warn` also fails on warnings.
131
151
 
132
- `decantr health init-ci` installs `.github/workflows/decantr-health.yml` for GitHub Actions. The generated workflow installs project dependencies, writes JSON/markdown health artifacts, gates with `decantr health --ci --fail-on error --markdown --output decantr-health.md`, appends the markdown report to the GitHub step summary, and uploads both files as artifacts. Use `--force` to replace an existing workflow, `--fail-on warn` for stricter repositories, or `--cli-version <version|latest>` to pin the package used by CI. In monorepos, add `--project <path>` from the repository root; dependency install stays at the root while health runs inside the app contract and uploads artifacts from that project path. Use `--workspace` to generate an aggregate gate that runs `decantr workspace health` from the repository root and uploads `.decantr/workspace-health.json` plus `.decantr/workspace-health.md`.
152
+ `decantr verify init-ci` installs `.github/workflows/decantr-health.yml` for GitHub Actions. The generated workflow installs project dependencies, writes JSON/markdown health artifacts, gates with the Project Health CI command, appends the markdown report to the GitHub step summary, and uploads both files as artifacts. Use `--force` to replace an existing workflow, `--fail-on warn` for stricter repositories, or `--cli-version <version|latest>` to pin the package used by CI. In monorepos, add `--project <path>` from the repository root; dependency install stays at the root while health runs inside the app contract and uploads artifacts from that project path. Use `--workspace` to generate an aggregate gate that runs `decantr workspace health` from the repository root and uploads `.decantr/workspace-health.json` plus `.decantr/workspace-health.md`.
133
153
 
134
154
  `decantr workspace` is the monorepo reliability namespace. It discovers Decantr projects from `.decantr/workspace.json` or by finding `decantr.essence.json` files, runs projects with deterministic ordering, concurrency, per-project timeout, failure isolation, and aggregate JSON, and can limit a run to changed projects:
135
155
 
@@ -137,7 +157,7 @@ Use `--json` for machines and schema validation, `--markdown` for CI summaries,
137
157
  decantr workspace list
138
158
  decantr workspace health
139
159
  decantr workspace health --json --output .decantr/workspace-health.json
140
- decantr workspace health --changed --since origin/main
160
+ decantr verify --workspace --changed --since origin/main
141
161
  ```
142
162
 
143
163
  `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`.
@@ -181,9 +201,11 @@ decantr telemetry link --enable --org <org-slug>
181
201
 
182
202
  ## Content Health
183
203
 
184
- `decantr content-health` is the local supply-chain observability command for registry content repositories such as `decantr-content`. It is separate from Project Health: Project Health checks an end-user app against its Decantr contract, while Content Health checks published content inputs before they flow into the hosted registry.
204
+ `decantr content check` is the preferred content-author workflow for registry content repositories such as `decantr-content`. `decantr content-health` remains as a backward-compatible primitive. Content Health is separate from Project Health: Project Health checks an end-user app against its Decantr contract, while Content Health checks published content inputs before they flow into the hosted registry.
185
205
 
186
206
  ```bash
207
+ decantr content check
208
+ decantr content check --ci --fail-on error
187
209
  decantr content-health
188
210
  decantr content-health --json
189
211
  decantr content-health --markdown --output content-health.md
@@ -237,7 +259,7 @@ It covers:
237
259
 
238
260
  - greenfield blueprint bootstrap
239
261
  - greenfield contract-only
240
- - brownfield `analyze -> init --existing --accept-proposal -> check --brownfield`
262
+ - brownfield `adopt -> task -> verify`, with `analyze -> init --existing --accept-proposal -> check --brownfield` still covered as primitives
241
263
  - brownfield doctrine maps and contract coverage checks
242
264
  - brownfield semantic route-domain sectioning
243
265
  - direct brownfield compatibility init
@@ -270,7 +292,7 @@ Recommended read order for AI-assisted scaffolding:
270
292
 
271
293
  Treat the compiled execution packs as the source of truth. Use the narrative docs as secondary explanation, start with the shell and route structure first, and run `decantr check` plus `decantr audit` after implementation.
272
294
 
273
- For a broader health pass, run `decantr health` after `refresh`, before opening a pull request, or inside CI. Install the default GitHub Actions gate with `decantr health init-ci`. Findings include remediation commands and can be turned into focused AI prompts with `decantr health --prompt <finding-id>`.
295
+ For a broader health pass, run `decantr verify` after `refresh`, before opening a pull request, or inside CI. Install the default GitHub Actions gate with `decantr verify init-ci`. Findings include remediation commands and can be turned into focused AI prompts with `decantr health --prompt <finding-id>`.
274
296
 
275
297
  For cold-start harness or certification runs, use only the scaffolded workspace files as the contract. If local scaffold files disagree, stop and report the mismatch rather than relying on repo-global Decantr assumptions.
276
298
 
package/dist/bin.js CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-Q5OFRQY6.js";
2
+ import "./chunk-QTPNV5WU.js";
3
3
  import "./chunk-V3XAQWKD.js";
4
4
  import "./chunk-KT2ROK2D.js";