Skip to main content

KALNET Agent Prompts: Quick Reference

Use this as a lookup table. See the full prompts in KALNET-AGENT-STRATEGY.md.

STAGE 0: Foundation (30 mins)

Agent 0.1: Network & Infrastructure

Duration: 8 mins | Files: 4 | Complexity: Medium
Key Output: Traefik proxy, docker-compose.prod.yml, routing config
Integration: All other services depend on this
Validation: docker-compose build && docker-compose up -d
Quick Brief:
  • Traefik reverse proxy (centralized routing)
  • Service labels for automatic routing
  • Health checks + resource limits
  • TLS/SSL foundation

Agent 0.2: Persistent Storage & Data Architecture

Duration: 6 mins | Files: 3 | Complexity: Low
Key Output: init-storage.sh, storage structure, backup strategy
Integration: All data-bearing services depend on this
Validation: ./init-storage.sh && ls -la nas-storage/
Quick Brief:
  • Volume management strategy
  • Storage initialization script (idempotent)
  • Data layout for Jellyfin, n8n, Samba
  • Backup/recovery procedures

Agent 0.3: Observability & Monitoring

Duration: 10 mins | Files: 5 | Complexity: High
Key Output: Logging aggregation, metrics collector, health dashboard
Integration: Used by Stage 2 Dashboard (2.1)
Validation: Health checks visible in logs, metrics accessible
Quick Brief:
  • Centralized logging (Loki or file-based)
  • Prometheus-compatible metrics
  • Go-based metrics collector
  • HTML dashboard for service status
  • Alert rules + thresholds

Agent 0.4: Security & Authentication

Duration: 8 mins | Files: 4 | Complexity: Medium
Key Output: Security config, secrets template, firewall rules, auth strategy
Integration: Secrets used by all services
Validation: ./init-security.sh && cat .secrets.example
Quick Brief:
  • Auth strategy per service (Jellyfin, n8n, Samba, API key)
  • Secrets management (gitignore, environment injection)
  • Firewall rules (ufw for ArchLinux)
  • Access control matrix
  • Pre/post-deployment checklists

STAGE 1: Core Services (45 mins)

Agent 1.1: Game Streaming & Remote Access

Duration: 12 mins | Files: 6 | Complexity: High
Key Output: Sunshine Docker setup, Moonlight client guides, game import scripts
Integration: Feeds into Dashboard (2.1)
Validation: Stream a game from another device
Quick Brief:
  • Sunshine container (game streaming server)
  • Moonlight client setup (iOS, Android, Windows, Mac, Linux)
  • Integration with Jellyfin (game discovery)
  • Performance tuning (bitrate, resolution, FPS)
  • Game library import

Agent 1.2: Private Communications & Social Layer

Duration: 12 mins | Files: 5 | Complexity: High
Key Output: Matrix/Synapse Docker setup, client guides, room structure
Integration: Used by 1.4 (n8n notifications), 2.1 (dashboard notifications)
Validation: Send a message via Element app
Quick Brief:
  • Matrix/Synapse server (E2E encrypted family chat)
  • Element client setup (Web, iOS, Android)
  • Default room structure (#general, #alerts, #requests, #projects)
  • Backup/recovery for chat history
  • Encryption key management

Agent 1.3: Custom Code Deployment & CI/CD

Duration: 12 mins | Files: 5+ | Complexity: High
Key Output: Webhook receiver, deployment pipeline, Dockerfile templates
Integration: Builds and deploys everything, critical infrastructure
Validation: Git push triggers automatic deploy
Quick Brief:
  • Git webhook receiver (on push → build → deploy)
  • Deployment pipeline (validate, build, test, deploy, healthcheck, rollback)
  • Dockerfile templates (Go, Python, Node, Rust)
  • Version tagging (semver, git commit hash)
  • Deployment status → notifications to chat

Agent 1.4: Advanced n8n Workflows & Integrations

Duration: 8 mins | Files: 7+ | Complexity: Medium
Key Output: Pre-built workflows (JSON exports), integration guide, templates
Integration: Sends notifications via 1.2 (comms), integrates with everything
Validation: Import a workflow, test it, verify notification sent
Quick Brief:
  • Pre-built workflows (file added → notify, service down → alert, etc.)
  • Webhook receiver for external triggers
  • API integration patterns (HTTP, REST)
  • Secrets management in n8n
  • Testing/debug mode instructions
Note: Soft dependency on 1.2 (comms). Can proceed with mock notification service.

Agent 1.5: Extended Discovery Service & Service Mesh

Duration: 10 mins | Files: 5 | Complexity: High
Key Output: Enhanced Go service, service mesh config, API specification
Integration: Used by Dashboard (2.1), deployment pipeline (1.3)
Validation: Query service registry, get responses
Quick Brief:
  • Service registration API (dynamic service discovery)
  • Service-to-service communication (authentication, routing)
  • Circuit breaker pattern (fail gracefully)
  • Metrics (request count, latency, error rate per service)
  • Admin API (register, deregister, list services)
  • Integration with deployment pipeline (auto-register on deploy)

STAGE 2: Integration & Polish (30 mins)

Agent 2.1: Unified Dashboard & UI Layer

Duration: 12 mins | Files: 4-5 | Complexity: High
Key Output: React/vanilla JS dashboard app, API server, screenshots
Integration: Displays data from 0.3, 1.1, 1.2, 1.5
Validation: Dashboard loads, shows all services, updates in real-time
Quick Brief:
  • React or vanilla JS single-page app
  • Service status cards (live from Discovery Service)
  • Activity feed (recent events)
  • System metrics (CPU, memory, disk, network - graphs)
  • Quick action buttons (restart service, view logs, run backup)
  • Mobile responsive, dark mode, accessibility
  • WebSocket for real-time updates (with polling fallback)

Agent 2.2: Configuration & Setup Wizard

Duration: 8 mins | Files: 4 | Complexity: Medium
Key Output: Interactive setup wizard (Go), config schema, validation scripts
Integration: Used on first deployment, reusable for reconfig
Validation: Run wizard, verify generated config files
Quick Brief:
  • Interactive setup (asks about network, services, storage, users)
  • Config file generation (YAML with all options documented)
  • Pre-flight validation (disk space, ports, permissions)
  • Post-setup validation (can reach all services)
  • Re-runnable (safe to update config anytime)
  • Environment variable overrides (Docker/k8s friendly)

Agent 2.3: Documentation & Onboarding

Duration: 8 mins | Files: 10+ | Complexity: Low
Key Output: Complete docs site (Markdown), guides per service, quick ref cards
Integration: Comprehensive reference for everything
Validation: Docs searchable, keyboard navigable, links working
Quick Brief:
  • User guides (installation, service guides, common tasks, troubleshooting)
  • Developer guides (API reference, architecture, contributing, debugging)
  • Quick reference cards (CLI commands, API endpoints, service ports, shortcuts)
  • Video tutorials (2-5 min each, optional)
  • Printed cheat sheet PDFs

STAGE 3: Validation & Testing (20 mins)

Agent 3.1: Integration Tests & Validation Suite

Duration: 12 mins | Files: 5 | Complexity: High
Key Output: Test suite (Go), performance benchmarks, stress tests
Integration: Validates all of Stages 0-2
Validation: ./run-tests.sh passes
Quick Brief:
  • Integration tests (all services start, health checks pass, cross-service communication works)
  • User flow tests (create account → login → use service → logout)
  • Error scenario tests (crash → recover, network fail → recover)
  • Performance tests (startup time, API latency, throughput)
  • Stress tests (24-hour run, memory leaks, disk usage monitoring)
  • Runs in <5 minutes

Agent 3.2: Release & Deployment Validation

Duration: 10 mins | Files: 4 | Complexity: Medium
Key Output: Release scripts, deployment procedures, rollback automation
Integration: Final step before production
Validation: Automated release, zero-downtime deployment, successful rollback
Quick Brief:
  • Semantic versioning (x.y.z)
  • Automated changelog generation
  • Pre-release checklist (tests pass, docs updated, security reviewed)
  • Staging deployment (test before production)
  • Production deployment (zero-downtime)
  • Automatic rollback (if health checks fail)
  • Health monitoring during/after deployment
  • Notifications to family (deployment status)

Lookup by Function

I Need to…

…add a new service to KALNET → Use Agent 1.3 (CI/CD) + Agent 1.5 (Discovery) → Push code to git, pipeline auto-deploys, discovery auto-registers …access KALNET from my phone → Use Agent 2.1 (Dashboard) for UI → Use Agent 1.1 (Games), 1.2 (Comms), or Jellyfin directly …backup my data → Use Agent 0.2 (Storage) for backup strategy → Use Agent 1.4 (n8n) to automate backups …see what services are running → Use Agent 1.5 (Discovery Service) to query /discover → Use Agent 2.1 (Dashboard) to view status visually …set up encryption → Use Agent 0.4 (Security) for TLS → Use Agent 1.2 (Comms) for E2E chat encryption …automate something → Use Agent 1.4 (n8n) to build the workflow …deploy custom code → Use Agent 1.3 (CI/CD) to git push → auto-deploy …understand the system → Use Agent 2.3 (Docs) or KALNET-ARCHITECTURE.md

Quick Prompts for Copy-Paste

Below are ultra-short versions if you want to prompt agents directly without reading the full documents.

0.1: Network & Infrastructure

Build KALNET's networking layer. Create:
1. Traefik reverse proxy service (docker-compose addition)
2. Service routing rules with health checks
3. TLS/SSL configuration (self-signed for MVP)
4. Environment variables template
5. Networking architecture documentation

Use docker-compose label syntax for automatic routing.
All services should be accessible through Traefik on ports 80/443.
Include validation commands.

0.2: Storage & Data

Design KALNET's storage layer. Create:
1. Volume initialization script (bash, idempotent)
2. Directory structure for media, backups, configs
3. Data layout documentation (what service uses what)
4. Backup and recovery procedures

Make it work across Linux/Mac/Windows hosts.
Include permission/ownership model.
Add validation script to verify storage is ready.

0.3: Observability

Build KALNET's observability layer. Create:
1. Centralized logging (file-based or Loki)
2. Metrics collector (lightweight, Go-based)
3. HTML health dashboard
4. Alert rules file (threshold definitions)

Include logging configuration for docker-compose.
Metrics should integrate with Discovery Service.
Dashboard should show service status, recent logs, resource usage.

0.4: Security

Design KALNET's security layer. Create:
1. Authentication strategy (per service)
2. Secrets management (template, gitignore)
3. Firewall rules (ufw for ArchLinux)
4. Access control matrix
5. Pre/post-deployment security checklist

Be family-friendly (simple enough for non-tech users).
Document all security trade-offs.
Include initialization script for permissions.

1.1: Game Streaming

Build game streaming for KALNET. Create:
1. Sunshine Docker container setup
2. Moonlight client guides (iOS, Android, Windows, Mac)
3. Game import script
4. Integration with Jellyfin (game library)
5. Performance tuning guide

Support low-latency streaming over WiFi.
Include bitrate recommendations.

1.2: Private Communications

Build KALNET's communications layer. Create:
1. Matrix/Synapse Docker setup (or alternative)
2. Client setup guides (Element, Web, Mobile)
3. Default room templates (#general, #alerts, #requests)
4. E2E encryption & backup procedures
5. Integration points for webhooks

Support notifications from n8n and dashboards.
Keep family-only (simple user management).

1.3: CI/CD Pipeline

Build KALNET's deployment pipeline. Create:
1. Git webhook receiver (Go)
2. Deployment orchestration script (bash)
3. Dockerfile templates (Go, Python, Node, Rust)
4. Health check + rollback on failure
5. Version tagging and deployment logging

Support git push → auto-deploy workflow.
Include pre/post deployment validation.
Notify deployment status to family chat.

1.4: n8n Workflows

Build KALNET's automation layer. Create:
1. Pre-built workflow templates (JSON exports)
   - File added to NAS → notify chat
   - Service down → alert family
   - Scheduled backup → run daily
2. Workflow development guide
3. Integration patterns (webhooks, HTTP, files)
4. Secrets management in n8n

Include example workflows ready to import.
Document how to test and debug workflows.

1.5: Service Mesh

Extend KALNET's Discovery Service into a service mesh. Create:
1. Enhanced discovery service (Go)
   - Service registration API
   - Custom metadata support
   - Service-to-service auth
   - Circuit breaker pattern
2. Service mesh config
3. Admin API documentation

Support stateless deployment (no persistent state).
Include tracing (correlation IDs).
Add metrics (latency, error rate per service).

2.1: Dashboard

Build KALNET's unified dashboard. Create:
1. Single-page app (React or vanilla JS)
2. Service status cards (real-time from Discovery)
3. Activity feed (recent events)
4. System metrics graphs (24h historical)
5. Quick action buttons (restart, logs, backup)
6. Mobile responsive + dark mode

Keep &lt;500KB initial load.
Use WebSocket (with polling fallback).
Include accessibility (WCAG 2.1 AA).

2.2: Setup Wizard

Build KALNET's configuration system. Create:
1. Interactive setup wizard (Go)
2. Config file generation (YAML)
3. Pre-flight validation (disk, ports, permissions)
4. Re-runnable (safe to update config)
5. Environment variable overrides

Make it non-technical friendly.
Support &lt;5 minute setup.
Include clear error messages.

2.3: Documentation

Write KALNET's complete documentation. Create:
1. User guides (install, services, common tasks, troubleshoot)
2. Developer guides (APIs, architecture, contributing)
3. Quick reference cards (CLI, endpoints, ports)
4. Examples for common tasks

Keep it searchable and keyboard navigable.
Include per-service guides.
Add video tutorial outline (optional).

3.1: Tests

Build KALNET's test suite. Create:
1. Integration tests (all services, cross-service communication)
2. User flow tests (realistic journeys)
3. Error scenario tests (failures + recovery)
4. Performance benchmarks
5. Stress test (24-hour run, memory/disk monitoring)

Make tests automated (CI/CD compatible).
Clear pass/fail output.
Detailed failure reports.
Run in &lt;5 minutes.

3.2: Release & Deployment

Create KALNET's release procedures. Create:
1. Release script (semantic versioning, changelog)
2. Staging deployment validation
3. Production deployment (zero-downtime)
4. Automatic rollback (health check failure)
5. Pre-release checklist

Support &lt;30 second deployments.
Auto-rollback on health check fail.
Notify family of deployment status.
Document all procedures clearly.

When to Run Each Agent

Agent | Depends On | Blocks | Priority | When to Run
─────────────────────────────────────────────────────
0.1   | -          | Most   | CRITICAL | First
0.2   | 0.1        | Most   | HIGH     | With 0.1
0.3   | 0.1        | 2.1    | MEDIUM   | With 0.2
0.4   | 0.1        | 1.2+   | HIGH     | With 0.2
1.1   | 0.1+0.2    | 2.1    | MEDIUM   | After Stage 0
1.2   | 0.4        | 1.4    | HIGH     | After Stage 0
1.3   | 0.1        | 1.5    | CRITICAL | After Stage 0
1.4   | 0.4+1.2    | 2.1    | MEDIUM   | After Stage 0
1.5   | 0.1+1.3    | 2.1    | HIGH     | After Stage 0
2.1   | 0.3+1.*    | -      | MEDIUM   | After Stage 1
2.2   | 0.1+0.2    | -      | LOW      | After Stage 0
2.3   | All        | -      | LOW      | Anytime
3.1   | Stages 0-2 | 3.2    | HIGH     | After Stage 2
3.2   | 3.1        | -      | MEDIUM   | After 3.1

Last updated: Jan 30, 2025
KALNET Status: MVP deployed, architecture ready for expansion
Next Steps: Pick a stage and start running agents! 🚀