handoff-check 0.5.0 → 0.6.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.
@@ -9,8 +9,8 @@ infers rules from a summary.
9
9
  From the consuming repository root:
10
10
 
11
11
  ```sh
12
- npx handoff-check@0.5.0 init --scope staging --agent both --dry-run
13
- npx handoff-check@0.5.0 init --scope staging --agent both
12
+ npx handoff-check@0.6.0 init --scope staging --agent both --dry-run
13
+ npx handoff-check@0.6.0 init --scope staging --agent both
14
14
  ```
15
15
 
16
16
  Choose `codex`, `claude`, `both` (default), or `none`. Generated integrations:
@@ -39,8 +39,8 @@ npm pack
39
39
  From a separate consuming project, substitute the actual absolute tarball path:
40
40
 
41
41
  ```sh
42
- npx --offline --yes --package=/absolute/path/handoff-check-0.5.0.tgz handoff-check init --scope staging --agent both
43
- npx --offline --yes --package=/absolute/path/handoff-check-0.5.0.tgz handoff-check verify --format json --require-content
42
+ npx --offline --yes --package=/absolute/path/handoff-check-0.6.0.tgz handoff-check init --scope staging --agent both
43
+ npx --offline --yes --package=/absolute/path/handoff-check-0.6.0.tgz handoff-check verify --format json --require-content
44
44
  ```
45
45
 
46
46
  Bun is not required for these consumer commands. Generated agent commands use the
@@ -17,6 +17,13 @@ No verification operation writes inputs, accesses a network, calls a model,
17
17
  executes source references, or reads agent transcripts. Output order must be
18
18
  independent of manifest and handoff ordering.
19
19
 
20
+ Bound input formats compare explicit project IDs in the pure core. Config v2
21
+ profiles are selected explicitly in the CLI and shared with doctor/lifecycle.
22
+ Optional report metadata hashes the SAME byte reads used to parse inputs/config.
23
+ Git subprocesses are fixed-argument, read-only, bounded and separately opt-in for
24
+ reports; the verifier itself never reads Git. See ADR 0006 for non-atomicity and
25
+ authentication limits.
26
+
20
27
  Doctor inspects local inputs/integration metadata without executing host commands.
21
28
  The bounded Claude lifecycle adapter reads an event envelope and explicit config,
22
29
  then calls the same verifier. Hook-config prints a mergeable snippet, never writes
@@ -0,0 +1,87 @@
1
+ # ADR 0006: Explicit projects, profiles and reproducibility reports
2
+
3
+ Status: accepted for 0.6.0.
4
+
5
+ ## Portable opt-in binding
6
+
7
+ Manifest v3 requires projectId (the existing case-sensitive identifier syntax)
8
+ and v2 revisioned constraints/relationship validation. Handoff v4 requires the
9
+ same projectId, scope, task, capturedAt, contentMode and activeConstraints.
10
+ contentMode is hashes or retained: every reference follows that mode; hashes
11
+ rejects content, retained requires full validated content consistent with the
12
+ reference. Canonical rule hashing is unchanged: outer projectId is not added to
13
+ the frozen eight-field hash algorithm. Standalone retained replacement semantics
14
+ remain unchanged.
15
+
16
+ If either input is bound, or an expected config projectId is supplied, verify
17
+ requires BOTH bound input formats with exactly matching IDs and expected identity.
18
+ Mixed binding, missing identity and mismatches are invalid input (exit 2), before
19
+ findings. Scope mismatch remains invalid. The pure verifier receives the expected
20
+ ID explicitly; it reads no config, Git or filesystem. With no binding requested,
21
+ old manifest v1/v2 and handoff v1/v2/v3 behave unchanged, including default JSON.
22
+
23
+ Snapshot from a bound manifest creates v4 hashes by default or v4 retained with
24
+ --include-content. Unbound capture still creates v2/v3. Expected binding cannot
25
+ turn an unbound manifest into a bound snapshot. Init defaults stay unbound and no
26
+ existing inputs are silently migrated. Upgrade consumers, verify/review the old
27
+ baseline FIRST, then deliberately migrate the manifest and capture/adopt a new
28
+ baseline. Do not refresh merely to clear findings.
29
+
30
+ Project IDs are explicit portable labels, not absolute paths or inferred remotes.
31
+ Worktrees can share one reviewed identity while resolving their own inputs. This
32
+ prevents accidental baseline interchange, not malicious edits: someone controlling
33
+ config/inputs can change labels together. It does not prove the cwd belongs to a
34
+ trusted repository or grant production authorization.
35
+
36
+ ## Config v2 and environment profiles
37
+
38
+ Config v1 is unchanged. Config v2 adds optional projectId and optional profiles,
39
+ a nonempty object of identifier-named profiles. Each profile requires scope and
40
+ may override constraints/handoff paths. Omitted paths fall back to top-level
41
+ paths, then ordinary filenames. All configured paths resolve relative to the
42
+ config directory. All profiles are structurally validated when config loads;
43
+ unknown keys/null/invalid scopes/empty paths are rejected. JSON object semantics
44
+ apply; duplicate JSON property spellings are not an authenticated change history.
45
+
46
+ --profile selects explicitly; no default profile, saved selection, branch/cwd
47
+ inference, or environment permission is introduced. Reject combinations with
48
+ explicit --scope/--constraints/--handoff, even if values agree. --config remains
49
+ allowed. Missing profile/config v1 selection returns exit 2. Init rejects profiles;
50
+ author the reviewed config deliberately. Existing config without selection keeps
51
+ its ordinary top-level behavior.
52
+
53
+ Verify, snapshot, explain, doctor and lifecycle use one profile selector. A hook
54
+ configuration may carry explicit --profile in its exec-form args. The lifecycle
55
+ adapter validates binding and reports concise project/profile context, preserving
56
+ its advisory transport semantics and limits. Doctor diagnoses binding mismatches
57
+ as attention (exit 1); invalid profile selection is invocation error (exit 2).
58
+ Explain adds projectId only for bound manifests; it still compares no handoff.
59
+
60
+ ## Reproducibility reports
61
+
62
+ Explicit verify --report requires --format json or markdown. JSON is a separate
63
+ schemaVersion 1 verification-report wrapper with packageVersion, policies,
64
+ inputs, optional profile/projectId/git, nested result and notice. Existing default
65
+ JSON is untouched. Markdown appends safely escaped metadata. No report file is
66
+ written automatically; stdout redirection must not target inputs.
67
+
68
+ Each input/config is read once as bytes; those exact bytes are both parsed and
69
+ hashed using sha256:lowercasehex. The config digest describes the original loaded
70
+ file even when CLI overrides are used. Absent implicit config is explicitly null,
71
+ never an invented digest. Paths are absolute resolved read paths; hashes describe
72
+ byte formatting as well as content, unlike the semantic rule hash. No source
73
+ documents are read. Report schema validates the wrapper and basic nested-result
74
+ structure; the nested result's behavior remains defined by verifier contracts.
75
+
76
+ --git-context is verify-only and requires --report. Fixed execFile argument vectors
77
+ read the invocation cwd's Git top-level worktree, HEAD commit and branch (null
78
+ when detached), without shell, fetch, index write or dirty-status inspection.
79
+ Requests are bounded to 2 seconds/256 KiB per Git command. Nonrepo/unborn/missing
80
+ Git/failure returns exit 2 and no successful report. If config is elsewhere, Git
81
+ still describes the invocation cwd, not an inferred identity for every input.
82
+
83
+ Reports are local records, not authenticated attestations, agent compliance proofs
84
+ or globally atomic snapshots. Git metadata and separate input reads may race with
85
+ other writers. Exact digests identify the bytes evaluated; revalidate before acting.
86
+ Paths/branch/project labels can disclose local information: review before sharing.
87
+ No default Git subprocess, telemetry, report persistence or signing is introduced.
@@ -1,7 +1,7 @@
1
1
  # Development plan
2
2
 
3
3
  Status: 0.3.1 onboarding, 0.4 explainability and 0.5 diagnostics/lifecycle implemented;
4
- later milestones proposed.
4
+ 0.6 project/profile/report support is also implemented; later milestones proposed.
5
5
  Research reviewed: 2026-11-24. Version labels below are targets, not release promises.
6
6
 
7
7
  ## Product direction
@@ -102,7 +102,13 @@ Acceptance:
102
102
  - No automatic baseline refresh, silent policy opt-in, or hook installation overwrite.
103
103
  - No claim that doctor can see every instruction or hidden host memory.
104
104
 
105
- ## 0.6: project and environment correctness
105
+ ## 0.6: project and environment correctness (implemented)
106
+
107
+ Implemented under [ADR 0006](decisions/0006-project-profiles-and-reports.md):
108
+ opt-in manifest3/handoff4 project binding, config2 explicit profiles and optional
109
+ reproducibility reports with separately requested Git metadata. Existing unbound
110
+ workflows are preserved; no profile/identity is inferred. Pilot recruitment and
111
+ real-world measurements remain future work, not completed validation claims.
106
112
 
107
113
  Priority: medium/high; validate with worktree and multi-environment pilots first.
108
114
 
@@ -1,13 +1,13 @@
1
1
  # Explain applicability and review changes
2
2
 
3
- Requires Handoff Check 0.5.0+ and Node.js 22+. Run from your configured repository.
3
+ Requires Handoff Check 0.6.0+ and Node.js 22+. Run from your configured repository.
4
4
  No service, model call or API key is needed.
5
5
 
6
6
  ## Understand the active set
7
7
 
8
8
  ```sh
9
- npx handoff-check@0.5.0 explain --format json
10
- npx handoff-check@0.5.0 explain --scope production --format markdown
9
+ npx handoff-check@0.6.0 explain --format json
10
+ npx handoff-check@0.6.0 explain --scope production --format markdown
11
11
  ```
12
12
 
13
13
  Explain reads the manifest but not the handoff. Every rule has an applicability
@@ -20,14 +20,14 @@ exits 0 even with zero active rules: use verify to compare a handoff.
20
20
  At a reviewed handoff creation, after upgrading all consumers to 0.4+:
21
21
 
22
22
  ```sh
23
- npx handoff-check@0.5.0 snapshot --task "Review staging migrations" --include-content --output handoff.reviewed.json
24
- npx handoff-check@0.5.0 verify --handoff handoff.reviewed.json --require-content --require-active --format markdown
23
+ npx handoff-check@0.6.0 snapshot --task "Review staging migrations" --include-content --output handoff.reviewed.json
24
+ npx handoff-check@0.6.0 verify --handoff handoff.reviewed.json --require-content --require-active --format markdown
25
25
  ```
26
26
 
27
27
  Review the new file before explicitly adopting it in config. Snapshot never
28
- overwrites a path. Default snapshots remain v2; the flag creates v3 containing
28
+ overwrites a path. Unbound snapshots remain v2; the flag creates v3 containing
29
29
  full old descriptions, sources, revision and lifecycle values. Consider sensitive
30
- content before storing or sharing. Old v1/v2 files do not require migration.
30
+ content before storing or sharing. Old v1/v2 files do not require migration. Bound manifest v3 capture creates handoff v4; see project-context.md.
31
31
 
32
32
  After a same-ID description edit, verification produces CHANGED and exit 1.
33
33
  V3 JSON adds typed `changes`; text and Markdown show the saved/current fields.
@@ -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.5.0 init --scope staging --agent none
12
- npx handoff-check@0.5.0 verify --require-content
11
+ npx handoff-check@0.6.0 init --scope staging --agent none
12
+ npx handoff-check@0.6.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.5.0 verify --require-content --require-active
44
+ npx handoff-check@0.6.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.5.0 snapshot --task "Review staging migration" --output handoff.reviewed.json
54
- npx handoff-check@0.5.0 verify --handoff handoff.reviewed.json --require-content --require-active
53
+ npx handoff-check@0.6.0 snapshot --task "Review staging migration" --output handoff.reviewed.json
54
+ npx handoff-check@0.6.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.5.0 verify --handoff handoff.reviewed.json --require-content --require-active --format json
73
+ npx handoff-check@0.6.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
@@ -1,13 +1,13 @@
1
1
  # Installation diagnostics and lifecycle checks
2
2
 
3
- Requires Handoff Check 0.5.0+ and Node.js 22+. Checks run locally without model
3
+ Requires Handoff Check 0.6.0+ and Node.js 22+. Checks run locally without model
4
4
  calls, source fetches, API keys or transcript access.
5
5
 
