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.
@@ -8,8 +8,8 @@ Bun, API keys, and GitHub Actions are not required. All rules below are syntheti
8
8
  ```sh
9
9
  mkdir handoff-check-demo
10
10
  cd handoff-check-demo
11
- npx handoff-check@0.9.0 init --scope staging --agent none
12
- npx handoff-check@0.9.0 verify --require-content
11
+ npx handoff-check@0.10.0 init --scope staging --agent none
12
+ npx handoff-check@0.10.0 verify --require-content
13
13
  ```
14
14
 
15
15
  The starter passes with `PASS (EMPTY)` and `0 active constraints checked`.
@@ -41,7 +41,7 @@ does not fetch it or check the contents of a referenced document.
41
41
  Before capturing a baseline, run:
42
42
 
43
43
  ```sh
44
- npx handoff-check@0.9.0 verify --require-content --require-active
44
+ npx handoff-check@0.10.0 verify --require-content --require-active
45
45
  ```
46
46
 
47
47
  Expect `MISSING MIGRATION-REVIEW`, one active constraint, and exit 1. The old
@@ -50,8 +50,8 @@ starter handoff does not include the new rule yet.
50
50
  ## Capture and verify a reviewed baseline
51
51
 
52
52
  ```sh
53
- npx handoff-check@0.9.0 snapshot --task "Review staging migration" --output handoff.reviewed.json
54
- npx handoff-check@0.9.0 verify --handoff handoff.reviewed.json --require-content --require-active
53
+ npx handoff-check@0.10.0 snapshot --task "Review staging migration" --output handoff.reviewed.json
54
+ npx handoff-check@0.10.0 verify --handoff handoff.reviewed.json --require-content --require-active
55
55
  ```
56
56
 
57
57
  Review the generated file before relying on it. The verification command should
@@ -70,7 +70,7 @@ In `constraints.json`, change the description to
70
70
  handoff unchanged, then run:
71
71
 
72
72
  ```sh
73
- npx handoff-check@0.9.0 verify --handoff handoff.reviewed.json --require-content --require-active --format json
73
+ npx handoff-check@0.10.0 verify --handoff handoff.reviewed.json --require-content --require-active --format json
74
74
  ```
75
75
 
76
76
  Expect `status: "mismatch"`, `activeConstraintCount: 1`, a `CHANGED` finding, and
package/docs/lifecycle.md CHANGED
@@ -6,8 +6,8 @@ calls, source fetches, API keys or transcript access.
6
6
  ## Diagnose the intended repository/worktree root
7
7
 
8
8
  ```sh
9
- npx handoff-check@0.9.0 doctor --format json
10
- npx handoff-check@0.9.0 doctor --host claude
9
+ npx handoff-check@0.10.0 doctor --format json
10
+ npx handoff-check@0.10.0 doctor --host claude
11
11
  ```
12
12
 
13
13
  Doctor reports resolved input paths/versions, managed integrations/pins and
@@ -22,10 +22,10 @@ host settings and effective trust are not comprehensively inspected.
22
22
 
23
23
  1. Initialize/review inputs and deliberately adopt a content-aware baseline.
24
24
  2. Install the exact package in the consuming project. For npm:
25
- `npm install --save-dev --save-exact handoff-check@0.9.0`. Installation uses
25
+ `npm install --save-dev --save-exact handoff-check@0.10.0`. Installation uses
26
26
  the registry; the hook later uses only this local package. Temporary npx caches
27
27
  and global installs do not meet that prerequisite.
28
- 3. Run `npx handoff-check@0.9.0 hook-config --host claude` and inspect the JSON.
28
+ 3. Run `npx handoff-check@0.10.0 hook-config --host claude` and inspect the JSON.
29
29
  4. In an editor, merge the returned SessionStart entries into the existing
30
30
  `.claude/settings.json` hooks object. Preserve other events, handlers,
31
31
  permissions and settings. Do not replace the whole file or blindly redirect
