Skip to content

Commit 4c56090

Browse files
marcel-rbroclaudeTC-MO
authored
docs: separate shared style guide from repo-specific config (#2304)
## Summary Separate general Apify writing style rules from repository-specific Markdown/Docusaurus conventions to enable future reuse across other Apify teams. - Move general formatting rules (headings, bold, italics, links, numbers, parallel structure) from content-standards.md into writing-style.md - Extract grammar mechanics into new grammar-rules.md - Refocus content-standards.md on Markdown/Docusaurus specifics (front matter, admonitions, code blocks, images) After this PR, general files (`writing-style.md`, `grammar-rules.md`, `terminology.md`) contain no repo-specific content and can be extracted into a shared repository. Repo-specific files (`content-standards.md`, `file-organization.md`, `quality-standards.md`) stay here. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Michał Olender <92638966+TC-MO@users.noreply.github.com>
1 parent 69d9eba commit 4c56090

13 files changed

Lines changed: 433 additions & 405 deletions

File tree

.claude/README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ This directory contains Claude Code configuration for the Apify documentation re
99
├── README.md # This file - Quick start guide
1010
├── instructions.md # Main instructions for Claude Code
1111
├── rules/ # Canonical standards (auto-loaded)
12-
│ ├── writing-style.md # Language, tone, grammar
13-
│ ├── content-standards.md # Formatting, front matter, code
14-
│ ├── terminology.md # Apify-specific terms
12+
│ ├── writing-style.md # Prose voice and tone
13+
│ ├── content-standards.md # Formatting and structure
14+
│ ├── terminology.md # Product names and capitalization
1515
│ ├── file-organization.md # Naming conventions
16+
│ ├── grammar-rules.md # Grammar mechanics, punctuation, numbers, brand spelling
1617
│ └── quality-standards.md # Quality checklist
1718
└── skills/ # Reusable skills for common tasks
1819
├── doc-write/ # Documentation writing skill
@@ -73,11 +74,12 @@ Use /review-docs skill to review sources/platform/[file-name].md
7374

7475
All documentation standards are in `.claude/rules/` (auto-loaded):
7576

76-
1. **`writing-style.md`** - Language, tone, grammar, headings, word choice
77-
2. **`content-standards.md`** - Front matter, formatting, code examples, links, images
78-
3. **`terminology.md`** - Apify-specific capitalization and product names
79-
4. **`file-organization.md`** - File naming and directory structure
80-
5. **`quality-standards.md`** - Comprehensive pre-submission checklist
77+
1. **`writing-style.md`** - Prose voice and tone
78+
1. **`content-standards.md`** - Formatting and structure
79+
1. **`terminology.md`** - Product names and capitalization
80+
1. **`grammar-rules.md`** - Grammar mechanics, punctuation, numbers, brand spelling
81+
1. **`file-organization.md`** - File naming and directory structure
82+
1. **`quality-standards.md`** - Complete quality checklist
8183

8284
Also reference:
8385

@@ -92,16 +94,17 @@ Before submitting:
9294
```bash
9395
npm run lint:md # Check markdown
9496
npm run lint:code # Check code
97+
vale "path/to/file.md" --minAlertLevel=error # Check prose style
98+
npm run openapi:lint # Validate OpenAPI specs
9599
npm start # Preview changes
96-
npm test # Validate API specs
97100
```
98101

99102
## Best practices
100103

101-
1. **Read `AGENTS.md` first** - Vendor-agnostic documentation standards
104+
1. **Read `CLAUDE.md` first**
102105
2. **Check `.claude/rules/`** - Auto-loaded standards for writing, formatting, terminology
103106
3. **Use the appropriate skill** - Designed for specific documentation tasks
104-
4. **Run linters before committing** - `npm run lint:md` and `npm run lint:code`
107+
4. **Run linters before committing** - `npm run lint:md`, `npm run lint:code`, and `vale`
105108
5. **Review before submit** - Use `/review-docs` skill for final checks
106109

107110
## Need help?

.claude/claude.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"instructions": "instructions.md",
33
"context": [
4-
"../AGENTS.md",
54
"../CONTRIBUTING.md"
65
]
76
}

.claude/instructions.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
# Claude Code instructions for Apify documentation
22

3-
Read `AGENTS.md` first - it is the single source of truth for project architecture, commands, writing style, and terminology.
4-
5-
## Claude Code specifics
6-
7-
Detailed documentation standards are auto-loaded from `.claude/rules/`:
8-
9-
- `writing-style.md` - Language, tone, grammar, headings
10-
- `content-standards.md` - Front matter, formatting, code examples, links, images
11-
- `terminology.md` - Apify product capitalization
12-
- `file-organization.md` - Naming and directory structure
13-
- `quality-standards.md` - Pre-submission checklist
14-
15-
These rules expand on the standards in `AGENTS.md` with detailed examples and tables.
3+
`CLAUDE.md` (symlink to `AGENTS.md`) covers project architecture, commands, and common pitfalls. Documentation standards are auto-loaded from `.claude/rules/` - those are the canonical source for all writing, formatting, and terminology rules.
164

175
## Available skills
186

.claude/rules/content-standards.md

Lines changed: 8 additions & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
---
2-
description: Standard formatting rules for all Apify documentation
3-
globs: ["sources/**/*.md", "sources/**/*.mdx"]
4-
alwaysApply: true
5-
---
6-
71
# Content Standards
82

9-
Canonical formatting standards for all Apify documentation. These rules ensure consistency across platform docs, academy tutorials, and API references.
3+
Markdown and Docusaurus formatting standards for Apify documentation. For general writing style rules (headings, text formatting, links, numbers), see `writing-style.md`.
104

115
## Front matter requirements
126

@@ -56,97 +50,18 @@ slug: /academy/tutorials/web-scraper
5650
---
5751
```
5852

59-
## Headings
60-
61-
### Casing
62-
63-
**Sentence case only.** Capitalize only the first word and proper nouns.
64-
65-
#### Common mistakes
66-
67-
| Avoid (Title Case) | Prefer (Sentence case) | Rule |
68-
|-------------------|------------------------|------|
69-
| Store And Manage Data | Store and manage data | Lowercase articles, conjunctions, prepositions |
70-
| Getting Started With Actors | Get started with Actors | "Actors" stays capitalized (Apify product name) |
71-
| Use The Apify SDK | Use the Apify SDK | "SDK" stays capitalized (acronym) |
72-
| Advanced Web Scraping Techniques | Advanced web scraping techniques | Lowercase generic terms |
73-
| Configure GitHub Actions | Configure GitHub Actions | Preserve proper noun capitalization |
74-
| Connect To Google Sheets | Connect to Google Sheets | Lowercase prepositions ("to") |
75-
| Set Up Your Environment | Set up your environment | Lowercase articles ("your") |
76-
| API Reference Documentation | API reference documentation | Keep acronyms capitalized, rest lowercase |
77-
| Working With Docker Containers | Work with Docker containers | "Docker" stays capitalized (product name) |
78-
| Extend The Base Image | Extend the base image | Lowercase "the" mid-sentence |
79-
| How Do I Start? | How do I start? | Capitalize "I" in questions |
80-
| Understanding Request Queues | Understand request queues | Lowercase feature names |
81-
| Enable Standby Mode | Enable standby mode | Lowercase mode names |
82-
| Access The Apify Console | Access the Apify Console | "Apify Console" stays capitalized (product) |
83-
| Run Your First Actor | Run your first Actor | "Actor" capitalized, "your" lowercase |
84-
| Manage Node Modules | Manage node modules | Lowercase generic terms |
85-
| Step 1: install the dependencies | Step 1: Install the dependencies | Capitalize after colon (starts new clause) |
86-
| Option 2: use the alternative approach | Option 2: Use the alternative approach | Capitalize after colon (starts new clause) |
53+
## Heading hierarchy
8754

88-
### Form
89-
90-
**No gerunds (-ing forms).** Use noun phrases or imperatives.
91-
92-
| Avoid | Prefer |
93-
|-------|--------|
94-
| Finding available tags | Available tags |
95-
| Getting started with Actors | Get started with Actors |
96-
| Understanding the API | API overview |
97-
98-
### Hierarchy
99-
100-
Follow proper heading hierarchy: H1 → H2 → H3. Never skip levels.
55+
Follow proper heading hierarchy: H2 → H3 → H4. Never skip levels. (H1 is the page title, set in front matter)
10156

10257
```markdown
103-
# Page Title (H1 - only one per page, usually from front matter)
104-
105-
## Main Section (H2)
58+
## Main section (H2)
10659

10760
### Subsection (H3)
10861

