MIT

OctopusGarden

OctopusGarden

OctopusGarden — the command-line tool is called octog — is an open source “software dark factory” written in Go. You describe the software you want in a Markdown specification and how to verify it in YAML scenarios, then OctopusGarden orchestrates AI coding agents that generate, build, test and iterate on the code until it converges on a working implementation — with no human code review in the loop.

It implements the “software factory” pattern popularised by StrongDM. The scenarios are a holdout set: the agent that writes the code never sees them, and an independent LLM judge scores each scenario step probabilistically (0-100) rather than pass/fail. Because the generator cannot read the tests, it cannot simply optimise against them, and a partial score gives the loop far more to work with than a boolean failure.

Key Features

  • Holdout scenarios — Verification scenarios live apart from generation and are only revealed to the validator, so the coding agent cannot game the test.
  • Attractor convergence loop — Generate → build in a Docker container → validate → score → feed failures back, repeating until satisfaction passes your threshold (95% by default).
  • Probabilistic LLM-as-judge scoring — Every scenario step gets a satisfaction score from 0 to 100, so “nearly right” is distinguishable from “broken”.
  • Preflight assessment — An LLM pass rates spec clarity and scenario quality before you spend any generation budget.
  • Wonder/reflect stall recovery — When the loop stops improving, a high-temperature diagnosis pass finds the root cause and a low-temperature pass writes a surgical fix.
  • Frugal model escalation — Start on a cheap model with --frugal-model, escalate to your main model after two non-improving iterations, and downgrade again after five consecutive improvements.
  • Gene transfusion — Extract coding patterns from an existing codebase with octog extract and bootstrap generation from them with octog run --genes.
  • Stratified validation — --stratified validates scenarios in ascending difficulty tiers, converging each tier before advancing so easy tests cannot mask hard failures.
  • Run history and costs — octog status lists past runs with per-scenario scores and token costs; each run and iteration is recorded in a local SQLite store.
  • Interactive spec drafting — octog interview drafts a spec conversationally, optionally emitting holdout scenario YAML alongside it.

Why Use OctopusGarden?

Supervising a coding agent usually means prompt-wait-review cycles and reading diffs you did not write. OctopusGarden replaces that with a loop that verifies its own output: the spec is the approval, and the code ships when the holdout scenarios score above your threshold. It suits well-specified, API-shaped software — CRUD services, REST APIs, terminal tools — where you can write down what “working” means before any code exists.

Use Cases

  • Turning a written specification into a working REST service that passes scenarios you wrote, without reviewing the generated code line by line.
  • Running the factory unattended on long-horizon tasks, with a defined satisfaction threshold as the stop condition.
  • Re-validating an already running service against the same scenarios at any time with octog validate --target.
  • Bootstrapping a codebase’s conventions with gene transfusion so generated code matches an existing project’s patterns.

Platform

Linux (amd64/arm64) · macOS (Intel/Apple Silicon) · Windows — single Go binary, also installable via Homebrew. Runs require Docker and an Anthropic or OpenAI API key.

Licence

MIT

Website

github.com/foundatron/octopusgarden

Explore More Categories

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.