# Com / Optage / Kopt / Ekk

## Overview

The `com.optage.kopt.ekk` package provides the primary and secondary contract processing layer within the OPTAGE KOPT system. It contains two fixture classes — [EKK0301A010](src/main/java/com/optage/kopt/ekk/EKK0301A010.java) and [EKK0301A020](src/main/java/com/optage/kopt/ekk/EKK0301A020.java) — that serve as auto-generated scaffolding for SPEC-SCOPED-WIKI tests. These classes expose a `process()` entry point each, with EKK0301A010 additionally acting as a bridge to external trigger logic via [KKW0100B001](src/main/java/com/optage/kopt/kkw/) in the `com.optage.kopt.kkw` package.

## Key Classes and Interfaces

### EKK0301A010 — Primary Contract Processor

[Source: EKK0301A010.java](src/main/java/com/optage/kopt/ekk/EKK0301A010.java)

This is the primary contract processing class in the EKK module. It exposes two public methods:

- **`process()`** — The main entry point for contract processing. The implementation is a placeholder stub (no-op body) reserved for future contract-processing logic. This method serves as the test harness hook that SPEC-SCOPED-WIKI tests target.

- **`notify()`** — Delegates to the external trigger system. It instantiates a new [KKW0100B001](src/main/java/com/optage/kopt/kkw/) object from the `com.optage.kopt.kkw` package and calls its `trigger()` method. This appears to wire EKK contract events into the broader OPTAGE notification or event-propagation pipeline.

### EKK0301A020 — Secondary Contract Processor

[Source: EKK0301A020.java](src/main/java/com/optage/kopt/ekk/EKK0301A020.java)

This is the secondary contract processing class. It provides a single public method:

- **`process()`** — Entry point for secondary EKK contract handling. Like EKK0301A010, the implementation is a placeholder stub intended for future business logic. It is distinguished from EKK0301A010 to allow independent test coverage and future divergence of processing paths.

## How It Works

A typical flow through this module looks as follows:

```mermaid
sequenceDiagram
    participant Caller
    participant A010 as EKK0301A010
    participant KKW as KKW0100B001

    Caller->>A010: process()
    Note over A010: Stub — placeholder for contract logic
    Caller->>A010: notify()
    A010->>KKW: new KKW0100B001()
    A010->>KKW: trigger()
```

1. An external caller invokes `process()` on either EKK0301A010 or EKK0301A020. Both are currently no-op stubs, waiting for business logic to be implemented.
2. When notification is required, `EKK0301A010.notify()` creates a fresh instance of `KKW0100B001` and calls `trigger()`, pushing the event outward to the `com.optage.kopt.kkw` subsystem.

## Dependencies and Integration

| Dependency | Type | Direction | Description |
|---|---|---|---|
| `com.optage.kopt.kkw` | External package | EKK → KKW | EKK0301A010 depends on `KKW0100B001` for triggering external events |

The module has no child sub-packages. Its only external dependency is on the `com.optage.kopt.kkw` package, which it uses to dispatch notifications through the KKW trigger mechanism.

## Architecture

```mermaid
flowchart TD
    EKK["EKK Module<br/>Contract processing layer"]
    A010["EKK0301A010<br/>Primary contract processor"]
    A020["EKK0301A020<br/>Secondary contract processor"]
    KKW["KKW0100B001<br/>External trigger class<br/>(com.optage.kopt.kkw)"]

    A010 --> KKW
    EKK --> A010
    EKK --> A020
```

## Notes for Developers

- Both classes are **auto-generated fixture classes for SPEC-SCOPED-WIKI tests**. Their current `process()` bodies are stubs (single-line comments). Do not treat the empty bodies as the final implementation — they are placeholders awaiting real business logic.
- `EKK0301A010.notify()` creates a **new instance** of `KKW0100B001` on each call rather than reusing a singleton. If `KKW0100B001` carries state, be aware that each `notify()` call gets a fresh instance.
- The naming convention (`EKK` prefix + numeric suffix) follows a spec-identified pattern (`0301A`). If you add new classes to this package, follow the same `EKK<spec_id><variant>` convention.
- The module has no child packages and no public fields, constructors, or constants — it is a purely procedural fixture package.
