Introducing a new way to review your PRs.

Read the announcement

tracer-cloud / opensre

The open-source agent for CI/CD reliability.

View on GitHub

25 documents · Updated Nov 23, 2026

docs / skill-lifecycle-and-releases

Skill lifecycle and releases

Skills are versioned workflow guidance that helps an agent recognize a user goal, load the right instructions, check required access, and act with a stable view of the skill catalog. The catalog moves from human-authored cards to a signed release, then to a verified catalog snapshot that an agent turn can use. See the agent execution page for the wider turn model and the agent harness, LLM invocation, tool framework, and agent memory pages for related parts of that model.

Skill catalog

The skill catalog is the validated set of discoverable workflow cards. It gives the agent a small always-available list for matching requests while keeping full workflow text out of the base prompt.

Skill identity and validation

Each workflow card has a stable name, a short description, metadata, and a non-empty Markdown body. The body is human-authored workflow guidance; a major multi-step workflow can also carry a colocated end-to-end check for its turn behavior. Catalog discovery finds cards in the skill tree, validates their front matter, rejects duplicate names and demo entries, and keeps diagnostics for cards that cannot safely enter the runtime catalog. A bad card is excluded from runtime use rather than stopping process startup. CI uses the same catalog rules without filtering away the errors.

The catalog also derives onboarding choices from the cards' demo metadata. The result is a list of valid skills and a generated entry menu; the menu is catalog data, not a field that a card can define on its own.

References: core/…/schema.py• L24-79 core/…/reader.py• L22-87 core/…/demo_menu.py• L25-74 core/…/AGENTS.md• L105-111 core/…/AGENTS.md• L169-193

Skill discovery and content loading

The agent receives a compact workflow index on each turn. It lists workflow names and tells the model to load details on demand; the fuller index also states that skill_view must be read before the agent creates a plan or calls workflow tools. When a request matches a skill, skill_view loads the full body for that skill. The body may add approved local includes, a report template, host-owned success criteria, and prerequisite guidance. Linked reference files remain on-demand so a large skill does not make every turn large. A workflow card such as fixing-github-merge-conflicts carries the ordered guidance the model follows, while its colocated test checks the host's tool order and plan gates rather than becoming runtime skill content.

Progressive loading keeps discovery broad and workflow guidance focused. The onboarding flow follows the same boundary: its entry choice loads the selected child skill, and the child can begin its first workflow action in the answer turn without putting the whole catalog into the prompt. A skill entry uses one catalog read for its identity, body, version, and digest, so the agent does not combine content from different catalog states.

References: core/…/index.py• L9-16 core/…/index_render.py• L14-34 core/…/index_render.py• L37-55 tools/…/skill_view.py• L22-67 core/…/render.py• L22-40 core/…/files.py• L52-122 core/…/catalog_snapshot.py• L56-78 core/…/test_onboarding_workflow.py• L71-172

Prerequisite evaluation

Prerequisites prevent a workflow from starting when it needs access that the current turn does not have. The host owns these checks because it can compare them with the integrations and credentials supplied to the workflow's tools.

Prerequisite checks

The prerequisite map associates a skill with named checks and the service that can satisfy each check. Providers register the checks by ID. The gate evaluates them against the turn's resolved integrations before it activates a skill.

When a check is missing, the gate withholds the skill body. In an interactive session it opens a setup menu and parks the user's message for replay after setup. In a host without a menu it returns a clear setup instruction instead. A missing or failing check registration is treated as met at skill entry so a wiring problem does not lock users out; a parked message resumes only after a registered check returns a positive result.

References: config/…/skill_prerequisites.py• L30-64 infrastructure/…/skill_prerequisites.py• L18-63 tools/…/skill_prerequisite_gate.py• L77-169 tools/…/skill_prerequisite_gate.py• L245-295

Skill entry and continuation

After prerequisites pass, the host activates the skill and may open its generated entry menu through the normal user-choice path. The menu can pause the turn before workflow work begins. The user's answer activates the selected child and retains the active skill and its instructions, so the first child action can run in that answer turn and later turns continue the selected branch instead of reopening the skill.

A new request clears the active skill context, while a menu answer or slash command keeps it. This separates a fresh request from a continuation of a skill-owned question.

References: tools/…/skill_entry.py• L1-11 tools/…/skill_entry.py• L108-187 core/…/skill_activation.py• L7-13 core/…/active_skill.py• L23-45 core/…/test_onboarding_workflow.py• L151-172

Release publication

The release system moves complete skill packages from an authoring tree to the OpenSRE app. A release contains the Markdown and approved helper files needed to rebuild a catalog; it is not a binary application release.

Release planning and publication

opensre skills push compares local skill packages with the live release. It publishes a package only when its metadata version is newer than the live version unless an explicit force option is used. The plan carries file updates and deletions, validates the merged catalog as clients will see it, and refuses invalid cards or releases that remove a skill required by released binaries.

The app assigns the new release sequence and signs the immutable file set. The signed message covers the sequence, the skill API version, and a digest of every file. Rollback publishes an earlier catalog as a new latest release, so clients still receive a normal forward release sequence.

References: surfaces/…/skills.py• L160-250 infrastructure/…/publish.py• L179-306 core/…/release.py• L48-117 infrastructure/…/client.py• L164-177

Release trust and compatibility

Clients accept a release only when its signature matches a trusted ECDSA P-256 key, its paths and size are safe, and its content is shippable. The release must use a skill API version supported by the running binary. The whole release is then validated as one catalog and must contain every bundled skill name that the binary relies on.

This all-or-nothing rule prevents a host from combining unrelated versions of shared skill content. If a release fails trust, compatibility, validation, or required-name checks, the host rejects it and can continue with an older verified release or the bundled catalog.

References: core/…/release.py• L120-186 core/…/sources.py• L112-142 infrastructure/…/publish.py• L271-326

Release retrieval and activation

Every host can retrieve published skill releases in the background and store verified documents locally. Retrieval is separate from activation: downloading a release never changes a turn that is already running.

Registry retrieval

The public release endpoint returns the newest signed document and supports ETags so a host can avoid downloading unchanged content. The background puller shares a local store across processes, limits repeated checks, verifies new documents before writing them, and keeps a small history of immutable release files. A manual skills update uses the same path and reports that the new content applies at the next turn.

The local store keeps release documents separate from materialized catalog directories. A process materializes a verified release only when it needs to build a snapshot, which also gives skill-local helper scripts a real file root.

References: infrastructure/…/client.py• L33-123 infrastructure/…/puller.py• L60-118 infrastructure/…/puller.py• L121-164 core/…/release_store.py• L1-14 core/…/release_store.py• L80-121

Catalog source selection

At activation time the host selects one catalog source in a fixed order:

  • OPENSRE_SKILLS_DIR for an explicit local authoring override.
  • The newest stored release that verifies, fits the binary, validates without diagnostics, and retains all required bundled skill names.
  • The skills bundled with the binary.

The selected source is built into a complete snapshot. The snapshot contains validated identities, rendered bodies, references, the compact index, per-skill digests, and release provenance. The host never merges a remote release with missing pieces from the bundle.

References: core/…/sources.py• L1-6 core/…/sources.py• L145-171 core/…/build.py• L26-69 core/…/catalog_snapshot.py• L24-46

Turn-level availability

The turn orchestrator binds one catalog snapshot at the start of each turn. The index, skill_view, linked references, and skill-local helpers all read from that snapshot. If a pull or local edit changes the active source while a turn is in progress, that turn keeps its original content and the next turn can use the newer snapshot. A scheduled loop that names a skill receives that skill's rendered body in its task even when general skill discovery is off, so the loop still has its intended workflow without exposing the full skill index.

The result is a stable boundary between release management and agent reasoning:

flowchart LR
    A[Author skill package] --> B[Plan and validate]
    B --> C[App signs immutable release]
    C --> D[Host retrieves and verifies]
    D --> E[Local verified store]
    E --> F[Build catalog snapshot]
    F --> G[Bind snapshot at turn start]
    G --> H[Skill index]
    G --> I[skill_view and references]
    H --> J[Agent workflow]
    I --> J

References: core/…/orchestrator.py• L111-161 core/…/active_catalog.py• L1-71 infrastructure/…/puller.py• L1-7 core/…/catalog_snapshot.py• L24-43 core/…/AGENTS.md• L196-204 core/…/test_workflow.py• L140-157

Change checklist

When these files or sections are changed, remember to consider these:

  • A skill content change needs a newer metadata.version; otherwise the release planner treats the package as stale and does not publish it.
  • A rename or removal must preserve the required-skill set and account for persisted skill names and legacy-name resolution.
  • A new front-matter field or content file type must be accepted by discovery, release path checks, snapshot rendering, and release validation together.
  • A change to the release signing message or trusted key set must stay aligned with the app's signer and every client that verifies the message.
  • A new prerequisite check needs both the skill-to-check mapping and provider registration, plus a clear setup and resume path.
  • A change to catalog activation must preserve the one-snapshot-per-turn rule so a release cannot change the meaning of a running workflow.
  • A major multi-step workflow needs its colocated end-to-end check to keep the documented tool order, menu pauses, and plan gates aligned with the card.

Important failure modes

TriggerConsequenceGuard
A card has invalid front matter, an empty body, duplicate identity, or an invalid includeThe card is excluded from the usable catalog and a diagnostic is retainedShared catalog validation runs before indexing and snapshot rendering
A local skill edit keeps the old metadata versionThe push plan marks the package stale and does not publish the editCompare the local package version with the live version before publication
A release has an unknown key, bad signature, unsafe file, unsupported API version, or missing required skillThe release is rejected as a wholeVerify the signed file tree, compatibility, diagnostics, and required names before activation
A required integration is not resolved at skill entryThe workflow body is withheld and interactive work waits behind setupRun the host prerequisite gate against the same integrations used by the tools
A release is pulled while an agent turn is runningThe current turn continues with old skill contentBind one immutable snapshot at turn start and activate changes only at a turn boundary
A workflow card and its end-to-end check disagree about tool order, menu pauses, or plan stateThe workflow test exposes a host or card contract mismatch before releaseKeep the colocated test aligned with the card's ordered workflow and plan gates

Key files

FileWhy to read it
core/…/reader.pyShows how cards become a validated catalog and how diagnostics are handled.
core/…/render.pyShows the sources that form the full skill body returned to the agent.
core/…/SKILL.mdShows a released workflow card's purpose, prerequisites, ordered plan, and completion shape.
core/…/test_merge_conflicts_workflow.pyShows how a major workflow's tool order and plan gates are checked through the agent loop.
tools/…/skill_prerequisite_gate.pyShows how missing access holds a skill and resumes it after setup.
infrastructure/…/publish.pyShows package version checks and candidate release validation.
core/…/release.pyDefines the signed release contract and trust checks.
infrastructure/…/puller.pyShows background retrieval and verified local storage.
core/…/sources.pyDefines source precedence and whole-release activation.
core/…/active_catalog.pyDefines snapshot binding and the turn boundary for updates.
core/…/orchestrator.pyShows where each agent turn binds its skill catalog.
tools/…/skill_view.pyShows how the agent requests a skill body or one linked reference.