Write every agent-facing text in clear, concrete English in the manner of George Orwell. This covers chat replies, plans, pull request titles and bodies, commit messages, documentation, and code comments. Write for readers who understand software but are new to Flatbread and the change at hand.
The always-on Cursor rule .cursor/rules/orwell-prose.mdc holds the full
style contract. In short:
- Prefer short words, short sentences, and the active voice.
- Cut any word that does no work. Prefer everyday English to jargon.
- Lead with what changed, why it matters, or what the reader must do.
- Explain a Flatbread term the first time it appears. Keep exact API, CLI, field, and record names in code formatting.
- Describe behavior directly: say what creates, links, stores, reads, or validates what.
- Present multi-step work as ordered steps.
Avoid unexplained internal shorthand and abstract labels such as epistemic,
homogeneous refs, retro-link, roll up, dogfood, hero, surface, and
stack. Use one only when accuracy demands it, and define it in the same
sentence.
Before you send text, make sure a reader can answer:
- What changed?
- What does each named thing do?
- What must they do next, and in what order?
Flatbread is Git-native relational content for TypeScript/JavaScript apps: flat files become a typed graph; GraphQL is one read surface, not the whole product. It's a pnpm monorepo. See CONTRIBUTING.md for the canonical onboarding path.
See CONTRIBUTING.md for full details. Quick reference:
- Install:
pnpm install(enforces pnpm viapreinstallscript) - Build:
pnpm build(builds all packages except examples via tsup) - Lint:
pnpm lint(prettier) - Lint fix (after edits):
pnpm lint:fix:fast(writes formatting repo-wide to matchpnpm lint; staged-only:pnpm lint:fix, also runs via.husky/pre-commit) - Typecheck:
pnpm typecheck - Test:
pnpm test(builds, then runs ava + vitest suites). Vitest packages usepnpm -F @flatbread/utils exec vitest run/pnpm -F @flatbread/codegen exec vitest run(runavoids watch mode). - Full verify:
pnpm verify(lint + typecheck + build + test) - Oven: the DAG task runner lives at https://github.com/FlatbreadLabs/oven.
- Proof: agent memory in this repo. CLI is
flatbread proof …; records live under.flatbread-proof/. - Dev server:
pnpm play(GraphQL on port 5057, Next.js on port 3000). Fromexamples/nextjs, preferpnpm exec flatbread start -- next dev --turbopack. Useflatbread start—flatbread devis not a CLI command.
The repo uses Mergify stacks for PR management. The mergify-cli is installed via pip install mergify-cli (included in the update script). Key points:
- Use
mergify stack pushinstead ofgit pushon feature branches (the.husky/pre-pushhook will remind you). - The commit-msg hook (
.husky/commit-msg) auto-appends aChange-Idtrailer for stack tracking. - See
.agents/skills/mergify-stack/SKILL.mdfor the full workflow.
- Native build scripts are approved in
pnpm-workspace.yaml. TheonlyBuiltDependencieslist allows esbuild, sharp, @swc/core, etc. to run their postinstall scripts automatically duringpnpm install. - Vitest packages run in watch mode by default. Always use
vitest run(not barevitest) to get a single run and exit. flatbreadCLI is not on PATH globally. Fromexamples/nextjs, preferpnpm exec flatbread …(local binary), ornpx flatbreadfrom a shell. Thepnpm playscript from the root handles this automatically.- Build before test. All packages must be built (
pnpm build) before running tests or starting dev servers.pnpm testhandles this automatically. -H, --httpsdoes not make Flatbread serve HTTPS. The server listens over plain HTTP whatever you pass. Fromexamples/nextjs, runpnpm exec flatbread start -- next dev --turbopack.- Full local CI parity check:
pnpm verifyruns lint, typecheck, build, and all tests.
The repo uses weave for entity-level semantic merges. The .gitattributes file routes supported file types (.ts, .js, .json, .md, .yaml, etc.) through weave-driver, which resolves merges at the function/class/entity level instead of line-by-line.
- Binaries:
weave(CLI) andweave-driver(git merge driver), installed viacargo install --git https://github.com/Ataraxy-Labs/weave weave-cli weave-driver. The update script handles this. - Preview a merge:
weave preview <branch>— dry-run that shows which files/entities would merge cleanly or conflict. - Config:
weave setupwas already run; git configmerge.weave.driverpoints toweave-driver. No re-run needed unless the binary path changes. - Rust toolchain: Weave requires Rust >= 1.89. The update script ensures
rustup default stableis set.