---
name: sync
description: Merge delta spec into the domain spec source of truth
argument-hint: "<slug>"
disable-model-invocation: false
---

# Sync

Merge a change's delta spec into the domain spec source of truth without archiving. The change folder remains active.

## Setup

Parse `$ARGUMENTS`:
- **slug** (required)

## Process

1. Read the delta:
   ```bash
   .venv/bin/python -m agents.lib.spec_state show-change {slug}
   ```
2. Validate delta against domain spec:
   ```bash
   .venv/bin/python -m agents.lib.spec_state validate --change {slug}
   ```
3. Apply delta (merge into domain spec):
   ```bash
   .venv/bin/python -m agents.lib.spec_state apply {slug} --write
   ```
4. Report what changed (requirements added, modified, removed, renamed)

## Notes

- **No task gate** — sync does not check tasks.md completion. Can sync at any time.
- **Repeatable** — unlike archive, sync can be run multiple times. Each run re-applies the current delta.
- **Change folder remains active** — not archived. Use `/archive` to finalize.