@@ -0,0 +1,158 @@
1
+ # Explicit local source change checks
2
+
3
+ Some rules point to a policy document that can change while the rule's own
4
+ description/source reference stays the same. Optional local source registries
5
+ record an exact whole-file SHA-256 alongside the existing rule revision/hash.
6
+ `source-check` reports changed bytes as a reason to review, never as proof that
7
+ the policy's meaning changed. Existing verification does not read source files.
8
+
9
+ ## Declare bindings and record reviewed files
10
+
11
+ Create a binding plan deliberately, using actual rule IDs and local files:
12
+
13
+ ```json
14
+ {
15
+ "schemaVersion": 1,
16
+ "projectId": "your-project-id",
17
+ "bindings": [{ "id": "C-01", "path": "docs/deployment-policy.md" }]
18
+ }
19
+ ```
20
+
21
+ For unbound manifests, omit projectId from both plan and registry. Bound inputs
22
+ must match manifest/config identity exactly. Every selected/global active rule
23
+ needs an explicit binding for capture. One rule maps to one file in v1; several
24
+ rules may explicitly map to the same path. Unknown plan IDs are invalid, while
25
+ known inactive/out-of-scope bindings are ignored without reading their files.
26
+
27
+ After reviewing the current rules and those files, run:
28
+
29
+ ```sh
30
+ npx handoff-check@0.10.0 source-record --profile production --bindings source-bindings.json --output sources.next.json
31
+ ```
32
+
33
+ Choose the intended configured profile. The plan path is relative to cwd; each
34
+ bound file path is relative to the config's directory, or cwd when using the
35
+ implicit default/no config. `--constraints` can select a manifest elsewhere but
36
+ does not move that source root. `--config` and explicit profiles follow existing
37
+ selection rules; profiles reject scope/manifest overrides. Neither new command
38
+ reads a handoff or infers paths from manifest source text/URLs.
39
+
40
+ Capture freezes one evaluation time and writes only references, relative paths,
41
+ file hashes and capturedAt, not source text. Without `--output` it prints JSON.
42
+ With output it exclusively creates a new file with an existing parent, refusing
43
+ existing files/directories/symlink leaves. Any missing/unsafe/unreadable/oversize
44
+ selected file makes capture fail with exit 2 and no registry output. A failure
45
+ while writing can leave a partial new output: inspect before retrying. Never
46
+ redirect stdout onto an existing config, manifest, plan, registry or handoff.
47
+
48
+ The record is a selected/global **subset** of a project-wide registry, not a merge
49
+ or update of an existing file. Review/adopt it explicitly, preserving records for
50
+ other scopes as needed. There is no automatic merge, adoption, overwrite, missing
51
+ directory creation or refresh. Do not capture again merely to clear a finding.
52
+
53
+ ## Check an explicit registry
54
+
55
+ ```sh
56
+ npx handoff-check@0.10.0 source-check --profile production --sources sources.next.json
57
+ npx handoff-check@0.10.0 source-check --profile production --sources sources.next.json --format json
58
+ npx handoff-check@0.10.0 source-check --profile production --sources sources.next.json --format markdown
59
+ ```
60
+
61
+ `--sources` is required and resolves from cwd. Each active rule first compares
62
+ the saved revision/hash with the current rule. Missing or stale bindings never
63
+ trigger guessed file reads. Known inactive rules and unknown registry IDs are
64
+ also not read. Truly unknown IDs require project-wide cleanup attention; known
65
+ inactive entries are only ignored/count. Selection uses explain's same scope,
66
+ global and lifecycle classifier at one evaluation time.
67
+
68
+ | Status | Meaning |
69
+ | ----------------- | -------------------------------------------------------------------- |
70
+ | UNCHANGED | Current rule reference and identical source file bytes. |
71
+ | MISSING_BINDING | Active rule has no source registry entry. No file read. |
72
+ | STALE_BINDING | Revision or canonical rule hash differs. No file read. |
73
+ | SOURCE_CHANGED | Current rule reference but the whole-file hash differs. |
74
+ | SOURCE_MISSING | The explicit file or a parent is absent. |
75
+ | SOURCE_UNREADABLE | Filesystem access/read/close failed. |
76
+ | SOURCE_UNSAFE | Symlink/special-file/path containment or file-identity check failed. |
77
+ | SOURCE_TOO_LARGE | File is larger than 10 MiB, including growth during reading. |
78
+
79
+ Reports include active/unchanged/registry/ignored counts, per-rule expected and
80
+ observed hashes when available, and deterministic ID ordering. UNKNOWN_RULE
81
+ findings flag orphan IDs, and NO_ACTIVE_CONSTRAINTS marks zero-active checks
82
+ without a fabricated ID. An unchanged source cannot approve a changed rule:
83
+ STALE_BINDING takes precedence over all file observations.
84
+
85
+ Exit codes: **0** all active sources unchanged and no orphan IDs; **1** attention
86
+ (including unavailable/unsafe/oversize files, missing/stale bindings, orphan IDs
87
+ and zero active); **2** invalid invocation/contract/project binding or unreadable
88
+ metadata. Source-record succeeds with 0 or fails with 2. Reports use stdout;
89
+ invalid errors use stderr. `--format` on source-record only controls its saved-file
90
+ acknowledgement; its actual record is always JSON, and Markdown is unsupported.
91
+
92
+ ## Paths, bytes and resource limits
93
+
94
+ Bound paths are portable relative POSIX paths using `/`, up to 1024 Unicode
95
+ characters and 255 per component. Absolute/drive/UNC/URL paths, backslashes,
96
+ empty/dot/dotdot components, trailing dots/spaces, Windows reserved device names,
97
+ invalid Unicode and control/format characters are rejected. No environment,
98
+ tilde, shell or glob expansion is performed. Spaces and ordinary Unicode are
99
+ literal file-name data. All metadata entries are validated, even ignored ones.
100
+
101
+ The selected project directory itself is canonicalized (an explicit config root
102
+ may resolve through a symlink). Every component **below** that canonical root,
103
+ including the file, rejects symlinks, even ones pointing inside the project.
104
+ Resolved containment is checked by path components, and open uses nonblocking /
105
+ no-follow flags where available with regular-file and file-identity checks.
106
+ Directories, FIFOs, devices and other nonregular sources are not read. Metadata
107
+ JSON files are explicitly chosen separately and can be regular-file symlinks.
108
+
109
+ Each plan/registry allows at most 256 entries. Files may contain binary data, but
110
+ each is limited to **10 MiB inclusive**. A 64 KiB read buffer and a maximum-limit
111
+ plus one byte probe enforce the bound even when stat size is stale or a file grows.
112
+ Identical path strings share one successful or failed observation per invocation;
113
+ case/Unicode aliases are not silently normalized into a different declared path.
114
+ Hashing is SHA-256 of raw bytes: CRLF/LF, BOM, whitespace and invalid UTF-8 all count.
115
+ No mtime/size-only shortcut, section parsing, recursive scan or source text storage.
116
+
117
+ JSON schemas describe the independent [binding plan](../schemas/source-bindings.v1.schema.json),
118
+ [registry](../schemas/source-registry.v1.schema.json) and
119
+ [result](../schemas/source-result.v1.schema.json). Runtime additionally enforces
120
+ unique IDs, portable path component rules, real calendar timestamps, project and
121
+ reference agreement, and filesystem safety/limits. The existing canonical rule
122
+ hash contract and manifest/handoff schemas are unchanged.
123
+
124
+ ## Limits and privacy
125
+
126
+ Source-check is opt-in local inspection, not an authenticated review, semantic
127
+ policy diff, authorization grant or sandbox. The explicit binding is a local
128
+ declaration; manifest source text is never fetched/interpreted. Hashes and file
129
+ paths can still reveal information: review metadata before sharing it. Reports
130
+ never include file contents or raw operating-system error messages.
131
+
132
+ Checks are not atomic with file changes or adversarial directory replacement.
133
+ Concurrent writes can produce a hash of bytes observed during a changing read;
134
+ the command does not lock files or prove an authorized historical state. Hard
135
+ links and platform filesystem behavior retain normal OS semantics. No guaranteed
136
+ wall-clock timeout is imposed on unresponsive OS/network-mounted filesystem I/O.
137
+ There are no HTTP/model/Git subprocess calls; an OS-mounted filesystem may itself
138
+ use a network. Resource limits bound bytes/entry count, not every OS operation.
139
+
140
+ `capturedAt` is informational, not evidence of review or an instruction to reuse
141
+ an old clock. `--as-of` supports reproducible applicability selection; it does
142
+ not read historical file contents. File bytes are read now. Verify/run/review,
143
+ doctor and lifecycle hooks never implicitly load this registry or the bound files.
144
+ A new source record does not clear a CHANGED handoff or stale review record.
145
+
146
+ ## Reproducible synthetic example
147
+
148
+ From a checkout, without creating any handoff:
149
+
150
+ ```sh
151
+ npx handoff-check@0.10.0 source-check --config examples/local-sources/config.json --profile stage --sources examples/local-sources/sources.json --as-of 2026-11-27T08:00:00Z --format json
152
+ ```
153
+
154
+ Expect unchanged/exit 0 for two active rules sharing policy.md. In a disposable
155
+ copy, edit policy.md and repeat: expect SOURCE_CHANGED/exit 1. Changing only a
156
+ rule description instead yields STALE_BINDING for that rule without reading its
157
+ source. The shipped stage registry is a subset; profile prod reports missing P-01
158
+ and ignores the known staging-only entry.
@@ -56,10 +56,10 @@ Author `.handoff-check.json` as config v2:
56
56
  ```
57
57
 
58
58
  ```sh
59
- npx handoff-check@0.9.0 explain --profile stage
60
- npx handoff-check@0.9.0 snapshot --profile stage --task "Review staging work" --output handoffs/staging.reviewed.json
61
- npx handoff-check@0.9.0 verify --profile stage --require-content
62
- npx handoff-check@0.9.0 doctor --profile stage
59
+ npx handoff-check@0.10.0 explain --profile stage
60
+ npx handoff-check@0.10.0 snapshot --profile stage --task "Review staging work" --output handoffs/staging.reviewed.json
61
+ npx handoff-check@0.10.0 verify --profile stage --require-content
62
+ npx handoff-check@0.10.0 doctor --profile stage
63
63
  ```
64
64
 
65
65
  These assume you deliberately adopted a baseline at the configured handoff path;
@@ -83,8 +83,8 @@ bindings produce NOT VERIFIED context; hook transport success is not a pass.
83
83
  ## Record exactly what was checked
84
84
 
85
85
  ```sh
86
- npx handoff-check@0.9.0 verify --profile stage --require-content --report --format json
87
- npx handoff-check@0.9.0 verify --profile stage --require-content --report --git-context --format markdown
86
+ npx handoff-check@0.10.0 verify --profile stage --require-content --report --format json
87
+ npx handoff-check@0.10.0 verify --profile stage --require-content --report --git-context --format markdown
88
88
  ```
89
89
 
90
90
  --report is optional and verify-only. It adds package version, requested policies,
package/docs/releasing.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Releasing
2
2
 
3
3
  The npm package name is `handoff-check`; the binary is `handoff-check` and the
4
- current version is 0.9.0. The package is already published; subsequent releases
4
+ current version is 0.10.0. The package is already published; subsequent releases
5
5
  use the configured trusted publisher and the reviewed-artifact process below.
6
6
 
7
7
  ## Release a reviewed version
@@ -19,12 +19,12 @@ use the configured trusted publisher and the reviewed-artifact process below.
19
19
  publish-run artifact and compare it before claiming artifact continuity.
20
20
  For first-publication bootstrap or an explicitly chosen manual release, use
21
21
  `npm login` and publish the reviewed tarball directly with
22
- `npm publish /absolute/path/handoff-check-0.9.0.tgz --ignore-scripts --access public`.
22
+ `npm publish /absolute/path/handoff-check-0.10.0.tgz --ignore-scripts --access public`.
23
23
  Complete interactive two-factor authentication directly with npm.
24
24
  5. Verify registry name, version, binary and integrity, then test
25
- `npx --yes handoff-check@0.9.0 --version` and fresh-project init/verify using a
25
+ `npx --yes handoff-check@0.10.0 --version` and fresh-project init/verify using a
26
26
  new package cache and the public registry, rather than the local tarball.
27
- 6. Create tag `v0.9.0` and a GitHub release on the reviewed main commit, attach the
27
+ 6. Create tag `v0.10.0` and a GitHub release on the reviewed main commit, attach the
28
28
  same tarball, and describe features, requirements and known limits.
29
29
 
30
30
  Publishing is immutable for a given npm name/version. Fix failed candidates on a
package/docs/roadmap.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Roadmap
2
2
 
3
+ Implemented in 0.10.0: opt-in explicit local source bindings and bounded whole-file
4
+ change checks independent of verification. See [local sources](local-sources.md).
5
+
3
6
  Implemented in 0.9.0: independent rule ownership/review windows and reference-bound
4
7
  maintenance reports, without changing verification policy.
5
8
  See [rule reviews](rule-reviews.md).
@@ -12,8 +12,8 @@ your normal process. Only after that review, explicitly record the selected
12
12
  scope's active rules (including global rules):
13
13
 
14
14
  ```sh
15
- npx handoff-check@0.9.0 explain --profile stage
16
- 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
15
+ npx handoff-check@0.10.0 explain --profile stage
16
+ 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
17
17
  ```
18
18
 
19
19
  The owner/deadline are examples. One owner and deadline apply to **every** active
@@ -40,9 +40,9 @@ maintenance finding. No-active-rules capture fails with exit 2.
40
40
  ## Check maintenance independently
41
41
 
42
42
  ```sh
43
- npx handoff-check@0.9.0 review --profile stage --registry rules.review.next.json
44
- npx handoff-check@0.9.0 review --profile stage --registry rules.review.next.json --format json
45
- npx handoff-check@0.9.0 review --profile stage --registry rules.review.next.json --format markdown
43
+ npx handoff-check@0.10.0 review --profile stage --registry rules.review.next.json
44
+ npx handoff-check@0.10.0 review --profile stage --registry rules.review.next.json --format json
45
+ npx handoff-check@0.10.0 review --profile stage --registry rules.review.next.json --format markdown
46
46
  ```
47
47
 
48
48
  An explicit `--registry` path is required and resolves from cwd. `--config`
@@ -111,7 +111,7 @@ step and handle its exit code through that team's normal process.
111
111
  From a checkout, use the shipped fixtures:
112
112
 
113
113
  ```sh
