JimKrider

trip-check

"Run Trip Sitter's Two-Key hallucination and grounding audit on any spec, doc, or quantitative model (Key 1 deterministic fail-fast + channel router + section slicer + Key 2 blind tiered channels: QUANT, PROOF, DOCS, OPS, SYNC)."

JimKrider 0 Updated 17h ago
GitHub

Install

npx skillscat add jimkrider/trip-sitter/agents-skills-trip-check

Install via the SkillsCat registry.

SKILL.md

Two-Key Hallucination & Grounding Audit (/trip-check)

Run this skill whenever auditing a specification, codebase architecture, quantitative model, or operational doc for hallucinations, broken references, logic errors, or cross-surface drift.

Inputs

  • TargetFile (required): Path to the document or specification to audit. If omitted, ask the user in plain chat for the file path and stop.
  • Preset / Mode (optional, default auto via --plan-channels):
    • auto (default): Deterministic Python router triggers only required channels (SKIPPED_ROUTER for untouched lenses)
    • --recheck / --failed-only: Pass 2+ incremental mode — re-runs only channels that failed previously or whose per-section SHA-256 changed in .tripsitter/runs.jsonl (SKIPPED_CLEAN_CACHE for clean unchanged lenses)
    • quick: trip-quant, trip-proof, trip-docs | full: all 5 channels | quorum: full with 2 blind passes on trip-quant + trip-proof | --only <csv>: explicit subset
    • --diff-base <ref> (optional): Scope routing and slices to sections changed against <ref> (e.g., HEAD or origin/main)
  • --standard <path> (optional): Universal standard under ../../../resources/standards/ (architecture-spec.md, quantitative-spec.md, implementation-plan.md) and/or an optional domain pack such as packs/finance-crypto.md.

Execution Protocol

Step 1: Key 1 — Fail-Fast Gate, Channel Router & Section Slicer (0 LLM Tokens)

Run the zero-LLM deterministic gate, router, and Markdown section slicer against TargetFile before spawning any blind agents (append --recheck on Pass 2+ or --diff-base <ref> for diff-scoped audits):

python3 <plugin-root>/scripts/grounding_check.py \
  --audit-doc <TargetFile> --repo-root <target-repo> \
  --abort-on-key1-fail --plan-channels \
  --emit-slices .tripsitter/slices --json

(Inside trip-sitter itself, <plugin-root> is . and --repo-root defaults to cwd. Pass repeatable --ignore-glob "<pattern>" flags or commit a repo-root .tripsitterignore file to exclude untracked runtime state files.)

  1. Hard Fail-Fast (aborted_on_key1_fail: true): If Key 1 exits non-zero (KEY 1: HALLUCINATION RISK / NO-GO), stop immediately (0 Key 2 subagents spawned, 0 LLM tokens) unless --no-abort-on-key1-fail was explicitly requested. Write trip_check_report.md with Key 1 findings and mark all Key 2 channels SKIPPED_KEY1_FAIL (HALLUCINATING -- NO-GO).
  2. Routing & Slices: Otherwise capture doc_sha256, routing_plan.required_channels, routing_plan.decisions, and the scoped .tripsitter/slices/slice__<channel>.md files.

Step 2: Key 2 — Tiered Blind Grounding Panel on Scoped Slices

Delegate synthesis and parallel blind dispatch to trip-sitter with Mode: CHECK, passing:

  1. TargetFile, any Standard / optional pack path, and the Step 1 JSON routing_plan.
  2. Each required channel's scoped slice file (.tripsitter/slices/slice__<channel>.md) instead of feeding the entire repository or unrelated sections to every agent.
  3. Tiered Model Routing (per .agents/agents.json and agents/*.md frontmatter):
    • Fast Tier (flash / haiku): trip-docs and trip-sync
    • Reasoning Tier (pro / sonnet): trip-quant, trip-proof, and trip-ops

If the current harness does not support nested subagent dispatch, spawn only the required blind agents directly in parallel fresh contexts with zero conversation history and compile trip_check_report.md following the trip-sitter verdict contract (recording SKIPPED_ROUTER / SKIPPED_CLEAN_CACHE in the Channel Coverage Table). In CLI/IDE harnesses that cannot spawn isolated subagents, stop and inform the user rather than simulating a blind check; in browser-only surfaces (gemini-sync/ in Gemini Web, Gems, or NotebookLM), execute the single-context 5-lens advisory contract (Key 1 = NOT_RUN, isolated Key 2 = NOT_RUN, capped at DRIFTING -- REVISE).

Step 3: Artifact-First Handoff

  1. Write the full report to trip_check_report.md — never dump the entire multi-section report inline in chat.
  2. Reply concisely in chat with:
    • The Two-Key Verdict (GROUNDED -- TWO-KEY GO, DRIFTING -- REVISE, or HALLUCINATING -- NO-GO)
    • Key 1 status, Key 2 channel coverage (calling out any NOT_RUN or SKIPPED_* channels), and finding counts (BLOCKER / MAJOR / NIT)
    • Link to trip_check_report.md and prompt to run /trip-resolve (followed by /trip-check --recheck) to address blockers.

Step 4: Optional User-Configured Telemetry & Section-Hash Cache

Run telemetry is opt-in with zero hardcoded sheet or webhook IDs. Check <plugin-root>/scripts/telemetry_ledger.py --show-config. Recording a run also caches per-section SHA-256 hashes and per-channel statuses in .tripsitter/runs.jsonl to power --recheck (--no-sync-sheet logs locally when unlinked):

python3 <plugin-root>/scripts/telemetry_ledger.py --append-run \
  --target <TargetFile> \
  --verdict "<GROUNDED -- TWO-KEY GO|DRIFTING -- REVISE|HALLUCINATING -- NO-GO>" \
  --key1-status "<GO|NO-GO|NOT_RUN>" \
  --channels-reported "<N/5 Required (0 NOT_RUN)>" \
  --blockers <N> --majors <N> --nits <N> \
  --environment "<antigravity|gemini-cli|gemini-web|local|cloud|ci>" \
  --report-file trip_check_report.md

For benchmark runs against evals/planted_hallucinations.json, stream calibrated Recall and False Discovery Rate (FDR) via python3 <plugin-root>/scripts/telemetry_ledger.py --append-eval --model-id <model> --environment <env> --report-file trip_check_report.md.