AGENTS.md
This file provides guidance to agents when working with code in this repository.Overview
This is a Mintlify documentation project for the OASM (Open Attack Surface Management) platform. It is NOT the main application codebase—it’s the documentation site that references other repositories.Development Commands
Project Structure
.mdxfiles → Documentation pages (use frontmatter withtitleand optionaldescription)docs.json→ Navigation configuration (tabs, groups, colors, icons)api-reference/openapi.json→ OpenAPI specification for API docssnippets/→ Reusable MDX snippets
Non-Obvious Patterns
- Navigation: Configured in
docs.jsonundernavigation.tabswith nested groups—changes here affect the sidebar structure - Icons: Groups and tabs can have icons using Lucide icon names (e.g.,
"icon": "rocket","icon": "book-open") - Icons: Uses Lucide icons library (configured in
docs.jsonundericons.library) - AI Integrations: The
contextual.optionsindocs.jsonenables AI chat features (chatgpt, claude, perplexity, mcp, cursor, vscode) - Multi-repo: This docs site references two external repositories:
github.com/oasm-platform/open-asm(main backend)github.com/oasm-platform/oasm-docker(Docker deployment)
Code Style (MDX)
- Use
---frontmatter delimiters with YAML between - Standard Mintlify components:
<Card>,<Steps>,<Step>,<Info>,<Accordion>,<CodeGroup> - Links use relative paths (e.g.,
href="/quickstart")
Internationalization (i18n) — REQUIRED on every docs change
The site ships in 8 languages vianavigation.languages in docs.json. English is the default and the source of truth; every other locale lives in its own folder with the same structure:
Rules
- Any change to an English page must land in all 7 translations in the same change. New page, edited paragraph, renamed heading, removed section, new screenshot reference: update
vi/,zh/,ja/,ko/,es/,it/,ru/too. Never leave a translation describing behavior the English page no longer has. - Never hand-edit the non-English navigation in
docs.json. Edit the English entry (navigation.languages[0]) only, then run:It mirrors tabs/groups/pages/redirects/navbar/footer into every locale and copies any missing page from English into the locale folder (English fallback). If it fails withno <lang> label for '...', add that group/tab name for all 7 locales toLABELSin the script. - A page copied by the script is still English. Translate it before finishing; the copy is a fallback, not the deliverable.
- Deleting or moving an English page: delete/move the same file in every locale folder and add the redirect to the English
redirects(the script mirrors it per locale).
How to translate a page
- Translate prose, headings, frontmatter
title/description/sidebarTitle, table text, and component text (<Card title>,<Step title>,<Accordion title>,<Tab title>,<Note>/<Info>/<Warning>bodies, imagealt). - Do not translate: code blocks and inline code, CLI commands, env vars, API fields, JSON/YAML keys, file paths, URLs, MDX component and prop names, frontmatter keys,
iconvalues, product/feature names (OASM, AI Studio, Attack Surface Query, MCP, Docker, …). - Internal links get the locale prefix:
/target→/vi/target,/attack-surface-query/filtering#ops→/vi/attack-surface-query/filtering#ops,/api-reference/...→/vi/api-reference/.... Asset paths (/images/...,/logo/...) and external URLs stay unchanged. - UI labels (button, menu, page names) must match the console’s own translation, not a fresh one. Look them up in
core-api/src/i18n/<lang>/*.jsonof the open-asm repo (usually checked out next to this one) (search the English string inen/to find the key, then read the same key in<lang>/). If the console has no string for it, translate naturally. - Headings keep the English anchor: every translated heading ends with
{#<english-anchor>}, e.g.## Quy tắc phạm vi {#scope-rules}. All#fragmentlinks in a translated page use the English anchor, so anchors are identical across languages. When you add/rename an English heading, update the{#...}id in every locale (and any links to the old anchor). Leave a blank line between a heading and a following code fence. - Wrap bare URLs in backticks when text touches them without a space (common in Chinese/Japanese/Korean), otherwise the autolink swallows the following characters and the build fails with
Invalid URL. - Keep the MDX structure identical to English (same headings order, same components, same code blocks) so future diffs map 1:1.
- Tone: technical, concise, the way native-speaking engineers write docs. Don’t translate word-by-word.
