Files
moko-platform/templates/schemas
Jonathan Miller fe3644204a
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 1s
Universal: Cascade Main → Dev / Cascade main → branches (push) Successful in 2s
Platform: moko-platform CI / Gate 1: Code Quality (push) Failing after 45s
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Has been cancelled
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Has been cancelled
Platform: moko-platform CI / Gate 4: Governance (push) Has been cancelled
Platform: moko-platform CI / Gate 5: Template Integrity (push) Has been cancelled
Platform: moko-platform CI / CI Summary (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
refactor: remove HCL definitions — Template repos are now canonical
- Delete definitions/ directory (6 default + 48 sync = ~5000 lines of HCL)
- Delete lib/Enterprise/DefinitionParser.php
- Move manifest-schema.xsd to templates/schemas/
- Add governance.yml template for Template repos
- Update RepositorySynchronizer to remove DefinitionParser dependency
- Update push_files.php to detect platform from manifest.xml via API
- Update auto_detect_platform.php to gracefully handle missing schema dir
- Update archive_repo.php to remove sync def cleanup step

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-26 23:42:45 -05:00
..

Repository Structure Schemas

This directory contains template schema files for defining custom repository structures.

Overview

Schema files define the expected structure, files, and directories for different types of repositories in the Moko Consulting ecosystem.

Available Schemas

template-repository-structure.xml

A base template schema that can be customized for new repository types. This template includes:

  • Required root-level files (README, LICENSE, CHANGELOG, etc.)
  • Core directory structure (docs, scripts, .github)
  • Basic GitHub Actions workflow requirements
  • Documentation standards

Usage

To create a custom schema:

  1. Copy template-repository-structure.xml to your desired location
  2. Update the <metadata> section with your repository type details
  3. Customize the <root-files> and <directories> sections
  4. Reference appropriate templates from the /templates/ directory
  5. Save with a descriptive name (e.g., my-project-type.xml)

Schema Structure

Each schema file contains:

  • Metadata: Repository type, platform, maintainer information
  • Root Files: Required files in the repository root
  • Directories: Required and optional directory structure
  • Files within Directories: Specific files expected in each directory

Requirement Status Values

  • required: Must be present
  • suggested: Recommended but optional
  • optional: Nice to have
  • not-allowed: Should not be present

Template References

Use the <template> element to reference template files:

<file extension="md">
  <name>README.md</name>
  <template>templates/docs/required/template-README.md</template>
</file>

Always Overwrite Flag

Use <always-overwrite>false</always-overwrite> to protect files from being overwritten during sync:

<file extension="gitignore">
  <name>.gitignore</name>
  <always-overwrite>false</always-overwrite>
</file>
  • Schema validation: /scripts/validate/validate_structure_v2.py
  • Auto-detection: /scripts/validate/auto_detect_platform.php
  • Main schemas: /schemas/structures/