This file governs repo-specific conventions for Claude Code. Skills, plugins, agents, and system prompts govern their own domains and take precedence within their scope — don't let the rules below override them.
Apply these unless a skill, plugin, agent, or system prompt explicitly overrides them for its scope:
- Never commit directly to
main— always work on a branch and open a PR. - Never create a page file without also adding it to
navigationinconfig/navigation.json. - Never use relative links — always use root-relative paths (e.g.,
/getting_started/install). - Commit messages and PR titles must follow Conventional Commits:
type: short description(lowercase, no period). Common types:feat,fix,docs,style,chore. - Run
mint broken-linksbefore committing navigation or link changes.
Kosli documentation site built with Mintlify. Content is authored in Markdown (.md) and MDX (.mdx) files. Configuration lives in docs.json.
npm i -g mint # Install Mintlify CLI (one-time)
mint dev # Start local dev server at http://localhost:3000
mint dev --port 3333 # Start on custom port
mint update # Update Mintlify CLI
mint broken-links # Validate all internal links
mint a11y # Check color contrast and accessibilityRequires Node.js v19+.
docs.json— Central config: theme, API settings, logos. Uses$refto compose from files inconfig/.config/— Split config files:navigation.json(all page routing),redirects.json,footer.json.- Content directories —
understand_kosli/,getting_started/,administration/,integrations/,implementation_guide/,tutorials/,troubleshooting/,faq/,changelog/,client_reference/,helm/,policy-reference/,terraform-reference/,template-reference/,labs/ snippets/— Reusable MDX content fragmentsstyle.css— Custom CSS overrides applied on top of the Mintlify themescripts/— Python scripts that generate "live docs" (mostly underclient_reference/) and update navigation. See Live docs below.tests/— pytest suite for the live-docs scripts..github/workflows/—doc-review.yml(Claude-powered PR review),pr-quality.yml(link/title checks),update-cli-docs.yml,update-schemas.yml.schemas/— Generated JSON Schema assets. See Schemas below.
client_reference/ content is partly generated by scripts in scripts/.
Run scripts/dev_live_docs.sh to regenerate locally; it restores
client_reference/ on exit. Don't hand-edit generated pages — find the
source script first.
Tests for the generators live in tests/ and run with pytest.
schemas/flow-template/v1.json and schemas/policy/v1.json are the static
JSON Schema assets served from https://docs.kosli.com/schemas/.... They are
generated from the Kosli API (the source of truth in kosli-dev/server),
not hand-edited:
python scripts/update_schemas.py # regenerate from the API
python scripts/update_schemas.py --check # exit non-zero if they have driftedThe update-schemas.yml workflow runs the script on a schedule and opens a PR
when the committed files drift from the API. Don't hand-edit these files — fix
the Pydantic models in kosli-dev/server instead.
Every page requires YAML front matter:
---
title: Short, specific title
description: One sentence describing the page purpose.
---- MUST Use root-relative paths for internal links:
/understand_kosli/what_is_kosli✓ —../what_is_kosli✗ - MUST Adding a new page: create the file AND add its path to
navigationinconfig/navigation.json. Both steps are required. - SHOULD Follow the Diátaxis framework when choosing page form:
- Tutorial — teaches by doing (e.g., "Get familiar with Kosli")
- How-to guide — step-by-step for a specific goal (e.g., "Report AWS environments")
- Reference — factual, lookup-oriented (e.g., CLI reference pages)
- Explanation — concepts and background (e.g., "What is Kosli?")
- MAY Add an
iconfield to front matter using Font Awesome names.
| Component | Use for |
|---|---|
<Steps> / <Step> |
Sequential procedures |
<Tabs> / <Tab> |
Platform-specific or alternative content |
<Card> / <CardGroup> |
Navigational links, feature highlights |
<Accordion> / <AccordionGroup> |
Progressive disclosure, FAQs |
<Tip> / <Info> / <Warning> / <Note> |
Callouts — use sparingly |
<CodeGroup> |
Same command in multiple languages/tools |
<Frame> |
Wrapping images |
- Use active voice and imperative mood for instructions ("Run
kosli attest", not "You should run"). - Refer to the product as Kosli — not "the Kosli platform" or "KOSLI".
- Use "audit trail" not "audit log"; "attest" not "certify".
- Use American spelling (organization, behavior, color), not British. Enforced by Vale via
styles/Kosli/AmericanSpelling.yml. - Sentence case for all headings.
- Don't use relative links — they break when pages move.
- Don't create a page without updating
config/navigation.json— it won't appear in the site. - Don't add content to
snippets/unless it is genuinely reused in 2+ pages. - Don't commit image files without placing them in an appropriate subdirectory.
- Don't push to
maindirectly — always use a PR.
When available, prefer skills over ad-hoc approaches:
- PR creation — use the
pr-creatorskill if available. - Changelog entries — use the
changelog-creatorskill if available. Follow the existing<Update>format inchangelog/index.mdxexactly:Always prompt the user for the<Update label="Month Year" description="vX.X.X" tags={["Product Name"]}> ## New features / Bug fixes / Changes - ... [View on GitHub](https://github.com/kosli-dev/...) </Update>
tagsvalue (e.g.,"Terraform Provider","CLI") before generating an entry.
Automatic via Mintlify GitHub app on push to main. No manual deployment steps.