Import Targets Resolve
Import references in instruction files must resolve to existing files. Broken imports create gaps in the agent's context — the agent silently skips missing files without warning.
Antipatterns
- Renamed file without updating imports: Moving
docs/setup.mdtodocs/getting-started.mdbut leaving@docs/setup.mdin another file. Theextract_importscheck finds the reference andcheck_import_targets_existfails because the path no longer resolves. - Relative path from wrong directory: Writing
@../shared/config.mdwhen the file structure requires@../../shared/config.md. The path resolution check verifies the target exists relative to the project root. - Import referencing a directory instead of a file: Writing
@docs/specs/instead of@docs/specs/pipeline.md. The check expects file paths, not directory paths.
Pass / Fail
Pass
# Project Setup
@docs/getting-started.md
@.claude/rules/testing-design.md
Fail
# Project Setup
@docs/old-setup.md
@.claude/rules/deleted-rule.md
Limitations
Extracts @<path> references via extract_imports (regex @[\w./-]+) and verifies each target file exists on disk via check_import_targets_exist. Does not validate the content of imported files, detect circular imports, or check whether the regex captured trailing punctuation in inline references.
