handoff-check 0.9.0 → 0.10.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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.0
4
+
5
+ - Add explicit local source binding plans, raw-byte source registries and source-check reports.
6
+ - Add source-record capture after deliberate review to stdout or exclusive new files.
7
+ - Reuse rule/project/profile/lifecycle semantics and flag stale references before source I/O.
8
+ - Report changed, missing, unreadable, unsafe and oversized files without exposing their contents.
9
+ - Enforce portable contained paths, symlink/special-file rejection, 10 MiB streamed limits and 256-entry contracts.
10
+ - Preserve existing canonical rule hashes and verify/run/review/doctor/lifecycle behavior without implicit source reads.
11
+
3
12
  ## 0.9.0
4
13
 
5
14
  - Add independent review registries with rule owners, review windows and exact revision/hash references.
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.9.0.**
6
+ **Version: 0.10.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.9.0 init --scope staging --agent both --dry-run
22
- npx handoff-check@0.9.0 init --scope staging --agent both
21
+ npx handoff-check@0.10.0 init --scope staging --agent both --dry-run
22
+ npx handoff-check@0.10.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.9.0 verify --format json --require-content
36
+ npx handoff-check@0.10.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.9.0`. For contributor builds or
45
+ available: `npm install --global handoff-check@0.10.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.9.0 verify --require-content --require-active --format json
68
+ npx handoff-check@0.10.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.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
86
+ npx handoff-check@0.10.0 snapshot --task "Resume migration review" --output handoff.next.json
87
+ npx handoff-check@0.10.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.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
109
+ npx handoff-check@0.10.0 explain --format markdown
110
+ npx handoff-check@0.10.0 snapshot --task "Review migration" --include-content --output handoff.reviewed.json
111
+ npx handoff-check@0.10.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,19 +153,35 @@ 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.9.0 and add `--require-content`. Init refuses to overwrite differing
156
+ version to 0.10.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
+ ## Explicit local source changes
162
+
163
+ Declare rule IDs and local paths in a binding plan, then record files only after
164
+ reviewing them:
165
+
166
+ ```sh
167
+ npx handoff-check@0.10.0 source-record --profile production --bindings source-bindings.json --output sources.next.json
168
+ npx handoff-check@0.10.0 source-check --profile production --sources sources.next.json
169
+ ```
170
+
171
+ Source-check compares whole-file raw bytes and flags changed, missing, unreadable,
172
+ unsafe or oversized sources. A changed rule reference is stale before any source
173
+ read. Bindings are explicit project-relative paths; URLs are never downloaded.
174
+ Source text is not stored or displayed. Existing verify/run/review/hooks do not
175
+ implicitly read sources or change policy. See [setup, schemas and limits](docs/local-sources.md).
176
+
161
177
  ## Rule ownership and review deadlines
162
178
 
163
179
  After deliberately reviewing the applicable rules, record their ownership in a
164
180
  separate registry and check it independently:
165
181
 
166
182
  ```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
183
+ npx handoff-check@0.10.0 review-record --profile stage --owner platform-team --review-by 2027-01-01T00:00:00Z --output rules.review.next.json
184
+ npx handoff-check@0.10.0 review --profile stage --registry rules.review.next.json
169
185
  ```
170
186
 
171
187
  Choose the intended profile, owner and deadline; one owner/deadline applies to all
