The problem #
A script's real interface lives in its author's head: which file it reads, which columns it needs, which flags matter. Documentation drifts away from the code because nothing checks it.
The fix #
Put one file named OPENFLANGE.md next to the code. The YAML header at the top is the contract a runner reads. Everything below it is ordinary Markdown for people. They cannot drift far apart, because they are the same file.
markdown
---
spec: openflange.org/pipe/v0.1
id: lowercase
version: 0.1.0
inputs:
text: {schema: {format: json-schema, definition: {type: string}}}
outputs:
text: {schema: {format: json-schema, definition: {type: string}}}
implementation:
type: expression
language: starlark
expression: text.lower()
---
# Lowercase
Implements the [OpenFlange](https://openflange.org/) specification.The precise terms #
- The header is the frontmatter; it is the authoritative, machine-readable pipe contract.
spec,id,versionandimplementationare required.inputs,outputs,parametersandpermissionsdescribe the rest.- The body must contain a visible link to
https://openflange.org/. A validator checks this, so anyone who finds the file can find the standard. - A directory with an
OPENFLANGE.mdat its root is a package.