multispec lint¶
Validate project directory structure and naming conventions.
Synopsis¶
Description¶
Validates that the project follows MultiSpec conventions:
- Directory structure matches canonical layout
- File naming follows conventions (lowercase specs, kebab-case projects)
- Required directories exist
- Config file is valid
Arguments¶
| Argument | Required | Description |
|---|---|---|
project |
No | Project name to lint (lints all if omitted) |
Flags¶
| Flag | Default | Description |
|---|---|---|
--format |
text |
Output format: text or json |
--ci |
false |
Exit with non-zero code if lint fails |
Examples¶
# Lint all projects
multispec lint
# Lint specific project
multispec lint user-onboarding
# JSON output for CI
multispec lint --format json
# CI mode (exit 1 on failure)
multispec lint --ci
Validation Rules¶
Directory Structure¶
The linter checks for the expected directory layout:
docs/specs/{project}/
├── source/ # Required
├── gtm/ # Required
├── technical/ # Required
├── eval/ # Required
└── multispec.yaml # Required
Naming Conventions¶
| Element | Convention | Valid | Invalid |
|---|---|---|---|
| Project directory | kebab-case | user-onboarding |
UserOnboarding |
| Spec files | lowercase.md | mrd.md |
MRD.md |
| Eval files | lowercase.eval.json | mrd.eval.json |
MRD_eval.json |
Config File¶
The multispec.yaml file must exist and be valid YAML with required fields:
Output Formats¶
Text Output¶
Linting project: user-onboarding
[+] Directory structure valid
[+] Config file valid
[+] Naming conventions followed
Result: PASSED
JSON Output¶
Exit Codes¶
| Code | Description |
|---|---|
| 0 | All checks passed |
| 1 | Lint failures (with --ci flag) |