@am_shork/attest 0.2.2 → 0.4.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.
Files changed (80) hide show
  1. package/CHANGELOG.md +876 -62
  2. package/README.md +157 -19
  3. package/dist/cli/index.js +91 -21
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/cli/json.d.ts +52 -5
  6. package/dist/cli/json.d.ts.map +1 -1
  7. package/dist/cli/json.js +50 -2
  8. package/dist/cli/json.js.map +1 -1
  9. package/dist/cli/report.d.ts +11 -1
  10. package/dist/cli/report.d.ts.map +1 -1
  11. package/dist/cli/report.js +114 -3
  12. package/dist/cli/report.js.map +1 -1
  13. package/dist/core/apply.d.ts +8 -0
  14. package/dist/core/apply.d.ts.map +1 -1
  15. package/dist/core/apply.js +10 -0
  16. package/dist/core/apply.js.map +1 -1
  17. package/dist/core/gate.d.ts +27 -1
  18. package/dist/core/gate.d.ts.map +1 -1
  19. package/dist/core/gate.js +48 -1
  20. package/dist/core/gate.js.map +1 -1
  21. package/dist/core/loader.d.ts +8 -0
  22. package/dist/core/loader.d.ts.map +1 -1
  23. package/dist/core/loader.js +19 -1
  24. package/dist/core/loader.js.map +1 -1
  25. package/dist/core/locate.d.ts +22 -1
  26. package/dist/core/locate.d.ts.map +1 -1
  27. package/dist/core/locate.js +76 -7
  28. package/dist/core/locate.js.map +1 -1
  29. package/dist/core/paths.d.ts +15 -0
  30. package/dist/core/paths.d.ts.map +1 -0
  31. package/dist/core/paths.js +36 -0
  32. package/dist/core/paths.js.map +1 -0
  33. package/dist/core/pipeline.d.ts +75 -5
  34. package/dist/core/pipeline.d.ts.map +1 -1
  35. package/dist/core/pipeline.js +212 -35
  36. package/dist/core/pipeline.js.map +1 -1
  37. package/dist/core/red-record.d.ts +56 -0
  38. package/dist/core/red-record.d.ts.map +1 -0
  39. package/dist/core/red-record.js +177 -0
  40. package/dist/core/red-record.js.map +1 -0
  41. package/dist/core/render.d.ts +1 -1
  42. package/dist/core/render.d.ts.map +1 -1
  43. package/dist/core/render.js +16 -2
  44. package/dist/core/render.js.map +1 -1
  45. package/dist/core/runner.d.ts +1 -1
  46. package/dist/core/runner.d.ts.map +1 -1
  47. package/dist/core/runner.js +36 -11
  48. package/dist/core/runner.js.map +1 -1
  49. package/dist/core/skill.d.ts +23 -0
  50. package/dist/core/skill.d.ts.map +1 -0
  51. package/dist/core/skill.js +276 -0
  52. package/dist/core/skill.js.map +1 -0
  53. package/dist/core/static-registry.d.ts +28 -0
  54. package/dist/core/static-registry.d.ts.map +1 -1
  55. package/dist/core/static-registry.js +91 -25
  56. package/dist/core/static-registry.js.map +1 -1
  57. package/dist/core/status.d.ts +39 -0
  58. package/dist/core/status.d.ts.map +1 -0
  59. package/dist/core/status.js +64 -0
  60. package/dist/core/status.js.map +1 -0
  61. package/dist/core/targets.d.ts +52 -0
  62. package/dist/core/targets.d.ts.map +1 -0
  63. package/dist/core/targets.js +141 -0
  64. package/dist/core/targets.js.map +1 -0
  65. package/dist/core/types.d.ts +13 -0
  66. package/dist/core/types.d.ts.map +1 -1
  67. package/dist/core/types.js.map +1 -1
  68. package/dist/core/validator.d.ts +11 -0
  69. package/dist/core/validator.d.ts.map +1 -1
  70. package/dist/core/validator.js +28 -12
  71. package/dist/core/validator.js.map +1 -1
  72. package/dist/core/write.d.ts +2 -0
  73. package/dist/core/write.d.ts.map +1 -0
  74. package/dist/core/write.js +21 -0
  75. package/dist/core/write.js.map +1 -0
  76. package/dist/runtime.d.ts +9 -1
  77. package/dist/runtime.d.ts.map +1 -1
  78. package/dist/runtime.js +10 -2
  79. package/dist/runtime.js.map +1 -1
  80. package/package.json +5 -5
