handoff-check 0.0.0-stage → 0.2.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/AGENTS.md +39 -0
- package/CHANGELOG.md +21 -0
- package/CONTRIBUTING.md +41 -0
- package/LICENSE +21 -0
- package/README.md +255 -2
- package/SECURITY.md +13 -0
- package/dist/cli.js +808 -0
- package/docs/agent-integration.md +86 -0
- package/docs/architecture.md +18 -0
- package/docs/decisions/0001-constraint-lifecycle.md +51 -0
- package/docs/decisions/0002-content-aware-handoffs.md +82 -0
- package/docs/development.md +33 -0
- package/docs/releasing.md +53 -0
- package/docs/roadmap.md +47 -0
- package/examples/changed-rule/constraints.json +12 -0
- package/examples/changed-rule/handoff.json +13 -0
- package/examples/changed-rule/original-constraints.json +12 -0
- package/examples/stale-handoff/constraints.json +18 -0
- package/examples/stale-handoff/corrected-handoff.json +5 -0
- package/examples/stale-handoff/handoff.json +5 -0
- package/package.json +58 -4
- package/schemas/config.v1.schema.json +16 -0
- package/schemas/constraints.v1.schema.json +47 -0
- package/schemas/constraints.v2.schema.json +75 -0
- package/schemas/handoff.v1.schema.json +19 -0
- package/schemas/handoff.v2.schema.json +50 -0
- package/skills/handoff-check/SKILL.md +70 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Agent integration
|
|
2
|
+
|
|
3
|
+
One portable [handoff-check skill](../skills/handoff-check/SKILL.md) supports both
|
|
4
|
+
Codex and Claude Code by calling the same CLI. It neither reads transcripts nor
|
|
5
|
+
infers rules from a summary.
|
|
6
|
+
|
|
7
|
+
## Registry installation
|
|
8
|
+
|
|
9
|
+
After the npm release is published, from the consuming repository root:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npx handoff-check@0.2.0 init --scope staging --agent both --dry-run
|
|
13
|
+
npx handoff-check@0.2.0 init --scope staging --agent both
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Choose `codex`, `claude`, `both` (default), or `none`. Generated integrations:
|
|
17
|
+
|
|
18
|
+
| Agent | Skill | Instruction file |
|
|
19
|
+
| ----------- | --------------------------------------- | ---------------- |
|
|
20
|
+
| Codex | `.agents/skills/handoff-check/SKILL.md` | `AGENTS.md` |
|
|
21
|
+
| Claude Code | `.claude/skills/handoff-check/SKILL.md` | `CLAUDE.md` |
|
|
22
|
+
|
|
23
|
+
Review and commit generated files. `--dry-run` previews all changes. Existing valid
|
|
24
|
+
inputs and surrounding instruction text are preserved; conflicts fail before
|
|
25
|
+
writes. Starters have zero rules: author reviewed constraints and populate handoff
|
|
26
|
+
IDs before relying on verification.
|
|
27
|
+
|
|
28
|
+
## Local package before publication
|
|
29
|
+
|
|
30
|
+
From this source checkout, with Bun installed:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
bun install --frozen-lockfile
|
|
34
|
+
bun run check
|
|
35
|
+
npm pack
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
From a separate consuming project, substitute the actual absolute tarball path:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
npx --offline --yes --package=/absolute/path/handoff-check-0.2.0.tgz handoff-check init --scope staging --agent both
|
|
42
|
+
npx --offline --yes --package=/absolute/path/handoff-check-0.2.0.tgz handoff-check verify --format json --require-content
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Bun is not required for these consumer commands. Generated agent commands use the
|
|
46
|
+
pinned registry package. Before publication, use the same tarball invocation or
|
|
47
|
+
`node /absolute/path/Handoff-Check/dist/cli.js` in your local agent test prompt.
|
|
48
|
+
A local tarball does not make its npm name available in the public registry.
|
|
49
|
+
|
|
50
|
+
## Agent workflow
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
Resume this task. Use the handoff-check skill before continuing, verify the
|
|
54
|
+
repository's configured scope using the current time, and report findings.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The agent checks IDs and reads active rule descriptions. Exit 1 means mismatch;
|
|
58
|
+
exit 2 means invalid inputs/arguments. Resolve either before resuming affected work.
|
|
59
|
+
A pass does not authorize an action or interpret the task summary.
|
|
60
|
+
|
|
61
|
+
In 0.2, skills and generated instructions require content-aware v2 handoffs.
|
|
62
|
+
At handoff creation, review current rules and run the configured CLI's
|
|
63
|
+
`snapshot --task "Resume the task" --output handoff.next.json`. Review that file
|
|
64
|
+
before explicitly promoting it to the configured handoff. On resume, verify the
|
|
65
|
+
saved baseline first; do not regenerate it to hide a CHANGED finding. Snapshot
|
|
66
|
+
records revisions/hashes, not old text, and capturedAt is not the evaluation clock.
|
|
67
|
+
|
|
68
|
+
Existing v1 inputs are preserved. Review/capture a v2 handoff and explicitly update
|
|
69
|
+
old skill/managed-block/CI pins before relying on content tracking. Existing v1
|
|
70
|
+
manifests use implicit revision 1; v2 manifests make revisions explicit.
|
|
71
|
+
See [upgrade instructions](../README.md#upgrade-from-01).
|
|
72
|
+
|
|
73
|
+
Skill discovery depends on the host agent. Skills/instructions are guidance, not
|
|
74
|
+
guaranteed hooks. `init --ci` adds `.github/workflows/handoff-check.yml` pinned to
|
|
75
|
+
the installed version and using saved config. This checks committed IDs on push/PR,
|
|
76
|
+
not every agent turn. Host-specific hooks are a future integration because host
|
|
77
|
+
events and context-reset behavior differ.
|
|
78
|
+
|
|
79
|
+
## Upgrades and contributor instructions
|
|
80
|
+
|
|
81
|
+
Matching integrations are preserved on repeated init. If a skill or managed block
|
|
82
|
+
differs, compare it to the new package and review/update explicitly; there is no
|
|
83
|
+
force-overwrite mode. Commands stay pinned until a reviewed upgrade.
|
|
84
|
+
|
|
85
|
+
See [AGENTS.md](../AGENTS.md), [CONTRIBUTING.md](../CONTRIBUTING.md), and
|
|
86
|
+
[development coordination](development.md) for developing Handoff Check itself.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
Handoff Check compares declared handoff IDs against a reviewed local manifest for
|
|
4
|
+
one scope at one instant. It complements task summaries rather than generating or
|
|
5
|
+
interpreting them.
|
|
6
|
+
|
|
7
|
+
The CLI owns argument parsing, local file I/O, clock capture, rendering, and exit
|
|
8
|
+
codes. Validation rejects malformed contracts before verification begins. The
|
|
9
|
+
pure core receives validated objects, an explicit scope, and an explicit time.
|
|
10
|
+
|
|
11
|
+
No verification operation writes inputs, accesses a network, calls a model,
|
|
12
|
+
executes source references, or reads agent transcripts. Output order must be
|
|
13
|
+
independent of manifest and handoff ordering.
|
|
14
|
+
|
|
15
|
+
Exit codes: 0 for verified IDs, 1 for rule mismatches, 2 for invalid input or an
|
|
16
|
+
unreadable input file. JSON output is intended for agent adapters and automation.
|
|
17
|
+
|
|
18
|
+
See decisions/0001-constraint-lifecycle.md for lifecycle and scope semantics.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# ADR 0001: Explicit scope and time-based lifecycle
|
|
2
|
+
|
|
3
|
+
Status: accepted for schema version 1.
|
|
4
|
+
|
|
5
|
+
## Contract
|
|
6
|
+
|
|
7
|
+
Both inputs are versioned objects. A manifest contains `schemaVersion: 1` and a
|
|
8
|
+
`constraints` array; a handoff contains `schemaVersion: 1`, `task`, and
|
|
9
|
+
`activeConstraints`. Unknown fields are rejected to catch misspelled restrictions.
|
|
10
|
+
|
|
11
|
+
Each constraint requires a unique `id`, one explicit `scope`, a non-empty
|
|
12
|
+
`description`, and a non-empty `source` reference. IDs and scopes use ASCII letters,
|
|
13
|
+
digits, dots, underscores, and hyphens, beginning with a letter or digit. IDs and
|
|
14
|
+
scopes are case-sensitive. Handoff IDs must also be unique.
|
|
15
|
+
|
|
16
|
+
`global` is reserved for constraints applicable to every scope. Selecting `global`
|
|
17
|
+
evaluates only global rules. Other scope names are arbitrary; no scope hierarchy or
|
|
18
|
+
registry is inferred. A scope absent from the manifest still includes global rules.
|
|
19
|
+
|
|
20
|
+
UTC timestamps require `YYYY-MM-DDTHH:mm:ss[.SSS]Z` with one to three optional
|
|
21
|
+
fractional digits and a real calendar date. Offsets and leap seconds are rejected.
|
|
22
|
+
At or after `expiresAt`, `revokedAt`, or `supersededAt`, the corresponding lifecycle
|
|
23
|
+
transition applies. Without a fixed clock, the CLI captures the current time once.
|
|
24
|
+
|
|
25
|
+
## Replacement
|
|
26
|
+
|
|
27
|
+
`replacedBy` and `supersededAt` must appear together. The target must exist in the
|
|
28
|
+
same scope. Self-references and cycles are invalid. Replacement chains are allowed.
|
|
29
|
+
Supersession remains effective even if the replacement is later expired or revoked;
|
|
30
|
+
old constraints never implicitly reactivate.
|
|
31
|
+
|
|
32
|
+
All entries otherwise apply immediately, including replacement targets. Therefore,
|
|
33
|
+
before a future supersededAt time, both old and replacement rules may be active.
|
|
34
|
+
Version 1 has no activation timestamp. Historical checks describe the supplied
|
|
35
|
+
manifest at the selected time, not a reconstruction of a past Git revision.
|
|
36
|
+
|
|
37
|
+
## Findings
|
|
38
|
+
|
|
39
|
+
Expected IDs are active rules in the selected or global scope. Missing expected IDs
|
|
40
|
+
produce MISSING. Each unexpected reported ID gets one primary finding, in this
|
|
41
|
+
precedence: UNKNOWN, OUT_OF_SCOPE, REVOKED, SUPERSEDED, EXPIRED.
|
|
42
|
+
|
|
43
|
+
Expected/reported lists are sorted by ASCII ID; findings by ID, then code. JSON
|
|
44
|
+
includes a schemaVersion, normalized evaluation time, scope, lists, and findings.
|
|
45
|
+
Validation errors go to stderr; verification results go to stdout.
|
|
46
|
+
|
|
47
|
+
## Tradeoffs
|
|
48
|
+
|
|
49
|
+
Explicit timestamps permit reproducible lifecycle checks. Same-scope replacement
|
|
50
|
+
prevents a staging change from disabling a global rule. A strict schema catches
|
|
51
|
+
typos at the cost of requiring a schema revision for future extensions.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# ADR 0002: Content-aware handoffs
|
|
2
|
+
|
|
3
|
+
Status: accepted for 0.2.0.
|
|
4
|
+
|
|
5
|
+
## Formats and compatibility
|
|
6
|
+
|
|
7
|
+
Manifest v1 and handoff v1 keep their existing schemas. A v1 handoff still checks
|
|
8
|
+
IDs only against either manifest format. Its JSON result stays schemaVersion 1
|
|
9
|
+
with the existing fields. Text output explicitly identifies ID-only checking.
|
|
10
|
+
|
|
11
|
+
Manifest v2 adds required `revision` to each constraint: a positive safe integer
|
|
12
|
+
(1 through 9007199254740991). Handoff v2 records `task`, `scope`, `capturedAt`, and
|
|
13
|
+
`activeConstraints` objects containing `id`, `revision`, and `contentHash`.
|
|
14
|
+
IDs remain unique. Unknown fields, malformed hashes, and invalid revisions fail
|
|
15
|
+
as invalid input. Both input formats are versioned independently.
|
|
16
|
+
|
|
17
|
+
A v2 handoff works with either manifest. Manifest v1 rules have implicit revision
|
|
18
|
+
1, so an existing manifest can adopt content tracking without being rewritten.
|
|
19
|
+
A revisioned v2 manifest works with v1 handoffs in ID-only mode. `--require-content`
|
|
20
|
+
rejects a v1 handoff with exit 2 instead of silently falling back. New skills and
|
|
21
|
+
generated CI use this option; old integrations must be upgraded explicitly.
|
|
22
|
+
|
|
23
|
+
## Canonical content algorithm v1
|
|
24
|
+
|
|
25
|
+
Serialize the following object, in exactly this field order, using ECMAScript
|
|
26
|
+
`JSON.stringify` without indentation, then encode as UTF-8 and compute SHA-256:
|
|
27
|
+
|
|
28
|
+
1. `id`
|
|
29
|
+
2. `scope`
|
|
30
|
+
3. `description`
|
|
31
|
+
4. `source`
|
|
32
|
+
5. `expiresAt`
|
|
33
|
+
6. `revokedAt`
|
|
34
|
+
7. `replacedBy`
|
|
35
|
+
8. `supersededAt`
|
|
36
|
+
|
|
37
|
+
Required strings are preserved exactly, with no trimming or Unicode normalization.
|
|
38
|
+
Absent optional fields are represented as JSON null in this canonical object;
|
|
39
|
+
explicit null in input remains invalid. Timestamps normalize through
|
|
40
|
+
`Date.toISOString()` to UTC milliseconds. Revision is excluded from the hash and
|
|
41
|
+
compared separately. The stored syntax is `sha256:` plus 64 lowercase hex digits.
|
|
42
|
+
Reordering JSON properties, formatting JSON, or using equivalent UTC fractional
|
|
43
|
+
representations does not change the hash. Changing any hashed string does.
|
|
44
|
+
|
|
45
|
+
This algorithm is part of the v2 contract. Any incompatible canonicalization
|
|
46
|
+
change requires a new contract version, not silent rehashing. A golden fixture
|
|
47
|
+
independently verifies the hash contract in tests.
|
|
48
|
+
|
|
49
|
+
Only literal source-reference text is hashed. Referenced documents are never
|
|
50
|
+
fetched or hashed. These hashes are change detectors, not signatures or proof of
|
|
51
|
+
authorization; someone who controls both files can replace both values.
|
|
52
|
+
|
|
53
|
+
## Capture and verification
|
|
54
|
+
|
|
55
|
+
`snapshot --task <text>` reads the manifest and captures the selected/global rules
|
|
56
|
+
that apply at the explicit or once-captured current clock. It does not read the
|
|
57
|
+
existing handoff, rewrite the manifest, or infer constraints from task prose.
|
|
58
|
+
Default stdout is a complete v2 JSON handoff. `--output <new-path>` creates a new
|
|
59
|
+
file exclusively and refuses existing paths; write failures return exit 2 and may
|
|
60
|
+
leave a partial newly created file, which must be inspected before retrying.
|
|
61
|
+
|
|
62
|
+
`capturedAt` is normalized metadata, not the evaluation clock, an activation rule,
|
|
63
|
+
or authenticated history. Verification uses current time unless --as-of is
|
|
64
|
+
explicit. A fixed evaluation time may predate capturedAt; that describes the
|
|
65
|
+
supplied files at the chosen instant, not a reconstructed historical Git version.
|
|
66
|
+
Selected scope must equal the v2 handoff scope or verification returns exit 2.
|
|
67
|
+
|
|
68
|
+
For an active reported ID, a revision OR content-hash difference produces one
|
|
69
|
+
CHANGED finding. Both differences are reported together with expected/reported
|
|
70
|
+
revision and hash. Missing rules remain MISSING. Unknown, out-of-scope, revoked,
|
|
71
|
+
superseded, and expired primary findings retain lifecycle precedence over CHANGED.
|
|
72
|
+
Adding a future lifecycle timestamp is CHANGED immediately while the rule is
|
|
73
|
+
active; once the timestamp takes effect its lifecycle finding wins.
|
|
74
|
+
|
|
75
|
+
V2 results use schemaVersion 2 and `tracking: "content"`; ID lists remain sorted,
|
|
76
|
+
and findings remain ordered by ID then code. Revision decreases are differences
|
|
77
|
+
too; monotonic revision history is not verified. Old text is not stored, so the
|
|
78
|
+
tool does not show a textual diff.
|
|
79
|
+
|
|
80
|
+
Capture at handoff creation or after an explicit review of changed rules. Never
|
|
81
|
+
recapture a baseline automatically before checking a resumed task: that would hide
|
|
82
|
+
the changes the check is intended to find. Verification and CI remain read-only.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Development coordination
|
|
2
|
+
|
|
3
|
+
Use focused feature branches and reviewable commits. A small team can divide work
|
|
4
|
+
into the following roles without duplicating implementation:
|
|
5
|
+
|
|
6
|
+
| Role | Responsibility | Shared-checkout permissions |
|
|
7
|
+
| -------------- | --------------------------------------------------------------- | ---------------------------------------------- |
|
|
8
|
+
| Lead developer | Architecture, implementation, fixes, integration | Owns source edits |
|
|
9
|
+
| QA | Acceptance scenarios, CLI/process checks, reproducible failures | Read-only; temporary fixtures outside the repo |
|
|
10
|
+
| Reviewer | Independent correctness and contract review | Read-only; reports actionable findings |
|
|
11
|
+
| Git owner | Commit grouping, detailed messages, branch/PR hygiene | Git writes after the lead confirms readiness |
|
|
12
|
+
|
|
13
|
+
Names are roles, not a requirement to run four agents for every change. A solo
|
|
14
|
+
contributor can perform them sequentially. For simultaneous implementation, use
|
|
15
|
+
isolated checkouts and assign disjoint responsibilities.
|
|
16
|
+
|
|
17
|
+
## Review gates
|
|
18
|
+
|
|
19
|
+
1. The lead identifies the changed behavior and completes implementation.
|
|
20
|
+
2. QA reports observed commands, expected nonzero exits, results, and remaining
|
|
21
|
+
coverage gaps. Review reports findings with severity and reproduction steps.
|
|
22
|
+
3. The lead fixes actionable issues and requests targeted revalidation.
|
|
23
|
+
4. Once required checks pass and blocking findings are resolved, the Git owner
|
|
24
|
+
re-reads the final diff, including untracked files, and creates coherent commits.
|
|
25
|
+
5. A PR describes the final behavior, actual validation, and compatibility impact.
|
|
26
|
+
|
|
27
|
+
Do not claim that checks ran on hosted CI based only on local results. Do not
|
|
28
|
+
change branches while another contributor is editing the shared checkout. Keep
|
|
29
|
+
machine-specific terminal handles and runtime identities out of committed docs.
|
|
30
|
+
|
|
31
|
+
Publication is separate from source development. Before a first release, review
|
|
32
|
+
the package identity, version, license, included files, install behavior, changelog,
|
|
33
|
+
and the CI results. Registry publication requires explicit authorization.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Releasing
|
|
2
|
+
|
|
3
|
+
The npm package name is `handoff-check`; the binary is `handoff-check` and the
|
|
4
|
+
current version is 0.2.0. A registry lookup is not proof that a name can be claimed.
|
|
5
|
+
Confirm ownership during the authenticated first publication.
|
|
6
|
+
|
|
7
|
+
## Release a reviewed version
|
|
8
|
+
|
|
9
|
+
1. Merge reviewed changes into main and wait for all Linux/macOS/Windows checks,
|
|
10
|
+
including packed offline npx onboarding, to pass on the merged commit.
|
|
11
|
+
2. Run the manual **Release package** workflow on main with the exact package
|
|
12
|
+
version and `publish: false`. It repeats the platform matrix and uploads the
|
|
13
|
+
built tarball as `npm-package`.
|
|
14
|
+
3. Download that tarball, inspect its file list and checksum, and test it in a
|
|
15
|
+
separate consumer directory using offline npx with an absolute tarball path.
|
|
16
|
+
4. Prefer trusted publishing: dispatch the same main commit/version with
|
|
17
|
+
`publish: true` and the reviewed tarball's SHA256 in the `sha256` input. The
|
|
18
|
+
workflow refuses publication if the rebuilt artifact differs. Download the
|
|
19
|
+
publish-run artifact and compare it before claiming artifact continuity.
|
|
20
|
+
For first-publication bootstrap or an explicitly chosen manual release, use
|
|
21
|
+
`npm login` and publish the reviewed tarball directly with
|
|
22
|
+
`npm publish /absolute/path/handoff-check-0.2.0.tgz --ignore-scripts --access public`.
|
|
23
|
+
Complete interactive two-factor authentication directly with npm.
|
|
24
|
+
5. Verify registry name, version, binary and integrity, then test
|
|
25
|
+
`npx --yes handoff-check@0.2.0 --version` and fresh-project init/verify using a
|
|
26
|
+
new package cache and the public registry, rather than the local tarball.
|
|
27
|
+
6. Create tag `v0.2.0` and a GitHub release on the reviewed main commit, attach the
|
|
28
|
+
same tarball, and describe features, requirements and known limits.
|
|
29
|
+
|
|
30
|
+
Publishing is immutable for a given npm name/version. Fix failed candidates on a
|
|
31
|
+
branch, review, merge and rebuild. Fix published releases with a new version.
|
|
32
|
+
|
|
33
|
+
## Later releases with trusted publishing
|
|
34
|
+
|
|
35
|
+
Configure the npm package's trusted publisher for owner `Larusajs`, repository
|
|
36
|
+
`Handoff-Check`, workflow `release.yml`, and environment `npm`. Add required
|
|
37
|
+
reviewers to that GitHub environment if maintainers want an approval gate.
|
|
38
|
+
|
|
39
|
+
The manual workflow defaults to artifact-only mode. Selecting `publish: true`
|
|
40
|
+
validates main on all supported platforms, builds a fresh artifact for that exact
|
|
41
|
+
workflow commit, uploads it, and publishes that artifact with npm OIDC. It does not
|
|
42
|
+
reuse an earlier run's artifact or automatically create a GitHub release/tag.
|
|
43
|
+
Select the intended reviewed main commit and version before dispatching a release.
|
|
44
|
+
No long-lived npm publishing token is required.
|
|
45
|
+
|
|
46
|
+
Trusted publishing requires npm 11.5.1+ and Node 22.14+; the workflow uses Node 24
|
|
47
|
+
and checks the npm version before publishing. See the maintained
|
|
48
|
+
[npm trusted publishing documentation](https://docs.npmjs.com/trusted-publishers/).
|
|
49
|
+
|
|
50
|
+
Version updates must keep package.json, bun.lock, changelog and examples current.
|
|
51
|
+
Generated agent commands and CI templates use the package metadata version.
|
|
52
|
+
Existing integrations are preserved; review their pinned version explicitly when
|
|
53
|
+
upgrading.
|
package/docs/roadmap.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Roadmap
|
|
2
|
+
|
|
3
|
+
## Implemented in the initial MVP
|
|
4
|
+
|
|
5
|
+
- Versioned manifest and handoff contracts, with strict local validation.
|
|
6
|
+
- Deterministic verification of missing, expired, revoked, superseded,
|
|
7
|
+
out-of-scope, and unknown constraint IDs.
|
|
8
|
+
- Text and JSON CLI output with documented exit codes.
|
|
9
|
+
- A fixed-clock failing and corrected demo, acceptance tests, and CI.
|
|
10
|
+
- A portable Claude Code/Codex adapter using the same CLI.
|
|
11
|
+
- Local package installation smoke testing and terminal-safe text diagnostics.
|
|
12
|
+
|
|
13
|
+
## Release operations
|
|
14
|
+
|
|
15
|
+
- Run the configured platform matrix on hosted CI before tagging a release.
|
|
16
|
+
- Publish the reviewed `handoff-check` package for `npx` use after npm authentication.
|
|
17
|
+
|
|
18
|
+
## End-user distribution milestone
|
|
19
|
+
|
|
20
|
+
- `init --scope <scope> --agent codex|claude|both|none` creates starter contracts,
|
|
21
|
+
project config, portable skills, and managed agent instruction blocks.
|
|
22
|
+
- `--dry-run` previews changes. Existing inputs remain intact; conflicting skills
|
|
23
|
+
or instruction markers fail before writing. `--ci` adds a pinned verification job.
|
|
24
|
+
- Versioned `.handoff-check.json` supplies local paths and scope; explicit verify
|
|
25
|
+
flags override config. No ancestor discovery or inferred environment.
|
|
26
|
+
- Test packed offline npx installation and onboarding from a separate consumer
|
|
27
|
+
directory on Linux, macOS, and Windows.
|
|
28
|
+
- Merge reviewed PRs into main after CI, prepare a GitHub release, and document
|
|
29
|
+
token-free trusted publishing for subsequent npm releases.
|
|
30
|
+
|
|
31
|
+
## Following releases
|
|
32
|
+
|
|
33
|
+
Implemented in 0.2.0: revisioned v2 manifests, content-aware handoff snapshots,
|
|
34
|
+
canonical SHA-256 comparison, CHANGED findings, explicit --require-content,
|
|
35
|
+
legacy compatibility and reviewed migration guidance. No automatic baseline refresh.
|
|
36
|
+
|
|
37
|
+
- Incorporate feedback from real repositories before expanding the contract.
|
|
38
|
+
- Consider optional old-content storage for textual diffs in a later version.
|
|
39
|
+
- Consider host-specific enforcement hooks separately from the portable skill;
|
|
40
|
+
neither skill discovery nor agent instructions guarantee execution.
|
|
41
|
+
|
|
42
|
+
## Outside the initial scope
|
|
43
|
+
|
|
44
|
+
- Inferring constraints from prose or agent transcripts.
|
|
45
|
+
- Fetching or authenticating source references.
|
|
46
|
+
- Editing manifests automatically or granting execution permissions.
|
|
47
|
+
- Hosted services, model calls, and agent-specific verification engines.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 2,
|
|
3
|
+
"task": "Resume migration review",
|
|
4
|
+
"scope": "staging",
|
|
5
|
+
"capturedAt": "2026-11-24T10:00:00.000Z",
|
|
6
|
+
"activeConstraints": [
|
|
7
|
+
{
|
|
8
|
+
"id": "C-07",
|
|
9
|
+
"revision": 1,
|
|
10
|
+
"contentHash": "sha256:2e1217c01957cd82f81d2bdc47397e00d7c56399606f38545384bdab07ee1b3d"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"constraints": [
|
|
4
|
+
{
|
|
5
|
+
"id": "C-02",
|
|
6
|
+
"scope": "staging",
|
|
7
|
+
"description": "Staging freeze ended Friday at 18:00 UTC",
|
|
8
|
+
"source": "synthetic:staging-freeze-decision",
|
|
9
|
+
"expiresAt": "2026-11-20T18:00:00Z"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "C-07",
|
|
13
|
+
"scope": "staging",
|
|
14
|
+
"description": "Require review before applying migrations",
|
|
15
|
+
"source": "synthetic:migration-review-policy"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "handoff-check",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "A deterministic, local CLI that verifies active constraints before a coding agent resumes work.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"packageManager": "bun@1.2.10",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://github.com/Larusajs/Handoff-Check#readme",
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/Larusajs/Handoff-Check/issues"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"cli",
|
|
14
|
+
"handoff",
|
|
15
|
+
"constraints",
|
|
16
|
+
"coding-agents",
|
|
17
|
+
"codex",
|
|
18
|
+
"claude-code"
|
|
19
|
+
],
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/Larusajs/Handoff-Check.git"
|
|
23
|
+
},
|
|
24
|
+
"bin": {
|
|
25
|
+
"handoff-check": "dist/cli.js"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"schemas",
|
|
30
|
+
"examples",
|
|
31
|
+
"docs",
|
|
32
|
+
"skills",
|
|
33
|
+
"AGENTS.md",
|
|
34
|
+
"CONTRIBUTING.md",
|
|
35
|
+
"CHANGELOG.md",
|
|
36
|
+
"SECURITY.md",
|
|
37
|
+
"README.md",
|
|
38
|
+
"LICENSE"
|
|
39
|
+
],
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=22"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"dev": "bun src/cli.ts",
|
|
45
|
+
"test": "bun run build && bun test",
|
|
46
|
+
"typecheck": "tsc --noEmit",
|
|
47
|
+
"lint": "biome check .",
|
|
48
|
+
"format": "biome format --write .",
|
|
49
|
+
"build": "bun build src/cli.ts --target node --outdir dist",
|
|
50
|
+
"prepack": "bun run build",
|
|
51
|
+
"check": "bun run lint && bun run typecheck && bun run test"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@biomejs/biome": "2.6.8",
|
|
55
|
+
"@types/bun": "1.4.5",
|
|
56
|
+
"ajv": "8.20.0",
|
|
57
|
+
"ajv-formats": "3.0.1",
|
|
58
|
+
"typescript": "7.0.2"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Handoff Check project config v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["schemaVersion"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": 1 },
|
|
9
|
+
"constraints": { "type": "string", "pattern": "\\S" },
|
|
10
|
+
"handoff": { "type": "string", "pattern": "\\S" },
|
|
11
|
+
"scope": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Handoff Check constraint manifest v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["schemaVersion", "constraints"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": { "const": 1 },
|
|
9
|
+
"constraints": {
|
|
10
|
+
"type": "array",
|
|
11
|
+
"items": { "$ref": "#/$defs/constraint" },
|
|
12
|
+
"description": "IDs must be unique. Replacement references must exist, share scope, and form an acyclic graph; these checks are enforced by the CLI."
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"$defs": {
|
|
16
|
+
"identifier": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
|
|
19
|
+
},
|
|
20
|
+
"text": { "type": "string", "pattern": "\\S" },
|
|
21
|
+
"timestamp": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"format": "date-time",
|
|
24
|
+
"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$",
|
|
25
|
+
"description": "UTC only; real calendar dates required. The CLI also rejects leap seconds and rollover dates."
|
|
26
|
+
},
|
|
27
|
+
"constraint": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"required": ["id", "scope", "description", "source"],
|
|
31
|
+
"dependentRequired": {
|
|
32
|
+
"replacedBy": ["supersededAt"],
|
|
33
|
+
"supersededAt": ["replacedBy"]
|
|
34
|
+
},
|
|
35
|
+
"properties": {
|
|
36
|
+
"id": { "$ref": "#/$defs/identifier" },
|
|
37
|
+
"scope": { "$ref": "#/$defs/identifier" },
|
|
38
|
+
"description": { "$ref": "#/$defs/text" },
|
|
39
|
+
"source": { "$ref": "#/$defs/text" },
|
|
40
|
+
"expiresAt": { "$ref": "#/$defs/timestamp" },
|
|
41
|
+
"revokedAt": { "$ref": "#/$defs/timestamp" },
|
|
42
|
+
"replacedBy": { "$ref": "#/$defs/identifier" },
|
|
43
|
+
"supersededAt": { "$ref": "#/$defs/timestamp" }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Handoff Check revisioned constraint manifest v2",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["schemaVersion", "constraints"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schemaVersion": {
|
|
9
|
+
"const": 2
|
|
10
|
+
},
|
|
11
|
+
"constraints": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": {
|
|
14
|
+
"$ref": "#/$defs/constraint"
|
|
15
|
+
},
|
|
16
|
+
"description": "IDs must be unique. Replacement references must exist, share scope, and form an acyclic graph; these checks are enforced by the CLI."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"$defs": {
|
|
20
|
+
"identifier": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*(?![\\s\\S])"
|
|
23
|
+
},
|
|
24
|
+
"text": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"pattern": "\\S"
|
|
27
|
+
},
|
|
28
|
+
"timestamp": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"format": "date-time",
|
|
31
|
+
"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$",
|
|
32
|
+
"description": "UTC only; real calendar dates required. The CLI also rejects leap seconds and rollover dates."
|
|
33
|
+
},
|
|
34
|
+
"constraint": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["id", "scope", "description", "source", "revision"],
|
|
38
|
+
"dependentRequired": {
|
|
39
|
+
"replacedBy": ["supersededAt"],
|
|
40
|
+
"supersededAt": ["replacedBy"]
|
|
41
|
+
},
|
|
42
|
+
"properties": {
|
|
43
|
+
"id": {
|
|
44
|
+
"$ref": "#/$defs/identifier"
|
|
45
|
+
},
|
|
46
|
+
"scope": {
|
|
47
|
+
"$ref": "#/$defs/identifier"
|
|
48
|
+
},
|
|
49
|
+
"description": {
|
|
50
|
+
"$ref": "#/$defs/text"
|
|
51
|
+
},
|
|
52
|
+
"source": {
|
|
53
|
+
"$ref": "#/$defs/text"
|
|
54
|
+
},
|
|
55
|
+
"expiresAt": {
|
|
56
|
+
"$ref": "#/$defs/timestamp"
|
|
57
|
+
},
|
|
58
|
+
"revokedAt": {
|
|
59
|
+
"$ref": "#/$defs/timestamp"
|
|
60
|
+
},
|
|
61
|
+
"replacedBy": {
|
|
62
|
+
"$ref": "#/$defs/identifier"
|
|
63
|
+
},
|
|
64
|
+
"supersededAt": {
|
|
65
|
+
"$ref": "#/$defs/timestamp"
|
|
66
|
+
},
|
|
67
|
+
"revision": {
|
|
68
|
+
"type": "integer",
|
|
69
|
+
"minimum": 1,
|
|
70
|
+
"maximum": 9007199254740991
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|