KALNET Architecture Expansion: Agent Prompt Strategy
Overview: The Build Pipeline
STAGE 0: Foundation & Infrastructure
Duration: ~30 mins | Parallelization: 4 agents | Dependencies: None This stage creates the scaffolding everything else depends on. Run all 4 agents in parallel.Agent 0.1: Network & Infrastructure Layer
Role: Define networking, expose services, create ingress patterns Prompt:Agent 0.2: Persistent Storage & Data Architecture
Role: Design data layout, backup strategy, volume management Prompt:Agent 0.3: Observability & Monitoring Foundation
Role: Logging, metrics, health checks infrastructure Prompt:Agent 0.4: Security & Authentication Foundation
Role: User management, credential storage, access control patterns Prompt:STAGE 1: Core Services & Capabilities
Duration: ~45 mins | Parallelization: 4-5 agents | Dependencies: Stage 0 Once infrastructure is in place, build out the actual services. These can mostly run in parallel, with a few internal dependencies noted.Agent 1.1: Game Streaming & Remote Access
Role: Sunshine/Moonlight setup for in-home game streaming Prompt:Agent 1.2: Private Communications & Social Layer
Role: End-to-end encrypted family messaging (Matrix/Synapse or alternative) Prompt:Agent 1.3: Custom Code Deployment & CI/CD
Role: GitOps pipeline for deploying custom services and containers Prompt:Agent 1.4: Advanced n8n Workflows & Integrations ※
Role: Pre-built workflows for common KALNET tasks (depends on comms from 1.2) Prompt:Agent 1.5: Extended Discovery Service & Service Mesh
Role: Enhanced discovery with metrics, service routing, and inter-service communication Prompt:STAGE 2: Integration & Polish
Duration: ~30 mins | Parallelization: 3 agents | Dependencies: Stage 1 Now that core services exist, integrate them and polish the experience.Agent 2.1: Unified Dashboard & UI Layer
Role: Web UI for discovering, configuring, and monitoring all KALNET services Prompt:Agent 2.2: Configuration & Setup Wizard
Role: Interactive setup experience for first-time deployment Prompt:Agent 2.3: Documentation & Onboarding
Role: Complete user and developer documentation Prompt:STAGE 3: Validation & Testing
Duration: ~20 mins | Parallelization: 2 agents | Dependencies: Stage 2 Final validation and test automation.Agent 3.1: Integration Tests & Validation Suite
Role: Automated testing to ensure everything works together Prompt:Agent 3.2: Release & Deployment Validation
Role: Pre-release checklist and production deployment procedures Prompt:Execution Plan Summary
Agent Orchestration Model
Prompt Structure (What Each Agent Gets)
Each agent should receive:Coordination Points
Between Stages:- Stage N agents must wait for Stage N-1 to complete
- Completion marker: all primary deliverables present and validated
- Agents declare dependencies in their prompt
- Example: “Agent 1.4 waits for Agent 1.2 to deploy comms service”
- Fallback: if dependency not ready, agent stubs/mocks it
Parallelization Constraints
Can Run in Parallel (No Dependencies)
- Stage 0: All 4 agents (they build different concerns)
- Stage 1: Agents 1.1, 1.3, 1.5 have no dependencies
- Stage 1: Agents 1.2, 1.4 can proceed with mocks of each other
- Stage 2: All 3 agents (dashboard, wizard, docs are independent)
- Stage 3: Both agents (tests and release procedures)
Must Run Sequentially
- Stages must complete before next stage starts (dependencies flow down)
- Within stages, some soft dependencies exist (noted with ※)
Optimal Batch Sizes
- Stage 0: 4 agents (I/O bound, good parallelization)
- Stage 1: 5 agents (CPU bound for builds, good parallelization)
- Stage 2: 3 agents (mixed, good parallelization)
- Stage 3: 2 agents (validation & release, good parallelization)
Per-Agent Estimation
| Agent | Complexity | Duration | Output Lines |
|---|---|---|---|
| 0.1 | Medium | 8 mins | 250 (configs + docs) |
| 0.2 | Low | 6 mins | 150 |
| 0.3 | High | 10 mins | 400 |
| 0.4 | Medium | 8 mins | 300 |
| 1.1 | High | 12 mins | 600 |
| 1.2 | High | 12 mins | 500 |
| 1.3 | High | 12 mins | 700 |
| 1.4 | Medium | 8 mins | 400 |
| 1.5 | High | 10 mins | 600 |
| 2.1 | High | 12 mins | 1000 |
| 2.2 | Medium | 8 mins | 400 |
| 2.3 | Low | 8 mins | 2000+ (docs) |
| 3.1 | High | 12 mins | 800 |
| 3.2 | Medium | 10 mins | 350 |
Interdependencies Map
How to Use This Document
For a single agent: Copy the prompt for that agent, adjust for your specific context. For batch execution: Use agents from same stage in parallel. Example batch 1:- Skip agents you don’t need yet (e.g., skip 0.3 observability for MVP)
- Reorder within stages based on your priorities
- Merge agents if some work is redundant
- Split agents if they’re too large
Final Notes
- Each prompt is self-contained (agent doesn’t need to read others)
- Each prompt includes integration points (where it fits with others)
- Each prompt specifies success criteria (how to know it’s done)
- Prompts are written for workspace agents (Claude, but could be others)