doctrina-cli 0.13.0 → 0.15.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 +1 -1
- package/package.json +3 -2
- package/src/commands/adapter.js +205 -0
- package/src/commands/analyze.js +120 -17
- package/src/commands/change.js +100 -42
- package/src/commands/clarify.js +8 -1
- package/src/commands/close.js +57 -2
- package/src/commands/completion.js +6 -0
- package/src/commands/constitution.js +8 -1
- package/src/commands/context.js +391 -58
- package/src/commands/contract.js +76 -43
- package/src/commands/coverage.js +126 -12
- package/src/commands/decision.js +172 -40
- package/src/commands/doctor.js +92 -11
- package/src/commands/handoff.js +8 -1
- package/src/commands/hooks.js +6 -0
- package/src/commands/index-rebuild.js +8 -1
- package/src/commands/init.js +139 -6
- package/src/commands/intake.js +11 -2
- package/src/commands/intent.js +8 -1
- package/src/commands/metrics.js +80 -7
- package/src/commands/next.js +38 -3
- package/src/commands/prime.js +8 -1
- package/src/commands/report.js +8 -1
- package/src/commands/review.js +8 -1
- package/src/commands/search.js +8 -1
- package/src/commands/show.js +8 -1
- package/src/commands/skill.js +201 -8
- package/src/commands/spec.js +13 -6
- package/src/commands/status.js +14 -2
- package/src/commands/templates.js +193 -59
- package/src/commands/trace.js +15 -3
- package/src/commands/triage.js +248 -0
- package/src/commands/upgrade.js +8 -1
- package/src/commands/validate.js +148 -5
- package/src/commands/verify.js +126 -5
- package/src/commands/watch.js +8 -1
- package/src/commands/why.js +10 -24
- package/src/commands/work.js +44 -3
- package/src/index.js +61 -6
- package/src/lib/adapters.js +140 -0
- package/src/lib/adr-guard.js +1 -0
- package/src/lib/args.js +10 -0
- package/src/lib/clarity.js +1 -0
- package/src/lib/colors.js +1 -0
- package/src/lib/commands.js +252 -27
- package/src/lib/criteria.js +1 -0
- package/src/lib/dates.js +1 -0
- package/src/lib/diff.js +1 -0
- package/src/lib/doc-model.js +287 -0
- package/src/lib/docs-impact.js +167 -0
- package/src/lib/ears.js +1 -0
- package/src/lib/exit-codes.js +103 -0
- package/src/lib/flag-catalog.js +106 -0
- package/src/lib/fs-ops.js +1 -0
- package/src/lib/gates.js +123 -0
- package/src/lib/git.js +97 -0
- package/src/lib/index-json.js +14 -6
- package/src/lib/json-out.js +83 -0
- package/src/lib/pipeline.js +161 -0
- package/src/lib/prompt.js +18 -1
- package/src/lib/runtime.js +683 -0
- package/src/lib/scan.js +81 -33
- package/src/lib/spec-ops.js +94 -9
- package/src/lib/suggest.js +1 -0
- package/src/lib/templates.js +89 -0
- package/src/lib/usage.js +89 -0
- package/src/lib/version.js +1 -0
- package/templates/AGENTS.md.template +59 -53
- package/templates/contract.md.template +74 -3
- package/templates/spec.md.template +22 -0
|
@@ -32,11 +32,82 @@ Variables the running system requires, named IDENTICALLY across code,
|
|
|
32
32
|
`.env.example`, and infra (compose/helm). `doctrina contract check` warns
|
|
33
33
|
when a variable here is missing from `.env.example` — the DATABASE_URL /
|
|
34
34
|
KAFKA_BROKER drift class.
|
|
35
|
+
|
|
36
|
+
Values declares an ENUM when the variable is one. Write the alternation
|
|
37
|
+
with escaped pipes so the table survives: `none\|critical\|serious`.
|
|
38
|
+
check then fails an .env.example value outside the set (RT04), and warns
|
|
39
|
+
when the consumer never mentions any member — an enum nothing validates.
|
|
40
|
+
Leave Values empty or `—` for free-form variables.
|
|
41
|
+
-->
|
|
42
|
+
|
|
43
|
+
| Variable | Required | Values | Example |
|
|
44
|
+
|--------------|----------|--------|-------------------------------------------|
|
|
45
|
+
| DATABASE_URL | yes | — | postgres://user:pass@localhost:5432/app |
|
|
46
|
+
|
|
47
|
+
## Wiring
|
|
48
|
+
|
|
49
|
+
<!--
|
|
50
|
+
Where each variable's value COMES FROM, and what reads it. This is the
|
|
51
|
+
table that closes the gap between "I configured it" and "the process saw
|
|
52
|
+
it": a variable can be set in the CI provider and still never reach the
|
|
53
|
+
program, because no `env:` line ever exports it.
|
|
54
|
+
|
|
55
|
+
Origin vars | secrets | literal | local
|
|
56
|
+
vars and secrets are CI-injected, and CI injects the EMPTY
|
|
57
|
+
STRING for one that is unset — not "absent". That is why a
|
|
58
|
+
`getenv(NAME, default)` default silently never applies.
|
|
59
|
+
Workflow repo-relative path to the workflow/pipeline file.
|
|
60
|
+
Job/Step the job (or step) whose env: block must export it.
|
|
61
|
+
Consumer the file that reads it.
|
|
62
|
+
|
|
63
|
+
`doctrina contract check` then verifies (RT01/RT02) that the workflow
|
|
64
|
+
really exports it, from the origin and under the name declared, and
|
|
65
|
+
(RT03) that the consumer does not give it a default only an ABSENT
|
|
66
|
+
value would trigger.
|
|
67
|
+
|
|
68
|
+
Delete the rows that do not apply. A contract with no Wiring rows is
|
|
69
|
+
not "verified" — it is unchecked, and check says so.
|
|
70
|
+
-->
|
|
71
|
+
|
|
72
|
+
| Variable | Origin | Workflow | Job/Step | Consumer |
|
|
73
|
+
|----------|--------|----------|----------|----------|
|
|
74
|
+
| <NAME> | vars | <path> | <job> | <file> |
|
|
75
|
+
|
|
76
|
+
## Selectors
|
|
77
|
+
|
|
78
|
+
<!--
|
|
79
|
+
The test selectors (BDD tags, suite names, filter expressions) this
|
|
80
|
+
project DISPATCHES on. A selector that matches nothing runs zero cases
|
|
81
|
+
and still exits 0 — a green job that tested nothing.
|
|
82
|
+
|
|
83
|
+
Source glob for the files the selectors live in.
|
|
84
|
+
Pattern a regex whose FIRST GROUP captures the selector name.
|
|
85
|
+
Used by the selectors a pipeline actually dispatches on.
|
|
86
|
+
|
|
87
|
+
Doctrina knows no test runner: it extracts with the pattern you declare
|
|
88
|
+
and checks each selector in "Used by" against what it found (RT05),
|
|
89
|
+
naming a near-miss when only the separator differs.
|
|
90
|
+
|
|
91
|
+
Example (Behave): features/**/*.feature with pattern @([a-z0-9_-]+)
|
|
92
|
+
-->
|
|
93
|
+
|
|
94
|
+
| Selector | Source | Pattern | Used by |
|
|
95
|
+
|----------|--------|---------|---------|
|
|
96
|
+
| <NAME> | <glob> | <regex> | <tag> |
|
|
97
|
+
|
|
98
|
+
## Budgets
|
|
99
|
+
|
|
100
|
+
<!--
|
|
101
|
+
Ceilings that are a CONTRACT, not a preference: token limits, payload
|
|
102
|
+
caps, timeouts. Direction distinguishes what goes IN from what comes
|
|
103
|
+
OUT, because they fail differently — and `doctrina analyze` refuses a
|
|
104
|
+
change that "fixes" an overflow by raising an OUTPUT ceiling, which
|
|
105
|
+
buys headroom by truncating what mattered rather than sending less.
|
|
35
106
|
-->
|
|
36
107
|
|
|
37
|
-
|
|
|
38
|
-
|
|
39
|
-
|
|
|
108
|
+
| Limit | Direction | Value |
|
|
109
|
+
|--------|--------------|---------|
|
|
110
|
+
| <NAME> | input/output | <count> |
|
|
40
111
|
|
|
41
112
|
## Interfaces
|
|
42
113
|
|
|
@@ -71,6 +71,28 @@ Easy Approach to Requirements Syntax. Use one of the five forms per item:
|
|
|
71
71
|
|
|
72
72
|
-
|
|
73
73
|
|
|
74
|
+
### Pipeline
|
|
75
|
+
|
|
76
|
+
<!--
|
|
77
|
+
OPTIONAL, and only for capabilities with an ORDER. The five EARS forms
|
|
78
|
+
state each requirement independently and truthfully, and say nothing about
|
|
79
|
+
sequence: "when the run finishes, append a summary" and "when the analysis
|
|
80
|
+
completes, publish the dashboard" both pass every gate, and neither says
|
|
81
|
+
the dashboard needs the analysis to have run first. The result ships green
|
|
82
|
+
and one run stale.
|
|
83
|
+
|
|
84
|
+
Declare the order and the artifact each step hands on. `doctrina validate`
|
|
85
|
+
then enforces the one invariant a numbered list cannot: a step may only
|
|
86
|
+
require what an EARLIER step produced.
|
|
87
|
+
|
|
88
|
+
1. run-suite — produces `reports/results.json`
|
|
89
|
+
2. analyse — requires `reports/results.json`, produces `reports/analysis.md`
|
|
90
|
+
3. publish — requires `reports/analysis.md`
|
|
91
|
+
|
|
92
|
+
Mark inputs that come from outside the pipeline `(external)`. Delete this
|
|
93
|
+
section when the capability has no ordering.
|
|
94
|
+
-->
|
|
95
|
+
|
|
74
96
|
## Acceptance criteria
|
|
75
97
|
|
|
76
98
|
<!--
|