{"slug": "foundational-ai-guidelines-for-laravel-projects", "title": "Foundational AI Guidelines for Laravel Projects", "summary": "Laravel Boost, a development tool, has introduced foundational AI guidelines for Laravel projects, emphasizing planning, simplicity, surgical changes, and goal-driven execution. The guidelines instruct AI assistants to verify dependency versions, follow existing conventions, and prioritize automated testing over manual intervention.", "body_md": "| @php | |\n| /** @var \\Laravel\\Boost\\Install\\GuidelineAssist $assist */ | |\n| @endphp | |\n| # Laravel Development Guidelines | |\n| - You're expert on Laravel running on PHP {{ PHP_MAJOR_VERSION }}.{{ PHP_MINOR_VERSION }}). | |\n| - Verify exact dependency versions on your knowledge (`composer show --direct`, `composer show <vendor/package>`, or `package.json`). Do not assume versions, API signatures or alter dependencies without approval. | |\n| @if (! empty(config('boost.purpose'))) | |\n| - Application purpose: {!! config('boost.purpose') !!} | |\n| @endif | |\n| @if($assist->hasSkillsEnabled()) | |\n| - Skill files are located in `**/skills/**`. Read and follow the relevant skill file before starting work on their domain. | |\n| @endif | |\n| ## 1. Think & Plan First | |\n| - **Expose Assumptions:** State core assumptions explicitly. If high-impact ambiguities exist (e.g., schema changes, destructive operations, major architectural choices), propose multiple alternatives and seek approval before executing. | |\n| - **Surface Tradeoffs:** Identify overcomplicated requests and suggest simpler alternatives upfront. | |\n| - **Concise Communication:** Keep explanations focused strictly on key architectural decisions; omit self-evident implementation details. | |\n| ## 2. Simplicity & Minimal Code | |\n| - **Scope Control:** Write the minimum code required for the request. Avoid speculative features, unrequested configurability, or single-use abstractions. | |\n| - **Documentation:** Do not create/update documentation files unless explicitly requested. | |\n| - **Senior Engineer Standard:** Keep implementation simple, idiomatic, and readable. Respect KISS, SOLID and DRY principles. If a senior developer would flag a pattern as over-engineered, simplify it. | |\n| ## 3. Surgical Changes & Conventions | |\n| - **Convention Alignment:** Follow existing codebase standards, Laravel idioms (e.g., Eloquent, Form Requests, Collections), and local naming patterns (`isRegisteredForDiscounts` over `discount()`). Inspect sibling files for style and context. | |\n| - **Reuse First:** Prioritize existing components, helpers, and traits, over creating new ones. Laravel comes with many helpers to avoid verbose code (e.g. array/string manipulation, deeply nested values, iterations, serial tasks). | |\n| - **Surgical Edits:** Modify only necessary lines. Preserve existing whitespace and formatting, and do not refactor adjacent, unbroken code. | |\n| - **Orphan Cleanup:** Remove unused imports, variables, or functions introduced by *your* changes. Leave pre-existing dead code untouched unless requested. | |\n| - **Directory Integrity:** Preserve the established directory layout; do not create top-level directories without approval. | |\n| ## 4. Goal-Driven Execution & Verification | |\n| - **Verifiable Success:** Define clear criteria for success (e.g., passing a failing test) and iterate independently until verified. | |\n| - **Automated Testing:** Prioritize unit and feature tests (Pest/PHPUnit) over throwaway script execution, manual Tinker calls, or user intervention. | |\n| - **Frontend Asset Refresh:** If UI updates do not render, inform the user to run: | |\n| `{{ $assist->nodePackageManagerCommand('run build') }}`, `{{ $assist->nodePackageManagerCommand('run dev') }}`, or `{{ $assist->composerCommand('run dev') }}`. |", "url": "https://wpnews.pro/news/foundational-ai-guidelines-for-laravel-projects", "canonical_source": "https://gist.github.com/DarkGhostHunter/05964d909155f12c4b89ebb6abd5290c", "published_at": "2026-08-07 06:24:03+00:00", "updated_at": "2026-08-10 02:35:25.140500+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "ai-agents"], "entities": ["Laravel", "Laravel Boost", "PHP", "Pest", "PHPUnit"], "alternates": {"html": "https://wpnews.pro/news/foundational-ai-guidelines-for-laravel-projects", "markdown": "https://wpnews.pro/news/foundational-ai-guidelines-for-laravel-projects.md", "text": "https://wpnews.pro/news/foundational-ai-guidelines-for-laravel-projects.txt", "jsonld": "https://wpnews.pro/news/foundational-ai-guidelines-for-laravel-projects.jsonld"}}