6
6
  ## Diagnose the intended repository/worktree root
7
7
 
8
8
  ```sh
9
- npx handoff-check@0.5.0 doctor --format json
10
- npx handoff-check@0.5.0 doctor --host claude
9
+ npx handoff-check@0.6.0 doctor --format json
10
+ npx handoff-check@0.6.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.5.0`. Installation uses
25
+ `npm install --save-dev --save-exact handoff-check@0.6.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.5.0 hook-config --host claude` and inspect the JSON.
28
+ 3. Run `npx handoff-check@0.6.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
@@ -40,7 +40,7 @@ worktree needs its own local package/config and correct host project root.
40
40
  Payload cwd must canonicalize inside the explicit config directory; subdirectories
41
41
  are allowed, other worktrees are rejected. No upward discovery occurs.
42
42
 
43
- The adapter requires v2/v3 content tracking and uses the current clock. Generate
43
+ The adapter requires v2/v3/v4 content tracking and uses the current clock. Generate
44
44
  with `hook-config --host claude --require-active` only when explicitly requiring
45
45
  a nonempty active set. Neither mode writes/captures a baseline.
46
46
 
@@ -0,0 +1,120 @@
1
+ # Project binding, explicit profiles and reports
2
+
3
+ Requires Handoff Check 0.6.0+. Existing unbound workflows require no data migration.
4
+ Node.js 22+ remains sufficient; verification has no network or model dependency.
5
+
6
+ ## Bind reviewed files to a portable project label
7
+
8
+ Use a stable case-sensitive identifier such as `payments-api`. Upgrade every
9
+ consumer before adopting manifest v3 and handoff v4; older CLIs reject these formats.
10
+
11
+ 1. Verify the existing saved baseline first and resolve/review findings.
12
+ 2. Deliberately change the reviewed manifest to schemaVersion 3, add projectId,
13
+ and keep positive revisions on every rule.
14
+ 3. Capture a NEW reviewed baseline. Bound manifests automatically capture v4;
15
+ --include-content optionally retains old text as before.
16
+ 4. Review/adopt it and optionally set expected projectId in config v2.
17
+
18
+ Example manifest:
19
+
20
+ ```json
21
+ {
22
+ "schemaVersion": 3,
23
+ "projectId": "payments-api",
24
+ "constraints": [
25
+ {
26
+ "id": "MIGRATION-REVIEW",
27
+ "revision": 1,
28
+ "scope": "staging",
29
+ "description": "Require review before staging migrations",
30
+ "source": "synthetic:migration-policy"
31
+ }
32
+ ]
33
+ }
34
+ ```
35
+
36
+ A bound manifest requires a matching bound handoff; mixing with unbound files or
37
+ another project returns exit 2. Rule content hashes do not change just because a
38
+ project label is added. Worktrees share the reviewed project ID but use their own
39
+ local config/input paths. The ID is not a signature, inferred Git remote, proof
40
+ that a directory is trustworthy, or deployment permission.
41
+
42
+ ## Select environments explicitly
43
+
44
+ Author `.handoff-check.json` as config v2:
45
+
46
+ ```json
47
+ {
48
+ "schemaVersion": 2,
49
+ "projectId": "payments-api",
50
+ "constraints": "constraints.json",
51
+ "profiles": {
52
+ "stage": { "scope": "staging", "handoff": "handoffs/staging.json" },
53
+ "prod": { "scope": "production", "handoff": "handoffs/production.json" }
54
+ }
55
+ }
56
+ ```
57
+
58
+ ```sh
59
+ npx handoff-check@0.6.0 explain --profile stage
60
+ npx handoff-check@0.6.0 snapshot --profile stage --task "Review staging work" --output handoffs/staging.reviewed.json
61
+ npx handoff-check@0.6.0 verify --profile stage --require-content
62
+ npx handoff-check@0.6.0 doctor --profile stage
63
+ ```
64
+
65
+ These assume you deliberately adopted a baseline at the configured handoff path;
66
+ snapshot does not adopt or overwrite it. Create parent directories before output.
67
+ Profiles require scope; omitted paths inherit top-level values then defaults.
68
+ Paths resolve from config location, not from the invocation subdirectory.
69
+ Use --config for an explicit config elsewhere.
70
+
71
+ There is no default/remembered profile. Without --profile, ordinary top-level
72
+ scope/path behavior applies; a profile-only config therefore needs explicit
73
+ selection. Combining --profile with --scope/--constraints/--handoff is rejected.
74
+ Profiles never infer authorization from a branch, folder or the name `prod`.
75
+ Init stays unchanged; configure profiles and CI commands through reviewed edits.
76
+
77
+ For the opt-in Claude adapter, generate with
78
+ `hook-config --host claude --profile stage`. Merge the snippet while preserving
79
+ existing settings, install the pinned local package, and confirm host delivery.
80
+ The existing advisory/error/time bounds remain unchanged. Unknown/mismatched
81
+ bindings produce NOT VERIFIED context; hook transport success is not a pass.
82
+
83
+ ## Record exactly what was checked
84
+
85
+ ```sh
86
+ npx handoff-check@0.6.0 verify --profile stage --require-content --report --format json
87
+ npx handoff-check@0.6.0 verify --profile stage --require-content --report --git-context --format markdown
88
+ ```
89
+
90
+ --report is optional and verify-only. It adds package version, requested policies,
91
+ selected profile/project and exact input/config byte digests around the existing
92
+ result. --git-context separately requests invocation-worktree/commit/branch data;
93
+ detached branches are null. Git is not consulted otherwise. Unborn/nonrepo/missing
94
+ Git returns 2 without a successful report. No dirty-state claim is made.
95
+
96
+ Absent implicit config is null. Digest bytes are the SAME read used for parsing,
97
+ not a later read that could describe different contents. Raw file whitespace affects
98
+ these digests; the existing canonical rule hash still ignores JSON formatting.
99
+ The nested result keeps its schema (1/2/3, or 4 for bound handoffs). Default JSON
100
+ without --report is unchanged. Verification mismatches still exit 1, invalid inputs
101
+ exit 2, and reports go to stdout. Use a separate destination for shell redirection,
102
+ never a manifest/handoff/config path.
103
+
104
+ Review path, branch and project disclosures before sharing a report. This is not
105
+ an authenticated attestation or proof of agent compliance. Git metadata and the
106
+ separate input reads are not atomic; re-run verification before acting.
107
+
108
+ ## Reproducible repository example
109
+
110
+ ```sh
111
+ node dist/cli.js verify --config examples/project-profiles/config.json --profile stage --require-content --report --format json --as-of 2026-11-25T08:00:00Z
112
+ node dist/cli.js verify --config examples/project-profiles/config.json --profile prod --require-content --report --format markdown --as-of 2026-11-25T08:00:00Z
113
+ ```
114
+
115
+ Both examples are synthetic and pass with their separately reviewed scoped files.
116
+ See [ADR 0006](decisions/0006-project-profiles-and-reports.md),
117
+ [config v2 schema](../schemas/config.v2.schema.json),
118
+ [manifest v3](../schemas/constraints.v3.schema.json),
119
+ [handoff v4](../schemas/handoff.v4.schema.json) and
120
+ [report wrapper](../schemas/report.v1.schema.json).
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.5.0. The package is already published; subsequent releases
4
+ current version is 0.6.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.5.0.tgz --ignore-scripts --access public`.
22
+ `npm publish /absolute/path/handoff-check-0.6.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.5.0 --version` and fresh-project init/verify using a
25
+ `npx --yes handoff-check@0.6.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.5.0` and a GitHub release on the reviewed main commit, attach the
27
+ 6. Create tag `v0.6.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,9 @@
1
1
  # Roadmap
2
2
 
3
+ Implemented in 0.6.0: opt-in portable project IDs, explicit environment profiles,
4
+ and verification metadata reports with separately requested Git context.
5
+ See [project/profile/report guide](project-context.md).
6
+
3
7
  Implemented in 0.5.0: read-only doctor, opt-in Claude advisory SessionStart adapter
4
8
  and configuration snippet, host matrix and critical-action recipes.
5
9
  See [lifecycle setup](lifecycle.md). Codex/Cursor adapters remain unshipped.
@@ -0,0 +1,15 @@
1
+ {
2
+ "schemaVersion": 2,
3
+ "projectId": "sample-project",
4
+ "constraints": "constraints.json",
5
+ "profiles": {
6
+ "stage": {
7
+ "scope": "staging",
8
+ "handoff": "staging.json"
9
+ },
10
+ "prod": {
11
+ "scope": "production",
12
+ "handoff": "production.json"
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "schemaVersion": 3,
3
+ "projectId": "sample-project",
4
+ "constraints": [
5
+ {
6
+ "id": "G-01",
7
+ "scope": "global",
8
+ "revision": 1,
9
+ "description": "Review unresolved findings before affected work",
10
+ "source": "synthetic:global-policy"
11
+ },
12
+ {
13
+ "id": "S-01",
14
+ "scope": "staging",
15
+ "revision": 1,
16
+ "description": "Require review before staging migrations",
17
+ "source": "synthetic:staging-policy"
18
+ },
19
+ {
20
+ "id": "P-01",
21
+ "scope": "production",
22
+ "revision": 1,
23
+ "description": "Require approval before production changes",
24
+ "source": "synthetic:production-policy"
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "task": "Review production work",
3
+ "scope": "production",
4
+ "capturedAt": "2026-11-25T08:00:00.000Z",
5
+ "schemaVersion": 4,
6
+ "projectId": "sample-project",
7
+ "contentMode": "retained",
8
+ "activeConstraints": [
9
+ {
10
+ "id": "G-01",
11
+ "revision": 1,
12
+ "contentHash": "sha256:1089aba265df09cd44941f1ffe9d6dee1c0da3c3e71da3ea389f4b1a2ccef37c",
13
+ "content": {
14
+ "id": "G-01",
15
+ "scope": "global",
16
+ "description": "Review unresolved findings before affected work",
17
+ "source": "synthetic:global-policy",
18
+ "revision": 1
19
+ }
20
+ },
21
+ {
22
+ "id": "P-01",
23
+ "revision": 1,
24
+ "contentHash": "sha256:84abfe3d094bad2a123a196230a368efc8a7e79031853d1842bc7966d3c4cc01",
25
+ "content": {
26
+ "id": "P-01",
27
+ "scope": "production",
28
+ "description": "Require approval before production changes",
29
+ "source": "synthetic:production-policy",
30
+ "revision": 1
31
+ }
32
+ }
33
+ ]
34
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "task": "Review staging work",
3
+ "scope": "staging",
4
+ "capturedAt": "2026-11-25T08:00:00.000Z",
5
+ "schemaVersion": 4,
6
+ "projectId": "sample-project",
7
+ "contentMode": "hashes",
8
+ "activeConstraints": [
9
+ {
10
+ "id": "G-01",
11
+ "revision": 1,
12
+ "contentHash": "sha256:1089aba265df09cd44941f1ffe9d6dee1c0da3c3e71da3ea389f4b1a2ccef37c"
13
+ },
14
+ {
15
+ "id": "S-01",
16
+ "revision": 1,
17
+ "contentHash": "sha256:a183ab89fb51c5442a12064cbd16fa69548c080d62c81c41d6b2b1839ce6927f"
18
+ }
19
+ ]
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "handoff-check",
3
- "version": "0.5.0",
3
+ "version": "0.6.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,55 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "Handoff Check explicit project/profile config v2",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": ["schemaVersion"],
7
+ "properties": {
8
+ "schemaVersion": {
9
+ "const": 2
10
+ },
11
+ "constraints": {
12
+ "type": "string",
13
+ "pattern": "\\S"
14
+ },
15
+ "handoff": {
16
+ "type": "string",
17
+ "pattern": "\\S"
18
+ },
19
+ "scope": {
20
+ "type": "string",
21
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
22
+ },
23
+ "projectId": {
24
+ "type": "string",
25
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
26
+ },
27
+ "profiles": {
28
+ "type": "object",
29
+ "minProperties": 1,
30
+ "propertyNames": {
31
+ "type": "string",
32
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
33
+ },
34
+ "additionalProperties": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": ["scope"],
38
+ "properties": {
39
+ "scope": {
40
+ "type": "string",
41
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
42
+ },
43
+ "constraints": {
44
+ "type": "string",
45
+ "pattern": "\\S"
46
+ },
47
+ "handoff": {
48
+ "type": "string",
49
+ "pattern": "\\S"
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }