# Capstone v0.33.3 - Table of Contents

> The Capstone engine and its `mix capstone.new` project generator: scaffolds Elixir/Phoenix projects with a Svelte 5 UI layer and keeps them upgradable across regenerations.

## Pages

- [Capstone](readme.md)
- [Goal](goals.md)

## Modules

- [Capstone](Capstone.md): Top-level namespace for the `capstone` mix-generator package.
- [Capstone.Baseline](Capstone.Baseline.md): Provenance and drift checking for the checked-in generator baselines.
- [Capstone.Clock](Capstone.Clock.md): The wall clock, as the one module under `lib/` allowed to read it.
- [Capstone.Config](Capstone.Config.md): Reads and validates a project's `target.exs` — the hand-authored record
of what a project asked Capstone for (goals.md D16).
- [Capstone.Config.Container](Capstone.Config.Container.md): The `container:` section of `target.exs`.
- [Capstone.Config.Container.Sidecars](Capstone.Config.Container.Sidecars.md): The `container: [sidecars: ...]` sub-section of `target.exs`. Every key
is optional and defaults to `false`.

- [Capstone.Config.Fields](Capstone.Config.Fields.md): Shared validation primitives for `target.exs` section keyword lists.
- [Capstone.Config.Literal](Capstone.Config.Literal.md): Parses Elixir source into a plain term without ever evaluating it.
- [Capstone.Config.Project](Capstone.Config.Project.md): The `project:` section of `target.exs` — the identity of the generated
project.
- [Capstone.Config.Security](Capstone.Config.Security.md): The `security:` section of `target.exs`. Every key is optional and
defaults to `false`.

- [Capstone.Hash](Capstone.Hash.md): Content hashing for manifest file entries.
- [Capstone.Manifest](Capstone.Manifest.md): Reads and writes `plugin.exs` — the generated lock file (SDD 8.2).
- [Capstone.Manifest.FileEntry](Capstone.Manifest.FileEntry.md): One file a plugin owns or contributes to (SDD 7.3).
- [Capstone.Manifest.Plugin](Capstone.Manifest.Plugin.md): One plugin's entry in `plugin.exs` (SDD 8.2): what it is, which version
of it was applied, where that version came from, when it was applied, and
every file it owns or contributes to.
- [Capstone.New.Bootstrap](Capstone.New.Bootstrap.md): The `mix capstone.new` sequence, with every effect injected.
- [Capstone.New.Env](Capstone.New.Env.md): Environment hygiene for the bootstrap.
- [Capstone.New.Options](Capstone.New.Options.md): The `mix capstone.new` argv contract: exactly one switch, `--path`.
- [Capstone.New.Project](Capstone.New.Project.md): Edits to the freshly generated project.
- [Capstone.New.Shell](Capstone.New.Shell.md): The two effectful operations of the bootstrap, each behind an injected seam
so every branch is reachable in-process.
- [Capstone.Plugin](Capstone.Plugin.md): Reads and writes `manifest.exs` — a plugin's manifest (SDD 7.1).
- [Capstone.Plugin.Apply](Capstone.Plugin.Apply.md): Installs a derived plugin into a target project (SDD 7.3).
- [Capstone.Plugin.Behavior](Capstone.Plugin.Behavior.md): The contract a plugin implements.
- [Capstone.Plugin.Classify](Capstone.Plugin.Classify.md): Decides what a hunk means (SDD 7.3).
- [Capstone.Plugin.Derive](Capstone.Plugin.Derive.md): Turns an observed diff into a plugin (SDD R1, 10).
- [Capstone.Plugin.Diff](Capstone.Plugin.Diff.md): Compares a meta project against its baseline (SDD R1).
- [Capstone.Plugin.Install](Capstone.Plugin.Install.md): The one resolve → extract → apply → record → clean-up sequence both
`mix capstone.new` and `mix capstone.update` use — see
docs/superpowers/specs/2026-08-26-plugin-ecosystem-design.md.

