-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
79 lines (77 loc) · 5.82 KB
/
.coderabbit.yaml
File metadata and controls
79 lines (77 loc) · 5.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
language: en
early_access: false
reviews:
high_level_summary: true
poem: false
review_status: true
collapse_walkthrough: false
path_filters:
- "!**/.github/workflows/*"
- "!**/.github/prompts/*" # Exclude Prompt files
- "!**/node_modules/**" # Exclude dependencies
- "!**/dist/**" # Exclude build files
- "!**/specify/**" # Exclude Speckit files
path_instructions:
- path: "specs/**/spec.md"
instructions: |
Speckit specs capture the constitution for behaviour. Confirm changes satisfy acceptance criteria, update impacted requirements, and flag any divergence or missing traceability.
- path: "specs/**/plan.md"
instructions: |
Use the delivery plan to validate sequencing, observability, and resiliency hooks promised for a spec. Highlight unimplemented tasks or newly introduced risks.
- path: "specs/**/externalServiceInterface.md"
instructions: |
Ensure external contracts, payloads, and RabbitMQ routing rules stay in sync with the implementation. Note versioning needs or backwards compatibility concerns.
- path: "contract-tests/**/*.spec.ts"
instructions: |
Treat these as SpecFlow-style executable specs. Verify scenario coverage against the corresponding Speckit items, GraphQL schema contracts, and event emission guarantees.
- path: "test/**/*{.feature,.steps.ts}"
instructions: |
Feature files and step definitions must remain business-readable, map to the constitution, and reuse shared hooks. Call out brittle step coupling or missing negative paths.
- path: "src/**/*.{ts,js}"
instructions: |
Review the TypeScript/JavaScript code for NestJS best practices, dependency injection, module structure, and potential bugs. Validate microservice boundaries, async messaging robustness, and GraphQL schema health (resolver mappings, DTO validation, auth guards).
**Context Files (Do Not Review):**
- `docs/Design.md` - Design overview of the project
- `docs/Pagination.md` - Pagination design overview
- `docs/Developing.md` - Development setup overview
- `docs/graphql-typeorm-usage.md` - overview of GraphQL and TypeORM usage and how they are used together with NestJS in the project
- `docs/database-definitions.md` - guidelines for creating TypeORM entity definitions
- `src/core/error-handling/graphql.exception.filter.ts` - GraphQL error handling
- `src/core/error-handling/http.exception.filter.ts` - HTTP error handling
- `src/core/error-handling/rest.error.response.ts` - REST error response
- `src/core/error-handling/unhandled.exception.filter.ts` - Global exception handler
**Guidelines:**
- Our project uses global exception handlers (`UnhandledExceptionFilter`), so avoid suggesting additional `try/catch` blocks unless handling specific cases.
- Use NestJS latest documentation from `https://docs.nestjs.com/` for reference on NestJS best practices.
- Use TypeORM latest documentation from `https://typeorm.io/` for reference on TypeORM best practices.
- Refer to the design overview in the context files for better understanding.
- Prefer the CQRS and event-driven patterns defined in `specs/003-domain-event-standard` when assessing service logic.
- When RabbitMQ messaging is touched, ensure exchanges, routing keys, and acknowledgements follow the resilience policies in `specs/008-integration-resilience-policies`.
- path: "src/**/*resolver.ts"
instructions: |
GraphQL resolvers must stay contract-safe, coordinate with schema contract tests, and avoid N+1 issues (DataLoader, batching). Confirm errors map to the global filters and constitution-level guarantees.
- path: "src/**/*module.ts"
instructions: |
Modules should expose clear providers, avoid circular dependencies, and register message handlers with the appropriate RabbitMQ exchanges defined in `event.bus.module.ts`.
- path: "src/**/event-bus/**/*.ts"
instructions: |
Inspect RabbitMQ configuration, exchange/queue bindings, and dead-letter handling. Align with resilience and observability principles from `specs/006-observability-correlation-metrics` and `specs/008-integration-resilience-policies`.
- path: "src/**/microservices/**/*.ts"
instructions: |
Validate client proxies, subscription factories, and background workers for resource cleanup, retry strategies, and telemetry hooks. Ensure they follow NestJS microservice best practices.
- path: "src/**/*.spec.ts"
instructions: "Review the unit tests, ensuring proper NestJS testing techniques (TestingModule, custom providers, async messaging mocks). Check for completeness across command, query, and event handlers."
- path: "manifests/**/*.{yaml,yml}"
instructions: "Review the kubernetes manifests for microservice alignment, RabbitMQ connectivity, config maps/secrets, and health probes."
- path: "**/Dockerfile"
instructions: "Review the Dockerfile for best practices in building, optimizing, and running a NestJS application."
- path: "**/quickstart-services*.yml"
instructions: "Review Docker Compose configurations for environment setup, ensuring proper service configuration, network setup, and environment variables handling."
- path: "alkemio.yml"
instructions: "Check the service topology, message broker settings, and GraphQL endpoints align with microservice deployment expectations."
- path: "**/*.graphql"
instructions: "Review schema files for backwards compatibility, authorization metadata, and alignment with contract tests."
- path: "docs/**/*.md"
instructions: "Ensure the documentation stays current, references the constitution where needed, and provides accurate guidance for deploying the NestJS microservice stack."
chat:
auto_reply: true