a-pavithraa/springboot-skills-marketplace / plugins/springboot-architecture/skills/spring-boot-team-harness/assets/project-skills/add-module
add-module
VerifiedAdds a new application module to this Spring Modulith project with the package layout the ModuleBoundariesTests gate expects, and a module-scoped integration test. Use when the user asks for a new module, new top-level package, bounded context, or feature area that doesn't belong in an existing module.
Add a module
Each direct subpackage of {{BASE_PACKAGE}} is a module. {{VERIFY}} fails if another module reaches into its nested packages or if modules form a cycle.
- Pick a name from the domain language: the glossary term for the capability (
GLOSSARY.mdorCONTEXT.md), such asbillingorticketing, not a vendor (zendesk), a layer (billingservice) orcommon. If the glossary has no such term, agree one with the user and add it there first: one line saying what it means, no implementation detail. Check that no existing module owns it; theModulessection ofAGENTS.mdlists them. - Create the layout:
Keep the top-level package small. Entities and repositories never go in it.{{BASE_PACKAGE}}.<module> public API: the service other modules call, the records it takes and returns, its events {{BASE_PACKAGE}}.<module>.internal everything else: implementation, entities, repositories, controllers - Let other modules talk to it in one of two ways only: call a type in its top-level package, or listen for an event it publishes (
@ApplicationModuleListener). Prefer events when the caller doesn't need an answer. - Add
package-info.javawith@ApplicationModule(allowedDependencies = {...}), listing exactly the modules its code calls, each with the user's agreement. The build fails on any other dependency and on an entry nothing uses, and IntelliJ IDEA flags the first in the editor. Once the file exists, changing those rules is for the user: the harness refuses the edit. - Add
src/test/java/{{BASE_PATH}}/<module>/<Module>ModuleTests.java, annotated@ApplicationModuleTest(verifyAutomatically = false), which starts only this module.ModuleBoundariesTestschecks the boundaries, honouring the record of older violations; a module test that checked them too would fail on those. Test the module through its public API. - Add one line for the module to the
Modulessection ofAGENTS.md. - Run
{{VERIFY}}. If it fails, fix what it names and run it again until it passes. A dependency the build rejects is a design question: route it through the other module's top-level package or an event, or ask the user to allow it; don't widenallowedDependencieson your own.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |