handoff-check 0.7.0 → 0.9.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 +74 -18
- package/dist/cli.js +425 -30
- package/docs/agent-integration.md +4 -4
- package/docs/architecture.md +13 -0
- package/docs/decisions/0008-verified-command-runner.md +30 -0
- package/docs/decisions/0009-independent-rule-review-maintenance.md +34 -0
- package/docs/development-plan.md +22 -5
- 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 +9 -1
- package/docs/rule-reviews.md +120 -0
- package/docs/snapshot-diff-and-setup.md +5 -5
- package/docs/verified-commands.md +104 -0
- package/examples/rule-reviews/config.json +9 -0
- package/examples/rule-reviews/constraints.json +27 -0
- package/examples/rule-reviews/reviews.json +22 -0
- package/package.json +1 -1
- package/schemas/review-registry.v1.schema.json +68 -0
- package/schemas/review-result.v1.schema.json +234 -0
- package/skills/handoff-check/SKILL.md +31 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
- Add independent review registries with rule owners, review windows and exact revision/hash references.
|
|
6
|
+
- Add review reports for missing, stale, future, overdue and orphan review metadata using existing active-rule selection.
|
|
7
|
+
- Add explicit review-record capture to stdout or exclusive new files after deliberate rule review.
|
|
8
|
+
- Share project/profile/path semantics without reading or refreshing handoff baselines.
|
|
9
|
+
- Publish registry/result schemas, synthetic fixtures and migration-free maintenance guidance.
|
|
10
|
+
- Keep old manifests, canonical hashes, verify/run and advisory lifecycle policy unchanged; review deadlines never deactivate constraints.
|
|
11
|
+
|
|
12
|
+
## 0.8.0
|
|
13
|
+
|
|
14
|
+
- Add run to verify current content-aware, nonempty constraints before starting an explicit command.
|
|
15
|
+
- Preserve config/profile/project/scope selection using the existing pure verifier.
|
|
16
|
+
- Require an explicit argv separator, pass arguments without an implicit shell, and inherit process streams/cwd/environment.
|
|
17
|
+
- Keep wrapper diagnostics on stderr and preserve child exit codes with direct-child signal forwarding.
|
|
18
|
+
- Refuse nonregular run inputs and bound stalled asynchronous preflight reads without limiting command runtime.
|
|
19
|
+
- Preserve existing verify, snapshot, setup, diff and lifecycle contracts; never refresh baselines automatically.
|
|
20
|
+
|
|
3
21
|
## 0.7.0
|
|
4
22
|
|
|
5
23
|
- Add explicit two-snapshot diff with added, removed, changed and unchanged counts.
|
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.9.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.9.0 init --scope staging --agent both --dry-run
|
|
22
|
+
npx handoff-check@0.9.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.9.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.9.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.9.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.9.0 snapshot --task "Resume migration review" --output handoff.next.json
|
|
87
|
+
npx handoff-check@0.9.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.9.0 explain --format markdown
|
|
110
|
+
npx handoff-check@0.9.0 snapshot --task "Review migration" --include-content --output handoff.reviewed.json
|
|
111
|
+
npx handoff-check@0.9.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,
|
|
@@ -153,14 +153,46 @@ 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.9.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
|
+
## Rule ownership and review deadlines
|
|
162
|
+
|
|
163
|
+
After deliberately reviewing the applicable rules, record their ownership in a
|
|
164
|
+
separate registry and check it independently:
|
|
165
|
+
|
|
166
|
+
```sh
|
|
167
|
+
npx handoff-check@0.9.0 review-record --profile stage --owner platform-team --review-by 2027-01-01T00:00:00Z --output rules.review.next.json
|
|
168
|
+
npx handoff-check@0.9.0 review --profile stage --registry rules.review.next.json
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Choose the intended profile, owner and deadline; one owner/deadline applies to all
|
|
172
|
+
selected/global active rules in that record. Review reports missing, stale,
|
|
173
|
+
future, overdue and orphan metadata with explicit counts. Stale revision/hash
|
|
174
|
+
references cannot approve edited rules. A record captures a subset and never
|
|
175
|
+
merges or overwrites an aggregate registry automatically. Review deadlines do not
|
|
176
|
+
expire constraints or change verify/run/hooks. See [rule reviews](docs/rule-reviews.md).
|
|
177
|
+
|
|
178
|
+
## Verify before running a command
|
|
179
|
+
|
|
180
|
+
```sh
|
|
181
|
+
npx handoff-check@0.9.0 run --profile production -- node scripts/preflight-demo.js
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Use the intended configured profile and an explicitly chosen program. `run`
|
|
185
|
+
requires a content-aware handoff and at least one active constraint, checks the
|
|
186
|
+
current clock, and starts the command only after verification passes. All args
|
|
187
|
+
after `--` are passed literally with no implicit shell. Diagnostics use stderr;
|
|
188
|
+
the child inherits stdout/stdin/environment/cwd and its exit code is preserved.
|
|
189
|
+
The read-only verifier stays unchanged; the supplied program can have side effects.
|
|
190
|
+
This is one preflight, not a sandbox or authorization grant, and inputs may change
|
|
191
|
+
after the check. See [verified commands](docs/verified-commands.md).
|
|
192
|
+
|
|
161
193
|
## Snapshot diff and guided setup
|
|
162
194
|
|
|
163
|
-
Run `npx handoff-check@0.
|
|
195
|
+
Run `npx handoff-check@0.9.0 setup` in a terminal to create a new project-bound
|
|
164
196
|
configuration with explicit environments and one real rule you author. Review
|
|
165
197
|
the exact retained baselines before typing `yes`; existing files are never replaced.
|
|
166
198
|
No agent integrations or dependencies are installed. Use `--dry-run` to preview.
|
|
@@ -177,8 +209,8 @@ See [the guide](docs/snapshot-diff-and-setup.md).
|
|
|
177
209
|
reproducibility metadata. Existing unbound files/default JSON stay compatible.
|
|
178
210
|
|
|
179
211
|
```sh
|
|
180
|
-
npx handoff-check@0.
|
|
181
|
-
npx handoff-check@0.
|
|
212
|
+
npx handoff-check@0.9.0 verify --profile stage --require-content --report --format json
|
|
213
|
+
npx handoff-check@0.9.0 doctor --profile stage
|
|
182
214
|
```
|
|
183
215
|
|
|
184
216
|
These commands require an explicitly authored config v2 profile. Bound manifest
|
|
@@ -188,12 +220,12 @@ record the exact input/config bytes parsed, package version and policies; Git is
|
|
|
188
220
|
read only with separate --git-context. They are not signed attestations or proof
|
|
189
221
|
of compliance. See [setup, migration and examples](docs/project-context.md).
|
|
190
222
|
|
|
191
|
-
For read-only installation diagnostics, run `npx handoff-check@0.
|
|
223
|
+
For read-only installation diagnostics, run `npx handoff-check@0.9.0 doctor`.
|
|
192
224
|
`doctor --format json` reports paths, supported input versions and managed
|
|
193
225
|
integration pins. Its exit codes are 0 healthy, 1 attention and 2 invalid invocation;
|
|
194
226
|
it does not verify a handoff or prove a host ran the integration.
|
|
195
227
|
|
|
196
|
-
`npx handoff-check@0.
|
|
228
|
+
`npx handoff-check@0.9.0 hook-config --host claude` emits an opt-in advisory
|
|
197
229
|
SessionStart snippet to merge manually into existing settings. It never overwrites
|
|
198
230
|
settings, and requires a pinned project-local package. The local adapter uses the
|
|
199
231
|
same verifier without network/model calls; startup/resume/clear/compact checks
|
|
@@ -336,6 +368,18 @@ handoff-check diff --before <snapshot> --after <snapshot>
|
|
|
336
368
|
|
|
337
369
|
handoff-check setup [--dry-run]
|
|
338
370
|
|
|
371
|
+
handoff-check review --registry <review-file>
|
|
372
|
+
[--config <path>] [--profile <name> | --scope <scope>] [--constraints <path>]
|
|
373
|
+
[--as-of <UTC time>] [--format text|json|markdown]
|
|
374
|
+
|
|
375
|
+
handoff-check review-record --owner <owner> --review-by <UTC time>
|
|
376
|
+
[--config <path>] [--profile <name> | --scope <scope>] [--constraints <path>]
|
|
377
|
+
[--as-of <UTC time>] [--output <new-file>] [--format text|json]
|
|
378
|
+
|
|
379
|
+
handoff-check run
|
|
380
|
+
[--config <path>] [--profile <name> | --scope <scope>]
|
|
381
|
+
[--constraints <path>] [--handoff <path>] -- <executable> [arguments...]
|
|
382
|
+
|
|
339
383
|
handoff-check init --scope <scope>
|
|
340
384
|
[--agent codex|claude|both|none] [--dry-run] [--ci] [--format text|json]
|
|
341
385
|
|
|
@@ -347,7 +391,8 @@ handoff-check hook-config --host claude [--require-active]
|
|
|
347
391
|
handoff-check hook --host claude --config <absolute-path> [--require-active]
|
|
348
392
|
```
|
|
349
393
|
|
|
350
|
-
Verify/snapshot/explain/doctor/hook/hook-config accept explicit `--profile`;
|
|
394
|
+
Verify/snapshot/explain/doctor/hook/hook-config/run accept explicit `--profile`;
|
|
395
|
+
review and review-record also accept profiles without reading handoffs;
|
|
351
396
|
init does not. Profile selection rejects scope/input-path overrides, but permits
|
|
352
397
|
--config. Verify-only --report requires JSON or Markdown; --git-context additionally
|
|
353
398
|
requires --report and Git with an existing commit. No reports are saved automatically.
|
|
@@ -370,6 +415,17 @@ include global rules even when no scope-specific rules exist.
|
|
|
370
415
|
| 1 | Rule or active-set policy mismatch; inspect findings |
|
|
371
416
|
| 2 | Invalid arguments, invalid input, or unreadable input file |
|
|
372
417
|
|
|
418
|
+
`run` returns 1 for a blocked preflight or 2 for invalid input/launch error.
|
|
419
|
+
After launch it preserves the child's exit code, including 1/2, or maps an
|
|
420
|
+
unhandled signal to 128 + the OS signal number. Read stderr phases to distinguish
|
|
421
|
+
blocked verification from a failed program. Run has no format/policy/time override.
|
|
422
|
+
|
|
423
|
+
Review exit 0 means all active rules have current maintenance metadata with no
|
|
424
|
+
orphan IDs; 1 means maintenance attention (including zero active); 2 means invalid.
|
|
425
|
+
Review-record succeeds with 0 or fails with 2. Its stdout record is JSON; --format
|
|
426
|
+
controls the acknowledgement only when --output creates a new file. These commands
|
|
427
|
+
never refresh saved handoffs or implicitly gate verify/run.
|
|
428
|
+
|
|
373
429
|
Per-rule findings include `MISSING`, `EXPIRED`, `REVOKED`, `SUPERSEDED`, `OUT_OF_SCOPE`,
|
|
374
430
|
`UNKNOWN`, and (for v2) `CHANGED`, ordered by ID. A reported ID receives one primary finding according to
|
|
375
431
|
the precedence in the lifecycle ADR.
|