@cratis/pi 7.131.4 → 7.131.5
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/harnesses/copilot/instructions/discoverability.instructions.md +2 -2
- package/package/corpus/harnesses/copilot/instructions/documentation.instructions.md +33 -11
- package/package/corpus/harnesses/copilot/instructions/writing-cratis-docs.instructions.md +67 -64
- package/package/corpus/prompts/write-documentation.prompt.md +31 -4
- package/package/corpus/rules/discoverability.md +2 -2
- package/package/corpus/rules/documentation.md +33 -11
- package/package/corpus/rules/writing-cratis-docs.md +67 -64
- package/package/corpus/skills/cratis-discoverability/SKILL.md +9 -8
- package/package/corpus/skills/cratis-discoverability/references/page-checklist.md +21 -16
- package/package/corpus/skills/cratis-documentation-writing/SKILL.md +78 -28
- package/package/corpus/skills/cratis-documentation-writing/references/cratis-site.md +49 -8
- package/package/corpus/skills/cratis-documentation-writing/references/reader-review.md +88 -0
- package/package/corpus/skills/cratis-documentation-writing/verification.json +14 -1
- package/package/corpus/skills/cratis-engineering-docs-authoring/SKILL.md +38 -13
- package/package/corpus/skills/cratis-engineering-docs-authoring/references/explaining-code.md +142 -0
- package/package/corpus/skills/cratis-engineering-docs-authoring/references/site-format.md +5 -0
- package/package/corpus/skills/cratis-engineering-docs-authoring/verification.json +12 -0
- package/package/corpus/skills/cratis-llm-friendly-documentation/SKILL.md +32 -8
- package/package/corpus/skills/cratis-llm-friendly-documentation/verification.json +15 -0
- package/package/corpus/skills/cratis-technical-examples/SKILL.md +42 -8
- package/package/corpus/skills/cratis-technical-examples/verification.json +7 -1
- package/package/corpus/skills/cratis-writing-voice-and-cadence/SKILL.md +47 -10
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/ai-tells.md +12 -5
- package/package/corpus/skills/cratis-writing-voice-and-cadence/verification.json +9 -2
- package/package.json +1 -1
|
@@ -18,8 +18,8 @@ Readability comes first. If a change for search engines or AI assistants makes a
|
|
|
18
18
|
|
|
19
19
|
## Every page, post and README
|
|
20
20
|
|
|
21
|
-
- **Define first, where a definition belongs.** Landing pages,
|
|
22
|
-
- **Docs
|
|
21
|
+
- **Define first, where a definition belongs.** Landing pages, glossary entries, READMEs and package descriptions open with one self-contained sentence: "X is a <category> for <audience> that <does>." Product index pages make the product's purpose clear near the beginning without requiring a definition as the opening sentence.
|
|
22
|
+
- **Docs follow [writing-cratis-docs.md](./writing-cratis-docs.instructions.md) for voice and structure.** Let the reader's task and page purpose determine the opening and sequence; a concrete scenario is useful when it helps, not a required opener. Keep the self-contained definition or outcome in the frontmatter `description`, which serves search and AI. Reference entries stay terse, with introductory context only where needed to use them. writing-cratis-docs wins over discoverability suggestions.
|
|
23
23
|
- **Title and description are written by hand.** Title with the distinguishing term first: 50-60 characters for blog and landing pages, 20-60 for docs and reference pages; a README H1 that is the product name is fine. Description is one sentence of 60-160 characters, never over 160, and not a copy of the title or of another page's description.
|
|
24
24
|
- **Name things one way.** The first mention is the full name ("Cratis Chronicle"), later mentions may shorten it. Use the canonical names in the **cratis-discoverability** entity reference, and do not call the platform "Cratis.io".
|
|
25
25
|
- **Links name their destination.** Link text says what is behind it. Outside the docs site, link docs with the absolute canonical host `https://www.cratis.io/...`, never the bare `cratis.io`.
|
|
@@ -11,6 +11,27 @@ Documentation exists for one audience: **developers who need to use the framewor
|
|
|
11
11
|
|
|
12
12
|
Every page should answer: “If I were a developer encountering this concept for the first time, what would I need to understand to use it correctly?”
|
|
13
13
|
|
|
14
|
+
## Name the Platform and its components accurately
|
|
15
|
+
|
|
16
|
+
In reader-facing documentation and discovery, **Cratis** is the organization and
|
|
17
|
+
**Cratis Platform** is the umbrella offering. Chronicle, Arc, Components,
|
|
18
|
+
Screenplay, Studio, CLI, and other named tools are components or supporting tools
|
|
19
|
+
with distinct roles, not competing platforms. When a reader or search query asks
|
|
20
|
+
about a Cratis framework, route to the relevant Platform component without
|
|
21
|
+
pretending its name, API or package identifier changed.
|
|
22
|
+
|
|
23
|
+
Readers may adopt one component independently or combine several. Never imply
|
|
24
|
+
that a component requires the whole Platform. For a cross-component task, name
|
|
25
|
+
which component owns each responsibility and show the handoffs, prerequisites
|
|
26
|
+
and result instead of using the umbrella name as an explanation. Preserve
|
|
27
|
+
verified product terminology, literal package IDs and API names.
|
|
28
|
+
|
|
29
|
+
Use authoritative source for capability, compatibility, dependency and maturity
|
|
30
|
+
claims; label unknown pairings as unverified. Do not infer support from branding
|
|
31
|
+
or navigation, and do not invent guarantees, performance or production-readiness
|
|
32
|
+
claims. Shared overview pages should link to component-owned procedures rather
|
|
33
|
+
than duplicate their setup.
|
|
34
|
+
|
|
14
35
|
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.instructions.md).
|
|
15
36
|
|
|
16
37
|
## Give each page one primary reader purpose
|
|
@@ -20,13 +41,13 @@ Use [Diátaxis](https://diataxis.fr/) as a compass: decide whether the reader is
|
|
|
20
41
|
| Type | The reader is… | Reads like | Rule |
|
|
21
42
|
|---|---|---|---|
|
|
22
43
|
| **Tutorial** | learning by doing | a guided lesson | Steps that each produce a visible result. Briefly explain the invisible effect after a step; link out for deeper theory rather than stopping the lesson. The reader must succeed even before they fully understand. |
|
|
23
|
-
| **How-to guide** | solving a specific problem | a recipe | Assume competence. Goal → prerequisites → steps →
|
|
24
|
-
| **Reference** | looking something up | a dictionary | Exhaustive and terse. Tables, signatures, attributes, configuration
|
|
25
|
-
| **Explanation** | trying to understand | a discussion | Concepts, trade-offs, architecture, *why*.
|
|
44
|
+
| **How-to guide** | solving a specific problem | a recipe | Assume competence. Goal → prerequisites → steps → completion check. Explain necessary concepts, effects and recovery beside the step; link sustained teaching elsewhere. |
|
|
45
|
+
| **Reference** | looking something up | a dictionary | Exhaustive and terse. Tables, signatures, attributes, configuration; concise explanation where a default or interaction would otherwise surprise the reader. |
|
|
46
|
+
| **Explanation** | trying to understand | a discussion | Concepts, trade-offs, architecture, *why*. A short example or sequence can clarify an effect without becoming a full procedure. Use diagrams when they explain a relationship. |
|
|
26
47
|
|
|
27
48
|
Diátaxis governs a page's purpose and voice, not a universal set of sidebar labels. Each product has navigation buckets suited to its domain; read `PRODUCTS[].buckets` in the Documentation site's sync script before placing a new section.
|
|
28
49
|
|
|
29
|
-
For a reader-centered writing workflow, use
|
|
50
|
+
For a reader-centered writing workflow, use **cratis-documentation-writing**; for source-verified snippets use **cratis-technical-examples**. Before drafting or revising an explanation beside code, read and apply [Explaining code](../../../skills/cratis-engineering-docs-authoring/references/explaining-code.md): develop the point from the example instead of turning source-checking questions into public prose.
|
|
30
51
|
|
|
31
52
|
## Onboarding is the most important documentation you write
|
|
32
53
|
|
|
@@ -42,7 +63,7 @@ Most readers decide whether to adopt Cratis in the first ten minutes. Protect th
|
|
|
42
63
|
Readers do not care about repository boundaries — they are building one application.
|
|
43
64
|
|
|
44
65
|
- The site has **one front door** stating what Cratis is, with a one-sentence definition and a “start here” link for each product.
|
|
45
|
-
- Every product index
|
|
66
|
+
- Every product index makes the product's purpose clear near the beginning. Use a **one-sentence definition** or **“without vs. with” framing** where it helps the reader choose; do not force one opening or sequence onto every product.
|
|
46
67
|
- **Cross-link at the seams** rather than re-explaining: show how the products meet in the reader's workflow. Before a procedure uses another product's command, link its installation procedure as a prerequisite instead of assuming the command is already available. Prefer the canonical procedure over copying installation commands that can drift.
|
|
47
68
|
- Maintain a **glossary** of shared terms and link to it instead of redefining terms per page. One term, one concept, everywhere.
|
|
48
69
|
|
|
@@ -50,11 +71,11 @@ Readers do not care about repository boundaries — they are building one applic
|
|
|
50
71
|
|
|
51
72
|
The project's voice is **direct, practical, and opinionated**. Write like an experienced colleague explaining something to a capable developer — confident but never condescending.
|
|
52
73
|
|
|
53
|
-
- **Active voice, present tense
|
|
54
|
-
-
|
|
74
|
+
- **Active voice, present tense.** Address the reader when giving an action; let the API or component be the subject when it makes a contract clearer.
|
|
75
|
+
- Explain the reason where it helps the reader choose or understand an effect. A lookup can open directly with its contract.
|
|
55
76
|
- **Do not document the obvious.** If the API is self-explanatory, a complete code example is enough.
|
|
56
|
-
- Use
|
|
57
|
-
- **Be honest about trade-offs.**
|
|
77
|
+
- Use connected paragraphs to develop an explanation, headings to locate it, and lists or tables for real steps and comparisons.
|
|
78
|
+
- **Be honest about trade-offs.** Put a limit where it changes the reader's action or expectation, before risk when relevant; a separate wrong-fit section is useful only when it has something to explain.
|
|
58
79
|
- 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.
|
|
59
80
|
|
|
60
81
|
## Diagrams
|
|
@@ -66,9 +87,9 @@ The project's voice is **direct, practical, and opinionated**. Write like an exp
|
|
|
66
87
|
- Prefer `record` types for events, commands, and read models — match the codebase.
|
|
67
88
|
- 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.
|
|
68
89
|
- 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.
|
|
69
|
-
- **State version requirements, not the test log.**
|
|
90
|
+
- **State version requirements, not the test log.** Name minimum, fixed or breaking releases and meaningful compatibility or peer ranges. Ordinary installation follows the supported latest-release path, not universal exact-patch pins; latest does not imply every package combination is compatible. Keep resolved versions in maintained manifests/lockfiles, or pin deliberately reproducible tutorials when needed. Preserve required security/deployment constraints and production image policy. Do not end a page with verification provenance (SDK build, image digest or SHA, date, "tested with", unrun samples); that belongs in the change summary. See **cratis-technical-examples**.
|
|
70
91
|
- **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.
|
|
71
|
-
- Where a feature spans products or languages, show both sides when both matter. Keep
|
|
92
|
+
- Where a feature spans products or languages, show both sides when both matter. Keep sequential backend-producer/frontend-consumer examples together. Tabs are alternatives for the same reader task, not evidence of client parity; apply the multi-client guidance in [Explaining code](../../../skills/cratis-engineering-docs-authoring/references/explaining-code.md) before choosing that shape.
|
|
72
93
|
|
|
73
94
|
## Links
|
|
74
95
|
|
|
@@ -89,3 +110,4 @@ The project's voice is **direct, practical, and opinionated**. Write like an exp
|
|
|
89
110
|
- Follow [Documentation Structure and Formatting](./documentation-structure-and-formatting.instructions.md) for frontmatter, landing pages, `toc.yml`, Markdown/MDX, links, and rendering.
|
|
90
111
|
- End every Markdown file with a single trailing newline.
|
|
91
112
|
- Run the owning repository's local documentation gate when present; use `cd ../Documentation/web && npm run check` for full-fidelity site verification when the sibling checkout is available.
|
|
113
|
+
- For a new or materially changed reader journey, use the **cratis-documentation-writing** [fresh-context reader review](../../../skills/cratis-documentation-writing/references/reader-review.md). Report unavailable review rather than calling an author's reread independent evidence; a passing build is not a comprehension check.
|
|
@@ -6,67 +6,70 @@ paths:
|
|
|
6
6
|
---
|
|
7
7
|
<!-- cratis-ai: generated Copilot instructions. Do not edit; rules/ is the source. -->
|
|
8
8
|
|
|
9
|
-
# Writing Cratis
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
9
|
+
# Writing Cratis Documentation
|
|
10
|
+
|
|
11
|
+
Read and use **cratis-documentation-writing** to establish the reader's goal and
|
|
12
|
+
page purpose, then **cratis-engineering-docs-authoring** to draft from product
|
|
13
|
+
evidence. Before writing explanations beside examples, work through
|
|
14
|
+
[Explaining code](../../../skills/cratis-engineering-docs-authoring/references/explaining-code.md).
|
|
15
|
+
It shows how a concrete registration or directive can carry the explanation
|
|
16
|
+
without making the page read like a review form. Read a current, well-reviewed
|
|
17
|
+
tutorial in the product or a closely related product before writing, without
|
|
18
|
+
assuming its vocabulary fits this product.
|
|
19
|
+
|
|
20
|
+
Write as a developer explaining the code to another developer. Start with the
|
|
21
|
+
reader's problem, show the relevant example, and explain the part they cannot
|
|
22
|
+
see: why this type matters, what the call changes, or where responsibility
|
|
23
|
+
passes to another component. Let each paragraph develop that point. Use steps
|
|
24
|
+
for a procedure and a table for a comparison; neither replaces a connected
|
|
25
|
+
explanation. A reference entry can state its contract directly.
|
|
26
|
+
|
|
27
|
+
The example should also teach the intended idiom. Explain a tempting alternative
|
|
28
|
+
when it exposes a real trap, and put a limitation beside the action it affects.
|
|
29
|
+
Do not add a stock warning or a closing list of everything the product does not
|
|
30
|
+
do. A concrete recommendation with a source-backed reason is useful perspective;
|
|
31
|
+
an invented customer story or personal experience is not. Make the first example
|
|
32
|
+
the convention path: do not hand-register what the framework already discovers.
|
|
33
|
+
Explain that invisible wiring against the backend the reader actually built,
|
|
34
|
+
then show an observable result before introducing another concept.
|
|
35
|
+
|
|
36
|
+
Use **cratis-technical-examples** to verify code, configuration, commands and
|
|
37
|
+
results against the applicable product source. It is fine to explain the effect
|
|
38
|
+
of code that is absent, such as convention-based wiring, but establish that
|
|
39
|
+
effect first. Do not infer a second client's API or behavior from the first.
|
|
40
|
+
Read the multi-client section of **Explaining code** before choosing shared
|
|
41
|
+
prose, tabs or separate guides. Preserve the owning repository's snippet and
|
|
42
|
+
language-tab workflow rather than inventing another one. Show both the backend
|
|
43
|
+
contract and generated frontend shape when both matter, keeping required
|
|
44
|
+
producer/consumer actions sequential.
|
|
45
|
+
|
|
46
|
+
Choose presentation to support the reader, not decorate the page. The exact
|
|
47
|
+
Markdown/MDX boundary, aside semantics, component contracts and rendering checks
|
|
48
|
+
live in [Documentation Structure and Formatting](./documentation-structure-and-formatting.instructions.md).
|
|
49
|
+
Use the owning site's supported components and inspect the emitted Markdown;
|
|
50
|
+
a raw source mirror is not proof that essential labels or warnings survive.
|
|
51
|
+
|
|
52
|
+
Link the guided explanation to exact reference and connect neighboring products
|
|
53
|
+
at their workflow seams instead of retelling their setup. A coming-from-X bridge
|
|
54
|
+
can put the reader's existing code beside the Cratis equivalent and explain
|
|
55
|
+
what changes. Keep that comparison fair and version-accurate, or label it
|
|
56
|
+
illustrative; say when the existing approach remains the better fit. It does
|
|
57
|
+
not impose universal navigation buckets.
|
|
58
|
+
|
|
59
|
+
Follow the [documentation rule](./documentation.instructions.md) for naming, claims and version
|
|
60
|
+
constraints. The reader needs the minimum or compatibility boundary that changes
|
|
61
|
+
what they can run, not the author's source-checking diary. Keep verification
|
|
62
|
+
provenance in the private change summary. A rendered page, compiling example,
|
|
63
|
+
observed result and successful reader journey are different evidence.
|
|
64
|
+
|
|
65
|
+
Before returning a draft, read its explanation as prose: does it make the code
|
|
66
|
+
easier to understand, or merely name responsibilities and limitations? Use
|
|
67
|
+
**cratis-writing-voice-and-cadence** for an authorized revision, preserving
|
|
68
|
+
technical claims and approval boundaries. For a materially changed journey,
|
|
69
|
+
follow the reader-review procedure owned by **cratis-documentation-writing**;
|
|
70
|
+
report when independent review is unavailable. Do not edit generated copies,
|
|
71
|
+
change navigation, or publish as part of writing. Run the owning documentation
|
|
72
|
+
gate and, when available, the Documentation site's full check for attributable
|
|
73
|
+
lint and rendered-link errors. For a visual page, use the owning preview workflow
|
|
74
|
+
and inspect light and dark screenshots. Source ownership and the edit/sync/verify
|
|
75
|
+
loop live in [Editing Cratis Documentation](./editing-cratis-docs.instructions.md).
|
|
@@ -6,9 +6,36 @@ description: "Write reader-centered documentation using the Cratis documentation
|
|
|
6
6
|
# Write Documentation
|
|
7
7
|
|
|
8
8
|
Write documentation for a feature, component, or concept. Follow
|
|
9
|
-
`.cratis/ai/rules/documentation.md` and
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
`.cratis/ai/rules/documentation.md` and use **cratis-documentation-writing**.
|
|
10
|
+
|
|
11
|
+
## Read the applicable skills first
|
|
12
|
+
|
|
13
|
+
Read the actual applicable `SKILL.md` files before drafting, in this order:
|
|
14
|
+
|
|
15
|
+
1. `.cratis/ai/skills/cratis-documentation-writing/SKILL.md` for reader journey
|
|
16
|
+
and page purpose.
|
|
17
|
+
2. `.cratis/ai/skills/cratis-engineering-docs-authoring/SKILL.md` for
|
|
18
|
+
source-grounded authoring of a Cratis product page.
|
|
19
|
+
3. `.cratis/ai/skills/cratis-technical-examples/SKILL.md` when including code,
|
|
20
|
+
commands, configuration or observable output.
|
|
21
|
+
4. `.cratis/ai/skills/cratis-llm-friendly-documentation/SKILL.md` when discovery,
|
|
22
|
+
exports, mirrors or citations are involved.
|
|
23
|
+
5. `.cratis/ai/skills/cratis-writing-voice-and-cadence/SKILL.md` before revising
|
|
24
|
+
existing prose, after establishing its claims.
|
|
25
|
+
|
|
26
|
+
Read referenced material when its condition applies. Use the installed canonical
|
|
27
|
+
equivalents if these repository paths are absent; report an unavailable skill
|
|
28
|
+
instead of claiming it was read. Skill availability or invocation alone is not a read.
|
|
29
|
+
In the private author/change note, record paths, source revision, and observed read order
|
|
30
|
+
when transcript evidence exists; otherwise say what is unavailable. Do not add
|
|
31
|
+
a public verification receipt or infer hidden reads from the skill list.
|
|
32
|
+
For a new or materially changed journey, use the reader-review procedure linked
|
|
33
|
+
by **cratis-documentation-writing**. Do not spawn a reader agent or run a live
|
|
34
|
+
model evaluation without authorization; report unavailable independent review.
|
|
35
|
+
|
|
36
|
+
Follow the documentation rule's naming contract: Cratis is the organization,
|
|
37
|
+
Cratis Platform the umbrella, and named products are independently adoptable
|
|
38
|
+
components or supporting tools. Keep literal APIs and package IDs unchanged.
|
|
12
39
|
|
|
13
40
|
## Determine the reader's job
|
|
14
41
|
|
|
@@ -24,7 +51,7 @@ Lead with the problem and payoff. Use active voice and show how the reader can
|
|
|
24
51
|
recognize success. A tutorial can briefly explain an observed result without
|
|
25
52
|
turning into a reference dump; link to deeper material. Verify framework APIs
|
|
26
53
|
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
|
|
54
|
+
claimed scope, explain ownership and observable handoffs between components, and run the owning repository's content and link gates. Add a
|
|
28
55
|
new page to the owning product's `toc.yml`
|
|
29
56
|
(a page missing from it silently drops out of the sidebar); otherwise update
|
|
30
57
|
navigation only when the page's placement or route changes.
|
|
@@ -17,8 +17,8 @@ Readability comes first. If a change for search engines or AI assistants makes a
|
|
|
17
17
|
|
|
18
18
|
## Every page, post and README
|
|
19
19
|
|
|
20
|
-
- **Define first, where a definition belongs.** Landing pages,
|
|
21
|
-
- **Docs
|
|
20
|
+
- **Define first, where a definition belongs.** Landing pages, glossary entries, READMEs and package descriptions open with one self-contained sentence: "X is a <category> for <audience> that <does>." Product index pages make the product's purpose clear near the beginning without requiring a definition as the opening sentence.
|
|
21
|
+
- **Docs follow [writing-cratis-docs.md](./writing-cratis-docs.md) for voice and structure.** Let the reader's task and page purpose determine the opening and sequence; a concrete scenario is useful when it helps, not a required opener. Keep the self-contained definition or outcome in the frontmatter `description`, which serves search and AI. Reference entries stay terse, with introductory context only where needed to use them. writing-cratis-docs wins over discoverability suggestions.
|
|
22
22
|
- **Title and description are written by hand.** Title with the distinguishing term first: 50-60 characters for blog and landing pages, 20-60 for docs and reference pages; a README H1 that is the product name is fine. Description is one sentence of 60-160 characters, never over 160, and not a copy of the title or of another page's description.
|
|
23
23
|
- **Name things one way.** The first mention is the full name ("Cratis Chronicle"), later mentions may shorten it. Use the canonical names in the **cratis-discoverability** entity reference, and do not call the platform "Cratis.io".
|
|
24
24
|
- **Links name their destination.** Link text says what is behind it. Outside the docs site, link docs with the absolute canonical host `https://www.cratis.io/...`, never the bare `cratis.io`.
|
|
@@ -10,6 +10,27 @@ Documentation exists for one audience: **developers who need to use the framewor
|
|
|
10
10
|
|
|
11
11
|
Every page should answer: “If I were a developer encountering this concept for the first time, what would I need to understand to use it correctly?”
|
|
12
12
|
|
|
13
|
+
## Name the Platform and its components accurately
|
|
14
|
+
|
|
15
|
+
In reader-facing documentation and discovery, **Cratis** is the organization and
|
|
16
|
+
**Cratis Platform** is the umbrella offering. Chronicle, Arc, Components,
|
|
17
|
+
Screenplay, Studio, CLI, and other named tools are components or supporting tools
|
|
18
|
+
with distinct roles, not competing platforms. When a reader or search query asks
|
|
19
|
+
about a Cratis framework, route to the relevant Platform component without
|
|
20
|
+
pretending its name, API or package identifier changed.
|
|
21
|
+
|
|
22
|
+
Readers may adopt one component independently or combine several. Never imply
|
|
23
|
+
that a component requires the whole Platform. For a cross-component task, name
|
|
24
|
+
which component owns each responsibility and show the handoffs, prerequisites
|
|
25
|
+
and result instead of using the umbrella name as an explanation. Preserve
|
|
26
|
+
verified product terminology, literal package IDs and API names.
|
|
27
|
+
|
|
28
|
+
Use authoritative source for capability, compatibility, dependency and maturity
|
|
29
|
+
claims; label unknown pairings as unverified. Do not infer support from branding
|
|
30
|
+
or navigation, and do not invent guarantees, performance or production-readiness
|
|
31
|
+
claims. Shared overview pages should link to component-owned procedures rather
|
|
32
|
+
than duplicate their setup.
|
|
33
|
+
|
|
13
34
|
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
35
|
|
|
15
36
|
## Give each page one primary reader purpose
|
|
@@ -19,13 +40,13 @@ Use [Diátaxis](https://diataxis.fr/) as a compass: decide whether the reader is
|
|
|
19
40
|
| Type | The reader is… | Reads like | Rule |
|
|
20
41
|
|---|---|---|---|
|
|
21
42
|
| **Tutorial** | learning by doing | a guided lesson | Steps that each produce a visible result. Briefly explain the invisible effect after a step; link out for deeper theory rather than stopping the lesson. The reader must succeed even before they fully understand. |
|
|
22
|
-
| **How-to guide** | solving a specific problem | a recipe | Assume competence. Goal → prerequisites → steps →
|
|
23
|
-
| **Reference** | looking something up | a dictionary | Exhaustive and terse. Tables, signatures, attributes, configuration
|
|
24
|
-
| **Explanation** | trying to understand | a discussion | Concepts, trade-offs, architecture, *why*.
|
|
43
|
+
| **How-to guide** | solving a specific problem | a recipe | Assume competence. Goal → prerequisites → steps → completion check. Explain necessary concepts, effects and recovery beside the step; link sustained teaching elsewhere. |
|
|
44
|
+
| **Reference** | looking something up | a dictionary | Exhaustive and terse. Tables, signatures, attributes, configuration; concise explanation where a default or interaction would otherwise surprise the reader. |
|
|
45
|
+
| **Explanation** | trying to understand | a discussion | Concepts, trade-offs, architecture, *why*. A short example or sequence can clarify an effect without becoming a full procedure. Use diagrams when they explain a relationship. |
|
|
25
46
|
|
|
26
47
|
Diátaxis governs a page's purpose and voice, not a universal set of sidebar labels. Each product has navigation buckets suited to its domain; read `PRODUCTS[].buckets` in the Documentation site's sync script before placing a new section.
|
|
27
48
|
|
|
28
|
-
For a reader-centered writing workflow, use
|
|
49
|
+
For a reader-centered writing workflow, use **cratis-documentation-writing**; for source-verified snippets use **cratis-technical-examples**. Before drafting or revising an explanation beside code, read and apply [Explaining code](../skills/cratis-engineering-docs-authoring/references/explaining-code.md): develop the point from the example instead of turning source-checking questions into public prose.
|
|
29
50
|
|
|
30
51
|
## Onboarding is the most important documentation you write
|
|
31
52
|
|
|
@@ -41,7 +62,7 @@ Most readers decide whether to adopt Cratis in the first ten minutes. Protect th
|
|
|
41
62
|
Readers do not care about repository boundaries — they are building one application.
|
|
42
63
|
|
|
43
64
|
- The site has **one front door** stating what Cratis is, with a one-sentence definition and a “start here” link for each product.
|
|
44
|
-
- Every product index
|
|
65
|
+
- Every product index makes the product's purpose clear near the beginning. Use a **one-sentence definition** or **“without vs. with” framing** where it helps the reader choose; do not force one opening or sequence onto every product.
|
|
45
66
|
- **Cross-link at the seams** rather than re-explaining: show how the products meet in the reader's workflow. Before a procedure uses another product's command, link its installation procedure as a prerequisite instead of assuming the command is already available. Prefer the canonical procedure over copying installation commands that can drift.
|
|
46
67
|
- Maintain a **glossary** of shared terms and link to it instead of redefining terms per page. One term, one concept, everywhere.
|
|
47
68
|
|
|
@@ -49,11 +70,11 @@ Readers do not care about repository boundaries — they are building one applic
|
|
|
49
70
|
|
|
50
71
|
The project's voice is **direct, practical, and opinionated**. Write like an experienced colleague explaining something to a capable developer — confident but never condescending.
|
|
51
72
|
|
|
52
|
-
- **Active voice, present tense
|
|
53
|
-
-
|
|
73
|
+
- **Active voice, present tense.** Address the reader when giving an action; let the API or component be the subject when it makes a contract clearer.
|
|
74
|
+
- Explain the reason where it helps the reader choose or understand an effect. A lookup can open directly with its contract.
|
|
54
75
|
- **Do not document the obvious.** If the API is self-explanatory, a complete code example is enough.
|
|
55
|
-
- Use
|
|
56
|
-
- **Be honest about trade-offs.**
|
|
76
|
+
- Use connected paragraphs to develop an explanation, headings to locate it, and lists or tables for real steps and comparisons.
|
|
77
|
+
- **Be honest about trade-offs.** Put a limit where it changes the reader's action or expectation, before risk when relevant; a separate wrong-fit section is useful only when it has something to explain.
|
|
57
78
|
- 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
79
|
|
|
59
80
|
## Diagrams
|
|
@@ -65,9 +86,9 @@ The project's voice is **direct, practical, and opinionated**. Write like an exp
|
|
|
65
86
|
- Prefer `record` types for events, commands, and read models — match the codebase.
|
|
66
87
|
- 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
88
|
- 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
|
-
- **State version requirements, not the test log.**
|
|
89
|
+
- **State version requirements, not the test log.** Name minimum, fixed or breaking releases and meaningful compatibility or peer ranges. Ordinary installation follows the supported latest-release path, not universal exact-patch pins; latest does not imply every package combination is compatible. Keep resolved versions in maintained manifests/lockfiles, or pin deliberately reproducible tutorials when needed. Preserve required security/deployment constraints and production image policy. Do not end a page with verification provenance (SDK build, image digest or SHA, date, "tested with", unrun samples); that belongs in the change summary. See **cratis-technical-examples**.
|
|
69
90
|
- **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.
|
|
70
|
-
- Where a feature spans products or languages, show both sides when both matter. Keep
|
|
91
|
+
- Where a feature spans products or languages, show both sides when both matter. Keep sequential backend-producer/frontend-consumer examples together. Tabs are alternatives for the same reader task, not evidence of client parity; apply the multi-client guidance in [Explaining code](../skills/cratis-engineering-docs-authoring/references/explaining-code.md) before choosing that shape.
|
|
71
92
|
|
|
72
93
|
## Links
|
|
73
94
|
|
|
@@ -88,3 +109,4 @@ The project's voice is **direct, practical, and opinionated**. Write like an exp
|
|
|
88
109
|
- Follow [Documentation Structure and Formatting](./documentation-structure-and-formatting.md) for frontmatter, landing pages, `toc.yml`, Markdown/MDX, links, and rendering.
|
|
89
110
|
- End every Markdown file with a single trailing newline.
|
|
90
111
|
- Run the owning repository's local documentation gate when present; use `cd ../Documentation/web && npm run check` for full-fidelity site verification when the sibling checkout is available.
|
|
112
|
+
- For a new or materially changed reader journey, use the **cratis-documentation-writing** [fresh-context reader review](../skills/cratis-documentation-writing/references/reader-review.md). Report unavailable review rather than calling an author's reread independent evidence; a passing build is not a comprehension check.
|
|
@@ -5,67 +5,70 @@ paths:
|
|
|
5
5
|
- "**/Documentation/**/*.mdx"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Writing Cratis
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
8
|
+
# Writing Cratis Documentation
|
|
9
|
+
|
|
10
|
+
Read and use **cratis-documentation-writing** to establish the reader's goal and
|
|
11
|
+
page purpose, then **cratis-engineering-docs-authoring** to draft from product
|
|
12
|
+
evidence. Before writing explanations beside examples, work through
|
|
13
|
+
[Explaining code](../skills/cratis-engineering-docs-authoring/references/explaining-code.md).
|
|
14
|
+
It shows how a concrete registration or directive can carry the explanation
|
|
15
|
+
without making the page read like a review form. Read a current, well-reviewed
|
|
16
|
+
tutorial in the product or a closely related product before writing, without
|
|
17
|
+
assuming its vocabulary fits this product.
|
|
18
|
+
|
|
19
|
+
Write as a developer explaining the code to another developer. Start with the
|
|
20
|
+
reader's problem, show the relevant example, and explain the part they cannot
|
|
21
|
+
see: why this type matters, what the call changes, or where responsibility
|
|
22
|
+
passes to another component. Let each paragraph develop that point. Use steps
|
|
23
|
+
for a procedure and a table for a comparison; neither replaces a connected
|
|
24
|
+
explanation. A reference entry can state its contract directly.
|
|
25
|
+
|
|
26
|
+
The example should also teach the intended idiom. Explain a tempting alternative
|
|
27
|
+
when it exposes a real trap, and put a limitation beside the action it affects.
|
|
28
|
+
Do not add a stock warning or a closing list of everything the product does not
|
|
29
|
+
do. A concrete recommendation with a source-backed reason is useful perspective;
|
|
30
|
+
an invented customer story or personal experience is not. Make the first example
|
|
31
|
+
the convention path: do not hand-register what the framework already discovers.
|
|
32
|
+
Explain that invisible wiring against the backend the reader actually built,
|
|
33
|
+
then show an observable result before introducing another concept.
|
|
34
|
+
|
|
35
|
+
Use **cratis-technical-examples** to verify code, configuration, commands and
|
|
36
|
+
results against the applicable product source. It is fine to explain the effect
|
|
37
|
+
of code that is absent, such as convention-based wiring, but establish that
|
|
38
|
+
effect first. Do not infer a second client's API or behavior from the first.
|
|
39
|
+
Read the multi-client section of **Explaining code** before choosing shared
|
|
40
|
+
prose, tabs or separate guides. Preserve the owning repository's snippet and
|
|
41
|
+
language-tab workflow rather than inventing another one. Show both the backend
|
|
42
|
+
contract and generated frontend shape when both matter, keeping required
|
|
43
|
+
producer/consumer actions sequential.
|
|
44
|
+
|
|
45
|
+
Choose presentation to support the reader, not decorate the page. The exact
|
|
46
|
+
Markdown/MDX boundary, aside semantics, component contracts and rendering checks
|
|
47
|
+
live in [Documentation Structure and Formatting](documentation-structure-and-formatting.md).
|
|
48
|
+
Use the owning site's supported components and inspect the emitted Markdown;
|
|
49
|
+
a raw source mirror is not proof that essential labels or warnings survive.
|
|
50
|
+
|
|
51
|
+
Link the guided explanation to exact reference and connect neighboring products
|
|
52
|
+
at their workflow seams instead of retelling their setup. A coming-from-X bridge
|
|
53
|
+
can put the reader's existing code beside the Cratis equivalent and explain
|
|
54
|
+
what changes. Keep that comparison fair and version-accurate, or label it
|
|
55
|
+
illustrative; say when the existing approach remains the better fit. It does
|
|
56
|
+
not impose universal navigation buckets.
|
|
57
|
+
|
|
58
|
+
Follow the [documentation rule](documentation.md) for naming, claims and version
|
|
59
|
+
constraints. The reader needs the minimum or compatibility boundary that changes
|
|
60
|
+
what they can run, not the author's source-checking diary. Keep verification
|
|
61
|
+
provenance in the private change summary. A rendered page, compiling example,
|
|
62
|
+
observed result and successful reader journey are different evidence.
|
|
63
|
+
|
|
64
|
+
Before returning a draft, read its explanation as prose: does it make the code
|
|
65
|
+
easier to understand, or merely name responsibilities and limitations? Use
|
|
66
|
+
**cratis-writing-voice-and-cadence** for an authorized revision, preserving
|
|
67
|
+
technical claims and approval boundaries. For a materially changed journey,
|
|
68
|
+
follow the reader-review procedure owned by **cratis-documentation-writing**;
|
|
69
|
+
report when independent review is unavailable. Do not edit generated copies,
|
|
70
|
+
change navigation, or publish as part of writing. Run the owning documentation
|
|
71
|
+
gate and, when available, the Documentation site's full check for attributable
|
|
72
|
+
lint and rendered-link errors. For a visual page, use the owning preview workflow
|
|
73
|
+
and inspect light and dark screenshots. Source ownership and the edit/sync/verify
|
|
74
|
+
loop live in [Editing Cratis Documentation](editing-cratis-docs.md).
|