handoff-check 0.6.0 → 0.8.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 +18 -0
- package/README.md +60 -18
- package/dist/cli.js +499 -107
- package/docs/agent-integration.md +4 -4
- package/docs/architecture.md +12 -0
- package/docs/decisions/0007-snapshot-diff-and-guided-setup.md +26 -0
- package/docs/decisions/0008-verified-command-runner.md +30 -0
- package/docs/development-plan.md +22 -3
- package/docs/explainability.md +4 -4
- package/docs/first-check.md +6 -6
- package/docs/lifecycle.md +15 -4
- package/docs/project-context.md +6 -6
- package/docs/releasing.md +4 -4
- package/docs/roadmap.md +8 -1
- package/docs/snapshot-diff-and-setup.md +74 -0
- package/docs/verified-commands.md +104 -0
- package/package.json +1 -1
- package/schemas/diff.v1.schema.json +121 -0
- package/skills/handoff-check/SKILL.md +30 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
- Add run to verify current content-aware, nonempty constraints before starting an explicit command.
|
|
6
|
+
- Preserve config/profile/project/scope selection using the existing pure verifier.
|
|
7
|
+
- Require an explicit argv separator, pass arguments without an implicit shell, and inherit process streams/cwd/environment.
|
|
8
|
+
- Keep wrapper diagnostics on stderr and preserve child exit codes with direct-child signal forwarding.
|
|
9
|
+
- Refuse nonregular run inputs and bound stalled asynchronous preflight reads without limiting command runtime.
|
|
10
|
+
- Preserve existing verify, snapshot, setup, diff and lifecycle contracts; never refresh baselines automatically.
|
|
11
|
+
|
|
12
|
+
## 0.7.0
|
|
13
|
+
|
|
14
|
+
- Add explicit two-snapshot diff with added, removed, changed and unchanged counts.
|
|
15
|
+
- Compare content-aware unbound v2/v3 and bound v4 snapshots with strict scope/project matching.
|
|
16
|
+
- Show typed field differences when both snapshots retain content; preserve hash-only comparison.
|
|
17
|
+
- Add terminal-only guided setup with explicit project/environments and a real global rule.
|
|
18
|
+
- Preview exact new project-bound files and retained baselines before explicit adoption; refuse overwrites.
|
|
19
|
+
- Preserve existing verification, init, profile and lifecycle contracts without automatic migration.
|
|
20
|
+
|
|
3
21
|
## 0.6.0
|
|
4
22
|
|
|
5
23
|
- Add opt-in manifest v3/handoff v4 portable project binding with strict matching.
|
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.8.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.8.0 init --scope staging --agent both --dry-run
|
|
22
|
+
npx handoff-check@0.8.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.8.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.8.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.8.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.8.0 snapshot --task "Resume migration review" --output handoff.next.json
|
|
87
|
+
npx handoff-check@0.8.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
|
|
@@ -106,9 +106,9 @@ hashed, but referenced documents are not fetched or checked.
|
|
|
106
106
|
## Explain rules and review field changes
|
|
107
107
|
|
|
108
108
|
```sh
|
|
109
|
-
npx handoff-check@0.
|
|
110
|
-
npx handoff-check@0.
|
|
111
|
-
npx handoff-check@0.
|
|
109
|
+
npx handoff-check@0.8.0 explain --format markdown
|
|
110
|
+
npx handoff-check@0.8.0 snapshot --task "Review migration" --include-content --output handoff.reviewed.json
|
|
111
|
+
npx handoff-check@0.8.0 verify --handoff handoff.reviewed.json --require-content --format markdown
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
`explain` shows every manifest rule's applicability for the selected scope/time,
|
|
@@ -133,7 +133,7 @@ cannot read it. No input migration is needed to keep using v1/v2 on 0.4.
|
|
|
133
133
|
`verify --format markdown` preserves exit codes 0/1/2 and includes scope, time,
|
|
134
134
|
active count, tracking mode, requested policies and findings. To save a report,
|
|
135
135
|
redirect stdout to a separate file; a shell creates/truncates the destination, so
|
|
136
|
-
never choose a manifest or handoff path. Markdown is verify
|
|
136
|
+
never choose a manifest or handoff path. Markdown is supported by verify, explain and diff.
|
|
137
137
|
See [ADR 0004](docs/decisions/0004-explainable-verification.md) and the
|
|
138
138
|
[retained-content example](examples/retained-content/handoff.json).
|
|
139
139
|
|
|
@@ -153,19 +153,47 @@ or revisioned v2 manifests. Scope must match the v2 handoff's saved scope.
|
|
|
153
153
|
Review current rules, capture a new v2 baseline, and deliberately update the saved
|
|
154
154
|
handoff. Existing inputs are preserved by init, not silently upgraded. Review
|
|
155
155
|
installed skills, instruction blocks and CI commands to update their pinned
|
|
156
|
-
version to 0.
|
|
156
|
+
version to 0.8.0 and add `--require-content`. Init refuses to overwrite differing
|
|
157
157
|
integrations; compare them with the new packaged templates and update reviewed
|
|
158
158
|
copies explicitly. Never refresh before checking resumed work or reuse capturedAt
|
|
159
159
|
as the clock for real resumed work.
|
|
160
160
|
|
|
161
|
+
## Verify before running a command
|
|
162
|
+
|
|
163
|
+
```sh
|
|
164
|
+
npx handoff-check@0.8.0 run --profile production -- node scripts/preflight-demo.js
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Use the intended configured profile and an explicitly chosen program. `run`
|
|
168
|
+
requires a content-aware handoff and at least one active constraint, checks the
|
|
169
|
+
current clock, and starts the command only after verification passes. All args
|
|
170
|
+
after `--` are passed literally with no implicit shell. Diagnostics use stderr;
|
|
171
|
+
the child inherits stdout/stdin/environment/cwd and its exit code is preserved.
|
|
172
|
+
The read-only verifier stays unchanged; the supplied program can have side effects.
|
|
173
|
+
This is one preflight, not a sandbox or authorization grant, and inputs may change
|
|
174
|
+
after the check. See [verified commands](docs/verified-commands.md).
|
|
175
|
+
|
|
176
|
+
## Snapshot diff and guided setup
|
|
177
|
+
|
|
178
|
+
Run `npx handoff-check@0.8.0 setup` in a terminal to create a new project-bound
|
|
179
|
+
configuration with explicit environments and one real rule you author. Review
|
|
180
|
+
the exact retained baselines before typing `yes`; existing files are never replaced.
|
|
181
|
+
No agent integrations or dependencies are installed. Use `--dry-run` to preview.
|
|
182
|
+
|
|
183
|
+
Compare two saved snapshots with `diff --before saved.json --after next.json`.
|
|
184
|
+
It shows added/removed/changed rules, with field details when both sides retain
|
|
185
|
+
content. Exit 0 means unchanged, 1 differences, 2 invalid. It compares declarations,
|
|
186
|
+
not agent memory or current applicability; continue using verify before resuming.
|
|
187
|
+
See [the guide](docs/snapshot-diff-and-setup.md).
|
|
188
|
+
|
|
161
189
|
## Configuration and initialization
|
|
162
190
|
|
|
163
191
|
0.6 adds optional portable project binding, explicit environment profiles and
|
|
164
192
|
reproducibility metadata. Existing unbound files/default JSON stay compatible.
|
|
165
193
|
|
|
166
194
|
```sh
|
|
167
|
-
npx handoff-check@0.
|
|
168
|
-
npx handoff-check@0.
|
|
195
|
+
npx handoff-check@0.8.0 verify --profile stage --require-content --report --format json
|
|
196
|
+
npx handoff-check@0.8.0 doctor --profile stage
|
|
169
197
|
```
|
|
170
198
|
|
|
171
199
|
These commands require an explicitly authored config v2 profile. Bound manifest
|
|
@@ -175,12 +203,12 @@ record the exact input/config bytes parsed, package version and policies; Git is
|
|
|
175
203
|
read only with separate --git-context. They are not signed attestations or proof
|
|
176
204
|
of compliance. See [setup, migration and examples](docs/project-context.md).
|
|
177
205
|
|
|
178
|
-
For read-only installation diagnostics, run `npx handoff-check@0.
|
|
206
|
+
For read-only installation diagnostics, run `npx handoff-check@0.8.0 doctor`.
|
|
179
207
|
`doctor --format json` reports paths, supported input versions and managed
|
|
180
208
|
integration pins. Its exit codes are 0 healthy, 1 attention and 2 invalid invocation;
|
|
181
209
|
it does not verify a handoff or prove a host ran the integration.
|
|
182
210
|
|
|
183
|
-
`npx handoff-check@0.
|
|
211
|
+
`npx handoff-check@0.8.0 hook-config --host claude` emits an opt-in advisory
|
|
184
212
|
SessionStart snippet to merge manually into existing settings. It never overwrites
|
|
185
213
|
settings, and requires a pinned project-local package. The local adapter uses the
|
|
186
214
|
same verifier without network/model calls; startup/resume/clear/compact checks
|
|
@@ -318,6 +346,15 @@ handoff-check explain
|
|
|
318
346
|
[--config <path>] [--constraints <path>] [--scope <scope>]
|
|
319
347
|
[--as-of <UTC time>] [--format text|json|markdown]
|
|
320
348
|
|
|
349
|
+
handoff-check diff --before <snapshot> --after <snapshot>
|
|
350
|
+
[--format text|json|markdown]
|
|
351
|
+
|
|
352
|
+
handoff-check setup [--dry-run]
|
|
353
|
+
|
|
354
|
+
handoff-check run
|
|
355
|
+
[--config <path>] [--profile <name> | --scope <scope>]
|
|
356
|
+
[--constraints <path>] [--handoff <path>] -- <executable> [arguments...]
|
|
357
|
+
|
|
321
358
|
handoff-check init --scope <scope>
|
|
322
359
|
[--agent codex|claude|both|none] [--dry-run] [--ci] [--format text|json]
|
|
323
360
|
|
|
@@ -329,7 +366,7 @@ handoff-check hook-config --host claude [--require-active]
|
|
|
329
366
|
handoff-check hook --host claude --config <absolute-path> [--require-active]
|
|
330
367
|
```
|
|
331
368
|
|
|
332
|
-
Verify/snapshot/explain/doctor/hook/hook-config accept explicit `--profile`;
|
|
369
|
+
Verify/snapshot/explain/doctor/hook/hook-config/run accept explicit `--profile`;
|
|
333
370
|
init does not. Profile selection rejects scope/input-path overrides, but permits
|
|
334
371
|
--config. Verify-only --report requires JSON or Markdown; --git-context additionally
|
|
335
372
|
requires --report and Git with an existing commit. No reports are saved automatically.
|
|
@@ -352,6 +389,11 @@ include global rules even when no scope-specific rules exist.
|
|
|
352
389
|
| 1 | Rule or active-set policy mismatch; inspect findings |
|
|
353
390
|
| 2 | Invalid arguments, invalid input, or unreadable input file |
|
|
354
391
|
|
|
392
|
+
`run` returns 1 for a blocked preflight or 2 for invalid input/launch error.
|
|
393
|
+
After launch it preserves the child's exit code, including 1/2, or maps an
|
|
394
|
+
unhandled signal to 128 + the OS signal number. Read stderr phases to distinguish
|
|
395
|
+
blocked verification from a failed program. Run has no format/policy/time override.
|
|
396
|
+
|
|
355
397
|
Per-rule findings include `MISSING`, `EXPIRED`, `REVOKED`, `SUPERSEDED`, `OUT_OF_SCOPE`,
|
|
356
398
|
`UNKNOWN`, and (for v2) `CHANGED`, ordered by ID. A reported ID receives one primary finding according to
|
|
357
399
|
the precedence in the lifecycle ADR.
|