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

# agentic-spec CLI Overview: Validate and Scaffold Specs

> agentic-spec validates Clementine DS component specs against 14 rules, scaffolds new spec directories, and produces machine-readable JSON for CI.

`agentic-spec` is a standalone CLI that works with any Clementine DS monorepo. Install it globally or run it via `npx` — no configuration file required. Point it at a spec directory and it tells you exactly what is right, what is broken, and which rule each failure maps to.

## Installation

```bash theme={null}
npm install -g agentic-spec
# or run without installing
npx agentic-spec validate specs/button
```

Source: [github.com/tishsingh399/agentic-spec](https://github.com/tishsingh399/agentic-spec)

## Commands

| Command | Purpose |
| - | - |
| `validate` | Check one or more spec directories against all 14 rules. Exits non-zero on any error. |
| `init` | Scaffold a new spec directory from the built-in template, creating `index.md` and `tokens.json` stubs. |

## Exit codes

| Code | Meaning |
| - | - |
| `0` | All specs pass, or the only issues are warnings |
| Non-zero | At least one error-level failure in any spec checked |

Use the exit code in pre-commit hooks and PR checks to block merges on broken specs.

## Quick example

```bash theme={null}
# Validate a single component
agentic-spec validate specs/button
# PASS button (specs/button)
#   tokens: 15 in contract, 15 in tokens.json · states: 6 · parts: 5

# Validate every component at once
agentic-spec validate specs/*

# Scaffold a new component spec
agentic-spec init tooltip --out ./specs --ds-version "clementine-ds@HEAD"
```

## Next steps

> [card] [validate](https://clementineds.mintlify.site/cli/validate.md)
>
> Full reference for the validate command — flags, output format, and CI integration.

> [card] [init](https://clementineds.mintlify.site/cli/init.md)
>
> Scaffold a new spec directory with the correct stubs and frontmatter shape.

> [card] [Troubleshooting](https://clementineds.mintlify.site/cli/troubleshooting.md)
>
> Common validation failures and how to fix them.


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