diff --git a/site/README.md b/site/README.md index 8fe21f5..d4eb7fe 100644 --- a/site/README.md +++ b/site/README.md @@ -1,10 +1,13 @@ # site/ -Static landing page for disinto.ai. +Static site for disinto.ai. ## Files - `index.html` — landing page +- `dashboard.html` — live factory metrics dashboard +- `docs/quickstart.html` — quickstart guide (from zero to first automated PR) +- `docs/architecture.html` — architecture overview (agent loop, phase protocol, vault) - `og-image.jpg` — Open Graph image used for social sharing previews (`og:image` / `twitter:image`) - `al76.jpg` / `al76.webp` — hero image (Robot AL-76) - `favicon.ico`, `favicon-192.png`, `apple-touch-icon.png` — favicons diff --git a/site/docs/architecture.html b/site/docs/architecture.html new file mode 100644 index 0000000..147c43b --- /dev/null +++ b/site/docs/architecture.html @@ -0,0 +1,546 @@ + + + + + + Architecture — Disinto + + + + + + + + + + + + +
+ +
+

Architecture

+
how the factory works
+ ← disinto.ai +
+ +
+ Quickstart + Architecture + Dashboard +
+ + +
+

The agent loop

+

Disinto runs a continuous loop: vision defines direction, agents derive work and execute it, results feed back into the next cycle.

+
+
+  planner reads VISION.md
+     |
+     v
+  creates backlog issues
+     |
+     v
+  dev-agent picks issue --> implements in worktree --> opens PR
+     |
+     v
+  Woodpecker CI runs tests
+     |
+     v
+  review-agent reviews PR --> approves or requests changes
+     |                               |
+     v (approved)                     v (changes requested)
+  PR merges                       dev-agent addresses feedback
+     |                               |
+     v                               +--> CI re-runs --> review again
+  planner sees progress, plans next cycle
+
+
+

Each project processes one issue at a time. No concurrent PRs, no merge conflicts, no context switching. The pipeline is deliberately sequential.

+
+ + +
+

Eight agents

+

Each agent has a single responsibility. They communicate through git, the Codeberg API, and the filesystem.

+
+
+
dev-agent
+
Picks up backlog issues, implements code in isolated git worktrees, opens PRs. Runs as a persistent tmux session.
+
Cron: every 5 min
+
+
+
review-agent
+
Reviews PRs against project conventions. Approves clean PRs, requests specific changes on others.
+
Cron: every 5 min
+
+
+
planner
+
Reads VISION.md and repo state. Creates issues for gaps between where the project is and where it should be.
+
Cron: weekly
+
+
+
gardener
+
Grooms the backlog. Closes duplicates, promotes tech-debt issues, ensures issues are well-structured.
+
Cron: every 6 hours
+
+
+
supervisor
+
Monitors factory health. Kills stale sessions, manages disk/memory, escalates persistent failures.
+
Cron: every 10 min
+
+
+
predictor
+
Detects infrastructure patterns — recurring failures, resource trends, emerging issues. Files predictions for triage.
+
Cron: daily
+
+
+
action-agent
+
Executes operational tasks defined as formulas — site deployments, data migrations, any multi-step procedure.
+
Cron: every 5 min
+
+
+
vault
+
Safety gate. Reviews dangerous actions before they execute. Auto-approves safe operations, escalates risky ones to a human.
+
Event-driven
+
+
+
+ + +
+

Phase protocol

+

When the dev-agent runs in a persistent tmux session, it signals progress by writing to a phase file. The orchestrator watches this file and injects events (CI results, review feedback) back into the session.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PhaseMeaningNext event
awaiting_ciPR pushed, waiting for CIOrchestrator injects CI result
awaiting_reviewCI passed, waiting for reviewReview-agent injects feedback
needs_humanBlocked on a human decisionMatrix notification sent
donePR merged, work completeSession cleaned up
failedUnrecoverable errorEscalated to supervisor
+

Phase files live at /tmp/dev-session-{project}-{issue}.phase. The protocol is intentionally simple — a plain text file, one line, no daemons.

+
+ + +
+

Vault — quality gate

+
+
How it works
+

The vault sits between agents and dangerous actions. Before an agent can execute a risky operation (force push, deploy, delete), the vault reviews the request.

+

Auto-approve — safe, well-understood operations pass through instantly. Escalate — risky or novel operations get sent to a human via Matrix. Reject — clearly unsafe actions are blocked.

+

You define the boundaries. The vault enforces them. This is what lets you sleep while the factory runs.

+
+
+ + +
+

Planner + predictor feedback cycle

+
+
Closing the loop
+

The planner runs weekly. It compares the current state of the codebase against VISION.md and creates issues for anything missing. It also triages predictions filed by the predictor.

+

The predictor runs daily. It analyzes CI logs, git history, and resource metrics to detect patterns — recurring test failures, disk usage trends, code churn hotspots. Predictions are filed as issues for the planner to triage.

+

Together, they create a feedback cycle: the predictor observes, the planner directs, and the dev-agent executes.

+
+
+ + +
+

Infrastructure

+

Disinto is deliberately minimal. No Kubernetes, no message queues, no microservices.

+
+
Tech stack
+

Bash scripts — every agent is a shell script. No compiled binaries, no runtimes to install.

+

Claude CLI — AI is invoked via claude -p (one-shot) or claude (persistent tmux sessions).

+

Cron — agents are triggered by cron jobs, not a daemon. Pull-based, not push-based.

+

Codeberg + Woodpecker — git hosting and CI. All state lives in git and the issue tracker. No external databases.

+

Single VPS — runs on an 8 GB server. Flat cost, no scaling surprises.

+
+
+ + +
+

Design principles

+
+
+
AD-001
+
Nervous system runs from cron, not action issues. Planner, predictor, gardener, supervisor run directly. They create work, they don't become work.
+
+
+
AD-002
+
Single-threaded pipeline per project. One dev issue at a time. No new work while a PR awaits CI or review.
+
+
+
AD-003
+
The runtime creates and destroys, the formula preserves. Runtime manages worktrees/sessions/temp. Formulas commit knowledge to git before signaling done.
+
+
+
AD-004
+
Event-driven > polling > fixed delays. Never hardcoded sleep. Use phase files, webhooks, or poll loops with backoff.
+
+
+
AD-005
+
Secrets via env var indirection, never in issue bodies. Issue bodies become code. Secrets go in .env or TOML project files.
+
+
+
+ + +
+

Directory layout

+
+
+disinto/
+├── dev/           dev-poll.sh, dev-agent.sh, phase-handler.sh
+├── review/        review-poll.sh, review-pr.sh
+├── gardener/      gardener-run.sh (cron executor)
+├── predictor/     predictor-run.sh (daily cron executor)
+├── planner/       planner-run.sh (weekly cron executor)
+├── supervisor/    supervisor-run.sh (health monitoring)
+├── vault/         vault-poll.sh, vault-agent.sh, vault-fire.sh
+├── action/        action-poll.sh, action-agent.sh
+├── lib/           env.sh, agent-session.sh, ci-helpers.sh
+├── projects/      *.toml per-project config
+├── formulas/      TOML specs for multi-step agent tasks
+├── bin/           disinto CLI entry point
+└── docs/          internal protocol docs
+
+
+
+ + + +
+ + diff --git a/site/docs/quickstart.html b/site/docs/quickstart.html new file mode 100644 index 0000000..f4c19bf --- /dev/null +++ b/site/docs/quickstart.html @@ -0,0 +1,531 @@ + + + + + + Quickstart — Disinto + + + + + + + + + + + + +
+ +
+

Quickstart

+
from zero to your first automated PR
+ ← disinto.ai +
+ +
+ Quickstart + Architecture + Dashboard +
+ +
+
Prerequisites
+ +
+ + +
+
+ 1 + Clone the factory +
+

Clone disinto onto your server. This is the factory — the code that runs your agents.

+
git clone https://codeberg.org/johba/disinto.git ~/disinto
+cd ~/disinto
+cp .env.example .env
+

Edit .env with your tokens:

