context-service-guide
Skill1 starsChanged 7 months agoMITView on GitHub
Navigate and understand any legacy cpp-context-* WildFly/Maven service. LEGACY ONLY — must not be applied to new Spring Boot work. Use when onboarding to a context service, exploring its modules, or understanding its CQRS structure and integrations.
In this repository15 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- api-contract-checkSkill
- architecture-designSkill
- context-scaffoldSkill
- cpp-test-authoringSkill
- dependency-auditSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- pipeline-debugSkill
- review-prSkill
- springboot-api-from-templateSkill
- springboot-service-from-templateSkill
- terraform-validateSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Read these files in parallel to build a complete picture:
- Very specific: line 104
Look in *-event-sources for @Handles annotations or event handler methods — these show which domain events from other contexts trigger …
- Very specific: line 107
Check for *InterceptorChainProvider.java — custom interceptor chains may override default audit/auth behaviour.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
⚠️ Legacy WildFly context services only. The patterns in this skill —
cpp-context-*Maven multi-modules,-command-api/-query-api/-domain-event, RAML, custom CQRS plumbing,subscriptions-descriptor.yaml— are WildFly-era patterns and must not be applied to new Spring Boot services. They exist here to help engineers onboard to existing services.For new Spring Boot services, use
skills/springboot-service-from-template/. For new HMCTS Marketplace API specs, useskills/springboot-api-from-template/. Cross-pollinating these patterns into a Spring Boot service is a design regression — the master source for Spring Boot is the HMCTS template (seecontext/tech-stack.md).
Context Service Guide
Provides a structured walkthrough of any CP context service repository to help developers quickly understand its purpose, structure, integrations, and development workflow.
When to Use
- User asks to "explain this context service", "walk me through this repo", "what does this service do"
- User is new to a
cpp-context-*repo and wants to understand it - User asks about a service's domain events, commands, queries, or integrations
Process
Step 1: Identify the Context Service
Determine which cpp-context-* repo the user is asking about. If they're in a subdirectory, resolve to the repo root.
Step 2: Read Key Files
Read these files in parallel to build a complete picture:
pom.xml(root) — parent POM, modules list, properties, dependency versionsREADME.md— if present, provides an overview*-domain/*-domain-event/src/main/resources/json/schema/— domain event schemas reveal what the service publishes*-command/*-command-api/src/raml/— command API RAML definitions reveal what operations the service accepts*-query/*-query-api/src/raml/— query API definitions reveal what data the service exposes*-viewstore-liquibase/— Liquibase changelogs reveal the read-model database schema*-event-sources/— event source configurations reveal what events from other contexts this service subscribes to
Step 3: Map Integrations
From the POM dependencies and event sources, identify:
- Upstream contexts — which other context services publish events this service consumes
- Downstream contexts — which contexts consume this service's domain events
- Shared components used — audit, auth, reference data, file service, notifications, etc.
- External systems — any SOAP/REST integrations with systems outside CP
Step 4: Identify Module Structure
Map the standard CQRS module layout:
| Module | Purpose | Key classes to look at |
-command-api | Command definitions | RAML files, JSON schemas |
-command-handler | Command processing | *CommandHandler.java, *Aggregate.java |
-query-api | Query definitions | RAML files |
-query-handler | Query processing | *QueryHandler.java |
-domain-event | Domain events | JSON schemas in resources |
-domain-value-schema | Value objects | JSON schemas |
-event-sources | Event subscriptions | *EventSource.java |
-viewstore | JPA read models | *Entity.java, *Repository.java |
-viewstore-liquibase | DB migrations | db/changelog/ XML/YAML files |
-service | App orchestration | WildFly deployment descriptors |
-integration-test | Integration tests | Cucumber features, step definitions |
Step 5: Generate Summary
Output a structured summary:
## [Service Name]
### Purpose
One paragraph describing what this bounded context manages.
### Domain Events Published
- event.name.one — description
- event.name.two — description
### Commands Accepted
- command.name.one — description
### Queries Exposed
- query.name.one — description
### Upstream Dependencies
- cpp-context-X — consumes events from...
### Downstream Consumers
- cpp-context-Y — publishes events consumed by...
### Database
- Schema summary from Liquibase
### Development
- mvn clean install
- mvn test -pl {module}
- Integration tests: mvn verify -pl {name}-integration-testCommon Module Patterns
Event Source Subscription
Look in *-event-sources for @Handles annotations or event handler methods — these show which domain events from other contexts trigger processing in this service.
Interceptor Chain
Check for *InterceptorChainProvider.java — custom interceptor chains may override default audit/auth behaviour. If absent, the service uses the framework default (audit + access control on all APIs).
View Store Projections
The -event-sources module typically contains projection logic that transforms domain events into viewstore entities. This is the CQRS projection — the bridge between the event store and the read model.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

