@decantr/cli 2.5.1 → 2.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 +44 -20
- package/dist/bin.js +2 -2
- package/dist/{chunk-NBJCO4G5.js → chunk-3TH5PLFO.js} +1 -1
- package/dist/{chunk-AUQXYJ7T.js → chunk-ICSLIYSX.js} +1 -1
- package/dist/{chunk-IEW2QFYI.js → chunk-KT2ROK2D.js} +553 -486
- package/dist/{chunk-OD46PCR6.js → chunk-PAF4PBD3.js} +219 -9
- package/dist/{chunk-BZWDPAHL.js → chunk-ZYHR3BGT.js} +1484 -370
- package/dist/{heal-M6PRCIIF.js → heal-ZYD6NVGE.js} +2 -2
- package/dist/{health-ZXOPGNBZ.js → health-ETZXWGTW.js} +3 -3
- package/dist/index.js +2 -2
- package/dist/{studio-LHQXHBE7.js → studio-MKLBUC3A.js} +4 -4
- package/dist/{workspace-MOLAGT2B.js → workspace-KSFWRZEX.js} +4 -4
- package/package.json +5 -5
- package/src/templates/DECANTR.md.template +5 -5
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
|
|
22
|
-
Use `decantr
|
|
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` when you want project-owned UI patterns such as local button/card/shell standards to appear in future task context.
|
|
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 task /feed "add saved recipe actions"
|
|
43
|
+
decantr verify --brownfield
|
|
44
|
+
decantr codify
|
|
45
|
+
decantr codify --accept
|
|
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. 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. `decantr
|
|
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 verify --brownfield` uses the Brownfield guard layer to flag actionable missing doctrine coverage, unsafe context, missing assistant bridges, style drift, 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,12 @@ 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
|
|
80
|
-
decantr
|
|
81
|
-
decantr
|
|
89
|
+
decantr adopt --base-url http://localhost:3000 --evidence --yes
|
|
90
|
+
decantr task /feed "add saved recipe actions"
|
|
91
|
+
decantr verify --brownfield --local-patterns
|
|
92
|
+
decantr codify
|
|
82
93
|
decantr init --existing --blueprint=esports-hq
|
|
83
94
|
decantr init --workflow=greenfield --adoption=contract-only
|
|
84
95
|
decantr rules preview
|
|
@@ -86,24 +97,33 @@ decantr rules apply
|
|
|
86
97
|
decantr magic "AI-native analytics workspace"
|
|
87
98
|
decantr audit
|
|
88
99
|
decantr check
|
|
89
|
-
decantr
|
|
100
|
+
decantr verify --ci --fail-on error
|
|
90
101
|
decantr studio --port 4319 --host 127.0.0.1
|
|
91
102
|
decantr telemetry status
|
|
92
103
|
decantr telemetry explain
|
|
93
104
|
decantr telemetry link --enable --org <org-slug>
|
|
94
|
-
decantr content
|
|
105
|
+
decantr content check --ci --fail-on error
|
|
95
106
|
decantr registry summary --namespace @official --json
|
|
96
107
|
decantr list blueprints --blueprint-set featured
|
|
97
108
|
decantr list blueprints --blueprint-set certified
|
|
98
109
|
decantr search dashboard --type blueprint --blueprint-set labs
|
|
110
|
+
decantr suggest "recipe feed with infinite scroll" --route /feed --from-code
|
|
111
|
+
decantr list patterns
|
|
99
112
|
decantr showcase verification --json
|
|
100
113
|
```
|
|
101
114
|
|
|
102
115
|
## Project Health And Studio
|
|
103
116
|
|
|
104
|
-
`decantr
|
|
117
|
+
`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`, supports workspace mode, and writes evidence to `.decantr/evidence/latest.json` by default when `--evidence` is used.
|
|
118
|
+
|
|
119
|
+
`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.
|
|
105
120
|
|
|
106
121
|
```bash
|
|
122
|
+
decantr verify
|
|
123
|
+
decantr verify --brownfield --local-patterns
|
|
124
|
+
decantr verify --base-url http://localhost:3000 --evidence
|
|
125
|
+
decantr verify --since-baseline
|
|
126
|
+
decantr verify init-ci --project apps/registry
|
|
107
127
|
decantr health
|
|
108
128
|
decantr health --format json
|
|
109
129
|
decantr health --markdown --output health.md
|
|
@@ -112,20 +132,22 @@ decantr health --ci --fail-on warn
|
|
|
112
132
|
decantr health --prompt <finding-id>
|
|
113
133
|
decantr health --evidence --output .decantr/evidence/latest.json
|
|
114
134
|
decantr health --browser --base-url http://localhost:3000 --evidence
|
|
135
|
+
decantr health --save-baseline
|
|
136
|
+
decantr health --since-baseline
|
|
115
137
|
decantr health --design-tokens .decantr/design/figma-tokens.json
|
|
116
138
|
decantr health --json --output decantr-health.json
|
|
117
|
-
decantr
|
|
118
|
-
decantr
|
|
119
|
-
decantr
|
|
120
|
-
decantr
|
|
139
|
+
decantr verify init-ci
|
|
140
|
+
decantr verify init-ci --fail-on warn --cli-version latest --force
|
|
141
|
+
decantr verify init-ci --project apps/registry
|
|
142
|
+
decantr verify init-ci --workspace
|
|
121
143
|
decantr workspace list
|
|
122
|
-
decantr workspace
|
|
144
|
+
decantr verify --workspace --changed --since origin/main
|
|
123
145
|
decantr export --to figma-tokens
|
|
124
146
|
```
|
|
125
147
|
|
|
126
|
-
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
|
|
148
|
+
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.
|
|
127
149
|
|
|
128
|
-
`decantr
|
|
150
|
+
`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`.
|
|
129
151
|
|
|
130
152
|
`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:
|
|
131
153
|
|
|
@@ -133,7 +155,7 @@ Use `--json` for machines and schema validation, `--markdown` for CI summaries,
|
|
|
133
155
|
decantr workspace list
|
|
134
156
|
decantr workspace health
|
|
135
157
|
decantr workspace health --json --output .decantr/workspace-health.json
|
|
136
|
-
decantr workspace
|
|
158
|
+
decantr verify --workspace --changed --since origin/main
|
|
137
159
|
```
|
|
138
160
|
|
|
139
161
|
`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`.
|
|
@@ -177,9 +199,11 @@ decantr telemetry link --enable --org <org-slug>
|
|
|
177
199
|
|
|
178
200
|
## Content Health
|
|
179
201
|
|
|
180
|
-
`decantr content
|
|
202
|
+
`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.
|
|
181
203
|
|
|
182
204
|
```bash
|
|
205
|
+
decantr content check
|
|
206
|
+
decantr content check --ci --fail-on error
|
|
183
207
|
decantr content-health
|
|
184
208
|
decantr content-health --json
|
|
185
209
|
decantr content-health --markdown --output content-health.md
|
|
@@ -233,7 +257,7 @@ It covers:
|
|
|
233
257
|
|
|
234
258
|
- greenfield blueprint bootstrap
|
|
235
259
|
- greenfield contract-only
|
|
236
|
-
- brownfield `analyze -> init --existing --accept-proposal -> check --brownfield`
|
|
260
|
+
- brownfield `adopt -> task -> verify`, with `analyze -> init --existing --accept-proposal -> check --brownfield` still covered as primitives
|
|
237
261
|
- brownfield doctrine maps and contract coverage checks
|
|
238
262
|
- brownfield semantic route-domain sectioning
|
|
239
263
|
- direct brownfield compatibility init
|
|
@@ -266,7 +290,7 @@ Recommended read order for AI-assisted scaffolding:
|
|
|
266
290
|
|
|
267
291
|
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.
|
|
268
292
|
|
|
269
|
-
For a broader health pass, run `decantr
|
|
293
|
+
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>`.
|
|
270
294
|
|
|
271
295
|
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.
|
|
272
296
|
|
package/dist/bin.js
CHANGED