@evolith/core-domain 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +102 -0
  3. package/package.json +4 -2
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 BeyondNet Code
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,102 @@
1
+ # @evolith/core-domain
2
+
3
+ > Domain and application logic for the Evolith governance framework.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@evolith/core-domain)](https://www.npmjs.com/package/@evolith/core-domain)
6
+ [![license](https://img.shields.io/npm/l/@evolith/core-domain)](./LICENSE)
7
+
8
+ ## Overview
9
+
10
+ `@evolith/core-domain` is the heart of the Evolith architecture governance framework. It provides the **domain model, application use-cases, and rule evaluation engine** used by all Evolith surfaces (Core API, MCP Server, CLI).
11
+
12
+ Built on **Domain-Driven Design** principles with hexagonal architecture — all dependencies point inward; infrastructure is injected via ports.
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install @evolith/core-domain
18
+ ```
19
+
20
+ ## What's inside
21
+
22
+ | Layer | What it provides |
23
+ |-------|-----------------|
24
+ | **Domain** | Phase, Gate, Verdict, Satellite Manifest, Workflow Definition, RBAC, Audit entities |
25
+ | **Application** | `EvaluateGateUseCase`, `ValidateBlueprintUseCase`, `ValidateWorkflowUseCase`, Architecture Drift detection, Satellite evaluation pipeline |
26
+ | **Ports** | `IFileSystem`, `ILogger`, `IConfigParser`, `IRulesetRepository`, `IEventBus` — inject your own adapters |
27
+ | **Gates** | Phase-gate validator, composable validation engine, OPA/Native dual-engine parity |
28
+
29
+ ## Usage
30
+
31
+ ```ts
32
+ import { EvaluateGateUseCase } from '@evolith/core-domain/application/use-cases';
33
+ import { loadDefaultWorkflow } from '@evolith/core-domain/domain/services';
34
+
35
+ // Load the default SDLC workflow
36
+ const workflow = loadDefaultWorkflow();
37
+
38
+ // Evaluate a phase gate
39
+ const useCase = new EvaluateGateUseCase(rulesetRepo, fileSystem, logger);
40
+ const result = await useCase.execute({ projectId, phase, artifacts });
41
+ ```
42
+
43
+ > **Runtime requirement:** set `WORKSPACE_ROOT` to the directory containing the `rulesets/` folder.
44
+ > In Docker: `ENV WORKSPACE_ROOT=/app/corpus`. Locally: the monorepo root is used automatically.
45
+
46
+ ## Key exports
47
+
48
+ ```ts
49
+ // Domain entities
50
+ import { Phase, Verdict, GateDecision } from '@evolith/core-domain';
51
+
52
+ // Use cases
53
+ import { EvaluateGateUseCase } from '@evolith/core-domain/application/use-cases';
54
+ import { ValidateBlueprintUseCase } from '@evolith/core-domain/application/use-cases';
55
+ import { ValidateWorkflowUseCase } from '@evolith/core-domain/application/use-cases';
56
+
57
+ // Validators
58
+ import { PhaseGateValidatorService } from '@evolith/core-domain/application/validators';
59
+ import { ComposableValidationEngine } from '@evolith/core-domain/application/validators/modes';
60
+
61
+ // Services
62
+ import { loadDefaultWorkflow } from '@evolith/core-domain/domain/services';
63
+ import { SatelliteEvaluationPipeline } from '@evolith/core-domain/application/services';
64
+
65
+ // Ports (interfaces for your adapters)
66
+ import type { IFileSystem, ILogger } from '@evolith/core-domain/domain/interfaces';
67
+ import type { IRulesetRepository } from '@evolith/core-domain';
68
+ ```
69
+
70
+ ## Environment variables
71
+
72
+ | Variable | Default | Description |
73
+ |----------|---------|-------------|
74
+ | `WORKSPACE_ROOT` | *(monorepo root)* | Base directory containing `rulesets/` |
75
+
76
+ ## Architecture
77
+
78
+ ```
79
+ @evolith/core-domain
80
+ ├── domain/ # Entities, value objects, ports (no external deps)
81
+ │ ├── entities/ # Phase, Gate, Verdict, Satellite...
82
+ │ ├── ports/ # IFileSystem, ILogger, IRulesetRepository...
83
+ │ └── services/ # Workflow loading, domain services
84
+ ├── application/ # Use cases, validators, pipelines
85
+ │ ├── use-cases/ # EvaluateGate, ValidateBlueprint, ValidateWorkflow
86
+ │ ├── validators/ # PhaseGateValidator, ComposableValidationEngine
87
+ │ └── services/ # SatelliteEvaluationPipeline, AuditService
88
+ └── infrastructure/ # In-memory adapters (for testing)
89
+ ├── events/ # InMemoryEventBus
90
+ └── audit/ # InMemoryAuditRepository
91
+ ```
92
+
93
+ ## Part of the Evolith suite
94
+
95
+ | Package | Role |
96
+ |---------|------|
97
+ | **`@evolith/core-domain`** | Domain logic and rule engine ← you are here |
98
+ | [`@evolith/infra-providers`](https://www.npmjs.com/package/@evolith/infra-providers) | Infrastructure adapters (filesystem, logger, config) |
99
+
100
+ ## License
101
+
102
+ MIT — Copyright © 2026 BeyondNet Code. See [LICENSE](./LICENSE) for details.
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@evolith/core-domain",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Shared Domain and Application logic for Evolith Core",
5
+ "license": "MIT",
5
6
  "main": "dist/index.js",
6
7
  "types": "dist/index.d.ts",
7
8
  "exports": {
@@ -48,7 +49,8 @@
48
49
  },
49
50
  "files": [
50
51
  "dist",
51
- "README.md"
52
+ "README.md",
53
+ "LICENSE"
52
54
  ],
53
55
  "publishConfig": {
54
56
  "access": "public",