# AI Section Builder - Quick Start Guide

## 🚀 Get Started in 60 Seconds

### Step 1: Load the Extension
1. Open Chrome and go to `chrome://extensions`
2. Enable "Developer mode" (top-right toggle)
3. Click "Load unpacked"
4. Select the `filevine-plugin` folder
5. ✅ Extension loaded!

### Step 2: Log into Filevine
1. Open Filevine in the same browser
2. Log in with your credentials
3. Navigate to any page
4. ✅ Extension will detect your session

### Step 3: Open AI Section Builder
1. Click the extension icon in Chrome toolbar
2. Click "Customs Editor" tab
3. Org ID and Project Type ID should auto-fill
4. Click "Load Sections" button
5. Select your target section
6. ✅ Ready to generate fields!

### Step 4: Generate Fields
1. In the "Describe Your Requirements" box, type:
   ```
   I need a client intake form with:
   - Client name and contact info
   - Case type and description
   - Important dates
   - Billing arrangement
   ```

2. Click "Generate Fields with AI"

3. Watch the progress:
   - ⚙️ AI analyzing requirements...
   - ⚙️ Creating fields...
   - ✓ Field 1 created
   - ✓ Field 2 created
   - ✓ Success!

4. ✅ Fields are now live in Filevine!

## 💡 Example Requirements

### Simple (3-5 fields)
```
Contact form with name, email, phone number, and preferred contact method
```

### Medium (8-15 fields)
```
Employee onboarding form with:
- Personal info (name, address, SSN, emergency contact)
- Position details (title, department, start date, salary)
- Benefits selections (health insurance, 401k)
- Equipment assignments
```

### Complex (20+ fields)
```
Medical patient intake with complete demographics, insurance information,
medical history, current medications, known allergies, primary care
physician details, emergency contacts, and authorization signatures
```

## ⚡ Pro Tips

1. **Be specific** - More detail = better field configurations
2. **Group logically** - Mention sections (e.g., "contact info section")
3. **Mention required fields** - "Required: email address"
4. **Include examples** - "phone number in format (555) 123-4567"
5. **Note data types** - "dollar amount", "yes/no", "dropdown list"

## 🎯 What the AI Does

The AI automatically:
- ✅ Selects appropriate field types (text, date, currency, etc.)
- ✅ Creates descriptive field names
- ✅ Generates clean field selectors
- ✅ Organizes with section headers
- ✅ Sets required fields
- ✅ Numbers rows sequentially
- ✅ Adds helpful notes

## 📊 Cost

Very affordable:
- ~$0.01 per generation (typical)
- 100 forms = ~$1.00
- Billed to your Anthropic account

## ❓ Troubleshooting

**"AI Service not configured"**
→ Reload extension: chrome://extensions → Click reload

**"Not authenticated"**
→ Log into Filevine first, then click "Check Connection"

**Some fields failed**
→ Check progress panel for errors, successfully created fields are saved

**Can't load sections**
→ Verify Org ID and Project Type ID are correct

## 📚 Full Documentation

- [Complete Guide](docs/AI_SECTION_BUILDER.md)
- [Manual Field Creator](docs/CUSTOM_FIELD_CREATOR.md)
- [Setup Details](docs/SETUP_COMPLETE.md)

---

**Questions?** Check console logs or review the detailed documentation.

**Ready?** Open the Customs Editor tab and start generating fields! 🎉
