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
32 changes: 32 additions & 0 deletions packages/decision-pipeline/src/policy-adapter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Policy Decision Adapter

## Purpose

The policy decision adapter creates the translation boundary between policy evaluation and the decision pipeline.

## Responsibility

The adapter converts policy output into a standardized Decision contract.

```
Policy Result
|
v
Policy Decision Adapter
|
v
Decision
```

## Non-Responsibilities

The adapter does not:

- Define policy rules
- Evaluate domain events
- Execute actions
- Communicate with external systems

## Design Goal

Policies should remain independent from the pipeline while decisions remain consistent across future implementations.
11 changes: 11 additions & 0 deletions packages/decision-pipeline/src/policy-adapter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { Decision } from './decision';

/**
* Boundary adapter between policy evaluation and decision output.
*
* This layer translates policy results into pipeline decisions.
* It does not own policy rules or execute actions.
*/
export interface PolicyDecisionAdapter {
adapt(policyResult: unknown): Promise<Decision>;
}