mirror of
https://github.com/symfony/ai.git
synced 2026-03-23 23:42:18 +01:00
3.6 KiB
3.6 KiB
name, description
| name | description |
|---|---|
| docs-check | Check Documentation for Outdated Code References |
Check Documentation for Outdated Code References
Scan RST and Markdown documentation files in this repository for code references that no longer match the actual codebase. Report findings grouped by file with actionable details.
What to Check
1. PHP Class and Interface References
- RST
:class:roles (e.g.,:class:\Symfony\AI\Platform\Platform``) - RST
:method:roles (e.g.,:method:\Symfony\AI\Platform\PlatformInterface::invoke``) - Fully qualified class names in code blocks and inline code
usestatements in PHP code blocks
For each reference, verify the class/interface/method actually exists at that namespace path by searching src/.
2. Composer Package Names
composer requirecommands in code blocks- Verify the package exists in a
composer.jsonwithin the repository
3. Configuration Keys
- YAML configuration examples (especially
config/packages/ai.yamlpatterns) - Cross-reference with the bundle's actual configuration classes (look for
Configuration.phpor*Extension.phpfiles)
4. PHP Attributes
#[AsTool],#[AsAgent],#[AsMemory], and similar attribute references- Verify the attribute class exists at the referenced namespace
5. Method and Constructor Signatures
- Code examples showing constructor calls or method invocations
- Check that parameter names and order roughly match the current signatures
6. Example File References
- Links to example files (e.g.,
examples/rag/in-memory.php) - Verify the referenced file paths exist
Where to Look
Scan these locations for documentation files:
docs/**/*.rst- Main Sphinx documentationsrc/*/README.md- Component READMEssrc/*/CHANGELOG.md- Component changelogs (check recent entries only)UPGRADE.md- Upgrade guideCONTRIBUTING.md- Contributing guide
How to Work
- Use the Explore agent to gather all RST and MD documentation files
- Process files in parallel where possible using multiple agents
- For each file, extract code references and verify them against the codebase using Grep and Glob
- Collect all findings into a single report
Output Format
Group findings by documentation file. For each issue found, report:
- File and line: path and approximate line number
- Reference: the outdated reference as written in the docs
- Issue: what is wrong (class not found, method renamed, file missing, etc.)
- Suggestion: if possible, suggest the correct current reference
If no issues are found in a file, skip it from the report.
At the end, provide a summary count: X issues found across Y files (Z files checked).
Addressing Findings
If any issues are found, proceed with the following steps:
5. Fix the Documentation
- For each finding, update the documentation file to match the current codebase
- Apply fixes carefully: use the correct class names, method signatures, file paths, and configuration keys as they exist in
src/ - Do not change the intent or structure of the documentation — only correct the outdated references
6. Verify Fixes
- Re-check the corrected references against the codebase to ensure accuracy
- Run
vendor/bin/php-cs-fixer fixif any PHP files were modified
7. Commit, Push, and Open a Pull Request
- Create a new branch from
mainnameddocs/fix-outdated-references - Commit all changes with a descriptive message summarizing the fixes
- Push the branch to GitHub
- Open a pull request against
mainusing the repository's PR template, filling in the table withDocs?: yesand describing the fixed references in the body