instinct-cli 0.3.8

Shared local memory for coding agents. Save a fix once and find it again in a new session or another connected tool.
# Local declarative check packages

Development slice of M8. No automatic uploads, network sync, executable adapters, or bank activation.

## Explicit payload

A payload has exactly four fields:

```json
{
  "schema": "instinct.check-pack/v1",
  "namespace": "example",
  "license": "Apache-2.0",
  "checks": [{
    "schema": "instinct.check/v1",
    "id": "equal",
    "revision": 1,
    "inputs": {"a": "string", "b": "string"},
    "claim": {"op": "eq", "left": {"fact": "a"}, "right": {"fact": "b"}},
    "scope": {"project": "example-lab"}
  }]
}
```

Only explicitly supplied definitions are selected. This command never reads a lesson bank or discovers related evidence. `facts`, receipts, transcripts, environment, paths, executable code and claimed authority are not package fields. Unknown fields and duplicate JSON keys are rejected. A package contains 1–16 distinct check IDs in one namespace, validated by the same strict kernel as `check validate`.

Definitions can themselves contain private names in scopes or conditions. This format is **not a secret detector**. Preview shows the entire payload; the owner reviews it before approving its digest. Scope is never stripped to make a package appear shareable. There is no claim of authenticated authorship: the namespace and license are caller-supplied declarations, and SHA-256 establishes content identity only.

## Commands

```sh
instinct check pack preview --input selected-definitions.json
instinct check pack export --input selected-definitions.json --confirm PREVIEW_DIGEST --output new-pack.json
instinct check pack import --input new-pack.json --output new-quarantine.json
```

Preview writes nothing. Export requires the exact digest from the reviewed preview. Changed definitions, conditions or scopes invalidate that confirmation. The exported envelope carries the full payload and its digest.

Import validates all definitions and the digest and writes a new `instinct.check-quarantine/v1` envelope with `state: quarantined`, `authority: none`, and caller-supplied provenance. It does not evaluate facts, register a tool, attach a policy, grant access, or promote a lesson. Imported files are inert until a separate deliberate local workflow selects a definition and supplies current evidence.

Output creation is exclusive: existing files, including final-component symlinks, are refused. On Unix, new files use owner-only mode `0600`. Parent directories are the explicit caller's trusted destination; this is not a filesystem sandbox or race-free path adapter. Non-Unix export/import writes currently refuse because an owner-only ACL implementation has not been verified there; preview is available. Interrupted writes may leave an incomplete new file, but cannot overwrite an existing one; malformed or truncated imports fail validation. No cleanup silently deletes such evidence.

## Limits and remaining M8 work

Input, export and quarantine envelopes each stay within 1 MiB. Payload parsing allows one extra JSON level for the checks array, and exported-envelope parsing allows two extra levels. Each definition is separately revalidated by the unchanged kernel parser and AST limits; the wrapper allowance does not admit deeper checks. The kernel's 64-level JSON limit can bind before its 32-level predicate limit for `all`/`any` because those add both objects and arrays. A near-limit exported file may be too large for the additional quarantine envelope and will be refused rather than truncated.

These are format-specific parser bounds, not a change to the default JSON parser: payload depth ≤65, preview/export envelope ≤66, quarantine envelope ≤67. Deep valid package files deliberately fail the ordinary check parser's depth-64 limit. Consumers must select the documented package bound and validate the envelope/schema, then revalidate extracted check definitions at the original kernel limits. Pure `check run`, receipt replay and the MCP check tool do not accept package/quarantine envelopes. The current only product reader is `pack import` for exported envelopes; there is no quarantine loader, automatic activation, or vault integration. Do not feed quarantine JSON to a generic check or receipt reader and assume interchangeability.

This increment deliberately excludes fixture/counterexample distribution, authenticated issuer provenance, owner-reviewed activation and namespace conflict resolution in a capability registry. Those remain M8 requirements; a working import/export command does not complete the milestone. No remote exposure is authorized by this document.