Boardflare Notebook Reference: Overview

Architecture, execution model, and guidelines for AI assistants.

This reference is the canonical guide for AI assistants and human developers working with Boardflare Python for Excel workbooks and the Boardflare Office add-in.

What is Boardflare?

Boardflare is an application-development platform for Microsoft Excel. It embeds a reactive Python environment powered by Marimo running in browser WebAssembly via Pyodide directly inside Excel’s shared runtime.

With Boardflare, a workbook becomes an interactive application: - Reactive Python Notebook: Write Python cells that automatically recalculate when upstream inputs change. - Worksheet Formulas: Publish computed data to Excel via =BF.OUTPUT("name") and callable Python functions via =BF.FUNCTION("name", arg1, ...). - Table Selection & Reactive Views: Read workbook inputs, track user selections in Excel tables, and compute dynamic derived views. - Durable Workbook Storage: Store the complete Marimo notebook source directly inside the .xlsx file (in the hidden _BOARDFLARE worksheet) so the application travels with the workbook without external file dependencies.

Two Reference Layers: User Guide vs. Technical Authoring

The Boardflare Notebook Reference maintains a strict split between two distinct layers of information depending on your task:

1. User Guide (Add-in Usage & End-User Support)

Consult these sections when assisting end users with the add-in, answering questions about features, or troubleshooting Excel formula errors: - 02-addin.md: Add-in installation, task pane navigation, Edit vs. App mode, saving, persistence indicators, and recovery. - 08-troubleshooting.md: Common spreadsheet formula errors (#BUSY!, #NAME?, #VALUE!, #SPILL!), recovery options, and user FAQ.

2. Technical Reference & Authoring Specification

Consult these sections when authoring, modifying, or programmatically inspecting Python for Excel workbooks and templates: - 03-workbook-editing.md: Hidden code sheet layout (_BOARDFLARE), A1–H11 cell definitions, and the AI handshake protocol (request counter in H1, response JSON in H2). - 04-python-notebooks.md: Marimo reactive execution rules, Anywidget communication, imports and dependencies, and Pyodide WebAssembly runtime constraints. - 05-boardflare-api.md: Canonical API reference for the boardflare (bf) package. - 06-workbook-design.md: Input ranges, table selections, and published outputs and functions. - 07-verification.md: Testing, verification protocol, error interpretation, and convergence checks. - 09-limits.md: Authoritative system limits, timeouts, and payload constraints. - 10-changelog.md: Release history and API evolution.

How AI Agents Should Use This Reference

When assisting users with a Boardflare workbook or modifying notebook code: 1. Identify the Task Layer: If answering questions about using the add-in or spreadsheet formula states, refer to the User Guide sections. If authoring or modifying code in _BOARDFLARE, refer to the Technical Authoring sections. 2. Respect the Boundaries: Never invent APIs or package imports. Boardflare runs in a strict zero-network Pyodide environment with a fixed set of pre-bundled packages. 3. Follow the Edit Loop: When modifying workbook code via Office.js or file editing, follow the deterministic handshake (increment H1, read H2) described in Workbook Editing. 4. Targeted Fixes: Inspect errors returned in the response JSON (H2) before making changes. Limit automated fix attempts to two iterations. 5. Verify Outputs: Verify that formulas resolve properly and do not show #BUSY!, #NAME?, #VALUE!, or #SPILL!.