- [Capstone.Plugin.MixChanges](Capstone.Plugin.MixChanges.md): Reads what a raw working project changed in `mix.exs` (SDD R1, D10).
- [Capstone.Plugin.Package](Capstone.Plugin.Package.md): Packages a derived plugin directory (what `mix capstone.plugin.derive`
writes to `priv/meta/meta_<name>/`) into a versioned, content-addressed
`.tar.gz` — see
docs/superpowers/specs/2026-08-26-plugin-ecosystem-design.md.
- [Capstone.Plugin.Record](Capstone.Plugin.Record.md): Records an applied plugin in the target's `plugin.exs` (SDD 8.2, R5, R6).
- [Capstone.Plugin.Registry](Capstone.Plugin.Registry.md): Resolves a plugin type + the running Elixir/Capstone versions to one
concrete archive under a plugin registry directory — see
docs/superpowers/specs/2026-08-26-plugin-ecosystem-design.md.

- [Capstone.Plugin.Remote](Capstone.Plugin.Remote.md): Downloads plugin archives from this repository's GitHub releases into a
local cache directory, so `priv/plugins/` is never committed to source
control or shipped inside the hex package — see
`Capstone.Plugin.Registry.default_dir/0`.
- [Capstone.Root](Capstone.Root.md): A validated, absolute path to the project Capstone is acting on.
- [Capstone.Source](Capstone.Source.md): Codec for the plain-data `.exs` files Capstone owns — `target.exs` and
`plugin.exs`.
- [Capstone.Source.ApplicationEx](Capstone.Source.ApplicationEx.md): Adds a child to a project's supervision tree, structurally.
- [Capstone.Source.ConfigExs](Capstone.Source.ConfigExs.md): Places a contribution inside a `config/*.exs`, by that file's own rules.
- [Capstone.Source.MixExs](Capstone.Source.MixExs.md): Locates and patches constructs in a `mix.exs`, structurally (SDD R5, R6).
- [Capstone.Template](Capstone.Template.md): Converts a meta-project file into a name-agnostic EEx template, and back.
- [Capstone.Update](Capstone.Update.md): Applies whatever plugins a project's `target.exs` newly lists that its
`plugin.exs` hasn't recorded yet — see
docs/superpowers/specs/2026-08-26-plugin-ecosystem-design.md.
- [Capstone.Vendor.SimpleEnum](Capstone.Vendor.SimpleEnum.md): 
- [Capstone.Vendor.Sourceror](Capstone.Vendor.Sourceror.md): 
- [Capstone.Vendor.Sourceror.Code.Common](Capstone.Vendor.Sourceror.Code.Common.md): General purpose utilities for working with `Capstone.Vendor.Sourceror.Zipper`.

- [Capstone.Vendor.Sourceror.Code.Function](Capstone.Vendor.Sourceror.Code.Function.md): Utilities for working with functions.

- [Capstone.Vendor.Sourceror.Code.Keyword](Capstone.Vendor.Sourceror.Code.Keyword.md): Utilities for working with keyword.

- [Capstone.Vendor.Sourceror.Code.List](Capstone.Vendor.Sourceror.Code.List.md): Utilities for working with lists.

- [Capstone.Vendor.Sourceror.Code.Map](Capstone.Vendor.Sourceror.Code.Map.md): Utilities for working with maps.

- [Capstone.Vendor.Sourceror.Code.Module](Capstone.Vendor.Sourceror.Code.Module.md): Utilities for working with Elixir modules
- [Capstone.Vendor.Sourceror.Code.String](Capstone.Vendor.Sourceror.Code.String.md): Utilities for working with strings.

- [Capstone.Vendor.Sourceror.Code.Tuple](Capstone.Vendor.Sourceror.Code.Tuple.md): Utilities for working with tuples.

- [Capstone.Vendor.Sourceror.Comments](Capstone.Vendor.Sourceror.Comments.md): Utilities to merge an un-merge comments and quoted expressions.

