agentleFS
totttott/laravel-tall-claude-ai-configs/CLAUDE.md

laravel-tall-claude-ai-configs

CLAUDE.md40 starsChanged 16 months agoMITView on GitHub

This document provides essential context and quick reference for AI-assisted development in Laravel TALL stack applications. Laravel Sail is used for Docker development. Always prefix commands with ./vendor/bin/sail: πŸ“– Complete Commands Reference Always use MCP servers for enhanced development: πŸ“– Complete MCP Server Guides ALWAYS consult docs/ before starting complex tasks. The documentation contains: Match tool complexity to task complexity: - Edit/MultiEdit: Simple, targeted changes and small modifications - Serena tools: Complex refactoring, cross-file analysis, unfamiliar code - Zen tools:…

The file

We split this CLAUDE.md into the rules it gives an agent

12 rules. About 0 are common, 11 are distinctive, and 1 is very specific to this project.

  • β‰ˆ0

    Common Β· estimate

    Many files like this have a rule of this kind.

  • β‰ˆ11

    Distinctive Β· estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Documentation First: Always check docs/ for detailed information

    line 101
  2. Distinctive:

    Pattern Consistency: Follow existing TALL stack patterns

    line 102
  3. Distinctive:

    Quality Gates: Use MCP tools for systematic quality assurance

    line 103
  4. Distinctive:

    Context Preservation: Use Serena memory system to document decisions

    line 104
  5. Distinctive:

    Critical: Follow strict documentation architecture to prevent duplication and maintain consistency.

    line 155
  6. Distinctive:

    Check existing coverage: - Avoid duplication with current docs

    line 163
  7. Distinctive:

    Verify specialist references: - Only reference existing agents (DevOps, Security, Performance, Testing, TALL Stack)

    line 164
  8. Distinctive:

    Use established structures: - Follow architectural patterns in existing documents

    line 166
  9. Distinctive:

    Review git status: Check recent commits and current branch state

    line 241
  10. Distinctive:

    Challenge and question: Don't immediately agree with suboptimal approaches

    line 259
  11. Distinctive:

    Think critically: Consider edge cases, performance, maintainability

    line 261
  12. Distinctive:

    Seek clarification: Ask follow-up questions for ambiguous requirements

    line 262

β‰ˆ β€œCommon” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. β€œVery specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md - Laravel TALL Stack AI-Assisted Development Guidelines

This document provides essential context and quick reference for AI-assisted development in Laravel TALL stack applications.

πŸš€ Development Environment

Laravel Sail is used for Docker development. Always prefix commands with ./vendor/bin/sail:

# Essential Commands
./vendor/bin/sail up -d          # Start environment  
./vendor/bin/sail down           # Stop environment
./vendor/bin/sail artisan migrate --seed  # Database setup
./vendor/bin/sail npm run dev    # Frontend development
./vendor/bin/sail artisan test   # Run tests

πŸ“– Complete Commands Reference


πŸ› οΈ MCP Server Tools Strategy

Always use MCP servers for enhanced development:

Core Development (Always Available)

  • mcp__serena__* - Semantic code analysis and intelligent navigation
  • mcp__context7__* - Up-to-date documentation access
  • mcp__browsermcp__* - Real-time browser debugging with authenticated sessions

Quality Assurance (Recommended)

  • mcp__zen__codereview - Professional code review before PRs
  • mcp__zen__precommit - Automated quality gates for commits
  • mcp__zen__secaudit - Security auditing for releases

Advanced Development (Complex Tasks)

  • mcp__zen__thinkdeep - Extended reasoning for architectural decisions
  • mcp__zen__debug - Systematic debugging workflows
  • mcp__zen__consensus - Multi-model validation for major decisions

πŸ“– Complete MCP Server Guides


πŸ“– Documentation-First Development

ALWAYS consult docs/ before starting complex tasks. The documentation contains:

Documentation Priority Workflow

1. **Check CLAUDE.md** β†’ Essential context and quick reference
2. **Consult docs/workflows/** β†’ Understand the process for your task type  
3. **Reference docs/reference/** β†’ Get specific standards, commands, patterns
4. **Engage .claude/agents/** β†’ Delegate complex domain-specific work
5. **Use docs/mcp-servers/** β†’ Optimize tool usage and troubleshooting

When Documentation is Incomplete

# If docs are missing or outdated, update them FIRST
mcp__serena__write_memory "missing_documentation" "Document what needs to be added"

# Then implement with proper documentation
"Implement [feature] and update docs/workflows/[relevant].md with new patterns discovered"

πŸ“Š Smart Tool Selection

Match tool complexity to task complexity:

  • Edit/MultiEdit: Simple, targeted changes and small modifications
  • Serena tools: Complex refactoring, cross-file analysis, unfamiliar code
  • Zen tools: Quality assurance, debugging, architectural analysis

πŸ“– Complete Development Workflows


πŸ—οΈ Laravel TALL Stack Architecture Quick Reference

Core Technology Stack

  • Laravel 12 + TALL Stack (Tailwind, Alpine.js, Laravel, Livewire)
  • FilamentPHP - Admin interfaces (optional)
  • Laravel Sail - Docker development environment
  • Pest - PHP testing framework

Key Application Patterns

  • app/Livewire/ - Reactive UI components
  • app/Services/ - Business logic services
  • app/Models/ - Eloquent models and relationships
  • resources/views/livewire/ - Livewire component templates

πŸ“– Complete Architecture Guide


πŸ€– AI Development Guidelines

Core Development Principles

  1. Documentation First: Always check docs/ for detailed information
  2. Pattern Consistency: Follow existing TALL stack patterns
  3. Quality Gates: Use MCP tools for systematic quality assurance
  4. Context Preservation: Use Serena memory system to document decisions

Natural Language Development Workflow

# 1. Context gathering
mcp__serena__get_symbols_overview [relevant_directory]
mcp__serena__search_for_pattern [related_functionality]

# 2. Implementation with quality gates  
mcp__zen__codereview [implemented_feature]
mcp__zen__precommit [validate_changes]

# 3. Knowledge preservation
mcp__serena__write_memory [pattern_name] [architectural_decisions]

Component Architecture Decision Rules

# Admin functionality + CRUD operations
β†’ Consider FilamentPHP Resource for rapid development

# User-facing + interactive/real-time  
β†’ Use Livewire Component

# API endpoints + external integrations
β†’ Standard Laravel controllers with proper validation

Sub-Agent Coordination Strategy

Use specialized sub-agents for complex domain-specific work:

# Task Complexity Assessment
Simple (1 file, <50 lines)     β†’ Main Agent Only
Moderate (2-3 files)           β†’ Consider specialist agent  
Complex (Multi-system)         β†’ Multi-agent workflow
Architecture/Performance       β†’ Always use specialist

# Example Delegations
"DevOps Specialist: Configure Docker services for [feature]"
"Testing Specialist: Create comprehensive test suite for [component]"
"Security Specialist: Audit authentication system for vulnerabilities"
"Performance Specialist: Optimize database queries in [service]"

πŸ“– AI Interaction Patterns


πŸ“š Documentation Contribution Guidelines

Critical: Follow strict documentation architecture to prevent duplication and maintain consistency.

Documentation Ownership Rules

  • Workflows = PROCESS (how to do tasks) β†’ Delegate to specialists
  • Agents = EXPERTISE (domain knowledge) β†’ Provide comprehensive coverage
  • Never duplicate content between workflows and agents

Before Contributing Documentation

  1. Check existing coverage - Avoid duplication with current docs
  2. Verify specialist references - Only reference existing agents (DevOps, Security, Performance, Testing, TALL Stack)
  3. Follow delegation patterns - Workflows delegate complex tasks to appropriate specialists
  4. Use established structures - Follow architectural patterns in existing documents

πŸ“– Complete Guidelines: Documentation Maintenance Guidelines


πŸ”„ Git Workflow

Commit after EVERY change without asking permission:

git add -A && git commit -m "[action]: [description]"

Commit Prefixes: feat:, fix:, refactor:, style:, docs:, chore:, test:


πŸ“š Documentation Navigation & When to Consult

πŸ’‘ Always check docs/ for detailed guidance before starting complex tasks.

πŸš€ Setup & Getting Started

Consult when: Setting up environment, understanding codebase architecture, first-time setup

  • Development Environment - Docker, Sail, basic setup

πŸ› οΈ Development Workflows

Consult when: Starting new features, debugging issues, optimizing performance, ensuring quality

  • Feature Development - Complete development process, planning to deployment
  • Quality Assurance - Code review, testing, security workflows
  • Debugging & Investigation - Systematic problem-solving approaches
  • Performance Optimization - Performance analysis and tuning strategies

πŸ€– AI Agent Specialists

Consult when: Need domain expertise for complex tasks, specialized knowledge required

  • DevOps Specialist - Docker, Sail, deployment, infrastructure management
  • Testing Specialist - Comprehensive testing strategies & QA processes
  • Security Specialist - Security audits, vulnerability assessments
  • Performance Specialist - Performance optimization & database tuning
  • TALL Stack Specialist - Livewire, Alpine.js, frontend patterns

πŸ”§ MCP Server Tools

Consult when: Need to understand tool capabilities, optimize tool usage, troubleshoot MCP issues

  • Serena Guide - Semantic code analysis, navigation, editing
  • Zen Guide - Advanced analysis, multi-model workflows, quality assurance
  • Context7 Guide - Up-to-date documentation access & retrieval
  • BrowserMCP Guide - Real-time browser debugging and troubleshooting

πŸ“– Reference Materials

Consult when: Need command syntax, coding standards, architectural decisions, AI interaction patterns

  • Laravel Commands - Complete Sail, Artisan, and project command reference
  • Code Conventions - TALL stack patterns, naming, structure standards
  • AI Interaction Patterns - Natural language development techniques
  • Decision Tracking - Architectural decision record templates & processes

πŸ” Quick Documentation Lookup

# Find relevant documentation
mcp__serena__list_dir --relative_path="docs" --recursive=true
mcp__serena__search_for_pattern --substring_pattern="your_topic" --relative_path="docs"

# Check specific workflow  
"Before implementing [feature], consult docs/workflows/feature-development.md"

# Get specialist guidance
For [complex_task], delegate to appropriate specialist in .claude/agents/

πŸ“– Complete Documentation Index


🎯 Development Context

Session Continuation Protocol

  1. Check memories: mcp__serena__list_memories and read relevant entries
  2. Review git status: Check recent commits and current branch state
  3. Use TodoWrite: Track complex tasks and progress

Browser Testing & Debugging (BrowserMCP)

Use BrowserMCP for real-time debugging and troubleshooting:

# Available via mcp__browsermcp__* tools
# - Real-time browser automation and testing
# - Authenticated session debugging
# - New feature validation and troubleshooting

Use for: UI debugging, feature testing, user workflow validation, real-time troubleshooting.


πŸ’‘ Collaboration Guidelines

  • Challenge and question: Don't immediately agree with suboptimal approaches
  • Push back constructively: Suggest better alternatives with clear reasoning
  • Think critically: Consider edge cases, performance, maintainability
  • Seek clarification: Ask follow-up questions for ambiguous requirements
  • Propose improvements: Suggest better patterns and cleaner implementations

Built with ❀️ using Laravel TALL stack and AI-powered development workflows

For detailed information on any topic, always consult the docs/ directory.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.