Skip to content

feat: AI Artifacts Registry Design and Schema #432

@katriendg

Description

@katriendg

Parent: #431

Issue Description

Create the AI Artifacts Registry as a centralized JSON file that stores persona tags, maturity levels, dependency mappings, and metadata for all HVE-Core artifacts. This registry replaces in-frontmatter metadata (avoiding Copilot CLI conflicts) and serves as the single source of truth for build-time filtering and install-time selection.

Motivation

Storing persona, maturity, and dependency metadata in frontmatter causes issues with Copilot CLI discovery and creates coupling between artifact content and distribution concerns. An external registry cleanly separates these concerns and enables querying at both build time and install time.

Maturity Field Problem

The current maturity frontmatter field (used for extension channel filtering) breaks Copilot CLI compatibility:

Current extension packaging reads maturity from frontmatter in Prepare-Extension.ps1:

# Current approach (problematic)
$data = ConvertFrom-Yaml -Yaml $yamlContent
$maturity = $data.maturity  # Causes Copilot CLI rejection

Moving maturity to the external registry eliminates this conflict while preserving the channel-based filtering capability.

Deliverables

1. Registry JSON Schema

Create scripts/linting/schemas/ai-artifacts-registry.schema.json defining:

  • version field for registry format versioning
  • personas.definitions object with persona ID, name, and description
  • Per-artifact-type sections (agents, prompts, instructions, skills) with:
    • maturity enum field (stable, preview, experimental) for channel filtering
    • personas array (list of persona IDs)
    • tags array (freeform categorization)
    • requires object with prompts and instructions arrays (dependency mapping)

2. Artifact Registry File

Create .github/ai-artifacts-registry.json containing:

  • Persona taxonomy (developer, tpm, devops, architect, technical-writer)
  • Maturity level for each artifact (defaults to stable)
  • Entries for all artifacts with placeholder persona tags
  • Agent-to-prompt and agent-to-instruction dependency mappings
  • Universal artifact designations

Example registry structure:

{
  "$schema": "../scripts/linting/schemas/ai-artifacts-registry.schema.json",
  "version": "1.0",
  "personas": {
    "definitions": {
      "developer": { "name": "Developer", "description": "Software engineers writing code" },
      "tpm": { "name": "Technical PM", "description": "Program/product managers" }
    }
  },
  "agents": {
    "task-planner": {
      "maturity": "stable",
      "personas": ["developer", "architect"],
      "tags": ["rpi", "planning"],
      "requires": {
        "prompts": ["task-plan"],
        "instructions": []
      }
    }
  }
}

3. Validation Integration

  • Add registry validation to npm run lint:frontmatter or as a new npm run lint:registry script
  • Validate that all referenced artifact files exist on disk
  • Validate that persona IDs in artifact entries match persona definitions
  • Validate that dependency references point to existing artifact entries

Acceptance Criteria

  • JSON schema validates the registry structure including maturity enum
  • Registry file contains entries for all current artifacts (21 agents, 22 prompts, 17 instructions, 1 skill)
  • Every artifact entry includes maturity level (stable, preview, experimental)
  • Every artifact entry supports persona tag arrays
  • Universal artifacts are tagged with all personas
  • Agent dependency mappings capture required prompts and instructions
  • Validation script catches missing files, invalid persona IDs, invalid maturity values, and broken dependency references
  • Schema is registered in scripts/linting/schemas/schema-mapping.json

Technical Notes

  • Registry lives at .github/ai-artifacts-registry.json alongside the artifacts it describes
  • Schema follows existing patterns in scripts/linting/schemas/
  • Persona IDs use kebab-case: developer, tpm, devops, architect, technical-writer
  • Maturity values: stable (default), preview, experimental
  • Artifacts without explicit persona tags should default to all personas (universal)
  • Extension packaging workflow (Get-AllowedMaturities, Get-DiscoveredAgents) must be updated to use registry

Additional Context

Metadata

Metadata

Assignees

Labels

featureNew feature triggering minor version bump

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions