# `Lockspire.Install.OperationPlan`

A fully preflighted, immutable install or upgrade operation.

The plan is deliberately built from rendered bytes and a complete migration
inventory before it mutates a host project. Applying it is the only write
boundary and always writes the manifest last.

# `file_operation`

```elixir
@type file_operation() :: %{
  :relative_path =&gt; String.t(),
  :destination =&gt; String.t(),
  :rendered =&gt; String.t(),
  :status =&gt; :create | :update | :unchanged,
  optional(:expected_checksum) =&gt; String.t()
}
```

# `t`

```elixir
@type t() :: %Lockspire.Install.OperationPlan{
  assigns: map(),
  file_operations: [file_operation()],
  manifest: map(),
  migration_plan: Lockspire.Install.Migrations.plan(),
  mode: :install | :upgrade
}
```

# `apply`

```elixir
@spec apply(t()) :: {:ok, t()} | {:error, [map()]}
```

# `install`

```elixir
@spec install(map(), [map()]) :: {:ok, t()} | {:error, [map()]}
```

# `report`

```elixir
@spec report(t(), :apply | :dry_run) :: :ok
```

Reports the same immutable plan used by dry-run and apply.

# `upgrade`

```elixir
@spec upgrade(map(), [map()], map()) :: {:ok, t()} | {:error, [map()]}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
