- Shell 78.3%
- Python 10.3%
- JavaScript 7.9%
- Vue 1.1%
- TypeScript 0.9%
- Other 1.4%
|
|
||
|---|---|---|
| .forgejo | ||
| .sandcastle | ||
| docs | ||
| fleet-tui | ||
| git-hooks | ||
| onboarding | ||
| prompts | ||
| tests | ||
| tui | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| .shellcheckrc | ||
| align-worktree.sh | ||
| ask-human.sh | ||
| body-marker-lib.sh | ||
| body-marker.jq | ||
| branch-strategy.mts | ||
| cancel-lib.sh | ||
| check-harness-drift.sh | ||
| claim-lib.sh | ||
| claim-next-task.sh | ||
| claude-fence | ||
| CLAUDE.md | ||
| close-report-lib.sh | ||
| close-report.sh | ||
| CONTEXT.md | ||
| env-allowlist-lib.sh | ||
| evidence-lib.sh | ||
| execute-lib.sh | ||
| fence-lib.sh | ||
| fleet-dispatch-lib.sh | ||
| fleet-dispatch-receiver.py | ||
| fleet-dispatch.sh | ||
| fleet-landing-detect-lib.sh | ||
| fleet-queue-lib.sh | ||
| fleet-queue.sh | ||
| fleet-slot-report-lib.sh | ||
| forgejo-lib.sh | ||
| gate-lib.sh | ||
| gate.sh | ||
| git-cred-lib.sh | ||
| git-fence | ||
| git-setup.sh | ||
| heal-lib.sh | ||
| heal.sh | ||
| host-capacity-lib.sh | ||
| identity-lib.sh | ||
| land-pr.sh | ||
| landing-lib.sh | ||
| limit-lib.sh | ||
| list-ready-tasks.sh | ||
| main.mts | ||
| model-lib.sh | ||
| notify-mattermost.sh | ||
| package.json | ||
| park-wiring-lib.sh | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| policy-lib.sh | ||
| post-issue-ask.sh | ||
| preflight-lib.sh | ||
| preflight-swarm.sh | ||
| preflight-triage.sh | ||
| prices.conf | ||
| prompt-render-lib.sh | ||
| protected-paths-lib.sh | ||
| provision-lib.sh | ||
| README.md | ||
| record-run-result.sh | ||
| rehearsal-heal-lib.sh | ||
| rehearsal-report.sh | ||
| report-lib.sh | ||
| resume-parked-asks.sh | ||
| run-swarm.sh | ||
| run-triage.sh | ||
| runlog-lib.sh | ||
| schedule-backstop.sh | ||
| schedule-lib.sh | ||
| scheduler-canary.sh | ||
| session-host-lib.sh | ||
| session-runner.sh | ||
| STATUS.md | ||
| swarm-db-lib.sh | ||
| swarm-db.py | ||
| swarm-db.sh | ||
| swarm-identity.sh | ||
| swarm-yield-lib.sh | ||
| swarm-yield-signal.sh | ||
| swarm.config | ||
| sweep-lib.sh | ||
| triage-yield-lib.sh | ||
| triage-yield-signal.sh | ||
| verdict-lib.sh | ||
| verify-lib.sh | ||
| worktree-lib.sh | ||
dev-factory
A multi-project software factory: sandboxed AI agents drain product repos' ticket queues into verified, landed code, and e2e drives — with screenshots as the verification currency — confirm that features actually work, end to end, on real infrastructure.
The factory is one machine serving any number of product repos. A repo
plugs in by vendoring the harness at a pinned ref and declaring a thin
identity layer; the factory never belongs to any one product. Founding
decision: docs/adr/0001-*.md. Glossary: CONTEXT.md. Agent instructions:
CLAUDE.md. Current state and the live consumer list: STATUS.md.
Linux hosts only (GNU coreutils, bash ≥ 4.3); macOS untested. The harness
uses GNU-specific behaviours (stat -c %Y, date -d, flock, timeout,
declare -A, sha256sum) with no portability branch; onboard-host preflight
executes each one before a machine is enrolled.
Lineage
Three currents converge here:
- IndyDevDan's software-factory thinking — the factory is a product in
its own right: instrumented, observable, continuously reworked; agents are
staffed stations around a queue, and the queue's health is a first-class
concern. (Reviewed and imported in
docs/research/2026-08-11-software-factory-learnings.md.) - Matt Pocock's sandcastle (
@ai-hero/sandcastle) — the execution primitive: a Claude agent run inside a disposable Docker sandbox on an isolated git worktree, iterated until done, its commits proposed rather than trusted. - Matou's own agentic development process — where this harness was
hardened in production before being promoted to its own repo:
issues-as-queue with labels as the state machine, claim-by-comment
multi-host arbitration, "agent proposes, code disposes" close reports,
fail-closed gates and protected paths, healers on law-grade rails, and the
e2e drive + gap-ticketing loop that makes screenshots the proof of work.
(Surveyed in
docs/research/2026-08-15-factory-reengineering-survey.md.)
Design principle: pull, not push
The factory never pushes into a product repo and holds no credential that
could. Each product pulls: it vendors the harness files byte-identical
at a pinned ref — a commit SHA on main, or a release tag (v2026.10.14)
onboard.sh vendor resolves to its SHA and records alongside it — recorded as
.sandcastle/FACTORY_REF, and upgrades by bumping the pin (onboard.sh upgrade re-renders and diffs everything a bump touches, not only the
byte-comparable vendored layer; onboarding/MIGRATIONS is the per-event
ledger it reads). "Drift" means a
vendored file differs from its pin — structural corruption, always red. A
pin that merely trails main is an advisory, never a failure. There is no
canonical product repo, and adding the Nth product changes nothing about
the topology.
What lives here vs. in a product repo
Here (byte-identical across every consumer): the tested libs
(claim/limit/model/verdict/runlog/heal/close-report/gate/protected-paths/
sweep/swarm-db/worktree/rehearsal-heal), the orchestrators (run-swarm.sh,
run-triage.sh, heal.sh, rehearsal-report.sh, session-runner.sh, …),
forgejo-lib.sh (the tracker adapter), the host-crontab scheduler pair
(schedule-backstop.sh, which dispatches a workflow Forgejo's dead scheduler
owes a repo, and scheduler-canary.sh, its detection sibling that shouts to
Mattermost when a repo's Actions queue has gone silent — saturated or ungated,
#105/GOTCHAS 34), swarm.config, git-fence/git-hooks/, and this repo's own
tests (tests/*.sh) and CI (.forgejo/workflows/).
In each product repo (the thin declarative identity layer):
swarm-identity.sh— the repo's ownFORGEJO_API/HEAL_WORKDIR/REPO_SLUG. Copy the template here and edit the three values; every vendored script sources it for its defaults and carries no repo slug of its own.- a
Dockerfile— the product's toolchain layer (whatever the worker sandbox needs to build/test that product). - repo-specific gate rules, ready-task filters, and extra preflights beyond the vendored defaults.
- prompt enrichments layered on the skeletons here (
prompt.md,heal-prompt.md,rehearsal-*-prompt.md,session-runner-prompt.md) — see "Prompt skeletons" below. - an e2e driver conforming to the driver contract (exit non-zero on
red;
legs.jsonrewritten per leg; text logs; sortable run dirs;verdict.json), and per-repo.envsecrets. - host state (crontab entries, the host capacity lock,
swarm.db, host scheduling) is factory-owned (ADR 0001 point 4), not yet moved off its current host — tracked as #3.
Prompt skeletons — not yet templated
prompt.md, heal-prompt.md, rehearsal-heal-prompt.md,
rehearsal-report-prompt.md, and session-runner-prompt.md ship as
reference copies, not yet turned into a real {{REPO_SLUG}}-style
skeleton + per-repo enrichment render step. A prompt is live text handed
straight to a Claude session — getting a templating/render pipeline wrong
risks a broken prompt reaching every future worker, so it is deliberately
its own arc (#1) rather than a side effect of anything else.
Plugging in a repo
The vendoring steps (pin a ref, copy the files, write swarm-identity.sh,
record the pin) are automated by onboarding/onboard.sh — see
onboarding/README.md for the exact subcommands and what's still manual
(Mattermost channel creation, runner registration, the live smoke-ticket
acceptance gate); STATUS.md tracks the remaining work and the rulings the
tool's shape rests on.
By hand, if you'd rather not use the script yet:
- Pick a pinned ref (a commit SHA on
main). - Copy the files you need into your product repo's
.sandcastle/(everything except this README,.gitignore, and the prompt skeletons until the templating pipeline lands). - Write your own
swarm-identity.shfrom the template here (or runonboarding/onboard.sh identity). - Record the pinned ref (e.g.
.sandcastle/FACTORY_REF) so a drift check can compare your copies against it. - Set up your e2e driver — a repo without drives can land code but cannot prove features work; onboarding treats e2e setup as a mandatory question, not an optional extra.
Tests
bash tests/<name>-test.sh per file, or run the whole suite:
for t in tests/*.sh; do case "$t" in *fakebin*|*fixtures*) continue;; esac; bash "$t" || echo "FAIL: $t"; done
No network, no docker required — every test shims its own curl/claude.