STR-001 Required files
Overview
Section titled “Overview”Validates that the project contains every required file. If any path listed in files is missing, an error is reported. This is a project-scope rule and is evaluated across all documents loaded via include.
Why it matters
Section titled “Why it matters”Documents like README.md, CONTRIBUTING.md, and docs/architecture.md are entry points that other documents link to under the assumption that they exist. When such anchor files are renamed or deleted, the damage goes beyond broken links — the documentation structure itself starts to fall apart. This rule detects when those entry points are missing.
Options
Section titled “Options”| Field | Type | Required | Description |
|---|---|---|---|
files | string[] | Yes | Array of file paths required to exist |
Each entry in files is compared by exact match against the file list loaded via include. Specify each path relative to the project root.
Bad example
Section titled “Bad example”With files: ["README.md", "docs/architecture.md"], the missing docs/architecture.md triggers a violation.
project line 0 error Required file "docs/architecture.md" not found STR-001After fix
Section titled “After fix”Creating docs/architecture.md resolves the violation.
Configuration example
Section titled “Configuration example”{ "rule": "str001", "options": { "files": ["README.md", "docs/architecture.md", "CONTRIBUTING.md"] }}Related rules
Section titled “Related rules”- SEC-001 Required sections — As a follow-up to file existence, validates the heading structure within each document
- REF-001 Broken links — Validates that links to files which should exist resolve correctly