Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Documentation Contributor Guide

This guide establishes conventions for writing and maintaining Artisan framework documentation. All contributors (human and AI) should follow these rules to keep docs consistent, well-organized, and domain-agnostic.


Documentation structure (Diataxis)

Artisan docs follow the Diataxis framework, which organizes documentation into four quadrants based on two axes: the reader’s mode (learning vs. working) and the content’s orientation (practical vs. theoretical).

Learning (acquiring)Working (applying)
Practical (doing)TutorialsHow-to Guides
Theoretical (thinking)ConceptsReference

Rationale

Implications


Diataxis boundary rules

QuadrantPurposeFormatConstraintsReader mindset
TutorialsLearning by doingSelf-contained, step-by-step. Notebooks only.No API signatures, no architectural rationale.“I’m new, teach me.”
How-to GuidesTask-oriented recipesPrerequisites/Verify sections. Structured steps.Assumes competence. Links to concepts for background.“I need to accomplish X.”
ConceptsExplanations of why“Why This Exists” opener. Decision/Rationale/Implications format.No API signatures. No step-by-step instructions.“I want to understand.”
ReferenceFactual descriptionsTables, signatures, enum values. “See Also” footer.No prose rationale. No narrative or teaching.“I need the exact API.”

Cross-quadrant linking pattern

Every page must link to related pages in other quadrants.

Source quadrantMust link to
Concepts1-2 tutorials + the relevant reference page
How-to GuidesPrerequisite concepts page(s) + the relevant reference page
ReferenceCorresponding concepts page + relevant how-to guide(s)
TutorialsConcepts page for deeper understanding + how-to for techniques

When adding a new page, check that the linked pages also link back.


Writing tone

Respect the reader’s time and intelligence. Write as a knowledgeable colleague explaining something at a whiteboard -- not a legal contract, not a blog post.

Be direct. Use active voice. Address the reader as “you.” Get to the point.

Be confident but honest. State things plainly. When something is a limitation or rough edge, say so.

Be warm without being chatty. A brief orienting sentence is welcoming. Excessive enthusiasm wastes the reader’s time.

Be task-oriented. Structure around what the reader is trying to do, not what the software can do.

Be consistent in terminology. Pick a term and stick with it. If you call it a “workspace” in one paragraph, do not call it a “project” in the next. Use the terms defined in the Glossary.

Layer detail progressively. Lead with the most common case, then explain options, then cover edge cases. A reader who needs the quick answer gets it in 10 seconds; someone with a complex scenario keeps reading.

Be economical. Short sentences. Use “use” not “utilize,” “start” not “initialize” (unless “initialize” is the actual API term). Cut filler: “in order to,” “it should be noted that,” “as a matter of fact.”

Be neutral about skill level. Never write “simply,” “just,” or “easily.” Give clear instructions and let the reader judge difficulty.


File and format conventions

Markup

All docs use MyST Markdown (Jupyter Book 2). Use MyST directives, not RST.

File formats

QuadrantFormatExtension
TutorialsJupyter notebooks.ipynb
How-to GuidesMarkdown.md
ConceptsMarkdown.md
ReferenceMarkdown.md
ContributingMarkdown.md
Getting StartedMarkdown.md

Directory layout

New pages go in the directory that matches their Diataxis quadrant:

docs/
├── getting-started/         # Installation and orientation
├── tutorials/               # Jupyter notebooks (.ipynb)
│   ├── getting-started/     # First steps
│   ├── pipeline-design/     # Topology patterns
│   ├── execution/           # Caching, batching, error handling, overrides
│   ├── analysis/            # Provenance, filtering, timing
│   └── writing-operations/  # Building custom operations and composites
├── concepts/                # Explanations of design and architecture
├── how-to-guides/           # Task-oriented recipes
├── reference/               # API signatures, glossary, comparisons
└── contributing/            # Project conventions (this page)

File naming

Headings

Section separators

Use --- horizontal rules between major sections. This matches the convention across all existing pages.


Registering new pages

Every new page must be added to the table of contents in docs/myst.yml.

Find the appropriate section under project.toc and add a file: entry. For example, to add a new concepts page:

# In docs/myst.yml, under project.toc
- title: Concepts
  children:
    - file: concepts/index.md
    - title: System Architecture
      children:
        - file: concepts/architecture-overview.md
        - file: concepts/operations-model.md
        - file: concepts/my-new-concept.md  # <-- add here

Tutorials within a sub-section are ordered by their numeric prefix. Place the new entry in the position that matches its prefix number.

A page that exists on disk but is not listed in myst.yml will not appear in the built site.


MyST Markdown conventions

Use standard Markdown links with relative paths:

[Operations Model](../concepts/operations-model.md)
[First Pipeline tutorial](../tutorials/getting-started/01-first-pipeline.ipynb)

Link to a specific heading by appending #anchor:

[Five layers](../concepts/architecture-overview.md#five-layers)

Label targets

Use MyST label targets for anchors that other pages reference (especially in the glossary):

(glossary-artifact)=
## Artifact

An immutable, content-addressed data node...

Directives

Use colon-fence syntax for MyST directives:

::::{note}
This is important context the reader should know.
::::

::::{tip} Optional title
Helpful but non-essential information.
::::

For grid layouts (used on landing pages):

::::{grid} 2
:::{grid-item-card} Card Title
:link: path/to/page.md

Card description.
:::
::::

Include directives

Pull in external content with the include directive:

```{include} ../README.md
```

Code examples in documentation

Code blocks in docs must be syntactically correct and use the current API. Import from the correct package (artisan for the framework).

When referencing source files, use the path from the project root:

**Source:** `src/artisan/schemas/artifact/base.py`

Domain decontamination

Artisan is a domain-agnostic framework. All documentation must use generic examples that do not reference any specific scientific domain, tool, or dataset.

What to avoid:

What to use instead:

If a concept requires a concrete example to be understandable, use a self-contained scenario that any reader can follow regardless of their domain.


Building and previewing docs

Build the documentation site locally to verify your changes render correctly:

pixi run -e docs docs-build     # Build HTML site
pixi run -e docs docs-serve     # Serve at http://localhost:8000
pixi run -e docs docs-clean     # Remove build artifacts

The build output goes to docs/_build/html/. Check for:


Templates

Tutorial

All tutorials are Jupyter notebooks. Follow this cell structure:

# Cell 1 (markdown)

# Title

## What you'll learn
- Bullet 1
- Bullet 2
- Bullet 3

**Prerequisites:** [links]
**Estimated time:** X minutes
# Cell 2+ (alternating markdown -> code)
# Narrative explains *what* and *why* before each code cell.
# Code cells are short, focused, and produce visible output.
# Final cell (markdown)

## Summary
Recap of what was covered.

## Next steps
- [Tutorial name](link) -- what it covers
- [Concept name](link) -- deeper understanding
- [How-to name](link) -- related task

Guidelines:


How-to guide

# Title (verb phrase)

One-line description of what the reader will accomplish.

**Prerequisites:** [links]

---

## Minimal working example

Complete, copy-pasteable code block that works end-to-end.

---

## Step 1: ...

Code block + brief explanation.

## Step 2: ...

...

---

## Common patterns

Named patterns with small code blocks (if applicable).

---

## Common pitfalls

| Problem | Cause | Fix |
|---------|-------|-----|
| ...     | ...   | ... |

---

## Verify

How to confirm success (expected output, a test to run, a state to check).

---

## Cross-references

- [Reference page](link) -- full API
- [Concepts page](link) -- design rationale
- [Related how-to](link) -- related task

Guidelines:


Concepts page

# Title (noun phrase)

Opening paragraph: state *why* this concept matters and what understanding it
enables. Frame around the reader's needs, not the software's features.

One-line summary restating the scope.

---

## Section heading (sentence case)

Explain the design decision or architectural concept. Use the pattern:

1. **What** the mechanism/pattern is (brief)
2. **Why** it exists (the problem it solves or the trade-off it makes)
3. **Implications** for the reader (what this means in practice)

Use comparison tables for contrasting two approaches:

| Aspect   | Approach A | Approach B |
|----------|------------|------------|
| Purpose  | ...        | ...        |
| Trade-off| ...        | ...        |

Use ASCII diagrams for flows or relationships:

    +-----------+     +-----------+
    |  Phase 1  | --> |  Phase 2  |
    +-----------+     +-----------+

---

## Key design decisions (optional)

Summarize the most important decisions as a table or bulleted list when
the page covers multiple related choices.

| Decision | Rationale |
|----------|-----------|
| ...      | ...       |

---

## Cross-references

- [Reference page](link) -- field tables and API signatures
- [Tutorial](link) -- see this concept in action
- [Related concept](link) -- complementary explanation

Guidelines:


Reference page

# Title Reference

One-line description of what this page covers.

**Source:** `src/artisan/path/to/module.py`

---

## Section name

Brief (1-2 sentence) description of this component.

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| ...   | ...  | ...     | ...         |

### Methods (if applicable)

    def method_name(self, param: Type) -> ReturnType

One-line description. No rationale or narrative.

---

## Another section

...

---

## Skeleton examples

Minimal, copy-pasteable code showing correct usage. Place at the bottom,
not woven into field tables.

    class Example(BaseClass):
        ...

---

## See also

- [Concepts page](link) -- design rationale
- [How-to guide](link) -- step-by-step usage
- [Related reference](link) -- complementary API

Guidelines:


Pre-submission checklist

Before finishing a documentation change, verify:


Cross-references