docs: AGENTS.md — document wiki-link-checker + pre-commit-hook install

Trigger: k9ert noted wiki-link 404 from catalog, asked for pre-commit hook. Both are now in place.
This commit is contained in:
Hector 2026-06-25 21:48:15 +02:00
parent ffacfad6f2
commit 523b8c3447

View file

@ -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. **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 ### 5. Maintenance-ToDos
Wiki-Pflege läuft über `wiki/tasks/maintenance-todo.md` (versioniert). Schema: Wiki-Pflege läuft über `wiki/tasks/maintenance-todo.md` (versioniert). Schema: