|
| 1 | +# AI Documentation Framework |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +ProxySQL uses AI-generated documentation to accelerate developer onboarding and codebase exploration while maintaining transparency about accuracy limitations. |
| 6 | + |
| 7 | +## Documentation Tiers |
| 8 | + |
| 9 | +### 🔬 AI-Generated (Tier 1) |
| 10 | +- **Purpose**: Exploration guides and starting points |
| 11 | +- **Verification**: NON-VERIFIED |
| 12 | +- **Maintenance**: Community contributions encouraged |
| 13 | +- **Update**: As needed when codebase changes significantly |
| 14 | + |
| 15 | +### 📋 Human-Verified (Tier 2) |
| 16 | +- **Purpose**: Critical operational documentation |
| 17 | +- **Verification**: REQUIRED |
| 18 | +- **Maintenance**: Maintainer-reviewed |
| 19 | +- **Update**: With each relevant change |
| 20 | + |
| 21 | +### 🔧 Living Documentation (Tier 3) |
| 22 | +- **Purpose**: Auto-generated from source |
| 23 | +- **Verification**: Automated validation |
| 24 | +- **Maintenance**: CI/CD integration |
| 25 | +- **Update**: Continuous |
| 26 | + |
| 27 | +## AI Documentation Standards |
| 28 | + |
| 29 | +### Required Disclaimer |
| 30 | +Every AI-generated document must include: |
| 31 | + |
| 32 | +```markdown |
| 33 | +> **⚠️ Important Notice**: This documentation was generated by AI and may contain inaccuracies. |
| 34 | +> It should be used as a starting point for exploration only. Always verify critical information |
| 35 | +> against the actual source code. |
| 36 | +> |
| 37 | +> **Last AI Update**: [DATE] |
| 38 | +> **Status**: NON-VERIFIED |
| 39 | +> **Maintainer**: [ASSIGNED] |
| 40 | +``` |
| 41 | + |
| 42 | +### File Organization |
| 43 | +``` |
| 44 | +doc/ |
| 45 | +├── ai-generated/ # AI-generated exploration guides |
| 46 | +│ ├── architecture/ # Architecture documentation |
| 47 | +│ └── DOCUMENTATION-INDEX.md |
| 48 | +├── internal/ # Human-verified technical docs |
| 49 | +├── release_notes/ # Official release notes |
| 50 | +└── README.md # This guide |
| 51 | +``` |
| 52 | + |
| 53 | +## Verification Process |
| 54 | + |
| 55 | +### When to Verify |
| 56 | +- Security-related documentation |
| 57 | +- Build and installation instructions |
| 58 | +- API contracts and interfaces |
| 59 | +- Performance-critical information |
| 60 | + |
| 61 | +### Verification Checklist |
| 62 | +- [ ] Code references are accurate |
| 63 | +- [ ] File paths are correct |
| 64 | +- [ ] Technical details match implementation |
| 65 | +- [ ] Examples work as described |
| 66 | + |
| 67 | +## Maintenance Guidelines |
| 68 | + |
| 69 | +### AI Documentation Updates |
| 70 | +1. Review after major feature changes |
| 71 | +2. Update when architectural patterns shift |
| 72 | +3. Community corrections welcome |
| 73 | +4. Maintain disclaimer format |
| 74 | + |
| 75 | +### Automated Validation |
| 76 | +Where possible, include validation commands: |
| 77 | +```markdown |
| 78 | +**Validation Command**: |
| 79 | +```bash |
| 80 | +grep -n "class MySQL_Handler" src/protocol/mysql/protocol_mysql.cpp |
| 81 | +``` |
| 82 | +``` |
| 83 | +
|
| 84 | +## Contributing |
| 85 | +
|
| 86 | +### Improving AI Documentation |
| 87 | +1. Identify inaccuracies |
| 88 | +2. Submit corrections via PR |
| 89 | +3. Add validation commands |
| 90 | +4. Update disclaimer date |
| 91 | +
|
| 92 | +### Adding New AI Documentation |
| 93 | +1. Follow the template format |
| 94 | +2. Include required disclaimer |
| 95 | +3. Place in appropriate `ai-generated/` subdirectory |
| 96 | +4. Update main documentation index |
| 97 | +
|
| 98 | +## Benefits |
| 99 | +
|
| 100 | +- **Faster Onboarding**: Developers get immediate guidance |
| 101 | +- **Reduced Burden**: Critical verification focused on essential docs |
| 102 | +- **Transparency**: Clear status indicators for all documentation |
| 103 | +- **Community-Driven**: Easy contribution process for improvements |
| 104 | +
|
| 105 | +## Limitations |
| 106 | +
|
| 107 | +- AI documentation may contain technical inaccuracies |
| 108 | +- Not suitable for critical operational procedures |
| 109 | +- Requires human verification for security-sensitive information |
| 110 | +- May become outdated between major updates |
| 111 | +
|
| 112 | +--- |
| 113 | +
|
| 114 | +This framework balances the productivity benefits of AI-generated documentation with the accuracy requirements of a critical database proxy system. |
0 commit comments