feat(glossary): add step 21 smart navigation
All checks were successful
SMOKE / smoke (push) Successful in 13s
CI / build-and-anchors (push) Successful in 1m4s
CI / build-and-anchors (pull_request) Successful in 35s

This commit is contained in:
2026-04-26 13:03:45 +02:00
parent 689619d14d
commit 9f88112aca
45 changed files with 1020 additions and 112 deletions

View File

@@ -47,6 +47,36 @@ const archicratIa = defineCollection({
})
});
const glossaryNavigationFlowSchema = z.object({
label: z.string().min(1),
primaryNext: z.string().min(1).optional(),
primaryReason: z.string().min(1).optional(),
});
const glossaryNavigationSchema = z.object({
primaryNext: z.string().min(1).optional(),
primaryReason: z.string().min(1).optional(),
paths: z
.object({
understand: z.array(z.string().min(1)).default([]),
deepen: z.array(z.string().min(1)).default([]),
compare: z.array(z.string().min(1)).default([]),
apply: z.array(z.string().min(1)).default([]),
})
.default({
understand: [],
deepen: [],
compare: [],
apply: [],
}),
flows: z
.record(z.string(), glossaryNavigationFlowSchema)
.default({}),
relationWeights: z
.record(z.string(), z.number().int().nonnegative())
.default({}),
});
// Glossaire (référentiel terminologique)
const glossaire = defineCollection({
type: "content",
@@ -100,7 +130,8 @@ const glossaire = defineCollection({
level: z.enum(["fondamental", "intermediaire", "avance"]),
related: z.array(z.string().min(1)).default([]),
opposedTo: z.array(z.string().min(1)).default([]),
seeAlso: z.array(z.string().min(1)).default([])
seeAlso: z.array(z.string().min(1)).default([]),
navigation: glossaryNavigationSchema.optional()
})
});