> ## Documentation Index
> Fetch the complete documentation index at: https://shunya.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Decisions and governance workflow

> Use Charter Decisions to preserve engineering context and guide changes.

## When to create a Decision

Create a Decision for a choice that should outlive the current task: architecture, storage, framework, security model, deployment boundary, code-generation policy, or another constraint future contributors should see before changing code. Do not create a Decision for every implementation detail.

Use `charter search <terms>` before proposing one; a prior Decision may already cover the subject.

## Lifecycle

| Status | Meaning | Used by checks? | Search behavior |
| - | - | - | - |
| `proposed` | A draft awaiting human review. | No | Included |
| `accepted` | A human-approved, active Decision. | Yes | Included |
| `rejected` | A retained record of an option the team declined. | No | Excluded |
| `superseded` | An older accepted Decision replaced by a newer one. | No | Included in current search results |

```mermaid theme={null}
stateDiagram-v2
    [*] --> proposed: propose
    proposed --> accepted: accept
    proposed --> rejected: reject --why
    accepted --> superseded: supersede
    accepted --> accepted: affirm
    rejected --> [*]
    superseded --> [*]
```

## Propose

```sh theme={null}
charter propose \
  --title "Use a dedicated worker queue" \
  --context "Long-running tasks must not block request handlers." \
  --decision "Process asynchronous work through the worker queue." \
  --scope-path "internal/worker/**" \
  --enforcement advisory
```

A proposal is not binding. The default proposer is `git config user.name`, falling back to `user.email`; use `--by` when an explicit identity is necessary.

## Accept or reject

Only use these after a human has reviewed the Decision content.

```sh theme={null}
charter accept 0007 --why "Approved in architecture review"
charter reject 0008 --why "Operational complexity is not justified"
```

`reject` requires `--why`. Rejected Decisions remain in history so future work does not silently reopen the same question.

## Supersede rather than rewrite

When an accepted Decision changes, preserve history:

1. Propose the replacement.
2. Review and accept the replacement.
3. Mark the prior accepted Decision superseded.

```sh theme={null}
charter propose --title "Use MySQL for persistent storage" --context "..." --decision "..."
charter accept 0012
charter supersede 0001 --with 0012
```

This links both Decisions and removes the old one from scope enforcement. The previous Decision remains readable in Git history and in the generated index. Two guardrails apply:

* `supersede` requires the `--with` successor to already be **accepted** — replacing an accepted rule with a mere proposal would leave a hole in the constitution.
* If the proposal was drafted with `--supersedes 0001`, `charter accept 0012` completes the supersession automatically; the explicit `supersede` step is only needed when the link wasn't declared up front.

## Freshness reviews

Use `--stale-after` to make a Decision periodically reviewable:

```sh theme={null}
charter propose ... --stale-after 18mo
charter list --stale
charter affirm 0012
```

Accepted Decisions can also use an explicit `--review-after YYYY-MM-DD`. A stale Decision is advisory: it causes `charter check` to exit `1` when matched, never `2`. `affirm` resets the review date using the existing `stale_after` duration or `--stale-after 18mo` (`--after` still works but is deprecated).

## Scope and enforcement

Scope answers *where does this Decision apply?* and enforcement answers *what happens if that area changes?*

* `--scope-path` accepts repeatable `doublestar` file globs such as `internal/api/**` or `**/*.go`.
* `--scope-tag` accepts repeatable terms. During a diff-aware check, a tag matches case-insensitively as a whole word in the raw unified diff (tag `ui` matches `UI`, not `quiet`).
* A Decision matches when any configured path or tag matches.
* `blocking` requires an acknowledgment in a committed diff range.
* `advisory` reports the match without blocking.
* `off` has no blocking effect.

Use narrow scopes. A broad blocking glob creates acknowledgement noise; an empty scope cannot identify any governed change.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.