Use this outline for library-style workspaces. Common folders include packages/*, libs/*, modules/*, crates/*, sdk/*, clients/*, adapters/*, plugins/*, tools/*, and library examples. Folder names are signals, not rules; choose this template for publishable libraries, internal shared packages, SDKs, adapters, storage packages, clients, tools, and codegen packages.
# `<package-name>`
Badges, when useful.
Language links, when localized READMEs exist.
Important warning, breaking change, compatibility note, or version note.
One paragraph explaining what this package does, who should use it, and the primary outcome it enables.
It supports:
- Capability 1
- Capability 2
- Capability 3
Boundary note explaining runtime/framework independence and what the package does not do.
## Architecture
Summarize this package's role in the dependency graph in one short paragraph or compact diagram.
Example:
`schema primitives` -> `validation helpers` -> `runtime adapters`
Use professional terms such as primitives, core, adapter, driver, provider, transport, boundary, integration, and runtime. Keep this section concise; link to deeper docs instead of writing a full design essay.
## Requirements
List required runtime, credentials, peer services, package manager, framework version, or generated files.
## Getting started
Install/import command and shortest setup path.
## Configuration
Document required config fields with a table when the package exposes configuration.
## Usage
Show common tasks in increasing complexity.
## API
Document important exports, methods, response shapes, or interfaces.
## Guides
Link to task-oriented docs when the package has multi-step workflows.
## Reference
Link to detailed API/config/reference docs when the README would become too large.
## Runtime notes
Call out supported runtimes, browser/Node/Worker boundaries, security behavior, and performance assumptions.
## Gotchas / Troubleshooting
Only include issues users are likely to hit.
## Migrating
Add only when there are versioned breaking changes or migration paths.- Identity and trust: name, badges, language links.
- Risk first: warnings and breaking changes before overview.
- Positioning: what it is, who uses it, what outcome it enables.
- Capabilities: scannable bullets that match why users arrived.
- Boundaries: what the package does not own.
- Architecture: concise dependency role and integration boundary.
- Requirements: what readers need before installation or usage works.
- Getting started: shortest working path.
- Usage/API: common workflows first, detailed facts second.
- Guides/reference: route deeper content out of the README.
- Runtime notes/gotchas/migration: keep operational knowledge discoverable without blocking new users.
For low-level API/client packages:
- Explain required credentials or tokens.
- Show client initialization.
- Document request methods, options, retries, custom fetch, response shape, and errors.
- Include typed usage if TypeScript is central.
For core libraries:
- Explain framework/runtime independence.
- Document initialization.
- Explain major capabilities such as auth, sessions, webhooks, billing, clients, or runtime adapters.
- Link to deeper reference docs instead of bloating README.
For framework adapters:
- Explain which core package is wrapped.
- Show required routes, middleware/hooks, server config, frontend provider, headers, and testing helpers.
- Call out framework version requirements and migration status.
For storage or infrastructure adapters:
- State the shared interface implemented.
- Show constructor options.
- Document schema/table/namespace requirements.
- Call out migrations, refresh-token support, local-development caveats, and production warnings.
For tooling/codegen packages:
- Explain what files are generated and why.
- Show minimal config.
- Document exported helpers from low-level to high-level convenience APIs.
- Include multi-project examples only when common.