-
Notifications
You must be signed in to change notification settings - Fork 0
Add Copilot skill for Akces Framework internal development #336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,374 @@ | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
| name: akces-framework-development | ||||||||||||||||||||||||||
| description: > | ||||||||||||||||||||||||||
| Guide for developing the Akces CQRS/Event Sourcing Framework internals. Use this skill when | ||||||||||||||||||||||||||
| working on the framework itself — modifying core modules (api, runtime, shared, client, | ||||||||||||||||||||||||||
| query-support, eventcatalog, agentic), the Kubernetes operator, or the build/release | ||||||||||||||||||||||||||
| infrastructure. Activate when asked about framework architecture, internal design, module | ||||||||||||||||||||||||||
| structure, Kafka integration, state management, schema handling, or contributing to the framework. | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Akces Framework — Internal Development Guide | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| This skill provides guidance for **developing the Akces Framework itself**, not for building | ||||||||||||||||||||||||||
| applications on top of it. If you are building Embabel-based AI agents that run on Akces, use the | ||||||||||||||||||||||||||
| `embabel-agent-framework` skill instead. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Technology Stack | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - **Java 25+** — uses modern Java features (records, sealed interfaces, pattern matching, virtual threads) | ||||||||||||||||||||||||||
| - **Apache Kafka 4.x** — KRaft mode (no ZooKeeper), exactly-once semantics, transactional producers | ||||||||||||||||||||||||||
| - **Spring Boot 4.x** — auto-configuration, dependency injection, Spring Kafka | ||||||||||||||||||||||||||
| - **Maven** — multi-module build, Bill of Materials (`bom/`), annotation processors | ||||||||||||||||||||||||||
| - **RocksDB** — embedded key–value store for aggregate state snapshots | ||||||||||||||||||||||||||
| - **Confluent Schema Registry** — Avro schema management for commands, events, and state | ||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JSON schema management
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in ae94fc8 — updated to "Kafka-backed schema registry — schemas are stored in the
|
||||||||||||||||||||||||||
| - **Confluent Schema Registry** — Avro schema management for commands, events, and state | |
| - **Kafka-backed schema registry** — schemas are stored in the `Akces-Schemas` topic and generated/validated as JSON Schema; protocol records use Protobuf serialization |
Copilot
AI
Apr 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Jackson note says to use tools.jackson and not com.fasterxml.jackson, but the codebase still uses com.fasterxml.jackson.annotation.* / jackson-annotations (notably in main/api). This should be clarified (e.g. tools.jackson for databind/core, com.fasterxml.jackson.annotation still used for annotations) to avoid misleading imports.
| - **Jackson 3.x** — JSON serialization via `tools.jackson` package (not `com.fasterxml.jackson`) | |
| - **Jackson 3.x** — use `tools.jackson` for core/databind JSON serialization APIs; `com.fasterxml.jackson.annotation` may still be used for annotations where the codebase depends on `jackson-annotations` (notably in `main/api`) |
Copilot
AI
Apr 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package names in the module tables use o.e.akces.*, but the actual packages in this repo are org.elasticsoftware.akces.*. Using the abbreviated prefix here is likely to confuse contributors searching/navigating the code (and the later task steps also reference o.e.akces.*).
| | `o.e.akces.aggregate` | `Aggregate<S>`, `AgenticAggregate<S>`, `AggregateState`, `MemoryAwareState`, `TaskAwareState`, `CommandHandlerFunction`, `EventSourcingHandlerFunction`, `EventHandlerFunction`, `EventBridgeHandlerFunction`, `UpcastingHandlerFunction`, `CommandType`, `DomainEventType`, `AggregateStateType`, `SchemaType` | | |
| | `o.e.akces.annotations` | `@AggregateInfo`, `@AgenticAggregateInfo`, `@CommandInfo`, `@DomainEventInfo`, `@AggregateStateInfo`, `@CommandHandler`, `@EventSourcingHandler`, `@EventHandler`, `@EventBridgeHandler`, `@UpcastingHandler`, `@PIIData`, `@AggregateIdentifier`, `@QueryModelInfo`, `@QueryModelEventHandler`, `@DatabaseModelInfo`, `@DatabaseModelEventHandler`, `@QueryModelStateInfo`, `@ReflectorInfo`, `@ReflectorEventHandler` | | |
| | `o.e.akces.commands` | `Command`, `CommandBus` interfaces | | |
| | `o.e.akces.events` | `DomainEvent`, `ErrorEvent` interfaces | | |
| | `o.e.akces.processmanager` | `ProcessManager<S, P>` interface | | |
| | `o.e.akces.query` | `QueryModel<S>`, `QueryModelState`, `DatabaseModel` | | |
| | `org.elasticsoftware.akces.aggregate` | `Aggregate<S>`, `AgenticAggregate<S>`, `AggregateState`, `MemoryAwareState`, `TaskAwareState`, `CommandHandlerFunction`, `EventSourcingHandlerFunction`, `EventHandlerFunction`, `EventBridgeHandlerFunction`, `UpcastingHandlerFunction`, `CommandType`, `DomainEventType`, `AggregateStateType`, `SchemaType` | | |
| | `org.elasticsoftware.akces.annotations` | `@AggregateInfo`, `@AgenticAggregateInfo`, `@CommandInfo`, `@DomainEventInfo`, `@AggregateStateInfo`, `@CommandHandler`, `@EventSourcingHandler`, `@EventHandler`, `@EventBridgeHandler`, `@UpcastingHandler`, `@PIIData`, `@AggregateIdentifier`, `@QueryModelInfo`, `@QueryModelEventHandler`, `@DatabaseModelInfo`, `@DatabaseModelEventHandler`, `@QueryModelStateInfo`, `@ReflectorInfo`, `@ReflectorEventHandler` | | |
| | `org.elasticsoftware.akces.commands` | `Command`, `CommandBus` interfaces | | |
| | `org.elasticsoftware.akces.events` | `DomainEvent`, `ErrorEvent` interfaces | | |
| | `org.elasticsoftware.akces.processmanager` | `ProcessManager<S, P>` interface | | |
| | `org.elasticsoftware.akces.query` | `QueryModel<S>`, `QueryModelState`, `DatabaseModel` | |
Copilot
AI
Apr 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The guidance 'Keep the module dependency-free (no Kafka, no Spring, no Jackson)' is inaccurate for main/api: it depends on spring-context and jackson-annotations (and uses com.fasterxml.jackson.annotation.* in the API types). Consider updating this to the real constraint (e.g. no Kafka/runtime deps, and only Jackson annotations).
| - Keep the module dependency-free (no Kafka, no Spring, no Jackson). | |
| - Keep the module free of Kafka and runtime implementation dependencies; only lightweight API-level dependencies such as Spring context support and Jackson annotations should be used here. |
Copilot
AI
Apr 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The partition lifecycle state list (STARTING → INITIALIZING → CATCHING_UP → PROCESSING → SHUTTING_DOWN) does not match the actual AggregatePartitionState enum (INITIALIZING, INITIALIZING_STATE, LOADING_GDPR_KEYS, LOADING_STATE, PROCESSING, SHUTTING_DOWN). This section should reflect the real state machine names to avoid confusion when debugging partition behavior.
| `STARTING` → `INITIALIZING` → `CATCHING_UP` → `PROCESSING` → `SHUTTING_DOWN` | |
| For agentic aggregates, there is an additional `INITIALIZING_STATE` step between `INITIALIZING` and `CATCHING_UP` for auto-creating singleton state. | |
| `INITIALIZING` → `INITIALIZING_STATE` → `LOADING_GDPR_KEYS` → `LOADING_STATE` → `PROCESSING` → `SHUTTING_DOWN` | |
| These names should be used as-is when correlating logs, metrics, and partition behavior during startup, state restoration, GDPR key loading, normal processing, and shutdown. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mention here that AgenticAggrates are singleton instances with only 1 partition per topic type (add same table as for normal Aggregates). Also mention that the Framework takes care of creating the initital state (base on a DomainEvent and EventSourcingHandler provided by implementing class)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expanded in ae94fc8 — added singleton enforcement details, auto-creation via getCreateDomainEvent() + @EventSourcingHandler(create = true) during INITIALIZING_STATE, and a Kafka topic table for AgenticAggregates (same structure as normal aggregates but always 1 partition).
Copilot
AI
Apr 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GDPR section says encryption keys are stored in a dedicated *-GDPRKeys topic. In the current implementation the keys are stored in the shared Akces-GDPRKeys topic (partitioned), not per-aggregate topic. Please update this to match the actual topic layout.
| - Encryption keys are per-aggregate, stored in a dedicated `*-GDPRKeys` Kafka topic. | |
| - Encryption keys are stored in the shared partitioned `Akces-GDPRKeys` Kafka topic. |
Copilot
AI
Apr 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The relative links in the Reference Links section point to ../../FRAMEWORK_OVERVIEW.md, ../../SERVICES.md, and ../../README.md, which resolves under .github/ (e.g. .github/FRAMEWORK_OVERVIEW.md) and does not exist. These links should go up one more level to the repo root (e.g. ../../../FRAMEWORK_OVERVIEW.md).
| - [FRAMEWORK_OVERVIEW.md](../../FRAMEWORK_OVERVIEW.md) — Detailed architecture documentation | |
| - [SERVICES.md](../../SERVICES.md) — Kubernetes services and deployment | |
| - [README.md](../../README.md) — Project overview and getting started | |
| - [FRAMEWORK_OVERVIEW.md](../../../FRAMEWORK_OVERVIEW.md) — Detailed architecture documentation | |
| - [SERVICES.md](../../../SERVICES.md) — Kubernetes services and deployment | |
| - [README.md](../../../README.md) — Project overview and getting started |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mention Protobuf 3.x for Internal Wire Protocol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in ae94fc8 — new bullet: "Protobuf 3.x — internal wire protocol for all protocol records (
ProtocolRecordSerde,SchemaRecordSerde) using Jackson'sjackson-dataformat-protobuf".