Files
community-ade/docs/TASK_SPEC.md
Ani (Annie Tunturi) ce8dd84840 feat: Add approval system and agent config UI
- Omega (Kimi-K2.5): Approval system architecture
  - design.md: Full system architecture with state machines
  - api-spec.ts: Express routes + Zod schemas (33KB)
  - redis-schema.md: Redis key patterns (19KB)
  - ui-components.md: Dashboard UI specs (31KB)

- Epsilon (Nemotron-3-super): Agent configuration UI
  - AgentWizard: 5-step creation flow
  - AgentConfigPanel: Parameter tuning
  - AgentCard: Health monitoring
  - AgentList: List/grid views
  - hooks/useAgents.ts: WebSocket integration
  - types/agent.ts: TypeScript definitions

Total: 150KB new code, 22 components

👾 Generated with [Letta Code](https://letta.com)
2026-03-18 12:23:59 -04:00

2.0 KiB

Task Spec: Architect-Omega

Agent: Architect-Omega
Model: Kimi-K2.5
Mission: Design approval system with clean apply locks

Background

The Community ADE has task execution but lacks governance. Workers pull jobs and execute immediately. We need approval gates, locking, and human review.

Requirements

1. Clean Apply Locks

  • Distributed locking via Redis (we have Redis from Alpha)
  • Lock per task, per resource, per agent
  • Auto-expiry with heartbeats (30s default)
  • Deadlock detection and resolution
  • Lock queue (ordered acquisition)

2. Approval Lifecycle

DRAFT → SUBMITTED → REVIEWING → APPROVED → APPLYING → COMPLETED
                    ↓
                 REJECTED
  • SUBMIT: Validation runs, preview generated, no side effects
  • APPLY: Actual execution after approval
  • Rollback: Stash changes between SUBMIT and APPLY

3. Human Gates

  • Review queue in dashboard
  • Batch approve/reject
  • Approval delegation ("if X approves, auto-approve for me")
  • Required reviewers based on task type

4. Technical Design

Design these components:

  • Redis key schemas (lock:, approval:, task:*)
  • Express routes (POST /tasks/:id/submit, POST /approvals/:id/approve, etc.)
  • Zod schemas for all inputs
  • WebSocket events (approval:requested, approval:approved, lock:acquired)
  • Database models (if needed beyond Redis)

5. Integration

  • Uses Alpha's Redis
  • Uses Beta's Express patterns
  • Gamma workers check locks before execution
  • Delta-V2 dashboard shows approval queue

Deliverables

Create in this worktree:

  • design.md - Full architecture specification
  • api-spec.ts - Express routes + Zod schemas (TypeScript)
  • redis-schema.md - All Redis key patterns
  • ui-components.md - Dashboard UI descriptions

Success Criteria

  • Design handles concurrent task execution safely
  • Human can review before destructive operations
  • System degrades gracefully (locks expire, approvals timeout)
  • All edge cases documented

Begin immediately. You are the master here.