Skip to content
Source-of-truth docs for humans and agents

Durable documents your agents can update.

VegaStack keeps source authoritative, renders fast public artifacts, and gives every comment a precise anchor — so humans and agents can ship together without losing context.

Self-host on Cloudflare. No telemetry, no lock-in.

Agents and MCP

Agents update source through stable contracts.

The Model Context Protocol surface and the factory CLI are derived from the same contract package. Agents do not see a different product than humans — they call the same routes the UI calls.

22 MCP tools
fetch, search, create_page, update_page, wait_for_review, apply_publication, and 16 more — every tool requires a workspace and returns a typed result.
OAuth device flow
Agents authenticate with the same OAuth device flow you use to sign in. Tokens are scoped to a workspace and can be revoked from settings.
Audit by default
Every mutation lands in the audit log with actor type. Reviewers can see when an agent acted versus when a human did, scoped per page or workspace.
Review loop

Anchored comments survive rewrites.

Every comment pins to a precise span of rendered text via a prefix-suffix anchor. When a page is rewritten, the renderer re-finds the anchor; if it drifts, the thread is marked drifted instead of vanishing.

  • Open, resolved, and complete states with a live event stream.
  • wait_for_review turns the loop into a blocking primitive an agent can call.
  • Audit history per page records exactly who said what and when.
Review2 awaiting
factory-bot
Updated the pricing table. Ready for review.
Reviewer
The third row is off by one cell. Otherwise looks good — resolve when fixed.
factory-botresolved
Fixed and re-rendered. Closing this thread.
Templates

Repeatable scaffolds, with placeholders agents can fill.

Workspaces ship templates for runbooks, RFCs, release notes, and anything you scaffold often. Agents and humans both create pages from a template through the same endpoint.

Workspace-scoped
Templates belong to a workspace. Write-level members can author them; admins control deletion.
Placeholder variables
Use {{var}} placeholders. The create-from-template dialog asks for values; unresolved variables surface as a warning.
Tabbed editor
Source, Preview, Properties, and Used-by tabs. Edits go through the same renderer as page sources.
factory CLI

One binary. Noun-then-verb. No surprises.

The factory CLI is a single npm package, generated from the same MCP contracts. Every command maps to a REST or MCP endpoint and is enumerated by factory completions. Install instructions are in the reference below.

$ factory login
Opening /oauth/device/verify…

$ factory whoami
user: ada@example.com  workspace: docs-team (wks_…)

$ factory pages create --title "Q4 launch plan" --folder fld_…
pg_2t5jq8…  source: 0 bytes

$ factory pages update pg_2t5jq8… --source ./plan.md
pg_2t5jq8…  source: 4.2 kB

$ factory publish page --page pg_2t5jq8… --permission view
pub_w1xr8…  https://example.com/docs-team/p/q4-launch-plan-2t5jq8

$ factory search "rollback"
pg_a1…  Incident postmortem template
pg_b9…  Q3 launch retro
Self-hosting

Self-host on Cloudflare.

VegaStack is a single Next.js app that deploys as a single Cloudflare Worker. There is no separate database service, no broker, no queue worker.

Cloudflare
One Worker, one Postgres database (via Hyperdrive), two R2 buckets. OpenNext bundles Next.js for the Workers runtime; the install script provisions resources and refuses legacy names.
FAQ

Things people ask before signing up.

What does “durable document” actually mean?
Pages keep their source intact and snapshot a version on every save. Publishing mints an immutable artifact pinned to a content hash. You can restore any prior version without losing the current draft.
Is VegaStack open source?
The product is built for self-hosting first. Source is available; license details live in the repo.
Do you store an OAuth token for GitHub backups?
No. The GitHub backup integration uses a GitHub App installation, not a user OAuth token. The installation reference is enough to push backup commits without holding user credentials.
What is the relationship to the prior Astro prototype?
VegaStack is a from-scratch Next.js App Router rewrite. It is not a port. There is no legacy compatibility layer.
Can I write my own agent?
Yes. The MCP server at /mcp speaks the standard JSON-RPC dialect; OAuth device flow handles auth. See the MCP and CLI doc for the full surface.