Skip to content

feat: Central PM Zora — persistent daemon + multi-instance project management #144

Description

@ryaker

Overview

One "PM Zora" runs persistently on the Mac Mini, receives work via Signal/Telegram, spawns project-scoped child Zoras (one per project), and coordinates them via AgentBus. Each child Zora has its own config, port, and visually distinct dashboard.

This builds directly on PR #142 (Signal secure channel) — that's the foundation. Issue #143 (project-scoped dashboard colors) is a required sub-component.

Architecture

Signal / Telegram
       │
       ▼
  PM Zora (port 8070)        ← persistent launchd daemon
       │ spawn_zora_agent / AgentBus routing
  ┌────┴────┬─────────┐
  ▼         ▼         ▼
AgentDev  AbundanceCoach  Trading
(8071)      (8072)        (8073)
  │            │            │
  └────────────┴────────────┘
          AgentBus :8090

Work Items

Pre-requisite

Group A — Start Immediately (fully parallel)

  • WI-1: Persistent daemon via launchd (com.ryaker.zora-pm.plist) — restart-on-crash, log rotation, JAVA_HOME/API key env vars — WSJF 10.0
  • WI-2: Multi-instance config layout (~/.zora/projects/<name>/config.toml + policy.toml, --config-dir CLI flag) — WSJF 9.67
  • WI-3: Project-scoped dashboard with color identity (see feat: project-scoped dashboard with color identity and named headers #143) — GET /api/project, dynamic favicon, CSS var override for project color — WSJF 6.33

Group B — After Group A (parallel with each other)

  • WI-4: spawn_zora_agent tool in orchestrator — check if instance running, spawn if not, register with AgentBus, return port — WSJF 7.50
  • WI-5: AgentBus client in Zora orchestrator — register on boot, send_to_project tool, deregister on shutdown — WSJF 8.67

Group C — After Group B + PR #142 merged

  • WI-6: PM Zora SOUL.md + Signal routing logic — @project prefix routing, LLM classification fallback, /status /spawn /stop commands — WSJF 6.25

Dependency Graph

WI-0 (PR #142 merge) ──────────────────────────────┐
                                                    │
Group A (parallel):                                 │
  WI-1 (launchd) ──────────┬──── enables WI-4      │
  WI-2 (config layout) ────┤──── enables WI-3       │
                           └──── enables WI-5       │
  WI-3 (#143 dashboard) ── standalone               │
                                                    │
Group B (parallel):                                 │
  WI-4 (spawn tool) ──────┐                        │
  WI-5 (AgentBus client) ─┴──── enables WI-6 ──────┘

Group C:
  WI-6 (PM routing + SOUL.md)   ← full PM Zora capability

WSJF Scoring

WSJF = (Cost of Delay) / Job Size, where Cost of Delay = usability + wiring + security + time_criticality

ID Title WSJF Size
WI-0 Merge PR #142 31.0 S
WI-1 launchd daemon 10.0 S
WI-2 multi-instance config 9.67 S
WI-5 AgentBus client 8.67 S
WI-4 spawn_zora_agent 7.50 M
WI-3 dashboard colors (#143) 6.33 M
WI-6 PM routing + SOUL.md 6.25 M

Key New Files

  • ~/Library/LaunchAgents/com.ryaker.zora-pm.plist
  • ~/.zora/pm/config.toml + SOUL.md
  • ~/.zora/projects/<name>/config.toml (per project)
  • src/orchestrator/tools/spawn-zora-agent.ts
  • src/integrations/agentbus/agentbus-client.ts
  • src/channels/signal/signal-pm-router.ts
  • Config/loader changes for [project] section + --config-dir flag

Verification (definition of done)

  • launchctl list | grep zora-pm shows loaded; kill → restarts in < 10s
  • Two browser tabs (ports 8071, 8072) show distinct header colors and tab titles
  • curl localhost:8071/api/project returns correct name/color
  • PM Zora conversation "spawn AgentDev" → port 8071 becomes reachable
  • agent-bus status shows PM Zora and child Zoras as registered sessions
  • Signal message → PM Zora → routes to correct child → response back to Signal sender
  • /status to PM Zora returns all running instance health

Related

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions