veriskit 0.2.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/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ # Changelog
2
+
3
+ ## 0.2.0 — 2026-07-09
4
+
5
+ ### Added
6
+ - `veris affected` — run only the checks relevant to changed files (coarse: no import graph yet). `--base <ref>` for PR/CI diffs.
7
+ - `veris watch` — re-run affected checks as files change, using native fs.watch (no new dependency) with a `--poll` fallback and cross-tick `cached` results.
8
+ - Honest scoped verdicts: affected/watch runs never report a bare "Verified"; unaffected capabilities are shown as "not affected by changes".
9
+
10
+ ### Changed
11
+ - Extracted the runner base (Runner/RunContext/localBin/runViaExec) into `src/runners/base.ts` to eliminate an adapter import cycle.
12
+
13
+ ## 0.1.0 — 2026-07-08
14
+
15
+ ### Added
16
+ - `veris init`, `doctor`, `test`, `verify`, `report`.
17
+ - Zero-config detection: package manager, TypeScript, Vitest, Jest, node:test, ESLint, Biome, Playwright (detected, not run).
18
+ - Parallel check orchestration with a three-state verdict (verified / failed / partial).
19
+ - Local evidence store under `.veris/` and Markdown verification reports.
20
+ - CI-correct exit codes (0 verified, 1 failed, 2 partial; `--partial-ok` overrides).
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Abhi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,181 @@
1
+ # veris
2
+
3
+ The fastest way to prove your software works.
4
+
5
+ Veris is a zero-config verification CLI. It detects the tools already in your
6
+ project — TypeScript, Vitest, Jest, `node:test`, ESLint, Biome — runs them,
7
+ and turns the results into one honest verdict with a reviewable Markdown
8
+ report. No config to write, no new test framework to learn.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npx veriskit init
14
+ ```
15
+
16
+ Or add it to a project:
17
+
18
+ ```bash
19
+ npm install --save-dev veriskit
20
+ ```
21
+
22
+ > Published on npm as **`veriskit`** (the bare name `veris` was too similar to an
23
+ > existing package). The installed command is still **`veris`**.
24
+
25
+ ## Quickstart
26
+
27
+ ```bash
28
+ veris init # detect the stack, write .veris/config.json (idempotent)
29
+ veris verify # run the configured checks, print a verdict, write a report
30
+ veris report # print the latest report
31
+ ```
32
+
33
+ `veris doctor` and `veris test` are also available: `doctor` is a read-only
34
+ capability report (what will run, what will be skipped, and why); `test` runs
35
+ just the detected unit test runner with the same summarized output as
36
+ `verify`.
37
+
38
+ ## Sample output
39
+
40
+ ```text
41
+ Veris
42
+
43
+ Project veris
44
+ Risk —
45
+
46
+ Checks
47
+ ✓ types 1.2s
48
+ ✓ unit 2.4s
49
+ ✓ lint 0.6s
50
+
51
+ Result
52
+ ✓ Verified
53
+
54
+ Report
55
+ .veris/reports/verify-2026-07-08T22-41-03-000Z-1.md
56
+ ```
57
+
58
+ `Risk` is shown as `—` in v0.1 — risk scoring is not built yet; the column
59
+ exists so the layout is stable across future versions and never fakes a
60
+ number.
61
+
62
+ ## What v0.1 does — and does not do
63
+
64
+ Veris v0.1 is an **orchestrator**, not a test engine. It shells out to
65
+ tools you already have installed and turns their exit codes and output into
66
+ one verdict:
67
+
68
+ - **Orchestrates:** `tsc` (types), Vitest, Jest, and `node:test` (unit
69
+ tests), and ESLint or Biome (lint) — whichever your project already has
70
+ configured. Playwright is *detected* and reported as available; it is not
71
+ run.
72
+ - **Does not** run browser tests, and does not build or ship a native test
73
+ execution engine. Those are explicit non-goals for v0.1 (see the design
74
+ spec linked below).
75
+ - **Does not** impose a linter, a test runner, or any new config format —
76
+ detection is read-only and `init` never overwrites an existing
77
+ `.veris/config.json`.
78
+
79
+ ### The verdict is three states, not two
80
+
81
+ - **`verified`** — every configured capability ran and passed.
82
+ - **`failed`** — at least one check failed. Exit code `1`.
83
+ - **`partial`** — no failures, but at least one configured capability was
84
+ skipped or its result is unknown (e.g. a runner wasn't installed). Exit
85
+ code `2` by default.
86
+
87
+ **`partial` is not a pass.** Veris never folds a skipped check into
88
+ "verified" — that would manufacture confidence CI shouldn't have. Teams that
89
+ want partial results to pass CI can opt in explicitly with
90
+ `veris verify --partial-ok` (exits `0` on partial).
91
+
92
+ | Verdict | Exit code | Meaning |
93
+ |----------|-----------|--------------------------------------------|
94
+ | verified | `0` | every configured check passed |
95
+ | failed | `1` | at least one check failed |
96
+ | partial | `2` (`0` with `--partial-ok`) | no failures, but something was skipped |
97
+
98
+ ## Developer loop
99
+
100
+ For fast local iteration, veris can scope checks to what you changed instead
101
+ of always running the full set.
102
+
103
+ ### `veris affected`
104
+
105
+ ```bash
106
+ veris affected # checks affected by working-tree changes vs HEAD
107
+ veris affected --base main # checks affected by the diff against another ref (PR/CI)
108
+ ```
109
+
110
+ `affected` looks at which files changed — working tree + untracked files
111
+ against `HEAD`, or against `--base <ref>` for PR/CI diffs — and maps each
112
+ changed file to the check categories it plausibly touches:
113
+
114
+ | Changed file | Checks run |
115
+ |----------------------|-------------------------------|
116
+ | test file | unit, lint |
117
+ | TypeScript file | types, lint, unit |
118
+ | JavaScript file | lint, unit |
119
+ | config (tsconfig, biome/eslint config, `package.json`, `veris.config.*`) | every available check |
120
+ | docs/assets (`.md`, images, `LICENSE`) | nothing |
121
+ | anything else unrecognized | every available check (safe default) |
122
+
123
+ This is **coarse — there is no import graph yet**. `affected` maps changed
124
+ *files* to check *categories*, not to the specific modules or tests that
125
+ actually import them; a real dependency-aware "run exactly the tests this
126
+ file affects" is planned for v0.3. Today it will sometimes run more than the
127
+ minimal ideal set (a config change reruns everything), but it never silently
128
+ skips work it can't prove is safe to skip.
129
+
130
+ **The verdict is honestly scoped.** An `affected` run never prints a bare
131
+ "Verified" — the terminal output and report say "Affected checks passed" (or
132
+ "Affected checks failed" / "Affected: partial") instead, and any
133
+ available-but-unaffected capability is listed as `skipped — not affected by
134
+ changes` rather than being folded into the pass. If nothing is affected (for
135
+ example you only touched a doc file), veris prints "Nothing affected" and
136
+ exits `0` — but that is explicitly **not** a verified result: no checks ran
137
+ at all.
138
+
139
+ ### `veris watch`
140
+
141
+ ```bash
142
+ veris watch # re-run affected checks as files change
143
+ veris watch --poll # use mtime polling instead of native fs.watch
144
+ ```
145
+
146
+ `watch` runs a full baseline over every available check once, then watches
147
+ the working tree and re-runs only the checks affected by whatever changed
148
+ since the last tick — using Node's built-in `fs.watch` (recursive). **No new
149
+ dependency was added for this.** On platforms where recursive `fs.watch`
150
+ isn't supported, or on filesystems (containers, some network mounts) where
151
+ native change events are unreliable, pass `--poll` to fall back to an
152
+ interval-based scan that diffs file mtimes instead.
153
+
154
+ Each tick reprints the full check board. A capability that wasn't affected by
155
+ the latest change keeps showing its last real result, marked `⟳ cached` — a
156
+ cached **failure stays a failure** (✗); it is never hidden or silently
157
+ dropped just because it didn't rerun this tick. Press Ctrl-C to stop; veris
158
+ closes the watcher (or poll loop) cleanly and exits `0`.
159
+
160
+ ## Evidence
161
+
162
+ Every `veris verify` run writes:
163
+
164
+ - A Markdown report under `.veris/reports/verify-<run-id>.md` — project and
165
+ environment metadata, per-check status/timing/summary, the verdict with
166
+ its skipped list and reasons, and log references. Paste it straight into a
167
+ PR.
168
+ - Raw per-check logs and run metadata under `.veris/runs/<run-id>/`.
169
+
170
+ `.veris/config.json` and `.veris/.gitignore` are meant to be committed;
171
+ `.veris/runs/`, `.veris/reports/`, and `.veris/cache/` are gitignored by
172
+ `veris init`.
173
+
174
+ ## Design
175
+
176
+ Full rationale, locked decisions, and the v0.2+ roadmap live in the design
177
+ spec: [`docs/superpowers/specs/2026-07-08-veris-v0.1-design.md`](docs/superpowers/specs/2026-07-08-veris-v0.1-design.md).
178
+
179
+ ## License
180
+
181
+ MIT
package/bin/veris ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import("../dist/index.js")
3
+ .then(({ main }) => main(process.argv))
4
+ .catch((e) => {
5
+ console.error("veris:", e instanceof Error ? e.message : String(e));
6
+ process.exit(1);
7
+ });