Skip to content

The subagents

The roster, and the authoritative record of which markdown file each subagent loads. If this page and a prompt disagree, this page is right and the prompt needs fixing.

Each subagent is an override_agent node on the single Questionnaire Intake Agent — the node IDs are in the workflow.

The load map

Every subagent loads its own section page plus the reference pages ticked below. Nothing else. A blank cell is a deliberate omission, not an oversight.

Every page is listed explicitly on the node that needs it, in its additional_knowledge_base. Nothing is inherited — the agent's own knowledge_base is empty and each node overrides its inherited one to [], so a subagent can only see what this table gives it.

Subagent Section page Core rules Voicing answers Matrix by voice Sensitive Stop conditions Red flags Handover record
Intro
1 · About you 01
2 · Health history 02
3 · Systems review 03
4 · Injuries and movement 04
5 · Activity history 05
6 · Goals 06
7 · Nutrition 07
8 · Sleep and recovery 08
10 · Preferences 10
11 · Consent 11
Stop and refer
Handover

The blank cells under Red flags for the ten section subagents are mostly not a gap. Nine of the ten section pages end with their own Red flags subsection — filtered to only the flags whose trigger field lives on that page, not the full list. See 04.2 for a small example and 02.9 for a larger one. Sections 6 and 10 genuinely have none: no flag in Screening red flags is driven by a goal_* or pref_* field, so their pages carry no such subsection at all rather than an empty or padded one.

This leaves the reference page itself thinner than the closing subagents may need

Screening red flags keeps only the triage outcomes and the generic session-stop signs — the specifics live with the fields that trigger them, by design, so each section subagent is self-contained for the flags it can actually hear. But stop_and_refer and handover load that page and not the section pages, so once it went generic they lost direct access to the specifics needed to actually classify a flag (which caution modification applies, which age threshold fired) — those specifics are now scattered across whichever section pages own the relevant fields, several sections away from either closing subagent. Today they still see the client's own words in the handoff state and can reason it out, but they no longer have the lookup table doing it for them. If that turns out to matter in practice, the fix is either to attach the relevant section pages to those two nodes as well, or to keep one authoritative copy of the specifics loaded there too, accepting the duplication.

A dry run has now confirmed this. Given three real triggers with only the handoff state to go on, stop_and_refer classified all three Refer & stop — the right answer — and reported that two of the three were inferred by keyword-matching the generic list, not read off any rule it holds. handover could run only two of the eight items on its own closing checklist, because the other six ask it about required fields and conditional triggers that are defined on section pages it does not load. Neither is failing; both are reasoning past a missing lookup table. The node prompt for stop_and_refer now says so outright and tells it to escalate whatever it cannot resolve, which is the cheap half of the fix. The expensive half — attaching the section pages, or keeping one authoritative copy of the specifics on those two nodes — is still open.

Section 9 has no subagent — the coach takes those measurements in person.

How the map was decided

flowchart LR
    subgraph EVERY ["Loaded by everything"]
        CR["Core rules<br/>the scribe role, one question<br/>at a time, never infer"]
    end

    subgraph ASKING ["Loaded when the subagent asks questions"]
        VA["Voicing answers"]
        SC["Stop conditions"]
    end

    subgraph SOME ["Loaded only where the content demands it"]
        MX["Matrix by voice<br/>sections 2, 3, 7"]
        SN["Sensitive questions<br/>sections 2, 3, 7, 11"]
    end

    subgraph CLOSING ["Loaded only by the closing subagents"]
        RF["Red flags<br/>triage outcomes, generic"]
        HR["Handover record"]
    end

    CR --> ASKING
    ASKING --> SOME
    SOME --> CLOSING

Four rules produce the whole table:

  1. Core rules goes everywhere. It is the only page with no exceptions, and it is listed on all thirteen nodes rather than shared from the agent. Repeating it is the price of every node being able to inherit nothing.
  2. A subagent that asks questions gets voicing and stop conditions. The intro, stop-and-refer and handover subagents do not ask questionnaire questions, so they do not get the voicing guide. The intro does get stop conditions — a client can disclose chest pain while you are still explaining the call.
  3. Content-specific pages follow the content. Only three sections have matrix questions; only four have sensitive blocks. Shipping those pages everywhere would cost every subagent context for a problem it never meets.
  4. Recognition lives with the questions that can trigger it; classification lives at the end. A section subagent needs to recognise a trigger and hand off — the flags its own fields can produce are filtered onto its own section page (or, for two sections, are simply absent, because none of their fields drive one), so it never needs red flags loaded at all. What every question-asking subagent gets instead is stop conditions, which teaches the behaviour — say the wording, hand off, don't soften it — rather than the list. Turning a recognised trigger into one of the four triage outcomes is the closing subagents' job.

Widening a page's audience costs every turn it is loaded on

Every page here is injected whole, not retrieved, so a page added to a node is in context for every question that node asks. Before widening a page's audience, check whether the subagents that would receive it actually act on it. The usual right answer is a new, smaller page on the two or three nodes that do.

Intro

Opens the call. Confirms it is the right person, says who is calling and why, gets consent to record, and sets expectations about length and the option to stop.

  • Does not ask any questionnaire question, including "just the easy first one".
  • Does carry stop conditions, because clients volunteer symptoms during the explanation.
  • Ends by handing to section 1, or by rescheduling if it is a bad moment. A client who says "now isn't great" gets a callback offer, not persuasion.

The single most valuable thing it does is tell the client they can stop, skip any question, and decline anything without explaining why. Everything after depends on them believing that.

Section subagents

Ten of the thirteen. Each owns one section and runs the same three beats — announce, ask, hand back — described in the interview protocol.

They are ten nodes running the same base prompt. What differs between them is only: which section page is attached, which content-specific reference pages come with it, and which node the workflow moves to next. The shared scribe rules are written once, on the agent.

A section subagent never asks another section's questions

Not even when the answer would obviously help, and not even when the client volunteers it. Volunteered answers get recorded against their field ID and passed on in the handoff state; the subagent that owns the field skips it and says so. Asking outside your section is how two subagents end up asking the same thing twice.

Handing to the next one

Each section subagent ends by offering a break and passing state. It does not announce the next section — the subagent that owns it does, because it is the one that knows how long its section takes and what it involves.

The break matters more than it looks. Ninety minutes is too long for one sitting, and the natural break after section 4 is also the point where screening is complete, so an interrupted call has already produced the part that mattered most.

Stop and refer

Takes over the moment a red flag fires, from any subagent, at any point.

  • Delivers the stop wording from stop conditions verbatim. No softening, no speculation about the cause.
  • Repeats the emergency-services line if the symptom is happening now.
  • Marks the record Refer & stop with the field that triggered it.
  • Can de-escalate: if the trigger turns out not to qualify, control returns to the section it came from and the call continues. This is why an unsure section subagent should escape rather than judge — escaping is reversible, carrying on is not.
  • Hands to handover.

The de-escalation is not a second edge in the workflow. Every red-flag edge carries a backward_condition alongside its forward one, so the same edge that takes the call out of a section is the one that puts it back — see edges.

Handover

Closes the call and produces the record. Loads the handover record and red flags for the triage-outcome definitions.

  • Merges the handoff state from every subagent that ran.
  • Lists every red flag with its triggering field, and every decline.
  • Proposes a triage outcome with its reasoning visible — Clear, Proceed with caution, Clearance required, or Refer and stop. It does not decide one.
  • Tells the client what happens next and when.
  • Runs the closing checklist.

A call that ended early still gets a handover. Sixty answered fields are worth having, and the record says where the call stopped and whether a callback is needed — see partial calls.