Octonode Playbook

Octonode knowledge index

Canonical Octonode repository documentation.

Octonode knowledge index

Community publications are never written to this trusted index. Their separate, explicitly labelled retrieval path and moderation gate are defined in Community publications.

The coding assistant retrieves Octonode architecture and authoring guidance from one Cloudflare Vectorize index named octonode-knowledge. The repository remains authoritative; Vectorize is a derived search index that can be deleted and rebuilt.

Data model

  • Embeddings use Workers AI @cf/baai/bge-base-en-v1.5 (768 dimensions, cosine distance, CLS pooling).
  • One octonode namespace contains bounded, heading-aware chunks from AGENTS.md, README.md, CONTRIBUTING.md, top-level docs/*.md except ROADMAP.md, and the code/plugin author skills.
  • Each vector stores its public source path, title, heading, content, digest, and document kind.
  • D1 records the active generation and chunk ids only. It supports atomic activation and stale-vector cleanup; it is not a second copy of the documents.
  • Project source, chat messages, prompts, credentials, and generated plans are never indexed.
  • Architecture and PR views may retrieve cited chunks as read-only context. Knowledge never owns a repository connection, PR, Project, Architecture edge, or implementation status.
  • Playbook is not a knowledge authority or domain relationship; it republishes the same reviewed repository Markdown that the corpus builder reads.

Search requires projects:read for the exact workspace/project. The private sync routes require OCTONODE_CLOUD_INTERNAL_TOKEN; callers cannot choose the Vectorize namespace or model.

Provision and synchronize

Create the index once, apply D1 migrations, deploy the Worker, then synchronize the corpus:

yarn wrangler vectorize create octonode-knowledge --dimensions=768 --metric=cosine --description="Canonical Octonode documentation and agent skill knowledge base" --config packages/cloudflare/wrangler.toml
yarn wrangler d1 migrations apply octonode_control --remote --config packages/cloudflare/wrangler.toml
yarn wrangler deploy --config packages/cloudflare/wrangler.toml
OCTONODE_CLOUD_API_URL=https://<worker> OCTONODE_CLOUD_INTERNAL_TOKEN=<secret> yarn knowledge:sync

yarn knowledge:sync --dry-run prints the deterministic generation, source count, chunk count, and stored dimensions without using Cloudflare. Run sync after canonical docs or either indexed skill changes. Re-running the same generation is safe; activation removes chunks from older generations.

Vectorize is derived and excluded from backups. Recovery is provisioning the index and running the sync command from the desired repository revision.

On this page