Description
AgentLinter reports 'Referenced file not found' for files that do exist in the workspace, but aren't in the hardcoded scan list.
Reproduction
- Create a workspace with standard files (AGENTS.md, SOUL.md, etc.)
- Create an additional file like
IMPROVEMENT.md
- Reference it from AGENTS.md:
See IMPROVEMENT.md for details
- Run
npx agentlinter
Expected
Linter finds IMPROVEMENT.md and validates the reference.
Actual
🔴 CRITICAL AGENTS.md
Referenced file "IMPROVEMENT.md" not found in workspace.
But the file exists:
$ ls -la IMPROVEMENT.md
-rw-r--r-- 1 user staff 1319 Feb 7 11:53 IMPROVEMENT.md
Root Cause
The linter only scans a hardcoded list of files:
📄 Files: AGENTS.md, SOUL.md, IDENTITY.md, USER.md, TOOLS.md, HEARTBEAT.md, MEMORY.md, clawdbot.json, skills/*
When checking references, it only looks at scanned files, not all files in the workspace.
Suggested Fix
For the 'referenced file' check, use fs.existsSync() against the actual filesystem rather than checking against the scanned files list.
Environment
- agentlinter v0.1.7
- macOS
- Node 25.4.0
Description
AgentLinter reports 'Referenced file not found' for files that do exist in the workspace, but aren't in the hardcoded scan list.
Reproduction
IMPROVEMENT.mdSee IMPROVEMENT.md for detailsnpx agentlinterExpected
Linter finds IMPROVEMENT.md and validates the reference.
Actual
But the file exists:
Root Cause
The linter only scans a hardcoded list of files:
When checking references, it only looks at scanned files, not all files in the workspace.
Suggested Fix
For the 'referenced file' check, use
fs.existsSync()against the actual filesystem rather than checking against the scanned files list.Environment