Compose semantics
Compose merges multiple skills into a single artifact suitable for injecting into an agent's system prompt.
Rules
- Version ranges follow semver.
- Conflicts resolved by: caller preference → trust tier → composite score → LLM judge.
- Every output section is tagged with provenance:
<!-- from mobile/ios-publishing@2.3.1 -->. - The
sources[]array lists every skill that contributed to the merge. - The
conflicts[]array records when two skills covered the same heading + how it was resolved.
Conflict resolution strategies
error— fail the request if any two skills overlap.trust-tier(default) — prefer the higher-tier skill's content.score— prefer whichever skill the registry's hybrid ranker scored higher.llm-judge— ask the judge to merge intelligently. Slower; better for nuanced overlaps.
Example
const pkg = await skills.compose({
goal: 'publish iOS+Android app',
constraints: { trust_floor: 'verified', resolve_conflicts: 'trust-tier' },
});
// pkg.artifact:
// <!-- from mobile/ios-publishing@0.1.0 -->
// # iOS
// ...
// <!-- from mobile/android-play-release@0.1.0 -->
// # Android
// ...
// pkg.sources:
// [
// { id: 'mobile/ios-publishing', version: '0.1.0', trust_tier: 'verified' },
// { id: 'mobile/android-play-release', version: '0.1.0', trust_tier: 'verified' }
// ]