Sam

On this page

An engineering coworker. Lives in Slack, picks up Linear tickets, opens PRs, does what you teach it.

Sam’s behavior is defined by this repo. Sam can improve by proposing changes via PR.

Sam

What Sam needs to work

Sam

General principles

Architecture: layers and recipes

Architecture

Sam is a stack from code to behaviour: the repo, the runtime (daemon, secrets, webhooks, and all connector code), identity and scope, skills, and on top the behaviours the team experiences.

Every behaviour worth designing cuts across all of those layers at once. A recipe (src/recipes/<name>/) packages one behaviour as that vertical slice: the connectors and triggers it needs, the skills it owns, and its communication contract โ€” because incident response needs a very different kind of Slack than software delivery, and one global policy can’t serve both.

Recipes declare needs; the runtime provides them. Recipes never contain connector code, never touch identity or scope, and compose only through shared artifacts (journal, Linear, Slack threads). Details and diagrams: docs/architecture.md.

My motivations - Why Sam was made?

Linear Slack Agent

Decisions?

Layout

src/
  identity.md         who Sam is
  scope.md            what Sam refuses to do
  capabilities/       what Sam always knows
  skills/             substrate skills, shared by every recipe
  recipes/            behaviour bundles: manifest + owned skills
    software-delivery/
    self-improvement/
    workspace-ops/
  runtime/            daemon, connectors, and supporting code

Capabilities, skills, recipes, and scope

All markdown under src/, loaded differently:

Rule of thumb: known on every message โ†’ capability. Known sometimes โ†’ skill. Belongs to one behaviour โ†’ that recipe. A “no” or a boundary โ†’ scope.

See src/capabilities/self-maintenance.md for the frontmatter convention and the flow for proposing changes.

Setup

Local (Docker)

cp .env.example .env
# fill in .env with your own values
docker compose up -d --build
docker compose logs -f sam

State persists to ./data/ (mounted at /data in the container, gitignored).

Note There was once a local setup available which plugged into Claude Code. It is no longer supported but feel free to hack it in again. Moved away because it was not ergonomic to login to CC on the GCP container and I didn’t want to pay again for another API key.

For a long-running deploy, follow infra/ (Terraform). Single-instance Cloud Run, GCS-backed state, Workload Identity Federation for CI deploys from GitHub Actions.

See infra/README.md.


open items

Related