handoff-check 0.5.0 → 0.7.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 -20
- package/dist/cli.js +639 -132
- package/docs/agent-integration.md +4 -4
- package/docs/architecture.md +12 -0
- package/docs/decisions/0006-project-profiles-and-reports.md +87 -0
- package/docs/decisions/0007-snapshot-diff-and-guided-setup.md +26 -0
- package/docs/development-plan.md +16 -2
- package/docs/explainability.md +7 -7
- package/docs/first-check.md +6 -6
- package/docs/lifecycle.md +6 -6
- package/docs/project-context.md +120 -0
- package/docs/releasing.md +4 -4
- package/docs/roadmap.md +7 -0
- package/docs/snapshot-diff-and-setup.md +74 -0
- package/examples/project-profiles/config.json +15 -0
- package/examples/project-profiles/constraints.json +27 -0
- package/examples/project-profiles/production.json +34 -0
- package/examples/project-profiles/staging.json +20 -0
- package/package.json +1 -1
- package/schemas/config.v2.schema.json +55 -0
- package/schemas/constraints.v3.schema.json +78 -0
- package/schemas/diff.v1.schema.json +121 -0
- package/schemas/handoff.v4.schema.json +193 -0
- package/schemas/report.v1.schema.json +168 -0
- package/skills/handoff-check/SKILL.md +35 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
- Add explicit two-snapshot diff with added, removed, changed and unchanged counts.
|
|
6
|
+
- Compare content-aware unbound v2/v3 and bound v4 snapshots with strict scope/project matching.
|
|
7
|
+
- Show typed field differences when both snapshots retain content; preserve hash-only comparison.
|
|
8
|
+
- Add terminal-only guided setup with explicit project/environments and a real global rule.
|
|
9
|
+
- Preview exact new project-bound files and retained baselines before explicit adoption; refuse overwrites.
|
|
10
|
+
- Preserve existing verification, init, profile and lifecycle contracts without automatic migration.
|
|
11
|
+
|
|
12
|
+
## 0.6.0
|
|
13
|
+
|
|
14
|
+
- Add opt-in manifest v3/handoff v4 portable project binding with strict matching.
|
|
15
|
+
- Add config v2 named environment profiles selected only by explicit --profile.
|
|
16
|
+
- Add optional verification report wrappers with exact parsed-input/config byte digests.
|
|
17
|
+
- Add separately requested, bounded read-only Git worktree/commit/branch context.
|
|
18
|
+
- Share profile/binding semantics with doctor and the advisory Claude adapter.
|
|
19
|
+
- Preserve old unbound contracts and default outputs; no automatic migration or baseline refresh.
|
|
20
|
+
|
|
3
21
|
## 0.5.0
|
|
4
22
|
|
|
5
23
|
- Add read-only doctor diagnostics for project inputs, versions, paths and integrations.
|
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.7.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.7.0 init --scope staging --agent both --dry-run
|
|
22
|
+
npx handoff-check@0.7.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.7.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.7.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.7.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.7.0 snapshot --task "Resume migration review" --output handoff.next.json
|
|
87
|
+
npx handoff-check@0.7.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.7.0 explain --format markdown
|
|
110
|
+
npx handoff-check@0.7.0 snapshot --task "Review migration" --include-content --output handoff.reviewed.json
|
|
111
|
+
npx handoff-check@0.7.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,
|
|
@@ -116,9 +116,10 @@ including global, out-of-scope and inactive rules. It uses the same lifecycle
|
|
|
116
116
|
precedence as verify, never reads the handoff, and exits 0 for a valid explanation.
|
|
117
117
|
It is not a handoff verification. Text, JSON and Markdown are supported.
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
Unbound snapshots create v2 by default or v3 with explicit `--include-content`.
|
|
120
|
+
Bound manifests create v4 in hashes mode by default, or retained mode with that
|
|
121
|
+
flag. Retained handoffs store complete old rule content. For active `CHANGED` rules,
|
|
122
|
+
retained v3/v4 JSON adds ordered `changes` with typed `before` (saved) and `after` (current)
|
|
122
123
|
values; null means an absent optional field. Text/Markdown show these field deltas,
|
|
123
124
|
including revision-only changes. Lifecycle findings retain precedence. V2 reports
|
|
124
125
|
say previous content is unavailable; hashes cannot reconstruct it.
|
|
@@ -132,7 +133,7 @@ cannot read it. No input migration is needed to keep using v1/v2 on 0.4.
|
|
|
132
133
|
`verify --format markdown` preserves exit codes 0/1/2 and includes scope, time,
|
|
133
134
|
active count, tracking mode, requested policies and findings. To save a report,
|
|
134
135
|
redirect stdout to a separate file; a shell creates/truncates the destination, so
|
|
135
|
-
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.
|
|
136
137
|
See [ADR 0004](docs/decisions/0004-explainable-verification.md) and the
|
|
137
138
|
[retained-content example](examples/retained-content/handoff.json).
|
|
138
139
|
|
|
@@ -152,19 +153,47 @@ or revisioned v2 manifests. Scope must match the v2 handoff's saved scope.
|
|
|
152
153
|
Review current rules, capture a new v2 baseline, and deliberately update the saved
|
|
153
154
|
handoff. Existing inputs are preserved by init, not silently upgraded. Review
|
|
154
155
|
installed skills, instruction blocks and CI commands to update their pinned
|
|
155
|
-
version to 0.
|
|
156
|
+
version to 0.7.0 and add `--require-content`. Init refuses to overwrite differing
|
|
156
157
|
integrations; compare them with the new packaged templates and update reviewed
|
|
157
158
|
copies explicitly. Never refresh before checking resumed work or reuse capturedAt
|
|
158
159
|
as the clock for real resumed work.
|
|
159
160
|
|
|
161
|
+
## Snapshot diff and guided setup
|
|
162
|
+
|
|
163
|
+
Run `npx handoff-check@0.7.0 setup` in a terminal to create a new project-bound
|
|
164
|
+
configuration with explicit environments and one real rule you author. Review
|
|
165
|
+
the exact retained baselines before typing `yes`; existing files are never replaced.
|
|
166
|
+
No agent integrations or dependencies are installed. Use `--dry-run` to preview.
|
|
167
|
+
|
|
168
|
+
Compare two saved snapshots with `diff --before saved.json --after next.json`.
|
|
169
|
+
It shows added/removed/changed rules, with field details when both sides retain
|
|
170
|
+
content. Exit 0 means unchanged, 1 differences, 2 invalid. It compares declarations,
|
|
171
|
+
not agent memory or current applicability; continue using verify before resuming.
|
|
172
|
+
See [the guide](docs/snapshot-diff-and-setup.md).
|
|
173
|
+
|
|
160
174
|
## Configuration and initialization
|
|
161
175
|
|
|
162
|
-
|
|
176
|
+
0.6 adds optional portable project binding, explicit environment profiles and
|
|
177
|
+
reproducibility metadata. Existing unbound files/default JSON stay compatible.
|
|
178
|
+
|
|
179
|
+
```sh
|
|
180
|
+
npx handoff-check@0.7.0 verify --profile stage --require-content --report --format json
|
|
181
|
+
npx handoff-check@0.7.0 doctor --profile stage
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
These commands require an explicitly authored config v2 profile. Bound manifest
|
|
185
|
+
v3/handoff v4 must share projectId; mixed/cross-project inputs fail with exit 2.
|
|
186
|
+
Profiles never infer environments or authorization from paths/branches. Reports
|
|
187
|
+
record the exact input/config bytes parsed, package version and policies; Git is
|
|
188
|
+
read only with separate --git-context. They are not signed attestations or proof
|
|
189
|
+
of compliance. See [setup, migration and examples](docs/project-context.md).
|
|
190
|
+
|
|
191
|
+
For read-only installation diagnostics, run `npx handoff-check@0.7.0 doctor`.
|
|
163
192
|
`doctor --format json` reports paths, supported input versions and managed
|
|
164
193
|
integration pins. Its exit codes are 0 healthy, 1 attention and 2 invalid invocation;
|
|
165
194
|
it does not verify a handoff or prove a host ran the integration.
|
|
166
195
|
|
|
167
|
-
`npx handoff-check@0.
|
|
196
|
+
`npx handoff-check@0.7.0 hook-config --host claude` emits an opt-in advisory
|
|
168
197
|
SessionStart snippet to merge manually into existing settings. It never overwrites
|
|
169
198
|
settings, and requires a pinned project-local package. The local adapter uses the
|
|
170
199
|
same verifier without network/model calls; startup/resume/clear/compact checks
|
|
@@ -290,7 +319,7 @@ handoff-check verify --scope <scope>
|
|
|
290
319
|
[--handoff <path>] default: handoff.json
|
|
291
320
|
[--as-of <UTC time>] default: current time, captured once
|
|
292
321
|
[--format text|json|markdown] default: text
|
|
293
|
-
[--require-content] require a v2/v3 content-aware handoff
|
|
322
|
+
[--require-content] require a v2/v3/v4 content-aware handoff
|
|
294
323
|
[--require-active] fail when no active constraints apply
|
|
295
324
|
|
|
296
325
|
handoff-check snapshot --task <task>
|
|
@@ -302,6 +331,11 @@ handoff-check explain
|
|
|
302
331
|
[--config <path>] [--constraints <path>] [--scope <scope>]
|
|
303
332
|
[--as-of <UTC time>] [--format text|json|markdown]
|
|
304
333
|
|
|
334
|
+
handoff-check diff --before <snapshot> --after <snapshot>
|
|
335
|
+
[--format text|json|markdown]
|
|
336
|
+
|
|
337
|
+
handoff-check setup [--dry-run]
|
|
338
|
+
|
|
305
339
|
handoff-check init --scope <scope>
|
|
306
340
|
[--agent codex|claude|both|none] [--dry-run] [--ci] [--format text|json]
|
|
307
341
|
|
|
@@ -313,7 +347,13 @@ handoff-check hook-config --host claude [--require-active]
|
|
|
313
347
|
handoff-check hook --host claude --config <absolute-path> [--require-active]
|
|
314
348
|
```
|
|
315
349
|
|
|
316
|
-
|
|
350
|
+
Verify/snapshot/explain/doctor/hook/hook-config accept explicit `--profile`;
|
|
351
|
+
init does not. Profile selection rejects scope/input-path overrides, but permits
|
|
352
|
+
--config. Verify-only --report requires JSON or Markdown; --git-context additionally
|
|
353
|
+
requires --report and Git with an existing commit. No reports are saved automatically.
|
|
354
|
+
|
|
355
|
+
Snapshot writes JSON to stdout unless `--output` creates a new file: unbound v2/v3
|
|
356
|
+
or project-bound v4, with retention only when explicitly selected. Its
|
|
317
357
|
`--format` option controls the saved-file acknowledgement when an output path is
|
|
318
358
|
used. The two `--require-*` policies and `--handoff` are verify-only. Run
|
|
319
359
|
`handoff-check --help` for the complete option list.
|