Skip to content

Commit acdffbc

Browse files
committed
Revise README for Guide Format Validator: update validation methods to emphasize automatic and manual options, enhance installation instructions, and clarify usage examples. Improve overall structure and readability.
1 parent 59c3525 commit acdffbc

File tree

1 file changed

+45
-138
lines changed

1 file changed

+45
-138
lines changed

guide-format-validator/README.md

Lines changed: 45 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,44 @@
11
# Guide Format Validator
22

3-
A comprehensive validation tool for markdown guide files that ensures compliance with documentation style guide rules.
3+
A simple validation tool for markdown guide files that ensures compliance with documentation style guide rules.
44

5-
**🎯 Get started in seconds:**
5+
**🎯 Two Ways to Validate Your Guides:**
6+
7+
**Option 1: Ultra-Simple (Recommended)**
68
```bash
79
./validate /path/to/your/guide.md
810
```
911

10-
The validator supports both rule-based validation (fast, no API required) and LLM-based validation (more nuanced, requires API key).
12+
**Option 2: Manual Validation**
13+
```bash
14+
./validate-prompt steps --prompt
15+
```
1116

1217
## 🚀 Getting Started
1318

14-
1. **Install the validator:**
19+
1. **Install:**
1520
```bash
1621
cd guide-format-validator
1722
./install.sh
1823
```
1924

20-
2. **Validate any guide:**
25+
2. **Choose your validation method:**
26+
27+
**Method 1: Automatic Validation (Recommended)**
2128
```bash
2229
./validate /path/to/your/guide.md
2330
```
31+
- ✅ Fast and reliable
32+
- ✅ No setup required
33+
- ✅ Shows exactly what to fix
2434

25-
3. **That's it!** You'll get detailed validation results showing what needs to be fixed.
35+
**Method 2: Manual Validation**
36+
```bash
37+
./validate-prompt steps --prompt
38+
```
39+
- ✅ Use with any LLM tool (ChatGPT, Claude, etc.)
40+
- ✅ Copy-paste validation prompts
41+
- ✅ No dependencies required
2642

2743
### Example Output
2844
```bash
@@ -73,160 +89,51 @@ export ANTHROPIC_API_KEY=your-api-key-here
7389

7490
**Or simply ignore it** - rule-based validation works great for most guides!
7591

76-
## Features
77-
78-
- **Rule-based validation** (default): Fast, reliable validation without external dependencies
79-
- **LLM validation** (optional): Advanced validation using Anthropic Claude for deeper analysis
80-
- **Multiple validators**: Overview, Prerequisites, Steps, Troubleshooting, and Callout validation
81-
- **Configuration-driven**: Validation rules defined in YAML within prompt files
82-
- **Easy to extend**: Add new validators by creating prompt files with YAML rules
83-
- **Configurable**: Customize validation behavior via configuration file
84-
- **Flexible output**: Multiple output formats and verbosity levels
85-
- **Error handling**: Graceful fallback when LLM is unavailable
86-
87-
## Validation Methods
92+
## Which Method Should You Use?
8893

89-
### Rule-Based Validation (Default)
90-
**Pros:**
91-
-**Fast**: No API calls, instant results
92-
-**Reliable**: Works offline, no network dependencies
93-
-**Free**: No API costs or credits required
94-
-**Deterministic**: Same input always produces same output
95-
-**CI/CD Ready**: Perfect for automated pipelines
94+
| Method | When to Use | Pros | Cons |
95+
|--------|-------------|------|------|
96+
| **Automatic** (`./validate`) | Most cases | ✅ Fast, reliable, no setup | ❌ Basic validation only |
97+
| **Manual** (`./validate-prompt`) | Custom needs | ✅ Use any LLM tool, flexible | ❌ Requires copy-paste |
9698

97-
**Cons:**
98-
-**Limited Scope**: Only checks formatting and basic structure
99-
-**No Context**: Cannot understand content meaning or flow
100-
-**Rigid Rules**: May miss subtle issues or edge cases
101-
102-
**Best For:** Development, CI/CD, quick checks, basic format validation
103-
104-
### LLM Validation (Optional)
105-
**Pros:**
106-
-**Contextual**: Understands content meaning and logical flow
107-
-**Comprehensive**: Can catch content quality issues beyond formatting
108-
-**Nuanced**: Identifies subtle problems rule-based validation misses
109-
-**Intelligent**: Can suggest improvements and better practices
99+
**Recommendation:** Start with **Automatic** validation. Use **Manual** validation only when you need custom analysis or want to use your own LLM tools.
110100

111-
**Cons:**
112-
-**Slower**: Requires API calls and network requests
113-
-**Cost**: Requires Anthropic API credits
114-
-**Dependency**: Needs internet connection and valid API key
115-
-**Variable**: Results may vary slightly between runs
101+
## Examples
116102

117-
**Best For:** Final review, content quality validation, comprehensive documentation review
118-
119-
### Manual Validation (Prompt Helper)
120-
**Pros:**
121-
-**No Dependencies**: Works without Python or API keys
122-
-**Flexible**: Use any LLM tool (ChatGPT, Claude, Cursor AI)
123-
-**Educational**: Learn validation criteria by reading prompts
124-
-**Customizable**: Modify prompts for specific needs
125-
126-
**Cons:**
127-
-**Manual**: Requires copy-paste and manual review
128-
-**Time-consuming**: Slower than automated validation
129-
-**Inconsistent**: Results depend on user's LLM tool choice
130-
131-
**Best For:** Learning, one-off validation, custom validation workflows, when you don't want to install dependencies
132-
133-
## Quick Start
134-
135-
### 1. Installation
136-
137-
**Option A: Automated Installation (Recommended)**
103+
**Validate a guide:**
138104
```bash
139-
# Clone or download the validator
140-
cd guide-format-validator
141-
142-
# Run the installation script
143-
./install.sh
144-
```
145-
146-
**Option B: Manual Installation**
147-
```bash
148-
# Clone or download the validator
149-
cd guide-format-validator
150-
151-
# Install dependencies
152-
pip install -r requirements.txt
153-
154-
# For LLM validation (optional)
155-
pip install anthropic
156-
```
157-
158-
The installation script will:
159-
- Check for Python 3 and pip
160-
- Install all required dependencies
161-
- Make scripts executable
162-
- Run tests to verify installation
163-
- Provide usage instructions
164-
165-
### 2. Basic Usage
166-
167-
**🎯 Primary Method: Ultra-Simple Validation**
168-
```bash
169-
# Validate any guide file - everything is automatic
170105
./validate /path/to/your/guide.md
171-
172-
# Real-world example
173-
./validate /Users/raj/raj-professional-tasks/turbot/guardrails/guardrails-docs/docs/guides/hosting-guardrails/installation/install-ted/index.md
174-
175-
# Relative path example
176-
./validate examples/bad-guide.md
177106
```
178107

179-
**That's it!** The validator automatically:
180-
- ✅ Uses the prompts folder for validation rules
181-
- ✅ Runs rule-based validation (fast, reliable)
182-
- ✅ Shows detailed results with pass/fail status
183-
- ✅ Works with any markdown guide file
184-
185-
**Note:** You might see a warning about `ANTHROPIC_API_KEY` - this is normal! The validator automatically uses rule-based validation (which is recommended) and works perfectly without any API keys.
186-
187-
**🔧 Advanced Options (Optional)**
108+
**Get validation prompts for manual use:**
188109
```bash
189-
# Manual validation prompts (no dependencies)
190110
./validate-prompt steps --prompt
191-
192-
# Full validation with LLM (requires API key)
193-
export ANTHROPIC_API_KEY=your-api-key-here
194-
python3 scripts/validate_guides.py guide.md --use-llm
195111
```
196112

197-
### Quick Reference
198-
199-
| Command | Purpose | Example |
200-
|---------|---------|---------|
201-
| `./validate <file>` | **🎯 Primary method - Ultra-simple** | `./validate /path/to/guide.md` |
202-
| `./validate-prompt <section>` | **Manual validation prompts** | `./validate-prompt steps --prompt` |
203-
| `python3 scripts/validate_guides.py <file>` | **Advanced options** | `python3 scripts/validate_guides.py guide.md --use-llm` |
204-
205-
### 3. Manual Validation (Prompt Helper)
206-
207-
If you prefer to validate manually or want to reference the validation criteria without running the full validator, you can use the prompt helper:
113+
## Manual Validation Details
208114

115+
**List all sections:**
209116
```bash
210-
# List all available validation sections
211117
./validate-prompt --list
118+
```
212119

213-
# Show validation rules for a specific section
120+
**Get validation rules:**
121+
```bash
214122
./validate-prompt overview --rules
123+
```
215124

216-
# Show LLM prompt for manual validation
125+
**Get LLM prompt:**
126+
```bash
217127
./validate-prompt steps --prompt
218-
219-
# Show both rules and prompt
220-
./validate-prompt troubleshooting
221128
```
222129

223-
**Use Cases:**
224-
- **Manual Review**: Copy the LLM prompt and paste it into ChatGPT, Claude, or Cursor AI
225-
- **Reference**: Quickly check what rules apply to each section
226-
- **Learning**: Understand the validation criteria without running the validator
227-
- **Custom Validation**: Use the prompts as templates for your own validation tools
130+
**Use the prompt with any LLM tool:**
131+
1. Copy the prompt output
132+
2. Paste into ChatGPT, Claude, or Cursor AI
133+
3. Replace `<PASTE FILE CONTENT HERE>` with your guide content
134+
4. Review the validation results
228135

229-
### 4. Configuration
136+
## Configuration
230137

231138
Create a `config.yaml` file to customize validation:
232139

0 commit comments

Comments
 (0)