Lev Core Wizard
Master orchestration for the Leviathan development environment.
Five-Fold Understanding
Before we begin, let me understand your quest:
- Evolution - Fresh install or existing lev setup?
- Impact - What are you trying to achieve? (dev environment, daemon management, debugging)
- Relationships - Which project? (leviathan monorepo, external project, global setup)
- Essence - The ONE thing blocking you right now?
- Paradigm - Are you fighting lev or working with it?
Choose Your Path
What do you need help with?
Install & Setup (Legacy) - Historical setup/upgrade guidance
→ Load: references/install.md
Daemon Management - Start, stop, monitor poly daemons
→ Load: references/daemon.md
Debugging - Something broken? Troubleshoot common issues
→ Load: references/debug.md
Quick Reference - Just need a command?
→ See Quick Commands below
Something else? - Tell me your quest
Quick Commands
| Command |
Description |
lev install |
Legacy install path (prefer docs + runtime checks) |
lev status |
Show current system status |
lev get <query> |
Semantic search across codebase |
lev check --log="msg" |
Log progress checkpoint (lifecycle hook) |
lev events tail |
Tail lifecycle events |
lev events query --type=X |
Query events by type |
lev events stats |
Event statistics |
lev daemon list |
Show all registered daemons |
lev daemon start <name> |
Start a specific daemon |
lev daemon stop <name> |
Stop a specific daemon |
lev daemon logs <name> |
View daemon logs |
bd ready |
Show issues ready to work |
bd stats |
Project statistics |
Architecture Overview
For full architecture details, run these bash commands against /lev or see:
`/.agents/skills/lev/references/architecture-primer.md`
~/.config/lev/ # Global (user-level, XDG-compliant)
├── config.yaml # Global settings
├── profiles/ # Exec profiles (planned)
└── runners/ # Runner protocol manifests (planned)
.lev/ # Local (project-level)
├── config.yaml # Project configuration (fractal: inline key → domain file → domain folder glob)
├── config/{domain}.yaml # Per-domain config files
├── exec-profiles/ # Project exec profiles
└── pm/ # Project management (handoffs, plans, intake)
core/ # 20 modules (real layout)
├── domain/ # Shared contracts: ProtocolAdapter, ExecTransport, Route, Target, Action
├── poly/ # Protocol projector: registry.yaml, 5 surfaces (CLI/MCP/HTTP/gRPC/WS), codegen
├── exec/ # Thin execution engine: createExec(dispatch), CLIAdapter, MCPAdapter
├── harness/ # Heavy runtime: TmuxHarness, AdapterRegistry (6 adapters), profile-loader
├── orchestration/ # Dispatch: A2A dispatcher, loop, DAG, stage policies
├── flowmind/ # Flow compilation + session management
├── graph/ # Graph runtime: types, views, adapters, compositor
├── index/ # Semantic search indexes
├── config/ # Fractal config resolution
└── ... # + event-bus, event-machines, plugin-manager, etc.
Key Patterns
- ProtocolAdapter<TExternal, TInternal> — pure-function transforms between API conventions (domain)
- ExecTransport — domain defines interface, poly implements at boot (DI pattern)
- Route.parse('lev://module/fractal/item') — URI routing for everything (domain)
- A2A Job Dispatcher — AgentJob → JobExecutor → AgentJobResult (orchestration)
- TmuxHarness — owned spawn primitive: spawn/send/capture/kill on lev- sessions (harness)
- Fractal Config — inline key → domain file → domain folder glob (NOT single config.yaml)
- DNA Contracts — 3 .dna.yaml files, 25+ constraints, gate vs aspirational enforcement
Protocols
| Protocol |
Purpose |
Example |
lev:// |
Internal routing |
lev://poly/runners/claude |
bin:// |
Binary handler dispatch |
bin://ck |
grpc:// |
gRPC service dispatch |
grpc://leann:50052 |
http:// |
HTTP handler dispatch |
http://deer-flow:8001 |
skill:// |
Load agent skills |
skill://lev-core |
bd:// |
Query beads issues |
bd://lev-001b |
External Tools (NOT our code)
- ntm — External Go tool for tmux agent spawning. We own TmuxHarness instead.
- bd/beads — Issue tracking (Rust CLI)
- ck — Code knowledge search (Rust CLI)
Related Skills
bd - Issue tracking with dependency graphs
lev-builder - Module placement decisions
lev-cdo - Architecture-aware deliberation
lev get - Semantic search across codebase (lev-find backend, legacy name)
lev-index - Vector index management
lev-learn - Event analysis and system improvement
lev-align - Drift detection and remediation
Phase Navigation
Each reference follows the wizard pattern:
- 1-5 options presented based on context
- Combined choices welcome ("1,3")
- Pivot anytime ("actually, let's...")
- Back navigation available
When ready, tell me which path you'd like to take.
Technique Map
- Role definition - Clarifies operating scope and prevents ambiguous execution.
- Context enrichment - Captures required inputs before actions.
- Output structuring - Standardizes deliverables for consistent reuse.
- Step-by-step workflow - Reduces errors by making execution order explicit.
- Edge-case handling - Documents safe fallbacks when assumptions fail.
Technique Notes
These techniques improve reliability by making intent, inputs, outputs, and fallback paths explicit. Keep this section concise and additive so existing domain guidance remains primary.
Prompt Architect Overlay
Role Definition
You are the prompt-architect-enhanced specialist for lev-core, responsible for deterministic execution of this skill's guidance while preserving existing workflow and constraints.
Input Contract
- Required: clear user intent and relevant context for this skill.
- Preferred: repository/project constraints, existing artifacts, and success criteria.
- If context is missing, ask focused questions before proceeding.
Output Contract
- Provide structured, actionable outputs aligned to this skill's existing format.
- Include assumptions and next steps when appropriate.
- Preserve compatibility with existing sections and related skills.
Edge Cases & Fallbacks
- If prerequisites are missing, provide a minimal safe path and request missing inputs.
- If scope is ambiguous, narrow to the highest-confidence sub-task.
- If a requested action conflicts with existing constraints, explain and offer compliant alternatives.
1---2name: lev-core3description: |4 [WHAT] CLI operations reference for lev runtime management.5 [HOW] Routes to daemon/debug/reference commands and links canonical docs.6 [WHEN] Use for daemon status, runtime checks, and operational troubleshooting.7 [WHY] Keeps runtime ops discoverable while lifecycle/process behavior stays in `work`.89 Triggers: "install lev", "lev daemon", "lev status", "manage daemons", "lev architecture", "debug lev", "lev setup"10skill_type: how-to11category: cli-ops1213lifecycle_integration:14 stage: all stages (orchestration)15 input_artifact: lev operation request (install/daemon/debug)16 output_artifact: lev environment state + logs17---1819# Lev Core Wizard2021Master orchestration for the Leviathan development environment.2223## Five-Fold Understanding2425Before we begin, let me understand your quest:26271. **Evolution** - Fresh install or existing lev setup?282. **Impact** - What are you trying to achieve? (dev environment, daemon management, debugging)293. **Relationships** - Which project? (leviathan monorepo, external project, global setup)304. **Essence** - The ONE thing blocking you right now?315. **Paradigm** - Are you fighting lev or working with it?3233## Choose Your Path3435**What do you need help with?**36371. **Install & Setup (Legacy)** - Historical setup/upgrade guidance38 → Load: `references/install.md`39402. **Daemon Management** - Start, stop, monitor poly daemons41 → Load: `references/daemon.md`42433. **Debugging** - Something broken? Troubleshoot common issues44 → Load: `references/debug.md`45464. **Quick Reference** - Just need a command?47 → See Quick Commands below48495. **Something else?** - Tell me your quest5051## Quick Commands5253| Command | Description |54|---------|-------------|55| `lev install` | Legacy install path (prefer docs + runtime checks) |56| `lev status` | Show current system status |57| `lev get <query>` | Semantic search across codebase |58| `lev check --log="msg"` | Log progress checkpoint (lifecycle hook) |59| `lev events tail` | Tail lifecycle events |60| `lev events query --type=X` | Query events by type |61| `lev events stats` | Event statistics |62| `lev daemon list` | Show all registered daemons |63| `lev daemon start <name>` | Start a specific daemon |64| `lev daemon stop <name>` | Stop a specific daemon |65| `lev daemon logs <name>` | View daemon logs |66| `bd ready` | Show issues ready to work |67| `bd stats` | Project statistics |6869## Architecture Overview7071> For full architecture details, run these bash commands against ~/lev or see:72> `~/.agents/skills/lev/references/architecture-primer.md`7374```75~/.config/lev/ # Global (user-level, XDG-compliant)76├── config.yaml # Global settings77├── profiles/ # Exec profiles (planned)78└── runners/ # Runner protocol manifests (planned)7980.lev/ # Local (project-level)81├── config.yaml # Project configuration (fractal: inline key → domain file → domain folder glob)82├── config/{domain}.yaml # Per-domain config files83├── exec-profiles/ # Project exec profiles84└── pm/ # Project management (handoffs, plans, intake)8586core/ # 20 modules (real layout)87├── domain/ # Shared contracts: ProtocolAdapter, ExecTransport, Route, Target, Action88├── poly/ # Protocol projector: registry.yaml, 5 surfaces (CLI/MCP/HTTP/gRPC/WS), codegen89├── exec/ # Thin execution engine: createExec(dispatch), CLIAdapter, MCPAdapter90├── harness/ # Heavy runtime: TmuxHarness, AdapterRegistry (6 adapters), profile-loader91├── orchestration/ # Dispatch: A2A dispatcher, loop, DAG, stage policies92├── flowmind/ # Flow compilation + session management93├── graph/ # Graph runtime: types, views, adapters, compositor94├── index/ # Semantic search indexes95├── config/ # Fractal config resolution96└── ... # + event-bus, event-machines, plugin-manager, etc.97```9899## Key Patterns100101- **ProtocolAdapter<TExternal, TInternal>** — pure-function transforms between API conventions (domain)102- **ExecTransport** — domain defines interface, poly implements at boot (DI pattern)103- **Route.parse('lev://module/fractal/item')** — URI routing for everything (domain)104- **A2A Job Dispatcher** — AgentJob → JobExecutor → AgentJobResult (orchestration)105- **TmuxHarness** — owned spawn primitive: spawn/send/capture/kill on lev-<id> sessions (harness)106- **Fractal Config** — inline key → domain file → domain folder glob (NOT single config.yaml)107- **DNA Contracts** — 3 .dna.yaml files, 25+ constraints, gate vs aspirational enforcement108109## Protocols110111| Protocol | Purpose | Example |112|----------|---------|---------|113| `lev://` | Internal routing | `lev://poly/runners/claude` |114| `bin://` | Binary handler dispatch | `bin://ck` |115| `grpc://` | gRPC service dispatch | `grpc://leann:50052` |116| `http://` | HTTP handler dispatch | `http://deer-flow:8001` |117| `skill://` | Load agent skills | `skill://lev-core` |118| `bd://` | Query beads issues | `bd://lev-001b` |119120## External Tools (NOT our code)121122- **ntm** — External Go tool for tmux agent spawning. We own TmuxHarness instead.123- **bd/beads** — Issue tracking (Rust CLI)124- **ck** — Code knowledge search (Rust CLI)125126## Related Skills127128- `bd` - Issue tracking with dependency graphs129- `lev-builder` - Module placement decisions130- `lev-cdo` - Architecture-aware deliberation131- `lev get` - Semantic search across codebase (`lev-find` backend, legacy name)132- `lev-index` - Vector index management133- `lev-learn` - Event analysis and system improvement134- `lev-align` - Drift detection and remediation135136## Phase Navigation137138Each reference follows the wizard pattern:139- 1-5 options presented based on context140- Combined choices welcome ("1,3")141- Pivot anytime ("actually, let's...")142- Back navigation available143144When ready, tell me which path you'd like to take.145146## Technique Map147- **Role definition** - Clarifies operating scope and prevents ambiguous execution.148- **Context enrichment** - Captures required inputs before actions.149- **Output structuring** - Standardizes deliverables for consistent reuse.150- **Step-by-step workflow** - Reduces errors by making execution order explicit.151- **Edge-case handling** - Documents safe fallbacks when assumptions fail.152153## Technique Notes154These techniques improve reliability by making intent, inputs, outputs, and fallback paths explicit. Keep this section concise and additive so existing domain guidance remains primary.155156## Prompt Architect Overlay157### Role Definition158You are the prompt-architect-enhanced specialist for lev-core, responsible for deterministic execution of this skill's guidance while preserving existing workflow and constraints.159160### Input Contract161- Required: clear user intent and relevant context for this skill.162- Preferred: repository/project constraints, existing artifacts, and success criteria.163- If context is missing, ask focused questions before proceeding.164165### Output Contract166- Provide structured, actionable outputs aligned to this skill's existing format.167- Include assumptions and next steps when appropriate.168- Preserve compatibility with existing sections and related skills.169170### Edge Cases & Fallbacks171- If prerequisites are missing, provide a minimal safe path and request missing inputs.172- If scope is ambiguous, narrow to the highest-confidence sub-task.173- If a requested action conflicts with existing constraints, explain and offer compliant alternatives.