114
- npx handoff-check@0.9.0 review --config examples/rule-reviews/config.json --profile stage --registry examples/rule-reviews/reviews.json --as-of 2026-11-26T08:00:00Z --format json
114
+ npx handoff-check@0.10.0 review --config examples/rule-reviews/config.json --profile stage --registry examples/rule-reviews/reviews.json --as-of 2026-11-26T08:00:00Z --format json
115
115
  ```
116
116
 
117
117
  Expect current/exit 0 with two active rules. At `2026-11-27T08:00:00Z` expect two
@@ -5,7 +5,7 @@
5
5
  With Node.js 22 or newer, run in the intended project root:
6
6
 
7
7
  ```sh
8
- npx handoff-check@0.9.0 setup
8
+ npx handoff-check@0.10.0 setup
9
9
  ```
10
10
 
11
11
  Enter a portable project ID, comma-separated environments, a rule ID, a real rule
@@ -31,7 +31,7 @@ For environments `staging,production`, setup creates `.handoff-check.json`,
31
31
  is no default profile. Choose the intended environment explicitly:
32
32
 
33
33
  ```sh
34
- npx handoff-check@0.9.0 verify --profile staging --require-content --require-active
34
+ npx handoff-check@0.10.0 verify --profile staging --require-content --require-active
35
35
  ```
36
36
 
37
37
  Add environment-specific rules later through deliberate review and capture;
@@ -44,9 +44,9 @@ portable skill. Do not use setup as a migration or baseline-repair command.
44
44
  ## Compare two saved snapshots
45
45
 
46
46
  ```sh
