H4.5: Referenced project file is missing #
An instruction sends the agent to a project file that does not exist.
Applies to: Eligible instruction or skill Markdown read from disk. Manual repair; no automatic fix for this example.
What triggers it #
Requires a literal relative path with a directory part and known extension, in backticks or a Markdown link outside a code fence. The first directory must exist; neither document-relative nor repository-root resolution may find the file. Creation, removal, rename, and example language is excluded.
How to repair it #
Correct the path to the existing file, or remove the reference if the procedure no longer requires it.
Reproduce the finding #
Use uv and Python 3.10+, plus curl. Run the examples in a scratch directory.
---
name: invoice-review
description: "Use when the user asks to review an invoice."
---
# Invoice review
Compare the invoice total with its line items. Report discrepancies by line number.
Read `docs/invoice-policy-old.md` before checking totals.
mkdir -p rule-check/docs
curl -fsS https://lintlang.ai/examples/rules/invoice-policy.md -o rule-check/docs/invoice-policy.md
curl -fsS https://lintlang.ai/examples/rules/h4.5-bad.md -o rule-check/invoice-review.md
uvx --from lintlang==0.8.0 lintlang scan rule-check/invoice-review.md --format json
Expected with 0.8.0: the JSON report includes H4.5, severity MEDIUM. The example creates docs/invoice-policy.md beside the fixture; the stale docs/invoice-policy-old.md reference is intentionally absent. H4.5 does not run on stdin.
Improved example #
Download the improved example.
---
name: invoice-review
description: "Use when the user asks to review an invoice."
---
# Invoice review
Compare the invoice total with its line items. Report discrepancies by line number.
Read `docs/invoice-policy.md` before checking totals.
mkdir -p rule-check/docs
curl -fsS https://lintlang.ai/examples/rules/invoice-policy.md -o rule-check/docs/invoice-policy.md
curl -fsS https://lintlang.ai/examples/rules/h4.5-improved.md -o rule-check/invoice-review.md
uvx --from lintlang==0.8.0 lintlang scan rule-check/invoice-review.md --format json
Expected with 0.8.0: H4.5 is absent. Other diagnostics may still appear; this repair targets the rule above.
Both commands use advisory mode: a finding does not itself make the command fail. To fail CI on MEDIUM findings, add --fail-on review. --fail-on fail gates only HIGH and CRITICAL. See outputs and exit codes.
Detection details #
Released H4 detection contract and scope
Checks selected unscoped requests to remember everything or use all conversation, history, or context; unbounded always-remember language; and, for chat prompts only, long prompts without recognized boundary markers. It does not inspect a host's actual context window.
H4.5 (MEDIUM; only AGENTS.md, CLAUDE.md, GEMINI.md, SKILL.md, Copilot
instruction files and files with skill front matter, read from disk) reports a
referenced project file that does not exist. It needs all of: a literal relative
path with a directory part and a known file extension, in backticks or a Markdown
link, outside fenced code; a first segment that exists beside the document or at
the repository root; a path that resolves from neither; and a line that does not
talk about creating, renaming, removing or exemplifying it. It reads the
filesystem, so it does not run on standard input, and it is deliberately quiet:
directories, globs, placeholders and paths into other projects are never reported.
Related: H4: Context Boundary Erosion.