Skip to content

#3 Employee Runtime #55

Description

Milestone (ARCHITECTURAL CENTERPIECE). Generalize the three hard-coded intern classes into ONE shared, config-driven Employee Runtime.

Scope (build against #2's frozen schema):

  • Refactor apps/ai/src/mission/employee.py: keep DigitalEmployee interface; turn RevOps/ProductOps/OrgIntelligence into DATA via EmployeeRoleConfig (role, goals, skills, capabilities, permissions, policies, authority, risk threshold, KPIs, memory namespace, mission types). Store role configs in the employees table from fix: 4 critical structural bugs for Week 3-5 implementation #2.
  • Separate EmployeeDefinition (what it is) from EmployeeRun (what it is doing) from Mission (persistent objective) — no runtime state in role config, no learned context in role config.
  • Shared EmployeeRuntime control loop using EXISTING Temporal primitives only. MVP patterns: Sequential, Parallel (fan-out evidence retrieval), Branch, Loop, Wait/Human Signal, Replan, Verify. Delegate + Reflect = behavior within the loop, NOT separate infra. Do NOT build a generic workflow engine.
  • Skill/capability mapping: define the composable skill set (retrieve_evidence, retrieve_memory, resolve_entities, investigate, analyze_kpi, compare_options, summarize, generate_recommendation, draft_message, verify_action, update_sop_proposal, capture_decision) with typed I/O; map existing workflow agents to skills/capabilities the 3 interns may call.

Hard architectural test (must pass): adding a 4th employee == adding a config row, NOT a new class. Write it as a test.

Tests (TDD): apps/ai/tests/mission/test_employee_runtime.py.

Do NOT touch: prd.md/README.md, migrations (frozen), mission/employee.py ONLY. Coordinate with #4 if both touch mission/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions