---
description: Archive a completed MORPH-SPEC feature after Gate 3 approval
argument-hint: <feature-name>
allowed-tools: Read, Bash
---

# Archive MORPH Feature

Archive-**without-integrate**: move a feature out of the active set in `.morph/features/` without
merging or opening a PR. This is the **reserved** path — for **legacy** features (born before the
"every feature is born on a `morph/{f}` branch" model, so there's no branch to integrate) and for
**cleanup**. The **normal close** of a feature is `morph-spec finish {feature} --pr|--merge`, which
archives *and* integrates *and* tears down the worktree in one step (see `MORPH.md` §2.2 and
`morph-apply` §6). Reach for `/morph-archive` only when integration is not wanted.

This is a thin wrapper over the atomic, git-aware CLI command — do **not** move folders or edit state
by hand. The command moves the folder, stamps the feature `completed` + `archivedAt` in its
`feature.json`, **commits the move scoped to the feature's own pathspec** (`.morph/features/{f}` +
`.morph/archive/{f}`, never `commit -a`), and cleans the derivable root index, all-or-nothing. Re-running
is idempotent: an already-archived feature is reported, not re-moved.

## Workflow

1. **Verify** the feature cleared Gate 3:
   ```
   morph-spec approval-status {feature}
   ```
   Gate `review` must be `approved`. If not, stop and report what's missing (don't force it without
   the user's say-so).

2. **Archive** atomically:
   ```
   morph-spec archive {feature}
   ```
   The command refuses if Gate 3 isn't approved (override with `--force` only when the user asks).
   It moves `.morph/features/{feature}/` → `.morph/archive/{feature}/` (via `git mv` when possible),
   sets `status: "completed"` + `archivedAt`, commits that move scoped to the feature's pathspec, and
   drops the feature from the thin index.

3. **Report** the new path (`.morph/archive/{feature}/`). Do not invent metrics not recorded in
   `feature.json` or `recap.md`.

---

**Feature to archive:** $ARGUMENTS
