Files
meshcore-analyzer/docs/agents/skills/devops-fix.md
T
df28efaed9 docs(agents): contributor onboarding pack for AI-driven workflows (#1734)
## What

Adds `docs/agents/` — an onboarding pack for external contributors using
their own AI coding agent (Claude Code, Codex, Cursor, Aider, OpenClaw,
etc.).

## Why

Maintainers run an agent-driven workflow against this repo. External
contributors using agents benefit from the same discipline (TDD
red→green, PII preflight, parallel persona polish, three-axis merge
readiness) but had nothing portable to point at. This documents the
**process** and the **reusable building blocks** in an agent-agnostic
way.

## Contents

```
docs/agents/
  README.md
  WORKFLOW.md             # pipeline + planning + PII preflight + force-push + worktrees
  RULES.md                # 36 hard-won discipline rules
  TDD.md                  # red→green requirement, exemptions
  SUBAGENT-BRIEF-TEMPLATE.md
  skills/                 # 14 task playbooks (intake, fix, polish, merge-gate, release, ops...)
  personas/               # 14 review voices (carmack, dijkstra, torvalds, meshcore, taleb, ...)
```

## Scope

Docs-only. No code changes. Existing `AGENTS.md` is unchanged. All
committed text uses sanitized placeholders (`<workspace>`, `<repo>`,
`YOUR_NAME`, `YOUR_HANDLE`, etc.) — no personal names, phones, IPs,
keys, or absolute home/root paths.

## Verification

- PII preflight grep on staged diff: only matches are the literal
placeholders inside the documented sanitized example
(`YOUR_NAME|YOUR_HANDLE|...|api[_-]?key|...`).
- Off-topic skill grep on `docs/agents/`: clean (zero hits for the
wrong-language/off-topic skill names that were scrubbed from the prior
attempt).

---------

Co-authored-by: meshcore-bot <bot@meshcore.local>
Co-authored-by: Kpa-clawbot <bot@openclaw.local>
Co-authored-by: efiten <erwin.fiten@gmail.com>
2026-06-19 11:37:10 -07:00

2.0 KiB

name, description, triggers
name description triggers
devops-fix Live operational fixes — SSH, docker, sqlite, log triage, container health on staging/prod.
staging is down
prod 502
container OOM
trim staging DB
ingestor stuck
restart staging
MQTT not connecting on prod

devops-fix — Live Operational Fixes

Purpose

Diagnose and fix live operational issues on staging/prod infrastructure. SSH, docker exec/restart, sqlite operations, log triage, container health.

Scope

  • Container management (docker restart, logs, exec)
  • SQLite operations on live DBs (backup first!)
  • Log triage and error identification
  • MQTT connectivity diagnosis
  • Service health checks

Connection details

Read from MEMORY.md — do NOT hardcode IPs/credentials in this file.

Process

  1. Identify symptom (502, OOM, stuck, disconnected)
  2. SSH to relevant host (from MEMORY.md)
  3. Check container status: docker ps, docker logs --tail 50 <container>
  4. Identify root cause from logs
  5. Apply fix (restart, config change, DB trim)
  6. Verify fix (curl endpoint, check logs)

Safety rules

  • BACKUP before any destructive operation: cp db.sqlite db.sqlite.bak-$(date +%s)
  • Stop container before raw SQL on its DB: docker stop <c> && sqlite3 ... && docker start <c>
  • Never --force destructive commands without explicit user confirmation
  • Never DELETE without WHERE on a live DB
  • Log every action — write to daily memory file what you did

What NOT to do

  • Run destructive SQL without backup
  • Restart prod without checking if staging has the same issue first
  • Hardcode credentials in commands (use MEMORY.md references)
  • Assume "restart fixes it" without understanding root cause
  • Make config changes without documenting the before/after

Output format

## Diagnosis
- Symptom: <what's broken>
- Root cause: <why>
- Evidence: <log line / status output>

## Fix applied
- Action: <what you did>
- Backup: <path to backup>
- Verification: <how you confirmed it works>

## Prevention
- <suggestion to prevent recurrence>