Skip to content

Map an existing product

After this guide Emergent Instruments holds the logic of a product that already exists, built from its repository by your agent and approved by you piece by piece.

You need a product and a connected agent, as in the Quickstart. Run the agent in the repository, so it can read the code.

Pick the depth. Open Actions in the product header and set the agent rigor. Lightweight gives a fast first map: primary flows, owners, one key sequence, core data, and the hard safety gates. Thorough, the default, adds failure paths, rules, and key records. You can raise it later and ask the agent to deepen what is there.

Know what is sent. The agent reads your code on its own machine and sends only records. Tell it to keep secrets, source code, and customer data out of records. A record can point to an outside document with sources instead of copying its text.

  1. Ask for the outline first.

    Read the overview of my Emergent Instruments product. Then read
    this repository and propose the product's details (name,
    summary, outcome, boundary), the actors and systems, and a
    list of capabilities with a one-line summary each. No flows
    yet. Stage it as one proposal.

    The agent calls get_product_overview, then propose_product_change with the records and a details patch. Applying the proposal sets the details, including the product’s name; rejecting it leaves them as they were.

  2. Review and apply the outline.

    A capability is an outcome some actor gets, such as “Write a note” or “Find a note again”. It is not a layer or a team. Reject the proposal with feedback if the list reads like a module list, and let the agent try again.

  3. Go one capability at a time.

    Now map the "Write a note" capability: its flows and steps,
    the sequence behind each move that calls the server, the rules
    the code enforces, and the data it reads and writes. Link to
    shared records, do not restate them. One proposal for this
    capability.

    Small proposals are quicker to read on the map. The agent reads what is already committed with get_product_capability and get_product_records, so later proposals link to earlier ones.

  4. Answer what the code does not settle.

    Code shows what the product does, not always what it should do. When the agent finds two behaviours that disagree, or a limit with no stated reason, it raises a question with escalate_question. Answer it in the Questions tab, then have the agent read the answers and continue.

  5. Read the whole map.

    When every capability is in, open the capabilities map and walk each flow. Select any step to see its details, rules, and the records it links to.

Each tool call the agent makes on a product counts toward the 25 a month that the Free plan includes: reads such as get_product_overview as well as proposals and questions. Mapping a product of any size takes more than that. See Plans and limits.

A map goes stale when code changes without it. Two habits prevent that:

  • Have the agent read the product before it changes behaviour, and propose the logic change with the code change. See Propose and approve changes.
  • Have the agent report a run with report_process_run when it checks code against the product’s rules. The run shows in the product’s Runs & audit tab, with anything the agent needed that the product does not describe.