Skip to content

docs(ai-integrations): specify OCI and npx skill providers - #4780

Open
johnmcollier wants to merge 1 commit into
redhat-developer:mainfrom
johnmcollier:codex/openspec-oci-npx-skills
Open

johnmcollier wants to merge 1 commit into
redhat-developer:mainfrom
johnmcollier:codex/openspec-oci-npx-skills

Conversation

@johnmcollier

Copy link
Copy Markdown
Member

Summary

  • Adds OpenSpec-only proposal, design, tasks, and capability specifications for OCI skillimage and npx skill-registry providers.
  • Defines one AiResource per skill, source-location and custom-reference conventions, public-source discovery, integrity expectations, and sync semantics.

Scope

No implementation, package, configuration, or runtime changes are included.

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 15, 2026

Copy link
Copy Markdown

🤖 Review · ⚠️ Cancelled · Started 7:01 PM UTC · Ended 7:03 PM UTC

Commit: 6eb3812 · View workflow run →

@sonarqubecloud

Copy link
Copy Markdown

@rhdh-qodo-merge

Copy link
Copy Markdown

PR Summary by Qodo

Specify OCI and npx skill catalog providers

📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Specifies OCI skillimage and npx-compatible registry discovery for cataloged skills.
• Standardizes AiResource identity, metadata, integrity references, and resilient synchronization.
• Defines implementation tasks, security constraints, and demo-only public-source scope.
Diagram

graph TD
  OCI["Public Quay"] -->|manifests| OP["OCI Provider"] --> SDK["Provider SDK"] -->|AiResources| CAT["AI Catalog"]
  NPX["npx Index"] -->|skill-md artifacts| NP["npx Provider"] --> SDK
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Independent provider implementations
  • ➕ Keeps each provider self-contained.
  • ➕ Avoids introducing a shared abstraction before implementation experience exists.
  • ➖ Duplicates entity construction, identity, and synchronization logic.
  • ➖ Increases the risk of inconsistent catalog annotations and failure semantics.
2. Single generic registry provider
  • ➕ Provides one configuration and ingestion pipeline.
  • ➕ Could simplify adding sources that closely match an existing protocol.
  • ➖ OCI manifests and npx indexes have substantially different discovery and integrity models.
  • ➖ A generic abstraction could obscure source-specific security controls and error handling.

Recommendation: Use the proposed dedicated OCI and npx providers with a narrowly scoped shared SDK. It preserves protocol-specific discovery and security behavior while centralizing the catalog contract, stable identity, and last-known-good synchronization semantics that must remain consistent.

Files changed (7) +228 / -0

Documentation (6) +221 / -0
design.mdDefine provider architecture and safety decisions +58/-0

Define provider architecture and safety decisions

• Documents skill-grain AiResource mapping, digest-pinned references, source-specific discovery, stable identity, resilient synchronization, and public-source safety limits.

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/design.md

proposal.mdPropose OCI and npx skill providers +45/-0

Propose OCI and npx skill providers

• Explains the need for cataloging skills from OCI and npx-compatible sources, identifies three proposed capabilities, and bounds the work to demo-only public integrations.

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/proposal.md

spec.mdSpecify safe npx skill discovery +26/-0

Specify safe npx skill discovery

• Requires Agent Skills v0.2 index support for skill-md entries. Defines HTTPS origin controls, redirect and size limits, SHA-256 verification, and last-known-good retention after digest failures.

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/npx-skills-provider/spec.md

spec.mdSpecify digest-pinned OCI skill discovery +26/-0

Specify digest-pinned OCI skill discovery

• Requires paginated public Quay discovery, tag-to-digest resolution, OCTO annotation validation, and AiResource emission without downloading image layers.

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/oci-skills-provider/spec.md

spec.mdSpecify shared skill entity semantics +28/-0

Specify shared skill entity semantics

• Defines consistent AiResource construction, fallback versions, stable source-based identity, delta mutations, and isolation of individual source failures.

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/skills-provider-sdk/spec.md

tasks.mdPlan provider implementation and verification +38/-0

Plan provider implementation and verification

• Breaks future work into shared utilities, OCI discovery, npx retrieval, configuration, and test coverage. No listed implementation task is completed by this PR.

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/tasks.md

Other (1) +7 / -0
.openspec.yamlRegister the draft provider specification +7/-0

Register the draft provider specification

• Declares a draft, spec-driven OpenSpec change for demo-only public OCI and npx skill catalog providers.

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/.openspec.yaml

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 15, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 7:04 PM UTC · Completed 7:10 PM UTC

Commit: 6eb3812 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Cost: $0.80

@rhdh-qodo-merge

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (6) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Skills can collide or change identity 🐞 Bug ≡ Correctness
Description
D5 says identity derives from provider ID and stable source identity but simultaneously makes the
published name the display title, even though this catalog uses metadata.name for identity and
metadata.title for display text. Two skills sharing a title can collide, while changing a title
can create a new entity instead of updating the existing source skill.
Code

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/design.md[R46-48]

+Every provider instance has a stable configuration `id`. Entity identity
+derives from that ID and the source skill identity; the published name is the
+display title. Providers persist last-known-good identities and digests, use
Relevance

●●● Strong

Repository separates metadata.name identity from metadata.title display text; stable identity
requirements make this contract issue actionable.

PR-#4460

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new design assigns the display title to the published name while promising source-derived
identity. Existing repository specifications explicitly define metadata.name as identity and
reserve metadata.title for display, and existing entities follow that separation.

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/design.md[44-50]
workspaces/ai-integrations/openspec/changes/airesource-agent-typed-schema/design.md[70-73]
workspaces/ai-integrations/openspec/changes/airesource-agent-typed-schema/specs/ai-resource-agent-schema/spec.md[19-23]
workspaces/ai-integrations/examples/ai-resources-oci-skills.yaml[11-16]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The design conflicts with Backstage identity semantics by deriving identity from stable source data while publishing the display title as the entity name.

## Fix Focus Areas
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/design.md[44-50]
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/skills-provider-sdk/spec.md[16-21]
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/tasks.md[8-10]

## Recommended Fix
Require `metadata.name` to be a deterministic, catalog-valid value derived from provider ID and a canonical source identity, and place the mutable display name in `metadata.title`. Define normalization, collision handling, and rename behavior, then add corresponding tests.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Skill source links fail catalog parsing 🐞 Bug ≡ Correctness
Description
D2 says the npx source location uses the artifact HTTPS URL, but the established AiResource
contract requires the complete annotation to use the url:https://… location-reference form and no
new requirement restores that prefix. An implementation following the wording literally emits
https://…, which is parsed with https as its location type rather than as a URL target,
preventing catalog location handling from using it as specified.
Code

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/design.md[R22-24]

+`backstage.io/source-location` is the canonical user-facing locator. OCI uses
+the existing `url:oci://<registry>/<repository>@<digest>` form; npx uses the
+artifact HTTPS URL. Retain `rhdh.io/oci-skill-ref` and
Relevance

●●● Strong

Backstage location-reference precedent explicitly requires the url: prefix for HTTPS and OCI
sources.

PR-#3938
PR-#3956

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The existing AiResource capability defines HTTPS sources as url:https://…, while the new design
only says to use the artifact HTTPS URL. Repository parsing treats the prefix before the first colon
as the location type, and the same missing-prefix failure pattern has previously required
correction.

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/design.md[20-26]
workspaces/ai-integrations/openspec/changes/ai-resource-catalog-entity-kind/design.md[17-24]
workspaces/ai-integrations/openspec/changes/ai-resource-catalog-entity-kind/specs/ai-resource-entity-page/spec.md[19-31]
workspaces/ai-integrations/plugins/catalog-backend-module-ai-resource-extensions/src/collectOciErrors.ts[31-55]
PR-#3956

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The npx source-location wording omits the required Backstage `url:` location type and can lead implementations to emit a raw HTTPS URL.

## Fix Focus Areas
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/design.md[20-26]
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/skills-provider-sdk/spec.md[3-8]
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/npx-skills-provider/spec.md[15-20]

## Recommended Fix
Specify the npx annotation value explicitly as `backstage.io/source-location: url:https://<artifact-url>` and add a scenario asserting the exact location-reference form. Keep the digest-bearing custom reference separate from this standard annotation.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Valid skill images may be skipped 🐞 Bug ≡ Correctness
Description
Public Quay skillimage discovery predicates ingestion on required OCTO manifest annotations, but
no document names those annotations, their accepted values, or their mapping into mandatory catalog
metadata. Implementations cannot consistently distinguish a valid skill manifest from an unmarked
repository, so valid skills can be skipped or non-skill manifests emitted.
Code

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/oci-skills-provider/spec.md[R12-14]

+- **WHEN** a discovered repository's manifest lacks required OCTO skillimage
+  metadata annotations
+- **THEN** the provider skips it as a non-skill and increments its skip counter
Relevance

●●● Strong

OpenSpec reviews accept clarifying missing field mappings and validation rules when implementations
otherwise cannot behave consistently.

PR-#4090
PR-#4132

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Every new OCI document refers generically to required annotations or annotation mapping, but none
identifies the keys or validation rules. The shared SDK simultaneously requires non-empty version
and source annotations, making the missing source-to-entity mapping consequential.

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/design.md[28-35]
workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/oci-skills-provider/spec.md[10-20]
workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/tasks.md[17-20]
workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/skills-provider-sdk/spec.md[3-8]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The OCI provider is required to classify manifests using an undefined set of OCTO annotations, leaving both skill detection and entity mapping indeterminate.

## Fix Focus Areas
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/design.md[28-35]
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/oci-skills-provider/spec.md[3-20]
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/tasks.md[17-20]

## Recommended Fix
Enumerate the required and optional OCTO annotation keys, accepted value formats, and their exact AiResource field mappings, or cite a stable versioned normative contract containing those details. Add scenarios for complete, missing, malformed, and conflicting annotation sets.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View high (2)
4. Registry sync can reach private services 🐞 Bug ⛨ Security
Description
Verified, safe artifact retrieval applies HTTPS, origin, and redirect controls only to artifact
URLs, while the discovery-index request has no equivalent protocol or redirect requirements and
neither request requires DNS-aware private-address rejection. A configured index or allowed hostname
that redirects or resolves to an internal endpoint can therefore make the provider contact private
services during synchronization.
Code

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/npx-skills-provider/spec.md[R17-19]

+The provider SHALL retrieve each artifact over HTTPS, enforce same-origin or
+explicitly allowlisted origins, reject redirects outside the allowlist, cap an
+artifact at 1 MiB, and verify its SHA-256 digest before entity emission. Its
Relevance

●● Moderate

SSRF defenses are accepted for arbitrary fetches, but repository history also rejects extra
validation for trusted admin-configured endpoints.

PR-#2581
PR-#3584

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The added requirements grammatically scope network protections to each artifact, and the design
likewise mentions only npx artifact URLs. Existing repository ingestion code checks the initial URL
and every redirect through a DNS-aware guard because origin checking alone does not detect hostnames
resolving to private addresses.

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/npx-skills-provider/spec.md[15-20]
workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/design.md[52-58]
workspaces/augment/plugins/augment-backend/src/services/DocumentIngestionService.ts[54-95]
workspaces/augment/plugins/augment-backend/src/services/DocumentIngestionService.ts[239-255]
workspaces/augment/plugins/augment-backend/src/services/utils/SsrfGuard.ts[82-113]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The safety requirements protect artifact URLs incompletely and leave the discovery-index fetch outside the network controls, allowing private-network access through initial URLs, DNS resolution, or redirects.

## Fix Focus Areas
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/design.md[52-58]
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/npx-skills-provider/spec.md[3-20]
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/tasks.md[25-29]

