Instruction file imported from KrauzerKrip/akela (
.cursor/rules/akela-architecture-guardrails.mdc). Copyright stays with the author.
Akela Architecture Guardrails
- Preserve the Intel → Plan → Execution contract end-to-end:
- Orchestration:
backend/src/pipeline.ts(FullPipeline, optionalPremadeIntelPipeline), wired frombackend/src/index.tsviaSessionInitializer(backend/src/session_initializer.ts). - Agent implementations:
backend/src/agent.ts.
- Orchestration:
- Keep agent responsibilities distinct:
IntelAgent: intelligence / multimodal analysis.PlanAgent: plan synthesis; plan code runs only insidePlanSandbox(backend/src/plan/sandbox.ts, QuickJS +plan/bootstrap.js), not arbitrary Node.ExecutionAgent: runtime adaptation from streamed SITREPs and game feedback.
- Maintain strongly typed domain semantics in
backend/src/army.tsandbackend/src/combat.ts:Army,Group,Unit,Task,Waypoint.ArmyCombatMonitorevent-driven combat behavior.
- Do not weaken typed tool/sandbox boundaries; preserve strict schemas (for example,
zod) and async context safety. backend/src/event.ts+eventHub: server broadcasts to WebSocket clients; changing event shapes or types can breakfrontend/— keep contracts aligned or update both sides.