@decantr/cli 1.7.28 → 1.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 +44 -6
- package/dist/bin.js +3 -3
- package/dist/chunk-DI2PLOJ6.js +1418 -0
- package/dist/chunk-DONMNPS7.js +466 -0
- package/dist/chunk-RSDCWAHD.js +328 -0
- package/dist/{chunk-GCDFX7UE.js → chunk-USOO77A5.js} +15 -5
- package/dist/{chunk-56VBV4MT.js → chunk-Y45MCRGI.js} +1298 -774
- package/dist/heal-5JHGCLDX.js +9 -0
- package/dist/health-VSL4MROO.js +20 -0
- package/dist/index.js +3 -3
- package/dist/studio-BCTWKXFH.js +309 -0
- package/dist/{upgrade-XMY6LIPS.js → upgrade-4NRDVD5N.js} +1 -1
- package/package.json +5 -5
- package/src/templates/DECANTR.md.template +4 -1
- package/dist/chunk-RRRHQ45P.js +0 -397
- package/dist/heal-SWUFIYU5.js +0 -99
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ npx @decantr/cli new my-app --blueprint=agent-marketplace
|
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
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.
|
|
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
22
|
Use `decantr init` to attach Decantr contract/context files to an existing project or to create a contract-only workspace.
|
|
23
23
|
|
|
24
24
|
Current starter adapter availability:
|
|
@@ -31,11 +31,14 @@ Explicit workflow/adoption flags:
|
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
33
|
decantr init --workflow=greenfield --adoption=contract-only
|
|
34
|
-
decantr
|
|
34
|
+
decantr analyze
|
|
35
|
+
decantr init --existing --accept-proposal
|
|
36
|
+
decantr init --existing --merge-proposal
|
|
35
37
|
decantr init --existing --adoption=style-bridge
|
|
36
38
|
decantr init --existing --adoption=decantr-css
|
|
37
39
|
decantr init --project=apps/web --yes
|
|
38
40
|
decantr init --assistant-bridge=preview
|
|
41
|
+
decantr rules preview
|
|
39
42
|
decantr rules apply
|
|
40
43
|
```
|
|
41
44
|
|
|
@@ -47,7 +50,9 @@ Adoption modes:
|
|
|
47
50
|
|
|
48
51
|
Monorepos store both `workspaceRoot` and `appRoot`. In non-interactive workspace-root runs with multiple app candidates, pass `--project=<path>` so Decantr attaches to the intended app.
|
|
49
52
|
|
|
50
|
-
Assistant rule integration is preview-first: `--assistant-bridge=preview` writes `.decantr/context/assistant-bridge.md`,
|
|
53
|
+
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.
|
|
54
|
+
|
|
55
|
+
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 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.
|
|
51
56
|
|
|
52
57
|
## What It Does
|
|
53
58
|
|
|
@@ -55,6 +60,7 @@ Assistant rule integration is preview-first: `--assistant-bridge=preview` writes
|
|
|
55
60
|
- supports explicit workflow lanes: greenfield blueprint, greenfield contract-only, brownfield adoption, and hybrid composition
|
|
56
61
|
- generates execution-pack context files for AI coding assistants
|
|
57
62
|
- audits projects against Decantr contracts
|
|
63
|
+
- produces local Project Health reports and a localhost Studio dashboard for end-user drift triage
|
|
58
64
|
- searches the registry and showcase benchmark corpus
|
|
59
65
|
- validates, refreshes, and maintains `decantr.essence.json`
|
|
60
66
|
|
|
@@ -63,17 +69,45 @@ Assistant rule integration is preview-first: `--assistant-bridge=preview` writes
|
|
|
63
69
|
```bash
|
|
64
70
|
decantr new my-app --blueprint=agent-marketplace
|
|
65
71
|
decantr analyze
|
|
66
|
-
decantr init --existing --
|
|
72
|
+
decantr init --existing --accept-proposal
|
|
73
|
+
decantr check --brownfield
|
|
67
74
|
decantr init --existing --blueprint=agent-marketplace
|
|
68
75
|
decantr init --workflow=greenfield --adoption=contract-only
|
|
76
|
+
decantr rules preview
|
|
69
77
|
decantr rules apply
|
|
70
78
|
decantr magic "AI-native analytics workspace"
|
|
71
79
|
decantr audit
|
|
72
80
|
decantr check
|
|
81
|
+
decantr health --ci --fail-on error
|
|
82
|
+
decantr studio --port 4319 --host 127.0.0.1
|
|
73
83
|
decantr registry summary --namespace @official --json
|
|
74
84
|
decantr showcase verification --json
|
|
75
85
|
```
|
|
76
86
|
|
|
87
|
+
## Project Health And Studio
|
|
88
|
+
|
|
89
|
+
`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.
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
decantr health
|
|
93
|
+
decantr health --format json
|
|
94
|
+
decantr health --markdown --output health.md
|
|
95
|
+
decantr health --ci --fail-on error
|
|
96
|
+
decantr health --ci --fail-on warn
|
|
97
|
+
decantr health --prompt <finding-id>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Use `--json` for machines and schema validation, `--markdown` for CI summaries, and `--prompt <finding-id>` when you want a scoped remediation prompt for an AI assistant. `--ci --fail-on error` fails only when blocking errors exist; `--ci --fail-on warn` also fails on warnings.
|
|
101
|
+
|
|
102
|
+
`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`.
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
decantr studio
|
|
106
|
+
decantr studio --port 4319 --host 127.0.0.1
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Studio is for local triage, not Decantr admin telemetry. The tabs cover Overview, Routes, Drift, Findings, Remediation, CI, and Packs without uploading source code, prompts, file paths, or project data.
|
|
110
|
+
|
|
77
111
|
## Greenfield Certification
|
|
78
112
|
|
|
79
113
|
Use the built-in certification harness before releases when you want to prove that representative blueprints still scaffold into runnable starter projects:
|
|
@@ -115,8 +149,10 @@ It covers:
|
|
|
115
149
|
|
|
116
150
|
- greenfield blueprint bootstrap
|
|
117
151
|
- greenfield contract-only
|
|
118
|
-
- brownfield `analyze -> init --existing`
|
|
119
|
-
-
|
|
152
|
+
- brownfield `analyze -> init --existing --accept-proposal -> check --brownfield`
|
|
153
|
+
- brownfield doctrine maps and contract coverage checks
|
|
154
|
+
- brownfield semantic route-domain sectioning
|
|
155
|
+
- direct brownfield compatibility init
|
|
120
156
|
- adoption modes (`contract-only`, `style-bridge`, `decantr-css`)
|
|
121
157
|
- offline contract-only and offline blueprint flows
|
|
122
158
|
- unsupported target contract-only fallback
|
|
@@ -146,6 +182,8 @@ Recommended read order for AI-assisted scaffolding:
|
|
|
146
182
|
|
|
147
183
|
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.
|
|
148
184
|
|
|
185
|
+
For a broader health pass, run `decantr health` after `refresh`, before opening a pull request, or inside CI. Findings include remediation commands and can be turned into focused AI prompts with `decantr health --prompt <finding-id>`.
|
|
186
|
+
|
|
149
187
|
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.
|
|
150
188
|
|
|
151
189
|
## Related Packages
|
package/dist/bin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-
|
|
3
|
-
import "./chunk-
|
|
4
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-Y45MCRGI.js";
|
|
3
|
+
import "./chunk-USOO77A5.js";
|
|
4
|
+
import "./chunk-DI2PLOJ6.js";
|