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
53 changes: 53 additions & 0 deletions skills-generator/src/main/resources/skill-indexes/316-skill.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?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="316-frameworks-spring-mongodb-migrations-mongock">
<metadata>
<author>Juan Antonio Breña Moral</author>
<version>0.15.0</version>
<license>Apache-2.0</license>
<description>Use when you need to add or review Mongock MongoDB data migrations in a Spring Boot application — including Maven coordinates, Spring Data MongoDB drivers, migration scan packages, @ChangeUnit classes, lock/transaction settings, and Testcontainers verification. This should trigger for requests such as Add Mongock migrations in Spring Boot; Review Spring MongoDB data migrations; Configure Mongock change units for Spring Data MongoDB.</description>
</metadata>

<title>Spring - MongoDB migrations (Mongock)</title>
<goal><![CDATA[
Apply Mongock migration guidelines for Spring Boot and Spring Data MongoDB.

**What is covered in this Skill?**

- Mongock BOM, Spring Boot runner, and Spring Data MongoDB driver coordinates
- `mongock.migration-scan-package` configuration and startup execution
- Code-first `@ChangeUnit` migrations with `@Execution` and rollback hooks
- Locking, idempotency, transaction limits, and forward-only rollout discipline
- Integration tests with Testcontainers MongoDB
- Coordination with `@315-frameworks-spring-mongodb`

**Scope:** Apply recommendations based on the reference rules and good/bad examples.
]]></goal>

<constraints>
<constraints-description>Compile before Mongock or MongoDB migration changes; 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 good/bad patterns</constraint>
<constraint>**EDGE CASE**: If the project Spring Data MongoDB version is not compatible with the selected Mongock driver, stop and ask whether to pin/upgrade Mongock or use a lower driver generation</constraint>
</constraint-list>
</constraints>

<triggers>
<trigger-list>
<trigger>Add Mongock migrations in Spring Boot</trigger>
<trigger>Review Spring MongoDB data migrations</trigger>
<trigger>Configure Mongock change units for Spring Data MongoDB</trigger>
</trigger-list>
</triggers>

<steps>
<step number="1"><step-title>Read reference and inspect MongoDB setup</step-title><step-content>Read `references/316-frameworks-spring-mongodb-migrations-mongock.md` and inspect `pom.xml`, Spring Boot version, MongoDB configuration, and existing `@315-frameworks-spring-mongodb` persistence patterns.</step-content></step>
<step number="2"><step-title>Choose runner, driver, and execution policy</step-title><step-content>Select Mongock coordinates compatible with the active Spring Data MongoDB generation, configure migration scan packages, and decide startup vs controlled-job execution.</step-content></step>
<step number="3"><step-title>Apply framework-aligned migrations</step-title><step-content>Implement/refactor `@ChangeUnit` classes with idempotent operations, explicit ordering, rollback hooks, and safe lock/transaction settings.</step-content></step>
<step number="4"><step-title>Run verification and report results</step-title><step-content>Execute build/tests, including Testcontainers-backed MongoDB migration checks where feasible, and summarize outcomes and follow-up risks.</step-content></step>
</steps>
</prompt>
53 changes: 53 additions & 0 deletions skills-generator/src/main/resources/skill-indexes/416-skill.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?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="416-frameworks-quarkus-mongodb-migrations-mongock">
<metadata>
<author>Juan Antonio Breña Moral</author>
<version>0.15.0</version>
<license>Apache-2.0</license>
<description>Use when you need to add or review Mongock MongoDB data migrations in a Quarkus application — including the Quarkiverse Mongock extension, Quarkus MongoDB client configuration, migrate-at-start, @ChangeUnit classes, lock/transaction settings, and Quarkus test verification. This should trigger for requests such as Add Mongock migrations in Quarkus; Configure quarkus-mongock; Review Quarkus MongoDB data migrations.</description>
</metadata>

<title>Quarkus - MongoDB migrations (Mongock)</title>
<goal><![CDATA[
Apply Mongock migration guidelines for Quarkus and Quarkus MongoDB client/Panache Mongo.

**What is covered in this Skill?**

- Quarkiverse `quarkus-mongock` extension and Quarkus MongoDB client setup
- `quarkus.mongock.*` configuration, including `migrate-at-start`
- Code-first `@ChangeUnit` migrations with `@Execution` and rollback hooks
- Locking, idempotency, transaction limits, and default-client constraints
- Quarkus tests with Dev Services or Testcontainers MongoDB
- Coordination with `@415-frameworks-quarkus-mongodb`

**Scope:** Apply recommendations based on the reference rules and good/bad examples.
]]></goal>

