# BWOC Framework — full context for LLMs Source: https://github.com/bemindlabs/bwoc-framework (README on main, MIT). Site: https://bwoc.bemind.tech/. Version 3.17.0 (release v2026.10.14-0). ## What It Is BWOC provides a **template and doctrine** for creating AI coding agents with a consistent, principled foundation: - **One repo, one agent** — each agent lives in its own repository cloned from the template - **Backend-neutral** — one `AGENTS.md` runs on twenty-one declared backends: Claude, Antigravity, Codex, Kimi, Copilot, Grok, Pi, Oh My Pi, Devin, Droid, OpenCode, Kilo, Hermes, Qoder, Qwen Code, Cursor, Mastra Code, or self-hosted / hosted models via `bwoc-harness` (Ollama, any OpenAI-compatible endpoint, OpenRouter, LiteLLM) - **Persistent memory** — accumulates knowledge across sessions with impermanence-aware pruning - **Multi-agent safe** — multiple agents co-operate in the same repo without collision ## Why Buddhist Frameworks Buddhist thinking addresses areas where Western engineering frameworks (DDD, Clean Architecture, SOLID) are thin: **state impermanence, failure tracing, lifecycle, inter-agent trust, and threat modeling**. | Engineering Problem | Buddhist Framework | | ----------------------- | --------------------------------------------------- | | Problem solving | Ariyasacca 4 (Four Noble Truths) | | Functional requirements | Magga 8 (Noble Eightfold Path) | | System architecture | Khandha 5 (Five Aggregates) | | State & impermanence | Tilakkhaṇa (Three Marks) | | Failure analysis | Paṭiccasamuppāda (Dependent Origination) | | Audit logging | Kamma 3 (Three Doors of Action) | | Observability | Satipaṭṭhāna 4 (Four Foundations) | | Agent lifecycle | Bhāvanā 4 (Four Cultivations) | | Self-improvement | Paññā 3 (Three Roots of Wisdom) | | Capability maturity | Ariya-dhana 7 (Seven Noble Treasures) | | Error UX | Brahmavihāra 4 (Four Divine Abidings) | | Inter-agent trust | Kalyāṇamitta 7 (Seven Qualities of a Good Friend) | | Threat modeling | Taṇhā 3 (Three Cravings) | | Baseline security | Sīla 5 (Five Precepts) | | Fleet governance | Aparihāniya-dhamma 7 (Seven Non-Decline Principles) | ## The 22 Frameworks Organized into six groups — see [`PHILOSOPHY.en.md`](https://github.com/bemindlabs/bwoc-framework/blob/main/modules/agent-template/docs/en/PHILOSOPHY.en.md) for full mappings. ### A — Process Ariyasacca 4 · Magga 8 · Khandha 5 ### B — State Tilakkhaṇa · Paṭiccasamuppāda · Kamma 3 ### C — Growth Iddhipāda 4 · Bhāvanā 4 · Paññā 3 · Ariya-dhana 7 ### D — Relational Sappurisadhamma 7 · Saṅgahavatthu 4 · Sāraṇīyadhamma 6 · Brahmavihāra 4 · Kalyāṇamitta 7 ### E — Discipline Yoniso Manasikāra · Acinteyya 4 · Satipaṭṭhāna 4 · Padhāna 4 ### F — Governance Aparihāniya-dhamma 7 · Taṇhā 3 · Sīla 5 ## Five Principles to Know First ### 1. Yoniso Manasikāra — Verify Before Act Memory is a past claim. Verify against present state before acting on it. ### 2. Mattaññutā — Right Amount `MEMORY.md` ≤ 200 lines. Forces selection of what actually matters. ### 3. Anattā — Non-Clinging Task done → cleanup worktree → delete branch. No attachment to past state. ### 4. Samānattatā — Equal Treatment All backends receive equal treatment. No vendor favoritism in tooling. ### 5. Sīla-sāmaññatā — Communal Convention All agents run under the same rules via `conventions.md` and a neutrality check. ## Crates | Crate | Kind | What it does | | --- | --- | --- | | [`bwoc-core`](https://github.com/bemindlabs/bwoc-framework/blob/main/crates/bwoc-core) | lib | Shared types — manifest, workspace/agent registry, schema versioning, lifecycle, trust labeling, `chat_proto`, idempotency ledger, loop control, env-scrub, sibling-binary resolution. **Lean + dep-quarantined**: every crate except `bwoc-signing` and `bwoc-deep-memory` depends on it, so it in turn depends on almost nothing (`serde`, `serde_json`, `toml`, `thiserror`). | | [`bwoc-cli`](https://github.com/bemindlabs/bwoc-framework/blob/main/crates/bwoc-cli) | bin `bwoc` | The operator CLI — `init` · `new` · `list` · `spawn` · `chat` (`--tui`) · `run` · `start`/`stop`/`supervise` · `dashboard` · `loop` · `monitor` · `digest` · `check` · `migrate` · `audit` · `send` · `task` · `team`. | | [`bwoc-agent`](https://github.com/bemindlabs/bwoc-framework/blob/main/crates/bwoc-agent) | bin `bwoc-agent` | The per-agent daemon (`--serve`) — Unix control socket (PING/STATUS/STOP), inbox polling + auto-process, and Saṅgha task-watch. | | [`bwoc-harness`](https://github.com/bemindlabs/bwoc-framework/blob/main/crates/bwoc-harness) | bin + lib | The self-hosted agentic run loop for the `ollama` / `openai-compatible` / `openrouter` / `litellm` backends — tool set, capability gate → guardrails → permission → sandbox pipeline (with `--unrestricted` to lift the workdir path sandbox), OpenTelemetry, Saṅgha lead/worker (`--lead --loop`), checkpoint/resume, MCP client, and the interactive `--chat` session (streaming, persistent memory, live permission modes). | | [`bwoc-tui`](https://github.com/bemindlabs/bwoc-framework/blob/main/crates/bwoc-tui) | lib | The ratatui chat client behind `bwoc chat --tui`, plus the multi-agent fleet view (`--fleet`) — renders the `chat_proto` stream from `bwoc-harness --chat`. | | [`bwoc-loop-tui`](https://github.com/bemindlabs/bwoc-framework/blob/main/crates/bwoc-loop-tui) | lib | The `bwoc loop` control center — watch a team's task list drive toward Definition-of-Done, start/stop the goal-loop, and edit tasks · ticker · budget · plan approvals in place. | | [`bwoc-signing`](https://github.com/bemindlabs/bwoc-framework/blob/main/crates/bwoc-signing) | lib | ed25519 signing primitives for the trust layer. | | [`bwoc-a2a`](https://github.com/bemindlabs/bwoc-framework/blob/main/crates/bwoc-a2a) | bin + lib | Agent-to-agent transport (A2A protocol) — signed envelopes, agent cards, JSON-RPC serve/client, cross-workspace identity. | | [`bwoc-connect`](https://github.com/bemindlabs/bwoc-framework/blob/main/crates/bwoc-connect) | bin + lib | Chat connectors bridging external platforms into an agent's inbox. Dependency-heavy by design, so it stays out-of-process — [`bwoc-agent`](https://github.com/bemindlabs/bwoc-framework/blob/main/crates/bwoc-agent) supervises it as a subprocess. | | [`bwoc-mqtt`](https://github.com/bemindlabs/bwoc-framework/blob/main/crates/bwoc-mqtt) | bin + lib | MQTT transport for inter-workspace routing — publish an envelope to a broker, or `serve` (subscribe → deliver into `inbox.jsonl`). | | [`bwoc-deep-memory`](https://github.com/bemindlabs/bwoc-framework/blob/main/crates/bwoc-deep-memory) | bin + lib | Tier-2 deep memory — mine past sessions into durable recall, searchable from an agent's turn. Deliberately out-of-process: it talks over a CLI contract and does **not** depend on `bwoc-core`. |