How chunkhound/pi-schematic works
pi-schematic is a Pi extension for repeatable, policy-aware agent workflows. Operators define procedures in saved prompts or skills, configure semantic model roles, and invoke tools to delegate focused work, preserve decisions in a notebook, or hand off to a fresh phase. The graph also shows model capability routing, readonly enforcement, and shared session state. Some relationships are documented in the README; source-level edges use the supplied excerpts or SOURCE INDEX. Unsampled subsystems are represented only where the README documents their role.
Main entry points: index.ts Extension Entry · spawn/index.ts Spawn Tool · tools.ts Notebook Tools · tool.ts Handoff Tool
Components 23
Workflow Runtime
- Extension Entry
index.ts - Saved Workflows
frontmatter-cache.ts - Session State
state.ts - Spawn Tool
spawn/index.ts - Spawn Results
spawn/renderer.ts
Model Groups
- Group Storage
model-groups/store.ts - Group Editor
model-groups/tui.ts - Model Routing
model-groups/router.ts - Model Availability
model-groups/availability.ts - Capability Constraints
model-groups/constraints/modalities.ts - Constraint Evaluation
model-groups/constraints/engine.ts
Notebook Memory
- Notebook Tools
notebook/tools.ts - Notebook Storage
notebook/store.ts - Notebook Topic
notebook/topic.ts
Context Handoff
- Handoff Tool
handoff/tool.ts - Handoff Boundary
handoff/boundary.ts - Handoff Eligibility
handoff/eligibility.ts
Safety and UI
- Readonly Bash Guard
readonly-bash.ts - OS Sandbox
os-sandbox.ts - Notifications
notifications.ts - Status and Commands
tui.ts
Other components
- Operator
- Pi Agent
Connections 27
- Operator → Extension Entry: configures workflows
README.md - Pi Agent → Extension Entry: loads extension
README.md - Extension Entry → Spawn Tool: registers tool
index.ts - Extension Entry → Notebook Tools: registers tools
index.ts - Extension Entry → Handoff Tool: registers tool
index.ts - Saved Workflows → Spawn Tool: steers delegation
README.md - Spawn Tool → Model Routing: resolves model route
spawn/index.ts - Model Routing → Model Availability: filters models
model-groups/router.ts - Model Routing → Constraint Evaluation: evaluates requirements
model-groups/router.ts - Constraint Evaluation → Capability Constraints: uses descriptors
model-groups/constraints/engine.ts - Group Editor → Group Storage: edits groups
model-groups/tui.ts - Group Storage → Constraint Evaluation: validates overrides
model-groups/store.ts - Spawn Tool → Spawn Results: renders results
spawn/index.ts - Spawn Tool → Readonly Bash Guard: guards child shell
spawn/index.ts - Readonly Bash Guard → OS Sandbox: applies sandbox
readonly-bash.ts - Notebook Tools → Notebook Storage: persists pages
notebook/tools.ts - Notebook Tools → Notebook Topic: manages topic
notebook/tools.ts - Handoff Tool → Handoff Eligibility: checks eligibility
handoff/tool.ts - Handoff Tool → Handoff Boundary: stages handoff
README.md - Handoff Boundary → Notebook Storage: rewrites notebook
handoff/boundary.ts - Handoff Boundary → Notebook Topic: clears topic
handoff/boundary.ts - Extension Entry → Session State: shares session state
index.ts - Status and Commands → Notifications: shows status copy
tui.ts - Operator → Group Editor: configures model roles
README.md - Operator → Notebook Tools: records decisions
README.md - Operator → Handoff Tool: starts next phase
README.md - Operator → Status and Commands: uses commands
README.md