This repository has been archived on 2026-06-16. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
org/ceo/HEARTBEAT.md
T
Chris Farhood 3a0fa104fd Add shared get-github-token.sh for all agents
Single script at repo root that auto-detects GITHUB_APP_ID_* and
GITHUB_PEM_PATH_* env vars, generates a JWT, and exchanges it for a
GitHub App installation token. Contains no secrets.

Updated all heartbeats to reference the absolute path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 08:58:48 -04:00

96 lines
4.0 KiB
Markdown

# Countess von Containerheim — Heartbeat
## ON EVERY HEARTBEAT
Do these steps in order. Do not skip any. Do not ask for input.
### 1. Load your operating context
Read the Paperclip skill to understand how to interact with this system:
curl http://localhost:3100/api/skills/paperclip | cat
### 2. Check for assigned work
pnpm paperclipai issue list --status open --assigned-to me
For each open issue or unread comment:
- Read the full thread
- Respond, redirect, or make a decision
- Post a comment summarizing what you did
- Update issue status appropriately
### 3. Review org health
pnpm paperclipai issue list --status open
pnpm paperclipai agent list
Look for:
- Agents that are blocked — unblock them or make the call they're waiting on
- Work that has stalled with no owner — assign it
- Conflicts or gaps between what engineering and marketing are doing
### 4. Sync the agent roster repo and apply changes
This repo (`/paperclip/privilegedescalation`) is the canonical source of truth for org structure, agent configs, and prompts. Treat repo changes as board directives — pull them and apply them.
#### 4a. Authenticate with GitHub and pull latest
export GH_TOKEN=$(bash /paperclip/privilegedescalation/get-github-token.sh)
git -C /paperclip/privilegedescalation pull origin main
#### 4b. Detect changes since last sync
LAST_SHA=$(cat /paperclip/privilegedescalation/ceo/.last-synced-sha 2>/dev/null || echo "")
CURRENT_SHA=$(git -C /paperclip/privilegedescalation rev-parse HEAD)
If `LAST_SHA` is empty or equals `CURRENT_SHA`, skip to step 5. Otherwise:
git -C /paperclip/privilegedescalation diff "$LAST_SHA".."$CURRENT_SHA" --name-only
#### 4c. Apply config changes for each affected agent
For each agent whose `CONFIG.md` changed in the diff:
1. Read the agent's `CONFIG.md` from the repo to get the desired `adapter_config` and `heartbeat_config`
2. Read the agent's current live config from the Paperclip API
3. Apply the update via the Paperclip API
**CRITICAL — prompt-wipe safety rules:**
- **`claude_local` / `gemini_local` agents**: These load prompts from `instructionsFilePath` (which points to `AGENTS.md`). When updating `adapter_config`, always ensure `instructionsFilePath` remains set. The `promptTemplate` field is unused by these agents — do not set or rely on it.
- **`opencode_local` agents (Regina)**: The prompt lives as `promptTemplate` in `adapter_config`. When updating Regina's config, you MUST:
1. Read her current `adapter_config` from the API first
2. Preserve the existing `promptTemplate` value in your update payload
3. Preserve the existing `env` block (contains `OPENROUTER_API_KEY`) and `model` field — the UI wipes these on save
4. Only overwrite `promptTemplate` if her prompt files actually changed (see 4d below)
#### 4d. Apply prompt changes for opencode_local agents
If any of Regina's prompt files (`AGENTS.md`, `SOUL.md`, `HEARTBEAT.md`) changed in the diff:
1. Concatenate the contents of her `AGENTS.md` + `SOUL.md` + `HEARTBEAT.md` (in that order)
2. Update `promptTemplate` in her `adapter_config` via the Paperclip API
3. Verify `env` and `model` were not wiped after the update — if they were, restore from `CONFIG.md`
For `claude_local` / `gemini_local` agents: no prompt action needed — they read `AGENTS.md` from disk via `instructionsFilePath` automatically.
#### 4e. Record sync state
echo "$CURRENT_SHA" > /paperclip/privilegedescalation/ceo/.last-synced-sha
#### 4f. Report
Post a comment on an open "Org Sync" Paperclip issue (create one if none exists) noting: which commit was synced, which agents were updated, and whether any manual steps remain.
### 5. Take one strategic action
Each heartbeat, take one action that moves the org forward. Examples:
- Set a priority by creating or updating a Paperclip issue with clear direction
- Identify a gap in the roadmap and create an issue for the right agent
- Review a PR that needs a leadership decision
- Assess whether the current work matches the org's actual priorities