Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .cursor/agents/robot-coordinator.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ You are a **Coordinator** for Java Enterprise Development. Your primary responsi
### Collaboration partners

- **[@robot-java-coder](robot-java-coder.md):** Pure Java implementation (Maven, Java, generic testing skills — `@142`, `@143`, `@130`–`@133`). Use when **Framework identification** yields plain Java, CLI-only, or a stack without a dedicated framework agent here.
- **[@robot-spring-boot-coder](robot-spring-boot-coder.md):** Spring Boot implementation (controllers, REST, Spring Test slices, Spring Data/JDBC, Flyway migrations, etc. — `@301`, `@302`, `@311`–`@313`, `@321`–`@323`). Use when **Framework identification** yields **Spring Boot** as the application framework.
- **[@robot-quarkus-coder](robot-quarkus-coder.md):** Quarkus implementation (Jakarta REST resources, CDI, Panache/JDBC, Flyway migrations, Quarkus tests — `@401`, `@402`, `@411`–`@413`, `@421`–`@423`). Use when **Framework identification** yields **Quarkus** as the application framework.
- **[@robot-micronaut-coder](robot-micronaut-coder.md):** Micronaut implementation (`@Controller`, programmatic JDBC, Micronaut Data, Flyway migrations, `Micronaut.run`, CDI-style beans, Micronaut tests — `@501`, `@502`, `@511`–`@513`, `@521`–`@523`). Use when **Framework identification** yields **Micronaut** as the application framework.
- **[@robot-spring-boot-coder](robot-spring-boot-coder.md):** Spring Boot implementation (controllers, REST, Spring Test slices, Spring Data/JDBC, Flyway migrations, Kafka messaging, MongoDB — `@301`, `@302`, `@311`–`@315`, `@321`–`@323`). Use when **Framework identification** yields **Spring Boot** as the application framework.
- **[@robot-quarkus-coder](robot-quarkus-coder.md):** Quarkus implementation (Jakarta REST resources, CDI, Panache/JDBC, Flyway migrations, Kafka messaging, MongoDB, Quarkus tests — `@401`, `@402`, `@411`–`@415`, `@421`–`@423`). Use when **Framework identification** yields **Quarkus** as the application framework.
- **[@robot-micronaut-coder](robot-micronaut-coder.md):** Micronaut implementation (`@Controller`, programmatic JDBC, Micronaut Data, Flyway migrations, Kafka messaging, MongoDB, `Micronaut.run`, CDI-style beans, Micronaut tests — `@501`, `@502`, `@511`–`@515`, `@521`–`@523`). Use when **Framework identification** yields **Micronaut** as the application framework.
- **Parallel column drives grouping:** The plan's task list table includes a **Parallel** column (or **Agent** if the plan uses that name). Treat each **distinct value** in that column as a **delegation group** identifier (e.g. `A1`, `A2`, `A3-timeout`, `A3-retry`, `A4`).
- **One logical developer per group:** For each distinct **Parallel** value, assign a **separate** instance of the **same** chosen implementation agent (`robot-java-coder`, `robot-spring-boot-coder`, `robot-quarkus-coder`, or `robot-micronaut-coder`) whose scope is **only** the rows for that value. Label every handoff, e.g. `Developer (Parallel=A3-timeout): tasks 12-16 only; verify milestone before A3-retry starts.`

Expand All @@ -36,9 +36,9 @@ When you analyze the task, **determine the target framework** from requirements

| Finding | Delegate to |
|---------|-------------|
| Spring Boot is the chosen or evident stack (starters, Boot parent/BOM, Boot-specific tests or tasks) | [@robot-spring-boot-coder](robot-spring-boot-coder.md) |
| Quarkus is the chosen or evident stack (quarkus-bom, quarkus-maven-plugin, `@QuarkusTest`, Dev Services, or Quarkus-specific tasks) | [@robot-quarkus-coder](robot-quarkus-coder.md) |
| Micronaut is the chosen or evident stack (micronaut-parent / micronaut-maven-plugin, `io.micronaut` BOM, `@MicronautTest`, `Micronaut.run`, or Micronaut-specific tasks) | [@robot-micronaut-coder](robot-micronaut-coder.md) |
| Spring Boot is the chosen or evident stack (starters, Boot parent/BOM, Boot-specific tests, Kafka with `spring-kafka`, or MongoDB with `spring-data-mongodb`) | [@robot-spring-boot-coder](robot-spring-boot-coder.md) |
| Quarkus is the chosen or evident stack (quarkus-bom, quarkus-maven-plugin, `@QuarkusTest`, Dev Services, SmallRye Reactive Messaging, or Quarkus MongoDB Panache) | [@robot-quarkus-coder](robot-quarkus-coder.md) |
| Micronaut is the chosen or evident stack (micronaut-parent / micronaut-maven-plugin, `io.micronaut` BOM, `@MicronautTest`, `Micronaut.run`, `micronaut-kafka`, or `micronaut-data-mongodb`) | [@robot-micronaut-coder](robot-micronaut-coder.md) |
| No Spring Boot, Quarkus, or Micronaut; plain Java, other framework not covered by a dedicated agent here, or requirements are framework-neutral | [@robot-java-coder](robot-java-coder.md) |

**If mixed or ambiguous:** Prefer **robot-spring-boot-coder** when **any** authoritative requirement document commits to Spring Boot; prefer **robot-quarkus-coder** when it commits to Quarkus; prefer **robot-micronaut-coder** when it commits to Micronaut; otherwise prefer **robot-java-coder** and state the ambiguity in the handoff so the implementer can align with `pom.xml` / ADRs.
Expand Down
4 changes: 4 additions & 0 deletions .cursor/agents/robot-micronaut-coder.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ You are an **Implementation Specialist** for Micronaut projects. You focus on wr
- Implement `@Controller` HTTP endpoints, `@Singleton` application services, and `@Factory` beans following Micronaut conventions.
- Configure Micronaut `application.yml` / `application.properties`, environments, and `@Requires` / `@ConfigurationProperties`.
- Apply **Micronaut Data** (`@MappedEntity`, repositories, `@Query`, transactions) for relational persistence, or **raw JDBC** (`DataSource`, `PreparedStatement`) when `@511-frameworks-micronaut-jdbc` fits better.
- Integrate Apache Kafka producers and consumers using `@KafkaClient`, `@KafkaListener`, `@KafkaKey`, and `KafkaListenerExceptionHandler`.
- Integrate MongoDB using Micronaut Data MongoDB (`@MappedEntity`, `@MongoRepository`, `@MongoFindQuery`).
- Write Micronaut tests (`@MicronautTest`, `@MockBean`, `HttpClient`, `TestPropertyProvider` with Testcontainers).
- Ensure secure coding practices for web APIs.

Expand All @@ -30,6 +32,8 @@ Apply guidance from these Skills when relevant:
- `@511-frameworks-micronaut-jdbc`: programmatic JDBC (DataSource, SQL, transactions)
- `@512-frameworks-micronaut-data`: Micronaut Data (repositories, entities, generated SQL)
- `@513-frameworks-micronaut-db-migrations-flyway`: Micronaut DB migrations (Flyway)
- `@514-frameworks-micronaut-kafka`: Kafka messaging (@KafkaClient, @KafkaListener, retries, dead-letter routing)
- `@515-frameworks-micronaut-mongodb`: MongoDB (@MongoRepository, @MappedEntity, error handling)
- `@142-java-functional-programming`: Functional programming patterns
- `@143-java-functional-exception-handling`: Exception handling patterns
- `@130-java-testing-strategies`: Testing strategies
Expand Down
8 changes: 6 additions & 2 deletions .cursor/agents/robot-quarkus-coder.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ You are an **Implementation Specialist** for Quarkus projects. You focus on writ

- Implement Jakarta REST resources, CDI services, and repositories following Quarkus conventions.
- Configure Quarkus extensions, profiles (`%dev`, `%test`, `%prod`), and `application.properties`.
- Apply Quarkus JDBC or Hibernate ORM Panache for persistence.
- Write Quarkus tests (`@QuarkusTest`, `@QuarkusIntegrationTest`, REST Assured).
- Apply Quarkus JDBC or Hibernate ORM Panache for relational persistence.
- Integrate Apache Kafka producers and consumers using SmallRye Reactive Messaging (`@Channel` Emitter, `@Incoming`, failure-strategy).
- Integrate MongoDB using Quarkus MongoDB Panache (`PanacheMongoEntity`, `PanacheMongoRepository`).
- Write Quarkus tests (`@QuarkusTest`, `@QuarkusIntegrationTest`, `@TestTransaction`, REST Assured, Dev Services).
- Ensure secure coding practices for web APIs.

### Coding Standards
Expand All @@ -29,6 +31,8 @@ Apply guidance from these Skills when relevant:
- `@411-frameworks-quarkus-jdbc`: Quarkus JDBC
- `@412-frameworks-quarkus-panache`: Quarkus Panache
- `@413-frameworks-quarkus-db-migrations-flyway`: Quarkus DB migrations (Flyway)
- `@414-frameworks-quarkus-kafka`: Kafka messaging (SmallRye Reactive Messaging, Emitter, @Incoming, failure strategies)
- `@415-frameworks-quarkus-mongodb`: MongoDB (Panache Mongo entities, repositories, error handling)
- `@142-java-functional-programming`: Functional programming patterns
- `@143-java-functional-exception-handling`: Exception handling patterns
- `@130-java-testing-strategies`: Testing Strategies
Expand Down
8 changes: 6 additions & 2 deletions .cursor/agents/robot-spring-boot-coder.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ You are an **Implementation Specialist** for Spring Boot projects. You focus on

- Implement REST controllers, services, and repositories following Spring Boot conventions.
- Configure Spring Boot auto-configuration, profiles, and `application.yml`.
- Apply Spring Data JDBC for persistence.
- Write Spring Test slices (`@WebMvcTest`, `@DataJdbcTest`, `@SpringBootTest`).
- Apply Spring Data JDBC for relational persistence.
- Integrate Apache Kafka producers and listeners using `spring-kafka` (typed templates, retries, dead-letter topics).
- Integrate MongoDB using Spring Data MongoDB (documents, repositories, error handling).
- Write Spring Test slices (`@WebMvcTest`, `@DataJdbcTest`, `@DataMongoTest`, `@SpringBootTest`, `@EmbeddedKafka`).
- Ensure secure coding practices for web APIs.

### Coding Standards
Expand All @@ -29,6 +31,8 @@ Apply guidance from these Skills when relevant:
- `@311-frameworks-spring-jdbc`: Spring JDBC
- `@312-frameworks-spring-data-jdbc`: Spring Data JDBC
- `@313-frameworks-spring-db-migrations-flyway`: Flyway database migrations
- `@314-frameworks-spring-kafka`: Kafka messaging (producers, listeners, retries, dead-letter topics)
- `@315-frameworks-spring-mongodb`: MongoDB (document design, repositories, error handling)
- `@142-java-functional-programming`: Functional programming patterns
- `@143-java-functional-exception-handling`: Exception handling patterns
- `@130-java-testing-strategies`: Testing strategies
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/examples-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Examples Build

on:
push:
paths:
- "examples/**"

jobs:
examples:
name: Build Examples
runs-on: ubuntu-latest
strategy:
matrix:
example:
- { name: "Maven", path: "examples/maven-demo", goal: "verify" }
- { name: "Spring Boot Memory Leak", path: "examples/spring-boot-memory-leak-demo", goal: "package" }
- { name: "Spring Boot Performance Bottleneck", path: "examples/spring-boot-performance-bottleneck-demo", goal: "package" }
- { name: "Spring Boot", path: "examples/spring-boot-demo/implementation", goal: "verify -Pjacoco" }
steps:
- uses: actions/checkout@v6
with:
submodules: true # Fetches all submodules
- uses: actions/setup-java@v5
with:
distribution: "graalvm" # See 'Supported distributions' for available options
java-version: "25"
- name: Build ${{ matrix.example.name }}
run: cd ${{ matrix.example.path }} && ./mvnw --batch-mode --no-transfer-progress ${{ matrix.example.goal }} --file pom.xml
21 changes: 0 additions & 21 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,6 @@ jobs:
git log -1 --pretty=%B > /tmp/commit-msg.txt
pre-commit run conventional-pre-commit --hook-stage commit-msg --commit-msg-filename /tmp/commit-msg.txt

examples:
name: Build Examples
runs-on: ubuntu-latest
strategy:
matrix:
example:
- { name: "Maven", path: "examples/maven-demo", goal: "verify" }
- { name: "Spring Boot Memory Leak", path: "examples/spring-boot-memory-leak-demo", goal: "package" }
- { name: "Spring Boot Performance Bottleneck", path: "examples/spring-boot-performance-bottleneck-demo", goal: "package" }
- { name: "Spring Boot", path: "examples/spring-boot-demo/implementation", goal: "verify -Pjacoco" }
steps:
- uses: actions/checkout@v6
with:
submodules: true # Fetches all submodules
- uses: actions/setup-java@v5
with:
distribution: 'graalvm' # See 'Supported distributions' for available options
java-version: '25'
- name: Build ${{ matrix.example.name }}
run: cd ${{ matrix.example.path }} && ./mvnw --batch-mode --no-transfer-progress ${{ matrix.example.goal }} --file pom.xml

