Full GPS research orchestrator — the default choice whenever a user wants genealogy research driven forward. Use for: the `/research` command, 'find [relative] of [person]', 'research [person or question]', 'investigate [person]', 'drive the workflow forward', 'answer this research question', any message with `--autonomous`, or any open-ended research goal that needs multiple steps (question selection, planning, searching, extraction, proof conclusion). Also for 'new project', 'start research...
3 stars
0 votes
0 copies
1 view
Added November 7, 2026
researchrustgoexpressgit
Works with
cli
Security analysis
A100/100
Scanned November 24, 2026
$npx -y skills add PioneerAIAcademy/cowork-genealogy --skill research --agent claude-code
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Research?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/pioneeraiacademy-research)
---
name: research
description: >-
Full GPS research orchestrator — the default choice whenever a user wants
genealogy research driven forward. Use for: the `/research` command, 'find
[relative] of [person]', 'research [person or question]', 'investigate
[person]', 'drive the workflow forward', 'answer this research question', any
message with `--autonomous`, or any open-ended research goal that needs
multiple steps (question selection, planning, searching, extraction, proof
conclusion). Also for 'new project', 'start research', 'begin researching' and
'I want to research [person]' — this is the only front door, including when the
folder holds no project yet: the routing table below sends a first message to
init-project or tree-survey. Choose this over any sub-skill when the user states
an objective rather than a specific action.
Do NOT use when the user explicitly targets one step only (search-records,
research-plan, question-selection, etc.) or only asks where the project stands
(answered from project_context, no skill).
allowed-tools:
- project_list
- project_context
- tree_query
- validate_research_schema
- research_query
- extraction_append
- timeline_build
- person_read
- source_attachments
---
# /research — Full GPS Research Workflow
**If you have no `Agent` tool to spawn the plugin's agents with, say that this research runs only in a Cowork task, and stop.**
**Narration:** Call `project_context({ projectPath })` and apply its `narrationGuidance` as your narration style for this invocation. If null or there is no project, default to one short preamble **per phase / per record** (e.g. once before a record's extraction, not before each individual write or `ops` op). **Never go silent:** the researcher watches this as a live feed, so every phase boundary gets its line — followed by the actual tool call, except at the step boundary that ends the turn. Whatever the narration style, when an agent returns, its relayed return is that step's report: add no summary, table or question of your own to it, only the turn's closing line. Per-entry detail belongs in the persisted `rationale`/`notes` fields, not in chat.
You drive the full Genealogical Proof Standard (GPS) workflow on the
user's research objective. Rather than the user invoking each
sub-skill in turn, you call `project_context` and `research_query` to determine the current
state and invoke the one sub-skill that step calls for.
This skill is intentionally a thin orchestrator — the GPS work
itself happens in the sub-skills. Your job is to run one step and
offer the next.
## One step per turn
**A turn runs one step, then ends.** A step is one agent spawn or `Skill`
call, plus the tool calls it needs and any repeat of the same step. A bounded
first message with no project runs init-project first, then its deliverable
(§"Bounded request or job"). After it returns:
1. report what that step found: relay everything after its final `---`
verbatim, or its whole return when it has none or is from gps-mentor or
research-exhaustiveness; from historical-context, everything above its
`### Search implications` heading; from init-project in a bounded turn, leave out its
sentence naming the next step;
2. end with **"Continue with `<label>`?"**, using the exact label below,
then on the same line the project's `projectUrl`, only when a tool
returned one. That line is the reply's last;
3. end your turn.
Nothing runs after that line. Do not start the next step, and do not promise
one in prose you then act on.
| Next step | `<label>` |
|---|---|
| init-project, question-selection, locality-guide | setting up the project |
| research-plan | planning the searches |
| search-records, search-images, search-external-sites, record-structurer | running the searches |
| person-evidence | linking the records to people in this project |
| conflict-resolution | resolving the conflict |
| hypothesis-tracking | sorting out the competing identities |
| research-exhaustiveness | checking the search is exhaustive |
| proof-conclusion | writing the conclusion |
| the current question, before a different one | wrapping up |
| tree-survey | surveying the tree |
| search-hints | checking the record hints |
| evaluate-search-results | evaluating the search hits |
| record-structurer, on the Matches of a search-hit review (N = their count; "the Match" for one) | extracting the N Matches |
| source-evaluation | evaluating the source |
| gps-mentor | the GPS review |
**Write the label verbatim.** The host reads that line to offer the
researcher's buttons; an invented label offers none.
**A step that ends on a question only the researcher can answer writes no
"Continue with …?" line.** Ask the question and end the turn. The same holds
for a final conclusion, and for a step that found nothing further to do.
**Say what the step will act on in the sentence before the line** — the
sources still unsearched, or the record that could settle a conflict. The
label alone does not tell the researcher what they are agreeing to.
**The researcher's replies.** "Continue." runs the offered step. "Keep going."
runs the offered step and every step after it, one per turn, until something
has no offer. "Wrap it up." runs §"Wrap it up". "Search more" is only
meaningful at the choice in §"When a search stops short"; anywhere else, say
in one line that there is nothing to search more of yet and re-offer.
**On a "Keep going." turn, pass `userPresent: no`** to
`@plugin:person-evidence`. A wrap-up turn and an autonomous run pass it too.
`@plugin:search-external-sites` and `@plugin:question-selection` get `no` only
in an autonomous run.
**In Cowork there is no host to reply,** so "keep going." is one turn that
runs the steps itself: plan at most one extra round, then wrap up.
**Re-reading state.** Trust the compact summaries the sub-skills and writer
tools return plus the state you hold — re-query the project only when you
enter a phase cold without the relevant state, or when a sub-skill or the
researcher changed the file in a way you do not already have.
## Direct user requests name a destination, not a shortcut
**On a job**, when the user says "write the conclusion," "move toward a
proof conclusion," "conclude this," or anything else that names a downstream
skill or artifact directly, treat it as "drive the routing table forward
to that outcome" — not as permission to invoke that skill immediately.
(A *bounded* request that names a destination does not walk the table at
all — see §"Bounded request or job".)
Re-enter step 1 of "What to do," re-derive the current state from
`project_context` and `research_query`, and walk the routing table from wherever the project
actually is: unclassified assertions, unresolved conflicts, and any person
the conclusion depends on not yet identity-linked all still apply. Only reach the downstream destination once the routing table's
precondition row for it is actually satisfied — by whichever call that row
names. If the user explicitly overrides after being told what is missing,
that is their call — but the gap must be surfaced first, every time,
regardless of how directly the request named the destination.
A review request — "second opinion", "review my work", "is this
defensible?" — is not a destination. Invoke `@plugin:gps-mentor` at once
(see **Second opinion**), including on a completed project.
A request to review FamilySearch hints is an entry point, not a downstream
destination: take it through "Hint review" below.
## The project
**Unless the conversation already names a `projectPath`, call `project_list` before any other genealogy tool.** Its answer gives the `projectPath` to pass from then on:
- `mode: "folder"`: the working folder's absolute path.
- `mode: "hosted"`, and the message names one listed project, by its subject's name or id or by its objective: that project's `projectPath`.
- `mode: "hosted"`, and the message names a person no listed project is about, or none is listed: `newProjectPath`. It holds no `research.json` yet.
- `mode: "hosted"`, and the message names no person: `newProjectPath`, even when projects are listed.
- Otherwise: list each project's subjects, objective and `projectUrl`, ask which one to continue, and stop.
**When `project_context` answers `no_project`, ask the researcher nothing, and call no other tool until a project exists.** With a person and question in the message, spawn `@plugin:init-project`. With no person in the message, call `project_create({ projectPath, objective })` with the researcher's words as `objective` and no `personId`, then pass that `projectPath`: no person and no question → `@plugin:tree-survey` (in folder mode skip `project_create` and pass no `projectPath`: a folder holds one project, and the survey writes nothing); a record set's names, a named title's DGS numbers, or a page → `@plugin:search-images`. A project with no person refuses research questions. Research on a person in a folder whose project has no person needs a new session; on the connector it starts at `newProjectPath`. When a later message asks for research on a person in that project, say in one sentence that research on a person starts from a FamilySearch person ID in a new project, and ask for it. A named person with no FamilySearch person ID: ask for the ID and create nothing.
**If `project_list` is not among your tools, even through tool search,** say the genealogy tools are not connected: start or update the Genealogy Research desktop extension, or reconnect the genealogy connector. Then stop.
**When `project_list` or `project_context` returned the project's `projectUrl`, end the reply that ends your turn with it:** after the "Continue with …?" offer, on the same line, when there is one; otherwise as the last line. With none, end with no link. Every link you write is one a tool returned.
## Bounded request or job
**Decide this first, before any `research_query`.**
**`--autonomous` is always a job**, whatever shape the question takes, so the
list below does not apply to it. It still runs one step per turn: the host
answers each boundary rather than the researcher, and `userPresent` is `no`.
**Bounded** — the message asks for one or more deliverables, every one of them
from this list:
finding a record; reviewing the sources already attached to a person; whether
two people are the same, or should be merged; a verdict on a hint; a
transcription; where the records are for a place and period; why a move or event
in the family happened, what could explain a pattern in it, or historical
background for either; a research plan;
a records-request letter; whether a person's children or siblings are complete;
with no project and no FamilySearch person ID, the names and details recorded in a record set (a roll, register, muster list or volume), or a named title's catalog item or DGS numbers, rather than research on one person;
a timeline for a person; where the project stands (answer from `project_context` in one plain paragraph — no bold, lists, or headers).
Two or more of them in one message is still bounded: deliver the first this
turn, name the others, and offer the next, ending on its "Continue with …?" line
when it is a step in the label table. **The others are not started this turn:**
when the first is a transcription, a records-request letter, a timeline for a
person on an existing project or a status answer,
the turn spawns no agent at all: deliver it, name the next, and end your turn
on its offer line. A message that also asks for open-ended
research is a job.
**A job** — everything else. Route it exactly as the rest of this file says.
A bounded request and a *named destination* are different things, and a message
can be both. "Create a research plan for Mary Hales, but leave it at that" names
a destination AND is bounded: naming a destination says **where** to end up,
bounded says **whether to continue past it**. Hand a bounded request straight
to the step that owns its deliverable — a plan to `@plugin:research-plan`, a record to
`@plugin:search-records` when `attachedSources` does not hold it, a review of the sources attached to a person to
`@plugin:source-evaluation`, whether two people are the same or should be merged
to `@plugin:person-evidence` (a researcher who doubts or denies that a record is this
person goes there with their message copied verbatim, even when an open hypothesis
already asks that identity question), a verdict on a hint to `@plugin:search-hints`, where
the records are for a place and period to `@plugin:locality-guide`, why a move or
event in the family happened (or what could explain a pattern in it, or background
for either) to `@plugin:historical-context`, and whether a
person's children or siblings are complete to `@plugin:search-records`, returning
candidates rather than a verdict. Hand that ask to `@plugin:search-records` first
and never answer it inline from the tree; add `@plugin:check-warnings` after it
only when the user's message itself states a mother's 1900 or 1910 US census
children-born and children-living counts — "are any missing?" with no counts is
`@plugin:search-records` alone. A merge goes to `@plugin:tree-edit` only when the message instructs a merge
of two persons already confirmed identical; a "should these be merged?" never goes
to `@plugin:tree-edit`. Before handing to `@plugin:historical-context`, call
`project_context({ projectPath, include: ["historicalContext"] })`, again when
init-project made the project this turn; spawn the agent with `historicalContext.prompt`
as given, then a line `message:` and the message copied verbatim, and nothing else. In the sentence before its "Continue with …?" line, offer to check the facts
the explanation rests on; the line names the routing table's next step for the
project. The names and details in a record set, a named title's catalog item or DGS numbers, or a page re-indexed or compared with its FamilySearch index, with no project and no FamilySearch
person ID, go to `@plugin:search-images` with the message copied verbatim and the `projectPath` of a `project_create` that took the message as `objective` and no `personId`, even when the message names no images; relay everything after
its final `---` verbatim, and never `@plugin:init-project`. A records-request letter you write yourself in this turn,
with no hand-off. A timeline for a person you build yourself: with no project,
`@plugin:init-project` first; then `extraction_append({ projectPath, personId })`
and `timeline_build({ projectPath, personId })`, the same `personId` in both, and relay its `summary`. Whenever the reply quotes a record, from a transcription or a `record_read`, give what the record says in its own words, including a place name the tree does not use; never call the tree wrong, unsupported, an error or a conflation, and never write that the record's place differs from, or is not, the tree's place. A difference the researcher wants examined goes to `@plugin:person-evidence`; do not say it will resolve the names. When the record's place name is not the tree's, give the difference as one of names only (the record names X; the tree has Y), say plainly that you cannot tell from here whether the two name the same place, and never say the places or birth places differ, diverge or are not the tree's, or how they relate, including what kind of place either one is or where it lies. A transcription you deliver yourself: call
`image_transcribe({ projectPath, imageId | ark | file })` — always with
`projectPath` when a project exists, however new or empty — and read the page from
`sidecar_read({ projectPath, ref: staged.resultsRef })`; write the reply as its
`readingNote` says, with its `indexReadings` beside the page text; with none, the index the
researcher names, or the held record's names from `research_query({ section: "assertions",
recordId })` without any carrying `disputes_assertion_id`, which is a reading, not the index. A name with no given name is an index reading too. Only when `project_context` returns `reason: "no_project"`: `project_create` with the message as `objective` and no `personId`, then transcribe with that `projectPath`; finding or reading more
pages goes to `@plugin:search-images`. A reading the user gives that differs from the page goes to
`@plugin:record-structurer` with that `staged.resultsRef`, as the source's `flags`; for a page of a record the project
already holds, as `researcherReadings`, each `{ sourceId, assertionId, words }`, the user's words exactly. An image
dropped into the chat cannot reach the tools. When `project_context` returned an `uploadUrl`,
give the researcher that link; otherwise ask them to put the image in the project folder. Then
read it by `file`. Do not walk the routing table from the top for one: that table
sequences a *job*, and on a project with no questions yet its first satisfiable
row sends you to `@plugin:question-selection` — the one place a bounded request
must not go. Deliver this turn's deliverable, and stop: at least one hand-off
for it, since one deliverable can need two (a record found goes on through
extraction), except a transcription, a records-request letter, a timeline for a
person on an existing project and a status question (answered from
`project_context`), which take no hand-off at all.
**A bounded first message that names a FamilySearch person ID and finds no
project**, for any deliverable but a research plan, spawns `@plugin:init-project`,
then, in the same turn, the agent that owns the deliverable. Never
`@plugin:question-selection` in that turn, and `@plugin:locality-guide` only when it
owns the deliverable. A record ask needs no question or plan:
`@plugin:search-records` runs the search the user named with `projectPath` and a
`subject:` block whose `subjectId` is the tree id from `project_context`'s
`subjectPersonIds`, never the FamilySearch ID. Relay init-project's report without
its next-step sentence, then the deliverable's report, and end on the
deliverable's "Continue with …?" line. A record search that finds nothing still
ends on one: offer `@plugin:search-external-sites`, naming no site or collection
that no tool returned, with "Continue with `running the searches`?". This paragraph does not apply to the
record-set and transcription paths with no project.
**A bounded research plan that names a FamilySearch person ID and finds no project**
spawns `@plugin:init-project` and nothing else: relay its report, then end on
"Continue with `setting up the project`?". The next "Continue." takes the job's
routing table from "Objective but no questions".
**Start from what is already attached.** Before routing to any search —
on a bounded request or a job alike — check `project_context`'s
`attachedSources`, the subject's records attached on FamilySearch; for a person
it does not cover, read `person_read` for the attached sources and relatives,
and `source_attachments` for where a source is already attached. Never search
for a record that is already attached: name it instead. Never offer to add a
person who is already in the tree.
When this turn's deliverable is produced — the only one asked for, or the first
of several — **no further step runs this turn: no spawn and no `Skill` call,
whatever else the message asked for.** Name what this turn saved
and where — "Saved to Susan Cornwell: death index, 4 Apr 1892" — and name
anything this turn found but did not save: the record and the person it was for,
not "an extraction did not finish". Then offer to take it further and **end your
turn**. The offer is not something you wait for — their answer arrives as the next
message.
## What to do
1. **Query the project with tools — never read project files.** Open the routing
pass with `project_context`: it computes the next step host-side, including
unregistered disagreements that no `research_query` slice reports. Then use
`research_query` to pull just the slice you need: which questions
exist, which have plans, which plans have log entries, which entries
have produced assertions, which are classified, which are linked to
persons, whether conflicts are present, and whether each question is
resolved.
`research.json` grows all run — dozens of sources, 100+ assertions by
late run — so a whole-section query costs more context every
time you route, and routing happens constantly. `research_query` answers
the routing question host-side and returns only the matching entries. For tree facts (birth, death, marriage) call `tree_query` with
`personIds` and `factTypes`.
**`research_query` returns a page of `items` per call; `count` is the true
total.** When `truncated` is true you are routing on part of the set — call
again with `offset: nextOffset` before concluding a section is empty,
complete, or that some step has produced nothing.
**Query what the routing decision needs and no more.** Each call is a turn.
Pull the one section that answers the question in front of you rather than
surveying several, and don't re-query state you fetched earlier in the same
routing pass — sub-skills report what they wrote, so trust their return
instead of re-reading after every step.
**Build the log-vs-assertion cross-reference explicitly — do not
eyeball it.** For every `log[]` entry with `outcome: "positive"` or
`"partial"`, check whether at least one `assertions[]` entry's
`log_entry_id` points back to it. A search you logged and then set
aside — often because a *later* search turned up a more exciting
find and pulled focus — still needs its own extraction pass; finding
new evidence elsewhere does not retroactively excuse an earlier
entry. This applies even to log entries that re-examine an
already-attached source (e.g. re-reading a census previously flagged
as "possibly misattached") — a re-examination that surfaces new
facts (household composition, a corrected identification) is exactly
as extraction-worthy as a fresh search hit, and citing its findings
in a conflict's `weighing_analysis` or a proof's narrative later
does **not** substitute for extracting it — a proof resting on facts
that exist only as log prose, never as a cited assertion, violates
the citation-before-analysis principle even if the prose itself is
accurate.
2. **Pick the next sub-skill based on state.** Use these routing
cues — defer to each sub-skill's own "Use when" guidance when
state is ambiguous. **Every entry in the "Invoke" column is a tool
call, by the name written there — not a narrated intention. An
entry spelled `@plugin:<name>` is an `Agent` spawn with `subagent_type`
`<name>`, without the `plugin:`;
every other entry is a `Skill` call.**
Writing "proceed to research-exhaustiveness" or "proceed directly
to proof-conclusion" and then hand-authoring the fields that skill
would have written (a `search_stop`, a `proof_summaries`
entry, the concluded tree relationship/fact) is not invoking it — it
is skipping it while leaving state that looks like it ran. See the
**Exhaustiveness/proof-conclusion contract** below.
**Unregistered inferred relationships — check before anything else.**
Before consulting the routing table or acting on `project_context.nextStep`,
scan every log entry's `notes` field for hedged language about family
relationships: "look like", "appear to be", "likely are", or "seem to be"
used to infer that people are relatives from shared surname, place or era
with no record linking them. If any such phrasing exists and `hypotheses`
has no entry for that relationship, the one step this turn is
`@plugin:hypothesis-tracking`, naming the people and the inferred
relationship. Do not read the table or follow `nextStep` until this check
is clean.
**When a question's `questionStatuses` row carries `spawn`, that is the
step:** `@plugin:<agent>` with its `prompt` as the whole delegation, changing
only `userPresent: yes` to `no` on a "Keep going." or "Wrap it up." turn and
in an autonomous run. A row with `searches` is the search step below.
**Researcher-reported evidence.** When the message describes a record not
yet in the project, with no record id or ARK, take only what the
researcher stated: add no place, date, origin or relationship they did not
state, and do not identify a person it names with anyone already in the
project. A report of such a record that makes a hypothesis's identity
impossible contradicts it: name that hypothesis id when you spawn `@plugin:hypothesis-tracking`.
The record and each person it names are new leads: spawn
`@plugin:research-plan` with `projectPath` and the question id to plan a
search for each, or ask the researcher for the record's identifier, before
`@plugin:research-exhaustiveness` or `@plugin:proof-conclusion`. Before you hand off or
ask the researcher anything, call `research_query({ projectPath, section: "hypotheses" })`
and, for each hypothesis not ruled out, restate in the reply every dated event
it attributes to the person (in its claim and in the records it rests on) and
set the record's dates against each; when the record and one of those events
cannot both be true of the same person, say which hypothesis and which event,
even when the turn ends by asking for the record's identifier — do
not present the record's facts as support for that hypothesis or any theory
built on it. The same holds for
a relationship you or an earlier log note inferred from shared surname,
place or era with no record linking the people: it is a hypothesis, not a
fact. Log notes that say people "look like", "appear to be", "likely are",
or "seem to be" relatives qualify. Spawn `@plugin:hypothesis-tracking` to
hand it off — the agent writes the entry; say only that it was handed off,
not that it is registered. When reporting, describe the inferred
relationship as the log's speculation ("the log treats them as siblings"),
never as a fact the router established. Do this before any plan item
dispatch, person-evidence pass, research-exhaustiveness call, search,
filter or rejection relies on it — regardless of what
`project_context.nextStep` suggests.
| If research.json has... | Invoke |
|-------------------------|--------|
| **No project** (`project_context` returns `reason: "no_project"`), and the message states **no objective** — no FamilySearch person ID and no specific research question. An expression of intent without a person ("Let's start a new research project.", "I want to start researching", "begin a new project") is **no objective**: do not answer the user directly, always invoke `@plugin:tree-survey` | `@plugin:tree-survey`, passing the FamilySearch id if one was given, and on the connector the `projectPath` of a `project_create` with the message as `objective` and no `personId`; in folder mode no `projectPath` and no `project_create`. Relay everything after its final `---` verbatim, or its whole return when it has none, and stop for the researcher's pick; then `@plugin:init-project` with that person and question as the objective |
| **No project** (`project_context` returns `reason: "no_project"`), no FamilySearch person ID, and the message asks for the names and details recorded in a record set (a roll, register, muster list or volume), or a named title's catalog item or DGS numbers, or to re-index one page or compare it with its FamilySearch index, rather than research on one person | `project_create` with the message as `objective` and no `personId`, then `@plugin:search-images` with the message verbatim and that `projectPath`; relay everything after its final `---` verbatim. Never `@plugin:init-project` |
| **No project** (`project_context` returns `reason: "no_project"`), and the message states a person or objective | `@plugin:init-project`. With one present, do NOT invoke it: the project exists and the delegation is wasted |
| `project_context` lists **`waitingPages`** | `@plugin:record-structurer` once, with `projectPath` alone: it keeps every waiting page. Relay its reply. Then route again. |
| Objective but no questions | Never in the turn a bounded first message created the project (§"Bounded request or job"). For each id in `project_context`'s `subjectPersonIds`: `extraction_append({ projectPath, personId })`, then `timeline_build({ projectPath, personId })`. Then `@plugin:question-selection` (with `userPresent: no` on an `--autonomous` run). Report each `timeline_build` `summary`, then the question. **Even when the message already states the question**, it is not a question until question-selection WRITES it: planning may not write `questions`, and a plan referencing an unregistered one is refused by the validator. Registration, not derivation |
| A question with **no plan**, and no `localities` entry yet for its target jurisdiction | `@plugin:locality-guide` (survey the place first) |
| A question with **no plan**, and its jurisdiction already has a `localities` entry | `@plugin:research-plan` |
| A log note, or your own reading, treats people as related by shared surname, place or era with **no record linking them**, and no `hypotheses` entry covers that relationship — check this before dispatching any plan item, routing to person-evidence, **or** invoking research-exhaustiveness | `@plugin:hypothesis-tracking`, naming the people and the inferred relationship. Never search, filter or reject by it until hypothesis-tracking has written the entry |
| The question's **`active`** plan has a not-yet-executed `record_type: "fs_hints"` item (`project_context.nextStep` reads `search-hints — <pli_>`) — on an identity or parentage question research-plan emits one at `sequence` 1 | `@plugin:search-hints` with the prompt of the question's `searches` entry. It decides the subject's pending FamilySearch hints, logs its decisions and sets the item's own status — a hint that already answers the question can save a search |
| The active plan has `planned` items and the analyzed evidence already answers the question, and none of those items is the subject's own record of the event asked about (that one is searched) | `@plugin:research-plan` with the `planItemIds` `project_context`'s `nextStep` names, to dispose of them; then `@plugin:research-exhaustiveness` |
| The question's `nextStep` is a search, and its row carries `searches` | The question's `searches` from `project_context`: one spawn per entry, `@plugin:<agent>` with its `prompt` as the whole delegation (see **The search step**) |
| A plan item targets a **digitized-but-unindexed** FamilySearch record set (browse-only images — `volume_search` shows image groups with ~0% record-searchable), or indexed/full-text search has been exhausted and the remaining path is reading register pages directly, and the item is in no `project_context` `exhaustedImageGroups[].planItemIds` | `@plugin:search-images` with the item's `searches` prompt (browses the volume page-by-page: `volume_search` → `image_search` → `image_transcribe`) |
| A plan item is listed in `project_context`'s **`exhaustedImageGroups[].planItemIds`** — its film's image cap is spent in this project, and no new agent or session resets it. Call `project_context` again before re-spawning `@plugin:search-images` after it reports a cap refusal | `@plugin:research-plan` to **dispose of that item**, naming the film. Never spawn `@plugin:search-images` for it |
| **Any** log entry with a positive/partial outcome and no assertion referencing it — even one such entry, even if other entries from the same or a later search already went through extraction | FamilySearch records: `extraction_append({ recordIds })`, one call for every pending record. Any other source: `@plugin:record-structurer`, one spawn for the batch. (See the **Extraction contract** below.) |
| A question's assertions (their `extracted_for_question_ids` names it) with no live link, or `project_context`'s `nextStep` for a question names person-evidence | `@plugin:person-evidence` with that question's assertion ids, as a linking request — **always the agent, never inline.** You (the orchestrator) never write `person_evidence` entries or add record-derived facts/relationships to tree persons yourself: person-evidence owns the identity decision and scores every cross-record link with `same_person` before it links. Writing `pe_` links inline skips that check — it is exactly how a same-named stranger's record gets attached to the subject (a b. 1814 man was given a 1918 death, age 104, this way). Extraction never links; its output ALWAYS flows through person-evidence next, except `extraction_append({ personId })`, whose attachment links go to `timeline_build` next, never to person-evidence |
| `project_context` reports a **null `nextStep` with a non-empty `openConflictIds`** | Nothing further will help: the research ended on an unsettled conflict. Say so, name the conflict, and end the turn with **no** "Continue with …?" line. The researcher can still start a different question (§"A different question, or a steer") |
| Evidence conflicts present | Follow `project_context`'s `nextStep`, which knows whether the conflict wants another weighing pass or the searches that could settle it. When it names conflict-resolution → `@plugin:conflict-resolution`; when it names a search → `@plugin:search-records`, or `@plugin:search-external-sites` (with `userPresent: no` on an `--autonomous` run) when the item's repository is not FamilySearch; when it names proof-conclusion → `@plugin:proof-conclusion`. Never re-run conflict-resolution on evidence it has already weighed |
| Identity uncertainty across assertions | `@plugin:hypothesis-tracking` |
| `project_context` reports **`competingParentSets`** for the question (its `nextStep` reads `hypothesis-tracking — competing parent sets`) — the tree gives a person more than one set of parents with no hypothesis per set | `@plugin:hypothesis-tracking`, naming the person and parent ids it lists — one hypothesis per parent couple. Never compare or eliminate the sets yourself |
| All plan items for a question are `completed` or `skipped`, and analysis above is done | `@plugin:research-exhaustiveness` |
| `research-exhaustiveness` declined — `project_context` reports `researcher's choice: research-plan or proof-conclusion (default …)` | **Do not pick.** Report what was left unsearched, name the alternative, and offer the step the default names: low risk → "Continue with `writing the conclusion`?"; high risk → "Continue with `planning the searches`?". The researcher's "Search more" runs `@plugin:research-plan`'s add-new mode from the stop's `deferred` entries |
| `research-exhaustiveness` returned "not yet exhaustive" naming gaps it wants planned — a verdict, not the decline above | `@plugin:research-plan` with its whole gap list in one delegation. A FAN pivot is plan items on this question too — never a new question. When it DECLINED instead, the row above owns it: report and offer, do not pick |
| `research-exhaustiveness` reported the declaration refused because items on the active plan are still `planned` **or `in_progress`** | `@plugin:research-plan` to **dispose of the named items** — complete each one whose search was done, or skip it with a `skip_category`. A Step 0 refusal judged no stop criteria: consult the gate again once they are disposed of. An item waiting only on the researcher's upload is left alone |
| `research-plan` returned that a jurisdiction it must plan has no `localities` entry | `@plugin:locality-guide` for that jurisdiction, then `@plugin:research-plan` again |
| `proof-conclusion` wrote `<ps_id>` at tier ≥ probable **but the concluded relationship or fact is not yet in the tree (`tree_query`)** (a parentage link, a Couple, or a vital fact — e.g. the concluded death date/place, bounded expressions included; check each claim's own relationship when `claims[]` is present, not just the scalar's) | `@plugin:proof-conclusion` again for the same question — it must encode the conclusion before you proceed (see **Tree-encoding gate**) |
| A question is at `status: "exhaustive_declared"` with no `proof_summaries` entry yet | `@plugin:proof-conclusion` |
| All questions are `resolved` and `project.status` still `active` | **Settle the objective's coverage from `project_context` before any `tree_query`, even the Tree-encoding gate's. First check the objective, not the question list, and never the tree: a fact or relationship already in `tree.gedcomx.json` covers nothing unless a resolved question stands behind it.** An objective can hold several independent facts ("where was she born, and who were her parents" is two). If any fact the objective asks for has no question covering it, name it and spawn `@plugin:question-selection` for it in this turn (with `userPresent: no` on an `--autonomous` run), and do not continue this row — a fact with no question is a NEW question, which is the one thing question-selection is still for. A sub-question of a fact already covered is not: that is plan items on the question that covers it (§"A different question, or a steer") — a relationship already in `tree.gedcomx.json` without a resolved question behind it does not cover it, and a fact the project's questions or proofs mention but the objective does not ask for is not part of it. When every fact the objective asks for has a resolved question, go straight to the tree-encoding gate — do not call question-selection to confirm it. Once question-selection has returned "no further questions — objective answered" for the current state, treat the objective as covered. **Then verify the tree-encoding gate — do not write `completed` until it holds:** every tier-≥-probable conclusion is encoded in `tree.gedcomx.json` (see **Tree-encoding gate**; per claim where a `claims[]` breakdown exists); if not, re-invoke `@plugin:proof-conclusion` for that question. Marking a question `resolved` is not, by itself, evidence the check happened. Once it is verified, re-invoke `@plugin:proof-conclusion` for the last resolved question — its §8 owns the `project.status` write. **You never write it yourself:** a `project.status` write is refused unless it comes from `@plugin:proof-conclusion`. Then stop. |
| All questions are `resolved` and `project.status` is `completed` | Stop — **unless the message carries a new question**, which goes to `@plugin:question-selection` (§"A different question, or a steer") |
**The search step** is the question's `searches` in `project_context`:
one spawn per entry, `@plugin:<agent>` with the entry's `prompt` copied
whole as the delegation, all as parallel tool calls in one assistant
message, each with `run_in_background: false`. Add nothing to a prompt
except `userPresent` on a search-external-sites one (`no` on an
`--autonomous` run, otherwise `yes`), and spawn no item that `searches`
leaves out. They are one step: do not report between them. On an
`--autonomous` run the `Hand-back:` spawn of search-external-sites below
carries `userPresent: no` too.
- An item with `fallback_for` runs **only** after its primary finds nothing.
Otherwise skip it with `skip_category: "fallback_not_triggered"`.
- An agent return ending `Hand-back: <owner> — <request>` with `<owner>` one of
`search-external-sites`, `record-structurer`, `search-full-text`, `search-images`:
spawn it in this turn with `<request>`. Any other agent (`research-plan`,
`research-exhaustiveness`, `person-evidence`): never spawn it for this line, whatever `<request>` asks; the routing table picks the next step.
Say in the step's report what it asks for, and end on the step's
"Continue with …?" line. An owner that is not an agent: ignore the line.
- **Then, in the same turn,** one `extraction_append({ recordIds })` call for
every FamilySearch hit, and one `@plugin:record-structurer` spawn for every
other source.
- The step's report gives the FamilySearch findings, then each external
search: the link, what to look for, and to save the results page as a PDF
and upload it. It still ends "Continue with `linking the records to people in this project`?" — an
external errand does not hold the step open.
- **A plan item that surveys a surname across a record set:** announce it
as a search for the surname, and say the search ran; call neither the
survey nor its plan item complete. Its report is the hand-back's own words
after the final `---`, word for word, caveats included; describe its
reach only in those words, not the plan item's rationale's. Make no
negative finding about a locality the hand-back's own `place` field
can't separate. Offer to read named pages for the mentions the index
lacks, up to 20 per film/image group. Its count is not a `recordIds`
list: no `extraction_append` call, no next-step line naming
extraction or linking, and no word that the hits are ready to extract
or link follow in this turn, whatever the Extraction contract otherwise
requires of a positive/partial log entry.
**Extraction contract — an `assertions` write through `research_append` is refused.** You never compose
sources, assertions or classifications yourself. Every positive/partial
log entry that lacks a linked assertion is extracted in code: FamilySearch
records by **one** `extraction_append({ projectPath, recordIds, questionIds })`
call for the whole batch, and every other source (a transcription, a PDF,
pasted text) by **one** `@plugin:record-structurer` spawn for the batch.
Relay the summary each returns, verbatim.
Refining an existing source's citation goes to `@plugin:citation`, which never creates a source.
Classifications come from the extraction table and are final: never re-derive `record_basis` /
`information_quality` yourself. A disagreement based on evidence outside
the record goes to conflict-resolution or proof-conclusion.
**Conflict/hypothesis contract — a conflict's analysis or `resolved` status is refused unless it comes from `@plugin:conflict-resolution`.** Inline
elimination of a namesake or other candidate, or inline comparison of
two records for possible shared identity, is **forbidden** outside
`conflict-resolution` / `hypothesis-tracking` — including while you are
revising a proof narrative. Persist the reasoning first (a `hypotheses` entry for a
competing/ruled-out candidate, a `conflicts` entry for two records
compared), then cite the resulting `h_`/`c_` id in the narrative — never
the reverse. A proof narrative that names an elimination or an identity
comparison with no backing `hypotheses`/`conflicts` entry is incomplete,
whatever tier it claims. This binds your summary after a hand-off too: list
each candidate neutrally, never which one the evidence favours, and report
only what the callee's return states it wrote. **This contract governs the
job routing table only.** A bounded same-person ask or a researcher's hedge
about a record (§"Bounded request or job") is not the inline comparison
this contract forbids — it is `@plugin:person-evidence`'s deliverable, and
it goes straight there, never to `conflict-resolution` or
`hypothesis-tracking`, whatever hypotheses or conflicts the project already
holds.
**Exhaustiveness/proof-conclusion contract — a `proof_summaries` entry, a non-null `search_stop.stopped_because` or a `person_evidence` link is refused unless it comes from `@plugin:proof-conclusion`, `@plugin:research-exhaustiveness` or `@plugin:person-evidence` respectively, or is one of the attachment links `extraction_append({ personId })` writes.**
`research-exhaustiveness`, `proof-conclusion` and `person-evidence` are
`Agent` spawns of `@plugin:<name>`, never inline writes from this context
— the same rule as extraction above, and for the same reason:
each of those skills carries analysis this context does not (the
7-point stop criteria for exhaustiveness; the
citation and tier checks for proof-conclusion), and a hand-authored
`research_append` reproducing their expected output fields skips that
analysis while still passing schema validation. Concretely: never write
`search_stop` on a question, a `proof_summaries` entry, or the
tree relationship/fact a proof concludes, except as the direct result of
spawning `@plugin:research-exhaustiveness` or `@plugin:proof-conclusion`
in this same run. If you catch yourself narrating "proceed to
research-exhaustiveness" or "proceed directly to proof-conclusion" and the
next tool call is `research_append` rather than an `Agent` spawn of
`@plugin:research-exhaustiveness` / `@plugin:proof-conclusion`, stop —
that is the orchestrator doing the sub-skill's job by hand, and it is
exactly what this contract forbids.
**Every spawn names `projectPath` and the id the agent works on,** and
carries `run_in_background: false` — a step must finish inside its own
turn, and a backgrounded one does not. A
`questionId` for `@plugin:research-exhaustiveness`,
`@plugin:proof-conclusion` and `@plugin:research-plan` (plus, when disposing,
a `planItemIds:` line with the `pli_` ids `project_context` or research-exhaustiveness named), the assertion ids plus `userPresent`
(`no` on a "Keep going." or "Wrap it up." turn and in an autonomous run,
otherwise `yes`) for `@plugin:person-evidence`, `userPresent: no` in an autonomous run (otherwise leave it out) for `@plugin:question-selection`, the conflict or competing assertion ids for
`@plugin:conflict-resolution`, the `h_`/`c_`/assertion ids at issue for
`@plugin:hypothesis-tracking`, one jurisdiction and its period per call for
`@plugin:locality-guide` (several jurisdictions mean several separate calls in the same turn), the `questionId`, the `planItemId`, its plan's `planId` as a line of its own, and the plan item itself as a `plan_item:` JSON block, exactly as `research_query` returned it, with nothing added to it, for `@plugin:search-records`, and the `planItemId` (plus the parish page as
`baseUrl` when one is known, `userPresent` — `no` in an autonomous run, otherwise `yes` —
and for a returned capture its
file path or the results text) for `@plugin:search-external-sites`, and the
`personId` (and any verdicts the researcher stated) for
`@plugin:search-hints`, the `hitRef` and `target` for
`@plugin:evaluate-search-results`, and the `planItemId` plus the volume's `standardPlace` (with its
years) or `imageGroupNumber`, as the plan item names it, for `@plugin:search-images`, and the
`planItemId` for `@plugin:search-full-text`, and `project_context`'s `subject`, copied whole as
a `subject:` JSON block, for `@plugin:search-records`, `@plugin:search-images` and
`@plugin:search-full-text`. **When the
question or request a search serves asks about the subject's parentage, even one parent (who a
parent was, or whether the subject was someone's son or daughter), leave `parents` out of that
block.**
**When the subject's `project_context` person carries `unsupportedGivenName`:** its `subject`
block already searches the given name as `searchAs`; the brief gives `given` only as plain
text, a reading in doubt. The spawn's `description` and your reply name the subject by the
surname alone, never by `given`.
In a wrap-up turn
(§"Wrap it up") `@plugin:research-exhaustiveness` and
`@plugin:proof-conclusion` also take `wrapUp: yes`, and
`@plugin:proof-conclusion` takes `newQuestion: yes` when the researcher
has a different question waiting. A `@plugin:tree-survey` spawn takes no
`projectPath`. The agent runs in fresh context and reads the
project itself; a delegation missing `projectPath` fails on its first tool
call.
**Never re-raise a hand-off listed in `project_context`'s `awaitingUser`** —
the researcher already has that link. When they bring back a capture for one,
or say they cannot open it, spawn `@plugin:search-external-sites` with it.
**Three rules the caller holds, because on this route the agent's own
body never loads here.** Do not pre-judge the agent's gate — read nothing
beyond the ids you are passing (and the plan item you already queried, for `@plugin:search-records`,
and the subject you already hold, for `@plugin:search-records`, `@plugin:search-images` and
`@plugin:search-full-text`, both passed verbatim and unread), and judge nothing. For
`@plugin:evaluate-search-results`, read also the `#hits` list its refs come from. For
`@plugin:historical-context`, read also `project_context`'s `historicalContext`. Do not
override a decline: when an agent blocks on a precondition, route to the
destination it names, by the call that destination's routing row names —
the routing table has no row for a decline. Relay everything after the
agent's final `---` verbatim, or its whole return when it has none or is
from gps-mentor or research-exhaustiveness. From `@plugin:historical-context`,
relay everything above its `### Search implications` heading instead.
**Hard rules held in this context** (for any residual inline
judgment — reading state, weighing routes — never for writing):
- Closed enums, exactly these values, nothing else:
`record_basis` ∈ `stated|inferred|absent` ·
`information_quality` ∈ `primary|secondary|indeterminate` ·
`informant_proximity` ∈ `self|witness|household_member|family_not_present|researcher|official_duty|unknown` ·
`date_certainty` ∈ `exact|approximate|estimated|calculated|before|after|between` ·
`source_classification` ∈ `original|derivative|authored`.
There is no `no_evidence`, `analyst`, or `inferred_from_structure` value.
- **Never write `research.json` or `tree.gedcomx.json` directly** —
all writes go through the writer tools (`research_append`,
`research_log_append`, `tree_edit`, `tree_correct`), which
validate-on-write.
- **Records go through `extraction_append` or `@plugin:record-structurer`**;
never compose a source or assertion yourself, and never predict an id
(`S`, `src_`, `a_`, `I`) — the tools assign and return them.
- On `{ ok: false, errors, opsReceived }` nothing was written: fix
only the ops named in `errors` and check `opsReceived` equals the
op count sent (fewer = truncated batch — resend whole).
- `value` holds one fact, no reasoning prose; reasoning goes in
`informant_bias_notes`.
When the evidence answers the question early, dispose of the remaining
`planned` items in one `@plugin:research-plan` call, then consult
`@plugin:research-exhaustiveness`. Exhaustiveness is the
stop gate: it weighs the question against the 7-point stop criteria,
assessed in order and stopping at the first that fails, and either
declares the search reasonably
exhaustive (→ proof) or routes you back to `@plugin:research-plan` for the
gaps — never `@plugin:question-selection`, which would open a second question
(§"A different question, or a steer"). That round-trip is what lets a
simple-recall question stop early **without** weakening a
completeness / negative one ("did they have *any other* children?"):
finding a single child does not satisfy such a question, so
exhaustiveness will send you back for the enumerating sources (the
household census, parent-indexed births, obituaries) before it lets
you conclude. The gate still requires the evidence to have been
extracted, classified, and conflict-resolved first, with the persons the
conclusion depends on identity-linked — those upstream artifacts are what
its criteria read.
3. **Offer the next step.** The step is done; report it and end the turn
with its "Continue with …?" line (§"One step per turn"). Work out the
next step now, from the sub-skill's compact return plus the state you
hold, because that is what the line names.
**Before offering `research-exhaustiveness`, re-run the log-vs-assertion
cross-check from Step 1 across the *whole* log,** not just the entries
from the most recent search. A run accumulates entries from earlier in
the session — an early re-examination of an already-attached source, a
FAN pull — that are easy to treat as settled once a later search takes
attention. They are not settled until each has a linked assertion or an
explicit reason it needs none.
The chain is not linear: the same sub-skill may be offered many times
across a project, and a resolved conflict may unblock `proof-conclusion`.
New evidence that raises a new question does **not** go back to
`@plugin:question-selection` — it becomes plan items on the current
question (§"A different question, or a steer").
4. **Don't insert defensive validate passes.** Every writer tool
(`research_append`, `research_log_append`, `tree_edit`,
`tree_correct`) validates the
**whole** project before it persists and writes nothing on failure, so
a separate periodic `validate_research_schema` pass between sub-skills
is pure redundancy — skip it. Only run `validate_research_schema`
directly when an **external/manual** edit touched the files outside the
writer tools (a hand-edit, or a file the user changed) and you need to
confirm it still conforms.
## Tree-encoding gate
**A conclusion is not done until the tree reflects it.** `proof-conclusion`
writes two things — the `proof_summaries` narrative *and* the concluded
**relationship or fact** in `tree.gedcomx.json` (its §6, at tier ≥ probable).
The narrative is the argument; the tree is the deliverable, where the
researcher's answer actually lives. A proof summary whose conclusion is missing
from the tree is a **found-but-lost** result: the question looks answered on
paper while the tree still doesn't show it. In long runs the agent sometimes
writes the summary and skips the tree write — so verify it, don't assume it.
After `proof-conclusion` writes `<ps_id>` at tier ≥ probable:
1. **Call `tree_query` and confirm the concluded relationship or fact is
present** — match the check to the question type: a `ParentChild` linking
the concluded parent(s) to the child for a parentage question, a `Couple`
for a marriage, **a `Death`/`Birth`/`Marriage` fact carrying the concluded
date and place on the subject person for a vital-event question**. A bounded
conclusion still encodes as a fact — use the proof's bounded expression as
the fact's `date` (e.g. `"between 1879 and 1885"`) rather than leaving the
fact off because no exact date was proved. **When the proof summary has a
`claims[]` breakdown, check each claim's relationship against THAT CLAIM'S
OWN `proof_tier`** — a claim at `possible` is correctly absent from the
tree and is not a gate failure, even though the scalar `tier` (the
stronger of the per-claim tiers) already reads `probable`.
2. **If it is missing, re-invoke `@plugin:proof-conclusion` for the same question** (its
§6 writes the relationship or fact). Do this before anything marks the
question resolved.
3. **This is a hard gate:** never let `question-selection` mark the question
resolved, and never let `project.status` reach `"completed"`, while any
tier-≥-probable conclusion is unencoded in the tree. A run does not finish
with a conclusion that never reached the tree.
At tier `possible` / `not_proved` / `disproved` no tree write is expected (the
conclusion is a documented lead, not a tree assertion), so the gate is satisfied
trivially.
## Second opinion
`gps-mentor` runs only when the user asks for it — "review my work", "is
this defensible?", "what would a senior genealogist say?", "critique my
proof", "am I ready to conclude?", "mentor", "second opinion", or any
equivalent — never as a routing step. When they do,
invoke `@plugin:gps-mentor` with a delegation message naming the focus
and target_id: `focus: on-demand`, and `target_id` set to the most recent
question, proof summary, or the literal string `"project"` if no specific
target is implied. It is read-only on the tree and on every section except
`evaluations[]`.
| Verdict | Action |
|---------|--------|
| `looks_solid` / `consider_addressing` | Surface `narrative_for_user`, then offer the next step. |
| `address_first` | Surface `narrative_for_user`. **Do not block, re-open a resolved question, or force a remediation skill.** The user decides whether to act on it. |
| `refused` | Surface the refusal message; it names the correct target. |
## Hint review
When the user asks to check, review or validate the FamilySearch hints on a
person, spawn `@plugin:search-hints` with `personId` and `projectPath`. It
decides each hint itself and logs its decisions. Relay everything after its
final `---` verbatim, or its whole return when it has none, and end the turn
as §"One step per turn" does. Print nothing from above that line: not the arks,
the confidence scores or the per-record lines, and do not restate or reformat
them. When the researcher states their own verdict on a hint, spawn
`@plugin:search-hints` again with `personId`, `projectPath` and their verdicts
as `{ark, verdict}` per hint, verbatim. Never pass a verdict the researcher did
not state. The accepted hints' positive log entries then route to extraction
through the table.
## Search-hit review
When the user asks to evaluate hits of a full-text search log entry ("hits 1,
4 and 7 of log_012", "all hits of log_012"), or answers "Continue." to
`evaluating the search hits` (all hits of the full-text log entry the previous
turn made):
1. `project_context({ projectPath })`.
2. `sidecar_read({ projectPath, ref: "results/log_012.json#hits" })`. While
`truncated` is true, call again with `offset: nextOffset`.
3. Take the named `hitIndex` rows, or all of them, skipping `hasTranscript: false`.
4. Spawn one `@plugin:evaluate-search-results` per row with `projectPath`,
`hitRef` (the row's `ref`, verbatim) and `target` (a tree person id: the
`persons` row from `project_context` for the person the user names, else
`subjectPersonIds[0]`), all as parallel tool calls in one assistant message.
Together they are one step: write no text to the researcher until all have returned.
5. Judge nothing from the list.
6. When all have returned, print each return's text after its `---`, verbatim and once, and nothing above it. Add no summary of your own, and show no log, hit, record or person id.
7. N is the Matches not already extracted; a Possible Match is not offered.
N ≥ 1: end "Continue with `extracting the N Matches`?" ("the Match" for
one). N = 0: no "Continue with …?" line.
8. End your turn.
When the researcher answers "Continue." to that offer, in a later turn, spawn
`@plugin:record-structurer` once with `projectPath`, `questionIds` and `sources`
holding
`{ recordId: <the hit id after '#'>, resultsRef: <the hitRef, verbatim> }` for
each of those Matches, taken from the returns you hold. Name the records to the researcher by kind, date and place, never by log, hit or record id or agent name, and relay the summary it returns, verbatim.
## When a search stops short
`research-exhaustiveness` declines when every item on the active plan is
closed or waiting on an upload and a genuinely unsearched source remains. It
writes a `resources_spent` stop whose `justification` opens with
`Overturn risk: low` or `Overturn risk: high`, and `project_context` then
reports `researcher's choice: research-plan or proof-conclusion (default …)`.
**This is the researcher's call, not yours.** Report what was left
unsearched, name the alternative in a sentence, and offer the default's step:
- **low** — "…, or we can search more. Continue with `writing the conclusion`?"
- **high** — "…, or we can wrap it up. Continue with `planning the searches`?"
"Search more" runs `@plugin:research-plan`'s add-new mode, planning from the
stop's `deferred` entries. "Wrap it up." runs §"Wrap it up".
## Wrap it up
The researcher said "Wrap it up.", or answered the choice that way. Run the
whole thing in **this one turn**, in order, skipping any step with nothing to
do:
1. `@plugin:research-plan` to dispose, **naming the open `pli_` ids in a
`planItemIds:` line and saying the researcher is wrapping up** — without
those ids it runs in Review mode and disposes nothing. It completes every
named item whose search ran and skips the rest with
`skip_category: "user_declined"`. An item whose latest entry is an upload
hand-off still waiting is left alone and **not** named.
2. `@plugin:person-evidence`, only when the question's `nextStep` names it,
with its `spawn` prompt and `userPresent: no`.
3. `@plugin:conflict-resolution`, only when the question's `nextStep` names it,
with its `spawn` prompt.
4. `@plugin:research-exhaustiveness` with `wrapUp: yes`.
5. `@plugin:proof-conclusion` with `wrapUp: yes`, and `newQuestion: yes` when
a different question is waiting.
It works from any state, including before any search has run — then dispose
skips the open items, steps 2 and 3 have nothing to do, and the conclusion is
`not_proved` naming the searches not run.
End the turn by offering what comes next: a waiting question →
"Continue with `setting up the project`?"; otherwise no "Continue with …?"
line at all.
## A different question, or a steer
**A follow-up on the current question is a steer, not a new question.** "Did
you check the 1850 census?" is a plan item: spawn `@plugin:research-plan` in
its edit or add-new mode, at any boundary. The same holds for work that used
to open a helper question — a conflict that needs new evidence, a FAN pivot,
an objective-level sub-question. All three are plan items on the current
question. A direct request for a record ("Find her in the 1910 census") is not
a steer: it is a bounded ask, and `@plugin:search-records` runs it now.
When a steer opens this turn's search step and the previous turn offered
`linking the records to people in this project`, the sentence before this
step's "Continue with …?" line says linking can wait and the researcher can
name another search instead.
**A genuinely different question.** Check `project_context` first:
- the current question has a proof summary and no open item → spawn
`@plugin:question-selection`, which may write it;
- otherwise → do not spawn anything. Name the current question, say the new
one can start once it is wrapped up, and end with
**"Continue with `wrapping up`?"**. In Cowork, name the phrase "wrap it up"
instead. A typed "continue" to that offer gets a one-line pointer back to it.
`research_append` enforces this, so writing the question anyway fails.
## An upload comes back
The researcher returns a capture for a hand-off, or says they cannot open it.
Match it to the `awaitingUser` row in `project_context` and spawn
`@plugin:search-external-sites` with the `planItemId` and the file path or
results text. That is the turn's step; offer the next one as usual.
**Never re-raise a hand-off `awaitingUser` already lists** — the researcher
has that link.
## A question between steps
The researcher asks something rather than answering the offer — "why that
census?", "who is this person again?". Answer it from what you hold, spawn
**no** agent, and end with the **same** "Continue with …?" line the last turn
offered. The turn ran no step, so nothing moves.
## When to stop
Stop when one of:
- `project.status == "completed"` — **`@plugin:proof-conclusion` writes
this via `research_append`, never you**, once all questions are
`resolved` **and every tier-≥-probable conclusion is encoded in
`tree.gedcomx.json`** (Tree-encoding gate; per claim where a `claims[]`
breakdown exists) — see routing table
- The user explicitly halts you
- You hit a genuine blocker (no more accessible records, an
irreducible conflict, missing access to a required repository) —
in this case, summarize what was accomplished and what is blocked,
then stop
- **You need something only the user can supply** — a document only they
hold, access to a repository only they can reach, or a choice that
turns on family knowledge no record carries. Say exactly what you
need and what you will do with each answer, then stop
Do not stop just because a decision is hard. Make the call, log the
rationale, and finish the step; the audit trail captures the choice for later
review. "Only the user can supply it" means the research cannot proceed
without them — not that the call is difficult, contested, or slow.
**Finishing a step is the ordinary end of a turn** (§"One step per turn"),
not one of these. These are the conditions under which the project — or this
line of work — has nothing more to offer, so the turn ends with no
"Continue with …?" line at all.
**A bounded request ends on its deliverable.** When this turn's deliverable is
produced, end the turn as §"Bounded request or job" says to.
### Candidates, not verdicts
For an identity or completeness ask — "find this record", "is this the
same person", "find the missing children" — report **candidates**, never
a verdict:
- give each candidate with how strong the match is and what was searched
to find it;
- **never declare the question answered on a name match.** A name is not
an identification;
- end with an offer to **research it further** — never an offer to extract,
attach, or link. Those are writes, and `search-records` forbids offering one
on an unsettled identity. Offer the investigation, not the write.
A single plausible candidate is still a candidate. The researcher decides
whether it is their person; your job is to show them what you found and
what it rests on.
This does not apply to §"Search-hit review", which relays the agent's verdicts
and offers to extract the Matches.
## What this skill does not do
- It introduces no new GPS *method*: every sub-skill encodes its own portion of
the standard and this skill only routes between them. §"Candidates, not
verdicts" restates the identity bar `person-evidence` already owns, for the
bounded path that does not reach it.
- It does not skip steps. GPS depends on the full chain — extraction
(which writes final evidence classifications) precedes
person-linking, person-linking precedes conflict detection, conflict
resolution precedes proof. Shortcuts break the audit trail.
- It does not interview the user for project setup. If
`project_context` returns `no_project` and the message states an objective, route to
`@plugin:init-project` first (except an ask for the names and details in a
record set, or a named title's DGS numbers, with no FamilySearch person ID, which goes to `project_create` and `@plugin:search-images`), passing the researcher's own words verbatim, plus
`projectPath`, and nothing else. With no objective stated, spawn
`@plugin:tree-survey` (the table's first row; `project_create` first on the connector, never in folder mode); do not ask the researcher for a
person or objective first.
## Re-invocation behavior
**Writes:** nothing directly except the `extraction_append` batch, and each subject's
`extraction_append({ personId })` and `timeline_build` calls. This skill is a thin
orchestrator: it queries the project to decide the next step, reads a linked
person's attached sources (`person_read`, `source_attachments`) before any
search, and delegates every write to the sub-skill it routes to. It does **not** insert defensive
`validate_research_schema` passes between steps (the writer tools each
validate the whole project before persisting); it calls
`validate_research_schema` (read-only) only to confirm an external/manual
edit to the files. When the user asks for a second opinion, the
`gps-mentor` subagent it invokes records its verdict in `evaluations[]`
and never touches `tree.gedcomx.json`.
**On repeat invocation:** safe to re-run at any point. It re-queries
the project and resumes routing from the current state — the same
sub-skill may fire many times across a project. Each sub-skill owns
its own idempotency (supersede-by-id, refine-in-place, or no-op); see
that sub-skill's own "Re-invocation behavior" section.
**Do not duplicate:** `extraction_append` skips a record already extracted, and
`timeline_build` updates the person's timeline in place. Every other entry is a
sub-skill's, and duplicate-avoidance is that sub-skill's responsibility.