merge_rewrite
Merge an approved rewrite artifact into the canonical document: snapshots the previous version, writes the new one with provenance, and transitions the rewrite to merged.
Instructions
Merge an approved rewrite artifact into the canonical project document. Snapshots previous canonical, writes new with provenance, transitions rewrite to merged. Requires rewrite to be in approved state and approver to meet minimum tier.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Skip supersedes check when overwriting an existing canonical (default false) | |
| approver | Yes | Identity of the approver (agent_id or human name); must meet min tier | |
| supersedes | No | Path being superseded — required if canonical already exists | |
| rewrite_path | Yes | Relative path to the rewrite artifact (must have status: approved) | |
| canonical_path | Yes | Relative path to the target canonical document | |
| source_task_id | No | Task that produced this rewrite (optional) | |
| promotion_reason | No | Why this rewrite is being merged (optional) |