Status: Foundation Complete ✅ Ready for: Commander Implementation Date: 2025-10-05 01:06 AM
# nabi is installed and operational
nabi --help
nabi self doctor
nabi self config
# Example commands (routing implemented, commanders pending):
nabi claude session list
nabi data jsonl validate file.jsonl
nabi federation agent list~/.config/nabi/
├── cli/ # ✅ Main router (Rust, 637KB binary)
├── commanders/
│ ├── claude/ # ⏳ Pending: Extract from claude-manager
│ ├── data/ # ⏳ Pending: Consolidate JSONL tools
│ └── federation/ # ⏳ Pending: Wire existing governance
├── governance/ # ✅ Existing federation infrastructure
└── hooks/ # ✅ Existing Claude Code hooks
~/.local/bin/nabi # ✅ Installed system-wide
Priority: High - Immediate value for data operations
-
Import jsonl-validator (Rust core from V: drive)
cp -r /mnt/v/nabia-ai-stack/tools/jsonl-validator \ ~/.config/nabi/commanders/data/ -
Extract JSONL viewer (Python from riff-cli)
cp ~/nabia/projects/riff-cli/python/jsonl_tool.py \ ~/.config/nabi/commanders/data/viewer.py
-
Extract recovery logic (TypeScript from claude-manager)
- Analyze
~/nabia/projects/claude-manager/cm-recover.ts - Extract generic JSONL parsing logic
- Move Claude-specific logic to claude-commander
- Analyze
-
Create unified interface
// ~/.config/nabi/commanders/data/main.rs // Dispatch to: validate, repair, view subcommands
Priority: Medium - Leverage existing claude-manager
-
Analyze claude-manager boundaries
- Session operations → Keep in claude-commander
- JSONL operations → Move to data-forge
- Generic utilities → Evaluate for extraction
-
Create claude-commander wrapper
// ~/.config/nabi/commanders/claude/index.ts // Import existing claude-manager, expose as commander
Priority: Medium - Enable extensibility
-
Define JSON protocol
{ "command": "claude session list", "args": {"limit": 10}, "flags": {"verbose": true} } -
Implement subprocess communication
- stdin/stdout for data
- stderr for errors
- Exit codes for status
# Router works, shows what would be executed:
$ nabi claude session list --limit 5
📋 Listing Claude sessions...
→ Would route to commander: claude ["session", "list", "--limit", "5"]
ℹ️ Commander implementation pending
# Health check validates structure:
$ nabi self doctor
🏥 Running health check...
✓ claude present
✓ data present
✓ federation present
✓ All commanders healthy!# Will execute actual commands via subprocess:
$ nabi data jsonl validate memory.jsonl
✓ Validating memory.jsonl...
[Actual validator output]
$ nabi claude session recover 57eea7e7
🔄 Recovering session 57eea7e7...
[Actual recovery output]cd ~/.config/nabi/cli
cargo build --release
cp target/release/nabi ~/.local/bin/- Edit
src/main.rsto add command enum - Add handler function
- Update routing logic
- Rebuild and test
- Create directory:
~/.config/nabi/commanders/new-name/ - Implement executable that handles JSON protocol
- nabi will auto-detect and route
Ready to consolidate into data-forge:
| Tool | Location | Purpose | Language |
|---|---|---|---|
| jsonl-validator | /mnt/v/nabia-ai-stack/tools/jsonl-validator/ |
Repair broken JSONL | Rust ✅ |
| jsonl_tool.py | ~/nabia/projects/riff-cli/python/jsonl_tool.py |
Interactive viewer | Python |
| cm-recover.ts | ~/nabia/projects/claude-manager/cm-recover.ts |
Session recovery (extract JSONL logic) | TypeScript |
Foundation Phase ✅:
- XDG-compliant structure
- Rust router skeleton
- Command routing system
- Health check system
- System-wide installation
Commander Phase (Next):
- data-forge operational
- claude-commander operational
- federation-core operational
- Full backward compatibility
"Router, not monolith. Coordination, not control." — Igris, Chief Strategist
Transform scattered tools into unified federation command structure:
- ✅ Honor existing investments (governance, hooks preserved)
- ✅ Clear evolution path (parallel campaigns defined)
- 🔄 Backward compatibility (via routing and symlinks)
- ✅ Future extensibility (plugin architecture ready)
- ✅ Platform conventions (XDG compliance)
When you're ready to start: Begin with Campaign Alpha (data-forge) for immediate value.
Quick win: Import jsonl-validator to data-forge → Wire to nabi → Test nabi data jsonl validate
This project follows XDG Base Directory Specification for cross-platform compatibility.
~/nabia/core/nabi-cli/ # Source code (this repository)
~/.cache/nabi/nabi-cli/ # Build artifacts (XDG_CACHE_HOME)
~/.local/bin/nabi # Installed binary (XDG_BIN_HOME)
Use the Makefile for XDG-compliant builds:
# Generate .cargo/config.toml from template
make config
# Build release binary
make build
# Install to ~/.local/bin
make install
# Quick rebuild and install
make quick
# Clean build artifacts
make cleanIf you prefer cargo directly:
# Generate config first
make config
# Then use cargo
cargo build --release
cp ~/.cache/nabi/nabi-cli/target/release/nabi ~/.local/bin/nabi- The
.cargo/config.tomlfile is generated from.cargo/config.toml.template - XDG paths are resolved at build time via Makefile
- macOS: Uses
~/Library/Application Supportconventions wrapped as XDG - Linux/WSL: Uses standard XDG paths (
~/.cache,~/.local/share)