Q-00 Architecture Synthesis: T1 Research

Agent: lead
Timestamp: 2026-05-11T02:05:00Z
Stage: T1 Research
Status: IN PROGRESS

Deep Analysis of Q-05 Answer

Knowledge Depot Decision Impact

Core Decision: LLM-wiki file-based Markdown system for MVP

Architecture Implications:

  1. Storage Layer:
  2. βœ… File-based (ext4 mounts) works well
  3. βœ… No database dependency
  4. βœ… Git version control built-in
  5. βœ… Simple backup/restore

  6. Access Pattern:

  7. βœ… Direct file I/O for agents
  8. βœ… grep/find for searching
  9. βœ… No complex API layer needed
  10. βœ… Human-readable format

  11. Scalability:

  12. βœ… Sufficient for 13 research questions
  13. βœ… Can handle 50+ answers easily
  14. βœ… SQLite enhancement available if needed
  15. βœ… No immediate scaling concerns

  16. Raspberry Pi Fit:

  17. βœ… Minimal memory overhead
  18. βœ… No ARM compatibility issues
  19. βœ… Works with slow microSD I/O
  20. βœ… Low power consumption

Framework Selection Constraints

From Q-05 Analysis: - ❌ LlamaIndex: Too heavy for Raspberry Pi - ❌ Complex RAG: Overkill for current needs - βœ… Simple file I/O: Proven to work - βœ… Optional SQLite: Lightweight enhancement

Architecture Constraint: Framework must work with file-based knowledge depot

Question Dependency Analysis

Critical Path Questions

Q-04: Work Shape / Lifecycle - Why Critical: Defines T0-T7 process that all other questions depend on - Dependencies: None - Blocks: Q-08 (Forgejo workflow), Q-12 (external coordination) - Priority: HIGH (foundational)

Q-01: Pi Teams Fit - Why Critical: Defines team structure and coordination mechanism - Dependencies: None - Blocks: Q-03 (framework comparison), Q-02 (LangGraph) - Priority: HIGH (foundational)

Q-03: Framework Comparison - Why Critical: Framework selection affects all implementation decisions - Dependencies: Q-01 (understand Pi teams first) - Blocks: Q-06 (container shape), Q-09 (runtime setup) - Priority: HIGH (architectural decision)

Implementation Questions

Q-06: Runtime Container Shape - Dependencies: Q-03 (framework decision) - Blocks: Q-09 (Bun/Pi install) - Priority: MEDIUM (implementation detail)

Q-09: Bun / Pi Install / Model Routing - Dependencies: Q-03 (framework), Q-06 (container) - Priority: MEDIUM (setup requirement)

Q-07: Toolchain / KOS Contract - Dependencies: None (D3-TUI specific) - Priority: MEDIUM (domain-specific)

Workflow Questions

Q-08: Forgejo Workflow - Dependencies: Q-04 (work lifecycle) - Priority: MEDIUM (process integration)

Q-10: Validation / Smoke Testing - Dependencies: Q-07 (toolchain) - Priority: MEDIUM (quality assurance)

Enhancement Questions

Q-11: Remote UI / Observability - Dependencies: None - Priority: LOW (nice-to-have)

Q-02: LangGraph Fit - Dependencies: Q-01, Q-03 - Priority: LOW (alternative approach)

Architecture Decision Tree

Q-04 Work Lifecycle
   ↓
Q-01 Pi Teams Fit
   ↓
Q-03 Framework Decision
   β”œβ”€β”€ pi-teams path β†’ Q-06 Container (single)
   β”œβ”€β”€ LangGraph path β†’ Q-06 Container (graph)
   └── other framework β†’ Q-06 Container (custom)
   ↓
Q-09 Runtime Setup
   ↓
Q-07 Toolchain (parallel)
   ↓
Q-08 Forgejo Workflow
   ↓
Q-10 Validation
   ↓
Q-11 UI (optional)

Framework Comparison Research

Pi Teams Analysis

Current Usage: - βœ… Working in current setup - βœ… Team coordination via claim board - βœ… Task lifecycle management - βœ… Messaging between agents - βœ… Plan approval workflow

Strengths: - βœ… Lightweight (Bun-based) - βœ… Simple configuration (teams.yaml) - βœ… tmux integration for UI - βœ… Built-in task management - βœ… Plan approval system - βœ… Low resource usage

Weaknesses: - ⚠️ Limited orchestration complexity - ⚠️ Manual task assignment - ⚠️ No built-in RAG/knowledge - ⚠️ Basic error handling

Raspberry Pi Fit: - βœ… Excellent (Bun is lightweight) - βœ… Low memory footprint - βœ… Fast startup - βœ… ARM compatible

LangGraph Analysis

Potential Benefits: - βœ… Graph-based orchestration - βœ… State management - βœ… Retry mechanisms - βœ… Complex workflow support - βœ… Checkpointing

Costs: - ❌ Heavy dependencies - ❌ Complex setup - ❌ Steep learning curve - ❌ High memory usage - ❌ Debugging complexity

Raspberry Pi Fit: - ❌ Poor (memory constraints) - ❌ Slow performance - ❌ Thermal throttling risk - ❌ Overkill for current needs

Recommendation: ❌ Avoid for MVP

CrewAI Analysis

Potential Benefits: - βœ… Agent collaboration - βœ… Task delegation - βœ… Process management - βœ… Memory sharing

Costs: - ❌ Python dependency - ❌ Complex configuration - ❌ Memory intensive - ❌ Overlap with pi-teams

Raspberry Pi Fit: - ❌ Python runtime needed - ❌ Memory constraints - ❌ Not better than pi-teams

Recommendation: ❌ Avoid for MVP

AutoGen / Microsoft Agent Framework

Potential Benefits: - βœ… Multi-agent conversation - βœ… Tool use - βœ… Workflow automation - βœ… Enterprise-grade

Costs: - ❌ Complex setup - ❌ Python dependency - ❌ Overkill for 3 agents - ❌ Debugging difficulty

Raspberry Pi Fit: - ❌ Memory constraints - ❌ Performance issues - ❌ Not needed

Recommendation: ❌ Avoid for MVP

Pydantic AI Analysis

Potential Benefits: - βœ… Typed outputs - βœ… Validation - βœ… Structured data - βœ… Integration potential

Costs: - ❌ Python dependency - ❌ Limited orchestration - ❌ Not a full framework - ❌ Overlap with existing validation

Raspberry Pi Fit: - ❌ Python needed - ❌ Limited value add - ❌ Not worth complexity

Recommendation: ❌ Avoid for MVP

Preliminary Framework Recommendation

Decision: βœ… Pi Teams for MVP

Rationale: 1. βœ… Already working in current setup 2. βœ… Lightweight and Raspberry Pi compatible 3. βœ… Simple configuration and operation 4. βœ… Built-in team coordination features 5. βœ… Low resource usage 6. βœ… Avoids Python dependency 7. βœ… Matches current workflow

Alternative Path: LangGraph could be reconsidered if: - Agent count grows beyond 5 - Complex orchestration needed - State management becomes problematic - Checkpointing required

Not Recommended: CrewAI, AutoGen, Pydantic AI (overkill, Python dependency, or not better than pi-teams)

Container Strategy Analysis

Current Setup Analysis

Observed Configuration: - βœ… Single Docker container - βœ… tmux for pane management - βœ… Bind mounts for workcell/repo - βœ… No docker-in-docker available - βœ… pi-container-sandbox doesn't exist

Strengths: - βœ… Simple operational model - βœ… Clear mount structure - βœ… Easy to manage - βœ… Low overhead - βœ… Works with current tools

Weaknesses: - ⚠️ No isolation between agents - ⚠️ Single point of failure - ⚠️ Limited resource controls

Multiple Container Analysis

Potential Benefits: - βœ… Agent isolation - βœ… Separate resource limits - βœ… Independent failure domains - βœ… Cleaner security boundaries

Costs: - ❌ Docker not available inside container - ❌ Complex setup - ❌ Inter-container communication needed - ❌ Resource overhead - ❌ Debugging complexity

Feasibility: ❌ Not possible without docker-in-docker

Recommendation: ❌ Avoid for MVP (not feasible)

pi-container-sandbox Analysis

Finding: Does not exist as a real tool

Evidence: - ❌ Not found in pi-tui or pi-coding-agent - ❌ Not in npm registry - ❌ Only mentioned in research questions - ❌ Appears to be hypothetical

