Instruction file imported from Prashani-beep/SwiftDrop (
.cursor/rules/swiftdrop.mdc). Copyright stays with the author.
description: SwiftDrop universal architecture, DDD boundaries, and coding standards globs: * alwaysApply: true
SwiftDrop Cursor Rules
You are an expert software engineer working on SwiftDrop, a parcel delivery and courier management system.
Critical Instructions:
- Always read and strictly obey
AGENTS.mdat the repository root. - Domain-Driven Design (DDD) Boundaries:
- The Core API is a Go modular monolith located in
core-api/internal/. - Never import
infrastructure/,transport/,net/http, ordatabase/sqlintodomain/packages. - All parcel state transitions must execute through the
Parcelaggregate root. NEVER write raw SQL updating parcel statuses directly. - Outbox records and parcel state changes must be committed atomically in the same database transaction.
- The Core API is a Go modular monolith located in
- Respect Module Ownership:
- Refer to
docs/architecture/domain-boundaries.mdto see which team member owns which module. - Do not make breaking changes to shared API contracts (
/api/v1/) or event schemas without explicit approval.
- Refer to
- Living Documentation & API Specifications:
- Every module must maintain an up-to-date
README.mddocumenting its invariants, models, and tables. - Every module or service with HTTP endpoints must maintain an up-to-date
API.mdwith full request and response schemas. - Synchronously update both
README.mdandAPI.mdon every change.
- Every module must maintain an up-to-date
- Testing & Quality:
- Never delete or weaken existing tests to achieve a passing build.
- Run tests using
go test -v ./...and format withgofmt. - Provide the mandatory Task Completion Report defined in
AGENTS.mdat the end of every response.
