Barn powers the
shared tooling behind
grainulation.
Most users never interact with barn directly — wheat and other grainulation tools use it automatically. This page is for developers who want to use barn's utilities standalone or build on top of them.
What is barn?
If you are using wheat, barn is already working for you. It handles sprint detection, manifest generation, HTML templates, and PDF building behind the scenes.
This page is for developers who want to use barn's tools directly or build on top of them — for example, creating custom integrations or extending grainulation with new packages.
Detect sprints
Scan any repo for research sprints by finding claims.json files and reading git history.
$ npx @grainulation/barn detect-sprintsGenerate manifest
Build a compact JSON index. New AI sessions read this instead of scanning everything.
$ npx @grainulation/barn generate-manifestBuild PDF
Convert markdown research output to a styled PDF document.
$ npx @grainulation/barn build-pdf brief.mdA mono-repo with 3 research sprints
Your team has been running wheat sprints for a few weeks. A new developer joins and needs to understand where things stand. barn gives them a map in seconds.
Find all sprints
Scan the repo for claims.json files. barn uses git history to rank sprints by recency and identify which one is active.
Build the manifest
Generate a compact JSON index of topics, claims, and files. New AI sessions read this instead of scanning the full repo.
Export for stakeholders
Convert the compiled brief to a styled PDF. Paginated, branded, ready to attach to a Jira ticket or drop in Slack.
The outcome: The new developer's Claude Code session reads wheat-manifest.json (4KB) instead of scanning the entire repo. Their first question gets context-aware answers immediately.
Shared infrastructure for research
Tools that every grainulation package uses. Also work standalone.
Sprint Detection
Finds sprint directories by scanning for claims.json. Uses git history to rank and identify the active sprint. farmer reads this detected state to know which sprint your agent is working in.
Manifest Generation
Builds a compact JSON index of topics, claims, and files. New AI sessions read this instead of scanning everything. silo indexes these manifests to make barn-discovered sprint structures searchable across your entire history.
HTML Templates
Dark scroll-snap explainers, dashboard layouts, and presentation templates used by wheat and mill.
PDF Builder
Convert markdown to PDF. Styled, paginated, ready for stakeholders.
Zero Dependencies
Standard library only. No install surprises, no supply chain concerns.
AI-Friendly Output
Manifests stay under 10KB. Work with Claude Code's Glob, Grep, and Read tools out of the box.
Yes, Node 18 or later. But your project can use any language — barn works in any repo.
Usually not. If you are using wheat, barn is included automatically. You only install barn directly if you want its CLI tools standalone.
Manifests typically stay under 10KB even for sprints with 50+ claims. They are designed to fit comfortably within AI context windows.
The ecosystem
barn provides the tools that the rest of the ecosystem relies on.