Skip to content

Repository Structure: Schema Consolidation Migration #1288

Description

@ashleyshaw

name: "Repository Structure: Schema Consolidation Migration"
labels:

  • type:task
  • status:needs-more-info
  • priority:medium
  • component:repo-structure
  • area:documentation
    assignees: []

Overview

Consolidate schema files from current location (.github/schema/) to unified hidden folder (.github/.schemas/) following awesome-copilot pattern. This requires updating 200+ references across scripts, workflows, and documentation.

Status: Ready for implementation (Extended audit complete)

Problem Statement

The repository has schema files in .github/schema/ (26 files) with:

  • Inconsistent references across 200+ locations (scripts, workflows, docs)
  • Hard-coded paths in 4 validation scripts that need updating
  • Boundary marker duplication between .github/.github/schemas/ and .github/.schemas/
  • Unclear separation between portable schemas (12) and repo-local schemas (5)

The target consolidation location .github/.schemas/ is prepared but empty.

Definition of Ready (DoR)

  • Extended audit completed (all 26 files and 200+ references mapped)
  • Consolidation plan documented in project folder
  • Target location identified: .github/.schemas/ (nested hidden folder)
  • Risk assessment completed (Low risk - no circular dependencies)
  • Implementation sequence defined (Phase 1-4)
  • Branch created with proper naming: refactor/repo-structure-schema-consolidation

Definition of Done (DoD)

Phase 1: Validation & Preparation

  • Review extended audit findings and consolidation map
  • Confirm target location: .github/.schemas/
  • Verify all 26 source files are accounted for
  • Document any script dependencies not yet identified

Phase 2: Documentation Updates

  • Update CLAUDE.md - Repository boundaries table, schema location reference
  • Update .github/custom-instructions.md - Path references
  • Update instructions/file-organisation.instructions.md - Schema folder location
  • Update all documentation references (150+) - Bulk find/replace .github/schema/.github/.schemas/

Phase 3: File Migration

  • Move all 26 files from .github/schema/ to .github/.schemas/
    • 25 schema JSON files
    • 2 example files (in examples/ subdirectory)
    • 5 memory system schemas (in memory/ subdirectory)
    • 1 README.md (merge with existing)
  • Update .github/schema/schema-registry.json references in .github/.schemas/schema-registry.json

Phase 4: Script & Configuration Updates

  • Update .github/scripts/agents/branding-unified.agent.js - Path references (2 locations)
  • Update .github/scripts/verify-wceu-readiness.js - Directory check logic
  • Update 4 workflow files - Path triggers and references
  • Update package.json - Schema glob patterns from schema/**.schemas/**

Phase 5: Validation & Cleanup

  • Run npm run validate:json:schemas - Verify schemas validate
  • Run all CI workflows - Confirm passing
  • Verify no broken references in documentation
  • Delete old .github/schema/ directory (after verification)
  • Confirm .github/.github/schemas/ remains as repo-local boundary marker
  • Update CHANGELOG.md with migration entry

Quality Gates

  • All hardcoded script paths updated and tested
  • CI/CD pipeline passes
  • Zero broken documentation links
  • Zero references to old .github/schema/ location (except history)

Audit Findings Summary

Locations Involved:

  • Source: .github/schema/ (26 files - active, contains all production schemas)
  • Target: .github/.schemas/ (nested hidden folder - prepared, currently empty)
  • Boundary: .github/.github/schemas/ (repo-local marker - will remain)

File Inventory (26 total):

  • 25 JSON schema files (12 portable, 5 repo-local, 8 supporting)
  • 2 example files
  • 5 memory system schemas
  • 1 README.md

Reference Map (200+ total):

  • 4 hardcoded script references (P1)
  • 4 workflow file references (P1)
  • 150+ documentation references (P2)
  • 5 configuration file references (P2)

Risk Assessment: 🟢 Low Risk

  • No circular dependencies
  • Well-isolated schema system
  • Can proceed independently
  • Estimated effort: 6-8 hours

Implementation Plan

See detailed plan in:
projects/active/repository-maintenance-infrastructure/SCHEMA-CONSOLIDATION-MIGRATION-PLAN.md

Phases:

  1. Validation & Preparation (~1 hour)
  2. Documentation Updates (~2-3 hours)
  3. File Migration (~30 minutes)
  4. Script & Configuration Updates (~1-2 hours)
  5. Validation & Cleanup (~1 hour)

Related Issues & PRs

  • Related: Wave 5 Documentation Audit (file organization alignment)
  • Related: Repository Maintenance Infrastructure project
  • Blocks: Any documentation or tooling relying on schema location clarity
  • Blocked By: None

Child Issues (to be created)

  • Phase 1: Validate schema consolidation scope and dependencies
  • Phase 2: Update documentation and governance files
  • Phase 3: Migrate schema files to .github/.schemas/
  • Phase 4: Update scripts and workflows with new paths
  • Phase 5: Validation, cleanup, and post-migration verification

Notes

  • Use .github/.schemas/ as canonical location (hidden folder, nested in .github/)
  • Archive migration of .github/instructions/ to root instructions/ is separate initiative
  • Consolidate with agents restructuring (PR to follow for that initiative)
  • Maintain boundary markers for clarity on portable vs. repo-local assets

Checklist for Reviewer

  • Audit findings are accurate and complete
  • Consolidation plan is realistic and achievable
  • Implementation sequence makes sense
  • Risk assessment is reasonable
  • Ready to proceed with Phase 1

Metadata

Metadata

Assignees

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions