Pure canonical intent and reading packet domain model for specification-driven workflows
pub(open) trait IntentAdapter {
fn adapter_id(Self) -> AdapterId
fn project(Self, workspace_urn~ : String, files : ReadOnlyArray[(DocumentPath, String)]) -> IntentProjection
}pub suberror DocumentPathError {
InvalidDocumentPath(input~ : String, rule~ : DocumentPathRule)
} derive(Eq, Debug)pub suberror IntentIdError {
InvalidIntentId(input~ : String, rule~ : IntentIdRule)
} derive(Eq, Debug)pub suberror IntentTitleError {
InvalidIntentTitle(input~ : String, rule~ : IntentTitleRule)
} derive(Eq, Debug)fn DocumentInput::DocumentInput(role~ : ArtifactRole, title~ : IntentTitle, path~ : DocumentPath, summary? : String, source_lines? : Array[String], requirements? : Array[RequirementDelta], tasks? : Array[TaskItem]) -> DocumentInputimpl Show for DocumentPathpub struct FnIntentAdapter {
// private fields
}impl IntentAdapter for FnIntentAdapterfn project(self : FnIntentAdapter, workspace_urn~ : String, files : ReadOnlyArray[(DocumentPath, String)]) -> IntentProjectionfn FnIntentAdapter::FnIntentAdapter(id~ : AdapterId, run : (String, ReadOnlyArray[(DocumentPath, String)]) -> IntentProjection) -> FnIntentAdapterfn IntentDiagnostic::IntentDiagnostic(kind~ : IntentDiagnosticKind, path? : DocumentPath?, message~ : String) -> IntentDiagnosticpub(all) enum IntentDiagnosticKind {
MissingArtifact(ArtifactRole)
ParseProblem(String)
EmptySpec
DuplicateId(IntentId)
} derive(Eq, Debug)fn IntentItem::IntentItem(id~ : IntentId, slug~ : String, title~ : IntentTitle, adapter~ : AdapterId, stage~ : StageId, status~ : IntentStatus, origin_path~ : DocumentPath, packet~ : ReadingPacket) -> IntentItemfn IntentProjection::IntentProjection(items? : Array[IntentItem], specs? : Array[PacketDocument], diagnostics? : Array[IntentDiagnostic]) -> IntentProjectionimpl Show for IntentTitlefn RequirementDelta::RequirementDelta(kind~ : RequirementDeltaKind, title~ : IntentTitle, text~ : String, scenarios? : Array[ScenarioEntry]) -> RequirementDeltafn ScenarioEntry::ScenarioEntry(title~ : IntentTitle, when_text~ : String, then_text~ : String) -> ScenarioEntryfn run_adapters(adapters : Array[&IntentAdapter], workspace_urn~ : String, files : ReadOnlyArray[(DocumentPath, String)]) -> IntentProjectionInstall
Download zipPure canonical intent and reading packet domain model for specification-driven workflows