## Recommended Fix
Require HTTPS and DNS-aware rejection of loopback, private, link-local, metadata, and mapped addresses before every index and artifact request. Require manual bounded redirect handling that repeats both private-address and origin checks for every target, with tests covering the initial index, artifacts, redirects, and DNS-resolved private addresses.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Mismatched manifests can be cataloged 🐞 Bug ⛨ Security
Description
Public Quay skillimage discovery only requires resolving a tag and fetching the manifest by that
digest, while the actual returned-content digest check appears only in task 2.2 and has no normative
rejection or retention behavior. If a registry response or intermediary supplies mismatched bytes,
their annotations can be emitted under a digest-pinned reference that identifies different content.
Code

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/oci-skills-provider/spec.md[R5-8]

+The OCI provider SHALL discover repositories in a configured public Quay
+organization using paginated discovery. It SHALL select the configured tag, or
+`latest` when absent, resolve it to a digest, and fetch the manifest by that
+digest. Image layers SHALL NOT be downloaded during catalog ingestion.
Relevance

●● Moderate

Digest mismatch rejection is clearly security-relevant, but available precedents do not closely
establish OCI response-validation requirements.

PR-#3956

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The OCI capability requires only resolution and digest-addressed retrieval, whereas the task
separately asks for returned-digest validation. The npx capability demonstrates the stronger pattern
by normatively defining mismatch rejection and last-known-good retention.

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/oci-skills-provider/spec.md[3-8]
workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/tasks.md[15-21]
workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/npx-skills-provider/spec.md[22-26]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The OCI integrity check is present only as task text, so the normative provider capability permits entity emission without proving that returned manifest bytes match the resolved digest.

## Fix Focus Areas
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/oci-skills-provider/spec.md[3-8]
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/oci-skills-provider/spec.md[22-26]
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/tasks.md[17-18]

## Recommended Fix
Add a normative requirement to validate the returned manifest content against the resolved digest before reading annotations or emitting an entity. Add a mismatch scenario that rejects the response, retains any last-known-good entity, records a contextual error, and continues processing other repositories.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

6. Npx references lack a stable format 🐞 Bug ⚙ Maintainability
Description
rhdh.io/npx-skill-ref must retain an HTTPS artifact reference and its digest in one annotation,
but the design defines no delimiter, digest prefix, URL normalization, or encoding rules.
Independent producers and AI Catalog consumers can therefore serialize the same verified artifact
incompatibly and fail equality or integrity parsing.
Code

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/npx-skills-provider/spec.md[R19-20]

+artifact at 1 MiB, and verify its SHA-256 digest before entity emission. Its
+`rhdh.io/npx-skill-ref` SHALL retain the verified artifact reference and digest.
Relevance

●● Moderate

Stable serialization is a reasonable contract concern, but no close precedent establishes acceptance
for this documentation-level format request.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The design says the custom reference is digest-pinned for consumers, while the normative npx
requirement only says one annotation retains both the artifact reference and digest. No syntax is
supplied for consumers to parse or compare those two values.

workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/design.md[20-26]
workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/npx-skills-provider/spec.md[15-20]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new npx custom annotation combines an artifact URL and digest without defining a canonical serialized representation for producers and consumers.

## Fix Focus Areas
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/design.md[20-26]
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/specs/npx-skills-provider/spec.md[15-20]
- workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/tasks.md[25-29]

## Recommended Fix
Define the exact annotation grammar with an example, including URL normalization, escaping, digest algorithm prefix, digest encoding, and comparison rules. Require shared construction and parsing helpers plus round-trip tests.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 14 rules
✅ Cross-repo context — repo relationships
Review mode: ⚖️ Balanced: Although implementation is not included, these OpenSpec files define security-sensitive retrieval, integrity, identity, synchronization, and public API behavior that warrants a complete review.

Grey Divider

Tip of the day
💡 Did you know, you can reply 'qodo' on any finding to push back, ask questions, or dig deeper

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@rhdh-qodo-merge rhdh-qodo-merge Bot added the documentation Improvements or additions to documentation label Sep 15, 2026
@rhdh-qodo-merge

