CLIO + SAM Integration
CLIO develops SAM. Both implement the Unbroken Method. Shared methodology, persistent memory, and seamless collaboration between terminal and GUI.
Overview
The relationship between CLIO and SAM is unique in the ecosystem: CLIO was built to implement the Unbroken Method, then used to build SAM, and now maintains SAM. This creates a reflexive loop where the tool builds the product that inspired the tool's methodology.
Shared Methodology: The Unbroken Method
Both CLIO and SAM embody the Unbroken Method:
| Pillar | CLIO Implementation | SAM Implementation |
|---|---|---|
| Continuous Context | interact checkpoints, LTM, session memory |
Conversation history, Shared Topics, YaRN context profiles |
| Complete Ownership | Agent authority model, bug-fix ownership | Tool execution with user approval, autonomous agents |
| Investigation First | file_operations, grep_search, code_intelligence |
Document search, codebase indexing, semantic RAG |
| Root Cause Focus | LTM solutions with trust tiers | Error analysis, debugging tools |
| Complete Deliverables | No TODOs, checkpoint-enforced completion | Feature-complete releases, no partial features |
| Structured Handoffs | /session export, ai-assisted/ structure |
Conversation export, Shared Topic persistence |
| Learning from Failure | LTM trust tiers ([UNVERIFIED] -> [TRUSTED]) | Error reporting, crash analytics (opt-in) |
Development Workflow
CLIO Develops SAM
Since January 2026, all SAM development has been done through CLIO:
- Developer opens CLIO in the SAM repository
- CLIO investigates the Swift/SwiftUI codebase
- CLIO proposes implementation plan (checkpoint)
- Developer approves or redirects
- CLIO implements: Swift files, SwiftUI views, tests
- CLIO runs tests, verifies build passes
- Developer reviews changes, commits
- Session exported to
ai-assisted/YYYYMMDD/HHMM/
This workflow means SAM's codebase reflects CLIO's patterns: structured error handling, investigation-before-modification, comprehensive test coverage, and architectural consistency.
Cross-System Memory
CLIO's Long-Term Memory (.clio/ltm.json) stores patterns learned while developing SAM:
- Swift/SwiftUI patterns specific to SAM's architecture
- Provider integration patterns (MLX, GGUF, cloud APIs)
- YaRN context management implementation details
- Voice interface integration patterns
When CLIO works on CLIO itself, it applies these learned patterns. When it works on ALICE, it transfers applicable patterns. The memory is portable across the ecosystem.
Using CLIO and SAM Together
Complementary Workflows
Use each tool for what it excels at:
| Task | Use CLIO | Use SAM |
|---|---|---|
| Code implementation, refactoring | ✓ Primary | |
| Architecture exploration, code search | ✓ Semantic search | ✓ Document RAG |
| Long-form writing, planning | ✓ Native UI | |
| Voice interaction | ✓ "Hey SAM" | |
| Remote server work | ✓ SSH, fleet execution | |
| Image/audio generation | ✓ ALICE integration | |
| Multi-agent parallel work | ✓ Native support |
Shared Context
When working on SAM-related tasks:
- Open SAM for high-level planning and research
- Open CLIO for implementation and terminal work
- Both share the Unbroken Method vocabulary and checkpoints
- CLIO's LTM informs SAM development patterns
Technical Integration
SAM Web + CLIO
SAM-Web provides browser access to SAM. You can use SAM-Web on an iPad while running CLIO on your development machine - both connected to the same SAM instance, sharing conversation context.
Provider Consistency
Both tools support the same AI providers:
- GitHub Copilot, OpenAI, Anthropic (via Copilot/OpenRouter)
- Google Gemini, DeepSeek, MiniMax
- Local: MLX (SAM), llama.cpp (both), LM Studio (both)
- Custom OpenAI-compatible endpoints
Configure once, use in both tools.
See Also
- The Unbroken Method - The shared methodology
- The Reflexive Ecosystem - Self-building case study
- SAM Documentation - SAM user guide
- CLIO Documentation - CLIO user guide