Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ The API is the most important thing to get right. A bad shape costs a breaking c
- No em dashes.
- Match the existing conventions, patterns, and naming when possible.
- Fix any outdated docs and comments inline; don't add a separate PR for it.
- Add the AI marker `(Written by <model>)` to any posts on GitHub, excluding commit messages that contain `Co-Authored-By:` trailers.
- Any AI comments may be challenged, and not confused with human maintainers.

# Guidelines

Expand Down
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ PRs are squash-merged, so the PR title becomes the commit subject and the PR des
# PRs

Keep the body short and structured, not narrated.
Have at least these sections:

- **Problem**: a summary of the problem and why this PR is needed.
- **Approach**: a summary of the approach taken to solve the problem.
- **Impact**: a bullet point for every public API/wire change made.
- **Alternatives**: any alternative approaches considered.
- **Follow-ups**: any issues encountered or quests created.

When pushing additional commits to an existing PR, update the title and description if needed.
When taking over someone else's PR, push commits on top of theirs so they keep credit.
Expand All @@ -25,9 +27,10 @@ Fix any merge conflicts and failing CI checks.
# AI

AI-assisted issues, pull requests, reviews, and comments are welcome.
GitHub issues are the public front door for brainstorming. Prefer a quest for work needing durable scope or coordination.
Especially bug reports; dive deep into the root issue before proposing a solution.

Add the AI marker `(Written by <model>)` to any posts on GitHub, excluding commit messages that contain `Co-Authored-By:` trailers.
GitHub issues are the public front door for brainstorming.
Prefer a quest for work needing durable scope or coordination.

# Reviews

Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The core networking is delegated to a QUIC library but the rest is in applicatio
Full documentation lives at **[doc.moq.dev](https://doc.moq.dev)**.

- **[Run the demo](https://doc.moq.dev/setup/)** - try MoQ locally with a relay, demo media, and the web UI.
- **[Agent setup](https://doc.moq.dev/setup/agent)** - teach your AI coding agent (Claude Code, Cursor, etc.) how to build with MoQ.
- **[Agent setup](https://doc.moq.dev/setup/agent)** - teach your AI coding agent (Claude Code, Cursor, etc.) how to build with MoQ. The docs are also served as markdown via [llms.txt](https://doc.moq.dev/llms.txt).
- **[Linux packages](https://doc.moq.dev/setup/install)** - install the relay and GStreamer plugin from `apt.moq.dev` / `rpm.moq.dev`.
- **[Production setup](https://doc.moq.dev/setup/prod)** - deploy a relay with a real domain and TLS.

Expand Down
71 changes: 68 additions & 3 deletions bun.lock

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions doc/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineConfig } from "vitepress";
import llmstxt from "vitepress-plugin-llms";
import { syncDrafts } from "./drafts";

// Generated before VitePress enumerates routes, so the pages and this sidebar
Expand Down Expand Up @@ -232,6 +233,18 @@ export default defineConfig({
lineNumbers: true,
},

// Serves /llms.txt (an index), /llms-full.txt (every page inline), and a
// .md twin of every page so agents can read the docs without the HTML.
vite: {
plugins: [
llmstxt({
domain: "https://doc.moq.dev",
// Static files are already served verbatim.
ignoreFiles: ["public/**"],
}),
],
},

ignoreDeadLinks: [
// Localhost URLs are intentional for development examples and aren't
// reachable at build time (e.g. the relay on :4443, the dev server on :5173).
Expand Down
7 changes: 7 additions & 0 deletions doc/.vitepress/drafts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,16 @@ function render(source: string, routes: Map<string, string>): { meta: Metadata;
return out;
};

// The abstract's first line doubles as the page description for llms.txt
// and the meta tag, with citations reduced to their labels.
const description = cite(abstract.find((line) => line.trim() !== "") ?? "")
.replace(/\[([^\]]+)\]\([^)]*\)/g, "$1")
.trim();

const page = [
"---",
`title: ${JSON.stringify(meta.title)}`,
`description: ${JSON.stringify(description)}`,
"outline: deep",
"---",
"",
Expand Down
2 changes: 1 addition & 1 deletion doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ If everything works, a browser window will pop up demoing how to both publish an

- Keep reading the [development guide](/setup/dev) to run more advanced demos.
- Skip ahead to the [production guide](/setup/prod) to see what it takes to deploy this bad boy.
- Using an AI coding agent? [Teach it MoQ](/setup/agent) with a one-line prompt.
- Using an AI coding agent? [Teach it MoQ](/setup/agent) with a one-line prompt, or point it at [llms.txt](/llms.txt).

## Applications

Expand Down
1 change: 1 addition & 0 deletions doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@types/node": "^26.4.1",
"typescript": "7.0.2",
"vitepress": "^1.6.4",
"vitepress-plugin-llms": "^1.14.0",
"wrangler": "^4.129.0",
"yaml": "^2.9.0"
}
Expand Down
2 changes: 1 addition & 1 deletion doc/public/setup/agent/prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Notes:
- Add `--global` to install user-level instead of project-level.
- Add `-a <agent>` (e.g. `-a claude-code`) to target a specific agent instead of auto-detection.

The skill teaches the agent the MoQ architecture, the `@moq/*` npm packages and `moq-*` Rust crates, the web components, relay setup, and common pitfalls.
The skill tells the agent what MoQ is and how to read the documentation as markdown (https://doc.moq.dev/llms.txt) instead of guessing APIs.

## Verify

Expand Down
8 changes: 6 additions & 2 deletions doc/setup/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Using an AI coding agent like Claude Code, Cursor, or Codex? Teach it MoQ by pas
Follow the instructions at https://doc.moq.dev/setup/agent/prompt.md
```

The agent will fetch the instructions and install the [MoQ skill](https://github.com/moq-dev/moq/tree/main/skills/moq) into your project. The skill is an index of the MoQ ecosystem: what you can build (live streaming, conferencing, voice AI, real-time data, and more) and which [`@moq/*`](/lib/js/) packages, [`moq-*`](/lib/rs/) crates, gateways, and plugins to reach for, so the agent starts from the right layer instead of hallucinating an API.
The agent will fetch the instructions and install the [MoQ skill](https://github.com/moq-dev/moq/tree/main/skills/moq) into your project. The skill tells the agent what MoQ is and to read this site as markdown (see below) instead of hallucinating an API.

## Manual Installation

Expand All @@ -25,6 +25,10 @@ Add `--global` for a user-level install, or `-a <agent>` to target a specific ag

## What's in the Skill?

The skill is a single markdown file, [`skills/moq/SKILL.md`](https://github.com/moq-dev/moq/blob/main/skills/moq/SKILL.md), that your agent loads when a task involves MoQ. It's a map rather than a manual: use cases matched to the libraries, binaries, and gateways that implement them, plus links back to [doc.moq.dev](https://doc.moq.dev) for the details.
The skill is a single markdown file, [`skills/moq/SKILL.md`](https://github.com/moq-dev/moq/blob/main/skills/moq/SKILL.md), that your agent loads when a task involves MoQ. It's deliberately short: what MoQ is, a pointer to this site, and the few facts that don't change, so it never goes stale as the packages evolve.

Contributions welcome; it's just markdown.

## Reading the Docs

Every page on this site is also served as plain markdown: drop any trailing `/` and append `.md`, so `/bin/relay/` becomes `/bin/relay.md` and `/lib/js/watch` becomes `/lib/js/watch.md`. [`/llms.txt`](/llms.txt) indexes every page with a one-line description, and [`/llms-full.txt`](/llms-full.txt) bundles them all into one file, following the [llms.txt](https://llmstxt.org) convention.
Loading
Loading