chore(docs): optimize AGENTS.md for agent accuracy#15486
chore(docs): optimize AGENTS.md for agent accuracy#15486fhussonnois merged 2 commits intodevelopfrom
Conversation
🐋 Docker imagedocker run --pull=always --rm -it -p 8080:8080 --user=root -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp ghcr.io/kestra-io/kestra-pr:15486 server local🧪 Java Unit Tests
|
||||||||||||||||||||||||
loicmathieu
left a comment
There was a problem hiding this comment.
Maybe a single line explaining what Kestra is?
| ``` | ||
|
|
||
| ## Code Style Guidelines | ||
| **DON'T**: Use field injection (`@Inject` on fields directly). Always prefer constructor injection. |
There was a problem hiding this comment.
The only issue with constructor injection is when there are like 20 dependencies, at this stage I prefere field injection (highly debatable, should also be a sign of needing a refactoring to split it)
There was a problem hiding this comment.
Need to check but usually Sonar rules flag constructors with more than 7 or 9 parameters
| ./gradlew build | ||
|
|
||
| # Build without tests (faster) | ||
| ./gradlew build -x test -x integrationTest -x testCodeCoverageReport --refresh-dependencies --no-daemon --parallel |
There was a problem hiding this comment.
Would it be more simpler to only compile? The only caveat would be for UI.
But I would also add a suggestion to at least compile the affected modules as once it changes code without recompilation and ... it fails.
| ./gradlew build -x test -x integrationTest -x testCodeCoverageReport --refresh-dependencies --no-daemon --parallel | |
| ./gradlew build compileTestJava |
Tests report quick summary:failed ❌ > tests: 4845, success: 4819, skipped: 22, failed: 4
Failed tests:jdbc-postgres > io.kestra.runner.postgres.PostgresServiceLivenessCoordinatorTest > [1] workerGroupKey=workerGroupKey failed ❌ in 32.492jdbc-postgres > io.kestra.runner.postgres.PostgresServiceLivenessCoordinatorTest > [2] workerGroupKey= failed ❌ in 32.311Develocity build scan: https://develocity.kestra.io/s/hhd62doj5oebq |
f693ba0 to
13e14b2
Compare
Restructure guidelines with critical code patterns (DI, error handling) prioritized at the top in DO/DON'T format. Remove generic "Common Development Tasks" section, consolidate duplicate rules, and reorder sections by violation frequency to improve AI agent code accuracy.
Restructure guidelines with critical code patterns (DI, error handling) prioritized at the top in DO/DON'T format. Remove generic "Common Development Tasks" section, consolidate duplicate rules, and reorder sections by violation frequency to improve AI agent code accuracy.
13e14b2 to
ea61773
Compare
Restructure guidelines with critical code patterns (DI, error handling) prioritized at the top in DO/DON'T format. Remove generic "Common Development Tasks" section, consolidate duplicate rules, and reorder sections by violation frequency to improve AI agent code accuracy.
All PRs submitted by external contributors that do not follow this template (including proper description, related issue, and checklist sections) may be automatically closed.
As a general practice, if you plan to work on a specific issue, comment on the issue first and wait to be assigned before starting any actual work. This avoids duplicated work and ensures a smooth contribution process - otherwise, the PR may be automatically closed.