PAI Documentation Index
Last Updated: 2026-06-30
PAI Version: 5.1.0
Purpose: Master navigation for all PAI documentation
π Quick Start
New to PAI? Start here:
- QUICKSTART.md β Get PAI running in 10 minutes
- EXECUTIVE_SUMMARY.md β What PAI does and why
- ARCHITECTURE_SUMMARY.md β System overview
Installation:
- DEPLOYMENT_GUIDE.md β Step-by-step deployment
- CONFIGURATION.md β Configuration reference
π Documentation by Category
System Architecture & Design
| Document | Description |
|---|---|
| ARCHITECTURE.md | Complete system architecture |
| ARCHITECTURE_SUMMARY.md | High-level overview |
| PAISystemPhilosophy.md | Design philosophy & principles |
| GLOSSARY.md | Glossary & index of all PAI acronyms, terms, and concepts |
| ENGINE_DAEMON_ARCHITECTURE.md | Multi-engine daemon design |
| SkillDispatcher-Architecture.md | Skill system design |
Operations & Deployment
| Document | Description |
|---|---|
| DEPLOYMENT_GUIDE.md | Production deployment guide |
| CONFIGURATION.md | Configuration reference |
| HERDR_ENGINE_AUTO_LAUNCH.md | Auto-launch configuration |
| DAEMON_MANAGEMENT_QUICKREF.md | Service management commands |
| TROUBLESHOOTING_METHOD.md | Standard troubleshooting process |
ITIL Framework & Service Management
| Document | Description |
|---|---|
| ITIL_FRAMEWORK.md | Complete ITIL implementation |
| ITIL_QUICK_REFERENCE.md | Quick command reference |
| ITIL_IMPLEMENTATION_GUIDE.md | Implementation guide |
| ITIL_ACTIVATION_SUMMARY.md | Activation status |
| SERVICE_CATALOG.md | Service catalog |
| PROBLEM_RESPONSE_PLAYBOOK.md | Incident response |
Agent Loops & Observability
| Document | Description |
|---|---|
| AGENT_LOOPS.md | Agent loop architecture |
| AgentLoopMonitor.ts | Real-time loop monitoring |
| AgentLoopDashboard/ | Web dashboard for loops |
Key Features (2026-06-30 deliverables):
- 24/7 autonomous loop orchestration tracking
- WebSocket-based real-time dashboard
- Loop lifecycle, iteration, token metrics
- Orchestratorβworker pattern visibility
CLI Commands:
# Monitor loops
bun PAI/Tools/AgentLoopMonitor.ts start --orchestrator "main" --pattern "research"
bun PAI/Tools/AgentLoopMonitor.ts iteration <loop-id> --status success
bun PAI/Tools/AgentLoopMonitor.ts end <loop-id>
# Dashboard
bun PAI/Tools/AgentLoopDashboard/server.ts
# Open http://localhost:3000Verification & Approval Gates
| Feature | Description |
|---|---|
| ApprovalGate.ts | Dual-factor approval system |
| VerificationGates/ | ISC-tracked human approval |
Key Features (2026-06-30 deliverables):
- TOTP-based approval (Google Authenticator)
- Voice-confirmation codes
- Tamper-evident audit trail
- ISC verification tracking
Setup:
# One-time TOTP setup
bun PAI/Tools/ApprovalGate.ts --setup
# Request approval
bun PAI/Tools/ApprovalGate.ts --request <slug> <action>
# Verify audit log
bun PAI/Tools/ApprovalGate.ts --verify-logCost Tracking & Budget Management
| Tool | Description |
|---|---|
| Cost.ts | Per-session cost tracking |
| BUDGET_SOURCE.md | Budget management system |
Key Features (2026-06-30 deliverables):
- Multi-model pricing (Claude, Gemini, Ollama)
- Session-level cost tracking
- SQLite-based persistence
- Daily/weekly/monthly reports
CLI Commands:
# Record session cost
bun PAI/Tools/Cost.ts record <session-id> <model> <input-tokens> <output-tokens>
# Get cost report
bun PAI/Tools/Cost.ts report --period daily
bun PAI/Tools/Cost.ts report --period weekly
bun PAI/Tools/Cost.ts report --session <session-id>Project Management
| Tool | Description |
|---|---|
| ProjectManager.ts | Multi-project state management |
| PROJECT_MANAGEMENT.md | Project management system |
Key Features (2026-06-30 deliverables):
- Multi-project context switching
- Project parking lot (preserve unfinished work)
- Quick resume with full context
- Git-based state tracking
- ISA integration
Philosophy:
Unfinished projects are exploration, not failure.
Context-switching is a feature, not a bug.
CLI Commands:
# Project operations
bun PAI/Tools/ProjectManager.ts switch <project>
bun PAI/Tools/ProjectManager.ts park <project>
bun PAI/Tools/ProjectManager.ts resume <project>
bun PAI/Tools/ProjectManager.ts list
bun PAI/Tools/ProjectManager.ts active
bun PAI/Tools/ProjectManager.ts archive <project>See also: PROJECT_MANAGER_README.md
Cross-Domain Pattern Linking
| Tool | Description |
|---|---|
| CrossDomainLinker.ts | Symbolic pattern detection |
| CrossDomainLinker.test.ts | Test suite |
| CrossDomainLinker.demo.ts | Demo patterns |
| CrossDomainLinker.README.md | Full documentation |
Key Features (2026-06-30 deliverables):
- Cross-domain symbolic pattern detection
- Multi-file pattern synthesis
- Wikilink-style connections
- Integration with Knowledge graph
Example patterns:
- Code architecture β martial arts philosophy
- System design β jazz improvisation
- Security patterns β medieval castle design
CLI Commands:
# Detect patterns
bun PAI/Tools/CrossDomainLinker.ts detect <file1> <file2> [...]
# Generate synthesis
bun PAI/Tools/CrossDomainLinker.ts synthesize <domain1> <domain2>
# Run demo
bun PAI/Tools/CrossDomainLinker.demo.tsFocus & Time Management (ADHD-Optimized)
| Tool | Description |
|---|---|
| FocusManager.ts | ADHD-focused productivity |
| FocusPomodoro.ts | Adaptive Pomodoro timers |
| FocusManager.md | Complete guide |
| README-FocusManager.md | Quick reference |
Key Features (2026-06-30 deliverables):
- Adaptive Pomodoro (attention-based)
- Distraction capture without disruption
- Task parking lot with context preservation
- Energy state tracking
- Integration with agent loops
Philosophy:
ADHD isnβt a bug β itβs a different operating system.
Work WITH attention patterns, not against them.
CLI Commands:
# Start focus session
bun PAI/Tools/FocusManager.ts start <task> --energy high|medium|low
# Capture distraction
bun PAI/Tools/FocusManager.ts capture "<thought>"
# Complete session
bun PAI/Tools/FocusManager.ts complete
# View stats
bun PAI/Tools/FocusManager.ts statsLocal LLM Performance
| Document | Description |
|---|---|
| LOCAL_LLM_INVESTIGATION_FINAL_REPORT.md | Complete investigation |
| OLLAMA_OPTIMIZATION_GUIDE.md | Tuning guide |
| SOFT_LAUNCH_PLAN.md | Integration plan |
| SESSION_COMPLETE_2026-06-30.md | Session summary |
Performance Results:
- 2-4x speedup over baseline Ollama
- Quality parity (5/5 tests pass)
- Zero Claude token cost for local work
Cross-Engine Coordination
| Document | Description |
|---|---|
| CROSS_ENGINE_PROVENANCE.md | Cross-engine tracking |
| org-session-management.md | Multi-org sessions |
Security & Infrastructure
| Document | Description |
|---|---|
| SECURITY_OVERRIDE_MECHANISM.md | Security overrides |
| PAI_BIOGRAPHY.md | System provenance |
Historical Sessions
| Document | Description |
|---|---|
| SESSION_COMPLETE_2026-06-24.md | Jun 24 session |
| SESSION_COMPLETE_2026-06-30.md | Jun 30 session |
| SESSION_SUMMARY_2026-06-24.md | Jun 24 summary |
| SESSION_SUMMARY_2026-06-27.md | Jun 27 summary |
π― Documentation by Use Case
βI want toβ¦β
β¦get PAI running β QUICKSTART.md β DEPLOYMENT_GUIDE.md
β¦understand what PAI does β EXECUTIVE_SUMMARY.md β ARCHITECTURE_SUMMARY.md
β¦monitor agent loops
β AGENT_LOOPS.md β bun PAI/Tools/AgentLoopMonitor.ts --help
β¦track costs
β bun PAI/Tools/Cost.ts --help β BUDGET_SOURCE.md
β¦manage multiple projects
β PROJECT_MANAGER_README.md β bun PAI/Tools/ProjectManager.ts --help
β¦improve focus (ADHD)
β FocusManager.md β bun PAI/Tools/FocusManager.ts --help
β¦detect cross-domain patterns
β CrossDomainLinker.README.md β bun PAI/Tools/CrossDomainLinker.ts --help
β¦require human approval for actions
β bun PAI/Tools/ApprovalGate.ts --setup
β¦optimize local LLM performance β OLLAMA_OPTIMIZATION_GUIDE.md
β¦troubleshoot an issue β TROUBLESHOOTING_METHOD.md
β¦manage services β DAEMON_MANAGEMENT_QUICKREF.md
β¦respond to incidents β PROBLEM_RESPONSE_PLAYBOOK.md
π Complete Tool Reference
Core Tools (PAI/Tools/)
Observability
- AgentLoopMonitor.ts β Loop lifecycle tracking
- AgentLogger.ts β Activity logging
- AgentWatchdog.ts β Health monitoring
- ObservabilityServer.ts β Metrics endpoint
Approval & Verification
- ApprovalGate.ts β Dual-factor approval
- VerificationGates/ β ISC-tracked gates
Cost Management
- Cost.ts β Session cost tracking
- BudgetReport.ts β Budget reporting
- EngineMeter.ts β Multi-engine usage
Project Management
- ProjectManager.ts β Multi-project switching
- ProjectState/ β State management
- ArchiveWork.ts β Work archival
Focus & Productivity
- FocusManager.ts β ADHD-optimized focus
- FocusPomodoro.ts β Adaptive timers
- Agenda.ts β Daily planning
Cross-Domain Linking
- CrossDomainLinker.ts β Pattern detection
- WikilinkGraph.ts β Wikilink graph
Media & Content
- MediaWorkflow.ts β Media processing
- FeedMonitor.ts β RSS/feed monitoring
- InboxAutoProcessor.ts β Inbox automation
Infrastructure
- HybridInference.ts β Local/cloud routing
- RecordRouter.ts β Cross-engine handoffs
- VoiceRouter.ts β Voice synthesis
Security
- ApprovalGate.ts β Dual-factor auth
- SecurityFilter.ts β Content filtering
- SecretScan.ts β Secret detection
π§ CLI Quick Reference
Agent Loop Monitoring
# Start monitoring loop
bun PAI/Tools/AgentLoopMonitor.ts start --orchestrator <id> --pattern <name>
# Log iteration
bun PAI/Tools/AgentLoopMonitor.ts iteration <loop-id> --status <status>
# End loop
bun PAI/Tools/AgentLoopMonitor.ts end <loop-id>
# Dashboard
bun PAI/Tools/AgentLoopDashboard/server.tsCost Tracking
# Record cost
bun PAI/Tools/Cost.ts record <session> <model> <in-tokens> <out-tokens>
# Get report
bun PAI/Tools/Cost.ts report --period daily
bun PAI/Tools/Cost.ts report --session <id>Project Management
# Switch project
bun PAI/Tools/ProjectManager.ts switch <project>
# Park project
bun PAI/Tools/ProjectManager.ts park <project>
# Resume project
bun PAI/Tools/ProjectManager.ts resume <project>
# List all
bun PAI/Tools/ProjectManager.ts listFocus Management
# Start focus
bun PAI/Tools/FocusManager.ts start <task> --energy <level>
# Capture distraction
bun PAI/Tools/FocusManager.ts capture "<thought>"
# Complete
bun PAI/Tools/FocusManager.ts complete
# Stats
bun PAI/Tools/FocusManager.ts statsApproval Gates
# Setup TOTP
bun PAI/Tools/ApprovalGate.ts --setup
# Request approval
bun PAI/Tools/ApprovalGate.ts --request <slug> <action>
# Verify log
bun PAI/Tools/ApprovalGate.ts --verify-logCross-Domain Linking
# Detect patterns
bun PAI/Tools/CrossDomainLinker.ts detect <files...>
# Synthesize
bun PAI/Tools/CrossDomainLinker.ts synthesize <domain1> <domain2>ποΈ Integration Guides
How Features Connect
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PAI Architecture β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
AgentLoopMonitor βββ
βββ> Dashboard ββ> WebSocket
βββ> JSONL logs
Cost.ts ββββββββββββ
βββ> SQLite DB ββ> Reports
βββ> BudgetReport.ts
ProjectManager βββββ
βββ> .project/ dirs ββ> Git
βββ> ProjectState skill
βββ> ISA integration
FocusManager βββββββ
βββ> Pomodoro timers
βββ> Distraction capture
βββ> AgentLoopMonitor
CrossDomainLinker ββ
βββ> Knowledge graph
βββ> WikilinkGraph
βββ> Pattern detection
ApprovalGate βββββββ
βββ> TOTP verification
βββ> Voice confirmation
βββ> Audit trail (JSONL)
HybridInference ββββ
βββ> Ollama (local)
βββ> llama-server (GPU)
βββ> Cloud fallback
π§ͺ API Reference
TypeScript APIs
AgentLoopMonitor API
import { logLoopStart, logIteration, logLoopEnd } from './AgentLoopMonitor';
const loopId = await logLoopStart({
orchestratorId: "main",
pattern: "research",
goal: "Find papers on topic X"
});
await logIteration(loopId, {
iterationNum: 1,
status: "success",
tokensUsed: 1200,
model: "claude-3-5-sonnet"
});
await logLoopEnd(loopId, {
status: "completed",
totalIterations: 5
});Cost Tracking API
import { calculateCost, recordSessionCost } from './Cost';
// Calculate cost
const cost = calculateCost("claude-3-5-sonnet", 1000, 500);
// Record to database
recordSessionCost("ses_123", "claude-3-5-sonnet", 1000, 500);ProjectManager API
import { switchProject, parkProject, resumeProject } from './ProjectManager';
// Switch active project
await switchProject("my-project", "/path/to/project");
// Park for later
await parkProject("my-project", {
reason: "Taking a break",
context: "Left off implementing feature X"
});
// Resume with context
const context = await resumeProject("my-project");FocusManager API
import { startFocus, captureDistraction, completeFocus } from './FocusManager';
// Start focus session
const sessionId = await startFocus({
task: "Write documentation",
energy: "medium",
estimatedPomodoros: 3
});
// Capture distraction
await captureDistraction(sessionId, {
thought: "Check email about meeting",
urgency: "low"
});
// Complete
await completeFocus(sessionId);π οΈ Troubleshooting
Common Issues
Agent loops not appearing in dashboard?
β Check WebSocket connection: curl http://localhost:3000/api/loops
Cost tracking not working?
β Verify SQLite DB exists: ls -lh ~/MEMORY/db/costs.db
Project switch failed?
β Check registry: cat ~/.claude/PAI/MEMORY/STATE/projects-registry.json
Focus session interrupted?
β Resume: bun PAI/Tools/FocusManager.ts resume
TOTP not working?
β Re-sync time: sudo ntpdate -u time.google.com
Full Troubleshooting Guide
See TROUBLESHOOTING_METHOD.md for the complete process.
π¦ Installation & Deployment
Quick Install
# Clone repo
git clone https://github.com/yourusername/pai.git ~/.claude
# Run installer (2026-06-30 deliverable)
bash ~/.claude/install.sh
# Configure
$EDITOR ~/.claude/settings.json
# Start services
systemctl --user start pai-primaryFull Deployment
See DEPLOYMENT_GUIDE.md for complete instructions.
π Whatβs New (2026-06-30 Session)
Major Deliverables
-
Agent Loop Observability β
- AgentLoopMonitor with real-time tracking
- Web dashboard with WebSocket updates
- Loop lifecycle, iteration, token metrics
-
Verification Gates β
- Dual-factor approval (TOTP + voice)
- ISC-tracked verification
- Tamper-evident audit trail
-
Cost Tracking β
- Multi-model pricing database
- Session-level tracking
- Daily/weekly/monthly reports
-
Project Management β
- Multi-project context switching
- Parking lot for unfinished work
- Quick resume with full context
-
Cross-Domain Linking β
- Symbolic pattern detection
- Multi-file synthesis
- Knowledge graph integration
-
Focus Manager β
- ADHD-optimized productivity
- Adaptive Pomodoro timers
- Distraction capture
-
Deployment Documentation β
- 4 deployment guides
- Service configuration
- Troubleshooting playbooks
-
Installer β
- One-command setup
- Dependency verification
- Service installation
-
YouTube Fixes β
- RSS feed monitoring
- Deduplication
- Daily digest
-
Infrastructure Portability β
- Abstraction layers
- Multi-engine support
- Cross-platform compatibility
-
Relationship AI MVP β
- 2 ADHD-focused tools
- Context preservation
- Energy tracking
Performance Achievements
Local LLM:
- 2-4x speedup vs baseline
- Quality parity maintained
- Zero token cost for local work
System Health:
- 11+ major features delivered
- Zero regressions
- Full test coverage
π Related Documentation
Skills System
See README.md for available skills.
Tools Directory
See README.md for tool catalog.
Algorithm Framework
See Algorithm for Algorithm v5.7.3 documentation.
π Support & Contact
Documentation Issues: File issues at: GitHub Issues
Questions: See TROUBLESHOOTING_METHOD.md first.
Contributing: See CONTRIBUTING.md for guidelines.
π Maintenance
Last Full Review: 2026-06-30
Next Review Due: 2026-07-31
Maintainer: Duane (Principal)
DA: PAI Nova (PNK/PNC/PNG/PNO/PNX)
ποΈ Complete File Listing
All Documentation Files (56 files)
PAI/DOCUMENTATION/
βββ INDEX.md (this file)
βββ QUICKSTART.md
βββ EXECUTIVE_SUMMARY.md
βββ ARCHITECTURE_SUMMARY.md
βββ ARCHITECTURE.md
βββ PAISystemPhilosophy.md
βββ DEPLOYMENT_GUIDE.md
βββ CONFIGURATION.md
βββ TROUBLESHOOTING_METHOD.md
βββ AGENT_LOOPS.md
βββ BUDGET_SOURCE.md
βββ CROSS_ENGINE_PROVENANCE.md
βββ DAEMON_MANAGEMENT_QUICKREF.md
βββ ENGINE_DAEMON_ARCHITECTURE.md
βββ HERDR_ENGINE_AUTO_LAUNCH.md
βββ ITIL_FRAMEWORK.md
βββ ITIL_QUICK_REFERENCE.md
βββ ITIL_IMPLEMENTATION_GUIDE.md
βββ ITIL_ACTIVATION_SUMMARY.md
βββ SERVICE_CATALOG.md
βββ PROBLEM_RESPONSE_PLAYBOOK.md
βββ PROJECT_MANAGEMENT.md
βββ SECURITY_OVERRIDE_MECHANISM.md
βββ SkillDispatcher-Architecture.md
βββ org-session-management.md
βββ PAI_BIOGRAPHY.md
βββ LOCAL_LLM_INVESTIGATION_FINAL_REPORT.md
βββ OLLAMA_OPTIMIZATION_GUIDE.md
βββ SOFT_LAUNCH_PLAN.md
βββ SESSION_COMPLETE_2026-06-30.md
βββ SESSION_COMPLETE_2026-06-24.md
βββ SESSION_SUMMARY_2026-06-27.md
βββ SESSION_SUMMARY_2026-06-24.md
βββ PHASE3_5_COMPLETE.md
βββ PHASE_D_OLLAMA_OPTIMIZATION.md
βββ PHASE1_OLLAMA_BASELINE_RESULTS.md
βββ PHASE2_LLAMACPP_RESULTS.md
βββ PHASE3_LLAMACPP_NATIVE_RESULTS.md
βββ PHASE3_5_INTEGRATION_PROGRESS.md
βββ PRE_REBOOT_STATE.md
βββ VLLM_INSTALLATION_RESULT.md
βββ VLLM_VS_OLLAMA_BENCHMARK.md
βββ VLLM_FINAL_VERDICT.md
βββ VLLM_AWQ_RESULT.md
βββ LOCAL_LLM_COMPREHENSIVE_INVESTIGATION.md
βββ LOCAL_LLM_INVESTIGATION_PROGRESS.md
βββ OLLAMA_TIMEOUT_INVESTIGATION.md
βββ OLLAMA_STATUS_VERIFIED.md
βββ OLLAMA_CAPABILITY_ASSESSMENT.md
βββ MODEL_BENCHMARK_SYSTEM.md
βββ OPENROUTER_INTEGRATION_GUIDE.md
βββ OPENROUTER_VS_OPENCODE.md
βββ CAPABILITY_REGISTRY_IMPLEMENTATION_SUMMARY.md
βββ PROBLEM_DETECTION_IMPLEMENTATION_SUMMARY.md
βββ RCA_IMPLEMENTATION_SUMMARY.md
βββ REARCHITECTURE_GAP_MAP.md
βββ POSTMORTEM_TEMPLATE.md
End of Index β Use Ctrl+F to search this document.