# StyleForge CLI — Click + Pandas Index and Word-Level SRT Validator

## PURPOSE
A command-line tool that manages the 86-style prompt atlas and validates the word-level SRT transcripts used to sync a voiceover to a code-drawn video. Two jobs: (1) index/filter/pick styles so a creator can find the right one fast (`styleforge list --query science --complexity simple`), and (2) check that a pasted SRT is genuinely word-level — the transcript the video insists on for per-word timing — and report its duration against a target clip length.

## WHY THIS MATTERS
The source video stresses two failure points worth automating. First, the atlas is huge and manually hunting for a style is slow, so a queryable index matters. Second, sync only "works best with the word-by-word timings"; a line-level SRT gives coarser timing, and for long videos those word files become gigantic. A validator that screens SRT files for word-level cues and measures them turns that advice into a reusable check.

## HOW TO BUILD
Use Click for the command surface and Pandas for tabular work. Load the style CSV into a DataFrame, filter with boolean masks, and parse SRT timestamps with a simple regex into seconds.

```python
import click, pandas as pd, re

SRT = re.compile(r"(\d+):(\d+):(\d+),(\d+) --> (\d+):(\d+):(\d+),(\d+)\s*\n(.+)")

@click.group()
def cli(): ...

@cli.command()
@click.option("--query", default="")
@click.option("--complexity", type=click.Choice(["simple","medium","unique"]))
def list_styles(query, complexity):
    df = pd.read_csv("styles.csv")
    mask = df["name"].str.contains(query, case=False)
    if complexity: mask &= df["complexity"].eq(complexity)
    click.echo(df[mask][["id","name","complexity"]].to_string(index=False))
```

A `validate-srt` command reads cues, flags any cue whose text has multiple words (a line-level cue), and prints total duration.

## WHEN TO USE IN PRODUCTION
Ideal in a video pipeline as a pre-flight gate in CI or a Makefile: reject SRTs that are not word-level before rendering, and keep the atlas indexed as a shared artifact. Not the right tool for interactive browsing (use the web app or dashboard variants) or for actual rendering.

## HOW IT HELPS STUDENTS
Practises Click command design, Pandas filtering/aggregation, regex parsing of time-coded text, and CLI UX — a realistic ops-tooling skill set.

## STARTER CODE
`starter/main.py` provides the Click group, catalog DataFrame helpers, and an SRT parser with TODO markers for word-level detection and stats.
