Documentation Index
Fetch the complete documentation index at: https://docs.coreflux.org/llms.txt
Use this file to discover all available pages before exploring further.
Keeping Notebooks Clean and Readable
A well-organized notebook is living documentation. Six months from now, a teammate (or you) should be able to open the file and immediately understand what every cell does and why.When to Reach for This
From day one, regardless of project size. Good notebook discipline is cheap to start and expensive to retrofit — by the time your single notebook is hard to navigate, splitting it up means re-reading every cell to figure out where it belongs.Single File or Multiple Files?
There’s no single right answer — it’s a project preference. Both approaches are valid, and both can produce clean, maintainable systems.| Approach | Best for | Pros | Trade-offs |
|---|---|---|---|
| Single file | Small projects, demos, single-concern systems, getting started | Easy to share and review, everything in one place, simple to deploy as a unit | Long files take longer to navigate, harder to deploy parts selectively, awkward for teams editing in parallel |
| Multiple files in a folder | Larger projects, multi-concern systems, team collaboration | Easy to find specific concerns, parallel work without conflicts, selective deployment per file | More files to track, requires a clear naming convention |
Cell Discipline (Applies Either Way)
A few habits make notebooks self-explanatory regardless of how many files you have:- One markdown cell before every LoT cell. State what the next cell does, why it exists, and what topics it reads or publishes. The markdown cell is the contract; the LoT cell is the implementation.
- One definition per LoT cell. One Action, one Model, or one Route per cell — never bundled. This makes selective re-deployment trivial and keeps execution traces readable.
- Section headers as standalone markdown cells. Use
##headers to break content into logical sections (## Inverter Models,## Aggregation Actions,## Alarm Logic). VS Code’s outline view turns these into a clickable table of contents within the file. - An intro markdown cell at the top. What’s in this file, what other notebooks (if any) it depends on, what topics it owns.
Single-File Layout
When everything lives in one notebook, lean on section headers to keep it navigable:Multi-File Layout
For larger projects, one notebook per concern. Numbering reflects the deploy order — define Models before the Actions that publish them, define Routes before the Actions that trigger them.What This Looks Like in Practice
A snippet from a Models notebook (or the## Models section of a single-file project):
Inverter Models
Standard schemas for every inverter in the fleet. The base modelBaseInverteris the contract — every inverter variant inherits from it. Used by the processing actions and stored by the historian route.
Hybrid inverter variant — adds battery state for sites with on-site storage.
Treat Notebooks Like Code
.lotnb files are text — diff them, branch them, review them. Commit your notebooks to git alongside your AGENTS.md and README.md. When a teammate joins, the project’s git repository is everything they need to understand and reproduce the system.
Pair the notebooks with an AGENTS.md at the project root so AI assistants generate code that matches your conventions automatically. See AI-Assisted Development Best Practices for the template.
Next Steps
LoT Notebooks Usage
Installing and running the VS Code extension.
AI-Assisted Development
Conventions for
AGENTS.md and AI-generated LoT.
