Documentation Principles
Comprehensive, accurate, and reader-focused documentation practices for consistent knowledge sharing
- • Follow the "Write Once, Use Everywhere" philosophy
- • Maintain single source of truth for all technical content
- • Use versioned documentation matching software releases
- • Prioritize clarity over completeness in all documentation
Best Practice:
Write for your future self and new contributors - explain why, not just what
- • Keep documentation DRY (Don't Repeat Yourself)
- • Use active voice and present tense
- • Write in full sentences even for code comments
- • Include practical examples with clear context
- • Add version indicators for breaking changes
```js
// v2.1.0 - Added async support
await fetchData();
```
// fetch data
- • All documentation changes require peer review
- • Include technical writers in PR reviews for complex changes
- • Run doc linter:
npm run lint:docs
- • Test documentation builds locally first
- • Add changelog entries for user-facing docs
# API Reference
## `auth.login(options)`
Authenticate a user with the platform.
**Params**:
- `username` - string
- `password` - string
- `rememberMe` - boolean (default: false)
**Returns**:
Promise with user object or authentication error.
**Example**:
```js
const user = await auth.login({
username: 'developer',
password: 'secure123',
});
```