documentation-writer
Generate comprehensive documentation for PHP projects including API docs, README files, and inline documentation. Use when asked to document code or create project documentation.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
Documentation Writer
Overview
Generate clear, comprehensive documentation for PHP projects. Supports README generation, API documentation, inline PHPDoc comments, and tutorial creation.
Documentation Types
1. README.md
- Project description and purpose
- Installation instructions
- Quick start / getting started
- Configuration options
- Usage examples
- API reference (brief)
- Contributing guidelines
- License information
2. API Documentation
- Class and method descriptions
- Parameter documentation with types
- Return type documentation
- Exception documentation
- Code examples for each public method
- Inheritance and interface documentation
3. PHPDoc Comments
/**
* Brief one-line description.
*
* Longer description if needed. Can include multiple paragraphs
* and additional context about the method's behavior.
*
* @param string $name The user's display name
* @param int $age The user's age (must be positive)
* @return User The created user instance
* @throws InvalidArgumentException If age is negative
* @throws DuplicateUserException If name already exists
*
* @example
* ```php
* $user = $service->createUser('Alice', 30);
* echo $user->getName(); // "Alice"
* ```
*/
4. Tutorial / Guide
- Step-by-step instructions
- Code examples at each step
- Expected output
- Common pitfalls and troubleshooting
- Links to related documentation
Style Guidelines
- Be concise - Say what needs to be said, nothing more
- Use examples - Show, don't just tell
- Be accurate - Documentation must match actual behavior
- Keep current - Update docs when code changes
- Use consistent formatting - Follow established conventions
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-03-11
- Mise à jour de l’index
- 2026-03-11
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!