docs: document template naming and maintenance refactor
Update agent and LLM guidance to reference the architecture strategy and add a template naming rule that keeps reusable abstractions domain-neutral. Mark maintenance Phase 3 as complete and document the page driver/page component refactors for EditableGrid and MasterDetail variants.docs: document template naming and maintenance refactor Update agent and LLM guidance to reference the architecture strategy and add a template naming rule that keeps reusable abstractions domain-neutral. Mark maintenance Phase 3 as complete and document the page driver/page component refactors for EditableGrid and MasterDetail variants.
This commit is contained in:
@@ -4,12 +4,26 @@
|
||||
- Follow the existing code style and patterns.
|
||||
- Use pnpm for running project commands.
|
||||
- Keep code in TypeScript unless migration is required.
|
||||
- When refactoring or creating new components, review `docs/frontend-layering.md` first and follow its layering and responsibility guidelines.
|
||||
- When refactoring or creating new components, review `docs/architecture-strategy.md` first and follow its layering and responsibility guidelines.
|
||||
- When a change affects LLM editing boundaries, page creation flow, layout usage, login-page boundaries, or frontend layering rules, update `docs/llm-development-guide.md` in the same change.
|
||||
- For UI debugging that spans implementation, state flow, and live browser behavior, use subagents deliberately: one for component contracts and event flow, one for data sources / routing / integration, and one for live browser verification. Do not edit files until the evidence from those threads converges on a root cause.
|
||||
- Treat subagent output as scoped evidence, not as a final answer. Use subagents to narrow the search space, confirm or eliminate hypotheses, and reduce local context load before making edits.
|
||||
- When a problem is directly tied to Vuetify component behavior, props, slots, accessibility output, or generated DOM, consult Vuetify MCP and official Vuetify API documentation before changing the implementation. Prefer supported Vuetify props, slots, and documented extension points over custom replacements unless the documented API is insufficient.
|
||||
|
||||
## Naming Generalization Rule
|
||||
- This project is a **template** intended to be reused across different data domains (student, course, teacher, etc.).
|
||||
- **Reusable abstractions** (Page Components, Sections, Items, generic composables, base components) **must not contain domain-specific names** (e.g., `Student`, `Course`) in their file names, type names, or export names.
|
||||
- Domain-specific names are **only allowed** in:
|
||||
- `src/models/<domain>.ts` — domain models
|
||||
- `src/stores/<domain>.ts` — domain stores
|
||||
- `src/services/modules/<domain>.ts` — service modules
|
||||
- Examples of correct vs. incorrect naming:
|
||||
- ❌ `PageStudentMaintenance.vue` → ✅ `PageMaintenance.vue`
|
||||
- ❌ `useStudentMaintenancePage.ts` → ✅ `useMaintenancePage.ts`
|
||||
- ❌ `ItemStudentRow.vue` → ✅ `ItemDataRow.vue`
|
||||
- ❌ `useStudentCrudCommands.ts` → ✅ `useCrudCommands.ts`
|
||||
- ✅ `models/student.ts`, `stores/students.ts` — domain layer, specific names are correct
|
||||
|
||||
## Stack
|
||||
- Framework: Vue 3 + Vite
|
||||
- UI Library: Vuetify
|
||||
|
||||
Reference in New Issue
Block a user