This page is an example of a project writing guide. The rules below are the house style for Shoalrun's own documentation site, and authors and agents use them through project instructions. Shoalrun doesn't automatically apply these rules to other projects.
Adapt this example
Save your team's writing guide in the project and give your agent its path in project instructions. Include reviewed examples appropriate to the page type. Configure your own Vale rules for automated checks. Design a writing guide explains how to choose useful rules and examples.
Example audience and scope
Write for someone trying to understand or complete a task in Shoalrun. Assume they can edit a text file; introduce framework-specific concepts before relying on them. State prerequisites when a task needs terminal, Git, API, or deployment knowledge.
Page purpose and structure
Choose the page type by the reader's goal and the actual content. Keep one primary purpose per page. Split substantial conceptual discussion from a procedure and connect the pages with related reading.
| Page type | Reader goal | Useful structure |
|---|---|---|
| Tutorial | Learn through a guided exercise. | Outcome, prerequisites, one reliable path with sample values, visible results, and a final check. Explain only what the exercise needs; link to deeper discussion. |
| How-to | Complete a specific task. | Starting state, necessary prerequisites, actions in execution order, success check, and likely failures. Put decisions before the steps they affect. |
| Reference | Look up an exact fact. | When the feature applies, syntax or fields, defaults, constraints, examples, and errors. Organize facts for lookup. |
| Explanation | Understand a concept or design. | The question being explained, definitions, a concrete example, reasons and tradeoffs, and links to practical tasks. |
| Ingredient | Reuse one task step in several recipes. | Required inputs and prerequisites, one action with its instructions, named outputs, and an observable check. Keep the step independent of any recipe's position or neighboring wording. |
| Recipe | Complete one task from a known starting state. | Outcome, prerequisites, ordered actions, failure guidance, and a final success check. Include everything needed to follow the published page on its own. |
| Cookbook | Choose between complete recipes. | Explain who each path is for, what it needs, and what it produces; link to the published recipe pages. State whether choices are alternatives or can be combined. |
| Changelog entry | Understand a dated change. | A short capability summary, links to the feature guides, and required upgrade or migration actions. Claim a release only with release evidence. |
Use Before you begin, Check the result, and Next steps for recurring task sections when revising a procedure. Keep action headings specific to the task. Existing tutorials can retain established headings when tools or incoming fragments depend on them. A short procedure may put prerequisites in its introduction; omit sections that add no useful information.
Component references use Syntax, Attributes, and HTML, Markdown, and agents for predictable lookup. Document required values, defaults, accepted types, and constraints in Attributes; say when a component takes no attributes. Keep feature-specific examples and errors under descriptive headings. Fenced-code options and configured site features can use their own precise labels. Preserve old fragment IDs when changing a heading.
Use Next steps to continue a task and Related reading for supporting reference or explanation. Describe why to follow each link. Keep demo headings separate from the page's instructional outline where possible.
Run customer commands from a project with the pinned npm package installed, using npx --no-install shoalrun. Label contributor-only paths and repository scripts explicitly. Don't assume the quickstart compiled a framework checkout. Recipes maintained through composition must declare every required artifact, including a current build before an export.
These are editorial shapes, not a reason to add empty boilerplate. Follow the template rules and adapt the outline to the reader's need. Headings in a page body start at level two because the renderer supplies the title. Don't add step numbers to authored headings. For a procedure with titled steps, use the Steps component; it supplies the numbering in HTML and Markdown.
Release notes
Keep release notes short and factual. Name what readers can do, link each feature heading to its guide, and state the exact upgrade or rebuild action. Prefer a brief paragraph per feature; leave configuration examples and detailed behavior in the linked documentation.
Include before/after explanations only when readers upgrading from a published release need them. Omit development history, discarded designs, implementation walkthroughs, test counts, and generic recaps. Expand when a migration or security action needs explanation. Release-note summaries link to feature guides for HTML, Markdown, and agent details instead of repeating those sections.
Voice and explanations
Use natural contractions such as “don't,” “can't,” “it's,” and “you're.” Keep expanded forms when emphasis or clarity needs them. Preserve exact commands, configuration values, API fields, error messages, and quotations. Vale's Shoalrun.Contractions rule flags common expanded forms for review; contractions themselves are accepted.
Address the reader as “you.” Use active voice and concrete verbs. Start a paragraph with its main point, then supply the reason or example needed to understand it. Keep sentences short enough to follow without breaking every thought into a separate paragraph.
Name the action and its result. Replace claims such as “powerful,” “seamless,” and “easy” with behavior the reader can observe. Avoid inflated words, ceremonial introductions, repeated summaries, and invented terminology.
| Before | Better | Reason |
|---|---|---|
Utilize the configuration to leverage publication capabilities. |
“Set the channel and version in the page's frontmatter.” | Names the fields and action. |
It is important to note that a Markdown twin is generated. |
“The build creates a Markdown copy of each published page.” | Identifies the actor and defines the result. |
| “Run CI to validate it.” | “Run the project's automated checks. Continuous integration (CI) runs those checks when code changes.” | Explains the acronym and mechanism. |
| “Hybrid improves relevance.” | “Hybrid search combines word matching and vector rankings. Whether it helps depends on the queries and ranking settings.” | Defines the term and limits the claim. |
Define an unfamiliar term at its first useful appearance, even when the glossary also defines it. Explain acronyms before using them repeatedly. Prefer one small example to a chain of new terms. Preserve exact command, field, model, and component names in code formatting.
Procedures and examples
Show the starting directory, required inputs, and expected result when a command depends on them. Say which values readers must replace. Keep commands supported by source or verified behavior; don't invent flags to make an example look complete.
Give each procedure step one purpose. Put the explanation beside the action it supports. Include a check that readers can perform and describe what success looks like. Troubleshooting should identify a symptom, likely cause, and concrete next action.
Examples demonstrate the feature under discussion. Use the smallest example that still shows the important behavior. Preserve required fields, defaults, constraints, and meaningful errors during a rewrite. An example copied from a different page isn't evidence that it applies to this task.
Ingredients, recipes, and cookbooks
Use a recipe for a task that should participate in the recipe and cookbook features. A recipe can be authored directly; ingredients and a composition spec are optional. Use ingredients when multiple recipes share instructions you want to maintain once. Use a cookbook when readers need help choosing a complete path. See how these page types fit together.
For an ingredient, name what must already be available and what success makes available to the next step. When using workflow metadata, keep inputs and outputs consistent across the recipe and include the required check. State a check the reader can perform, such as “the build reports success and both output files exist,” rather than “make sure it works.” Metadata declares handoffs; it doesn't run commands or verify their results. Keep essential instructions in the body.
For a recipe, choose the order deliberately and explain how to recover from a failed step. The published recipe must contain the complete instructions; readers shouldn't need to assemble ingredients themselves. Review assembled drafts before publication. Don't describe passing assembly checks as proof that the procedure succeeds. Compose and maintain recipes explains the authoring workflow.
For a cookbook, describe each choice's starting state and outcome. Use single selection for alternative or overlapping paths, such as build versus build-and-audit. Offer multiple selection only when the recipes make sense together. A chooser displays published recipes; it doesn't deduplicate their steps, connect dependencies, or execute them. If a combined task needs shared setup and explicit handoffs, write one complete recipe for it. Configure a cookbook explains the options.
Check each ingredient's instructions and each recipe's full outcome. Inspect the cookbook's HTML choices and Markdown recipe links. Keep prerequisites, failure guidance, and success checks readable in both formats.
Choose components by reader need
Choose the structure that helps readers use the information or complete the task.
| Need | Choice |
|---|---|
| A short ordered sequence without titled steps | An ordinary Markdown numbered list. |
| A procedure with a title and supporting content for each step | Steps. |
| Code that changes across steps with synchronized explanations | Walkthrough. |
| A prerequisite, caution, or consequence that needs emphasis | Callout, with a specific label. |
| Parallel facts such as fields, defaults, or alternatives | A table with concise cells. |
| A choice between complete task paths | CookbookChooser, or recipe cards for a simple directory. |
| Recommended next pages | Related reading, backed by configured relationships. |
Introduce every table with a sentence explaining what readers should use it for. Never place a table directly after a heading. The formatting check enforces this rule with DocShape.TableIntroduction.
Don't hide an essential instruction inside decoration. Component references and guides that explain a presentation feature need an HTML, Markdown, and agents section, or an existing clearly named equivalent. Explain what HTML shows or lets readers do, what Markdown retains or omits, and how an agent gets the information needed for the task. Include limitations and keyboard or JavaScript behavior when relevant. Check both rendered outputs.
A page that merely uses a callout, link, or Steps component needs the section only when that use changes access to information. Avoid generic claims that both formats are identical: explain the actual representation. Cookbook pages must distinguish their recipe links from the complete instructions in the linked recipes or a downloaded selection.
Feature availability
Use page frontmatter availability for a feature's overall version support. HTML uses the same quiet text style as changelog release versions, beside the page dates. Markdown keeps readable availability labels, and documents.json retains the authored metadata.
availability:
since: 0.1.0-alpha.18
Use through for the last supported version, or combine since and through for a range. Both boundaries are inclusive. These are authored version labels: they don't hide a page, select a publication, or compare versions automatically. Omit a boundary when it's unknown.
If only an option or behavior is newer, put a badge beside that option or behavior:
<Badge variant="neutral">Since 0.1.0-alpha.18</Badge>
Keep the availability of the whole feature separate from newer additions. Don't assign the newest option's version to an older guide. Add a prerequisite to a how-to when readers need that version to complete the task.
Use the release record or approved release plan as evidence. Never infer the next release number, use latest, or publish a placeholder. For coordinated package and documentation releases, add the assigned version before publication. Leave it out while the release number is undecided; track that work in release preparation.
Keep the original availability version when editing the page. Don't change it to the current release. Link to release notes when readers need migration details, and name the package if the page covers more than one product.
Frontmatter availability describes feature support. The version field selects a documentation edition, releaseVersion identifies a changelog release, and subjectLifecycle describes feature status.
Evidence and uncertainty
Distinguish implemented behavior, measured observations, and planned work. State a benchmark's inputs and scoring rule before drawing conclusions. A result from one task or model doesn't establish general reliability.
When evidence doesn't specify a fact, say what is missing. An undocumented policy isn't proof that no policy exists. Keep a visible TODO in an unpublished draft and record the missing fact for review. Don't remove uncertainty just to clear a style check. Resolve it with evidence before publication.
Preserve stable IDs, routes, publication metadata, and access policy during a prose edit. Use stable document links. Set the edit date without changing an entry's original change date. Report changes to identity, scope, or technical claims explicitly for review.
Reviewed writing examples
These pages illustrate specific editorial choices. Copy their approach, then verify the facts for the page being written.
| Example | What to learn from it |
|---|---|
| Getting started | One guided exercise, explicit prerequisites, working-directory context, and observable preview results. |
| Add a page | A practical starting state, actions in order, and checks before publication. |
| Steps reference | Syntax beside live examples, exact attributes and defaults, and complete output behavior. |
| Agent-friendly documentation | Definitions, reasons for the design, concrete discovery paths, and limits. Match its reasoning rather than its length. |
| Build-site ingredient | Named inputs and outputs, a focused action, and an observable handoff check. |
| Build-and-audit recipe | Complete ordered instructions with prerequisites and a final task outcome. |
| Site workflows cookbook | Clear choices between overlapping complete paths and links to their recipes. |
| Agent authoring, search, and documentation answers | Reader-visible behavior, precise scope, and an explicit private-prototype qualification. |
Review a draft
Check purpose, organization, definitions, factual support, examples, and the success check. Compare technical details with the original source. Run the compiler and Vale, then inspect HTML and Markdown. This site's Vale configuration enables Voices, Direct, and Shoalrun; those rules catch detectable wording and structure problems. Passing them doesn't establish factual accuracy or usefulness.
Give your agent this guide and an example appropriate to the page's purpose. Examples guide structure and tone; verify technical claims against the relevant sources.