Auto Docs

Docs that write themselves.

Close an epic or ship a feature version — within 5 minutes, TeamX has written two docs for you. Tech docs for agents. User-facing release notes for everyone else. Both on by default. Toggle either kind off per event.

Two kinds, one trigger

A doc for your agents. A doc for your users.

Tech docs

For AI agents + engineers

Structured markdown: summary, architecture & key files, API / data shape, behaviors, where to extend. Written to be pasted into a coding agent's context when it next touches this area.

User docs

For non-technical readers

Plain-English release notes: a one-paragraph summary, 3-5 bullets of concrete things the user can now do, a 'how to try it' section. No jargon, no code. Safe to publish.

When they fire

Tied to two moments of truth.

When an epic closes

The moment you flip an epic to done, both doc kinds are enqueued (if enabled). A Postgres trigger watches work_items; nothing to wire up.

When a feature version ships

Create a new row in feature_versions (or finalize a draft) and both kinds fire. Release notes include version label, summary, breaking-change flag, and linked epics.

How to use it

Nothing to set up. A few levers to pull.

1

It's on by default

Every team gets 4 rules pre-enabled: tech + user docs on epic close, tech + user docs on feature version publish. No setup required — your next closed epic becomes two docs.

2

Turn either kind off

Open Settings → Documentation. Each event (epic close, feature version ship) has a tech switch and a user switch. Flip either; the other keeps running. Disabling is instant.

3

Backfill old work retroactively

Same settings page has a "Generate retroactively" button. It sweeps every done epic and shipped feature version, enqueues the docs you don't already have, and the queue drains within 5 minutes. Nothing duplicates.

4

Read them at /docs

Open /docs in the dashboard. Filter by tech / user. Click any row for the markdown view. Each doc has a Regenerate button that re-runs the generator if you edited the source after it was written.

5

Share user docs publicly

If your team has public sharing enabled, published user docs automatically appear at /docs/<your-team-slug> on teamx.sh. Tech docs stay private — they're for internal agents only.

Public docs

Release notes on autopilot.

If your team has public_enabled=true, published user docs appear at /docs/<your-team-slug>. Each doc is a standalone page with a clean URL — safe to share on Twitter, link from your changelog, or send in an email.

Tech docs are never public. RLS enforces this at the DB layer — the public endpoint simply cannot read the generated_docs table.

FAQ

Honest answers.

Where do the docs get generated?

A pg_cron job runs every 5 minutes and dispatches pending rows to the gen-doc edge function. gen-doc loads the source (epic + child tasks, or feature + version), calls your BYOK AI key via ai-proxy if you have one, and writes the markdown back to generated_docs (tech) or user_docs (user). Without BYOK, a deterministic extractive template runs — never empty, just less polished.

How long until a doc appears?

At most 5 minutes — the drain is scheduled every 5. Most land in 6-10 seconds because the edge function returns quickly and the status flips to published on the spot.

Can I edit the generated markdown?

Yes. The doc rows are just markdown. Edit content_md directly via your own tools if you need to — a future version will add in-app editing. Clicking Regenerate re-runs the generator and overwrites your edits, so only hit it when the source has materially changed.

What if BYOK isn't configured?

Docs still land. The fallback template reads the source (epic title + tasks, or feature + version + linked epics) and formats it as structured markdown. It's serviceable — a real doc with real content — just not as fluent as an LLM would write. Flip the BYOK key on and the next regeneration uses it.

Who can see the docs?

Internal /docs: only team members (RLS on generated_docs + user_docs). Public /docs/<team>: only user docs, only if the team has public_enabled=true, only rows with status=published. Tech docs are never public. RLS enforces all three gates at the DB layer.

Does this replace my existing wiki / README?

No — it complements them. Think of Auto Docs as the ever-current layer: the summary of what exists right now, regenerated on every change. Your hand-written wiki covers the things that never change (vision, onboarding). Your READMEs cover repo-specific setup. Auto Docs cover what a visitor (human or agent) would ask about each feature today.

Backfill your first batch in one click.

Open Settings → Documentation in the dashboard, hit Generate retroactively, and come back in 5 minutes.