> ## Documentation Index
> Fetch the complete documentation index at: https://slopsentral.michne.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Compose workflow resources

> Compose canonical skill and resource references without a second implementation.

Use a skill reference when the consumer needs a procedure.
Use a `RESOURCE` reference when it needs one executable or data file.
Both references point to canonical authored assets.
A resource does not introduce another implementation or a skill discovery entry.

The [source-ownership concept](https://slopsentral.michne.com/knowledge/concepts/source-ownership.md) explains primitive ownership.
The [projection guide](https://slopsentral.michne.com/maintainers/projection.md) explains copied bytes and sealed reference digests.

## Decision

A hook can need an executable without its complete authoring procedure.
`RESOURCE` supplies that file and its declared resource dependencies.
The graph keeps its identity, canonical path, bytes, mode, and digest.
Keep a skill dependency when the consumer actually needs the guidance.
Distribution size alone does not justify removal of a needed procedure.

## Resource contract

Declare the canonical reference in `source/adaptable.marketplace.json`.
A plugin can select it through `resources`.
A primitive can select it through `dependsOn`.
Resource dependencies can contain only resources.

```json theme={null}
{
  "type": "RESOURCE",
  "name": "pkl-agent-runtime",
  "source": { "type": "LOCAL_SOURCE", "path": "./" },
  "path": "skills/pkl-engineering/scripts/pkl_agent",
  "dependsOn": [
    {
      "type": "RESOURCE",
      "name": "pkl-agent-runtime-lock",
      "source": { "type": "LOCAL_SOURCE", "path": "./" },
      "path": "skills/pkl-engineering/scripts/pkl_agent.lock"
    }
  ]
}
```

A resource path names one regular file under a skill's `scripts/` or `assets/`, or under `source/schemas/`.
Directories, symlinks, traversal, empty path segments, and case variants of `SKILL.md` fail admission.
The projector preserves the authored path. No destination alias exists.

[Reference schema](https://github.com/amichne/slopsentral/blob/main/source/schemas/primitives/resource-reference.schema.json) owns the JSON shape.
[Graph validation](https://github.com/amichne/slopsentral/blob/main/tools/validate-source-graph.mjs) owns filesystem and dependency rules.
[Pkl schema](https://github.com/amichne/slopsentral/blob/main/tools/projection/Schema.pkl) owns the finite asset variants for projection.
Repeated identical references share one identity.
Conflicting definitions and dependency cycles fail.

## Pkl composition

Developer Tooling supplies Pkl Engineering and selects no automatic Pkl hooks.
Both Pkl profiles select Software Engineering and Developer Tooling.
The historical `pkl-checked-repository` name does not imply automatic checks.

The three Pkl hooks remain standalone primitives for explicit custom compositions.
A disposable test composition selects the runtime resource without a skill entry point.
It does not add another shipped plugin.

`pkl-agent-runtime` depends on `pkl-agent-runtime-lock`.
Both reach the same scripts directory.
uv locked execution rejects a missing or stale script lock.
The helper accepts a Pkl executable in `>=0.31.1,<0.34.0` through `PKL_BIN` or `PATH`.
The repository projector separately needs exactly Pkl 0.32.0.

Evaluation hooks read explicit modules from `.intelligence/pkl-entrypoints`.
Without eligible input files, a hook reports a skip.
A skip supplies no evaluation or test result.

## Historical compatibility bundles

The marketplace retired `pkl-configuration`, `pkl-workflows`, and `pkl-repository-checks`.
Software Engineering owns the shared policy from Engineering Excellence.
Use the [migration ledger](https://slopsentral.michne.com/reference/migration.md) for current replacements.
Catalog schema v3 includes `RESOURCE`. The closed v3 reader rejects v1 and v2 reports.
Profile contracts keep their own versions.

## Evidence and limits

Run the focused resource proof with pinned Pkl:

```sh theme={null}
PKL_BIN=/absolute/path/to/pkl-0.32.0 node --test tools/tests/workflow-resources.test.mjs
node tools/validate-source-graph.mjs
```

The [resource tests](https://github.com/amichne/slopsentral/blob/main/tools/tests/workflow-resources.test.mjs) exercise projected commands against actual Pkl.
They include accepted input, a type error, and a missing helper.
They also examine copied bytes and modes without a skill discovery entry.
Failure output stays bounded and excludes private fixture source.

These results establish packaging and configured commands.
Native discovery, hook trust, model routing, and token use need separate evidence.
Routing fixtures express expected behavior rather than observed model outcomes.
Use the repository's full projection gates after a composition change.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.