@open-agent-toolkit/cli 0.3.26 → 0.3.28
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 +12 -0
- package/assets/bundle-metadata.json +1 -1
- package/assets/docs/contributing/documentation.md +48 -6
- package/assets/docs/contributing/markdown-features.md +14 -2
- package/assets/docs/docs-tooling/add-docs-to-a-repo.md +22 -9
- package/assets/docs/docs-tooling/check.md +154 -0
- package/assets/docs/docs-tooling/commands.md +15 -10
- package/assets/docs/docs-tooling/index.md +1 -0
- package/assets/docs/docs-tooling/meta.json +7 -1
- package/assets/docs/docs-tooling/workflows.md +18 -10
- package/assets/docs/getting-started/tool-packs.md +5 -3
- package/assets/docs/reference/cli-reference.md +2 -0
- package/assets/docs/reference/configuration.md +1 -0
- package/assets/docs/skills/index.md +8 -8
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-docs-analyze/SKILL.md +14 -3
- package/assets/skills/oat-docs-analyze/references/legacy-scaffold-checks.md +4 -0
- package/assets/skills/oat-docs-authoring/SKILL.md +1 -1
- package/assets/skills/oat-docs-authoring/references/validation.md +4 -0
- package/assets/skills/oat-docs-bootstrap/SKILL.md +92 -61
- package/assets/skills/oat-docs-bootstrap/references/pr-ci.md +89 -0
- package/assets/templates/docs-app-fuma/AGENTS.md +57 -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 +85 -0
- package/assets/templates/docs-app-fuma/docs/contributing/index.md +13 -0
- package/assets/templates/docs-app-fuma/docs/contributing.md +83 -41
- package/assets/templates/docs-app-fuma/docs/getting-started.md +3 -33
- package/assets/templates/docs-app-fuma/docs/index.md +3 -3
- package/assets/templates/docs-app-fuma/gitignore.template +12 -0
- package/assets/templates/docs-app-fuma/lib/source.ts +5 -0
- package/assets/templates/docs-app-fuma/package.json.template +2 -1
- package/assets/templates/docs-app-fuma/pnpm-workspace.yaml +5 -0
- package/assets/templates/docs-app-mkdocs/AGENTS.md +48 -0
- package/assets/templates/docs-app-mkdocs/docs/contributing/docs-toolchain.md +46 -0
- package/assets/templates/docs-app-mkdocs/docs/contributing/index.md +13 -0
- package/assets/templates/docs-app-mkdocs/docs/contributing.md +111 -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/gitignore.template +8 -0
- package/assets/templates/docs-app-mkdocs/mkdocs.yml +1 -0
- package/assets/templates/docs-app-mkdocs/package.json.template +3 -2
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +35 -3
- package/dist/commands/docs/check/check.d.ts +3 -0
- package/dist/commands/docs/check/check.d.ts.map +1 -0
- package/dist/commands/docs/check/check.js +48 -0
- package/dist/commands/docs/check/check.types.d.ts +17 -0
- package/dist/commands/docs/check/check.types.d.ts.map +1 -0
- package/dist/commands/docs/check/check.types.js +1 -0
- package/dist/commands/docs/check/checker.d.ts +8 -0
- package/dist/commands/docs/check/checker.d.ts.map +1 -0
- package/dist/commands/docs/check/checker.js +82 -0
- package/dist/commands/docs/check/commands.d.ts +5 -0
- package/dist/commands/docs/check/commands.d.ts.map +1 -0
- package/dist/commands/docs/check/commands.js +232 -0
- package/dist/commands/docs/check/diagrams.d.ts +5 -0
- package/dist/commands/docs/check/diagrams.d.ts.map +1 -0
- package/dist/commands/docs/check/diagrams.js +197 -0
- package/dist/commands/docs/check/files.d.ts +21 -0
- package/dist/commands/docs/check/files.d.ts.map +1 -0
- package/dist/commands/docs/check/files.js +121 -0
- package/dist/commands/docs/check/markdown.d.ts +60 -0
- package/dist/commands/docs/check/markdown.d.ts.map +1 -0
- package/dist/commands/docs/check/markdown.js +125 -0
- package/dist/commands/docs/check/mermaid-runtime.d.ts +3 -0
- package/dist/commands/docs/check/mermaid-runtime.d.ts.map +1 -0
- package/dist/commands/docs/check/mermaid-runtime.js +57 -0
- package/dist/commands/docs/check/navigation.d.ts +4 -0
- package/dist/commands/docs/check/navigation.d.ts.map +1 -0
- package/dist/commands/docs/check/navigation.js +104 -0
- package/dist/commands/docs/check/reader-rules.d.ts +6 -0
- package/dist/commands/docs/check/reader-rules.d.ts.map +1 -0
- package/dist/commands/docs/check/reader-rules.js +214 -0
- package/dist/commands/docs/index.d.ts.map +1 -1
- package/dist/commands/docs/index.js +2 -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/index.d.ts +1 -0
- package/dist/commands/docs/init/index.d.ts.map +1 -1
- package/dist/commands/docs/init/index.js +8 -0
- package/dist/commands/docs/init/scaffold.d.ts +1 -0
- package/dist/commands/docs/init/scaffold.d.ts.map +1 -1
- package/dist/commands/docs/init/scaffold.js +61 -13
- package/dist/commands/docs/nav/contents.d.ts +4 -0
- package/dist/commands/docs/nav/contents.d.ts.map +1 -1
- package/dist/commands/docs/nav/contents.js +10 -0
- package/dist/commands/docs/nav/fumadocs.d.ts.map +1 -1
- package/dist/commands/docs/nav/fumadocs.js +32 -10
- package/dist/config/documentation-check.d.ts +38 -0
- package/dist/config/documentation-check.d.ts.map +1 -0
- package/dist/config/documentation-check.js +132 -0
- package/dist/config/oat-config.d.ts +2 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +4 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +1 -0
- package/dist/release/public-package-contract.d.ts.map +1 -1
- package/dist/release/public-package-contract.js +3 -0
- package/package.json +11 -2
- package/assets/skills/oat-docs-bootstrap/assets/AGENTS.md.template +0 -64
|
@@ -0,0 +1,57 @@
|
|
|
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, not generated app-root `index.md`, `.source/`, `.next/` or `out/`. Committed `docs/**/meta.json` comes from nav sync; package prebuild checks freshness. Source collections exclude configured non-readers from rendering. MDX stays outside OAT's Markdown manifest and agent endpoints.
|
|
20
|
+
|
|
21
|
+
## When you add or change a diagram
|
|
22
|
+
|
|
23
|
+
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.
|
|
24
|
+
|
|
25
|
+
## Install-root compatibility
|
|
26
|
+
|
|
27
|
+
Before installing, follow the toolchain guide's exact `mdast-util-to-markdown: 2.1.2` policy. A new independent app gets app-root `pnpm-workspace.yaml`; a workspace member must use the existing root policy with explicit approval. Preserve settings/conflicts and never create a member-local workspace boundary. `--no-root-patch` changes only root-script handling. Verify actual resolution and keep the policy/lockfile; do not remove bold/italic content to avoid the Fumadocs handler defect.
|
|
28
|
+
|
|
29
|
+
## Commands and working directories
|
|
30
|
+
|
|
31
|
+
From the **repository root**, enter this app:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
cd {{APP_CWD}}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
From the **repository root**, enter the app and validate after edits:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
cd {{APP_CWD}}
|
|
41
|
+
pnpm docs:format
|
|
42
|
+
pnpm docs:format:check
|
|
43
|
+
pnpm docs:lint
|
|
44
|
+
{{NAV_SYNC_CMD}}
|
|
45
|
+
{{NAV_SYNC_CHECK_CMD}}
|
|
46
|
+
pnpm docs:check
|
|
47
|
+
pnpm build
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Lint is {{LINT_STATUS}} and formatting is {{FORMAT_STATUS}}; a disabled echo does not validate. From the **repository root**, enter the app and regenerate the machine inventory with:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
cd {{APP_CWD}}
|
|
54
|
+
{{GENERATE_INDEX_CMD}}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The predev/prebuild hooks also generate it. `/llms.txt`, `/llms-full.txt` and `/llms/<page-slugs>/content.md` expose loaded reader Markdown (root `/llms/content.md`). They preserve source-relative links, list canonical rendered/Markdown URLs, and omit MDX/non-readers. Use the listed source path to interpret raw relative links.
|
|
@@ -25,7 +25,7 @@ type PageProps = {
|
|
|
25
25
|
|
|
26
26
|
export async function generateMetadata(props: PageProps): Promise<Metadata> {
|
|
27
27
|
const params = await props.params;
|
|
28
|
-
const page = source.getPage(params.slug);
|
|
28
|
+
const page = source.getPage(params.slug?.map(encodeURI));
|
|
29
29
|
if (!page) notFound();
|
|
30
30
|
|
|
31
31
|
return {
|
|
@@ -36,7 +36,7 @@ export async function generateMetadata(props: PageProps): Promise<Metadata> {
|
|
|
36
36
|
|
|
37
37
|
export default async function Page(props: PageProps) {
|
|
38
38
|
const params = await props.params;
|
|
39
|
-
const page = source.getPage(params.slug);
|
|
39
|
+
const page = source.getPage(params.slug?.map(encodeURI));
|
|
40
40
|
if (!page) notFound();
|
|
41
41
|
|
|
42
42
|
const MDX = page.data.body;
|
|
@@ -51,6 +51,10 @@ export default async function Page(props: PageProps) {
|
|
|
51
51
|
export function generateStaticParams() {
|
|
52
52
|
return [
|
|
53
53
|
{ slug: undefined },
|
|
54
|
-
|
|
54
|
+
// core16.10.2 loader slugs are encoded; Next static params are decoded.
|
|
55
|
+
...source
|
|
56
|
+
.generateParams()
|
|
57
|
+
.filter((p) => p.slug.length > 0)
|
|
58
|
+
.map(({ slug }) => ({ slug: slug.map(decodeURI) })),
|
|
55
59
|
];
|
|
56
60
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { llms } from '@/lib/source';
|
|
2
|
+
|
|
3
|
+
export const dynamic = 'force-static';
|
|
4
|
+
export const dynamicParams = false;
|
|
5
|
+
|
|
6
|
+
export function generateStaticParams() {
|
|
7
|
+
return llms.generateStaticParams();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export async function GET(
|
|
11
|
+
_request: Request,
|
|
12
|
+
{ params }: { params: Promise<{ slug: string[] }> },
|
|
13
|
+
) {
|
|
14
|
+
return llms.page((await params).slug);
|
|
15
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
|
|
15
|
+
## Required install-root compatibility policy
|
|
16
|
+
|
|
17
|
+
The current Fumadocs Markdown handler wrapper is incompatible with
|
|
18
|
+
`mdast-util-to-markdown` 2.2.0: valid bold and italic content can recurse during
|
|
19
|
+
compilation. Keep authored content and framework versions; constrain this
|
|
20
|
+
transitive dependency to exactly `2.1.2` at the **effective pnpm install root**.
|
|
21
|
+
This is a constrained fresh install, not an unconstrained compatibility claim.
|
|
22
|
+
|
|
23
|
+
For a new independent app, the CLI creates app-root `pnpm-workspace.yaml` with
|
|
24
|
+
`packages: []` and this policy. Install inside that app. For a workspace member,
|
|
25
|
+
the CLI creates no local workspace boundary: install from the existing workspace
|
|
26
|
+
root and propose this exact addition to its `pnpm-workspace.yaml`:
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
overrides:
|
|
30
|
+
mdast-util-to-markdown: 2.1.2
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Preserve all existing `packages`, overrides and other settings. Add the one entry
|
|
34
|
+
under an existing `overrides` map rather than duplicating the key. Obtain the
|
|
35
|
+
repository owner's approval before editing existing policy. A conflicting version
|
|
36
|
+
or declined/skipped edit remains a manual setup requirement; stop before claiming
|
|
37
|
+
a successful install/build. Do not split an actual workspace member with a local
|
|
38
|
+
`pnpm-workspace.yaml`, or place an ineffective override in its `package.json`.
|
|
39
|
+
`--no-root-patch` controls root build scripts only and never approves dependency
|
|
40
|
+
policy changes. CLI init does not merge or overwrite existing root policy.
|
|
41
|
+
|
|
42
|
+
Use the repository's selected pnpm version (10+). This root YAML syntax works
|
|
43
|
+
with pnpm 10 and 12; pnpm 12 ignores `package.json`'s `pnpm.overrides`, and pnpm 10
|
|
44
|
+
ignores policy in a workspace member. After installation, inspect
|
|
45
|
+
`pnpm why mdast-util-to-markdown` from the effective root to confirm `2.1.2`, then
|
|
46
|
+
run the checker and real build below. Retain the effective root policy and
|
|
47
|
+
lockfile in version control. Do not change a user-scope package-manager install.
|
|
48
|
+
|
|
49
|
+
## Install and preview
|
|
50
|
+
|
|
51
|
+
From the **repository root**, enter the docs app; subsequent commands run in the **app directory**:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
cd {{APP_CWD}}
|
|
55
|
+
pnpm install
|
|
56
|
+
pnpm dev
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Fumadocs generates a static export under `out/`. `cd {{APP_CWD}} && pnpm start` expects a Next server and is not the static-export preview command; serve `out/` with a static HTTP server and mount the configured base path.
|
|
60
|
+
|
|
61
|
+
## Validate before committing
|
|
62
|
+
|
|
63
|
+
From the **repository root**, enter the app and validate in this order:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
cd {{APP_CWD}}
|
|
67
|
+
pnpm docs:format
|
|
68
|
+
pnpm docs:format:check
|
|
69
|
+
pnpm docs:lint
|
|
70
|
+
{{NAV_SYNC_CMD}}
|
|
71
|
+
{{NAV_SYNC_CHECK_CMD}}
|
|
72
|
+
pnpm docs:check
|
|
73
|
+
pnpm build
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
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 drift or unlisted reader pages. Inspect the rendered site for navigation, links, tabs and diagrams.
|
|
77
|
+
|
|
78
|
+
From the **repository root**, enter the app and regenerate the machine inventory when needed:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
cd {{APP_CWD}}
|
|
82
|
+
{{GENERATE_INDEX_CMD}}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The app's predev/prebuild hooks regenerate it automatically. This does not replace authored Contents or navigation checks.
|
|
@@ -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,76 +1,118 @@
|
|
|
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
|
-
|
|
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.
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
## Contents
|
|
16
33
|
|
|
17
|
-
|
|
34
|
+
- [Start here](getting-started.md) - The first safe result.
|
|
18
35
|
|
|
19
|
-
|
|
36
|
+
### Contributor guides
|
|
20
37
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```
|
|
38
|
+
- [Toolchain](contributing/index.md) - Local setup and authoring.
|
|
39
|
+
```
|
|
24
40
|
|
|
25
|
-
|
|
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.
|
|
26
42
|
|
|
27
|
-
|
|
28
|
-
{{DEV_CMD}}
|
|
29
|
-
```
|
|
43
|
+
## Add, move or rename a page
|
|
30
44
|
|
|
31
|
-
|
|
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
|
+
cd {{APP_CWD}}
|
|
70
|
+
pnpm docs:lint
|
|
71
|
+
```
|
|
72
|
+
````
|
|
73
|
+
|
|
74
|
+
=== "Rendered"
|
|
75
|
+
|
|
76
|
+
=== "Example"
|
|
77
|
+
|
|
78
|
+
> [!NOTE]
|
|
79
|
+
> Read the local map before editing.
|
|
80
|
+
|
|
81
|
+
| Check | Result |
|
|
82
|
+
| --- | --- |
|
|
83
|
+
| Reader links | Resolve |
|
|
55
84
|
|
|
56
|
-
|
|
85
|
+
```bash
|
|
86
|
+
cd {{APP_CWD}}
|
|
87
|
+
pnpm docs:lint
|
|
88
|
+
```
|
|
57
89
|
|
|
58
|
-
|
|
90
|
+
Not configured: arbitrary custom components, executable notebooks, API playgrounds 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.
|
|
59
91
|
|
|
60
|
-
|
|
92
|
+
## Diagrams and accessibility
|
|
61
93
|
|
|
62
|
-
|
|
94
|
+
Run the app’s docs:check script (from the repository root: `cd {{APP_CWD}} && pnpm docs:check`) before committing. It checks reader metadata/maps/links, navigation, contributor commands and real Mermaid syntax without building the site. Errors fail; warnings prompt review. Fix authored sources, then explicitly sync owned navigation and retry.
|
|
63
95
|
|
|
64
|
-
|
|
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.
|
|
65
97
|
|
|
66
|
-
|
|
98
|
+
=== "Syntax"
|
|
67
99
|
|
|
68
|
-
|
|
100
|
+
````text
|
|
101
|
+
=== "Mermaid source"
|
|
69
102
|
|
|
70
|
-
|
|
103
|
+
```mermaid
|
|
104
|
+
flowchart LR
|
|
105
|
+
A[Read local map] --> B[Make a focused edit]
|
|
106
|
+
```
|
|
107
|
+
````
|
|
71
108
|
|
|
72
|
-
|
|
109
|
+
=== "Rendered"
|
|
73
110
|
|
|
74
|
-
|
|
111
|
+
```mermaid
|
|
112
|
+
flowchart LR
|
|
113
|
+
accTitle: Documentation edit
|
|
114
|
+
accDescr: Read the local map before making a focused edit.
|
|
115
|
+
A[Read local map] --> B[Make a focused edit]
|
|
116
|
+
```
|
|
75
117
|
|
|
76
|
-
|
|
118
|
+
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).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: '{{SITE_NAME}}'
|
|
3
|
-
description: '{{
|
|
3
|
+
description: '{{PAGE_DESCRIPTION}}'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# {{SITE_NAME}}
|
|
@@ -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
|
+
});
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
"scripts": {
|
|
8
8
|
"predev": "fumadocs-mdx && {{GENERATE_INDEX_CMD}}",
|
|
9
9
|
"dev": "next dev",
|
|
10
|
-
"prebuild": "{{NAV_SYNC_CHECK_CMD}} && fumadocs-mdx && {{GENERATE_INDEX_CMD}}",
|
|
10
|
+
"prebuild": "{{DOCS_CHECK_CMD}} && {{NAV_SYNC_CHECK_CMD}} && fumadocs-mdx && {{GENERATE_INDEX_CMD}}",
|
|
11
11
|
"build": "next build",
|
|
12
12
|
"start": "next start",
|
|
13
|
+
"docs:check": "{{DOCS_CHECK_CMD}}",
|
|
13
14
|
"docs:lint": "{{DOCS_LINT_SCRIPT}}",
|
|
14
15
|
"docs:format": "{{DOCS_FORMAT_SCRIPT}}",
|
|
15
16
|
"docs:format:check": "{{DOCS_FORMAT_CHECK_SCRIPT}}"
|
|
@@ -0,0 +1,48 @@
|
|
|
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 **repository root**, enter the app and validate after edits:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cd {{APP_CWD}}
|
|
39
|
+
pnpm docs:format
|
|
40
|
+
pnpm docs:format:check
|
|
41
|
+
pnpm docs:lint
|
|
42
|
+
{{NAV_SYNC_CMD}}
|
|
43
|
+
{{NAV_SYNC_CHECK_CMD}}
|
|
44
|
+
pnpm docs:check
|
|
45
|
+
pnpm docs:build
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Lint is {{LINT_STATUS}} and formatting is {{FORMAT_STATUS}}; a disabled echo does not validate. The test script runs the portable docs checker. Setup/preview details and legacy support are in the toolchain guide.
|
|
@@ -0,0 +1,46 @@
|
|
|
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 **repository root**, enter the app and validate in this order:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
cd {{APP_CWD}}
|
|
37
|
+
pnpm docs:format
|
|
38
|
+
pnpm docs:format:check
|
|
39
|
+
pnpm docs:lint
|
|
40
|
+
{{NAV_SYNC_CMD}}
|
|
41
|
+
{{NAV_SYNC_CHECK_CMD}}
|
|
42
|
+
pnpm docs:check
|
|
43
|
+
pnpm docs:build
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
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 MkDocs test script also runs the portable docs checker.
|
|
@@ -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.
|