Atlas Agent Guide#
Atlas exposes the same documentation through the web, package files, the CLI, and MCP. Use the smallest transport and context set that can answer the task.
Fast Path#
If your tool supports skills, run atlas skills install and start from the atlas skill. Each skill holds
the imports and patterns for one kind of work, which usually removes the need for the steps below.
- Fetch
https://wess.io/atlas/llms.txt. - Read this guide and the reference for each package the task actually uses.
- Use the API reference only when a signature is still unclear.
- Load the architecture overview only for cross-package design decisions.
- Run the repository checks before presenting generated code as complete.
Do not begin by loading every package reference. Atlas is intentionally composable; most changes need two or three packages.
Documentation Transports#
| Transport | Entry point | Best use |
|---|---|---|
| Concise web index | /atlas/llms.txt | Discover the minimum relevant sources |
| Complete web context | /atlas/llms-full.txt | One-fetch offline indexing or large-context work |
| Page Markdown | /atlas/docs/<name>/index.md | Fetch one canonical guide or package reference |
| Search index | /atlas/search.json | Programmatic title, description, kind, and text search |
| Skills | atlas skills [name] | Task patterns at the lowest token cost; atlas skills install copies them into a project |
| Installed CLI | atlas docs [name] | Read package-local docs without network access |
| MCP | atlas mcp | Discover docs and inspect a running Atlas application |
Every documentation HTML page declares its Markdown alternate and the covering llms.txt file in
the document head.
Import Rule#
Select released library modules with the Atlas installer:
bunx --package https://github.com/wess/atlas/releases/download/v0.5.1/wess-atlas-cli-0.5.1.tgz atlas add server config db/postgres db/query
See README.md for the release candidate's publication status. Import public
@wess/atlas/<module> entry points, for example @wess/atlas/server,
@wess/atlas/auth/password, or @wess/atlas/db/postgres. The installer includes
the selected implementation packages and their dependency closure. Applications
must build without source aliases, links, local tarballs, or a local Atlas checkout.
Keep exact coordinated Atlas versions and the application's lockfile.
Package Selection#
| Need | Read first | Common companions |
|---|---|---|
| Environment and configuration | config | server, db |
| SQL, schemas, and validation | db | migrate, admin |
| HTTP routes and responses | server | config, security |
| Login and sessions | auth | db, security, email |
| Authorization server | oauth | auth, security |
| Sign in with an identity provider | sso | auth, security |
| Files and object storage | storage | server, security |
| Redis-backed state | cache | server |
| Outbound HTTP | request | config |
| TLS edge routing | edge | server |
| React application blocks | ui | server, auth |
| Generated administration | admin | db, ui |
| Chat, retrieval, or tool loops | ai | request, server |
| Runtime introspection | mcp | the services being exposed |
| Commands and scaffolding | cli | the packages in the generated template |
Generation Contract#
When writing Atlas code:
- Use functions and immutable values. Do not introduce classes or mutate inputs.
- Prefer Bun and Web APIs over compatibility packages.
- Import from
@wess/atlas/<package>in consumer projects. - Read each selected package's canonical reference before inventing an export.
- Derive database row types with
RowOf<typeof schema>. - Compose HTTP behavior with
pipeline(); usehalt()for deliberate short-circuiting. - Use typed
route()validation rather than parsing the same request body manually. - Keep filenames lowercase with no dashes, underscores, or spaces.
- Route web apps with real paths through the History API, never
#routes or in-memory view state. - Put tests under
packages/<name>/test/when changing Atlas itself.
If a requested export is absent from the package reference and API lookup, treat it as absent. Do not infer an API from a neighboring framework or package.
MCP Workflow#
atlas mcp always exposes:
docs.listto discover package, guide, and root documentation identifiers.docs.readto read one canonical source.health.checkto report configured service connectivity.
Additional tools appear only when their service is present in the MCP context. Read-only
introspection includes schema, route, migration-status, cache-read, storage-list, and log-tail
operations. Migration, cache-write, cache-delete, and cache-flush tools exist only when writes are allowed
(ATLAS_MCP_ALLOW_WRITES=1), and these and other state-changing tools must
be treated as mutations, not discovery.
Recommended sequence:
- Call
docs.list. - Read the references needed for the task.
- Call
health.checkand read-only inspection tools. - Explain the intended mutation before invoking a state-changing tool.
- Re-read the affected state after the mutation.
Context Budgets#
Small#
Use llms.txt, this guide, and one package reference.
Feature#
Add the quick start or API reference plus every package directly involved in the feature.
Architecture#
Add the overview and references for both sides of each package boundary.
Complete#
Use llms-full.txt only when building a local index, working offline after one fetch, or when the
available context can hold the full corpus. It duplicates the sources linked by llms.txt.
Verification#
Run checks in this order:
bun run check
bun run typecheck
bun test
For documentation work, also run:
bun run site:build
bun test site/test/site.test.ts
For skills, also run bun run skills:verify, which typechecks every snippet against the source.
Generated code is not grounded until its imports exist, its package references agree with the usage, and the relevant checks pass.