FDN

For teams that build with AI agents: an app in your browser to model the business with stories, rules that run and scenarios that test them, all kept in git. When the model leaves no doubt, the code comes out exact, and if not, FDN tells you.

View on GitHub npm v1.0 · open source
BusinessEngineeringOperationsAI agents
a single modelstories · rules · scenarios · in your git
the problem

The hard part is getting business, engineering and operations to speak the same language.

Everyone has their own version

In someone's head, in the code, in a manual or in the agent's chat.

Ambiguity reaches production

What nobody decided gets decided in an if.

The post-its stay in the photo

Event storming doesn't run, and nobody checks it.

how it works

You and your agent, on the same model.

Business, engineering and operations work together, each with their preferred agent.

FDN · Travel expenses
Manager
Authorize trip
Trip
Trip authorized
Can any manager authorize it?

agentNothing says who the trip's manager is: anyone could authorize it. I left you a proposal.

Authorize trip require status = sent require actor = trip manager Apply

youMakes sense. I approve it.

actorcommand: what is asked foraggregate: what keeps state and decidesevent: what happenedopen question

FDN checks the model on every change and flags what doesn't fit; your agent reads it and proposes changes through MCP, the protocol AI agents use to work with tools. You review them and decide which ones get applied.

the layers

Three layers without ambiguity. Your agent writes the fourth.

1

Story

Event storming: the business's stories as a timeline of post-its.

2

Domain

DDD: the rules of each part of the business. An engine runs them, so Given, When, Then scenarios pass or fail without a line of code.

3

Contracts

The exact shape of what goes in and out, technology-agnostic.

4

Code

  • Your agent writes it, in your language, with the rules FDN gives it. Each piece carries the id of what it comes from.
  • fdn trace checks that nothing in the model is missing from the code, and that nothing is extra.
  • fdn verify runs the same scenarios against your code, through a lightweight adapter your agent also writes. If your code says something other than the model, it fails.
// fdn: rule 01J9…3QK «require actor = trip manager» · rejection NotTheManager if (approver.id !== trip.managerId) throw new NotTheManager();
get started

Three steps to get started.

Install

Node 22.18 or later.

npm install -g @fdn-dev/cli

Open FDN

In the folder that holds your repositories. It opens in your browser, and each repository keeps its model in .foundation/, readable and diffed in every PR.

fdn --open

Connect your agent

Any MCP client, at http://127.0.0.1:4848/mcp. With Claude Code:

claude mcp add --transport http fdn http://127.0.0.1:4848/mcp

With a team server, business and operations join from the browser, with nothing to install.

faq

What people usually ask.

Do business people need git or the terminal?

No. Engineering installs FDN once on a team server; business and operations join from the browser with their company account, and their agent connects to the same place. What they approve reaches git as commits, and engineering reviews it in a PR.

Do I need to know DDD or event storming?

It helps, but it isn't required. Your agent models with you, and FDN checks the model on every change: it tells you, in the business's language, what is missing or doesn't fit.

Does it work on a project that already has code?

Yes. The model lives apart, in .foundation/ of the same repository, and doesn't touch your code. FDN doesn't infer the model from the code you already have: it's modeled from the business's stories.

Which agents work with FDN?

Any MCP client: over HTTP at http://127.0.0.1:4848/mcp, or over stdio with fdn mcp if your client doesn't connect over HTTP. FDN brings no AI of its own and doesn't charge for using it.

Does my model leave my company?

No. FDN runs on your machine or on your team's server, never on ours; the model lives in your git and FDN sends no telemetry. Your agent only proposes: a person decides what gets applied.

What's left if I stop using FDN?

Your model: one readable JSON file per context inside .foundation/, with its history in git. It's yours, and it reads without FDN.

How is it different from a spec in Markdown or from Gherkin?

Your agent reads a Markdown spec once, and nobody checks that the code follows it. Gherkin runs its scenarios against the code, so the code has to exist first. In FDN the scenarios run on the model and pass or fail before the code exists; FDN warns on every change about what stops fitting, and then fdn verify runs the same scenarios against your code.

What about Spec Kit or Kiro?

They're good ways to give your agent a spec before writing code. FDN goes one step earlier: the business model runs, gets checked on every change and checks the code with fdn verify. They can be used together.

Isn't this model-driven all over again?

No. Model-driven tools generated the code from the model, and you had to maintain the generator and live with what it produced. In FDN your agent writes the code, in your language and your style; the model doesn't generate it, it checks it, with fdn trace and fdn verify.

Before the code: FDN.