miadi-code
v0.1.4
Published
Miadi terminal agent: Three-Universe narrative intelligence with multi-engine support (Gemini, Claude, Ollama) and coaia-narrative MCP integration.
Maintainers
Readme
🌌 Miadi-Code
Three-Universe Terminal Agent
A terminal agent that processes all interactions through three interpretive lenses:
- 🧠 Mia (Engineer) - Technical precision and code quality
- 🌸 Miette (Story) - Narrative structure and coherence
- 🌿 Ava (Ceremony) - Relational accountability
Default engine: Claude (with sonnet model)
Installation
```bash cd Miadi-18/miadi-code npm install npm run build npm link # Makes 'miadi-code' and 'miadi' available globally ```
Usage
Interactive Mode (Default)
```bash miadi-code
or simply
miadi ```
Single Prompt
```bash miadi prompt "Create a TypeScript function to parse JSON" ```
With Specific Engine
```bash miadi --gemini "Quick refactor..." # Use Gemini miadi --ollama "Local private execution..." # Use Ollama (requires local Ollama)
Default is Claude, so no flag needed for Claude
```
Webhook Processing
```bash
For .github-hooks integration
cat webhook_payload.json | miadi webhook --type issues.opened ```
Features
- Multi-Engine Support: Gemini, Claude, Ollama
- Three-Universe Analysis: Every prompt analyzed through technical, relational, and narrative lenses
- Session Persistence: Resume conversations across terminal sessions
- Narrative Memory: Structural tension charts and story beats via coaia-narrative
- Full Tracing: Langfuse integration for observability
- Webhook Integration: Process GitHub webhooks as narrative events
Commands
| Command | Description |
|---------|-------------|
| miadi chat | Interactive terminal session (default) |
| miadi prompt <text> | Run single prompt and exit |
| miadi webhook | Process webhook payload from stdin |
| miadi config | View/update configuration |
| miadi sessions | List saved sessions |
Slash Commands (Interactive Mode)
| Command | Description |
|---------|-------------|
| /help | Show help |
| /session | Current session info |
| /sessions | List all sessions |
| /universe <u> | Focus on universe (engineer/ceremony/story_engine) |
| /position | Show narrative position |
| /charts | List active structural tension charts |
| /beat <desc> | Create a narrative beat |
| /config | Show configuration |
| /exit | Exit miadi-code |
STC Workspace Commands
| Command | Description |
|---------|-------------|
| /stc help | Show all STC commands |
| /stc config list | List workspace mappings |
| /stc config add <repo> <path> | Add workspace mapping |
| /stc config remove <repo> | Remove workspace |
| /stc load [repo] | Load STC files |
| /stc status [repo] | Show workspace status |
| /stc observe "<text>" | Add observation to chart |
| /stc action add "<text>" | Add action step |
| /stc action complete "<name>" | Complete action |
| /stc goal | Show STCGOAL.md |
| /stc issue | Show STCISSUE.md |
| /stc mastery | Show STCMASTERY.md |
| /stc sync | Sync STC files to chart |
| /stc commit | Commit chart changes |
PDE (Prompt Decomposition Engine)
| Command | Description |
|---------|-------------|
| /pde help | Show all PDE commands |
| /pde decompose "<prompt>" | Full 5-layer decomposition |
| /pde quick "<prompt>" | Quick summary view |
| /pde intents "<prompt>" | Layer 1: Intent extraction |
| /pde deps "<prompt>" | Layer 2: Dependency graph |
| /pde wheel "<prompt>" | Layer 3: Medicine Wheel mapping |
| /pde workflow "<prompt>" | Layer 4: Workflow template |
| /pde plan "<prompt>" | Layer 5: Execution plan |
| /pde check "<prompt>" | Check prompt complexity |
| /pde ceremony [type] | Show ceremony requirements |
| /pde export [format] | Export last result (json/yaml/md) |
| /pde last | Show last decomposition |
Chart Commands (Claude only)
| Command | Description |
|---------|-------------|
| /chart create | Create chart: outcome | reality |
| /chart add-action | Add action: title | reality |
| /chart complete | Toggle action completion |
| /web | Launch chart visualizer |
| /dashboard | Interactive STC dashboard (requires TTY) |
| /ui | Alias for /dashboard |
| /contexts | List active chart contexts |
| /focus <chart> | Switch chart context |
Configuration
```bash
Set default engine
miadi config --set-engine claude
Set model
miadi config --set-model sonnet
Enable YOLO mode by default
miadi config --set-yolo true
Set Ollama host
miadi config --set-ollama-host http://localhost:11434 ```
Config file location: ~/.config/miadi-code/config.json
Architecture
``` ┌─────────────────────────────────────────────────────────────────┐ │ miadi-code CLI │ ├─────────────────────────────────────────────────────────────────┤ │ Three-Universe Processor │ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │ │ 🔧 Engineer │ │ 🙏 Ceremony │ │ 📚 Story │ │ │ └─────────────┘ └─────────────┘ └─────────────┘ │ ├─────────────────────────────────────────────────────────────────┤ │ Multi-Engine │ COAIA Memory │ Langfuse Tracing │ └─────────────────────────────────────────────────────────────────┘ ```
Related Projects
- Miadi-18/app - Backend platform with webhook handlers
- coaia-narrative - Structural tension charts and narrative memory
- mcp-medicine-wheel - Four directions ceremonial wisdom
- storytelling - Story generation with NCP
License
MIT
Author
J.Guillaume D.-Isabelle [email protected]
