@decantr/cli 2.8.1 → 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 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, 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.
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:
@@ -39,6 +39,9 @@ Explicit workflow/adoption flags:
39
39
  ```bash
40
40
  decantr setup
41
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"
@@ -68,6 +71,8 @@ pnpm add -D -w @decantr/cli
68
71
  pnpm exec decantr setup
69
72
  pnpm exec decantr workspace list
70
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
71
76
  ```
72
77
 
73
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.
@@ -77,7 +82,7 @@ Brownfield analysis also writes `.decantr/doctrine-map.json`, a ranked source-pr
77
82
  ## What It Does
78
83
 
79
84
  - scaffolds Decantr projects from blueprints, archetypes, or prompts
80
- - 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
81
86
  - supports explicit workflow lanes: greenfield blueprint, greenfield contract-only, brownfield adoption, and hybrid composition
82
87
  - generates execution-pack context files for AI coding assistants
83
88
  - audits projects against Decantr contracts
@@ -95,11 +100,16 @@ decantr setup
95
100
  decantr new my-app --blueprint=esports-hq
96
101
  decantr adopt --yes
97
102
  decantr adopt --project apps/web --yes
103
+ decantr doctor
104
+ decantr doctor --project apps/web
98
105
  decantr codify --from-audit
99
106
  decantr codify --accept
100
107
  decantr task /feed "add saved recipe actions"
101
108
  decantr verify --brownfield --local-patterns
102
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
103
113
  decantr init --existing --blueprint=esports-hq
104
114
  decantr init --workflow=greenfield --adoption=contract-only
105
115
  decantr rules preview
@@ -107,7 +117,6 @@ decantr rules apply
107
117
  decantr magic "AI-native analytics workspace"
108
118
  decantr audit
109
119
  decantr check
110
- decantr verify --ci --fail-on error
111
120
  decantr studio --port 4319 --host 127.0.0.1
112
121
  decantr telemetry status
113
122
  decantr telemetry explain
@@ -124,7 +133,11 @@ decantr showcase verification --json
124
133
 
125
134
  ## Project Health And Studio
126
135
 
127
- `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.
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`.
128
141
 
129
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.
130
143
 
@@ -134,12 +147,13 @@ decantr verify --brownfield --local-patterns
134
147
  decantr verify --brownfield --local-patterns --fail-on warn
135
148
  decantr verify --base-url http://localhost:3000 --evidence
136
149
  decantr verify --since-baseline
137
- decantr verify init-ci --project apps/registry
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
138
154
  decantr health
139
155
  decantr health --format json
140
156
  decantr health --markdown --output health.md
141
- decantr health --ci --fail-on error
142
- decantr health --ci --fail-on warn
143
157
  decantr health --prompt <finding-id>
144
158
  decantr health --evidence --output .decantr/evidence/latest.json
145
159
  decantr health --browser --base-url http://localhost:3000 --evidence
@@ -147,18 +161,18 @@ decantr health --save-baseline
147
161
  decantr health --since-baseline
148
162
  decantr health --design-tokens .decantr/design/figma-tokens.json
149
163
  decantr health --json --output decantr-health.json
150
- decantr verify init-ci
151
- decantr verify init-ci --fail-on warn --cli-version latest --force
152
- decantr verify init-ci --project apps/registry
153
- decantr verify init-ci --workspace
164
+ decantr ci init
165
+ decantr ci init --fail-on warn --force
166
+ decantr ci init --project apps/registry
167
+ decantr ci init --workspace
154
168
  decantr workspace list
155
169
  decantr verify --workspace --changed --since origin/main
156
170
  decantr export --to figma-tokens
157
171
  ```
158
172
 
159
- 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.
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.
160
174
 
161
- `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`.
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`.
162
176
 
163
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:
164
178
 
@@ -220,7 +234,7 @@ decantr content-health --json
220
234
  decantr content-health --markdown --output content-health.md
221
235
  decantr content-health --ci --fail-on error
222
236
  decantr content-health --ci --fail-on warn
223
- decantr content-health --prompt <finding-id>
237
+ decantr content check --prompt <finding-id>
224
238
  ```
225
239
 
226
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.
@@ -301,7 +315,7 @@ Recommended read order for AI-assisted scaffolding:
301
315
 
302
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.
303
317
 
304
- 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>`.
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>`.
305
319
 
306
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.
307
321
 
package/dist/bin.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-RKZMHS2K.js";
2
+ import "./chunk-N7A3WUZ2.js";
3
3
  import "./chunk-V3XAQWKD.js";
4
- import "./chunk-VE6N3XWG.js";
5
- import "./chunk-KT2ROK2D.js";
4
+ import "./chunk-T5INVSOP.js";
5
+ import "./chunk-TMOCTDYY.js";
6
+ import "./chunk-34TZXWIF.js";