# SP Ecosystem Capability Implementation Map

## Scope
Capability-first companion map for the current SmilingPirate-related project landscape:

- `sp-gh-copilot-kit`
- `sp-theme-system`
- `capability-modeling-toolkit`
- `sp-music-hero`
- `sp-learning-languages-with-movies`
- `smilingpirate-site`

This semantic map starts with the stable capabilities and then points to the repos that implement, consume, or host them.
It does not replace the owner-first boundary map in `docs/visualization-src/sp-ecosystem-capability-map.md`.
Visualization properties and any HTML page are companion artefacts for layout and presentation only.

## Hierarchy decision
- Level 0 container: capability families.
- Level 1: stable cross-repo capabilities.
- Supporting lens:
  - canonical owner repo
  - direct implementing repos
  - typical interaction repos
  - host / publish touchpoint
- Rationale:
  - this view answers a different question from the owner-first map;
  - the question here is "which repos implement or touch this capability?";
  - therefore the capabilities stay primary and the repos become role annotations beneath them.
- Complement rule:
  - owner-first map -> where does change authority start?
  - capability-first map -> which repos implement or participate around that capability?

## Layout heuristic
- Primary structure: capability cards ordered from reusable foundation to product semantics to host publication.
- The graphical map should keep the capability name visually primary and the repo roles secondary.
- Each card should still show one canonical owner, even if several repos implement or interact with the capability.

## Hierarchy placement
- Level 0:
  - capability families group related stable concerns.
- Level 1:
  - individual capabilities sit inside the family that gives them meaning.
- Supporting detail:
  - owner repo, direct implementing repos, and host touchpoints are attached to the capability card rather than replacing it.
- Local-depth rule:
  - repo-local feature, module, or code details stay in the local repo maps.

## Visualization plan
- Template family: matrix.
- Layout grammar: capability-first implementation matrix with family accents.
- Why this grammar fits:
  - the main question is capability coverage and interaction, not repo ownership alone;
  - the viewer should be able to compare implementation spread without losing the canonical owner.
- Visual encodings:
  - capability family -> card accent color
  - canonical owner -> first owner badge
  - direct implementing repos -> solid pills
  - typical interaction repos -> softer pills
  - host / publish touchpoint -> dedicated line item
  - feature slices -> short list inside the capability card

## Level 0 structure

| Level 0 | Purpose |
|---|---|
| Workflow and orchestration | Reusable workflow semantics and visualization lanes that other repos can consume. |
| Shared-system contracts | Reusable presentation, shell, and host-integration contracts. |
| Capability-modeling governance | Workbook lifecycle and plane-governance rules that constrain multi-kit coexistence. |
| Product semantics | Product-owned user-facing learning semantics for music and language. |
| Host publication | Downstream host, publish, and adoption behavior. |

## Capability implementation readout