+
# Required
+CODEBERG_TOKEN=your_codeberg_token
+REVIEW_BOT_TOKEN=your_review_bot_token
+
+# Woodpecker CI
+WOODPECKER_TOKEN=your_woodpecker_token
+WOODPECKER_SERVER=http://localhost:8000
+
+# Timeouts
+CLAUDE_TIMEOUT=7200
+
+ + +
+
+ 2 + Initialize your project +
+

disinto init sets up everything: clones the repo, creates the project config, adds Codeberg labels, and installs cron jobs.

+
bin/disinto init https://codeberg.org/you/your-project
+
+
Expected output
+=== disinto init === +Project: you/your-project +Name: your-project +Cloning: https://codeberg.org/you/your-project.git -> /home/you/your-project +Branch: main +Created: /home/you/disinto/projects/your-project.toml +Creating labels on you/your-project... + + backlog + + in-progress + + blocked + + tech-debt + + underspecified + + vision + + action +Created: /home/you/your-project/VISION.md +Cron entries installed +Done. Project your-project is ready. +
+

Optional flags:

+ +
+ + +
+
+ 3 + Prepare your repo +
+

Your project needs three things before agents can work on it:

+
    +
  1. A CI pipeline — at least one .woodpecker/*.yml file. Agents wait for CI before reviewing or merging.
  2. +
  3. A CLAUDE.md — project context that agents read before every task. Describe your tech stack, how to build/test, coding conventions, and directory layout.
  4. +
  5. Branch protection — on Codeberg, require PR reviews and add the review bot as a write collaborator.
  6. +
+
# Create CLAUDE.md in your project
+cat > ~/your-project/CLAUDE.md <<'EOF'
+# Your Project
+
+## Tech stack
+- Node.js, React, PostgreSQL
+
+## How to build and test
+npm install && npm test
+
+## Conventions
+- Use TypeScript, ESLint, Prettier
+- Tests in __tests__/ directories
+EOF
+
+cd ~/your-project
+git add CLAUDE.md && git commit -m "Add CLAUDE.md for agent context"
+git push
+
+ + +
+
+ 4 + File your first issue +
+

Create an issue on Codeberg with the backlog label. Be specific — the dev-agent works best with clear acceptance criteria.

+
# Title: Add health check endpoint
+# Label: backlog
+# Body:
+
+## Problem
+The app has no health check endpoint for monitoring.
+
+## Approach
+Add a GET /health route that returns { "status": "ok" }.
+
+## Acceptance criteria
+- [ ] GET /health returns 200 with JSON body
+- [ ] Response includes uptime in seconds
+- [ ] Test covers the new endpoint
+

That's it. The factory takes over from here.

+
+ + +
+
+ 5 + Watch the lifecycle +
+

Within minutes, the agents start working. Here's what happens:

+
+ issue filed + + dev-agent picks it up + + PR opened + + CI runs + + review-agent reviews + + merged +
+

Monitor progress with:

+
# Check factory status
+bin/disinto status
+
+# Watch the dev-agent log
+tail -f /tmp/dev-agent.log
+
+# Watch the review log
+tail -f /tmp/review.log
+
+
Expected timeline
+~2 min dev-poll finds the issue, claims it +~5 min dev-agent opens a PR with the implementation +~2 min CI runs (Woodpecker) +~2 min review-agent approves or requests changes +~1 min PR merges, issue closes automatically +
+

If the review-agent requests changes, the dev-agent addresses them automatically. The loop repeats until the PR is approved and merged.

+
+ + +
+
+ 6 + Verify everything works +
+
# Factory status — shows active sessions, backlog depth, open PRs
+bin/disinto status
+
+# Check your repo — the PR should be merged
+cd ~/your-project
+git pull
+git log --oneline -5
+

You should see a merge commit with the dev-agent's implementation. The issue is closed, the branch is deleted.

+
+ + +
+

What's next

+

Now that the factory is running:

+ +
+ + + +
+ + diff --git a/site/index.html b/site/index.html index 6887bea..e980f86 100644 --- a/site/index.html +++ b/site/index.html @@ -527,6 +527,8 @@

The code is public. The factory is running. See for yourself.