feat(kernel,artifacts): inject artifact-kind vocabulary into architect context
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import com.correx.core.artifacts.kind.ConfigArtifactKind
|
||||
import com.correx.core.artifacts.kind.FileWrittenKind
|
||||
import com.correx.core.artifacts.kind.JsonSchema
|
||||
import com.correx.core.artifacts.kind.TypedArtifactSlot
|
||||
import com.correx.core.context.model.ContextLayer
|
||||
import com.correx.core.context.model.EntryRole
|
||||
@@ -8,6 +10,7 @@ import com.correx.core.events.types.ArtifactId
|
||||
import com.correx.core.events.types.SessionId
|
||||
import com.correx.core.events.types.StageId
|
||||
import com.correx.core.events.types.TransitionId
|
||||
import com.correx.core.kernel.orchestration.buildArtifactKindVocabularyEntry
|
||||
import com.correx.core.kernel.orchestration.buildProjectProfileEntry
|
||||
import com.correx.core.kernel.orchestration.buildRetryFeedbackEntry
|
||||
import com.correx.core.kernel.orchestration.criticArtifactIds
|
||||
@@ -94,6 +97,18 @@ class ContextFeedbackTest {
|
||||
assertEquals(setOf(ArtifactId("review_report")), criticArtifactIds(events, graph, StageId("implement")))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `vocabulary entry enumerates kind ids and flags llm-emitted`() {
|
||||
val plain = ConfigArtifactKind(id = "plan", schema = JsonSchema(type = "object"), llmEmitted = false)
|
||||
val emitted = ConfigArtifactKind(id = "report", schema = JsonSchema(type = "object"), llmEmitted = true)
|
||||
val entry = buildArtifactKindVocabularyEntry(listOf(plain, emitted))
|
||||
assertEquals("artifactKindVocabulary", entry.sourceType)
|
||||
assertEquals(ContextLayer.L1, entry.layer)
|
||||
assertEquals(EntryRole.SYSTEM, entry.role)
|
||||
assertTrue(entry.content.contains("plan"), "content should contain plain id: ${entry.content}")
|
||||
assertTrue(entry.content.contains("report (llm-emitted)"), "content should flag llm-emitted: ${entry.content}")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `no refinement events yields empty set`() {
|
||||
assertTrue(criticArtifactIds(emptyList(), graphWith(), StageId("implement")).isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user