instinct-cli 0.3.6

Local memory for AI coding agents: an MCP server and CLI that gives Claude Code, Codex, Cursor and any MCP client the one lesson that fits. Lessons that keep failing go quiet.
# Capability implementation decisions

This supplements the approved roadmap without changing the frozen first-kernel contract in `checks.md`.

## Verified baseline, not scout inference

Implementation base is `b6b5577c00b61a0063299c64e57c5f0f8e07cbfc`. It contains `src/eval.rs`, `src/outcomes.rs`, and `playground/Cargo.toml`. Research PR56 exists and is open at `c55f617353096b0d95a4db07d2e68493186f1226`; absence of a merge commit does not mean the PR does not exist. Earlier exploration of the diverged `2a12c2e` checkout is not an authoritative current map.

## One owner for predicate evaluation

`check` owns the pure predicate verdict and its truth tables. The existing `eval` command evaluates lesson usefulness, not check expressions. Existing command tripwires classify patterns; they are not proofs. Research checkers retain their domain-specific semantics behind explicit adapters; a research `prune` verdict cannot be manufactured from a generic PASS. Capability composition invokes check evaluators, never a competing interpreter.

M1 is independent of the open research PR. M4 integrates its agreed core with its owner; no copied analogy engine.

## Semantic determinism versus observation metadata

Pure results contain no current clock value. Later receipts separate a semantic core (definition/input/grant/scope fingerprints, verdict, witness, missing conditions) from observation metadata (when, adapter, execution duration). Semantic hot/cold comparisons exclude measurement timestamps and elapsed duration. Freshness predicates receive their clock as an explicit fact. A receipt's observed time never certifies that a mutable world stayed unchanged.

## Adapter fingerprint contracts before M2 implementation

Each adapter declares exactly what its fingerprint covers. Artifact inventory fingerprints must include the complete sorted relative entry set, entry kinds, authorized policy digest, and relevant content digests when the predicate depends on contents. A directory inventory is not a content scan. Permissions, symlinks, case behavior and root identity are explicit dependencies where relevant.

A mutable filesystem cannot offer a general atomic tree snapshot through portable std-only traversal. On missing permissions, changing entry metadata, unsupported reparse points, or detected mutation, abstain. A successful walk remains an observed snapshot, not an assurance against changes after the walk. For strong consistency, accept an explicitly immutable staged snapshot and state that assumption; do not silently claim TOCTOU protection.

## Compatibility

Do not extend legacy lesson state enums or rely on unknown-field tolerance. The new protocol has its own version and strict fields. The sidecar is independent of legacy journal contents; mixed-version tests establish behavior before any attach/receipt integration ships. Existing readers/writers remain unchanged. The kernel contract is immutable until an explicit revision is recorded.

## Authorization and privacy

Scope matching establishes applicability, not permission. Future hook renderers must include a concise human-readable `authorization not evaluated` statement when displaying a check result; test the rendered output, not merely the JSON field.

Private hashes are private data: a digest of a small known file can reveal its contents by enumeration. Export excludes private receipts, private input fingerprints and private grant identifiers, not just literal paths. Leakage tests include hashes of seeded private sentinel values. Removing a persona or machine field must never turn a scoped package into a global package: export requires explicit replacement scope or rejects the package.

## Economic decisions

Direct predicates remain a mandatory strong baseline. If a compiled check costs more on a simple one-shot task, record that and use the direct predicate; do not claim a speed win. The broader system may still earn value through reusable definitions, independent validation, scope preservation, composition or reduced repeated authoring, but those costs and benefits must be measured rather than assumed.

No blanket demand to beat a perfect baseline's accuracy: matched quality plus lower total work is a legitimate improvement. No toy benchmark is permitted to terminate or justify the whole approved roadmap. A component that repeatedly fails its preregistered utility gate is revised or withheld from default deployment. Final sample sizes/effect sizes belong to each preregistered paid/longitudinal trial, not a post-hoc interpretation of the small historical pilot.

## Source of truth

New pure kernel and policy modules are authored as `.hlx` and exported to `.rs`; the generated Rust is shipped for public Cargo users. Existing handwritten integration code receives minimal edits. The compiler binary and host harness are not modified. No file is maintained independently in two languages.