@@ -178,7 +194,7 @@ expire constraints or change verify/run/hooks. See [rule reviews](docs/rule-revi
178
194
  ## Verify before running a command
179
195
 
180
196
  ```sh
181
- npx handoff-check@0.9.0 run --profile production -- node scripts/preflight-demo.js
197
+ npx handoff-check@0.10.0 run --profile production -- node scripts/preflight-demo.js
182
198
  ```
183
199
 
184
200
  Use the intended configured profile and an explicitly chosen program. `run`
@@ -192,7 +208,7 @@ after the check. See [verified commands](docs/verified-commands.md).
192
208
 
193
209
  ## Snapshot diff and guided setup
194
210
 
195
- Run `npx handoff-check@0.9.0 setup` in a terminal to create a new project-bound
211
+ Run `npx handoff-check@0.10.0 setup` in a terminal to create a new project-bound
196
212
  configuration with explicit environments and one real rule you author. Review
197
213
  the exact retained baselines before typing `yes`; existing files are never replaced.
198
214
  No agent integrations or dependencies are installed. Use `--dry-run` to preview.
@@ -209,8 +225,8 @@ See [the guide](docs/snapshot-diff-and-setup.md).
209
225
  reproducibility metadata. Existing unbound files/default JSON stay compatible.
210
226
 
211
227
  ```sh
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
228
+ npx handoff-check@0.10.0 verify --profile stage --require-content --report --format json
229
+ npx handoff-check@0.10.0 doctor --profile stage
214
230
  ```
215
231
 
216
232
  These commands require an explicitly authored config v2 profile. Bound manifest
@@ -220,12 +236,12 @@ record the exact input/config bytes parsed, package version and policies; Git is
220
236
  read only with separate --git-context. They are not signed attestations or proof
221
237
  of compliance. See [setup, migration and examples](docs/project-context.md).
222
238
 
223
- For read-only installation diagnostics, run `npx handoff-check@0.9.0 doctor`.
239
+ For read-only installation diagnostics, run `npx handoff-check@0.10.0 doctor`.
224
240
  `doctor --format json` reports paths, supported input versions and managed
225
241
  integration pins. Its exit codes are 0 healthy, 1 attention and 2 invalid invocation;
226
242
  it does not verify a handoff or prove a host ran the integration.
227
243
 
228
- `npx handoff-check@0.9.0 hook-config --host claude` emits an opt-in advisory
244
+ `npx handoff-check@0.10.0 hook-config --host claude` emits an opt-in advisory
229
245
  SessionStart snippet to merge manually into existing settings. It never overwrites
230
246
  settings, and requires a pinned project-local package. The local adapter uses the
231
247
  same verifier without network/model calls; startup/resume/clear/compact checks
@@ -368,6 +384,14 @@ handoff-check diff --before <snapshot> --after <snapshot>
368
384
 
369
385
  handoff-check setup [--dry-run]
370
386
 
387
+ handoff-check source-check --sources <source-registry>
388
+ [--config <path>] [--profile <name> | --scope <scope>] [--constraints <path>]
389
+ [--as-of <UTC time>] [--format text|json|markdown]
390
+
391
+ handoff-check source-record --bindings <binding-plan>
392
+ [--config <path>] [--profile <name> | --scope <scope>] [--constraints <path>]
393
+ [--as-of <UTC time>] [--output <new-file>] [--format text|json]
394
+
371
395
  handoff-check review --registry <review-file>
372
396
  [--config <path>] [--profile <name> | --scope <scope>] [--constraints <path>]
373
397
  [--as-of <UTC time>] [--format text|json|markdown]
@@ -393,6 +417,7 @@ handoff-check hook --host claude --config <absolute-path> [--require-active]
393
417
 
394
418
  Verify/snapshot/explain/doctor/hook/hook-config/run accept explicit `--profile`;
395
419
  review and review-record also accept profiles without reading handoffs;
420
+ source-check and source-record follow the same explicit selection;
396
421
  init does not. Profile selection rejects scope/input-path overrides, but permits
397
422
  --config. Verify-only --report requires JSON or Markdown; --git-context additionally
398
423
  requires --report and Git with an existing commit. No reports are saved automatically.
@@ -426,6 +451,12 @@ Review-record succeeds with 0 or fails with 2. Its stdout record is JSON; --form
426
451
  controls the acknowledgement only when --output creates a new file. These commands
427
452
  never refresh saved handoffs or implicitly gate verify/run.
428
453
 
454
+ Source-check returns 0 for unchanged active sources, 1 for attention (including
455
+ unavailable sources/zero active) or 2 for invalid metadata/invocation. Source-record
456
+ returns 0/2 and creates stdout JSON or a new exclusive output only. File paths root
457
+ at the config directory, metadata CLI paths at cwd. No implicit source inspection,
458
+ baseline refresh or registry merge occurs.
459
+
429
460
  Per-rule findings include `MISSING`, `EXPIRED`, `REVOKED`, `SUPERSEDED`, `OUT_OF_SCOPE`,
430
461
  `UNKNOWN`, and (for v2) `CHANGED`, ordered by ID. A reported ID receives one primary finding according to
431
462
  the precedence in the lifecycle ADR.