From 523b8c3447848da6e703ed89439737dcfa978464 Mon Sep 17 00:00:00 2001 From: Hector Date: Thu, 25 Jun 2026 21:48:15 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20AGENTS.md=20=E2=80=94=20document=20wiki?= =?UTF-8?q?-link-checker=20+=20pre-commit-hook=20install?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Trigger: k9ert noted wiki-link 404 from catalog, asked for pre-commit hook. Both are now in place. --- AGENTS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 4e70ed7..5c76961 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -255,6 +255,10 @@ Periodisch durchführen, wenn das Wiki wächst. Prüfe: **Mechanischer Lint:** `scripts/wiki-lint.sh` führt deterministische Checks aus (Stubs, Frontmatter, Broken-Refs, Orphans, Dup-Cluster, File-Count, Stale, Raw-Coverage). Output: `scripts/wiki-lint-report.md`. Exit 1 bei Issues. Tests: `scripts/wiki-lint-test.sh` (17 Asserts, 3 Fixtures). **Kein LLM im Detection-Pfad** — Agent liest nur den Report und entscheidet, welche Subagents für Fixes zu spawnen sind. +**Wiki-Link-Checker:** `scripts/check-wiki-links.py` validiert alle `[[...]]` Wikilinks source-relative (entspricht Forgejo/Gitea Markdown-Rendering-Verhalten). Akzeptiert auch `[[path|Label]]`. Exit 1 bei broken links. Code-Spans (`...`) und Template-Placeholders (`[[{slug}]]`) werden ignoriert. Auto-Fix: `scripts/fix-wiki-links.py` (5 Bug-Klassen: `wiki/`-Prefix, Path-Confusion, plain basename, `raw/`-Links, `../` Mismatch). + +**Pre-Commit-Hook:** `.git/hooks/pre-commit` ruft `scripts/check-wiki-links.py` vor jedem Commit. Installation: nach `git clone` einmalig `cp scripts/.check-wiki-links-wrapper.sh .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit`. + ### 5. Maintenance-ToDos Wiki-Pflege läuft über `wiki/tasks/maintenance-todo.md` (versioniert). Schema: