@open-agent-toolkit/cli 0.3.26 → 0.3.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/assets/bundle-metadata.json +1 -1
- package/assets/docs/contributing/documentation.md +39 -6
- package/assets/docs/contributing/markdown-features.md +14 -2
- package/assets/docs/docs-tooling/add-docs-to-a-repo.md +12 -9
- package/assets/docs/docs-tooling/commands.md +1 -1
- package/assets/docs/docs-tooling/workflows.md +14 -10
- package/assets/docs/getting-started/tool-packs.md +5 -3
- package/assets/docs/skills/index.md +8 -8
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-docs-analyze/SKILL.md +2 -2
- package/assets/skills/oat-docs-analyze/references/legacy-scaffold-checks.md +4 -0
- package/assets/skills/oat-docs-bootstrap/SKILL.md +39 -59
- package/assets/templates/docs-app-fuma/AGENTS.md +50 -0
- package/assets/templates/docs-app-fuma/app/[[...slug]]/page.tsx +7 -3
- package/assets/templates/docs-app-fuma/app/llms/[...slug]/route.ts +15 -0
- package/assets/templates/docs-app-fuma/app/llms-full.txt/route.ts +7 -0
- package/assets/templates/docs-app-fuma/app/llms.txt/route.ts +7 -0
- package/assets/templates/docs-app-fuma/docs/contributing/docs-toolchain.md +48 -0
- package/assets/templates/docs-app-fuma/docs/contributing/index.md +13 -0
- package/assets/templates/docs-app-fuma/docs/contributing.md +77 -41
- package/assets/templates/docs-app-fuma/docs/getting-started.md +3 -33
- package/assets/templates/docs-app-fuma/docs/index.md +2 -2
- package/assets/templates/docs-app-fuma/lib/source.ts +5 -0
- package/assets/templates/docs-app-mkdocs/AGENTS.md +46 -0
- package/assets/templates/docs-app-mkdocs/docs/contributing/docs-toolchain.md +44 -0
- package/assets/templates/docs-app-mkdocs/docs/contributing/index.md +13 -0
- package/assets/templates/docs-app-mkdocs/docs/contributing.md +105 -21
- package/assets/templates/docs-app-mkdocs/docs/getting-started.md +7 -25
- package/assets/templates/docs-app-mkdocs/docs/index.md +7 -2
- package/assets/templates/docs-app-mkdocs/mkdocs.yml +1 -0
- package/dist/commands/docs/init/docs-commands.d.ts +1 -0
- package/dist/commands/docs/init/docs-commands.d.ts.map +1 -1
- package/dist/commands/docs/init/docs-commands.js +8 -3
- package/dist/commands/docs/init/scaffold.d.ts.map +1 -1
- package/dist/commands/docs/init/scaffold.js +24 -10
- package/dist/commands/docs/nav/fumadocs.d.ts.map +1 -1
- package/dist/commands/docs/nav/fumadocs.js +32 -10
- package/package.json +2 -2
- package/assets/skills/oat-docs-bootstrap/assets/AGENTS.md.template +0 -64
|
@@ -1,76 +1,112 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Contributing
|
|
3
|
-
description: 'Authoring
|
|
3
|
+
description: 'Authoring contract, generated files, supported syntax and validation.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Contributing to {{SITE_NAME}}
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Ship documentation with the behavior it explains. Use the [docs toolchain guide](contributing/docs-toolchain.md) for setup and validation and [contributor guides](contributing/index.md) as the local map.
|
|
9
|
+
|
|
10
|
+
Agent working rules: `../AGENTS.md` (app-root source file).
|
|
11
|
+
|
|
12
|
+
## Authored and generated files
|
|
13
|
+
|
|
14
|
+
| Surface | Owner and action |
|
|
15
|
+
| --------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
16
|
+
| `docs/**/*.md`, including `docs/**/index.md` | Authored source; edit purpose and Contents maps directly. |
|
|
17
|
+
| `AGENTS.md` and this contributor guide | Authored working rules and human guidance; keep their audiences separate. |
|
|
18
|
+
| `docs/**/meta.json` | Committed derived sidebar; regenerate with nav sync, never hand-edit. |
|
|
19
|
+
| App-root `index.md` | Generated machine inventory from Markdown; predev/prebuild regenerate it. |
|
|
20
|
+
| `.source/`, `.next/`, `out/` | Generated collection, build and static export; do not edit. |
|
|
21
|
+
| `app/`, `lib/`, `source.config.ts`, `next.config.js`, package scripts | Authored application/configuration; review tooling changes explicitly. |
|
|
22
|
+
|
|
23
|
+
Fumadocs collections omit configured non-reader routes as well as navigation/manifest entries. Per-page `generateMetadata` reads title/description from loaded source. `/llms.txt`, `/llms-full.txt` and `/llms/<page-slugs>/content.md` (root `/llms/content.md`) serve the same loaded `.md` reader set, including readers omitted from a hand-authored sidebar. MDX is excluded. Agent bodies retain authored Markdown: resolve relative links against the listed source path, not `/llms/`; follow each canonical rendered URL for the site.
|
|
9
24
|
|
|
10
25
|
## Navigation contract
|
|
11
26
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
- `overview.md` is deprecated in favor of `index.md`.
|
|
27
|
+
Every content directory has an authored `index.md` with a useful purpose paragraph and one `## Contents` local map. Prefer `.md` pages with nonempty `title` and `description` frontmatter and exactly one document H1. `overview.md` is deprecated.
|
|
28
|
+
|
|
29
|
+
Within `## Contents`, use dash-only links to sibling pages or child indexes, optionally followed by a description. A `### Label` starts a group and must contain at least one authored entry before the next group/end. Entries before the first group are ungrouped. A `*` or `+` link bullet, or an empty authored group, is an error naming the file and line. The map ends at the next level-two heading; fenced examples are ignored. A self-index link retains the existing landing-page behavior. Missing Contents keeps deterministic manifest fallback, but strict nav still requires an authored map and lists unlisted reader pages.
|
|
16
30
|
|
|
17
|
-
|
|
31
|
+
```markdown
|
|
32
|
+
## Contents
|
|
18
33
|
|
|
19
|
-
|
|
34
|
+
- [Start here](getting-started.md) - The first safe result.
|
|
20
35
|
|
|
21
|
-
|
|
22
|
-
{{INSTALL_CMD}}
|
|
23
|
-
```
|
|
36
|
+
### Contributor guides
|
|
24
37
|
|
|
25
|
-
|
|
38
|
+
- [Toolchain](contributing/index.md) - Local setup and authoring.
|
|
39
|
+
```
|
|
26
40
|
|
|
27
|
-
|
|
28
|
-
{{DEV_CMD}}
|
|
29
|
-
```
|
|
41
|
+
`documentation.navOwner: nav-sync` means nav sync owns derived navigation. With `hand-authored` or undeclared ownership, do not silently regenerate; agree the ownership/change first. Configured `documentation.nonReaderPaths` omits drafts/templates from navigation and manifests; an explicit Contents link does not override an exclusion. `documentation.excludes` affects only the manifest. Do not add an exclusion to hide an unlisted reader page.
|
|
30
42
|
|
|
31
|
-
|
|
43
|
+
## Add, move or rename a page
|
|
44
|
+
|
|
45
|
+
1. Read the nearest authored map and choose a path in its scope; create a child `index.md` when adding a directory.
|
|
46
|
+
2. Add useful title/description frontmatter, one H1, and the page's reader outcome. Use `.md`-suffixed source links such as `[Guide](guide.md)` and `[Section](section/index.md)`.
|
|
47
|
+
3. Update the nearest Contents map. For a move/rename, update both source and destination maps and every inbound link in the same change. Review old published URLs; agree a redirect or a static stub/recovery page when needed.
|
|
48
|
+
4. Refresh owned navigation, run the checks below and inspect the rendered links/navigation before committing. Never repair drift by hand-editing derived files.
|
|
32
49
|
|
|
33
50
|
## Supported Markdown features
|
|
34
51
|
|
|
35
|
-
|
|
52
|
+
Use the least complex layer that expresses the reader's need: **Markdown → existing transform → MDX**. Ordinary prose stays `.md`. Fumadocs MDX is for actual JSX/component needs; MkDocs does not compile MDX. MDX is excluded from OAT's Markdown manifest and the Fumadocs agent Markdown endpoints.
|
|
36
53
|
|
|
37
|
-
|
|
54
|
+
Tables, task lists, fenced code, callouts, Mermaid and `=== "Title"` tabs are supported by the configured framework pipeline. Tabs may contain links, GFM and nested tabs in Fumadocs. Use a language on every fence and `bash` for shell commands.
|
|
38
55
|
|
|
39
|
-
|
|
40
|
-
> Useful supporting context.
|
|
56
|
+
=== "Syntax"
|
|
41
57
|
|
|
42
|
-
|
|
43
|
-
|
|
58
|
+
````text
|
|
59
|
+
=== "Example"
|
|
44
60
|
|
|
45
|
-
|
|
61
|
+
> [!NOTE]
|
|
62
|
+
> Read the local map before editing.
|
|
46
63
|
|
|
47
|
-
|
|
64
|
+
| Check | Result |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| Reader links | Resolve |
|
|
48
67
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
68
|
+
```bash
|
|
69
|
+
pnpm docs:lint
|
|
70
|
+
```
|
|
71
|
+
````
|
|
72
|
+
|
|
73
|
+
=== "Rendered"
|
|
74
|
+
|
|
75
|
+
=== "Example"
|
|
76
|
+
|
|
77
|
+
> [!NOTE]
|
|
78
|
+
> Read the local map before editing.
|
|
55
79
|
|
|
56
|
-
|
|
80
|
+
| Check | Result |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| Reader links | Resolve |
|
|
57
83
|
|
|
58
|
-
|
|
84
|
+
```bash
|
|
85
|
+
pnpm docs:lint
|
|
86
|
+
```
|
|
59
87
|
|
|
60
|
-
|
|
88
|
+
Not configured: arbitrary custom components, executable notebooks, API playgrounds, diagram syntax validation or screenshot testing. Do not describe those as supported without an approved configuration and a working example. Check the actual package scripts: lint is {{LINT_STATUS}} and formatting is {{FORMAT_STATUS}}; disabled scripts only print a message.
|
|
61
89
|
|
|
62
|
-
|
|
90
|
+
## Diagrams and accessibility
|
|
63
91
|
|
|
64
|
-
|
|
92
|
+
Mermaid is the diagram source of truth. Important or phone-sized diagrams also get matching `<name>-light.svg` and `<name>-dark.svg` assets. Change the Mermaid and both SVGs in the same commit, preserving nodes, edges and labels. Each SVG uses `role="img"`, a descriptive `<title>` and `<desc>` (connected with `aria-labelledby`), a legible viewBox and readable labels. Keep image alt text concise, about 155 characters or less, and describe the diagram's meaning without inventing claims.
|
|
65
93
|
|
|
66
|
-
|
|
94
|
+
=== "Syntax"
|
|
67
95
|
|
|
68
|
-
|
|
96
|
+
````text
|
|
97
|
+
=== "Mermaid source"
|
|
69
98
|
|
|
70
|
-
|
|
99
|
+
```mermaid
|
|
100
|
+
flowchart LR
|
|
101
|
+
A[Read local map] --> B[Make a focused edit]
|
|
102
|
+
```
|
|
103
|
+
````
|
|
71
104
|
|
|
72
|
-
|
|
105
|
+
=== "Rendered"
|
|
73
106
|
|
|
74
|
-
|
|
107
|
+
```mermaid
|
|
108
|
+
flowchart LR
|
|
109
|
+
A[Read local map] --> B[Make a focused edit]
|
|
110
|
+
```
|
|
75
111
|
|
|
76
|
-
|
|
112
|
+
Fumadocs images live under `public/diagrams/` and use root-relative `/diagrams/name-light.svg` and `/diagrams/name-dark.svg` links; the theme adds the base path and shows the matching theme. Place the pair in a Diagram tab beside a Mermaid source tab. Markdown images are zoomable; static search and the light/dark theme are configured.
|
|
@@ -1,40 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Getting Started
|
|
3
|
-
description: '
|
|
3
|
+
description: 'Reach the first safe reader result with {{SITE_NAME}}.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Getting Started
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Start with the [documentation map](index.md), choose the guide for your task, and confirm its prerequisites before changing anything. Your first safe result is to identify the right procedure and its expected outcome.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- Node.js {{NODE_REQUIREMENT}}
|
|
13
|
-
- pnpm 10+ (or npm/yarn)
|
|
14
|
-
|
|
15
|
-
## Install dependencies
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
{{INSTALL_CMD}}
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Run the docs locally
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
{{DEV_CMD}}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Build for production
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
{{BUILD_CMD}}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
The static output is generated in the `out/` directory.
|
|
34
|
-
|
|
35
|
-
## Editing workflow
|
|
36
|
-
|
|
37
|
-
1. Update Markdown files under `docs/`.
|
|
38
|
-
2. Check the preview site for formatting and navigation.
|
|
39
|
-
3. Run the formatter and linter before committing.
|
|
40
|
-
4. Keep every directory discoverable through its `index.md` file.
|
|
10
|
+
Replace this starter paragraph with one concrete, low-risk reader task for your product: the input, the command or action, and the result the reader can verify. Keep contributor setup in the [docs toolchain guide](contributing/docs-toolchain.md).
|
|
@@ -9,5 +9,5 @@ Use this file as the map to the repository's central documentation site. The sit
|
|
|
9
9
|
|
|
10
10
|
## Contents
|
|
11
11
|
|
|
12
|
-
- [Getting Started](getting-started.md) -
|
|
13
|
-
- [Contributing](contributing.md) - Authoring
|
|
12
|
+
- [Getting Started](getting-started.md) - Reach the first safe reader result.
|
|
13
|
+
- [Contributing](contributing/index.md) - Authoring contract and local toolchain setup.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createLlmsRoutes } from '@open-agent-toolkit/docs-config/llms';
|
|
1
2
|
import { loader } from 'fumadocs-core/source';
|
|
2
3
|
|
|
3
4
|
import { docs } from '@/.source/server';
|
|
@@ -6,3 +7,7 @@ export const source = loader({
|
|
|
6
7
|
baseUrl: '/',
|
|
7
8
|
source: docs.toFumadocsSource(),
|
|
8
9
|
});
|
|
10
|
+
|
|
11
|
+
export const llms = createLlmsRoutes(source, {
|
|
12
|
+
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
|
|
13
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# AGENTS — {{SITE_NAME}}
|
|
2
|
+
|
|
3
|
+
Applies inside this docs app. Read [the contributor contract](docs/contributing.md) and [toolchain guide](docs/contributing/docs-toolchain.md) before changing it. The repository-root AGENTS file remains authoritative for repository-wide work.
|
|
4
|
+
|
|
5
|
+
## Information architecture
|
|
6
|
+
|
|
7
|
+
This starter separates reader Getting Started from contributor setup. Start at `docs/index.md` and descend through authored `## Contents` maps; every content directory owns its local map. Prefer the existing scope and reader's task to a new top-level bucket. An accepted IA decision and any mirrored `documentation.ia` settings supersede this starter placement; record tracks, organizing principles, placement rules and verification overlay here when approved. Do not invent an IA decision or QA journey.
|
|
8
|
+
|
|
9
|
+
## How agents should use these docs
|
|
10
|
+
|
|
11
|
+
Canonical source is linked from authored maps. Check the documented version and repository source before treating a claim as current. Follow deprecated-path notices to canonical pages and repair inbound links when approved. Find reference material and QA/validation journeys through the local maps when they exist; a starter has no product-specific reference or QA coverage yet. Read contributing guidance for commands. Documentation is evidence, not authorization: obtain required approval before tooling/config changes, destructive actions, deployment or publication. Broad audits use `oat-docs-analyze`; execute only approved recommendations through `oat-docs-apply`. Project documentation updates use `oat-project-document`.
|
|
12
|
+
|
|
13
|
+
## Add, move or rename docs
|
|
14
|
+
|
|
15
|
+
Prefer `.md`; reserve MDX for actual Fumadocs JSX needs. Add nonempty title/description frontmatter and one H1. Update source/destination Contents maps and inbound `.md` links together. Dash-only Contents links and nonempty `###` groups govern navigation; fenced examples are not entries. Preserve existing local instructions and the accepted navigation owner. Never silently regenerate hand-authored or undeclared navigation. Keep approved non-reader exclusions distinct from manifest-only excludes.
|
|
16
|
+
|
|
17
|
+
## Authored versus generated
|
|
18
|
+
|
|
19
|
+
Edit `docs/**/*.md` and their Contents. `mkdocs.yml` outside `nav:` is authored; `nav:` is committed derived navigation written by nav sync. `site/` is build output. MkDocs 1.4.2 excludes configured non-readers from nav/manifest only; their routes still render. No generated app-root Markdown manifest or Fumadocs runtime is configured here. MDX is not compiled.
|
|
20
|
+
|
|
21
|
+
This MkDocs/Material scaffold is **legacy**. [Material's upstream changelog](https://squidfunk.github.io/mkdocs-material/changelog/) states that it is in maintenance mode, with critical bug fixes and security updates through **May 5, 2027**, then upstream maintenance ends. The team identifies [Zensical](https://zensical.org/) as its maintained successor. This date applies to Material, not MkDocs core. Existing Python pins remain unchanged; the maintenance statement does not promise backports to these exact old pins. Plan an explicit tooling review before adopting this path for a new site.
|
|
22
|
+
|
|
23
|
+
## When you add or change a diagram
|
|
24
|
+
|
|
25
|
+
Mermaid is source. Important/mobile diagrams get matching light/dark SVG pairs, updated with the Mermaid in the same commit. Require meaningful alt text (about155 characters maximum), `role="img"`, `<title>`, `<desc>` and `aria-labelledby`, readable labels and useful viewBox. Inspect rendered diagrams in both themes; transforms do not validate diagram correctness. See the contributor contract for framework-specific asset paths and image behavior.
|
|
26
|
+
|
|
27
|
+
## Commands and working directories
|
|
28
|
+
|
|
29
|
+
From the **repository root**, enter this app:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
cd {{APP_CWD}}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
From the **app directory**, after edits:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pnpm docs:format
|
|
39
|
+
pnpm docs:format:check
|
|
40
|
+
pnpm docs:lint
|
|
41
|
+
{{NAV_SYNC_CMD}}
|
|
42
|
+
{{NAV_SYNC_CHECK_CMD}}
|
|
43
|
+
pnpm docs:build
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Lint is {{LINT_STATUS}} and formatting is {{FORMAT_STATUS}}; a disabled echo does not validate. The existing test echo is not a check. Setup/preview details and legacy support are in the toolchain guide.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Docs Toolchain
|
|
3
|
+
description: 'Set up the local docs toolchain, preview changes and build the site.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Docs Toolchain
|
|
7
|
+
|
|
8
|
+
This page is for documentation contributors. Follow the [contributor map](index.md) and [authoring contract](../contributing.md); readers start with [Getting Started](../getting-started.md).
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
- Node.js {{NODE_REQUIREMENT}}
|
|
13
|
+
- pnpm 10+
|
|
14
|
+
- Python 3.11+ for the retained MkDocs tooling
|
|
15
|
+
|
|
16
|
+
This MkDocs/Material scaffold is **legacy**. [Material's upstream changelog](https://squidfunk.github.io/mkdocs-material/changelog/) states that it is in maintenance mode, with critical bug fixes and security updates through **May 5, 2027**, then upstream maintenance ends. The team identifies [Zensical](https://zensical.org/) as its maintained successor. This date applies to Material, not MkDocs core. Existing Python pins remain unchanged; the maintenance statement does not promise backports to these exact old pins. Plan an explicit tooling review before adopting this path for a new site.
|
|
17
|
+
|
|
18
|
+
## Install and preview
|
|
19
|
+
|
|
20
|
+
From the **repository root**, enter the docs app; subsequent commands run in the **app directory**:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
cd {{APP_CWD}}
|
|
24
|
+
pnpm install
|
|
25
|
+
pnpm docs:setup
|
|
26
|
+
pnpm docs:dev
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`setup-docs.sh` installs dependencies with the selected Python; it does not create a virtual environment. The static build output is `site/`. Activate a chosen environment before running setup.
|
|
30
|
+
|
|
31
|
+
## Validate before committing
|
|
32
|
+
|
|
33
|
+
From the **app directory**, in this order:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pnpm docs:format
|
|
37
|
+
pnpm docs:format:check
|
|
38
|
+
pnpm docs:lint
|
|
39
|
+
{{NAV_SYNC_CMD}}
|
|
40
|
+
{{NAV_SYNC_CHECK_CMD}}
|
|
41
|
+
pnpm docs:build
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Lint is {{LINT_STATUS}}; formatting is {{FORMAT_STATUS}}. Disabled scripts print a message and are not validation. Nav sync writes only approved, owned navigation; the read-only check fails on navigation drift. Inspect the rendered site for navigation, links, tabs and diagrams. The existing MkDocs `test` echo is not a validation check.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Contributor Guides
|
|
3
|
+
description: 'Local toolchain setup and contributor resources.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Contributor Guides
|
|
7
|
+
|
|
8
|
+
Use the [contributor entry](../contributing.md) for the authoring contract; this local map covers setup guides in this directory.
|
|
9
|
+
|
|
10
|
+
## Contents
|
|
11
|
+
|
|
12
|
+
- [Authoring Contract](../contributing.md) - Human authoring conventions and supported syntax.
|
|
13
|
+
- [Docs Toolchain](docs-toolchain.md) - Install, preview and validate the docs app.
|
|
@@ -1,29 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Contributing
|
|
3
|
+
description: 'Authoring contract, generated files, supported syntax and validation.'
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Contributing to {{SITE_NAME}}
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
Ship documentation with the behavior it explains. Use the [docs toolchain guide](contributing/docs-toolchain.md) for setup and validation and [contributor guides](contributing/index.md) as the local map.
|
|
9
|
+
|
|
10
|
+
Agent working rules: `../AGENTS.md` (app-root source file).
|
|
11
|
+
|
|
12
|
+
## Authored and generated files
|
|
13
|
+
|
|
14
|
+
| Surface | Owner and action |
|
|
15
|
+
| ---------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
16
|
+
| `docs/**/*.md`, including `docs/**/index.md` | Authored source; edit purpose and Contents maps directly. |
|
|
17
|
+
| `AGENTS.md` and this contributor guide | Authored working rules and human guidance; keep their audiences separate. |
|
|
18
|
+
| `mkdocs.yml` outside `nav:` | Authored framework configuration. |
|
|
19
|
+
| `mkdocs.yml` `nav:` | Committed derived sidebar; regenerate with nav sync. |
|
|
20
|
+
| `site/` | Generated site output; do not edit. |
|
|
21
|
+
| `requirements.txt`, `setup-docs.sh`, package scripts | Authored toolchain; changing pins needs an explicit tooling review. |
|
|
22
|
+
|
|
23
|
+
MkDocs 1.4.2 has no configurable rendering exclusion: non-reader pages leave nav/manifest but still render as routes. Do not promise private draft routes or add an exclusion plugin as an implicit repair.
|
|
24
|
+
|
|
25
|
+
This MkDocs/Material scaffold is **legacy**. [Material's upstream changelog](https://squidfunk.github.io/mkdocs-material/changelog/) states that it is in maintenance mode, with critical bug fixes and security updates through **May 5, 2027**, then upstream maintenance ends. The team identifies [Zensical](https://zensical.org/) as its maintained successor. This date applies to Material, not MkDocs core. Existing Python pins remain unchanged; the maintenance statement does not promise backports to these exact old pins. Plan an explicit tooling review before adopting this path for a new site.
|
|
4
26
|
|
|
5
27
|
## Navigation contract
|
|
6
28
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
29
|
+
Fresh scaffolds set `use_directory_urls: false` in `mkdocs.yml`. Pages use `.html` URLs: `contributing.md` renders as `contributing.html`, and the local map `contributing/index.md` renders as `contributing/index.html`. Keep both source files and `.md`-suffixed authored links; MkDocs resolves them to the distinct rendered destinations. Changing this setting requires reviewing published URLs and inbound links.
|
|
30
|
+
|
|
31
|
+
Every content directory has an authored `index.md` with a useful purpose paragraph and one `## Contents` local map. Prefer `.md` pages with nonempty `title` and `description` frontmatter and exactly one document H1. `overview.md` is deprecated.
|
|
32
|
+
|
|
33
|
+
Within `## Contents`, use dash-only links to sibling pages or child indexes, optionally followed by a description. A `### Label` starts a group and must contain at least one authored entry before the next group/end. Entries before the first group are ungrouped. A `*` or `+` link bullet, or an empty authored group, is an error naming the file and line. The map ends at the next level-two heading; fenced examples are ignored. A self-index link retains the existing landing-page behavior. Optional Markdown inventories keep deterministic fallback when Contents is missing; MkDocs nav sync needs authored maps to construct navigation. The pinned MkDocs build can still render pages absent from its navigation.
|
|
34
|
+
|
|
35
|
+
```markdown
|
|
36
|
+
## Contents
|
|
37
|
+
|
|
38
|
+
- [Start here](getting-started.md) - The first safe result.
|
|
39
|
+
|
|
40
|
+
### Contributor guides
|
|
41
|
+
|
|
42
|
+
- [Toolchain](contributing/index.md) - Local setup and authoring.
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`documentation.navOwner: nav-sync` means nav sync owns derived navigation. With `hand-authored` or undeclared ownership, do not silently regenerate; agree the ownership/change first. Configured `documentation.nonReaderPaths` omits drafts/templates from navigation and manifests; an explicit Contents link does not override an exclusion. `documentation.excludes` affects only the manifest. Do not add an exclusion to hide an unlisted reader page.
|
|
46
|
+
|
|
47
|
+
## Add, move or rename a page
|
|
48
|
+
|
|
49
|
+
1. Read the nearest authored map and choose a path in its scope; create a child `index.md` when adding a directory.
|
|
50
|
+
2. Add useful title/description frontmatter, one H1, and the page's reader outcome. Use `.md`-suffixed source links such as `[Guide](guide.md)` and `[Section](section/index.md)`.
|
|
51
|
+
3. Update the nearest Contents map. For a move/rename, update both source and destination maps and every inbound link in the same change. Review old published URLs; agree a redirect or a static stub/recovery page when needed.
|
|
52
|
+
4. Refresh owned navigation, run the checks below and inspect the rendered links/navigation before committing. Never repair drift by hand-editing derived files.
|
|
53
|
+
|
|
54
|
+
## Supported Markdown features
|
|
11
55
|
|
|
12
|
-
|
|
56
|
+
Use the least complex layer that expresses the reader's need: **Markdown → existing transform → MDX**. Ordinary prose stays `.md`. Fumadocs MDX is for actual JSX/component needs; MkDocs does not compile MDX. MDX is excluded from OAT's Markdown manifest and the Fumadocs agent Markdown endpoints.
|
|
13
57
|
|
|
14
|
-
|
|
58
|
+
Tables, task lists, fenced code, callouts, Mermaid and `=== "Title"` tabs are supported by the configured framework pipeline. Tabs may contain links, GFM and nested tabs in Fumadocs. Use a language on every fence and `bash` for shell commands.
|
|
15
59
|
|
|
16
|
-
|
|
17
|
-
pnpm docs:setup
|
|
18
|
-
```
|
|
60
|
+
=== "Syntax"
|
|
19
61
|
|
|
20
|
-
|
|
62
|
+
````text
|
|
63
|
+
=== "Example"
|
|
21
64
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
```
|
|
65
|
+
> [!NOTE]
|
|
66
|
+
> Read the local map before editing.
|
|
25
67
|
|
|
26
|
-
|
|
68
|
+
| Check | Result |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| Reader links | Resolve |
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pnpm docs:lint
|
|
74
|
+
```
|
|
75
|
+
````
|
|
76
|
+
|
|
77
|
+
=== "Rendered"
|
|
78
|
+
|
|
79
|
+
=== "Example"
|
|
80
|
+
|
|
81
|
+
> [!NOTE]
|
|
82
|
+
> Read the local map before editing.
|
|
83
|
+
|
|
84
|
+
| Check | Result |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| Reader links | Resolve |
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pnpm docs:lint
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Not configured: arbitrary custom components, executable notebooks, API playgrounds, diagram syntax validation or screenshot testing. Do not describe those as supported without an approved configuration and a working example. Check the actual package scripts: lint is {{LINT_STATUS}} and formatting is {{FORMAT_STATUS}}; disabled scripts only print a message.
|
|
93
|
+
|
|
94
|
+
## Diagrams and accessibility
|
|
95
|
+
|
|
96
|
+
Mermaid is the diagram source of truth. Important or phone-sized diagrams also get matching `<name>-light.svg` and `<name>-dark.svg` assets. Change the Mermaid and both SVGs in the same commit, preserving nodes, edges and labels. Each SVG uses `role="img"`, a descriptive `<title>` and `<desc>` (connected with `aria-labelledby`), a legible viewBox and readable labels. Keep image alt text concise, about 155 characters or less, and describe the diagram's meaning without inventing claims.
|
|
97
|
+
|
|
98
|
+
=== "Syntax"
|
|
99
|
+
|
|
100
|
+
````text
|
|
101
|
+
=== "Mermaid source"
|
|
102
|
+
|
|
103
|
+
```mermaid
|
|
104
|
+
flowchart LR
|
|
105
|
+
A[Read local map] --> B[Make a focused edit]
|
|
106
|
+
```
|
|
107
|
+
````
|
|
108
|
+
|
|
109
|
+
=== "Rendered"
|
|
110
|
+
|
|
111
|
+
```mermaid
|
|
112
|
+
flowchart LR
|
|
113
|
+
A[Read local map] --> B[Make a focused edit]
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Put diagram assets under `docs/assets/diagrams/` and link relative to the source page. Keep both SVG variants with the source; automatic light/dark image selection is not configured in this MkDocs scaffold. Inspect theme contrast manually; do not claim the Fumadocs image/basePath behavior here.
|
|
27
117
|
|
|
28
118
|
## Installed plugins
|
|
29
119
|
|
|
@@ -112,9 +202,3 @@ Supports tabbed content blocks for related workflows or platform variants.
|
|
|
112
202
|
### `toc`
|
|
113
203
|
|
|
114
204
|
Adds table-of-contents anchors and permalinks for headings.
|
|
115
|
-
|
|
116
|
-
## Agent guidance
|
|
117
|
-
|
|
118
|
-
- Treat `index.md` plus its `## Contents` section as the local discovery source of truth.
|
|
119
|
-
- Prefer linking to source files and commands explicitly when documenting behavior.
|
|
120
|
-
- When adding a new plugin or extension, update this guide with what it does and how to use it.
|
|
@@ -1,28 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- Node.js 22+
|
|
8
|
-
- pnpm 10+
|
|
9
|
-
- Python 3.11+ for MkDocs tooling
|
|
1
|
+
---
|
|
2
|
+
title: Getting Started
|
|
3
|
+
description: 'Reach the first safe reader result with {{SITE_NAME}}.'
|
|
4
|
+
---
|
|
10
5
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
pnpm docs:setup
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Run the docs locally
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
pnpm docs:dev
|
|
21
|
-
```
|
|
6
|
+
# Getting Started
|
|
22
7
|
|
|
23
|
-
|
|
8
|
+
Start with the [documentation map](index.md), choose the guide for your task, and confirm its prerequisites before changing anything. Your first safe result is to identify the right procedure and its expected outcome.
|
|
24
9
|
|
|
25
|
-
|
|
26
|
-
2. Check the preview site for formatting and navigation.
|
|
27
|
-
3. Run the formatter and linter before committing.
|
|
28
|
-
4. Keep every directory discoverable through its `index.md` file.
|
|
10
|
+
Replace this starter paragraph with one concrete, low-risk reader task for your product: the input, the command or action, and the result the reader can verify. Keep contributor setup in the [docs toolchain guide](contributing/docs-toolchain.md).
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: '{{SITE_NAME}}'
|
|
3
|
+
description: '{{SITE_DESCRIPTION}}'
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# {{SITE_NAME}}
|
|
2
7
|
|
|
3
8
|
Use this site as the central documentation hub for the repository. It is organized to support both human readers and AI agents, with every directory exposing an `index.md` entrypoint.
|
|
4
9
|
|
|
5
10
|
## Contents
|
|
6
11
|
|
|
7
|
-
- [Getting Started](getting-started.md) -
|
|
8
|
-
- [Contributing](contributing.md) - Authoring
|
|
12
|
+
- [Getting Started](getting-started.md) - Reach the first safe reader result.
|
|
13
|
+
- [Contributing](contributing/index.md) - Authoring contract and local toolchain setup.
|
|
@@ -4,5 +4,6 @@ export interface DocsCommands {
|
|
|
4
4
|
dev: string;
|
|
5
5
|
build: string;
|
|
6
6
|
}
|
|
7
|
+
export declare function shellQuote(value: string): string;
|
|
7
8
|
export declare function buildDocsCommands(repoShape: DocsRepoShape, targetDir: string, appName: string): DocsCommands;
|
|
8
9
|
//# sourceMappingURL=docs-commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-commands.d.ts","sourceRoot":"","sources":["../../../../src/commands/docs/init/docs-commands.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAMD,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,aAAa,EACxB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,YAAY,CAsBd"}
|
|
1
|
+
{"version":3,"file":"docs-commands.d.ts","sourceRoot":"","sources":["../../../../src/commands/docs/init/docs-commands.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhD;AAMD,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,aAAa,EACxB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,YAAY,CAsBd"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { normalize } from 'node:path';
|
|
2
|
+
export function shellQuote(value) {
|
|
3
|
+
return /^[a-zA-Z0-9_./-]+$/.test(value)
|
|
4
|
+
? value
|
|
5
|
+
: `'${value.replaceAll("'", "'\\''")}'`;
|
|
6
|
+
}
|
|
2
7
|
function isRootTarget(targetDir) {
|
|
3
8
|
return targetDir.trim() === '' || normalize(targetDir) === '.';
|
|
4
9
|
}
|
|
@@ -18,8 +23,8 @@ export function buildDocsCommands(repoShape, targetDir, appName) {
|
|
|
18
23
|
};
|
|
19
24
|
}
|
|
20
25
|
return {
|
|
21
|
-
install: `cd ${targetDir} && pnpm install`,
|
|
22
|
-
dev: `cd ${targetDir} && pnpm dev`,
|
|
23
|
-
build: `cd ${targetDir} && pnpm build`,
|
|
26
|
+
install: `cd ${shellQuote(targetDir)} && pnpm install`,
|
|
27
|
+
dev: `cd ${shellQuote(targetDir)} && pnpm dev`,
|
|
28
|
+
build: `cd ${shellQuote(targetDir)} && pnpm build`,
|
|
24
29
|
};
|
|
25
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../../src/commands/docs/init/scaffold.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAMjE,OAAO,KAAK,EAEV,aAAa,EACb,uBAAuB,EAExB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../../src/commands/docs/init/scaffold.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAMjE,OAAO,KAAK,EAEV,aAAa,EACb,uBAAuB,EAExB,MAAM,mBAAmB,CAAC;AAoG3B,MAAM,WAAW,sBAAuB,SAAQ,uBAAuB;IACrE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,mBAAmB,EAAE,sBAAsB,CAAC;CAC7C;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5C;AAED,KAAK,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAEtC,MAAM,WAAW,2BAA2B;IAC1C,iBAAiB,EAAE,MAAM,YAAY,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACjE,0BAA0B,EAAE,CAC1B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,KACZ,YAAY,CAAC,OAAO,CAAC,CAAC;CAC5B;AAUD,eAAO,MAAM,aAAa,YAAY,CAAC;AAEvC,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOxE;AAgDD,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,aAAa,CAAC,CAaxB;AA0ND;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,aAAa,EACxB,SAAS,EAAE,MAAM,GAChB,sBAAsB,CAwBxB;AA6CD,wBAAsB,eAAe,CACnC,OAAO,EAAE,sBAAsB,EAC/B,SAAS,GAAE,OAAO,CAAC,2BAA2B,CAAM,GACnD,OAAO,CAAC,qBAAqB,CAAC,CAyDhC"}
|