DOCS Rules
How to edit OPTX docs — for agents, LLMs, and human developers. AGT classification, MOA graph nodes, and the complete walkthrough.
DOCS Rules
This page teaches agents and developers how to correctly add, edit, and classify pages in the OPTX documentation system. Follow these rules to keep the MOA knowledge graph, AGT tensor classification, and navigation consistent.
If you're using jettoptx-docs as a template for your own project, this is your walkthrough for understanding the system and customizing it.
For Agents & LLMs
When you add or edit a documentation page, you must complete every step below. Skipping any step breaks the knowledge graph or navigation.
1. MDX Page Structure
Every doc page is an .mdx file in content/docs/<section>/. Each file must have frontmatter:
---
title: Your Page Title
description: One-line summary of what this page covers
icon: Rocket # Lucide icon name for sidebar
---Fumadocs auto-discovers pages from the file tree — no manual route config needed for sub-pages.
2. AGT Tensor Classification
Every page must be classified with a primary AGT (Agentive Gaze Tensor):
| Tensor | Color | Hex | Use For |
|---|---|---|---|
| COG | Yellow | #eab308 | Analytical pages: architecture, protocol internals, APIs, reference material |
| EMO | Pink | #f43f5e | Relational pages: identity, personality, agent interaction, human-facing systems |
| ENV | Blue | #60a5fa | Spatial pages: infrastructure, networks, addresses, physical topology |
Assign emo, env, and cog scores that sum to 100. The highest score determines the primary tensor.
3. Add MOA Graph Node
Add a node to MOA_NODES in lib/moa-registry.ts:
{
id: "your-page-id",
label: "Short Name",
group: "section-key",
agt: "COG",
radius: 15,
href: "/docs/section/page",
description: "One sentence describing this page",
subLabels: ["Tag 1", "Tag 2", "Tag 3"],
emo: 20, env: 25, cog: 55
}PATH_TO_NODE, PAGE_AGT, and mobile SUB_PAGES are derived automatically from MOA_NODES.
4. Add MOA Graph Edges (MOC — Map of Context)
Add edges to MOA_EDGES in lib/moa-registry.ts:
{ source: "your-page-id", target: "related-page-id" },Every new page needs at least 2 edges: one to its section parent and one cross-section link.
5. Mobile Sidebar
MOBILE_SUB_PAGES is derived from MOA_NODES by group. When adding a new top-level section, update NAV_SECTIONS in components/mobile-sidebar.tsx.
6. PATH_TO_NODE
No manual step — augment-space-btn.tsx and mdx-link.tsx import PATH_TO_NODE from lib/moa-registry.ts.
7. Navigation Ordering
Sub-pages are auto-discovered by Fumadocs. If adding a new top-level section, add its folder name to content/docs/meta.json:
{
"pages": ["dojo", "getting-started", ..., "your-section"]
}8. Style & Naming
- Fonts: Orbitron (
--font-orbitron) for headings/labels, Geist Mono (--font-geist-mono) for body/code - Colors:
var(--color-orange-500)for OPTX-orange accents — never hardcodergb(255, 105, 0). The var resolves to neon#FF6900in dark mode and burnt brickrgb(220, 78, 31)in light mode. AGT tensor colors are still hardcoded by design. - Icons: Use Lucide icon names in frontmatter
- Descriptions: One sentence per concept, keep it concise
9. Changelog Currency (NON-NEGOTIABLE)
Every shipped change MUST be reflected in BOTH changelog surfaces in the same session. Applies to LLMs, VLMs, and human contributors equally — no exceptions.
The two surfaces:
- Footer changelog block — the
<details><summary>Changelog</summary><li>entries incomponents/footer.tsx. Also bump the "Last updated: <date> — v<version>" line one level up. - Long-form page —
content/docs/reference/changelog.mdx, organized into### Added,### Changed,### Security,### Processsubsections.
Either land the changelog update in the same commit as the work, or as an immediate follow-up commit before the session ends. Don't leave the visible changelog stale relative to the deployed app.
Versioning:
- Within the same calendar day, extend the most recent version entry with new bullets.
- Bump (e.g.
v2.0.2→v2.0.3) when crossing into a new day OR shipping a clearly distinct release.
For Human Developers
Adding a Page
- Create an
.mdxfile incontent/docs/<section>/ - Add frontmatter:
title,description,icon - Write your content in Markdown (JSX components supported)
Classify Your Page
Pick the dominant cognitive dimension:
- COG — Technical, analytical, requires reasoning
- EMO — About identity, social interaction, agent personality
- ENV — Infrastructure, networks, spatial topology
Register the Page
Update 3 files after creating content:
| File | What to Add |
|---|---|
components/moa-visual.tsx | Graph node in NODES_DATA + edges in EDGES |
components/mobile-sidebar.tsx | Entry in SUB_PAGES under parent section |
components/augment-space-btn.tsx | Path-to-nodeId in PATH_TO_NODE |
Always Update the Changelog (Same Session)
Every shipped change lands in both changelog surfaces — same commit or immediate follow-up. The two places:
components/footer.tsx— the footer changelog block + theLast updated: <date> — v<version>linecontent/docs/reference/changelog.mdx— the long-form page
Within a calendar day, extend the most recent version entry. Bump the version when crossing days or shipping a distinct release. No orphaned releases.
Using jettoptx-docs as a Template
jettoptx-docs is designed to be forked and customized:
- Fork —
git clone https://github.com/jettoptx/jettoptx-docs.git my-docs - Replace — Swap MDX files in
content/docs/with your own - Customize graph — Edit
MOA_NODESandMOA_EDGESinlib/moa-registry.ts - Update nav — Modify
content/docs/meta.jsonandlib/source.ts - Deploy — Push to GitHub, connect to Vercel, done
Checklist
When adding a new page, use this checklist:
- Created
.mdxfile with frontmatter (title, description, icon) - Chose primary AGT tensor (COG/EMO/ENV)
- Added node to
MOA_NODESinlib/moa-registry.ts - Added edges to
MOA_EDGESinlib/moa-registry.ts(min 2) - (If new section) Updated
content/docs/meta.jsonandNAV_SECTIONSinmobile-sidebar.tsx - Updated both changelog surfaces (footer block in
components/footer.tsx+ long-formcontent/docs/reference/changelog.mdx) and bumped Last updated: <date> — v<version>