feat: add ontology material ingestion

This commit is contained in:
user
2026-04-26 17:49:35 +09:00
parent a413f1ef15
commit 4936cdf4c9
19 changed files with 766 additions and 13 deletions

View File

@@ -0,0 +1,38 @@
package ontology
import "tutor/internal/workflows"
var knownConcepts = []knownConcept{
{
Ref: workflows.ConceptRef{ID: "http-idempotency", Label: "HTTP idempotency", Track: "backend-developer"},
Keywords: []string{"idempotent", "idempotency", "retry", "retries"},
},
{
Ref: workflows.ConceptRef{ID: "database-indexes", Label: "Database indexes", Track: "backend-developer"},
Keywords: []string{"index", "indexes", "database index", "query plan"},
},
{
Ref: workflows.ConceptRef{ID: "cache-invalidation", Label: "Cache invalidation", Track: "backend-developer"},
Keywords: []string{"cache", "invalidation", "ttl"},
},
{
Ref: workflows.ConceptRef{ID: "transactions", Label: "Transactions", Track: "backend-developer"},
Keywords: []string{"transaction", "transactions", "atomic", "rollback"},
},
}
var prerequisiteRules = []prerequisiteRule{
{FromID: "http-idempotency", ToID: "transactions"},
{FromID: "transactions", ToID: "cache-invalidation"},
{FromID: "database-indexes", ToID: "cache-invalidation"},
}
type knownConcept struct {
Ref workflows.ConceptRef
Keywords []string
}
type prerequisiteRule struct {
FromID string
ToID string
}