A content authoring workspace for CoMapeo Product Support documentation. Write and organize Markdown drafts, reference source materials under context/, and prepare sections for publication.
context/— Source of truth and codebase documentation- Module documentation (
manual/01-*.mdthroughmanual/06-*.md) explains system architecture for agents - Style guide, templates, prompts for content generation
- Source materials (quickstart guides, screenshots, legacy docs)
- Content roadmap and deck materials
- Module documentation (
content/— Your drafts by section. Each section version includesindex.mdandreferenced.md.scripts/— Local helpers for previewing docs..github/— PR template and CI automations.
- Install dependencies:
npm i - Preview locally:
npm run docs(builds and serves) - Optional:
npm run docs:opento openhttp://localhost:4000 - Lint Markdown:
npm run lint:md
If you have a bulk export of content (e.g. from Notion) placed in content/new/, you can use the organization script to automatically structure it into the repository's hierarchy.
- Place markdown files and images in
content/new/. - Run
node scripts/organize_new_content.js.- This will archive existing content to
content/old/. - It will process files in
content/new/and create structuredtemplatedirectories incontent/. - Files marked with
Publish Status: Removewill be skipped.
- This will archive existing content to
- Verify the structure in
content/.
Codex (terminal-based assistant) is used to process the context/ materials and enforce the rules in this repo. It follows the constraints defined in AGENTS.md and the guidance in the context/ files listed below, so drafts end up consistent and verifiable.
- Create the section folder under
./content/<section_name>/(usesnake_case). - Use
context/templates/TODO.template.mdas a thinking aid (do not createTODO.mdin sections). - Draft
index.mdfollowingcontext/system/STYLE_GUIDE.mdandcontext/templates/SECTION.template.md. - Add images:
- Prefer existing assets under
context/sources/**using relative links from your section. - If no image exists, create a placeholder file under
./content/<section_name>/images/placeholder_<topic>.txtdescribing what to capture, and reference it with a visible TODO.
- Prefer existing assets under
- Create
referenced.mdas an exact copy ofindex.mdand add inline[Source: context/…]annotations per claim or grouped list. - Add a final
Sources:block at the end ofreferenced.mdlisting everycontext/file used. Do not add aSourcessection toindex.md. - Run the checklist in
context/system/AGENT_CONTENT_CHECKLIST.mdand fix any issues (links, images, style, naming).
- Source of truth is
context/only. Codex does not invent details; if a detail is missing it inserts a visibleTODO:. - Starts from quickstart index to locate materials:
context/sources/quickstart_guides/INDEX.md. - Treats
context/sources/mapeo_docs/as legacy (only high‑level background, no app‑specific instructions). - Enforces structure and naming: versioned folders with
index.mdandreferenced.md,snake_casefolders, compact headings. - Follows
context/system/STYLE_GUIDE.mdtone andcontext/templates/SECTION.template.mdstructure, so content reads consistently. - Manages images per repo rules: prefer existing assets with relative links; otherwise creates precise placeholders under
content/<section>/images/. - Adds inline
[Source: context/…]annotations inreferenced.mdand a finalSources:block there to make every claim traceable. - Uses
context/system/AGENT_CONTENT_CHECKLIST.mdbefore marking a section complete. - Obeys
AGENTS.mdfor tool usage, minimal diffs, and safe iteration (no destructive changes, no secrets, focused patches).
Reference files:
AGENTS.md— Agent guide with module reference tablecontext/manual/01-content-generation-system.md— Generation scripts and versioningcontext/manual/02-documentation-builder.md— Static site builder and viewercontext/manual/03-context-system.md— Templates, prompts, sourcescontext/manual/04-content-storage.md— Content structure and conventionscontext/manual/05-utility-scripts.md— Validation and maintenance toolscontext/manual/06-configuration-infrastructure.md— Project setup and workflowscontext/system/STYLE_GUIDE.mdcontext/system/AGENT_CONTENT_CHECKLIST.mdcontext/templates/SECTION.template.mdcontext/templates/REFERENCED_SECTION.template.mdcontext/templates/TODO.template.md
- Use only information from
context/. If a detail is missing, addTODO:and do not speculate. - File/folder naming:
snake_case, lowercase, ASCII. - Use relative links to assets, for example:
when linking from within thecontext/tree, or relative paths from your section when linking assets incontext/. - Treat
context/sources/mapeo_docs/as legacy: reuse only high‑level, non‑app‑specific background when strictly appropriate.
npm ci— install deps from lockfilenpm run docs— build and serve local previewnpm run docs:open— open preview URLnpm run lint:md— run Markdown lint
npm run gen:test— Generate first three missing sections (non-interactive). Uses deck roadmap and sources; in read-only/never mode, Codex outputs anapply_patchyou can apply manually.- Options:
npm run gen:test -- -m <model> -e <engine> -y(e.g.npm run gen:test -- -e gemini)
- Options:
npm run gen:all— Generate all missing sections (non-interactive). Same behavior as above for read-only/never.- Options:
npm run gen:all -- -m <model> -e <engine> -y
- Options:
npm run gen— Generate content for a specific section.- Usage:
npm run gen <section_path> -- [options] - Options:
-m, --model <model>: Set the model (defaults to gpt-5.1, or gemini-3-pro-preview if engine is gemini).-e, --engine <engine>: Set the engine (e.g. gemini). Note:-yis implicitly active when engine is 'gemini'.-y, --yes: Bypass approval prompts (automatic execution).-p, --profile <profile>: Use a Codex profile.--dry-run: Skip Codex execution.
- Usage:
npm run gen:smoke— Dry-run sanity check that scaffolds a test section without calling Codex (0 tokens) and verifies a newv1/is produced.npm run gen:next— Create next version for a content section.- Smart Selection: Automatically identifies the next logical section to work on (prioritizes new sections, then lowest versions).
- Usage:
npm run gen:next -- [options](e.g.,npm run gen:next -- -e gemini) - Override: To target a specific section, use
npm run gen:next <section_path>or setSECTION="<path>" npm run gen:next.
npm run show-prompt— View generation prompt context (for human analysis). Displays all context files that get injected into gen calls with statistics and file information.- Options:
-c, --content: Show full content of each file (default: summary only)--no-stats: Hide statistics summary-s, --section <path>: Specify target section path-o, --output <file>: Write output to markdown file (auto-enables --content)
- Examples:
npm run show-prompt- View summary in consolenpm run show-prompt -- --content- View full content in consolenpm run show-prompt -- --output prompt-context.md- Save to markdown file
- Options:
npm run caption:all— Propose captions for all images undercontext/(writes sidecars if permitted).npm run caption— Propose a caption for a single image (expects path in the interactive session or adapted script).npm run check:links— Check Markdown links across the repo (skips external links and template examples).
npm run audit— Smart Health Check. Runs all visualization and scanning tools, then uses Codex to analyze the output and provide a prioritized list of action items.node scripts/scan_health.js— Run the structural integrity scanner (gaps, orphans).node scripts/find_duplicates.js— Scan for duplicate content or potential copy-paste errors.node scripts/visualize_content.js— Display a tree view of thecontent/folder with status indicators (✓/⚠/✘).node scripts/visualize_context.js— Display a tree view of thecontext/source library.
- Locate materials via the quickstart index:
context/sources/quickstart_guides/INDEX.md. - Follow voice, tone, and structure guidance in
context/system/STYLE_GUIDE.mdandcontext/templates/SECTION.template.md. - Check the content roadmap:
context/content_deck/INDEX.md(summaries + folders) andcontext/content_deck/MATERIALS_INDEX.md(order only).
- Start with
AGENTS.mdfor an overview and module reference table - When working in a specific module, open the corresponding
context/manual/*.mdfile (e.g.,context/manual/01-content-generation-system.mdfor generation scripts) - Follow the data flow: Context System (inputs) → Content Generation (processing) → Content Storage (outputs) → Documentation Builder (presentation)