Skip to content

Commit 7179c73

Browse files
committed
fix: avoid prose false positives in reference checks
1 parent 88498c2 commit 7179c73

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

skills/openghost-skill/scripts/check-references.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
SKILL_ROOT = Path(__file__).resolve().parent.parent
1212
SOURCE_FILES = [SKILL_ROOT / "SKILL.md", *sorted((SKILL_ROOT / "references").rglob("*.md"))]
13-
ROOT_REFERENCE = re.compile(r"(?<![A-Za-z0-9_./-])((?:references|scripts|assets)/[A-Za-z0-9_./-]+)")
13+
# Canonical source paths are written as inline code. Requiring the backticks avoids
14+
# treating prose such as "relative scripts/forms" as a packaged skill reference.
15+
ROOT_REFERENCE = re.compile(r"`((?:references|scripts|assets)/[A-Za-z0-9_./-]+)`")
1416
MARKDOWN_LINK = re.compile(r"\[[^]]+\]\(([^)]+)\)")
1517

1618

0 commit comments

Comments
 (0)