/ docs / QUICK_REF.md
QUICK_REF.md
  1  # ECHO Quick Reference Card
  2  
  3  One-page quick reference for common ECHO tasks.
  4  
  5  ## ๐Ÿš€ Essential Commands
  6  
  7  ```bash
  8  # First Time Setup
  9  docker-compose up -d && cd shared && mix ecto.create && mix ecto.migrate
 10  ./setup_llms.sh && ./setup.sh
 11  
 12  # Daily Development
 13  cd shared && mix compile && mix test
 14  cd apps/ceo && mix compile && ./ceo --autonomous
 15  
 16  # System Health
 17  ./echo.sh summary
 18  docker ps | grep echo
 19  
 20  # Monitor Dashboard
 21  cd monitor && ./start.sh  # http://localhost:4000
 22  ```
 23  
 24  ## ๐Ÿ› Quick Troubleshooting
 25  
 26  | Issue | Solution |
 27  |-------|----------|
 28  | DB connection refused | `docker-compose up -d && cd shared && mix ecto.migrate` |
 29  | Redis failed | `docker-compose up -d && redis-cli -h 127.0.0.1 -p 6383 ping` |
 30  | Compile errors | `cd shared && mix clean && mix compile` |
 31  | LLM not responding | `curl http://localhost:11434/api/tags && ollama list` |
 32  | LocalCode timeout | `export LLM_TIMEOUT=300 && lc_end && lc_start` |
 33  
 34  ## ๐Ÿ“‚ Key Files & Directories
 35  
 36  ```
 37  /CLAUDE.md              - Start here (critical rules)
 38  apps/                   - 9 agents + shared library + delegator
 39  apps/echo_shared/       - Shared library (DB, Redis, MCP)
 40  test/                   - Integration & E2E tests
 41  scripts/llm/            - LocalCode (local AI assistant)
 42  monitor/                - Phoenix LiveView dashboard
 43  docs/INDEX.md           - Complete documentation index
 44  docs/snippets/          - Reusable troubleshooting
 45  ```
 46  
 47  ## ๐Ÿค– LocalCode (Local AI Assistant)
 48  
 49  ```bash
 50  # Setup (once per terminal)
 51  source ./scripts/llm/localcode_quick.sh
 52  
 53  # Use
 54  lc_start                # Start session
 55  lc_query "question"     # Ask question ($0 cost, 7-30s response)
 56  lc_interactive          # Interactive mode
 57  lc_end                  # End session
 58  
 59  # When to use
 60  # LocalCode: Quick questions, code exploration
 61  # Claude Code: Complex tasks, multi-file changes
 62  ```
 63  
 64  ## ๐ŸŽจ Decision Modes
 65  
 66  | Mode | Use When | Example |
 67  |------|----------|---------|
 68  | **Autonomous** | Within authority | CEO approves <$1M budget |
 69  | **Collaborative** | Team consensus | Architecture decision (CTO+Arch+Dev) |
 70  | **Hierarchical** | Escalate up chain | Dev โ†’ Architect โ†’ CTO โ†’ CEO |
 71  | **Human** | Critical risk | Legal, financial, strategic |
 72  
 73  ## ๐Ÿ”Œ Key Database Tables
 74  
 75  | Table | Purpose |
 76  |-------|---------|
 77  | **decisions** | Decisions with mode, status, consensus |
 78  | **messages** | Inter-agent communications |
 79  | **memories** | Shared organizational knowledge |
 80  | **decision_votes** | Collaborative voting |
 81  | **agent_status** | Health monitoring |
 82  
 83  ## ๐Ÿ“ก Redis Channels
 84  
 85  ```
 86  messages:ceo            # Private per-agent
 87  messages:all            # Broadcast to all
 88  messages:leadership     # C-suite only
 89  decisions:new           # New decision
 90  decisions:completed     # Decision done
 91  agents:heartbeat        # Health checks
 92  ```
 93  
 94  ## ๐Ÿงช Testing
 95  
 96  ```bash
 97  # Unit tests
 98  cd apps/echo_shared && mix test
 99  cd apps/ceo && mix test
100  
101  # Integration tests
102  mix test test/integration/
103  
104  # All tests
105  mix test
106  
107  # With coverage
108  mix test --cover
109  ```
110  
111  ## ๐Ÿšข Deployment
112  
113  ```bash
114  # Docker (Development)
115  docker-compose up -d
116  
117  # Kubernetes (Production)
118  kubectl apply -f k8s/
119  kubectl get pods -n echo
120  ```
121  
122  ## ๐Ÿ“Š 9 Agents & Models
123  
124  | Agent | Model | Size | Purpose |
125  |-------|-------|------|---------|
126  | CEO | qwen2.5:14b | 14B | Strategic leadership |
127  | CTO | deepseek-coder:33b | 33B | Technology strategy |
128  | CHRO | llama3.1:8b | 8B | People management |
129  | Ops | mistral:7b | 7B | Infrastructure |
130  | PM | llama3.1:8b | 8B | Product strategy |
131  | Architect | deepseek-coder:33b | 33B | System design |
132  | UI/UX | llama3.2-vision:11b | 11B | Interface design |
133  | Dev | deepseek-coder:6.7b | 6.7B | Implementation |
134  | Test | codellama:13b | 13B | QA testing |
135  
136  ## ๐Ÿ”‘ Critical Rules
137  
138  1. **Never break tests** - `cd shared && mix test` must pass
139  2. **Compile shared first** - `cd shared && mix compile`
140  3. **Never drop DB** - Without user permission
141  4. **Use message bus** - All agent communication via Redis
142  5. **Keep it simple** - Don't overengineer
143  
144  ## ๐Ÿ“ž Getting Help
145  
146  | Need | See |
147  |------|-----|
148  | Architecture | `docs/architecture/ECHO_ARCHITECTURE.md` |
149  | Agent dev | `apps/claude.md` |
150  | Testing | `test/claude.md` |
151  | LocalCode | `scripts/claude.md` |
152  | Deployment | `docker/claude.md` or `k8s/claude.md` |
153  | Troubleshooting | `docs/snippets/` |
154  | Full index | `docs/INDEX.md` |
155  
156  ## โšก Performance
157  
158  - **LocalCode response:** 7-30s (local LLM)
159  - **Agent LLM:** 3-30s depending on model size
160  - **Test suite:** <2min (unit + integration)
161  - **Full setup:** ~30-60min (includes 48GB LLM download)
162  
163  ---
164  
165  **Quick Links:** [Full Documentation](INDEX.md) | [CLAUDE.md](../CLAUDE.md) | [README](../README.md)