The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
fix: normalize markdown link path separators
Seekers20019d1e05a06e73
diff --git a/.agents/skills/docs-governance/scripts/markdown_links.py b/.agents/skills/docs-governance/scripts/markdown_links.pyindex 2c1d3c741..02ef308ea 100644--- a/.agents/skills/docs-governance/scripts/markdown_links.py+++ b/.agents/skills/docs-governance/scripts/markdown_links.py@@ -180,7 +180,7 @@ def normalize_link_target(raw: str) -> str | None:)if title:target = target[: title.start()]- target = unquote(target.split("#", 1)[0].split("?", 1)[0])+ target = unquote(target.split("#", 1)[0].split("?", 1)[0]).replace("\\", "/")if not target or target.startswith("//"):return Noneif EXTERNAL_URI_RE.match(target):diff --git a/skills/docs-governance/scripts/markdown_links.py b/skills/docs-governance/scripts/markdown_links.pyindex 2c1d3c741..02ef308ea 100644--- a/skills/docs-governance/scripts/markdown_links.py+++ b/skills/docs-governance/scripts/markdown_links.py@@ -180,7 +180,7 @@ def normalize_link_target(raw: str) -> str | None:)if title:target = target[: title.start()]- target = unquote(target.split("#", 1)[0].split("?", 1)[0])+ target = unquote(target.split("#", 1)[0].split("?", 1)[0]).replace("\\", "/")if not target or target.startswith("//"):return Noneif EXTERNAL_URI_RE.match(target):diff --git a/tests/test_docs_governance_audit.py b/tests/test_docs_governance_audit.pyindex c62b5a921..761c99f16 100644--- a/tests/test_docs_governance_audit.py+++ b/tests/test_docs_governance_audit.py@@ -43,6 +43,19 @@ def test_artifact_scope_fails_on_broken_markdown_link(project: Path) -> None:assert "Broken Markdown link" in result.stdout+def test_artifact_scope_resolves_windows_style_relative_markdown_links(+ project: Path,+) -> None:+ target = project / "docs" / "adr" / "0001.md"+ target.parent.mkdir(parents=True)+ target.write_text("# ADR\n", encoding="utf-8")+ (project / "guide.md").write_text(+ "[adr](docs\\adr\\0001.md)\n", encoding="utf-8"+ )+ result = run_audit(project, "artifacts")+ assert result.returncode == 0, result.stdout++def test_artifact_scope_resolves_root_relative_links_inside_project(project: Path,) -> None: