# Marketplace Model

## Goal

A trusted cloud-agentic marketplace that is smaller, stricter, and more useful
than broad prompt collections. Assets are curated, schema-validated, and
cataloged before they are published.

## Core model

1. Assets live in provider/domain folders (`agents/`, `skills/`, `rules/`, `mcp/`).
2. Catalog JSON files (`catalog/agents.json`, `catalog/skills.json`) index assets for machines.
3. Schemas (`schemas/`) define required metadata contracts.
4. Tests (`tests/`) enforce catalog consistency, harness adapter coverage, and secret hygiene.
5. Official documentation links anchor cloud claims to vendor-authoritative sources.

## Curation policy

The marketplace grows slowly with strong review. A small catalog of high-trust
assets is better than a large catalog nobody should run. Every submitted agent
or skill must pass all 17 validation gates before merging.

## Supported harness marketplaces

This repo ships five harness-native marketplace manifests. Each manifest is at
the canonical path the vendor spec prescribes — do not move them.

| Harness | Canonical manifest path | Spec |
|---------|------------------------|------|
| **Claude Code** | `.claude-plugin/marketplace.json` + `.claude-plugin/plugin.json` | [code.claude.com/docs/en/plugin-marketplaces](https://code.claude.com/docs/en/plugin-marketplaces) |
| **Cursor** | `.cursor-plugin/plugin.json` | [cursor.com/docs/plugins](https://cursor.com/docs/plugins) |
| **GitHub Copilot CLI** | `.github/plugin/marketplace.json` | [github.com/github/copilot-cli](https://github.com/github/copilot-cli) |
| **OpenAI Codex** | `.agents/plugins/marketplace.json` | [openai/codex plugin-json-spec](https://github.com/openai/codex/blob/main/codex-rs/skills/src/assets/samples/plugin-creator/references/plugin-json-spec.md) |
| **Kiro** | `powers/vanguard-<provider>/POWER.md` (14 Powers) | [github.com/kirodotdev/powers](https://github.com/kirodotdev/powers) |

Gemini CLI does not have a marketplace; content installs via the npm export
path (`vfa-export-agents --platform gemini`).

## What each marketplace manifest declares

### Claude Code

`.claude-plugin/marketplace.json` identifies the marketplace. `.claude-plugin/plugin.json`
enumerates **331 agent adapter paths** in the `agents[]` array. Both files are
generated by `scripts/generate-plugin-manifest.mjs` and must not be hand-edited.

### Cursor

`.cursor-plugin/plugin.json` enumerates **331 cursor agent adapter paths** in
the `agents[]` array. Generated by `scripts/generate-cursor-plugin.mjs`.

### GitHub Copilot CLI

`.github/plugin/marketplace.json` declares a single plugin with `source: "./"`.
Copilot treats the repo root as the plugin root and reads adapter files directly
from `agents/<provider>/<agent>/harnesses/copilot.agent.md`.

Note: Copilot's `extraKnownMarketplaces` setting is an **array of URLs** (not
a keyed object like Claude Code).

### OpenAI Codex

`.agents/plugins/marketplace.json` is the canonical Codex marketplace registry.
It declares two plugins:
- `vanguard-frontier-agentic` — the main plugin at `plugins/vanguard-frontier-agentic/`
- `cross-platform-agent-template` — scaffold for new cross-platform agents

Each plugin has a `.codex-plugin/plugin.json` manifest with required fields:
`name`, `version`, `description`. Plugin folder name must equal plugin `name`
(Codex strict rule).

### Kiro Powers

Kiro does not have a single-command marketplace install. Instead, this repo
ships **14 per-provider Powers** under `powers/`. Each Power is a directory
containing a `POWER.md` with strict-5 frontmatter (`name`, `displayName`,
`description`, `keywords`, `author` — exactly these five fields, no others).
Users add Powers one at a time via the Kiro Powers panel UI.

## How the install paths relate to each other

```
One repo → eight install surfaces

             ┌─────────────────────────────┐
             │ Raishin/vanguard-frontier-  │
             │        agentic              │
             └──────────────┬──────────────┘
                            │
         ┌──────────────────┼──────────────────────────┐
         │                  │                          │
    Marketplace          Clone / npm            Third-party CLI
    (harness-native)     (versioned)            (unversioned)
         │                  │                          │
    ┌────┴────┐        ┌────┴────┐              ┌──────┴──────┐
    │Claude   │        │ npm pkg │              │  skills add │
    │Copilot  │        │vfa-exp. │              │ (skills only│
    │Cursor   │        │Kiro exp.│              │  HEAD only) │
    │Codex    │        │Gemini   │              └─────────────┘
    │Kiro Pwr │        │  exp.   │
    └─────────┘        └─────────┘
```

## Validation

Marketplace manifests are validated by the 17-gate `npm run validate` suite.
The four marketplace-specific gates are:

| Gate | What it checks |
|------|---------------|
| `validate:plugin-manifest` | Claude Code — 331 agents declared |
| `validate:multi-harness-marketplace` | Cursor (331) + Copilot CLI |
| `validate:codex-marketplace` | Codex — 2 plugins, policy fields, version parity |
| `validate:kiro-powers` | 14 Powers, strict-5 frontmatter, ≤3 sentences |

## Regenerating manifests

After adding or removing agents, regenerate all manifest files and re-validate:

```bash
npm run manifest:write          # re-index catalog/agents.json
npm run plugin-manifest:write   # .claude-plugin/plugin.json
npm run cursor-plugin:write     # .cursor-plugin/plugin.json
npm run kiro-powers:write       # powers/*/POWER.md (if provider configs changed)
npm run validate                # all 17 gates
```

## See also

- [`docs/integrations/installation-guide.md`](./integrations/installation-guide.md) — step-by-step install for each harness
- [`docs/integrations/multi-harness-adapter-pattern.md`](./integrations/multi-harness-adapter-pattern.md) — how the 7-adapter-per-agent pattern works
- [`docs/integrations/skills-cli.md`](./integrations/skills-cli.md) — npm/skills CLI trust matrix
- [`docs/compatibility.md`](./compatibility.md) — harness support contract