- [Capstone.Vendor.Sourceror.FastZipper](Capstone.Vendor.Sourceror.FastZipper.md): High performance alternative to `Capstone.Vendor.Sourceror.Zipper`.
- [Capstone.Vendor.Sourceror.Identifier](Capstone.Vendor.Sourceror.Identifier.md): Functions to identify an classify forms and quoted expressions.

- [Capstone.Vendor.Sourceror.Patch](Capstone.Vendor.Sourceror.Patch.md): Functions that generate patches for common operations.
- [Capstone.Vendor.Sourceror.Range](Capstone.Vendor.Sourceror.Range.md): Represents a start/end position in a source file as `:line` and `:column`
keyword lists.

- [Capstone.Vendor.Sourceror.TraversalState](Capstone.Vendor.Sourceror.TraversalState.md): The state struct for Capstone.Vendor.Sourceror traversal functions.

- [Capstone.Vendor.Sourceror.Zipper](Capstone.Vendor.Sourceror.Zipper.md): Tree-like data structure that provides enhanced navigation and modification
of an Elixir AST.
- [Capstone.Vendor.Sourceror.Zipper.Inspect](Capstone.Vendor.Sourceror.Zipper.Inspect.md): Provides `Capstone.Vendor.Sourceror.Zipper`'s implementation for the `Inspect` protocol.
- [Capstone.Vendor.TypedStruct](Capstone.Vendor.TypedStruct.md): 
- [Capstone.Vendor.TypedStruct.Plugin](Capstone.Vendor.TypedStruct.Plugin.md): This module defines the plugin interface for Capstone.Vendor.TypedStruct.
- [Capstone.Vendor.Vex](Capstone.Vendor.Vex.md): Data Validation for Elixir.

- [Capstone.Vendor.Vex.Blank](Capstone.Vendor.Vex.Blank.md)
- [Capstone.Vendor.Vex.ErrorRenderer](Capstone.Vendor.Vex.ErrorRenderer.md): Implementation of this behaviour should be set in validator options as `:error_renderer`
or in `:vex` application config with same key.
- [Capstone.Vendor.Vex.Extract](Capstone.Vendor.Vex.Extract.md)
- [Capstone.Vendor.Vex.Validator](Capstone.Vendor.Vex.Validator.md): Common validator behavior.

- [Capstone.Vendor.Vex.Validator.Source](Capstone.Vendor.Vex.Validator.Source.md)
- [Capstone.Vendor.Vex.Validators.Absence](Capstone.Vendor.Vex.Validators.Absence.md): Ensure a value is absent.
- [Capstone.Vendor.Vex.Validators.Acceptance](Capstone.Vendor.Vex.Validators.Acceptance.md): Ensure an attribute is set to a positive (or custom) value.
- [Capstone.Vendor.Vex.Validators.By](Capstone.Vendor.Vex.Validators.By.md): Ensure a value meets a custom criteria.
- [Capstone.Vendor.Vex.Validators.Confirmation](Capstone.Vendor.Vex.Validators.Confirmation.md): Ensure a value, if provided, is equivalent to a second value.
- [Capstone.Vendor.Vex.Validators.Exclusion](Capstone.Vendor.Vex.Validators.Exclusion.md): Ensure a value is not a member of a list of values.
- [Capstone.Vendor.Vex.Validators.Format](Capstone.Vendor.Vex.Validators.Format.md): Ensure a value matches a regular expression.
- [Capstone.Vendor.Vex.Validators.Inclusion](Capstone.Vendor.Vex.Validators.Inclusion.md): Ensure a value is a member of a list of values.
- [Capstone.Vendor.Vex.Validators.Length](Capstone.Vendor.Vex.Validators.Length.md): Ensure a value's length meets a constraint.
- [Capstone.Vendor.Vex.Validators.Number](Capstone.Vendor.Vex.Validators.Number.md): Ensure a value is a number.
- [Capstone.Vendor.Vex.Validators.Presence](Capstone.Vendor.Vex.Validators.Presence.md): Ensure a value is present.
- [Capstone.Vendor.Vex.Validators.Uuid](Capstone.Vendor.Vex.Validators.Uuid.md): Ensure a value is a valid UUID string.
- [Capstone.VersionGuard](Capstone.VersionGuard.md): Fails loudly when the `Capstone.Config` actually on the code path came from
an older `capstone` than this project's own dependency tree pins.

