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.


Quick start — 3 commands
1

Detect sprints

Scan any repo for research sprints by finding claims.json files and reading git history.

$ npx @grainulation/barn detect-sprints
Found 3 sprints: sprints/graphql-migration (active, 14 claims) sprints/auth-scaling (active, 23 claims) sprints/perf-baseline (done, 41 claims)
2

Generate manifest

Build a compact JSON index. New AI sessions read this instead of scanning everything.

$ npx @grainulation/barn generate-manifest
Manifest written to wheat-manifest.json (4.2KB) Topics: 6 Claims: 14 Files: 8
3

Build PDF

Convert markdown research output to a styled PDF document.

$ npx @grainulation/barn build-pdf brief.md
Written: brief.pdf (142KB, 4 pages)

A 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.

1
$ npx @grainulation/barn detect-sprints

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.

Found 3 sprints: sprints/graphql-migration active 14 claims 2h ago sprints/auth-scaling active 23 claims 1d ago sprints/perf-baseline done 41 claims 5d ago
2
$ npx @grainulation/barn generate-manifest --root sprints/graphql-migration

Build the manifest

Generate a compact JSON index of topics, claims, and files. New AI sessions read this instead of scanning the full repo.

Manifest written to wheat-manifest.json (4.2KB) Topics: 6 Claims: 14 Files: 8 AI sessions can now read wheat-manifest.json instead of scanning.
3
$ npx @grainulation/barn build-pdf brief.md

Export for stakeholders

Convert the compiled brief to a styled PDF. Paginated, branded, ready to attach to a Jira ticket or drop in Slack.

Written: brief.pdf (142KB, 4 pages) Title: GraphQL Migration — Decision Brief Claims: 14 compiled, 3 conflicts resolved Evidence: 2 tested, 8 documented, 4 web

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.


Do I need Node.js?

Yes, Node 18 or later. But your project can use any language — barn works in any repo.

Do I need to install barn separately?

Usually not. If you are using wheat, barn is included automatically. You only install barn directly if you want its CLI tools standalone.

How large are the generated manifests?

Manifests typically stay under 10KB even for sprints with 50+ claims. They are designed to fit comfortably within AI context windows.