d26f20c316
Root Child DOX Index assembled, plus a per-module AGENTS.md across the tree (core/*, infrastructure/*, apps/*, testing/*, and docs/examples/frontend/etc), each following the DOX section shape: Purpose, Ownership, Local Contracts, Work Guidance, Verification, Child DOX Index.
38 lines
1.6 KiB
Markdown
38 lines
1.6 KiB
Markdown
# core/artifacts — AGENTS.md
|
|
|
|
## Purpose
|
|
|
|
Structured output model for workflow artifacts: defines artifact kinds, tracks lineage and relationships between artifacts, and provides the projector/reducer/repository stack for artifact state.
|
|
|
|
## Ownership
|
|
|
|
CORREX kernel team.
|
|
|
|
## Local Contracts
|
|
|
|
- `Artifact` — core domain type, carries `ArtifactKind`, payload, and metadata.
|
|
- `ArtifactKind` / `ArtifactKindRegistry` — extensible registry; built-in kinds: `ConfigArtifactKind`, `FileWrittenKind`, `ProcessResultKind`.
|
|
- `ArtifactLineage` / `ArtifactRelationship` / `ArtifactRelationshipType` — DAG of artifact provenance.
|
|
- `ArtifactState` rebuilt from events via `DefaultArtifactReducer` (in `core:events` `ArtifactEvents.kt`) + `ArtifactProjector`.
|
|
- `TypedArtifactSlot<T>` — typed accessor for well-known artifact slots.
|
|
- `ArtifactSerializationModule` — registers artifact polymorphic types; must be included in serialization setup.
|
|
- Hard Invariant #1: artifact state is always rebuilt from events. `ArtifactRepository` wraps `EventReplayer<ArtifactState>`.
|
|
|
|
## Work Guidance
|
|
|
|
- Follow the standard Events→State→Reducer→Projector→Repository pattern (see `core/AGENTS.md`).
|
|
- New artifact kinds must be registered in `ArtifactKindRegistry` and their payloads in `ArtifactSerializationModule`.
|
|
- `JsonSchema` is a local utility for schema representation; do not reach into external schema libraries.
|
|
|
|
## Verification
|
|
|
|
```bash
|
|
./gradlew :core:artifacts:test --rerun-tasks
|
|
```
|
|
|
|
Reducer tests in `testing/projections/ArtifactReducerTest.kt`.
|
|
|
|
## Child DOX Index
|
|
|
|
No child AGENTS.md (leaf module).
|