SageOx

The hivemind for agentic engineering

Cookbooks

SageOx + Claude Code

Every Claude Code session starts with context from your team's decisions, conventions, and past discussions — and every session's discoveries flow back for future use. This cookbook walks through the full loop: setup, daily usage, and the patterns that compound over time.

Prerequisites

terminal
# Install SageOx and connect your repo
$
$
$
$

ox init adds a hook to your CLAUDE.md that runs ox agent prime at session start. That's the entire setup.

Recipe 1: context-aware coding sessions

Start Claude Code as normal. SageOx injects your Team Context automatically.

terminal
$

Your AI coworker receives:

WhatWhere it comes from
Team conventionsAGENTS.md in your Team Context repo
Architecture decisionsTranscribed discussions and recordings
Domain terminologyTeam Context definitions
Code patternsCodeDB index of your codebase

The difference: without SageOx, your AI coworker reads your code and guesses at conventions. With SageOx, it knows your team chose Postgres JSONB for metadata because the schema isn't stable, that parcel means a geographic unit not a shipping package, and that you use snake_case for API fields.

Recipe 2: index your codebase with CodeDB

CodeDB gives your AI coworker a semantic map of your codebase — far beyond what grep and file reads provide.

terminal
# Index once, updates automatically on future sessions
$

With CodeDB, your AI coworker can:

  • Search by meaning — "find the function that validates upload permissions" returns results even if "validate" and "upload" don't appear in the function name
  • Trace history — "when did the auth middleware change?" answered from git history, not guesswork
  • Navigate cross-references — understand how RecordingService connects to TranscriptPipeline across modules

Without CodeDB: AI coworker relies on grep and file reads. Works for small repos, falls apart at scale.

With CodeDB: AI coworker has a map. It finds what it needs in seconds, not minutes.

Recipe 3: capture session knowledge

Coding sessions produce valuable insights — architecture discoveries, debugging breakthroughs, refactoring rationale. Capture them so future sessions and coworkers benefit.

terminal
# Start and stop session capture inside Claude Code
$
# ... work on your feature, debug an issue, refactor a module ...
$

The session transcript — your questions, the AI coworker's reasoning, decisions made — gets committed to your repo's Ledger. Future sessions can reference it.

High-value moments to capture:

  • Debugging sessions where you root-cause a tricky bug
  • Architecture decisions made mid-implementation
  • Refactoring rationale ("we're splitting this service because...")
  • Onboarding exploration of unfamiliar code

Recipe 4: multiplayer — shared context across AI coworkers

When multiple people (or multiple agents) work on the same repo, they all receive the same Team Context. Decisions made in one session become available to all future sessions.

Loading diagram...
Mermaid diagram

This works with any orchestration layer — terminal sessions, IDE integrations, OpenClaw, or custom agent factories. The integration point is always ox agent prime via CLAUDE.md.

Agent factory setup

If you're using OpenClaw or another agent factory that spawns Claude Code sessions:

  1. The factory starts Claude Code in your repo
  2. Claude Code reads CLAUDE.md and runs ox agent prime
  3. Team Context flows in — no factory-specific configuration needed
  4. Session artifacts get captured if /ox-session-start is configured

The CLAUDE.md hook is the universal integration point. Any tool that starts Claude Code in your repo gets SageOx context for free.

The compounding loop

The real value isn't any single session. It's the loop:

  1. You record a decision (Loom walkthrough, voice memo, Slack thread via OpenClaw)
  2. SageOx processes it into structured Team Context
  3. Your AI coworker references it in the next coding session
  4. That session produces new insights captured to the Ledger
  5. Future sessions start smarter because of steps 1–4

After a week, your AI coworker knows not only your code but why it's structured the way it is. After a month, it has context that would take a new hire weeks to absorb.

What's next