#source

196 files tagged source.

pi-cyberneticsource

Dispatch Scanner

import { Agent } from "@earendil-works/pi-agent-core"; import { getModel } from "@earendil-works/pi-ai"; import { Type }…

TS114 lines3,693 bytes
pi-cyberneticsource

Dispatch Scanner V2

import { Agent } from "@earendil-works/pi-agent-core"; import { getModel } from "@earendil-works/pi-ai"; import { Type }…

TS99 lines3,846 bytes
pi-cyberneticsource

Dispatch Scanner V3

import { Agent } from "@earendil-works/pi-agent-core"; import { getModel } from "@earendil-works/pi-ai"; import { Type }…

TS99 lines3,833 bytes
pi-cyberneticsource

Analyze Batches

import { Agent } from "@earendil-works/pi-agent-core"; import { getModel } from "@earendil-works/pi-ai"; import { Type }…

TS139 lines5,068 bytes
pi-cyberneticsource

Live Run

/** * Live-wire smoke run: real opencode-go model through the full 5-loop harness. * * set -a && source /home/mikes…

TS92 lines3,596 bytes
pi-cyberneticsource

Pretooluse Gate Guard

#!/usr/bin/env python3 """pretooluse_gate_guard.py — Claude Code PreToolUse hook enforcing N15. Blocks Edit/Write/Multi…

PY105 lines3,779 bytes
pi-cyberneticsource

Register Pretooluse

#!/usr/bin/env python3 """register_pretooluse.py — safely register the gate guard in .claude/settings.json. Discipline …

PY80 lines3,193 bytes
pi-cyberneticsource

Pre Commit Gate Guard

#!/usr/bin/env python3 """pre_commit_gate_guard.py — git pre-commit enforcement of N15 (layer 3). Rules: 1. Any stage…

PY126 lines4,956 bytes
pi-cyberneticsource

Gate Integrity

/** * gate-integrity.ts — Layer 1 runtime enforcement (A13 / N15 / N16). * * Verifies a spec's pinned gate reference …

TS137 lines5,182 bytes
pi-cyberneticsource

Spec Lint Gates

#!/usr/bin/env python3 """spec_lint_gates.py — lint dispatch specs for gate governance (N16 + fidelity). Checks, per sp…

PY149 lines6,453 bytes
pi-cyberneticsource

Gate Manifest

#!/usr/bin/env python3 """gate_manifest.py — single hashing authority for the gate governance system. Every component (…

PY264 lines10,973 bytes
pi-cyberneticsource

Cut Gate Version

#!/usr/bin/env python3 """cut_gate_version.py — the ONLY sanctioned way a gate pack changes (N15/N17). Creates gates/v<…

PY154 lines6,863 bytes
pi-cyberneticsource

Index

export * from "./types/index.ts"; export * from "./monitors/index.ts"; export * from "./storage/index.ts"; export * from…

TS8 lines246 bytes
pi-cyberneticsource

Util

/** Deterministic shared helpers — no LLM reasoning, no randomness beyond ids. */ let idCounter = 0; export function n…

TS99 lines3,339 bytes
pi-cyberneticsource

Index

/** * Enforcement artifact types — the bridge from pi-cybernetic Loop-5 lessons to * loom-builder gate enforcement art…

TS167 lines5,861 bytes
pi-cyberneticsource

Exporter

/** * exporter.ts — emits enforcement artifacts to a file-based queue. * * Callable from MetaEngine.consolidateLesson…

TS108 lines3,453 bytes
pi-cyberneticsource

Config

/** Harness configuration — one section per loop. */ import type { ToolExecutionMode } from "@earendil-works/pi-agent-c…

TS129 lines4,146 bytes
pi-cyberneticsource

Messages

/** * ADR-003 — inter-loop communication as custom AgentMessage types via * declaration merging. Carried in the transc…

TS96 lines2,425 bytes
pi-cyberneticsource

Goal State

/** Loop 1 — goal homeostasis types (P3). */ export type GoalItemStatus = "pending" | "active" | "complete" | "failed";…

TS60 lines1,669 bytes
pi-cyberneticsource

Index

export * from "./goal-state.ts"; export * from "./metrics.ts"; export * from "./tool-registry.ts"; export * from "./memo…

TS7 lines188 bytes
pi-cyberneticsource

Tool Registry

/** Loop 2 — variety + reversibility registries (P2, P4). */ export type Reversibility = "read" | "recoverable" | "dest…

TS50 lines1,294 bytes
pi-cyberneticsource

Metrics

/** Cross-loop metric, escalation, and meta-learning types. */ export type LoopId = "strategic" | "management" | "execu…

TS73 lines1,903 bytes
pi-cyberneticsource

Memory

/** Loop 4 — three-level memory hierarchy types (P6). */ export interface InteractionTrace { id: string; kind: "too…

TS80 lines1,558 bytes
pi-cyberneticsource

Index

export * from "./cybernetic-harness.ts"; export * from "./desideratum-gate.ts"; export * from "./ladders.ts";

TS4 lines110 bytes
pi-cyberneticsource

Ladders

/** * Model escalation ladders — P2 variety expansion. * A ladder is an ordered list of rungs with strictly increasing…

TS61 lines1,995 bytes
pi-cyberneticsource

Desideratum Gate

/** * ADR-004 — D1→D2→D3 enforced at runtime. Failed prerequisites put dependent * modules into degraded passthrough m…

TS59 lines1,580 bytes
pi-cyberneticsource

Cybernetic Harness

/** * ADR-001 — Concentric Wrapper. One pi-agent Agent instance, four regulatory * layers attached through its hook su…

TS231 lines9,352 bytes
pi-cyberneticsource

Semantic Store

/** Semantic memory — compressed summaries + entity-relation tuples, with promotion. */ import type { CompressedSummary…

TS51 lines1,626 bytes
pi-cyberneticsource

Procedural Store

/** Procedural memory — verified skills + working memory (active hypotheses). */ import type { ActiveHypothesis, Eviden…

TS78 lines2,391 bytes
pi-cyberneticsource

Index

export * from "./episodic-store.ts"; export * from "./semantic-store.ts"; export * from "./procedural-store.ts"; export …

TS5 lines151 bytes