Auto-invoked compositional project analysis using φ = ∫(structure × semantics × memory). Analyzes codebase using three integrated layers - structure, semantics, and memory - for understanding project layout, architecture, and accumulated insights.
View on GitHubadimov-eth/phi
phi
skills/phi-analyzer/SKILL.md
January 16, 2026
Select agents to install to:
npx add-skill https://github.com/adimov-eth/phi/blob/main/skills/phi-analyzer/SKILL.md -a claude-code --skill phi-analyzerInstallation paths:
.claude/skills/phi-analyzer/# phi-analyzer Auto-invoked compositional project analysis using φ = ∫(structure × semantics × memory). ## Description This skill is invoked when agents need project context. Analyzes codebase using three integrated layers: structure (deterministic maps), semantics (curated annotations), and memory (cross-session learnings). Use for understanding project layout, architecture, and accumulated insights. ## Trigger Conditions Invoke automatically when: - User mentions "project structure", "codebase overview", or "architecture" - Agent starts task requiring project awareness - Fresh session in directory with `.phi/` folder - Commands like "explain how X works" or "find where Y is implemented" - Building features that need architectural context ## What It Provides **Layer 1: Structure (Deterministic)** - File locations and organization - Module exports and imports - Language breakdown - AST-level structure from PROJECT-MAP.auto.scm **Layer 2: Semantics (Curated)** - Architecture patterns (e.g., JEA layers) - Module purposes and relationships - Known issues and technical debt - Trust boundaries and security model - From PROJECT-MAP.scm **Layer 3: Memory (Learned)** - Cross-session insights from vessel - Relief-guided patterns that worked - Architectural decisions and rationale - Previous debugging learnings ## Capabilities - ✓ Compositional filesystem queries via mcp__periphery__discover - ✓ S-expression map parsing and analysis - ✓ Vessel memory semantic search - ✓ Progressive disclosure (index → details on-demand) - ✓ Fantasy Land combinators for transformation pipelines ## Safety **Low-risk** - Read-only analysis, no code modifications. Safe to auto-invoke. ## Output Format ``` φ Project Analysis ══════════════════ Structure (176 files, 85% TypeScript) ├─ jurisdictions/ - Smart contracts (J layer) ├─ runtime/ - BFT consensus (E layer) └─ frontend/ - 3D visualization (A layer) Architecture: JEA (Jurisdiction-Entity-Account) J: On-chain dispute settlem