Skip to content

Latest commit

Β 

History

History
126 lines (97 loc) Β· 3.93 KB

AGENTS.md

File metadata and controls

126 lines (97 loc) Β· 3.93 KB

AGENTS.md - Mainsail Documentation

Guidance for AI agents working on this documentation site for Mainsail, a 3D printer web interface for Klipper firmware.

Site generator: Zensical

Live site: https://docs.mainsail.xyz | Repo: https://github.com/mainsail-crew/docs

Build Commands

# Setup
pip install -r requirements.txt

# Development server (http://127.0.0.1:8000)
zensical serve

# Build static site (output: site/)
zensical build

Project Structure

docs/
β”œβ”€β”€ docs/                     # Documentation source (Markdown)
β”‚   β”œβ”€β”€ assets/               # Logo, favicon, social images
β”‚   β”œβ”€β”€ images/               # Screenshots organized by section
β”‚   β”œβ”€β”€ stylesheets/          # Custom CSS (custom.css)
β”‚   β”œβ”€β”€ configuration/        # Config guides
β”‚   β”œβ”€β”€ features/             # Feature docs
β”‚   β”œβ”€β”€ setup/                # Installation guides
β”‚   β”œβ”€β”€ crowsnest/            # Webcam daemon docs
β”‚   β”œβ”€β”€ mainsailos/           # OS image docs
β”‚   β”œβ”€β”€ sonar/                # Network detection docs
β”‚   └── index.md              # Homepage
β”œβ”€β”€ overrides/                # Template overrides (custom html_title logic)
β”œβ”€β”€ agent_docs/               # Detailed guides for AI agents
β”œβ”€β”€ _data/                    # Data files (contributors, licenses, themes)
β”œβ”€β”€ _scripts/                 # Build scripts (credits, themes generation)
β”œβ”€β”€ zensical.toml             # Site config and navigation
β”œβ”€β”€ requirements.txt          # Python deps (zensical)
└── site/                     # Build output (gitignored)

Documentation Style Guide

File Organization

  • Markdown files in docs/ with lowercase hyphenated names: my-feature.md
  • Images in docs/images/<section>/ using .png, .webp, or .avif
  • Navigation defined in zensical.toml under nav

Frontmatter

---
title: Short Page Title
description: Brief description for search engines and social cards.
social:
  cards_layout_options:
    title: Short Social Card Title
---

Writing Guidelines

  • Write in second person ("you can", "your printer")
  • Clear, concise language; explain technical terms
  • Start pages with brief introduction
  • Numbered lists for step-by-step instructions
  • Include screenshots for UI elements

Mainsail UI Terminology

Use consistent terminology when referring to Mainsail UI elements:

Element Correct Term Description
Settings Dialog Interface Settings The dialog opened via the cogs icon
Settings Button cogs icon Two gear wheels in the top-right corner
Settings Sections e.g., "General", "Macros", "Presets" Tabs within Interface Settings

Examples

<!-- Correct -->
Open the **Interface Settings** by clicking the **cogs icon** in the top-right corner.

<!-- Incorrect -->
Open the settings by clicking the gear icon in the sidebar.

Common Tasks

Adding a New Page

  1. Create .md file in appropriate docs/ subdirectory
  2. Add frontmatter with title and description
  3. Add to zensical.toml navigation under nav
  4. Add images to docs/images/<section>/

Updating Navigation

Navigation is defined in zensical.toml using TOML array-of-tables syntax:

nav = [
  { "Section" = [
    { "Page Title" = "path/to/page.md" },
    { "Subsection" = [
      { "Nested" = "path/to/nested.md" },
    ]},
  ]},
]

CI/CD Notes

  • Build output (site/) is gitignored
  • Deploys via GitHub Pages

Detailed Guides

Read these when the task requires it: