# Company brain

Where things live, who does what, and every decision with its reason, from today on, in one folder the whole team and their agents read.

This is a recipe from flie: a person can read it first, and an agent follows
it. It makes one folder in the person's flie, with a README in it that holds
the rules, so every agent that opens the folder later works the same way.

## 1. Make sure flie is set up

If the `flie` command is not found or `flie whoami` says nobody is signed in,
and you have no flie tools over MCP, set flie up first, with the person's
authorization, by following https://flie.sh/setup.md
Then come back here.

The steps below are `flie` commands. Over MCP, call the tools of the same
names, with the same arguments written as named arguments, and pass a file's
text as `content` instead of `--from`.

## 2. Make the folder

`flie whoami` prints the person's Root folder. Make the folder there unless
the person names another place. If a folder called "Company brain" is already
there (`flie agent list <root ID>`), use it: read its README and follow it
instead of starting again.

    flie agent mkdir <root ID> "Company brain"
    flie agent mkdir <folder ID> "decisions"

Each command prints the new item's name and its ID; every later command names
the item by that ID. Laid out, the folder is:

    Company brain/
      README.md              the rules
      where things live.md   links into every other tool
      people and teams.md    who does what
      decisions/             one file per decision

## 3. Write the README, then start

Write this README into the folder, adapted where the person says so, with the
text on stdin:

    flie agent create --from - <folder ID> "README.md"

~~~markdown
# Company brain

Where things live, who does what, and what was decided and why, from
<the date it was started> on. The team's agents read it before answering and
keep it up.

- where things live.md: each kind of thing and where it is, as a link.
- people and teams.md: who does what, and who to ask.
- decisions/: one file per decision, named "0001 short title.md".

## A decision

    # 0004 We price per agent, not per seat
    Decided: 2026-09-29, by <who>
    What: the decision, in one or two sentences.
    Why: the reason.
    Links: where the discussion happened.

## Rules

- Point to other tools; don't copy them. A link to the contract, not the contract.
- Never rewrite a decision. When one changes, write a new one that names it.

## When to write

- When a decision is made, or you learn of one that isn't here.
- When someone asks where something is and the answer isn't here yet.
~~~

Then create where things live.md and people and teams.md the same way.

Ask the person for the first things: where the main things live, who is on the team, and the decisions made recently. Write those, and leave the rest to grow.

## 4. Ask the person, then share it with whom they say

Ask who should have it: the team. Then, for each person:

    flie agent grant <folder ID> --to <their email> --role editor

It prints `Shared "Company brain"` and the grant's ID. An editor can change the files; leave out `--role editor` for someone who should only read them.
Everything added to the folder later is shared too. Never share without being
told with whom.

## Done

Tell the person what you made, give them the folder's link
(`flie agent link <folder ID>`), and ask who, if anyone, should have it (step 4).
Editing its README changes the rules for every agent that reads it. How to
change a file without losing anyone's edits: https://flie.sh/skill.md.
End your reply with the question in step 4.
