AI Prompt Laravel Project and Create Comprehensive Documentation

April 27, 2026

AI Prompt Laravel Project and Create Comprehensive Documentation

AI Agent Documentation Generation Request

I need you to analyze my Laravel project and create comprehensive documentation in the .ai/ folder with the following structure:

.ai/
├── README.md              # Project overview
├── ARCHITECTURE.md        # System architecture
├── CONVENTIONS.md         # Coding standards
├── DATABASE.md            # Database structure
└── API.md                 # API endpoints

Instructions for Each File:

1. README.md

Create a project overview including:

  • Project name and purpose
  • Tech stack (Laravel version, PHP version, key packages)
  • Key features and functionalities
  • Project structure overview
  • How to set up the project (installation steps)
  • Environment variables explanation
  • Common tasks and commands
  • Important notes for AI agents working on this codebase

2. ARCHITECTURE.md

Document the system architecture:

  • Application architecture pattern (MVC, Service Layer, Repository, etc.)
  • Folder structure and organization
  • Key namespaces and their purposes
  • Design patterns used
  • Third-party integrations
  • Queue/Job system (if any)
  • Caching strategy
  • Authentication & authorization flow
  • File storage structure

3. CONVENTIONS.md

Document coding standards:

  • PHP coding style (PSR standards)
  • Naming conventions (controllers, models, variables, methods)
  • File naming patterns
  • Database naming conventions (tables, columns, foreign keys)
  • Comment and documentation style
  • Testing conventions
  • Git commit message format
  • Code organization principles
  • Do's and Don'ts specific to this project

4. DATABASE.md

Document database structure:

  • Database schema overview
  • List all tables with their purposes
  • Key relationships between tables
  • Important indexes
  • Enum values and their meanings
  • Soft deletes usage
  • Polymorphic relationships (if any)
  • Database migrations strategy
  • Seeders overview

5. API.md

Document all API endpoints:

  • Base URL and versioning
  • Authentication method
  • List all endpoints grouped by resource
  • For each endpoint include:
    • HTTP method
    • Endpoint path
    • Description
    • Request parameters
    • Request body example
    • Response format
    • Response codes
    • Authorization requirements
  • Rate limiting (if any)
  • Common error responses

Analysis Instructions:

Please analyze the following in my Laravel project:

  1. Scan all controllers in app/Http/Controllers/
  2. Review all models in app/Models/
  3. Check routes in routes/ directory
  4. Examine migrations in database/migrations/
  5. Review service providers and configuration files
  6. Check composer.json for dependencies
  7. Look at .env.example for environment setup

Output Format:

  • Use Markdown format for all files
  • Include code examples where relevant
  • Use emojis for better readability
  • Add table of contents for longer files
  • Use mermaid diagrams where helpful (especially in ARCHITECTURE.md)
  • Be specific and accurate based on actual code
  • Highlight any technical debt or areas needing attention

Additional Context:

[Add any specific information about your project here, such as:]

  • Business domain:
  • Target users:
  • Special features:
  • Known issues or technical debt:
  • Deployment environment:

After creating these files, please summarize what you found and any recommendations for improving the codebase structure or documentation.