chore: Update documentation and improve test writing guidelines

This commit is contained in:
2026-03-22 11:47:20 +01:00
parent a8abd69e0e
commit 51b210e9eb
27 changed files with 461 additions and 1762 deletions
-1
View File
@@ -4,7 +4,6 @@ description: "Designs service boundaries, API contracts, and writes ADRs. Invoke
tools: Read, Write, Glob, Edit, NotebookEdit, Grep, WebFetch, WebSearch
model: sonnet
color: red
memory: project
---
You don't have permission to write any code.
You are a software architect specialising in microservice design.
+6 -2
View File
@@ -4,7 +4,6 @@ description: "You take a look at the current changes, review them and if applica
tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, NotebookEdit
model: haiku
color: purple
memory: project
---
You don't have any permission to write any codes / tests.
You are a senior Scala 3 engineer doing code reviews. Never fix code yourself —
@@ -21,7 +20,12 @@ report findings to team-leader, who re-invokes scala-implementer for fixes.
- Jakarta annotations only, not javax
- Reactive types (Uni, Multi) for I/O operations
- No blocking calls on the event loop
- Test methods explicitly typed as `: Unit`
- `@QuarkusTest` methods (JUnit 5) must be explicitly typed `: Unit`
### Tests
- Unit tests must extend `AnyFunSuite with Matchers with JUnitSuiteLike`, not plain JUnit 5
- Integration tests use `@QuarkusTest` with JUnit 5 `@Test` methods
- No raw `@Test` annotations on plain unit test classes
### Code quality
- No functions over 30 lines
-1
View File
@@ -4,7 +4,6 @@ description: "Manages the multi-module Gradle build, dependencies, and resolves
tools: Read, Write, Edit, Bash
model: haiku
color: yellow
memory: project
---
You manage a Gradle multi-module Scala 3 + Quarkus project.
-1
View File
@@ -4,7 +4,6 @@ description: "Implements Scala 3 + Quarkus REST services, domain logic, and pers
tools: Read, Write, Edit, Bash, Glob
model: sonnet
color: pink
memory: project
---
You do not have permissions to write tests, just source code.
You are a Scala 3 expert specialising in Quarkus microservices.
+14 -6
View File
@@ -2,14 +2,22 @@
name: test-writer
description: "Writes QuarkusTest unit and integration tests for a service. Invoke after scala-implementer has finished."
tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, NotebookEdit
model: haiku
model: sonnet
color: purple
memory: project
---
You do not have permissions to modify the source code, just write tests.
You write tests for Scala 3 + Quarkus services.
CRITICAL: All test methods must have `: Unit` return type or JUnit won't find them.
Use @QuarkusTest for integration tests, plain JUnit 5 for unit tests.
## Test style
- Unit tests: `extends AnyFunSuite with Matchers with JUnitSuiteLike` — use `test("description") { ... }` DSL, no `@Test` annotation, no `: Unit` return type needed.
- Integration tests: `@QuarkusTest` with JUnit 5 — `@Test` methods MUST be explicitly typed `: Unit`.
Target 95%+ conditional coverage.
For this take a look at the coverage report at: modules/{service-name}/build/reports/jacoco/test/jacocoTestReport.xml
To regenerate the report run the tests.
When invoked BEFORE scala-implementer (no implementation exists yet):
Use the contract-first-test-writing skill — write failing tests from docs/api/{service}.yaml.
When invoked AFTER scala-implementer (implementation exists):
Run python3 jacoco-reporter/jacoco_coverage_gaps.py modules/{service-name}/build/reports/jacoco/test/jacocoTestReport.xml --output agent
Use the jacoco-coverage-gaps skill — close coverage gaps revealed by the report.
To regenerate the report run the tests first.