research_save
Saves and updates research sources, claims, requirements, drafts, and briefs by stable ID in CSV/JSONL, preserving unchanged fields on partial updates and returning assigned IDs plus errors.
Instructions
Save/update source, claim and requirement objects by stable ID; the tool writes CSV/JSONL. Omitted IDs are assigned or matched by URL/claim/summary. Partial updates retain other fields and rows. requirements.unit_ids optionally assigns a requirement to named research units; omit it or use [] for global scope. work.requirement_ids selects records to read, not their applicability. All effective requirements remain accessible. sources.read_scope records actual reading; requirements.reading_requirement specifies required reading, not read_scope. For an active mandatory-reading requirement, the merged row needs reading_requirement="full_text" or "relevant_sections" and required_source_ids, a nonempty list of distinct source IDs, e.g. ["S1"]. Other requirements can omit both. IDs refer to source records; partial updates may omit fields already saved on the requirement. For local read_evidence, prefer a task-relative path to an existing nonempty file, e.g. "sources/S1.md"; put reading locations and notes in locator, e.g. "pp. 2-4; relevant sections only", not appended to the path. URL/page locators and supported local-reference forms remain valid; optional evidence_path locates local UTF-8 source text. draft uses path, optional content and complete=true for a complete draft; omit content to register an existing file. draft.main=true explicitly selects the current work; optional kind is report/comparison/review/analysis. For a contribution use kind=analysis, unit_id and the actual producing host_task; question states its research question. depends_on lists actual upstream unit IDs. complete=true records a finished unit, not an independent review or delivery; a dependent unit cannot complete before its declared upstream versions are finished and independently reviewed. Saving a prepared unit automatically retains its input versions, question and dependencies from status.work. Explicit based_on overrides that selection and copies work_context.inputs unchanged: file paths and record:sources:S1 / record:claims:C1 / record:requirements:effective or effective@unit IDs map to SHA256; copy the returned keys rather than constructing them. handoff uses summary, optional pending/decisions text lists and to (the receiving host task/session). The registered main writer transfers ownership through handoff.to; another host cannot silently replace the main draft. Saved unit originals and prior versions are retained in existing record-backups; summaries do not replace original analysis. current_work.research_outputs returns contributions, owners, current dependencies and changed inputs for research judgment. Chapter/reference drafts do not change the main selection. brief updates only supplied brief fields and task_spec together. Returns assigned IDs and field errors for the agent to resolve, without asking users to manage records. replace names complete collections to repair from recovered rows; original bytes are backed up automatically. Records reading/verification claims as supplied, never infers truth or closes requirements automatically. Saves retain event timestamps and original failures for task continuity. changes summarizes the latest record-save batch and candidate claim/report locations; identical bytes are not rewritten. Saving a source ID also compares local evidence against its previous save observation. First observations are explicit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | ||
| brief | No | ||
| draft | No | ||
| claims | No | ||
| replace | No | ||
| sources | No | ||
| requirements | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||