Validate — Structural Validation
Check that a module's documentation structure matches the expected standard for its type.
Command
/validate [module-path] --type core|lib|app [--strict] [--json]
/validate --root [--strict] [--json]
Arguments
| Argument | Required | Description |
|---|---|---|
[module-path] |
No | Path to the module to validate. Defaults to current working directory. |
--type |
Yes (unless --root or detectable from CLAUDE.md) |
Module type: core, lib, or app |
--root |
No | Validate the repo-level docs/ structure |
--strict |
No | Treat placeholder-only files as failures instead of warnings |
--json |
No | Produce machine-readable JSON output for CI |
Workflow
Parse arguments from
$ARGUMENTS.Determine module path and type. If no path given, use the current working directory. If no type given, attempt to read from the module's
CLAUDE.md(under## Module Type).Run the validation engine:
bash scripts/validate-structure.sh --module-path <path> --type <type> [--strict] [--json]Or for root validation:
bash scripts/validate-structure.sh --root [--strict] [--json]Present results to the user.
Report Format
Human-Readable (default)
Module: packages/auth-service (app)
────────────────────────────────────────
✓ docs/proposals/ exists (2 files)
✓ docs/plans/ exists (1 file)
✓ docs/decisions/ exists (1 file)
✗ docs/architecture/ MISSING
✓ docs/runbooks/ exists (3 files)
✓ docs/integration/ exists (1 file)
~ docs/config/ placeholder only
✓ README.md exists
✓ CONTRIBUTING.md exists
✗ CLAUDE.md MISSING
────────────────────────────────────────
Result: FAIL (2 missing, 1 placeholder)
Legend:
✓— Component exists with content✗— Component is MISSING (always a failure)~— Component exists but contains only placeholder content (failure in--strictmode)
JSON (with --json)
Machine-readable output suitable for CI pipelines. Each component is reported with state, label, and detail fields.
Scripts
scripts/validate-structure.sh— Validation engine (copy ofscaffold/scripts/validate-structure.sh)
Converted and distributed by TomeVault — claim your Tome and manage your conversions.