Skip to main content

folio

PyPI CI License: MIT

folio turns your coding agent into the librarian of a knowledge library: fast, good-looking HTML pages and Markdown records that live inside any project (lab notes, study notes, a project's docs) or stand on their own. Every document has one genre, and the genre fixes its job, its reader, its voice, its format and its checks. The genre gives structure and voice, never form: every HTML page is a free canvas, and the agent lays it out for what it must show, with figures, diagrams, interactive controls and math. Documents link to each other like a Zettelkasten, and maps give a reader the way in.

You do not run folio yourself. You install it by handing your agent a setup prompt, and from then on you ask in plain words: "add a concept for X", "tidy the maps", "go through my comments", "build the site". The agent follows folio's seven skills, calls the folio command, and runs the gate before every commit. folio is the method and the checks that keep an agent-written library honest and consistent, plus the shell that makes it pleasant to read.

How folio works: you ask your agent in plain words; it picks one of folio's seven skills and writes typed, linked documents into the library in git, running folio check before each commit; folio serve renders the library as a site; a reader's comment is stored beside the page, and the address skill answers it and edits the page.

Install

Paste this into your coding agent, in the project where the library should live:

Install folio here: run `uv tool install folio-kb` (or `pipx install folio-kb`), then `folio init`, then read .agents/skills/set-up/SKILL.md and follow it.

The agent asks you at most three questions in one message (what the library is for, where it lives, which packs to switch on), creates the library and leaves the gate passing. A longer version of the prompt is in SETUP.md. folio needs Python 3.10 or later.

What a library looks like

A library is a folder with a folio.yaml. It can be a project's docs/, a notes folder, or a whole repository.

docs/
  folio.yaml            the charter: name, purpose, reader, packs, home maps
  content/
    index.html          the home page
    concepts/<slug>/    one folder per genre
    maps/
    journal/2026/       one Markdown file per entry
  assets/               figures, refs.bib, data
  .folio/               generated indices, committed and checked
.agents/skills/         the seven skills, at the project root

Each document keeps its facts in metadata and its prose in the body. The shell draws the header and the link panels from the metadata and the generated indices, so nothing is written twice.

Anatomy of a document: the metadata in one file (genre, title, description, status, tags) becomes the page header; the body is shown as written; dates come from git; the cites, cited-by and journal panels come from the generated indices.

Pages are plain HTML in git, readable with no build step. Each page gets the whole room between the library rail and the page panel, and may carry its own style and script; a page that is one line of argument can ask for the reading column instead. folio serve shows them locally with search, link previews, concept popovers, light and dark themes, and a comment panel; folio export writes a static site.

An entry in folio's shell, How corrections work, with the library rail on the left, the page panel on the right and a concept popover open over the link permanent record, showing that concept's definition.

Hover a link to preview the document it points to; hover a concept to read its definition without leaving the page. Readers can also comment on any rendered page, and the agent answers on the page itself.

Genres and packs

Where Genres For
Core concept, note, entry, map, guide, project, journal, paper, deck Any library: definitions, ideas, arguments, reading paths, tutorials, the state of some work, the dated record, LaTeX papers with frozen versions, slide decks for a talk.
knowledge-base pack source, reading, survey Keeping what you read: a verified citation with the original beside it, your close reading of it, and comparisons across works. Workflows: ingest, quiz.
lab pack question, protocol, result, claim, report Work tested against evidence: ranked questions, protocols locked before they run, one home per measured number, claims, plain-English reports. Workflows: record-a-result, write-a-report.

A pack is switched on in the charter and rewrites nothing. A library can override a genre, add a variant for a second audience, or add genres, workflows and packs of its own.

The seven skills

Skill Use it to
set-up Create a library in a project or a new repository, write its charter, and leave the gate passing.
configure Change the charter: packs, home maps, a genre's limits, a new genre, a variant, a workflow.
write Add or revise any document in its genre's voice, link its concepts, flag only what needs your judgement, put it on a map.
organise Move, merge, promote and retire documents and maps with every link, comment and date intact; run health passes.
address Answer the comments readers left on rendered pages, on the page they were left on.
publish Export the static site; build a paper and freeze versions of it.
run Follow a workflow from a pack or the library, step by step.

The gate

folio check     # every problem in one pass; changes nothing; exit 0 only when there is no error

It runs offline, and CI runs the same command. It checks that every link resolves, every document meets its genre's card, no placeholder is left, records that must never change have not changed, nothing is orphaned, one fact keeps one home, and the generated indices are current.

Learn more

folio, giro and lab-kit are three kits for working with coding agents: folio for agent-maintained knowledge, giro for implementation with guarantees, and lab-kit for rigorous automated research on top of folio.

Made by Pier Mallozzi.

License

MIT. See LICENSE.

Metadata

Release files for folio-kb 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for folio-kb 0.2.1
File Size Uploaded Provenance Actions
folio_kb-0.2.1.tar.gz 699.0 kB With provenance Details for folio_kb-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for folio-kb 0.2.1
File Interpreter ABI Platform Actions
folio_kb-0.2.1-py3-none-any.whl Python 3 none any Details for folio_kb-0.2.1-py3-none-any.whl

Total release size: 1.4 MB

Release files / folio_kb-0.2.1.tar.gz

Download URL folio_kb-0.2.1.tar.gz
Size 699.0 kB
Tags Source
SHA-256 checksum
How to use checksums
28f0b611682c5d96fcb0a03c7f7aa74565771aeb14890142dd74b2f66ea48c6f
BLAKE2b-256 checksum
How to use checksums
8522f6e19a1887e0bb00d598ba24bcb4631e3b2344ddd4a3169511b51bcb7779
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / folio_kb-0.2.1-py3-none-any.whl

Download URL folio_kb-0.2.1-py3-none-any.whl
Size 698.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22c0081eaabc967ce954cb46c6700d431a432af5fd12eab39f97d6b65cd00ffe
BLAKE2b-256 checksum
How to use checksums
99c835c734e2fbe91384bdfc36677f38edc30edb89408c939c27486c5e827509
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Security for folio-kb 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for folio_kb-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page