Ark Documentation
Guidance for structuring Ark documentation using Diataxis adapted for Ark's needs.
When to use this skill
- Creating new documentation
- Deciding where content belongs
- Reviewing documentation PRs
- Restructuring existing documentation
Ark's Diataxis structure
docs/content/
├── Introduction
├── Quickstart
├── Tutorials → Linear learning paths
├── How-to Guides → Task-oriented, by persona
├── Core Concepts → Understanding "why" and "how"
├── Reference → Factual lookup material
├── Marketplace → External link
└── Disclaimer
Terminology
| Diataxis |
Ark Term |
Why |
| Explanation |
Core Concepts |
More accessible |
The four quadrants
1. Tutorials (learning-oriented)
Purpose: Hands-on lessons for newcomers.
Characteristics:
- Linear, numbered paths (1, 2, 3...)
- Single prescribed path - no choices
- Frequent visible results
- Ends with "Next step" → How-to Guides
Writing style:
- Use "we" language
- Don't explain - link to Core Concepts
Content belongs here if:
- It teaches a skill through doing
- Reader is studying, not working
- Success requires following steps in order
Examples: Quickstart, Running the Dashboard, Starting a New Project, Complete Worked Example
2. How-to guides (task-oriented)
Purpose: Help competent users complete specific tasks.
Organized by persona:
Build with Ark (application developers)
- Configure models, create agents, coordinate teams, run queries, add tools.
Extend Ark (contributors)
- Build services locally, implement APIs, build A2A servers, add tests.
Operate Ark (operators / SRE / security)
- Platform operations: Provisioning, deploying
- CI/CD and supply chain: Build pipelines
- Security & assurance: Pen testing, code analysis
Writing style:
- Goal-oriented: "If you want X, do Y"
- Assumes competence
- Don't teach - link to Tutorials or Core Concepts
Content belongs here if:
- Reader has a specific task to complete
- Reader is working, not studying
3. Core concepts (understanding-oriented)
Purpose: Explain what Ark is, how it's designed, and why.
Topics:
- What Ark is and how it works.
- Design effective agentic systems.
- Platform architecture concepts.
- Extensibility concepts.
- Security and identity concepts.
Writing style:
- Discursive: "The reason for X is..."
- Make connections between concepts
- Provide design decision context
Content belongs here if:
- It answers "why" or "how does this work"
- Reader is deciding how to design/extend/operate
- Content provides context, not procedures
4. Reference (information-oriented)
Purpose: Factual lookup material.
Organized by type:
- Interfaces: Ark API, Broker Service.
- Kubernetes API: CRDs, resources.
- System behavior: Query execution, relationships.
- Operations: Upgrading, troubleshooting.
- Project: Contributors.
Writing style:
- Austere, factual, neutral
- Structure mirrors product
- No instruction, explanation, or opinion
Content belongs here if:
- It describes what something IS
- Reader needs to look up specific details
- Content is consulted, not read cover-to-cover
Decision guide
Is the reader LEARNING or WORKING?
│
├─ LEARNING (studying)
│ ├─ Hands-on, step-by-step? → TUTORIALS
│ └─ Understanding concepts? → CORE CONCEPTS
│
└─ WORKING (applying)
├─ Completing a task? → HOW-TO GUIDES
└─ Looking up facts? → REFERENCE
Hub pages
Hub pages link to content without moving files:
tutorials.mdx - Lists tutorials in order.
how-to-guides.mdx - Groups by persona.
core-concepts.mdx - Groups by topic.
reference/index.mdx - Groups by type.
Hub pages should:
- Explain purpose in one sentence.
- Group links logically.
- Not duplicate content.
Personas
| Persona |
Sections |
| End users |
Quickstart, Tutorials |
| Agent builders |
Tutorials, How-to (Build) |
| Platform engineers |
How-to (Operate), Reference |
| Contributors |
How-to (Extend), Core Concepts |
Writing guidelines
Lexicon
- The product is written Ark — capital A, lowercase
rk. Never ARK. This matches the repo's CLAUDE.md and is enforced in review.
General style
- Be concise and direct.
- Use simple language.
- Keep descriptions to 1-2 sentences.
- Use active voice: "Creates agent" not "Agent is created".
- Write "Ark" not "ARK".
- Use US English.
- Use Oxford commas in lists.
Bullets
- Capitalize the first word and end with a period.
- Use numbered lists only for sequences of instructions or when referencing items later.
Capitalization
- Capitalize only proper nouns (product names, tools, services).
- Use sentence case for titles: "An introduction to data visualization" not "An Introduction to Data Visualization".
- Don't capitalize: cloud, internet, machine learning, advanced analytics.
Headings
- Avoid gerunds: "Get started" not "Getting started," "Customize a layout" not "Customizing a layout".
- Keep titles short and descriptive for search discoverability.
Instructions
- Use imperatives: "Complete the configuration steps".
- Don't use "please".
- Don't use passive tense: "Complete the steps" not "The steps should be completed".
Links
- Make hyperlinks descriptive:
Learn how to [contribute to Ark](url).
- Don't write:
To contribute, see [here](url).
Avoid
- Gerunds in headings.
- Colloquialisms (may not translate across regions/languages).
- Business speak: "leverage", "utilize", "facilitate".
What not to mix
| Don't put in... |
This content... |
| Tutorials |
Explanations, choices. |
| How-to guides |
Teaching, complete reference. |
| Core concepts |
Instructions, reference. |
| Reference |
Instructions, explanations. |
Reference page structure
CRD and service reference pages follow a consistent template. Use reference/resources/query.mdx, team.mdx, and tools.mdx as the models:
- Frontmatter —
title and a description of the form "<Kind> CRD reference — ...".
- Intro — one paragraph on what the resource is, linking the task-oriented user-guide walkthrough; state plainly that this page is the field-by-field reference.
## Spec — a single annotated YAML example, comments grouped Required / optional.
## Fields — a table with columns Field | Type | Required | Description, including enum values, defaults, and cross-field rules.
- Topic sections as warranted (strategies, parameters, auth, …).
## Status — a status YAML block, a ### Status fields table, a ### Phases table where a phase enum exists, and a ### Print columns line naming the columns kubectl get renders.
## Related — links to adjacent pages.
For an overview/index page, use one table listing every resource with its Kind and API version. Don't keep a second overlapping overview page — one topic, one page. The same applies to service APIs: one service, one reference page (Ark API, Broker Service), with the built-in OpenAPI/Swagger framed as the always-current source of truth.
Accuracy: verify against the source
Reference docs must be true to the code, not to intent or memory. Pages can read plausibly and still be wrong — this is the most common defect. Before writing or reviewing a reference page, verify every claim:
- Fields, enums, defaults — read the Go types in
ark/api/v1alpha1/*_types.go and the generated CRD in ark/config/crd/bases/. +kubebuilder:validation:Enum, +kubebuilder:default, and the json tags are authoritative — not the existing prose.
- Behavior and constraints — read the controller and webhooks (
ark/internal/controller/, ark/internal/validation/). Migration targets, same- vs cross-namespace resolution, and validation rules live here. Example: a deprecated graph team strategy migrates to sequential (edges discarded), not selector — confirmed in validation/defaults.go. Verify even when a reviewer asserts otherwise.
- Live cluster — where one is available, confirm with
kubectl explain, kubectl get <kind> (for the print columns), and real resource YAML. For a service API, hit the running service's /openapi.json and Swagger.
- Version and release claims — check the release tags, not the calendar.
git grep <pattern> <tag> shows when something changed; git merge-base --is-ancestor <commit> <tag> confirms what actually shipped. Don't label a section "Unreleased" or cite a version (e.g. there is no v0.2.0) without checking.
This session's rewrites found extensive fictional fields (spec.model, systemPrompt, spec.agents), non-existent CLI commands (ark check, ark describe; it's devspace run routes, not make routes), and wrong migration targets — all in pages that looked fine.
Build and preview before pushing
- Build with
cd docs && npm run build (Turbopack). The production build catches MDX and mermaid errors the dev server silently tolerates, and prints a page count on success. Never push a docs change without a clean build.
- Preview the rendered page (dev server + screenshot). Mermaid renders lazily — scroll to the diagram or render a tall enough viewport before capturing.
- Keep diagrams and prose complementary, not duplicated. When two pages cover related ground (e.g. Core Architecture and Query Execution Flow, or the Core Concepts and Core Architecture diagrams), cross-link and defer rather than repeat.
References
1---2name: ark-documentation3description: Guidance for structuring Ark documentation using the Diataxis framework. Use this skill when creating new docs, deciding where content belongs, reviewing documentation PRs, or restructuring existing documentation.4---56# Ark Documentation78Guidance for structuring Ark documentation using Diataxis adapted for Ark's needs.910## When to use this skill1112- Creating new documentation13- Deciding where content belongs14- Reviewing documentation PRs15- Restructuring existing documentation1617## Ark's Diataxis structure1819```20docs/content/21├── Introduction22├── Quickstart23├── Tutorials → Linear learning paths24├── How-to Guides → Task-oriented, by persona25├── Core Concepts → Understanding "why" and "how"26├── Reference → Factual lookup material27├── Marketplace → External link28└── Disclaimer29```3031### Terminology3233| Diataxis | Ark Term | Why |34|----------|----------|-----|35| Explanation | **Core Concepts** | More accessible |3637## The four quadrants3839### 1. Tutorials (learning-oriented)4041**Purpose**: Hands-on lessons for newcomers.4243**Characteristics**:44- Linear, numbered paths (1, 2, 3...)45- Single prescribed path - no choices46- Frequent visible results47- Ends with "Next step" → How-to Guides4849**Writing style**:50- Use "we" language51- Don't explain - link to Core Concepts5253**Content belongs here if**:54- It teaches a skill through doing55- Reader is studying, not working56- Success requires following steps in order5758**Examples**: Quickstart, Running the Dashboard, Starting a New Project, Complete Worked Example5960---6162### 2. How-to guides (task-oriented)6364**Purpose**: Help competent users complete specific tasks.6566**Organized by persona**:6768#### Build with Ark (application developers)69- Configure models, create agents, coordinate teams, run queries, add tools.7071#### Extend Ark (contributors)72- Build services locally, implement APIs, build A2A servers, add tests.7374#### Operate Ark (operators / SRE / security)75- **Platform operations**: Provisioning, deploying76- **CI/CD and supply chain**: Build pipelines77- **Security & assurance**: Pen testing, code analysis7879**Writing style**:80- Goal-oriented: "If you want X, do Y"81- Assumes competence82- Don't teach - link to Tutorials or Core Concepts8384**Content belongs here if**:85- Reader has a specific task to complete86- Reader is working, not studying8788---8990### 3. Core concepts (understanding-oriented)9192**Purpose**: Explain what Ark is, how it's designed, and why.9394**Topics**:95- What Ark is and how it works.96- Design effective agentic systems.97- Platform architecture concepts.98- Extensibility concepts.99- Security and identity concepts.100101**Writing style**:102- Discursive: "The reason for X is..."103- Make connections between concepts104- Provide design decision context105106**Content belongs here if**:107- It answers "why" or "how does this work"108- Reader is deciding how to design/extend/operate109- Content provides context, not procedures110111---112113### 4. Reference (information-oriented)114115**Purpose**: Factual lookup material.116117**Organized by type**:118- **Interfaces**: Ark API, Broker Service.119- **Kubernetes API**: CRDs, resources.120- **System behavior**: Query execution, relationships.121- **Operations**: Upgrading, troubleshooting.122- **Project**: Contributors.123124**Writing style**:125- Austere, factual, neutral126- Structure mirrors product127- No instruction, explanation, or opinion128129**Content belongs here if**:130- It describes what something IS131- Reader needs to look up specific details132- Content is consulted, not read cover-to-cover133134---135136## Decision guide137138```139Is the reader LEARNING or WORKING?140│141├─ LEARNING (studying)142│ ├─ Hands-on, step-by-step? → TUTORIALS143│ └─ Understanding concepts? → CORE CONCEPTS144│145└─ WORKING (applying)146 ├─ Completing a task? → HOW-TO GUIDES147 └─ Looking up facts? → REFERENCE148```149150## Hub pages151152Hub pages link to content without moving files:153154- `tutorials.mdx` - Lists tutorials in order.155- `how-to-guides.mdx` - Groups by persona.156- `core-concepts.mdx` - Groups by topic.157- `reference/index.mdx` - Groups by type.158159Hub pages should:160- Explain purpose in one sentence.161- Group links logically.162- Not duplicate content.163164## Personas165166| Persona | Sections |167|---------|----------|168| End users | Quickstart, Tutorials |169| Agent builders | Tutorials, How-to (Build) |170| Platform engineers | How-to (Operate), Reference |171| Contributors | How-to (Extend), Core Concepts |172173## Writing guidelines174175### Lexicon176- The product is written **Ark** — capital A, lowercase `rk`. Never `ARK`. This matches the repo's CLAUDE.md and is enforced in review.177178179### General style180- Be concise and direct.181- Use simple language.182- Keep descriptions to 1-2 sentences.183- Use active voice: "Creates agent" not "Agent is created".184- Write "Ark" not "ARK".185- Use US English.186- Use Oxford commas in lists.187188### Bullets189- Capitalize the first word and end with a period.190- Use numbered lists only for sequences of instructions or when referencing items later.191192### Capitalization193- Capitalize only proper nouns (product names, tools, services).194- Use sentence case for titles: "An introduction to data visualization" not "An Introduction to Data Visualization".195- Don't capitalize: cloud, internet, machine learning, advanced analytics.196197### Headings198- Avoid gerunds: "Get started" not "Getting started," "Customize a layout" not "Customizing a layout".199- Keep titles short and descriptive for search discoverability.200201### Instructions202- Use imperatives: "Complete the configuration steps".203- Don't use "please".204- Don't use passive tense: "Complete the steps" not "The steps should be completed".205206### Links207- Make hyperlinks descriptive: `Learn how to [contribute to Ark](url)`.208- Don't write: `To contribute, see [here](url)`.209210### Avoid211- Gerunds in headings.212- Colloquialisms (may not translate across regions/languages).213- Business speak: "leverage", "utilize", "facilitate".214215### What not to mix216217| Don't put in... | This content... |218|-----------------|-----------------|219| Tutorials | Explanations, choices. |220| How-to guides | Teaching, complete reference. |221| Core concepts | Instructions, reference. |222| Reference | Instructions, explanations. |223224## Reference page structure225226CRD and service reference pages follow a consistent template. Use `reference/resources/query.mdx`, `team.mdx`, and `tools.mdx` as the models:2272281. **Frontmatter** — `title` and a `description` of the form `"<Kind> CRD reference — ..."`.2292. **Intro** — one paragraph on what the resource is, linking the task-oriented user-guide walkthrough; state plainly that this page is the field-by-field reference.2303. **`## Spec`** — a single annotated YAML example, comments grouped Required / optional.2314. **`## Fields`** — a table with columns `Field | Type | Required | Description`, including enum values, defaults, and cross-field rules.2325. **Topic sections** as warranted (strategies, parameters, auth, …).2336. **`## Status`** — a status YAML block, a `### Status fields` table, a `### Phases` table where a phase enum exists, and a `### Print columns` line naming the columns `kubectl get` renders.2347. **`## Related`** — links to adjacent pages.235236For an overview/index page, use one table listing every resource with its `Kind` and API version. Don't keep a second overlapping overview page — one topic, one page. The same applies to service APIs: one service, one reference page (Ark API, Broker Service), with the built-in OpenAPI/Swagger framed as the always-current source of truth.237238## Accuracy: verify against the source239240Reference docs must be true to the code, not to intent or memory. Pages can read plausibly and still be wrong — this is the most common defect. Before writing or reviewing a reference page, verify every claim:241242- **Fields, enums, defaults** — read the Go types in `ark/api/v1alpha1/*_types.go` and the generated CRD in `ark/config/crd/bases/`. `+kubebuilder:validation:Enum`, `+kubebuilder:default`, and the json tags are authoritative — not the existing prose.243- **Behavior and constraints** — read the controller and webhooks (`ark/internal/controller/`, `ark/internal/validation/`). Migration targets, same- vs cross-namespace resolution, and validation rules live here. Example: a deprecated `graph` team strategy migrates to `sequential` (edges discarded), not `selector` — confirmed in `validation/defaults.go`. Verify even when a reviewer asserts otherwise.244- **Live cluster** — where one is available, confirm with `kubectl explain`, `kubectl get <kind>` (for the print columns), and real resource YAML. For a service API, hit the running service's `/openapi.json` and Swagger.245- **Version and release claims** — check the release tags, not the calendar. `git grep <pattern> <tag>` shows when something changed; `git merge-base --is-ancestor <commit> <tag>` confirms what actually shipped. Don't label a section "Unreleased" or cite a version (e.g. there is no `v0.2.0`) without checking.246247This session's rewrites found extensive fictional fields (`spec.model`, `systemPrompt`, `spec.agents`), non-existent CLI commands (`ark check`, `ark describe`; it's `devspace run routes`, not `make routes`), and wrong migration targets — all in pages that looked fine.248249## Build and preview before pushing250251- Build with `cd docs && npm run build` (Turbopack). The production build catches MDX and mermaid errors the dev server silently tolerates, and prints a page count on success. Never push a docs change without a clean build.252- Preview the rendered page (dev server + screenshot). Mermaid renders lazily — scroll to the diagram or render a tall enough viewport before capturing.253- Keep diagrams and prose **complementary, not duplicated**. When two pages cover related ground (e.g. Core Architecture and Query Execution Flow, or the Core Concepts and Core Architecture diagrams), cross-link and defer rather than repeat.254255## References256257- [Diataxis Framework](https://diataxis.fr/)258- [Issue #338](https://github.com/mckinsey/agents-at-scale-ark/issues/338)259- [PR #620](https://github.com/mckinsey/agents-at-scale-ark/pull/620)