package/README.md CHANGED
@@ -26,7 +26,13 @@ See the authoritative design — [English](https://gitlab.com/Pseudorca/attest/-
26
26
  ## Prerequisites
27
27
 
28
28
  - Node ≥ 20.19
29
- - pnpm, plus `vitest` + `vite` (peer dependencies)
29
+ - pnpm, plus `vitest` 4 and `vite` ≥ 8 (peer dependencies)
30
+
31
+ The peer range is exactly the one CI runs, which is the point of it. Older majors
32
+ are not merely untested: `verify` relies on a `startVitest` signature that Vitest
33
+ narrowed by 4, and ATX-36 — reading a registry opens no listening socket — is
34
+ asserted against the Vite that is installed, so on any other major it is a claim
35
+ rather than a measurement. If you are on Vitest 2 or 3, stay on `0.3.x`.
30
36
 
31
37
  ## Getting started
32
38
 
@@ -72,6 +78,12 @@ requirement('AUTH-3', () => {
72
78
  });
73
79
  ```
74
80
 
81
+ `scenario` takes an optional third argument, a timeout in milliseconds, forwarded
82
+ to Vitest's `it`. The run is isolated (see [What a run actually
83
+ runs](#what-a-run-actually-runs)), so Vitest's default applies unless a scenario
84
+ says otherwise — worth setting on anything that drives a subprocess, a container
85
+ or a build.
86
+
75
87
  **3. Run the engine:**
76
88
 
77
89
  ```bash
@@ -82,19 +94,87 @@ attest verify # run tests + coverage + drift, graded report
82
94
  attest cover # which requirements lack a scenario
83
95
  attest render # the requirements as Markdown, for people who don't read TS
84
96
  attest archive <change> # gate a proposed change: green + covered + no drift
97
+ attest status <change> # what that gate still wants, without running anything
85
98
  ```
86
99
 
87
100
  `<change>` names one directory inside `changes/` — it cannot be empty, `.`,
88
- `..`, or contain a path separator, since the gate loads and runs that change's
89
- delta. Any other directory name is fine.
101
+ `..`, or contain a path separator, since the name is interpolated into a path
102
+ whose module the gate then loads and runs. Both commands check it before
103
+ resolving anything on its behalf. Any other directory name is fine.
104
+
105
+ `status` is the mid-flight view `archive` cannot give you: it reports each
106
+ requirement the change adds as `no-scenario`, `unproven` (a scenario exists but
107
+ has never been seen failing) or `proven`, reading the delta, the specs and
108
+ `first-run.json` — no suite run, no project code. Every state is named after the
109
+ issue the gate will raise, and it uses the gate's own predicate, so the two
110
+ cannot disagree. What it deliberately cannot tell you is whether the tests pass:
111
+
112
+ ```console
113
+ $ attest status add-2fa
114
+ Change: add-2fa
115
+ ✓ AUTH-7 2 scenarios, seen red
116
+ ● AUTH-8 1 never run
117
+ ✗ AUTH-9 no scenario yet
118
+ — 3 added requirements, 1 ready to archive
119
+ Not a verdict: run `attest archive add-2fa` to run the suite.
120
+ ```
121
+
122
+ It exits 0 there. Unmet obligations are the normal state of a change in flight,
123
+ so they are rows, never a failing verdict — only a delta it could not read makes
124
+ `status` fail. `archive` remains the one command that says "done".
125
+
126
+ ### Working with an agent
127
+
128
+ The engine above is only half the framework. The other half is the workflow —
129
+ agree on intent, write the delta, drive the scenarios red, then implement to
130
+ green — and it is written for an agent to follow:
131
+
132
+ ```bash
133
+ attest init # .claude/skills/attest/SKILL.md
134
+ attest init --target cursor # .cursor/rules/attest.mdc
135
+ attest init --target copilot # .github/instructions/attest.instructions.md
136
+ ```
137
+
138
+ Each target gets the same document; only the frontmatter differs, because that
139
+ is the part the tool parses rather than the part the agent follows.
140
+
141
+ That document carries the workflow: how to write a `changes/<name>/` delta, why
142
+ its scenarios have to be red before you implement, what `attest archive` blocks
143
+ on, and the three shortcuts that turn the gate green without changing anything.
144
+ "Red before you implement" is enforced rather than advised: `archive` records how
145
+ each of a change's scenarios ended on its first run, into
146
+ `changes/<name>/first-run.json`, and blocks with `never-red` on any requirement
147
+ the delta adds whose scenarios were never seen to fail. Commit `first-run.json`
148
+ with the change — it is the evidence, and CI has to reach the same verdict as
149
+ you do.
150
+ An agent loads it on its own — its description is already in the agent's
151
+ context, or its path matches what you have open — so nothing has to be found or
152
+ pasted, and nothing is resident when you are working on something else.
153
+
154
+ `--target` is repeatable, and a name that is not a known target writes nothing
155
+ at all — an `unknown-target` error naming the ones that would have worked. An
156
+ agent whose instructions live in a file your *project* owns — `AGENTS.md`,
157
+ `CLAUDE.md` — is deliberately not a target: Attest writes whole files at paths it
158
+ names and never edits a document you maintain, so what covers those is one line
159
+ you add there yourself, pointing at the file above. It is cheaper than a
160
+ generated block and it cannot go stale.
161
+
162
+ There is deliberately **no `--check`**. The file is a function of the version you
163
+ installed, so gating it would turn CI red on upgrades you did nothing to cause,
164
+ and the remedy would be a commit containing no decision. `init` is idempotent
165
+ instead: re-run it after upgrading, and that is the whole update mechanism.
166
+
167
+ It also writes nothing else — no registry, no `package.json` scripts, no
168
+ `changes/` skeleton. A generated registry is either empty (an `empty-spec` error
169
+ on day one) or invented, and invented requirements are worse than none.
90
170
 
91
171
  ### A registry is a literal
92
172
 
93
- `check`, `cover` and `render` read your `*.reqs.ts` files from their **source**,
94
- with the TypeScript compiler API. They never execute them. That is what makes
95
- `attest check` safe to run where its description implies you can — first in the
96
- pipeline, on an untrusted fork MR, outside whatever sandbox you give the tests.
97
- (`verify` and `archive` do run your suite, so they read the registry by
173
+ `check`, `cover`, `render` and `status` read your `*.reqs.ts` files from their
174
+ **source**, with the TypeScript compiler API. They never execute them. That is
175
+ what makes `attest check` safe to run where its description implies you can —
176
+ first in the pipeline, on an untrusted fork MR, outside whatever sandbox you give
177
+ the tests. (`verify` and `archive` do run your suite, so they read the registry by
98
178
  evaluating it: there is nothing left to protect at that point.)
99
179
 
100
180
  The cost is a contract: every value in a registry must be written in the
@@ -116,18 +196,55 @@ This is reported as a `registry-not-static` ERROR pointing at the line. It is
116
196
  not only a tooling limit: the single-source rule says the requirement owns that
117
197
  number, and importing it says the application owns it. Inline the value and read
118
198
  it from the registry in your code — that is the fix. If you need the old
119
- behaviour instead, `--eval` restores it on all three commands:
199
+ behaviour instead, `--eval` restores it on every one of those commands:
120
200
 
121
201
  ```bash
122
202
  attest check --eval # reads the registry by executing every *.reqs.ts
123
203
  ```
124
204
 
205
+ `--eval` changes *how* the registry is obtained, never what counts as one: whatever
206
+ the module exports goes through the same schema, so a malformed registry is a
207
+ `registry-invalid` ERROR under both readers rather than a crash under one of them.
208
+
209
+ **The same rule covers a change's `requirements.delta.ts`**, because `status`
210
+ reads that file the same way — a delta built from an imported constant is the
211
+ same `registry-not-static` ERROR, with the same `--eval` way out. The reason is
212
+ sharper there than it is for a registry: `changes/` holds a proposal nobody has
213
+ agreed to yet, so a command whose only job is to report on it is the last thing
214
+ that should execute it. `archive` evaluates the delta regardless — it is about to
215
+ run your suite anyway.
216
+
125
217
  One more thing to know about literals: write registry prose as **one long
126
218
  single-line string**. A template literal with no substitution reads statically and
127
219
  is accepted — but it keeps every newline and every space of indentation inside it,
128
220
  and `render` puts the statement into the Markdown exactly as written, so the
129
221
  wrapping that looked tidy in the editor lands in the generated document.
130
222
 
223
+ ### Each registry file owns its id prefix
224
+
225
+ You can split intent across as many `*.reqs.ts` as you like — every one under the
226
+ project root is read and merged. What you cannot do is have two of them declare
227
+ the same prefix:
228
+
229
+ ```ts
230
+ // requirements/auth.reqs.ts
231
+ export default defineRequirements({ 'AUTH-3': { /* … */ } });
232
+
233
+ // requirements/session.reqs.ts
234
+ export default defineRequirements({ 'AUTH-9': { /* … */ } }); // ✗ duplicate-prefix
235
+ ```
236
+
237
+ An id is `PREFIX-n` and nothing above the requirement gives that prefix a
238
+ meaning, so two files declaring one are two owners of a single space. The ids
239
+ above are distinct and every other check passes; what you find out later is that
240
+ `AUTH-9` was taken the day someone's counter reached it, in a file they were not
241
+ looking at. The ERROR names both files, and the fix is a prefix of your own —
242
+ `SESS-1` — not a move or a rename.
243
+
244
+ `duplicate-requirement` is the narrower one still there for the same id in two
245
+ files. Nothing requires the prefix to match the file's name; `attest.reqs.ts`
246
+ holding `ATX-*` is fine, here and in your repo.
247
+
131
248
  ### A readable spec for humans (`attest render`)
132
249
 
133
250
  The intent layer lives in TypeScript, which means a reviewer, a QA engineer, or
@@ -155,9 +272,11 @@ Three properties this deliberately keeps:
155
272
  if intent changes: one readable hunk per registry edit, and never a rewrite
156
273
  because a line moved in a test file.
157
274
  - **Gated.** A generated file you commit is a new place for drift to hide, so
158
- `--check` regenerates and compares byte-for-byte, failing with
159
- `stale-spec-doc` if the committed document no longer matches the registry, or
160
- `missing-spec-doc` if it was never generated.
275
+ `--check` regenerates and compares, failing with `stale-spec-doc` if the
276
+ committed document no longer matches the registry, or `missing-spec-doc` if it
277
+ was never generated. It compares the document, not the bytes: line endings are
278
+ a property of your checkout (`core.autocrlf` is on by default on Windows), and
279
+ a gate that calls a fresh clone stale is worse than no gate.
161
280
  Put it in CI next to `attest check`. (Attest does this to itself:
162
281
  [`self/requirements/SPEC.md`](https://gitlab.com/Pseudorca/attest/-/blob/main/self/requirements/SPEC.md)
163
282
  is generated, and the pipeline fails if it goes stale.)
@@ -218,11 +337,12 @@ flag the run stays isolated and deterministic.
218
337
 
219
338
  ### Machine-readable output
220
339
 
221
- Every command takes `--json` and then writes exactly one JSON document to
222
- stdout — same work, same exit code. Branch on `ok`, `issues[].code` and
223
- `issues[].reqId`; never parse `message`, which is prose and may be reworded.
224
- (`render` is the one exception, because its own output is a document: there,
225
- `--json` needs `--out` or `--check`, so stdout still carries exactly one thing.)
340
+ Every command that produces a verdict takes `--json` and then writes exactly one
341
+ JSON document to stdout — same work, same exit code. Branch on `ok`,
342
+ `issues[].code` and `issues[].reqId`; never parse `message`, which is prose and
343
+ may be reworded. (`render` is the one exception, because its own output is a
344
+ document: there, `--json` needs `--out` or `--check`, so stdout still carries
345
+ exactly one thing.)
226
346
 
227
347
  ```bash
228
348
  attest check --json
@@ -232,7 +352,7 @@ attest check --json
232
352
  {
233
353
  "tool": "attest",
234
354
  "schemaVersion": 1,
235
- "version": "0.2.2",
355
+ "version": "0.4.0",
236
356
  "command": "check",
237
357
  "ok": false,
238
358
  "summary": { "error": 1, "warning": 0, "info": 0 },
@@ -253,10 +373,28 @@ attest check --json
253
373
  overall verdict) and `counts` (`requirements`, `scenarios`, `specFiles`,
254
374
  `attesting`); `cover` adds `coverage[]` — one `{ reqId, covered,
255
375
  scenarioCount }` row per requirement — plus a `requirements` roll-up;
256
- `archive` adds `change`; `render` adds `outFile` (and never the document itself).
376
+ `archive` adds `change`; `status` adds `change`, `progress[]` one
377
+ `{ reqId, state, scenarios[] }` row per added requirement, each scenario
378
+ carrying its recorded `firstRun` (`"fail"`, `"pass"`, or `null` for never
379
+ observed) — plus an `added` roll-up; `render` and `init` add `outFile` — the
380
+ file the command wrote, and never its contents — and `init` adds `outFiles`,
381
+ every file it wrote, since it can be asked for more than one agent target at
382
+ once (`outFile` is still there whenever exactly one was written).
257
383
  `schemaVersion` is bumped on any breaking change to
258
384
  the shape. The TypeScript type is exported as `JsonReport`.
259
385
 
386
+ `ok` means the same thing everywhere: the report carries no `ERROR`. So an
387
+ uncovered requirement reaches a `cover` report twice — as a `covered: false`
388
+ row and as an `uncovered-requirement` issue — because the rule above is to
389
+ branch on `issues[].code`, and a command that answered `ok: false` with an
390
+ empty `issues` array would make you read `coverage[]` to find out why.
391
+
392
+ `status` is the one report whose rows are deliberately *not* issues. Its rows
393
+ describe a change in progress, and a change in progress has unmet obligations by
394
+ definition; carrying them as errors would make `status` exit 1 for the whole life
395
+ of every change, and put a second verdict beside `archive`'s. Its `issues` carry
396
+ only the reasons the report could not be produced.
397
+
260
398
  Even when a command crashes, `--json` still writes one parseable envelope
261
399
  (`ok: false` with an `internal-error` issue) rather than an empty stdout — so a
262
400
  consumer can always parse stdout and branch on `ok`.
package/dist/cli/index.js CHANGED
@@ -9,12 +9,12 @@
9
9
  // where the report is an `internal-error` envelope instead of a bare stack.
10
10
  import { Command } from 'commander';
11
11
  import chalk from 'chalk';
12
- import { rename, writeFile } from 'node:fs/promises';
13
- import { dirname, join, resolve } from 'node:path';
14
- import { runCheck, runVerify, runCover, runArchive, runRender, runRenderCheck, } from '../core/pipeline.js';
12
+ import { resolve } from 'node:path';
13
+ import { writeAtomic } from '../core/write.js';
14
+ import { runCheck, runVerify, runCover, runArchive, runInit, runRender, runRenderCheck, runStatus, DEFAULT_TARGET, TARGET_NAMES, } from '../core/pipeline.js';
15
15
  import { hasError } from '../core/types.js';
16
- import { formatIssues, formatScope, summarize, formatCoverage } from './report.js';
17
- import { archiveReport, checkReport, coverReport, errorReport, renderJson, renderReport, verifyReport, } from './json.js';
16
+ import { formatIssues, formatScope, summarize, formatCoverage, formatStatus, } from './report.js';
17
+ import { archiveReport, checkReport, coverReport, errorReport, initReport, renderJson, renderReport, statusReport, verifyReport, } from './json.js';
18
18
  import { packageVersion } from './version.js';
19
19
  const VERSION = packageVersion();
20
20
  const program = new Command();
@@ -32,26 +32,16 @@ const JSON_FLAG = '--json';
32
32
  const JSON_HELP = 'emit one machine-readable JSON report on stdout';
33
33
  const EVAL_FLAG = '--eval';
34
34
  const EVAL_HELP = 'read the registry by executing every *.reqs.ts (runs project code); default: read it from the source';
35
+ // Same flag, same meaning — execute the file instead of reading it — over the
36
+ // one file this command reads.
37
+ const EVAL_DELTA_HELP = 'read the change delta by executing requirements.delta.ts (runs project code); default: read it from the source';
38
+ const TARGET_FLAG = '--target <name>';
35
39
  const VITEST_CONFIG_FLAG = '--vitest-config <path>';
36
40
  const VITEST_CONFIG_HELP = 'load this Vitest config in the child run (transforms, aliases, environment); default: isolated';
37
41
  /** Resolve a user-supplied config path against cwd, so Vitest gets an absolute one. */
38
42
  function vitestConfig(opts) {
39
43
  return opts.vitestConfig ? resolve(process.cwd(), opts.vitestConfig) : undefined;
40
44
  }
41
- /**
42
- * Write via a temporary file in the same directory, then rename.
43
- *
44
- * The rendering is a *committed* file guarded by `--check`. A plain write that
45
- * is interrupted leaves a truncated document on disk — which `--check` would
46
- * then correctly call stale, but only after someone commits the wreckage.
47
- * `rename` within a directory is atomic, so the file is either the old one or
48
- * the new one, never half of either.
49
- */
50
- async function writeAtomic(dest, content) {
51
- const tmp = join(dirname(dest), `.${VERSION}.${process.pid}.attest.tmp`);
52
- await writeFile(tmp, content, 'utf8');
53
- await rename(tmp, dest);
54
- }
55
45
  /**
56
46
  * Run one command's work with a single output + exit-code contract:
57
47
  * - success: print the JSON report (`--json`) or the human rendering, and set
@@ -120,11 +110,22 @@ program
120
110
  .option(JSON_FLAG, JSON_HELP)
121
111
  .option(EVAL_FLAG, EVAL_HELP)
122
112
  .action((dir, opts) => runAction('cover', opts, async () => {
123
- const rows = await runCover(root(dir), { evaluate: opts.eval });
113
+ const { rows, issues } = await runCover(root(dir), { evaluate: opts.eval });
124
114
  const uncovered = rows.filter((r) => !r.covered).length;
125
115
  return {
126
- report: coverReport(VERSION, rows),
116
+ report: coverReport(VERSION, rows, issues),
127
117
  human: () => {
118
+ // No rows with issues present means the pipeline refused to compute a
119
+ // table it could not trust. Printing the empty-registry line there
120
+ // would state, as a fact, the very thing that failed to be read.
121
+ // Otherwise the table is the rendering: every uncovered requirement
122
+ // is already a red row, so repeating each as an issue line beneath it
123
+ // would be a wall saying what the reader just saw.
124
+ if (rows.length === 0 && issues.length > 0) {
125
+ console.log(formatIssues(issues));
126
+ console.log(summarize(issues));
127
+ return;
128
+ }
128
129
  console.log(formatCoverage(rows));
129
130
  console.log(chalk.dim(`— ${rows.length} requirement(s), ${uncovered} uncovered`));
130
131
  },
@@ -189,6 +190,75 @@ program
189
190
  };
190
191
  });
191
192
  });
193
+ // The workflow half's entry point (design §9): the engine has been reachable
194
+ // from the CLI since 0.1.0, the workflow was a document to find and paste.
195
+ //
196
+ // One file per agent target named, and the default is the one target rather
197
+ // than all of them: the others are files in a repository whose owner did not ask
198
+ // for them. Which paths may be a target is a design rule, not a list of tools —
199
+ // see core/targets.ts.
200
+ //
201
+ // Deliberately scaffolds nothing else — no registry, no package.json scripts, no
202
+ // changes/ skeleton. A generated registry can only be empty (an `empty-spec`
203
+ // ERROR handed to the user on day one) or invented, and invented intent is worse
204
+ // than none in the one layer whose value is that it is real. What to write there
205
+ // is the agent's job, with the project in front of it.
206
+ program
207
+ .command('init')
208
+ .description('Write the Attest change workflow where an agent will read it.')
209
+ .argument('[dir]', 'project root', undefined)
210
+ .option(JSON_FLAG, JSON_HELP)
211
+ .option(TARGET_FLAG, `agent to write the workflow for, repeatable: ${TARGET_NAMES.join(', ')} (default: ${DEFAULT_TARGET})`, (value, previous) => [...previous, value], [])
212
+ .action((dir, opts) => runAction('init', opts, async () => {
213
+ // Idempotent: each file is a pure function of nothing, so re-running after
214
+ // an upgrade is the whole update mechanism and is always safe.
215
+ const { files, issues } = await runInit(root(dir), opts.target ?? []);
216
+ return {
217
+ report: initReport(VERSION, issues, files),
218
+ human: () => {
219
+ if (issues.length > 0) {
220
+ console.log(formatIssues(issues));
221
+ console.log(summarize(issues));
222
+ return;
223
+ }
224
+ for (const file of files)
225
+ console.log(chalk.green(`✓ Wrote ${file}`));
226
+ console.log(chalk.dim('Re-run `attest init` after upgrading @am_shork/attest.'));
227
+ },
228
+ };
229
+ }));
230
+ // A change's progress, between "not started" and "archivable". `archive` answers
231
+ // one question — does the gate pass — so a change in flight had no reportable
232
+ // state at all, and the only way to ask what remained was to read the delta and
233
+ // infer. This reports the gate's obligations without running the suite; the one
234
+ // it cannot report is `tests-red`, which is why the rendering closes by saying
235
+ // so rather than presenting a column of ticks as a verdict.
236
+ program
237
+ .command('status')
238
+ .argument('<change>', 'change name to report on')
239
+ .argument('[dir]', 'project root', undefined)
240
+ .option(JSON_FLAG, JSON_HELP)
241
+ .option(EVAL_FLAG, EVAL_DELTA_HELP)
242
+ .description('Per-change progress: what the archive gate still wants, without running the suite.')
243
+ .action((change, dir, opts) => runAction('status', opts, async () => {
244
+ const result = await runStatus(root(dir), change, { evaluate: opts.eval });
245
+ return {
246
+ report: statusReport(VERSION, result),
247
+ human: () => {
248
+ // A change whose delta could not be read has no progress to show, and
249
+ // printing an empty table under it would state as a fact the very
250
+ // thing that failed to be read (the call `cover` makes for the same
251
+ // reason).
252
+ if (hasError(result.issues)) {
253
+ console.log(formatIssues(result.issues));
254
+ console.log(summarize(result.issues));
255
+ return;
256
+ }
257
+ console.log(chalk.bold(`Change: ${result.change}`));
258
+ console.log(formatStatus(result));
259
+ },
260
+ };
261
+ }));
192
262
  program
193
263
  .command('archive')
194
264
  .argument('<change>', 'change name to archive')
@@ -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;AAC3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EAAE,EAAE,YAAY,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3F,OAAO;QACL,MAAM,EAAE,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC;QAChD,KAAK,EAAE,GAAG,EAAE;YACV,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC1B,OAAO,CAAC,GAAG,CACT,KAAK,CAAC,KAAK,CAAC,0BAA0B,MAAM,oBAAoB,CAAC,CAClE,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,0BAA0B,MAAM,GAAG,CAAC,CAAC,CAAC;gBAC5D,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC;gBACpC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,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"}
@@ -1,8 +1,9 @@
1
- import type { CoverageRow, VerifyCounts } from '../core/pipeline.js';
1
+ import type { CoverageRow, StatusResult, VerifyCounts } from '../core/pipeline.js';
2
+ import type { ObligationState, StatusRow } from '../core/status.js';
2
3
  import type { Issue } from '../core/types.js';
3
4
  /** Bumped whenever the emitted shape changes incompatibly. */
4
5
  export declare const SCHEMA_VERSION = 1;
5
- export type JsonCommand = 'check' | 'verify' | 'cover' | 'archive' | 'render';
6
+ export type JsonCommand = 'check' | 'verify' | 'cover' | 'archive' | 'render' | 'init' | 'status';
6
7
  export interface JsonSummary {
7
8
  error: number;
8
9
  warning: number;
@@ -30,21 +31,67 @@ export interface JsonReport {
30
31
  covered: number;
31
32
  uncovered: number;
32
33
  };
33
- /** `archive` only: the change being gated. */
34
+ /** `archive` and `status`: the change being gated or reported on. */
34
35
  change?: string;
35
- /** `render` only: the file the document was written to, when `--out` was given. */
36
+ /** `status` only: one row per requirement the change adds. */
37
+ progress?: StatusRow[];
38
+ /** `status` only: roll-up of the rows by obligation state. */
39
+ added?: {
40
+ total: number;
41
+ } & Record<ObligationState, number>;
42
+ /**
43
+ * The file the command wrote: `render`'s document when `--out` was given,
44
+ * `init`'s instructions when it wrote exactly one file. One field rather than
45
+ * two because it is one concept — where the command put its output.
46
+ */
36
47
  outFile?: string;
48
+ /**
49
+ * `init` only: every file written, in target order. Additive — see
50
+ * SCHEMA_VERSION. `init` can now write one file per agent target, and a
51
+ * consumer reading `outFile` alone would silently see the first of several.
52
+ * The single-target run — the default — still carries both.
53
+ */
54
+ outFiles?: string[];
37
55
  }
38
56
  export declare function countLevels(issues: Issue[]): JsonSummary;
39
57
  export declare function checkReport(version: string, issues: Issue[]): JsonReport;
40
58
  export declare function verifyReport(version: string, issues: Issue[], passed: boolean, ok: boolean, counts: VerifyCounts): JsonReport;
41
- export declare function coverReport(version: string, rows: CoverageRow[]): JsonReport;
59
+ /**
60
+ * `cover`. The uncovered requirements are carried as `issues` as well as rows:
61
+ * `ok` was computed from the rows alone, so this was the one command that could
62
+ * answer `ok: false` with an empty `issues` array — against the rule this file,
63
+ * the README and the CHANGELOG all state ("branch on `ok` / `issues[].code`").
64
+ * The verdict is now the same `hasError` predicate every other command uses;
65
+ * for identical input it is the identical boolean, since an uncovered
66
+ * requirement is the only issue this command produces.
67
+ */
68
+ export declare function coverReport(version: string, rows: CoverageRow[], issues: Issue[]): JsonReport;
42
69
  /**
43
70
  * `render` only. The Markdown document itself is never part of the envelope:
44
71
  * it is prose for humans, and the machine surface stays `ok` + issue codes.
45
72
  */
46
73
  export declare function renderReport(version: string, issues: Issue[], outFile?: string): JsonReport;
74
+ /**
75
+ * `init`. Carries the paths written so a consumer learns where the instructions
76
+ * went without hardcoding the convention. `issues` is empty on the success path
77
+ * — `init` writes or throws — apart from an `unknown-target` ERROR, which is
78
+ * refused before anything is written and so reports no files at all.
79
+ *
80
+ * `outFile` survives beside `outFiles` for the one-file run, which is what the
81
+ * default invocation still is: dropping it would break the consumer the field
82
+ * was added for, to say something the array already says.
83
+ */
84
+ export declare function initReport(version: string, issues: Issue[], outFiles: string[]): JsonReport;
47
85
  export declare function archiveReport(version: string, change: string, blocking: Issue[]): JsonReport;
86
+ /**
87
+ * `status`. The progress rows never touch the verdict: `ok` comes from the same
88
+ * `hasError` predicate as everywhere else, over an `issues` array that carries
89
+ * only the reasons the report could not be computed. A change with unmet
90
+ * obligations is the normal state of every change in flight, so reporting it as
91
+ * `ok: false` would make a CI step wrapping `status` red for the entire life of
92
+ * every change — and would put a second, weaker verdict beside `archive`'s.
93
+ */
94
+ export declare function statusReport(version: string, result: StatusResult): JsonReport;
48
95
  /**
49
96
  * The envelope for a command that threw before it could produce a report. Keeps
50
97
  * the `--json` contract intact on the crash path: a consumer still parses one
@@ -1 +1 @@
1
- {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/cli/json.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,KAAK,EAAE,KAAK,EAAS,MAAM,kBAAkB,CAAC;AAErD,8DAA8D;AAC9D,eAAO,MAAM,cAAc,IAAI,CAAC;AAEhC,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE9E,MAAM,WA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C,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
@@ -36,10 +36,19 @@ export function checkReport(version, issues) {
36
36
  export function verifyReport(version, issues, passed, ok, counts) {
37
37
  return { ...envelope({ version, command: 'verify', ok, issues }), passed, counts };
38
38
  }
39
- export function coverReport(version, rows) {
39
+ /**
40
+ * `cover`. The uncovered requirements are carried as `issues` as well as rows:
41
+ * `ok` was computed from the rows alone, so this was the one command that could
42
+ * answer `ok: false` with an empty `issues` array — against the rule this file,
43
+ * the README and the CHANGELOG all state ("branch on `ok` / `issues[].code`").
44
+ * The verdict is now the same `hasError` predicate every other command uses;
45
+ * for identical input it is the identical boolean, since an uncovered
46
+ * requirement is the only issue this command produces.
47
+ */
48
+ export function coverReport(version, rows, issues) {
40
49
  const covered = rows.filter((r) => r.covered).length;
41
50
  return {
42
- ...envelope({ version, command: 'cover', ok: covered === rows.length }),
51
+ ...envelope({ version, command: 'cover', ok: !hasError(issues), issues }),
43
52
  coverage: rows,
44
53
  requirements: {
45
54
  total: rows.length,
@@ -56,6 +65,24 @@ export function renderReport(version, issues, outFile) {
56
65
  const report = envelope({ version, command: 'render', ok: !hasError(issues), issues });
57
66
  return outFile === undefined ? report : { ...report, outFile };
58
67
  }
68
+ /**
69
+ * `init`. Carries the paths written so a consumer learns where the instructions
70
+ * went without hardcoding the convention. `issues` is empty on the success path
71
+ * — `init` writes or throws — apart from an `unknown-target` ERROR, which is
72
+ * refused before anything is written and so reports no files at all.
73
+ *
74
+ * `outFile` survives beside `outFiles` for the one-file run, which is what the
75
+ * default invocation still is: dropping it would break the consumer the field
76
+ * was added for, to say something the array already says.
77
+ */
78
+ export function initReport(version, issues, outFiles) {
79
+ const report = {
80
+ ...envelope({ version, command: 'init', ok: !hasError(issues), issues }),
81
+ outFiles,
82
+ };
83
+ const [only] = outFiles;
84
+ return outFiles.length === 1 && only !== undefined ? { ...report, outFile: only } : report;
85
+ }
59
86
  export function archiveReport(version, change, blocking) {
60
87
  return {
61
88
  ...envelope({
@@ -67,6 +94,27 @@ export function archiveReport(version, change, blocking) {
67
94
  change,
68
95
  };
69
96
  }
97
+ /**
98
+ * `status`. The progress rows never touch the verdict: `ok` comes from the same
99
+ * `hasError` predicate as everywhere else, over an `issues` array that carries
100
+ * only the reasons the report could not be computed. A change with unmet
101
+ * obligations is the normal state of every change in flight, so reporting it as
102
+ * `ok: false` would make a CI step wrapping `status` red for the entire life of
103
+ * every change — and would put a second, weaker verdict beside `archive`'s.
104
+ */
105
+ export function statusReport(version, result) {
106
+ return {
107
+ ...envelope({
108
+ version,
109
+ command: 'status',
110
+ ok: !hasError(result.issues),
111
+ issues: result.issues,
112
+ }),
113
+ change: result.change,
114
+ progress: result.rows,
115
+ added: { total: result.rows.length, ...result.counts },
116
+ };
117
+ }
70
118
  /**
71
119
  * The envelope for a command that threw before it could produce a report. Keeps
72
120
  * the `--json` contract intact on the crash path: a consumer still parses one
@@ -1 +1 @@
1
- {"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/cli/json.ts"],"names":[],"mappings":"AAAA,0EAA0E;A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