# ox decision (https://sageox.ai/docs/cli/decision)

# ox decision

Work with this repo's Decision Records (DRs -- ADRs are one type). `ox decision enrich` computes deterministic team context for a DR -- related-decision candidates, corpus conventions, drift and reference checks, and ready-to-paste citations -- with zero LLM or network cost.

## Usage

<Terminal>
  <TerminalCommand>ox decision [subcommand] [flags]</TerminalCommand>
</Terminal>

DRs are committed markdown files (default discovery: `docs/adr`, `docs/decisions`, `adr`, `docs/architecture/decisions`; override via the committed `.sageox` config `decision.paths`). They are already full-text searchable via [`ox code search --decisions`](/docs/cli/code).

## Subcommands

| Command | Description |
|---------|-------------|
| `ox decision enrich` | Enrich a Decision Record (or DR topic) with team context (JSON by default) |

## Enrich a Decision Record

Run `enrich` before you write. `--topic` consults team context before drafting a new DR; `--file` verifies an existing DR and adds code-drift and reference checks. `ox` computes everything locally and never edits the DR -- the agent authors every word.

<Terminal>
  <TerminalComment>Consult team context before drafting a new DR</TerminalComment>
  <TerminalCommand>ox decision enrich --topic "rate limiting strategy"</TerminalCommand>
</Terminal>

<Terminal>
  <TerminalComment>Verify an existing DR before editing it</TerminalComment>
  <TerminalCommand>ox decision enrich --file docs/adr/042-rate-limiting.md</TerminalCommand>
</Terminal>

Pipe a draft on stdin to verify it before you present it:

<Terminal>
  <TerminalCommand>cat draft-dr.md | ox decision enrich</TerminalCommand>
</Terminal>

Output is JSON by default (the agent path). Add `--text` for a human summary.

## Flags

Flags for `ox decision enrich`:

| Flag | Description |
|------|-------------|
| `--topic` | Consult mode: the DR subject, before drafting |
| `--file` | An existing DR file to enrich (adds drift + ref checks) |
| `--text` | Human summary instead of JSON |

## What's next

- [ox code](/docs/cli/code) - Full-text search DRs with `ox code search --decisions`
- [ox query](/docs/cli/query) - Search recorded team knowledge and prior Sessions
- [ox agent](/docs/cli/agent) - Prime an agent with team context before it writes