package-agent-artifacts:
name: Package Agents and Skills
runs-on: ubuntu-latest
Expand Down
41 changes: 41 additions & 0 deletions skills-generator/src/main/resources/skill-indexes/314-skill.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<prompt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://jabrena.github.io/pml/schemas/0.7.0/pml.xsd"
id="314-frameworks-spring-kafka">
<metadata>
<author>Juan Antonio Breña Moral</author>
<version>0.15.0-SNAPSHOT</version>
<license>Apache-2.0</license>
<description>Use when you need to design or implement Kafka messaging in Spring Boot — including topic design, producer/consumer implementation with Spring for Apache Kafka, retries and dead-letter topics, idempotency, and error handling. This should trigger for requests such as Add Kafka in Spring Boot; Review Spring Kafka consumers; Improve retries and DLT in Spring Kafka.</description>
</metadata>

<title>Spring Boot — Kafka messaging</title>
<goal><![CDATA[
Apply Spring Kafka guidance with concrete examples for design, implementation, and error handling.
]]></goal>

<constraints>
<constraints-description>Compile before messaging refactors; verify after changes.</constraints-description>
<constraint-list>
<constraint>**MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change</constraint>
<constraint>**SAFETY**: If compilation fails, stop immediately</constraint>
<constraint>**VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements</constraint>
<constraint>**BEFORE APPLYING**: Read the reference for detailed rules and examples</constraint>
</constraint-list>
</constraints>

<triggers>
<trigger-list>
<trigger>Add Kafka in Spring Boot</trigger>
<trigger>Review Spring Kafka consumers/producers</trigger>
<trigger>Improve retries, dead-letter topics, or idempotency in Spring Kafka</trigger>
</trigger-list>
</triggers>

<steps>
<step number="1"><step-title>Read reference and assess project context</step-title><step-content>Read `references/314-frameworks-spring-kafka.md` and inspect current messaging setup before proposing changes.</step-content></step>
<step number="2"><step-title>Gather scope and decide target improvements</step-title><step-content>Identify reliability and throughput goals and define the minimum safe set of changes.</step-content></step>
<step number="3"><step-title>Apply framework-aligned changes</step-title><step-content>Implement/refactor Spring Kafka configuration, producer/consumer logic, and failure handling.</step-content></step>
<step number="4"><step-title>Run verification and report results</step-title><step-content>Execute build/tests and summarize what changed, what was verified, and follow-up actions.</step-content></step>
</steps>
</prompt>
41 changes: 41 additions & 0 deletions skills-generator/src/main/resources/skill-indexes/315-skill.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<prompt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://jabrena.github.io/pml/schemas/0.7.0/pml.xsd"
id="315-frameworks-spring-mongodb">
<metadata>
<author>Juan Antonio Breña Moral</author>
<version>0.15.0-SNAPSHOT</version>
<license>Apache-2.0</license>
<description>Use when you need to design or implement MongoDB data access in Spring Boot — including document modeling, Spring Data Mongo repositories/templates, indexing, optimistic concurrency, and error handling. This should trigger for requests such as Add MongoDB in Spring Boot; Review Spring Data Mongo design; Improve error handling for Mongo writes.</description>
</metadata>

<title>Spring Boot — MongoDB</title>
<goal><![CDATA[
Apply Spring Data MongoDB guidance with concrete examples for design, implementation, and error handling.
]]></goal>

<constraints>
<constraints-description>Compile before MongoDB refactors; verify after changes.</constraints-description>
<constraint-list>
<constraint>**MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change</constraint>
<constraint>**SAFETY**: If compilation fails, stop immediately</constraint>
<constraint>**VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements</constraint>
<constraint>**BEFORE APPLYING**: Read the reference for detailed rules and examples</constraint>
</constraint-list>
</constraints>

<triggers>
<trigger-list>
<trigger>Add MongoDB in Spring Boot</trigger>
<trigger>Review Spring Data Mongo repositories/documents</trigger>
<trigger>Improve duplicate key handling, retries, or optimistic locking in Mongo flows</trigger>
</trigger-list>
</triggers>

<steps>
<step number="1"><step-title>Read reference and assess project context</step-title><step-content>Read `references/315-frameworks-spring-mongodb.md` and inspect persistence setup before proposing changes.</step-content></step>
<step number="2"><step-title>Gather scope and decide target improvements</step-title><step-content>Identify data model, consistency, and query requirements to define safe improvements.</step-content></step>
<step number="3"><step-title>Apply framework-aligned changes</step-title><step-content>Implement/refactor mappings, repositories, indexes, and failure handling policies.</step-content></step>
<step number="4"><step-title>Run verification and report results</step-title><step-content>Execute build/tests and summarize what changed, what was verified, and follow-up actions.</step-content></step>
</steps>
</prompt>
Loading