Skip to main content

Script Framework Specification

Canonical reference for the Livepeer Docs script library. Each section is marked ENFORCED (violations block commits or fail CI) or GUIDE (recommended best practice; not gated). Full specification (1,368 lines): workspace/plan/active/SCRIPT-GOVERNANCE/script-framework.md

Overview (GUIDE)

The script library lives at operations/scripts/ and contains ~120 operational scripts. Scripts are organised using a three-tier taxonomy: <type>/<concern>/<niche>. Two non-type folders sit alongside the six type folders:

Shared libraries in config/

Rule: All scripts that write content consumed by MDX pages MUST import sanitisation functions from operations/scripts/config/mdx-sanitise.js.

Enforcement tiers


Taxonomy: Classification Rules (ENFORCED)

Every script path follows: operations/scripts/<type>/<concern>/<niche>/script-name.js

Types (Layer 1)

Classification test: If a script does not spawn other scripts, it is NOT a dispatch. If it only scans and reports, it is NOT a remediator. If it edits existing files, it is NOT a generator (it is a remediator).

Concerns (Layer 2)

Every type folder contains the same four concern sub-folders.

Decision tree

For concern: operates on docs/MDX/SEO? content/. On components/registry? components/. On scripts/repo structure? governance/. On LLM/agent packs? ai/.

JSDoc Header Standard (ENFORCED)

Every script MUST include a JSDoc header with 11 tags in this order:

@pipeline examples


File Layout Standard (ENFORCED)

Every script follows this structure:

Canonical sources

  • Full specification: workspace/plan/active/SCRIPT-GOVERNANCE/script-framework.md
  • Niche tables by type x concern: see full specification, Section 2
  • Placement rules: File Placement
Last modified on May 22, 2026