Copy link
Copy Markdown

Important

The /generate_labels command by Qodo is sunsetting on the 1st of October 2026 and will no longer be available. We recommend switching to the latest Qodo review capabilities. Learn more

@fullsend-ai-review

Copy link
Copy Markdown

Review — approve

PR: docs(ai-integrations): specify OCI and npx skill providers
Scope: 7 new files (228 additions, 0 deletions) — all OpenSpec documentation under workspaces/ai-integrations/openspec/changes/oci-npx-skills-registry-demo/

Summary

This PR adds a complete OpenSpec change set — proposal, design, tasks, and three capability specifications — for two new catalog entity providers: an OCI skillimage provider (public Quay) and an npx-compatible skill registry provider. No code, configuration, runtime, or package changes are included.

Analysis

Correctness & internal consistency. The three spec files (skills-provider-sdk, oci-skills-provider, npx-skills-provider) are internally consistent with the design decisions (D1–D6). Cross-references are accurate: D4’s “accepts only skill-md entries” is reflected in the npx spec’s first requirement and the archive-skip scenario; D5’s resilience semantics match the SDK spec’s failure-isolation requirement; D6’s safety bounds (same-origin, redirect allowlist, 1 MiB cap, SHA-256 verification) are fully reflected in the npx spec’s verified retrieval requirement. The tasks.md cleanly maps to the three capabilities and covers configuration and verification.

Security posture. The design proactively scopes v1 to publicly readable sources only (D6), specifies digest-pinned references (D2), enforces HTTPS-only artifact retrieval with same-origin and allowlist constraints, caps artifact size, and requires SHA-256 verification before entity emission. These are sound design principles for a provider consuming external registries. No credentials, secrets, or authentication flows are introduced.

Scope & intent. The change is appropriately scoped to documentation. The PR description’s claim of “No implementation, package, configuration, or runtime changes” is verified — the diff contains only markdown and YAML specification files under the established openspec/changes/ directory. The change aligns with the workspace’s existing OpenSpec convention of spec-driven design.

