Public Access
34ef05bd6e
Generic: Repo Health / Site Health (push) Has been cancelled
Universal: Cascade Main → Dev / Cascade main → branches (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Platform: moko-platform CI / Gate 1: Code Quality (push) Has been cancelled
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
- Replace all .github/workflows refs in definitions with .mokogitea/workflows - Add all 13 universal workflows to every platform definition - Fix ISSUE_TEMPLATE paths: .github/ → .mokogitea/ - Fix template source paths: templates/github/ → templates/mokogitea/ - Remove 60+ dead template references pointing to non-existent files - Rename templates/gitea/ directory to templates/mokogitea/ - Add orphaned workflows (ci-platform, issue-branch) to definitions Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
638 lines
25 KiB
Terraform
638 lines
25 KiB
Terraform
/**
|
|
* Default Repository Structure Definition
|
|
* Default repository structure applicable to all repository types with minimal requirements
|
|
*
|
|
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
* Schema Version: 1.0
|
|
*/
|
|
|
|
locals {
|
|
repository_structure = {
|
|
metadata = {
|
|
name = "Default Repository Structure"
|
|
description = "Default repository structure applicable to all repository types with minimal requirements"
|
|
repository_type = "library"
|
|
platform = "multi-platform"
|
|
last_updated = "2026-01-16T00:00:00Z"
|
|
maintainer = "Moko Consulting"
|
|
version = "05.00.00"
|
|
schema_version = "1.0"
|
|
}
|
|
|
|
root_files = [
|
|
{
|
|
name = "README.md"
|
|
extension = "md"
|
|
description = "Project overview and documentation"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
protected = true
|
|
audience = "general"
|
|
source_path = "templates/docs/required"
|
|
source_filename = "template-README.md"
|
|
source_type = "template"
|
|
destination_path = "."
|
|
destination_filename = "README.md"
|
|
create_path = false
|
|
template = "templates/docs/required/template-README.md"
|
|
},
|
|
{
|
|
name = "LICENSE"
|
|
extension = ""
|
|
description = "License file (GPL-3.0-or-later)"
|
|
requirement_status = "required"
|
|
audience = "general"
|
|
source_path = "templates/licenses"
|
|
source_filename = "GPL-3.0"
|
|
source_type = "template"
|
|
destination_path = "."
|
|
destination_filename = "LICENSE"
|
|
create_path = false
|
|
template = "templates/licenses/GPL-3.0"
|
|
},
|
|
{
|
|
name = "CHANGELOG.md"
|
|
extension = "md"
|
|
description = "Version history and changes"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
protected = true
|
|
audience = "general"
|
|
source_path = "templates/docs/required"
|
|
source_filename = "template-CHANGELOG.md"
|
|
source_type = "template"
|
|
destination_path = "."
|
|
destination_filename = "CHANGELOG.md"
|
|
create_path = false
|
|
template = "templates/docs/required/template-CHANGELOG.md"
|
|
},
|
|
{
|
|
name = "CONTRIBUTING.md"
|
|
extension = "md"
|
|
description = "Contribution guidelines"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
protected = true
|
|
audience = "contributor"
|
|
source_path = "templates/docs/required"
|
|
source_filename = "template-CONTRIBUTING.md"
|
|
source_type = "template"
|
|
destination_path = "."
|
|
destination_filename = "CONTRIBUTING.md"
|
|
create_path = false
|
|
template = "templates/docs/required/template-CONTRIBUTING.md"
|
|
},
|
|
{
|
|
name = "SECURITY.md"
|
|
extension = "md"
|
|
description = "Security policy and vulnerability reporting"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
protected = true
|
|
audience = "general"
|
|
source_path = "templates/docs/required"
|
|
source_filename = "template-SECURITY.md"
|
|
source_type = "template"
|
|
destination_path = "."
|
|
destination_filename = "SECURITY.md"
|
|
create_path = false
|
|
template = "templates/docs/required/template-SECURITY.md"
|
|
},
|
|
{
|
|
name = "CODE_OF_CONDUCT.md"
|
|
extension = "md"
|
|
description = "Community code of conduct"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
protected = true
|
|
audience = "contributor"
|
|
source_path = "templates/docs/extra"
|
|
source_filename = "template-CODE_OF_CONDUCT.md"
|
|
source_type = "template"
|
|
destination_path = "."
|
|
destination_filename = "CODE_OF_CONDUCT.md"
|
|
create_path = false
|
|
template = "templates/docs/extra/template-CODE_OF_CONDUCT.md"
|
|
},
|
|
{
|
|
name = "ROADMAP.md"
|
|
extension = "md"
|
|
description = "Project roadmap with version goals and milestones"
|
|
requirement_status = "suggested"
|
|
always_overwrite = false
|
|
protected = true
|
|
audience = "general"
|
|
source_path = "templates/docs/extra"
|
|
source_filename = "template-ROADMAP.md"
|
|
source_type = "template"
|
|
destination_path = "."
|
|
destination_filename = "ROADMAP.md"
|
|
create_path = false
|
|
template = "templates/docs/extra/template-ROADMAP.md"
|
|
},
|
|
{
|
|
name = "GOVERNANCE.md"
|
|
extension = "md"
|
|
description = "Project governance model and decision-making process"
|
|
requirement_status = "suggested"
|
|
always_overwrite = false
|
|
protected = true
|
|
audience = "general"
|
|
source_path = "templates/docs/extra"
|
|
source_filename = "template-GOVERNANCE.md"
|
|
source_type = "template"
|
|
destination_path = "."
|
|
destination_filename = "GOVERNANCE.md"
|
|
create_path = false
|
|
template = "templates/docs/extra/template-GOVERNANCE.md"
|
|
},
|
|
{
|
|
name = ".gitignore"
|
|
extension = "gitignore"
|
|
description = "Git ignore patterns"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
audience = "developer"
|
|
},
|
|
{
|
|
name = ".gitattributes"
|
|
extension = "gitattributes"
|
|
description = "Git attributes configuration"
|
|
requirement_status = "required"
|
|
audience = "developer"
|
|
},
|
|
{
|
|
name = ".editorconfig"
|
|
extension = "editorconfig"
|
|
description = "Editor configuration for consistent coding style"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
audience = "developer"
|
|
},
|
|
{
|
|
name = "Makefile"
|
|
description = "Build automation"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
audience = "developer"
|
|
source_path = "templates/makefiles"
|
|
source_filename = "Makefile.generic.template"
|
|
source_type = "template"
|
|
destination_path = "."
|
|
destination_filename = "Makefile"
|
|
create_path = false
|
|
template = "templates/makefiles/Makefile.generic.template"
|
|
},
|
|
{
|
|
name = "composer.json"
|
|
extension = "json"
|
|
description = "Composer manifest — requires mokoconsulting-tech/enterprise for CLI scripts and tooling"
|
|
required = true
|
|
always_overwrite = false
|
|
audience = "developer"
|
|
template = "templates/configs/composer.generic.json"
|
|
},
|
|
{
|
|
name = "renovate.json"
|
|
extension = "json"
|
|
description = "Renovate dependency management configuration"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
audience = "developer"
|
|
template = "templates/configs/renovate.json"
|
|
}
|
|
]
|
|
|
|
directories = [
|
|
{
|
|
name = "docs"
|
|
path = "docs"
|
|
description = "Documentation directory"
|
|
requirement_status = "required"
|
|
purpose = "Contains comprehensive project documentation"
|
|
files = [
|
|
{
|
|
name = "index.md"
|
|
extension = "md"
|
|
description = "Documentation index"
|
|
requirement_status = "suggested"
|
|
template = "templates/docs/index.md"
|
|
},
|
|
{
|
|
name = "INSTALLATION.md"
|
|
extension = "md"
|
|
description = "Installation and setup instructions"
|
|
requirement_status = "required"
|
|
audience = "general"
|
|
source_path = "templates/docs/required"
|
|
source_filename = "template-INSTALLATION.md"
|
|
source_type = "template"
|
|
destination_path = "docs"
|
|
destination_filename = "INSTALLATION.md"
|
|
create_path = true
|
|
template = "templates/docs/required/template-INSTALLATION.md"
|
|
},
|
|
{
|
|
name = "API.md"
|
|
extension = "md"
|
|
description = "API documentation"
|
|
requirement_status = "suggested"
|
|
},
|
|
{
|
|
name = "ARCHITECTURE.md"
|
|
extension = "md"
|
|
description = "Architecture documentation"
|
|
requirement_status = "suggested"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
name = "scripts"
|
|
path = "scripts"
|
|
description = "Repo-specific scripts — not managed by MokoStandards sync"
|
|
required = false
|
|
purpose = "Optional directory for repo-specific build helpers and one-off scripts. MokoStandards tools are installed via Composer (mokoconsulting-tech/enterprise) and called through vendor/bin/."
|
|
files = [
|
|
{
|
|
name = "MokoStandards.override.xml"
|
|
extension = "xml"
|
|
description = "MokoStandards sync override configuration"
|
|
requirement_status = "optional"
|
|
always_overwrite = false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
name = "src"
|
|
path = "src"
|
|
description = "Source code directory"
|
|
requirement_status = "required"
|
|
purpose = "Contains application source code"
|
|
},
|
|
{
|
|
name = "tests"
|
|
path = "tests"
|
|
description = "Test files"
|
|
requirement_status = "suggested"
|
|
purpose = "Contains unit tests, integration tests, and test fixtures"
|
|
subdirectories = [
|
|
{
|
|
name = "unit"
|
|
path = "tests/unit"
|
|
description = "Unit tests"
|
|
requirement_status = "suggested"
|
|
},
|
|
{
|
|
name = "integration"
|
|
path = "tests/integration"
|
|
description = "Integration tests"
|
|
requirement_status = "optional"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
name = ".mokogitea"
|
|
path = ".mokogitea"
|
|
description = "Gitea-specific configuration and workflows"
|
|
requirement_status = "required"
|
|
purpose = "Contains Gitea Actions workflows, manifest.xml, and CI/CD configuration"
|
|
subdirectories = [
|
|
{
|
|
name = "workflows"
|
|
path = ".mokogitea/workflows"
|
|
description = "Gitea Actions workflows (universal)"
|
|
requirement_status = "required"
|
|
files = [
|
|
{
|
|
name = "auto-bump.yml"
|
|
extension = "yml"
|
|
description = "Auto-bump patch version on push to dev"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = ".mokogitea/workflows/auto-bump.yml"
|
|
},
|
|
{
|
|
name = "auto-release.yml"
|
|
extension = "yml"
|
|
description = "Universal build and release pipeline on merge to main"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = ".mokogitea/workflows/auto-release.yml"
|
|
},
|
|
{
|
|
name = "branch-cleanup.yml"
|
|
extension = "yml"
|
|
description = "Auto-delete merged feature branches after PR merge"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = ".mokogitea/workflows/branch-cleanup.yml"
|
|
},
|
|
{
|
|
name = "cascade-dev.yml"
|
|
extension = "yml"
|
|
description = "Forward-merge main to dev and pre-release branches on push to main"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = ".mokogitea/workflows/cascade-dev.yml"
|
|
},
|
|
{
|
|
name = "cleanup.yml"
|
|
extension = "yml"
|
|
description = "Scheduled cleanup of retired workflows, stale branches, and old runs"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = ".mokogitea/workflows/cleanup.yml"
|
|
},
|
|
{
|
|
name = "gitleaks.yml"
|
|
extension = "yml"
|
|
description = "Secret scanning — detect leaked credentials, API keys, and tokens"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = ".mokogitea/workflows/gitleaks.yml"
|
|
},
|
|
{
|
|
name = "issue-branch.yml"
|
|
extension = "yml"
|
|
description = "Auto-create feature branch from issue assignment"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = ".mokogitea/workflows/issue-branch.yml"
|
|
},
|
|
{
|
|
name = "notify.yml"
|
|
extension = "yml"
|
|
description = "Notification workflow for release and CI events"
|
|
requirement_status = "suggested"
|
|
always_overwrite = true
|
|
template = ".mokogitea/workflows/notify.yml"
|
|
},
|
|
{
|
|
name = "pr-check.yml"
|
|
extension = "yml"
|
|
description = "Pull request validation checks"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = ".mokogitea/workflows/pr-check.yml"
|
|
},
|
|
{
|
|
name = "pre-release.yml"
|
|
extension = "yml"
|
|
description = "Manual pre-release builds for dev/alpha/beta/rc channels"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = ".mokogitea/workflows/pre-release.yml"
|
|
},
|
|
{
|
|
name = "repo-health.yml"
|
|
extension = "yml"
|
|
description = "Repository health checks and standards validation"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = ".mokogitea/workflows/repo-health.yml"
|
|
},
|
|
{
|
|
name = "security-audit.yml"
|
|
extension = "yml"
|
|
description = "Dependency and security audit workflow"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = ".mokogitea/workflows/security-audit.yml"
|
|
},
|
|
{
|
|
name = "update-server.yml"
|
|
extension = "yml"
|
|
description = "Update server XML feed with stability channel entries"
|
|
requirement_status = "required"
|
|
always_overwrite = true
|
|
template = ".mokogitea/workflows/update-server.yml"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
name = "ISSUE_TEMPLATE"
|
|
path = ".mokogitea/ISSUE_TEMPLATE"
|
|
description = "Issue templates"
|
|
requirement_status = "required"
|
|
files = [
|
|
{
|
|
name = "config.yml"
|
|
always_overwrite = true
|
|
template = "templates/mokogitea/ISSUE_TEMPLATE/config.yml"
|
|
},
|
|
{
|
|
name = "adr.md"
|
|
always_overwrite = true
|
|
template = "templates/mokogitea/ISSUE_TEMPLATE/adr.md"
|
|
},
|
|
{
|
|
name = "bug_report.md"
|
|
always_overwrite = true
|
|
template = "templates/mokogitea/ISSUE_TEMPLATE/bug_report.md"
|
|
},
|
|
{
|
|
name = "documentation.md"
|
|
always_overwrite = true
|
|
template = "templates/mokogitea/ISSUE_TEMPLATE/documentation.md"
|
|
},
|
|
{
|
|
name = "enterprise_support.md"
|
|
always_overwrite = true
|
|
template = "templates/mokogitea/ISSUE_TEMPLATE/enterprise_support.md"
|
|
},
|
|
{
|
|
name = "feature_request.md"
|
|
always_overwrite = true
|
|
template = "templates/mokogitea/ISSUE_TEMPLATE/feature_request.md"
|
|
},
|
|
{
|
|
name = "firewall-request.md"
|
|
always_overwrite = true
|
|
template = "templates/mokogitea/ISSUE_TEMPLATE/firewall-request.md"
|
|
},
|
|
{
|
|
name = "question.md"
|
|
always_overwrite = true
|
|
template = "templates/mokogitea/ISSUE_TEMPLATE/question.md"
|
|
},
|
|
{
|
|
name = "request-license.md"
|
|
always_overwrite = true
|
|
template = "templates/mokogitea/ISSUE_TEMPLATE/request-license.md"
|
|
},
|
|
{
|
|
name = "rfc.md"
|
|
always_overwrite = true
|
|
template = "templates/mokogitea/ISSUE_TEMPLATE/rfc.md"
|
|
},
|
|
{
|
|
name = "security.md"
|
|
always_overwrite = true
|
|
template = "templates/mokogitea/ISSUE_TEMPLATE/security.md"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
files = [
|
|
{
|
|
name = "manifest.xml"
|
|
extension = "xml"
|
|
description = "Repository manifest — version, platform, governance metadata"
|
|
requirement_status = "required"
|
|
always_overwrite = false
|
|
template = "managed-by-sync"
|
|
source_type = "programmatic"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
name = "node_modules"
|
|
path = "node_modules"
|
|
description = "Node.js dependencies (generated)"
|
|
requirement_status = "not-allowed"
|
|
purpose = "Generated directory that should not be committed"
|
|
},
|
|
{
|
|
name = "vendor"
|
|
path = "vendor"
|
|
description = "PHP dependencies (generated)"
|
|
requirement_status = "not-allowed"
|
|
purpose = "Generated directory that should not be committed"
|
|
},
|
|
{
|
|
name = "build"
|
|
path = "build"
|
|
description = "Build artifacts (generated)"
|
|
requirement_status = "not-allowed"
|
|
purpose = "Generated directory that should not be committed"
|
|
},
|
|
{
|
|
name = "dist"
|
|
path = "dist"
|
|
description = "Distribution files (generated)"
|
|
requirement_status = "not-allowed"
|
|
purpose = "Generated directory that should not be committed"
|
|
}
|
|
]
|
|
|
|
repository_requirements = {
|
|
secrets = [
|
|
{
|
|
name = "GH_TOKEN"
|
|
description = "Org-level GitHub PAT — configure in org Actions secrets"
|
|
required = true
|
|
scope = "organisation"
|
|
used_in = "GitHub Actions workflows"
|
|
},
|
|
{
|
|
name = "CODECOV_TOKEN"
|
|
description = "Codecov upload token for code coverage reporting"
|
|
required = false
|
|
scope = "repository"
|
|
used_in = "CI workflow code coverage step"
|
|
}
|
|
]
|
|
|
|
variables = [
|
|
{
|
|
name = "NODE_VERSION"
|
|
description = "Node.js version for CI/CD"
|
|
default_value = "18"
|
|
required = false
|
|
scope = "repository"
|
|
},
|
|
{
|
|
name = "PYTHON_VERSION"
|
|
description = "Python version for CI/CD"
|
|
default_value = "3.9"
|
|
required = false
|
|
scope = "repository"
|
|
}
|
|
]
|
|
|
|
branch_protections = [
|
|
{
|
|
branch_pattern = "main"
|
|
require_pull_request = true
|
|
required_approvals = 0
|
|
dismiss_stale_reviews = true
|
|
block_on_rejected_reviews = true
|
|
restrict_pushes = true
|
|
push_whitelist = ["jmiller"]
|
|
enable_force_push = true
|
|
force_push_whitelist = ["jmiller"]
|
|
enforce_admins = false
|
|
},
|
|
{
|
|
branch_pattern = "dev"
|
|
require_pull_request = false
|
|
required_approvals = 0
|
|
restrict_pushes = false
|
|
enable_force_push = true
|
|
force_push_whitelist = ["jmiller"]
|
|
},
|
|
{
|
|
branch_pattern = "rc/*"
|
|
require_pull_request = false
|
|
required_approvals = 0
|
|
restrict_pushes = false
|
|
enable_force_push = true
|
|
force_push_whitelist = ["jmiller"]
|
|
},
|
|
{
|
|
branch_pattern = "beta/*"
|
|
require_pull_request = false
|
|
required_approvals = 0
|
|
restrict_pushes = false
|
|
enable_force_push = true
|
|
force_push_whitelist = ["jmiller"]
|
|
},
|
|
{
|
|
branch_pattern = "alpha/*"
|
|
require_pull_request = false
|
|
required_approvals = 0
|
|
restrict_pushes = false
|
|
enable_force_push = true
|
|
force_push_whitelist = ["jmiller"]
|
|
}
|
|
]
|
|
|
|
repository_settings = {
|
|
has_issues = true
|
|
has_projects = true
|
|
has_wiki = false
|
|
has_discussions = false
|
|
allow_merge_commit = true
|
|
allow_squash_merge = true
|
|
allow_rebase_merge = false
|
|
delete_branch_on_merge = true
|
|
allow_auto_merge = false
|
|
}
|
|
|
|
labels = [
|
|
{
|
|
name = "bug"
|
|
color = "d73a4a"
|
|
description = "Something isn't working"
|
|
},
|
|
{
|
|
name = "enhancement"
|
|
color = "a2eeef"
|
|
description = "New feature or request"
|
|
},
|
|
{
|
|
name = "documentation"
|
|
color = "0075ca"
|
|
description = "Improvements or additions to documentation"
|
|
},
|
|
{
|
|
name = "security"
|
|
color = "ee0701"
|
|
description = "Security vulnerability or concern"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|