Skip to content

Campaign ↔ EverRoom context#

A Campaign is the work boundary: one objective, a frozen set of repositories, Git/MR status, and agent instructions. EverRoom is the knowledge boundary: evidence, decisions, documents, and Room-scoped memory.

MetaGit stays authoritative for topology and Git state. EverRoom stays authoritative for rationale and evidence. Neither system is a mirror of the other.

                    MetaGit Campaign
                           │
              ┌────────────┴────────────┐
              │                         │
              ▼                         ▼
       MetaGit Context            EverRoom Room
              │                         │
       repositories              evidence
       components                knowledge
       topology                  decisions
       Git state                 memory
       instructions             documents
              │                         │
              └────────────┬────────────┘
                           ▼
                    Campaign Context
                           │
                           ▼
                         Agent

The integration is an optional adapter. MetaGit works when EverRoom is not installed, not running, unreachable, unauthenticated, or has no associated Room.

Why the Campaign boundary#

A workspace or repository can participate in many campaigns over time. A campaign is an intentional body of work. Associating an EverRoom Room with a campaign (not the whole workspace) keeps evidence scoped to that mission.

Campaign identity (terraform-hcp-migration) is not the EverRoom Room id (room_01J…). Persist the Room id in campaign YAML.

Configuration#

Room association lives on the campaign overlay (_campaigns/<slug>.yml), not in .metagit.yml:

context:
  providers:
    - type: everroom
      room_id: room_01J…
      endpoint: http://127.0.0.1:3210

Gateway defaults (local appconfig / environment):

Setting Source
Enabled flag METAGIT_EVERROOM_ENABLED / AppConfig.everroom.enabled
Gateway URL METAGIT_EVERROOM_URL or METAGIT_EVERROOM_ENDPOINT (default http://127.0.0.1:3210)
Bearer token METAGIT_EVERROOM_TOKEN only (never campaign YAML, Git, CLI flags, MCP output, or agent context)
Timeout METAGIT_EVERROOM_TIMEOUT (seconds)

Precedence follows existing MetaGit rules: CLI --endpoint > environment / AppConfig.load() > campaign endpoint > default loopback URL. The Room id is campaign-local.

Attach a Room#

export METAGIT_EVERROOM_URL=http://127.0.0.1:3210
export METAGIT_EVERROOM_TOKEN=…   # Gateway bearer; keep out of Git

metagit campaign everroom attach --slug terraform-hcp-migration --room room_01J…
metagit campaign everroom status --slug terraform-hcp-migration --json
metagit campaign everroom create --slug terraform-hcp-migration   # derived Room from campaign metadata
metagit campaign everroom detach --slug terraform-hcp-migration   # association only; Room is not deleted
metagit campaign everroom sync --slug terraform-hcp-migration     # generated document, fails if Gateway is down

create initializes a Room from campaign title, objective, status, and participating repos. That profile is a projection. MetaGit remains the source of campaign truth.

sync upserts a document titled Campaign Context (generated by MetaGit). It does not overwrite other Room documents.

Campaign Context#

metagit campaign context --slug terraform-hcp-migration
metagit campaign context --slug terraform-hcp-migration --json
metagit campaign context --slug terraform-hcp-migration --include decisions --include open_questions --json

MCP: metagit_campaign_context with { "campaign": "<slug>", "include": ["summary", "repositories", …] }.

The packet is versioned (context_schema_version: "1") and keeps systems separate:

Section Provenance Contents
campaign source=metagit id, objective, status
metagit source=metagit repos, components, relationships, git summary
everroom source=everroom Room, sources, decisions, documents, open questions
provenance both section-level origin list

Default includes: summary, repositories, relationships, decisions, open_questions, documents, sources. Large evidence bodies are referenced, not dumped.

Repo → EverRoom source mapping uses Git remote identity (github.com/org/repo), never local filesystem paths. Unmapped repos stay unmapped.

Authentication#

The Gateway requires a bearer token on normal API routes. Health (GET /v1/health/live, /v1/health/ready) is public. Set METAGIT_EVERROOM_TOKEN in the local environment. Tokens must never appear in logs, generated manifests, Campaign Context JSON, agent prompts, or MCP output.

What crosses the boundary#

MetaGit → EverRoom (explicit sync / create only): campaign metadata, repository identity, relationships, generated technical summary.

EverRoom → MetaGit (on-demand read): requested Room-scoped context, decision summaries, document references, open questions.

Does not cross: GitHub/GitLab tokens, repository credentials, arbitrary environment variables, source code crawls, all conversations, all memory, all mail/calendar, EverRoom bearer tokens.

v1 does not mutate MetaGit campaign state from EverRoom content (no automatic task/ADR import).

Degraded mode#

Read-only campaign context never becomes unusable because EverRoom is down:

Status Meaning Context command
NOT_CONFIGURED No provider on the campaign MetaGit-only
AVAILABLE Gateway + Room resolved Combined packet
UNAVAILABLE Timeout / connection refused Warning + MetaGit-only
AUTH_FAILED Missing or rejected token Actionable warning (METAGIT_EVERROOM_TOKEN); MetaGit-only
ROOM_NOT_FOUND Stale Room id Warning + MetaGit-only
INVALID_RESPONSE Malformed Gateway JSON Integration slice fails; MetaGit preserved

Mutating commands (attach, create, sync) fail clearly when the Gateway is unavailable.

How an agent consumes Campaign Context#

  1. Identify the campaign slug.
  2. Call metagit campaign context --slug … --json or MCP metagit_campaign_context.
  3. Use MetaGit for “what exists and what is affected?”
  4. Use EverRoom for “what do we know, why did we decide it, and what evidence surrounds it?”
  5. Cite source=metagit vs source=everroom. Do not treat generated summaries as authoritative over Room source material.
  6. Stay Room-scoped. Do not pull unrelated global EverRoom corpus through MetaGit.

See the metagit-campaign skill for the operating loop.