| ID | Family | Capability | Canonical owner repo | Direct implementing repos | Typical interaction repos | Host / publish touchpoint | Defining feature slices | Boundary rule |
|---|---|---|---|---|---|---|---|---|
| ECO-W1 | Workflow and orchestration | Govern shared workflow, planning, and prompt semantics | `sp-gh-copilot-kit` | `sp-gh-copilot-kit` | `capability-modeling-toolkit`, `sp-music-hero`, `sp-learning-languages-with-movies` | published orientation surfaces may appear in `smilingpirate-site` | plan workflow contract and claim lifecycle; prompt family semantics across hosts; bridge/help/orientation entry surfaces | One owner, many consumers. Product repos use the workflow but do not redefine it. |
| ECO-W2 | Workflow and orchestration | Orchestrate project visualization and kit evolution | `sp-gh-copilot-kit` | `sp-gh-copilot-kit`, `sp-theme-system`, `capability-modeling-toolkit`, `sp-music-hero`, `sp-learning-languages-with-movies` | `smilingpirate-site` | atlas and bundle outputs can be published into `smilingpirate-site` | visualization bundle flows; propose/apply/update/import orchestration; atlas and studio publication surfaces | Lane logic is shared, but semantic ownership of the touched artefact stays with the owning repo. |
| ECO-T1 | Shared-system contracts | Publish reusable theme and shell contracts | `sp-theme-system` | `sp-theme-system` | `sp-music-hero`, `sp-learning-languages-with-movies`, `smilingpirate-site` | adopted by `smilingpirate-site` and optionally by product repos | token taxonomy and brand layers; shell pattern and CSS contract surfaces; standalone and host-mounted theme packaging | Theme contracts are reusable library contracts, not a takeover of product meaning. |
| ECO-T2 | Shared-system contracts | Govern host-integration and shared-system adoption | `sp-theme-system` | `sp-theme-system`, `smilingpirate-site` | `sp-music-hero`, `sp-learning-languages-with-movies` | host mounting and publish discipline in `smilingpirate-site` | DOM and CSS host integration rules; optional runtime helpers and overlays; migration and publish discipline | Contract truth stays in `sp-theme-system`; host repos implement adoption, not ownership. |
| ECO-C1 | Capability-modeling governance | Operate workbook-backed capability-modeling lifecycle | `capability-modeling-toolkit` | `capability-modeling-toolkit` | `sp-gh-copilot-kit`, target product repos that adopt capability planning | usually upstream of host publication | export/import round-trip flows; workbook operations; workbook-derived capability-map lifecycle | Workbook truth and lifecycle stay canonical in the CBP repo. |
| ECO-C2 | Capability-modeling governance | Govern mixed-plane coexistence and CBP self-models | `capability-modeling-toolkit` | `capability-modeling-toolkit`, `sp-gh-copilot-kit` | `sp-theme-system`, `sp-music-hero`, `sp-learning-languages-with-movies` | no direct host ownership; host only consumes outputs later | Plane A/B/C/D artifact context rules; CBP self-model exception; dual-toolkit sync governance | Plane governance is canonical here even when SP lanes help orchestrate it. |
| ECO-M1 | Product semantics | Deliver the music practice loop and playback experience | `sp-music-hero` | `sp-music-hero` | `sp-gh-copilot-kit`, `sp-theme-system` | publishable product output may later land in `smilingpirate-site` | shared timeline and practice transport loop; notation plus instrument rendering surfaces; audio and playhead-driven session feedback | Product runtime meaning stays local even when shared kits shape workflow or presentation. |
| ECO-M2 | Product semantics | Own music-specific content, mapping, and coaching semantics | `sp-music-hero` | `sp-music-hero` | `sp-theme-system` | optional host publish surface only | note/chord/drum mapping logic; instrument variant registry and compatibility gates; music coaching and content semantics | Shared systems can style it, but only the product repo owns the music semantics. |
| ECO-I1 | Product semantics | Deliver subtitle-based learning paths and static card runtime | `sp-learning-languages-with-movies` | `sp-learning-languages-with-movies` | `sp-gh-copilot-kit`, `sp-theme-system` | publishable product output may later land in `smilingpirate-site` | subtitle-path and chapter learning flow; static card runtime and path navigation; study session progression surfaces | Product runtime meaning stays local even when shared kits shape workflow or presentation. |
| ECO-I2 | Product semantics | Own content curation, local overrides, and merge-back workflow | `sp-learning-languages-with-movies` | `sp-learning-languages-with-movies` | `sp-gh-copilot-kit` | no primary host ownership | subtitle-to-card generation pipeline; local override storage and export; merge-back curation workflow | Content pipeline truth stays local to the language repo. |
| ECO-S1 | Host publication | Host and publish integrated site surfaces | `smilingpirate-site` | `smilingpirate-site` | `sp-theme-system`, `sp-music-hero`, `sp-learning-languages-with-movies` | direct host / publish owner | site shell and mounted route surfaces; publish target and deployment packaging; integrated host landing and entry points | Host ownership starts only at publication and route integration, not at upstream semantics. |
| ECO-S2 | Host publication | Inject and adopt shared outputs without semantic takeover | `smilingpirate-site` | `smilingpirate-site`, `sp-theme-system` | `sp-gh-copilot-kit`, `sp-music-hero`, `sp-learning-languages-with-movies` | direct host / publish owner | theme and artefact injection scripts; upstream output adoption rules; no-semantic-takeover guardrails | Host adoption is downstream and must not silently redefine upstream meaning. |

## Reading
This capability-first view answers "who touches this capability?" while the owner-first map answers "where must semantic change start?".

The key governance split remains:

- planes and semantic ownership governance -> `capability-modeling-toolkit`
- lanes and orchestration governance -> `sp-gh-copilot-kit`
- shared-system contract governance -> `sp-theme-system`
- product semantics -> product repos
- host publication and injection -> `smilingpirate-site`

The library-like target state is:

- one semantic owner per stable capability
- explicit interaction surfaces for other repos
- downstream adoption without silent semantic takeover
- reusable owner repos that remain independently useful even if the current portfolio context changes

That standalone-value rule applies especially to:

- `sp-gh-copilot-kit` as an independent workflow kit
- `sp-theme-system` as an independent theming and shell contract package
- `capability-modeling-toolkit` as an independent workbook-backed capability-modeling toolkit

## Source notes
This map is a best-effort portfolio-level companion view derived from:

- `docs/visualization-src/sp-ecosystem-capability-map.md`
- `sp-gh-copilot-kit/README.md`
- `sp-theme-system/README.md`
- `capability-modeling-toolkit/README.md`
- `sp-music-hero/README.md`
- `sp-learning-languages-with-movies/README.md`
