Bitso's service documentation standardization based on RFC-37. Validates directory structure, Confluence metadata, and content with bitso-documentation-linter...
Implements RFC-37 for standardized markdown documentation that mirrors to Confluence.
š references/ - Detailed documentation
š¦ assets/ - Templates and resources
Install the linter (see references/installation.md):
brew tap bitsoex/homebrew-bitso
brew install bitso-documentation-linter
Create directory structure:
mkdir -p docs/{decisions,how-tos,runbooks}
mkdir -p docs/my-service/{concepts,getting-started}
Create Confluence config (see references/confluence-metadata.md):
# Copy and edit the template
cp assets/mark.toml.template docs/mark.toml
Validate:
doclinter --repo-path . --verbose
doclinter tree --repo-path . # Preview Confluence hierarchy
docs/
āāā api/ # API documentation
ā āāā async/ # Event-driven APIs
ā āāā grpc/ # gRPC APIs
ā āāā rest/ # REST APIs
āāā decisions/ # Architecture Decision Records (required)
āāā how-tos/ # Step-by-step guides (required)
ā āāā local-execution.md # REQUIRED for all services
āāā runbooks/ # Operational procedures (required)
āāā <service-name>/ # Service-specific docs
āāā concepts/ # Architecture, design (required)
āāā getting-started/ # Quick start (required)
Every service MUST have:
Local Execution (docs/how-tos/local-execution.md)
Service Concepts (docs/<service>/concepts/)
Run the linter to check compliance:
# Basic validation
doclinter --repo-path .
# Verbose with metrics
doclinter --repo-path . --verbose
# Preview Confluence tree
doclinter tree --repo-path .
# With Confluence API validation
CONFLUENCE_ENABLED=true doclinter --repo-path .
For full validation rules, see references/validation-rules.md.
Scripts are implemented in .scripts/lib/skills/rfc-37.ts:
# Via skills CLI
node .scripts/skills-cli.ts rfc-37 validate
node .scripts/skills-cli.ts rfc-37 lint
| Function | Description |
|---|---|
validate(dir) |
Validate RFC-37 directory structure |
lint(dir) |
Run full documentation linting |
checkLinterInstalled() |
Check if doclinter is available |
generateTree(dir) |
Generate Confluence tree preview |
| Reference | Description |
|---|---|
| references/rfc-37.md | RFC-37 summary and requirements |
| references/validation-rules.md | All 10 linter rules with examples |
| references/confluence-metadata.md | Confluence config (mark.toml, metadata) |
| references/installation.md | Linter installation guide |
| references/ai-fixes.md | AI-assisted documentation fixes |
| Asset | Description |
|---|---|
| assets/mark.toml.template | Confluence config template |
| assets/doclinterrc.yml.template | Linter config template |
| assets/local-execution.md.template | Local execution doc template |
The linter has extensive documentation at github.com/bitsoex/bitso-documentation-linter:
agent-hooks - For integrating linting into IDE hooksquality-gateway - For comprehensive quality checksdoc-sync - For keeping docs in sync with code