Owner: Winnie (main)
Status: Active — Phase 5 in progress
BASS is the private knowledge base for OpenClaw. It serves as a single-source-of-truth documentation site for agent operating procedures, project status, architecture decisions, and operational reference.
Built on Astro Starlight and deployed to Cloudflare Pages, BASS combines:
- Static docs site (Starlight) for human and agent browsing
- D1 database (Cloudflare) for task and decision persistence
- Worker API for programmatic access
- MCP JSON-RPC endpoint for agent tool integration
| Layer | Technology |
|---|
| Docs framework | Astro Starlight v0.37.6 / Astro v5.6.1 |
| Adapter | @astrojs/cloudflare (server output) |
| Database | Cloudflare D1 (bass-db) |
| Deployment | Cloudflare Pages via wrangler |
| Build output | ./dist |
| File | Purpose |
|---|
astro.config.mjs | Starlight config — title, sidebar, head scripts |
wrangler.toml | Cloudflare Pages config (name=bass) |
src/content/docs/index.mdx | Homepage (splash template + CardGrid) |
src/db/schema.sql | D1 database schema |
src/lib/db.ts | API helpers (getDB, checkAuth, logActivity, json, unauthorized) |
src/env.d.ts | Cloudflare Workers types |
| Endpoint | Methods | Purpose |
|---|
/api/health | GET | Health check: {ok, timestamp, version} |
/api/tasks | GET, POST | Task management (filter: status, project, agent) |
/api/tasks/:id | GET, PATCH, DELETE | Single task operations |
/api/decisions | GET, POST | Decision log |
/api/activity | GET, POST | Activity feed (filter: agent, entity_type) |
Auth: Authorization: Bearer <BASS_API_KEY> required on all write endpoints (POST/PATCH/DELETE).
| Phase | Description | Status |
|---|
| Phase 1 | Astro Starlight scaffold + Cloudflare Pages deployment | ✅ Done |
| Phase 2 | D1 schema + Worker API for task management | ✅ Done |
| Phase 3 | MCP JSON-RPC endpoint | ✅ Done |
| Phase 4 | Infrastructure hardening and config | ✅ Done |
| Phase | Description | Status |
|---|
| Phase 5 | Seed knowledge pages from memory/ | 🔄 In progress |
| Phase 6 | TBD | Pending |
| Phase 7 | TBD | Pending |
| Phase 8 | TBD | Pending |
npm run build exits 0.
- Known harmless warnings: Cloudflare KV sessions, sharp runtime, missing sitemap
site option.
BASS_API_KEY stored as Cloudflare Pages secret (not in [vars]).
- D1 binding:
DB → bass-db. Apply schema: wrangler d1 execute bass-db --file=src/db/schema.sql.
- Sidebar uses
autogenerate: { directory: '...' } for each section.
- Dark mode: set via
head script that writes localStorage('starlight-theme', 'dark') for new visitors.
defaultColorMode is NOT a valid Starlight 0.37.x config key.