handoff-check 0.3.0 → 0.3.1
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 +8 -0
- package/README.md +33 -15
- package/dist/cli.js +1 -1
- package/docs/agent-integration.md +9 -8
- package/docs/development-plan.md +146 -0
- package/docs/first-check.md +93 -0
- package/docs/releasing.md +5 -5
- package/docs/roadmap.md +7 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
- Replace obsolete pre-publication onboarding instructions with registry usage.
|
|
6
|
+
- Document all commands, verification policies, and rule/policy exit semantics.
|
|
7
|
+
- Add a reproducible first-rule walkthrough with a passing snapshot and CHANGED failure.
|
|
8
|
+
- Record the research-backed development plan with priorities and acceptance gates.
|
|
9
|
+
- Keep verifier behavior and input/output contracts unchanged.
|
|
10
|
+
|
|
3
11
|
## 0.3.0
|
|
4
12
|
|
|
5
13
|
- Show the expected active-rule count in every text verification summary.
|
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.3.
|
|
6
|
+
**Version: 0.3.1.**
|
|
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.
|
|
@@ -15,11 +15,11 @@ Source references are review metadata and are never fetched.
|
|
|
15
15
|
|
|
16
16
|
## Quick start
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Run in the repository where your agent works:
|
|
19
19
|
|
|
20
20
|
```sh
|
|
21
|
-
npx handoff-check@0.3.
|
|
22
|
-
npx handoff-check@0.3.
|
|
21
|
+
npx handoff-check@0.3.1 init --scope staging --agent both --dry-run
|
|
22
|
+
npx handoff-check@0.3.1 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.3.
|
|
36
|
+
npx handoff-check@0.3.1 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
|
|
@@ -41,9 +41,12 @@ Actions verification workflow. Skill/instruction installation does not guarantee
|
|
|
41
41
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
Node.js 22+ is required; end users do not need Bun. Global installation is also
|
|
45
|
+
available: `npm install --global handoff-check@0.3.1`. For contributor builds or
|
|
46
|
+
offline package testing, see the [setup guide](docs/agent-integration.md).
|
|
47
|
+
|
|
48
|
+
For a complete first-rule walkthrough, including a passing baseline and a detected
|
|
49
|
+
edit, see [your first real check](docs/first-check.md).
|
|
47
50
|
|
|
48
51
|
## See how many rules were checked
|
|
49
52
|
|
|
@@ -62,7 +65,7 @@ default but are explicitly marked. Unexpected reported IDs still fail.
|
|
|
62
65
|
To require actual active rules, opt in:
|
|
63
66
|
|
|
64
67
|
```sh
|
|
65
|
-
npx handoff-check@0.3.
|
|
68
|
+
npx handoff-check@0.3.1 verify --require-content --require-active --format json
|
|
66
69
|
```
|
|
67
70
|
|
|
68
71
|
A zero active set produces global NO_ACTIVE_CONSTRAINTS (no fake ID), mismatch
|
|
@@ -80,8 +83,8 @@ init and snapshot reject it. See the
|
|
|
80
83
|
After reviewing rules at handoff creation, capture a new baseline:
|
|
81
84
|
|
|
82
85
|
```sh
|
|
83
|
-
npx handoff-check@0.3.
|
|
84
|
-
npx handoff-check@0.3.
|
|
86
|
+
npx handoff-check@0.3.1 snapshot --task "Resume migration review" --output handoff.next.json
|
|
87
|
+
npx handoff-check@0.3.1 verify --handoff handoff.next.json --require-content --format json
|
|
85
88
|
```
|
|
86
89
|
|
|
87
90
|
Snapshot creates a new file exclusively. Review it before deliberately replacing
|
|
@@ -116,7 +119,7 @@ or revisioned v2 manifests. Scope must match the v2 handoff's saved scope.
|
|
|
116
119
|
Review current rules, capture a new v2 baseline, and deliberately update the saved
|
|
117
120
|
handoff. Existing inputs are preserved by init, not silently upgraded. Review
|
|
118
121
|
installed skills, instruction blocks and CI commands to update their pinned
|
|
119
|
-
version to 0.3.
|
|
122
|
+
version to 0.3.1 and add `--require-content`. Init refuses to overwrite differing
|
|
120
123
|
integrations; compare them with the new packaged templates and update reviewed
|
|
121
124
|
copies explicitly. Never refresh before checking resumed work or reuse capturedAt
|
|
122
125
|
as the clock for real resumed work.
|
|
@@ -161,7 +164,8 @@ bun run check
|
|
|
161
164
|
```
|
|
162
165
|
|
|
163
166
|
Bun 1.2.10 is used in CI. Build output runs on Node.js 22 or newer. The package
|
|
164
|
-
name is `handoff-check`;
|
|
167
|
+
name is `handoff-check`; release operations use reviewed artifacts and trusted
|
|
168
|
+
publishing as described in [the release guide](docs/releasing.md).
|
|
165
169
|
|
|
166
170
|
## Try the reproducible demo
|
|
167
171
|
|
|
@@ -241,8 +245,22 @@ handoff-check verify --scope <scope>
|
|
|
241
245
|
[--handoff <path>] default: handoff.json
|
|
242
246
|
[--as-of <UTC time>] default: current time, captured once
|
|
243
247
|
[--format text|json] default: text
|
|
248
|
+
[--require-content] require a v2 content-aware handoff
|
|
249
|
+
[--require-active] fail when no active constraints apply
|
|
250
|
+
|
|
251
|
+
handoff-check snapshot --task <task>
|
|
252
|
+
[--config <path>] [--constraints <path>] [--scope <scope>]
|
|
253
|
+
[--as-of <UTC time>] [--output <new-file>] [--format text|json]
|
|
254
|
+
|
|
255
|
+
handoff-check init --scope <scope>
|
|
256
|
+
[--agent codex|claude|both|none] [--dry-run] [--ci] [--format text|json]
|
|
244
257
|
```
|
|
245
258
|
|
|
259
|
+
Snapshot writes v2 JSON to stdout unless `--output` creates a new file. Its
|
|
260
|
+
`--format` option controls the saved-file acknowledgement when an output path is
|
|
261
|
+
used. The two `--require-*` policies and `--handoff` are verify-only. Run
|
|
262
|
+
`handoff-check --help` for the complete option list.
|
|
263
|
+
|
|
246
264
|
The same inputs, scope, and time produce the same output. Use `--as-of` for
|
|
247
265
|
reproducible CI checks. Explicit CLI paths resolve from the current working directory;
|
|
248
266
|
configured paths resolve from the config file's directory.
|
|
@@ -251,8 +269,8 @@ include global rules even when no scope-specific rules exist.
|
|
|
251
269
|
|
|
252
270
|
| Exit code | Meaning |
|
|
253
271
|
| --------- | ---------------------------------------------------------- |
|
|
254
|
-
| 0 |
|
|
255
|
-
| 1 | Rule mismatch; inspect findings
|
|
272
|
+
| 0 | Verification succeeded, including requested policies |
|
|
273
|
+
| 1 | Rule or active-set policy mismatch; inspect findings |
|
|
256
274
|
| 2 | Invalid arguments, invalid input, or unreadable input file |
|
|
257
275
|
|
|
258
276
|
Per-rule findings include `MISSING`, `EXPIRED`, `REVOKED`, `SUPERSEDED`, `OUT_OF_SCOPE`,
|
package/dist/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ import { parseArgs } from "node:util";
|
|
|
7
7
|
// package.json
|
|
8
8
|
var package_default = {
|
|
9
9
|
name: "handoff-check",
|
|
10
|
-
version: "0.3.
|
|
10
|
+
version: "0.3.1",
|
|
11
11
|
description: "A deterministic, local CLI that verifies active constraints before a coding agent resumes work.",
|
|
12
12
|
type: "module",
|
|
13
13
|
packageManager: "bun@1.2.10",
|
|
@@ -6,11 +6,11 @@ infers rules from a summary.
|
|
|
6
6
|
|
|
7
7
|
## Registry installation
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
From the consuming repository root:
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
npx handoff-check@0.3.
|
|
13
|
-
npx handoff-check@0.3.
|
|
12
|
+
npx handoff-check@0.3.1 init --scope staging --agent both --dry-run
|
|
13
|
+
npx handoff-check@0.3.1 init --scope staging --agent both
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Choose `codex`, `claude`, `both` (default), or `none`. Generated integrations:
|
|
@@ -23,9 +23,10 @@ Choose `codex`, `claude`, `both` (default), or `none`. Generated integrations:
|
|
|
23
23
|
Review and commit generated files. `--dry-run` previews all changes. Existing valid
|
|
24
24
|
inputs and surrounding instruction text are preserved; conflicts fail before
|
|
25
25
|
writes. Starters have zero rules: author reviewed constraints and populate handoff
|
|
26
|
-
|
|
26
|
+
references through a reviewed snapshot before relying on verification. Follow
|
|
27
|
+
[your first real check](first-check.md) for a complete example.
|
|
27
28
|
|
|
28
|
-
## Local package
|
|
29
|
+
## Local contributor package
|
|
29
30
|
|
|
30
31
|
From this source checkout, with Bun installed:
|
|
31
32
|
|
|
@@ -38,12 +39,12 @@ npm pack
|
|
|
38
39
|
From a separate consuming project, substitute the actual absolute tarball path:
|
|
39
40
|
|
|
40
41
|
```sh
|
|
41
|
-
npx --offline --yes --package=/absolute/path/handoff-check-0.3.
|
|
42
|
-
npx --offline --yes --package=/absolute/path/handoff-check-0.3.
|
|
42
|
+
npx --offline --yes --package=/absolute/path/handoff-check-0.3.1.tgz handoff-check init --scope staging --agent both
|
|
43
|
+
npx --offline --yes --package=/absolute/path/handoff-check-0.3.1.tgz handoff-check verify --format json --require-content
|
|
43
44
|
```
|
|
44
45
|
|
|
45
46
|
Bun is not required for these consumer commands. Generated agent commands use the
|
|
46
|
-
pinned registry package.
|
|
47
|
+
pinned registry package. To test an unpublished contributor build, use the same tarball invocation or
|
|
47
48
|
`node /absolute/path/Handoff-Check/dist/cli.js` in your local agent test prompt.
|
|
48
49
|
A local tarball does not make its npm name available in the public registry.
|
|
49
50
|
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Development plan
|
|
2
|
+
|
|
3
|
+
Status: proposed after 0.3.0; documentation/onboarding work ships in 0.3.1.
|
|
4
|
+
Research reviewed: 2026-11-24. Version labels below are targets, not release promises.
|
|
5
|
+
|
|
6
|
+
## Product direction
|
|
7
|
+
|
|
8
|
+
Make it clear and repeatable that current declared constraints were checked for
|
|
9
|
+
the intended project, scope, and time before a coding agent resumes affected work.
|
|
10
|
+
Keep the verifier local, deterministic, read-only, and independent of a model or
|
|
11
|
+
agent host. A verified declaration does not prove behavioral compliance.
|
|
12
|
+
|
|
13
|
+
## Evidence and confidence
|
|
14
|
+
|
|
15
|
+
Public issue reports are qualitative evidence, not prevalence measurements or
|
|
16
|
+
proof that every current version has the reported defect. Closed/duplicate reports
|
|
17
|
+
remain historical evidence only. Proposed features below are product hypotheses.
|
|
18
|
+
|
|
19
|
+
| Signal | Primary source | Implication |
|
|
20
|
+
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
21
|
+
| Compaction can lose behavioral instructions; historical report closed as duplicate | [Claude Code #4517](https://github.com/anthropics/claude-code/issues/4517) | Resume checks should not depend only on an agent remembering a skill. |
|
|
22
|
+
| Long-running agents lose continuity and can declare completion prematurely | [Anthropic: effective harnesses](https://www.anthropic.com/research/effective-harnesses-for-long-running-agents) | Preserve explicit artifacts and distinguish declarations from verified execution. |
|
|
23
|
+
| Current instructions may compete with stale memory | [Codex #39223](https://github.com/openai/codex/issues/39223) | Explain changes; do not claim that detecting stale declarations ensures model adherence. |
|
|
24
|
+
| Worktree sessions can lack skills/rules or target another workspace | [Claude Code #28041](https://github.com/anthropics/claude-code/issues/28041), [#36182](https://github.com/anthropics/claude-code/issues/36182) | Diagnose resolved paths/integrations and consider explicit project binding. |
|
|
25
|
+
| Users request duplication/conflict/instruction-budget diagnostics | [Claude Code #85477](https://github.com/anthropics/claude-code/issues/85477) | Test demand for rule-maintenance tooling without promising semantic conflict detection. |
|
|
26
|
+
| Hooks support lifecycle automation independently of model command selection | [Claude Code hooks guide](https://code.claude.com/docs/en/hooks-guide) | Build separately tested host adapters around the existing CLI. |
|
|
27
|
+
| Rule layers and precedence differ across hosts | [Cursor rules](https://prod.cursor.com/help/customization/rules) | Declare adapter capabilities and limitations explicitly. |
|
|
28
|
+
|
|
29
|
+
Maintainer-supplied community feedback additionally asked for changed-rule detail,
|
|
30
|
+
staging/production separation, and the number of rules behind a passing check.
|
|
31
|
+
These are paraphrased conversation inputs, not independently measured demand.
|
|
32
|
+
0.3.0 addresses the active-count/empty-pass distinction already.
|
|
33
|
+
|
|
34
|
+
## 0.3.1: onboarding clarity
|
|
35
|
+
|
|
36
|
+
Priority: immediate. No verifier or schema changes.
|
|
37
|
+
|
|
38
|
+
- Remove obsolete pre-publication instructions and align version pins.
|
|
39
|
+
- Document verify policies, snapshot/init usage, and policy exit semantics.
|
|
40
|
+
- Provide a disposable first-rule walkthrough: empty pass, missing rule, reviewed
|
|
41
|
+
baseline pass, and same-ID changed-rule failure.
|
|
42
|
+
- Preserve a clear distinction between snapshot creation and baseline adoption.
|
|
43
|
+
|
|
44
|
+
Acceptance: execute the walkthrough using a built package from a separate consumer
|
|
45
|
+
directory; observe expected statuses/codes and verify that verification does not
|
|
46
|
+
rewrite the saved baseline. Check documented flags against actual CLI behavior.
|
|
47
|
+
|
|
48
|
+
## 0.4: explainable verification
|
|
49
|
+
|
|
50
|
+
Priority: high. Dependencies: an ADR for snapshot evolution and privacy/storage choices.
|
|
51
|
+
|
|
52
|
+
1. Add an `explain` command showing scope/global selection and lifecycle decisions
|
|
53
|
+
using the same pure evaluation logic, with explicit evaluation time.
|
|
54
|
+
2. Design opt-in retention of canonical old rule content for field-level diffs.
|
|
55
|
+
Hash-only snapshots cannot reconstruct old text. Preserve existing snapshot
|
|
56
|
+
support and clearly report when old content is unavailable.
|
|
57
|
+
3. Offer a deterministic Markdown report for local review and CI artifacts/job
|
|
58
|
+
summaries, with scope, time, active count, tracking mode, policies, and findings.
|
|
59
|
+
|
|
60
|
+
Acceptance:
|
|
61
|
+
|
|
62
|
+
- Explain output agrees with verify at lifecycle boundaries and for global rules.
|
|
63
|
+
- Added/removed/changed fields are readable when old content exists; older
|
|
64
|
+
snapshots still detect CHANGED without invented old values.
|
|
65
|
+
- Terminal/Markdown output safely renders untrusted rule text.
|
|
66
|
+
- Reports and verification never silently recapture or adopt a baseline.
|
|
67
|
+
- Evaluate storage size and sensitive-content exposure before choosing defaults.
|
|
68
|
+
|
|
69
|
+
## 0.5: automatic checks and installation diagnostics
|
|
70
|
+
|
|
71
|
+
Priority: high, after explainability. No second verification engine.
|
|
72
|
+
|
|
73
|
+
1. Add read-only `doctor` diagnostics for resolved config/input paths, supported
|
|
74
|
+
schema versions, installed managed integrations, and package pins.
|
|
75
|
+
2. Add opt-in Claude Code lifecycle adapters for startup/resume/compaction where
|
|
76
|
+
current host documentation and executable tests support them.
|
|
77
|
+
3. Publish a capability matrix for each host. Investigate Codex and Cursor
|
|
78
|
+
integrations against their actual supported interfaces before promising parity.
|
|
79
|
+
4. Document critical-action integration recipes that re-run verification near the
|
|
80
|
+
action instead of reusing an hours-old session-start result.
|
|
81
|
+
|
|
82
|
+
Acceptance:
|
|
83
|
+
|
|
84
|
+
- Adapter fixtures cover supported event payloads, timeouts, invalid inputs,
|
|
85
|
+
mismatch results, worktree paths, and existing user configuration preservation.
|
|
86
|
+
- Distinguish advisory context injection from actual action blocking; a lifecycle
|
|
87
|
+
notification must never be described as a deployment permission boundary.
|
|
88
|
+
- Missing integrations and unsupported hosts are explicit, actionable diagnostics.
|
|
89
|
+
- No automatic baseline refresh, silent policy opt-in, or hook installation overwrite.
|
|
90
|
+
- No claim that doctor can see every instruction or hidden host memory.
|
|
91
|
+
|
|
92
|
+
## 0.6: project and environment correctness
|
|
93
|
+
|
|
94
|
+
Priority: medium/high; validate with worktree and multi-environment pilots first.
|
|
95
|
+
|
|
96
|
+
1. Design opt-in project identity binding in a versioned contract. Use a portable
|
|
97
|
+
explicit identity rather than treating an absolute folder path as identity.
|
|
98
|
+
2. Explore named environment profiles selecting an explicit scope and input paths.
|
|
99
|
+
Never infer production authorization from a branch name or directory.
|
|
100
|
+
3. Include reproducibility metadata in an optional report: input digests, selected
|
|
101
|
+
policies, package version, evaluation time, and explicitly requested Git context.
|
|
102
|
+
|
|
103
|
+
Acceptance:
|
|
104
|
+
|
|
105
|
+
- Configured cross-project and scope mismatches fail with actionable diagnostics.
|
|
106
|
+
- Worktrees retain project identity while resolving their own configured inputs.
|
|
107
|
+
- Existing unbound inputs remain supported under documented compatibility rules.
|
|
108
|
+
- Reports are described as local records, not authenticated attestations or proof
|
|
109
|
+
of agent compliance. Revalidate changed inputs rather than trusting old reports.
|
|
110
|
+
|
|
111
|
+
## Later: rule maintenance, gated by pilot demand
|
|
112
|
+
|
|
113
|
+
Priority: medium. Keep source inspection separate from normal verify semantics.
|
|
114
|
+
|
|
115
|
+
- Explore explicit local source bindings and a separate read-only source-check
|
|
116
|
+
command. A referenced file edit can signal review needed; it does not prove the
|
|
117
|
+
rule's meaning changed. Decide full-file versus section binding deliberately.
|
|
118
|
+
- Consider owner/review-by metadata. Overdue review is distinct from rule expiry;
|
|
119
|
+
it must not silently deactivate a restriction.
|
|
120
|
+
- Consider explicitly declared relationships such as conflicts/requires. Validate
|
|
121
|
+
these deterministically; defer free-text contradiction inference.
|
|
122
|
+
|
|
123
|
+
Acceptance: each addition has a versioned schema/ADR, migration guidance,
|
|
124
|
+
deterministic tests, and no implicit network fetches, arbitrary command execution,
|
|
125
|
+
or autonomous manifest edits. Optional file reads belong in the CLI adapter.
|
|
126
|
+
|
|
127
|
+
## Pilot validation and release gates
|
|
128
|
+
|
|
129
|
+
Recruit at least five consenting repositories across single-agent, multi-agent/
|
|
130
|
+
worktree, and staging/production workflows. Recruitment and interviews have not
|
|
131
|
+
yet happened; do not present this desk research as user validation.
|
|
132
|
+
|
|
133
|
+
Track installation-to-first-meaningful-check time, ability to explain a failure,
|
|
134
|
+
time to resolve changed-rule findings, skipped checks, and unnecessary warnings.
|
|
135
|
+
Use synthetic or voluntarily redacted examples; no default telemetry or transcript
|
|
136
|
+
collection. Establish a baseline before claiming improvement percentages.
|
|
137
|
+
|
|
138
|
+
For each milestone: reproduce a real problem, agree on semantics in an ADR,
|
|
139
|
+
implement focused PRs, run local checks and packed consumer tests, review/merge,
|
|
140
|
+
then use the existing reviewed-artifact release process. Changes affecting host
|
|
141
|
+
adapters require host-specific tests as well as the platform matrix.
|
|
142
|
+
|
|
143
|
+
Defer hosted dashboards, a general memory platform, automatic prose-to-rule
|
|
144
|
+
extraction, arbitrary policy scripts, and claims of universal agent enforcement.
|
|
145
|
+
Reprioritize this plan based on pilot evidence rather than adding all features
|
|
146
|
+
to a single release.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Your first real check
|
|
2
|
+
|
|
3
|
+
Use a new disposable directory for this walkthrough. Node.js 22+ is required;
|
|
4
|
+
Bun, API keys, and GitHub Actions are not required. All rules below are synthetic.
|
|
5
|
+
|
|
6
|
+
## Initialize and inspect the empty starter
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
mkdir handoff-check-demo
|
|
10
|
+
cd handoff-check-demo
|
|
11
|
+
npx handoff-check@0.3.1 init --scope staging --agent none
|
|
12
|
+
npx handoff-check@0.3.1 verify --require-content
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The starter passes with `PASS (EMPTY)` and `0 active constraints checked`.
|
|
16
|
+
This confirms valid inputs, not meaningful rule coverage. Adding `--require-active`
|
|
17
|
+
now would produce `NO_ACTIVE_CONSTRAINTS` and exit 1.
|
|
18
|
+
|
|
19
|
+
## Add one reviewed rule
|
|
20
|
+
|
|
21
|
+
Replace the starter `constraints.json` with this exact JSON:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"schemaVersion": 2,
|
|
26
|
+
"constraints": [
|
|
27
|
+
{
|
|
28
|
+
"id": "MIGRATION-REVIEW",
|
|
29
|
+
"scope": "staging",
|
|
30
|
+
"revision": 1,
|
|
31
|
+
"description": "Require review before applying staging migrations",
|
|
32
|
+
"source": "docs/migration-policy.md"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`source` is review metadata; this synthetic path need not exist. Verification
|
|
39
|
+
does not fetch it or check the contents of a referenced document.
|
|
40
|
+
|
|
41
|
+
Before capturing a baseline, run:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
npx handoff-check@0.3.1 verify --require-content --require-active
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Expect `MISSING MIGRATION-REVIEW`, one active constraint, and exit 1. The old
|
|
48
|
+
starter handoff does not include the new rule yet.
|
|
49
|
+
|
|
50
|
+
## Capture and verify a reviewed baseline
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
npx handoff-check@0.3.1 snapshot --task "Review staging migration" --output handoff.reviewed.json
|
|
54
|
+
npx handoff-check@0.3.1 verify --handoff handoff.reviewed.json --require-content --require-active
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Review the generated file before relying on it. The verification command should
|
|
58
|
+
report `PASS`, `1 active constraints checked`, `0 findings`, and exit 0.
|
|
59
|
+
Snapshot refuses to overwrite an existing output path; use a new filename when
|
|
60
|
+
deliberately capturing another reviewed baseline.
|
|
61
|
+
|
|
62
|
+
This example passes the baseline explicitly. For subsequent agent/CI use, review
|
|
63
|
+
and edit `.handoff-check.json` so `handoff` points to `handoff.reviewed.json`.
|
|
64
|
+
Otherwise commands without `--handoff` still use the original starter file.
|
|
65
|
+
|
|
66
|
+
## Detect a rule change
|
|
67
|
+
|
|
68
|
+
In `constraints.json`, change the description to
|
|
69
|
+
`Require two reviewers before applying staging migrations`. Leave the saved
|
|
70
|
+
handoff unchanged, then run:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
npx handoff-check@0.3.1 verify --handoff handoff.reviewed.json --require-content --require-active --format json
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Expect `status: "mismatch"`, `activeConstraintCount: 1`, a `CHANGED` finding, and
|
|
77
|
+
exit 1. The content hash catches the edit even if revision remains 1. For a
|
|
78
|
+
deliberate policy update, also increment its revision during review.
|
|
79
|
+
|
|
80
|
+
Do not recapture a baseline just to make a resumed check pass. Review the changed
|
|
81
|
+
rule and resolve affected work first; only then deliberately capture and adopt a
|
|
82
|
+
new baseline. Current snapshots detect changes but do not retain old descriptions
|
|
83
|
+
or display textual diffs.
|
|
84
|
+
|
|
85
|
+
## Interpret the result correctly
|
|
86
|
+
|
|
87
|
+
- Exit 0: the declared rules match for the selected scope/time and requested policies.
|
|
88
|
+
- Exit 1: rule mismatch or an empty set rejected by `--require-active`.
|
|
89
|
+
- Exit 2: invalid arguments, invalid data, or unreadable inputs.
|
|
90
|
+
|
|
91
|
+
A pass does not prove the agent obeyed the rule or grant permission to apply a
|
|
92
|
+
migration. Installing a skill does not guarantee it runs; generated CI checks
|
|
93
|
+
committed inputs when its workflow executes, not every agent action.
|
package/docs/releasing.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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.3.
|
|
5
|
-
|
|
4
|
+
current version is 0.3.1. The package is already published; subsequent releases
|
|
5
|
+
use the configured trusted publisher and the reviewed-artifact process below.
|
|
6
6
|
|
|
7
7
|
## Release a reviewed version
|
|
8
8
|
|
|
@@ -19,12 +19,12 @@ Confirm ownership during the authenticated first publication.
|
|
|
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.3.
|
|
22
|
+
`npm publish /absolute/path/handoff-check-0.3.1.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.3.
|
|
25
|
+
`npx --yes handoff-check@0.3.1 --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.3.
|
|
27
|
+
6. Create tag `v0.3.1` 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,12 @@
|
|
|
1
1
|
# Roadmap
|
|
2
2
|
|
|
3
|
+
See the [development plan](development-plan.md) for research evidence, proposed
|
|
4
|
+
0.4–0.6 milestones, dependencies, pilot validation, and acceptance criteria.
|
|
5
|
+
These are proposed milestones, not implemented features or promised dates.
|
|
6
|
+
|
|
7
|
+
0.3.1 improves published-package onboarding and CLI reference accuracy, and adds
|
|
8
|
+
a [first-rule walkthrough](first-check.md). Verifier behavior is unchanged.
|
|
9
|
+
|
|
3
10
|
## Implemented in the initial MVP
|
|
4
11
|
|
|
5
12
|
- Versioned manifest and handoff contracts, with strict local validation.
|
package/package.json
CHANGED