#pi-cybernetic
101 files tagged pi-cybernetic.
2026 06 12 030341 Cusersmikesdownloadsmulti Loop Interactive
▐▛███▜▌ Claude Code v2.1.174 ▝▜█████▛▘ Fable 5 · Claude Pro ▘▘ ▝▝ ~/leverage-loops-projects/pi-cybernetic ▎ Fa…
File Index
# FILE_INDEX — @leverageai/pi-cybernetic | File …
Tsconfig
{ "compilerOptions": { "target": "ES2023", "module": "ESNext", "moduleResolution": "bundler", "lib": […
Readme
# @leverageai/pi-cybernetic Concentric cybernetic control harness wrapping a single `@earendil-works/pi-agent-core` `Ag…
Package
{ "name": "@leverageai/pi-cybernetic", "version": "0.1.0", "description": "Concentric cybernetic control harness (…
Agents
# pi-cybernetic — agent notes > Stub created by atlas-onboard.sh — extend with project-specific facts. - **Codebase qu…
Claude
# pi-cybernetic Read `AGENTS.md` in this directory — it is the source of truth for working here. Codebase index: `CODEA…
Codeatlas
# CODEATLAS.md — queryable codebase index for this repo This repo is indexed by **code-atlas** (deterministic tree-sitt…
Llm Memory System Spec And User Guide
# LLM Memory System Guide Pointer Canonical guide: `C:\Users\mikes\.codex\codex_memory\projects\pi-cybernetic-memory-s…
Gear Shifter.Test
import { describe, expect, test } from "bun:test"; import type { AgentMessage } from "@earendil-works/pi-agent-core"; im…
Meta.Test
import { describe, expect, test } from "bun:test"; import { ManagementEngine } from "../src/engines/management.ts"; impo…
Fixtures
/** Shared deterministic test fixtures — mock the LLM, never the hooks. */ import { createAssistantMessageEventStream }…
Monitors.Test
import { describe, expect, test } from "bun:test"; import { LoopDetector } from "../src/monitors/loop-detector.ts"; impo…
Harness.Test
/** * End-to-end: real Agent, real hooks, mock LLM (scripted streamFn). * Verifies the concentric wrapper against pi-a…
Memory.Test
import { describe, expect, test } from "bun:test"; import type { AgentMessage } from "@earendil-works/pi-agent-core"; im…
Management.Test
import { describe, expect, test } from "bun:test"; import { ManagementEngine } from "../src/engines/management.ts"; impo…
Enforcement.Test
/** * Unit tests for the enforcement bridge: classifySkill, buildArtifact, emitArtifact. * Tests deterministic mapping…
Consolidation.Test
import { describe, expect, test } from "bun:test"; import { ConsolidationEngine } from "../src/engines/consolidation.ts"…
Strategic.Test
import { describe, expect, test } from "bun:test"; import type { AgentMessage } from "@earendil-works/pi-agent-core"; im…
Meta
{ "lastAnalyzedAt": "2026-06-12T09:00:00.000Z", "gitCommitHash": "da8405fb336c35c3119c207df7df307a1aa6cb30", "vers…
Knowledge Graph
{ "version": "1.0.0", "project": { "name": "pi-cybernetic", "languages": ["typescript"], "frameworks": […
Assembled Graph
{ "nodes": [ { "id": "document:FILE_INDEX.md", "type": "document", "name": "FILE_INDEX", "…
Scan Result
{ "name": "@leverageai/pi-cybernetic", "description": "Concentric cybernetic control harness (5 loops, 6 principles)…
Batches
{ "schemaVersion": 1, "algorithm": "louvain", "totalFiles": 40, "totalBatches": 3, "exportsByPath": { "exa…
Layers
[ { "id": "layer:core", "name": "Core", "description": "Core logic", "nodeIds": ["file:src/engines/man…
Batch 3
{ "nodes": [ { "id": "file:src/util.ts", "type": "file", "name": "util.ts", "filePath": "src/util.ts", "summary": …
Tour
[ { "order": 1, "title": "Welcome", "description": "Start tour", "nodeIds": ["document:README.md"] }…
Batch 2
{ "nodes": [ { "id": "file:examples/live-run.ts", "type": "file", "name": "live-run.ts", "filePath": "examples/liv…
Assemble Review
[]
Batch 1
{ "nodes": [ { "id": "document:FILE_INDEX.md", "type": "document", "name": "FILE_INDEX", "filePath": "FILE_INDEX.m…
Ua File Extract Results 1
{ "scriptCompleted": true, "filesAnalyzed": 4, "filesSkipped": [], "results": [ { "path": "FILE_INDEX.…
Ua Import Map Output
{ "scriptCompleted": true, "stats": { "filesScanned": 36, "filesWithImports": 21, "totalEdges": 76 }, …
Dispatch Scanner
import { Agent } from "@earendil-works/pi-agent-core"; import { getModel } from "@earendil-works/pi-ai"; import { Type }…
Dispatch Scanner V2
import { Agent } from "@earendil-works/pi-agent-core"; import { getModel } from "@earendil-works/pi-ai"; import { Type }…
Ua Import Map Input
{ "projectRoot": "/home/mikes/leverage-loops-projects/pi-cybernetic", "files": [ { "path": "examples/live-…
Dispatch Scanner V3
import { Agent } from "@earendil-works/pi-agent-core"; import { getModel } from "@earendil-works/pi-ai"; import { Type }…
Ua File Analyzer Input 2
{ "projectRoot": "/home/mikes/leverage-loops-projects/pi-cybernetic", "batchFiles": [ {"path": "examples/live-ru…
Import Output
{ "scriptCompleted": true, "stats": { "filesScanned": 40, "filesWithImports": 21, "totalEdges": 76 }, …
Ua File Analyzer Input 3
{ "projectRoot": "/home/mikes/leverage-loops-projects/pi-cybernetic", "batchFiles": [ {"path": "src/util.ts", "l…
Ua File Extract Results 2
{ "scriptCompleted": true, "filesAnalyzed": 6, "filesSkipped": [], "results": [ { "path": "examples/li…
Analyze Batches
import { Agent } from "@earendil-works/pi-agent-core"; import { getModel } from "@earendil-works/pi-ai"; import { Type }…
Ua File Extract Results 3
{ "scriptCompleted": true, "filesAnalyzed": 2, "filesSkipped": [], "results": [ { "path": "src/util.ts…
Ua File Analyzer Input 1
{ "projectRoot": "/home/mikes/leverage-loops-projects/pi-cybernetic", "batchFiles": [ {"path": "FILE_INDEX.md", …
Clean Scan
{ "name": "@leverageai/pi-cybernetic", "description": "Concentric cybernetic control harness (5 loops, 6 principles)…
Import Input
{ "projectRoot": "/home/mikes/leverage-loops-projects/pi-cybernetic", "files": [ { "path": "examples/live-…
Ua Scan Files
{ "scriptCompleted": true, "files": [ { "path": ".understand-anything/.understandignore", "language"…
Live Run
/** * Live-wire smoke run: real opencode-go model through the full 5-loop harness. * * set -a && source /home/mikes…
Skill Mrauwn4U 3 1783441306399
{ "lessonId": "skill-mrauwn4u-3", "occurrences": 1, "createdAt": "2026-07-07T16:21:46.398Z", "summary": "Lesson …
Skill Mrausy1Y 3 1783441133926
{ "lessonId": "skill-mrausy1y-3", "occurrences": 1, "createdAt": "2026-07-07T16:18:53.926Z", "summary": "Lesson …
Skill Mrauvlfl 3 1783441257537
{ "lessonId": "skill-mrauvlfl-3", "occurrences": 1, "createdAt": "2026-07-07T16:20:57.537Z", "summary": "Lesson …
Skill Mraushge 3 1783441112415
{ "lessonId": "skill-mraushge-3", "occurrences": 1, "createdAt": "2026-07-07T16:18:32.415Z", "summary": "Lesson …
Phase 0 Gate Governance.Ged Amendment
--- ged_version: 1 amends: pi-cybernetic-analysis-framework_ged.md amendment: phase-0-gate-governance status: SPEC_COMPL…
Readme
# Phase 0 — Gate Governance & Repo Hardening Execution package for the approved GED amendment (`phase-0-gate-governance…
Governance
# Gate Governance (Phase 0) **Rule N15**: a gate pack file under `gates/v*/` is IMMUTABLE once it appears in `gates/MAN…
Agents
# phase0-gate-governance — agent notes > Stub created by atlas-onboard.sh — extend with project-specific facts. - **Co…
Changes
# CHANGES.md — Deviations from the Approved Phase 0 Amendment Per standing instruction: architecture improvements appli…
Claude
# phase0-gate-governance Read `AGENTS.md` in this directory — it is the source of truth for working here. Codebase inde…
Bootstrap
#!/usr/bin/env bash # bootstrap.sh — install Phase 0 gate governance into a target repo. # # Usage: ./bootstrap.sh /hom…
Codeatlas
# CODEATLAS.md — queryable codebase index for this repo This repo is indexed by **code-atlas** (deterministic tree-sitt…
Pretooluse Gate Guard
#!/usr/bin/env python3 """pretooluse_gate_guard.py — Claude Code PreToolUse hook enforcing N15. Blocks Edit/Write/Multi…
Register Pretooluse
#!/usr/bin/env python3 """register_pretooluse.py — safely register the gate guard in .claude/settings.json. Discipline …
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…
Pre Commit
#!/usr/bin/env bash # Versioned pre-commit shim (installed via `git config core.hooksPath .githooks`). # All logic lives…
Integration
# gate-integrity.ts — Harness Integration (Layer 1, A13) This module is the **unroutable layer**. Wire it into the disp…
Gate Integrity
/** * gate-integrity.ts — Layer 1 runtime enforcement (A13 / N15 / N16). * * Verifies a spec's pinned gate reference …
Spec Lint Gates
#!/usr/bin/env python3 """spec_lint_gates.py — lint dispatch specs for gate governance (N16 + fidelity). Checks, per sp…
Test Gate Governance
#!/usr/bin/env python3 """test_gate_governance.py — N10 discipline applied to the governance system. Every enforcement …
Gate Manifest
#!/usr/bin/env python3 """gate_manifest.py — single hashing authority for the gate governance system. Every component (…
Cut Gate Version
#!/usr/bin/env python3 """cut_gate_version.py — the ONLY sanctioned way a gate pack changes (N15/N17). Creates gates/v<…
Index
export * from "./types/index.ts"; export * from "./monitors/index.ts"; export * from "./storage/index.ts"; export * from…
Util
/** Deterministic shared helpers — no LLM reasoning, no randomness beyond ids. */ let idCounter = 0; export function n…
Index
/** * Enforcement artifact types — the bridge from pi-cybernetic Loop-5 lessons to * loom-builder gate enforcement art…
Exporter
/** * exporter.ts — emits enforcement artifacts to a file-based queue. * * Callable from MetaEngine.consolidateLesson…
Config
/** Harness configuration — one section per loop. */ import type { ToolExecutionMode } from "@earendil-works/pi-agent-c…
Messages
/** * ADR-003 — inter-loop communication as custom AgentMessage types via * declaration merging. Carried in the transc…
Goal State
/** Loop 1 — goal homeostasis types (P3). */ export type GoalItemStatus = "pending" | "active" | "complete" | "failed";…
Index
export * from "./goal-state.ts"; export * from "./metrics.ts"; export * from "./tool-registry.ts"; export * from "./memo…
Tool Registry
/** Loop 2 — variety + reversibility registries (P2, P4). */ export type Reversibility = "read" | "recoverable" | "dest…
Metrics
/** Cross-loop metric, escalation, and meta-learning types. */ export type LoopId = "strategic" | "management" | "execu…
Memory
/** Loop 4 — three-level memory hierarchy types (P6). */ export interface InteractionTrace { id: string; kind: "too…
Index
export * from "./cybernetic-harness.ts"; export * from "./desideratum-gate.ts"; export * from "./ladders.ts";
Ladders
/** * Model escalation ladders — P2 variety expansion. * A ladder is an ordered list of rungs with strictly increasing…
Desideratum Gate
/** * ADR-004 — D1→D2→D3 enforced at runtime. Failed prerequisites put dependent * modules into degraded passthrough m…
Cybernetic Harness
/** * ADR-001 — Concentric Wrapper. One pi-agent Agent instance, four regulatory * layers attached through its hook su…
Semantic Store
/** Semantic memory — compressed summaries + entity-relation tuples, with promotion. */ import type { CompressedSummary…
Procedural Store
/** Procedural memory — verified skills + working memory (active hypotheses). */ import type { ActiveHypothesis, Eviden…
Index
export * from "./episodic-store.ts"; export * from "./semantic-store.ts"; export * from "./procedural-store.ts"; export …
Episodic Store
/** Episodic memory — raw traces with deterministic term-overlap retrieval. */ import type { InteractionTrace } from ".…
Performance Log
/** Loop 5 raw data — structured event log for pattern analysis. */ export interface ToolExecutionRecord { toolName: …
Meta
/** * Loop 5 — MetaEngine. Second-order regulator (P5): watches the regulators, * extracts failure patterns, revises c…
Consolidation
/** * Offline consolidation: Hippocampus -> Neocortex. * * This engine is intentionally not called from transformCont…
Index
export * from "./management.ts"; export * from "./strategic.ts"; export * from "./memory.ts"; export * from "./gear-shif…
Strategic
/** * Loop 1 — StrategicEngine. Homeostatic regulator over Ω_goal (P3, P5). * * pi-agent-core 0.79 exposes `shouldSto…
Gear Shifter
/** * Loop 4 — GearShifter. Deterministic memory router (ADR-005..009). * Preserves the MemoryEngine hook surface whil…
Management
/** * Loop 2 — ManagementEngine. Variety allocator + feedback enforcer (P1, P2, P4). * Attaches via beforeToolCall (di…
Memory
/** * Loop 4 — MemoryEngine. Channel-capacity manager (P6). * Attaches via transformContext (entropy gate) and convert…
Loop Detector
/** P5 — action-sequence loop detection over a sliding window. */ import type { Escalation } from "../types/index.ts"; …
Index
export * from "./loop-detector.ts"; export * from "./confidence-calibrator.ts"; export * from "./drift-detector.ts"; exp…
Confidence Calibrator
/** P5 — Brier-score confidence calibration over (stated confidence, outcome) pairs. */ import type { Escalation } from…
Entropy Monitor
/** P6 — channel capacity tracking: context utilization, query/source entropy. */ import { estimateTokens, extractText,…
Drift Detector
/** P3 — semantic drift between execution trajectory and original spec. */ import type { Escalation } from "../types/in…