Reconcile Model
reconcile_modelReconcile a threat model with the code it describes: submit changed paths and observations to map them to components, report what changed, and let the platform decide and apply consequences.
Instructions
Reconcile a threat model with the code it describes. Call this after reading the code and before (or instead of) editing the model by hand: report what changed and what you observed, and the platform decides the consequence of each observation. Mutating only where the platform applies an observation (see below).
Two inputs, both optional:
changed_paths: the file paths that changed since the model's recorded commit. For a code-derived model compute them withgit diff --name-only <commit_sha>..HEAD(thecommit_shafrom the model's provenance). The platform maps them onto components and reports which components changed, which paths no component claims, and whether a refresh is recommended.observations: what you saw in the code that the model does not say. Each observation lands in one of four buckets bykind:mechanism_named- the control's mechanism exists under another name (subject_id= control id). Follow up withrefine_controlusing thecodebase_findingsreturned inrefine_suggested.component_present- the code has a component the model lacks; include aproposal({name, repo_url?, path?, trust_boundary_ids?}).component_absent- a modelled component has no code (subject_id= component id).forbidden_behavior- the code does something the model rules out (subject_id= control id, or empty).
The platform decides the consequence. Proposals are never applied on
the agent's word, with one exception: a component change on a
code-derived model (provenance kind="code") is applied immediately
and queued for a person's review as applied_pending_review. Every
other proposal waits for decide_proposal. Forbidden behaviors
become findings. Observations the platform could not use come back in
ignored with the reason.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_id | Yes | ID of the threat model. | |
| repo_url | No | Repository the paths belong to (optional; helps map paths in multi-repo models). | |
| observations | No | JSON string of an **array** of observation objects, each ``{kind, subject_id?, evidence?: {paths?: [], symbols?: [], note?: ""}, proposal?: {name, repo_url?, path?, trust_boundary_ids?}}`` with ``kind`` one of ``mechanism_named``, ``component_present``, ``component_absent``, ``forbidden_behavior``. Empty/None sends no observations. | |
| changed_paths | No | Comma- or newline-separated file paths that changed since the model's recorded commit. Empty/None skips path mapping (``changed_paths`` in the response is then null). | |
| server_version | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||