47
- npx handoff-check@0.9.0 diff --before handoff.saved.json --after handoff.next.json
48
- npx handoff-check@0.9.0 diff --before handoff.saved.json --after handoff.next.json --format json
49
- npx handoff-check@0.9.0 diff --before handoff.saved.json --after handoff.next.json --format markdown
47
+ npx handoff-check@0.10.0 diff --before handoff.saved.json --after handoff.next.json
48
+ npx handoff-check@0.10.0 diff --before handoff.saved.json --after handoff.next.json --format json
49
+ npx handoff-check@0.10.0 diff --before handoff.saved.json --after handoff.next.json --format markdown
50
50
  ```
51
51
 
52
52
  Both operands are strictly validated handoff files. Unbound v2/v3 can be compared
@@ -7,7 +7,7 @@ verifier as `verify`; the pure core and existing input formats are unchanged.
7
7
  With Node.js 22 or newer, use an existing reviewed project configuration:
8
8
 
9
9
  ```sh
10
- npx handoff-check@0.9.0 run --profile production -- node scripts/preflight-demo.js
10
+ npx handoff-check@0.10.0 run --profile production -- node scripts/preflight-demo.js
11
11
  ```
12
12
 
13
13
  The profile is an example: select the intended configured profile, or use
@@ -89,7 +89,7 @@ failure diagnostics after launch do not reclassify it as a launch failure.
89
89
  In a disposable configured project with a reviewed active baseline:
90
90
 
91
91
  ```sh