Recommendation: ❌ Ignore (hypothetical, doesn't exist)

Final Container Recommendation

Decision: βœ… Single Docker Container with current setup

Rationale: 1. βœ… Already working 2. βœ… Docker not available for alternatives 3. βœ… Simple operational model 4. βœ… Clear bind mount structure 5. βœ… Low overhead 6. βœ… Matches Raspberry Pi constraints

Enhancement Path: - Future: Consider multiple containers if docker-in-docker becomes available - Future: Add resource limits if needed - Future: Explore isolation mechanisms if required

Work Lifecycle Analysis

Proposed T0-T7 Lifecycle

T0: Intake - Check claim board and log - Inspect repo state - Identify safest first issue - Draft task clock - Write to wiki

T1: Review/Research - Research exact paths and conventions - Review tool error handling - Identify documentation gaps - Verify current build state - Analyze gaps vs target

T2: Plan - Draft improved documentation - Design better error messages - Plan manifest improvements - Create comprehensive design - Define implementation plan

T3: Chunk/Dispatch - Break work into chunks - Assign to appropriate agents - Create sub-tasks if needed - Dispatch to team members

T4: Implement - Update extraction tool - Add dry-run mode - Improve discovery output - Update manifest placeholders

T5: Validate - Test extraction tool - Verify error messages - Test dry-run mode - Ensure existing build works

T6: Review/Publish - Peer review changes - Reviewer validation - Builder-reviewer signoff - Merge to main

T7: Reflect/Close - Update claim board - Write summary - Identify next task - Close issue

Artifact Requirements

Mandatory Artifacts: - Task clock with stages - Research findings document - Design document - Implementation patches - Test results - Review notes

Optional Artifacts: - Architecture diagrams - Sequence diagrams - Performance metrics - User documentation

Preliminary Architecture Recommendation

Minimal Viable Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 Docker Container                β”‚
β”‚                                                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Lead   β”‚  β”‚Researcherβ”‚  β”‚Builder-Reviewerβ”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚        β”‚          β”‚               β”‚           β”‚
β”‚        β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜               β”‚           β”‚
β”‚             β”‚                   β”‚           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”‚           β”‚
β”‚  β”‚  Pi Teams Core  β”‚β—„β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β”‚  β”‚  - Claim Board  β”‚                              β”‚
β”‚  β”‚  - Task Lifecycleβ”‚                              β”‚
β”‚  β”‚  - Messaging     β”‚                              β”‚
β”‚  β”‚  - Plan Approval β”‚                              β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                              β”‚
β”‚        β”‚                                       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                              β”‚
β”‚  β”‚  tmux Panes     β”‚                              β”‚
β”‚  β”‚  - Lead Pane    β”‚                              β”‚
β”‚  β”‚  - Researcher   β”‚                              β”‚
β”‚  β”‚  - Builder Pane β”‚                              β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                              β”‚
β”‚        β”‚                                       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                              β”‚
β”‚  β”‚  LLM-Wiki       β”‚β—„β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚  β”‚  - Research Q/A β”‚  /workcell/llm-wiki
β”‚  β”‚  - Task Logs    β”‚  /workcell/runs
β”‚  β”‚  - Architecture β”‚  /workcell/config
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                              β”‚
β”‚        β”‚                                       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                              β”‚
β”‚  β”‚  D3-TUI Repo    β”‚                              β”‚
β”‚  β”‚  - Source Code  β”‚  /work/repo
β”‚  β”‚  - Documentation β”‚
β”‚  β”‚  - Build System β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                              β”‚
β”‚                                                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
      β”‚           β”‚               β”‚
      β”‚           β”‚               β”‚
β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”
β”‚ ext4 mountβ”‚ β”‚ ext4 mountβ”‚ β”‚ ext4 mountβ”‚
β”‚ /workcell/ β”‚ β”‚ /workcell/ β”‚ β”‚ /work/repo  β”‚
β”‚ llm-wiki   β”‚ β”‚ runs      β”‚ β”‚          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Component Breakdown

Container Runtime: - βœ… Single Docker container - βœ… Debian 13 (trixie) base - βœ… Bun runtime - βœ… Pi teams installed globally - βœ… tmux for pane management

Bind Mounts: - βœ… /workcell/llm-wiki β†’ ext4 (rw) - Knowledge depot - βœ… /workcell/runs β†’ ext4 (rw) - Task runs - βœ… /workcell/config β†’ ext4 (rw) - Configuration - βœ… /work/repo β†’ ext4 (rw) - D3-TUI repository

Framework: - βœ… Pi Teams (Bun-based) - βœ… teams.yaml configuration - βœ… Claim board coordination - βœ… T0-T7 task lifecycle

Knowledge System: - βœ… LLM-wiki file-based Markdown - βœ… Research queue tracking - βœ… Answer documents - βœ… Append-only logging - ⚠️ Optional SQLite indexing

Agent Roles: - βœ… Lead: Coordination, synthesis, final decisions - βœ… Researcher: Information architecture, knowledge systems - βœ… Builder-Reviewer: Implementation, constraints, review

Workflow: - βœ… Claim-based task assignment - βœ… T0-T7 structured lifecycle - βœ… File-based artifact production - βœ… Append-only traceability

Technology Stack

Runtime: - βœ… Docker (single container) - βœ… Bun (JavaScript runtime) - βœ… Pi Teams (coordination framework) - βœ… tmux (UI panes)

Knowledge: - βœ… Markdown files - βœ… Git version control - ⚠️ SQLite (optional enhancement) - ❌ No LlamaIndex/RAG

Tooling: - βœ… Bash, grep, find - βœ… Git for version control - βœ… Standard Unix tools - ❌ No Python (not available)

Validation: - βœ… File-based smoke tests - βœ… Manual review process - βœ… Append-only logging - ❌ No headless Flycast (out of scope)

Risk Assessment

High Risks (Mitigated)

Framework Complexity: - ❌ LangGraph/CrewAI would add significant complexity - βœ… Mitigation: Use simple pi-teams

Raspberry Pi Constraints: - ❌ Memory/CPU limitations - βœ… Mitigation: Lightweight stack

Knowledge System Scaling: - ⚠️ File-based search may not scale - βœ… Mitigation: Optional SQLite available

Medium Risks (Managed)

Single Container: - ⚠️ No isolation between agents - βœ… Mitigation: Simple operational model

File-Based Knowledge: - ⚠️ Manual search for many answers - βœ… Mitigation: Good organization, optional SQLite

Task Coordination: - ⚠️ Manual claim process - βœ… Mitigation: Clear protocol, claim board

Low Risks (Acceptable)

tmux UI: - βœ… Works well for 3 agents - βœ… Simple to manage

Markdown Format: - βœ… Human and agent readable - βœ… Easy to edit

Bind Mounts: - βœ… Clear separation - βœ… Good performance

Implementation Roadmap

Phase 1: Foundation (Current)

Complete: - βœ… Q-05 Knowledge Depot (ANSWERED) - βœ… Q-00 T0 Intake (COMPLETE) - βœ… Q-00 T1 Research (IN PROGRESS)

Next: - Q-04 Work Shape / Lifecycle (CRITICAL) - Q-01 Pi Teams Fit (CRITICAL) - Q-03 Framework Comparison (DECISION)

Phase 2: Framework Decision

After Q-03 Answered: - Finalize framework choice (pi-teams expected) - Document configuration - Stage teams.yaml - Test coordination

Phase 3: Implementation

Container Setup: - Document current single container approach - Define bind mount requirements - Specify operational controls - Test resource limits

Runtime Setup: - Bun installation procedure - Pi teams installation - Model routing configuration - Agent configuration

Phase 4: Workflow Integration

Forgejo Workflow: - Issue template for T0-T7 - Comment conventions - Branch strategy - Close process

Validation: - Smoke test definitions - Validation contract - Reporting format - Inconclusive handling

Phase 5: Enhancements

Observability: - Remote UI options - Health check files - Status logging - Quick health commands

External Coordination: - External agent guide - Claim process documentation - Answer format examples - Participation rules

Questions for Team

For Researcher

  1. Q-04 Priority: Should you claim Q-04 (Work Shape) next? It's on the critical path.
  2. Q-01 Alternative: If not Q-04, Q-01 (Pi Teams Fit) is also critical.
  3. Framework Insights: Any additional thoughts on framework selection?
  4. Knowledge System: Does Q-05 answer cover all knowledge depot needs?

For Builder-Reviewer

  1. Q-06 Progress: Any early findings on container shape?
  2. Constraints: Does single container approach meet your operational needs?
  3. Toolchain: Should Q-07 (KOS Contract) be prioritized?
  4. Validation: Thoughts on Q-10 (Validation) approach?

For External Agents

  1. Question Preference: Which OPEN questions are you best positioned to answer?
  2. Constraints: Any limitations on which questions you can claim?
  3. Coordination: How can we improve the claim process for external agents?

Next Steps

Immediate (Next 30 minutes)

  1. βœ… Complete T1 research document
  2. Draft preliminary architecture answer
  3. Identify critical path questions
  4. Prepare team coordination message

Short-term (Today)

  1. Finalize Q-00 answer with recommendations
  2. Coordinate question assignments
  3. Begin Q-04 and Q-01 research
  4. Document framework decision

Medium-term (This Week)

  1. Answer all critical path questions
  2. Finalize architecture recommendation
  3. Stage configuration files
  4. Test coordination workflow

Success Criteria

MVP Success: - βœ… Three agents coordinating effectively - βœ… File-based knowledge system working - βœ… T0-T7 lifecycle defined and followed - βœ… Single container operational - βœ… D3-TUI work progressing

Architecture Success: - βœ… Minimal viable components only - βœ… Raspberry Pi compatible - βœ… Simple to operate and debug - βœ… Traceable work products - βœ… Scalable to 5+ agents if needed

Conclusion

Preliminary Recommendation: - βœ… Framework: Pi Teams (already working, lightweight) - βœ… Container: Single Docker container (current setup) - βœ… Knowledge: LLM-wiki file-based (Q-05 decision) - βœ… Workflow: T0-T7 lifecycle (needs Q-04 definition) - βœ… Coordination: Claim board + tmux panes - ❌ Avoid: LangGraph, CrewAI, complex RAG for MVP

This architecture provides a minimal viable foundation that respects Raspberry Pi constraints while enabling effective coordination among three Pi agents and external contributors. The system is already partially working and can be incrementally enhanced as needs arise.