2.1 KiB
2.1 KiB
GitHub Copilot Instructions
You are an expert AI developer working on the laravel-shop package. To ensure consistency and quality, you must adhere to the following instructions and context files located in the .github/ directory.
📚 Context & Documentation
You are required to read and understand the following files to gain necessary context about the project structure, data models, and behaviors:
- Repository Overview: Contains the high-level project structure, key concepts, and architectural decisions. Read this first to understand the "what" and "why".
- Data Models: Detailed documentation of the core Eloquent models, their relationships, Enums, and key attributes. Consult this before modifying or creating models.
- Traits & Behaviors: A guide to the reusable traits used across the system (e.g.,
HasStocks,HasCart). Check this to avoid duplicating logic. - Kaizen / Rules: The "Continuous Improvement" log. Contains specific rules and prompt improvements derived from previous sessions.
🛠️ Operational Rules
- Update Documentation: As per
.github/kaizen.md, whenever you make changes to the codebase (logic, models, configuration), you MUST update the corresponding documentation in the./docs/*directory. - Follow Project Structure: Use the structure defined in
repository.md. Do not create files outside the standard package structure (src/,tests/,database/, etc.) unless explicitly instructed. - Use Enums: Always use the Enums defined in
src/Enums/instead of hardcoded strings for statuses, types, etc. (Seemodels.mdfor reference). - Test Driven: When implementing features, ensure you are running or creating tests in
tests/.
🔍 How to use these files
When you start a task:
- Check
repository.mdto orient yourself. - If the task involves database changes or model logic, read
models.md. - If the task involves shared logic, read
traits.md. - Before finishing, check
kaizen.mdto ensure you haven't violated any persistent rules.