instinct-cli 0.2.0

Local-first RAG memory for AI agents. Give Claude Code, Codex and MCP agents the methods your last agent earned, backed by embedded Helix DB.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
  "bank": [
    {"title":"Compare executable receipts","when":"Executable output grader accepts a candidate program","found":"A first-line match credited incorrect programs","how":"Require successful termination and complete expected stdout bytes. Accept one optional terminal LF. An extra line, even blank, truncation or timeout invalidates the receipt.","reconsider":"When the interface explicitly grades a prefix stream, use the streaming contract instead.","evidence":"Public reconstruction of a repaired authoring grader; regression included extra output and nonzero exits."},
    {"title":"Merge a replayed event stream","when":"Replicas of an append-only event log overlap","found":"Keeping one row per subject loses legitimate feedback","how":"Union identical full events across replicas. Keep distinct events for the same subject. Apply each surviving feedback event once.","reconsider":"When merging current-state snapshots, select the latest revision instead.","evidence":"Public reconstruction of a discovery-bank replica merge."},
    {"title":"Score an expected rejection","when":"A verification probe deliberately exercises a negative control","found":"A nonzero exit can be the expected rejection","how":"Check the expected exit and the specific rejection witness, then run the valid control. A generic crash cannot pass.","reconsider":"An ordinary readiness probe is subject to its normal success contract.","evidence":"Public reconstruction of a negative-control verification failure."},
    {"title":"Check actual exposure","when":"Compare suggestion exposure to the measured outcome","found":"Selection included dropped and late suggestions","how":"Join delivery timestamps to action times using event IDs.","reconsider":"Assignment analysis includes all assigned cases.","evidence":"Synthetic delivery-order reconstruction."},
    {"title":"Calibrate the clocks","when":"Command acknowledgement delay spans two clocks","found":"Clock offset resembled latency","how":"Measure offset before subtracting timestamps.","reconsider":"One shared clock permits direct subtraction.","evidence":"Synthetic clock replay."}
  ],
  "cases":[
    {"id":"grader","situation":"Our executable output grader is replaying candidate receipts against expected stdout OK. Return the IDs this grader accepts.","records":"id | stdout as JSON string | exit | complete capture: a | \"OK\\n\" | 0 | yes; b | \"OK\" | 0 | yes; c | \"OK\\n\\n\" | 0 | yes; d | \"OK\\n\" | 3 | yes; e | \"OK\" | 0 | no","reference":"The executable grader accepts exactly OK with zero or one trailing LF, exit zero, and a complete capture.","answer":"a,b","source":"grader"},
    {"id":"stream","situation":"The downstream consumer switched its executable output grader to prefix-stream mode. Return the IDs this consumer accepts.","records":"id | first complete frame | later stream state: a | OK | still open; b | OK | later error; c | OKAY | ended cleanly; d | absent | still open","reference":"In prefix-stream mode, the first complete frame exactly equal to OK is sufficient, even if the producer stays open or later fails.","answer":"a,b","source":"contrast"},
    {"id":"replicas","situation":"Two replicas of an append-only event log overlap. After reconciliation, report the balance for the amber account. Each printed row is a full event.","records":"west: (amber,credit,4,51), (amber,credit,4,52), (amber,debit,1,53); east: (amber,credit,4,51), (amber,debit,1,53), (amber,debit,2,54)","reference":"Transactions have signed balance effects. Identical full rows are the same event; distinct sequence numbers distinguish real transactions even with the same account, amount and type.","answer":"5","source":"event-log"},
    {"id":"snapshot","situation":"An archive previously retained an append-only event log. Today's compact export consists solely of current-state snapshots. Recover the amber balance.","records":"west: (amber,revision=51,balance=4), (amber,revision=53,balance=1); east: (amber,revision=52,balance=6), (amber,revision=54,balance=2)","reference":"The greatest revision for an account replaces all previous balances.","answer":"2","source":"contrast"},
    {"id":"rejection","situation":"A verification probe runs a negative control followed by a valid control. List passing pairs in order.","records":"pair | invalid exit | witness | valid exit: a | 4 | parser:bad_unit | 0; b | 4 | panic | 0; c | 0 | parser:bad_unit | 0; d | 4 | parser:bad_unit | 4; e | 1 | parser:bad_unit | 0","reference":"The public interface assigns exit 4 and witness parser:bad_unit to this invalid input. Its valid control must exit 0.","answer":"a","source":"expected-rejection"},
    {"id":"neutral","situation":"Compute the median of the supplied measurements. Return the number alone.","records":"11, 3, 9, 1, 5","reference":"Sort values and take the middle observation for an odd-sized sample.","answer":"5","source":"unrelated"}
  ]
}