<constraints>
<constraints-description>Compile before Mongock or MongoDB migration changes; 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 good/bad patterns</constraint>
<constraint>**EDGE CASE**: If the application uses multiple MongoDB clients, verify Quarkiverse Mongock support before applying a default-client migration design</constraint>
</constraint-list>
</constraints>

<triggers>
<trigger-list>
<trigger>Add Mongock migrations in Quarkus</trigger>
<trigger>Configure quarkus-mongock</trigger>
<trigger>Review Quarkus MongoDB data migrations</trigger>
</trigger-list>
</triggers>

<steps>
<step number="1"><step-title>Read reference and inspect MongoDB setup</step-title><step-content>Read `references/416-frameworks-quarkus-mongodb-migrations-mongock.md` and inspect `pom.xml`, Quarkus MongoDB configuration, and existing `@415-frameworks-quarkus-mongodb` persistence patterns.</step-content></step>
<step number="2"><step-title>Choose extension and execution policy</step-title><step-content>Configure `quarkus-mongock`, MongoDB connection settings, migration scan behavior, and startup vs explicit `MongockFactory` execution.</step-content></step>
<step number="3"><step-title>Apply framework-aligned migrations</step-title><step-content>Implement/refactor `@ChangeUnit` classes with idempotent operations, explicit ordering, rollback hooks, and safe lock/transaction settings.</step-content></step>
<step number="4"><step-title>Run verification and report results</step-title><step-content>Execute build/tests, including Quarkus tests with Dev Services or Testcontainers MongoDB where feasible, and summarize outcomes and follow-up risks.</step-content></step>
</steps>
</prompt>
53 changes: 53 additions & 0 deletions skills-generator/src/main/resources/skill-indexes/516-skill.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?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="516-frameworks-micronaut-mongodb-migrations-mongock">
<metadata>
<author>Juan Antonio Breña Moral</author>
<version>0.15.0</version>
<license>Apache-2.0</license>
<description>Use when you need to add or review Mongock MongoDB data migrations in a Micronaut application — including Mongock runner/driver selection, Micronaut bean wiring, migration scan packages, @ChangeUnit classes, lock/transaction settings, and Testcontainers verification. This should trigger for requests such as Add Mongock migrations in Micronaut; Review Micronaut MongoDB data migrations; Configure Mongock change units with Micronaut Data MongoDB.</description>
</metadata>

<title>Micronaut - MongoDB migrations (Mongock)</title>
<goal><![CDATA[
Apply Mongock migration guidelines for Micronaut and Micronaut Data MongoDB.

**What is covered in this Skill?**

- Mongock runner/driver selection for Micronaut projects
- Micronaut bean wiring for MongoDB client access and controlled migration execution
- Code-first `@ChangeUnit` migrations with `@Execution` and rollback hooks
- Locking, idempotency, transaction limits, and startup/runtime trade-offs
- Integration tests with `@MicronautTest` and Testcontainers MongoDB
- Coordination with `@515-frameworks-micronaut-mongodb`

**Scope:** Apply recommendations based on the reference rules and good/bad examples.
]]></goal>

<constraints>
<constraints-description>Compile before Mongock or MongoDB migration changes; 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 good/bad patterns</constraint>
<constraint>**EDGE CASE**: If a Micronaut-specific Mongock runner is unavailable or incompatible, use an explicit standalone runner bean/job and document that trade-off</constraint>
</constraint-list>
</constraints>

<triggers>
<trigger-list>
<trigger>Add Mongock migrations in Micronaut</trigger>
<trigger>Review Micronaut MongoDB data migrations</trigger>
<trigger>Configure Mongock change units with Micronaut Data MongoDB</trigger>
</trigger-list>
</triggers>

<steps>
<step number="1"><step-title>Read reference and inspect MongoDB setup</step-title><step-content>Read `references/516-frameworks-micronaut-mongodb-migrations-mongock.md` and inspect `pom.xml`, Micronaut MongoDB configuration, and existing `@515-frameworks-micronaut-mongodb` persistence patterns.</step-content></step>
<step number="2"><step-title>Choose runner, driver, and execution policy</step-title><step-content>Select compatible Mongock coordinates, wire the runner through Micronaut beans, configure migration scan packages, and decide startup vs controlled-job execution.</step-content></step>
<step number="3"><step-title>Apply framework-aligned migrations</step-title><step-content>Implement/refactor `@ChangeUnit` classes with idempotent operations, explicit ordering, rollback hooks, and safe lock/transaction settings.</step-content></step>
<step number="4"><step-title>Run verification and report results</step-title><step-content>Execute build/tests, including `@MicronautTest` with Testcontainers MongoDB where feasible, and summarize outcomes and follow-up risks.</step-content></step>
</steps>
</prompt>
Loading
Loading