Skip to main content

rt skills compile

rt › skills › compile

Compile pack verbs from step sources + manifest bindings into committed SKILL.md files

Usage​

bash
rt skills compile [flags]

Arguments & flags​

Flag / ArgTypeDefaultDescription
--packtextPack name (--team still accepted); omit to pick from the discovered packs, or run from inside a pack tree to compile that tree
--verbtextCompile only this verb (repeatable); omit for every verb in the roster
--manifesttextManifest path; omit to read ~/.mattstack/repos/<repo>/packs/<pack>/skills.jsonc
--repotextWhich repo's bindings file to read when this pack binds several; omit for the first repo the team declares
--pack-dirtextCompile this pack directory's sources (a worktree, say) instead of resolving --pack through the registry
--dry-runbooleanfalsePrint what would be written without touching disk
--previewbooleanfalsePrint the compiled SKILL.md to stdout and write nothing (needs a single --verb)
--jsonbooleanfalseMachine-readable result

See code: commands/skills.ts › skillsCompile

Examples & notes​

Block bindings​

Compile reads each binding in the manifest as <plugin>:<block id> with one value per prop, and inlines each fill at its block's prop marker:

jsonc
"bindings": {
"mattstack:ship/flow/domain-fast-checks": { "rules": "widgets:lint-changed" }
}

A key naming a block the engine does not have, or a prop the block does not declare, stops the compile at that manifest line. So does a key that still names a slot the engine had before it became a block tree:

jsonc
"bindings": {
"mattstack:ship": { "domain": "widgets:lint-changed" }
}
1 verb did not compile
<manifest>/skills.jsonc:8:25: "mattstack:ship" no longer has slot "domain", bound by this pack; its props are: ship/flow/domain-steps-before-gate.rules (add), ship/flow/gate-ship.rules (add), ship/flow/commit-named-files.rules (add), ship/flow/domain-fast-checks.rules (add), ship/flow/fix-test-first.rules (add), ship/flow/domain-rebases-unfinished.rules (add), ship/flow/resolve-conflict-files.rules (add), ship/flow/mr-create.rules (add), ship/flow/capture-after-case.rules (add), ship/flow/attach-evidence.rules (add), ship/flow/write-title-description.rules (add), ship/flow/domain-runs-ci.rules (add), ship/flow/run-watch-ci.rules (add), ship/domain-rules.rules (add)

Move the fill to the block where the rule belongs, with rt skills bind, and delete the old key from pack/skills.jsonc. A rule for one step binds to that step's block; a rule for the whole verb binds to its domain-rules block. When the message says the org base pack bound the key, that pack converts first. If the base pack is the only one it names, your own pack/skills.jsonc has nothing to delete. If it also names this pack, delete your own key too.

Work verbs and their pipelines​

Each work verb in pack/stubs.jsonc runs one pipeline from the manifest. A work-<kind> verb names its pipeline; plain work runs the pack's only pipeline when there is one, else feature:

jsonc
{
"verbs": {
"work": { "engine": "work", "description": "Use when running a unit of work end to end" },
"work-a11y": {
"engine": "work",
"pipeline": "accessibility",
"description": "Use when running accessibility work end to end"
}
}
}

Compile builds each work verb's stage table from its own pipeline, and the verb starts its runs with --pipeline <name>. A verb resumes only runs of its own pipeline.

Stage copies​

A stage compiles once, with the default fills. Where a pipeline's overrides give a stage different fills, compile also writes a copy named <stage>--<pipeline> (attachments/stage-evidence--accessibility/), and that pipeline's work verb points at the copy. Two pipelines never share a copy.

Copies are compiled output: never edit one. Change it through its fill or rt skills bind --pipeline. When a pipeline's fills match the default again, compile removes the copy.

After a write that removed stage copies, compile --json carries removedCopies, the removed copy names. The key is absent when nothing was removed, and on --dry-run or a failed compile.

Team values​

When the pack extends an org base whose text carries {{team.<key>}} or {{team.section:<name>}} markers, compile fills them from the pack's pack/params.jsonc and pack/sections/<name>.md. A marker ending in ? is optional. When a required value is missing, compile writes nothing and refuses once, listing each missing key or section with the base files that ask for it:

The widgets pack is missing values the acme-base pack asks for
pack/params.jsonc: linear-team (acme-base:provision-flow)
pack/sections/ci-extra-jobs.md (acme-base:watch-ci-rules)

compile --json carries the list as missing (each entry's kind, name, file and askedBy) and exits 1.

A key in pack/params.jsonc that no compiled base text asks for prints a warning: pack/params.jsonc: <key> is not asked for by any base text this pack compiles. compile --json carries those keys as unusedParams. A pack whose base text uses any marker gets a pack/requires.json floor no lower than the first engine that resolves them. See Team values in shared fills.