1.7 KiB
1.7 KiB
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, carriesArtifactKind, payload, and metadata.ArtifactKind/ArtifactKindRegistry— extensible registry; built-in kinds:ConfigArtifactKind,FileWrittenKind,ProcessResultKind.ArtifactLineage/ArtifactRelationship/ArtifactRelationshipType— DAG of artifact provenance.ArtifactStaterebuilt from events viaDefaultArtifactReducer(incore:eventsArtifactEvents.kt) +ArtifactProjector.TypedArtifactSlot<T>— typed accessor for well-known artifact slots.ArtifactSerializationModule— registers artifact polymorphic types; must be included in serialization setup.KindContractTable.toolchainFormaps checked-in Node and JVM kinds to the execution-gate command namespace.- Hard Invariant #1: artifact state is always rebuilt from events.
ArtifactRepositorywrapsEventReplayer<ArtifactState>.
Work Guidance
- Follow the standard Events→State→Reducer→Projector→Repository pattern (see
core/AGENTS.md). - New artifact kinds must be registered in
ArtifactKindRegistryand their payloads inArtifactSerializationModule. JsonSchemais a local utility for schema representation; do not reach into external schema libraries.
Verification
./gradlew :core:artifacts:test --rerun-tasks
Reducer tests in testing/projections/ArtifactReducerTest.kt.
Child DOX Index
No child AGENTS.md (leaf module).