Skip to content

[v3.19 hub-assets] merge sin hub and sin assets into one tool catalog #163

Description

@Delqhi

Merge sin hub and sin assets into one tool catalog

sin-code hub list/search/info (v3.12.0) and sin assets list/validate/show/import (v3.17.0) are two CLIs for the same concept: a catalog of tools (agents, commands, skills). Two CLIs for one concept is UX-confusion.

Why

Operators don't think "do I want the hub or the assets?" They think "do I have a tool for this?" The answer should be one command.

What ships

Single CLI: sin catalog

sin catalog list                    # all assets (hub + vendored)
sin catalog list --kind=agent       # filter by kind
sin catalog search "go reviewer"    # across both sources
sin catalog info agent go-reviewer  # show one
sin catalog import --source ./vendor/ecc  # import vendored assets
sin catalog sync                     # refresh from all sources

Source abstraction

Both internal/hub/ and internal/assets/ produce *Asset-shaped data (or a similar type). A common Source interface:

type Source interface {
    Name() string                              // "vendored", "hub", "remote"
    List(ctx context.Context) ([]*Asset, error)
    Search(ctx context.Context, q string) ([]*Asset, error)
    Get(ctx context.Context, name string) (*Asset, error)
}

The CLI walks all sources, merges results, de-dupes by (kind, name).

Deprecation

sin hub and sin assets remain as deprecated aliases of sin catalog for one minor release. After v3.20, they go.

Acceptance criteria

  • sin catalog list shows the union of both sources, de-duped
  • sin catalog search ranks across both sources
  • The Source interface has a reference implementation for each existing source (vendored + hub)
  • The deprecation warnings are visible (printed to stderr, not silent)
  • Test coverage ≥ 80%

Mandates

Related

  • cmd/sin-code/internal/hub/ — the v3.12.0 hub subsystem
  • cmd/sin-code/internal/assets/ — the v3.17.0 asset loader + selector
  • docs/EVAL-HARNESS.md and docs/INSTINCTS.md — both reference the catalog

Estimated scope

~3-4 days, 1 PR. Mostly refactoring; the pieces exist, they just need to be unified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions