save_project_artifacts
Atomically write project artifact files in a single batch using replace, append, patch, or delete modes for files, sections, or chunks.
Instructions
[ARTIFACT TOOLS] Creates or updates one or more artifact files in a single
atomic batch. Each item in updates targets one file and specifies an independent
write mode — modes in the same batch do not interact.
Write modes per update item: replace_file — overwrites the entire file (creates it if absent). replace_section — replaces the content under a named ## header; raises if the header appears more than once (ADR-0011). append_section — appends a new ## section at the end of the file. replace_chunk — replaces lines start_line..end_line with new content. patch — finds old_str (must be unique in the file) and replaces it with new content. Preferred for surgical single-line edits. delete_section — removes a named ## section and its content.
Do NOT use replace_file when only a section needs updating — use patch or replace_section to avoid clobbering concurrent edits. Do NOT use this tool for source code in src/ — the source directory is read-only from the agent's perspective.
Returns: list of result objects, one per update — each with path and status. Raises: duplicate-header error (with line numbers) if replace_section finds multiple matching headers in the same file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes | Project name | |
| updates | Yes | List of write requests |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |