No description
Find a file
openhands 62acdab6ea fix: fix: bundled dust cleanup — AGENTS.md (#211)
- #167: replace manually-maintained shellcheck file list with glob (git ls-files '*.sh' | xargs shellcheck)
- #188: add missing functions to lib/agent-session.sh table entry (monitor_phase_loop, create_agent_session, read_phase, inject_formula) and update Sourced-by column
- #166: agent-session.sh entry already present; Sourced-by updated to include dev-agent.sh and phase-handler.sh

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 22:15:43 +00:00
.woodpecker fix: agent-smoke.sh: use [(][)] instead of \(\) for BusyBox grep ERE compat 2026-03-18 21:24:27 +00:00
dev fix: dev/phase-handler.sh still passes string label name to /labels replace endpoint (#203) 2026-03-18 22:06:05 +00:00
docs fix: feat: supervisor-poll.sh and gardener-poll.sh inject human replies into needs_human dev sessions (#81) 2026-03-17 22:33:28 +00:00
formulas fix: feat: gardener formula — groom-backlog.toml with verify loop, remove timeouts (#183) 2026-03-18 18:42:30 +00:00
gardener fix: labels:["backlog"] passes string name to Codeberg API that expects integer IDs (#164) 2026-03-18 20:36:39 +00:00
lib fix: agent-session.sh: monitor_phase_loop should accept SESSION_NAME as a parameter (#187) 2026-03-18 20:15:14 +00:00
planner fix: address review feedback — restore -d flag, drop formula label, validate names, quote YAML 2026-03-18 04:37:17 +00:00
projects fix: feat: Woodpecker CI pipeline with ShellCheck + duplicate code detection (#45) 2026-03-17 10:02:58 +00:00
review fix: Gitea reviews API is fetched without pagination in multiple places (#191) 2026-03-18 20:05:29 +00:00
site chore: refresh landing page — desire-led copy, drop agent grid (#161) 2026-03-18 16:21:42 +01:00
supervisor fix: ci_passed() still lives in dev/dev-poll.sh, not lib/ (#70) 2026-03-18 02:05:54 +00:00
vault feat: vault — publishing gate for external-facing agent actions (#19) 2026-03-17 08:07:02 +01:00
.env.example fix: feat: dev-agent merges its own PRs via non-admin Codeberg account (#172) 2026-03-18 17:59:36 +00:00
.gitignore fix: idle timeout does not escalate — session dies silently (#123) 2026-03-18 07:02:33 +00:00
.shellcheckrc fix: feat: Woodpecker CI pipeline with ShellCheck + duplicate code detection (#45) 2026-03-17 10:02:58 +00:00
AGENTS.md fix: fix: bundled dust cleanup — AGENTS.md (#211) 2026-03-18 22:15:43 +00:00
al76.png docs: add hero image and Asimov quote to README 2026-03-15 18:08:52 +00:00
BOOTSTRAP.md fix: feat/formula not merged but formula templates and label docs already on main (#69) 2026-03-18 02:17:18 +00:00
README.md fix: correct runtime constraints — python3 is a core dependency 2026-03-18 21:29:21 +00:00
RESOURCES.example.md fix: feat: RESOURCES.md — infrastructure manifest for planner resource awareness (#23) 2026-03-17 08:48:47 +00:00
VISION.md feat: add disinto.ai landing page to repo (#91) 2026-03-17 23:11:40 +01:00

A tiny robot commanding a mountain-eating machine

Disinto

Autonomous code factorydisinto.ai

A mining robot, lost and confused, builds a Disinto from scrap —
a device so powerful it vaporizes three-quarters of a mountain on a single battery.

— Isaac Asimov, "Robot AL-76 Goes Astray" (1942)


Point it at a Codeberg repo with a Woodpecker CI pipeline and it will pick up issues, implement them, review PRs, and keep the system healthy — all on its own.

Architecture

cron (*/10) ──→ supervisor-poll.sh    ← supervisor (bash checks, zero tokens)
                 ├── all clear? → exit 0
                 └── problem? → claude -p (diagnose, fix, or escalate)

cron (*/10) ──→ dev-poll.sh        ← pulls ready issues, spawns dev-agent
                 └── dev-agent.sh   ← claude -p: implement → PR → CI → review → merge

cron (*/10) ──→ review-poll.sh     ← finds unreviewed PRs, spawns review
                 └── review-pr.sh   ← claude -p: review → approve/request changes

cron (daily) ──→ gardener-poll.sh  ← backlog grooming (duplicates, stale, tech-debt)
                  └── claude -p: triage → promote/close/escalate

systemd ──→ matrix_listener.sh   ← long-poll daemon for human replies
              └── dispatches thread replies → supervisor/gardener

all agents ──→ matrix_send()     ← status updates, escalations, merge notifications

Prerequisites

Required:

  • Claude CLIclaude in PATH, authenticated
  • Codeberg account with an API token — disinto reads issues, opens PRs, posts comments, and merges via the Codeberg API
  • A second Codeberg account for the review bot — reviews posted under a separate identity so the dev-agent doesn't review its own PRs (REVIEW_BOT_TOKEN)
  • Woodpecker CI — local instance connected to your Codeberg repo; disinto monitors pipelines, retries failures, and queries the Woodpecker Postgres DB directly
  • PostgreSQL client (psql) — for Woodpecker DB queries (pipeline status, build counts)
  • jq, curl, git

Optional:

  • Matrix homeserver (Dendrite or Synapse) — real-time notifications, escalation threads with human-in-the-loop replies
  • Foundry (forge, cast, anvil) — only needed if your target project uses Solidity
  • Node.js — only needed if your target project uses Node

Setup

# 1. Clone
git clone ssh://git@codeberg.org/johba/disinto.git
cd disinto

# 2. Configure
cp .env.example .env

Edit .env with your values:

# Target repo
CODEBERG_REPO=yourorg/yourproject              # Codeberg org/repo slug
CODEBERG_API=https://codeberg.org/api/v1/repos/yourorg/yourproject
PROJECT_REPO_ROOT=/path/to/your/project        # local clone of the target repo

# Auth tokens
CODEBERG_TOKEN=...          # main account — or put it in ~/.netrc
REVIEW_BOT_TOKEN=...        # separate Codeberg account for code reviews

# Woodpecker CI
WOODPECKER_SERVER=http://localhost:8000
WOODPECKER_TOKEN=...
WOODPECKER_DB_PASSWORD=...
WOODPECKER_DB_USER=woodpecker
WOODPECKER_DB_HOST=127.0.0.1
WOODPECKER_DB_NAME=woodpecker

# Tuning
CLAUDE_TIMEOUT=7200         # max seconds per Claude invocation (default: 2h)
# 3. Install cron (staggered to avoid overlap)
crontab -e
# Add:
#   0,10,20,30,40,50 * * * * /path/to/disinto/supervisor/supervisor-poll.sh
#   3,13,23,33,43,53 * * * * /path/to/disinto/review/review-poll.sh
#   6,16,26,36,46,56 * * * * /path/to/disinto/dev/dev-poll.sh
#   15 8 * * *                /path/to/disinto/gardener/gardener-poll.sh

# 4. Verify
bash supervisor/supervisor-poll.sh   # should log "all clear"

Directory Structure

disinto/
├── .env.example          # Template — copy to .env, add secrets + project config
├── .gitignore            # Excludes .env, logs, state files
├── lib/
│   ├── env.sh              # Shared: load .env, PATH, API helpers, matrix_send()
│   ├── ci-debug.sh         # Woodpecker CI log/failure helper
│   ├── matrix_listener.sh  # Matrix long-poll daemon (dispatches replies)
│   └── matrix_listener.service  # systemd unit for the listener
├── dev/
│   ├── dev-poll.sh       # Cron entry: find ready issues
│   └── dev-agent.sh      # Implementation agent (claude -p)
├── review/
│   ├── review-poll.sh    # Cron entry: find unreviewed PRs
│   └── review-pr.sh      # Review agent (claude -p)
├── gardener/
│   ├── gardener-poll.sh  # Cron entry: backlog grooming
│   └── best-practices.md # Gardener knowledge base
├── planner/
│   ├── planner-poll.sh   # Cron entry: weekly vision gap analysis
│   └── planner-agent.sh  # Updates AGENTS.md, creates backlog issues (claude -p)
├── vault/
│   ├── vault-poll.sh     # Cron entry: process pending dangerous actions
│   ├── vault-agent.sh    # Classifies and routes actions (claude -p)
│   ├── vault-fire.sh     # Executes an approved action
│   ├── vault-reject.sh   # Marks an action as rejected
│   └── PROMPT.md         # System prompt for vault agent
└── supervisor/
    ├── supervisor-poll.sh   # Supervisor: health checks + claude -p
    ├── PROMPT.md         # Supervisor's system prompt
    ├── update-prompt.sh  # Self-learning: append to best-practices
    └── best-practices/   # Progressive disclosure knowledge base
        ├── memory.md
        ├── disk.md
        ├── ci.md
        ├── codeberg.md
        ├── dev-agent.md
        ├── review-agent.md
        └── git.md

Agents

Agent Trigger Job
Supervisor Every 10 min Health checks (RAM, disk, CI, git). Calls Claude only when something is broken. Self-improving via best-practices/.
Dev Every 10 min Picks up backlog-labeled issues, creates a branch, implements, opens a PR, monitors CI, responds to review, merges.
Review Every 10 min Finds PRs without review, runs Claude-powered code review, approves or requests changes.
Gardener Daily Grooms the issue backlog: detects duplicates, promotes tech-debt to backlog, closes stale issues, escalates ambiguous items.
Planner Weekly Updates AGENTS.md documentation to reflect recent code changes, then gap-analyses VISION.md vs current state and creates up to 5 backlog issues for the highest-leverage gaps.
Vault Every 30 min Safety gate for dangerous or irreversible actions. Classifies pending actions via Claude: auto-approve, auto-reject, or escalate to a human via Matrix.

Design Principles

  • Bash for checks, AI for judgment — polling and health checks are shell scripts; Claude is only invoked when something needs diagnosing or deciding
  • Pull over push — dev-agent derives readiness from merged dependencies, not labels or manual assignment
  • Progressive disclosure — the supervisor reads only the best-practices file relevant to the current problem, not all of them
  • Self-improving — when Claude fixes something new, the lesson is appended to best-practices for next time
  • Project-agnostic — all project-specific values (repo, paths, CI IDs) come from .env, not hardcoded scripts

Runtime constraints

Disinto is intentionally opinionated about its own runtime. These are hard constraints, not preferences:

  • Debian + GNU userland — all scripts target Debian with standard GNU tools (bash, awk, sed, date, timeout). No portability shims for macOS or BSD.
  • Shell + a small set of runtimes — every agent is a bash script. The only interpreted runtimes used by disinto core are python3 (TOML parsing in lib/load-project.sh, JSON state tracking in dev/dev-poll.sh, recipe matching in gardener/gardener-poll.sh) and claude (the AI CLI). No Ruby, Perl, or other runtimes. Do not add new runtime dependencies without a strong justification.
  • Few, powerful dependencies — required non-standard tools: jq, curl, git, tmux, psql, and python3 (≥ 3.11 for tomllib; or install tomli for older Pythons). Adding anything beyond this list requires justification.
  • Node.js and Foundry are target-project dependencies — if your target repo uses Node or Solidity, install those on the host. They are not part of disinto's core and must not be assumed present in disinto scripts.

The goal: any Debian machine with the prerequisites listed above can run disinto. Keep it that way.