Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
doc: doc style guide and rules
Sheen Capadnganb11bbdc7967f
diff --git a/.greptile/config.json b/.greptile/config.jsonindex 100b1b2968..b21ff573df 100644--- a/.greptile/config.json+++ b/.greptile/config.json@@ -8,6 +8,72 @@"defaultOpen": false},"rules": [+ {+ "id": "docs-provide-context-for-new-users",+ "rule": "Documentation must provide enough context for a new user to understand what a feature is and why it matters before diving into how to use it. Don't assume prior knowledge of the product. Flag pages that jump straight into configuration or procedures without first explaining what the feature does and when it's relevant. A reader landing on the page with no prior context should understand what they're looking at within the first few sentences.",+ "severity": "medium",+ "scope": ["docs/documentation/**", "docs/integrations/**", "docs/sdks/**", "docs/self-hosting/**"]+ },+ {+ "id": "docs-write-for-users-not-implementers",+ "rule": "Documentation must be written for users, not implementers. The reader should be able to understand the page without any knowledge of Infisical's codebase or internal architecture. Flag content that exposes implementation details users don't need — how we built something rather than what it does for them. Architecture docs are the exception. Does not apply to API reference docs, which are inherently technical.",+ "severity": "medium",+ "scope": ["docs/documentation/**", "docs/integrations/**", "docs/sdks/**", "docs/self-hosting/**", "docs/changelog/**"]+ },+ {+ "id": "docs-cross-reference-core-concepts",+ "rule": "When documentation introduces or references a concept that is core to understanding the page, it must link to that concept's documentation. If a reader wouldn't understand the page without knowing what that concept means, link it. Don't require links for every mention — only when the concept is essential for comprehension.",+ "severity": "low",+ "scope": ["docs/**"]+ },+ {+ "id": "docs-use-mintlify-components",+ "rule": "Documentation should take full advantage of Mintlify's component library rather than relying on plain markdown. This includes Steps, Tabs, Cards, CardGroups, Accordions, callouts (Note, Warning, Tip, Info), diagrams, code groups, and other interactive components. Flag opportunities where Mintlify components would improve the reading experience. Does not apply to API reference docs, which have their own structured format.",+ "severity": "medium",+ "scope": ["docs/documentation/**", "docs/integrations/**", "docs/sdks/**", "docs/self-hosting/**", "docs/changelog/**"]+ },+ {+ "id": "docs-clear-actionable-language",+ "rule": "Documentation should be clear, direct, and actionable. Prefer active voice over passive. Use specific verbs over vague ones. Keep sentences and paragraphs concise. The goal is documentation that reads like instructions from a knowledgeable colleague — easy to follow and act on.",+ "severity": "low",+ "scope": ["docs/**"]+ },+ {+ "id": "docs-keep-pages-focused",+ "rule": "Each documentation page should have a clear, single purpose. Flag pages that try to cover too much — setup and advanced configuration and troubleshooting all in one, or content for different audiences mixed together. Long pages that require excessive scrolling should be split into focused pages that are easier to navigate, link to, and maintain. Suggest splitting when a page covers multiple distinct topics or workflows. Does not apply to API reference docs, which are comprehensive by nature.",+ "severity": "low",+ "scope": ["docs/documentation/**", "docs/integrations/**", "docs/sdks/**", "docs/self-hosting/**", "docs/changelog/**"]+ },+ {+ "id": "docs-suggest-diagrams-for-technical-content",+ "rule": "Technical documentation with multiple connecting pieces benefits from diagrams. Flag pages that explain architecture, data flows, component relationships, authentication flows, or multi-system interactions without any visual. Suggest adding a diagram (Mermaid or image) when the content describes how things connect or when understanding requires mentally assembling multiple parts. Does not apply to API reference docs.",+ "severity": "low",+ "scope": ["docs/documentation/**", "docs/integrations/**", "docs/sdks/**", "docs/self-hosting/**"]+ },+ {+ "id": "docs-maintain-flow-when-editing",+ "rule": "When content is added or modified on an existing page, it must fit naturally with the surrounding content. Flag changes that appear disconnected from context — content that doesn't follow logically from what comes before, breaks the page's narrative flow, or feels out of place. If new content doesn't fit the existing structure, suggest reorganizing the page or moving the content elsewhere.",+ "severity": "medium",+ "scope": ["docs/**"]+ },+ {+ "id": "docs-state-prerequisites-explicitly",+ "rule": "Documentation that assumes something is already set up — a Gateway deployed, permissions granted, a CLI installed, etc. — must state those prerequisites explicitly at the top of the page. Readers shouldn't get stuck halfway through because they missed an unstated requirement. Flag pages with procedures that depend on prior setup without mentioning it.",+ "severity": "low",+ "scope": ["docs/documentation/**", "docs/integrations/**", "docs/sdks/**", "docs/self-hosting/**"]+ },+ {+ "id": "docs-consistent-terminology",+ "rule": "Documentation must use consistent terminology. Don't switch between synonyms for the same concept within a page or across related pages — it confuses readers and makes searching harder. Flag inconsistent usage like mixing 'secret' and 'credential' for the same thing, or 'folder' and 'directory' interchangeably. Use Infisical's established terms.",+ "severity": "low",+ "scope": ["docs/**"]+ },+ {+ "id": "docs-consider-faq-sections",+ "rule": "Documentation for complex features should include a Frequently Asked Questions section using AccordionGroup. FAQs help readers quickly find answers to common questions, edge cases, and gotchas. Flag pages that cover complex topics — especially those with nuanced behavior, common misconceptions, or multiple interacting concepts — without an FAQ section. Also flag content buried in paragraphs that would be clearer as FAQ items (questions readers commonly have).",+ "severity": "low",+ "scope": ["docs/documentation/**", "docs/integrations/**", "docs/self-hosting/**"]+ },{"id": "audit-log-event-body-must-include-human-readable-labels","rule": "Anywhere we define or emit an audit log event, every identifier field in the event's `metadata` body must be paired with a human-readable label (name, slug, email, etc.) resolved at emission time. A raw UUID alone is unactionable for admins reading the audit log UI. Scope is strictly the event body, not the surrounding audit log envelope. An identifier field is any field whose name is or ends in an id-like token in any casing — `id`, `Id`, `ID`, e.g. `groupId`, `groupID`, `group_id`, or a lone `id`. Optional IDs require an equally-optional label. The fix at emission sites is to load the parent record and include its label, not to add the field to the type and pass `undefined`.",diff --git a/.greptile/files.json b/.greptile/files.jsonindex f821198110..747277ff38 100644--- a/.greptile/files.json+++ b/.greptile/files.json@@ -1,5 +1,6 @@{"files": [- { "path": "DESIGN.md", "description": "v3 design system: tokens, components, and UI conventions for all frontend changes" }+ { "path": "DESIGN.md", "description": "v3 design system: tokens, components, and UI conventions for all frontend changes" },+ { "path": "docs/STYLE_GUIDE.md", "description": "Documentation style guide: writing conventions, Mintlify components, and cross-referencing rules for all docs changes" }]}diff --git a/docs/CONTRIBUTING.MD b/docs/CONTRIBUTING.MDindex 6983ad8f40..c9637399b0 100644--- a/docs/CONTRIBUTING.MD+++ b/docs/CONTRIBUTING.MD@@ -1,8 +1,17 @@# Contributing to the documentation+## Style Guide++**Read [STYLE_GUIDE.md](./STYLE_GUIDE.md) before writing documentation.** It covers:++- Writing for users (not implementers)+- Cross-referencing related concepts+- Using Mintlify components (`<Steps>`, `<Tabs>`, `<Card>`, etc.)+- Page structure and formatting+## Getting familiar with Mintlify-New to Mintlify. [Start Here](https://mintlify.com/docs/quickstart)+New to Mintlify? [Start Here](https://mintlify.com/docs/quickstart)## 👩💻 Development@@ -12,7 +21,7 @@ Install the [Mint CLI](https://www.npmjs.com/package/mint) to preview the documenpm i -g mint```-Run the following command at the root of your documentation (where mint.json is)+Run the following command at the root of your documentation (where docs.json is)```mint dev@@ -21,4 +30,4 @@ mint dev## Troubleshooting- `mint dev` isn't running - Run `mint update` to update the Mint CLI.-- Page loads as a 404 - Make sure you are running in a folder with `mint.json`. Check the `/docs` folder+- Page loads as a 404 - Make sure you are running in a folder with `docs.json`. Check the `/docs` folderdiff --git a/docs/STYLE_GUIDE.md b/docs/STYLE_GUIDE.mdnew file mode 100644index 0000000000..f2187da818--- /dev/null+++ b/docs/STYLE_GUIDE.md@@ -0,0 +1,311 @@+# Documentation Style Guide++This guide defines how to write user-facing documentation for Infisical. These principles are enforced by Greptile on every PR that touches `docs/`.++## Quick Summary++1. **Provide context** — Explain what and why before how. Don't assume prior knowledge.+2. **Write for users** — No implementation details. Users care about outcomes, not internals.+3. **Cross-reference** — Link concepts that are essential for understanding.+4. **Use Mintlify components** — Steps, Tabs, Cards, Accordions, callouts, diagrams.+5. **Write clearly** — Active voice, specific verbs, concise sentences.+6. **Keep pages focused** — One purpose per page. Split if it gets too long.+7. **Maintain flow** — New content should connect naturally with existing content.+8. **State prerequisites** — Tell readers what they need before they start.+9. **Be consistent** — Use the same terms throughout.+10. **Structure by purpose** — Guides, concepts, overviews, and references have different shapes.++---++## 1. Provide Context for New Users++Don't assume the reader already knows what a feature is or why it matters. Every page should orient a new user before diving into details.++**Start with the "what" and "why":**++- What is this feature?+- Why would someone use it?+- When is it relevant?++Then move to the "how."++**Bad:** Jumping straight into configuration steps without explaining what the feature does.++**Good:** A brief opening paragraph that explains what this is and why it matters, then the steps.++If a reader lands on the page with no prior context, they should be able to understand what they're looking at within the first few sentences.++### Audience Callouts++If a page is intended for a specific audience (admins vs. end users, product admins vs. application admins), say so at the top with an `<Info>` callout:++```mdx+<Info>+ This page is for product admins setting up PKI infrastructure.+ Teams issuing certificates should see [Applications](/documentation/platform/pki/applications/overview).+</Info>+```++This helps readers quickly know if they're in the right place.++### "When to Use" Sections++For pages that describe one approach among several (e.g., ACME vs. EST vs. SCEP), include a "When to Use" section that helps readers decide if this is the right choice:++```mdx+## When to Use ACME Enrollment++<CardGroup cols={2}>+ <Card title="Web Servers" icon="server">+ Nginx, Apache, Tomcat with Certbot.+ </Card>+ <Card title="Kubernetes" icon="dharmachakra">+ Use cert-manager to issue certificates.+ </Card>+</CardGroup>+```++This makes it easier for readers to quickly assess whether to continue reading or look elsewhere.++---++## 2. Write for Users, Not Implementers++Documentation should be readable and understandable by someone who has never seen our codebase.++**The test:** Would a user who has never seen our code understand this? If the answer is no, rewrite it.++Users care about what they can do and what happens — not how we built it. Don't expose implementation details like API endpoints, database schemas, internal service names, or "how it works under the hood" explanations.++**Exception:** Architecture docs (`*/architecture.mdx`) can explain system design.++---++## 3. Cross-Reference Core Concepts++When you reference a concept that is core to understanding the page, link to its documentation. If a reader wouldn't understand the page without knowing what that concept means, link it.++Link on the first mention of a concept on the page — not every time it appears. After the first linked mention, readers know what it is and can scroll back if needed.++```mdx+<!-- Good: Gateway is core to understanding this page -->++Users connect through a [Gateway](/documentation/platform/gateways/overview)+without ever seeing credentials.++<!-- Good: "Learn more" for deeper context -->++Permissions are set at the folder level.+[Learn more about Folders →](/documentation/platform/pam/folders/overview)+```++---++## 4. Use Mintlify Components++Take full advantage of Mintlify's component library rather than relying on plain markdown. Components make documentation more scannable, interactive, and easier to navigate.++### Procedures++Use `<Steps>` for any sequence of actions:++```mdx+<Steps>+ <Step title="Create a folder">+ Go to **Settings → Folders** and click **Create**.+ </Step>+ <Step title="Configure permissions">Assign roles to users or groups.</Step>+</Steps>+```++### Alternative Approaches++Use `<Tabs>` when there are multiple ways to accomplish something:++```mdx+<Tabs>+ <Tab title="Web">Connect through your browser...</Tab>+ <Tab title="CLI">Use the command line...</Tab>+</Tabs>+```++### Callouts++Use callouts to highlight important information:++```mdx+<Note>Prerequisites or important context.</Note>+<Warning>Destructive actions or irreversible changes.</Warning>+<Tip>Helpful suggestions or best practices.</Tip>+<Info>Additional context that's good to know.</Info>+```++### Navigation++Use `<Card>` and `<CardGroup>` to guide readers to related pages:++```mdx+<CardGroup cols={2}>+ <Card title="Quick Start" icon="rocket" href="/docs/quick-start">+ Get started in 5 minutes.+ </Card>+ <Card title="Concepts" icon="book" href="/docs/concepts">+ Understand the fundamentals.+ </Card>+</CardGroup>+```++### Diagrams and Visuals++Use diagrams when explaining technical concepts with multiple connecting pieces. Visuals help readers understand relationships, data flows, and architecture far better than text alone.++**Good candidates for diagrams:**++- How components connect to each other+- Request/response flows+- Authentication or authorization flows+- Architecture overviews+- Anything with multiple steps happening across different systems++Mintlify supports [Mermaid diagrams](https://mermaid.js.org/) inline, or you can include images.++### Frequently Asked Questions++Use `<AccordionGroup>` with `<Accordion>` for FAQ sections. FAQs are valuable — they address common questions, edge cases, and "but what about..." scenarios without cluttering the main content.++**Consider adding FAQs when:**+- A feature has common gotchas or misconceptions+- Users often ask the same questions+- There are edge cases that don't fit the main flow+- The "how it works" has nuances worth explaining++```mdx+<AccordionGroup>+ <Accordion title="Can I do X while Y is happening?">+ Yes, but only if Z. Here's why...+ </Accordion>+ <Accordion title="What happens if something goes wrong?">+ The system automatically handles this by...+ </Accordion>+</AccordionGroup>+```++FAQs make documentation easier to scan — readers can jump straight to their question instead of hunting through paragraphs.++### Other Components++Mintlify offers many more components — code groups for multiple examples, and more. Use whatever best serves the reader's understanding.++---++## 5. Write Clearly and Directly++Documentation should read like instructions from a knowledgeable colleague — direct, specific, and easy to follow.++- Prefer active voice over passive+- Use specific verbs over vague ones+- Keep sentences and paragraphs concise+- Explain jargon on first use++---++## 6. Keep Pages Focused++Each page should have a clear, single purpose. If a page is getting long or covering multiple distinct topics, split it into separate pages.++**Signs a page should be split:**++- It covers setup _and_ advanced configuration _and_ troubleshooting+- Readers have to scroll past content that isn't relevant to them+- The table of contents has more than 5-6 top-level sections+- Different audiences need different parts (e.g., admins vs. end users)++**Better structure:**++- One page for the concept overview+- Separate pages for each workflow or use case+- A dedicated page for reference material (configuration options, API fields)+- Troubleshooting as its own page if it's substantial++Short, focused pages are easier to navigate, easier to link to, and easier to maintain.++---++## 7. Maintain Flow When Editing++When adding or modifying content on an existing page, make sure it fits naturally with what comes before and after. Don't just insert content — connect it.++**Check that:**++- The page still reads coherently from top to bottom+- New sections follow logically from previous ones+- Transitions make sense (readers shouldn't feel jarred)+- The overall narrative or structure isn't broken++If new content doesn't fit the existing flow, consider whether it belongs on this page at all, or whether the page structure needs to be reorganized.++---++## 8. State Prerequisites Explicitly++If a page assumes something is already set up — a Gateway deployed, permissions granted, a CLI installed — state it at the top. Readers shouldn't get stuck halfway through because they missed an unstated requirement.++Use a `<Note>` callout for critical prerequisites:++```mdx+<Note>+ This guide requires a [Gateway](/documentation/platform/gateways/overview)+ that can reach your database.+</Note>+```++Or list them in a "Prerequisites" section before the main content.++---++## 9. Use Consistent Terminology++Use the same terms throughout the documentation. Don't switch between synonyms for the same concept — it confuses readers and makes searching harder.++**Examples:**++- Pick "secret" or "credential" and stick with it in context+- Don't mix "folder" and "directory" interchangeably+- Don't call something a "project" in one place and a "workspace" in another++If Infisical has a specific term for something, use that term consistently.++---++## 10. Page Structure++Structure depends on what the page is for. Don't force every page into the same template.++**All pages need:**++- Frontmatter with `title`, `sidebarTitle`, and `description`+- An opening that orients the reader++**How-to / Guide pages:**++- Prerequisites (if any)+- Step-by-step procedures+- Next steps with `<CardGroup>`++**Concept pages:**++- Explanation of what it is and why it matters+- How components relate to each other+- Links to related concepts and guides++**Overview / Landing pages:**++- Brief intro+- Navigation cards to sub-pages++**Reference pages:**++- Structured information (tables, field descriptions)+- Examples where helpful++Use the structure that best serves the reader for that type of content.