# gerivdb/skills architecture

> Architecture diagram of the GitHub repository gerivdb/skills, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gerivdb/skills
- Repository: https://github.com/gerivdb/skills

## Overview

#### Purpose and Entry Points
This is the ecosystem-1 canonical Skills registry: a declarative catalog plus local tooling for discovering, validating, loading, indexing, and governing skill definitions. Primary entry points are `REGISTRY.yaml`, `MANIFEST.json`, and `registry.json`; each skill is principally expressed as a `SKILL.md`. Operational Python entry points include `skill_loader.py`, `skill_manager.py`, and `skill_registry.py`.

#### Skill Catalog and Content Boundary
The registry separates maintained native skills, repository-local operational skills, and assimilated/external content. Native capability families reside under `native/foundational/`, `native/domain/`, and `native/engines/`; each leaf exposes a portable instruction contract such as `native/engines/dag-rag/SKILL.md`. Repository-local skills are held in `skills/`, while Perplexity-oriented source and packaged variants are separated in `perplexity/skills/` and `perplexity/skills_pack/`. External material is isolated behind the submodule boundary at `ext/marketingskills/`.

#### Registry, Manifest, and Taxonomy Model
`REGISTRY.yaml` is the canonical registered-skill index, with `MANIFEST.json` providing agentskills.io compatibility and `registry.json` likely serving generated/consumable registry output. Classification and graph metadata are distinct from skill prose: `TAXONOMY.md`, `TAXONOMY/coords.yaml`, and `TAXONOMY/graph.yaml` define placement and relationships. Ecosystem identity and scope are governed by `ECOS_ROOT.json`, `citizens.yaml`, and `SCOPE.yaml`.

#### Loading and Runtime Control
The local Python runtime supplies lazy skill resolution and lifecycle control rather than a web service. `skill_loader.py` loads requested skills; `skill_registry.py` provides registry access; and `skill_lock_file.py` supports lock-state handling. `ctulu_resolver.py` and `verse_context.py` add context/resolution layers around skill selection. The lazy-loading architecture is explicitly documented in `ADR/ADR-001-lazy-skill-menu.md` and planned through `PRD/PRD-005-skill-loader-ctulu-wiring.md`.

#### Search, IR, and Graph Pipeline
Skills can be transformed into intermediate/searchable representations through `skill_ir/skill_ir.py`, indexed by `scripts/index_skills.py`, and queried by `scripts/search_skills.py`. Vector-search infrastructure is represented by `tools/core/zvec_manager.py` and persisted metadata in `data/zvec/zvec_index.json`. Graph-oriented capabilities are defined as composable skills, including `skills/ctulu-graph-builder/SKILL.md`, `skills/ctulu-louvain-clusterer/SKILL.md`, and `skills/ctulu-pagerank-runner/SKILL.md`; the canonical relationship layer remains under `TAXONOMY/`.

#### Validation and Publication Flow
Contribution flow is: add or change `SKILL.md` content, update registry/manifest metadata, run validators, then publish through Git-based review and CI. Core enforcement tools are `tools/validate-skills.py`, `tools/validate-agentic.py`, and `tools/registry-gen.py`. Git hooks under `.githooks/` enforce local quality gates, while GitHub Actions in `.github/workflows/validate-skills.yml` and `.github/workflows/registry-sync.yml` validate and synchronize registry state. The registry is designed for consumption by the external `ECOYSTEM` federator as a Git submodule, not as an independently deployed application.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Skill Catalog"]
  node_registry_yaml["Canonical Registry<br/>registry index<br/>[REGISTRY.yaml]"]
  node_manifest["AgentSkills Manifest<br/>compatibility manifest<br/>[MANIFEST.json]"]
  node_registry_json["Consumable Registry<br/>generated registry<br/>[registry.json]"]
  node_native_skills["Native Skill Families<br/>maintained skills<br/>[SKILL.md]"]
  node_local_skills["Repository-local Skills<br/>operational skills<br/>[SKILL.md]"]
  node_perplexity_content["Perplexity Content<br/>packaged skill variants"]
  node_external_content["External Skills Submodule<br/>external content"]
end

subgraph group_runtime["Local Runtime"]
  node_skill_loader["Skill Loader<br/>Python loader<br/>[skill_loader.py]"]
  node_skill_registry["Registry Access<br/>Python registry API<br/>[skill_registry.py]"]
  node_resolution_context["Context Resolver<br/>selection context<br/>[ctulu_resolver.py]"]
  node_lock_state["Lock State<br/>lock handling<br/>[skill_lock_file.py]"]
end

subgraph group_discovery["Search &amp; Graph"]
  node_taxonomy["Taxonomy &amp; Relations<br/>classification graph<br/>[graph.yaml]"]
  node_skill_ir["Skill IR<br/>intermediate representation<br/>[skill_ir.py]"]
  node_indexer["Skill Indexer<br/>index pipeline<br/>[index_skills.py]"]
  node_search["Skill Search<br/>query tool<br/>[search_skills.py]"]
  node_vector_index[("Vector Index<br/>search metadata<br/>[zvec_index.json]")]
end

subgraph group_governance["Governance &amp; Publication"]
  node_validators["Validation Tools<br/>quality gates<br/>[validate-skills.py]"]
  node_registry_generator["Registry Generator<br/>publication generator<br/>[registry-gen.py]"]
  node_automation["Hooks &amp; CI Sync<br/>publication automation<br/>[registry-sync.yml]"]
  node_federator{{"ECOYSTEM Federator<br/>external consumer"}}
end

node_native_skills -->|"registered in"| node_registry_yaml
node_local_skills -->|"registered in"| node_registry_yaml
node_perplexity_content -.->|"cataloged by"| node_registry_yaml
node_external_content -.->|"isolated from"| node_registry_yaml
node_registry_yaml -->|"aligned with"| node_manifest
node_registry_yaml -->|"generated to"| node_registry_json
node_taxonomy -->|"classifies"| node_registry_yaml
node_skill_registry -->|"reads"| node_registry_yaml
node_resolution_context -->|"guides selection"| node_skill_loader
node_skill_loader -->|"resolves through"| node_skill_registry
node_skill_loader -->|"uses"| node_lock_state
node_skill_loader -->|"lazy-loads"| node_local_skills
node_native_skills -->|"transformed into"| node_skill_ir
node_local_skills -->|"transformed into"| node_skill_ir
node_skill_ir -->|"indexed by"| node_indexer
node_indexer -->|"writes"| node_vector_index
node_search -->|"queries"| node_vector_index
node_native_skills -->|"validated by"| node_validators
node_local_skills -->|"validated by"| node_validators
node_registry_yaml -->|"generates"| node_registry_generator
node_registry_generator -->|"publishes"| node_registry_json
node_validators -->|"gates"| node_automation
node_automation -->|"synchronizes"| node_registry_json
node_registry_json -->|"consumed as submodule"| node_federator

click node_registry_yaml "https://github.com/gerivdb/skills/blob/main/REGISTRY.yaml"
click node_manifest "https://github.com/gerivdb/skills/blob/main/MANIFEST.json"
click node_registry_json "https://github.com/gerivdb/skills/blob/main/registry.json"
click node_native_skills "https://github.com/gerivdb/skills/blob/main/native/engines/dag-rag/SKILL.md"
click node_local_skills "https://github.com/gerivdb/skills/blob/main/skills/ctulu-graph-builder/SKILL.md"
click node_taxonomy "https://github.com/gerivdb/skills/blob/main/TAXONOMY/graph.yaml"
click node_skill_loader "https://github.com/gerivdb/skills/blob/main/skill_loader.py"
click node_skill_registry "https://github.com/gerivdb/skills/blob/main/skill_registry.py"
click node_resolution_context "https://github.com/gerivdb/skills/blob/main/ctulu_resolver.py"
click node_lock_state "https://github.com/gerivdb/skills/blob/main/skill_lock_file.py"
click node_skill_ir "https://github.com/gerivdb/skills/blob/main/skill_ir/skill_ir.py"
click node_indexer "https://github.com/gerivdb/skills/blob/main/scripts/index_skills.py"
click node_search "https://github.com/gerivdb/skills/blob/main/scripts/search_skills.py"
click node_vector_index "https://github.com/gerivdb/skills/blob/main/data/zvec/zvec_index.json"
click node_validators "https://github.com/gerivdb/skills/blob/main/tools/validate-skills.py"
click node_registry_generator "https://github.com/gerivdb/skills/blob/main/tools/registry-gen.py"
click node_automation "https://github.com/gerivdb/skills/blob/main/.github/workflows/registry-sync.yml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_registry_yaml,node_manifest,node_registry_json,node_native_skills,node_local_skills,node_perplexity_content,node_external_content toneBlue
class node_skill_loader,node_skill_registry,node_resolution_context,node_lock_state toneAmber
class node_taxonomy,node_skill_ir,node_indexer,node_search,node_vector_index toneMint
class node_validators,node_registry_generator,node_automation,node_federator toneRose
```

## Components

### Skill Catalog

Portable skill content and source boundaries.

- [Canonical Registry](https://github.com/gerivdb/skills/blob/main/REGISTRY.yaml): registry index · Authoritative registered-skill index. · `REGISTRY.yaml`
- [AgentSkills Manifest](https://github.com/gerivdb/skills/blob/main/MANIFEST.json): compatibility manifest · `MANIFEST.json`
- [Consumable Registry](https://github.com/gerivdb/skills/blob/main/registry.json): generated registry · `registry.json`
- [Native Skill Families](https://github.com/gerivdb/skills/blob/main/native/engines/dag-rag/SKILL.md): maintained skills · Foundational, domain, and engine capabilities. · `native/engines/dag-rag/SKILL.md`
- [Repository-local Skills](https://github.com/gerivdb/skills/blob/main/skills/ctulu-graph-builder/SKILL.md): operational skills · Includes composable graph capabilities. · `skills/ctulu-graph-builder/SKILL.md`
- **Perplexity Content**: packaged skill variants · Source and packaged variants are separated.
- **External Skills Submodule**: external content · Assimilated material remains isolated.

### Local Runtime

Lazy resolution and lifecycle control.

- [Skill Loader](https://github.com/gerivdb/skills/blob/main/skill_loader.py): Python loader · Lazily loads requested skills. · `skill_loader.py`
- [Registry Access](https://github.com/gerivdb/skills/blob/main/skill_registry.py): Python registry API · `skill_registry.py`
- [Context Resolver](https://github.com/gerivdb/skills/blob/main/ctulu_resolver.py): selection context · Adds contextual resolution around skill selection. · `ctulu_resolver.py`
- [Lock State](https://github.com/gerivdb/skills/blob/main/skill_lock_file.py): lock handling · `skill_lock_file.py`

### Search & Graph

IR, vector search, and relationship metadata.

- [Taxonomy & Relations](https://github.com/gerivdb/skills/blob/main/TAXONOMY/graph.yaml): classification graph · Coordinates and canonical skill relationships. · `TAXONOMY/graph.yaml`
- [Skill IR](https://github.com/gerivdb/skills/blob/main/skill_ir/skill_ir.py): intermediate representation · Transforms skills into searchable representations. · `skill_ir/skill_ir.py`
- [Skill Indexer](https://github.com/gerivdb/skills/blob/main/scripts/index_skills.py): index pipeline · `scripts/index_skills.py`
- [Skill Search](https://github.com/gerivdb/skills/blob/main/scripts/search_skills.py): query tool · `scripts/search_skills.py`
- [Vector Index](https://github.com/gerivdb/skills/blob/main/data/zvec/zvec_index.json): search metadata · Persisted vector-search index. · `data/zvec/zvec_index.json`

### Governance & Publication

Validation, synchronization, and federation.

- [Validation Tools](https://github.com/gerivdb/skills/blob/main/tools/validate-skills.py): quality gates · Validate skill and agentic contracts. · `tools/validate-skills.py`
- [Registry Generator](https://github.com/gerivdb/skills/blob/main/tools/registry-gen.py): publication generator · `tools/registry-gen.py`
- [Hooks & CI Sync](https://github.com/gerivdb/skills/blob/main/.github/workflows/registry-sync.yml): publication automation · Local hooks and GitHub Actions enforce and synchronize state. · `.github/workflows/registry-sync.yml`
- **ECOYSTEM Federator**: external consumer · Consumes this registry as a Git submodule.

## Connections

- Native Skill Families → Canonical Registry: registered in
- Repository-local Skills → Canonical Registry: registered in
- Perplexity Content → Canonical Registry: cataloged by
- External Skills Submodule → Canonical Registry: isolated from
- Canonical Registry → AgentSkills Manifest: aligned with
- Canonical Registry → Consumable Registry: generated to
- Taxonomy & Relations → Canonical Registry: classifies
- Registry Access → Canonical Registry: reads
- Context Resolver → Skill Loader: guides selection
- Skill Loader → Registry Access: resolves through
- Skill Loader → Lock State: uses
- Skill Loader → Repository-local Skills: lazy-loads
- Native Skill Families → Skill IR: transformed into
- Repository-local Skills → Skill IR: transformed into
- Skill IR → Skill Indexer: indexed by
- Skill Indexer → Vector Index: writes
- Skill Search → Vector Index: queries
- Native Skill Families → Validation Tools: validated by
- Repository-local Skills → Validation Tools: validated by
- Canonical Registry → Registry Generator: generates
- Registry Generator → Consumable Registry: publishes
- Validation Tools → Hooks & CI Sync: gates
- Hooks & CI Sync → Consumable Registry: synchronizes
- Consumable Registry → ECOYSTEM Federator: consumed as submodule
