|
| 1 | +# Documentation editorial guide |
| 2 | + |
| 3 | +Use this guide with [Sim's product language](../../.claude/rules/constitution.md). Documentation explains how the current product works. Each page should help a reader complete a task, understand a decision, or look up a contract. |
| 4 | + |
| 5 | +## Voice and terminology |
| 6 | + |
| 7 | +- Lead with one or two sentences explaining the task or behavior. Use active voice, short sentences, concrete examples, and imperative steps. |
| 8 | +- Remove promotional adjectives, repeated introductions, generic benefits, and unsupported guarantees. Prefer “Deploy the workflow” to “Unlock the power of automation.” |
| 9 | +- Name the actor when access matters: member, workspace Admin, organization owner, personal API-key caller, or workspace API key. A workspace role, OAuth scope, resource grant, and permission-group restriction are different controls. |
| 10 | +- Use **Sim** for the conversational agent, **Chat** for its surface, and **workflow builder** for the visual editor. Workflow terminology is appropriate when documenting the Workflows module. Preserve literal command names, protocol identifiers, environment keys, and compatibility fields. |
| 11 | +- Use sentence case for titles, descriptions, headings, navigation labels, and API summaries. Preserve product names and acronyms such as API, MCP, OAuth, and SSO. Define unfamiliar terms on introductory pages. |
| 12 | +- Match visible UI labels exactly and format them in **bold**. Format commands, paths, fields, statuses, and literal values as `code`. Keep code examples copyable. |
| 13 | +- Use KiB, MiB, and GiB for limits defined in powers of 1024. Identify whether a number is a default, a hard limit, a configurable setting, or an illustrative example. |
| 14 | + |
| 15 | +## Page organization |
| 16 | + |
| 17 | +Use the order appropriate to the page. These are ordering rules, not a requirement to add empty sections. |
| 18 | + |
| 19 | +| Page type | Order | |
| 20 | +| --- | --- | |
| 21 | +| Overview | Purpose → when to use it and supported capabilities → shortest path to use → important boundaries → related docs | |
| 22 | +| Task guide | Result → actual prerequisites → numbered steps with examples at the relevant step → verify the result → limits or troubleshooting → related docs | |
| 23 | +| Concept | Purpose or decision → behavior and example → boundaries and edge cases → related docs | |
| 24 | +| Block reference | Purpose → minimum working example → settings and inputs → outputs → behavior, limits, and errors → distinct additional examples → related docs | |
| 25 | +| Operator guide | Deployment scope → prerequisites → supported setup → verification → operational and security consequences → troubleshooting or reference → related docs | |
| 26 | +| Command or API reference | Purpose and access → invocation or request example → inputs and defaults → outputs and statuses → consequences, errors, and limits → related references | |
| 27 | + |
| 28 | +Group large references by resource and lifecycle. Keep comprehensive machine references when they serve a separate lookup purpose. Keep prerequisites before the action they govern and destructive consequences before the command or control that triggers them. |
| 29 | + |
| 30 | +Prefer concrete headings such as “Create a connection,” “Outputs,” or “Handle failed requests” over “Overview,” “Advanced features,” and “Best practices.” End onward navigation under **Related docs**, after substantive content. |
| 31 | + |
| 32 | +## Preserve useful information |
| 33 | + |
| 34 | +Shorten by removing repetition and organizing facts. There is no universal word limit. |
| 35 | + |
| 36 | +Keep exact syntax, required fields, permissions, defaults, unsupported cases, resource limits, billing behavior, security boundaries, failure effects, and recovery procedures. Distinguish Cloud from self-hosted deployments and billing-enabled behavior from billing-disabled behavior. Distinguish drafts from deployed versions and an accepted operation from completed background work. |
| 37 | + |
| 38 | +Verify claims against the current owning implementation and visible controls. Use current primary documentation for external services. A repository default does not prove the live hosted configuration. If sources disagree, qualify the statement and record the unresolved conflict in the audit rather than choosing an unsupported guarantee. |
| 39 | + |
| 40 | +Give repeated detail one canonical owner: |
| 41 | + |
| 42 | +| Detail | Canonical owner | |
| 43 | +| --- | --- | |
| 44 | +| Setup requirements and procedures | The relevant task or operator guide | |
| 45 | +| Feature behavior, outputs, and limits | The feature or block reference | |
| 46 | +| Roles, resource grants, and membership | Permissions and the specific resource guide | |
| 47 | +| Permission-group resolution | Enterprise permission groups | |
| 48 | +| Effective retention and cleanup | Enterprise data retention | |
| 49 | +| Credits, metering, and billing distinctions | Costs | |
| 50 | +| API authentication and envelopes | API getting started and authentication | |
| 51 | +| Streaming frames and protocol | Workflow streaming guide | |
| 52 | +| CLI options and command consequences | Generated command reference | |
| 53 | + |
| 54 | +A link replaces repeated detail only after the owner contains it. Keep a concise prerequisite or consequence at the point where the reader needs it. |
| 55 | + |
| 56 | +## Components and media |
| 57 | + |
| 58 | +- Fold useful FAQ answers into the section they explain. Keep a separate FAQ only for questions that cannot be organized coherently elsewhere. |
| 59 | +- Use a callout for a specific prerequisite or a non-obvious security, data-loss, or operational risk that deserves interruption. Use ordinary prose or a table for normal explanation. Keep important limits visible. |
| 60 | +- Use Markdown lists and tables for simple procedures and reference data. Use tabs for distinct configurations and Steps for substantial sequential procedures. |
| 61 | +- Match inline code to Sim Chat: normal-weight monospace text, tight padding, and the existing borderless filled surface tokens. Scope the treatment to prose code; preserve fenced examples, API route bars, schema controls, and selector labels. |
| 62 | +- Use shared `ChipSelect` controls for API response and request-example pickers, with accessible names that include the current value, checked radio semantics for single choices, and menus aligned to their triggers. Keep docs pickers nonmodal so they do not hide lazily hydrating siblings. Keep response headings free of inherited extra margins. Scope dependency filter styling to `data-object-search-input`, including schema popovers portaled to the body; focus stays inside the field, and touch fields retain the shared target and text sizes. |
| 63 | +- Import authored tabs from `@/components/ui/tabs`. Mixed panels retain a content inset; only a single code fence fills the frame. Keep long tab lists horizontally scrollable and long prose references wrapped. For bookmarked panels, use explicit native `TabsList`/`TabsTrigger` controls with `aria-controls` matching each panel ID; changing a panel ID alone leaves the generated control pointing at a nonexistent element. |
| 64 | +- Keep a screenshot when it locates a difficult control or shows a meaningful result. Keep a video when motion explains behavior that text or a static example cannot. Remove decorative, redundant, misleading, or non-rendering media. |
| 65 | +- Inspect media before describing it as stale. Uninspected remote media is unverified; it may still be removed when the written procedure fully covers its purpose. Do not fabricate replacement captures. |
| 66 | +- Remove imports, components, preview definitions, local styling, and assets made unused by an edit after checking all consumers, including integration pages. |
| 67 | + |
| 68 | +## Links and generated sources |
| 69 | + |
| 70 | +Preserve page paths and stable operation IDs. Before renaming a heading, check inbound links from all docs and application code. Preserve a referenced anchor with a custom heading ID such as `## New heading [#existing-anchor]`. Check links from integration pages even when their copy is outside the editing scope. |
| 71 | + |
| 72 | +Edit generated prose at its owner, then regenerate: |
| 73 | + |
| 74 | +| Output | Owner | Command from the repository root | |
| 75 | +| --- | --- | --- | |
| 76 | +| OpenAPI documents and operation pages | `apps/sim/lib/api/contracts/v2/**`, OpenAPI metadata, and `scripts/openapi/generator.ts` | `bun run generate:openapi` | |
| 77 | +| CLI API inputs | Generated OpenAPI and CLI contract overrides | `bun run generate:cli-api` | |
| 78 | +| CLI reference pages and navigation | Command tree, CLI metadata, and `scripts/generate-cli-docs.ts` | `bun run generate:cli-docs` | |
| 79 | +| MCP operation catalog | Authorized operation definitions and generated OpenAPI | `bun run generate:mcp-operations` | |
| 80 | +| v2 route table | Canonical route definitions | `bun run generate:v2-route-table` | |
| 81 | +| Marked Agent streaming table | Streaming protocol metadata and `scripts/sync-agent-stream-docs.ts` | `bun run generate:agent-stream-docs` | |
| 82 | + |
| 83 | +Do not hand-edit generated pages, JSON specifications, or marked generated regions. Preserve all argument, option, schema, authentication, and confirmation detail. CLI descriptions also feed command discovery; run the existing search-ranking checks after changing help copy. Validate rendered request examples against their canonical input contracts; schema validity alone may still leave a semantic error such as an invalid serialized workflow. |
| 84 | + |
| 85 | +## Review checklist |
| 86 | + |
| 87 | +Read the complete page and its examples. Check every useful fact against the original before cutting or moving it. Confirm the opening, order, terminology, headings, and component choices follow this guide. Compile MDX, check internal links and anchors, regenerate affected references, and inspect representative rendered pages on desktop and a narrow viewport. Run the repository's required validation gates for source changes. |
0 commit comments