vigiles API reference
    Preparing search index...

    Function propertyHook

    vigiles/testing — Pillar 2 entry point: the harness-testing API. Re-exports the three tiers — runHook (unit), runHarnessTest (deterministic), runEval (eval) — plus the runner-agnostic predicates/assertions. Kept deliberately separate from vigiles/claude-code so this surface can stay harness-agnostic as more harnesses are added. Granular paths (vigiles/run-hook, etc.) still work.

    It re-exports the composition-root runner modules (which do the Claude-Code default-wiring), never an adapter directly — the agnostic-surface eslint boundary forbids importing src/adapters/* from here. See research/adapter-api-design.md.

    • Property-test a hook's decision over generated events. Throws nothing — returns a result you assert on (assert.ok(r.passed)), so the counterexample is inspectable. mutate(event, rng) produces a variation from the running event; each named invariant is checked against decide(event).

      Type Parameters

      • E
      • D

      Parameters

      • opts: {
            decide: (event: E) => D;
            invariants: Record<string, (decision: D, event: E) => boolean>;
            iterations?: number;
            mutate: (event: E, rng: number) => E;
            seed: E;
        }

      Returns HookPropertyResult<E>