Table of Contents
Lab Logs #1: From Spec to Sandbox #
A Weekly Engineering Journal for TeenyOrb
π¬ Hypothesis #
If we could build a secure CLI tool that manages containerized coding sessions with LLM assistance - and demonstrate each phase of development with AI pair programming - then we could create both a useful tool and document effective AI-assisted development patterns.
This required:
- Comprehensive planning and architecture design
- CLI framework with container management
- File synchronization between host and containers
- Incremental development with clear milestones
π§ͺ Experiment #
Subject: TeenyOrb Phase 1 Implementation Environment:
- Go 1.24.2 with comprehensive planning spec
- LLM-assisted development (Claude/Copilot)
- Target: Complete CLI foundation with container management
Procedure:
- Created comprehensive planning spec (
docs/planning/v0.md
) with 7-phase roadmap - Used LLM assistance to implement Phase 1 in a single focused session
- Built complete CLI structure with Cobra framework integration
- Implemented Docker-based container management with interfaces
- Added file synchronization system using TAR-based transfers
- Created working session management (create/list/stop commands)
- Established configuration system and built functional binary
π Observations #
- Architecture Scope: LLM assistance helped implement far more than initially planned - complete CLI framework, container interfaces, and file sync
- Code Organization: Domain-driven design emerged naturally with clear separation between CLI, container, and sync concerns
- Interface Design: Abstract interfaces for container management appeared organically, enabling future backend flexibility
- Implementation Quality: Thread-safe session management and comprehensive error handling were implemented without explicit prompting
- Resource Management: Proper container resource limits and cleanup were included in initial implementation
Key Technical Achievements:
1## Goal
2Write a tiny Go CLI (βTeenyOrbβ) that lets an LLM:
31. plan coding tasks
42. find/read/write files
53. run commands in a scratch-built container (namespaces + cgroups)
64. log every action to SQLite
7
8## Please expand:
9- Features list
10- Non-Functional Requirements (security, resource limits, portability)
11- Architecture Sketch (modules + data flow)
12- Milestones (8 weekly posts)
- π οΈ 1,396 lines of production-ready Go code in single session
- π³ Docker integration with advanced TAR-based file synchronization
- β‘ Working binary (11.6MB) with help system and session management
- ποΈ Clean architecture with interfaces, dependency injection, and error handling
- π Complete configuration system with YAML and Viper integration
π Result #
Metric | Value |
---|---|
Implementation Scope | Phase 1 Complete - CLI + Container Management |
Lines Added | 1,396 lines of Go code |
Files Created | 18 new files across cmd/, internal/, configs/ |
Dependencies | 42 Go modules properly resolved |
Binary Size | 11.6MB working executable |
Commit Hash | baaee9d |
Implementation Highlights:
1// Complete CLI structure with Cobra
2teeny-orb session create // β
Working
3teeny-orb session list // β
Working
4teeny-orb session stop // β
Working
5teeny-orb generate "..." // π Phase 2
6teeny-orb review file.go // π Phase 2
7
8// Container management with Docker
9type Manager interface {
10 CreateSession(config SessionConfig) (Session, error)
11 ListSessions() ([]Session, error)
12 StopSession(id string) error
13}
π Next Step #
With Phase 1 complete, we're ready for Phase 2: LLM Integration to add AI-powered capabilities:
- LLM provider interface with OpenAI/Anthropic implementations
- Configuration management for API keys and models
- Prompt templates and error handling
- Integration with existing
generate
andreview
commands
The CLI foundation and container management are solid - now we add the intelligence layer.
TeenyOrb has a pulse. Clone the repo, tweak the spec, and submit a PR with your Copilot-augmented ideas. π github.com/rcliao/teeny-orb