Audit, classify, and score OrcaFlex spec.yml files across the model library for quality, schema validity, and structure type categorization.
Audit and classify all spec.yml files in the OrcaFlex library. Scores quality (0-100), validates against ProjectInputSpec schema, and infers structural category from path and content signals.
# Basic audit (YAML output)
uv run python scripts/audit_spec_library.py
# With HTML report
uv run python scripts/audit_spec_library.py --html benchmark_output/spec_audit.html
# Custom root directory
uv run python scripts/audit_spec_library.py --root docs/modules/orcaflex/library/templates
| Criterion | Points | Check |
|---|---|---|
| Schema valid | +30 | ProjectInputSpec(**data) passes |
| Has comments | +20 | Lines starting with # |
| Meaningful name |
| +15 |
| Not temp/single-char/digits-only |
| Meaningful description | +10 | Not "Extracted from...", not "generic", len >= 10 |
| No raw_properties | +15 | environment.raw_properties absent |
| Compact file | +10 | < 1000 lines |
Priority order:
riser: key -> riser, pipeline: key -> pipelinetier2_fast -> riser, jumper -> jumper, training -> traininga=riser, b=drilling, c=mooring, d-g=installation, h=heavy_lift, k=wind_turbine, l=vessel, m=pipelinemetadata.structure field valueaudit_results.yaml)