- Exceptions
  - [Capstone.Config.Error](Capstone.Config.Error.md): Raised by `Capstone.Config.read!/1` and `Capstone.Config.read_string!/1`
when `target.exs` fails validation.

  - [Capstone.Manifest.InvalidError](Capstone.Manifest.InvalidError.md): Raised when `plugin.exs` is plain data of the wrong shape — a missing or
unknown key, an unsupported `schema_version`, or a field whose value is
outside its domain.

  - [Capstone.New.Options.Error](Capstone.New.Options.Error.md): Raised when `mix capstone.new` is given argv it cannot act on.
  - [Capstone.Plugin.Remote.Error](Capstone.Plugin.Remote.Error.md): Raised when listing or downloading a release asset fails.
  - [Capstone.Root.EscapeError](Capstone.Root.EscapeError.md): Raised when a project-relative path would escape the target root.
  - [Capstone.Root.InvalidRootError](Capstone.Root.InvalidRootError.md): Raised when a path is not a usable project root.
  - [Capstone.Source.ApplicationEx.Error](Capstone.Source.ApplicationEx.Error.md): Raised when a supervision tree a plugin must extend cannot be located.
  - [Capstone.Source.ConfigExs.Error](Capstone.Source.ConfigExs.Error.md): Raised when a `config/*.exs` site a plugin must contribute to cannot be
located.
  - [Capstone.Source.DecodeError](Capstone.Source.DecodeError.md): Raised when an .exs file is not the plain data Capstone expects.
  - [Capstone.Source.EncodeError](Capstone.Source.EncodeError.md): Raised when a term cannot be written as re-readable .exs source.
  - [Capstone.Source.MixExs.Error](Capstone.Source.MixExs.Error.md): Raised when a `mix.exs` construct a plugin must edit cannot be located.
  - [Capstone.Vendor.Vex.InvalidValidatorError](Capstone.Vendor.Vex.InvalidValidatorError.md)

## Mix Tasks

- [mix capstone.baseline.compose](Mix.Tasks.Capstone.Baseline.Compose.md): Builds a DERIVED baseline from a generator baseline plus a plugin.
- [mix capstone.baseline.record](Mix.Tasks.Capstone.Baseline.Record.md): Rewrites `priv/baselines.exs` and emits the content-addressed snapshot.
- [mix capstone.check](Mix.Tasks.Capstone.Check.md): Fails while any unresolved `:manual` region remains.
- [mix capstone.new](Mix.Tasks.Capstone.New.md): Generates a stock Elixir or Phoenix project, adds the `capstone` dev
dependency, writes `target.exs`, and fetches and compiles dependencies.
- [mix capstone.plugin.apply](Mix.Tasks.Capstone.Plugin.Apply.md): Applies a derived plugin to a target project.
- [mix capstone.plugin.derive](Mix.Tasks.Capstone.Plugin.Derive.md): Derives a plugin from a raw working project (SDD 10).
- [mix capstone.plugin.package](Mix.Tasks.Capstone.Plugin.Package.md): Packages a derived plugin into `priv/plugins/` (SDD-adjacent; see
docs/superpowers/specs/2026-08-26-plugin-ecosystem-design.md).
- [mix capstone.plugin.retire](Mix.Tasks.Capstone.Plugin.Retire.md): Retires a plugin archive so future resolutions skip it (SDD-adjacent; see
docs/superpowers/specs/2026-08-26-plugin-ecosystem-design.md).
- [mix capstone.update](Mix.Tasks.Capstone.Update.md): Applies whatever plugins `target.exs` newly lists (SDD-adjacent; see
docs/superpowers/specs/2026-08-26-plugin-ecosystem-design.md).

