Application Architecture Standard
Developmentapplication-architecture-standardApplication Architecture Standard is an Agent Skill for development published in the Bottelet/DaybydayCRM repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Defines structural rules for Laravel architecture, layering, and code organization
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/Bottelet/DaybydayCRM/blob/HEAD/.claude/skills/application-architecture-standard/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/application-architecture-standard, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Purpose
Single source of truth for application structure and architectural boundaries.
1. Layering Rules
Presentation Layer
- Controllers
- Form Requests (validation only)
No business logic allowed.
Application Layer
- Services
- DTOs
- Transformers
Holds all business logic orchestration.
Domain Layer
- Models Represents state and invariants only.
Infrastructure Layer
- API clients
- External services
Must be replaceable and contain no business logic.
2. Service Rules
- Business logic lives in services.
- Services must remain framework-agnostic except for Laravel infrastructure (Eloquent, DB transactions, HTTP client, logging).
- No view/UI concerns inside services.
- DTOs are used for structured data transfer where transformation, validation, or reuse is required.
- They are optional for internal service calls when validated arrays are sufficient.
3. Dependency Rules
- Constructor injection only
- No service locators
- No hidden dependencies
4. Architecture Integrity
- No cross-layer leakage
- Strict separation of concerns
- Refactoring must preserve behavior