handoff-check 0.3.1 → 0.5.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 +17 -0
- package/README.md +71 -14
- package/dist/cli.js +760 -200
- package/docs/agent-integration.md +15 -7
- package/docs/architecture.md +11 -0
- package/docs/decisions/0004-explainable-verification.md +78 -0
- package/docs/decisions/0005-local-diagnostics-and-lifecycle.md +73 -0
- package/docs/development-plan.md +16 -3
- package/docs/explainability.md +63 -0
- package/docs/first-check.md +9 -8
- package/docs/lifecycle.md +99 -0
- package/docs/releasing.md +4 -4
- package/docs/roadmap.md +9 -1
- package/examples/retained-content/constraints.json +12 -0
- package/examples/retained-content/handoff.json +20 -0
- package/examples/retained-content/original.json +12 -0
- package/package.json +1 -1
- package/schemas/handoff.v3.schema.json +116 -0
- package/skills/handoff-check/SKILL.md +33 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
- Add read-only doctor diagnostics for project inputs, versions, paths and integrations.
|
|
6
|
+
- Add stdout-only hook-config for explicit, non-overwriting Claude SessionStart setup.
|
|
7
|
+
- Add a bounded local advisory lifecycle adapter using the existing verifier.
|
|
8
|
+
- Document host capabilities, local-package prerequisites and fresh critical-action checks.
|
|
9
|
+
- Preserve verify/snapshot/explain contracts; never automatically refresh baselines.
|
|
10
|
+
|
|
11
|
+
## 0.4.0
|
|
12
|
+
|
|
13
|
+
- Add manifest-only explain in text, JSON and Markdown using verifier lifecycle decisions.
|
|
14
|
+
- Add opt-in snapshot --include-content with strictly validated retained-content v3 handoffs.
|
|
15
|
+
- Show ordered field-level before/after changes for active CHANGED rules in v3 results.
|
|
16
|
+
- Add Markdown verification reports with scope/time, count, tracking, policies and findings.
|
|
17
|
+
- Preserve v1/v2 JSON contracts, default v2 snapshots and read-only verification.
|
|
18
|
+
- Escape untrusted Markdown structure/HTML and terminal formatting controls.
|
|
19
|
+
|
|
3
20
|
## 0.3.1
|
|
4
21
|
|
|
5
22
|
- Replace obsolete pre-publication onboarding instructions with registry usage.
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
A deterministic, local CLI that verifies active constraints before a coding agent
|
|
4
4
|
resumes work.
|
|
5
5
|
|
|
6
|
-
**Version: 0.
|
|
6
|
+
**Version: 0.5.0.**
|
|
7
7
|
|
|
8
8
|
A task summary may preserve the goal while losing an active rule, carrying an
|
|
9
9
|
expired restriction, or moving a staging-only instruction into production.
|
|
@@ -18,8 +18,8 @@ Source references are review metadata and are never fetched.
|
|
|
18
18
|
Run in the repository where your agent works:
|
|
19
19
|
|
|
20
20
|
```sh
|
|
21
|
-
npx handoff-check@0.
|
|
22
|
-
npx handoff-check@0.
|
|
21
|
+
npx handoff-check@0.5.0 init --scope staging --agent both --dry-run
|
|
22
|
+
npx handoff-check@0.5.0 init --scope staging --agent both
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
This creates `.handoff-check.json`, starter `constraints.json` and `handoff.json`,
|
|
@@ -33,7 +33,7 @@ on verification. Revisions and hashes detect edits under an unchanged rule ID.
|
|
|
33
33
|
Ask a resuming agent to use the installed skill, or run:
|
|
34
34
|
|
|
35
35
|
```sh
|
|
36
|
-
npx handoff-check@0.
|
|
36
|
+
npx handoff-check@0.5.0 verify --format json --require-content
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
The saved config supplies paths and scope. `init --ci` also creates a pinned GitHub
|
|
@@ -42,7 +42,7 @@ agent execution; CI enforces the declared-ID comparison when its workflow runs.
|
|
|
42
42
|
Neither checks whether the agent obeys a rule's meaning.
|
|
43
43
|
|
|
44
44
|
Node.js 22+ is required; end users do not need Bun. Global installation is also
|
|
45
|
-
available: `npm install --global handoff-check@0.
|
|
45
|
+
available: `npm install --global handoff-check@0.5.0`. For contributor builds or
|
|
46
46
|
offline package testing, see the [setup guide](docs/agent-integration.md).
|
|
47
47
|
|
|
48
48
|
For a complete first-rule walkthrough, including a passing baseline and a detected
|
|
@@ -65,7 +65,7 @@ default but are explicitly marked. Unexpected reported IDs still fail.
|
|
|
65
65
|
To require actual active rules, opt in:
|
|
66
66
|
|
|
67
67
|
```sh
|
|
68
|
-
npx handoff-check@0.
|
|
68
|
+
npx handoff-check@0.5.0 verify --require-content --require-active --format json
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
A zero active set produces global NO_ACTIVE_CONSTRAINTS (no fake ID), mismatch
|
|
@@ -83,8 +83,8 @@ init and snapshot reject it. See the
|
|
|
83
83
|
After reviewing rules at handoff creation, capture a new baseline:
|
|
84
84
|
|
|
85
85
|
```sh
|
|
86
|
-
npx handoff-check@0.
|
|
87
|
-
npx handoff-check@0.
|
|
86
|
+
npx handoff-check@0.5.0 snapshot --task "Resume migration review" --output handoff.next.json
|
|
87
|
+
npx handoff-check@0.5.0 verify --handoff handoff.next.json --require-content --format json
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
Snapshot creates a new file exclusively. Review it before deliberately replacing
|
|
@@ -100,9 +100,42 @@ CHANGED C-07 Review changed constraint: ...; handoff revision 1, current r
|
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
JSON findings include expected/reported revision and hash. This detects a change;
|
|
103
|
-
|
|
103
|
+
v2 does not retain old text or authenticate either file. Source reference text is
|
|
104
104
|
hashed, but referenced documents are not fetched or checked.
|
|
105
105
|
|
|
106
|
+
## Explain rules and review field changes
|
|
107
|
+
|
|
108
|
+
```sh
|
|
109
|
+
npx handoff-check@0.5.0 explain --format markdown
|
|
110
|
+
npx handoff-check@0.5.0 snapshot --task "Review migration" --include-content --output handoff.reviewed.json
|
|
111
|
+
npx handoff-check@0.5.0 verify --handoff handoff.reviewed.json --require-content --format markdown
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
`explain` shows every manifest rule's applicability for the selected scope/time,
|
|
115
|
+
including global, out-of-scope and inactive rules. It uses the same lifecycle
|
|
116
|
+
precedence as verify, never reads the handoff, and exits 0 for a valid explanation.
|
|
117
|
+
It is not a handoff verification. Text, JSON and Markdown are supported.
|
|
118
|
+
|
|
119
|
+
Snapshot still creates v2 by default. Explicit `--include-content` creates a
|
|
120
|
+
**v3 handoff** retaining complete old rule content. For active `CHANGED` rules,
|
|
121
|
+
v3 JSON adds ordered `changes` with typed `before` (saved) and `after` (current)
|
|
122
|
+
values; null means an absent optional field. Text/Markdown show these field deltas,
|
|
123
|
+
including revision-only changes. Lifecycle findings retain precedence. V2 reports
|
|
124
|
+
say previous content is unavailable; hashes cannot reconstruct it.
|
|
125
|
+
|
|
126
|
+
Retained descriptions and source references may contain sensitive data. Review
|
|
127
|
+
before storing or sharing snapshots/reports; retention is never automatic. V3
|
|
128
|
+
validates each stored rule against its ID, revision and hash, but this does not
|
|
129
|
+
authenticate either file. Upgrade all consumers before adopting v3: older CLIs
|
|
130
|
+
cannot read it. No input migration is needed to keep using v1/v2 on 0.4.
|
|
131
|
+
|
|
132
|
+
`verify --format markdown` preserves exit codes 0/1/2 and includes scope, time,
|
|
133
|
+
active count, tracking mode, requested policies and findings. To save a report,
|
|
134
|
+
redirect stdout to a separate file; a shell creates/truncates the destination, so
|
|
135
|
+
never choose a manifest or handoff path. Markdown is verify/explain-only.
|
|
136
|
+
See [ADR 0004](docs/decisions/0004-explainable-verification.md) and the
|
|
137
|
+
[retained-content example](examples/retained-content/handoff.json).
|
|
138
|
+
|
|
106
139
|
See the [v2 handoff schema](schemas/handoff.v2.schema.json),
|
|
107
140
|
[v2 manifest schema](schemas/constraints.v2.schema.json), and
|
|
108
141
|
[canonicalization contract](docs/decisions/0002-content-aware-handoffs.md).
|
|
@@ -113,19 +146,31 @@ manifest; its current manifest edits the description without bumping revision.
|
|
|
113
146
|
|
|
114
147
|
V1 handoffs remain supported in ID-only mode with unchanged v1 JSON result fields.
|
|
115
148
|
They cannot detect content edits. `--require-content` rejects them instead of
|
|
116
|
-
silently falling back. V2 handoffs work with either v1 manifests (implicit revision `1`)
|
|
149
|
+
silently falling back. V2/v3 handoffs work with either v1 manifests (implicit revision `1`)
|
|
117
150
|
or revisioned v2 manifests. Scope must match the v2 handoff's saved scope.
|
|
118
151
|
|
|
119
152
|
Review current rules, capture a new v2 baseline, and deliberately update the saved
|
|
120
153
|
handoff. Existing inputs are preserved by init, not silently upgraded. Review
|
|
121
154
|
installed skills, instruction blocks and CI commands to update their pinned
|
|
122
|
-
version to 0.
|
|
155
|
+
version to 0.5.0 and add `--require-content`. Init refuses to overwrite differing
|
|
123
156
|
integrations; compare them with the new packaged templates and update reviewed
|
|
124
157
|
copies explicitly. Never refresh before checking resumed work or reuse capturedAt
|
|
125
158
|
as the clock for real resumed work.
|
|
126
159
|
|
|
127
160
|
## Configuration and initialization
|
|
128
161
|
|
|
162
|
+
For read-only installation diagnostics, run `npx handoff-check@0.5.0 doctor`.
|
|
163
|
+
`doctor --format json` reports paths, supported input versions and managed
|
|
164
|
+
integration pins. Its exit codes are 0 healthy, 1 attention and 2 invalid invocation;
|
|
165
|
+
it does not verify a handoff or prove a host ran the integration.
|
|
166
|
+
|
|
167
|
+
`npx handoff-check@0.5.0 hook-config --host claude` emits an opt-in advisory
|
|
168
|
+
SessionStart snippet to merge manually into existing settings. It never overwrites
|
|
169
|
+
settings, and requires a pinned project-local package. The local adapter uses the
|
|
170
|
+
same verifier without network/model calls; startup/resume/clear/compact checks
|
|
171
|
+
cannot authorize or block deployment. Codex/Cursor adapters are not shipped.
|
|
172
|
+
See [lifecycle setup, host matrix and critical-action recipes](docs/lifecycle.md).
|
|
173
|
+
|
|
129
174
|
`verify` reads only `.handoff-check.json` in the current directory by default,
|
|
130
175
|
without searching parents. Missing implicit config falls back to default input
|
|
131
176
|
names, but scope is still required. Explicit `--config <path>` must exist.
|
|
@@ -244,16 +289,28 @@ handoff-check verify --scope <scope>
|
|
|
244
289
|
[--constraints <path>] default: constraints.json
|
|
245
290
|
[--handoff <path>] default: handoff.json
|
|
246
291
|
[--as-of <UTC time>] default: current time, captured once
|
|
247
|
-
[--format text|json]
|
|
248
|
-
[--require-content] require a v2 content-aware handoff
|
|
292
|
+
[--format text|json|markdown] default: text
|
|
293
|
+
[--require-content] require a v2/v3 content-aware handoff
|
|
249
294
|
[--require-active] fail when no active constraints apply
|
|
250
295
|
|
|
251
296
|
handoff-check snapshot --task <task>
|
|
252
297
|
[--config <path>] [--constraints <path>] [--scope <scope>]
|
|
253
298
|
[--as-of <UTC time>] [--output <new-file>] [--format text|json]
|
|
299
|
+
[--include-content] opt-in v3 retained content; default v2
|
|
300
|
+
|
|
301
|
+
handoff-check explain
|
|
302
|
+
[--config <path>] [--constraints <path>] [--scope <scope>]
|
|
303
|
+
[--as-of <UTC time>] [--format text|json|markdown]
|
|
254
304
|
|
|
255
305
|
handoff-check init --scope <scope>
|
|
256
306
|
[--agent codex|claude|both|none] [--dry-run] [--ci] [--format text|json]
|
|
307
|
+
|
|
308
|
+
handoff-check doctor
|
|
309
|
+
[--config <path>] [--constraints <path>] [--handoff <path>] [--scope <scope>]
|
|
310
|
+
[--host claude|codex|cursor] [--format text|json]
|
|
311
|
+
|
|
312
|
+
handoff-check hook-config --host claude [--require-active]
|
|
313
|
+
handoff-check hook --host claude --config <absolute-path> [--require-active]
|
|
257
314
|
```
|
|
258
315
|
|
|
259
316
|
Snapshot writes v2 JSON to stdout unless `--output` creates a new file. Its
|
|
@@ -269,7 +326,7 @@ include global rules even when no scope-specific rules exist.
|
|
|
269
326
|
|
|
270
327
|
| Exit code | Meaning |
|
|
271
328
|
| --------- | ---------------------------------------------------------- |
|
|
272
|
-
| 0 | Verification succeeded,
|
|
329
|
+
| 0 | Verification succeeded, or explain/init/snapshot succeeded |
|
|
273
330
|
| 1 | Rule or active-set policy mismatch; inspect findings |
|
|
274
331
|
| 2 | Invalid arguments, invalid input, or unreadable input file |
|
|
275
332
|
|