Koko

From joelhooks/joelclaw · View interactive version

Koko is an AI agent skill from the GitHub repository joelhooks/joelclaw. Develop and extend Koko — the Elixir/OTP agent living alongside joelclaw. Covers OTP patterns, Redis bridge protocol, shadow execution, and workload implementation.

How to use this skill

Skill file

Koko Development

For private addresses, accounts, ports, and host roles, see .brain/resources/operator-network-context.svx in the private dark-wizard repo and the tailnet-topology skill. Replace angle-bracket placeholders with the configured values before running commands.

Use this skill when working on the Koko Elixir project — the BEAM co-resident agent alongside joelclaw.

When to Use

Triggers: koko, elixir agent, beam, otp, shadow executor, koko workload, koko event, mix

Project Location

ADR Awareness

Always check relevant ADRs before implementing. Koko's architecture is ADR-driven.

| ADR | Title | Status | URL |

|-----|-------|--------|-----|

| 0114 | Elixir/BEAM/Jido Migration | proposed | joelclaw.com/adrs/0114-elixir-beam-jido-migration |

| 0115 | Koko Project Charter | proposed | joelclaw.com/adrs/0115-koko-project-charter |

| 0116 | Redis Bridge Protocol | proposed | joelclaw.com/adrs/0116-koko-redis-bridge-protocol |

| 0117 | First Workloads | proposed | joelclaw.com/adrs/0117-koko-first-workloads |

| 0118 | Shadow Executor | proposed | joelclaw.com/adrs/0118-koko-shadow-executor |

Before adding a new workload: Check ADR-0117 for the workload plan and ADR-0118 for shadow execution patterns.

Before changing Redis integration: Check ADR-0116 for the bridge protocol and phase boundaries.

Before any architectural change: Propose or update an ADR in ~/Vault/docs/decisions/.

Key Constraints

  1. Koko is read-only (Phase 1). PubSub observer only. No LPUSH drain, no authoritative writes.
  2. Shadow results only. Write to joelclaw:koko:shadow:<function> in Redis or local files. Never to Typesense, Todoist, gateway, or any production state.
  3. If Koko crashes, nothing breaks. The TypeScript stack doesn't depend on it.
  4. Redis at localhost:6379 — k8s NodePort on Overlook.

Development Commands

# Run
cd ~/Code/joelhooks/koko
mix deps.get
mix run --no-halt

# Test
mix test

# Interactive
iex -S mix
Koko.events_seen()

# Format
mix format

# Remote (from another machine)
ssh <ssh-user>@<retired-host> "cd ~/Code/joelhooks/koko && mix run --no-halt"

OTP Patterns to Follow

Implementation Phases

Phase 1: Passive Observer (current)

Phase 2: Dedicated Channel

Phase 3: Shadow Executor

Phase 4: Graduation

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.