This guide provides style, voice, and formatting rules for creating and editing CircleCI documentation. Follow these guidelines when working on AsciiDoc content in the docs directory.
For a comprehensive overview of the CircleCI documentation structure, see the auto-generated llms.txt file on the live site at https://circleci.com/docs/llms.txt. This file provides:
- Complete documentation structure with all components
- Full navigation hierarchy
- Content statistics and URL patterns
- Technical stack information
This guide (CLAUDE.md) focuses on how to write documentation. The llms.txt file tells you what documentation exists and where.
IMPORTANT: When creating new documentation pages, always start with the appropriate page template from docs/contributors/modules/templates/pages/:
template-how-to.adoc- Task-oriented guidestemplate-conceptual.adoc- Explanatory contenttemplate-tutorial.adoc- Learning-oriented tutorials
All pages require standard attributes (:page-platform:, :page-description:, :experimental:) at the top. See the "Working with the Docs Site" section for complete details on templates and page attributes.
- Use active voice: Talk directly to the reader using simple, direct, clear, and confident language
- Active voice keeps instructions short and quickly conveys meaning
- Good: Click Go and your project will complete.
- Bad: When you click the Go button your project should complete.
- Write for a general audience
- Assume technical competence but explain concepts clearly and simply
- Complex concepts should be accessible to non-technical readers
- The CircleCI web interface is the "web app"
- Use "CI/CD" to describe what we do
- Pipelines are triggered, not "run"
- Feature names are rarely capitalized (exceptions: Insights)
- Write out numbers one through nine
- Use numerals for 10 and above
- Exceptions:
- Addresses: 6 Maple St.
- Ages: Beth, a 12-year-old turtle; the 2-year-old testing framework
- Dollars and cents: $5; 5 cents
- Measurements: 6 feet tall, 9-by-12 workspace; 7 miles per hour
- Millions, billions: 3 million users
- "Login" and "Setup" are nouns, not verbs:
- The login screen …
- Log in to your account …
- Read the setup guide …
- Set up your account …
- Use bold for GUI menu options and button text:
- Select Org from the sidebar
- Click Set Up Project
- Use italics for commonly understood technical concepts (not CircleCI features):
- Continuous Integration
- Concurrency
- Parallelism
CircleCI docs use a custom icon macro for UI icons that automatically switches between light and dark theme versions.
Syntax:
icon:icon-name[Alt text description]Available icons (located in docs/guides/modules/ROOT/images/icons/):
icon:more[Ellipsis menu icon]- Three-dot menu (ellipsis)icon:edit-solid[Edit icon]- Edit buttonicon:delete[Trash bin icon]- Delete/trash buttonicon:settings[Settings icon]- Settings buttonicon:cancel[Cancel icon]- Cancel buttonicon:passed[Passed icon]- Success/passed indicatoricon:warning[Warning icon]- Warning indicatoricon:rebuild[Rebuild icon]- Rebuild buttonicon:promote[Promote icon]- Promote buttonicon:chunk[Chunk icon]- Chunk feature iconicon:github-app[GitHub App icon]- GitHub App integrationicon:github-oauth[GitHub OAuth icon]- GitHub OAuth integration
Usage examples:
Select the icon:more[Ellipsis menu icon] to open the menu.
Click the icon:settings[Settings icon] to access project settings.Important notes:
- Always include descriptive alt text for accessibility
- The macro automatically handles light/dark theme switching
- Each icon has a light version (
name.svg) and dark version (name-dark.svg) - Use this macro instead of the older
image:syntax for theme-aware icons
- Write headings in logical sequence that tells a story
- Do not skip heading levels (e.g., h2 to h4)
- Include at least an intro paragraph before subheadings
- Start headings with verbs where possible:
- Good: "Grooming cats"
- Bad: "Cats"
- When referencing headings in prose, use full heading with no quotes and title case
- Use resource ID coordinates:
xref:guides:integration:github-integration.adoc#user-keys-and-deploy-keys[User Keys and Deploy Keys]- Explicitly name the document or section:
- Good: Refer to the xref:guides:security:set-environment-variable.adoc[Setting an Environment Variable in a Project] section
- Bad: For more information head xref:guides:security:set-environment-variable.adoc[here]
- Use title case for link text (Vale enforced):
- Good:
xref:guides:orchestrate:schedule-triggers.adoc[Schedule Triggers] - Bad:
xref:guides:orchestrate:schedule-triggers.adoc[schedule triggers]
- Good:
- Always verify xrefs before using them. Check that the page you are referencing exists in the location you are using to create the resource ID
Before adding any xref to a document, you must verify the target file exists and the path is correct:
# Search for the file
find docs -name "filename.adoc"
# Or use glob pattern
glob pattern: **/filename.adocCommon mistakes:
- Making up file names that don't exist
- Using incorrect module names in the path
- Guessing at file locations without checking
The xref format is: xref:component:module:filename.adoc[Link Text]
- component: Usually
guides,reference,orbs, etc. - module: The module directory name (e.g.,
orchestrate,deploy,toolkit) - filename.adoc: The actual file name
Example verification process:
- Search:
glob pattern: **/deploy-markers.adoc→ findsdocs/guides/modules/deploy/pages/configure-deploy-markers.adoc - Read target page title: "Configure deploy markers"
- Build xref: Component=
guides, Module=deploy, File=configure-deploy-markers.adoc - Result:
xref:guides:deploy:configure-deploy-markers.adoc[Configure Deploy Markers](title case)
- Use this format:
link:https://circleci.com[CircleCI]- Links must have descriptive link text (not "click here", "here", or "this")
- Provide working examples: Code should be tested and valid
- Readers should copy-paste with minimal changes
- Specify language for syntax highlighting:
[source,yaml]
----
version: 2.1
----- For commands, use
consolelanguage with dollar sign:
[source,console]
----
$ circleci version
----- The dollar sign won't be copied with the copy button
- When users need to substitute data, use
<my-data>format - Point out what needs replacement, including whether to replace
< >or" " - Show full job or workflow, not just relevant lines
- Add titles and comments to explain code:
.A title for the code snippet
[source,yaml]
----
version: 2.1
jobs:
hello-job:
docker:
- image: cimg/node:17.2.0 # the primary container
----- Use ordered lists (numbered) for sequential steps:
. Step one
. Step two
. Step three- Use unordered lists for everything else
- Use
+to include blocks within steps:
. Step one
. Step two involves code
+
[source,shell]
----
some code
----
. Step three- Capitalize first word of each list item
- Use periods if item is a full sentence or completes the intro stem
- Wrap tables in scrollable container:
[.table-scroll]
--
[cols=4*, options="header"]
|===
| Key
| Required
| Type
| Description
| Version
| Y
| String
| Should currently be `2`
|===
--CircleCI docs use reusable partials to maintain consistency and reduce duplication. Partials are AsciiDoc snippets that can be included in multiple pages.
When to use partials:
- Repeated instructions that appear across multiple pages (navigation steps, setup procedures)
- Standard notes, tips, or warnings used in multiple locations
- Content that needs to stay synchronized across pages (resource tables, FAQ entries)
- Common troubleshooting steps
When NOT to use partials:
- Content that appears only once
- Page-specific information that would not be reused
- Content that needs different context on each page
Include syntax:
include::ROOT:partial$category/filename.adoc[]Include with custom text or comment:
include::ROOT:partial$notes/standalone-unsupported.adoc[This feature is not supported for GitLab, GitHub App or Bitbucket Data Center]Partial categories and locations:
All partials are located in docs/guides/modules/ROOT/partials/
-
app-navigation/ - Navigation instructions
steps-to-project-settings.adoc- Steps to access project settings
-
create-project/ - Project creation steps
steps-up-to-pipeline.adoc- Steps from Create Project to pipeline setup
-
execution-resources/ - Resource specifications
docker-resource-table.adoc- Docker executor resource tablemachine-resource-table.adoc- Machine executor resource tablemacos-resource-table.adoc- macOS executor resource tablewindows-resource-table.adoc- Windows executor resource table- And others for ARM, GPU, and resource class views
-
faq/ - Frequently asked questions snippets
general-faq-snip.adoc- General FAQ entriesorb-faq-snip.adoc- Orb-related FAQsworkflows-faq-snip.adoc- Workflow FAQsbilling-faq-snip.adoc- Billing FAQs- And others for specific topics
-
notes/ - Reusable notes and warnings
docker-auth.adoc- Docker authentication notestandalone-unsupported.adoc- Feature support note (accepts custom text)find-organization-id.adoc- How to find organization IDserver-api-examples.adoc- Server API examples note
-
orbs/ - Orb-related content
orb-types.adoc- Orb type definitionsorb-type-comparison.adoc- Orb type comparison table
-
pipelines-and-triggers/ - Pipeline setup content
set-up-schedule-trigger.adoc- Schedule trigger setup stepscustom-webhook-setup.adoc- Webhook configuration stepspipeline-values.adoc- Pipeline values reference
-
runner/ - Self-hosted runner setup
install-with-web-app-steps.adoc- Runner installation via web appinstall-with-cli-steps.adoc- Runner installation via CLIcontainer-runner-prereq.adoc- Container runner prerequisitesterms.adoc- Runner terminology
-
tips/ - Helpful tips and guidance
check-org-type.adoc- How to check organization typefind-project-slug.adoc- How to find project slugenv-var-or-context.adoc- When to use env vars vs contextstrigger-pipeline-with-parameters.adoc- Pipeline parameter triggering
-
troubleshoot/ - Troubleshooting snippets
orb-troubleshoot-snip.adoc- Orb troubleshootingpipelines-troubleshoot-snip.adoc- Pipeline troubleshootingself-hosted-runner-troubleshoot-snip.adoc- Runner troubleshooting
-
using-expressions/ - Configuration expressions
operators.adoc- Expression operatorsenv-vars-in-conditional-caveat.adoc- Environment variable caveats
Example usage:
== Setting up your project
include::ROOT:partial$tips/check-org-type.adoc[]
Follow these steps:
include::ROOT:partial$create-project/steps-up-to-pipeline.adoc[Steps to create project]
include::ROOT:partial$notes/docker-auth.adoc[]Creating new partials:
When creating a new partial:
- Determine if the content will be used in 2+ places
- Choose the appropriate category directory
- Use a descriptive filename ending in
.adoc - For FAQ/troubleshooting snippets, use
-snip.adocsuffix - Consider if the partial should accept custom text parameters
- Test the partial in all intended locations
Best practices:
- Keep partials focused on a single concept or set of related steps
- Write partials to work in multiple contexts without requiring modifications
- Document partials that accept custom text parameters
- Update all pages when modifying a partial (partials affect multiple pages)
- Use meaningful filenames that describe the content
- Always include descriptive alt text:
.Image Title
image::guides:ROOT:name-of-image.png[Alternative text describing the image]- Images without alt text are accessibility violations
- Include title above image using
.Titlesyntax
Use these for visual separation:
NOTE:- Supplementary information to highlightTIP:- Guidance on how to carry out a stepIMPORTANT:- Rarely used; consider other options firstCAUTION:- Reader needs to be carefulWARNING:- Dangers or consequences exist
Simple syntax:
NOTE: This is a note.Block syntax for longer content:
[NOTE]
====
This is a longer note with:
. Step 1
. Step 2
====Use for showing different options:
[tabs]
====
Tab A::
+
--
Content for Tab A
--
Tab B::
+
--
Content for Tab B
--
====- Passive voice constructions
- Wordy phrases like "in order to", "at this time", "due to the fact that"
- Hedging words like "should", "might", "perhaps" when being definitive
- Contractions
- Missing Oxford commas
- Periods at end of sentences with URLs/code
- Gender-biased language
- Missing alt text on images
- Links without descriptive text
- Inline code in headings
- More than 3 commas in a sentence
- Sentences over 25 words (affects readability)
- Missing page attributes (
:page-platform:,:page-description:,:experimental:) - Not using appropriate page templates for new content
- Using xrefs without verifying the target file exists and path is correct
- Close all attribute blocks properly
- Use valid admonition block syntax
- Use valid code block syntax
- Use valid table block syntax
- Close ID quotes properly
The CircleCI docs use automated linting to enforce style rules and catch common errors. Understanding these tools helps you write docs that pass validation on the first try.
Vale is a syntax-aware linter that enforces style rules defined in the styles/ directory. It checks for grammar, style violations, and CircleCI-specific conventions.
Running Vale locally:
# Check a specific file
vale docs/guides/modules/toolkit/pages/your-file.adoc
# Check all files in a directory
vale docs/guides/modules/toolkit/pages/
# Check staged files before commit
git diff --cached --name-only | grep '.adoc$' | xargs valeVale configuration location:
- Main config:
.vale.ini - Style rules:
styles/directory - Custom CircleCI rules:
styles/CircleCI/
In addition to Vale, the build process validates AsciiDoc syntax:
- Broken xrefs (links to non-existent pages)
- Unlisted pages (pages not in
nav.adoc) - Invalid attribute syntax
- Malformed code blocks or tables
Running validation locally:
# Preview with local dev server (shows validation warnings)
npm run start:dev
# Full build (catches all errors)
npm run build:docsBefore committing documentation changes:
- ✅ Run Vale on your files to catch style violations
- ✅ Preview locally to check formatting and links
- ✅ Verify all xrefs point to existing files
- ✅ Check
:page-description:is 70-160 characters - ✅ Ensure link text uses title case
- ✅ Confirm page is added to
nav.adocif new
The CircleCI docs use Antora's component-based architecture:
When to use each component:
- Root: Landing page and site home
- Guides: Tutorial and how-to content for end users
- Reference: Technical reference material (config, API, CLI)
- Orbs: Orb-related documentation
- Server Admin: Self-hosted server docs (versioned by release)
- Services: Field engineering service docs
- Contributors: Documentation for contributors including the style guide and page templates
Each component follows this structure:
docs/component-name/
├── antora.yml # Component metadata
└── modules/
└── ROOT/
├── nav.adoc # Navigation structure
└── pages/ # AsciiDoc content
Navigation uses AsciiDoc list syntax:
* Top Level Category
** xref:getting-started:first-steps.adoc[Page Title]
** Subcategory
*** xref:getting-started:tutorial.adoc[Tutorial]Rules:
- Every page should appear in navigation
- Use
xref:for internal cross-references - Format:
xref:module:filename.adoc[Link Text]
Full coordinate system:
xref:component:module:filename.adoc[Link Text]Examples:
xref:guides:getting-started:first-steps.adoc[First Steps]
xref:reference:configuration-reference.adoc[Config Reference]npm run start:devOpens http://localhost:5000 with live reload
npm run build:docs # Full site build
npm run build:ui # UI bundle only
npm run build:api-docs # API docs only- Choose the appropriate page template from
docs/contributors/modules/templates/pages/:template-how-to.adoc- For task-oriented guides showing how to accomplish a specific goaltemplate-conceptual.adoc- For explanatory content about features or conceptstemplate-tutorial.adoc- For learning-oriented, step-by-step tutorials
- Create
.adocfile in appropriatepages/directory - Add required page attributes at the top of the file (see Page Attributes section below)
- Write content following the template structure and style guide
- Add entry to
nav.adoc - Preview locally
- Commit both files
Note on templates: For very short, simple pages (like toggling a single setting), you can use a simplified structure rather than the full template format. Use your judgment based on content complexity.
All documentation pages must include attributes at the top of the file, before the main content. These attributes provide metadata and enable certain AsciiDoc features.
Required attributes:
= Page Title
:page-platform: Cloud, Server v4+
:page-description: A brief description for SEO and metadata (70-160 characters)
:experimental:Attribute descriptions:
-
:page-platform:- Indicates which CircleCI platforms support the feature. Displays as badges under the page title.- Options:
Cloud,Server v4+,Server v3, or combinations likeCloud, Server v4+ - If feature is Cloud-only, use
:page-platform: Cloud - If feature is available on all platforms, use
:page-platform: Cloud, Server v4+
- Options:
-
:page-description:- Used for SEO meta descriptions and page previews- Must be between 70-160 characters (Vale enforced)
- Write a clear, concise summary of what the page covers
- Use active voice
-
:experimental:- Enables experimental AsciiDoc macros- Required for UI macros like
btn:[Button Text],menu:,kbd: - Include this attribute on all pages as it's commonly needed
- Required for UI macros like
How to determine attribute values:
To find examples of proper attribute usage, check existing pages in the same module:
# View attributes from similar pages
head -10 docs/guides/modules/toolkit/pages/existing-page.adoc"Unlisted page" errors: Page not in nav.adoc - add to navigation
"Unresolved page ID" errors: Check xref coordinates and file exists
Navigation not updating: Restart dev server after nav.adoc changes
- Follow these guidelines for new content
- When touching existing sections, update them to meet current standards
- Help maintain consistency across the documentation