@decantr/cli 2.8.0 → 2.9.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 +42 -19
- package/dist/bin.js +4 -2
- package/dist/{chunk-KT2ROK2D.js → chunk-34TZXWIF.js} +1858 -1542
- package/dist/{chunk-QTPNV5WU.js → chunk-N7A3WUZ2.js} +3093 -2073
- package/dist/{chunk-ICSLIYSX.js → chunk-T5INVSOP.js} +138 -23
- package/dist/{chunk-PAF4PBD3.js → chunk-TMOCTDYY.js} +28 -8
- package/dist/{content-health-QQHBR6XG.js → content-health-4KP2EGTI.js} +27 -10
- package/dist/{heal-ZYD6NVGE.js → heal-2BDT7TR5.js} +1 -2
- package/dist/{health-ETZXWGTW.js → health-Q7XF3I5Z.js} +2 -3
- package/dist/index.js +4 -2
- package/dist/{studio-MKLBUC3A.js → studio-B2Y4TKZ5.js} +3 -4
- package/dist/{workspace-KSFWRZEX.js → workspace-H5QQJCCI.js} +5 -4
- package/package.json +3 -3
- package/dist/chunk-3TH5PLFO.js +0 -331
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ npx @decantr/cli new my-app --blueprint=esports-hq
|
|
|
20
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.
|
|
21
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`.
|
|
22
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,
|
|
23
|
+
Use `decantr doctor` when the next step is unclear, `decantr task` before asking an LLM to modify a route, `decantr verify` after the edit, and `decantr ci` in required automation. 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
24
|
Use `decantr init`, `decantr analyze`, `decantr check`, and `decantr health` as advanced primitives when you need direct control over one step.
|
|
25
25
|
|
|
26
26
|
Current starter adapter availability:
|
|
@@ -38,7 +38,10 @@ Explicit workflow/adoption flags:
|
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
decantr setup
|
|
41
|
-
decantr adopt --
|
|
41
|
+
decantr adopt --yes
|
|
42
|
+
decantr doctor
|
|
43
|
+
decantr ci --fail-on error
|
|
44
|
+
decantr ci init
|
|
42
45
|
decantr codify --from-audit
|
|
43
46
|
decantr codify --accept
|
|
44
47
|
decantr task /feed "add saved recipe actions"
|
|
@@ -61,7 +64,16 @@ Adoption modes:
|
|
|
61
64
|
- `style-bridge` writes bridge tokens/files that map Decantr intent onto an existing style system without requiring `@decantr/css`.
|
|
62
65
|
- `decantr-css` writes the full Decantr CSS files and runtime guidance.
|
|
63
66
|
|
|
64
|
-
Monorepos store both `workspaceRoot` and `appRoot`.
|
|
67
|
+
Monorepos store both `workspaceRoot` and `appRoot`. Install Decantr at the workspace root if that is where dependencies are managed, but attach Decantr to an app root with `--project=<path>`.
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pnpm add -D -w @decantr/cli
|
|
71
|
+
pnpm exec decantr setup
|
|
72
|
+
pnpm exec decantr workspace list
|
|
73
|
+
pnpm exec decantr adopt --project apps/web --yes
|
|
74
|
+
pnpm exec decantr doctor --project apps/web
|
|
75
|
+
pnpm exec decantr ci init --project apps/web
|
|
76
|
+
```
|
|
65
77
|
|
|
66
78
|
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.
|
|
67
79
|
|
|
@@ -70,7 +82,7 @@ Brownfield analysis also writes `.decantr/doctrine-map.json`, a ranked source-pr
|
|
|
70
82
|
## What It Does
|
|
71
83
|
|
|
72
84
|
- scaffolds Decantr projects from blueprints, archetypes, or prompts
|
|
73
|
-
- guides users through human workflow commands: setup, adopt, task, verify, and codify
|
|
85
|
+
- guides users through human workflow commands: setup, adopt, doctor, task, verify, ci, and codify
|
|
74
86
|
- supports explicit workflow lanes: greenfield blueprint, greenfield contract-only, brownfield adoption, and hybrid composition
|
|
75
87
|
- generates execution-pack context files for AI coding assistants
|
|
76
88
|
- audits projects against Decantr contracts
|
|
@@ -86,11 +98,18 @@ Brownfield analysis also writes `.decantr/doctrine-map.json`, a ranked source-pr
|
|
|
86
98
|
```bash
|
|
87
99
|
decantr setup
|
|
88
100
|
decantr new my-app --blueprint=esports-hq
|
|
89
|
-
decantr adopt --
|
|
101
|
+
decantr adopt --yes
|
|
102
|
+
decantr adopt --project apps/web --yes
|
|
103
|
+
decantr doctor
|
|
104
|
+
decantr doctor --project apps/web
|
|
90
105
|
decantr codify --from-audit
|
|
91
106
|
decantr codify --accept
|
|
92
107
|
decantr task /feed "add saved recipe actions"
|
|
93
108
|
decantr verify --brownfield --local-patterns
|
|
109
|
+
decantr verify --base-url http://localhost:3000 --evidence
|
|
110
|
+
decantr ci --project apps/web
|
|
111
|
+
decantr ci --workspace --changed --since origin/main
|
|
112
|
+
decantr ci init --project apps/web
|
|
94
113
|
decantr init --existing --blueprint=esports-hq
|
|
95
114
|
decantr init --workflow=greenfield --adoption=contract-only
|
|
96
115
|
decantr rules preview
|
|
@@ -98,7 +117,6 @@ decantr rules apply
|
|
|
98
117
|
decantr magic "AI-native analytics workspace"
|
|
99
118
|
decantr audit
|
|
100
119
|
decantr check
|
|
101
|
-
decantr verify --ci --fail-on error
|
|
102
120
|
decantr studio --port 4319 --host 127.0.0.1
|
|
103
121
|
decantr telemetry status
|
|
104
122
|
decantr telemetry explain
|
|
@@ -115,7 +133,11 @@ decantr showcase verification --json
|
|
|
115
133
|
|
|
116
134
|
## Project Health And Studio
|
|
117
135
|
|
|
118
|
-
`decantr verify` is the workflow command most users should run locally
|
|
136
|
+
`decantr verify` is the workflow command most users should run locally after edits. 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.
|
|
137
|
+
|
|
138
|
+
`decantr doctor` explains project/workspace state, adoption mode, generated artifacts, local law, visual evidence, design authority signals, CI wiring, and the next command to run. It is the command to reach for when an app is in a monorepo, has stale Decantr files, or someone is not sure what Decantr expects next.
|
|
139
|
+
|
|
140
|
+
`decantr ci` is the blessed non-mutating automation gate. It runs the Project Health surface with adoption-mode-aware local law checks and emits a schema-backed CI report. `decantr ci init` writes root GitHub workflows or portable generic snippets using the detected package manager and pinned local CLI command instead of `@latest`.
|
|
119
141
|
|
|
120
142
|
`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.
|
|
121
143
|
|
|
@@ -125,12 +147,13 @@ decantr verify --brownfield --local-patterns
|
|
|
125
147
|
decantr verify --brownfield --local-patterns --fail-on warn
|
|
126
148
|
decantr verify --base-url http://localhost:3000 --evidence
|
|
127
149
|
decantr verify --since-baseline
|
|
128
|
-
decantr
|
|
150
|
+
decantr doctor --project apps/registry
|
|
151
|
+
decantr ci --project apps/registry
|
|
152
|
+
decantr ci init --project apps/registry
|
|
153
|
+
decantr ci init --provider generic --project apps/registry
|
|
129
154
|
decantr health
|
|
130
155
|
decantr health --format json
|
|
131
156
|
decantr health --markdown --output health.md
|
|
132
|
-
decantr health --ci --fail-on error
|
|
133
|
-
decantr health --ci --fail-on warn
|
|
134
157
|
decantr health --prompt <finding-id>
|
|
135
158
|
decantr health --evidence --output .decantr/evidence/latest.json
|
|
136
159
|
decantr health --browser --base-url http://localhost:3000 --evidence
|
|
@@ -138,20 +161,20 @@ decantr health --save-baseline
|
|
|
138
161
|
decantr health --since-baseline
|
|
139
162
|
decantr health --design-tokens .decantr/design/figma-tokens.json
|
|
140
163
|
decantr health --json --output decantr-health.json
|
|
141
|
-
decantr
|
|
142
|
-
decantr
|
|
143
|
-
decantr
|
|
144
|
-
decantr
|
|
164
|
+
decantr ci init
|
|
165
|
+
decantr ci init --fail-on warn --force
|
|
166
|
+
decantr ci init --project apps/registry
|
|
167
|
+
decantr ci init --workspace
|
|
145
168
|
decantr workspace list
|
|
146
169
|
decantr verify --workspace --changed --since origin/main
|
|
147
170
|
decantr export --to figma-tokens
|
|
148
171
|
```
|
|
149
172
|
|
|
150
|
-
Use `--json` for machines and schema validation, `--markdown` for
|
|
173
|
+
Use `--json` for machines and schema validation, `--markdown` for 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. `decantr ci --fail-on error` fails only when blocking errors exist; `decantr ci --fail-on warn` also fails on warnings.
|
|
151
174
|
|
|
152
|
-
`decantr
|
|
175
|
+
`decantr ci init` installs `.github/workflows/decantr-ci.yml` for GitHub Actions. The generated workflow installs dependencies at the workspace root, writes JSON/markdown CI artifacts, gates with `decantr ci`, appends the markdown report to the GitHub step summary, and uploads both files as artifacts. Use `--force` to replace an existing workflow or `--fail-on warn` for stricter repositories. In monorepos, add `--project <path>` from the repository root; dependency install stays at the root while CI evaluates the app contract and uploads app-scoped artifacts. Use `--workspace` to generate an aggregate gate. Use `--provider generic` for Jenkins, Please, Buildkite, GitLab, Azure DevOps, or internal deployment tools. Generated CI uses the pinned local package-manager command and does not depend on `@latest`.
|
|
153
176
|
|
|
154
|
-
`decantr workspace` is the monorepo reliability namespace.
|
|
177
|
+
`decantr workspace` is the monorepo reliability namespace. Before attach, `workspace list` shows app candidates. After attach, it also discovers Decantr projects from `.decantr/workspace.json` or by finding `decantr.essence.json` files. Workspace health runs projects with deterministic ordering, concurrency, per-project timeout, failure isolation, and aggregate JSON, and can limit a run to changed projects:
|
|
155
178
|
|
|
156
179
|
```bash
|
|
157
180
|
decantr workspace list
|
|
@@ -211,7 +234,7 @@ decantr content-health --json
|
|
|
211
234
|
decantr content-health --markdown --output content-health.md
|
|
212
235
|
decantr content-health --ci --fail-on error
|
|
213
236
|
decantr content-health --ci --fail-on warn
|
|
214
|
-
decantr content
|
|
237
|
+
decantr content check --prompt <finding-id>
|
|
215
238
|
```
|
|
216
239
|
|
|
217
240
|
The report validates local `patterns/`, `themes/`, `blueprints/`, `archetypes/`, and `shells/` against the published registry schemas, checks hard references such as blueprint themes and composed archetypes, summarizes softer generation-coverage gaps such as missing pattern coverage, and emits AI-ready remediation prompts. It does not call the hosted registry by default; use the existing registry drift audits when you need live publish parity.
|
|
@@ -292,7 +315,7 @@ Recommended read order for AI-assisted scaffolding:
|
|
|
292
315
|
|
|
293
316
|
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.
|
|
294
317
|
|
|
295
|
-
For a broader health pass, run `decantr verify` after `refresh
|
|
318
|
+
For a broader health pass, run `decantr verify` after `refresh` or before opening a pull request, and run `decantr ci` inside CI. Install the default GitHub Actions gate with `decantr ci init`. Findings include remediation commands and can be turned into focused AI prompts with `decantr health --prompt <finding-id>`.
|
|
296
319
|
|
|
297
320
|
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.
|
|
298
321
|
|
package/dist/bin.js
CHANGED