# docs-archive

Apply a terminal lifecycle transition and archive a repository document


## When to use it

This is a lifecycle mutation, not just a report. Preview with dryRun=true and review the terminal status, replacement, and reason.

## Usage

Configure an Nx target on the owning project, then invoke it with `npm exec -- nx run <project>:<target>`. The executor identifier is not a standalone CLI command.

```json
{
  "targets": {
    "reviewed-action": {
      "executor": "@megamono/plugin:docs-archive",
      "options": {
        "id": "<id>"
      }
    }
  }
}
```

This target is a configuration example. Supply required values and review side effects before invoking it.

## Options

Use these options with `@megamono/plugin:docs-archive`. Nx uses the camelCase names shown here; the [CLI reference](/docs/cli) describes command-line aliases. Some options are required only for particular choices.

| Option | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| `id` | Yes | string | — | Stable document ID to archive. |
| `status` | No | string | — | Type-valid terminal status. Allowed: "completed", "aborted", "retired", "superseded", "complete". |
| `reason` | No | string | — | Required reason when aborting a plan. |
| `replacementId` | No | string | — | Replacement spec ID when superseding a spec. |
| `completedAt` | No | string | — | Completion timestamp override for deterministic automation. |
| `config` | No | string | "megamono.json" | — |
| `docsRoot` | No | string | — | — |
| `dryRun` | No | boolean | false | — |

## Next steps

Review changed files and run the affected project's checks. For options that accept structured values, run the generator's `--help` or consult the schema in the installed package.

- [All actions](/docs/actions)
- [CLI overview](/docs/cli)
- [Adopt an existing workspace](/docs/workflows/adoption)
