Releases: sirnax/block-beaver
Release list
Block Beaver v0.8.0
0.8.0 fixes what finishing the adoption of an existing family system exposed:
- the runtime kernel can no longer take a live app down;
- the map no longer marks registry-consumed blocks unused;
- scans honour
.gitignore; - agent guidance knows about families;
kit createcan replace a project scaffolder;- a narrower
--agentsinstall cleans up after itself.
Upgrading from 0.7.0 is block-beaver upgrade. See the 0.8.0 plan.
Compatibility notes
- Map views change bytes. The map controls use new colour tokens, map text turns ligatures off, and the folder rail shows 20 rows by default. Re-export any registered view module (
view --format module, orgen) and commit the result.- The tokens are
--bb-control-surface,--bb-control-border,--bb-control-text,--bb-control-hoverand--bb-panel-surface. Each falls back to the previous colour. - Rows beyond the rail limit sit behind a
<details>"Show all N folders".
- The tokens are
- Working-tree scans honour
.gitignore.- Inside a Git work tree, scans read tracked files plus untracked files that are not ignored. Gitignored files leave the graph, so working-tree and staged audits agree.
- Config
ignoreentries added only to hide build output can be removed. - Outside Git, the scan walks the directory as before.
- The
maxFileslimit now counts only the files that are kept.
- Fewer unresolved imports. Imports that resolve to a registered view export or a gitignored file are no longer reported as unresolved. Resolution counts can therefore drop, and
upgrademay lower.blocks/baseline.json. - Managed guidance changes only where families are configured.
- Projects with
familiesget a "Typed families" section inside the managed regions of the agent instructions,WORKFLOW.mdand the agent skill.upgraderewrites those regions once. - Without
families, every managed byte is unchanged. - Until
upgraderuns after a families config change,auditreports themanaged-families-stalewarning instead of failing.
- Projects with
- Either dependency placement is current.
managed-currentaccepts the exactblock-beaverpin independenciesordevDependencies. A plaininstallstill pins it as a devDependency. - New audit warning.
runtime-import-dev-dependencyappears when non-test code importsblock-beaver,block-beaver/kernelorblock-beaver/viewat runtime while the package is only a devDependency. Generated registries count as non-test code.- The audit still passes.
audit --format summaryadds ", 1 warning" to its pass line.
- Narrower
--agentsremoves files. An explicit--agentslist that drops a recorded agent now removes that agent's managed files and hook entries. An edited managed section is a conflict, as foruninstall. Auto-detection never removes anything. kit createis all-or-nothing. Ifgenor the reload fails after scaffolding, every created file is deleted and every updated file restored. Before, the scaffold files were left behind. The CLI exits 2 instead of 1.- Graph schema and kernel.
graph.jsonstays at schema 2.codeReachentries gainevidenceonly for the newvia: 'registry'.coerce,validate,composeandcreateRegistrybehave as before by default.
- New codes.
managed-families-stale,runtime-import-dev-dependency,unmanaged-left,scaffold-plan-failed,scaffold-staleandscaffold-update-missing.
Changes
-
Contract
map.reach: 'registry'counts every block of a family as reached when an ordinary, non-generated file imports itsregistry.out. ThosecodeReachentries carry import evidence. Contractmap.unused: falsekeeps a family's blocks off the unused list. Amap.bindingsentry{ family, call, argKey }matchescall({ argKey: 'id' }). (#47) -
Imports of a registered view export, or of a gitignored file, no longer count as unresolved, so they no longer raise the resolution ratchet. (#48)
-
Working-tree scans, family file discovery and the project inventory read the same Git file set, so gitignored build output no longer makes the staged audit call the view stale. (#49)
-
Agent guidance knows about families.
- With
familiesconfigured, the managed agent instructions,WORKFLOW.mdand skill gain a section with:- a table of families;
- "add a block = add one manifest";
block-beaver gen(not onlyupdate) and a warning never to hand-edit generated outputs;- the
kitcommands; - a PR-review note when receipts are optional.
updateadds ahintwhen family outputs are stale.
(#50)
- With
-
kit createcan replace a project scaffolder.- Contracts may define
scaffold.plan(input, { all, entries, readFile, id, family }), which returns created files,updatesto existing files (each guarded by abeforesha256) andmanualSteps. kit createtakes--input JSONor--input-file PATHand validates the planned manifest against the family schema and itscheckbefore writing.--dry-runshows creates and update diffs.
(#51)
- Contracts may define
-
The family map gets control and panel colour tokens, turns ligatures off (the broken "fi"), and adds a
map.railLimit(default 20) with the remaining folders behind<details>.- Config
view.title,view.eyebrow,view.headingandview.introset the page text. block-beaver/viewships TypeScript types.
(#52)
- Config
-
genandgen --checktake--format summary, which prints one line on success and one line per failing output otherwise. Adopted outputs also reportbodyIdenticalIgnoringLeadingComment. The README notes how pnpm'sminimumReleaseAgeinteracts with upgrading. (#53) -
Tracking issue for the 0.8.0 goal. (#54)
-
The runtime kernel is safe to use in a live app.
composeSafe(base, dynamic, { family, order })returns{ registry, rejected }instead of throwing on an invalid or duplicate dynamic manifest.read(schema, value)always returns a value plus a list ofrepairs.createRegistry(family, manifests, { order: 'input' })keeps input order.- An unknown
implementationkey on a data kind now namesimplementationFields.<kind>. install --runtimepinsblock-beaverunderdependencies, andupgradekeeps the existing placement.
(#55)
-
install --agentswith a narrower list removes the dropped agents' managed files and hooks. It reportsremoved, andunmanaged-leftwarnings for files it leaves.install --checkexits 2 when anything would change. (#56)
Block Beaver v0.7.0
0.7.0 takes the next steps in adopting an existing family system: join links, per-family grouping, generator entries, taking over existing outputs, region outputs, history label modules, a map-only view export, and a one-line audit output for hooks and CI. Upgrading from 0.6.x is block-beaver upgrade. See the 0.7.0 plan.
Compatibility notes
-
Hook and CI bytes change. The managed pre-commit runs
audit --staged --format summary --root ., lefthook does the same, and the managed GitHub and GitLab CI jobs runaudit --base merge-base --strict --format summary.upgraderewrites these hash-verified managed regions once, with no conflict; hand-edited regions still conflict. Besides the version stamps,upgradealso rewrites the managedWORKFLOW.mdand the agent skill reference, which gain paragraphs on the one-line audit output,gen --adoptand restoring imported outputs. -
Other new keys are optional. The new keys are link
match, contractmap.group, generatorregion, confighistory.labelas{ module }and configview.detail. Leaving them out keeps 0.6.0 output bytes identical. -
Graph schema.
graph.jsonstays at schema 2. -
New codes.
output-required-for-load,adopt-not-claimed,region-missing,region-duplicate,history-label-invalidandview-too-large.output-required-for-loadreplacesunresolved-importwhen the missing file is a known claimed output, and theoutput-conflictmessage now mentionsgen --adopt. -
genarguments.genwith stray positional arguments now fails with a usage error. Only--adopttakes paths. -
View exports registry.
.blocks/view-exports.jsonentries may carrydetail. It is written only when the detail is notfull, so existing entries keep their bytes. -
Generator cache. A generator's cache context now includes each manifest's path and export name, and the cache records each generator's
out. Every cached generator therefore re-runs once after upgrading. -
The family map is redrawn. Blocks are isometric bricks on floor plates in an exploded tower, as in the original design, instead of flat tiles. The
data-*hooks, element ids, themap.skinstoggle andgraph.jsonare unchanged, but the rendered map, the console view and exported view modules all change their bytes. Re-export any registered view module withview --format module, or rungen, and commit the result. Skin CSS that targeted.family-block-slabor the oldOrdinary codeslabs needs updating to the brick classes.
Changes
- The family map draws Lego-style bricks in an exploded tower with floor tags, link-count risers, a rail of ordinary code, per-family colours (
family-<id>tokens), zoom, fit, pan and a history Play button. (#30) - Links can join on values:
{ field, to, match, kind }adds an edge to every manifest of the target family whosematchpath shares a primitive value with the source field. The edges are ordinary link edges. (#36) - A contract's
map.groupgroups blocks on the map by a field with a joiner, anemptyfallback and a{value}format. It takes precedence over configmap.groupBy. (#37) gen --adopt [PATH…]takes over existing outputs that have no Block Beaver header, reportsstatus: "adopted"andbodyIdentical, and works with--dry-run. Loading fails withoutput-required-for-loadwhen a contract or check imports a deleted generated output; restore it withgit restoreinstead of deleting it. (#38)- A generator with
regionowns the text between marker lines in a file and leaves the rest untouched. Missing or duplicate markers write nothing. (#39) history.labelcan name a module that computes the label when an entry is appended.--labelstill overrides it. (#40)- Generators get
ctx.entries(family?), read-only{ ref, family, id, path, exportName, hash, value }records inctx.manifestsorder. (#41) view --format module --detail mapembeds only what the family map draws, about 4% of the full size on a 174-block, 1800-file synthetic graph.--max-bytes Nfails withview-too-large, andview.detailsets the default for new exports. (#42)audit --format summaryprints one line on a pass, and a short list of errors with their fixes on a failure. The managed hooks and CI use it. (#43)- Tracking issue for the 0.7.0 adoption goal. (#44)
Block Beaver 0.6.0
0.6.0 lets a project with its own hand-built typed block system move onto Block Beaver families. Manifest data stays unchanged, JSON outputs stay byte-identical, and no map features are lost. Upgrading from 0.5.x is block-beaver upgrade. See the 0.6.0 plan.
Compatibility notes
- New config keys are optional. The new keys are
checks, per-familyexclude,map.floors,map.groupBy,map.skinsandmap.bindings. Leaving them out keeps 0.5.1 behaviour, andupgradeadds none of them. - Graph additions.
graph.jsonstays at schema 2. Family projects gain three additive fields:codeReach,unused, andgoneon each history snapshot. Graphs of projects without families are unchanged. - New rule and code.
- The
family-validrule reports set-wide checks. gencan now reportgenerator-unstableunderfamily-drift.family-unclaimedstrays underfixtures,__fixtures__,testortestsfolders are now warnings, not errors.
- The
- Staged view checks. Staged and range audits regenerate a gitignored, uncommitted view inside the snapshot instead of comparing the working copy. A committed view, and a working-tree
audit, are still compared against the files on disk. Hook and CI bytes are unchanged. upgradechanges.- It may lower counts in
.blocks/baseline.json; it never raises them. - The managed
WORKFLOW.mdand agent skill reference gain a paragraph on the staged view and on lowering the baseline, soupgraderewrites those managed files.
- It may lower counts in
- Floor order direction.
map.floorslists floors top first, the order the map already drawsfamilies. This deliberately differs from the "bottom to top" wording in #29, to keep existing maps unchanged. - Kernel types.
FamilyDefinition.implementationis nowreadonly string[], andManifestOfderives implementation arms from the family.check,checkAlland generator callbacks keep their 0.5.1 parameter types. A family withdataKindscan annotate a callback parameter with the newLoadedManifesttype to compare its data kinds.
Changes
- Families can add fields to implementation arms (
implementationFields) and declare data-only kinds (dataKinds) that runtime mode accepts. Errors name the selected arm's field. (#27) checkAllon a family contract and config-levelchecksmodules express whole-set and cross-family rules, reported underfamily-validinauditandgen --check. (#28)map.floorssets the map floor order independently of the index, registry andctx.blocks()order. (#29)- The map shows which ordinary code reaches each block, through imports or
map.bindingsregistry calls. It also marks unused blocks, keeps removed blocks as "gone" bricks in the history slider, groups blocks within a floor bymap.groupBy, and offers several skins (map.skins) with a remembered toggle. (#30) family-unclaimedhonours the configignorelist and per-familyexclude, andignorealso keeps files from loading as manifests. (#31)genrepeats until outputs stop changing (at most three passes), so manifests that import generated outputs settle in one run. (#32)- The managed pre-commit passes after a source edit without a manual
update. The newblock-beaver baseline --lowercommand, whichupgradealso runs, records lower ratchet counts. (#26)
Block Beaver v0.5.1
Fixes from use of 0.5.0 (#21–#24). Upgrading from 0.5.0 is block-beaver upgrade. #21 can damage the host repository, so every 0.5.0 user who works in linked Git worktrees should upgrade.
Recovery for #21: if a commit in a linked worktree left every checkout reporting fatal: this operation must be run in a work tree, run git config core.bare false in the main repository.
Compatibility notes
-
Managed Claude and Codex hooks now run
node node_modules/block-beaver/bin/block-beaver.mjs hook-check …instead of a package-manager command. Yarn Plug'n'Play projects keepyarn exec.upgraderewrites 0.5.0 hook entries, including installs without.blocks/managed-files.json. The path is relative, so editors must run hooks from the project root, as before; when they don't, the hook fails open. -
Git hook and CI commands are unchanged.
-
Fix staged audits in linked worktrees: snapshot Git commands no longer inherit the hook's
GIT_DIRandGIT_INDEX_FILE, which madegit initrewrite the host repository withcore.bare = trueand aborted the commit (#21). -
Run managed agent hooks without package-manager startup, which took 0.5–0.9 s of the hooks' 1 s timeout under
pnpm exec(#22). -
Editing
.blocks/config.jsonafter install no longer makes the managed setup exception stale. The edit follows the active receipts level: an advisory underoptionalandoff, and evidence required underrequired.config-validstill checks its contents (#23). -
Managed paths that Git ignores, such as a fully ignored
.claude/, are local-only in staged and range audits. They now produce anignored-managed-localadvisory instead of failingmanaged-currenton every commit. Theignored-targetinstall warning explains this and names--fix-ignores(#24).
Block Beaver v0.5.0
Fixes from the first real use of 0.4.0 (#14–#18). Upgrading from 0.4.0 is block-beaver upgrade.
Compatibility notes
-
New installs write
enforcement.receipts: "optional". Configs without the key keep today's behavior, which isrequired. The stricter of the base revision's level and the audited tree's level applies, so one commit cannot loosen the gate and pass under its own new rules. -
Resolution report entries gain
category(moduleorasset), and scan summaries and app health gainmissingAssets.unresolvedImportsis still the total, so--strictand the resolution ratchet behave as before. -
Managed CI now uses
actions/checkout@v7,actions/setup-node@v7and the repository's Node version (.nvmrc,.node-version,engines.node, then 24).upgraderewrites the managed CI region. Unmarked 0.1.x files are still adopted. -
Fix truncated piped JSON: every command now flushes stdout before exiting, so large
audit,install --dry-runand other reports parse intact (#14). -
Make the managed CI job use the repository's Node version and current action majors, and warn (
ci-node-below-minimum) when it is below 22 (#15). -
Resolve bare package asset imports such as
reactflow/dist/style.cssthroughnode_modulesand packageexports; real misses are reported with theassetcategory and counted separately (#16). -
Record a managed-setup exception from
installandupgrade, so a fresh install passes its own audit and the first commit goes through the pre-commit hook (#17). -
Add
enforcement.receipts(required,optional,off) so a repository can adopt the structural gate before mandatory review receipts. Invalid evidence and review that went stale against the change in hand still fail underoptional; underoffthe review requirement is skipped but invalid evidence still fails. Install and upgrade results report the active level (#18). -
Pin CodeQL
initandanalyzeto the same 4.38.2 commit and group their Dependabot updates so they cannot drift apart again.
Block Beaver v0.4.0
Versions 0.2.0 and 0.3.0 were local development versions and were never published. The upgrade path from the previous GitHub release, 0.1.1, is directly to 0.4.0.
Breaking changes: the generated graph contract is now schema version 2, with app ownership and reachability data. The minimum supported Node.js version is 22.18.0; Node 24 and 26 are also supported. Consumers that read graph JSON or run Block Beaver on Node 22 before 22.18 must update.
- Add optional, project-defined typed families, TypeScript contract and manifest loading, family graph links and map floors; expose
block-beaver/kernel, JSON kit commands,gen --check, history import, and the opt-inblock-beaver/eslintrule. No domain family is bundled. - Add multi-app detection and owner-controlled
.blocks/config.json, compiler-based resolution, graph schema 2 ownership and reachability, cross-app links, app filters and health reports. - Add
install,upgrade,uninstallandauditworkflows with managed editor instructions, native hooks, Git hooks, CI setup, versioned migrations, stable audit rules and configurable coverage, resolution and lint ratchets. - Add strict scan diagnostics, incremental scanning, deterministic view module export with pure nonce/header helper, and generated maps with automatic refresh through
block-beaver start; addinitandupdatefor setup and offline regeneration. - Show declared local block dependencies as evidenced connections in the scanned graph and local Blocks view.
- Support explicitly scoped file creation in roadmaps and agent requests, with safe
op: "create"patches alongside existing replacements. - Preserve CRLF managed files and track workspace runtime dependencies through Windows junctions; bind reviewed filesystem permissions separately from portable Git receipt modes.
- Bind review and approval to the complete verified worktree snapshot, including declared generated files and the
.blocksmanifest; reject out-of-scope or post-check changes. - Keep repair within the same implementation paths and patch operations while allowing content fixes.
Block Beaver v0.1.1
- Remove a separate file metadata check before reading local console assets, closing the file system race reported by CodeQL.
Block Beaver v0.1.0
- Add JS, TS, and React source scanning with evidence linked relationships.
- Add local browser graph explorer and read only previews.
- Add bounded roadmap proposals, checks in isolated worktrees, decisions, and event replay.
- Add optional TeaCake registry adapter, agent protocol, and authenticated local worker.
- Add the public project page, Apache-2.0 license, contributor and security guidance, CI, dependency audit, secret scanning, CodeQL, and tag based GitHub releases.
- Restrict local HTTP requests to loopback hosts and matching browser origins.
Known limitations: graph edges are source observations rather than complete runtime dependencies. Dynamic imports, arbitrary path aliases, and relationships hidden behind reexports can be missed. The console and worker are for trusted local use. No npm package is published.