Skip to content

New rule CORE:S:0056 broken-markdown-link #26

@cleverhoods

Description

@cleverhoods

Mechanical rule on freeform markdown files. Discovers [text](path) + [ref]: path link targets in each file, validates each resolves relative to the source file's directory.

Skips URLs, mailto:, absolute paths, anchor-only refs (#frag).

Severity high — broken links are functional context gaps (referenced content silently fails to load), not stylistic warnings. Sibling shape to CORE:S:0024 import-targets-resolve (which handles @ imports).

Code-span aware: [text](path) inside backticks is documentation, not a real link. Fenced code blocks and inline code spans are stripped before extraction so a CHANGELOG entry describing link syntax doesn't false-positive.

The mechanical-check engine now threads annotations between chained checks in the rule's discover → validate pipeline, closing a latent gap where the validate stage always saw an empty annotations dict and silently passed.

Try ails check on a repo with .claude/rules/*.md files containing relative references between rules.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestruleframework rules
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions