2026-03-21 00:22:37 +00:00
|
|
|
# formulas/run-supervisor.toml — Supervisor formula (health monitoring + remediation)
|
|
|
|
|
#
|
|
|
|
|
# Executed by supervisor/supervisor-run.sh via cron (every 20 minutes).
|
|
|
|
|
# supervisor-run.sh creates a tmux session with Claude (sonnet) and injects
|
|
|
|
|
# this formula with pre-collected metrics as context.
|
|
|
|
|
#
|
|
|
|
|
# Steps: preflight → health-assessment → decide-actions → report → journal
|
|
|
|
|
#
|
|
|
|
|
# Key differences from planner/gardener:
|
|
|
|
|
# - Runs every 20min — lightweight health check
|
fix: Remove Matrix integration — notifications move to forge + OpenClaw (#732)
Remove all Matrix/Dendrite infrastructure:
- Delete lib/matrix_listener.sh (long-poll daemon), lib/matrix_listener.service
(systemd unit), lib/hooks/on-stop-matrix.sh (response streaming hook)
- Remove matrix_send() and matrix_send_ctx() from lib/env.sh
- Remove MATRIX_HOMESERVER auto-detection, MATRIX_THREAD_MAP from lib/env.sh
- Remove [matrix] section parsing from lib/load-project.sh
- Remove Matrix hook installation from lib/agent-session.sh
- Remove notify/notify_ctx helpers and Matrix thread tracking from
dev/dev-agent.sh and action/action-agent.sh
- Remove all matrix_send calls from dev-poll.sh, phase-handler.sh,
action-poll.sh, vault-poll.sh, vault-fire.sh, vault-reject.sh,
review-poll.sh, review-pr.sh, supervisor-poll.sh, formula-session.sh
- Remove Matrix listener startup from docker/agents/entrypoint.sh
- Remove append_dendrite_compose() and setup_matrix() from bin/disinto
- Remove --matrix flag from disinto init
- Clean Matrix references from .env.example, projects/*.toml.example,
formulas/*.toml, AGENTS.md, BOOTSTRAP.md, README.md, RESOURCES.md,
PHASE-PROTOCOL.md, and all agent AGENTS.md/PROMPT.md files
Status visibility now via Codeberg PR/issue activity. Human interaction
via vault items through forge. Proactive alerts via OpenClaw heartbeats.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:53:56 +00:00
|
|
|
# - Primarily READS state, rarely WRITES (no PRs, just journal)
|
2026-03-26 09:09:58 +00:00
|
|
|
# - Checks vault state for pending procurement items
|
fix: Remove Matrix integration — notifications move to forge + OpenClaw (#732)
Remove all Matrix/Dendrite infrastructure:
- Delete lib/matrix_listener.sh (long-poll daemon), lib/matrix_listener.service
(systemd unit), lib/hooks/on-stop-matrix.sh (response streaming hook)
- Remove matrix_send() and matrix_send_ctx() from lib/env.sh
- Remove MATRIX_HOMESERVER auto-detection, MATRIX_THREAD_MAP from lib/env.sh
- Remove [matrix] section parsing from lib/load-project.sh
- Remove Matrix hook installation from lib/agent-session.sh
- Remove notify/notify_ctx helpers and Matrix thread tracking from
dev/dev-agent.sh and action/action-agent.sh
- Remove all matrix_send calls from dev-poll.sh, phase-handler.sh,
action-poll.sh, vault-poll.sh, vault-fire.sh, vault-reject.sh,
review-poll.sh, review-pr.sh, supervisor-poll.sh, formula-session.sh
- Remove Matrix listener startup from docker/agents/entrypoint.sh
- Remove append_dendrite_compose() and setup_matrix() from bin/disinto
- Remove --matrix flag from disinto init
- Clean Matrix references from .env.example, projects/*.toml.example,
formulas/*.toml, AGENTS.md, BOOTSTRAP.md, README.md, RESOURCES.md,
PHASE-PROTOCOL.md, and all agent AGENTS.md/PROMPT.md files
Status visibility now via Codeberg PR/issue activity. Human interaction
via vault items through forge. Proactive alerts via OpenClaw heartbeats.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:53:56 +00:00
|
|
|
# - Conversation memory via journal
|
2026-03-21 00:22:37 +00:00
|
|
|
|
|
|
|
|
name = "run-supervisor"
|
fix: Remove Matrix integration — notifications move to forge + OpenClaw (#732)
Remove all Matrix/Dendrite infrastructure:
- Delete lib/matrix_listener.sh (long-poll daemon), lib/matrix_listener.service
(systemd unit), lib/hooks/on-stop-matrix.sh (response streaming hook)
- Remove matrix_send() and matrix_send_ctx() from lib/env.sh
- Remove MATRIX_HOMESERVER auto-detection, MATRIX_THREAD_MAP from lib/env.sh
- Remove [matrix] section parsing from lib/load-project.sh
- Remove Matrix hook installation from lib/agent-session.sh
- Remove notify/notify_ctx helpers and Matrix thread tracking from
dev/dev-agent.sh and action/action-agent.sh
- Remove all matrix_send calls from dev-poll.sh, phase-handler.sh,
action-poll.sh, vault-poll.sh, vault-fire.sh, vault-reject.sh,
review-poll.sh, review-pr.sh, supervisor-poll.sh, formula-session.sh
- Remove Matrix listener startup from docker/agents/entrypoint.sh
- Remove append_dendrite_compose() and setup_matrix() from bin/disinto
- Remove --matrix flag from disinto init
- Clean Matrix references from .env.example, projects/*.toml.example,
formulas/*.toml, AGENTS.md, BOOTSTRAP.md, README.md, RESOURCES.md,
PHASE-PROTOCOL.md, and all agent AGENTS.md/PROMPT.md files
Status visibility now via Codeberg PR/issue activity. Human interaction
via vault items through forge. Proactive alerts via OpenClaw heartbeats.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:53:56 +00:00
|
|
|
description = "Factory health monitoring: assess metrics, fix issues, write journal"
|
2026-03-21 00:22:37 +00:00
|
|
|
version = 1
|
|
|
|
|
model = "sonnet"
|
|
|
|
|
|
|
|
|
|
[context]
|
|
|
|
|
files = ["AGENTS.md"]
|
|
|
|
|
|
|
|
|
|
[[steps]]
|
|
|
|
|
id = "preflight"
|
|
|
|
|
title = "Review pre-collected metrics"
|
|
|
|
|
description = """
|
|
|
|
|
The pre-flight metrics have already been collected by supervisor/preflight.sh
|
|
|
|
|
and injected into your prompt above. Review them now.
|
|
|
|
|
|
|
|
|
|
1. Read the injected metrics data carefully (System Resources, Docker,
|
2026-03-25 08:34:22 +00:00
|
|
|
Active Sessions, Phase Files, Stale Phase Cleanup, Lock Files, Agent Logs,
|
2026-03-26 09:09:58 +00:00
|
|
|
CI Pipelines, Open PRs, Issue Status, Stale Worktrees).
|
2026-03-25 08:34:22 +00:00
|
|
|
Note: preflight.sh auto-removes PHASE:escalate files for closed issues
|
|
|
|
|
(24h grace period). Check the "Stale Phase Cleanup" section for any
|
|
|
|
|
files cleaned or in grace period this run.
|
2026-03-21 00:22:37 +00:00
|
|
|
|
fix: {project}-ops repo — separate operations from code (#757) (#767)
Fixes #757
## Changes
Separate operations from code into {project}-ops repo pattern. Added OPS_REPO_ROOT infrastructure (env.sh, load-project.sh, formula-session.sh with ensure_ops_repo helper). Updated all 8 agent scripts and 7 formulas to read/write vault items, journals, evidence, prerequisites, RESOURCES.md, and knowledge from the ops repo. Added setup_ops_repo() to disinto init for automatic ops repo creation and seeding. Removed migrated data from code repo (vault data dirs, planner journal/memory/prerequisites, supervisor journal/best-practices, evidence, RESOURCES.md). Updated all documentation. 55 files changed, ShellCheck clean, all 38 phase tests pass.
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/767
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-26 19:55:12 +01:00
|
|
|
2. Check vault state: read $OPS_REPO_ROOT/vault/pending/*.md for any procurement items
|
2026-03-26 09:09:58 +00:00
|
|
|
the planner has filed. Note items relevant to the health assessment
|
|
|
|
|
(e.g. a blocked resource that explains why the pipeline is stalled).
|
2026-03-21 00:22:37 +00:00
|
|
|
|
|
|
|
|
3. Read the supervisor journal for recent history:
|
fix: {project}-ops repo — separate operations from code (#757) (#767)
Fixes #757
## Changes
Separate operations from code into {project}-ops repo pattern. Added OPS_REPO_ROOT infrastructure (env.sh, load-project.sh, formula-session.sh with ensure_ops_repo helper). Updated all 8 agent scripts and 7 formulas to read/write vault items, journals, evidence, prerequisites, RESOURCES.md, and knowledge from the ops repo. Added setup_ops_repo() to disinto init for automatic ops repo creation and seeding. Removed migrated data from code repo (vault data dirs, planner journal/memory/prerequisites, supervisor journal/best-practices, evidence, RESOURCES.md). Updated all documentation. 55 files changed, ShellCheck clean, all 38 phase tests pass.
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/767
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-26 19:55:12 +01:00
|
|
|
JOURNAL_FILE="$OPS_REPO_ROOT/journal/supervisor/$(date -u +%Y-%m-%d).md"
|
2026-03-21 00:22:37 +00:00
|
|
|
if [ -f "$JOURNAL_FILE" ]; then cat "$JOURNAL_FILE"; fi
|
|
|
|
|
|
|
|
|
|
4. Note any values that cross these thresholds:
|
|
|
|
|
- RAM available < 500MB or swap > 3GB → P0 (memory crisis)
|
|
|
|
|
- Disk > 80% → P1 (disk pressure)
|
|
|
|
|
- Agent sessions dead, CI stuck/pending, git in bad state → P2 (factory stopped)
|
2026-03-21 17:55:21 +00:00
|
|
|
- PRs stale >20min (CI done, no push since) → P3 (factory degraded)
|
2026-03-21 00:22:37 +00:00
|
|
|
- Stale worktrees, old lock files → P4 (housekeeping)
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
[[steps]]
|
|
|
|
|
id = "health-assessment"
|
|
|
|
|
title = "Evaluate health of each subsystem"
|
|
|
|
|
description = """
|
|
|
|
|
Categorize every finding from the metrics into priority levels.
|
|
|
|
|
|
|
|
|
|
### P0 — Memory crisis
|
|
|
|
|
- RAM available < 500MB
|
|
|
|
|
- Swap used > 3GB AND RAM available < 2000MB
|
|
|
|
|
|
|
|
|
|
### P1 — Disk pressure
|
|
|
|
|
- Disk usage > 80%
|
|
|
|
|
|
|
|
|
|
### P2 — Factory stopped / stalled
|
|
|
|
|
- CI pipelines stuck running > 20min or pending > 30min
|
|
|
|
|
- Dev-agent lock file present but process dead
|
|
|
|
|
- Dev-agent status unchanged for > 30min
|
|
|
|
|
- Git repo on wrong branch or in broken rebase state
|
|
|
|
|
- Pipeline stalled: backlog issues exist but no agent ran for > 20min
|
|
|
|
|
- Dev-agent blocked: last N polls all report "no ready issues"
|
2026-03-26 09:09:58 +00:00
|
|
|
- Dev/action sessions in PHASE:escalate for > 24h (session timeout)
|
2026-03-25 08:34:22 +00:00
|
|
|
(Note: PHASE:escalate files for closed issues are auto-cleaned by preflight;
|
2026-03-26 09:09:58 +00:00
|
|
|
this check covers sessions where the issue is still open)
|
2026-03-21 00:22:37 +00:00
|
|
|
|
|
|
|
|
### P3 — Factory degraded
|
2026-03-21 17:55:21 +00:00
|
|
|
- PRs stale: CI finished >20min ago AND no git push to the PR branch since CI completed
|
|
|
|
|
(Do NOT flag PRs that are actively being worked on — only truly inactive ones)
|
2026-03-21 00:22:37 +00:00
|
|
|
- Circular dependency deadlocks in backlog
|
|
|
|
|
- Stale dependencies (blocked by issues open > 30 days)
|
|
|
|
|
|
|
|
|
|
### P4 — Housekeeping
|
|
|
|
|
- Stale worktrees > 2h old with no active process
|
|
|
|
|
- Lock files for dead processes
|
|
|
|
|
- Stale claude processes (> 3h old)
|
|
|
|
|
|
|
|
|
|
List each finding with its priority level. If everything looks healthy,
|
|
|
|
|
note "All systems healthy" and proceed.
|
|
|
|
|
"""
|
|
|
|
|
needs = ["preflight"]
|
|
|
|
|
|
|
|
|
|
[[steps]]
|
|
|
|
|
id = "decide-actions"
|
2026-03-26 09:09:58 +00:00
|
|
|
title = "Fix what you can, file vault items for what you cannot"
|
2026-03-21 00:22:37 +00:00
|
|
|
description = """
|
|
|
|
|
For each finding from the health assessment, decide and execute an action.
|
|
|
|
|
|
|
|
|
|
### Auto-fixable (execute these directly)
|
|
|
|
|
|
|
|
|
|
**P0 Memory crisis:**
|
|
|
|
|
# Kill stale one-shot claude processes (>3h old)
|
|
|
|
|
pgrep -f "claude -p" --older 10800 2>/dev/null | xargs kill 2>/dev/null || true
|
|
|
|
|
# Drop filesystem caches
|
|
|
|
|
sync && echo 3 | sudo tee /proc/sys/vm/drop_caches >/dev/null 2>&1 || true
|
|
|
|
|
|
|
|
|
|
**P1 Disk pressure:**
|
|
|
|
|
# Docker cleanup
|
|
|
|
|
sudo docker system prune -f >/dev/null 2>&1 || true
|
|
|
|
|
# Truncate logs > 10MB
|
|
|
|
|
for f in "$FACTORY_ROOT"/{dev,review,supervisor,gardener,planner,predictor}/*.log; do
|
|
|
|
|
[ -f "$f" ] && [ "$(du -k "$f" | cut -f1)" -gt 10240 ] && truncate -s 0 "$f"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
**P2 Dead lock files:**
|
|
|
|
|
rm -f /path/to/stale.lock
|
|
|
|
|
|
|
|
|
|
**P2 Stale rebase:**
|
|
|
|
|
cd "$PROJECT_REPO_ROOT"
|
|
|
|
|
git rebase --abort 2>/dev/null
|
|
|
|
|
git checkout "$PRIMARY_BRANCH" 2>/dev/null
|
|
|
|
|
|
|
|
|
|
**P2 Wrong branch:**
|
|
|
|
|
cd "$PROJECT_REPO_ROOT"
|
|
|
|
|
git checkout "$PRIMARY_BRANCH" 2>/dev/null
|
|
|
|
|
|
2026-03-25 08:34:22 +00:00
|
|
|
**P4 Stale PHASE:escalate files (closed issues):**
|
|
|
|
|
Already handled by preflight.sh auto-cleanup. Check "Stale Phase Cleanup"
|
|
|
|
|
in the metrics for results. Log any cleanups in the journal.
|
|
|
|
|
|
2026-03-21 00:22:37 +00:00
|
|
|
**P4 Stale worktrees:**
|
|
|
|
|
git -C "$PROJECT_REPO_ROOT" worktree remove --force /tmp/stale-worktree 2>/dev/null
|
|
|
|
|
git -C "$PROJECT_REPO_ROOT" worktree prune 2>/dev/null
|
|
|
|
|
|
|
|
|
|
**P4 Stale claude processes:**
|
|
|
|
|
pgrep -f "claude -p" --older 10800 2>/dev/null | xargs kill 2>/dev/null || true
|
|
|
|
|
|
2026-03-21 17:55:21 +00:00
|
|
|
**P3 Stale PRs (CI done >20min, no push since):**
|
|
|
|
|
Do NOT read dev-poll.sh, push branches, attempt merges, or investigate pipeline code.
|
|
|
|
|
Instead, nudge the dev-agent via tmux injection if a session is alive:
|
|
|
|
|
# Find the dev session for this issue
|
|
|
|
|
SESSION=$(tmux list-sessions -F '#{session_name}' 2>/dev/null | grep "dev-.*-${ISSUE_NUM}" | head -1)
|
|
|
|
|
if [ -n "$SESSION" ]; then
|
|
|
|
|
# Inject a nudge into the dev-agent session
|
|
|
|
|
tmux send-keys -t "$SESSION" "# [supervisor] PR stale >20min — CI finished, please push or update" Enter
|
|
|
|
|
fi
|
|
|
|
|
If no active tmux session exists, note it in the journal for the next dev-poll cycle.
|
2026-03-26 09:09:58 +00:00
|
|
|
Do NOT file vault items for stale PRs unless they remain stale for >3 consecutive runs.
|
2026-03-21 17:55:21 +00:00
|
|
|
|
2026-03-26 09:09:58 +00:00
|
|
|
### Cannot auto-fix → file vault item
|
2026-03-21 00:22:37 +00:00
|
|
|
|
|
|
|
|
For P0-P2 issues that persist after auto-fix attempts, or issues requiring
|
2026-03-26 09:09:58 +00:00
|
|
|
human judgment, file a vault procurement item:
|
fix: {project}-ops repo — separate operations from code (#757) (#767)
Fixes #757
## Changes
Separate operations from code into {project}-ops repo pattern. Added OPS_REPO_ROOT infrastructure (env.sh, load-project.sh, formula-session.sh with ensure_ops_repo helper). Updated all 8 agent scripts and 7 formulas to read/write vault items, journals, evidence, prerequisites, RESOURCES.md, and knowledge from the ops repo. Added setup_ops_repo() to disinto init for automatic ops repo creation and seeding. Removed migrated data from code repo (vault data dirs, planner journal/memory/prerequisites, supervisor journal/best-practices, evidence, RESOURCES.md). Updated all documentation. 55 files changed, ShellCheck clean, all 38 phase tests pass.
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/767
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-26 19:55:12 +01:00
|
|
|
Write $OPS_REPO_ROOT/vault/pending/supervisor-<issue-slug>.md:
|
2026-03-26 09:09:58 +00:00
|
|
|
# <What is needed>
|
|
|
|
|
## What
|
|
|
|
|
<description of the problem and why the supervisor cannot fix it>
|
|
|
|
|
## Why
|
|
|
|
|
<impact on factory health — reference the priority level>
|
|
|
|
|
## Unblocks
|
|
|
|
|
- Factory health: <what this resolves>
|
2026-03-31 20:38:05 +00:00
|
|
|
Vault PR filed on ops repo — human approves via PR review.
|
2026-03-21 00:22:37 +00:00
|
|
|
|
|
|
|
|
Read the relevant best-practices file before taking action:
|
fix: {project}-ops repo — separate operations from code (#757) (#767)
Fixes #757
## Changes
Separate operations from code into {project}-ops repo pattern. Added OPS_REPO_ROOT infrastructure (env.sh, load-project.sh, formula-session.sh with ensure_ops_repo helper). Updated all 8 agent scripts and 7 formulas to read/write vault items, journals, evidence, prerequisites, RESOURCES.md, and knowledge from the ops repo. Added setup_ops_repo() to disinto init for automatic ops repo creation and seeding. Removed migrated data from code repo (vault data dirs, planner journal/memory/prerequisites, supervisor journal/best-practices, evidence, RESOURCES.md). Updated all documentation. 55 files changed, ShellCheck clean, all 38 phase tests pass.
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/767
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-26 19:55:12 +01:00
|
|
|
cat "$OPS_REPO_ROOT/knowledge/memory.md" # P0
|
|
|
|
|
cat "$OPS_REPO_ROOT/knowledge/disk.md" # P1
|
|
|
|
|
cat "$OPS_REPO_ROOT/knowledge/ci.md" # P2 CI
|
|
|
|
|
cat "$OPS_REPO_ROOT/knowledge/dev-agent.md" # P2 agent
|
|
|
|
|
cat "$OPS_REPO_ROOT/knowledge/git.md" # P2 git
|
2026-03-21 00:22:37 +00:00
|
|
|
|
2026-03-26 09:09:58 +00:00
|
|
|
Track what you fixed and what vault items you filed for the report step.
|
2026-03-21 00:22:37 +00:00
|
|
|
"""
|
|
|
|
|
needs = ["health-assessment"]
|
|
|
|
|
|
|
|
|
|
[[steps]]
|
|
|
|
|
id = "report"
|
fix: Remove Matrix integration — notifications move to forge + OpenClaw (#732)
Remove all Matrix/Dendrite infrastructure:
- Delete lib/matrix_listener.sh (long-poll daemon), lib/matrix_listener.service
(systemd unit), lib/hooks/on-stop-matrix.sh (response streaming hook)
- Remove matrix_send() and matrix_send_ctx() from lib/env.sh
- Remove MATRIX_HOMESERVER auto-detection, MATRIX_THREAD_MAP from lib/env.sh
- Remove [matrix] section parsing from lib/load-project.sh
- Remove Matrix hook installation from lib/agent-session.sh
- Remove notify/notify_ctx helpers and Matrix thread tracking from
dev/dev-agent.sh and action/action-agent.sh
- Remove all matrix_send calls from dev-poll.sh, phase-handler.sh,
action-poll.sh, vault-poll.sh, vault-fire.sh, vault-reject.sh,
review-poll.sh, review-pr.sh, supervisor-poll.sh, formula-session.sh
- Remove Matrix listener startup from docker/agents/entrypoint.sh
- Remove append_dendrite_compose() and setup_matrix() from bin/disinto
- Remove --matrix flag from disinto init
- Clean Matrix references from .env.example, projects/*.toml.example,
formulas/*.toml, AGENTS.md, BOOTSTRAP.md, README.md, RESOURCES.md,
PHASE-PROTOCOL.md, and all agent AGENTS.md/PROMPT.md files
Status visibility now via Codeberg PR/issue activity. Human interaction
via vault items through forge. Proactive alerts via OpenClaw heartbeats.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:53:56 +00:00
|
|
|
title = "Log health summary"
|
2026-03-21 00:22:37 +00:00
|
|
|
description = """
|
fix: Remove Matrix integration — notifications move to forge + OpenClaw (#732)
Remove all Matrix/Dendrite infrastructure:
- Delete lib/matrix_listener.sh (long-poll daemon), lib/matrix_listener.service
(systemd unit), lib/hooks/on-stop-matrix.sh (response streaming hook)
- Remove matrix_send() and matrix_send_ctx() from lib/env.sh
- Remove MATRIX_HOMESERVER auto-detection, MATRIX_THREAD_MAP from lib/env.sh
- Remove [matrix] section parsing from lib/load-project.sh
- Remove Matrix hook installation from lib/agent-session.sh
- Remove notify/notify_ctx helpers and Matrix thread tracking from
dev/dev-agent.sh and action/action-agent.sh
- Remove all matrix_send calls from dev-poll.sh, phase-handler.sh,
action-poll.sh, vault-poll.sh, vault-fire.sh, vault-reject.sh,
review-poll.sh, review-pr.sh, supervisor-poll.sh, formula-session.sh
- Remove Matrix listener startup from docker/agents/entrypoint.sh
- Remove append_dendrite_compose() and setup_matrix() from bin/disinto
- Remove --matrix flag from disinto init
- Clean Matrix references from .env.example, projects/*.toml.example,
formulas/*.toml, AGENTS.md, BOOTSTRAP.md, README.md, RESOURCES.md,
PHASE-PROTOCOL.md, and all agent AGENTS.md/PROMPT.md files
Status visibility now via Codeberg PR/issue activity. Human interaction
via vault items through forge. Proactive alerts via OpenClaw heartbeats.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:53:56 +00:00
|
|
|
Log a status summary to the journal.
|
2026-03-21 00:22:37 +00:00
|
|
|
|
|
|
|
|
### When everything is healthy
|
fix: Remove Matrix integration — notifications move to forge + OpenClaw (#732)
Remove all Matrix/Dendrite infrastructure:
- Delete lib/matrix_listener.sh (long-poll daemon), lib/matrix_listener.service
(systemd unit), lib/hooks/on-stop-matrix.sh (response streaming hook)
- Remove matrix_send() and matrix_send_ctx() from lib/env.sh
- Remove MATRIX_HOMESERVER auto-detection, MATRIX_THREAD_MAP from lib/env.sh
- Remove [matrix] section parsing from lib/load-project.sh
- Remove Matrix hook installation from lib/agent-session.sh
- Remove notify/notify_ctx helpers and Matrix thread tracking from
dev/dev-agent.sh and action/action-agent.sh
- Remove all matrix_send calls from dev-poll.sh, phase-handler.sh,
action-poll.sh, vault-poll.sh, vault-fire.sh, vault-reject.sh,
review-poll.sh, review-pr.sh, supervisor-poll.sh, formula-session.sh
- Remove Matrix listener startup from docker/agents/entrypoint.sh
- Remove append_dendrite_compose() and setup_matrix() from bin/disinto
- Remove --matrix flag from disinto init
- Clean Matrix references from .env.example, projects/*.toml.example,
formulas/*.toml, AGENTS.md, BOOTSTRAP.md, README.md, RESOURCES.md,
PHASE-PROTOCOL.md, and all agent AGENTS.md/PROMPT.md files
Status visibility now via Codeberg PR/issue activity. Human interaction
via vault items through forge. Proactive alerts via OpenClaw heartbeats.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:53:56 +00:00
|
|
|
Log a brief "all clear" only if the PREVIOUS run had alerts (check journal).
|
|
|
|
|
Do NOT log "all clear" every 20 minutes — that would be noise.
|
2026-03-21 00:22:37 +00:00
|
|
|
|
|
|
|
|
### When there are findings
|
fix: Remove Matrix integration — notifications move to forge + OpenClaw (#732)
Remove all Matrix/Dendrite infrastructure:
- Delete lib/matrix_listener.sh (long-poll daemon), lib/matrix_listener.service
(systemd unit), lib/hooks/on-stop-matrix.sh (response streaming hook)
- Remove matrix_send() and matrix_send_ctx() from lib/env.sh
- Remove MATRIX_HOMESERVER auto-detection, MATRIX_THREAD_MAP from lib/env.sh
- Remove [matrix] section parsing from lib/load-project.sh
- Remove Matrix hook installation from lib/agent-session.sh
- Remove notify/notify_ctx helpers and Matrix thread tracking from
dev/dev-agent.sh and action/action-agent.sh
- Remove all matrix_send calls from dev-poll.sh, phase-handler.sh,
action-poll.sh, vault-poll.sh, vault-fire.sh, vault-reject.sh,
review-poll.sh, review-pr.sh, supervisor-poll.sh, formula-session.sh
- Remove Matrix listener startup from docker/agents/entrypoint.sh
- Remove append_dendrite_compose() and setup_matrix() from bin/disinto
- Remove --matrix flag from disinto init
- Clean Matrix references from .env.example, projects/*.toml.example,
formulas/*.toml, AGENTS.md, BOOTSTRAP.md, README.md, RESOURCES.md,
PHASE-PROTOCOL.md, and all agent AGENTS.md/PROMPT.md files
Status visibility now via Codeberg PR/issue activity. Human interaction
via vault items through forge. Proactive alerts via OpenClaw heartbeats.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:53:56 +00:00
|
|
|
Log a summary grouped by priority with:
|
2026-03-21 00:22:37 +00:00
|
|
|
Fixed:
|
|
|
|
|
- <what was auto-fixed>
|
|
|
|
|
|
|
|
|
|
Alerts:
|
|
|
|
|
- [P2] <description>
|
|
|
|
|
- [P3] <description>
|
|
|
|
|
|
fix: Remove Matrix integration — notifications move to forge + OpenClaw (#732)
Remove all Matrix/Dendrite infrastructure:
- Delete lib/matrix_listener.sh (long-poll daemon), lib/matrix_listener.service
(systemd unit), lib/hooks/on-stop-matrix.sh (response streaming hook)
- Remove matrix_send() and matrix_send_ctx() from lib/env.sh
- Remove MATRIX_HOMESERVER auto-detection, MATRIX_THREAD_MAP from lib/env.sh
- Remove [matrix] section parsing from lib/load-project.sh
- Remove Matrix hook installation from lib/agent-session.sh
- Remove notify/notify_ctx helpers and Matrix thread tracking from
dev/dev-agent.sh and action/action-agent.sh
- Remove all matrix_send calls from dev-poll.sh, phase-handler.sh,
action-poll.sh, vault-poll.sh, vault-fire.sh, vault-reject.sh,
review-poll.sh, review-pr.sh, supervisor-poll.sh, formula-session.sh
- Remove Matrix listener startup from docker/agents/entrypoint.sh
- Remove append_dendrite_compose() and setup_matrix() from bin/disinto
- Remove --matrix flag from disinto init
- Clean Matrix references from .env.example, projects/*.toml.example,
formulas/*.toml, AGENTS.md, BOOTSTRAP.md, README.md, RESOURCES.md,
PHASE-PROTOCOL.md, and all agent AGENTS.md/PROMPT.md files
Status visibility now via Codeberg PR/issue activity. Human interaction
via vault items through forge. Proactive alerts via OpenClaw heartbeats.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:53:56 +00:00
|
|
|
Status: RAM=<X>MB Disk=<Y>% Load=<Z>
|
2026-03-21 00:22:37 +00:00
|
|
|
|
2026-03-26 09:09:58 +00:00
|
|
|
### When vault items were filed (P0-P2 unresolved)
|
fix: Remove Matrix integration — notifications move to forge + OpenClaw (#732)
Remove all Matrix/Dendrite infrastructure:
- Delete lib/matrix_listener.sh (long-poll daemon), lib/matrix_listener.service
(systemd unit), lib/hooks/on-stop-matrix.sh (response streaming hook)
- Remove matrix_send() and matrix_send_ctx() from lib/env.sh
- Remove MATRIX_HOMESERVER auto-detection, MATRIX_THREAD_MAP from lib/env.sh
- Remove [matrix] section parsing from lib/load-project.sh
- Remove Matrix hook installation from lib/agent-session.sh
- Remove notify/notify_ctx helpers and Matrix thread tracking from
dev/dev-agent.sh and action/action-agent.sh
- Remove all matrix_send calls from dev-poll.sh, phase-handler.sh,
action-poll.sh, vault-poll.sh, vault-fire.sh, vault-reject.sh,
review-poll.sh, review-pr.sh, supervisor-poll.sh, formula-session.sh
- Remove Matrix listener startup from docker/agents/entrypoint.sh
- Remove append_dendrite_compose() and setup_matrix() from bin/disinto
- Remove --matrix flag from disinto init
- Clean Matrix references from .env.example, projects/*.toml.example,
formulas/*.toml, AGENTS.md, BOOTSTRAP.md, README.md, RESOURCES.md,
PHASE-PROTOCOL.md, and all agent AGENTS.md/PROMPT.md files
Status visibility now via Codeberg PR/issue activity. Human interaction
via vault items through forge. Proactive alerts via OpenClaw heartbeats.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:53:56 +00:00
|
|
|
Note the vault items in the status summary.
|
2026-03-21 00:22:37 +00:00
|
|
|
|
fix: Remove Matrix integration — notifications move to forge + OpenClaw (#732)
Remove all Matrix/Dendrite infrastructure:
- Delete lib/matrix_listener.sh (long-poll daemon), lib/matrix_listener.service
(systemd unit), lib/hooks/on-stop-matrix.sh (response streaming hook)
- Remove matrix_send() and matrix_send_ctx() from lib/env.sh
- Remove MATRIX_HOMESERVER auto-detection, MATRIX_THREAD_MAP from lib/env.sh
- Remove [matrix] section parsing from lib/load-project.sh
- Remove Matrix hook installation from lib/agent-session.sh
- Remove notify/notify_ctx helpers and Matrix thread tracking from
dev/dev-agent.sh and action/action-agent.sh
- Remove all matrix_send calls from dev-poll.sh, phase-handler.sh,
action-poll.sh, vault-poll.sh, vault-fire.sh, vault-reject.sh,
review-poll.sh, review-pr.sh, supervisor-poll.sh, formula-session.sh
- Remove Matrix listener startup from docker/agents/entrypoint.sh
- Remove append_dendrite_compose() and setup_matrix() from bin/disinto
- Remove --matrix flag from disinto init
- Clean Matrix references from .env.example, projects/*.toml.example,
formulas/*.toml, AGENTS.md, BOOTSTRAP.md, README.md, RESOURCES.md,
PHASE-PROTOCOL.md, and all agent AGENTS.md/PROMPT.md files
Status visibility now via Codeberg PR/issue activity. Human interaction
via vault items through forge. Proactive alerts via OpenClaw heartbeats.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:53:56 +00:00
|
|
|
Keep messages concise. Do not log identical messages to what was logged
|
2026-03-21 00:22:37 +00:00
|
|
|
in the previous run (check journal for prior messages).
|
|
|
|
|
"""
|
|
|
|
|
needs = ["decide-actions"]
|
|
|
|
|
|
|
|
|
|
[[steps]]
|
|
|
|
|
id = "journal"
|
|
|
|
|
title = "Write health journal entry"
|
|
|
|
|
description = """
|
|
|
|
|
Append a timestamped entry to the supervisor journal.
|
|
|
|
|
|
|
|
|
|
File path:
|
fix: {project}-ops repo — separate operations from code (#757) (#767)
Fixes #757
## Changes
Separate operations from code into {project}-ops repo pattern. Added OPS_REPO_ROOT infrastructure (env.sh, load-project.sh, formula-session.sh with ensure_ops_repo helper). Updated all 8 agent scripts and 7 formulas to read/write vault items, journals, evidence, prerequisites, RESOURCES.md, and knowledge from the ops repo. Added setup_ops_repo() to disinto init for automatic ops repo creation and seeding. Removed migrated data from code repo (vault data dirs, planner journal/memory/prerequisites, supervisor journal/best-practices, evidence, RESOURCES.md). Updated all documentation. 55 files changed, ShellCheck clean, all 38 phase tests pass.
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/767
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-26 19:55:12 +01:00
|
|
|
$OPS_REPO_ROOT/journal/supervisor/$(date -u +%Y-%m-%d).md
|
2026-03-21 00:22:37 +00:00
|
|
|
|
|
|
|
|
If the file already exists (multiple runs per day), append a new section.
|
|
|
|
|
If it does not exist, create it.
|
|
|
|
|
|
|
|
|
|
Format:
|
|
|
|
|
## Supervisor run — HH:MM UTC
|
|
|
|
|
|
|
|
|
|
### Health status
|
|
|
|
|
- RAM: <X>MB available, Swap: <X>MB
|
|
|
|
|
- Disk: <X>%
|
|
|
|
|
- Load: <X>
|
|
|
|
|
- Docker: <N> containers
|
|
|
|
|
|
|
|
|
|
### Findings
|
2026-03-26 09:09:58 +00:00
|
|
|
- [P<N>] <finding> — <action taken or "filed vault item">
|
2026-03-21 00:22:37 +00:00
|
|
|
(or "No issues found — all systems healthy")
|
|
|
|
|
|
|
|
|
|
### Actions taken
|
|
|
|
|
- <what was fixed>
|
|
|
|
|
(or "No actions needed")
|
|
|
|
|
|
2026-03-26 09:09:58 +00:00
|
|
|
### Vault items filed
|
|
|
|
|
- vault/pending/<id>.md — <reason>
|
2026-03-21 00:22:37 +00:00
|
|
|
(or "None")
|
|
|
|
|
|
|
|
|
|
Keep each entry concise — 15-25 lines max. This journal provides
|
|
|
|
|
run-to-run context so future supervisor runs can detect trends
|
|
|
|
|
(e.g., "disk has been >75% for 3 consecutive runs").
|
|
|
|
|
|
|
|
|
|
IMPORTANT: Do NOT commit or push the journal — it is a local working file.
|
|
|
|
|
The journal directory is committed to git periodically by other agents.
|
|
|
|
|
|
2026-03-28 16:40:21 +00:00
|
|
|
## Learning
|
|
|
|
|
|
|
|
|
|
If you discover something new during this run, append it to the relevant
|
|
|
|
|
knowledge file in the ops repo:
|
|
|
|
|
echo "### Lesson title
|
|
|
|
|
Description of what you learned." >> "${OPS_REPO_ROOT}/knowledge/<file>.md"
|
|
|
|
|
|
|
|
|
|
Knowledge files: memory.md, disk.md, ci.md, forge.md, dev-agent.md,
|
|
|
|
|
review-agent.md, git.md.
|
|
|
|
|
|
2026-03-21 00:22:37 +00:00
|
|
|
After writing the journal, write the phase signal:
|
2026-03-21 00:39:58 +00:00
|
|
|
echo 'PHASE:done' > "$PHASE_FILE"
|
2026-03-21 00:22:37 +00:00
|
|
|
"""
|
|
|
|
|
needs = ["report"]
|