-
Notifications
You must be signed in to change notification settings - Fork 125
Description
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:
- VS Code silently ignores unknown frontmatter fields
- Copilot CLI rejects agents with unsupported fields, blocking all HVE-Core agents
- Related: #360 - Custom maturity frontmatter breaks Copilot CLI
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 rejectionMoving 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:
versionfield for registry format versioningpersonas.definitionsobject with persona ID, name, and description- Per-artifact-type sections (
agents,prompts,instructions,skills) with:maturityenum field (stable,preview,experimental) for channel filteringpersonasarray (list of persona IDs)tagsarray (freeform categorization)requiresobject withpromptsandinstructionsarrays (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:frontmatteror as a newnpm run lint:registryscript - 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.jsonalongside 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
- Existing schema patterns:
scripts/linting/schemas/ - Existing validation:
scripts/linting/Validate-MarkdownFrontmatter.ps1 - Maturity filtering logic:
scripts/extension/Prepare-Extension.ps1lines 65-83, 175-213 - Final persona-to-artifact assignments happen in Phase 6 after team discussion
- Related: #360 - Custom maturity frontmatter breaks Copilot CLI — maturity must move to registry
- Related: #251 - Update extension packaging to distribute skills — registry must include skills as a first-class artifact type with persona tags
- Migration work: See feat: Migrate Maturity Metadata to Registry and Remove from Frontmatter #438 (Phase 1b) for frontmatter removal and script updates