Convention adherence. The file structure (.openspec.yaml, proposal.md, design.md, tasks.md, specs/*/spec.md) matches the established pattern used by sibling change sets (ai-model-server-api-kind, k8s-config-migration, etc.). The .openspec.yaml introduces updated and notes fields not present in older entries — this is a harmless extension. The spec files follow the ## ADDED Requirements / ### Requirement / #### Scenario / WHEN/THEN format consistently.

Minor observations (non-blocking):

  1. Design document lighter than peers. Sibling design documents (ai-model-server-api-kind, k8s-config-migration) include Goals / Non-Goals, Risks / Trade-offs, and Verification sections. This design has Context and Decisions only. For providers that fetch and process external artifacts, documenting risks (registry unavailability, malicious metadata, rate limiting) and a verification plan would strengthen the spec. This is not blocking — the non-goals are already covered in proposal.md, and the design decisions implicitly address key risks.

  2. Design decisions use narrative format rather than the structured Choice / Alternatives considered / Rationale format seen in ai-model-server-api-kind and k8s-config-migration. The content is clear, but the structured format would improve skimmability and make alternative-rejection reasoning explicit.

Verdict

Approve. This is a well-structured, internally consistent specification that follows the workspace’s established OpenSpec conventions. The security design is thoughtful for the scope. No blocking issues identified.


Labels: PR adds OpenSpec specification documents to the ai-integrations workspace

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Sep 15, 2026

@gabemontero gabemontero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feedback in part from comparing with what we did for model catalog, and what #4747 and fullsend coder did in following that pattern


- Add a shared utility for provider identity, entity construction, annotation
normalization, and error isolation.
- Add an OCI provider that discovers public skillimage artifacts in a Quay

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so one thing fullsend did as part of #4747 @johnmcollier is that if provided a backstage router that returns all the retrieved the skillimage.yaml and SKILLS.md content via an RHDH plugin router/REST endpoint

As I read this, I wonder if we continue that pattern with what will be the increasing number of external skill sources of truth (i.e. when we add RHOAI mlflow REST endpoints), and we just make sure that each skill provider provides a standard format of returned data, and then have one entity provider plugin that handles the creation of the AiResource entities.

Similar to the model catalog for ai model servers we are curating in the ai-integrations workspace.

namespace and emits one `AiResource` per skill.
- Add an npx skills provider that consumes public npx-compatible Agent Skills
v0.2 discovery indexes, including RHESS.
- Emit upstream-compatible `AiResource` entities with `spec.type: skill`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/redhat-developer/rhdh-plugins/pull/4780/changes#r4041576396 pertains here too

curating this will also help us come up with a normalization notions around how each of the skills registries express thing, and understand commonalities wrt metadata and where each source has unique information

returned content digest.
- [ ] 2.3 Identify OCTO skillimages and map manifest annotations to entities
without layer extraction.
- [ ] 2.4 Retain last-known-good entities for transient per-repository errors.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add the REST interface for the common AiResource entity producer to consume

- [ ] 1.2 Implement stable source-based identity and normalized fallback
version `0.0.0+<short-content-digest>`.
- [ ] 1.3 Persist last-known-good source state and support delta mutations.
- [ ] 1.4 Add structured per-provider counters and contextual error logs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add defining the superset of skill metadata provided by each of the skill registry sources

each artifact before mapping known frontmatter fields.
- [ ] 3.3 Enforce source-origin, redirect, size, timeout, and concurrency
limits.
- [ ] 3.4 Retain last-known-good entities for transient per-skill errors.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add the REST interface for the common AiResource entity producer to consume

`rhdh.io/ai-asset-category: skill`, `rhdh.io/ai-asset-version`, and
`rhdh.io/ai-asset-source` remain the RHDH AI Catalog contract. Providers set
`defaultOwner` and `defaultLifecycle` from configuration when source metadata
does not provide usable values.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as part of this, let's have a superset mapping of each of these skill registry sources to AiResource

this fuels the schema / format of what each skill registry source produces when the entity provider plugin asks for info


### Requirement: OCI skill entity emission

For an OCTO skillimage manifest, the provider SHALL emit one `AiResource` with

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah let's remove the AiResource emission from here

@gabemontero

Copy link
Copy Markdown
Contributor

quick f/up ... here is what the #4747 plugin rest endpoint returns when I query it after it has pulled down that sample OCTO skillimage based OCI skill image:

gmontero ~/go/src/github.com/redhat-developer/rhdh-plugins/workspaces/boost  (agent/4745-oci-skill-image-backend)$ curl -s http://localhost:7007/api/skill-image-connector/images | jq
{
  "status": "ready",
  "failedImages": [],
  "images": [
    {
      "imageRef": "quay.io/gabemontero/hello-world-skill:1.0.0-draft",
      "skillImageYaml": "apiVersion: skillimage.io/v1alpha1\nkind: SkillCard\nmetadata:\n  name: hello-world\n  namespace: examples\n  version: 1.0.0\n  display-name: \"Hello World\"\n  description: >\n    A simple example skill that greets the user.\n    Use this as a template for creating new skills.\n  license: Apache-2.0\n  tags:\n    - example\n    - getting-started\n  compatibility: claude-3.5-sonnet\n  authors:\n    - name: OCTO Team\n      email: octo@redhat.com\nspec:\n  prompt: SKILL.md\n  examples:\n    - input: \"Hello\"\n      output: \"Hello! How can I help you today?\"\n",
      "skillsMd": "---\nname: hello-world\ndescription: A simple example skill that greets the user. Use this as a template for creating new skills.\nlicense: Apache-2.0\nmetadata:\n  author: octo-team\n  version: \"1.0\"\n---\n\nYou are a friendly greeter skill.\n\nWhen the user says hello, greet them warmly and ask how you\ncan help. Keep responses concise and helpful.\n"
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ready-for-merge All reviewers approved — ready to merge workspace/ai-integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants