Grader: file-exists
Taxonomy
Section titled “Taxonomy”| Property | Value |
|---|---|
| Determinism | static |
| Cost | low |
| Reference | reference-free |
| Temporal scope | trajectory-level |
| Score kind | code |
Config
Section titled “Config”graders: - type: file-exists config: path: "add.test.js"| Field | Type | Required | Description |
|---|---|---|---|
path |
string | Yes | File path or glob pattern to match in the workspace |
negate |
boolean | No | When true, passes when NO files match |
Negated variant
Section titled “Negated variant”Use file-not-exists as a shorthand for negate: true:
graders: - type: file-not-exists config: path: "*.tmp"This is equivalent to type: file-exists with negate: true.
Behavior
Section titled “Behavior”Uses a portable workspace glob implementation to search the trajectory’s workDir for regular files matching the pattern.
Passes when at least one file matches (or NO files match if negated). Fails otherwise.
Supports standard glob patterns:
"add.test.js"— exact file"*.test.js"— all test files"src/**/*.ts"— recursive TypeScript files"output/*.{json,txt}"— multiple extensions
Matching includes regular dotfiles and files inside dot-directories, and excludes directories, symlinks, and other special entries.
Evidence examples
Section titled “Evidence examples”✔ Files matching 'add.test.js' found: add.test.js✔ Files matching '*.test.js' found: add.test.js, utils.test.js✘ No files matching 'add.test.js' found