10962
#### Detail (H4 - use sparingly)
11063
```
11164

112-
## Text formatting
113-
114-
### Bold
115-
116-
**Do use bold for:**
117-
- UI elements (buttons, menus, fields, tabs)
118-
- Critical warnings or key terms that must stand out
119-
120-
**Don't use bold for:**
121-
- List introductions or section labels
122-
- Code block introductions
123-
- General emphasis (use italics instead)
124-
- Structural labels when context is clear
125-
126-
| Avoid | Prefer |
127-
|-------|--------|
128-
| **Examples:** | Examples: |
129-
| **In your Dockerfile**, use... | In your `Dockerfile`, use... |
130-
131-
### Italics
132-
133-
Use italics for emphasis and introducing new terms:
134-
135-
| Use case | Example |
136-
|----------|---------|
137-
| New term introduction | An *Actor* is a serverless program... |
138-
| Emphasis | This step is *required* for the Actor to work |
139-
140-
### Code formatting
141-
142-
Use backticks for inline code:
143-
144-
- File names: `Dockerfile`, `package.json`, `.actor/actor.json`
145-
- Commands: `npm install`, `docker build`
146-
- Config keys: `actorSpecification`, `dockerfile`
147-
- Variable names: `API_TOKEN`, `userId`
148-
- Code values: `true`, `null`, `"string"`
149-
15065
## Admonitions
15166

15267
Use Docusaurus admonitions for important information. **All admonitions MUST have titles.**
@@ -268,27 +183,6 @@ FROM apify/actor-node-playwright:22
268183

269184
## Links
270185

271-
### Descriptive link text
272-
273-
Use action-oriented, descriptive link text. Avoid generic phrases like "click here" or "this link" - screen readers often read links out of context.
274-
275-
| Avoid | Prefer |
276-
|-------|--------|
277-
| `[Click here](url)` to learn more | `[Learn about Actor pricing](url)` |
278-
| Read more about it `[here](url)` | Read the `[Actor development guide](url)` |
279-
| See the `[documentation](url)` | `[Read the API documentation](url)` |
280-
281-
### Action verbs for links
282-
283-
Match the verb to the content type:
284-
285-
| Content type | Verbs |
286-
|--------------|-------|
287-
| Documentation | Read, View, Check, See |
288-
| Tutorials | Learn, Build, Follow |
289-
| Reference | Access, Browse, Explore |
290-
| Examples | View, Try, Clone |
291-
292186
### Internal vs external links
293187

294188
**Internal links** (within apify-docs):
@@ -299,17 +193,6 @@ Match the verb to the content type:
299193
- Use full URLs: `[Playwright](https://playwright.dev)`
300194
- Make tool mentions navigable
301195

302-
### Actor references
303-
304-
First mention: Actor name with link, capitalized.
305-
306-
```markdown
307-
[Website Content Crawler](https://apify.com/apify/website-content-crawler)
308-
can crawl websites and extract text content.
309-
```
310-
311-
Subsequent mentions: Just the name, no link needed.
312-
313196
## Images
314197

315198
### Alt text
@@ -352,53 +235,15 @@ platform/
352235
│ └── run-button.png
353236
```
354237

355-
## Numbers and formatting
356-
357-
### Thousands and decimals
358-
359-
- Thousands: comma separator ($1,000)
360-
- Decimals: period ($9.8)
361-
362-
### Money
363-
364-
- Symbol before amount: $49 (not 49$)
365-
- Include currency: $49 USD for international context
366-
367-
### Dates
368-
369-
- Format: Month Day, Year
370-
- Example: August 5, 2024
371-
- Never: 5.8.2024 or 2024-08-05 in prose (ISO format OK in code)
372-
373-
### Time
374-
375-
- Format: 12-hour with space before AM/PM
376-
- Example: 5 PM, 11:30 AM
377-
- Uppercase: PM (not pm or p.m.)
378-
379-
## Parallel structure
380-
381-
All items in a list must follow the same grammatical pattern:
382-
383-
**Avoid - mixed patterns:**
384-
```markdown
385-
1. Reproducibility - your builds behave the same
386-
1. Predictability - you know which version
387-
1. Easier to track down issues
388-
```
389-
390-
**Prefer - consistent pattern:**
391-
```markdown
392-
1. Reproducibility - Your builds behave the same way
393-
1. Predictability - You know exactly which version you're running
394-
1. Debugging - Version-specific issues are easier to track down
395-
```
238+
## Lists
396239

397-
## List types
240+
### List types
398241

399242
- **Numbered lists**: Sequential steps where order matters
400243
- **Bullet points**: Non-sequential items, features, options
401244

245+
### Numbered list convention
246+
402247
In numbered lists, use `1.` for all items (not sequential numbers):
403248

404249
```markdown

.claude/rules/file-organization.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
---
2-
description: File naming conventions and directory structure standards
3-
globs: ["sources/**/*"]
4-
alwaysApply: true
5-
---
6-
71
# File Organization Rules
82

93
## Naming conventions

0 commit comments

Comments
 (0)