GPT-6 Astra × readme-writer
10.0Pure documentation ability — no code at all
correctness 10.0quality 10.0documentation 10.020959ms
$ cat readme-writer.prompt — what the model was asked
Write a README.md for a command-line tool called `snapdiff` that compares two directories and reports added, removed, and changed files. The tool is written in Python, installable via pip. Include: a one-line description, installation instructions, usage examples with flags (--ignore-hidden, --output json|text, --depth N), output format explanation, and a short 'How it works' section. Use proper Markdown formatting.
run 1 of 1
10.0correctness 10.0quality 10.0documentation 10.020959ms
# judge: The README fully covers every requested section and flag with clear examples, accurate output explanations, concise prose, and polished, scannable Markdown.
$ cat codex-cli/gpt-6-astra.readme-writer.r1.response
# snapdiff
A Python command-line tool that compares two directories and reports added, removed, and changed files.
## Installation
Install with pip:
```bash
pip install snapdiff
```
## Usage
```bash
snapdiff OLD_DIR NEW_DIR [OPTIONS]
```
The first directory is the baseline; the second is the updated version.
```bash
# Compare two directories
snapdiff ./before ./after
# Skip hidden files and directories
snapdiff ./before ./after --ignore-hidden
# Print machine-readable JSON
snapdiff ./before ./after --output json
# Print human-readable text explicitly
snapdiff ./before ./after --output text
# Compare files at the root and one directory level below it
snapdiff ./before ./after --depth 1
# Combine options and save the report
snapdiff ./before ./after --ignore-hidden --depth 2 --output json > report.json
```
### Options
| Flag | Description |
| --- | --- |
| `--ignore-hidden` | Exclude files and directories whose names begin with `.`. |
| `--output json\|text` | Choose the output format. Defaults to `text`. |
| `--depth N` | Limit traversal to `N` directory levels below each root. `0` compares only root-level files. Omit to traverse all levels. |
## Output format
All paths are relative to the compared directory roots.
- **Added:** Exists only in `NEW_DIR`.
- **Removed:** Exists only in `OLD_DIR`.
- **Changed:** Exists in both directories, but its contents differ.
Unchanged files are omitted. A renamed file appears as one removal and one addition.
### Text
Each line contains a status followed by a relative path:
```text
ADDED docs/guide.md
REMOVED legacy.txt
CHANGED src/main.py
```
### JSON
The report contains three arrays of relative paths. Categories with no differences contain empty arrays.
```json
{
"added": ["docs/guide.md"],
"removed": ["legacy.txt"],
"changed": ["src/main.py"]
}
```
## How it works
1. Walk both directory trees, applying hidden-file exclusions and the depth limit.
2. Match files by their relative paths to identify additions and removals.
3. Compare the contents of matching files to identify changes.
4. Print the results in the selected format.
`snapdiff` reads the directories without modifying their contents.