Imported from aiEmployee-eu/polyglot-ai (
plans/migration/AGENTS.md). Install upstream withnpx skills add aiEmployee-eu/polyglot-ai --skill migration. Copyright stays with the author.
AGENTS.md — Kilo Code Autonomous Execution Protocol
How to Use This Document
For the human developer: Copy the prompt from the "Master Prompt" section below into Kilo Code's Code mode. The AI agent will then autonomously navigate the documentation hierarchy and execute the migration phase by phase.
For the AI agent: Follow the execution protocol below. Read documents on-demand. Execute tasks sequentially. Verify after each step.
Execution Strategy: Phased Orchestrator Approach
The migration is too large for a single prompt. Instead, use Kilo Code's Orchestrator mode to break it into sub-tasks, or execute one phase at a time in Code mode.
Recommended Approach: Phase-by-Phase in Code Mode
- You paste the Phase 0 prompt into Code mode
- Kilo Code executes all Phase 0 tasks
- You verify the result
- You paste the Phase 1 prompt
- Repeat until Phase 7 is complete
This gives you human-in-the-loop control at each phase boundary while letting Kilo Code work autonomously within each phase.
Master Prompt — Phase 0: Environment Setup
Copy this into Kilo Code Code mode:
You are building the Polyglot AI application. Read the migration documentation at plans/migration/00-INDEX.md first, then execute Phase 0 from plans/migration/09-migration-phases/01-hierarchical-task-list.md.
CRITICAL RULES:
1. Read plans/migration/01-architecture/01-system-overview.md for the complete architecture.
2. The Angular skills are at C:\Users\heyxg\.kilocode\skills\angular-developer\SKILL.md and C:\Users\heyxg\.kilocode\skills\angular-new-app\SKILL.md — read them before creating the Angular app.
3. Use the Angular CLI for ALL scaffolding — npx ng new, npx nx generate, etc.
4. Use --ai-config=agents flag when creating the app.
5. After EVERY code generation step, run ng build to verify no errors.
6. Follow the Nx monorepo structure defined in 01-system-overview.md EXACTLY.
Execute these tasks in order:
P0.1: Create the Nx workspace with Angular preset
P0.2: Convert shell to Module Federation host
P0.3: Generate 3 remote MFEs (chat, models, params)
P0.4: Generate all 8 shared libraries
P0.5: Add Tailwind CSS v4
P0.6: Port glassmorphism styles from kilo-chat.html
P0.7: Create Go service directories with go.mod files
P0.8: Create Dockerfiles and docker-compose.dev.yml
P0.9: Create AGENTS.md at repo root
P0.10: Verify ALL builds pass
Let Kilo Code handle ng new — do NOT ask me to run it manually.
Master Prompt — Phase 1: Core Frontend
Continue building Polyglot AI. Read plans/migration/02-frontend/02-shell-app.md and plans/migration/02-frontend/03-chat-microfrontend.md.
Execute Phase 1 from the HTL at plans/migration/09-migration-phases/01-hierarchical-task-list.md.
RULES:
- Use Angular CLI generators for ALL components: npx nx generate @nx/angular:component
- Use standalone components with OnPush change detection
- Use Angular Signals (signal, computed, linkedSignal) — NOT RxJS Subjects
- Port the SSE streaming logic from kilo-chat.html using Fetch API + ReadableStream
- Port the markdown renderer regex patterns from kilo-chat.html
- Read the Angular skills at C:\Users\heyxg\.kilocode\skills\angular-developer\SKILL.md for best practices
- Run ng build after each major component is created
Execute tasks P1.1 through P1.13 sequentially.
Master Prompt — Phase 2: Backend Services
Continue building Polyglot AI. Read plans/migration/01-architecture/03-microservices-architecture.md.
Execute Phase 2 from the HTL at plans/migration/09-migration-phases/01-hierarchical-task-list.md.
RULES:
- Use Go 1.24+ with chi router
- Each service follows cmd/main.go + internal/ structure
- Implement SSE streaming proxy matching kilo-proxy.py behavior (4KB chunks)
- All services expose /health and /ready endpoints
- Use slog for structured logging
- Run go build after each service is created
- Test with docker-compose up after all services are ready
Execute tasks P2.1 through P2.11 sequentially.
Master Prompt — Phase 3: Authentication
Continue building Polyglot AI. Read plans/migration/04-auth/01-supabase-setup.md and plans/migration/04-auth/02-auth-service-implementation.md.
Execute Phase 3 from the HTL.
RULES:
- Implement Supabase Auth with signals in libs/shared/auth
- Create login, register, callback, reset-password pages in shell app
- Add Google and X/Twitter OAuth buttons
- Implement functional authGuard
- Implement HTTP interceptor for JWT injection
- Implement Go JWT validation middleware using JWKS
- Use Signal Forms for auth forms (Angular 21 best practice)
NOTE: I will need to manually configure Supabase dashboard (create project, enable providers, add OAuth credentials). Prompt me when you need the Supabase URL and anon key.
Execute tasks P3.1 through P3.12.
Master Prompt — Phase 4: Remaining MFEs
Continue building Polyglot AI. Read plans/migration/02-frontend/04-models-microfrontend.md and plans/migration/02-frontend/05-params-microfrontend.md.
Execute Phase 4 from the HTL.
RULES:
- Use Angular resource API for model fetching
- Use computed signals for filtering and grouping
- Use linkedSignal for params that reset on model change
- Match the parameter ranges from plans/migration/02-frontend/05-params-microfrontend.md EXACTLY
- Wire both MFEs into the shell via Module Federation
Execute tasks P4.1 through P4.12.
Master Prompt — Phase 5: Voice AI
Continue building Polyglot AI. Read plans/migration/05-voice-ai/01-voice-architecture-overview.md.
Execute Phase 5 from the HTL.
RULES:
- Implement the VoiceAdapter interface in libs/voice/core
- Implement OpenAIRealtimeAdapter and WebRTCPipelineAdapter
- Implement Go WebSocket server in services/voice
- Implement client-side audio processing with Web Audio API
- This is the most complex phase — take it step by step
Execute tasks P5.1 through P5.9.
Master Prompt — Phase 6: Testing
Continue building Polyglot AI. Read plans/migration/08-testing/01-testing-strategy.md.
Execute Phase 6 from the HTL.
RULES:
- Use Vitest for Angular tests — NOT Jasmine/Karma
- Use table-driven tests for Go
- Use Cypress for E2E
- Aim for 80%+ coverage on critical paths
- Read C:\Users\heyxg\.kilocode\skills\angular-developer\SKILL.md testing section
Execute tasks P6.1 through P6.10.
Master Prompt — Phase 7: Deployment & Portfolio
Continue building Polyglot AI. Read plans/migration/06-devops/02-github-actions-ci-cd.md and plans/migration/07-github-portfolio/01-project-readme.md.
Execute Phase 7 from the HTL.
RULES:
- Create GitHub Actions workflows in .github/workflows/
- Create the CV-worthy README.md at repo root
- I will handle Vercel setup manually — just create the build configuration
- Use conventional commits for all git operations
Execute tasks P7.1 through P7.12.
Global Agent Rules
ANGULAR_VERSION: 21 (latest stable) GO_VERSION: 1.24+ NODE_VERSION: 22+ NX_VERSION: 21+ TAILWIND_VERSION: 4
SKILLS_LOCATION: C:\Users\heyxg.kilocode\skills\angular-developer\SKILL.md NEW_APP_SKILL: C:\Users\heyxg.kilocode\skills\angular-new-app\SKILL.md
MONOREPO: Nx with @nx/angular MFE_STRATEGY: Webpack Module Federation COMPONENT_PREFIX: app STYLESHEET_FORMAT: scss
What Requires Human Intervention
These tasks CANNOT be done by Kilo Code and require your manual action:
| Task | Why Manual | When |
|---|---|---|
| Create Supabase project | Requires browser login and dashboard UI | Phase 3, before P3.1 |
| Configure Google OAuth in Google Cloud Console | Requires Google account and consent screen setup | Phase 3, before P3.6 |
| Configure X/Twitter OAuth in developer.x.com | Requires X developer account | Phase 3, before P3.7 |
| Enter Supabase credentials in .env | Kilo Code cannot access your Supabase dashboard | Phase 3, after P3.1 |
| Create Vercel account and link repo | Requires browser login | Phase 7, before P7.1 |
| Rename GitHub org to zerostack | Requires GitHub admin access | Phase 7, before P7.10 |
| Pin repo on GitHub profile | Requires GitHub UI | Phase 7, after P7.10 |
| Take screenshots for README | Requires running app and screen capture | Phase 7, P7.11 |
Everything else — code generation, file creation, CLI commands, builds, tests — Kilo Code handles autonomously.
Quick Start: How to Begin
- Open this project in VS Code with Kilo Code extension
- Switch to Code mode
- Paste the Phase 0 Master Prompt from above
- Let Kilo Code work — approve tool uses when prompted
- When Phase 0 is complete, paste the Phase 1 Master Prompt
- Continue through all 8 phases
Total estimated prompts needed: 8 (one per phase) with minimal human intervention between phases.