# Research log

A research log kept as you go: the question, every source, and findings that each cite their sources.

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 "Research" 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> "Research"

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:

    Research/
      README.md     the rules
      question.md   what is being asked, and why
      sources.md    every source, numbered
      findings.md   each finding cites sources

## 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
# Research

<The question>, researched as it goes, so anyone can check a conclusion against
its sources.

- question.md: the question, why it matters, and what would answer it.
- sources.md: every source used, numbered, with its link or reference and one
  line on what it says.
- findings.md: what has been found, each finding citing source numbers, and a
  "Changed" list at the end.

## Rules

- Every finding cites at least one source number.
- When a finding changes or is dropped, add a line to "Changed" saying what and
  why, with the source that changed it.
- Record a source when you read it, not later.

## When to write

- Every time you read a source that bears on the question.
- After each piece of research, update findings.md.
~~~

Then create question.md, sources.md and findings.md the same way.

Write question.md from what the person asked. Then add sources and findings as you go, in the same turn you read them. Name the folder for the topic when there is one, as in "Research: pricing". If the person hasn’t said what the question is, ask them in your reply; write question.md as not yet stated until they do.

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

Ask who should have it: a coauthor or a client. Then, for each person:

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

It prints `Shared "Research"` and the grant's ID. They can read it, not change it; add `--role editor` for someone who should.
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.
