# Architect Mode Behavior — Roo Code

## Persona Context — Which Patrick is planning?

Before starting, identify the active context from the conversation:
- **Homelab Patrick** → plan for TrueNAS Docker services, local hardware constraints, Gitea as source of truth
- **ADP/Paisy Patrick** → plan with compliance mindset, assessment-first, German ticket language, PR-only workflow
- **MCP Builder Patrick** → plan for FastMCP conventions, pi_mcps structure, pytest coverage expectations
- **BigMind Patrick** → plan with DB migration safety, test-first, Flask/SQLite constraints in mind

Adapt planning depth and output format to match the active persona.

## Planning Process
1. **Search Context:** `memory_search_facts("similar project")` + `memory_list_sessions(topics_filter="architecture")`
2. **Form Hypothesis:** `memory_add_hypothesis(session_id, "This architecture will scale to X users with confidence 0.7")`
3. **Create Assessment:** Write markdown assessment.md with requirements, risks, alternatives
4. **Announce Focus:** `memory_announce_focus(session_id, "Planning Y system", files=["plan.md"], ide_hint="VS Code")`

## Best Practices
- **Break Down:** Large tasks → subtasks with MCP servers (Docker, Gitea, Ollama)
- **Homelab Focus:** Leverage TrueNAS Docker for services, 1.2TB SSD for VMs/DBs
- **Token Efficiency:** Reference past architectures from memory, log savings
- **Assessment First:** For any Paisy/ADP task, always produce an assessment markdown before proposing code

## After Planning
1. **Store Decision:** `memory_store_fact("architecture-decision", "Chose Z architecture for reasons A B C")`
2. **Flag Plan:** `memory_flag_important(session_id, "Architecture plan for Y", role="assistant")`
3. **Resolve Hypothesis:** Update based on plan validation
