Bee Box

Bee Box is a personal assistant and operating system: agents process inputs, take actions, or ask questions. The filesystem is state, Git is history, and bbx is the command-line interface.

Work only on the requested problem. Do not expand scope into adjacent cleanup, policy, schemas, UI, or workflows without the boxholder's approval. Read the relevant code, schema, and tests before changing a format or contract.

Never copy private box content or personal operational details into tracked source, docs, tests, or public issues. Follow the monorepo root's private-issues/ boundary, and ask when publication safety is uncertain.

Development

The monorepo root instructions own worktrees, the shared dev router, browser evidence, issues, privacy, landing, and deployment effects. Within this package:

When committing, use plain git commit so hooks run, fix relevant failures, and leave no half-finished task changes. Never use --no-verify.

Production runs bundled dist/cli.mjs, not tsx. Resolve package assets through PACKAGE_ROOT in src/lib/package-root.ts. Deployment topology and rollback are in deploy/README.md.

Cards

Cards use YAML frontmatter plus a Markdown body and are named Name.<type>.card; the filename determines the schema. Attachments use the sibling Name.attach/ scope. Schemas live in src/schemas/, and boxes may add schemas through the public beebox/cards API. For format or attachment work, read the card format; for schema changes, the schema workflow; for changes to existing on-disk data, the migration runbook. The implemented RFC is design history, not the live manual.

Cards validate on load. When mutating existing card text, parse, change, and reserialize it; serialization follows schema field order and need not preserve the original frontmatter order. bbx validate and the hooks installed by bbx init provide broader validation; see card validation. Do not infer a card shape from an example when its schema is available.

Box Git trailers such as Created-By are structured metadata. Box commits use plain git commit so the installed pre-commit hook can run staged validation, link warnings, and the unlisted-binary guard.

Source Layout

Open the owner for the area being changed:

Boxes live outside this repository. A box is one package and operational root with shapeVersion: 3; box code imports only public beebox/{cards,schema,view-widgets} specifiers, never engine internals. Read the box layout before changing its on-disk shape.

Key Concepts

bbx wakeup preprocesses intake, runs housekeeping and wakeup scripts, syncs connectors, runs the reactor over pending jobs, finalizes outbound work, and pushes the box. Recurrence belongs to bbx tick; see the scheduler. Services wrap external dependencies behind typed real and fake implementations. Connectors implement filesystem synchronization. Procedures are YAML-frontmatter workflows under a box's configuration; see the procedure guide.

Behavioral Notes

Improving These Instructions

When a correction exposes missing durable guidance, put a short rule at the narrowest accurate owner: this file for package-wide constraints, a nested CLAUDE.md for an area, code-style.md or frontend.md for coding contracts, and docs/ for conditional reference material. New infrastructure must have a discoverable current owner. Do not use historical plans as live manuals.

Guides

Use the topic index to find a guide, and docs/README.md for documentation organization and naming. Common entry points are engineering principles, testing, cards, API endpoints, box layout, mobile contract, secrets, server operations, and deployment. Proposed work lives under docs/plans/; implemented plans and RFCs record history unless a current guide explicitly says otherwise.

@code-style.md