Skip to content

lore cairnet wire rollout

Operator-facing playbook for ratifying lore_cairnet: required across the 5 governed slugs that need it. Each wave produces one consumer-repo PR (decision doc + contract flip) plus two operator-driven Pebble HTTP POSTs (LORE collection + CAIRNET agent registrations — not PRs).

The control-plane work (probe + verb + prompt + applicability) is shipped in PR sub-project-E. This runbook governs what happens after that PR merges.

Before running any wave:

  1. Token in env. PETROVA_PEBBLE_TOKEN must be set on the operator machine (any shell that will invoke petrova doctor or petrova lore-cairnet-status). Without it, every wired slug surfaces unreachable "PETROVA_PEBBLE_TOKEN not set" — a clear actionable signal, not a regression.
    Terminal window
    echo "${PETROVA_PEBBLE_TOKEN:+set}"
    # expect: set
  2. Endpoint resolution. Default is https://mcp.devarno.cloud. Override via PETROVA_PEBBLE_ENDPOINT for staging/dev.
  3. petrova doctor --self-check passes. Confirms spine machinery loads with the new probe.
  4. Prompt available. core/playbook/prompts/09-lore-cairnet-wire.md exists in the consumer’s pinned core/playbook/prompts submodule.

Both waves halt at the gate-review checkpoint before Phase 2 starts.

WaveRepoWhy this slot
1grace-hqalready running OpenClaw fleet; agent-emission story is most concrete; smallest blast radius for procedure validation
2kahn-hqagent-fleet observability tool; second-most-natural emitter; canary for batch counting

After wave 2, gate review — answer in writing (decision doc or runbook update):

  • Did the probe correctly resolve LORE 2xx + CAIRNET emission count for both slugs?
  • Did PETROVA_PEBBLE_TOKEN resolution work as expected on the operator’s machine? Any surprises in the env-var chain?
  • Is the silent-agent threshold (0 stones in 30d) producing false-failings? If a wired slug genuinely emits intermittently, the threshold may need a window adjustment, OR the slug should be flipped to not_applicable until ready.
  • Is the emission_budget_30d default of 50 reasonable in practice? Calibrate per slug if needed (each per-slug recalibration is its own dated decision doc).

If yes to any: pause Phase 2; fix cli/src/probes/lore_cairnet.ts / cli/src/verbs/lore_cairnet_status.ts / runbook defaults; re-test against waves 1–2 evidence; then unblock Phase 2.

Per-slug Pebble registrations are independent (no cross-slug review conflicts); consumer-repo PRs (decision doc + contract flip) likewise. These three may overlap.

WaveRepo
3achoco-hq
3bstratt-hq
3cdevarno-cloud (last; superproject — 28 submodules each with potential agent emissions)

devarno-cloud is intentionally last in Phase 2: its single registry-level wiring covers a population of submodules that may each grow their own agent stories over time. Calibrating emission_budget_30d here benefits from the wave-1/2/3a/3b observations.

Copied verbatim into each consumer repo at wire-time (one PR per slug):

---
title: Wire <repo> to LORE + CAIRNET
date: YYYY-MM-DD
status: ratified
mr_compliance: [MR-1, MR-7, MR-13]
ranks_under: <repo's north-star intent doc>
---
## Context
Per `docs/runbooks/lore-cairnet-wire-rollout.md` in petrova-codes, this repo is in wave <N>. Sub-project E's adoption decision (petrova-codes:`docs/decisions/2026-05-01-lore-cairnet-wire-adoption.md`) ratified `integrations_applicability.lore_cairnet: required` for this repo on 2026-05-01.
## Decision
Authorise the wiring per `core/playbook/prompts/09-lore-cairnet-wire.md` (Phase 0 + Phases 1–6). LORE collection slug `<lore_collection_slug>` registered in Pebble. CAIRNET agent registered as `<cairnet_agent_id>`. Initial `emission_budget_30d` set to `<N>` (calibrate after 30d of observations). Decay policy `<90d>`.
Rollback: revert this repo's contract block to `status: pending`. Pebble registrations are kept (collections + agents are append-only by convention; un-registering would invalidate historical emissions).
## Consequences
- `petrova doctor --slug=<repo>` reports `lore_cairnet: ok` once propagated.
- `.petrova/contract.yaml.integrations.lore_cairnet.status` flips from `pending` to `wired` in this PR.
- Operator runs `petrova lore-cairnet-status <repo>` for ad-hoc inspection.
- `emission_budget_30d` recalibration is a separate dated decision doc (per slug).
  • Spec: docs/superpowers/specs/2026-05-01-petrova-lore-cairnet-spec.md
  • Plan: docs/superpowers/plans/2026-05-01-petrova-lore-cairnet-plan.md
  • Decision: docs/decisions/2026-05-01-lore-cairnet-wire-adoption.md
  • Prompt: core/playbook/prompts/09-lore-cairnet-wire.md
  • Sub-project E’ candidate — active emission rate-limiter (petrova lore-cairnet-throttle) that enforces emission_budget_30d by rejecting writes when over-budget. Requires Pebble write-side auth + quota state.
  • Per-slug emission_budget_30d calibration — separate dated decision doc per slug, informed by 30d of observed emission patterns.
  • Pebble HEAD endpoints for /api/knowledge/repos/<slug> (cheaper probe; tracked as cross-repo follow-up against devarno-cloud/lore).
  • Cross-repo Pebble extensions (e.g. /api/cairn/stones?fleet=true aggregations) for fleet-wide views — out of scope for sub-project E.