Fix Face artifact title link matching

This commit is contained in:
Meta Vens 2026-05-26 20:23:09 +01:00
commit 59932c41bb
3 changed files with 9 additions and 6 deletions

View file

@ -73,11 +73,13 @@ function findMentionedKnowledgebaseDocument(
const normalizedContent = normalizeReferenceText(content);
const markdownDocuments = documents
.filter((document) => document.path.toLowerCase().endsWith(".md"))
.map((document) => ({
document,
label: document.title?.trim() || basenameWithoutExtension(document.path),
}))
.filter((entry) => entry.label.length >= 10)
.flatMap((document) =>
[...new Set([
document.title?.trim(),
basenameWithoutExtension(document.path),
].filter((label): label is string => Boolean(label && label.length >= 10)))]
.map((label) => ({ document, label }))
)
.sort((left, right) => right.label.length - left.label.length);
return markdownDocuments.find((entry) =>

View file

@ -27,7 +27,7 @@ const documents: ArchivedSourceDocumentRecord[] = [
id: `AetheriaLore:${continuityPath}`,
repoName: "AetheriaLore",
path: continuityPath,
title: "Continuity Admissibility Finding",
title: continuityPath,
content: "",
normalizedContent: "",
indexedAt: "2026-05-26T00:00:00.000Z",

View file

@ -362,3 +362,4 @@
{"ts":"2026-05-26T18:03:47Z","type":"verification","status":"ok","note":"Added repo-artifact reference rule for Face public speech: when context is not immediately visible in Discord and not easily contained, the Face must reply to the visible anchor, summarize the subject, or include a public site URL / repo:path reference. nibu/libby/bifrost dry-run passed; Nibu's SAY now cites AetheriaLore:Aetheria/Worldbuilding/Post-Elysium/Reference/Continuity Admissibility Finding.md before discussing helm continuity, and model-output inspection reported zero warnings."}
{"ts":"2026-05-26T19:08:32Z","type":"verification","status":"ok","note":"Encoded Quartz/GameCult public URL rule for Face artifact references. AetheriaLore source paths under Aetheria/ should publish as https://aetheria.gamecult.org/<path-without-Aetheria-or-.md-with-spaces-hyphenated>, e.g. Continuity Admissibility Finding -> https://aetheria.gamecult.org/Worldbuilding/Post-Elysium/Reference/Continuity-Admissibility-Finding. Strict Nibu dry-run passed; parent Mind withheld SAY when the candidate line lacked the required artifact URL/reference, and model-output inspection reported zero warnings."}
{"ts":"2026-05-26T19:14:30Z","type":"implementation","status":"ok","note":"Moved repo Face artifact URL resolution out of Face/Mind prompts and into deterministic worker posting. Face/Mind now only require enough artifact identity for followability; apps/worker/src/repo-face-artifact-links.ts resolves explicit repo:path refs and clear indexed markdown titles to knowledgebase URLs, currently AetheriaLore -> https://aetheria.gamecult.org/<path>. Verified agents:repo-face-artifact-links:fixture and typecheck."}
{"ts":"2026-05-26T19:22:39Z","type":"verification","status":"ok","note":"Live archive check confirmed repo Face artifact link resolution against indexed AetheriaLore: 206 docs loaded, Continuity Admissibility Finding found, explicit AetheriaLore:path refs resolve inline to https://aetheria.gamecult.org/Worldbuilding/Post-Elysium/Reference/Continuity-Admissibility-Finding, and title-only mentions now append the same Reference URL after fixing the matcher to consider basename aliases when indexed titles are path-shaped. Verified artifact-links fixture and typecheck."}