Skip to content

Commit 6e09a83

Browse files
committed
Split the documentation site out of the library repository
The pages, the tools that render them and the tests that check them move here from CTRLRun/ctrlrun, with their history. That repository keeps the library, its specifications, its README assets and everything `pip install ctrlrun` ships; this one keeps everything a reader sees at ctrlrun.dev and nothing that is published to PyPI. This repository is the Mintlify site root, so what was `docs/docs/` is `docs/` and the loose pages moved up one level. Every URL and every docs.json entry is unchanged. `.mintignore` is rewritten: the root used to be one directory with a few neighbours and is the whole repository now, so the tooling, the tests and the form API are each named. A file that is not a page and is not on that list would be a page nobody meant to publish. **The guarantee that a page describes the shipped library needed both trees, so it did not survive the split on its own.** `tools/docs_audit/_core.py` resolves a library checkout from $CTRLRUN_SOURCE or ../ctrlrun and raises when there is none: a check that cannot find the code is a red run, never a green one that verified nothing. CI here checks the library out; the library's CI runs these same checks from here against the commit it is proposing, so one implementation covers both directions. Five of the library's test files were split rather than moved, each along a line that was already there. What came here is the half that reads a page: the cookbook page checks, the claims and adapter tables, T180's scan over the release documents, the verify page, and a new comparison between this repository's images and the library's brand assets. Four of those tests had begun skipping rather than failing once the pages moved -- each guarded its read with a `pytest.skip("no repository checkout")` written for an sdist, where the pages are pruned. Here the pages are never pruned, so a missing one is a failure. One thing this commit cannot do: the Mintlify content directory is still `/docs` inside the library's repository. It has to be repointed at this repository's root, once, in the Mintlify dashboard, or the site keeps building from a directory with no pages left in it.
1 parent d1fd484 commit 6e09a83

254 files changed

Lines changed: 1449 additions & 2324 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
# The pages describe a library that lives in another repository, so a change *there* can
8+
# make a page here wrong without anything here changing. `CTRLRun/ctrlrun`'s own CI sends
9+
# this event on a push to its main branch, and the run below checks these pages against
10+
# that commit. Without it the split would have turned a red check into a slow drift.
11+
repository_dispatch:
12+
types: [library-changed]
13+
# And a weekly floor, so a dispatch that never arrives -- a token expiring, a workflow
14+
# edited -- surfaces as a red run rather than as silence.
15+
schedule:
16+
- cron: "17 6 * * 1"
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
check:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
26+
with:
27+
path: ctrlrun-docs
28+
29+
# The library these pages document. The checks read it -- a page that says the CLI
30+
# prints X is only true if the CLI prints X -- and `tools/docs_audit/_core.py` raises
31+
# when it is absent rather than skipping, so a checkout that failed to happen is a red
32+
# run and not a green one that verified nothing.
33+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
34+
with:
35+
repository: CTRLRun/ctrlrun
36+
ref: ${{ github.event.client_payload.sha || 'main' }}
37+
path: ctrlrun
38+
39+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
40+
with:
41+
python-version: "3.12"
42+
43+
- name: Install
44+
run: |
45+
python -m pip install --upgrade pip
46+
# The library itself, because the reference pages are rendered from its docstrings
47+
# and its `--help`, and the checks import it to compare.
48+
pip install -e "./ctrlrun[dev,gateway,otel,identity]"
49+
pip install ruff mypy pytest griffe pyyaml
50+
51+
# One script, called here and by a developer before pushing, so "it passed locally" and
52+
# "it passed in CI" cannot come to mean different things.
53+
- name: check
54+
working-directory: ctrlrun-docs
55+
env:
56+
CTRLRUN_SOURCE: ${{ github.workspace }}/ctrlrun
57+
run: ./scripts/check.sh
58+
59+
# The four drift checks, named individually because `STYLE.md` says the CI job runs them
60+
# and `test_ci_runs_the_three_checks_and_the_drift_check` reads this file to prove it.
61+
# A guard CI does not run is prose.
62+
- name: The documentation audit
63+
working-directory: ctrlrun-docs
64+
env:
65+
CTRLRUN_SOURCE: ${{ github.workspace }}/ctrlrun
66+
run: |
67+
python tools/docs_audit/snippets.py
68+
python tools/docs_audit/lint.py
69+
python tools/docs_audit/links.py
70+
python tools/docs_audit/render_capabilities.py --check

‎.gitignore‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
__pycache__/
2+
*.py[cod]
3+
.venv/
4+
venv/
5+
.mypy_cache/
6+
.pytest_cache/
7+
.ruff_cache/
8+
.coverage
9+
.DS_Store
10+
11+
# A local clone of the library this site documents, if you put it here rather than beside
12+
# this repository. `tools/docs_audit/_core.py` finds it either way.
13+
/ctrlrun/
14+
node_modules/

‎.mintignore‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# What is in this repository and is **not** a page of the site.
2+
#
3+
# The site root used to be `docs/` inside CTRLRun/ctrlrun, so this file only had to exclude a
4+
# handful of neighbours. The root is the whole repository now, which brings the tooling, the
5+
# tests and the form API into view -- so each of them is named here. A file that is not a page
6+
# and is not on this list is a page nobody meant to publish.
7+
8+
# The maintainers' documents.
9+
README.md
10+
IA.md
11+
STYLE.md
12+
SEO.md
13+
BUILD-PROMPTS-*.md
14+
15+
# The capability source and the rendered fragments pages embed. A render is a fragment, not a
16+
# page: `docs.mdx` and `docs/production/index.mdx` include them.
17+
capabilities.yaml
18+
generated/
19+
20+
# Source assets and the browser verification scripts. `images/` is the published set.
21+
assets/
22+
23+
# The checks, their tooling, and this repository's own configuration.
24+
tests/
25+
tools/
26+
scripts/
27+
.github/
28+
pyproject.toml
29+
LICENSE
30+
31+
# The Vercel Function behind the review form. It is deployed by Vercel, not by Mintlify.
32+
website-form/

docs/IA.md renamed to IA.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The target shape of the docs site, one line per page: what it is for and the query it should
44
answer. Later sessions write the pages; this file is what they write against, and
5-
`docs/capabilities.yaml` names pages by the paths below.
5+
`capabilities.yaml` names pages by the paths below.
66

77
**The fixed copy**, quoted here so every page quotes the same words:
88

@@ -15,12 +15,12 @@ answer. Later sessions write the pages; this file is what they write against, an
1515
| Promise | A consequential action happens at most once, exactly as approved, and leaves a receipt — and when the outcome is unknown, CTRLRun says so instead of guessing. | Hero subline, README paragraph 2 |
1616
| Hook (posts) | Agents can retry. The real world can't. | Social, talk titles; not the README header |
1717

18-
The rules every page is held to are in `docs/STYLE.md`. The tools that hold them are in
18+
The rules every page is held to are in `STYLE.md`. The tools that hold them are in
1919
`tools/docs_audit/`.
2020

2121
## Conventions
2222

23-
- Paths are root-relative on the site: `docs/concepts/effect-keys` is `docs/docs/concepts/effect-keys.mdx`.
23+
- Paths are root-relative on the site: `docs/concepts/effect-keys` is `docs/concepts/effect-keys.mdx`.
2424
- **Purpose** is the page's first-paragraph answer, compressed. **Query** is the search a
2525
stranger types, and the first sentence of the page is written to answer it.
2626
- The existing Markdown documents that stay where they are — the specifications,
@@ -169,7 +169,7 @@ row landed with `docs/SPEC-mcp-operator.md`, which is when it stopped being plan
169169

170170
Each Concepts page opens with one definitional sentence an assistant can quote standalone,
171171
has one diagram or code block, names the guarantee it supports and what it does not do, and
172-
ends with Next links. Every claim on a Concepts page has a `docs/docs/CLAIMS.md` row.
172+
ends with Next links. Every claim on a Concepts page has a `docs/CLAIMS.md` row.
173173

174174
| Path | Purpose | Query |
175175
|---|---|---|
@@ -276,7 +276,7 @@ signature · what is not covered. Query: *ctrlrun faq* and each question verbati
276276

277277
| Path | Purpose | Query |
278278
|---|---|---|
279-
| `security/threat-model` | What CTRLRun defends against, what it does not, and the fail-closed rules that follow; renders `docs/docs/THREAT_MODEL.md`. | *ctrlrun threat model* |
279+
| `security/threat-model` | What CTRLRun defends against, what it does not, and the fail-closed rules that follow; renders `docs/THREAT_MODEL.md`. | *ctrlrun threat model* |
280280
| `docs/security/verify-guarantees` | The guarantee catalogue G1–G11, what each exercises, what N/A means, what verify cannot see. | *ctrlrun verify guarantees* |
281281
| `docs/security/receipt-chain` | Each receipt carries the hash of the one before; what the chain detects, what it does not prove, and the two statements that erase the end of the log. Alteration, not authorship. | *tamper evident audit log AI agent* |
282282
| `security/how-this-is-built` | Spec-first, every MUST mutation-tested with the real numbers, independent review sessions, CLAIMS.md, N/A is not a pass, AI coding agents used throughout with the constraints that make that safe, and what has not been done: no external audit yet. Session 1b. | *is ctrlrun trustworthy* · *how ctrlrun is tested* |
@@ -286,7 +286,7 @@ signature · what is not covered. Query: *ctrlrun faq* and each question verbati
286286

287287
| Path | Purpose | Query |
288288
|---|---|---|
289-
| `architecture/overview` | The boundary CTRLRun owns, the canonical flow (normalize · decide · approve · reserve · execute · record), the module map; renders `docs/docs/ARCHITECTURE.md`. | *ctrlrun architecture* |
289+
| `architecture/overview` | The boundary CTRLRun owns, the canonical flow (normalize · decide · approve · reserve · execute · record), the module map; renders `docs/ARCHITECTURE.md`. | *ctrlrun architecture* |
290290
| `docs/architecture/specifications` | The six specifications, unchanged, with one line each on what the version asked; plus the OWASP and ACS readings. | *ctrlrun spec* |
291291

292292
## Changelog
@@ -406,7 +406,7 @@ Two sources with opposite emphases, and the tree above follows both:
406406
- Mintlify's own position, for the assistants that do read them: `llms.txt`, `llms-full.txt`
407407
and an MCP server are generated for every site. — <https://www.mintlify.com/docs/ai/llmstxt>
408408

409-
What this means concretely for these pages, and what `docs/STYLE.md` enforces: **answer-first
409+
What this means concretely for these pages, and what `STYLE.md` enforces: **answer-first
410410
first paragraphs** and one **definitional sentence** per Concepts page, written for a human;
411411
**consistent entity naming** (CTRLRun, effect key, action hash, AMBIGUOUS); **comparison
412412
tables** on every Compare page; **FAQ structured data** on the FAQ page; quotable, plain
@@ -415,6 +415,6 @@ it does not mean: keyword density, chunked pages, or a second writing style for
415415

416416
## Next
417417

418-
- `docs/STYLE.md` — the rules every page follows.
419-
- `docs/capabilities.yaml` — the single source the capability tables are rendered from.
418+
- `STYLE.md` — the rules every page follows.
419+
- `capabilities.yaml` — the single source the capability tables are rendered from.
420420
- `tools/docs_audit/` — the three checks and the generator.

0 commit comments

Comments
 (0)