@cratis/pi 3.1.0 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/agents/orchestrator.md +1 -1
- package/package/corpus/prompts/write-documentation.prompt.md +20 -11
- package/package/corpus/rules/documentation-structure-and-formatting.md +2 -2
- package/package/corpus/rules/documentation.md +14 -16
- package/package/corpus/rules/editing-cratis-docs.md +3 -0
- package/package/corpus/rules/pull-requests.md +1 -1
- package/package/corpus/rules/writing-cratis-docs.md +11 -10
- package/package/corpus/skills/cratis-documentation-writing/SKILL.md +64 -29
- package/package/corpus/skills/cratis-documentation-writing/references/cratis-site.md +82 -0
- package/package/corpus/skills/cratis-documentation-writing/verification.json +2 -1
- package/package/corpus/skills/cratis-engineering-docs-authoring/SKILL.md +3 -3
- package/package/corpus/skills/cratis-llm-friendly-documentation/SKILL.md +11 -0
- package/package/corpus/skills/cratis-release-notes/SKILL.md +17 -1
- package/package/corpus/skills/cratis-technical-examples/SKILL.md +19 -1
- package/package/profile-catalog.json +1 -0
- package/package.json +1 -1
|
@@ -115,7 +115,7 @@ When you receive a goal:
|
|
|
115
115
|
- [ ] [security-reviewer] Security review of all changed files
|
|
116
116
|
|
|
117
117
|
### Phase 5 — Documentation (if applicable)
|
|
118
|
-
- [ ] [
|
|
118
|
+
- [ ] [documentation] Document <feature/concept> in its authored source with cratis-documentation-writing (or cratis-engineering-docs-authoring) and cratis-technical-examples for code, when the repository's profiles install them; otherwise follow the repository's own documentation rules
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
---
|
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
---
|
|
2
2
|
agent: agent
|
|
3
|
-
description: "Write documentation
|
|
3
|
+
description: "Write reader-centered documentation using the Cratis documentation skills."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Write Documentation
|
|
7
7
|
|
|
8
|
-
Write documentation for a feature, component, or concept.
|
|
8
|
+
Write documentation for a feature, component, or concept. Follow
|
|
9
|
+
`.cratis/ai/rules/documentation.md` and invoke **cratis-documentation-writing**.
|
|
10
|
+
For a Cratis product page, also use **cratis-engineering-docs-authoring**;
|
|
11
|
+
for samples or snippets, use **cratis-technical-examples**.
|
|
9
12
|
|
|
10
|
-
##
|
|
13
|
+
## Determine the reader's job
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- The source files to document.
|
|
15
|
+
From the request and neighboring authored pages, identify the reader, the
|
|
16
|
+
question they have, the outcome they need, and the page's primary purpose:
|
|
17
|
+
tutorial, how-to, explanation, or reference. Ask only when plausible choices
|
|
18
|
+
would materially change the result; don't require an outline approval before
|
|
19
|
+
ordinary drafting. Find the owning source before editing, never a synced copy.
|
|
18
20
|
|
|
19
|
-
##
|
|
21
|
+
## Write and verify
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
Lead with the problem and payoff. Use active voice and show how the reader can
|
|
24
|
+
recognize success. A tutorial can briefly explain an observed result without
|
|
25
|
+
turning into a reference dump; link to deeper material. Verify framework APIs
|
|
26
|
+
against first-party source at the applicable version, check the sample at its
|
|
27
|
+
claimed scope, and run the owning repository's content and link gates. Add a
|
|
28
|
+
new page to the owning product's `toc.yml`
|
|
29
|
+
(a page missing from it silently drops out of the sidebar); otherwise update
|
|
30
|
+
navigation only when the page's placement or route changes.
|
|
@@ -24,7 +24,7 @@ sidebar:
|
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
- Product pages should declare `title` and `description`. The title becomes the page H1; the description feeds metadata and AI-facing exports.
|
|
27
|
-
- Preserve existing frontmatter when editing unless the task deliberately changes it. The converter preserves only `title`, `description`, `sidebar`, and `tableOfContents
|
|
27
|
+
- Preserve existing frontmatter when editing unless the task deliberately changes it. The converter preserves only `title`, `description`, `sidebar`, and `tableOfContents` from authored frontmatter; it drops DocFX keys and other Starlight keys. It generates `editUrl` separately from the owning product source path, so the page's edit action does not point to the synchronized copy. That link is the contribution path for a reader who is not set up locally: never hand-author `editUrl`, and after moving a page confirm its generated edit link still opens the file. Features such as `template`, `hero`, `banner`, `head`, `prev`, `next`, `slug`, and `draft` work only on site-level pages authored directly in the Documentation repository.
|
|
28
28
|
- Product navigation comes from `toc.yml`, not Starlight autogeneration. `sidebar.badge` works, but `sidebar.order`, `sidebar.label`, and `sidebar.hidden` do not control product navigation.
|
|
29
29
|
- A frontmatter-less page falls back to its first H1, but that loses the description and relies on converter inference. Do not add new pages that way.
|
|
30
30
|
|
|
@@ -50,7 +50,7 @@ sidebar:
|
|
|
50
50
|
Use the least powerful format that communicates the idea:
|
|
51
51
|
|
|
52
52
|
- Keep `.md` for headings, prose, links, GFM tables, fenced code, Mermaid/EventModeling diagrams, images, and Starlight aside directives.
|
|
53
|
-
- Use `.mdx` only when the page needs imported Astro components, expressions, props, or named slots.
|
|
53
|
+
- Use `.mdx` only when the page needs imported Astro components, expressions, props, or named slots. Every component costs machine readability: the Markdown mirror that assistants and "Copy Markdown" read keeps its imports and JSX. Spend that deliberately, where the component teaches better than plain Markdown.
|
|
54
54
|
- Imports and JSX in `.md` fail silently: the import can render as visible prose and the component as an inert element. Permissive Markdown HTML allowlists can hide this mistake. A page using a component must be `.mdx`.
|
|
55
55
|
- Do not rename a page to `.mdx` merely for a callout or diagram. Renames require checking `toc.yml`, inbound links, generated routes, and AI-facing Markdown output.
|
|
56
56
|
- Do not add raw HTML, inline styling, scripts, or one-off visual components to decorate a product page. Reuse an established component or make an explicit reusable site change in the Documentation repository.
|
|
@@ -12,9 +12,9 @@ Every page should answer: “If I were a developer encountering this concept for
|
|
|
12
12
|
|
|
13
13
|
The site is built with [Astro Starlight](https://starlight.astro.build/). Documentation lives in the `Documentation/` folder of each product repository as [GitHub Flavored Markdown](https://github.github.com/gfm/); a converter synchronizes product `.md`/`.mdx` into the Starlight site, and all repositories are aggregated into one published site. Readers experience it as a single place — write for that whole, not for one repository in isolation. For the authoritative rendering contract, see [Documentation Structure and Formatting](./documentation-structure-and-formatting.md).
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Give each page one primary reader purpose
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Use [Diátaxis](https://diataxis.fr/) as a compass: decide whether the reader is primarily learning, solving a task, looking up a contract, or understanding a concept. Brief context that helps someone complete a tutorial or how-to is welcome. Move an exhaustive lookup or a long conceptual detour to its own linked page; do not split a coherent reader task merely to keep categories pure.
|
|
18
18
|
|
|
19
19
|
| Type | The reader is… | Reads like | Rule |
|
|
20
20
|
|---|---|---|---|
|
|
@@ -31,9 +31,9 @@ For a reader-centered writing workflow, use the **cratis-documentation-writing**
|
|
|
31
31
|
|
|
32
32
|
Most readers decide whether to adopt Cratis in the first ten minutes. Protect that path.
|
|
33
33
|
|
|
34
|
-
- **One
|
|
34
|
+
- **One clear 'start here' entry per product**, not a menu of competing front doors. Let it direct readers to separate language or host procedures when those are genuinely different; do not force incompatible readers through one runnable recipe.
|
|
35
35
|
- Drive to a **visible payoff fast** — something running the reader can see. State it up front: “By the end you'll have X running.”
|
|
36
|
-
- **
|
|
36
|
+
- **Thread tutorials when the product warrants a multi-chapter journey.** Use one realistic domain across chapters, each adding one concept and visible result. A small tool may need only a short guided lesson; don't create filler chapters to satisfy a template.
|
|
37
37
|
- **One cross-product capstone tutorial** builds a real full-stack feature using the relevant Cratis products together. This is the connective tissue between products — keep it current and runnable.
|
|
38
38
|
|
|
39
39
|
## Connect the products
|
|
@@ -54,18 +54,18 @@ The project's voice is **direct, practical, and opinionated**. Write like an exp
|
|
|
54
54
|
- **Do not document the obvious.** If the API is self-explanatory, a complete code example is enough.
|
|
55
55
|
- Use headings, lists, tables, and code blocks — dense paragraphs lose readers.
|
|
56
56
|
- **Be honest about trade-offs.** A “when this is the wrong fit” section builds more trust than omitting the limits.
|
|
57
|
-
- Focus on public APIs and behavior
|
|
57
|
+
- Focus on public APIs and behavior. Explain internals only where they clarify a supported boundary or failure mode; link to third-party documentation rather than retelling it.
|
|
58
58
|
|
|
59
59
|
## Diagrams
|
|
60
60
|
|
|
61
|
-
- Use [Mermaid](https://mermaid-js.github.io/mermaid/#/)
|
|
61
|
+
- Use [Mermaid](https://mermaid-js.github.io/mermaid/#/) where a concept has structure that prose conveys poorly — architecture, event and command flow, state transitions, projection and reactor pipelines. Many strong pages carry their load in prose, real code, and real output instead; add a diagram because it explains something, not because the page type seems to require one.
|
|
62
62
|
|
|
63
63
|
## Code examples
|
|
64
64
|
|
|
65
65
|
- Prefer `record` types for events, commands, and read models — match the codebase.
|
|
66
66
|
- Use argument-free `[EventType]` for new events. A new generation or an explicit legacy identifier is valid only when documenting evolution of an existing stored-event contract.
|
|
67
|
-
-
|
|
68
|
-
- **Short illustrative snippets** may be purpose-built
|
|
67
|
+
- A standalone example must be **complete and correct** at its stated scope. Mark a partial excerpt as an excerpt, state its prerequisites, and never leave an essential step behind `// ...`. Do not offer an incomplete block as click-to-copy code.
|
|
68
|
+
- **Short illustrative snippets** may be purpose-built after checking their framework APIs against source. Derive substantial or runnable examples from compiled, tested sample or spec code; extract or check displayed snippets with the owning repository's tooling so they do not drift. Never substitute a bare “see the repository” link for showing the code.
|
|
69
69
|
- Where a feature spans products or languages, show both sides when both matter. Keep causal explanations sequential; use tabs only for alternatives.
|
|
70
70
|
|
|
71
71
|
## Links
|
|
@@ -73,15 +73,13 @@ The project's voice is **direct, practical, and opinionated**. Write like an exp
|
|
|
73
73
|
- **Link text must describe the destination.** Write `[Event types](...)`, never `[see documentation](...)`, `[here](...)`, or `[click here](...)`. Non-descriptive link text is a defect.
|
|
74
74
|
- Use relative links for internal product-source references. Verify every link resolves — broken links and links to non-existent folders fail review.
|
|
75
75
|
|
|
76
|
-
##
|
|
76
|
+
## Cover the reader's needs at the product's scale
|
|
77
77
|
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
- A **troubleshooting/FAQ** page.
|
|
84
|
-
- An **`llms.txt`** and **`llms-full.txt`** output so AI assistants can ground answers in the docs.
|
|
78
|
+
- Every navigable product needs an **index** that defines it and points to a first useful outcome.
|
|
79
|
+
- When a product has enough tutorials or how-to guides to warrant an index, list each by the **situation it solves**, with a one-line description (for example, "Dealing with concurrency" or "Multi-tenancy end to end"), not only by chapter number or API name. Don't add a landing page merely to satisfy this rule, or restructure navigation as a side effect of one page.
|
|
80
|
+
- Document the **diagnostic surface**: the CLI commands, MCP tools, and observable state that tell a reader why the product behaves as it does. A capability with no documented way to inspect it becomes a support request, and an AI assistant helping the reader cannot use it.
|
|
81
|
+
- Provide a **getting-started route**, exact reference, limitations, and recovery information where the product's complexity requires them. A small tool need not manufacture a multi-chapter tutorial, FAQ, glossary, or architecture diagram.
|
|
82
|
+
- Connect related products with links instead of duplicating the same explanation. Share task-area and product indexes through the site's AI-facing exports where useful; don't require a separate full-text download per product or claim that an export alone proves answer quality.
|
|
85
83
|
|
|
86
84
|
## File rules
|
|
87
85
|
|
|
@@ -43,10 +43,13 @@ From the owning repository:
|
|
|
43
43
|
|
|
44
44
|
The local gate validates authored content without requiring every sibling product. The full site check synchronizes every available product and can expose unrelated sibling or optional-tool failures; diagnose and report those separately. Report which checks actually ran when local prose, Markdown, or external-link tools skip because their executables are absent.
|
|
45
45
|
|
|
46
|
+
The published site builds when the Documentation repository's `main` changes and when a product repository dispatches `build-docs`. Product repositories such as Chronicle, Arc, and Components dispatch from a dedicated documentation workflow when `Documentation/**` changes on `main`, and also from their publish workflows. A merge is not proof the changed page is live: confirm that a site build containing it deployed before saying so. Because correcting a page is cheap, prefer a small accurate edit now over queuing a rewrite.
|
|
47
|
+
|
|
46
48
|
Restart `npm run dev` after a build/check. The build re-sync can degrade a running dev server, producing 500s or missing table rendering. If a change still appears stale, clear `web/.astro` and `web/node_modules/.astro`, restart, and recheck before blaming the source.
|
|
47
49
|
|
|
48
50
|
## Add, move, rename, or delete a page
|
|
49
51
|
|
|
52
|
+
- Adding a page inside the existing structure, with its `toc.yml` entry, is part of writing it. Adding a navigation bucket, reordering a product's navigation, or moving pages between products is a separate decision about the product's information architecture: make it when the request asks for it, not as a side effect of writing one page.
|
|
50
53
|
- Product navigation comes from its `toc.yml`; site-level navigation comes from `astro.config.mjs`.
|
|
51
54
|
- Product navigation buckets are defined per product in `PRODUCTS[].buckets`. Read the actual names and section lists before changing them.
|
|
52
55
|
- Keep exactly one landing for a route. A sibling `<folder>.md[x]` collides with `<folder>/index.md[x]`; a legacy `.md` collision can move the directory index to `/overview/`, while other duplicate landing shapes can fail the build.
|
|
@@ -13,7 +13,7 @@ PR descriptions serve two purposes: they help reviewers understand the change *n
|
|
|
13
13
|
- Follow the repository's pull request template (`.github/pull_request_template.md`).
|
|
14
14
|
- Focus on the **Added**, **Changed**, **Fixed**, **Removed**, **Security**, and **Deprecated** sections. Remove sections that are empty — don't leave blank headings.
|
|
15
15
|
- Each bullet should be short, self-contained, and release-note ready.
|
|
16
|
-
- **Write for users of the framework, not for internal developers.** Only include changes that have an impact on anyone using what we build — new APIs, changed behavior, fixed bugs, removed features. Do not list internal implementation details like storage changes, converter updates, gRPC contract internals, or spec additions. If a change is purely internal plumbing, it does not belong in the PR description.
|
|
16
|
+
- **Write for users of the framework, not for internal developers.** Only include changes that have an impact on anyone using what we build — new APIs, changed behavior, fixed bugs, removed features. Do not list internal implementation details like storage changes, converter updates, gRPC contract internals, or spec additions. If a change is purely internal plumbing, it does not belong in the PR description. For a user-visible fix, a brief root cause and what now prevents a regression, stated as observable behavior rather than a list of specs, are user-facing and may be included: they tell the upgrader whether to trust the fix. Credit an external contributor by name or handle, unless they asked not to be named.
|
|
17
17
|
- Add the associated issue reference at the end of a bullet when there is a real GitHub issue for the change (e.g. `(#351)`). Keep it a bare reference — **no closing keywords** (`Closes #351`, `Fixes #351`) anywhere in the body, because the published release notes are the PR description verbatim. If there is no associated issue, omit the reference entirely. Never use a placeholder like `(#issue)` or leave the example number `(#123)` literally, and never invent a random issue number. **Always verify the issue number read-only using the repository source — never guess or invent a number.** Comment on or close an issue when the user's request includes that effect; otherwise prepare a bounded post-merge disposition without performing it.
|
|
18
18
|
- Include a summary only if there is a cohesive theme across the changes. If you find yourself restating individual bullets in slightly different words, the summary adds no value — remove it.
|
|
19
19
|
- Never include Copilot prompt content in the PR description. Remove any "Original prompt" / coding agent transcript blocks before publishing.
|
|
@@ -16,7 +16,7 @@ The Cratis docs must **take the reader on a tour, like a teacher** — the way [
|
|
|
16
16
|
- **Active voice, present tense, second person.** “You append the event,” not “the event is appended.”
|
|
17
17
|
- **Be honest about limits.** A “when this is the wrong fit” section builds more trust than omitting the limits.
|
|
18
18
|
|
|
19
|
-
## One
|
|
19
|
+
## One primary purpose per page
|
|
20
20
|
|
|
21
21
|
| Type | Reader is… | Reads like |
|
|
22
22
|
|---|---|---|
|
|
@@ -25,7 +25,7 @@ The Cratis docs must **take the reader on a tour, like a teacher** — the way [
|
|
|
25
25
|
| **Explanation** | trying to understand | a discussion — concepts, trade-offs, *why*, a diagram |
|
|
26
26
|
| **Reference** | looking something up | a dictionary — exhaustive, terse, tables/signatures |
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Use the page's primary reader need to guide its structure, not to ban a brief prerequisite or explanation. A tutorial padded with a reference dump overwhelms; a how-to interrupted by a long conceptual detour stops being a recipe. Link out when the other material deserves sustained attention. Diátaxis does not imply a universal navigation bucket; bucket names are product-specific.
|
|
29
29
|
|
|
30
30
|
## The tour-voice checklist
|
|
31
31
|
|
|
@@ -33,13 +33,14 @@ Apply this checklist to tutorials, getting-started pages, and explanations:
|
|
|
33
33
|
|
|
34
34
|
1. **Open with a concrete scenario**, not a definition of the tool.
|
|
35
35
|
2. **Name the friction first**, then the feature as its relief.
|
|
36
|
-
3. **
|
|
37
|
-
4. **
|
|
38
|
-
5. **
|
|
39
|
-
6. **
|
|
40
|
-
7. **
|
|
41
|
-
8. **
|
|
42
|
-
9. **
|
|
36
|
+
3. **Make the first snippet the convention path.** Show the shape that works without registration or wiring a convention already handles (no manual `.AutoMap()`, no hand-registered handlers). A first example that configures what a convention does teaches the reader to distrust the convention.
|
|
37
|
+
4. **Use chronological verbs** such as define → append → project → query.
|
|
38
|
+
5. **After every code block, explain the invisible**: what happens under the hood and why it matters. Verify that explanation against the setup the reader actually built; a backend without Chronicle appends no events, so "the command appended an event" would be false there.
|
|
39
|
+
6. **Recap before pivoting** to the next concept.
|
|
40
|
+
7. **Anticipate a likely mistake** near the example it affects. Use a caution aside where the risk would otherwise be missed, such as a convention that fails silently (proxy generation, service lifetimes, AutoMap): show the working shape and a verified recovery path, and name affected versions only when the product source establishes them.
|
|
41
|
+
8. **Show the result** — output, a resulting model, or another visible success signal.
|
|
42
|
+
9. **Organize by workflow**, not alphabetically.
|
|
43
|
+
10. **End each substantial section with the natural next step** when one exists.
|
|
43
44
|
|
|
44
45
|
Read a current, well-reviewed tutorial in the product or a closely related product before writing; do not assume one product's domain vocabulary fits every other product.
|
|
45
46
|
|
|
@@ -57,7 +58,7 @@ The exact Markdown/MDX boundary, aside semantics, component contracts, import pa
|
|
|
57
58
|
|
|
58
59
|
- **Two voices per area:** the toured/educational layer and the terse, exhaustive reference. Narrative pages link *down* into the reference; the reference stays a dictionary.
|
|
59
60
|
- **Connect at the seams** rather than re-explaining. Show how neighboring products meet in the user's workflow and link to the glossary for shared terms.
|
|
60
|
-
- **Coming-from-X bridges** map new concepts to what the reader already knows without organizing the whole product around a competitor.
|
|
61
|
+
- **Coming-from-X bridges** map new concepts to what the reader already knows without organizing the whole product around a competitor. Give each the same shape: the reader's current code, the Cratis equivalent beside it, then a short "what changed and why" list. Write one page per source technology. Keep the other technology's code accurate at a named version, or label it illustrative; state the trade-offs fairly and say when the reader's current approach remains the better fit.
|
|
61
62
|
|
|
62
63
|
## Before you call a page done
|
|
63
64
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-documentation-writing
|
|
3
|
-
description: Plan, write, and improve user-centered Cratis documentation with a clear reader journey and one Diátaxis purpose per page. Use for product docs, tutorials, how-to guides, reference, explanations, and documentation reviews. For executable examples use cratis-technical-examples; for release notes use cratis-release-notes. Do not invent APIs or publish content.
|
|
3
|
+
description: Plan, write, and improve user-centered Cratis documentation with a clear reader journey and one primary Diátaxis purpose per page. Use for product docs, tutorials, how-to guides, reference, explanations, and documentation reviews. For executable examples use cratis-technical-examples; for release notes use cratis-release-notes. Do not invent APIs or publish content.
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,9 +8,10 @@ license: MIT
|
|
|
8
8
|
|
|
9
9
|
A developer arrives with a job to do, not with an interest in our repository
|
|
10
10
|
structure. Start from that job: what did they try, what stopped them, and what
|
|
11
|
-
would let them know they succeeded? Use [Diátaxis](https://diataxis.fr/)
|
|
12
|
-
each page
|
|
13
|
-
the owning repository governs page
|
|
11
|
+
would let them know they succeeded? Use [Diátaxis](https://diataxis.fr/)
|
|
12
|
+
as a compass for each page's primary purpose, not a purity test. This skill
|
|
13
|
+
governs content and reader journeys; the owning repository governs page
|
|
14
|
+
placement, navigation, and rendering.
|
|
14
15
|
|
|
15
16
|
## Classify before writing
|
|
16
17
|
|
|
@@ -28,9 +29,12 @@ Rules per type:
|
|
|
28
29
|
- **Tutorial** — lead a newcomer through one realistic, threaded outcome.
|
|
29
30
|
Each step has a visible result. Briefly explain the invisible effect of a
|
|
30
31
|
step, then link to an explanation for deeper theory; do not interrupt the
|
|
31
|
-
lesson with a reference dump. Show the smallest configuration that
|
|
32
|
-
before presenting options
|
|
33
|
-
|
|
32
|
+
lesson with a reference dump. Show the smallest *safe* configuration that
|
|
33
|
+
runs before presenting options: bind local services to loopback, label
|
|
34
|
+
development credentials as such, and put host and configuration
|
|
35
|
+
alternatives in linked how-to guides. Make the first snippet the convention
|
|
36
|
+
path, with no registration or wiring a convention already does, then name
|
|
37
|
+
what the framework did that the reader cannot see.
|
|
34
38
|
- **How-to guide** — assume competence. State the goal, list prerequisites,
|
|
35
39
|
give the steps, done. No teaching.
|
|
36
40
|
- **Reference** — exhaustive within its declared scope and terse. For each
|
|
@@ -40,8 +44,9 @@ Rules per type:
|
|
|
40
44
|
- **Explanation** — no steps. Discuss concepts, trade-offs, and design
|
|
41
45
|
decisions. Diagrams are welcome here.
|
|
42
46
|
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
A brief prerequisite or explanation may serve the main journey. If a reader
|
|
48
|
+
also needs an exhaustive lookup, link a reference page rather than burying it
|
|
49
|
+
in the lesson. Resolve routine audience or type choices from the request
|
|
45
50
|
and neighboring pages; ask only when the alternatives change the outcome.
|
|
46
51
|
|
|
47
52
|
## Work from the reader outward
|
|
@@ -52,13 +57,17 @@ and neighboring pages; ask only when the alternatives change the outcome.
|
|
|
52
57
|
2. Write the question they came with and the success signal in one sentence.
|
|
53
58
|
Draft a title and first paragraph that make the problem and payoff clear;
|
|
54
59
|
avoid opening with an abstract product definition or an internal type name.
|
|
55
|
-
3. Trace a short route from that page to one
|
|
56
|
-
targeted recipes, and exact reference.
|
|
57
|
-
|
|
58
|
-
should map familiar concepts to the new workflow,
|
|
60
|
+
3. Trace a short route from that page to one clear 'start here' entry,
|
|
61
|
+
targeted recipes, and exact reference. Give different languages or hosts
|
|
62
|
+
their own procedures when a shared path cannot be run as written. A
|
|
63
|
+
'coming from X' bridge should map familiar concepts to the new workflow,
|
|
64
|
+
not replace it.
|
|
59
65
|
4. Draft in workflow order. For a tutorial, use one working domain throughout,
|
|
60
66
|
show what to run and what appears, and recap before adding another concept.
|
|
61
67
|
For a how-to, keep only what the specific task needs. Link out for details.
|
|
68
|
+
Many Cratis readers are adopting a paradigm (event sourcing, event
|
|
69
|
+
modeling, vertical slices), not only a tool: link the explanation from the
|
|
70
|
+
start route, but let the reader reach a first success before the theory.
|
|
62
71
|
5. Read the rendered page as a newcomer: could they find it, begin without
|
|
63
72
|
hidden prerequisites, recover from a common mistake, and recognize success?
|
|
64
73
|
Then check claims, examples, accessibility, links, and the owning gates.
|
|
@@ -66,6 +75,14 @@ and neighboring pages; ask only when the alternatives change the outcome.
|
|
|
66
75
|
Use support questions and user feedback as evidence: ask what they searched
|
|
67
76
|
for, where they looked, and which step failed. Repair the entry link, wording,
|
|
68
77
|
or example as appropriate; adding another FAQ entry alone may not fix discovery.
|
|
78
|
+
The docs are also the answer surface for Prompter and Chronicle MCP, so treat
|
|
79
|
+
a repeated question as a signal to investigate the page, its entry route, or
|
|
80
|
+
the product behavior behind it. Reduce a report to the page and the
|
|
81
|
+
sentence-level change the reader expected. Make an in-scope fix when the
|
|
82
|
+
evidence supports one; otherwise report the gap and suggest an issue, opening
|
|
83
|
+
one only when asked.
|
|
84
|
+
[Cratis site specifics](references/cratis-site.md) lists the signals Prompter
|
|
85
|
+
actually records.
|
|
69
86
|
|
|
70
87
|
## Writing style
|
|
71
88
|
|
|
@@ -88,7 +105,12 @@ explaining something to a capable developer, confident but never condescending.
|
|
|
88
105
|
framework requirement from a house convention; avoid making a workaround the
|
|
89
106
|
first example a newcomer copies.
|
|
90
107
|
- State limitations, maturity, compatibility, and when the simpler approach
|
|
91
|
-
is preferable. Link to third-party docs instead of retelling them.
|
|
108
|
+
is preferable. Link to third-party docs instead of retelling them. Say that
|
|
109
|
+
an experimental or preview surface is experimental on its own first screen;
|
|
110
|
+
a sidebar link or published guide does not tell the reader.
|
|
111
|
+
- Use a [Mermaid](https://mermaid-js.github.io/mermaid/#/) diagram where
|
|
112
|
+
architecture, a sequence, or state transitions are clearer drawn than
|
|
113
|
+
told. A diagram replaces topology prose; it does not decorate a page.
|
|
92
114
|
- Vary sentence and paragraph rhythm; avoid templated openings and filler.
|
|
93
115
|
A voice edit must never weaken a technical caveat or invent experience.
|
|
94
116
|
- **American English only**: `color` not `colour`, `behavior` not `behaviour`,
|
|
@@ -102,6 +124,14 @@ reader journey in observed use cases and have the owning maintainer review
|
|
|
102
124
|
structural changes. A style pass cannot establish technical correctness.
|
|
103
125
|
Do not rewrite an entire corpus into one repeated template.
|
|
104
126
|
|
|
127
|
+
An AI-drafted narrative is a first draft, not a finished page. Give the model
|
|
128
|
+
the reader, the scenario, the terminology and the source evidence up front;
|
|
129
|
+
then revise the result against that evidence and the
|
|
130
|
+
**cratis-writing-voice-and-cadence** constructions before it ships. Tell the
|
|
131
|
+
reviewer the narrative was AI-drafted (in the review request or commit
|
|
132
|
+
message, not in a PR description's release-note sections) so they read it as
|
|
133
|
+
prose, not only as a diff.
|
|
134
|
+
|
|
105
135
|
For machine-readable delivery and retrieval checks, use
|
|
106
136
|
**cratis-llm-friendly-documentation**; publishing `llms-full.txt` alone does
|
|
107
137
|
not prove that an assistant can find the right page or cite it accurately.
|
|
@@ -114,17 +144,21 @@ Never transcribe an API from memory, hand-translate an unsupported client, or
|
|
|
114
144
|
claim a pasted block is runnable when it requires unstated setup. Show the
|
|
115
145
|
command and observable output for a substantial walkthrough.
|
|
116
146
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
147
|
+
Edit the *authored* file, never a synced copy. The Cratis site derives each
|
|
148
|
+
product page's edit link from that source path, so don't hand-author
|
|
149
|
+
`editUrl` in product frontmatter. Recheck examples against the supported
|
|
150
|
+
version when that version changes. A review of docs is not complete just
|
|
151
|
+
because the site builds: syntax and behavior are different checks.
|
|
152
|
+
|
|
153
|
+
A page is done for this change, not finished forever. Expect to revisit its
|
|
154
|
+
wording, structure and examples as readers hit them.
|
|
121
155
|
|
|
122
|
-
##
|
|
156
|
+
## Cratis platform specifics
|
|
123
157
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
158
|
+
Read [Cratis site specifics](references/cratis-site.md) before writing a
|
|
159
|
+
Cratis product page. It covers the teaching components (`YouWillLearn`,
|
|
160
|
+
`Recap`, client tabs), maturity labeling, cross-product compatibility, the
|
|
161
|
+
Prompter feedback signal, and who decides page structure.
|
|
128
162
|
|
|
129
163
|
## Contextual awareness
|
|
130
164
|
|
|
@@ -142,23 +176,24 @@ Jeremy Miller describes user-centered journeys, tutorial-to-reference links,
|
|
|
142
176
|
source-checked snippets, and a quick edit/publish loop in his
|
|
143
177
|
[OSS-community account](https://jeremydmiller.com/2026/07/08/things-that-have-worked-for-our-oss-community/)
|
|
144
178
|
and [documentation essay](https://www.linkedin.com/pulse/effective-oss-documentation-jeremy-miller-bh1ac/).
|
|
145
|
-
His account is experience, not evidence that a
|
|
146
|
-
|
|
147
|
-
do not copy Wolverine's information architecture onto a different product.
|
|
179
|
+
His account is experience, not evidence that a site generator or AI model
|
|
180
|
+
causes better documentation: borrow the habits, not Wolverine's structure.
|
|
148
181
|
|
|
149
182
|
## Completion checklist
|
|
150
183
|
|
|
151
184
|
A page is done when:
|
|
152
185
|
|
|
153
|
-
- The
|
|
154
|
-
|
|
186
|
+
- The page has a deliberate primary purpose; short supporting context helps
|
|
187
|
+
the reader proceed, while substantial digressions link to their own pages.
|
|
155
188
|
- The audience and their goal were identified before writing, and the first
|
|
156
189
|
screen serves that goal. The first working path needs no unexplained setup
|
|
157
|
-
or up-front choice among configuration alternatives
|
|
190
|
+
or up-front choice among configuration alternatives, and it is safe to run
|
|
191
|
+
on a developer machine as written.
|
|
158
192
|
- Examples teach intended idioms and identify relevant traps without turning
|
|
159
193
|
a tutorial into an exhaustive list of alternatives.
|
|
160
194
|
- Examples are source-verified, complete at their stated scope, and show a
|
|
161
195
|
checkable result; longer examples come from compiling sample or spec source.
|
|
196
|
+
Explanations of what happened match the backend the reader built.
|
|
162
197
|
- The entry point, terminology, and next-step links fit the surrounding docs.
|
|
163
198
|
- All internal links resolve; all external links are real.
|
|
164
199
|
- Mermaid blocks are syntactically valid.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Cratis site specifics
|
|
2
|
+
|
|
3
|
+
Facts about the Cratis documentation platform that change how a page should be
|
|
4
|
+
written. They describe the site as of September 2026; confirm against the
|
|
5
|
+
Documentation repository (`web/src/components`, `web/scripts/sync-content.mjs`,
|
|
6
|
+
`web/variant-docs.yml`) before relying on a detail.
|
|
7
|
+
|
|
8
|
+
## Teaching components
|
|
9
|
+
|
|
10
|
+
Product pages that import components must be `.mdx`. Every component costs
|
|
11
|
+
machine readability: the raw Markdown mirror behind "Copy Markdown" keeps its
|
|
12
|
+
imports and JSX. Use one where it clearly teaches better than plain Markdown.
|
|
13
|
+
|
|
14
|
+
| Need | Use |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| Open a tutorial with its outcomes | `import YouWillLearn from '@components/YouWillLearn.astro'`; optional `title`, list in the body |
|
|
17
|
+
| Close a tutorial chapter | `import Recap from '@components/Recap.astro'`; optional `title` |
|
|
18
|
+
| Ordered procedure | `import { Steps } from '@astrojs/starlight/components'` around an ordered list |
|
|
19
|
+
| One example in every client language | `<ChronicleClientTabs snippet="…" />` or `<ArcBackendTabs snippet="…" />`, expanded at sync time from client-owned snippet files |
|
|
20
|
+
| Two independently readable alternatives (C# and TypeScript) | `import FullStackTabs from '@components/FullStackTabs.astro'`, named `csharp` and `typescript` slots |
|
|
21
|
+
|
|
22
|
+
- The client-tab macros take `snippet`, and optionally `syncKey` and a
|
|
23
|
+
`variants="java,kotlin"` subset. There is no `clients` property: a tab
|
|
24
|
+
appears for each client whose repository has that snippet file.
|
|
25
|
+
- The site links each expanded tab to its exact snippet file in the owning
|
|
26
|
+
repository. Don't add those links by hand.
|
|
27
|
+
- Arc's authoring check rejects `ArcBackendTabs` nested inside `Steps`.
|
|
28
|
+
- `TopicHero` declares `title` (required), `icon` and `eyebrow`. Don't copy
|
|
29
|
+
props from a page that passes others; they are ignored.
|
|
30
|
+
|
|
31
|
+
## Maturity
|
|
32
|
+
|
|
33
|
+
The site has no single maturity convention. The sidebar badges some surfaces
|
|
34
|
+
"Soon", some pages use a note aside, and the model-first layer (Studio,
|
|
35
|
+
Screenplay, Stage, Scene, Prologue) is described as experimental in the
|
|
36
|
+
site's AI-facing overview (`llms.txt`) but not on every product index. Check the owning product's current
|
|
37
|
+
maturity and production guidance. If it is verified as experimental or
|
|
38
|
+
preview, say so prominently on its index and getting-started page, for
|
|
39
|
+
example in a `:::caution` aside, and state only the change and production
|
|
40
|
+
limits the product source supports. Don't infer those limits from a
|
|
41
|
+
site-wide label.
|
|
42
|
+
|
|
43
|
+
## Cross-product compatibility
|
|
44
|
+
|
|
45
|
+
There is no numbered compatibility matrix across the Chronicle kernel and its
|
|
46
|
+
clients, Arc and Chronicle, or Components and Arc; the roadmap lists it as
|
|
47
|
+
being hardened. `compatibility.mdx` describes baselines and dependency
|
|
48
|
+
relationships, Components' supported Arc range is its `peerDependencies`, and
|
|
49
|
+
Chronicle's `upgrading/major-versions.md` marks where kernel and clients must
|
|
50
|
+
move together, and says "unknown" where it has not been established. Follow
|
|
51
|
+
that practice: state the pairings you verified, and say when a pairing is
|
|
52
|
+
unverified instead of implying it works or fails.
|
|
53
|
+
|
|
54
|
+
## Prompter as a documentation signal
|
|
55
|
+
|
|
56
|
+
Prompter, the Discord documentation assistant, stores anonymous rows per
|
|
57
|
+
answer: surface, cited page URLs, answered or refused, confidence, and a
|
|
58
|
+
thumbs-up/down verdict. It does not store question or answer text. Readers can
|
|
59
|
+
report a missing or hard-to-find page through its `/issue` command, and an
|
|
60
|
+
opted-in repository can notify a maintainer channel when it could not answer.
|
|
61
|
+
Use refusals, low confidence and negative verdicts grouped by cited page to
|
|
62
|
+
decide which pages to investigate. Don't claim individual questions or a
|
|
63
|
+
reporting dashboard exist.
|
|
64
|
+
|
|
65
|
+
## Bridges and comparisons
|
|
66
|
+
|
|
67
|
+
Chronicle's `coming-from-crud`, Arc's `coming-from-mediatr-and-mvc` and
|
|
68
|
+
Components' `coming-from-primereact` are product-owned. The site's .NET and
|
|
69
|
+
JVM event-sourcing comparisons name the compared versions, link first-party
|
|
70
|
+
sources, avoid ranking, and commit to a refresh interval. Keep that standard,
|
|
71
|
+
and label another technology's code as illustrative unless it was compiled
|
|
72
|
+
at a named version.
|
|
73
|
+
|
|
74
|
+
## Structure and publishing
|
|
75
|
+
|
|
76
|
+
- No repository has a path-specific `CODEOWNERS` entry for
|
|
77
|
+
`Documentation/**`; a few, such as Chronicle.Python and Chronicle.Wolverine,
|
|
78
|
+
have catch-all owners that include it. Check the owning repository rather
|
|
79
|
+
than assuming a documentation reviewer exists.
|
|
80
|
+
- What is part of writing a page, what is a separate navigation decision,
|
|
81
|
+
and how a merged change reaches the site are in
|
|
82
|
+
[Editing Cratis Documentation](../../../rules/editing-cratis-docs.md).
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
{ "kind": "skill-contains", "value": "## Classify before writing" },
|
|
7
7
|
{ "kind": "skill-contains", "value": "## Work from the reader outward" },
|
|
8
8
|
{ "kind": "skill-contains", "value": "cratis-technical-examples" },
|
|
9
|
-
{ "kind": "skill-contains", "value": "## Completion checklist" }
|
|
9
|
+
{ "kind": "skill-contains", "value": "## Completion checklist" },
|
|
10
|
+
{ "kind": "skill-contains", "value": "(references/cratis-site.md)" }
|
|
10
11
|
]
|
|
11
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-engineering-docs-authoring
|
|
3
|
-
description: Draft accurate Cratis
|
|
3
|
+
description: Draft accurate Cratis product or engineering documentation once the reader's goal, owning source, and product evidence are known. Use for tutorials, how-to guides, explanations, and references; use the owning repository's navigation and visual QA workflows for placement and rendering.
|
|
4
4
|
license: LICENSE
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -37,9 +37,9 @@ different document types, audiences, or product choices remain plausible.
|
|
|
37
37
|
- The subject is not Cratis product or engineering documentation: do not apply
|
|
38
38
|
this skill.
|
|
39
39
|
|
|
40
|
-
## Write one
|
|
40
|
+
## Write to one primary reader need
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Use Diátaxis to choose the page's main job. Include brief context needed to make the task work; link out instead of embedding a different page's full lesson or lookup:
|
|
43
43
|
|
|
44
44
|
| Type | Reader need | Shape |
|
|
45
45
|
| --- | --- | --- |
|
|
@@ -42,6 +42,17 @@ an entire product will fit a model's context window.
|
|
|
42
42
|
do not recommend it as default prompt context. Measure bytes; label token
|
|
43
43
|
counts as estimates for a named tokenizer or approximation, not universal
|
|
44
44
|
limits. Split oversized sets instead of silently truncating them.
|
|
45
|
+
6. Let an assistant that landed on a rendered page find that page's own
|
|
46
|
+
Markdown without going back through the index, at a stable URL. Inspect
|
|
47
|
+
whether that URL carries rendered prose or raw synchronized MDX, label a
|
|
48
|
+
raw mirror honestly, and propose a rendered export as a separate site
|
|
49
|
+
change rather than claiming the current mirror provides one.
|
|
50
|
+
|
|
51
|
+
Cratis's own consumers are Prompter (the Discord documentation assistant),
|
|
52
|
+
Chronicle MCP, and developers' coding agents. A page that shows every client
|
|
53
|
+
language serves a human switching tabs, but it multiplies the code an
|
|
54
|
+
assistant must read for a one-language question; measure that before
|
|
55
|
+
splitting exports per language.
|
|
45
56
|
|
|
46
57
|
Plain Markdown pages can expose their existing source mirror. For MDX-heavy
|
|
47
58
|
pages, prefer a rendered representation that preserves all relevant variants;
|
|
@@ -31,6 +31,15 @@ serialization/schema/data migrations, runtime and dependency compatibility,
|
|
|
31
31
|
deploy ordering, deprecations/removals, and upgrade/rollback limits. Report
|
|
32
32
|
'not verified' rather than guessing about a supported configuration.
|
|
33
33
|
|
|
34
|
+
Cratis products move together at their seams: the Chronicle kernel and its
|
|
35
|
+
clients, Arc and Chronicle, Components and Arc. When a change touches a
|
|
36
|
+
seam, state the pairings you verified (for example, which kernel versions a
|
|
37
|
+
client release was tested against) and say which pairings are unverified.
|
|
38
|
+
There is no central compatibility matrix to defer to, so the release note may
|
|
39
|
+
be the only place a reader learns it. Where a measurement drove the change,
|
|
40
|
+
such as how many deployments hit a failure, give the number; never estimate
|
|
41
|
+
one to add weight.
|
|
42
|
+
|
|
34
43
|
## Write for the right channel
|
|
35
44
|
|
|
36
45
|
- **Exact-version release note (GitHub/PR):** start with changes requiring
|
|
@@ -38,12 +47,19 @@ deploy ordering, deprecations/removals, and upgrade/rollback limits. Report
|
|
|
38
47
|
and the user's next action in plain language. Include an issue reference only
|
|
39
48
|
when verified, and follow the owning repository's closing-keyword policy.
|
|
40
49
|
Do not list internal refactors or specs that change nothing users observe.
|
|
50
|
+
For a user-visible fix, a sentence of root cause and of what now guards
|
|
51
|
+
against a regression, stated as observable behavior rather than a list of
|
|
52
|
+
specs, is user-facing: it tells the reader whether to trust the fix. Credit an external contributor by name or handle and say what
|
|
53
|
+
they did, unless they asked not to be named.
|
|
41
54
|
- **Migration guide (durable product docs):** a compact *old behavior → new
|
|
42
55
|
behavior → required action* table for each affected upgrade path, followed
|
|
43
56
|
by source-verified before/after code or commands. Distinguish required
|
|
44
57
|
migration from optional cleanup, name sequencing for schema/data changes,
|
|
45
58
|
and explain escape hatches with their cost or expiry. If no action is needed,
|
|
46
|
-
state why and for whom, rather than implying it for everyone.
|
|
59
|
+
state why and for whom, rather than implying it for everyone. State the
|
|
60
|
+
table's scope and its known exclusions, so a reader who does not find their
|
|
61
|
+
API knows whether it was assessed. Do not infer backward compatibility for
|
|
62
|
+
APIs or configurations that were not assessed.
|
|
47
63
|
- **Announcement or blog post:** explain the motivation and show a small
|
|
48
64
|
realistic success, then link to the exact-version note and migration guide.
|
|
49
65
|
It is not a second independent changelog. Do not claim personal experience
|
|
@@ -24,7 +24,10 @@ language-tab layout or documentation site implementation.
|
|
|
24
24
|
snippet-equality check beside the sample and run it with the sample build in
|
|
25
25
|
CI. Manual comparison alone is a one-time review, not a drift guard; name
|
|
26
26
|
that limitation when automation is unavailable. Do not copy once and let
|
|
27
|
-
the page drift.
|
|
27
|
+
the page drift. Link each extracted block to its source file so a reader
|
|
28
|
+
can follow it to the fuller example; that link is navigation, not a
|
|
29
|
+
verification receipt. The Cratis site adds these links automatically to
|
|
30
|
+
client-language tabs, so don't add them by hand there.
|
|
28
31
|
- **Multi-language client example:** keep one explanation; use the established
|
|
29
32
|
client-owned snippet mechanism, compile each client against its own SDK, and
|
|
30
33
|
offer only implementations that exist. Do not translate a C# call by guess.
|
|
@@ -65,6 +68,21 @@ language tabs. Never hand-edit a generated proxy or a synchronized docs copy.
|
|
|
65
68
|
6. Record the source revision and verification scope in the change summary,
|
|
66
69
|
not as a permanent receipt embedded in the page.
|
|
67
70
|
|
|
71
|
+
## Know what the owning gate actually checks
|
|
72
|
+
|
|
73
|
+
Look for a snippet validator before designing another checker. Arc and
|
|
74
|
+
Chronicle's .NET repositories use `Documentation/validate-client-snippets.py`
|
|
75
|
+
for supported **C#** fences in `Documentation/client-snippets/**`; Arc's
|
|
76
|
+
validator has a `--self-test` that plants a failing snippet. Other client
|
|
77
|
+
repositories own their own validators and toolchains. Check the validator's
|
|
78
|
+
reported count and exclusions: unsupported markers or legacy snippets are not
|
|
79
|
+
proved compilable just because the run passed. Run the owning validator for
|
|
80
|
+
every changed client snippet, or name a missing toolchain and rely on its
|
|
81
|
+
required CI gate. These checks **do not** compile ordinary Markdown/MDX fences
|
|
82
|
+
elsewhere in product documentation. For those, verify against real source and
|
|
83
|
+
a runnable sample/spec or an explicit snippet comparison; do not claim
|
|
84
|
+
coverage from a site build or a validator that never scans the page.
|
|
85
|
+
|
|
68
86
|
A simple process beats a large unmaintained examples gallery: give the reader
|
|
69
87
|
one small success first, then link to a fuller sample when they need it. Update
|
|
70
88
|
examples alongside public API changes and incoming reports of copy/paste failure.
|