Braid is a hybrid interactive coding agent with a deeply integrated graph workflow system.
  • Python 78.2%
  • TypeScript 20.7%
  • Shell 0.6%
  • JavaScript 0.2%
  • CSS 0.2%
  • Other 0.1%
Find a file
Chris Moriarty 7353d6b941 Archive solo-review-band (#153) [skip ci]
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 02:05:59 -04:00
.claude feat(ui): every console action has a key and a name, and the tests split into a fast lane and a full one (#30, #39) 2026-09-26 18:32:32 -04:00
.forgejo/workflows fix(deploy): wait while a step waits on an agent's question, not only while one runs (#32) 2026-09-15 01:42:39 -04:00
.osf feat: step and band names that say what they do (#142) 2026-10-04 23:32:34 -04:00
deploy fix(deploy): the self-check stops the Chromium its browser test left, before removing its scratch directory 2026-10-06 00:17:51 -04:00
docs chore(repo): the public repository shows no network map, carries a licence, and locks a fixed urllib3 (#146) 2026-10-05 15:24:34 -04:00
openspec Archive solo-review-band (#153) [skip ci] 2026-10-06 02:05:59 -04:00
src/osf feat(pipelines): solo, an experimental single-agent OpenSpec pipeline carried in one forked session (#151) 2026-10-06 01:30:09 -04:00
tests feat(pipelines): solo, an experimental single-agent OpenSpec pipeline carried in one forked session (#151) 2026-10-06 01:30:09 -04:00
tools feat(sim): a shipped pipeline runs end to end in seconds, with a scripted model and a fake forge (#149) 2026-10-05 20:41:56 -04:00
ui fix(console): a solo run's review is one band, and its later rounds are drawn once they start (#153) 2026-10-06 01:58:16 -04:00
.dockerignore feat(sim): a shipped pipeline runs end to end in seconds, with a scripted model and a fake forge (#149) 2026-10-05 20:41:56 -04:00
.gitignore feat(sim): a shipped pipeline runs end to end in seconds, with a scripted model and a fake forge (#149) 2026-10-05 20:41:56 -04:00
AGENTS.md feat(browser-check): plan the states first, brief browser with what is known, and keep its tabs (#127) 2026-10-03 10:44:53 -04:00
CLAUDE.md feat(sim): a shipped pipeline runs end to end in seconds, with a scripted model and a fake forge (#149) 2026-10-05 20:41:56 -04:00
Dockerfile feat(sim): a shipped pipeline runs end to end in seconds, with a scripted model and a fake forge (#149) 2026-10-05 20:41:56 -04:00
LICENSE chore(repo): the public repository shows no network map, carries a licence, and locks a fixed urllib3 (#146) 2026-10-05 15:24:34 -04:00
pyproject.toml chore(repo): the public repository shows no network map, carries a licence, and locks a fixed urllib3 (#146) 2026-10-05 15:24:34 -04:00
README.md chore(repo): the public repository shows no network map, carries a licence, and locks a fixed urllib3 (#146) 2026-10-05 15:24:34 -04:00
uv.lock chore(repo): the public repository shows no network map, carries a licence, and locks a fixed urllib3 (#146) 2026-10-05 15:24:34 -04:00

Braid

Combining the interactive coding agent experience with a graph-based workflow.

Braid turns a ticket into a pull request by running an interactive coding agent through a graph of steps, each step checked deterministically instead of trusting the agent's word. The graph follows OpenSpec and feature branching, the practices teams already trust. Essentially vibe coding meets traditional software engineering, with a human in the loop at the critical steps.

🚧 Beta - still under heavy development 🚧

Braid on a finished production run: the steps down the left, an apply step's transcript in the middle, and the test subagent it delegated to on the right

How it works

flowchart LR
    agent["Interactive<br/>coding agent"]:::agent
    dag["Graph workflow<br/>(DAG)"]:::script
    se["OpenSpec +<br/>feature branching"]:::human
    braid(["Braid"]):::forge
    ui["One UI to watch<br/>and steer both"]:::agent
    agent --> braid
    dag --> braid
    se --> dag
    braid --> ui

    classDef agent  fill:#1e3a5f,stroke:#60a5fa,color:#e0f2fe
    classDef human  fill:#78350f,stroke:#fbbf24,color:#fef3c7
    classDef script fill:#1f2937,stroke:#9ca3af,color:#f3f4f6
    classDef forge  fill:#14532d,stroke:#4ade80,color:#dcfce7
Combines the interactive coding agent experience with a graph-based workflow.
OpenSpec and feature branching, the practices teams already trust.
One rich UI for both the workflow and the agent.
Trustworthy on mid-sized models, with deterministic checks on every step
Build the right graph for the job: eleven pipelines built in, or your own as YAML in the repository
A methodology proven over a long software career, for AI agents.

How the graph system works

Braid treats work as a graph, not a single prompt.

  • Agent steps do the creative work.
  • Scripted checks verify repository state.
  • Human gates approve the important moves.
  • State transitions decide what can run next.
Issue → Explore → Propose → Review → Apply → Test → Pull request → Merge & archive
↑ revise loop  ·  ↑ fix loop

The point: the repo, not the agent, decides when work is ready.

The pipelines

A pipeline is a graph, written as YAML. A run names the one it uses, in the New Run wizard or with pipeline on POST /api/runs. Eleven are built in:

Pipeline What it does
thorough The default. Explore, propose, review, apply, code review, the tests and a judge, pull request, archive
minimalist Propose, apply, the tests and a judge, pull request, archive
quick-fix A fix and its tests straight from the brief, with no OpenSpec change
docs Documentation and comments, then a link check; no tests and no OpenSpec change
plan A new project's PLAN.md and its OpenSpec proposals, for your review; no code
git-flow, git-flow-minimalist, git-flow-quick-fix, git-flow-docs The four above on feature/* branches, cut from and merged into develop
git-flow-release, git-flow-hotfix A release from develop, or a hotfix from main, tagged and merged back

In thorough, each stage is checked before the next starts:

  • the proposal must pass openspec validate --strict;
  • four independent reviews read it, and it is revised at most twice;
  • a person approves the proposal, the merge and the archive, or auto-approve answers those gates for them;
  • Braid runs the tests itself, a judge opens a UI change in a real browser, and an agent fixes what failed, for at most two rounds;
  • the merge waits for the pull request's own checks.

A repository can replace a pipeline or add its own in .osf/pipelines/<name>.yaml. The guide lists every step.

This is how we move from vibe coding toward reliable software systems: the agent stays creative, but the workflow keeps it constrained, reviewable, and checkable.

Run it locally

You need Python 3.12 with uv, Node 22+, git, lsof, and opencode 1.18.21 and openspec on your PATH. uv run python -m osf doctor checks the host and names anything missing.

From the root of the repository:

uv sync                                   # Python dependencies
(cd ui && npm ci && npm run build)        # build the web UI into ui/dist, which osfd serves

export OSF_ROOT=$PWD/.dogfood OSF_STATE_DIR=$PWD/.dogfood/state   # database, repo copies, run worktrees
export OSF_SANDBOX=none                   # no systemd sandbox on a laptop
export OSF_GATE_URL=                      # no inference meter: agents talk to the model directly
export OSF_UPSTREAM_URL=http://<model-host>:8090/v1   # your OpenAI-compatible model server

uv run python -m osf migrate              # create or upgrade the database (always explicit)
uv run python -m osf serve                # start osfd, the Braid server

Then open http://127.0.0.1:8710. The API is on the same address. curl http://127.0.0.1:8710/api/status says "ready" when the server is idle, "running" while steps run, and "down" when it cannot reach the model server.

  • Forgejo. Issues and pull requests use https://forgejo.underthere.xyz with the API token in ~/.config/opencode/forgejo-token. Point elsewhere with OSF_FORGEJO_URL and OSF_FORGEJO_TOKEN_FILE.
  • Model server. Change it later from the settings page (the ⚙ in the header, or g s).
  • Keyboard. The console is keyboard-driven: ? lists every shortcut.
  • Another port. Use OSF_PORT=9000, or OSF_PORT_OFFSET=100 to shift every port so a second copy runs at http://127.0.0.1:8810.
  • Stop it. Kill whatever owns the port: kill $(lsof -t -nP -iTCP:8710 -sTCP:LISTEN).
  • No GPU? Run ./tools/demo.sh up. It starts osfd against a fake model at the same http://127.0.0.1:8710, enough to try the UI, and ./tools/demo.sh down stops it. The fake model is scripted for exploring only, so a run there stops at the proposal.

More detail, including the full demo, is in the guide.

Production

Braid runs in production at http://openspecflow.internal.underthere.xyz, an internal tool reached on the LAN or over the VPN. It is a container stack on the openspecflow VM, managed by Portainer. Every push to main rebuilds the image, pushes it to the Forgejo registry, waits for busy steps to finish (running, or waiting on an agent's question) for up to an hour, and redeploys. curl http://openspecflow.internal.underthere.xyz/api/status reports the build it is serving as commit.

The runbook covers setup, redeploys, rollback and logs: deploy/README.md.

Acknowledgements

Braid stands on the shoulders of these open-source projects!

OpenSpec Spec-driven change format; openspec validate checks every proposal
opencode The agent runtime; each step drives an opencode serve session
Qwen The open-weight model family doing the thinking
vLLM Serves the model on local hardware
Forgejo Issues in, pull requests out
Starlette · Uvicorn The osfd web server and API
SQLite The single append-only run log
Playwright The browser the judge opens a UI change in, and the console's own browser tests
React · Vite · Tailwind CSS · virtua The web UI

Learn more

  • Guide: running it, prerequisites, the keyboard, the pipelines, real-run notes, layout
  • Deploy runbook: the production stack, redeploys, rollback and logs
  • Design: the design of record (read §0a first)
  • Contract: module ownership and core rules

License

MIT