Include Loyalty/Communication/Sports Center backends and registry updates alongside production nginx and compose wiring. Co-authored-by: Cursor <cursoragent@cursor.com>
3.6 KiB
3.6 KiB
Cursor Guidelines
Cursor-specific workflow for TorbatYar implementation phases.
General prompt behavior: prompt-rules.md. Lifecycle: development-loop.md.
Reading Order
- docs/README.md
- AI Framework README
- master-prompt.md
- development-loop.md · quality-gates.md
- prompt-rules.md (this workflow’s companion)
- Phase brief + phase-manifest.yaml entry
- service-manifest.yaml for touched services
docs/architecture/*anddocs/architecture/adr/*- project-principles.md · coding-standards.md · testing-strategy.md
- module-registry.md · provider-registry.md · glossary.md
- Relevant phases/ and reference docs
- Applicable templates (service/module/entity/repository/service-layer/api/event/testing/documentation)
Do not start coding before Architecture Validation completes.
Implementation Order
- ADR/docs if a new decision is required
- Models / migrations (entity-template.md)
- Repositories (repository-template.md)
- Validators + permissions
- Services + events (service-layer-template.md, event-template.md)
- API routers + DTOs (api-template.md)
- Provider adapters only if this service owns them
- Frontend only if the phase explicitly includes UI
- Keep diffs scoped to the phase — no drive-by refactors
Documentation Order
- Draft/update phase doc during or immediately after implementation
- Update registries and manifests
- Update reference catalogs when public surface changed
- Update progress (completed) and next-steps (next milestone)
- Fill handover (phase-handover.md)
- ADR index if a new ADR was added
- Follow documentation-template.md
Validation Order
- Automated tests (testing-template.md)
- Self audit (scope creep, unfinished claimed work, layering, tenancy, secrets)
- Quality gates (quality-gates.md)
- Link / cross-reference / manifest checks for doc changes
- Repair loop until green
Loop Behavior
- Follow development-loop.md stages strictly.
- On gate failure: fix root cause, re-validate, do not skip gates.
- On architecture conflict: stop coding; fix ADR/docs first.
- Prefer existing sibling service patterns (Accounting, CRM, Loyalty, Communication).
Completion Behavior
- Phase is complete only when Completion Rules in development-loop.md are satisfied.
- Print a concise completion summary for the user.
- Stop — do not begin the next phase unless the user explicitly requests it.
- Do not commit unless the user asks (project git norms).
Cursor Tooling Notes
- Use the repo’s docs and code as source of truth; do not invent registries.
- Run pytest for the touched service before claiming tests passed.
- For docs-only phases (like framework creation), run documentation/link/manifest validation instead of service pytest.