Skip to content

Commit 76667a6

Browse files
committed
[add] skills for authoring docs & tutorials
1 parent 4404d56 commit 76667a6

5 files changed

Lines changed: 157 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# THIS IS AUTOGENERATED. DO NOT EDIT MANUALLY
2+
version = 1
3+
name = "lambda-rs"
4+
5+
[setup]
6+
script = "./scripts/setup.sh"
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
name: long-lived-docs-authoring
3+
description: Use when drafting or revising long-lived repository documentation such as specs, roadmaps, guides, feature docs, or planning docs that need Lambda's required metadata, structure, and documentation style. Do not use for tutorials; use `tutorial-authoring` instead.
4+
---
5+
6+
# Long Lived Docs Authoring
7+
8+
Use this skill for durable Markdown documents that are meant to stay in the
9+
repository and be maintained over time. The goal is to apply Lambda's
10+
documentation metadata, tone, and maintenance rules without keeping those
11+
details in the main task prompt.
12+
13+
## When To Use
14+
15+
- New or updated specifications in `docs/specs/`.
16+
- Roadmaps, plans, feature documents, and other durable docs in `docs/`.
17+
- Documentation changes that need YAML front matter, changelog discipline,
18+
and repository-specific style constraints.
19+
- Do not use this skill for tutorials in `docs/tutorials/`.
20+
- Do not use this skill for Rustdoc-only work.
21+
22+
## Workflow
23+
24+
1. Identify the document type and location.
25+
Use `docs/specs/_spec-template.md` for new specifications instead of
26+
starting from another spec.
27+
2. Add or preserve the metadata header.
28+
Long-lived docs require YAML front matter with these fields:
29+
`title`, `document_id`, `status`, `created`, `last_updated`, `version`,
30+
`engine_workspace_version`, `wgpu_version`, `shader_backend_default`,
31+
`winit_version`, `repo_commit`, `owners`, `reviewers`, and `tags`.
32+
3. Structure the document for maintenance.
33+
Keep sections short, scannable, and diff-friendly. Specifications should
34+
include a table of contents. Use stable headings and avoid unnecessary
35+
renames.
36+
4. Apply repository documentation style.
37+
Use clear, direct, neutral language in active voice. Prefer present tense.
38+
Avoid conversational phrasing, rhetorical questions, marketing language,
39+
speculation, emojis, exclamation-based emphasis, and AI authorship
40+
references.
41+
5. Use consistent technical terminology.
42+
Define acronyms on first use in each document. Prefer American English.
43+
Refer to crates by name, such as `lambda-rs` and `lambda-rs-platform`.
44+
Wrap code identifiers in backticks.
45+
6. Keep examples minimal and buildable.
46+
Use concise Rust sketches when proposing APIs. Mirror the repository's
47+
existing builder and command patterns. Use ASCII diagrams only and do not
48+
embed binaries.
49+
7. Update maintenance metadata on substantive edits.
50+
Update `last_updated`, bump `version` semantically, set `repo_commit` to
51+
`HEAD`, and append or update the `Changelog` section.
52+
53+
## Required Style Rules
54+
55+
- Use RFC-2119 keywords when the content is normative.
56+
- Prefer `Rationale` bullets instead of long "Why" paragraphs.
57+
- Keep bullets short when possible.
58+
- Avoid filler sentences and meta commentary such as "this aims to".
59+
- Do not make unscoped promises such as "we will add" without a linked issue.
60+
61+
## Validation Checklist
62+
63+
- Metadata header is present and complete.
64+
- The file uses stable headings and short sections.
65+
- The tone is professional, direct, and repository-aligned.
66+
- Acronyms are defined on first use.
67+
- Code snippets are minimal and stylistically consistent with the repository.
68+
- `last_updated`, `version`, `repo_commit`, and `Changelog` are updated for
69+
substantive edits.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: "Long-Lived Docs"
3+
short_description: "Author specs, guides, and durable docs"
4+
default_prompt: "Use $long-lived-docs-authoring to draft or revise a spec, roadmap, or guide for this repository."
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
name: tutorial-authoring
3+
description: Use when creating or revising step-by-step tutorials in `docs/tutorials/`. This skill applies Lambda's required metadata, instructional structure, tone, code-snippet rules, and validation expectations for tutorial documents.
4+
---
5+
6+
# Tutorial Authoring
7+
8+
Use this skill for tutorial documents that teach a discrete task in the
9+
repository. It includes the long-lived documentation rules that tutorials
10+
inherit, plus the additional section and narrative requirements specific to
11+
`docs/tutorials/`.
12+
13+
## When To Use
14+
15+
- New tutorials in `docs/tutorials/`.
16+
- Revisions to existing tutorials that change structure, examples, or prose.
17+
- Documentation tasks that teach a step-by-step workflow with validation and
18+
exercises.
19+
- Do not use this skill for generic guides, specs, or roadmaps outside
20+
`docs/tutorials/`.
21+
22+
## Workflow
23+
24+
1. Place the file correctly.
25+
Tutorials belong in `docs/tutorials/` and should use kebab-case file names.
26+
Include the `tutorial` tag in the metadata.
27+
2. Add the required metadata header.
28+
Tutorials use the same YAML front matter fields as other long-lived docs:
29+
`title`, `document_id`, `status`, `created`, `last_updated`, `version`,
30+
`engine_workspace_version`, `wgpu_version`, `shader_backend_default`,
31+
`winit_version`, `repo_commit`, `owners`, `reviewers`, and `tags`.
32+
3. Build the required section layout.
33+
Tutorials should include a table of contents and these sections:
34+
`Goals`, `Overview`, `Prerequisites`, `Implementation Steps`,
35+
`Validation`, `Notes`, `Conclusion`, `Exercises`, and `Changelog`.
36+
4. Write each implementation step as instruction plus outcome.
37+
Explain intent and rationale before each code block. After each code block,
38+
include a short paragraph describing the resulting state and why it matters.
39+
5. Keep the instructional tone precise.
40+
Use a book-like instructional narrative while staying professional and
41+
direct. Imperative phrasing is preferred. Limited second-person phrasing is
42+
acceptable when it clearly improves the instruction.
43+
6. Keep terminology and examples consistent.
44+
Define acronyms on first use, use terms such as `GPU`, `CPU`, `wgpu`,
45+
`bind group`, and `pipeline layout` consistently, and refer to identifiers
46+
with backticks.
47+
7. Keep code snippets minimal and repository-aligned.
48+
Match repository style: 2-space indentation, line width near 80 columns,
49+
explicit return statements, and no abbreviations or acronyms in code
50+
identifiers. Prefer workspace-relative file paths in prose and examples.
51+
8. Update maintenance metadata on substantive edits.
52+
Update `last_updated`, bump `version` semantically, set `repo_commit` to
53+
`HEAD`, and maintain the `Changelog`.
54+
55+
## Required Style Rules
56+
57+
- Use clear, direct, neutral language.
58+
- Prefer active voice and present tense.
59+
- Avoid conversational filler, rhetorical questions, emojis, marketing claims,
60+
speculation, and AI authorship references.
61+
- Use RFC-2119 keywords in `Notes` when the content is normative.
62+
- Do not include commentary about internal process documents or guideline
63+
updates.
64+
65+
## Validation Checklist
66+
67+
- The tutorial lives under `docs/tutorials/` with a kebab-case file name.
68+
- Metadata header and `tutorial` tag are present.
69+
- A table of contents is present.
70+
- All required sections are present and ordered clearly.
71+
- Each implementation step includes intent before the code and outcome after it.
72+
- Code snippets are minimal, buildable, and repository-aligned.
73+
- `Validation` contains exact commands and expected behavior.
74+
- `Exercises` contains 5 to 7 focused follow-up tasks.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: "Tutorial Authoring"
3+
short_description: "Write repository tutorials with the required structure"
4+
default_prompt: "Use $tutorial-authoring to create or revise a tutorial for this repository."

0 commit comments

Comments
 (0)