Repository navigation
Releases
v1.5.0
1.5.0 (2026-11-29)
From a field report: the weekly limit ran out with twelve agents mid-work and
no tool could see the spend; the lead kept its queue in a Markdown file next
to the board because the store did not exist yet.
- The store sets itself up. The first write (a note, a board item, a
spend or a meter reading) in a project with no.libellus/creates it where
libellus initwould, and the reply says so once (store_created). Reads
against a missing store answer plainly (ls:no notes yet;board: the
board is empty;ledger: no ledger yet;brief: says the first write
creates it) and create nothing.libellus initstill works. The Claude Code
hooks stay silent in a project with no store. Tests:
the_first_write_creates_the_store_and_says_so_once,
reads_against_a_missing_store_answer_plainly_and_create_nothing. - A ledger that is fed.
libellus spend --stdinreads one JSON object
per line (agent,task,step,model,tokens_in,tokens_out,
cache_read,cache_write,context,key,at,note,
cost_micro_usd;agentandtaskare required, and so is at least one
number). A line whosekeyis already in that agent's ledger changes
nothing, so the same records may be sent twice. The whole call is all or
nothing: a bad line, or an unknown field (refused by name, with its line
number), writes nothing. Each agent's ledger is locked once, read once and
written once, so a few hundred lines cost one write. The one-entry form
(spend --agent A --task T ..., andlibellus_spend) takes the same new
fields. Tests:stdin_records_many_lines_and_a_repeated_key_changes_nothing,
a_bad_line_writes_nothing_and_unknown_fields_are_named,
eight_writers_feed_overlapping_keys_and_each_key_counts_once. - Readings and a projection.
libellus reading --limit weekly --percent 87 [--at TIME](over MCP:libellus_spendwithlimitandpercent)
records what the owner read from the host meter, in
.libellus/readings.jsonl.libellus ledger(--jsonis accepted and
is the default) now also returnsby_agent,by_day,context(each
agent's latest context size,refresh: truepast 350,000 and within 12
hours),readingsandprojection: the burn rate in percent per hour,
calibrated from the readings and the tokens recorded between them, and the
time the 80% and 100% lines are reached. With fewer than two readings it
says what is missing. Settings:LIBELLUS_CONTEXT_WARN(default 350000),
LIBELLUS_PAUSE_AT(default 80). Test:
two_readings_give_a_projection_and_one_says_what_is_missing, and unit
tests insrc/meter.rs. - A warning in the brief.
libellus briefaddsSpend:lines when
there is something to say: the latest reading with its projection, and the
agents past the context figure (spend_watchin the JSON). Test:
the_brief_warns_about_the_limit_and_a_big_context. - The board says what waits on what. A task has an optional
waits_on
(a task id or one line), set withlibellus_planadd or set. The brief
shows it on your tasks, and lists blocked tasks owned by others with what
they wait on. Test:the_brief_shows_what_is_blocked_and_on_what. libellus ready [--json]: one line saying whether the store exists and
what it holds.readymeans a call will work now with no set-up step, so
a missing store (the first write creates it) answersready: truewith
state: "missing". Test:ready_answers_in_one_line.tools/listmarkslibellus_get,libellus_ls,libellus_briefand
libellus_boardwithreadOnlyHint. Hints in the brief and the board never
name a switched-off group, and followMEM_HARNESS_TOOL_PREFIX. Tests:
read_only_tools_are_marked_and_the_others_are_not,
hints_never_name_a_switched_off_group_and_follow_the_prefix.tools/listbudget raised from 8,500 to 9,200 bytes for all of the above.
Upgrading from 1.4
Nothing to run. A 1.4 ledger reads unchanged: the new fields (cache_read,
cache_write, context, key) are optional and are written only when set,
so a line typed the 1.4 way is byte for byte what 1.4.1 wrote. The other
direction does not hold: a ledger that holds a line with a new field is
refused by 1.4 ("unknown field"), so upgrade every writer before feeding it.
ledger.meta gains cache_read and cache_write; a cache without them is
read as zero. Board task files may carry waits_on; 1.4 refuses a task file
with that key, so the same rule applies. Meter readings are the new file
.libellus/readings.jsonl with a lock locks/readings.lock.
v1.4.2
1.4.2
Same store format as 1.4.1. A board page fix, and a screenshot in the README.
- The board page's header counts what its kanban shows. It counted the
projects as tasks too, so a page could say "6 todo, 3 doing" above
columns headed "todo (5)" and "doing (2)". Projects are now counted on
their own: "2 open projects. 8 open tasks: 5 todo, 2 doing, 1 blocked.
..." The brief'sboard:line and the JSONcountsare unchanged.
v1.4.1
1.4.1
Windows: a write no longer fails with cannot replace <path>: Access is denied. (os error 5) when a virus scanner or the search indexer has just
opened the file. They open a freshly written file without sharing delete
access, and a replace over it fails until they let go. Every rename Libellus
does (note, ledger and board writes, ledger archive, plan archive) now
retries for up to 2 seconds while Windows reports the file busy (error 5 or
32), then reports the error as before. Seen with Windows Defender on the
8-writer stress test (many_writers_lose_nothing_and_seq_stays_unique),
which failed about one run in two; GitHub's Windows runners do not scan, so
CI passed. Linux and macOS are unchanged. Test:
a_replace_waits_while_another_process_briefly_holds_the_file.
v1.4.0
1.4.0
Operating-system file locks. A lock was a file made with create_new that
held a pid, a time and a token, so a writer that crashed left it behind and
Libellus had to guess when it was stale: a dead pid (which pid reuse and
separate pid namespaces get wrong), an age over 30 seconds (which a laptop
asleep for longer, or clock skew on a network drive, gets wrong), a bare
file after one second, and a .break guard. Now every lock is flock on
Unix and LockFileEx on Windows, on a lock file kept open while held. The
kernel releases it when the holder exits or is killed, so a crashed writer
blocks nobody and there is nothing to guess. Taking and releasing a lock went
from about 5 ms (a synced file create and delete) to about 40 us.
Breaking changes (there are no users yet):
- Lock files live in
.libellus/locks/(<agent>.notes.lock,
<agent>.ledger.lock,<agent>.seq.lock,board.lock) and are never
deleted. Resolve and promote take one lock per agent instead of one per
note. - Running 1.3 and 1.4 writers on one store at the same time is not
supported: they take different locks. Stop every 1.3 CLI, MCP server and
hook before the first 1.4 write. A.<name>.lockor.<name>.lock.break
file left by 1.3 blocks nothing;check,doctor --fixand the brief
delete it, anddoctorlists it understray_filesuntil then. - There are no stale locks, so
checkno longer reports one anddoctor --fixno longer removes one. The busy error is<path> is locked by another libellus process. Retry shortly. - Temp files are reaped by age only: one over an hour old is removed. The pid
in a temp name is no longer checked, so no pid is ever checked. - Promote with a read-only notes folder now fails at the note rewrite (the
error names the Relatum file it wrote) instead of at the lock.
Added:
doctorhas afile_systemcheck. It warns, and passes, when the store is
on a network file system, whereflockmay be emulated or not shared
between machines: macOSstatfswithoutMNT_LOCAL, a Linux NFS, SMB,
CIFS, 9P, AFS, Coda or Cephf_type(x86_64 and aarch64), a Windows UNC
path or remote drive.src/oslock.rs, std only, written to be copied into another crate.examples/perf.rstimes a lock acquire and release.
Removed: fsx::Lock, fsx::break_stale_lock, fsx::lock_is_stale,
fsx::stale_lock_notes, fsx::pid_alive (and its kill(pid, 0) call), the
lock token, LOCK_STALE, LOCK_BARE and the .break guard.
v1.3.1
1.3.1
Smaller tool definitions. A host sends tools/list to the model on every
turn, so its size is paid on every turn. With every group on, the compact
tools array went from about 14,600 bytes to 8,386, and the server
instructions from 1,006 bytes to 536. Stores from 1.3.0 are read unchanged.
Breaking changes (there are no users yet):
libellus_archiveis merged intolibellus_ledger: passarchive: true
withagent(orLIBELLUS_AGENT). On the CLI,libellus archive --agent A
is nowlibellus ledger --agent A --archive. The full-ledger error and the
brief say so.libellus_checkis no longer an MCP tool:libellus_doctoralready runs
the same scan as itsstore_filescheck, andfix: trueclears stale
locks and temp files ascheckdid. Thelibellus checkCLI command is
unchanged.- Descriptions are short: what the tool does, when to call it, and the one
thing that trips an agent up. The long explanations are in README.md and
SPEC.md. Batch item schemas (notes,items,ops) keep their types,
enums, required keys andmaxItems, but no longer repeat a description
for each field.
Fixed:
- The schemas of the
addandsetops inlibellus_planhad"type"
twice, which a strict JSON parser rejects.
Added:
tests/surface.rsstartslibellus-mcp, lists the tools with every group
on, and fails when the array passes 8,500 bytes or the instructions reach
600 bytes.
v1.3.0
1.3.0
Notes and ledgers from 1.2.2 are read unchanged. New: batches, the shared
board, its read-only page, doctor, and Claude Code sub-agent hooks.
Breaking changes (there are no users yet):
libellus_noteno longer requireskindandsummaryin its schema:
they are required only whennotesis not given. Mixingnoteswith the
single-note fields is an error.libellus_resolvelikewise no longer requiresidandoutcomein its
schema: they are required only whenitemsis not given.- A list argument with several bad items now names every bad item, prefixed
nothing written:, instead of the first one only. libellus hook --host claudeprints a different snippet: exec form
(commandplusargs), matcherstartup|resume|compact(no longer
clear), the commandlibellus hook-run session-start --agent NAME
(which printshookSpecificOutputJSON, not plain text), and a new
SubagentStarthook. Paste it again.checkreports every damaged note or ledger in one error instead of
stopping at the first, and now also fails on a damaged board.- The brief has a
## Boardsection after## Current state, and its
Next:line can say "tick off a task with libellus_plan". - New tool group
board, on by default. A project whose AGENTS.md line is
libellus: tools core, ledgerdoes not get it.
Added:
- Batches.
libellus_notetakesnotes(up to 50) andlibellus_resolve
takesitems(up to 50 of{id, outcome, supersede?}). The whole batch
is checked first; one bad item writes nothing, and the error names every
bad item. Notes take theirseqnumbers in one locked step. A write that
fails part way names what was written. On the CLI:--notes '<json>',
--notes-file PATH,--items,--items-file. Batch items are checked
against a schema like top-level arguments (unknown keys are errors), and
the MCP schema lists each item's properties andmaxItems. - The board,
.libellus/board/<id>.md: one task tree shared by every agent
in the store. Statuses todo, doing, blocked, done, dropped. Depth at most
6. A parent closes by itself (closed_by: children) when its children are
all done or dropped with one done, up to the project; a closed project
moves toboard/archive/<project>/. Dropping drops open descendants.
Reopening a child reopens parents closed by children. A task cannot be
done while a child is open. libellus_plan: up to 100add,setandremoveops, or a markdown
checkboxoutline(optionally underparent), in one all-or-nothing call
under one board lock. The reply lists what changed and every cascade.libellus_board: the board as checkbox markdown with counts, filtered by
owner,project,open_only(default true) andinclude_archived..libellus/board.html, rewritten after every board write, and
libellus board --html [--out PATH]: a self-contained, read-only page
(kanban, tree, progress per project, each agent's open questions,
archived projects; light and dark; no scripts; every value escaped).libellus doctor [--fix]andlibellus_doctor(core): diagnostics with a
fix for each failing check. Exit 1 when a check fails.--fixonly clears
abandoned locks and temp files.libellus hook-run session-start --agent NAMEand
libellus hook-run subagent-startfor Claude Code. A sub-agent is named
<agent_type>-<last 8 of agent_id>and gets its brief. Bad input exits 0
with a note on stderr, so a session never breaks.examples/perf.rstimes the board at 5,000 tasks; numbers in
docs/perf/1.3.0.md.
v1.2.2
1.2.2
Same store format as 1.2.1. Fixes from the fifth review.
- The line named for a ledger total overflow counted only the lines that
were added up, so a ledger with left-out lines named the wrong line.
ledger,brief,checkandspendnow name the line in the file, from
one shared helper.ledgerkeeps a left-out line warning beside the
overflow instead of replacing it. - The
agent-toolsline was case-sensitive.libellus: disable Ledgernow
disables the ledger, as the SPEC said. ls --before_idfailed once the cursor note no longer matched the filter
(resolved, with--status open) or was deleted. The cursor is placed by
the list order.next_before_idis now<id>@<created>@<seq>, which still
works after the note is deleted; a plain id is still accepted while the
note exists.next_offsetwas wrong on a page reached withbefore_id. It is now
absolute: the offset to pass withoutbefore_id.init,check,mcp,serve-mcp,helpand--versionignored extra
arguments. They are usage errors now.libellus hook --agent=mainfailed, and a repeated--hostwas silently
last-wins.hookuses the same flag parser as the other commands.- An empty
LIBELLUS_DIRwas used as a path. It is treated as unset. - Before
libellus init, the server ignored the AGENTS.md groups line and
listed every tool. It now reads the nearest AGENTS.md walking up. - A note saved with CRLF line endings was reported as corrupt and broke
ls
andbrief. It is read as LF. The file is not rewritten on read. - Lock liveness ran
ps -p. Apswithout-p(BusyBox), or one that
failed, made every holder look dead, so live locks were broken. On Unix the
check is nowkill(pid, 0), and no process is started while waiting. - A
ledger.metawithouttasks_completewas trusted for task totals. It
now counts as incomplete, so the task is totalled from the ledger. - A symlinked
.swarmnotesfound by walking up was followed. It is refused,
as the SPEC said.SWARMNOTES_DIRmay still lead through a symlink. - Windows device names (
con,nul,aux,prn,com1-com9,
lpt1-lpt9) are refused as agent names, note ids and Relatum scopes on
every platform. An id made from a summary such as "Con" becomescon-note. - A JSON-RPC response from the client got an error reply. It gets none.
- The brief said "1 ledger entries"; it now says "1 ledger entry".
- The crate doc named a
basis.mdthat does not exist.
v1.2.1
1.2.1
Same store format as 1.2.0. Fixes from the fourth review.
- Breaking a stale lock let several writers hold it at once: two contenders
could each judge the old lock stale, and the later one deleted the lock the
first had just taken. After a killed writer, notes could share aseqand
resolve, spend and archive lost their exclusion. Only the holder of a
.breakguard removes a stale lock now, after judging it again. Each lock
line carries a token, and a holder removes its lock only while the file
still holds that line.checkandbriefreap through the same path. - Promote now holds the note lock. A resolve running beside it was lost, and
two promotes could both write a Relatum note. ls,briefandcheckpanicked when notes with and withoutseqhad
createdtimes out of order. Notes are merged instead of sorted with a
comparator that was not a total order.- A symlinked
notes/orarchive/folder was followed out of the store.
A symlinked.libelluswas skipped and a parent store used instead. Both
are refused. - A FIFO or other non-regular
ledger.metablockedspendwhile it held the
ledger lock. Only a regular file is read as the cache. - A ledger line whose
step,modelornotewas not a string was accepted.
It is now a corrupt line. - A repeated number or boolean flag was silently ignored. Any repeated flag
other than a list is a usage error. - A summary shaped
[...]broke the promoted Relatum note. It gets a
trailing.. - Lock files are created 0600, like other files. On Unix, permission denied
on a lock is reported at once instead of waiting eight seconds and naming
another process.
v1.2.0
1.2.0
Same store for notes and ledger lines written by 1.0.0 and 1.1.2. New notes
add seq. A 1.1.2 binary rejects that key. New brief fields and the
supersede argument are additive.
- Recent decisions, questions, findings and dead ends are ordered by a
per-agentseq, not by id inside one second. The brief keeps the newest
max_items(default 5, at most 50). Open questions are capped too, newest
first.textis at most 8192 bytes and says when it was cut. - The brief includes the newest context note and recent findings. A decision
can be marked replaced withsupersede, or with an outcome that starts
withSUPERSEDED:orREVERSED:. Replaced decisions are listed on their
own, with(replaced)in the text. spendrefuses before the ledger would pass 32 MiB.briefstill returns
the notes when the ledger cannot be read, withledger_errorset.ledger,
spendandcheckstill fail on a damaged or over-cap ledger.
libellus archivemoves the file intoarchive/and starts a fresh ledger.
The old bytes are kept and are not part of later totals.- Task totals are grouped in one pass. The brief's
by_taskkeeps the newest
tasks, not an alphabetical prefix, and says how many were left out.
libellus_ledgerstill returns every task. - A lock with no finished pid line is stale after one second.
checkremoves
stale locks and temp files whose writer is gone. A failedspendwrite
truncates its own partial line. spendkeeps a totals cache inledger.metaand skips parsing when the
file length and the last line still match. Per-task totals are cached for
up to 64 tasks. With more tasks, spend still reads the ledger to total
that one task. The ledger file remains the record. A same-length edit that
leaves the last line unchanged is picked up bybrief,ledgerand
check, which rewrite the cache. Numbers are indocs/perf/1.2.0.md.
v1.1.2
1.1.2
Same on-disk format for a valid store. A note or ledger line that was already
invalid is no longer treated as good data.
- A fifo or other non-regular file in the notes folder is skipped, with a
warning.checkreports it. It is not opened. A symlinkledger.jsonl, and
any other symlink store file, is refused on read and on write. spendreads the ledger once under its lock. On this machine, with the
examples/perf.rsharness, a spend against 10000 stored entries was median
14969 us and p95 15455 us. The 1.0.0 baseline on the same harness was 20240
us and 21385 us. Seedocs/perf/1.1.2.md.- A note file whose name is not one or two slugs is skipped by
lsand
briefand failed bycheck.createdmust beYYYY-MM-DDTHH:MM:SSZ. - A ledger line with the wrong agent, a non-slug task or step, or a bad
timestamp is left out of the totals and named bycheck. A torn last line
is not counted.spendwill not append until that line is finished or
deleted. A ledger over 32 MiB, or a line over 64 KiB, is an error. - An id made from the summary is retried when the file already exists.
--flag=valueworks, and--flag -- --valuepasses a value that starts
with--.limiterrors say the range starts at 1. On Unix, new
.libellusandagentsdirectories are mode 0700. - The body argument is at most 20000 bytes. The brief text does not always
end with a Next line.libellus_checkis in the core group.checkreports
a stale lock and says to remove that file if nothing is using it. A summary
cannot contain a control character. Duplicate tags are stored once. An MCP
message must say"jsonrpc":"2.0".LIBELLUS_DIRmust already be an
initialised store.