92
- npx handoff-check@0.9.0 run --profile production -- node -e 'console.log("example command started")'
92
+ npx handoff-check@0.10.0 run --profile production -- node -e 'console.log("example command started")'
93
93
  ```
94
94
 
95
95
  Edit a rule description in that disposable manifest without refreshing its saved
@@ -0,0 +1,9 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "projectId": "source-demo",
4
+ "bindings": [
5
+ { "id": "G-01", "path": "policy.md" },
6
+ { "id": "S-01", "path": "policy.md" },
7
+ { "id": "P-01", "path": "policy.md" }
8
+ ]
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "schemaVersion": 2,
3
+ "projectId": "source-demo",
4
+ "constraints": "constraints.json",
5
+ "profiles": {
6
+ "stage": { "scope": "staging" },
7
+ "prod": { "scope": "production" }
8
+ }
9
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "schemaVersion": 3,
3
+ "projectId": "source-demo",
4
+ "constraints": [
5
+ {
6
+ "id": "G-01",
7
+ "revision": 1,
8
+ "scope": "global",
9
+ "description": "Review the local policy before changing deployment routines",
10
+ "source": "policy.md"
11
+ },
12
+ {
13
+ "id": "S-01",
14
+ "revision": 1,
15
+ "scope": "staging",
16
+ "description": "Use synthetic records in staging",
17
+ "source": "policy.md"
18
+ },
19
+ {
20
+ "id": "P-01",
21
+ "revision": 1,
22
+ "scope": "production",
23
+ "description": "Obtain deployment review for production",
24
+ "source": "policy.md"
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,4 @@
1
+ # Synthetic deployment policy
2
+
3
+ Review changes before deployment. Use synthetic records in staging.
4
+ Production changes require the designated deployment review.
@@ -0,0 +1,21 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "projectId": "source-demo",
4
+ "capturedAt": "2026-11-27T08:00:00.000Z",
5
+ "sources": [
6
+ {
7
+ "id": "G-01",
8
+ "path": "policy.md",
9
+ "revision": 1,
10
+ "contentHash": "sha256:cd05c3572849d61eb0d47112ce96d6cd45891ed298f343b6835091f408ff41bf",
11
+ "fileHash": "sha256:6911d23420ff7f9a48bce1afed5b3f828315bacf573b977996b6c62664547206"
12
+ },
13
+ {
14
+ "id": "S-01",
15
+ "path": "policy.md",
16
+ "revision": 1,
17
+ "contentHash": "sha256:fc1a72f7aa701886aa423037a3c4a22d8a455d2aa98dbcbabf6d04d53a17aab6",
18
+ "fileHash": "sha256:6911d23420ff7f9a48bce1afed5b3f828315bacf573b977996b6c62664547206"
19
+ }
20
+ ]
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "handoff-check",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "A deterministic, local CLI that verifies active constraints before a coding agent resumes work.",
5
5
  "type": "module",
6
6
  "packageManager": "bun@1.2.10",
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "$id": "https://github.com/Larusajs/Handoff-Check/schemas/source-bindings.v1.schema.json",
6
+ "title": "Handoff Check source binding plan v1",
7
+ "required": ["schemaVersion", "bindings"],
8
+ "properties": {
9
+ "schemaVersion": {
10
+ "const": 1
11
+ },
12
+ "projectId": {
13
+ "$ref": "#/$defs/identifier"
14
+ },
15
+ "bindings": {
16
+ "type": "array",
17
+ "maxItems": 256,
18
+ "uniqueItems": true,
19
+ "items": {
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "required": ["id", "path"],
23
+ "properties": {
24
+ "id": {
25
+ "$ref": "#/$defs/identifier"
26
+ },
27
+ "path": {
28
+ "$ref": "#/$defs/sourcePath"
29
+ }
30
+ }
31
+ }
32
+ }
33
+ },
34
+ "$defs": {
35
+ "identifier": {
36
+ "type": "string",
37
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
38
+ },
39
+ "sourcePath": {
40
+ "type": "string",
41
+ "minLength": 1,
42
+ "maxLength": 1024,
43
+ "description": "Portable relative POSIX file path. Runtime additionally validates components/reserved names/containment and rejects symlinks."
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "$id": "https://github.com/Larusajs/Handoff-Check/schemas/source-registry.v1.schema.json",
6
+ "title": "Handoff Check local source registry v1",
7
+ "required": ["schemaVersion", "capturedAt", "sources"],
8
+ "properties": {
9
+ "schemaVersion": {
10
+ "const": 1
11
+ },
12
+ "projectId": {
13
+ "$ref": "#/$defs/identifier"
14
+ },
15
+ "capturedAt": {
16
+ "$ref": "#/$defs/utc"
17
+ },
18
+ "sources": {
19
+ "type": "array",
20
+ "maxItems": 256,
21
+ "uniqueItems": true,
22
+ "items": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["id", "path", "revision", "contentHash", "fileHash"],
26
+ "properties": {
27
+ "id": {
28
+ "$ref": "#/$defs/identifier"
29
+ },
30
+ "revision": {
31
+ "type": "integer",
32
+ "minimum": 1,
33
+ "maximum": 9007199254740991
34
+ },
35
+ "contentHash": {
36
+ "type": "string",
37
+ "pattern": "^sha256:[a-f0-9]{64}(?![\\s\\S])"
38
+ },
39
+ "path": {
40
+ "$ref": "#/$defs/sourcePath"
41
+ },
42
+ "fileHash": {
43
+ "type": "string",
44
+ "pattern": "^sha256:[a-f0-9]{64}(?![\\s\\S])"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ },
50
+ "$defs": {
51
+ "identifier": {
52
+ "type": "string",
53
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
54
+ },
55
+ "utc": {
56
+ "type": "string",
57
+ "format": "date-time",
58
+ "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{1,3})?Z$"
59
+ },
60
+ "sourcePath": {
61
+ "type": "string",
62
+ "minLength": 1,
63
+ "maxLength": 1024,
64
+ "description": "Portable relative POSIX file path. Runtime additionally validates components/reserved names/containment and rejects symlinks."
65
+ }
66
+ }
67
+ }