Skip to content

v0.21.0

Choose a tag to compare

@github-actions github-actions released this 09 May 14:13
v0.21.0
3cd8cd6

Context-optimization release. Cuts the per-skill canopy tax from ~700 lines of always-loaded runtime spec to ~150–400 depending on feature usage. Fully backward-compatible — skills authored on prior versions continue to work without changes.

Added

  • Sliced primitive spec. skills/canopy-runtime/references/framework-ops.md (monolithic, 151 lines) is replaced by per-feature slice files under references/ops/:
    • core.mdIF, ELSE_IF, ELSE, END, BREAK (always loaded)
    • interaction.mdASK, SHOW_PLAN
    • control-flow.mdSWITCH, CASE, DEFAULT, FOR_EACH
    • parallel.mdPARALLEL
    • subagent.md — subagent dispatch (marker + bold call-site)
    • explore.mdEXPLORE + ## Agent soft-compat
    • verify.mdVERIFY_EXPECTED
    • references/ops.md — index pointing at the slices
  • Per-skill metadata.canopy-features manifest. Skills declare which feature slices they use; the runtime loads only those (core is implicit-always-loaded). Auto-generated by /canopy create/scaffold/improve/convert-to-canopy. Authors don't maintain it by hand.
  • /canopy measure-context <skill> op (skills/canopy/references/ops/measure-context.md). Reports the line-count breakdown a skill costs to load — marker block + runtime baseline + manifest-driven slices + skill-local files. Highlights drift between the manifest and actual feature usage. Pure inspection; no mutations.
  • MEASURE_CONTEXT registered in operations dispatch + detection + dispatch-schema.json enum. Trigger phrases include "measure context", "context size", "context cost", "manifest size".

Changed

  • Slim marker block in assets/constants/marker-block.md (and the byte-identical mirrors in install.sh build_marker_block() and install.ps1 Build-MarkerBlock). The block is now a 2-line trigger + pointer (~5 lines including markers) — down from ~30 lines. Pre-v0.21.0 markers inlined the full spec dump in every canopy-active project's ambient instructions; the new block defers all spec to canopy-runtime/SKILL.md, loaded only when the runtime is engaged.
  • canopy-runtime/SKILL.md documents the manifest-aware load procedure: read the skill's frontmatter, parse metadata.canopy-features, load core.md plus the listed slices. Manifest absent → load every slice (back-compat).
  • runtime-claude.md and runtime-copilot.md reference the slice index instead of the deleted monolithic framework-ops.md. Cross-references updated throughout.
  • skill-resources.md trimmed: subagent dispatch content moved to ops/subagent.md. Adds a new section documenting the manifest.
  • Authoring agent ops updated for the manifest:
    • create.md — computes the manifest from the planned tree and emits it in produced SKILL.md frontmatter.
    • scaffold.md — template includes the manifest stub.
    • improve.md — audits skills for missing or drifted manifests; proposes additions/corrections in the decision table.
    • validate.md — new check pass: manifest presence (warning), feature-vs-tree drift (warning), core listed (warning), unknown values (warning).
    • convert-to-canopy.md — emits the manifest in produced SKILL.md.
  • assets/constants/validate-checks.md — new "Warnings → manifest" section enumerating the four drift cases and the "manifest absent" warning.
  • assets/templates/skill.md — template now includes metadata.canopy-features: [interaction] (the typical small-skill default).

Removed

  • skills/canopy-runtime/references/framework-ops.md — the monolithic primitive file is split across references/ops/<slice>.md. Skills that referenced it by path will need to update; this is rare in practice (the runtime resolves primitives by lookup, not by path). /canopy improve reports any stale path references.

Notes

  • No new feature surface. All v0.20.1 features (subagent dispatch, PARALLEL, etc.) keep working unchanged. v0.21.0 only changes how the runtime spec is structured and loaded.
  • Marker-block parity. Canonical, install.sh, install.ps1 all updated. The vscode extension's MARKER_BLOCK constant must follow in a sibling-repo PR.
  • Back-compat. Skills without a canopy-features manifest continue to run — the runtime falls back to load-everything. /canopy validate warns; never errors. Adoption is gradual.
  • Footprint estimate. A skill using [interaction, verify] loads roughly 400 lines of runtime context (down from ~700). A skill using [parallel, subagent] loads ~470. A skill with [interaction, control-flow, parallel, subagent, explore, verify] (full feature surface) loads ~770 — comparable to pre-v0.21.0.


Verifying this release

# Verify the signed tag (uses GitHub's pubkey for SSH/GPG signatures)
git verify-tag v0.21.0

# Verify SLSA build provenance for the install tarball
gh attestation verify canopy-0.21.0.tar.gz --owner kostiantyn-matsebora