| name | laraway-conventions |
| description | Review and apply Laravel naming conventions for PHP symbols, Eloquent models and relationships, database identifiers, migrations, routes, controllers, views, configuration, localization, contracts, and traits. Use when naming a Laravel artifact, reviewing naming consistency, or preparing a safe rename. |
| argument-hint | [path|diff|artifact-name] [--fix] |
Laravel Naming Conventions
Use this skill to classify a Laravel artifact, select its expected name, and report or apply the smallest consistent change.
Use it for new names, focused naming reviews, rename plans, and naming fixes. Produce a proposed name or findings that show the artifact kind, current name, expected name, violated rule, and affected references. Edit files only when the user requests implementation.
Step 0: Load Project Context
Read .ai-factory/config.yaml when it exists and use language.ui for the response language. Read .ai-factory/skill-context/laraway-conventions/SKILL.md when it exists and treat it as a project override.
Keep both files read-only. If a project override conflicts with the baseline convention, follow the project override and state the deviation.
Workflow
- Identify the artifact category before judging its name.
- Read only the files, diff, or symbols needed to establish context and relationship cardinality.
- Select the rule from CONVENTIONS.md.
- Resolve permitted choices explicitly, especially the project-wide view style.
- Inspect references that must change with the name. Do not treat a cross-file rename as a local edit.
- Return a proposed name or findings ordered by impact. Use WORKFLOW.md for the report format and rename procedure.
- When
--fix or an equivalent implementation request is present, make only the requested renames and update their direct references.
- Run focused searches and available tests, then apply CHECKLIST.md.
If the artifact category, relationship cardinality, or project view style cannot be established and would change the result, report the ambiguity instead of guessing.
Examples
Artifact Ownership and Config Policy
- Read scope: user-scoped Laravel code, schema, routes, views, configuration, localization, diffs, and the Step 0 context files.
- Write scope: only project files the user explicitly asked to rename or fix.
- Owned persistent artifacts: none.
- Never modify
.ai-factory/config.yaml, project skill-context, or unrelated files.
- A review-only request is read-only.
Failure Modes
- Applying a casing rule before identifying the artifact type.
- Inferring relationship plurality from method spelling instead of actual cardinality.
- Mixing
snake_case and kebab-case view names in one project.
- Adding
Interface or Trait affixes that the convention rejects.
- Renaming a declaration without its route, schema, relationship, view, or call-site references.
- Treating every naming preference as framework-enforced behavior.