Skip to main content

coding_tools/
explain.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 Jonathan Shook
3
4//! The `--explain` agent-documentation format selector.
5//!
6//! Each binary embeds its own payloads from `docs/explain/<tool>.{md,json}` via
7//! `include_str!`, so the bytes printed by `--explain` are exactly the bytes
8//! checked into the repository. This module only carries the shared [`Format`]
9//! choice between the two payloads.
10
11/// Output format for the self-describing `--explain` option.
12#[derive(Debug, Clone, Copy, PartialEq, Eq, clap::ValueEnum)]
13pub enum Format {
14    /// Human- and agent-readable Markdown usage guide (llms.txt-style). Default.
15    Md,
16    /// Machine-readable MCP / tool-use definition (JSON).
17    Json,
18}