@runbooks/convert
v0.1.1
Published
P1 to OWS DSL 1.0, and SKILL.md import/export.
Readme
@runbooks/convert
P1 ⇄ Open Workflow DSL, SKILL.md, and the four export formats — as a package and a
command.
Normative: RUNBOOK.md §5, §20, §21
npx runbooks-convert runbook.md --as workflow --out workflow.yaml
npx runbooks-convert runbook.md --as skill --check # for CI: converts, writes nothing--as takes workflow, skill, json or svg. Input is a SKILL.md with runbook
frontmatter, or the JSON form of the same document. Nothing here reaches a network or
needs the catalog: the audience is a CI pipeline in somebody else's repository.
Versions
This package states which schema_version values it understands, in its own manifest
under runbooks.schemaVersions, and refuses a document declaring another one rather than
converting it on the assumption that it is close enough. The DSL version it emits is in
the same place, as runbooks.owsDsl.
A major version of this package may drop support for a schema_version; a minor one may
add support for a new one. That is the whole policy, and it is checkable from the manifest
without reading anything else.
Documentation
The mapping is mapping-ows-dsl.md, bundled into the published
package from spec/v1/ at pack time. It is the normative document rather than a
description of it: a package explaining the conversion in its own words would be a second
account of the same rules, and the two would drift in whichever direction suited whoever
edited one of them.
Reverse conversion
There is none, and there should not be (§5). A DSL workflow has thrown away what makes a record a record — provenance, risk classes, capabilities, the trust the catalog computed — and a converter back would have to invent them.
Checking that this actually installs
bash scripts/pack-check.sh packs this package and the three it depends on, lays them out
the way a registry install would, and runs the command against a real runbook with nothing
from the checkout on the module path. What it cannot check is the registry itself: these
packages are publishable and not published, and that gap is one npm publish wide.
