@am_shork/attest 0.3.0 → 0.4.1
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/CHANGELOG.md +394 -2
- package/README.md +47 -264
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/json.d.ts.map +1 -1
- package/dist/cli/json.js +25 -1
- package/dist/cli/json.js.map +1 -1
- package/dist/cli/report.d.ts.map +1 -1
- package/dist/cli/report.js +78 -5
- package/dist/cli/report.js.map +1 -1
- package/dist/core/apply.d.ts.map +1 -1
- package/dist/core/apply.js.map +1 -1
- package/dist/core/docs.d.ts +23 -0
- package/dist/core/docs.d.ts.map +1 -0
- package/dist/core/docs.js +91 -0
- package/dist/core/docs.js.map +1 -0
- package/dist/core/loader.d.ts.map +1 -1
- package/dist/core/loader.js +18 -1
- package/dist/core/loader.js.map +1 -1
- package/dist/core/locate.d.ts +18 -1
- package/dist/core/locate.d.ts.map +1 -1
- package/dist/core/locate.js +68 -4
- package/dist/core/locate.js.map +1 -1
- package/dist/core/pipeline.d.ts +12 -3
- package/dist/core/pipeline.d.ts.map +1 -1
- package/dist/core/pipeline.js +22 -1
- package/dist/core/pipeline.js.map +1 -1
- package/dist/core/red-record.d.ts +6 -0
- package/dist/core/red-record.d.ts.map +1 -1
- package/dist/core/red-record.js +31 -2
- package/dist/core/red-record.js.map +1 -1
- package/dist/core/runner.d.ts +1 -1
- package/dist/core/runner.d.ts.map +1 -1
- package/dist/core/runner.js +20 -5
- package/dist/core/runner.js.map +1 -1
- package/dist/core/static-registry.d.ts.map +1 -1
- package/dist/core/static-registry.js +5 -0
- package/dist/core/static-registry.js.map +1 -1
- package/dist/core/types.d.ts +22 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/version.d.ts.map +1 -0
- package/dist/{cli → core}/version.js +5 -1
- package/dist/core/version.js.map +1 -0
- package/package.json +5 -5
- package/dist/cli/version.d.ts.map +0 -1
- package/dist/cli/version.js.map +0 -1
- /package/dist/{cli → core}/version.d.ts +0 -0
package/README.md
CHANGED
|
@@ -21,12 +21,16 @@ the stronger property; noticing that it *moved* is `verify`'s job, and only when
|
|
|
21
21
|
a scenario asserts on the value it read from `params`. Read the param inside the
|
|
22
22
|
assertion, not beside it.
|
|
23
23
|
|
|
24
|
-
See the authoritative design — [English](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/attest-design.md) · [中文](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/zh/attest-design.md) — and the rest of the [docs](https://gitlab.com/Pseudorca/attest/-/tree/main/docs).
|
|
25
|
-
|
|
26
24
|
## Prerequisites
|
|
27
25
|
|
|
28
26
|
- Node ≥ 20.19
|
|
29
|
-
- pnpm, plus `vitest`
|
|
27
|
+
- pnpm, plus `vitest` ≥ 4 and `vite` ≥ 8 (peer dependencies)
|
|
28
|
+
|
|
29
|
+
The peer range is exactly the one CI runs, which is the point of it. Older majors
|
|
30
|
+
are not merely untested: `verify` relies on a `startVitest` signature that Vitest
|
|
31
|
+
narrowed by 4, and ATX-36 — reading a registry opens no listening socket — is
|
|
32
|
+
asserted against the Vite that is installed, so on any other major it is a claim
|
|
33
|
+
rather than a measurement. If you are on Vitest 2 or 3, stay on `0.3.x`.
|
|
30
34
|
|
|
31
35
|
## Getting started
|
|
32
36
|
|
|
@@ -37,9 +41,10 @@ pnpm add -D @am_shork/attest vitest vite
|
|
|
37
41
|
```
|
|
38
42
|
|
|
39
43
|
**1. Declare a requirement** (`requirements/auth.reqs.ts`) — import the intent API
|
|
40
|
-
from the vitest-free `/define` subpath so registry loading never touches the
|
|
41
|
-
A registry is a **literal**: every value is written where you can read
|
|
42
|
-
|
|
44
|
+
from the vitest-free `/define` subpath so registry loading never touches the
|
|
45
|
+
runtime. A registry is a **literal**: every value is written where you can read
|
|
46
|
+
it, because the commands below read it without executing it
|
|
47
|
+
([why](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/cli-reference.md#a-registry-is-a-literal)).
|
|
43
48
|
|
|
44
49
|
```ts
|
|
45
50
|
import { defineRequirements } from '@am_shork/attest/define';
|
|
@@ -72,12 +77,6 @@ requirement('AUTH-3', () => {
|
|
|
72
77
|
});
|
|
73
78
|
```
|
|
74
79
|
|
|
75
|
-
`scenario` takes an optional third argument, a timeout in milliseconds, forwarded
|
|
76
|
-
to Vitest's `it`. The run is isolated (see [What a run actually
|
|
77
|
-
runs](#what-a-run-actually-runs)), so Vitest's default applies unless a scenario
|
|
78
|
-
says otherwise — worth setting on anything that drives a subprocess, a container
|
|
79
|
-
or a build.
|
|
80
|
-
|
|
81
80
|
**3. Run the engine:**
|
|
82
81
|
|
|
83
82
|
```bash
|
|
@@ -91,31 +90,10 @@ attest archive <change> # gate a proposed change: green + covered + no drift
|
|
|
91
90
|
attest status <change> # what that gate still wants, without running anything
|
|
92
91
|
```
|
|
93
92
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
`status` is the mid-flight view `archive` cannot give you: it reports each
|
|
100
|
-
requirement the change adds as `no-scenario`, `unproven` (a scenario exists but
|
|
101
|
-
has never been seen failing) or `proven`, reading the delta, the specs and
|
|
102
|
-
`first-run.json` — no suite run, no project code. Every state is named after the
|
|
103
|
-
issue the gate will raise, and it uses the gate's own predicate, so the two
|
|
104
|
-
cannot disagree. What it deliberately cannot tell you is whether the tests pass:
|
|
105
|
-
|
|
106
|
-
```console
|
|
107
|
-
$ attest status add-2fa
|
|
108
|
-
Change: add-2fa
|
|
109
|
-
✓ AUTH-7 2 scenarios, seen red
|
|
110
|
-
● AUTH-8 1 never run
|
|
111
|
-
✗ AUTH-9 no scenario yet
|
|
112
|
-
— 3 added requirements, 1 ready to archive
|
|
113
|
-
Not a verdict: run `attest archive add-2fa` to run the suite.
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
It exits 0 there. Unmet obligations are the normal state of a change in flight,
|
|
117
|
-
so they are rows, never a failing verdict — only a delta it could not read makes
|
|
118
|
-
`status` fail. `archive` remains the one command that says "done".
|
|
93
|
+
Every command takes the project root as an optional last argument, and `--json`
|
|
94
|
+
for exactly one machine-readable document on stdout. Flags, per-command
|
|
95
|
+
behaviour and the JSON shape are in the
|
|
96
|
+
[CLI reference](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/cli-reference.md).
|
|
119
97
|
|
|
120
98
|
### Working with an agent
|
|
121
99
|
|
|
@@ -124,245 +102,50 @@ agree on intent, write the delta, drive the scenarios red, then implement to
|
|
|
124
102
|
green — and it is written for an agent to follow:
|
|
125
103
|
|
|
126
104
|
```bash
|
|
127
|
-
attest init
|
|
128
|
-
attest init --target cursor
|
|
129
|
-
attest init --target copilot
|
|
105
|
+
attest init # .claude/skills/attest/SKILL.md
|
|
106
|
+
attest init --target cursor # .cursor/rules/attest.mdc
|
|
107
|
+
attest init --target copilot # .github/instructions/attest.instructions.md
|
|
130
108
|
```
|
|
131
109
|
|
|
132
|
-
Each target gets the same document; only the frontmatter differs, because that
|
|
133
|
-
is the part the tool parses rather than the part the agent follows.
|
|
134
|
-
|
|
135
|
-
That document carries the workflow: how to write a `changes/<name>/` delta, why
|
|
136
|
-
its scenarios have to be red before you implement, what `attest archive` blocks
|
|
137
|
-
on, and the three shortcuts that turn the gate green without changing anything.
|
|
138
110
|
"Red before you implement" is enforced rather than advised: `archive` records how
|
|
139
111
|
each of a change's scenarios ended on its first run, into
|
|
140
112
|
`changes/<name>/first-run.json`, and blocks with `never-red` on any requirement
|
|
141
113
|
the delta adds whose scenarios were never seen to fail. Commit `first-run.json`
|
|
142
114
|
with the change — it is the evidence, and CI has to reach the same verdict as
|
|
143
115
|
you do.
|
|
144
|
-
An agent loads it on its own — its description is already in the agent's
|
|
145
|
-
context, or its path matches what you have open — so nothing has to be found or
|
|
146
|
-
pasted, and nothing is resident when you are working on something else.
|
|
147
|
-
|
|
148
|
-
`--target` is repeatable, and a name that is not a known target writes nothing
|
|
149
|
-
at all — an `unknown-target` error naming the ones that would have worked. An
|
|
150
|
-
agent whose instructions live in a file your *project* owns — `AGENTS.md`,
|
|
151
|
-
`CLAUDE.md` — is deliberately not a target: Attest writes whole files at paths it
|
|
152
|
-
names and never edits a document you maintain, so what covers those is one line
|
|
153
|
-
you add there yourself, pointing at the file above. It is cheaper than a
|
|
154
|
-
generated block and it cannot go stale.
|
|
155
|
-
|
|
156
|
-
There is deliberately **no `--check`**. The file is a function of the version you
|
|
157
|
-
installed, so gating it would turn CI red on upgrades you did nothing to cause,
|
|
158
|
-
and the remedy would be a commit containing no decision. `init` is idempotent
|
|
159
|
-
instead: re-run it after upgrading, and that is the whole update mechanism.
|
|
160
|
-
|
|
161
|
-
It also writes nothing else — no registry, no `package.json` scripts, no
|
|
162
|
-
`changes/` skeleton. A generated registry is either empty (an `empty-spec` error
|
|
163
|
-
on day one) or invented, and invented requirements are worse than none.
|
|
164
|
-
|
|
165
|
-
### A registry is a literal
|
|
166
|
-
|
|
167
|
-
`check`, `cover`, `render` and `status` read your `*.reqs.ts` files from their
|
|
168
|
-
**source**, with the TypeScript compiler API. They never execute them. That is
|
|
169
|
-
what makes `attest check` safe to run where its description implies you can —
|
|
170
|
-
first in the pipeline, on an untrusted fork MR, outside whatever sandbox you give
|
|
171
|
-
the tests. (`verify` and `archive` do run your suite, so they read the registry by
|
|
172
|
-
evaluating it: there is nothing left to protect at that point.)
|
|
173
|
-
|
|
174
|
-
The cost is a contract: every value in a registry must be written in the
|
|
175
|
-
registry.
|
|
176
116
|
|
|
177
|
-
|
|
178
|
-
|
|
117
|
+
An agent loads the document on its own — its description is already in the
|
|
118
|
+
agent's context, or its path matches what you have open — so nothing has to be
|
|
119
|
+
found or pasted. See
|
|
120
|
+
[`attest init`](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/cli-reference.md#attest-init)
|
|
121
|
+
for the targets and what `init` deliberately does not write.
|
|
179
122
|
|
|
180
|
-
|
|
181
|
-
'UP-1': {
|
|
182
|
-
statement: 'An upload SHALL be rejected above {maxMb} MB.',
|
|
183
|
-
rationale: 'Protect the storage tier from unbounded writes.',
|
|
184
|
-
params: { maxMb: MAX_MB }, // ✗ registry-not-static
|
|
185
|
-
},
|
|
186
|
-
});
|
|
187
|
-
```
|
|
123
|
+
### When something goes wrong
|
|
188
124
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
number, and importing it says the application owns it. Inline the value and read
|
|
192
|
-
it from the registry in your code — that is the fix. If you need the old
|
|
193
|
-
behaviour instead, `--eval` restores it on every one of those commands:
|
|
125
|
+
Every diagnostic carries a `code`, and every code has a section in
|
|
126
|
+
**Troubleshooting** — which the diagnostic itself links to:
|
|
194
127
|
|
|
195
|
-
```bash
|
|
196
|
-
attest check --eval # reads the registry by executing every *.reqs.ts
|
|
197
128
|
```
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
same `registry-not-static` ERROR, with the same `--eval` way out. The reason is
|
|
202
|
-
sharper there than it is for a registry: `changes/` holds a proposal nobody has
|
|
203
|
-
agreed to yet, so a command whose only job is to report on it is the last thing
|
|
204
|
-
that should execute it. `archive` evaluates the delta regardless — it is about to
|
|
205
|
-
run your suite anyway.
|
|
206
|
-
|
|
207
|
-
One more thing to know about literals: write registry prose as **one long
|
|
208
|
-
single-line string**. A template literal with no substitution reads statically and
|
|
209
|
-
is accepted — but it keeps every newline and every space of indentation inside it,
|
|
210
|
-
and `render` puts the statement into the Markdown exactly as written, so the
|
|
211
|
-
wrapping that looked tidy in the editor lands in the generated document.
|
|
212
|
-
|
|
213
|
-
### A readable spec for humans (`attest render`)
|
|
214
|
-
|
|
215
|
-
The intent layer lives in TypeScript, which means a reviewer, a QA engineer, or
|
|
216
|
-
anyone doing an audit cannot read it. `render` projects the registry into one
|
|
217
|
-
Markdown document — an index of every requirement, then each one with its
|
|
218
|
-
statement, rationale, params and out-of-scope notes:
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
attest render # to stdout
|
|
222
|
-
attest render --out docs/SPEC.md # to a file
|
|
223
|
-
attest render --out docs/SPEC.md --check # fail if that file is out of date
|
|
129
|
+
ERROR registry-not-static (requirements/upload.reqs.ts:5)
|
|
130
|
+
Value is not a literal.
|
|
131
|
+
→ https://gitlab.com/Pseudorca/attest/-/blob/v0.4.1/docs/en/troubleshooting.md#registry-not-static
|
|
224
132
|
```
|
|
225
133
|
|
|
226
|
-
The
|
|
227
|
-
|
|
228
|
-
reader actually wants, still from the single source.
|
|
229
|
-
|
|
230
|
-
Three properties this deliberately keeps:
|
|
231
|
-
|
|
232
|
-
- **One-way.** Markdown is only ever an output. Nothing reads it back, so the
|
|
233
|
-
free-form-prose drift that a Markdown *source* invites stays out.
|
|
234
|
-
- **Intent only.** No coverage, no counts, no test locations, no pass/fail —
|
|
235
|
-
those are verdicts, and `cover` / `verify` recompute them on demand. So the
|
|
236
|
-
document is a pure function of your `*.reqs.ts` files and changes if and only
|
|
237
|
-
if intent changes: one readable hunk per registry edit, and never a rewrite
|
|
238
|
-
because a line moved in a test file.
|
|
239
|
-
- **Gated.** A generated file you commit is a new place for drift to hide, so
|
|
240
|
-
`--check` regenerates and compares, failing with `stale-spec-doc` if the
|
|
241
|
-
committed document no longer matches the registry, or `missing-spec-doc` if it
|
|
242
|
-
was never generated. It compares the document, not the bytes: line endings are
|
|
243
|
-
a property of your checkout (`core.autocrlf` is on by default on Windows), and
|
|
244
|
-
a gate that calls a fresh clone stale is worse than no gate.
|
|
245
|
-
Put it in CI next to `attest check`. (Attest does this to itself:
|
|
246
|
-
[`self/requirements/SPEC.md`](https://gitlab.com/Pseudorca/attest/-/blob/main/self/requirements/SPEC.md)
|
|
247
|
-
is generated, and the pipeline fails if it goes stale.)
|
|
248
|
-
|
|
249
|
-
The Markdown is prose for humans and its formatting is not a stable contract —
|
|
250
|
-
don't parse it. `--json` is the machine surface.
|
|
251
|
-
|
|
252
|
-
### What a run actually runs
|
|
253
|
-
|
|
254
|
-
`verify` executes **only the spec files that declare a `requirement()`**. A repo
|
|
255
|
-
that already has a test suite keeps it: those files are located, reported, and
|
|
256
|
-
left alone — Attest is not a general test runner, and running someone's suite in
|
|
257
|
-
a child process with no aliases and no DOM only ever produced a red about code it
|
|
258
|
-
was never pointed at. `archive` uses the same scope.
|
|
259
|
-
|
|
260
|
-
Every run says so, before the issues:
|
|
134
|
+
The anchor **is** the code, so the link cannot point somewhere the section
|
|
135
|
+
isn't. In `--json` the same link is on each issue as `docsUrl`.
|
|
261
136
|
|
|
262
|
-
|
|
263
|
-
Running 12 spec files (30 without a requirement(), not run)
|
|
264
|
-
✓ No issues.
|
|
265
|
-
— 20 requirements / 41 scenarios, 0 error, 0 warning, 0 info
|
|
266
|
-
```
|
|
137
|
+
## Documentation
|
|
267
138
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
```
|
|
276
|
-
Repeated: 6 × ERROR registry-not-static, 4 × WARNING rationale-placeholder
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
Every per-issue line stays exactly as it is — they are what makes a diagnostic
|
|
280
|
-
clickable — and the summary is terminal output only: it is not an issue, so it
|
|
281
|
-
appears nowhere in `--json`, changes no count, and never moves a verdict.
|
|
282
|
-
|
|
283
|
-
A run with **no requirements** under the root is an `empty-spec` ERROR, not a
|
|
284
|
-
pass. "No failing tests" is not the same claim as "the requirements hold", and
|
|
285
|
-
the case that matters is not the empty directory — it is the repo whose registry
|
|
286
|
-
quietly stopped being found, where the tests still run and still go green.
|
|
287
|
-
|
|
288
|
-
### Framework code (`.vue`, DOM, path aliases)
|
|
289
|
-
|
|
290
|
-
The child run isolates from any ambient config by default, so specs run in a bare
|
|
291
|
-
Vite/Vitest environment — no `.vue` transform, DOM, or `~/`/`@/` aliases. When
|
|
292
|
-
your specs need that environment, point `verify` (or `archive`) at a config:
|
|
293
|
-
|
|
294
|
-
```bash
|
|
295
|
-
attest verify --vitest-config vitest.config.ts
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
The config supplies the environment (plugins, `resolve.alias`, `test.environment`);
|
|
299
|
-
Attest still owns the run scope — `include`/`exclude`/`root` always win, so a
|
|
300
|
-
config cannot pull in your existing suite or un-exclude `changes/`. Without the
|
|
301
|
-
flag the run stays isolated and deterministic.
|
|
302
|
-
|
|
303
|
-
### Machine-readable output
|
|
304
|
-
|
|
305
|
-
Every command that produces a verdict takes `--json` and then writes exactly one
|
|
306
|
-
JSON document to stdout — same work, same exit code. Branch on `ok`,
|
|
307
|
-
`issues[].code` and `issues[].reqId`; never parse `message`, which is prose and
|
|
308
|
-
may be reworded. (`render` is the one exception, because its own output is a
|
|
309
|
-
document: there, `--json` needs `--out` or `--check`, so stdout still carries
|
|
310
|
-
exactly one thing.)
|
|
311
|
-
|
|
312
|
-
```bash
|
|
313
|
-
attest check --json
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
```json
|
|
317
|
-
{
|
|
318
|
-
"tool": "attest",
|
|
319
|
-
"schemaVersion": 1,
|
|
320
|
-
"version": "0.3.0",
|
|
321
|
-
"command": "check",
|
|
322
|
-
"ok": false,
|
|
323
|
-
"summary": { "error": 1, "warning": 0, "info": 0 },
|
|
324
|
-
"issues": [
|
|
325
|
-
{
|
|
326
|
-
"level": "ERROR",
|
|
327
|
-
"code": "orphan-test",
|
|
328
|
-
"reqId": "PLAN-2",
|
|
329
|
-
"file": "auth/session.spec.ts",
|
|
330
|
-
"line": 12,
|
|
331
|
-
"message": "scenario \"…\" attests unknown requirement \"PLAN-2\". …"
|
|
332
|
-
}
|
|
333
|
-
]
|
|
334
|
-
}
|
|
335
|
-
```
|
|
139
|
+
| Document | English | 中文 |
|
|
140
|
+
|---|---|---|
|
|
141
|
+
| **CLI reference** — every command, flag and JSON field | [en](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/cli-reference.md) | [中文](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/zh/cli-reference.md) |
|
|
142
|
+
| **Troubleshooting** — one section per issue code | [en](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/troubleshooting.md) | [中文](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/zh/troubleshooting.md) |
|
|
143
|
+
| **Design** — the authoritative design of the framework | [en](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/attest-design.md) | [中文](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/zh/attest-design.md) |
|
|
144
|
+
| **Feedback template** — report how adoption actually went | [en](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/en/feedback.template.md) | [中文](https://gitlab.com/Pseudorca/attest/-/blob/main/docs/zh/feedback.template.md) |
|
|
336
145
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
scenarioCount }` row per requirement — plus a `requirements` roll-up;
|
|
341
|
-
`archive` adds `change`; `status` adds `change`, `progress[]` — one
|
|
342
|
-
`{ reqId, state, scenarios[] }` row per added requirement, each scenario
|
|
343
|
-
carrying its recorded `firstRun` (`"fail"`, `"pass"`, or `null` for never
|
|
344
|
-
observed) — plus an `added` roll-up; `render` and `init` add `outFile` — the
|
|
345
|
-
file the command wrote, and never its contents — and `init` adds `outFiles`,
|
|
346
|
-
every file it wrote, since it can be asked for more than one agent target at
|
|
347
|
-
once (`outFile` is still there whenever exactly one was written).
|
|
348
|
-
`schemaVersion` is bumped on any breaking change to
|
|
349
|
-
the shape. The TypeScript type is exported as `JsonReport`.
|
|
350
|
-
|
|
351
|
-
`ok` means the same thing everywhere: the report carries no `ERROR`. So an
|
|
352
|
-
uncovered requirement reaches a `cover` report twice — as a `covered: false`
|
|
353
|
-
row and as an `uncovered-requirement` issue — because the rule above is to
|
|
354
|
-
branch on `issues[].code`, and a command that answered `ok: false` with an
|
|
355
|
-
empty `issues` array would make you read `coverage[]` to find out why.
|
|
356
|
-
|
|
357
|
-
`status` is the one report whose rows are deliberately *not* issues. Its rows
|
|
358
|
-
describe a change in progress, and a change in progress has unmet obligations by
|
|
359
|
-
definition; carrying them as errors would make `status` exit 1 for the whole life
|
|
360
|
-
of every change, and put a second verdict beside `archive`'s. Its `issues` carry
|
|
361
|
-
only the reasons the report could not be produced.
|
|
362
|
-
|
|
363
|
-
Even when a command crashes, `--json` still writes one parseable envelope
|
|
364
|
-
(`ok: false` with an `internal-error` issue) rather than an empty stdout — so a
|
|
365
|
-
consumer can always parse stdout and branch on `ok`.
|
|
146
|
+
The change workflow is not here: it is what `attest init` writes into your
|
|
147
|
+
project, as a skill, a rule or an instructions file, depending on which agent
|
|
148
|
+
reads it.
|
|
366
149
|
|
|
367
150
|
## Development
|
|
368
151
|
|
|
@@ -395,12 +178,12 @@ from `pnpm test`; it runs in CI and as `prepublishOnly`.
|
|
|
395
178
|
## Feedback
|
|
396
179
|
|
|
397
180
|
Adoption reports drive the roadmap. After using Attest on a real project, fill in
|
|
398
|
-
the feedback template
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
181
|
+
the feedback template (linked above) and open it as an issue — it is also the
|
|
182
|
+
**Usage feedback** issue template. It covers greenfield and mid-project adoption
|
|
183
|
+
alike, and ends with a prompt to run inside the adopting repo that fills most of
|
|
184
|
+
the report automatically and probes for problems you haven't hit yet. The
|
|
185
|
+
highest-value part is **false negatives**: drift the engine should have caught
|
|
186
|
+
and didn't.
|
|
404
187
|
|
|
405
188
|
## Acknowledgments
|
|
406
189
|
|
package/dist/cli/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { runCheck, runVerify, runCover, runArchive, runInit, runRender, runRende
|
|
|
15
15
|
import { hasError } from '../core/types.js';
|
|
16
16
|
import { formatIssues, formatScope, summarize, formatCoverage, formatStatus, } from './report.js';
|
|
17
17
|
import { archiveReport, checkReport, coverReport, errorReport, initReport, renderJson, renderReport, statusReport, verifyReport, } from './json.js';
|
|
18
|
-
import { packageVersion } from '
|
|
18
|
+
import { packageVersion } from '../core/version.js';
|
|
19
19
|
const VERSION = packageVersion();
|
|
20
20
|
const program = new Command();
|
|
21
21
|
program
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,+EAA+E;AAC/E,sCAAsC;AACtC,EAAE;AACF,2EAA2E;AAC3E,4EAA4E;AAC5E,+EAA+E;AAC/E,2EAA2E;AAC3E,4EAA4E;AAE5E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,UAAU,EACV,OAAO,EACP,SAAS,EACT,cAAc,EACd,SAAS,EACT,cAAc,EACd,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,YAAY,EACZ,WAAW,EACX,SAAS,EACT,cAAc,EACd,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,aAAa,EACb,WAAW,EACX,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,GAGb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,OAAO,GAAG,cAAc,EAAE,CAAC;AAEjC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,iEAAiE,CAAC;KAC9E,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,8EAA8E;AAC9E,uEAAuE;AACvE,iEAAiE;AACjE,SAAS,IAAI,CAAC,GAAY;IACxB,OAAO,GAAG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,CAAC,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,CACH,CAAC;AAEJ,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;IAC1C,8EAA8E;IAC9E,qDAAqD;IACrD,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACxF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
|
package/dist/cli/json.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/cli/json.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/cli/json.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,KAAK,EAAE,KAAK,EAAS,MAAM,kBAAkB,CAAC;AAErD,8DAA8D;AAC9D,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,QAAQ,GACR,MAAM,GACN,QAAQ,CAAC;AAEb,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,QAAQ,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,o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,WAAW,EAAE,EACnB,MAAM,EAAE,KAAK,EAAE,GACd,UAAU,CAWZ;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,KAAK,EAAE,EACf,OAAO,CAAC,EAAE,MAAM,GACf,UAAU,CAGZ;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,UAAU,CAO3F;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,KAAK,EAAE,GAChB,UAAU,CAUZ;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,UAAU,CAY9E;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,OAAO,GACX,UAAU,CAIZ;AAED,mFAAmF;AACnF,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAErD"}
|
package/dist/cli/json.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
// The shape is a contract: `schemaVersion` is bumped on any breaking change,
|
|
6
6
|
// and every command emits the same envelope (tool/version/command/ok/summary/
|
|
7
7
|
// issues) plus command-specific fields.
|
|
8
|
+
import { docsUrl } from '../core/docs.js';
|
|
8
9
|
import { hasError } from '../core/types.js';
|
|
9
10
|
/** Bumped whenever the emitted shape changes incompatibly. */
|
|
10
11
|
export const SCHEMA_VERSION = 1;
|
|
@@ -19,15 +20,38 @@ export function countLevels(issues) {
|
|
|
19
20
|
summary[LEVEL_KEY[i.level]]++;
|
|
20
21
|
return summary;
|
|
21
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Attach the page that explains each code (design §5.3).
|
|
25
|
+
*
|
|
26
|
+
* Done here rather than at the ~20 sites that construct an `Issue`, for the
|
|
27
|
+
* reason `hasError` is one function: a property every report shares should have
|
|
28
|
+
* one place to be wrong. Every JSON report is built through this envelope —
|
|
29
|
+
* including the `internal-error` crash path — so there is no command that emits
|
|
30
|
+
* issues without going past this line.
|
|
31
|
+
*
|
|
32
|
+
* Non-mutating, and an issue that already carries a `docsUrl` keeps it: the
|
|
33
|
+
* argument arrays belong to the caller, and one of them is a pipeline result a
|
|
34
|
+
* human rendering may read afterwards.
|
|
35
|
+
*/
|
|
36
|
+
function withDocs(issues) {
|
|
37
|
+
return issues.map((i) => {
|
|
38
|
+
const url = i.docsUrl ?? docsUrl(i.code);
|
|
39
|
+
return url === undefined ? i : { ...i, docsUrl: url };
|
|
40
|
+
});
|
|
41
|
+
}
|
|
22
42
|
function envelope({ version, command, ok, issues = [] }) {
|
|
43
|
+
const documented = withDocs(issues);
|
|
23
44
|
return {
|
|
24
45
|
tool: 'attest',
|
|
25
46
|
schemaVersion: SCHEMA_VERSION,
|
|
26
47
|
version,
|
|
27
48
|
command,
|
|
28
49
|
ok,
|
|
50
|
+
// Counted from the input, not the decorated copy: the two have the same
|
|
51
|
+
// length by construction, and counting what was passed in keeps the summary
|
|
52
|
+
// a function of the issues rather than of the decoration.
|
|
29
53
|
summary: countLevels(issues),
|
|
30
|
-
issues,
|
|
54
|
+
issues: documented,
|
|
31
55
|
};
|
|
32
56
|
}
|
|
33
57
|
export function checkReport(version, issues) {
|
package/dist/cli/json.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/cli/json.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,yEAAyE;AACzE,8EAA8E;AAC9E,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,wCAAwC;
|
|
1
|
+
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/cli/json.ts"],"names":[],"mappings":"AAAA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AC;QACF,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,QAAQ,EAAE,MAAM,CAAC,IAAI;QACrB,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE;KACvD,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CACzB,OAAe,EACf,OAAoB,EACpB,GAAY;IAEZ,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjE,MAAM,KAAK,GAAU,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC;IACzE,OAAO,QAAQ,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACpE,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,UAAU,CAAC,MAAkB;IAC3C,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACzC,CAAC"}
|
package/dist/cli/report.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/cli/report.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/cli/report.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,KAAK,EAAE,KAAK,EAAS,MAAM,kBAAkB,CAAC;AAgFrD,wBAAgB,YAAY,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAcpD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAkBrD;AAUD,wBAAgB,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CASvE;AAID;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAIvD;AA4BD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAwBzD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,MAAM,CAe1D"}
|