softwarefactory.build

A directory and guide library for agent-native software factories.

Worker

The factory runs here.

The directory is prerendered HTML. Jobs run inside this Worker, on a Cloudflare Agent — a SQLite-backed Durable Object — not in a database and not on Pages.

What this is

FactoryRuntime is a single named Durable Object (default) exported from the Worker. It keeps a short job log in Agent state and executes four kinds of work:

GitHub remains the content store. The Worker is where jobs run. A human publishes.

How to invoke a job

POST /factory/jobs with a bearer token. Set the token with npx wrangler secret put FACTORY_TOKEN.

curl -sS https://softwarefactory.build/factory/jobs \
  -H "authorization: Bearer $FACTORY_TOKEN" \
  -H "content-type: application/json" \
  -d '{"kind":"validate","input":{"yaml":"slug: example\n..."}}'

GET /factory/jobs lists recent jobs. GET /factory/jobs/:id returns one job, including the log.

issue-to-pr also needs GITHUB_TOKEN (repo contents and pull requests) and optionally GITHUB_REPO (owner/name, default trevize-dev/softwarefactory.build). The same draft-PR path runs as a GitHub Action when an issue is labeled factory-draft, or via workflow_dispatch. Neither path merges.

What this is not