From 993f77d5a8d5d67e31fdabf4d1b924711a9915a3 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Mon, 11 May 2026 16:27:49 -0500 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20major=20version=20bump=2005.00.00?= =?UTF-8?q?=20=E2=80=94=20CHANGELOG,=20Grafana=202-col=20layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Bump platform version 04.05.00 → 05.00.00 across all 58 definition/config files - Add CHANGELOG.md with full release history - Add MokoWaaS Grafana dashboard template (2 columns per row) Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- CHANGELOG.md | 76 + composer.json | 2 +- definitions/default/dolibarr.tf | 4 +- definitions/default/generic-repository.tf | 1166 ++++++++++++++ definitions/default/generic.tf | 4 +- .../default/github-private-repository.tf | 4 +- definitions/default/joomla.tf | 4 +- definitions/default/platform.tf | 4 +- definitions/default/standards.tf | 4 +- definitions/sync/.github-private.def.tf | 4 +- definitions/sync/.github.def.tf | 4 +- definitions/sync/Copy-PortablePath.def.tf | 4 +- definitions/sync/DoliMods.def.tf | 4 +- definitions/sync/MokoCRM.def.tf | 4 +- definitions/sync/MokoCassiopeia.def.tf | 4 +- definitions/sync/MokoDoliAdInsights.def.tf | 4 +- definitions/sync/MokoDoliArt.def.tf | 4 +- definitions/sync/MokoDoliAuth.def.tf | 4 +- definitions/sync/MokoDoliCare.def.tf | 4 +- definitions/sync/MokoDoliChimp.def.tf | 4 +- definitions/sync/MokoDoliClaude.def.tf | 4 +- definitions/sync/MokoDoliCredits.def.tf | 4 +- definitions/sync/MokoDoliDymo.def.tf | 4 +- definitions/sync/MokoDoliForm.def.tf | 4 +- definitions/sync/MokoDoliG.def.tf | 4 +- definitions/sync/MokoDoliGithub.def.tf | 4 +- definitions/sync/MokoDoliHRM.def.tf | 4 +- definitions/sync/MokoDoliMods.def.tf | 4 +- definitions/sync/MokoDoliMulti.def.tf | 4 +- definitions/sync/MokoDoliOffline.def.tf | 4 +- definitions/sync/MokoDoliPhone.com.def.tf | 4 +- definitions/sync/MokoDoliProjTemplate.def.tf | 4 +- definitions/sync/MokoDoliRelease.def.tf | 4 +- definitions/sync/MokoDoliSign.def.tf | 4 +- definitions/sync/MokoDoliTools.def.tf | 4 +- definitions/sync/MokoDoliTraining.def.tf | 4 +- definitions/sync/MokoDolibarr.def.tf | 4 +- definitions/sync/MokoISOUpdatePortable.def.tf | 4 +- definitions/sync/MokoJoomHero.def.tf | 4 +- definitions/sync/MokoJoomTOS.def.tf | 4 +- .../sync/MokoPerfectPublisher-Discord.def.tf | 4 +- .../sync/MokoStandards-Template-Client.def.tf | 4 +- .../MokoStandards-Template-Dolibarr.def.tf | 4 +- .../MokoStandards-Template-Generic.def.tf | 4 +- ...Standards-Template-Joomla-Component.def.tf | 1335 +++++++++++++++++ ...koStandards-Template-Joomla-Library.def.tf | 1335 +++++++++++++++++ ...okoStandards-Template-Joomla-Module.def.tf | 1335 +++++++++++++++++ ...koStandards-Template-Joomla-Package.def.tf | 1335 +++++++++++++++++ ...okoStandards-Template-Joomla-Plugin.def.tf | 1335 +++++++++++++++++ ...oStandards-Template-Joomla-Template.def.tf | 1335 +++++++++++++++++ definitions/sync/MokoTesting.def.tf | 4 +- definitions/sync/MokoWaaS.def.tf | 4 +- definitions/sync/MokoWaaSAnnounce.def.tf | 4 +- definitions/sync/MokoWaaSBrand.def.tf | 4 +- definitions/sync/MokoWinSetup.def.tf | 4 +- .../sync/PLG_FINDER_MOKOVMSMARTSEARCH.def.tf | 4 +- .../sync/client-clarksvillefurs.def.tf | 4 +- definitions/sync/client-kiddieland.def.tf | 4 +- definitions/sync/client-vexcreations.def.tf | 4 +- monitoring/grafana/moko-waas-dashboard.json | 120 +- 60 files changed, 9413 insertions(+), 161 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 definitions/default/generic-repository.tf create mode 100644 definitions/sync/MokoStandards-Template-Joomla-Component.def.tf create mode 100644 definitions/sync/MokoStandards-Template-Joomla-Library.def.tf create mode 100644 definitions/sync/MokoStandards-Template-Joomla-Module.def.tf create mode 100644 definitions/sync/MokoStandards-Template-Joomla-Package.def.tf create mode 100644 definitions/sync/MokoStandards-Template-Joomla-Plugin.def.tf create mode 100644 definitions/sync/MokoStandards-Template-Joomla-Template.def.tf diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8fb3067 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,76 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +Version format: `XX.YY.ZZ` (zero-padded semver). + +## [Unreleased] + +## [05.00.00] - 2026-05-11 + +### Added +- Centralized MokoWaaS Grafana dashboard for all Joomla sites (2-column layout) +- MokoStandards MCP server with 24 governance tools +- Wiki health check and GitHub wiki mirror sync +- Daily wiki sync workflow — mirrors all Gitea wikis to GitHub +- CHANGELOG `[Unreleased]` section check in repo health (5 pts) +- Client platform type with detection and structure definition +- PHPStan, Gitleaks, and Renovate — templates, workflows, and docs +- Cascade and branch protection workflow documentation +- Branch protection setup workflow +- Client-site definition +- Pre-release workflow for manual dev/alpha/beta/rc builds +- PR-check, security-audit, notify, cleanup workflow definitions +- Expanded workflow suite (10 workflows from MokoOnyx) +- `.gitea/workflows` definitions to Joomla structure defs +- Joomla workflow templates from MokoOnyx +- Cleanup script to remove `.claude/` and `.mcp.json` from repos +- Auto-discover all repos with wikis across all orgs +- CLAUDE.md to repo health check, flag unwanted files +- `.moko-platform` manifest (replaces `.mokostandards`) +- PR branch policy check workflow + +### Changed +- Major version bump: `04.05.00` → `05.00.00` across all definitions, templates, and wiki +- Grafana endpoint dashboards: 2 columns per row (reduced congestion) +- Sync engine clones template repos at runtime for workflows +- Simplified platform types across definitions and sync engine +- Removed `templates/github` — all CI/templates now in `.gitea/` +- Removed `templates/workflows` — canonical source is now template repos +- Updated mokostandards xmlns to point to MokoStandards-API repo +- Comprehensive repo health check updates + +### Fixed +- Remove gitea-actions[bot] from push whitelist (not a real user) +- Delete-then-create branch protection rules to avoid 422 +- Patch version bump in pre-release workflow +- Always emit `` tag in UpdateXmlGenerator +- Rewrite `updates.xml.template` with 5 stability channels +- Migrate `.mokostandards` from `.github/` to `.gitea/` on Gitea + +## [04.05.00] - 2026-03-15 + +### Added +- Dual-platform support (Gitea + GitHub) and Joomla template tooling +- Templates, CLI dirs, docs, and Gitea-first platform config +- Sync to all branches, listBranches, ext-zip +- All templates from MokoStandards + +### Changed +- Migrated to Gitea-only workflows and API +- Converted all gh CLI calls to Gitea API curl across workflow templates +- Gitea-primary tokens: GA_TOKEN for Gitea API, GH_TOKEN for GitHub mirror +- Updated all references to MokoConsulting org and Gitea URLs + +### Fixed +- Guzzle base_uri resolution for Gitea API paths +- Replace all hardcoded GitHub API URLs with platform adapter pattern +- Split repoRoot into apiRoot + standardsRoot +- Auto-release template: use Gitea API for main sync, auth push URL +- Bulk_sync: resolve label names to IDs, fix username +- Remove sha256: prefix from update XML templates + +## [04.00.00] - 2026-01-01 + +- Initial release: MokoStandards Enterprise API extracted from MokoStandards diff --git a/composer.json b/composer.json index 72eef53..1c373a9 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "mokoconsulting-tech/enterprise", "description": "MokoStandards Enterprise API \u2014 PHP implementation", "type": "library", - "version": "04.05.00", + "version": "05.00.00", "license": "GPL-3.0-or-later", "authors": [ { diff --git a/definitions/default/dolibarr.tf b/definitions/default/dolibarr.tf index f610b2c..8cfe815 100644 --- a/definitions/default/dolibarr.tf +++ b/definitions/default/dolibarr.tf @@ -4,7 +4,7 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -17,7 +17,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/default/generic-repository.tf b/definitions/default/generic-repository.tf new file mode 100644 index 0000000..03b83c3 --- /dev/null +++ b/definitions/default/generic-repository.tf @@ -0,0 +1,1166 @@ +/** + * Generic Repository Structure Definition + * Standard repository structure for generic projects and libraries + * + * Copyright (C) 2026 Moko Consulting + * SPDX-License-Identifier: GPL-3.0-or-later + * Version: 05.00.00 + * Schema Version: 1.0 + */ + +locals { + repository_structure = { + metadata = { + name = "Generic Repository" + description = "Standard repository structure for generic projects and libraries" + repository_type = "library" + platform = "multi-platform" + last_updated = "2026-01-15T00: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" + required = true + always_overwrite = false + protected = true + audience = "general" + }, + { + name = "LICENSE" + extension = "" + description = "License file (GPL-3.0-or-later)" + required = true + audience = "general" + }, + { + name = "CHANGELOG.md" + extension = "md" + description = "Version history and changes" + required = true + audience = "general" + }, + { + name = "SECURITY.md" + extension = "md" + description = "Security policy and vulnerability reporting" + required = true + always_overwrite = true + template = "templates/docs/required/template-SECURITY.md" + audience = "general" + }, + { + name = "CODE_OF_CONDUCT.md" + extension = "md" + description = "Community code of conduct" + required = true + always_overwrite = true + template = "templates/docs/extra/template-CODE_OF_CONDUCT.md" + audience = "contributor" + }, + { + name = "ROADMAP.md" + extension = "md" + description = "Project roadmap with version goals and milestones" + required = false + audience = "general" + }, + { + name = "CONTRIBUTING.md" + extension = "md" + description = "Contribution guidelines" + required = true + always_overwrite = true + template = "templates/docs/required/template-CONTRIBUTING.md" + audience = "contributor" + }, + { + name = ".gitignore" + extension = "gitignore" + description = "Git ignore patterns - preserved during sync operations" + required = true + always_overwrite = false + audience = "developer" + template = "templates/configs/.gitignore.generic" + }, + { + name = ".gitattributes" + extension = "gitattributes" + description = "Git attributes configuration" + required = true + audience = "developer" + }, + { + name = ".editorconfig" + extension = "editorconfig" + description = "Editor configuration for consistent coding style - preserved during sync" + required = true + always_overwrite = false + audience = "developer" + }, + { + name = "Makefile" + description = "Build automation" + requirement_status = "suggested" + audience = "developer" + }, + { + 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 = ".gitea/.mokostandards" + extension = "xml" + description = "MokoStandards XML manifest — generated programmatically by RepositorySynchronizer::migrateMokoStandards()" + required = true + always_overwrite = false + audience = "developer" + template = "managed-by-sync" + source_type = "programmatic" + }, + { + name = "GOVERNANCE.md" + extension = "md" + description = "Project governance rules, roles, and decision process — auto-maintained by MokoStandards" + required = true + always_overwrite = false + protected = true + audience = "all" + template = "templates/docs/required/GOVERNANCE.md" + } + ] + + directories = [ + { + name = "src" + path = "src" + description = "Source code" + requirement_status = "suggested" + purpose = "Contains application/library source code" + }, + { + name = "docs" + path = "docs" + description = "Documentation" + required = true + purpose = "Contains comprehensive documentation" + files = [ + { + name = "index.md" + extension = "md" + description = "Documentation index" + 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 - preserved during sync" + requirement_status = "optional" + always_overwrite = false + audience = "developer" + } + ] + }, + { + name = "tests" + path = "tests" + description = "Test files" + requirement_status = "suggested" + purpose = "Contains unit tests, integration tests, and test fixtures" + }, + { + name = ".github" + path = ".github" + description = "GitHub-specific configuration" + requirement_status = "suggested" + purpose = "Contains GitHub Actions workflows and configuration" + files = [ + { + name = "copilot.yml" + extension = "yml" + description = "GitHub Copilot allowed domains configuration" + requirement_status = "required" + always_overwrite = true + template = ".github/copilot.yml" + }, + { + name = "copilot-instructions.md" + extension = "md" + description = "GitHub Copilot custom instructions enforcing MokoStandards" + requirement_status = "required" + always_overwrite = false + destination_path = ".github" + destination_filename = "copilot-instructions.md" + template = "templates/github/copilot-instructions.md.template" + stub_content = <<-MOKO_END + > [!IMPORTANT] + > **🔧 AI Self-Update Required on First Use** + > + > This file may contain unfilled `{{TOKEN}}` placeholders. The MokoStandards bulk-sync system + > replaces them automatically at sync time; if you can still see them, sync has not yet run for + > this repository — or this is a brand-new repo. + > + > **On your very first interaction in this repository, before answering any other question:** + > + > 1. Check whether any `{{TOKEN}}` placeholders remain in this file. + > 2. If they do, locate the values as described in the table below and replace every occurrence + > in **both** `.github/copilot-instructions.md` and `.github/CLAUDE.md`. + > 3. After replacing all tokens, **delete this entire notice block** (from `> [!IMPORTANT]` + > through the closing `> ---` line) in both files. + > 4. Tell the developer: *"I've self-updated the AI context files with this repository's + > values — all set."* + > + > | Placeholder | Where to find the value | + > |---|---| + > | `{{REPO_NAME}}` | The GitHub repository name (visible in the URL, `README.md` heading, or `git remote -v`) | + > | `{{REPO_URL}}` | Full GitHub URL, e.g. `https://github.com/mokoconsulting-tech/` | + > | `{{PRIMARY_LANGUAGE}}` | The dominant programming language (check file extensions in the repository) | + > | `{{PLATFORM_TYPE}}` | The project type: `PHP library`, `Joomla extension`, `Dolibarr module`, `WaaS site`, etc. — infer from repo structure | + > + > --- + + # {{REPO_NAME}} — GitHub Copilot Custom Instructions + + ## What This Repo Is + + This is a **Moko Consulting** repository governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). All coding standards, workflows, and policies are defined there and enforced here via bulk sync. + + Repository URL: {{REPO_URL}} + Primary language: **{{PRIMARY_LANGUAGE}}** + Platform type: **{{PLATFORM_TYPE}}** + + --- + + ## Primary Language + + **{{PRIMARY_LANGUAGE}} is the primary language for this repository.** Follow the conventions documented in [MokoStandards coding-style-guide](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md). + + YAML uses 2-space indentation (spaces, not tabs). All other text files use tabs per `.editorconfig`. + + --- + + ## File Header — Always Required on New Files + + Every new file needs a copyright header as its first content. Use the minimal form unless the file is a policy doc, README, or public API. + + **PHP:** + ```php + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: {{REPO_NAME}}.Module + * INGROUP: {{REPO_NAME}} + * REPO: {{REPO_URL}} + * PATH: /path/to/file.php + * VERSION: XX.YY.ZZ + * BRIEF: One-line description of purpose + */ + + declare(strict_types=1); + ``` + + **Markdown:** + ```markdown + + ``` + + **YAML / Shell:** Use `#` comments with the same fields. JSON files are exempt. + + --- + + ## Version Management + + **`README.md` is the single source of truth for the repository version.** + + - **Bump the patch version on every PR** — increment `XX.YY.ZZ` (e.g. `01.02.03` → `01.02.04`) in `README.md` before opening the PR; the `sync-version-on-merge` workflow propagates it automatically to all badges and `FILE INFORMATION` headers on merge to `main`. + - The `VERSION: XX.YY.ZZ` field in the README.md `FILE INFORMATION` block governs all other version references. + - Update the version in `README.md` only — the `sync-version-on-merge` workflow propagates it automatically to all badges and `FILE INFORMATION` headers on merge to `main`. + - Version format is zero-padded semver: `XX.YY.ZZ` (e.g. `04.00.04`). + - Never hardcode a specific version in document body text — use the badge or FILE INFORMATION header only. + + --- + + ## GitHub Actions — Token Usage + + Every workflow must use **`secrets.GH_TOKEN`** (the org-level Personal Access Token). This applies to all `actions/checkout`, `gh` CLI calls, and any step that talks to the GitHub API. + + ```yaml + # ✅ Correct + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + ``` + + ```yaml + # ❌ Wrong — never use these in workflows + token: ${{ github.token }} + token: ${{ secrets.GITHUB_TOKEN }} + ``` + + PHP scripts read the token with: `getenv('GH_TOKEN') ?: getenv('GITHUB_TOKEN')` — `GH_TOKEN` is always preferred; `GITHUB_TOKEN` is accepted only as a local-dev fallback. + + --- + + ## Composer Package (PHP repositories) + + This repository requires the MokoStandards enterprise library. The `composer.json` must include: + + ```json + { + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/mokoconsulting-tech/MokoStandards" + } + ], + "require": { + "mokoconsulting/mokostandards": "^4.0" + } + } + ``` + + Run `composer install` after adding the dependency. See [package-installation.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/guide/package-installation.md) for full instructions. + + --- + + ## PHP Script Pattern + + All PHP scripts **must** extend `MokoStandards\Enterprise\CliFramework`. Never write standalone classes or extend the legacy `CliBase`. + + ```php + #!/usr/bin/env php + setDescription('One-line description'); + $this->addArgument('--path', 'Repository root', '.'); + $this->addArgument('--dry-run', 'Preview without writing', false); + } + + protected function run(): int + { + $path = $this->getArgument('--path'); + $dryRun = (bool) $this->getArgument('--dry-run'); + + $this->log('INFO', "Processing: {$path}"); + return 0; + } + } + + $script = new MyScript('my_script', 'One-line description'); + exit($script->execute()); + ``` + + **Key rules:** + - Abstract methods to implement: `configure()` and `run()` — **not** `execute()` + - `execute()` is the **public entry point** that orchestrates setup (arg parsing, `initialize()`) and then calls your `run()` implementation; call it at the bottom with `exit($script->execute())` + - Entry point at the bottom: `$script->execute()` — **not** `$script->run()` + - Constructor always takes `(string $name, string $description = '')`; pass the description here — `setDescription()` inside `configure()` is only needed to override it + - `log(string $level, string $message)` — level is the **first** argument (INFO / SUCCESS / WARNING / ERROR) + - `$this->dryRun` and `$this->verbose` are set automatically from `--dry-run` / `--verbose` + + --- + + ## Naming Conventions + + | Context | Convention | Example | + |---------|-----------|---------| + | PHP class | `PascalCase` | `MyService` | + | PHP method / function | `camelCase` | `getUserData()` | + | PHP variable | `$snake_case` | `$repo_path` | + | PHP constant | `UPPER_SNAKE_CASE` | `DEFAULT_THRESHOLD` | + | PHP class file | `PascalCase.php` | `ApiClient.php` | + | PHP script file | `snake_case.php` | `check_health.php` | + | YAML workflow | `kebab-case.yml` | `bulk-repo-sync.yml` | + | Markdown doc | `kebab-case.md` | `coding-style-guide.md` | + + --- + + ## Commit Messages + + Format: `(): ` — imperative, lower-case subject, no trailing period. + + Valid types: `feat` · `fix` · `docs` · `chore` · `ci` · `refactor` · `style` · `test` · `perf` · `revert` · `build` + + Examples: + - `feat(module): add user preference caching` + - `fix(api): handle null response from external service` + - `docs(readme): update installation instructions` + - `chore(deps): bump phpunit to 11.x` + + --- + + ## Branch Naming + + Format: `/[/description]` + + Approved prefixes: `dev/` · `rc/` · `version/` · `patch/` · `copilot/` · `dependabot/` + + - ✅ `dev/1.2.0/add-feature` + - ✅ `patch/1.2.1/fix-bug` + - ❌ `feature/my-thing` — rejected by branch protection + + --- + + ## Keeping Documentation Current + + Whenever you make code changes, update the corresponding documentation in the same commit or PR. Do not leave docs stale. + + | Change type | Documentation to update | + |-------------|------------------------| + | New or renamed public PHP method | PHPDoc block on the method; `docs/api/` index for that class | + | New or changed CLI script argument | Script's own `--help` text; `docs/api/` or equivalent | + | New or changed GitHub Actions workflow | `docs/workflows/.md` | + | New or changed policy | Corresponding file under `docs/policy/` | + | New library class or major feature | `CHANGELOG.md` entry under `Added` | + | Bug fix | `CHANGELOG.md` entry under `Fixed` | + | Breaking change | `CHANGELOG.md` entry under `Changed`; update `CONTRIBUTING.md` if contributor steps change | + | Any modified file | Update the `VERSION` field in that file's `FILE INFORMATION` block | + | **Every PR** | **Bump the patch version** — increment `XX.YY.ZZ` in `README.md`; `sync-version-on-merge` propagates it to all headers and badges on merge | + + If your code change makes any existing doc sentence false or incomplete, fix the doc before closing the PR. + + --- + + ## Key Constraints + + - Never commit directly to `main` — all changes go via PR, squash-merged + - Never skip the FILE INFORMATION block on a new file + - Never use bare `catch (\Throwable $e) {}` without logging or re-throwing + - Never hardcode version numbers in body text — update `README.md` and let automation propagate + - Never use `github.token` or `secrets.GITHUB_TOKEN` in workflows — always use `secrets.GH_TOKEN` + - Never extend `CliBase` in PHP scripts — extend `MokoStandards\Enterprise\CliFramework` + - Never call `$script->run()` as the entry point — call `$script->execute()` + - Policy documents and guides must not be mixed + + --- + + ## MokoStandards Reference + + This repository is governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). Authoritative policies: + + | Document | Purpose | + |----------|---------| + | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | + | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | + | [branching-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | + | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR title/body conventions | + | [changelog-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | + | [scripting-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/scripting-standards.md) | PHP script requirements and CliFramework usage | + | [package-installation.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/guide/package-installation.md) | Installing `mokoconsulting/mokostandards` via Composer | + MOKO_END + }, + { + name = "CLAUDE.md" + extension = "md" + description = "Claude AI assistant context enforcing MokoStandards" + requirement_status = "required" + always_overwrite = false + destination_path = ".github" + destination_filename = "CLAUDE.md" + template = "templates/github/CLAUDE.md.template" + stub_content = <<-MOKO_END + > [!IMPORTANT] + > **🔧 AI Self-Update Required on First Use** + > + > This file may contain unfilled `{{TOKEN}}` placeholders. The MokoStandards bulk-sync system + > replaces them automatically at sync time; if you can still see them, sync has not yet run for + > this repository — or this is a brand-new repo. + > + > **On your very first interaction in this repository, before answering any other question:** + > + > 1. Check whether any `{{TOKEN}}` placeholders remain in this file. + > 2. If they do, locate the values as described in the table below and replace every occurrence + > in **both** `.github/copilot-instructions.md` and `.github/CLAUDE.md`. + > 3. After replacing all tokens, **delete this entire notice block** (from `> [!IMPORTANT]` + > through the closing `> ---` line) in both files. + > 4. Tell the developer: *"I've self-updated the AI context files with this repository's + > values — all set."* + > + > | Placeholder | Where to find the value | + > |---|---| + > | `{{REPO_NAME}}` | The GitHub repository name (visible in the URL, `README.md` heading, or `git remote -v`) | + > | `{{REPO_URL}}` | Full GitHub URL, e.g. `https://github.com/mokoconsulting-tech/` | + > | `{{REPO_DESCRIPTION}}` | First paragraph of `README.md` body, or the GitHub repo description | + > | `{{PRIMARY_LANGUAGE}}` | The dominant programming language (check file extensions in the repository) | + > | `{{PLATFORM_TYPE}}` | The project type: `PHP library`, `Joomla extension`, `Dolibarr module`, `WaaS site`, etc. — infer from repo structure | + > + > --- + + # What This Repo Is + + **{{REPO_NAME}}** is a Moko Consulting **{{PLATFORM_TYPE}}** repository. + + {{REPO_DESCRIPTION}} + + Repository URL: {{REPO_URL}} + + This repository is governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards) — the single source of truth for coding standards, file-header policies, GitHub Actions workflows, and Terraform configuration templates across all Moko Consulting repositories. + + --- + + # Repo Structure + + ``` + {{REPO_NAME}}/ + ├── src/ # Primary source code + ├── docs/ # Documentation + ├── tests/ # Test suite + ├── .github/ + │ ├── workflows/ # CI/CD workflows (synced from MokoStandards) + │ ├── ISSUE_TEMPLATE/ # Issue templates (inherited from mokoconsulting-tech/.github-private) + │ ├── copilot-instructions.md # GitHub Copilot custom instructions + │ ├── CLAUDE.md # This file — Claude AI assistant context + │ └── override.tf # Repository-specific health-check overrides + ├── README.md # Project overview — version source of truth + ├── CHANGELOG.md # Version history + ├── CONTRIBUTING.md # Contribution guidelines + └── LICENSE # GPL-3.0-or-later + ``` + + --- + + # Primary Language + + **{{PRIMARY_LANGUAGE}}** is the primary language for this repository. + + YAML uses 2-space indentation (spaces, not tabs). All other text files use tabs per `.editorconfig`. + + --- + + # Composer Package (PHP repositories) + + This repository requires the MokoStandards enterprise library. The package is installed from the private GitHub VCS source. + + `composer.json` must contain: + + ```json + { + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/mokoconsulting-tech/MokoStandards" + } + ], + "require": { + "mokoconsulting/mokostandards": "^4.0" + } + } + ``` + + Install or update with: + + ```bash + composer install # first time + composer update mokoconsulting/mokostandards # upgrade + ``` + + --- + + # PHP Script Pattern + + All PHP scripts must extend `MokoStandards\Enterprise\CliFramework` — **never** use a standalone class or the legacy `CliBase`. + + ```php + #!/usr/bin/env php + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: {{REPO_NAME}}.Scripts + * INGROUP: {{REPO_NAME}} + * REPO: {{REPO_URL}} + * PATH: /api/my_script.php + * VERSION: XX.YY.ZZ + * BRIEF: One-line description of what this script does + */ + + declare(strict_types=1); + + require_once __DIR__ . '/vendor/autoload.php'; + + use MokoStandards\Enterprise\CliFramework; + + class MyScript extends CliFramework + { + protected function configure(): void + { + $this->setDescription('One-line description of what this script does'); + $this->addArgument('--path', 'Repository root path', '.'); + $this->addArgument('--dry-run', 'Preview changes without writing', false); + } + + protected function run(): int + { + $path = $this->getArgument('--path'); + $dryRun = (bool) $this->getArgument('--dry-run'); + + // implementation … + $this->log('INFO', "Processing: {$path}"); + + return 0; + } + } + + $script = new MyScript('my_script', 'One-line description of what this script does'); + exit($script->execute()); + ``` + + **CliFramework interface summary:** + + | Member | Purpose | + |--------|---------| + | `configure(): void` | Abstract — register arguments with `addArgument()` | + | `run(): int` | Abstract — main script logic; return the exit code | + | `initialize(): void` | Optional hook — runs after arg-parse, before `run()` | + | `execute(array $argv = []): int` | **Public entry point** — call this at the bottom; it calls `configure()`, parses argv, then calls `run()` | + | `addArgument(string $name, string $desc, mixed $default)` | Register a CLI argument | + | `getArgument(string $name): mixed` | Read a parsed or default argument value | + | `log(string $level, string $message)` | Structured log — levels: INFO SUCCESS WARNING ERROR DEBUG | + | `error(string $message, int $code = 1): never` | Log error and exit | + | `$this->dryRun` | `true` when `--dry-run` is passed | + | `$this->verbose` | `true` when `--verbose` / `-v` is passed | + + **Forbidden patterns in PHP:** + + ```php + // ❌ Wrong — legacy base class, not namespaced + class MyScript extends CliBase { … } + + // ❌ Wrong — standalone class with no framework + class MyScript { public function run() { … } } + + // ❌ Wrong — method names and entry-point transposed + protected function execute(): int { … } // should be run() + exit($script->run()); // should be execute() + + // ✅ Correct + class MyScript extends CliFramework { + protected function configure(): void { … } + protected function run(): int { … } + } + $script = new MyScript('name', 'description'); + exit($script->execute()); + ``` + + --- + + # Version Management + + **`README.md` is the single source of truth for the repository version.** + + - **Bump the patch version on every PR** — increment `XX.YY.ZZ` (e.g. `01.02.03` → `01.02.04`) in `README.md` before opening the PR; the `sync-version-on-merge` workflow propagates it to all badges and `FILE INFORMATION` headers automatically on merge to `main`. + - The `VERSION: XX.YY.ZZ` field in the `README.md` `FILE INFORMATION` block governs all other version references. + - Update `README.md` only — the `sync-version-on-merge` workflow propagates it to all badges and `FILE INFORMATION` headers automatically on merge to `main`. + - Version format is zero-padded semver: `XX.YY.ZZ` (e.g. `01.02.03`). + - Never hardcode a version number in body text — use the badge or FILE INFORMATION header only. + + --- + + # File Header Requirements + + Every new file **must** have a copyright header as its first content. JSON files, binary files, generated files, and third-party files are exempt. + + ## Minimal header + + **PHP:** + ```php + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: {{REPO_NAME}}.Module + * INGROUP: {{REPO_NAME}} + * REPO: {{REPO_URL}} + * PATH: /src/MyClass.php + * VERSION: XX.YY.ZZ + * BRIEF: One-line description of file purpose + */ + + declare(strict_types=1); + ``` + + **Markdown:** + ```markdown + + ``` + + **YAML / Shell:** Use `#` comments with the same fields. JSON files are exempt. + + --- + + # Coding Standards + + ## Naming Conventions + + | Context | Convention | Example | + |---------|-----------|---------| + | PHP class | `PascalCase` | `MyService` | + | PHP method / function | `camelCase` | `getUserData()` | + | PHP variable | `$snake_case` | `$user_id` | + | PHP constant | `UPPER_SNAKE_CASE` | `MAX_RETRIES` | + | PHP class file | `PascalCase.php` | `UserService.php` | + | PHP script file | `snake_case.php` | `check_health.php` | + | YAML workflow | `kebab-case.yml` | `code-quality.yml` | + | Markdown doc | `kebab-case.md` | `coding-style-guide.md` | + + ## Commit Messages + + Format: `(): ` — imperative, lower-case subject, no trailing period. + + Valid types: `feat` · `fix` · `docs` · `chore` · `ci` · `refactor` · `style` · `test` · `perf` · `revert` · `build` + + ## Branch Naming + + Format: `/[/description]` + + Approved prefixes: `dev/` · `rc/` · `version/` · `patch/` · `copilot/` · `dependabot/` + + --- + + # GitHub Actions — Token Usage + + Every workflow in this repository must use **`secrets.GH_TOKEN`** (the org-level Personal Access Token). + + ```yaml + # ✅ Correct — always use GH_TOKEN + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + ``` + + ```yaml + # ❌ Wrong — never use these + token: ${{ github.token }} + token: ${{ secrets.GITHUB_TOKEN }} + ``` + + PHP scripts read the token with: `getenv('GH_TOKEN') ?: getenv('GITHUB_TOKEN')` — `GH_TOKEN` is always preferred; `GITHUB_TOKEN` is a local-dev fallback only. + + --- + + # Keeping Documentation Current + + Whenever you make code changes, update the corresponding documentation in the same commit or PR. Do not leave docs stale. + + | Change type | Documentation to update | + |-------------|------------------------| + | New or renamed public PHP method | PHPDoc block on the method; `docs/api/` index for that class | + | New or changed CLI script argument | Script's own `--help` text; `docs/api/` or equivalent | + | New or changed GitHub Actions workflow | `docs/workflows/.md` | + | New or changed policy | Corresponding file under `docs/policy/` | + | New library class or major feature | `CHANGELOG.md` entry under `Added` | + | Bug fix | `CHANGELOG.md` entry under `Fixed` | + | Breaking change | `CHANGELOG.md` entry under `Changed`; update `CONTRIBUTING.md` if contributor steps change | + | Any modified file | Update the `VERSION` field in that file's `FILE INFORMATION` block | + | **Every PR** | **Bump the patch version** — increment `XX.YY.ZZ` in `README.md`; `sync-version-on-merge` propagates it to all headers and badges on merge | + + If your code change makes any existing doc sentence false or incomplete, fix the doc before closing the PR. + + --- + + # What NOT to Do + + - **Never commit directly to `main`** — all changes go through a PR. + - **Never hardcode version numbers** in body text — update `README.md` and let automation propagate. + - **Never skip the FILE INFORMATION block** on a new source file. + - **Never use bare `catch (\Throwable $e) {}`** — always log or re-throw. + - **Never mix tabs and spaces** within a file — follow `.editorconfig`. + - **Never use `github.token` or `secrets.GITHUB_TOKEN` in workflows** — always use `secrets.GH_TOKEN`. + - **Never extend `CliBase` in PHP scripts** — extend `MokoStandards\Enterprise\CliFramework` instead. + - **Never use `exit($script->run())`** — the correct entry point is `exit($script->execute())`. + + --- + + # Key Policy Documents (MokoStandards) + + | Document | Purpose | + |----------|---------| + | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | + | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | + | [branching-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | + | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR conventions | + | [changelog-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | + | [scripting-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/scripting-standards.md) | PHP script requirements and CliFramework usage | + | [package-installation.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/guide/package-installation.md) | Installing `mokoconsulting/mokostandards` via Composer | + MOKO_END + } + ] + subdirectories = [ + { + name = "workflows" + path = ".github/workflows" + description = "GitHub Actions workflows" + requirement_status = "suggested" + files = [ + { + name = "standards-compliance.yml" + extension = "yml" + description = "MokoStandards compliance validation" + requirement_status = "required" + always_overwrite = true + template = ".github/workflows/standards-compliance.yml" + }, + { + name = "enterprise-firewall-setup.yml" + extension = "yml" + description = "Enterprise firewall configuration for trusted domain access" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/enterprise-firewall-setup.yml.template" + }, + { + name = "deploy-dev.yml" + extension = "yml" + description = "SFTP deployment of src/ to the development server" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-dev.yml.template" + }, + { + name = "deploy-demo.yml" + extension = "yml" + description = "SFTP deployment of src/ to the demo server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-demo.yml.template" + }, + { + name = "deploy-rs.yml" + extension = "yml" + description = "SFTP deployment of src/ to the release staging server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-rs.yml.template" + }, + { + name = "sync-version-on-merge.yml" + extension = "yml" + description = "Auto-bump patch version on merge and propagate to all file headers" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/sync-version-on-merge.yml.template" + }, + { + name = "auto-release.yml" + extension = "yml" + description = "Auto-create GitHub Release on push to main with version from README.md" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-release.yml.template" + }, + { + name = "repository-cleanup.yml" + extension = "yml" + description = "Scheduled cleanup: delete retired workflows, stale branches, old workflow runs" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/repository-cleanup.yml.template" + }, + { + name = "auto-dev-issue.yml" + extension = "yml" + description = "Auto-create tracking issue when a dev/** branch is pushed" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-dev-issue.yml.template" + }, + { + name = "codeql-analysis.yml" + extension = "yml" + description = "CodeQL security analysis workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/generic/codeql-analysis.yml.template" + } + ] + }, + { + name = "ISSUE_TEMPLATE" + path = ".github/ISSUE_TEMPLATE" + description = "GitHub issue templates synced from MokoStandards" + requirement_status = "required" + files = [ + { + name = "config.yml" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/config.yml" + }, + { + name = "adr.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/adr.md" + }, + { + name = "bug_report.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/bug_report.md" + }, + { + name = "documentation.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/documentation.md" + }, + { + name = "enterprise_support.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/enterprise_support.md" + }, + { + name = "feature_request.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/feature_request.md" + }, + { + name = "firewall-request.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/firewall-request.md" + }, + { + name = "question.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/question.md" + }, + { + name = "request-license.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/request-license.md" + }, + { + name = "rfc.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/rfc.md" + }, + { + name = "security.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/security.md" + } + ] + } + ] + }, + { + name = "workflows" + path = ".github/workflows" + description = "GitHub Actions workflows synced from MokoStandards" + requirement_status = "required" + files = [ + { + name = "standards-compliance.yml" + extension = "yml" + description = "MokoStandards compliance validation" + requirement_status = "required" + always_overwrite = true + template = ".github/workflows/standards-compliance.yml" + }, + { + name = "codeql-analysis.yml" + extension = "yml" + description = "CodeQL security analysis workflow" + requirement_status = "required" + always_overwrite = true + template = ".github/workflows/codeql-analysis.yml" + }, + { + name = "enterprise-firewall-setup.yml" + extension = "yml" + description = "Enterprise firewall configuration for trusted domain access" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/enterprise-firewall-setup.yml.template" + }, + { + name = "deploy-dev.yml" + extension = "yml" + description = "SFTP deployment of src/ to the development server" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-dev.yml.template" + }, + { + name = "deploy-demo.yml" + extension = "yml" + description = "SFTP deployment of src/ to the demo server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-demo.yml.template" + }, + { + name = "deploy-rs.yml" + extension = "yml" + description = "SFTP deployment of src/ to the release staging server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-rs.yml.template" + }, + { + name = "sync-version-on-merge.yml" + extension = "yml" + description = "Auto-bump patch version on merge and propagate to all file headers" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/sync-version-on-merge.yml.template" + }, + { + name = "auto-release.yml" + extension = "yml" + description = "Auto-create GitHub Release on push to main with version from README.md" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-release.yml.template" + }, + { + name = "repository-cleanup.yml" + extension = "yml" + description = "Scheduled cleanup: delete retired workflows, stale branches, old workflow runs" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/repository-cleanup.yml.template" + }, + { + name = "auto-dev-issue.yml" + extension = "yml" + description = "Auto-create tracking issue when a dev/** branch is pushed" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-dev-issue.yml.template" + } + ] + } + ] + + repository_requirements = { + secrets = [ + { + name = "GH_TOKEN" + description = "Org-level GitHub PAT for automation" + required = true + scope = "org" + }, + { + name = "DEV_FTP_KEY" + description = "SSH private key for SFTP dev deployment (preferred); if DEV_FTP_PASSWORD is also set it is used as the key passphrase, with password-only as fallback" + required = false + scope = "org" + }, + { + name = "DEV_FTP_PASSWORD" + description = "SFTP password for dev deployment; used as SSH key passphrase when DEV_FTP_KEY is also set, and as standalone fallback if key auth fails" + required = false + scope = "org" + note = "At least one of DEV_FTP_KEY or DEV_FTP_PASSWORD must be configured" + } + ] + + variables = [ + { + name = "DEV_FTP_HOST" + description = "Dev server hostname; may include port suffix (e.g. dev.example.com or dev.example.com:2222)" + required = true + scope = "org" + }, + { + name = "DEV_FTP_PATH" + description = "Base remote path for SFTP deployment (e.g. /var/www/html)" + required = true + scope = "org" + }, + { + name = "DEV_FTP_USERNAME" + description = "SFTP username for dev server authentication" + required = true + scope = "org" + }, + { + name = "DEV_FTP_PORT" + description = "Explicit SFTP port override; if omitted the port is parsed from DEV_FTP_HOST or defaults to 22" + required = false + scope = "org" + }, + { + name = "DEV_FTP_SUFFIX" + description = "Per-repo path suffix appended to DEV_FTP_PATH (e.g. /my-project)" + required = false + scope = "repo" + } + ] + } + } +} diff --git a/definitions/default/generic.tf b/definitions/default/generic.tf index b91084f..b68534d 100644 --- a/definitions/default/generic.tf +++ b/definitions/default/generic.tf @@ -4,7 +4,7 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -17,7 +17,7 @@ locals { platform = "multi-platform" last_updated = "2026-01-16T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/default/github-private-repository.tf b/definitions/default/github-private-repository.tf index 9f1a624..2467d04 100644 --- a/definitions/default/github-private-repository.tf +++ b/definitions/default/github-private-repository.tf @@ -5,7 +5,7 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 * * NOTES @@ -28,7 +28,7 @@ locals { platform = "github-private" last_updated = "2026-03-12T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" visibility = "private" sync_priority = -1 diff --git a/definitions/default/joomla.tf b/definitions/default/joomla.tf index 5113317..7bd05b1 100644 --- a/definitions/default/joomla.tf +++ b/definitions/default/joomla.tf @@ -4,7 +4,7 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -17,7 +17,7 @@ locals { platform = "mokowaas" last_updated = "2026-01-15T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/default/platform.tf b/definitions/default/platform.tf index cd32b2d..477dcd5 100644 --- a/definitions/default/platform.tf +++ b/definitions/default/platform.tf @@ -8,7 +8,7 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -21,7 +21,7 @@ locals { platform = "dolibarr" last_updated = "2026-03-31T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/default/standards.tf b/definitions/default/standards.tf index 5b51f46..ff82396 100644 --- a/definitions/default/standards.tf +++ b/definitions/default/standards.tf @@ -4,7 +4,7 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -17,7 +17,7 @@ locals { platform = "standards" last_updated = "2026-03-03T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/.github-private.def.tf b/definitions/sync/.github-private.def.tf index 1bc5081..43e3445 100644 --- a/definitions/sync/.github-private.def.tf +++ b/definitions/sync/.github-private.def.tf @@ -83,7 +83,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -96,7 +96,7 @@ locals { platform = "multi-platform" last_updated = "2026-01-16T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/.github.def.tf b/definitions/sync/.github.def.tf index f533119..ecf9918 100644 --- a/definitions/sync/.github.def.tf +++ b/definitions/sync/.github.def.tf @@ -98,7 +98,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -111,7 +111,7 @@ locals { platform = "multi-platform" last_updated = "2026-01-16T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/Copy-PortablePath.def.tf b/definitions/sync/Copy-PortablePath.def.tf index 4da453d..33b8bd8 100644 --- a/definitions/sync/Copy-PortablePath.def.tf +++ b/definitions/sync/Copy-PortablePath.def.tf @@ -99,7 +99,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -112,7 +112,7 @@ locals { platform = "multi-platform" last_updated = "2026-01-16T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/DoliMods.def.tf b/definitions/sync/DoliMods.def.tf index 76e29b3..f395231 100644 --- a/definitions/sync/DoliMods.def.tf +++ b/definitions/sync/DoliMods.def.tf @@ -89,7 +89,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -102,7 +102,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoCRM.def.tf b/definitions/sync/MokoCRM.def.tf index 60ce9bf..4c281d9 100644 --- a/definitions/sync/MokoCRM.def.tf +++ b/definitions/sync/MokoCRM.def.tf @@ -91,7 +91,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -104,7 +104,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoCassiopeia.def.tf b/definitions/sync/MokoCassiopeia.def.tf index 59ff676..d682f19 100644 --- a/definitions/sync/MokoCassiopeia.def.tf +++ b/definitions/sync/MokoCassiopeia.def.tf @@ -86,7 +86,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -99,7 +99,7 @@ locals { platform = "mokowaas" last_updated = "2026-01-15T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliAdInsights.def.tf b/definitions/sync/MokoDoliAdInsights.def.tf index 0f22154..db9caf8 100644 --- a/definitions/sync/MokoDoliAdInsights.def.tf +++ b/definitions/sync/MokoDoliAdInsights.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliArt.def.tf b/definitions/sync/MokoDoliArt.def.tf index 291ded3..f7865bd 100644 --- a/definitions/sync/MokoDoliArt.def.tf +++ b/definitions/sync/MokoDoliArt.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliAuth.def.tf b/definitions/sync/MokoDoliAuth.def.tf index e3f0ddc..8051886 100644 --- a/definitions/sync/MokoDoliAuth.def.tf +++ b/definitions/sync/MokoDoliAuth.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliCare.def.tf b/definitions/sync/MokoDoliCare.def.tf index b4ed9ee..2517fe8 100644 --- a/definitions/sync/MokoDoliCare.def.tf +++ b/definitions/sync/MokoDoliCare.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliChimp.def.tf b/definitions/sync/MokoDoliChimp.def.tf index 7683002..4f06fdb 100644 --- a/definitions/sync/MokoDoliChimp.def.tf +++ b/definitions/sync/MokoDoliChimp.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliClaude.def.tf b/definitions/sync/MokoDoliClaude.def.tf index 68da312..24c5cb3 100644 --- a/definitions/sync/MokoDoliClaude.def.tf +++ b/definitions/sync/MokoDoliClaude.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliCredits.def.tf b/definitions/sync/MokoDoliCredits.def.tf index 3a32d95..4787ffc 100644 --- a/definitions/sync/MokoDoliCredits.def.tf +++ b/definitions/sync/MokoDoliCredits.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliDymo.def.tf b/definitions/sync/MokoDoliDymo.def.tf index 194d78b..e19bdea 100644 --- a/definitions/sync/MokoDoliDymo.def.tf +++ b/definitions/sync/MokoDoliDymo.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliForm.def.tf b/definitions/sync/MokoDoliForm.def.tf index 8fe13c4..20f25d5 100644 --- a/definitions/sync/MokoDoliForm.def.tf +++ b/definitions/sync/MokoDoliForm.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliG.def.tf b/definitions/sync/MokoDoliG.def.tf index e9e6f2a..5eddea6 100644 --- a/definitions/sync/MokoDoliG.def.tf +++ b/definitions/sync/MokoDoliG.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliGithub.def.tf b/definitions/sync/MokoDoliGithub.def.tf index fecd5ef..e7cc94f 100644 --- a/definitions/sync/MokoDoliGithub.def.tf +++ b/definitions/sync/MokoDoliGithub.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliHRM.def.tf b/definitions/sync/MokoDoliHRM.def.tf index 6d21e39..7888346 100644 --- a/definitions/sync/MokoDoliHRM.def.tf +++ b/definitions/sync/MokoDoliHRM.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliMods.def.tf b/definitions/sync/MokoDoliMods.def.tf index 7912f42..c5cb7ce 100644 --- a/definitions/sync/MokoDoliMods.def.tf +++ b/definitions/sync/MokoDoliMods.def.tf @@ -103,7 +103,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -116,7 +116,7 @@ locals { platform = "dolibarr" last_updated = "2026-03-31T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliMulti.def.tf b/definitions/sync/MokoDoliMulti.def.tf index bc406e5..1b8b49f 100644 --- a/definitions/sync/MokoDoliMulti.def.tf +++ b/definitions/sync/MokoDoliMulti.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliOffline.def.tf b/definitions/sync/MokoDoliOffline.def.tf index ae984e1..08af317 100644 --- a/definitions/sync/MokoDoliOffline.def.tf +++ b/definitions/sync/MokoDoliOffline.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliPhone.com.def.tf b/definitions/sync/MokoDoliPhone.com.def.tf index 64881a4..afca29e 100644 --- a/definitions/sync/MokoDoliPhone.com.def.tf +++ b/definitions/sync/MokoDoliPhone.com.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliProjTemplate.def.tf b/definitions/sync/MokoDoliProjTemplate.def.tf index e32b47b..80362e4 100644 --- a/definitions/sync/MokoDoliProjTemplate.def.tf +++ b/definitions/sync/MokoDoliProjTemplate.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliRelease.def.tf b/definitions/sync/MokoDoliRelease.def.tf index f1abcdb..c306308 100644 --- a/definitions/sync/MokoDoliRelease.def.tf +++ b/definitions/sync/MokoDoliRelease.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliSign.def.tf b/definitions/sync/MokoDoliSign.def.tf index 8094fbe..f4f130d 100644 --- a/definitions/sync/MokoDoliSign.def.tf +++ b/definitions/sync/MokoDoliSign.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliTools.def.tf b/definitions/sync/MokoDoliTools.def.tf index cdb8ac0..b20c8d4 100644 --- a/definitions/sync/MokoDoliTools.def.tf +++ b/definitions/sync/MokoDoliTools.def.tf @@ -81,7 +81,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -94,7 +94,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDoliTraining.def.tf b/definitions/sync/MokoDoliTraining.def.tf index 3ef587c..2b6c156 100644 --- a/definitions/sync/MokoDoliTraining.def.tf +++ b/definitions/sync/MokoDoliTraining.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoDolibarr.def.tf b/definitions/sync/MokoDolibarr.def.tf index 0b9770c..0ab06d8 100644 --- a/definitions/sync/MokoDolibarr.def.tf +++ b/definitions/sync/MokoDolibarr.def.tf @@ -103,7 +103,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -116,7 +116,7 @@ locals { platform = "dolibarr" last_updated = "2026-03-31T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoISOUpdatePortable.def.tf b/definitions/sync/MokoISOUpdatePortable.def.tf index 826e915..e63839b 100644 --- a/definitions/sync/MokoISOUpdatePortable.def.tf +++ b/definitions/sync/MokoISOUpdatePortable.def.tf @@ -99,7 +99,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -112,7 +112,7 @@ locals { platform = "multi-platform" last_updated = "2026-01-16T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoJoomHero.def.tf b/definitions/sync/MokoJoomHero.def.tf index ca5e45a..e49679c 100644 --- a/definitions/sync/MokoJoomHero.def.tf +++ b/definitions/sync/MokoJoomHero.def.tf @@ -85,7 +85,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -98,7 +98,7 @@ locals { platform = "mokowaas" last_updated = "2026-01-15T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoJoomTOS.def.tf b/definitions/sync/MokoJoomTOS.def.tf index 23a2ea1..d487bfd 100644 --- a/definitions/sync/MokoJoomTOS.def.tf +++ b/definitions/sync/MokoJoomTOS.def.tf @@ -85,7 +85,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -98,7 +98,7 @@ locals { platform = "mokowaas" last_updated = "2026-01-15T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoPerfectPublisher-Discord.def.tf b/definitions/sync/MokoPerfectPublisher-Discord.def.tf index 72e331b..2eea2f3 100644 --- a/definitions/sync/MokoPerfectPublisher-Discord.def.tf +++ b/definitions/sync/MokoPerfectPublisher-Discord.def.tf @@ -99,7 +99,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -112,7 +112,7 @@ locals { platform = "multi-platform" last_updated = "2026-01-16T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoStandards-Template-Client.def.tf b/definitions/sync/MokoStandards-Template-Client.def.tf index 7844159..22d6a9c 100644 --- a/definitions/sync/MokoStandards-Template-Client.def.tf +++ b/definitions/sync/MokoStandards-Template-Client.def.tf @@ -99,7 +99,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -112,7 +112,7 @@ locals { platform = "multi-platform" last_updated = "2026-01-16T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoStandards-Template-Dolibarr.def.tf b/definitions/sync/MokoStandards-Template-Dolibarr.def.tf index be9c23a..f72d075 100644 --- a/definitions/sync/MokoStandards-Template-Dolibarr.def.tf +++ b/definitions/sync/MokoStandards-Template-Dolibarr.def.tf @@ -90,7 +90,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -103,7 +103,7 @@ locals { platform = "dolibarr" last_updated = "2026-01-07T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoStandards-Template-Generic.def.tf b/definitions/sync/MokoStandards-Template-Generic.def.tf index 73f312e..bd1402e 100644 --- a/definitions/sync/MokoStandards-Template-Generic.def.tf +++ b/definitions/sync/MokoStandards-Template-Generic.def.tf @@ -99,7 +99,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -112,7 +112,7 @@ locals { platform = "multi-platform" last_updated = "2026-01-16T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoStandards-Template-Joomla-Component.def.tf b/definitions/sync/MokoStandards-Template-Joomla-Component.def.tf new file mode 100644 index 0000000..a081178 --- /dev/null +++ b/definitions/sync/MokoStandards-Template-Joomla-Component.def.tf @@ -0,0 +1,1335 @@ +/** + * Repository Sync Tracking Definition: mokoconsulting-tech/MokoStandards-Template-Joomla-Component + * + * Auto-generated by MokoStandards bulk sync on 2026-04-02T15:30:04+00:00 + * Platform : waas-component + * Description: A repo template for a Joomla Component coding project according to MokoStandards + * + * DO NOT EDIT MANUALLY — this file is regenerated on every successful sync. + * To change what gets synced, edit api/definitions/default/waas-component.tf + * and re-run the bulk-repo-sync workflow. + */ + +locals { + sync_record = { + metadata = { + repo = "mokoconsulting-tech/MokoStandards-Template-Joomla-Component" + default_branch = "main" + detected_platform = "waas-component" + description = "A repo template for a Joomla Component coding project according to MokoStandards" + sync_timestamp = "2026-04-02T15:30:04+00:00" + source_repo = "mokoconsulting-tech/MokoStandards" + base_definition = "api/definitions/default/waas-component.tf" + } + + sync_stats = { + total_files = 41 + created_files = 3 + updated_files = 35 + skipped_files = 3 + } + + synced_files = [ + { path = "LICENSE" action = "updated" }, + { path = "SECURITY.md" action = "updated" }, + { path = "CODE_OF_CONDUCT.md" action = "updated" }, + { path = "CONTRIBUTING.md" action = "updated" }, + { path = "update.xml" action = "updated" }, + { path = "phpstan.neon" action = "updated" }, + { path = "Makefile" action = "updated" }, + { path = ".gitignore" action = "updated" }, + { path = "composer.json" action = "updated" }, + { path = ".mokostandards" action = "created" }, + { path = "docs/update-server.md" action = "created" }, + { path = ".github/copilot.yml" action = "updated" }, + { path = ".github/copilot-instructions.md" action = "updated" }, + { path = ".github/CLAUDE.md" action = "updated" }, + { path = ".github/workflows/codeql-analysis.yml" action = "updated" }, + { path = ".github/workflows/standards-compliance.yml" action = "updated" }, + { path = ".github/workflows/enterprise-firewall-setup.yml" action = "updated" }, + { path = ".github/workflows/deploy-dev.yml" action = "updated" }, + { path = ".github/workflows/deploy-demo.yml" action = "updated" }, + { path = ".github/workflows/deploy-rs.yml" action = "updated" }, + { path = ".github/workflows/sync-version-on-merge.yml" action = "updated" }, + { path = ".github/workflows/auto-release.yml" action = "updated" }, + { path = ".github/workflows/repository-cleanup.yml" action = "updated" }, + { path = ".github/workflows/auto-dev-issue.yml" action = "updated" }, + { path = ".github/workflows/repo_health.yml" action = "created" }, + { path = ".github/ISSUE_TEMPLATE/config.yml" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/adr.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/bug_report.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/documentation.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/enterprise_support.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/feature_request.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/firewall-request.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/question.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/request-license.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/rfc.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/security.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/joomla_issue.md" action = "updated" }, + { path = ".github/CODEOWNERS" action = "updated" }, + { path = ".github/.mokostandards" action = "migrated from root" }, + ] + + skipped_files = [ + { path = "GOVERNANCE.md" reason = "Preserved (always_overwrite=false)" }, + { path = ".github/workflows/ci-joomla.yml" reason = "Source file not found" }, + { path = ".github/workflows/custom/README.md" reason = "README — never overwritten" }, + ] + } +} + +# ---- Base platform definition (reference copy) ---- +/** + * MokoWaaS Component Structure Definition + * Standard repository structure for MokoWaaS (Joomla) components + * + * Copyright (C) 2026 Moko Consulting + * SPDX-License-Identifier: GPL-3.0-or-later + * Version: 05.00.00 + * Schema Version: 1.0 + */ + +locals { + repository_structure = { + metadata = { + name = "MokoWaaS Component" + description = "Standard repository structure for MokoWaaS (Joomla) components" + repository_type = "waas-component" + platform = "mokowaas" + last_updated = "2026-01-15T00:00:00Z" + maintainer = "Moko Consulting" + version = "05.00.00" + schema_version = "1.0" + } + + root_files = [ + { + name = "README.md" + extension = "md" + description = "Developer-focused documentation for contributors and maintainers" + required = true + always_overwrite = false + protected = true + audience = "developer" + }, + { + name = "LICENSE" + extension = "" + description = "License file (GPL-3.0-or-later) - Default for Joomla/WaaS components" + required = true + audience = "general" + template = "templates/licenses/GPL-3.0" + license_type = "GPL-3.0-or-later" + }, + { + name = "CHANGELOG.md" + extension = "md" + description = "Version history and changes" + required = true + audience = "general" + }, + { + name = "SECURITY.md" + extension = "md" + description = "Security policy and vulnerability reporting" + required = true + always_overwrite = true + template = "templates/docs/required/template-SECURITY.md" + audience = "general" + }, + { + name = "CODE_OF_CONDUCT.md" + extension = "md" + description = "Community code of conduct" + required = true + always_overwrite = true + template = "templates/docs/extra/template-CODE_OF_CONDUCT.md" + always_overwrite = true + audience = "contributor" + }, + { + name = "ROADMAP.md" + extension = "md" + description = "Project roadmap with version goals and milestones" + required = false + audience = "general" + }, + { + name = "CONTRIBUTING.md" + extension = "md" + description = "Contribution guidelines" + required = true + always_overwrite = true + template = "templates/docs/required/template-CONTRIBUTING.md" + audience = "contributor" + }, + { + name = "update.xml" + extension = "xml" + description = "Joomla extension update server manifest — lists releases for Joomla auto-update; must be kept in sync with manifest.xml version" + required = true + always_overwrite = false + audience = "developer" + template = "templates/joomla/update.xml.template" + stub_content = <<-MOKO_END + + + + {{EXTENSION_NAME}} + {{REPO_NAME}} — Moko Consulting Joomla extension + {{EXTENSION_ELEMENT}} + {{EXTENSION_TYPE}} + {{VERSION}} + {{REPO_URL}}/releases/tag/{{VERSION}} + + {{DOWNLOAD_URL}} + + + 7.4 + Moko Consulting + {{MAINTAINER_URL}} + + + MOKO_END + }, + { + name = "phpstan.neon" + extension = "neon" + description = "PHPStan static analysis config with Joomla framework class stubs" + required = true + always_overwrite = true + audience = "developer" + template = "templates/configs/phpstan.joomla.neon" + }, + { + name = "Makefile" + description = "Build automation using MokoStandards templates" + required = true + always_overwrite = true + audience = "developer" + source_path = "templates/makefiles" + source_filename = "Makefile.joomla.template" + source_type = "template" + destination_path = "." + destination_filename = "Makefile" + create_path = false + template = "templates/makefiles/Makefile.joomla.template" + }, + { + name = ".gitignore" + extension = "gitignore" + description = "Git ignore patterns for Joomla development - preserved during sync operations" + required = true + always_overwrite = false + audience = "developer" + template = "templates/configs/.gitignore.joomla" + validation_rules = [ + { + type = "content-pattern" + description = "Must contain sftp-config pattern to ignore SFTP sync configuration files" + pattern = "sftp-config" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain user.css pattern to ignore custom user CSS overrides" + pattern = "user\\.css" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain user.js pattern to ignore custom user JavaScript overrides" + pattern = "user\\.js" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain modulebuilder.txt pattern to ignore Joomla Module Builder artifacts" + pattern = "modulebuilder\\.txt" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain colors_custom.css pattern to ignore custom color scheme overrides" + pattern = "colors_custom\\.css" + severity = "error" + } + ] + }, + { + name = ".gitattributes" + extension = "gitattributes" + description = "Git attributes configuration" + required = true + audience = "developer" + }, + { + name = ".editorconfig" + extension = "editorconfig" + description = "Editor configuration for consistent coding style - preserved during sync" + required = true + always_overwrite = false + audience = "developer" + }, + { + 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.joomla.json" + }, + { + name = ".mokostandards" + extension = "yml" + description = "MokoStandards governance attachment — links this repo back to the standards source" + required = true + always_overwrite = true + audience = "developer" + template = "templates/configs/mokostandards.yml.template" + }, + { + name = "GOVERNANCE.md" + extension = "md" + description = "Project governance rules, roles, and decision process — auto-maintained by MokoStandards" + required = true + always_overwrite = false + protected = true + audience = "all" + template = "templates/docs/required/GOVERNANCE.md" + } + ] + + directories = [ + { + name = "site" + path = "site" + description = "Component frontend (site) code" + required = true + purpose = "Contains frontend component code deployed to site" + files = [ + { + name = "controller.php" + extension = "php" + description = "Main site controller" + required = true + audience = "developer" + }, + { + name = "manifest.xml" + extension = "xml" + description = "Component manifest for site" + required = true + audience = "developer" + } + ] + subdirectories = [ + { + name = "controllers" + path = "site/controllers" + description = "Site controllers" + requirement_status = "suggested" + }, + { + name = "models" + path = "site/models" + description = "Site models" + requirement_status = "suggested" + }, + { + name = "views" + path = "site/views" + description = "Site views" + required = true + } + ] + }, + { + name = "admin" + path = "admin" + description = "Component backend (admin) code" + required = true + purpose = "Contains backend component code for administrator" + files = [ + { + name = "controller.php" + extension = "php" + description = "Main admin controller" + required = true + audience = "developer" + } + ] + subdirectories = [ + { + name = "controllers" + path = "admin/controllers" + description = "Admin controllers" + requirement_status = "suggested" + }, + { + name = "models" + path = "admin/models" + description = "Admin models" + requirement_status = "suggested" + }, + { + name = "views" + path = "admin/views" + description = "Admin views" + required = true + }, + { + name = "sql" + path = "admin/sql" + description = "Database schema files" + requirement_status = "suggested" + } + ] + }, + { + name = "media" + path = "media" + description = "Media files (CSS, JS, images)" + requirement_status = "suggested" + purpose = "Contains static assets" + subdirectories = [ + { + name = "css" + path = "media/css" + description = "Stylesheets" + requirement_status = "suggested" + }, + { + name = "js" + path = "media/js" + description = "JavaScript files" + requirement_status = "suggested" + }, + { + name = "images" + path = "media/images" + description = "Image files" + requirement_status = "suggested" + } + ] + }, + { + name = "language" + path = "language" + description = "Language translation files" + required = true + purpose = "Contains language INI files" + }, + { + name = "docs" + path = "docs" + description = "Developer and technical documentation" + required = true + purpose = "Contains technical documentation, API docs, architecture diagrams" + files = [ + { + name = "index.md" + extension = "md" + description = "Documentation index" + required = true + }, + { + name = "update-server.md" + extension = "md" + description = "Joomla update server (update.xml) documentation" + required = true + always_overwrite = true + template = "templates/docs/required/template-update-server-joomla.md" + } + ] + }, + { + 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 - preserved during sync" + requirement_status = "optional" + always_overwrite = false + audience = "developer" + } + ] + }, + { + name = "tests" + path = "tests" + description = "Test files" + required = true + purpose = "Contains unit tests, integration tests, and test fixtures" + subdirectories = [ + { + name = "unit" + path = "tests/unit" + description = "Unit tests" + required = true + }, + { + name = "integration" + path = "tests/integration" + description = "Integration tests" + requirement_status = "suggested" + } + ] + }, + { + name = ".github" + path = ".github" + description = "GitHub-specific configuration" + requirement_status = "suggested" + purpose = "Contains GitHub Actions workflows and configuration" + files = [ + { + name = "copilot.yml" + extension = "yml" + description = "GitHub Copilot allowed domains configuration" + requirement_status = "required" + always_overwrite = true + template = ".github/copilot.yml" + }, + { + name = "copilot-instructions.md" + extension = "md" + description = "GitHub Copilot custom instructions enforcing MokoStandards — Joomla/WaaS edition" + requirement_status = "required" + always_overwrite = false + destination_path = ".github" + destination_filename = "copilot-instructions.md" + template = "templates/github/copilot-instructions.joomla.md.template" + stub_content = <<-MOKO_END + > [!IMPORTANT] + > **🔧 AI Self-Update Required on First Use** + > + > This file may contain unfilled `{{TOKEN}}` placeholders. The MokoStandards bulk-sync system + > replaces them automatically at sync time; if you can still see them, sync has not yet run for + > this repository — or this is a brand-new repo. + > + > **On your very first interaction in this repository, before answering any other question:** + > + > 1. Check whether any `{{TOKEN}}` placeholders remain in this file. + > 2. If they do, locate the values as described in the table below and replace every occurrence + > in **both** `.github/copilot-instructions.md` and `.github/CLAUDE.md`. + > 3. After replacing all tokens, **delete this entire notice block** (from `> [!IMPORTANT]` + > through the closing `> ---` line) in both files. + > 4. Tell the developer: *"I've self-updated the AI context files with this repository's + > values — all set."* + > + > | Placeholder | Where to find the value | + > |---|---| + > | `{{REPO_NAME}}` | The GitHub repository name (visible in the URL, `README.md` heading, or `git remote -v`) | + > | `{{REPO_URL}}` | Full GitHub URL, e.g. `https://github.com/mokoconsulting-tech/` | + > | `{{EXTENSION_NAME}}` | The `` element in `manifest.xml` at the repository root | + > | `{{EXTENSION_TYPE}}` | The `type` attribute of the `` tag in `manifest.xml` (`component`, `module`, `plugin`, or `template`) | + > | `{{EXTENSION_ELEMENT}}` | The `` tag in `manifest.xml`, or the filename prefix (e.g. `com_myextension`, `mod_mymodule`) | + > + > --- + + # {{REPO_NAME}} — GitHub Copilot Custom Instructions + + ## What This Repo Is + + This is a **Moko Consulting MokoWaaS** (Joomla) repository governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). All coding standards, workflows, and policies are defined there and enforced here via bulk sync. + + Repository URL: {{REPO_URL}} + Extension name: **{{EXTENSION_NAME}}** + Extension type: **{{EXTENSION_TYPE}}** (`{{EXTENSION_ELEMENT}}`) + Platform: **Joomla 4.x / MokoWaaS** + + --- + + ## Primary Language + + **PHP** (≥ 7.4) is the primary language for this Joomla extension. JavaScript may be used for frontend enhancements. YAML uses 2-space indentation. All other text files use tabs per `.editorconfig`. + + --- + + ## File Header — Always Required on New Files + + Every new file needs a copyright header as its first content. + + **PHP:** + ```php + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: {{REPO_NAME}}.{{EXTENSION_TYPE}} + * INGROUP: {{REPO_NAME}} + * REPO: {{REPO_URL}} + * PATH: /path/to/file.php + * VERSION: XX.YY.ZZ + * BRIEF: One-line description of purpose + */ + + defined('_JEXEC') or die; + ``` + + **Markdown:** + ```markdown + + ``` + + **YAML / Shell / XML:** Use the appropriate comment syntax with the same fields. JSON files are exempt. + + --- + + ## Version Management + + **`README.md` is the single source of truth for the repository version.** + + - **Bump the patch version on every PR** — increment `XX.YY.ZZ` (e.g. `01.02.03` → `01.02.04`) in `README.md` before opening the PR; the `sync-version-on-merge` workflow propagates it automatically to all badges and `FILE INFORMATION` headers on merge to `main`. + - The `VERSION: XX.YY.ZZ` field in `README.md` governs all other version references. + - Version format is zero-padded semver: `XX.YY.ZZ` (e.g. `01.02.03`). + - Never hardcode a specific version in document body text — use the badge or FILE INFORMATION header only. + + ### Joomla Version Alignment + + The version in `README.md` **must always match** the `` tag in `manifest.xml` and the latest entry in `update.xml`. The `make release` command / release workflow updates all three automatically. + + ```xml + + 01.02.04 + + + + + {{EXTENSION_NAME}} + 01.02.04 + + + {{REPO_URL}}/releases/download/01.02.04/{{EXTENSION_ELEMENT}}-01.02.04.zip + + + + + + + ``` + + --- + + ## Joomla Extension Structure + + ``` + {{REPO_NAME}}/ + ├── manifest.xml # Joomla installer manifest (root — required) + ├── update.xml # Update server manifest (root — required, see below) + ├── site/ # Frontend (site) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ └── views/ + ├── admin/ # Backend (admin) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ ├── views/ + │ └── sql/ + ├── language/ # Language INI files + ├── media/ # CSS, JS, images (deployed to /media/{{EXTENSION_ELEMENT}}/) + ├── docs/ # Technical documentation + ├── tests/ # Test suite + ├── .github/ + │ ├── workflows/ + │ ├── copilot-instructions.md # This file + │ └── CLAUDE.md + ├── README.md # Version source of truth + ├── CHANGELOG.md + ├── CONTRIBUTING.md + ├── LICENSE # GPL-3.0-or-later + └── Makefile # Build automation + ``` + + --- + + ## update.xml — Required in Repo Root + + `update.xml` **must exist at the repository root**. It is the Joomla update server manifest that allows Joomla installations to check for new versions of this extension. + + The `manifest.xml` must reference it via: + ```xml + + + {{REPO_URL}}/raw/main/update.xml + + + ``` + + **Rules:** + - Every release must prepend a new `` block at the top of `update.xml` — old entries must be preserved below. + - The `` in `update.xml` must exactly match `` in `manifest.xml` and the version in `README.md`. + - The `` must be a publicly accessible direct download link (GitHub Releases asset URL). + - `` — the backslash is a **literal backslash character** in the XML attribute value; Joomla's update-server parser treats the value as a regular expression, so `\.` matches a literal dot and `[0-9]+` matches one or more digits. Do not double-escape it. + + --- + + ## manifest.xml Rules + + - Lives at the repo root as `manifest.xml` (not inside `site/` or `admin/`). + - `` tag must be kept in sync with `README.md` version and `update.xml`. + - Must include `` block pointing to this repo's `update.xml`. + - Must include `` and `` sections. + - Joomla 4.x requires `Moko\{{EXTENSION_NAME}}` for namespaced extensions. + + --- + + ## GitHub Actions — Token Usage + + Every workflow must use **`secrets.GH_TOKEN`** (the org-level Personal Access Token). + + ```yaml + # ✅ Correct + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + ``` + + ```yaml + # ❌ Wrong — never use these in workflows + token: ${{ github.token }} + token: ${{ secrets.GITHUB_TOKEN }} + ``` + + --- + + ## MokoStandards Reference + + This repository is governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). Authoritative policies: + + | Document | Purpose | + |----------|---------| + | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | + | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | + | [branching-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | + | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR title/body conventions | + | [changelog-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | + | [joomla-development-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/guide/waas/joomla-development-guide.md) | MokoWaaS Joomla extension development guide | + + --- + + ## Naming Conventions + + | Context | Convention | Example | + |---------|-----------|---------| + | PHP class | `PascalCase` | `MyController` | + | PHP method / function | `camelCase` | `getItems()` | + | PHP variable | `$snake_case` | `$item_id` | + | PHP constant | `UPPER_SNAKE_CASE` | `MAX_ITEMS` | + | PHP class file | `PascalCase.php` | `ItemModel.php` | + | YAML workflow | `kebab-case.yml` | `ci-joomla.yml` | + | Markdown doc | `kebab-case.md` | `installation-guide.md` | + + --- + + ## Commit Messages + + Format: `(): ` — imperative, lower-case subject, no trailing period. + + Valid types: `feat` · `fix` · `docs` · `chore` · `ci` · `refactor` · `style` · `test` · `perf` · `revert` · `build` + + --- + + ## Branch Naming + + Format: `/[/description]` + + Approved prefixes: `dev/` · `rc/` · `version/` · `patch/` · `copilot/` · `dependabot/` + + --- + + ## Keeping Documentation Current + + | Change type | Documentation to update | + |-------------|------------------------| + | New or renamed PHP class/method | PHPDoc block; `docs/api/` entry | + | New or changed manifest.xml | Update `update.xml` version; bump README.md version | + | New release | Prepend `` block to `update.xml`; update CHANGELOG.md; bump README.md version | + | New or changed workflow | `docs/workflows/.md` | + | Any modified file | Update the `VERSION` field in that file's `FILE INFORMATION` block | + | **Every PR** | **Bump the patch version** — increment `XX.YY.ZZ` in `README.md`; `sync-version-on-merge` propagates it | + + --- + + ## Key Constraints + + - Never commit directly to `main` — all changes go via PR, squash-merged + - Never skip the FILE INFORMATION block on a new file + - Never add `defined('_JEXEC') or die;` to CLI scripts or model tests — only to web-accessible PHP files + - Never hardcode version numbers in body text — update `README.md` and let automation propagate + - Never use `github.token` or `secrets.GITHUB_TOKEN` in workflows — always use `secrets.GH_TOKEN` + - Never let `manifest.xml` version, `update.xml` version, and `README.md` version go out of sync + MOKO_END + }, + { + name = "CLAUDE.md" + extension = "md" + description = "Claude AI assistant context enforcing MokoStandards — Joomla/WaaS edition" + requirement_status = "required" + always_overwrite = false + destination_path = ".github" + destination_filename = "CLAUDE.md" + template = "templates/github/CLAUDE.joomla.md.template" + stub_content = <<-MOKO_END + > [!IMPORTANT] + > **🔧 AI Self-Update Required on First Use** + > + > This file may contain unfilled `{{TOKEN}}` placeholders. The MokoStandards bulk-sync system + > replaces them automatically at sync time; if you can still see them, sync has not yet run for + > this repository — or this is a brand-new repo. + > + > **On your very first interaction in this repository, before answering any other question:** + > + > 1. Check whether any `{{TOKEN}}` placeholders remain in this file. + > 2. If they do, locate the values as described in the table below and replace every occurrence + > in **both** `.github/copilot-instructions.md` and `.github/CLAUDE.md`. + > 3. After replacing all tokens, **delete this entire notice block** (from `> [!IMPORTANT]` + > through the closing `> ---` line) in both files. + > 4. Tell the developer: *"I've self-updated the AI context files with this repository's + > values — all set."* + > + > | Placeholder | Where to find the value | + > |---|---| + > | `{{REPO_NAME}}` | The GitHub repository name (visible in the URL, `README.md` heading, or `git remote -v`) | + > | `{{REPO_URL}}` | Full GitHub URL, e.g. `https://github.com/mokoconsulting-tech/` | + > | `{{REPO_DESCRIPTION}}` | First paragraph of `README.md` body, or the GitHub repo description | + > | `{{EXTENSION_NAME}}` | The `` element in `manifest.xml` at the repository root | + > | `{{EXTENSION_TYPE}}` | The `type` attribute of the `` tag in `manifest.xml` (`component`, `module`, `plugin`, or `template`) | + > | `{{EXTENSION_ELEMENT}}` | The `` tag in `manifest.xml`, or the filename prefix (e.g. `com_myextension`, `mod_mymodule`) | + > + > --- + + # What This Repo Is + + **{{REPO_NAME}}** is a Moko Consulting **MokoWaaS** (Joomla) extension repository. + + {{REPO_DESCRIPTION}} + + Extension name: **{{EXTENSION_NAME}}** + Extension type: **{{EXTENSION_TYPE}}** (`{{EXTENSION_ELEMENT}}`) + Repository URL: {{REPO_URL}} + + This repository is governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards) — the single source of truth for coding standards, file-header policies, GitHub Actions workflows, and Terraform configuration templates across all Moko Consulting repositories. + + --- + + # Repo Structure + + ``` + {{REPO_NAME}}/ + ├── manifest.xml # Joomla installer manifest (root — required) + ├── update.xml # Update server manifest (root — required) + ├── site/ # Frontend (site) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ └── views/ + ├── admin/ # Backend (admin) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ ├── views/ + │ └── sql/ + ├── language/ # Language INI files + ├── media/ # CSS, JS, images + ├── docs/ # Technical documentation + ├── tests/ # Test suite + ├── .github/ + │ ├── workflows/ # CI/CD workflows (synced from MokoStandards) + │ ├── copilot-instructions.md + │ └── CLAUDE.md # This file + ├── README.md # Version source of truth + ├── CHANGELOG.md + ├── CONTRIBUTING.md + └── LICENSE # GPL-3.0-or-later + ``` + + --- + + # Primary Language + + **PHP** (≥ 7.4) is the primary language for this Joomla extension. YAML uses 2-space indentation. All other text files use tabs per `.editorconfig`. + + --- + + # Version Management + + **`README.md` is the single source of truth for the repository version.** + + - **Bump the patch version on every PR** — increment `XX.YY.ZZ` (e.g. `01.02.03` → `01.02.04`) in `README.md` before opening the PR; the `sync-version-on-merge` workflow propagates it to all `FILE INFORMATION` headers automatically on merge. + - Version format is zero-padded semver: `XX.YY.ZZ` (e.g. `01.02.03`). + - Never hardcode a version number in body text — use the badge or FILE INFORMATION header only. + + ### Joomla Version Alignment + + Three files must **always have the same version**: + + | File | Where the version lives | + |------|------------------------| + | `README.md` | `FILE INFORMATION` block + badge | + | `manifest.xml` | `` tag | + | `update.xml` | `` in the most recent `` block | + + The `make release` command / release workflow syncs all three automatically. + + --- + + # update.xml — Required in Repo Root + + `update.xml` is the Joomla update server manifest. It allows Joomla installations to check for new versions of this extension via: + + ```xml + + + + {{REPO_URL}}/raw/main/update.xml + + + ``` + + **Rules:** + - Every release prepends a new `` block at the top — older entries are preserved. + - `` in `update.xml` must exactly match `` in `manifest.xml` and `README.md`. + - `` must be a publicly accessible GitHub Releases asset URL. + - `` — backslash is literal (Joomla regex syntax). + + Example `update.xml` entry for a new release: + ```xml + + + {{EXTENSION_NAME}} + {{REPO_NAME}} + {{EXTENSION_ELEMENT}} + {{EXTENSION_TYPE}} + 01.02.04 + {{REPO_URL}}/releases/tag/01.02.04 + + + {{REPO_URL}}/releases/download/01.02.04/{{EXTENSION_ELEMENT}}-01.02.04.zip + + + + 7.4 + Moko Consulting + https://mokoconsulting.tech + + + ``` + + --- + + # File Header Requirements + + Every new file **must** have a copyright header as its first content. JSON files, binary files, generated files, and third-party files are exempt. + + **PHP:** + ```php + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: {{REPO_NAME}}.{{EXTENSION_TYPE}} + * INGROUP: {{REPO_NAME}} + * REPO: {{REPO_URL}} + * PATH: /site/controllers/item.php + * VERSION: XX.YY.ZZ + * BRIEF: One-line description of file purpose + */ + + defined('_JEXEC') or die; + ``` + + **Markdown / YAML / Shell / XML:** Use the appropriate comment syntax with the same fields. + + --- + + # Coding Standards + + ## Naming Conventions + + | Context | Convention | Example | + |---------|-----------|---------| + | PHP class | `PascalCase` | `ItemModel` | + | PHP method / function | `camelCase` | `getItems()` | + | PHP variable | `$snake_case` | `$item_id` | + | PHP constant | `UPPER_SNAKE_CASE` | `MAX_ITEMS` | + | PHP class file | `PascalCase.php` | `ItemModel.php` | + | YAML workflow | `kebab-case.yml` | `ci-joomla.yml` | + | Markdown doc | `kebab-case.md` | `installation-guide.md` | + + ## Commit Messages + + Format: `(): ` — imperative, lower-case subject, no trailing period. + + Valid types: `feat` · `fix` · `docs` · `chore` · `ci` · `refactor` · `style` · `test` · `perf` · `revert` · `build` + + ## Branch Naming + + Format: `/[/description]` + + Approved prefixes: `dev/` · `rc/` · `version/` · `patch/` · `copilot/` · `dependabot/` + + --- + + # GitHub Actions — Token Usage + + Every workflow must use **`secrets.GH_TOKEN`** (the org-level Personal Access Token). + + ```yaml + # ✅ Correct + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + ``` + + ```yaml + # ❌ Wrong — never use these + token: ${{ github.token }} + token: ${{ secrets.GITHUB_TOKEN }} + ``` + + --- + + # Keeping Documentation Current + + | Change type | Documentation to update | + |-------------|------------------------| + | New or renamed PHP class/method | PHPDoc block; `docs/api/` entry | + | New or changed `manifest.xml` | Sync version to `update.xml` and `README.md` | + | New release | Prepend `` to `update.xml`; update `CHANGELOG.md`; bump `README.md` | + | New or changed workflow | `docs/workflows/.md` | + | Any modified file | Update the `VERSION` field in that file's `FILE INFORMATION` block | + | **Every PR** | **Bump the patch version** — increment `XX.YY.ZZ` in `README.md`; `sync-version-on-merge` propagates it | + + --- + + # What NOT to Do + + - **Never commit directly to `main`** — all changes go through a PR. + - **Never hardcode version numbers** in body text — update `README.md` and let automation propagate. + - **Never let `manifest.xml`, `update.xml`, and `README.md` versions diverge.** + - **Never skip the FILE INFORMATION block** on a new source file. + - **Never use bare `catch (\Throwable $e) {}`** — always log or re-throw. + - **Never mix tabs and spaces** within a file — follow `.editorconfig`. + - **Never use `github.token` or `secrets.GITHUB_TOKEN` in workflows** — always use `secrets.GH_TOKEN`. + - **Never remove `defined('_JEXEC') or die;`** from web-accessible PHP files. + + --- + + # PR Checklist + + Before opening a PR, verify: + + - [ ] Patch version bumped in `README.md` (e.g. `01.02.03` → `01.02.04`) + - [ ] If this is a release: `manifest.xml` version updated; `update.xml` updated with new entry + - [ ] FILE INFORMATION headers updated in modified files + - [ ] CHANGELOG.md updated + - [ ] Tests pass + + --- + + # Key Policy Documents (MokoStandards) + + | Document | Purpose | + |----------|---------| + | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | + | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | + | [branching-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | + | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR conventions | + | [changelog-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | + | [joomla-development-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/guide/waas/joomla-development-guide.md) | MokoWaaS Joomla extension development guide | + MOKO_END + } + ] + subdirectories = [ + { + name = "workflows" + path = ".github/workflows" + description = "GitHub Actions workflows" + requirement_status = "required" + files = [ + { + name = "ci-joomla.yml" + extension = "yml" + description = "Joomla-specific CI workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/joomla/ci-joomla.yml.template" + }, + { + name = "codeql-analysis.yml" + extension = "yml" + description = "CodeQL security analysis workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/generic/codeql-analysis.yml.template" + }, + { + name = "standards-compliance.yml" + extension = "yml" + description = "MokoStandards compliance validation" + requirement_status = "required" + always_overwrite = true + template = ".github/workflows/standards-compliance.yml" + }, + { + name = "enterprise-firewall-setup.yml" + extension = "yml" + description = "Enterprise firewall configuration for trusted domain access" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/enterprise-firewall-setup.yml.template" + }, + { + name = "deploy-dev.yml" + extension = "yml" + description = "SFTP deployment of src/ to the development server" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-dev.yml.template" + }, + { + name = "deploy-demo.yml" + extension = "yml" + description = "SFTP deployment of src/ to the demo server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-demo.yml.template" + }, + { + name = "deploy-rs.yml" + extension = "yml" + description = "SFTP deployment of src/ to the release staging server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-rs.yml.template" + }, + { + name = "sync-version-on-merge.yml" + extension = "yml" + description = "Auto-bump patch version on merge and propagate to all file headers" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/sync-version-on-merge.yml.template" + }, + { + name = "auto-release.yml" + extension = "yml" + description = "Auto-create GitHub Release on push to main with version from README.md" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-release.yml.template" + }, + { + name = "repository-cleanup.yml" + extension = "yml" + description = "Scheduled cleanup: delete retired workflows, stale branches, old workflow runs" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/repository-cleanup.yml.template" + }, + { + name = "auto-dev-issue.yml" + extension = "yml" + description = "Auto-create tracking issue when a dev/** branch is pushed" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-dev-issue.yml.template" + }, + { + name = "repo_health.yml" + extension = "yml" + description = "Joomla-specific repository health check workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/joomla/repo_health.yml.template" + } + ] + }, + { + name = "ISSUE_TEMPLATE" + path = ".github/ISSUE_TEMPLATE" + description = "GitHub issue templates synced from MokoStandards" + requirement_status = "required" + files = [ + { + name = "config.yml" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/config.yml" + }, + { + name = "adr.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/adr.md" + }, + { + name = "bug_report.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/bug_report.md" + }, + { + name = "documentation.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/documentation.md" + }, + { + name = "enterprise_support.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/enterprise_support.md" + }, + { + name = "feature_request.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/feature_request.md" + }, + { + name = "firewall-request.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/firewall-request.md" + }, + { + name = "question.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/question.md" + }, + { + name = "request-license.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/request-license.md" + }, + { + name = "rfc.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/rfc.md" + }, + { + name = "security.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/security.md" + }, + { + name = "joomla_issue.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/joomla_issue.md" + } + ] + } + ] + } + ] + + repository_requirements = { + secrets = [ + { + name = "GH_TOKEN" + description = "Org-level GitHub PAT for automation" + required = true + scope = "org" + }, + { + name = "DEV_FTP_KEY" + description = "SSH private key for SFTP dev deployment (preferred); if DEV_FTP_PASSWORD is also set it is used as the key passphrase, with password-only as fallback" + required = false + scope = "org" + }, + { + name = "DEV_FTP_PASSWORD" + description = "SFTP password for dev deployment; used as SSH key passphrase when DEV_FTP_KEY is also set, and as standalone fallback if key auth fails" + required = false + scope = "org" + note = "At least one of DEV_FTP_KEY or DEV_FTP_PASSWORD must be configured" + } + ] + + variables = [ + { + name = "DEV_FTP_HOST" + description = "Dev server hostname; may include port suffix (e.g. dev.example.com or dev.example.com:2222)" + required = true + scope = "org" + }, + { + name = "DEV_FTP_PATH" + description = "Base remote path for SFTP deployment (e.g. /var/www/html)" + required = true + scope = "org" + }, + { + name = "DEV_FTP_USERNAME" + description = "SFTP username for dev server authentication" + required = true + scope = "org" + }, + { + name = "DEV_FTP_PORT" + description = "Explicit SFTP port override; if omitted the port is parsed from DEV_FTP_HOST or defaults to 22" + required = false + scope = "org" + }, + { + name = "DEV_FTP_SUFFIX" + description = "Per-repo path suffix appended to DEV_FTP_PATH (e.g. /my-extension)" + required = false + scope = "repo" + } + ] + } + } +} diff --git a/definitions/sync/MokoStandards-Template-Joomla-Library.def.tf b/definitions/sync/MokoStandards-Template-Joomla-Library.def.tf new file mode 100644 index 0000000..817bbab --- /dev/null +++ b/definitions/sync/MokoStandards-Template-Joomla-Library.def.tf @@ -0,0 +1,1335 @@ +/** + * Repository Sync Tracking Definition: mokoconsulting-tech/MokoStandards-Template-Joomla-Library + * + * Auto-generated by MokoStandards bulk sync on 2026-04-02T15:31:13+00:00 + * Platform : waas-component + * Description: A repo template for a Joomla Library coding project according to MokoStandards + * + * DO NOT EDIT MANUALLY — this file is regenerated on every successful sync. + * To change what gets synced, edit api/definitions/default/waas-component.tf + * and re-run the bulk-repo-sync workflow. + */ + +locals { + sync_record = { + metadata = { + repo = "mokoconsulting-tech/MokoStandards-Template-Joomla-Library" + default_branch = "main" + detected_platform = "waas-component" + description = "A repo template for a Joomla Library coding project according to MokoStandards" + sync_timestamp = "2026-04-02T15:31:13+00:00" + source_repo = "mokoconsulting-tech/MokoStandards" + base_definition = "api/definitions/default/waas-component.tf" + } + + sync_stats = { + total_files = 41 + created_files = 3 + updated_files = 35 + skipped_files = 3 + } + + synced_files = [ + { path = "LICENSE" action = "updated" }, + { path = "SECURITY.md" action = "updated" }, + { path = "CODE_OF_CONDUCT.md" action = "updated" }, + { path = "CONTRIBUTING.md" action = "updated" }, + { path = "update.xml" action = "updated" }, + { path = "phpstan.neon" action = "updated" }, + { path = "Makefile" action = "updated" }, + { path = ".gitignore" action = "updated" }, + { path = "composer.json" action = "updated" }, + { path = ".mokostandards" action = "created" }, + { path = "docs/update-server.md" action = "created" }, + { path = ".github/copilot.yml" action = "updated" }, + { path = ".github/copilot-instructions.md" action = "updated" }, + { path = ".github/CLAUDE.md" action = "updated" }, + { path = ".github/workflows/codeql-analysis.yml" action = "updated" }, + { path = ".github/workflows/standards-compliance.yml" action = "updated" }, + { path = ".github/workflows/enterprise-firewall-setup.yml" action = "updated" }, + { path = ".github/workflows/deploy-dev.yml" action = "updated" }, + { path = ".github/workflows/deploy-demo.yml" action = "updated" }, + { path = ".github/workflows/deploy-rs.yml" action = "updated" }, + { path = ".github/workflows/sync-version-on-merge.yml" action = "updated" }, + { path = ".github/workflows/auto-release.yml" action = "updated" }, + { path = ".github/workflows/repository-cleanup.yml" action = "updated" }, + { path = ".github/workflows/auto-dev-issue.yml" action = "updated" }, + { path = ".github/workflows/repo_health.yml" action = "created" }, + { path = ".github/ISSUE_TEMPLATE/config.yml" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/adr.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/bug_report.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/documentation.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/enterprise_support.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/feature_request.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/firewall-request.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/question.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/request-license.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/rfc.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/security.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/joomla_issue.md" action = "updated" }, + { path = ".github/CODEOWNERS" action = "updated" }, + { path = ".github/.mokostandards" action = "migrated from root" }, + ] + + skipped_files = [ + { path = "GOVERNANCE.md" reason = "Preserved (always_overwrite=false)" }, + { path = ".github/workflows/ci-joomla.yml" reason = "Source file not found" }, + { path = ".github/workflows/custom/README.md" reason = "README — never overwritten" }, + ] + } +} + +# ---- Base platform definition (reference copy) ---- +/** + * MokoWaaS Component Structure Definition + * Standard repository structure for MokoWaaS (Joomla) components + * + * Copyright (C) 2026 Moko Consulting + * SPDX-License-Identifier: GPL-3.0-or-later + * Version: 05.00.00 + * Schema Version: 1.0 + */ + +locals { + repository_structure = { + metadata = { + name = "MokoWaaS Component" + description = "Standard repository structure for MokoWaaS (Joomla) components" + repository_type = "waas-component" + platform = "mokowaas" + last_updated = "2026-01-15T00:00:00Z" + maintainer = "Moko Consulting" + version = "05.00.00" + schema_version = "1.0" + } + + root_files = [ + { + name = "README.md" + extension = "md" + description = "Developer-focused documentation for contributors and maintainers" + required = true + always_overwrite = false + protected = true + audience = "developer" + }, + { + name = "LICENSE" + extension = "" + description = "License file (GPL-3.0-or-later) - Default for Joomla/WaaS components" + required = true + audience = "general" + template = "templates/licenses/GPL-3.0" + license_type = "GPL-3.0-or-later" + }, + { + name = "CHANGELOG.md" + extension = "md" + description = "Version history and changes" + required = true + audience = "general" + }, + { + name = "SECURITY.md" + extension = "md" + description = "Security policy and vulnerability reporting" + required = true + always_overwrite = true + template = "templates/docs/required/template-SECURITY.md" + audience = "general" + }, + { + name = "CODE_OF_CONDUCT.md" + extension = "md" + description = "Community code of conduct" + required = true + always_overwrite = true + template = "templates/docs/extra/template-CODE_OF_CONDUCT.md" + always_overwrite = true + audience = "contributor" + }, + { + name = "ROADMAP.md" + extension = "md" + description = "Project roadmap with version goals and milestones" + required = false + audience = "general" + }, + { + name = "CONTRIBUTING.md" + extension = "md" + description = "Contribution guidelines" + required = true + always_overwrite = true + template = "templates/docs/required/template-CONTRIBUTING.md" + audience = "contributor" + }, + { + name = "update.xml" + extension = "xml" + description = "Joomla extension update server manifest — lists releases for Joomla auto-update; must be kept in sync with manifest.xml version" + required = true + always_overwrite = false + audience = "developer" + template = "templates/joomla/update.xml.template" + stub_content = <<-MOKO_END + + + + {{EXTENSION_NAME}} + {{REPO_NAME}} — Moko Consulting Joomla extension + {{EXTENSION_ELEMENT}} + {{EXTENSION_TYPE}} + {{VERSION}} + {{REPO_URL}}/releases/tag/{{VERSION}} + + {{DOWNLOAD_URL}} + + + 7.4 + Moko Consulting + {{MAINTAINER_URL}} + + + MOKO_END + }, + { + name = "phpstan.neon" + extension = "neon" + description = "PHPStan static analysis config with Joomla framework class stubs" + required = true + always_overwrite = true + audience = "developer" + template = "templates/configs/phpstan.joomla.neon" + }, + { + name = "Makefile" + description = "Build automation using MokoStandards templates" + required = true + always_overwrite = true + audience = "developer" + source_path = "templates/makefiles" + source_filename = "Makefile.joomla.template" + source_type = "template" + destination_path = "." + destination_filename = "Makefile" + create_path = false + template = "templates/makefiles/Makefile.joomla.template" + }, + { + name = ".gitignore" + extension = "gitignore" + description = "Git ignore patterns for Joomla development - preserved during sync operations" + required = true + always_overwrite = false + audience = "developer" + template = "templates/configs/.gitignore.joomla" + validation_rules = [ + { + type = "content-pattern" + description = "Must contain sftp-config pattern to ignore SFTP sync configuration files" + pattern = "sftp-config" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain user.css pattern to ignore custom user CSS overrides" + pattern = "user\\.css" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain user.js pattern to ignore custom user JavaScript overrides" + pattern = "user\\.js" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain modulebuilder.txt pattern to ignore Joomla Module Builder artifacts" + pattern = "modulebuilder\\.txt" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain colors_custom.css pattern to ignore custom color scheme overrides" + pattern = "colors_custom\\.css" + severity = "error" + } + ] + }, + { + name = ".gitattributes" + extension = "gitattributes" + description = "Git attributes configuration" + required = true + audience = "developer" + }, + { + name = ".editorconfig" + extension = "editorconfig" + description = "Editor configuration for consistent coding style - preserved during sync" + required = true + always_overwrite = false + audience = "developer" + }, + { + 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.joomla.json" + }, + { + name = ".mokostandards" + extension = "yml" + description = "MokoStandards governance attachment — links this repo back to the standards source" + required = true + always_overwrite = true + audience = "developer" + template = "templates/configs/mokostandards.yml.template" + }, + { + name = "GOVERNANCE.md" + extension = "md" + description = "Project governance rules, roles, and decision process — auto-maintained by MokoStandards" + required = true + always_overwrite = false + protected = true + audience = "all" + template = "templates/docs/required/GOVERNANCE.md" + } + ] + + directories = [ + { + name = "site" + path = "site" + description = "Component frontend (site) code" + required = true + purpose = "Contains frontend component code deployed to site" + files = [ + { + name = "controller.php" + extension = "php" + description = "Main site controller" + required = true + audience = "developer" + }, + { + name = "manifest.xml" + extension = "xml" + description = "Component manifest for site" + required = true + audience = "developer" + } + ] + subdirectories = [ + { + name = "controllers" + path = "site/controllers" + description = "Site controllers" + requirement_status = "suggested" + }, + { + name = "models" + path = "site/models" + description = "Site models" + requirement_status = "suggested" + }, + { + name = "views" + path = "site/views" + description = "Site views" + required = true + } + ] + }, + { + name = "admin" + path = "admin" + description = "Component backend (admin) code" + required = true + purpose = "Contains backend component code for administrator" + files = [ + { + name = "controller.php" + extension = "php" + description = "Main admin controller" + required = true + audience = "developer" + } + ] + subdirectories = [ + { + name = "controllers" + path = "admin/controllers" + description = "Admin controllers" + requirement_status = "suggested" + }, + { + name = "models" + path = "admin/models" + description = "Admin models" + requirement_status = "suggested" + }, + { + name = "views" + path = "admin/views" + description = "Admin views" + required = true + }, + { + name = "sql" + path = "admin/sql" + description = "Database schema files" + requirement_status = "suggested" + } + ] + }, + { + name = "media" + path = "media" + description = "Media files (CSS, JS, images)" + requirement_status = "suggested" + purpose = "Contains static assets" + subdirectories = [ + { + name = "css" + path = "media/css" + description = "Stylesheets" + requirement_status = "suggested" + }, + { + name = "js" + path = "media/js" + description = "JavaScript files" + requirement_status = "suggested" + }, + { + name = "images" + path = "media/images" + description = "Image files" + requirement_status = "suggested" + } + ] + }, + { + name = "language" + path = "language" + description = "Language translation files" + required = true + purpose = "Contains language INI files" + }, + { + name = "docs" + path = "docs" + description = "Developer and technical documentation" + required = true + purpose = "Contains technical documentation, API docs, architecture diagrams" + files = [ + { + name = "index.md" + extension = "md" + description = "Documentation index" + required = true + }, + { + name = "update-server.md" + extension = "md" + description = "Joomla update server (update.xml) documentation" + required = true + always_overwrite = true + template = "templates/docs/required/template-update-server-joomla.md" + } + ] + }, + { + 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 - preserved during sync" + requirement_status = "optional" + always_overwrite = false + audience = "developer" + } + ] + }, + { + name = "tests" + path = "tests" + description = "Test files" + required = true + purpose = "Contains unit tests, integration tests, and test fixtures" + subdirectories = [ + { + name = "unit" + path = "tests/unit" + description = "Unit tests" + required = true + }, + { + name = "integration" + path = "tests/integration" + description = "Integration tests" + requirement_status = "suggested" + } + ] + }, + { + name = ".github" + path = ".github" + description = "GitHub-specific configuration" + requirement_status = "suggested" + purpose = "Contains GitHub Actions workflows and configuration" + files = [ + { + name = "copilot.yml" + extension = "yml" + description = "GitHub Copilot allowed domains configuration" + requirement_status = "required" + always_overwrite = true + template = ".github/copilot.yml" + }, + { + name = "copilot-instructions.md" + extension = "md" + description = "GitHub Copilot custom instructions enforcing MokoStandards — Joomla/WaaS edition" + requirement_status = "required" + always_overwrite = false + destination_path = ".github" + destination_filename = "copilot-instructions.md" + template = "templates/github/copilot-instructions.joomla.md.template" + stub_content = <<-MOKO_END + > [!IMPORTANT] + > **🔧 AI Self-Update Required on First Use** + > + > This file may contain unfilled `{{TOKEN}}` placeholders. The MokoStandards bulk-sync system + > replaces them automatically at sync time; if you can still see them, sync has not yet run for + > this repository — or this is a brand-new repo. + > + > **On your very first interaction in this repository, before answering any other question:** + > + > 1. Check whether any `{{TOKEN}}` placeholders remain in this file. + > 2. If they do, locate the values as described in the table below and replace every occurrence + > in **both** `.github/copilot-instructions.md` and `.github/CLAUDE.md`. + > 3. After replacing all tokens, **delete this entire notice block** (from `> [!IMPORTANT]` + > through the closing `> ---` line) in both files. + > 4. Tell the developer: *"I've self-updated the AI context files with this repository's + > values — all set."* + > + > | Placeholder | Where to find the value | + > |---|---| + > | `{{REPO_NAME}}` | The GitHub repository name (visible in the URL, `README.md` heading, or `git remote -v`) | + > | `{{REPO_URL}}` | Full GitHub URL, e.g. `https://github.com/mokoconsulting-tech/` | + > | `{{EXTENSION_NAME}}` | The `` element in `manifest.xml` at the repository root | + > | `{{EXTENSION_TYPE}}` | The `type` attribute of the `` tag in `manifest.xml` (`component`, `module`, `plugin`, or `template`) | + > | `{{EXTENSION_ELEMENT}}` | The `` tag in `manifest.xml`, or the filename prefix (e.g. `com_myextension`, `mod_mymodule`) | + > + > --- + + # {{REPO_NAME}} — GitHub Copilot Custom Instructions + + ## What This Repo Is + + This is a **Moko Consulting MokoWaaS** (Joomla) repository governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). All coding standards, workflows, and policies are defined there and enforced here via bulk sync. + + Repository URL: {{REPO_URL}} + Extension name: **{{EXTENSION_NAME}}** + Extension type: **{{EXTENSION_TYPE}}** (`{{EXTENSION_ELEMENT}}`) + Platform: **Joomla 4.x / MokoWaaS** + + --- + + ## Primary Language + + **PHP** (≥ 7.4) is the primary language for this Joomla extension. JavaScript may be used for frontend enhancements. YAML uses 2-space indentation. All other text files use tabs per `.editorconfig`. + + --- + + ## File Header — Always Required on New Files + + Every new file needs a copyright header as its first content. + + **PHP:** + ```php + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: {{REPO_NAME}}.{{EXTENSION_TYPE}} + * INGROUP: {{REPO_NAME}} + * REPO: {{REPO_URL}} + * PATH: /path/to/file.php + * VERSION: XX.YY.ZZ + * BRIEF: One-line description of purpose + */ + + defined('_JEXEC') or die; + ``` + + **Markdown:** + ```markdown + + ``` + + **YAML / Shell / XML:** Use the appropriate comment syntax with the same fields. JSON files are exempt. + + --- + + ## Version Management + + **`README.md` is the single source of truth for the repository version.** + + - **Bump the patch version on every PR** — increment `XX.YY.ZZ` (e.g. `01.02.03` → `01.02.04`) in `README.md` before opening the PR; the `sync-version-on-merge` workflow propagates it automatically to all badges and `FILE INFORMATION` headers on merge to `main`. + - The `VERSION: XX.YY.ZZ` field in `README.md` governs all other version references. + - Version format is zero-padded semver: `XX.YY.ZZ` (e.g. `01.02.03`). + - Never hardcode a specific version in document body text — use the badge or FILE INFORMATION header only. + + ### Joomla Version Alignment + + The version in `README.md` **must always match** the `` tag in `manifest.xml` and the latest entry in `update.xml`. The `make release` command / release workflow updates all three automatically. + + ```xml + + 01.02.04 + + + + + {{EXTENSION_NAME}} + 01.02.04 + + + {{REPO_URL}}/releases/download/01.02.04/{{EXTENSION_ELEMENT}}-01.02.04.zip + + + + + + + ``` + + --- + + ## Joomla Extension Structure + + ``` + {{REPO_NAME}}/ + ├── manifest.xml # Joomla installer manifest (root — required) + ├── update.xml # Update server manifest (root — required, see below) + ├── site/ # Frontend (site) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ └── views/ + ├── admin/ # Backend (admin) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ ├── views/ + │ └── sql/ + ├── language/ # Language INI files + ├── media/ # CSS, JS, images (deployed to /media/{{EXTENSION_ELEMENT}}/) + ├── docs/ # Technical documentation + ├── tests/ # Test suite + ├── .github/ + │ ├── workflows/ + │ ├── copilot-instructions.md # This file + │ └── CLAUDE.md + ├── README.md # Version source of truth + ├── CHANGELOG.md + ├── CONTRIBUTING.md + ├── LICENSE # GPL-3.0-or-later + └── Makefile # Build automation + ``` + + --- + + ## update.xml — Required in Repo Root + + `update.xml` **must exist at the repository root**. It is the Joomla update server manifest that allows Joomla installations to check for new versions of this extension. + + The `manifest.xml` must reference it via: + ```xml + + + {{REPO_URL}}/raw/main/update.xml + + + ``` + + **Rules:** + - Every release must prepend a new `` block at the top of `update.xml` — old entries must be preserved below. + - The `` in `update.xml` must exactly match `` in `manifest.xml` and the version in `README.md`. + - The `` must be a publicly accessible direct download link (GitHub Releases asset URL). + - `` — the backslash is a **literal backslash character** in the XML attribute value; Joomla's update-server parser treats the value as a regular expression, so `\.` matches a literal dot and `[0-9]+` matches one or more digits. Do not double-escape it. + + --- + + ## manifest.xml Rules + + - Lives at the repo root as `manifest.xml` (not inside `site/` or `admin/`). + - `` tag must be kept in sync with `README.md` version and `update.xml`. + - Must include `` block pointing to this repo's `update.xml`. + - Must include `` and `` sections. + - Joomla 4.x requires `Moko\{{EXTENSION_NAME}}` for namespaced extensions. + + --- + + ## GitHub Actions — Token Usage + + Every workflow must use **`secrets.GH_TOKEN`** (the org-level Personal Access Token). + + ```yaml + # ✅ Correct + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + ``` + + ```yaml + # ❌ Wrong — never use these in workflows + token: ${{ github.token }} + token: ${{ secrets.GITHUB_TOKEN }} + ``` + + --- + + ## MokoStandards Reference + + This repository is governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). Authoritative policies: + + | Document | Purpose | + |----------|---------| + | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | + | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | + | [branching-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | + | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR title/body conventions | + | [changelog-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | + | [joomla-development-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/guide/waas/joomla-development-guide.md) | MokoWaaS Joomla extension development guide | + + --- + + ## Naming Conventions + + | Context | Convention | Example | + |---------|-----------|---------| + | PHP class | `PascalCase` | `MyController` | + | PHP method / function | `camelCase` | `getItems()` | + | PHP variable | `$snake_case` | `$item_id` | + | PHP constant | `UPPER_SNAKE_CASE` | `MAX_ITEMS` | + | PHP class file | `PascalCase.php` | `ItemModel.php` | + | YAML workflow | `kebab-case.yml` | `ci-joomla.yml` | + | Markdown doc | `kebab-case.md` | `installation-guide.md` | + + --- + + ## Commit Messages + + Format: `(): ` — imperative, lower-case subject, no trailing period. + + Valid types: `feat` · `fix` · `docs` · `chore` · `ci` · `refactor` · `style` · `test` · `perf` · `revert` · `build` + + --- + + ## Branch Naming + + Format: `/[/description]` + + Approved prefixes: `dev/` · `rc/` · `version/` · `patch/` · `copilot/` · `dependabot/` + + --- + + ## Keeping Documentation Current + + | Change type | Documentation to update | + |-------------|------------------------| + | New or renamed PHP class/method | PHPDoc block; `docs/api/` entry | + | New or changed manifest.xml | Update `update.xml` version; bump README.md version | + | New release | Prepend `` block to `update.xml`; update CHANGELOG.md; bump README.md version | + | New or changed workflow | `docs/workflows/.md` | + | Any modified file | Update the `VERSION` field in that file's `FILE INFORMATION` block | + | **Every PR** | **Bump the patch version** — increment `XX.YY.ZZ` in `README.md`; `sync-version-on-merge` propagates it | + + --- + + ## Key Constraints + + - Never commit directly to `main` — all changes go via PR, squash-merged + - Never skip the FILE INFORMATION block on a new file + - Never add `defined('_JEXEC') or die;` to CLI scripts or model tests — only to web-accessible PHP files + - Never hardcode version numbers in body text — update `README.md` and let automation propagate + - Never use `github.token` or `secrets.GITHUB_TOKEN` in workflows — always use `secrets.GH_TOKEN` + - Never let `manifest.xml` version, `update.xml` version, and `README.md` version go out of sync + MOKO_END + }, + { + name = "CLAUDE.md" + extension = "md" + description = "Claude AI assistant context enforcing MokoStandards — Joomla/WaaS edition" + requirement_status = "required" + always_overwrite = false + destination_path = ".github" + destination_filename = "CLAUDE.md" + template = "templates/github/CLAUDE.joomla.md.template" + stub_content = <<-MOKO_END + > [!IMPORTANT] + > **🔧 AI Self-Update Required on First Use** + > + > This file may contain unfilled `{{TOKEN}}` placeholders. The MokoStandards bulk-sync system + > replaces them automatically at sync time; if you can still see them, sync has not yet run for + > this repository — or this is a brand-new repo. + > + > **On your very first interaction in this repository, before answering any other question:** + > + > 1. Check whether any `{{TOKEN}}` placeholders remain in this file. + > 2. If they do, locate the values as described in the table below and replace every occurrence + > in **both** `.github/copilot-instructions.md` and `.github/CLAUDE.md`. + > 3. After replacing all tokens, **delete this entire notice block** (from `> [!IMPORTANT]` + > through the closing `> ---` line) in both files. + > 4. Tell the developer: *"I've self-updated the AI context files with this repository's + > values — all set."* + > + > | Placeholder | Where to find the value | + > |---|---| + > | `{{REPO_NAME}}` | The GitHub repository name (visible in the URL, `README.md` heading, or `git remote -v`) | + > | `{{REPO_URL}}` | Full GitHub URL, e.g. `https://github.com/mokoconsulting-tech/` | + > | `{{REPO_DESCRIPTION}}` | First paragraph of `README.md` body, or the GitHub repo description | + > | `{{EXTENSION_NAME}}` | The `` element in `manifest.xml` at the repository root | + > | `{{EXTENSION_TYPE}}` | The `type` attribute of the `` tag in `manifest.xml` (`component`, `module`, `plugin`, or `template`) | + > | `{{EXTENSION_ELEMENT}}` | The `` tag in `manifest.xml`, or the filename prefix (e.g. `com_myextension`, `mod_mymodule`) | + > + > --- + + # What This Repo Is + + **{{REPO_NAME}}** is a Moko Consulting **MokoWaaS** (Joomla) extension repository. + + {{REPO_DESCRIPTION}} + + Extension name: **{{EXTENSION_NAME}}** + Extension type: **{{EXTENSION_TYPE}}** (`{{EXTENSION_ELEMENT}}`) + Repository URL: {{REPO_URL}} + + This repository is governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards) — the single source of truth for coding standards, file-header policies, GitHub Actions workflows, and Terraform configuration templates across all Moko Consulting repositories. + + --- + + # Repo Structure + + ``` + {{REPO_NAME}}/ + ├── manifest.xml # Joomla installer manifest (root — required) + ├── update.xml # Update server manifest (root — required) + ├── site/ # Frontend (site) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ └── views/ + ├── admin/ # Backend (admin) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ ├── views/ + │ └── sql/ + ├── language/ # Language INI files + ├── media/ # CSS, JS, images + ├── docs/ # Technical documentation + ├── tests/ # Test suite + ├── .github/ + │ ├── workflows/ # CI/CD workflows (synced from MokoStandards) + │ ├── copilot-instructions.md + │ └── CLAUDE.md # This file + ├── README.md # Version source of truth + ├── CHANGELOG.md + ├── CONTRIBUTING.md + └── LICENSE # GPL-3.0-or-later + ``` + + --- + + # Primary Language + + **PHP** (≥ 7.4) is the primary language for this Joomla extension. YAML uses 2-space indentation. All other text files use tabs per `.editorconfig`. + + --- + + # Version Management + + **`README.md` is the single source of truth for the repository version.** + + - **Bump the patch version on every PR** — increment `XX.YY.ZZ` (e.g. `01.02.03` → `01.02.04`) in `README.md` before opening the PR; the `sync-version-on-merge` workflow propagates it to all `FILE INFORMATION` headers automatically on merge. + - Version format is zero-padded semver: `XX.YY.ZZ` (e.g. `01.02.03`). + - Never hardcode a version number in body text — use the badge or FILE INFORMATION header only. + + ### Joomla Version Alignment + + Three files must **always have the same version**: + + | File | Where the version lives | + |------|------------------------| + | `README.md` | `FILE INFORMATION` block + badge | + | `manifest.xml` | `` tag | + | `update.xml` | `` in the most recent `` block | + + The `make release` command / release workflow syncs all three automatically. + + --- + + # update.xml — Required in Repo Root + + `update.xml` is the Joomla update server manifest. It allows Joomla installations to check for new versions of this extension via: + + ```xml + + + + {{REPO_URL}}/raw/main/update.xml + + + ``` + + **Rules:** + - Every release prepends a new `` block at the top — older entries are preserved. + - `` in `update.xml` must exactly match `` in `manifest.xml` and `README.md`. + - `` must be a publicly accessible GitHub Releases asset URL. + - `` — backslash is literal (Joomla regex syntax). + + Example `update.xml` entry for a new release: + ```xml + + + {{EXTENSION_NAME}} + {{REPO_NAME}} + {{EXTENSION_ELEMENT}} + {{EXTENSION_TYPE}} + 01.02.04 + {{REPO_URL}}/releases/tag/01.02.04 + + + {{REPO_URL}}/releases/download/01.02.04/{{EXTENSION_ELEMENT}}-01.02.04.zip + + + + 7.4 + Moko Consulting + https://mokoconsulting.tech + + + ``` + + --- + + # File Header Requirements + + Every new file **must** have a copyright header as its first content. JSON files, binary files, generated files, and third-party files are exempt. + + **PHP:** + ```php + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: {{REPO_NAME}}.{{EXTENSION_TYPE}} + * INGROUP: {{REPO_NAME}} + * REPO: {{REPO_URL}} + * PATH: /site/controllers/item.php + * VERSION: XX.YY.ZZ + * BRIEF: One-line description of file purpose + */ + + defined('_JEXEC') or die; + ``` + + **Markdown / YAML / Shell / XML:** Use the appropriate comment syntax with the same fields. + + --- + + # Coding Standards + + ## Naming Conventions + + | Context | Convention | Example | + |---------|-----------|---------| + | PHP class | `PascalCase` | `ItemModel` | + | PHP method / function | `camelCase` | `getItems()` | + | PHP variable | `$snake_case` | `$item_id` | + | PHP constant | `UPPER_SNAKE_CASE` | `MAX_ITEMS` | + | PHP class file | `PascalCase.php` | `ItemModel.php` | + | YAML workflow | `kebab-case.yml` | `ci-joomla.yml` | + | Markdown doc | `kebab-case.md` | `installation-guide.md` | + + ## Commit Messages + + Format: `(): ` — imperative, lower-case subject, no trailing period. + + Valid types: `feat` · `fix` · `docs` · `chore` · `ci` · `refactor` · `style` · `test` · `perf` · `revert` · `build` + + ## Branch Naming + + Format: `/[/description]` + + Approved prefixes: `dev/` · `rc/` · `version/` · `patch/` · `copilot/` · `dependabot/` + + --- + + # GitHub Actions — Token Usage + + Every workflow must use **`secrets.GH_TOKEN`** (the org-level Personal Access Token). + + ```yaml + # ✅ Correct + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + ``` + + ```yaml + # ❌ Wrong — never use these + token: ${{ github.token }} + token: ${{ secrets.GITHUB_TOKEN }} + ``` + + --- + + # Keeping Documentation Current + + | Change type | Documentation to update | + |-------------|------------------------| + | New or renamed PHP class/method | PHPDoc block; `docs/api/` entry | + | New or changed `manifest.xml` | Sync version to `update.xml` and `README.md` | + | New release | Prepend `` to `update.xml`; update `CHANGELOG.md`; bump `README.md` | + | New or changed workflow | `docs/workflows/.md` | + | Any modified file | Update the `VERSION` field in that file's `FILE INFORMATION` block | + | **Every PR** | **Bump the patch version** — increment `XX.YY.ZZ` in `README.md`; `sync-version-on-merge` propagates it | + + --- + + # What NOT to Do + + - **Never commit directly to `main`** — all changes go through a PR. + - **Never hardcode version numbers** in body text — update `README.md` and let automation propagate. + - **Never let `manifest.xml`, `update.xml`, and `README.md` versions diverge.** + - **Never skip the FILE INFORMATION block** on a new source file. + - **Never use bare `catch (\Throwable $e) {}`** — always log or re-throw. + - **Never mix tabs and spaces** within a file — follow `.editorconfig`. + - **Never use `github.token` or `secrets.GITHUB_TOKEN` in workflows** — always use `secrets.GH_TOKEN`. + - **Never remove `defined('_JEXEC') or die;`** from web-accessible PHP files. + + --- + + # PR Checklist + + Before opening a PR, verify: + + - [ ] Patch version bumped in `README.md` (e.g. `01.02.03` → `01.02.04`) + - [ ] If this is a release: `manifest.xml` version updated; `update.xml` updated with new entry + - [ ] FILE INFORMATION headers updated in modified files + - [ ] CHANGELOG.md updated + - [ ] Tests pass + + --- + + # Key Policy Documents (MokoStandards) + + | Document | Purpose | + |----------|---------| + | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | + | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | + | [branching-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | + | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR conventions | + | [changelog-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | + | [joomla-development-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/guide/waas/joomla-development-guide.md) | MokoWaaS Joomla extension development guide | + MOKO_END + } + ] + subdirectories = [ + { + name = "workflows" + path = ".github/workflows" + description = "GitHub Actions workflows" + requirement_status = "required" + files = [ + { + name = "ci-joomla.yml" + extension = "yml" + description = "Joomla-specific CI workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/joomla/ci-joomla.yml.template" + }, + { + name = "codeql-analysis.yml" + extension = "yml" + description = "CodeQL security analysis workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/generic/codeql-analysis.yml.template" + }, + { + name = "standards-compliance.yml" + extension = "yml" + description = "MokoStandards compliance validation" + requirement_status = "required" + always_overwrite = true + template = ".github/workflows/standards-compliance.yml" + }, + { + name = "enterprise-firewall-setup.yml" + extension = "yml" + description = "Enterprise firewall configuration for trusted domain access" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/enterprise-firewall-setup.yml.template" + }, + { + name = "deploy-dev.yml" + extension = "yml" + description = "SFTP deployment of src/ to the development server" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-dev.yml.template" + }, + { + name = "deploy-demo.yml" + extension = "yml" + description = "SFTP deployment of src/ to the demo server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-demo.yml.template" + }, + { + name = "deploy-rs.yml" + extension = "yml" + description = "SFTP deployment of src/ to the release staging server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-rs.yml.template" + }, + { + name = "sync-version-on-merge.yml" + extension = "yml" + description = "Auto-bump patch version on merge and propagate to all file headers" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/sync-version-on-merge.yml.template" + }, + { + name = "auto-release.yml" + extension = "yml" + description = "Auto-create GitHub Release on push to main with version from README.md" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-release.yml.template" + }, + { + name = "repository-cleanup.yml" + extension = "yml" + description = "Scheduled cleanup: delete retired workflows, stale branches, old workflow runs" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/repository-cleanup.yml.template" + }, + { + name = "auto-dev-issue.yml" + extension = "yml" + description = "Auto-create tracking issue when a dev/** branch is pushed" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-dev-issue.yml.template" + }, + { + name = "repo_health.yml" + extension = "yml" + description = "Joomla-specific repository health check workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/joomla/repo_health.yml.template" + } + ] + }, + { + name = "ISSUE_TEMPLATE" + path = ".github/ISSUE_TEMPLATE" + description = "GitHub issue templates synced from MokoStandards" + requirement_status = "required" + files = [ + { + name = "config.yml" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/config.yml" + }, + { + name = "adr.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/adr.md" + }, + { + name = "bug_report.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/bug_report.md" + }, + { + name = "documentation.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/documentation.md" + }, + { + name = "enterprise_support.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/enterprise_support.md" + }, + { + name = "feature_request.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/feature_request.md" + }, + { + name = "firewall-request.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/firewall-request.md" + }, + { + name = "question.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/question.md" + }, + { + name = "request-license.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/request-license.md" + }, + { + name = "rfc.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/rfc.md" + }, + { + name = "security.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/security.md" + }, + { + name = "joomla_issue.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/joomla_issue.md" + } + ] + } + ] + } + ] + + repository_requirements = { + secrets = [ + { + name = "GH_TOKEN" + description = "Org-level GitHub PAT for automation" + required = true + scope = "org" + }, + { + name = "DEV_FTP_KEY" + description = "SSH private key for SFTP dev deployment (preferred); if DEV_FTP_PASSWORD is also set it is used as the key passphrase, with password-only as fallback" + required = false + scope = "org" + }, + { + name = "DEV_FTP_PASSWORD" + description = "SFTP password for dev deployment; used as SSH key passphrase when DEV_FTP_KEY is also set, and as standalone fallback if key auth fails" + required = false + scope = "org" + note = "At least one of DEV_FTP_KEY or DEV_FTP_PASSWORD must be configured" + } + ] + + variables = [ + { + name = "DEV_FTP_HOST" + description = "Dev server hostname; may include port suffix (e.g. dev.example.com or dev.example.com:2222)" + required = true + scope = "org" + }, + { + name = "DEV_FTP_PATH" + description = "Base remote path for SFTP deployment (e.g. /var/www/html)" + required = true + scope = "org" + }, + { + name = "DEV_FTP_USERNAME" + description = "SFTP username for dev server authentication" + required = true + scope = "org" + }, + { + name = "DEV_FTP_PORT" + description = "Explicit SFTP port override; if omitted the port is parsed from DEV_FTP_HOST or defaults to 22" + required = false + scope = "org" + }, + { + name = "DEV_FTP_SUFFIX" + description = "Per-repo path suffix appended to DEV_FTP_PATH (e.g. /my-extension)" + required = false + scope = "repo" + } + ] + } + } +} diff --git a/definitions/sync/MokoStandards-Template-Joomla-Module.def.tf b/definitions/sync/MokoStandards-Template-Joomla-Module.def.tf new file mode 100644 index 0000000..27d9f65 --- /dev/null +++ b/definitions/sync/MokoStandards-Template-Joomla-Module.def.tf @@ -0,0 +1,1335 @@ +/** + * Repository Sync Tracking Definition: mokoconsulting-tech/MokoStandards-Template-Joomla-Module + * + * Auto-generated by MokoStandards bulk sync on 2026-04-02T15:29:31+00:00 + * Platform : waas-component + * Description: A repo template for a Joomla Module coding project according to MokoStandards + * + * DO NOT EDIT MANUALLY — this file is regenerated on every successful sync. + * To change what gets synced, edit api/definitions/default/waas-component.tf + * and re-run the bulk-repo-sync workflow. + */ + +locals { + sync_record = { + metadata = { + repo = "mokoconsulting-tech/MokoStandards-Template-Joomla-Module" + default_branch = "main" + detected_platform = "waas-component" + description = "A repo template for a Joomla Module coding project according to MokoStandards" + sync_timestamp = "2026-04-02T15:29:31+00:00" + source_repo = "mokoconsulting-tech/MokoStandards" + base_definition = "api/definitions/default/waas-component.tf" + } + + sync_stats = { + total_files = 41 + created_files = 4 + updated_files = 34 + skipped_files = 3 + } + + synced_files = [ + { path = "LICENSE" action = "updated" }, + { path = "SECURITY.md" action = "created" }, + { path = "CODE_OF_CONDUCT.md" action = "updated" }, + { path = "CONTRIBUTING.md" action = "updated" }, + { path = "update.xml" action = "updated" }, + { path = "phpstan.neon" action = "updated" }, + { path = "Makefile" action = "updated" }, + { path = ".gitignore" action = "updated" }, + { path = "composer.json" action = "updated" }, + { path = ".mokostandards" action = "created" }, + { path = "docs/update-server.md" action = "created" }, + { path = ".github/copilot.yml" action = "updated" }, + { path = ".github/copilot-instructions.md" action = "updated" }, + { path = ".github/CLAUDE.md" action = "updated" }, + { path = ".github/workflows/codeql-analysis.yml" action = "updated" }, + { path = ".github/workflows/standards-compliance.yml" action = "updated" }, + { path = ".github/workflows/enterprise-firewall-setup.yml" action = "updated" }, + { path = ".github/workflows/deploy-dev.yml" action = "updated" }, + { path = ".github/workflows/deploy-demo.yml" action = "updated" }, + { path = ".github/workflows/deploy-rs.yml" action = "updated" }, + { path = ".github/workflows/sync-version-on-merge.yml" action = "updated" }, + { path = ".github/workflows/auto-release.yml" action = "updated" }, + { path = ".github/workflows/repository-cleanup.yml" action = "updated" }, + { path = ".github/workflows/auto-dev-issue.yml" action = "updated" }, + { path = ".github/workflows/repo_health.yml" action = "created" }, + { path = ".github/ISSUE_TEMPLATE/config.yml" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/adr.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/bug_report.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/documentation.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/enterprise_support.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/feature_request.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/firewall-request.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/question.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/request-license.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/rfc.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/security.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/joomla_issue.md" action = "updated" }, + { path = ".github/CODEOWNERS" action = "updated" }, + { path = ".github/.mokostandards" action = "migrated from root" }, + ] + + skipped_files = [ + { path = "GOVERNANCE.md" reason = "Preserved (always_overwrite=false)" }, + { path = ".github/workflows/ci-joomla.yml" reason = "Source file not found" }, + { path = ".github/workflows/custom/README.md" reason = "README — never overwritten" }, + ] + } +} + +# ---- Base platform definition (reference copy) ---- +/** + * MokoWaaS Component Structure Definition + * Standard repository structure for MokoWaaS (Joomla) components + * + * Copyright (C) 2026 Moko Consulting + * SPDX-License-Identifier: GPL-3.0-or-later + * Version: 05.00.00 + * Schema Version: 1.0 + */ + +locals { + repository_structure = { + metadata = { + name = "MokoWaaS Component" + description = "Standard repository structure for MokoWaaS (Joomla) components" + repository_type = "waas-component" + platform = "mokowaas" + last_updated = "2026-01-15T00:00:00Z" + maintainer = "Moko Consulting" + version = "05.00.00" + schema_version = "1.0" + } + + root_files = [ + { + name = "README.md" + extension = "md" + description = "Developer-focused documentation for contributors and maintainers" + required = true + always_overwrite = false + protected = true + audience = "developer" + }, + { + name = "LICENSE" + extension = "" + description = "License file (GPL-3.0-or-later) - Default for Joomla/WaaS components" + required = true + audience = "general" + template = "templates/licenses/GPL-3.0" + license_type = "GPL-3.0-or-later" + }, + { + name = "CHANGELOG.md" + extension = "md" + description = "Version history and changes" + required = true + audience = "general" + }, + { + name = "SECURITY.md" + extension = "md" + description = "Security policy and vulnerability reporting" + required = true + always_overwrite = true + template = "templates/docs/required/template-SECURITY.md" + audience = "general" + }, + { + name = "CODE_OF_CONDUCT.md" + extension = "md" + description = "Community code of conduct" + required = true + always_overwrite = true + template = "templates/docs/extra/template-CODE_OF_CONDUCT.md" + always_overwrite = true + audience = "contributor" + }, + { + name = "ROADMAP.md" + extension = "md" + description = "Project roadmap with version goals and milestones" + required = false + audience = "general" + }, + { + name = "CONTRIBUTING.md" + extension = "md" + description = "Contribution guidelines" + required = true + always_overwrite = true + template = "templates/docs/required/template-CONTRIBUTING.md" + audience = "contributor" + }, + { + name = "update.xml" + extension = "xml" + description = "Joomla extension update server manifest — lists releases for Joomla auto-update; must be kept in sync with manifest.xml version" + required = true + always_overwrite = false + audience = "developer" + template = "templates/joomla/update.xml.template" + stub_content = <<-MOKO_END + + + + {{EXTENSION_NAME}} + {{REPO_NAME}} — Moko Consulting Joomla extension + {{EXTENSION_ELEMENT}} + {{EXTENSION_TYPE}} + {{VERSION}} + {{REPO_URL}}/releases/tag/{{VERSION}} + + {{DOWNLOAD_URL}} + + + 7.4 + Moko Consulting + {{MAINTAINER_URL}} + + + MOKO_END + }, + { + name = "phpstan.neon" + extension = "neon" + description = "PHPStan static analysis config with Joomla framework class stubs" + required = true + always_overwrite = true + audience = "developer" + template = "templates/configs/phpstan.joomla.neon" + }, + { + name = "Makefile" + description = "Build automation using MokoStandards templates" + required = true + always_overwrite = true + audience = "developer" + source_path = "templates/makefiles" + source_filename = "Makefile.joomla.template" + source_type = "template" + destination_path = "." + destination_filename = "Makefile" + create_path = false + template = "templates/makefiles/Makefile.joomla.template" + }, + { + name = ".gitignore" + extension = "gitignore" + description = "Git ignore patterns for Joomla development - preserved during sync operations" + required = true + always_overwrite = false + audience = "developer" + template = "templates/configs/.gitignore.joomla" + validation_rules = [ + { + type = "content-pattern" + description = "Must contain sftp-config pattern to ignore SFTP sync configuration files" + pattern = "sftp-config" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain user.css pattern to ignore custom user CSS overrides" + pattern = "user\\.css" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain user.js pattern to ignore custom user JavaScript overrides" + pattern = "user\\.js" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain modulebuilder.txt pattern to ignore Joomla Module Builder artifacts" + pattern = "modulebuilder\\.txt" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain colors_custom.css pattern to ignore custom color scheme overrides" + pattern = "colors_custom\\.css" + severity = "error" + } + ] + }, + { + name = ".gitattributes" + extension = "gitattributes" + description = "Git attributes configuration" + required = true + audience = "developer" + }, + { + name = ".editorconfig" + extension = "editorconfig" + description = "Editor configuration for consistent coding style - preserved during sync" + required = true + always_overwrite = false + audience = "developer" + }, + { + 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.joomla.json" + }, + { + name = ".mokostandards" + extension = "yml" + description = "MokoStandards governance attachment — links this repo back to the standards source" + required = true + always_overwrite = true + audience = "developer" + template = "templates/configs/mokostandards.yml.template" + }, + { + name = "GOVERNANCE.md" + extension = "md" + description = "Project governance rules, roles, and decision process — auto-maintained by MokoStandards" + required = true + always_overwrite = false + protected = true + audience = "all" + template = "templates/docs/required/GOVERNANCE.md" + } + ] + + directories = [ + { + name = "site" + path = "site" + description = "Component frontend (site) code" + required = true + purpose = "Contains frontend component code deployed to site" + files = [ + { + name = "controller.php" + extension = "php" + description = "Main site controller" + required = true + audience = "developer" + }, + { + name = "manifest.xml" + extension = "xml" + description = "Component manifest for site" + required = true + audience = "developer" + } + ] + subdirectories = [ + { + name = "controllers" + path = "site/controllers" + description = "Site controllers" + requirement_status = "suggested" + }, + { + name = "models" + path = "site/models" + description = "Site models" + requirement_status = "suggested" + }, + { + name = "views" + path = "site/views" + description = "Site views" + required = true + } + ] + }, + { + name = "admin" + path = "admin" + description = "Component backend (admin) code" + required = true + purpose = "Contains backend component code for administrator" + files = [ + { + name = "controller.php" + extension = "php" + description = "Main admin controller" + required = true + audience = "developer" + } + ] + subdirectories = [ + { + name = "controllers" + path = "admin/controllers" + description = "Admin controllers" + requirement_status = "suggested" + }, + { + name = "models" + path = "admin/models" + description = "Admin models" + requirement_status = "suggested" + }, + { + name = "views" + path = "admin/views" + description = "Admin views" + required = true + }, + { + name = "sql" + path = "admin/sql" + description = "Database schema files" + requirement_status = "suggested" + } + ] + }, + { + name = "media" + path = "media" + description = "Media files (CSS, JS, images)" + requirement_status = "suggested" + purpose = "Contains static assets" + subdirectories = [ + { + name = "css" + path = "media/css" + description = "Stylesheets" + requirement_status = "suggested" + }, + { + name = "js" + path = "media/js" + description = "JavaScript files" + requirement_status = "suggested" + }, + { + name = "images" + path = "media/images" + description = "Image files" + requirement_status = "suggested" + } + ] + }, + { + name = "language" + path = "language" + description = "Language translation files" + required = true + purpose = "Contains language INI files" + }, + { + name = "docs" + path = "docs" + description = "Developer and technical documentation" + required = true + purpose = "Contains technical documentation, API docs, architecture diagrams" + files = [ + { + name = "index.md" + extension = "md" + description = "Documentation index" + required = true + }, + { + name = "update-server.md" + extension = "md" + description = "Joomla update server (update.xml) documentation" + required = true + always_overwrite = true + template = "templates/docs/required/template-update-server-joomla.md" + } + ] + }, + { + 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 - preserved during sync" + requirement_status = "optional" + always_overwrite = false + audience = "developer" + } + ] + }, + { + name = "tests" + path = "tests" + description = "Test files" + required = true + purpose = "Contains unit tests, integration tests, and test fixtures" + subdirectories = [ + { + name = "unit" + path = "tests/unit" + description = "Unit tests" + required = true + }, + { + name = "integration" + path = "tests/integration" + description = "Integration tests" + requirement_status = "suggested" + } + ] + }, + { + name = ".github" + path = ".github" + description = "GitHub-specific configuration" + requirement_status = "suggested" + purpose = "Contains GitHub Actions workflows and configuration" + files = [ + { + name = "copilot.yml" + extension = "yml" + description = "GitHub Copilot allowed domains configuration" + requirement_status = "required" + always_overwrite = true + template = ".github/copilot.yml" + }, + { + name = "copilot-instructions.md" + extension = "md" + description = "GitHub Copilot custom instructions enforcing MokoStandards — Joomla/WaaS edition" + requirement_status = "required" + always_overwrite = false + destination_path = ".github" + destination_filename = "copilot-instructions.md" + template = "templates/github/copilot-instructions.joomla.md.template" + stub_content = <<-MOKO_END + > [!IMPORTANT] + > **🔧 AI Self-Update Required on First Use** + > + > This file may contain unfilled `{{TOKEN}}` placeholders. The MokoStandards bulk-sync system + > replaces them automatically at sync time; if you can still see them, sync has not yet run for + > this repository — or this is a brand-new repo. + > + > **On your very first interaction in this repository, before answering any other question:** + > + > 1. Check whether any `{{TOKEN}}` placeholders remain in this file. + > 2. If they do, locate the values as described in the table below and replace every occurrence + > in **both** `.github/copilot-instructions.md` and `.github/CLAUDE.md`. + > 3. After replacing all tokens, **delete this entire notice block** (from `> [!IMPORTANT]` + > through the closing `> ---` line) in both files. + > 4. Tell the developer: *"I've self-updated the AI context files with this repository's + > values — all set."* + > + > | Placeholder | Where to find the value | + > |---|---| + > | `{{REPO_NAME}}` | The GitHub repository name (visible in the URL, `README.md` heading, or `git remote -v`) | + > | `{{REPO_URL}}` | Full GitHub URL, e.g. `https://github.com/mokoconsulting-tech/` | + > | `{{EXTENSION_NAME}}` | The `` element in `manifest.xml` at the repository root | + > | `{{EXTENSION_TYPE}}` | The `type` attribute of the `` tag in `manifest.xml` (`component`, `module`, `plugin`, or `template`) | + > | `{{EXTENSION_ELEMENT}}` | The `` tag in `manifest.xml`, or the filename prefix (e.g. `com_myextension`, `mod_mymodule`) | + > + > --- + + # {{REPO_NAME}} — GitHub Copilot Custom Instructions + + ## What This Repo Is + + This is a **Moko Consulting MokoWaaS** (Joomla) repository governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). All coding standards, workflows, and policies are defined there and enforced here via bulk sync. + + Repository URL: {{REPO_URL}} + Extension name: **{{EXTENSION_NAME}}** + Extension type: **{{EXTENSION_TYPE}}** (`{{EXTENSION_ELEMENT}}`) + Platform: **Joomla 4.x / MokoWaaS** + + --- + + ## Primary Language + + **PHP** (≥ 7.4) is the primary language for this Joomla extension. JavaScript may be used for frontend enhancements. YAML uses 2-space indentation. All other text files use tabs per `.editorconfig`. + + --- + + ## File Header — Always Required on New Files + + Every new file needs a copyright header as its first content. + + **PHP:** + ```php + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: {{REPO_NAME}}.{{EXTENSION_TYPE}} + * INGROUP: {{REPO_NAME}} + * REPO: {{REPO_URL}} + * PATH: /path/to/file.php + * VERSION: XX.YY.ZZ + * BRIEF: One-line description of purpose + */ + + defined('_JEXEC') or die; + ``` + + **Markdown:** + ```markdown + + ``` + + **YAML / Shell / XML:** Use the appropriate comment syntax with the same fields. JSON files are exempt. + + --- + + ## Version Management + + **`README.md` is the single source of truth for the repository version.** + + - **Bump the patch version on every PR** — increment `XX.YY.ZZ` (e.g. `01.02.03` → `01.02.04`) in `README.md` before opening the PR; the `sync-version-on-merge` workflow propagates it automatically to all badges and `FILE INFORMATION` headers on merge to `main`. + - The `VERSION: XX.YY.ZZ` field in `README.md` governs all other version references. + - Version format is zero-padded semver: `XX.YY.ZZ` (e.g. `01.02.03`). + - Never hardcode a specific version in document body text — use the badge or FILE INFORMATION header only. + + ### Joomla Version Alignment + + The version in `README.md` **must always match** the `` tag in `manifest.xml` and the latest entry in `update.xml`. The `make release` command / release workflow updates all three automatically. + + ```xml + + 01.02.04 + + + + + {{EXTENSION_NAME}} + 01.02.04 + + + {{REPO_URL}}/releases/download/01.02.04/{{EXTENSION_ELEMENT}}-01.02.04.zip + + + + + + + ``` + + --- + + ## Joomla Extension Structure + + ``` + {{REPO_NAME}}/ + ├── manifest.xml # Joomla installer manifest (root — required) + ├── update.xml # Update server manifest (root — required, see below) + ├── site/ # Frontend (site) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ └── views/ + ├── admin/ # Backend (admin) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ ├── views/ + │ └── sql/ + ├── language/ # Language INI files + ├── media/ # CSS, JS, images (deployed to /media/{{EXTENSION_ELEMENT}}/) + ├── docs/ # Technical documentation + ├── tests/ # Test suite + ├── .github/ + │ ├── workflows/ + │ ├── copilot-instructions.md # This file + │ └── CLAUDE.md + ├── README.md # Version source of truth + ├── CHANGELOG.md + ├── CONTRIBUTING.md + ├── LICENSE # GPL-3.0-or-later + └── Makefile # Build automation + ``` + + --- + + ## update.xml — Required in Repo Root + + `update.xml` **must exist at the repository root**. It is the Joomla update server manifest that allows Joomla installations to check for new versions of this extension. + + The `manifest.xml` must reference it via: + ```xml + + + {{REPO_URL}}/raw/main/update.xml + + + ``` + + **Rules:** + - Every release must prepend a new `` block at the top of `update.xml` — old entries must be preserved below. + - The `` in `update.xml` must exactly match `` in `manifest.xml` and the version in `README.md`. + - The `` must be a publicly accessible direct download link (GitHub Releases asset URL). + - `` — the backslash is a **literal backslash character** in the XML attribute value; Joomla's update-server parser treats the value as a regular expression, so `\.` matches a literal dot and `[0-9]+` matches one or more digits. Do not double-escape it. + + --- + + ## manifest.xml Rules + + - Lives at the repo root as `manifest.xml` (not inside `site/` or `admin/`). + - `` tag must be kept in sync with `README.md` version and `update.xml`. + - Must include `` block pointing to this repo's `update.xml`. + - Must include `` and `` sections. + - Joomla 4.x requires `Moko\{{EXTENSION_NAME}}` for namespaced extensions. + + --- + + ## GitHub Actions — Token Usage + + Every workflow must use **`secrets.GH_TOKEN`** (the org-level Personal Access Token). + + ```yaml + # ✅ Correct + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + ``` + + ```yaml + # ❌ Wrong — never use these in workflows + token: ${{ github.token }} + token: ${{ secrets.GITHUB_TOKEN }} + ``` + + --- + + ## MokoStandards Reference + + This repository is governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). Authoritative policies: + + | Document | Purpose | + |----------|---------| + | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | + | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | + | [branching-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | + | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR title/body conventions | + | [changelog-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | + | [joomla-development-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/guide/waas/joomla-development-guide.md) | MokoWaaS Joomla extension development guide | + + --- + + ## Naming Conventions + + | Context | Convention | Example | + |---------|-----------|---------| + | PHP class | `PascalCase` | `MyController` | + | PHP method / function | `camelCase` | `getItems()` | + | PHP variable | `$snake_case` | `$item_id` | + | PHP constant | `UPPER_SNAKE_CASE` | `MAX_ITEMS` | + | PHP class file | `PascalCase.php` | `ItemModel.php` | + | YAML workflow | `kebab-case.yml` | `ci-joomla.yml` | + | Markdown doc | `kebab-case.md` | `installation-guide.md` | + + --- + + ## Commit Messages + + Format: `(): ` — imperative, lower-case subject, no trailing period. + + Valid types: `feat` · `fix` · `docs` · `chore` · `ci` · `refactor` · `style` · `test` · `perf` · `revert` · `build` + + --- + + ## Branch Naming + + Format: `/[/description]` + + Approved prefixes: `dev/` · `rc/` · `version/` · `patch/` · `copilot/` · `dependabot/` + + --- + + ## Keeping Documentation Current + + | Change type | Documentation to update | + |-------------|------------------------| + | New or renamed PHP class/method | PHPDoc block; `docs/api/` entry | + | New or changed manifest.xml | Update `update.xml` version; bump README.md version | + | New release | Prepend `` block to `update.xml`; update CHANGELOG.md; bump README.md version | + | New or changed workflow | `docs/workflows/.md` | + | Any modified file | Update the `VERSION` field in that file's `FILE INFORMATION` block | + | **Every PR** | **Bump the patch version** — increment `XX.YY.ZZ` in `README.md`; `sync-version-on-merge` propagates it | + + --- + + ## Key Constraints + + - Never commit directly to `main` — all changes go via PR, squash-merged + - Never skip the FILE INFORMATION block on a new file + - Never add `defined('_JEXEC') or die;` to CLI scripts or model tests — only to web-accessible PHP files + - Never hardcode version numbers in body text — update `README.md` and let automation propagate + - Never use `github.token` or `secrets.GITHUB_TOKEN` in workflows — always use `secrets.GH_TOKEN` + - Never let `manifest.xml` version, `update.xml` version, and `README.md` version go out of sync + MOKO_END + }, + { + name = "CLAUDE.md" + extension = "md" + description = "Claude AI assistant context enforcing MokoStandards — Joomla/WaaS edition" + requirement_status = "required" + always_overwrite = false + destination_path = ".github" + destination_filename = "CLAUDE.md" + template = "templates/github/CLAUDE.joomla.md.template" + stub_content = <<-MOKO_END + > [!IMPORTANT] + > **🔧 AI Self-Update Required on First Use** + > + > This file may contain unfilled `{{TOKEN}}` placeholders. The MokoStandards bulk-sync system + > replaces them automatically at sync time; if you can still see them, sync has not yet run for + > this repository — or this is a brand-new repo. + > + > **On your very first interaction in this repository, before answering any other question:** + > + > 1. Check whether any `{{TOKEN}}` placeholders remain in this file. + > 2. If they do, locate the values as described in the table below and replace every occurrence + > in **both** `.github/copilot-instructions.md` and `.github/CLAUDE.md`. + > 3. After replacing all tokens, **delete this entire notice block** (from `> [!IMPORTANT]` + > through the closing `> ---` line) in both files. + > 4. Tell the developer: *"I've self-updated the AI context files with this repository's + > values — all set."* + > + > | Placeholder | Where to find the value | + > |---|---| + > | `{{REPO_NAME}}` | The GitHub repository name (visible in the URL, `README.md` heading, or `git remote -v`) | + > | `{{REPO_URL}}` | Full GitHub URL, e.g. `https://github.com/mokoconsulting-tech/` | + > | `{{REPO_DESCRIPTION}}` | First paragraph of `README.md` body, or the GitHub repo description | + > | `{{EXTENSION_NAME}}` | The `` element in `manifest.xml` at the repository root | + > | `{{EXTENSION_TYPE}}` | The `type` attribute of the `` tag in `manifest.xml` (`component`, `module`, `plugin`, or `template`) | + > | `{{EXTENSION_ELEMENT}}` | The `` tag in `manifest.xml`, or the filename prefix (e.g. `com_myextension`, `mod_mymodule`) | + > + > --- + + # What This Repo Is + + **{{REPO_NAME}}** is a Moko Consulting **MokoWaaS** (Joomla) extension repository. + + {{REPO_DESCRIPTION}} + + Extension name: **{{EXTENSION_NAME}}** + Extension type: **{{EXTENSION_TYPE}}** (`{{EXTENSION_ELEMENT}}`) + Repository URL: {{REPO_URL}} + + This repository is governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards) — the single source of truth for coding standards, file-header policies, GitHub Actions workflows, and Terraform configuration templates across all Moko Consulting repositories. + + --- + + # Repo Structure + + ``` + {{REPO_NAME}}/ + ├── manifest.xml # Joomla installer manifest (root — required) + ├── update.xml # Update server manifest (root — required) + ├── site/ # Frontend (site) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ └── views/ + ├── admin/ # Backend (admin) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ ├── views/ + │ └── sql/ + ├── language/ # Language INI files + ├── media/ # CSS, JS, images + ├── docs/ # Technical documentation + ├── tests/ # Test suite + ├── .github/ + │ ├── workflows/ # CI/CD workflows (synced from MokoStandards) + │ ├── copilot-instructions.md + │ └── CLAUDE.md # This file + ├── README.md # Version source of truth + ├── CHANGELOG.md + ├── CONTRIBUTING.md + └── LICENSE # GPL-3.0-or-later + ``` + + --- + + # Primary Language + + **PHP** (≥ 7.4) is the primary language for this Joomla extension. YAML uses 2-space indentation. All other text files use tabs per `.editorconfig`. + + --- + + # Version Management + + **`README.md` is the single source of truth for the repository version.** + + - **Bump the patch version on every PR** — increment `XX.YY.ZZ` (e.g. `01.02.03` → `01.02.04`) in `README.md` before opening the PR; the `sync-version-on-merge` workflow propagates it to all `FILE INFORMATION` headers automatically on merge. + - Version format is zero-padded semver: `XX.YY.ZZ` (e.g. `01.02.03`). + - Never hardcode a version number in body text — use the badge or FILE INFORMATION header only. + + ### Joomla Version Alignment + + Three files must **always have the same version**: + + | File | Where the version lives | + |------|------------------------| + | `README.md` | `FILE INFORMATION` block + badge | + | `manifest.xml` | `` tag | + | `update.xml` | `` in the most recent `` block | + + The `make release` command / release workflow syncs all three automatically. + + --- + + # update.xml — Required in Repo Root + + `update.xml` is the Joomla update server manifest. It allows Joomla installations to check for new versions of this extension via: + + ```xml + + + + {{REPO_URL}}/raw/main/update.xml + + + ``` + + **Rules:** + - Every release prepends a new `` block at the top — older entries are preserved. + - `` in `update.xml` must exactly match `` in `manifest.xml` and `README.md`. + - `` must be a publicly accessible GitHub Releases asset URL. + - `` — backslash is literal (Joomla regex syntax). + + Example `update.xml` entry for a new release: + ```xml + + + {{EXTENSION_NAME}} + {{REPO_NAME}} + {{EXTENSION_ELEMENT}} + {{EXTENSION_TYPE}} + 01.02.04 + {{REPO_URL}}/releases/tag/01.02.04 + + + {{REPO_URL}}/releases/download/01.02.04/{{EXTENSION_ELEMENT}}-01.02.04.zip + + + + 7.4 + Moko Consulting + https://mokoconsulting.tech + + + ``` + + --- + + # File Header Requirements + + Every new file **must** have a copyright header as its first content. JSON files, binary files, generated files, and third-party files are exempt. + + **PHP:** + ```php + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: {{REPO_NAME}}.{{EXTENSION_TYPE}} + * INGROUP: {{REPO_NAME}} + * REPO: {{REPO_URL}} + * PATH: /site/controllers/item.php + * VERSION: XX.YY.ZZ + * BRIEF: One-line description of file purpose + */ + + defined('_JEXEC') or die; + ``` + + **Markdown / YAML / Shell / XML:** Use the appropriate comment syntax with the same fields. + + --- + + # Coding Standards + + ## Naming Conventions + + | Context | Convention | Example | + |---------|-----------|---------| + | PHP class | `PascalCase` | `ItemModel` | + | PHP method / function | `camelCase` | `getItems()` | + | PHP variable | `$snake_case` | `$item_id` | + | PHP constant | `UPPER_SNAKE_CASE` | `MAX_ITEMS` | + | PHP class file | `PascalCase.php` | `ItemModel.php` | + | YAML workflow | `kebab-case.yml` | `ci-joomla.yml` | + | Markdown doc | `kebab-case.md` | `installation-guide.md` | + + ## Commit Messages + + Format: `(): ` — imperative, lower-case subject, no trailing period. + + Valid types: `feat` · `fix` · `docs` · `chore` · `ci` · `refactor` · `style` · `test` · `perf` · `revert` · `build` + + ## Branch Naming + + Format: `/[/description]` + + Approved prefixes: `dev/` · `rc/` · `version/` · `patch/` · `copilot/` · `dependabot/` + + --- + + # GitHub Actions — Token Usage + + Every workflow must use **`secrets.GH_TOKEN`** (the org-level Personal Access Token). + + ```yaml + # ✅ Correct + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + ``` + + ```yaml + # ❌ Wrong — never use these + token: ${{ github.token }} + token: ${{ secrets.GITHUB_TOKEN }} + ``` + + --- + + # Keeping Documentation Current + + | Change type | Documentation to update | + |-------------|------------------------| + | New or renamed PHP class/method | PHPDoc block; `docs/api/` entry | + | New or changed `manifest.xml` | Sync version to `update.xml` and `README.md` | + | New release | Prepend `` to `update.xml`; update `CHANGELOG.md`; bump `README.md` | + | New or changed workflow | `docs/workflows/.md` | + | Any modified file | Update the `VERSION` field in that file's `FILE INFORMATION` block | + | **Every PR** | **Bump the patch version** — increment `XX.YY.ZZ` in `README.md`; `sync-version-on-merge` propagates it | + + --- + + # What NOT to Do + + - **Never commit directly to `main`** — all changes go through a PR. + - **Never hardcode version numbers** in body text — update `README.md` and let automation propagate. + - **Never let `manifest.xml`, `update.xml`, and `README.md` versions diverge.** + - **Never skip the FILE INFORMATION block** on a new source file. + - **Never use bare `catch (\Throwable $e) {}`** — always log or re-throw. + - **Never mix tabs and spaces** within a file — follow `.editorconfig`. + - **Never use `github.token` or `secrets.GITHUB_TOKEN` in workflows** — always use `secrets.GH_TOKEN`. + - **Never remove `defined('_JEXEC') or die;`** from web-accessible PHP files. + + --- + + # PR Checklist + + Before opening a PR, verify: + + - [ ] Patch version bumped in `README.md` (e.g. `01.02.03` → `01.02.04`) + - [ ] If this is a release: `manifest.xml` version updated; `update.xml` updated with new entry + - [ ] FILE INFORMATION headers updated in modified files + - [ ] CHANGELOG.md updated + - [ ] Tests pass + + --- + + # Key Policy Documents (MokoStandards) + + | Document | Purpose | + |----------|---------| + | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | + | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | + | [branching-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | + | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR conventions | + | [changelog-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | + | [joomla-development-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/guide/waas/joomla-development-guide.md) | MokoWaaS Joomla extension development guide | + MOKO_END + } + ] + subdirectories = [ + { + name = "workflows" + path = ".github/workflows" + description = "GitHub Actions workflows" + requirement_status = "required" + files = [ + { + name = "ci-joomla.yml" + extension = "yml" + description = "Joomla-specific CI workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/joomla/ci-joomla.yml.template" + }, + { + name = "codeql-analysis.yml" + extension = "yml" + description = "CodeQL security analysis workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/generic/codeql-analysis.yml.template" + }, + { + name = "standards-compliance.yml" + extension = "yml" + description = "MokoStandards compliance validation" + requirement_status = "required" + always_overwrite = true + template = ".github/workflows/standards-compliance.yml" + }, + { + name = "enterprise-firewall-setup.yml" + extension = "yml" + description = "Enterprise firewall configuration for trusted domain access" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/enterprise-firewall-setup.yml.template" + }, + { + name = "deploy-dev.yml" + extension = "yml" + description = "SFTP deployment of src/ to the development server" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-dev.yml.template" + }, + { + name = "deploy-demo.yml" + extension = "yml" + description = "SFTP deployment of src/ to the demo server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-demo.yml.template" + }, + { + name = "deploy-rs.yml" + extension = "yml" + description = "SFTP deployment of src/ to the release staging server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-rs.yml.template" + }, + { + name = "sync-version-on-merge.yml" + extension = "yml" + description = "Auto-bump patch version on merge and propagate to all file headers" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/sync-version-on-merge.yml.template" + }, + { + name = "auto-release.yml" + extension = "yml" + description = "Auto-create GitHub Release on push to main with version from README.md" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-release.yml.template" + }, + { + name = "repository-cleanup.yml" + extension = "yml" + description = "Scheduled cleanup: delete retired workflows, stale branches, old workflow runs" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/repository-cleanup.yml.template" + }, + { + name = "auto-dev-issue.yml" + extension = "yml" + description = "Auto-create tracking issue when a dev/** branch is pushed" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-dev-issue.yml.template" + }, + { + name = "repo_health.yml" + extension = "yml" + description = "Joomla-specific repository health check workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/joomla/repo_health.yml.template" + } + ] + }, + { + name = "ISSUE_TEMPLATE" + path = ".github/ISSUE_TEMPLATE" + description = "GitHub issue templates synced from MokoStandards" + requirement_status = "required" + files = [ + { + name = "config.yml" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/config.yml" + }, + { + name = "adr.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/adr.md" + }, + { + name = "bug_report.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/bug_report.md" + }, + { + name = "documentation.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/documentation.md" + }, + { + name = "enterprise_support.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/enterprise_support.md" + }, + { + name = "feature_request.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/feature_request.md" + }, + { + name = "firewall-request.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/firewall-request.md" + }, + { + name = "question.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/question.md" + }, + { + name = "request-license.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/request-license.md" + }, + { + name = "rfc.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/rfc.md" + }, + { + name = "security.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/security.md" + }, + { + name = "joomla_issue.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/joomla_issue.md" + } + ] + } + ] + } + ] + + repository_requirements = { + secrets = [ + { + name = "GH_TOKEN" + description = "Org-level GitHub PAT for automation" + required = true + scope = "org" + }, + { + name = "DEV_FTP_KEY" + description = "SSH private key for SFTP dev deployment (preferred); if DEV_FTP_PASSWORD is also set it is used as the key passphrase, with password-only as fallback" + required = false + scope = "org" + }, + { + name = "DEV_FTP_PASSWORD" + description = "SFTP password for dev deployment; used as SSH key passphrase when DEV_FTP_KEY is also set, and as standalone fallback if key auth fails" + required = false + scope = "org" + note = "At least one of DEV_FTP_KEY or DEV_FTP_PASSWORD must be configured" + } + ] + + variables = [ + { + name = "DEV_FTP_HOST" + description = "Dev server hostname; may include port suffix (e.g. dev.example.com or dev.example.com:2222)" + required = true + scope = "org" + }, + { + name = "DEV_FTP_PATH" + description = "Base remote path for SFTP deployment (e.g. /var/www/html)" + required = true + scope = "org" + }, + { + name = "DEV_FTP_USERNAME" + description = "SFTP username for dev server authentication" + required = true + scope = "org" + }, + { + name = "DEV_FTP_PORT" + description = "Explicit SFTP port override; if omitted the port is parsed from DEV_FTP_HOST or defaults to 22" + required = false + scope = "org" + }, + { + name = "DEV_FTP_SUFFIX" + description = "Per-repo path suffix appended to DEV_FTP_PATH (e.g. /my-extension)" + required = false + scope = "repo" + } + ] + } + } +} diff --git a/definitions/sync/MokoStandards-Template-Joomla-Package.def.tf b/definitions/sync/MokoStandards-Template-Joomla-Package.def.tf new file mode 100644 index 0000000..9ce6e81 --- /dev/null +++ b/definitions/sync/MokoStandards-Template-Joomla-Package.def.tf @@ -0,0 +1,1335 @@ +/** + * Repository Sync Tracking Definition: mokoconsulting-tech/MokoStandards-Template-Joomla-Package + * + * Auto-generated by MokoStandards bulk sync on 2026-04-02T15:30:39+00:00 + * Platform : waas-component + * Description: A repo template for a Joomla Package coding project according to MokoStandards + * + * DO NOT EDIT MANUALLY — this file is regenerated on every successful sync. + * To change what gets synced, edit api/definitions/default/waas-component.tf + * and re-run the bulk-repo-sync workflow. + */ + +locals { + sync_record = { + metadata = { + repo = "mokoconsulting-tech/MokoStandards-Template-Joomla-Package" + default_branch = "main" + detected_platform = "waas-component" + description = "A repo template for a Joomla Package coding project according to MokoStandards" + sync_timestamp = "2026-04-02T15:30:39+00:00" + source_repo = "mokoconsulting-tech/MokoStandards" + base_definition = "api/definitions/default/waas-component.tf" + } + + sync_stats = { + total_files = 41 + created_files = 3 + updated_files = 35 + skipped_files = 3 + } + + synced_files = [ + { path = "LICENSE" action = "updated" }, + { path = "SECURITY.md" action = "updated" }, + { path = "CODE_OF_CONDUCT.md" action = "updated" }, + { path = "CONTRIBUTING.md" action = "updated" }, + { path = "update.xml" action = "updated" }, + { path = "phpstan.neon" action = "updated" }, + { path = "Makefile" action = "updated" }, + { path = ".gitignore" action = "updated" }, + { path = "composer.json" action = "updated" }, + { path = ".mokostandards" action = "created" }, + { path = "docs/update-server.md" action = "created" }, + { path = ".github/copilot.yml" action = "updated" }, + { path = ".github/copilot-instructions.md" action = "updated" }, + { path = ".github/CLAUDE.md" action = "updated" }, + { path = ".github/workflows/codeql-analysis.yml" action = "updated" }, + { path = ".github/workflows/standards-compliance.yml" action = "updated" }, + { path = ".github/workflows/enterprise-firewall-setup.yml" action = "updated" }, + { path = ".github/workflows/deploy-dev.yml" action = "updated" }, + { path = ".github/workflows/deploy-demo.yml" action = "updated" }, + { path = ".github/workflows/deploy-rs.yml" action = "updated" }, + { path = ".github/workflows/sync-version-on-merge.yml" action = "updated" }, + { path = ".github/workflows/auto-release.yml" action = "updated" }, + { path = ".github/workflows/repository-cleanup.yml" action = "updated" }, + { path = ".github/workflows/auto-dev-issue.yml" action = "updated" }, + { path = ".github/workflows/repo_health.yml" action = "created" }, + { path = ".github/ISSUE_TEMPLATE/config.yml" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/adr.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/bug_report.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/documentation.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/enterprise_support.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/feature_request.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/firewall-request.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/question.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/request-license.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/rfc.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/security.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/joomla_issue.md" action = "updated" }, + { path = ".github/CODEOWNERS" action = "updated" }, + { path = ".github/.mokostandards" action = "migrated from root" }, + ] + + skipped_files = [ + { path = "GOVERNANCE.md" reason = "Preserved (always_overwrite=false)" }, + { path = ".github/workflows/ci-joomla.yml" reason = "Source file not found" }, + { path = ".github/workflows/custom/README.md" reason = "README — never overwritten" }, + ] + } +} + +# ---- Base platform definition (reference copy) ---- +/** + * MokoWaaS Component Structure Definition + * Standard repository structure for MokoWaaS (Joomla) components + * + * Copyright (C) 2026 Moko Consulting + * SPDX-License-Identifier: GPL-3.0-or-later + * Version: 05.00.00 + * Schema Version: 1.0 + */ + +locals { + repository_structure = { + metadata = { + name = "MokoWaaS Component" + description = "Standard repository structure for MokoWaaS (Joomla) components" + repository_type = "waas-component" + platform = "mokowaas" + last_updated = "2026-01-15T00:00:00Z" + maintainer = "Moko Consulting" + version = "05.00.00" + schema_version = "1.0" + } + + root_files = [ + { + name = "README.md" + extension = "md" + description = "Developer-focused documentation for contributors and maintainers" + required = true + always_overwrite = false + protected = true + audience = "developer" + }, + { + name = "LICENSE" + extension = "" + description = "License file (GPL-3.0-or-later) - Default for Joomla/WaaS components" + required = true + audience = "general" + template = "templates/licenses/GPL-3.0" + license_type = "GPL-3.0-or-later" + }, + { + name = "CHANGELOG.md" + extension = "md" + description = "Version history and changes" + required = true + audience = "general" + }, + { + name = "SECURITY.md" + extension = "md" + description = "Security policy and vulnerability reporting" + required = true + always_overwrite = true + template = "templates/docs/required/template-SECURITY.md" + audience = "general" + }, + { + name = "CODE_OF_CONDUCT.md" + extension = "md" + description = "Community code of conduct" + required = true + always_overwrite = true + template = "templates/docs/extra/template-CODE_OF_CONDUCT.md" + always_overwrite = true + audience = "contributor" + }, + { + name = "ROADMAP.md" + extension = "md" + description = "Project roadmap with version goals and milestones" + required = false + audience = "general" + }, + { + name = "CONTRIBUTING.md" + extension = "md" + description = "Contribution guidelines" + required = true + always_overwrite = true + template = "templates/docs/required/template-CONTRIBUTING.md" + audience = "contributor" + }, + { + name = "update.xml" + extension = "xml" + description = "Joomla extension update server manifest — lists releases for Joomla auto-update; must be kept in sync with manifest.xml version" + required = true + always_overwrite = false + audience = "developer" + template = "templates/joomla/update.xml.template" + stub_content = <<-MOKO_END + + + + {{EXTENSION_NAME}} + {{REPO_NAME}} — Moko Consulting Joomla extension + {{EXTENSION_ELEMENT}} + {{EXTENSION_TYPE}} + {{VERSION}} + {{REPO_URL}}/releases/tag/{{VERSION}} + + {{DOWNLOAD_URL}} + + + 7.4 + Moko Consulting + {{MAINTAINER_URL}} + + + MOKO_END + }, + { + name = "phpstan.neon" + extension = "neon" + description = "PHPStan static analysis config with Joomla framework class stubs" + required = true + always_overwrite = true + audience = "developer" + template = "templates/configs/phpstan.joomla.neon" + }, + { + name = "Makefile" + description = "Build automation using MokoStandards templates" + required = true + always_overwrite = true + audience = "developer" + source_path = "templates/makefiles" + source_filename = "Makefile.joomla.template" + source_type = "template" + destination_path = "." + destination_filename = "Makefile" + create_path = false + template = "templates/makefiles/Makefile.joomla.template" + }, + { + name = ".gitignore" + extension = "gitignore" + description = "Git ignore patterns for Joomla development - preserved during sync operations" + required = true + always_overwrite = false + audience = "developer" + template = "templates/configs/.gitignore.joomla" + validation_rules = [ + { + type = "content-pattern" + description = "Must contain sftp-config pattern to ignore SFTP sync configuration files" + pattern = "sftp-config" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain user.css pattern to ignore custom user CSS overrides" + pattern = "user\\.css" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain user.js pattern to ignore custom user JavaScript overrides" + pattern = "user\\.js" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain modulebuilder.txt pattern to ignore Joomla Module Builder artifacts" + pattern = "modulebuilder\\.txt" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain colors_custom.css pattern to ignore custom color scheme overrides" + pattern = "colors_custom\\.css" + severity = "error" + } + ] + }, + { + name = ".gitattributes" + extension = "gitattributes" + description = "Git attributes configuration" + required = true + audience = "developer" + }, + { + name = ".editorconfig" + extension = "editorconfig" + description = "Editor configuration for consistent coding style - preserved during sync" + required = true + always_overwrite = false + audience = "developer" + }, + { + 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.joomla.json" + }, + { + name = ".mokostandards" + extension = "yml" + description = "MokoStandards governance attachment — links this repo back to the standards source" + required = true + always_overwrite = true + audience = "developer" + template = "templates/configs/mokostandards.yml.template" + }, + { + name = "GOVERNANCE.md" + extension = "md" + description = "Project governance rules, roles, and decision process — auto-maintained by MokoStandards" + required = true + always_overwrite = false + protected = true + audience = "all" + template = "templates/docs/required/GOVERNANCE.md" + } + ] + + directories = [ + { + name = "site" + path = "site" + description = "Component frontend (site) code" + required = true + purpose = "Contains frontend component code deployed to site" + files = [ + { + name = "controller.php" + extension = "php" + description = "Main site controller" + required = true + audience = "developer" + }, + { + name = "manifest.xml" + extension = "xml" + description = "Component manifest for site" + required = true + audience = "developer" + } + ] + subdirectories = [ + { + name = "controllers" + path = "site/controllers" + description = "Site controllers" + requirement_status = "suggested" + }, + { + name = "models" + path = "site/models" + description = "Site models" + requirement_status = "suggested" + }, + { + name = "views" + path = "site/views" + description = "Site views" + required = true + } + ] + }, + { + name = "admin" + path = "admin" + description = "Component backend (admin) code" + required = true + purpose = "Contains backend component code for administrator" + files = [ + { + name = "controller.php" + extension = "php" + description = "Main admin controller" + required = true + audience = "developer" + } + ] + subdirectories = [ + { + name = "controllers" + path = "admin/controllers" + description = "Admin controllers" + requirement_status = "suggested" + }, + { + name = "models" + path = "admin/models" + description = "Admin models" + requirement_status = "suggested" + }, + { + name = "views" + path = "admin/views" + description = "Admin views" + required = true + }, + { + name = "sql" + path = "admin/sql" + description = "Database schema files" + requirement_status = "suggested" + } + ] + }, + { + name = "media" + path = "media" + description = "Media files (CSS, JS, images)" + requirement_status = "suggested" + purpose = "Contains static assets" + subdirectories = [ + { + name = "css" + path = "media/css" + description = "Stylesheets" + requirement_status = "suggested" + }, + { + name = "js" + path = "media/js" + description = "JavaScript files" + requirement_status = "suggested" + }, + { + name = "images" + path = "media/images" + description = "Image files" + requirement_status = "suggested" + } + ] + }, + { + name = "language" + path = "language" + description = "Language translation files" + required = true + purpose = "Contains language INI files" + }, + { + name = "docs" + path = "docs" + description = "Developer and technical documentation" + required = true + purpose = "Contains technical documentation, API docs, architecture diagrams" + files = [ + { + name = "index.md" + extension = "md" + description = "Documentation index" + required = true + }, + { + name = "update-server.md" + extension = "md" + description = "Joomla update server (update.xml) documentation" + required = true + always_overwrite = true + template = "templates/docs/required/template-update-server-joomla.md" + } + ] + }, + { + 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 - preserved during sync" + requirement_status = "optional" + always_overwrite = false + audience = "developer" + } + ] + }, + { + name = "tests" + path = "tests" + description = "Test files" + required = true + purpose = "Contains unit tests, integration tests, and test fixtures" + subdirectories = [ + { + name = "unit" + path = "tests/unit" + description = "Unit tests" + required = true + }, + { + name = "integration" + path = "tests/integration" + description = "Integration tests" + requirement_status = "suggested" + } + ] + }, + { + name = ".github" + path = ".github" + description = "GitHub-specific configuration" + requirement_status = "suggested" + purpose = "Contains GitHub Actions workflows and configuration" + files = [ + { + name = "copilot.yml" + extension = "yml" + description = "GitHub Copilot allowed domains configuration" + requirement_status = "required" + always_overwrite = true + template = ".github/copilot.yml" + }, + { + name = "copilot-instructions.md" + extension = "md" + description = "GitHub Copilot custom instructions enforcing MokoStandards — Joomla/WaaS edition" + requirement_status = "required" + always_overwrite = false + destination_path = ".github" + destination_filename = "copilot-instructions.md" + template = "templates/github/copilot-instructions.joomla.md.template" + stub_content = <<-MOKO_END + > [!IMPORTANT] + > **🔧 AI Self-Update Required on First Use** + > + > This file may contain unfilled `{{TOKEN}}` placeholders. The MokoStandards bulk-sync system + > replaces them automatically at sync time; if you can still see them, sync has not yet run for + > this repository — or this is a brand-new repo. + > + > **On your very first interaction in this repository, before answering any other question:** + > + > 1. Check whether any `{{TOKEN}}` placeholders remain in this file. + > 2. If they do, locate the values as described in the table below and replace every occurrence + > in **both** `.github/copilot-instructions.md` and `.github/CLAUDE.md`. + > 3. After replacing all tokens, **delete this entire notice block** (from `> [!IMPORTANT]` + > through the closing `> ---` line) in both files. + > 4. Tell the developer: *"I've self-updated the AI context files with this repository's + > values — all set."* + > + > | Placeholder | Where to find the value | + > |---|---| + > | `{{REPO_NAME}}` | The GitHub repository name (visible in the URL, `README.md` heading, or `git remote -v`) | + > | `{{REPO_URL}}` | Full GitHub URL, e.g. `https://github.com/mokoconsulting-tech/` | + > | `{{EXTENSION_NAME}}` | The `` element in `manifest.xml` at the repository root | + > | `{{EXTENSION_TYPE}}` | The `type` attribute of the `` tag in `manifest.xml` (`component`, `module`, `plugin`, or `template`) | + > | `{{EXTENSION_ELEMENT}}` | The `` tag in `manifest.xml`, or the filename prefix (e.g. `com_myextension`, `mod_mymodule`) | + > + > --- + + # {{REPO_NAME}} — GitHub Copilot Custom Instructions + + ## What This Repo Is + + This is a **Moko Consulting MokoWaaS** (Joomla) repository governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). All coding standards, workflows, and policies are defined there and enforced here via bulk sync. + + Repository URL: {{REPO_URL}} + Extension name: **{{EXTENSION_NAME}}** + Extension type: **{{EXTENSION_TYPE}}** (`{{EXTENSION_ELEMENT}}`) + Platform: **Joomla 4.x / MokoWaaS** + + --- + + ## Primary Language + + **PHP** (≥ 7.4) is the primary language for this Joomla extension. JavaScript may be used for frontend enhancements. YAML uses 2-space indentation. All other text files use tabs per `.editorconfig`. + + --- + + ## File Header — Always Required on New Files + + Every new file needs a copyright header as its first content. + + **PHP:** + ```php + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: {{REPO_NAME}}.{{EXTENSION_TYPE}} + * INGROUP: {{REPO_NAME}} + * REPO: {{REPO_URL}} + * PATH: /path/to/file.php + * VERSION: XX.YY.ZZ + * BRIEF: One-line description of purpose + */ + + defined('_JEXEC') or die; + ``` + + **Markdown:** + ```markdown + + ``` + + **YAML / Shell / XML:** Use the appropriate comment syntax with the same fields. JSON files are exempt. + + --- + + ## Version Management + + **`README.md` is the single source of truth for the repository version.** + + - **Bump the patch version on every PR** — increment `XX.YY.ZZ` (e.g. `01.02.03` → `01.02.04`) in `README.md` before opening the PR; the `sync-version-on-merge` workflow propagates it automatically to all badges and `FILE INFORMATION` headers on merge to `main`. + - The `VERSION: XX.YY.ZZ` field in `README.md` governs all other version references. + - Version format is zero-padded semver: `XX.YY.ZZ` (e.g. `01.02.03`). + - Never hardcode a specific version in document body text — use the badge or FILE INFORMATION header only. + + ### Joomla Version Alignment + + The version in `README.md` **must always match** the `` tag in `manifest.xml` and the latest entry in `update.xml`. The `make release` command / release workflow updates all three automatically. + + ```xml + + 01.02.04 + + + + + {{EXTENSION_NAME}} + 01.02.04 + + + {{REPO_URL}}/releases/download/01.02.04/{{EXTENSION_ELEMENT}}-01.02.04.zip + + + + + + + ``` + + --- + + ## Joomla Extension Structure + + ``` + {{REPO_NAME}}/ + ├── manifest.xml # Joomla installer manifest (root — required) + ├── update.xml # Update server manifest (root — required, see below) + ├── site/ # Frontend (site) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ └── views/ + ├── admin/ # Backend (admin) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ ├── views/ + │ └── sql/ + ├── language/ # Language INI files + ├── media/ # CSS, JS, images (deployed to /media/{{EXTENSION_ELEMENT}}/) + ├── docs/ # Technical documentation + ├── tests/ # Test suite + ├── .github/ + │ ├── workflows/ + │ ├── copilot-instructions.md # This file + │ └── CLAUDE.md + ├── README.md # Version source of truth + ├── CHANGELOG.md + ├── CONTRIBUTING.md + ├── LICENSE # GPL-3.0-or-later + └── Makefile # Build automation + ``` + + --- + + ## update.xml — Required in Repo Root + + `update.xml` **must exist at the repository root**. It is the Joomla update server manifest that allows Joomla installations to check for new versions of this extension. + + The `manifest.xml` must reference it via: + ```xml + + + {{REPO_URL}}/raw/main/update.xml + + + ``` + + **Rules:** + - Every release must prepend a new `` block at the top of `update.xml` — old entries must be preserved below. + - The `` in `update.xml` must exactly match `` in `manifest.xml` and the version in `README.md`. + - The `` must be a publicly accessible direct download link (GitHub Releases asset URL). + - `` — the backslash is a **literal backslash character** in the XML attribute value; Joomla's update-server parser treats the value as a regular expression, so `\.` matches a literal dot and `[0-9]+` matches one or more digits. Do not double-escape it. + + --- + + ## manifest.xml Rules + + - Lives at the repo root as `manifest.xml` (not inside `site/` or `admin/`). + - `` tag must be kept in sync with `README.md` version and `update.xml`. + - Must include `` block pointing to this repo's `update.xml`. + - Must include `` and `` sections. + - Joomla 4.x requires `Moko\{{EXTENSION_NAME}}` for namespaced extensions. + + --- + + ## GitHub Actions — Token Usage + + Every workflow must use **`secrets.GH_TOKEN`** (the org-level Personal Access Token). + + ```yaml + # ✅ Correct + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + ``` + + ```yaml + # ❌ Wrong — never use these in workflows + token: ${{ github.token }} + token: ${{ secrets.GITHUB_TOKEN }} + ``` + + --- + + ## MokoStandards Reference + + This repository is governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). Authoritative policies: + + | Document | Purpose | + |----------|---------| + | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | + | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | + | [branching-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | + | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR title/body conventions | + | [changelog-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | + | [joomla-development-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/guide/waas/joomla-development-guide.md) | MokoWaaS Joomla extension development guide | + + --- + + ## Naming Conventions + + | Context | Convention | Example | + |---------|-----------|---------| + | PHP class | `PascalCase` | `MyController` | + | PHP method / function | `camelCase` | `getItems()` | + | PHP variable | `$snake_case` | `$item_id` | + | PHP constant | `UPPER_SNAKE_CASE` | `MAX_ITEMS` | + | PHP class file | `PascalCase.php` | `ItemModel.php` | + | YAML workflow | `kebab-case.yml` | `ci-joomla.yml` | + | Markdown doc | `kebab-case.md` | `installation-guide.md` | + + --- + + ## Commit Messages + + Format: `(): ` — imperative, lower-case subject, no trailing period. + + Valid types: `feat` · `fix` · `docs` · `chore` · `ci` · `refactor` · `style` · `test` · `perf` · `revert` · `build` + + --- + + ## Branch Naming + + Format: `/[/description]` + + Approved prefixes: `dev/` · `rc/` · `version/` · `patch/` · `copilot/` · `dependabot/` + + --- + + ## Keeping Documentation Current + + | Change type | Documentation to update | + |-------------|------------------------| + | New or renamed PHP class/method | PHPDoc block; `docs/api/` entry | + | New or changed manifest.xml | Update `update.xml` version; bump README.md version | + | New release | Prepend `` block to `update.xml`; update CHANGELOG.md; bump README.md version | + | New or changed workflow | `docs/workflows/.md` | + | Any modified file | Update the `VERSION` field in that file's `FILE INFORMATION` block | + | **Every PR** | **Bump the patch version** — increment `XX.YY.ZZ` in `README.md`; `sync-version-on-merge` propagates it | + + --- + + ## Key Constraints + + - Never commit directly to `main` — all changes go via PR, squash-merged + - Never skip the FILE INFORMATION block on a new file + - Never add `defined('_JEXEC') or die;` to CLI scripts or model tests — only to web-accessible PHP files + - Never hardcode version numbers in body text — update `README.md` and let automation propagate + - Never use `github.token` or `secrets.GITHUB_TOKEN` in workflows — always use `secrets.GH_TOKEN` + - Never let `manifest.xml` version, `update.xml` version, and `README.md` version go out of sync + MOKO_END + }, + { + name = "CLAUDE.md" + extension = "md" + description = "Claude AI assistant context enforcing MokoStandards — Joomla/WaaS edition" + requirement_status = "required" + always_overwrite = false + destination_path = ".github" + destination_filename = "CLAUDE.md" + template = "templates/github/CLAUDE.joomla.md.template" + stub_content = <<-MOKO_END + > [!IMPORTANT] + > **🔧 AI Self-Update Required on First Use** + > + > This file may contain unfilled `{{TOKEN}}` placeholders. The MokoStandards bulk-sync system + > replaces them automatically at sync time; if you can still see them, sync has not yet run for + > this repository — or this is a brand-new repo. + > + > **On your very first interaction in this repository, before answering any other question:** + > + > 1. Check whether any `{{TOKEN}}` placeholders remain in this file. + > 2. If they do, locate the values as described in the table below and replace every occurrence + > in **both** `.github/copilot-instructions.md` and `.github/CLAUDE.md`. + > 3. After replacing all tokens, **delete this entire notice block** (from `> [!IMPORTANT]` + > through the closing `> ---` line) in both files. + > 4. Tell the developer: *"I've self-updated the AI context files with this repository's + > values — all set."* + > + > | Placeholder | Where to find the value | + > |---|---| + > | `{{REPO_NAME}}` | The GitHub repository name (visible in the URL, `README.md` heading, or `git remote -v`) | + > | `{{REPO_URL}}` | Full GitHub URL, e.g. `https://github.com/mokoconsulting-tech/` | + > | `{{REPO_DESCRIPTION}}` | First paragraph of `README.md` body, or the GitHub repo description | + > | `{{EXTENSION_NAME}}` | The `` element in `manifest.xml` at the repository root | + > | `{{EXTENSION_TYPE}}` | The `type` attribute of the `` tag in `manifest.xml` (`component`, `module`, `plugin`, or `template`) | + > | `{{EXTENSION_ELEMENT}}` | The `` tag in `manifest.xml`, or the filename prefix (e.g. `com_myextension`, `mod_mymodule`) | + > + > --- + + # What This Repo Is + + **{{REPO_NAME}}** is a Moko Consulting **MokoWaaS** (Joomla) extension repository. + + {{REPO_DESCRIPTION}} + + Extension name: **{{EXTENSION_NAME}}** + Extension type: **{{EXTENSION_TYPE}}** (`{{EXTENSION_ELEMENT}}`) + Repository URL: {{REPO_URL}} + + This repository is governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards) — the single source of truth for coding standards, file-header policies, GitHub Actions workflows, and Terraform configuration templates across all Moko Consulting repositories. + + --- + + # Repo Structure + + ``` + {{REPO_NAME}}/ + ├── manifest.xml # Joomla installer manifest (root — required) + ├── update.xml # Update server manifest (root — required) + ├── site/ # Frontend (site) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ └── views/ + ├── admin/ # Backend (admin) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ ├── views/ + │ └── sql/ + ├── language/ # Language INI files + ├── media/ # CSS, JS, images + ├── docs/ # Technical documentation + ├── tests/ # Test suite + ├── .github/ + │ ├── workflows/ # CI/CD workflows (synced from MokoStandards) + │ ├── copilot-instructions.md + │ └── CLAUDE.md # This file + ├── README.md # Version source of truth + ├── CHANGELOG.md + ├── CONTRIBUTING.md + └── LICENSE # GPL-3.0-or-later + ``` + + --- + + # Primary Language + + **PHP** (≥ 7.4) is the primary language for this Joomla extension. YAML uses 2-space indentation. All other text files use tabs per `.editorconfig`. + + --- + + # Version Management + + **`README.md` is the single source of truth for the repository version.** + + - **Bump the patch version on every PR** — increment `XX.YY.ZZ` (e.g. `01.02.03` → `01.02.04`) in `README.md` before opening the PR; the `sync-version-on-merge` workflow propagates it to all `FILE INFORMATION` headers automatically on merge. + - Version format is zero-padded semver: `XX.YY.ZZ` (e.g. `01.02.03`). + - Never hardcode a version number in body text — use the badge or FILE INFORMATION header only. + + ### Joomla Version Alignment + + Three files must **always have the same version**: + + | File | Where the version lives | + |------|------------------------| + | `README.md` | `FILE INFORMATION` block + badge | + | `manifest.xml` | `` tag | + | `update.xml` | `` in the most recent `` block | + + The `make release` command / release workflow syncs all three automatically. + + --- + + # update.xml — Required in Repo Root + + `update.xml` is the Joomla update server manifest. It allows Joomla installations to check for new versions of this extension via: + + ```xml + + + + {{REPO_URL}}/raw/main/update.xml + + + ``` + + **Rules:** + - Every release prepends a new `` block at the top — older entries are preserved. + - `` in `update.xml` must exactly match `` in `manifest.xml` and `README.md`. + - `` must be a publicly accessible GitHub Releases asset URL. + - `` — backslash is literal (Joomla regex syntax). + + Example `update.xml` entry for a new release: + ```xml + + + {{EXTENSION_NAME}} + {{REPO_NAME}} + {{EXTENSION_ELEMENT}} + {{EXTENSION_TYPE}} + 01.02.04 + {{REPO_URL}}/releases/tag/01.02.04 + + + {{REPO_URL}}/releases/download/01.02.04/{{EXTENSION_ELEMENT}}-01.02.04.zip + + + + 7.4 + Moko Consulting + https://mokoconsulting.tech + + + ``` + + --- + + # File Header Requirements + + Every new file **must** have a copyright header as its first content. JSON files, binary files, generated files, and third-party files are exempt. + + **PHP:** + ```php + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: {{REPO_NAME}}.{{EXTENSION_TYPE}} + * INGROUP: {{REPO_NAME}} + * REPO: {{REPO_URL}} + * PATH: /site/controllers/item.php + * VERSION: XX.YY.ZZ + * BRIEF: One-line description of file purpose + */ + + defined('_JEXEC') or die; + ``` + + **Markdown / YAML / Shell / XML:** Use the appropriate comment syntax with the same fields. + + --- + + # Coding Standards + + ## Naming Conventions + + | Context | Convention | Example | + |---------|-----------|---------| + | PHP class | `PascalCase` | `ItemModel` | + | PHP method / function | `camelCase` | `getItems()` | + | PHP variable | `$snake_case` | `$item_id` | + | PHP constant | `UPPER_SNAKE_CASE` | `MAX_ITEMS` | + | PHP class file | `PascalCase.php` | `ItemModel.php` | + | YAML workflow | `kebab-case.yml` | `ci-joomla.yml` | + | Markdown doc | `kebab-case.md` | `installation-guide.md` | + + ## Commit Messages + + Format: `(): ` — imperative, lower-case subject, no trailing period. + + Valid types: `feat` · `fix` · `docs` · `chore` · `ci` · `refactor` · `style` · `test` · `perf` · `revert` · `build` + + ## Branch Naming + + Format: `/[/description]` + + Approved prefixes: `dev/` · `rc/` · `version/` · `patch/` · `copilot/` · `dependabot/` + + --- + + # GitHub Actions — Token Usage + + Every workflow must use **`secrets.GH_TOKEN`** (the org-level Personal Access Token). + + ```yaml + # ✅ Correct + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + ``` + + ```yaml + # ❌ Wrong — never use these + token: ${{ github.token }} + token: ${{ secrets.GITHUB_TOKEN }} + ``` + + --- + + # Keeping Documentation Current + + | Change type | Documentation to update | + |-------------|------------------------| + | New or renamed PHP class/method | PHPDoc block; `docs/api/` entry | + | New or changed `manifest.xml` | Sync version to `update.xml` and `README.md` | + | New release | Prepend `` to `update.xml`; update `CHANGELOG.md`; bump `README.md` | + | New or changed workflow | `docs/workflows/.md` | + | Any modified file | Update the `VERSION` field in that file's `FILE INFORMATION` block | + | **Every PR** | **Bump the patch version** — increment `XX.YY.ZZ` in `README.md`; `sync-version-on-merge` propagates it | + + --- + + # What NOT to Do + + - **Never commit directly to `main`** — all changes go through a PR. + - **Never hardcode version numbers** in body text — update `README.md` and let automation propagate. + - **Never let `manifest.xml`, `update.xml`, and `README.md` versions diverge.** + - **Never skip the FILE INFORMATION block** on a new source file. + - **Never use bare `catch (\Throwable $e) {}`** — always log or re-throw. + - **Never mix tabs and spaces** within a file — follow `.editorconfig`. + - **Never use `github.token` or `secrets.GITHUB_TOKEN` in workflows** — always use `secrets.GH_TOKEN`. + - **Never remove `defined('_JEXEC') or die;`** from web-accessible PHP files. + + --- + + # PR Checklist + + Before opening a PR, verify: + + - [ ] Patch version bumped in `README.md` (e.g. `01.02.03` → `01.02.04`) + - [ ] If this is a release: `manifest.xml` version updated; `update.xml` updated with new entry + - [ ] FILE INFORMATION headers updated in modified files + - [ ] CHANGELOG.md updated + - [ ] Tests pass + + --- + + # Key Policy Documents (MokoStandards) + + | Document | Purpose | + |----------|---------| + | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | + | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | + | [branching-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | + | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR conventions | + | [changelog-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | + | [joomla-development-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/guide/waas/joomla-development-guide.md) | MokoWaaS Joomla extension development guide | + MOKO_END + } + ] + subdirectories = [ + { + name = "workflows" + path = ".github/workflows" + description = "GitHub Actions workflows" + requirement_status = "required" + files = [ + { + name = "ci-joomla.yml" + extension = "yml" + description = "Joomla-specific CI workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/joomla/ci-joomla.yml.template" + }, + { + name = "codeql-analysis.yml" + extension = "yml" + description = "CodeQL security analysis workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/generic/codeql-analysis.yml.template" + }, + { + name = "standards-compliance.yml" + extension = "yml" + description = "MokoStandards compliance validation" + requirement_status = "required" + always_overwrite = true + template = ".github/workflows/standards-compliance.yml" + }, + { + name = "enterprise-firewall-setup.yml" + extension = "yml" + description = "Enterprise firewall configuration for trusted domain access" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/enterprise-firewall-setup.yml.template" + }, + { + name = "deploy-dev.yml" + extension = "yml" + description = "SFTP deployment of src/ to the development server" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-dev.yml.template" + }, + { + name = "deploy-demo.yml" + extension = "yml" + description = "SFTP deployment of src/ to the demo server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-demo.yml.template" + }, + { + name = "deploy-rs.yml" + extension = "yml" + description = "SFTP deployment of src/ to the release staging server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-rs.yml.template" + }, + { + name = "sync-version-on-merge.yml" + extension = "yml" + description = "Auto-bump patch version on merge and propagate to all file headers" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/sync-version-on-merge.yml.template" + }, + { + name = "auto-release.yml" + extension = "yml" + description = "Auto-create GitHub Release on push to main with version from README.md" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-release.yml.template" + }, + { + name = "repository-cleanup.yml" + extension = "yml" + description = "Scheduled cleanup: delete retired workflows, stale branches, old workflow runs" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/repository-cleanup.yml.template" + }, + { + name = "auto-dev-issue.yml" + extension = "yml" + description = "Auto-create tracking issue when a dev/** branch is pushed" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-dev-issue.yml.template" + }, + { + name = "repo_health.yml" + extension = "yml" + description = "Joomla-specific repository health check workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/joomla/repo_health.yml.template" + } + ] + }, + { + name = "ISSUE_TEMPLATE" + path = ".github/ISSUE_TEMPLATE" + description = "GitHub issue templates synced from MokoStandards" + requirement_status = "required" + files = [ + { + name = "config.yml" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/config.yml" + }, + { + name = "adr.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/adr.md" + }, + { + name = "bug_report.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/bug_report.md" + }, + { + name = "documentation.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/documentation.md" + }, + { + name = "enterprise_support.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/enterprise_support.md" + }, + { + name = "feature_request.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/feature_request.md" + }, + { + name = "firewall-request.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/firewall-request.md" + }, + { + name = "question.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/question.md" + }, + { + name = "request-license.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/request-license.md" + }, + { + name = "rfc.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/rfc.md" + }, + { + name = "security.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/security.md" + }, + { + name = "joomla_issue.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/joomla_issue.md" + } + ] + } + ] + } + ] + + repository_requirements = { + secrets = [ + { + name = "GH_TOKEN" + description = "Org-level GitHub PAT for automation" + required = true + scope = "org" + }, + { + name = "DEV_FTP_KEY" + description = "SSH private key for SFTP dev deployment (preferred); if DEV_FTP_PASSWORD is also set it is used as the key passphrase, with password-only as fallback" + required = false + scope = "org" + }, + { + name = "DEV_FTP_PASSWORD" + description = "SFTP password for dev deployment; used as SSH key passphrase when DEV_FTP_KEY is also set, and as standalone fallback if key auth fails" + required = false + scope = "org" + note = "At least one of DEV_FTP_KEY or DEV_FTP_PASSWORD must be configured" + } + ] + + variables = [ + { + name = "DEV_FTP_HOST" + description = "Dev server hostname; may include port suffix (e.g. dev.example.com or dev.example.com:2222)" + required = true + scope = "org" + }, + { + name = "DEV_FTP_PATH" + description = "Base remote path for SFTP deployment (e.g. /var/www/html)" + required = true + scope = "org" + }, + { + name = "DEV_FTP_USERNAME" + description = "SFTP username for dev server authentication" + required = true + scope = "org" + }, + { + name = "DEV_FTP_PORT" + description = "Explicit SFTP port override; if omitted the port is parsed from DEV_FTP_HOST or defaults to 22" + required = false + scope = "org" + }, + { + name = "DEV_FTP_SUFFIX" + description = "Per-repo path suffix appended to DEV_FTP_PATH (e.g. /my-extension)" + required = false + scope = "repo" + } + ] + } + } +} diff --git a/definitions/sync/MokoStandards-Template-Joomla-Plugin.def.tf b/definitions/sync/MokoStandards-Template-Joomla-Plugin.def.tf new file mode 100644 index 0000000..71c6a40 --- /dev/null +++ b/definitions/sync/MokoStandards-Template-Joomla-Plugin.def.tf @@ -0,0 +1,1335 @@ +/** + * Repository Sync Tracking Definition: mokoconsulting-tech/MokoStandards-Template-Joomla-Plugin + * + * Auto-generated by MokoStandards bulk sync on 2026-04-02T15:31:55+00:00 + * Platform : waas-component + * Description: A repo template for a Joomla Plugin coding project according to MokoStandards + * + * DO NOT EDIT MANUALLY — this file is regenerated on every successful sync. + * To change what gets synced, edit api/definitions/default/waas-component.tf + * and re-run the bulk-repo-sync workflow. + */ + +locals { + sync_record = { + metadata = { + repo = "mokoconsulting-tech/MokoStandards-Template-Joomla-Plugin" + default_branch = "main" + detected_platform = "waas-component" + description = "A repo template for a Joomla Plugin coding project according to MokoStandards" + sync_timestamp = "2026-04-02T15:31:55+00:00" + source_repo = "mokoconsulting-tech/MokoStandards" + base_definition = "api/definitions/default/waas-component.tf" + } + + sync_stats = { + total_files = 41 + created_files = 3 + updated_files = 35 + skipped_files = 3 + } + + synced_files = [ + { path = "LICENSE" action = "updated" }, + { path = "SECURITY.md" action = "updated" }, + { path = "CODE_OF_CONDUCT.md" action = "updated" }, + { path = "CONTRIBUTING.md" action = "updated" }, + { path = "update.xml" action = "updated" }, + { path = "phpstan.neon" action = "updated" }, + { path = "Makefile" action = "updated" }, + { path = ".gitignore" action = "updated" }, + { path = "composer.json" action = "updated" }, + { path = ".mokostandards" action = "created" }, + { path = "docs/update-server.md" action = "created" }, + { path = ".github/copilot.yml" action = "updated" }, + { path = ".github/copilot-instructions.md" action = "updated" }, + { path = ".github/CLAUDE.md" action = "updated" }, + { path = ".github/workflows/codeql-analysis.yml" action = "updated" }, + { path = ".github/workflows/standards-compliance.yml" action = "updated" }, + { path = ".github/workflows/enterprise-firewall-setup.yml" action = "updated" }, + { path = ".github/workflows/deploy-dev.yml" action = "updated" }, + { path = ".github/workflows/deploy-demo.yml" action = "updated" }, + { path = ".github/workflows/deploy-rs.yml" action = "updated" }, + { path = ".github/workflows/sync-version-on-merge.yml" action = "updated" }, + { path = ".github/workflows/auto-release.yml" action = "updated" }, + { path = ".github/workflows/repository-cleanup.yml" action = "updated" }, + { path = ".github/workflows/auto-dev-issue.yml" action = "updated" }, + { path = ".github/workflows/repo_health.yml" action = "created" }, + { path = ".github/ISSUE_TEMPLATE/config.yml" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/adr.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/bug_report.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/documentation.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/enterprise_support.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/feature_request.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/firewall-request.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/question.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/request-license.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/rfc.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/security.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/joomla_issue.md" action = "updated" }, + { path = ".github/CODEOWNERS" action = "updated" }, + { path = ".github/.mokostandards" action = "migrated from root" }, + ] + + skipped_files = [ + { path = "GOVERNANCE.md" reason = "Preserved (always_overwrite=false)" }, + { path = ".github/workflows/ci-joomla.yml" reason = "Source file not found" }, + { path = ".github/workflows/custom/README.md" reason = "README — never overwritten" }, + ] + } +} + +# ---- Base platform definition (reference copy) ---- +/** + * MokoWaaS Component Structure Definition + * Standard repository structure for MokoWaaS (Joomla) components + * + * Copyright (C) 2026 Moko Consulting + * SPDX-License-Identifier: GPL-3.0-or-later + * Version: 05.00.00 + * Schema Version: 1.0 + */ + +locals { + repository_structure = { + metadata = { + name = "MokoWaaS Component" + description = "Standard repository structure for MokoWaaS (Joomla) components" + repository_type = "waas-component" + platform = "mokowaas" + last_updated = "2026-01-15T00:00:00Z" + maintainer = "Moko Consulting" + version = "05.00.00" + schema_version = "1.0" + } + + root_files = [ + { + name = "README.md" + extension = "md" + description = "Developer-focused documentation for contributors and maintainers" + required = true + always_overwrite = false + protected = true + audience = "developer" + }, + { + name = "LICENSE" + extension = "" + description = "License file (GPL-3.0-or-later) - Default for Joomla/WaaS components" + required = true + audience = "general" + template = "templates/licenses/GPL-3.0" + license_type = "GPL-3.0-or-later" + }, + { + name = "CHANGELOG.md" + extension = "md" + description = "Version history and changes" + required = true + audience = "general" + }, + { + name = "SECURITY.md" + extension = "md" + description = "Security policy and vulnerability reporting" + required = true + always_overwrite = true + template = "templates/docs/required/template-SECURITY.md" + audience = "general" + }, + { + name = "CODE_OF_CONDUCT.md" + extension = "md" + description = "Community code of conduct" + required = true + always_overwrite = true + template = "templates/docs/extra/template-CODE_OF_CONDUCT.md" + always_overwrite = true + audience = "contributor" + }, + { + name = "ROADMAP.md" + extension = "md" + description = "Project roadmap with version goals and milestones" + required = false + audience = "general" + }, + { + name = "CONTRIBUTING.md" + extension = "md" + description = "Contribution guidelines" + required = true + always_overwrite = true + template = "templates/docs/required/template-CONTRIBUTING.md" + audience = "contributor" + }, + { + name = "update.xml" + extension = "xml" + description = "Joomla extension update server manifest — lists releases for Joomla auto-update; must be kept in sync with manifest.xml version" + required = true + always_overwrite = false + audience = "developer" + template = "templates/joomla/update.xml.template" + stub_content = <<-MOKO_END + + + + {{EXTENSION_NAME}} + {{REPO_NAME}} — Moko Consulting Joomla extension + {{EXTENSION_ELEMENT}} + {{EXTENSION_TYPE}} + {{VERSION}} + {{REPO_URL}}/releases/tag/{{VERSION}} + + {{DOWNLOAD_URL}} + + + 7.4 + Moko Consulting + {{MAINTAINER_URL}} + + + MOKO_END + }, + { + name = "phpstan.neon" + extension = "neon" + description = "PHPStan static analysis config with Joomla framework class stubs" + required = true + always_overwrite = true + audience = "developer" + template = "templates/configs/phpstan.joomla.neon" + }, + { + name = "Makefile" + description = "Build automation using MokoStandards templates" + required = true + always_overwrite = true + audience = "developer" + source_path = "templates/makefiles" + source_filename = "Makefile.joomla.template" + source_type = "template" + destination_path = "." + destination_filename = "Makefile" + create_path = false + template = "templates/makefiles/Makefile.joomla.template" + }, + { + name = ".gitignore" + extension = "gitignore" + description = "Git ignore patterns for Joomla development - preserved during sync operations" + required = true + always_overwrite = false + audience = "developer" + template = "templates/configs/.gitignore.joomla" + validation_rules = [ + { + type = "content-pattern" + description = "Must contain sftp-config pattern to ignore SFTP sync configuration files" + pattern = "sftp-config" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain user.css pattern to ignore custom user CSS overrides" + pattern = "user\\.css" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain user.js pattern to ignore custom user JavaScript overrides" + pattern = "user\\.js" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain modulebuilder.txt pattern to ignore Joomla Module Builder artifacts" + pattern = "modulebuilder\\.txt" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain colors_custom.css pattern to ignore custom color scheme overrides" + pattern = "colors_custom\\.css" + severity = "error" + } + ] + }, + { + name = ".gitattributes" + extension = "gitattributes" + description = "Git attributes configuration" + required = true + audience = "developer" + }, + { + name = ".editorconfig" + extension = "editorconfig" + description = "Editor configuration for consistent coding style - preserved during sync" + required = true + always_overwrite = false + audience = "developer" + }, + { + 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.joomla.json" + }, + { + name = ".mokostandards" + extension = "yml" + description = "MokoStandards governance attachment — links this repo back to the standards source" + required = true + always_overwrite = true + audience = "developer" + template = "templates/configs/mokostandards.yml.template" + }, + { + name = "GOVERNANCE.md" + extension = "md" + description = "Project governance rules, roles, and decision process — auto-maintained by MokoStandards" + required = true + always_overwrite = false + protected = true + audience = "all" + template = "templates/docs/required/GOVERNANCE.md" + } + ] + + directories = [ + { + name = "site" + path = "site" + description = "Component frontend (site) code" + required = true + purpose = "Contains frontend component code deployed to site" + files = [ + { + name = "controller.php" + extension = "php" + description = "Main site controller" + required = true + audience = "developer" + }, + { + name = "manifest.xml" + extension = "xml" + description = "Component manifest for site" + required = true + audience = "developer" + } + ] + subdirectories = [ + { + name = "controllers" + path = "site/controllers" + description = "Site controllers" + requirement_status = "suggested" + }, + { + name = "models" + path = "site/models" + description = "Site models" + requirement_status = "suggested" + }, + { + name = "views" + path = "site/views" + description = "Site views" + required = true + } + ] + }, + { + name = "admin" + path = "admin" + description = "Component backend (admin) code" + required = true + purpose = "Contains backend component code for administrator" + files = [ + { + name = "controller.php" + extension = "php" + description = "Main admin controller" + required = true + audience = "developer" + } + ] + subdirectories = [ + { + name = "controllers" + path = "admin/controllers" + description = "Admin controllers" + requirement_status = "suggested" + }, + { + name = "models" + path = "admin/models" + description = "Admin models" + requirement_status = "suggested" + }, + { + name = "views" + path = "admin/views" + description = "Admin views" + required = true + }, + { + name = "sql" + path = "admin/sql" + description = "Database schema files" + requirement_status = "suggested" + } + ] + }, + { + name = "media" + path = "media" + description = "Media files (CSS, JS, images)" + requirement_status = "suggested" + purpose = "Contains static assets" + subdirectories = [ + { + name = "css" + path = "media/css" + description = "Stylesheets" + requirement_status = "suggested" + }, + { + name = "js" + path = "media/js" + description = "JavaScript files" + requirement_status = "suggested" + }, + { + name = "images" + path = "media/images" + description = "Image files" + requirement_status = "suggested" + } + ] + }, + { + name = "language" + path = "language" + description = "Language translation files" + required = true + purpose = "Contains language INI files" + }, + { + name = "docs" + path = "docs" + description = "Developer and technical documentation" + required = true + purpose = "Contains technical documentation, API docs, architecture diagrams" + files = [ + { + name = "index.md" + extension = "md" + description = "Documentation index" + required = true + }, + { + name = "update-server.md" + extension = "md" + description = "Joomla update server (update.xml) documentation" + required = true + always_overwrite = true + template = "templates/docs/required/template-update-server-joomla.md" + } + ] + }, + { + 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 - preserved during sync" + requirement_status = "optional" + always_overwrite = false + audience = "developer" + } + ] + }, + { + name = "tests" + path = "tests" + description = "Test files" + required = true + purpose = "Contains unit tests, integration tests, and test fixtures" + subdirectories = [ + { + name = "unit" + path = "tests/unit" + description = "Unit tests" + required = true + }, + { + name = "integration" + path = "tests/integration" + description = "Integration tests" + requirement_status = "suggested" + } + ] + }, + { + name = ".github" + path = ".github" + description = "GitHub-specific configuration" + requirement_status = "suggested" + purpose = "Contains GitHub Actions workflows and configuration" + files = [ + { + name = "copilot.yml" + extension = "yml" + description = "GitHub Copilot allowed domains configuration" + requirement_status = "required" + always_overwrite = true + template = ".github/copilot.yml" + }, + { + name = "copilot-instructions.md" + extension = "md" + description = "GitHub Copilot custom instructions enforcing MokoStandards — Joomla/WaaS edition" + requirement_status = "required" + always_overwrite = false + destination_path = ".github" + destination_filename = "copilot-instructions.md" + template = "templates/github/copilot-instructions.joomla.md.template" + stub_content = <<-MOKO_END + > [!IMPORTANT] + > **🔧 AI Self-Update Required on First Use** + > + > This file may contain unfilled `{{TOKEN}}` placeholders. The MokoStandards bulk-sync system + > replaces them automatically at sync time; if you can still see them, sync has not yet run for + > this repository — or this is a brand-new repo. + > + > **On your very first interaction in this repository, before answering any other question:** + > + > 1. Check whether any `{{TOKEN}}` placeholders remain in this file. + > 2. If they do, locate the values as described in the table below and replace every occurrence + > in **both** `.github/copilot-instructions.md` and `.github/CLAUDE.md`. + > 3. After replacing all tokens, **delete this entire notice block** (from `> [!IMPORTANT]` + > through the closing `> ---` line) in both files. + > 4. Tell the developer: *"I've self-updated the AI context files with this repository's + > values — all set."* + > + > | Placeholder | Where to find the value | + > |---|---| + > | `{{REPO_NAME}}` | The GitHub repository name (visible in the URL, `README.md` heading, or `git remote -v`) | + > | `{{REPO_URL}}` | Full GitHub URL, e.g. `https://github.com/mokoconsulting-tech/` | + > | `{{EXTENSION_NAME}}` | The `` element in `manifest.xml` at the repository root | + > | `{{EXTENSION_TYPE}}` | The `type` attribute of the `` tag in `manifest.xml` (`component`, `module`, `plugin`, or `template`) | + > | `{{EXTENSION_ELEMENT}}` | The `` tag in `manifest.xml`, or the filename prefix (e.g. `com_myextension`, `mod_mymodule`) | + > + > --- + + # {{REPO_NAME}} — GitHub Copilot Custom Instructions + + ## What This Repo Is + + This is a **Moko Consulting MokoWaaS** (Joomla) repository governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). All coding standards, workflows, and policies are defined there and enforced here via bulk sync. + + Repository URL: {{REPO_URL}} + Extension name: **{{EXTENSION_NAME}}** + Extension type: **{{EXTENSION_TYPE}}** (`{{EXTENSION_ELEMENT}}`) + Platform: **Joomla 4.x / MokoWaaS** + + --- + + ## Primary Language + + **PHP** (≥ 7.4) is the primary language for this Joomla extension. JavaScript may be used for frontend enhancements. YAML uses 2-space indentation. All other text files use tabs per `.editorconfig`. + + --- + + ## File Header — Always Required on New Files + + Every new file needs a copyright header as its first content. + + **PHP:** + ```php + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: {{REPO_NAME}}.{{EXTENSION_TYPE}} + * INGROUP: {{REPO_NAME}} + * REPO: {{REPO_URL}} + * PATH: /path/to/file.php + * VERSION: XX.YY.ZZ + * BRIEF: One-line description of purpose + */ + + defined('_JEXEC') or die; + ``` + + **Markdown:** + ```markdown + + ``` + + **YAML / Shell / XML:** Use the appropriate comment syntax with the same fields. JSON files are exempt. + + --- + + ## Version Management + + **`README.md` is the single source of truth for the repository version.** + + - **Bump the patch version on every PR** — increment `XX.YY.ZZ` (e.g. `01.02.03` → `01.02.04`) in `README.md` before opening the PR; the `sync-version-on-merge` workflow propagates it automatically to all badges and `FILE INFORMATION` headers on merge to `main`. + - The `VERSION: XX.YY.ZZ` field in `README.md` governs all other version references. + - Version format is zero-padded semver: `XX.YY.ZZ` (e.g. `01.02.03`). + - Never hardcode a specific version in document body text — use the badge or FILE INFORMATION header only. + + ### Joomla Version Alignment + + The version in `README.md` **must always match** the `` tag in `manifest.xml` and the latest entry in `update.xml`. The `make release` command / release workflow updates all three automatically. + + ```xml + + 01.02.04 + + + + + {{EXTENSION_NAME}} + 01.02.04 + + + {{REPO_URL}}/releases/download/01.02.04/{{EXTENSION_ELEMENT}}-01.02.04.zip + + + + + + + ``` + + --- + + ## Joomla Extension Structure + + ``` + {{REPO_NAME}}/ + ├── manifest.xml # Joomla installer manifest (root — required) + ├── update.xml # Update server manifest (root — required, see below) + ├── site/ # Frontend (site) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ └── views/ + ├── admin/ # Backend (admin) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ ├── views/ + │ └── sql/ + ├── language/ # Language INI files + ├── media/ # CSS, JS, images (deployed to /media/{{EXTENSION_ELEMENT}}/) + ├── docs/ # Technical documentation + ├── tests/ # Test suite + ├── .github/ + │ ├── workflows/ + │ ├── copilot-instructions.md # This file + │ └── CLAUDE.md + ├── README.md # Version source of truth + ├── CHANGELOG.md + ├── CONTRIBUTING.md + ├── LICENSE # GPL-3.0-or-later + └── Makefile # Build automation + ``` + + --- + + ## update.xml — Required in Repo Root + + `update.xml` **must exist at the repository root**. It is the Joomla update server manifest that allows Joomla installations to check for new versions of this extension. + + The `manifest.xml` must reference it via: + ```xml + + + {{REPO_URL}}/raw/main/update.xml + + + ``` + + **Rules:** + - Every release must prepend a new `` block at the top of `update.xml` — old entries must be preserved below. + - The `` in `update.xml` must exactly match `` in `manifest.xml` and the version in `README.md`. + - The `` must be a publicly accessible direct download link (GitHub Releases asset URL). + - `` — the backslash is a **literal backslash character** in the XML attribute value; Joomla's update-server parser treats the value as a regular expression, so `\.` matches a literal dot and `[0-9]+` matches one or more digits. Do not double-escape it. + + --- + + ## manifest.xml Rules + + - Lives at the repo root as `manifest.xml` (not inside `site/` or `admin/`). + - `` tag must be kept in sync with `README.md` version and `update.xml`. + - Must include `` block pointing to this repo's `update.xml`. + - Must include `` and `` sections. + - Joomla 4.x requires `Moko\{{EXTENSION_NAME}}` for namespaced extensions. + + --- + + ## GitHub Actions — Token Usage + + Every workflow must use **`secrets.GH_TOKEN`** (the org-level Personal Access Token). + + ```yaml + # ✅ Correct + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + ``` + + ```yaml + # ❌ Wrong — never use these in workflows + token: ${{ github.token }} + token: ${{ secrets.GITHUB_TOKEN }} + ``` + + --- + + ## MokoStandards Reference + + This repository is governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). Authoritative policies: + + | Document | Purpose | + |----------|---------| + | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | + | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | + | [branching-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | + | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR title/body conventions | + | [changelog-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | + | [joomla-development-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/guide/waas/joomla-development-guide.md) | MokoWaaS Joomla extension development guide | + + --- + + ## Naming Conventions + + | Context | Convention | Example | + |---------|-----------|---------| + | PHP class | `PascalCase` | `MyController` | + | PHP method / function | `camelCase` | `getItems()` | + | PHP variable | `$snake_case` | `$item_id` | + | PHP constant | `UPPER_SNAKE_CASE` | `MAX_ITEMS` | + | PHP class file | `PascalCase.php` | `ItemModel.php` | + | YAML workflow | `kebab-case.yml` | `ci-joomla.yml` | + | Markdown doc | `kebab-case.md` | `installation-guide.md` | + + --- + + ## Commit Messages + + Format: `(): ` — imperative, lower-case subject, no trailing period. + + Valid types: `feat` · `fix` · `docs` · `chore` · `ci` · `refactor` · `style` · `test` · `perf` · `revert` · `build` + + --- + + ## Branch Naming + + Format: `/[/description]` + + Approved prefixes: `dev/` · `rc/` · `version/` · `patch/` · `copilot/` · `dependabot/` + + --- + + ## Keeping Documentation Current + + | Change type | Documentation to update | + |-------------|------------------------| + | New or renamed PHP class/method | PHPDoc block; `docs/api/` entry | + | New or changed manifest.xml | Update `update.xml` version; bump README.md version | + | New release | Prepend `` block to `update.xml`; update CHANGELOG.md; bump README.md version | + | New or changed workflow | `docs/workflows/.md` | + | Any modified file | Update the `VERSION` field in that file's `FILE INFORMATION` block | + | **Every PR** | **Bump the patch version** — increment `XX.YY.ZZ` in `README.md`; `sync-version-on-merge` propagates it | + + --- + + ## Key Constraints + + - Never commit directly to `main` — all changes go via PR, squash-merged + - Never skip the FILE INFORMATION block on a new file + - Never add `defined('_JEXEC') or die;` to CLI scripts or model tests — only to web-accessible PHP files + - Never hardcode version numbers in body text — update `README.md` and let automation propagate + - Never use `github.token` or `secrets.GITHUB_TOKEN` in workflows — always use `secrets.GH_TOKEN` + - Never let `manifest.xml` version, `update.xml` version, and `README.md` version go out of sync + MOKO_END + }, + { + name = "CLAUDE.md" + extension = "md" + description = "Claude AI assistant context enforcing MokoStandards — Joomla/WaaS edition" + requirement_status = "required" + always_overwrite = false + destination_path = ".github" + destination_filename = "CLAUDE.md" + template = "templates/github/CLAUDE.joomla.md.template" + stub_content = <<-MOKO_END + > [!IMPORTANT] + > **🔧 AI Self-Update Required on First Use** + > + > This file may contain unfilled `{{TOKEN}}` placeholders. The MokoStandards bulk-sync system + > replaces them automatically at sync time; if you can still see them, sync has not yet run for + > this repository — or this is a brand-new repo. + > + > **On your very first interaction in this repository, before answering any other question:** + > + > 1. Check whether any `{{TOKEN}}` placeholders remain in this file. + > 2. If they do, locate the values as described in the table below and replace every occurrence + > in **both** `.github/copilot-instructions.md` and `.github/CLAUDE.md`. + > 3. After replacing all tokens, **delete this entire notice block** (from `> [!IMPORTANT]` + > through the closing `> ---` line) in both files. + > 4. Tell the developer: *"I've self-updated the AI context files with this repository's + > values — all set."* + > + > | Placeholder | Where to find the value | + > |---|---| + > | `{{REPO_NAME}}` | The GitHub repository name (visible in the URL, `README.md` heading, or `git remote -v`) | + > | `{{REPO_URL}}` | Full GitHub URL, e.g. `https://github.com/mokoconsulting-tech/` | + > | `{{REPO_DESCRIPTION}}` | First paragraph of `README.md` body, or the GitHub repo description | + > | `{{EXTENSION_NAME}}` | The `` element in `manifest.xml` at the repository root | + > | `{{EXTENSION_TYPE}}` | The `type` attribute of the `` tag in `manifest.xml` (`component`, `module`, `plugin`, or `template`) | + > | `{{EXTENSION_ELEMENT}}` | The `` tag in `manifest.xml`, or the filename prefix (e.g. `com_myextension`, `mod_mymodule`) | + > + > --- + + # What This Repo Is + + **{{REPO_NAME}}** is a Moko Consulting **MokoWaaS** (Joomla) extension repository. + + {{REPO_DESCRIPTION}} + + Extension name: **{{EXTENSION_NAME}}** + Extension type: **{{EXTENSION_TYPE}}** (`{{EXTENSION_ELEMENT}}`) + Repository URL: {{REPO_URL}} + + This repository is governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards) — the single source of truth for coding standards, file-header policies, GitHub Actions workflows, and Terraform configuration templates across all Moko Consulting repositories. + + --- + + # Repo Structure + + ``` + {{REPO_NAME}}/ + ├── manifest.xml # Joomla installer manifest (root — required) + ├── update.xml # Update server manifest (root — required) + ├── site/ # Frontend (site) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ └── views/ + ├── admin/ # Backend (admin) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ ├── views/ + │ └── sql/ + ├── language/ # Language INI files + ├── media/ # CSS, JS, images + ├── docs/ # Technical documentation + ├── tests/ # Test suite + ├── .github/ + │ ├── workflows/ # CI/CD workflows (synced from MokoStandards) + │ ├── copilot-instructions.md + │ └── CLAUDE.md # This file + ├── README.md # Version source of truth + ├── CHANGELOG.md + ├── CONTRIBUTING.md + └── LICENSE # GPL-3.0-or-later + ``` + + --- + + # Primary Language + + **PHP** (≥ 7.4) is the primary language for this Joomla extension. YAML uses 2-space indentation. All other text files use tabs per `.editorconfig`. + + --- + + # Version Management + + **`README.md` is the single source of truth for the repository version.** + + - **Bump the patch version on every PR** — increment `XX.YY.ZZ` (e.g. `01.02.03` → `01.02.04`) in `README.md` before opening the PR; the `sync-version-on-merge` workflow propagates it to all `FILE INFORMATION` headers automatically on merge. + - Version format is zero-padded semver: `XX.YY.ZZ` (e.g. `01.02.03`). + - Never hardcode a version number in body text — use the badge or FILE INFORMATION header only. + + ### Joomla Version Alignment + + Three files must **always have the same version**: + + | File | Where the version lives | + |------|------------------------| + | `README.md` | `FILE INFORMATION` block + badge | + | `manifest.xml` | `` tag | + | `update.xml` | `` in the most recent `` block | + + The `make release` command / release workflow syncs all three automatically. + + --- + + # update.xml — Required in Repo Root + + `update.xml` is the Joomla update server manifest. It allows Joomla installations to check for new versions of this extension via: + + ```xml + + + + {{REPO_URL}}/raw/main/update.xml + + + ``` + + **Rules:** + - Every release prepends a new `` block at the top — older entries are preserved. + - `` in `update.xml` must exactly match `` in `manifest.xml` and `README.md`. + - `` must be a publicly accessible GitHub Releases asset URL. + - `` — backslash is literal (Joomla regex syntax). + + Example `update.xml` entry for a new release: + ```xml + + + {{EXTENSION_NAME}} + {{REPO_NAME}} + {{EXTENSION_ELEMENT}} + {{EXTENSION_TYPE}} + 01.02.04 + {{REPO_URL}}/releases/tag/01.02.04 + + + {{REPO_URL}}/releases/download/01.02.04/{{EXTENSION_ELEMENT}}-01.02.04.zip + + + + 7.4 + Moko Consulting + https://mokoconsulting.tech + + + ``` + + --- + + # File Header Requirements + + Every new file **must** have a copyright header as its first content. JSON files, binary files, generated files, and third-party files are exempt. + + **PHP:** + ```php + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: {{REPO_NAME}}.{{EXTENSION_TYPE}} + * INGROUP: {{REPO_NAME}} + * REPO: {{REPO_URL}} + * PATH: /site/controllers/item.php + * VERSION: XX.YY.ZZ + * BRIEF: One-line description of file purpose + */ + + defined('_JEXEC') or die; + ``` + + **Markdown / YAML / Shell / XML:** Use the appropriate comment syntax with the same fields. + + --- + + # Coding Standards + + ## Naming Conventions + + | Context | Convention | Example | + |---------|-----------|---------| + | PHP class | `PascalCase` | `ItemModel` | + | PHP method / function | `camelCase` | `getItems()` | + | PHP variable | `$snake_case` | `$item_id` | + | PHP constant | `UPPER_SNAKE_CASE` | `MAX_ITEMS` | + | PHP class file | `PascalCase.php` | `ItemModel.php` | + | YAML workflow | `kebab-case.yml` | `ci-joomla.yml` | + | Markdown doc | `kebab-case.md` | `installation-guide.md` | + + ## Commit Messages + + Format: `(): ` — imperative, lower-case subject, no trailing period. + + Valid types: `feat` · `fix` · `docs` · `chore` · `ci` · `refactor` · `style` · `test` · `perf` · `revert` · `build` + + ## Branch Naming + + Format: `/[/description]` + + Approved prefixes: `dev/` · `rc/` · `version/` · `patch/` · `copilot/` · `dependabot/` + + --- + + # GitHub Actions — Token Usage + + Every workflow must use **`secrets.GH_TOKEN`** (the org-level Personal Access Token). + + ```yaml + # ✅ Correct + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + ``` + + ```yaml + # ❌ Wrong — never use these + token: ${{ github.token }} + token: ${{ secrets.GITHUB_TOKEN }} + ``` + + --- + + # Keeping Documentation Current + + | Change type | Documentation to update | + |-------------|------------------------| + | New or renamed PHP class/method | PHPDoc block; `docs/api/` entry | + | New or changed `manifest.xml` | Sync version to `update.xml` and `README.md` | + | New release | Prepend `` to `update.xml`; update `CHANGELOG.md`; bump `README.md` | + | New or changed workflow | `docs/workflows/.md` | + | Any modified file | Update the `VERSION` field in that file's `FILE INFORMATION` block | + | **Every PR** | **Bump the patch version** — increment `XX.YY.ZZ` in `README.md`; `sync-version-on-merge` propagates it | + + --- + + # What NOT to Do + + - **Never commit directly to `main`** — all changes go through a PR. + - **Never hardcode version numbers** in body text — update `README.md` and let automation propagate. + - **Never let `manifest.xml`, `update.xml`, and `README.md` versions diverge.** + - **Never skip the FILE INFORMATION block** on a new source file. + - **Never use bare `catch (\Throwable $e) {}`** — always log or re-throw. + - **Never mix tabs and spaces** within a file — follow `.editorconfig`. + - **Never use `github.token` or `secrets.GITHUB_TOKEN` in workflows** — always use `secrets.GH_TOKEN`. + - **Never remove `defined('_JEXEC') or die;`** from web-accessible PHP files. + + --- + + # PR Checklist + + Before opening a PR, verify: + + - [ ] Patch version bumped in `README.md` (e.g. `01.02.03` → `01.02.04`) + - [ ] If this is a release: `manifest.xml` version updated; `update.xml` updated with new entry + - [ ] FILE INFORMATION headers updated in modified files + - [ ] CHANGELOG.md updated + - [ ] Tests pass + + --- + + # Key Policy Documents (MokoStandards) + + | Document | Purpose | + |----------|---------| + | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | + | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | + | [branching-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | + | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR conventions | + | [changelog-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | + | [joomla-development-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/guide/waas/joomla-development-guide.md) | MokoWaaS Joomla extension development guide | + MOKO_END + } + ] + subdirectories = [ + { + name = "workflows" + path = ".github/workflows" + description = "GitHub Actions workflows" + requirement_status = "required" + files = [ + { + name = "ci-joomla.yml" + extension = "yml" + description = "Joomla-specific CI workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/joomla/ci-joomla.yml.template" + }, + { + name = "codeql-analysis.yml" + extension = "yml" + description = "CodeQL security analysis workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/generic/codeql-analysis.yml.template" + }, + { + name = "standards-compliance.yml" + extension = "yml" + description = "MokoStandards compliance validation" + requirement_status = "required" + always_overwrite = true + template = ".github/workflows/standards-compliance.yml" + }, + { + name = "enterprise-firewall-setup.yml" + extension = "yml" + description = "Enterprise firewall configuration for trusted domain access" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/enterprise-firewall-setup.yml.template" + }, + { + name = "deploy-dev.yml" + extension = "yml" + description = "SFTP deployment of src/ to the development server" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-dev.yml.template" + }, + { + name = "deploy-demo.yml" + extension = "yml" + description = "SFTP deployment of src/ to the demo server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-demo.yml.template" + }, + { + name = "deploy-rs.yml" + extension = "yml" + description = "SFTP deployment of src/ to the release staging server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-rs.yml.template" + }, + { + name = "sync-version-on-merge.yml" + extension = "yml" + description = "Auto-bump patch version on merge and propagate to all file headers" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/sync-version-on-merge.yml.template" + }, + { + name = "auto-release.yml" + extension = "yml" + description = "Auto-create GitHub Release on push to main with version from README.md" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-release.yml.template" + }, + { + name = "repository-cleanup.yml" + extension = "yml" + description = "Scheduled cleanup: delete retired workflows, stale branches, old workflow runs" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/repository-cleanup.yml.template" + }, + { + name = "auto-dev-issue.yml" + extension = "yml" + description = "Auto-create tracking issue when a dev/** branch is pushed" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-dev-issue.yml.template" + }, + { + name = "repo_health.yml" + extension = "yml" + description = "Joomla-specific repository health check workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/joomla/repo_health.yml.template" + } + ] + }, + { + name = "ISSUE_TEMPLATE" + path = ".github/ISSUE_TEMPLATE" + description = "GitHub issue templates synced from MokoStandards" + requirement_status = "required" + files = [ + { + name = "config.yml" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/config.yml" + }, + { + name = "adr.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/adr.md" + }, + { + name = "bug_report.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/bug_report.md" + }, + { + name = "documentation.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/documentation.md" + }, + { + name = "enterprise_support.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/enterprise_support.md" + }, + { + name = "feature_request.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/feature_request.md" + }, + { + name = "firewall-request.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/firewall-request.md" + }, + { + name = "question.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/question.md" + }, + { + name = "request-license.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/request-license.md" + }, + { + name = "rfc.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/rfc.md" + }, + { + name = "security.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/security.md" + }, + { + name = "joomla_issue.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/joomla_issue.md" + } + ] + } + ] + } + ] + + repository_requirements = { + secrets = [ + { + name = "GH_TOKEN" + description = "Org-level GitHub PAT for automation" + required = true + scope = "org" + }, + { + name = "DEV_FTP_KEY" + description = "SSH private key for SFTP dev deployment (preferred); if DEV_FTP_PASSWORD is also set it is used as the key passphrase, with password-only as fallback" + required = false + scope = "org" + }, + { + name = "DEV_FTP_PASSWORD" + description = "SFTP password for dev deployment; used as SSH key passphrase when DEV_FTP_KEY is also set, and as standalone fallback if key auth fails" + required = false + scope = "org" + note = "At least one of DEV_FTP_KEY or DEV_FTP_PASSWORD must be configured" + } + ] + + variables = [ + { + name = "DEV_FTP_HOST" + description = "Dev server hostname; may include port suffix (e.g. dev.example.com or dev.example.com:2222)" + required = true + scope = "org" + }, + { + name = "DEV_FTP_PATH" + description = "Base remote path for SFTP deployment (e.g. /var/www/html)" + required = true + scope = "org" + }, + { + name = "DEV_FTP_USERNAME" + description = "SFTP username for dev server authentication" + required = true + scope = "org" + }, + { + name = "DEV_FTP_PORT" + description = "Explicit SFTP port override; if omitted the port is parsed from DEV_FTP_HOST or defaults to 22" + required = false + scope = "org" + }, + { + name = "DEV_FTP_SUFFIX" + description = "Per-repo path suffix appended to DEV_FTP_PATH (e.g. /my-extension)" + required = false + scope = "repo" + } + ] + } + } +} diff --git a/definitions/sync/MokoStandards-Template-Joomla-Template.def.tf b/definitions/sync/MokoStandards-Template-Joomla-Template.def.tf new file mode 100644 index 0000000..dc0876c --- /dev/null +++ b/definitions/sync/MokoStandards-Template-Joomla-Template.def.tf @@ -0,0 +1,1335 @@ +/** + * Repository Sync Tracking Definition: mokoconsulting-tech/MokoStandards-Template-Joomla-Template + * + * Auto-generated by MokoStandards bulk sync on 2026-04-02T15:28:58+00:00 + * Platform : waas-component + * Description: A repo template for a Joomla Template coding project according to MokoStandards + * + * DO NOT EDIT MANUALLY — this file is regenerated on every successful sync. + * To change what gets synced, edit api/definitions/default/waas-component.tf + * and re-run the bulk-repo-sync workflow. + */ + +locals { + sync_record = { + metadata = { + repo = "mokoconsulting-tech/MokoStandards-Template-Joomla-Template" + default_branch = "main" + detected_platform = "waas-component" + description = "A repo template for a Joomla Template coding project according to MokoStandards" + sync_timestamp = "2026-04-02T15:28:58+00:00" + source_repo = "mokoconsulting-tech/MokoStandards" + base_definition = "api/definitions/default/waas-component.tf" + } + + sync_stats = { + total_files = 41 + created_files = 6 + updated_files = 32 + skipped_files = 3 + } + + synced_files = [ + { path = "LICENSE" action = "updated" }, + { path = "SECURITY.md" action = "created" }, + { path = "CODE_OF_CONDUCT.md" action = "created" }, + { path = "CONTRIBUTING.md" action = "created" }, + { path = "update.xml" action = "updated" }, + { path = "phpstan.neon" action = "updated" }, + { path = "Makefile" action = "updated" }, + { path = ".gitignore" action = "updated" }, + { path = "composer.json" action = "updated" }, + { path = ".mokostandards" action = "created" }, + { path = "docs/update-server.md" action = "created" }, + { path = ".github/copilot.yml" action = "updated" }, + { path = ".github/copilot-instructions.md" action = "updated" }, + { path = ".github/CLAUDE.md" action = "updated" }, + { path = ".github/workflows/codeql-analysis.yml" action = "updated" }, + { path = ".github/workflows/standards-compliance.yml" action = "updated" }, + { path = ".github/workflows/enterprise-firewall-setup.yml" action = "updated" }, + { path = ".github/workflows/deploy-dev.yml" action = "updated" }, + { path = ".github/workflows/deploy-demo.yml" action = "updated" }, + { path = ".github/workflows/deploy-rs.yml" action = "updated" }, + { path = ".github/workflows/sync-version-on-merge.yml" action = "updated" }, + { path = ".github/workflows/auto-release.yml" action = "updated" }, + { path = ".github/workflows/repository-cleanup.yml" action = "updated" }, + { path = ".github/workflows/auto-dev-issue.yml" action = "updated" }, + { path = ".github/workflows/repo_health.yml" action = "created" }, + { path = ".github/ISSUE_TEMPLATE/config.yml" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/adr.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/bug_report.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/documentation.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/enterprise_support.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/feature_request.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/firewall-request.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/question.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/request-license.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/rfc.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/security.md" action = "updated" }, + { path = ".github/ISSUE_TEMPLATE/joomla_issue.md" action = "updated" }, + { path = ".github/CODEOWNERS" action = "updated" }, + { path = ".github/.mokostandards" action = "migrated from root" }, + ] + + skipped_files = [ + { path = "GOVERNANCE.md" reason = "Preserved (always_overwrite=false)" }, + { path = ".github/workflows/ci-joomla.yml" reason = "Source file not found" }, + { path = ".github/workflows/custom/README.md" reason = "README — never overwritten" }, + ] + } +} + +# ---- Base platform definition (reference copy) ---- +/** + * MokoWaaS Component Structure Definition + * Standard repository structure for MokoWaaS (Joomla) components + * + * Copyright (C) 2026 Moko Consulting + * SPDX-License-Identifier: GPL-3.0-or-later + * Version: 05.00.00 + * Schema Version: 1.0 + */ + +locals { + repository_structure = { + metadata = { + name = "MokoWaaS Component" + description = "Standard repository structure for MokoWaaS (Joomla) components" + repository_type = "waas-component" + platform = "mokowaas" + last_updated = "2026-01-15T00:00:00Z" + maintainer = "Moko Consulting" + version = "05.00.00" + schema_version = "1.0" + } + + root_files = [ + { + name = "README.md" + extension = "md" + description = "Developer-focused documentation for contributors and maintainers" + required = true + always_overwrite = false + protected = true + audience = "developer" + }, + { + name = "LICENSE" + extension = "" + description = "License file (GPL-3.0-or-later) - Default for Joomla/WaaS components" + required = true + audience = "general" + template = "templates/licenses/GPL-3.0" + license_type = "GPL-3.0-or-later" + }, + { + name = "CHANGELOG.md" + extension = "md" + description = "Version history and changes" + required = true + audience = "general" + }, + { + name = "SECURITY.md" + extension = "md" + description = "Security policy and vulnerability reporting" + required = true + always_overwrite = true + template = "templates/docs/required/template-SECURITY.md" + audience = "general" + }, + { + name = "CODE_OF_CONDUCT.md" + extension = "md" + description = "Community code of conduct" + required = true + always_overwrite = true + template = "templates/docs/extra/template-CODE_OF_CONDUCT.md" + always_overwrite = true + audience = "contributor" + }, + { + name = "ROADMAP.md" + extension = "md" + description = "Project roadmap with version goals and milestones" + required = false + audience = "general" + }, + { + name = "CONTRIBUTING.md" + extension = "md" + description = "Contribution guidelines" + required = true + always_overwrite = true + template = "templates/docs/required/template-CONTRIBUTING.md" + audience = "contributor" + }, + { + name = "update.xml" + extension = "xml" + description = "Joomla extension update server manifest — lists releases for Joomla auto-update; must be kept in sync with manifest.xml version" + required = true + always_overwrite = false + audience = "developer" + template = "templates/joomla/update.xml.template" + stub_content = <<-MOKO_END + + + + {{EXTENSION_NAME}} + {{REPO_NAME}} — Moko Consulting Joomla extension + {{EXTENSION_ELEMENT}} + {{EXTENSION_TYPE}} + {{VERSION}} + {{REPO_URL}}/releases/tag/{{VERSION}} + + {{DOWNLOAD_URL}} + + + 7.4 + Moko Consulting + {{MAINTAINER_URL}} + + + MOKO_END + }, + { + name = "phpstan.neon" + extension = "neon" + description = "PHPStan static analysis config with Joomla framework class stubs" + required = true + always_overwrite = true + audience = "developer" + template = "templates/configs/phpstan.joomla.neon" + }, + { + name = "Makefile" + description = "Build automation using MokoStandards templates" + required = true + always_overwrite = true + audience = "developer" + source_path = "templates/makefiles" + source_filename = "Makefile.joomla.template" + source_type = "template" + destination_path = "." + destination_filename = "Makefile" + create_path = false + template = "templates/makefiles/Makefile.joomla.template" + }, + { + name = ".gitignore" + extension = "gitignore" + description = "Git ignore patterns for Joomla development - preserved during sync operations" + required = true + always_overwrite = false + audience = "developer" + template = "templates/configs/.gitignore.joomla" + validation_rules = [ + { + type = "content-pattern" + description = "Must contain sftp-config pattern to ignore SFTP sync configuration files" + pattern = "sftp-config" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain user.css pattern to ignore custom user CSS overrides" + pattern = "user\\.css" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain user.js pattern to ignore custom user JavaScript overrides" + pattern = "user\\.js" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain modulebuilder.txt pattern to ignore Joomla Module Builder artifacts" + pattern = "modulebuilder\\.txt" + severity = "error" + }, + { + type = "content-pattern" + description = "Must contain colors_custom.css pattern to ignore custom color scheme overrides" + pattern = "colors_custom\\.css" + severity = "error" + } + ] + }, + { + name = ".gitattributes" + extension = "gitattributes" + description = "Git attributes configuration" + required = true + audience = "developer" + }, + { + name = ".editorconfig" + extension = "editorconfig" + description = "Editor configuration for consistent coding style - preserved during sync" + required = true + always_overwrite = false + audience = "developer" + }, + { + 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.joomla.json" + }, + { + name = ".mokostandards" + extension = "yml" + description = "MokoStandards governance attachment — links this repo back to the standards source" + required = true + always_overwrite = true + audience = "developer" + template = "templates/configs/mokostandards.yml.template" + }, + { + name = "GOVERNANCE.md" + extension = "md" + description = "Project governance rules, roles, and decision process — auto-maintained by MokoStandards" + required = true + always_overwrite = false + protected = true + audience = "all" + template = "templates/docs/required/GOVERNANCE.md" + } + ] + + directories = [ + { + name = "site" + path = "site" + description = "Component frontend (site) code" + required = true + purpose = "Contains frontend component code deployed to site" + files = [ + { + name = "controller.php" + extension = "php" + description = "Main site controller" + required = true + audience = "developer" + }, + { + name = "manifest.xml" + extension = "xml" + description = "Component manifest for site" + required = true + audience = "developer" + } + ] + subdirectories = [ + { + name = "controllers" + path = "site/controllers" + description = "Site controllers" + requirement_status = "suggested" + }, + { + name = "models" + path = "site/models" + description = "Site models" + requirement_status = "suggested" + }, + { + name = "views" + path = "site/views" + description = "Site views" + required = true + } + ] + }, + { + name = "admin" + path = "admin" + description = "Component backend (admin) code" + required = true + purpose = "Contains backend component code for administrator" + files = [ + { + name = "controller.php" + extension = "php" + description = "Main admin controller" + required = true + audience = "developer" + } + ] + subdirectories = [ + { + name = "controllers" + path = "admin/controllers" + description = "Admin controllers" + requirement_status = "suggested" + }, + { + name = "models" + path = "admin/models" + description = "Admin models" + requirement_status = "suggested" + }, + { + name = "views" + path = "admin/views" + description = "Admin views" + required = true + }, + { + name = "sql" + path = "admin/sql" + description = "Database schema files" + requirement_status = "suggested" + } + ] + }, + { + name = "media" + path = "media" + description = "Media files (CSS, JS, images)" + requirement_status = "suggested" + purpose = "Contains static assets" + subdirectories = [ + { + name = "css" + path = "media/css" + description = "Stylesheets" + requirement_status = "suggested" + }, + { + name = "js" + path = "media/js" + description = "JavaScript files" + requirement_status = "suggested" + }, + { + name = "images" + path = "media/images" + description = "Image files" + requirement_status = "suggested" + } + ] + }, + { + name = "language" + path = "language" + description = "Language translation files" + required = true + purpose = "Contains language INI files" + }, + { + name = "docs" + path = "docs" + description = "Developer and technical documentation" + required = true + purpose = "Contains technical documentation, API docs, architecture diagrams" + files = [ + { + name = "index.md" + extension = "md" + description = "Documentation index" + required = true + }, + { + name = "update-server.md" + extension = "md" + description = "Joomla update server (update.xml) documentation" + required = true + always_overwrite = true + template = "templates/docs/required/template-update-server-joomla.md" + } + ] + }, + { + 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 - preserved during sync" + requirement_status = "optional" + always_overwrite = false + audience = "developer" + } + ] + }, + { + name = "tests" + path = "tests" + description = "Test files" + required = true + purpose = "Contains unit tests, integration tests, and test fixtures" + subdirectories = [ + { + name = "unit" + path = "tests/unit" + description = "Unit tests" + required = true + }, + { + name = "integration" + path = "tests/integration" + description = "Integration tests" + requirement_status = "suggested" + } + ] + }, + { + name = ".github" + path = ".github" + description = "GitHub-specific configuration" + requirement_status = "suggested" + purpose = "Contains GitHub Actions workflows and configuration" + files = [ + { + name = "copilot.yml" + extension = "yml" + description = "GitHub Copilot allowed domains configuration" + requirement_status = "required" + always_overwrite = true + template = ".github/copilot.yml" + }, + { + name = "copilot-instructions.md" + extension = "md" + description = "GitHub Copilot custom instructions enforcing MokoStandards — Joomla/WaaS edition" + requirement_status = "required" + always_overwrite = false + destination_path = ".github" + destination_filename = "copilot-instructions.md" + template = "templates/github/copilot-instructions.joomla.md.template" + stub_content = <<-MOKO_END + > [!IMPORTANT] + > **🔧 AI Self-Update Required on First Use** + > + > This file may contain unfilled `{{TOKEN}}` placeholders. The MokoStandards bulk-sync system + > replaces them automatically at sync time; if you can still see them, sync has not yet run for + > this repository — or this is a brand-new repo. + > + > **On your very first interaction in this repository, before answering any other question:** + > + > 1. Check whether any `{{TOKEN}}` placeholders remain in this file. + > 2. If they do, locate the values as described in the table below and replace every occurrence + > in **both** `.github/copilot-instructions.md` and `.github/CLAUDE.md`. + > 3. After replacing all tokens, **delete this entire notice block** (from `> [!IMPORTANT]` + > through the closing `> ---` line) in both files. + > 4. Tell the developer: *"I've self-updated the AI context files with this repository's + > values — all set."* + > + > | Placeholder | Where to find the value | + > |---|---| + > | `{{REPO_NAME}}` | The GitHub repository name (visible in the URL, `README.md` heading, or `git remote -v`) | + > | `{{REPO_URL}}` | Full GitHub URL, e.g. `https://github.com/mokoconsulting-tech/` | + > | `{{EXTENSION_NAME}}` | The `` element in `manifest.xml` at the repository root | + > | `{{EXTENSION_TYPE}}` | The `type` attribute of the `` tag in `manifest.xml` (`component`, `module`, `plugin`, or `template`) | + > | `{{EXTENSION_ELEMENT}}` | The `` tag in `manifest.xml`, or the filename prefix (e.g. `com_myextension`, `mod_mymodule`) | + > + > --- + + # {{REPO_NAME}} — GitHub Copilot Custom Instructions + + ## What This Repo Is + + This is a **Moko Consulting MokoWaaS** (Joomla) repository governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). All coding standards, workflows, and policies are defined there and enforced here via bulk sync. + + Repository URL: {{REPO_URL}} + Extension name: **{{EXTENSION_NAME}}** + Extension type: **{{EXTENSION_TYPE}}** (`{{EXTENSION_ELEMENT}}`) + Platform: **Joomla 4.x / MokoWaaS** + + --- + + ## Primary Language + + **PHP** (≥ 7.4) is the primary language for this Joomla extension. JavaScript may be used for frontend enhancements. YAML uses 2-space indentation. All other text files use tabs per `.editorconfig`. + + --- + + ## File Header — Always Required on New Files + + Every new file needs a copyright header as its first content. + + **PHP:** + ```php + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: {{REPO_NAME}}.{{EXTENSION_TYPE}} + * INGROUP: {{REPO_NAME}} + * REPO: {{REPO_URL}} + * PATH: /path/to/file.php + * VERSION: XX.YY.ZZ + * BRIEF: One-line description of purpose + */ + + defined('_JEXEC') or die; + ``` + + **Markdown:** + ```markdown + + ``` + + **YAML / Shell / XML:** Use the appropriate comment syntax with the same fields. JSON files are exempt. + + --- + + ## Version Management + + **`README.md` is the single source of truth for the repository version.** + + - **Bump the patch version on every PR** — increment `XX.YY.ZZ` (e.g. `01.02.03` → `01.02.04`) in `README.md` before opening the PR; the `sync-version-on-merge` workflow propagates it automatically to all badges and `FILE INFORMATION` headers on merge to `main`. + - The `VERSION: XX.YY.ZZ` field in `README.md` governs all other version references. + - Version format is zero-padded semver: `XX.YY.ZZ` (e.g. `01.02.03`). + - Never hardcode a specific version in document body text — use the badge or FILE INFORMATION header only. + + ### Joomla Version Alignment + + The version in `README.md` **must always match** the `` tag in `manifest.xml` and the latest entry in `update.xml`. The `make release` command / release workflow updates all three automatically. + + ```xml + + 01.02.04 + + + + + {{EXTENSION_NAME}} + 01.02.04 + + + {{REPO_URL}}/releases/download/01.02.04/{{EXTENSION_ELEMENT}}-01.02.04.zip + + + + + + + ``` + + --- + + ## Joomla Extension Structure + + ``` + {{REPO_NAME}}/ + ├── manifest.xml # Joomla installer manifest (root — required) + ├── update.xml # Update server manifest (root — required, see below) + ├── site/ # Frontend (site) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ └── views/ + ├── admin/ # Backend (admin) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ ├── views/ + │ └── sql/ + ├── language/ # Language INI files + ├── media/ # CSS, JS, images (deployed to /media/{{EXTENSION_ELEMENT}}/) + ├── docs/ # Technical documentation + ├── tests/ # Test suite + ├── .github/ + │ ├── workflows/ + │ ├── copilot-instructions.md # This file + │ └── CLAUDE.md + ├── README.md # Version source of truth + ├── CHANGELOG.md + ├── CONTRIBUTING.md + ├── LICENSE # GPL-3.0-or-later + └── Makefile # Build automation + ``` + + --- + + ## update.xml — Required in Repo Root + + `update.xml` **must exist at the repository root**. It is the Joomla update server manifest that allows Joomla installations to check for new versions of this extension. + + The `manifest.xml` must reference it via: + ```xml + + + {{REPO_URL}}/raw/main/update.xml + + + ``` + + **Rules:** + - Every release must prepend a new `` block at the top of `update.xml` — old entries must be preserved below. + - The `` in `update.xml` must exactly match `` in `manifest.xml` and the version in `README.md`. + - The `` must be a publicly accessible direct download link (GitHub Releases asset URL). + - `` — the backslash is a **literal backslash character** in the XML attribute value; Joomla's update-server parser treats the value as a regular expression, so `\.` matches a literal dot and `[0-9]+` matches one or more digits. Do not double-escape it. + + --- + + ## manifest.xml Rules + + - Lives at the repo root as `manifest.xml` (not inside `site/` or `admin/`). + - `` tag must be kept in sync with `README.md` version and `update.xml`. + - Must include `` block pointing to this repo's `update.xml`. + - Must include `` and `` sections. + - Joomla 4.x requires `Moko\{{EXTENSION_NAME}}` for namespaced extensions. + + --- + + ## GitHub Actions — Token Usage + + Every workflow must use **`secrets.GH_TOKEN`** (the org-level Personal Access Token). + + ```yaml + # ✅ Correct + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + ``` + + ```yaml + # ❌ Wrong — never use these in workflows + token: ${{ github.token }} + token: ${{ secrets.GITHUB_TOKEN }} + ``` + + --- + + ## MokoStandards Reference + + This repository is governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). Authoritative policies: + + | Document | Purpose | + |----------|---------| + | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | + | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | + | [branching-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | + | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR title/body conventions | + | [changelog-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | + | [joomla-development-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/guide/waas/joomla-development-guide.md) | MokoWaaS Joomla extension development guide | + + --- + + ## Naming Conventions + + | Context | Convention | Example | + |---------|-----------|---------| + | PHP class | `PascalCase` | `MyController` | + | PHP method / function | `camelCase` | `getItems()` | + | PHP variable | `$snake_case` | `$item_id` | + | PHP constant | `UPPER_SNAKE_CASE` | `MAX_ITEMS` | + | PHP class file | `PascalCase.php` | `ItemModel.php` | + | YAML workflow | `kebab-case.yml` | `ci-joomla.yml` | + | Markdown doc | `kebab-case.md` | `installation-guide.md` | + + --- + + ## Commit Messages + + Format: `(): ` — imperative, lower-case subject, no trailing period. + + Valid types: `feat` · `fix` · `docs` · `chore` · `ci` · `refactor` · `style` · `test` · `perf` · `revert` · `build` + + --- + + ## Branch Naming + + Format: `/[/description]` + + Approved prefixes: `dev/` · `rc/` · `version/` · `patch/` · `copilot/` · `dependabot/` + + --- + + ## Keeping Documentation Current + + | Change type | Documentation to update | + |-------------|------------------------| + | New or renamed PHP class/method | PHPDoc block; `docs/api/` entry | + | New or changed manifest.xml | Update `update.xml` version; bump README.md version | + | New release | Prepend `` block to `update.xml`; update CHANGELOG.md; bump README.md version | + | New or changed workflow | `docs/workflows/.md` | + | Any modified file | Update the `VERSION` field in that file's `FILE INFORMATION` block | + | **Every PR** | **Bump the patch version** — increment `XX.YY.ZZ` in `README.md`; `sync-version-on-merge` propagates it | + + --- + + ## Key Constraints + + - Never commit directly to `main` — all changes go via PR, squash-merged + - Never skip the FILE INFORMATION block on a new file + - Never add `defined('_JEXEC') or die;` to CLI scripts or model tests — only to web-accessible PHP files + - Never hardcode version numbers in body text — update `README.md` and let automation propagate + - Never use `github.token` or `secrets.GITHUB_TOKEN` in workflows — always use `secrets.GH_TOKEN` + - Never let `manifest.xml` version, `update.xml` version, and `README.md` version go out of sync + MOKO_END + }, + { + name = "CLAUDE.md" + extension = "md" + description = "Claude AI assistant context enforcing MokoStandards — Joomla/WaaS edition" + requirement_status = "required" + always_overwrite = false + destination_path = ".github" + destination_filename = "CLAUDE.md" + template = "templates/github/CLAUDE.joomla.md.template" + stub_content = <<-MOKO_END + > [!IMPORTANT] + > **🔧 AI Self-Update Required on First Use** + > + > This file may contain unfilled `{{TOKEN}}` placeholders. The MokoStandards bulk-sync system + > replaces them automatically at sync time; if you can still see them, sync has not yet run for + > this repository — or this is a brand-new repo. + > + > **On your very first interaction in this repository, before answering any other question:** + > + > 1. Check whether any `{{TOKEN}}` placeholders remain in this file. + > 2. If they do, locate the values as described in the table below and replace every occurrence + > in **both** `.github/copilot-instructions.md` and `.github/CLAUDE.md`. + > 3. After replacing all tokens, **delete this entire notice block** (from `> [!IMPORTANT]` + > through the closing `> ---` line) in both files. + > 4. Tell the developer: *"I've self-updated the AI context files with this repository's + > values — all set."* + > + > | Placeholder | Where to find the value | + > |---|---| + > | `{{REPO_NAME}}` | The GitHub repository name (visible in the URL, `README.md` heading, or `git remote -v`) | + > | `{{REPO_URL}}` | Full GitHub URL, e.g. `https://github.com/mokoconsulting-tech/` | + > | `{{REPO_DESCRIPTION}}` | First paragraph of `README.md` body, or the GitHub repo description | + > | `{{EXTENSION_NAME}}` | The `` element in `manifest.xml` at the repository root | + > | `{{EXTENSION_TYPE}}` | The `type` attribute of the `` tag in `manifest.xml` (`component`, `module`, `plugin`, or `template`) | + > | `{{EXTENSION_ELEMENT}}` | The `` tag in `manifest.xml`, or the filename prefix (e.g. `com_myextension`, `mod_mymodule`) | + > + > --- + + # What This Repo Is + + **{{REPO_NAME}}** is a Moko Consulting **MokoWaaS** (Joomla) extension repository. + + {{REPO_DESCRIPTION}} + + Extension name: **{{EXTENSION_NAME}}** + Extension type: **{{EXTENSION_TYPE}}** (`{{EXTENSION_ELEMENT}}`) + Repository URL: {{REPO_URL}} + + This repository is governed by [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards) — the single source of truth for coding standards, file-header policies, GitHub Actions workflows, and Terraform configuration templates across all Moko Consulting repositories. + + --- + + # Repo Structure + + ``` + {{REPO_NAME}}/ + ├── manifest.xml # Joomla installer manifest (root — required) + ├── update.xml # Update server manifest (root — required) + ├── site/ # Frontend (site) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ └── views/ + ├── admin/ # Backend (admin) code + │ ├── controller.php + │ ├── controllers/ + │ ├── models/ + │ ├── views/ + │ └── sql/ + ├── language/ # Language INI files + ├── media/ # CSS, JS, images + ├── docs/ # Technical documentation + ├── tests/ # Test suite + ├── .github/ + │ ├── workflows/ # CI/CD workflows (synced from MokoStandards) + │ ├── copilot-instructions.md + │ └── CLAUDE.md # This file + ├── README.md # Version source of truth + ├── CHANGELOG.md + ├── CONTRIBUTING.md + └── LICENSE # GPL-3.0-or-later + ``` + + --- + + # Primary Language + + **PHP** (≥ 7.4) is the primary language for this Joomla extension. YAML uses 2-space indentation. All other text files use tabs per `.editorconfig`. + + --- + + # Version Management + + **`README.md` is the single source of truth for the repository version.** + + - **Bump the patch version on every PR** — increment `XX.YY.ZZ` (e.g. `01.02.03` → `01.02.04`) in `README.md` before opening the PR; the `sync-version-on-merge` workflow propagates it to all `FILE INFORMATION` headers automatically on merge. + - Version format is zero-padded semver: `XX.YY.ZZ` (e.g. `01.02.03`). + - Never hardcode a version number in body text — use the badge or FILE INFORMATION header only. + + ### Joomla Version Alignment + + Three files must **always have the same version**: + + | File | Where the version lives | + |------|------------------------| + | `README.md` | `FILE INFORMATION` block + badge | + | `manifest.xml` | `` tag | + | `update.xml` | `` in the most recent `` block | + + The `make release` command / release workflow syncs all three automatically. + + --- + + # update.xml — Required in Repo Root + + `update.xml` is the Joomla update server manifest. It allows Joomla installations to check for new versions of this extension via: + + ```xml + + + + {{REPO_URL}}/raw/main/update.xml + + + ``` + + **Rules:** + - Every release prepends a new `` block at the top — older entries are preserved. + - `` in `update.xml` must exactly match `` in `manifest.xml` and `README.md`. + - `` must be a publicly accessible GitHub Releases asset URL. + - `` — backslash is literal (Joomla regex syntax). + + Example `update.xml` entry for a new release: + ```xml + + + {{EXTENSION_NAME}} + {{REPO_NAME}} + {{EXTENSION_ELEMENT}} + {{EXTENSION_TYPE}} + 01.02.04 + {{REPO_URL}}/releases/tag/01.02.04 + + + {{REPO_URL}}/releases/download/01.02.04/{{EXTENSION_ELEMENT}}-01.02.04.zip + + + + 7.4 + Moko Consulting + https://mokoconsulting.tech + + + ``` + + --- + + # File Header Requirements + + Every new file **must** have a copyright header as its first content. JSON files, binary files, generated files, and third-party files are exempt. + + **PHP:** + ```php + + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: {{REPO_NAME}}.{{EXTENSION_TYPE}} + * INGROUP: {{REPO_NAME}} + * REPO: {{REPO_URL}} + * PATH: /site/controllers/item.php + * VERSION: XX.YY.ZZ + * BRIEF: One-line description of file purpose + */ + + defined('_JEXEC') or die; + ``` + + **Markdown / YAML / Shell / XML:** Use the appropriate comment syntax with the same fields. + + --- + + # Coding Standards + + ## Naming Conventions + + | Context | Convention | Example | + |---------|-----------|---------| + | PHP class | `PascalCase` | `ItemModel` | + | PHP method / function | `camelCase` | `getItems()` | + | PHP variable | `$snake_case` | `$item_id` | + | PHP constant | `UPPER_SNAKE_CASE` | `MAX_ITEMS` | + | PHP class file | `PascalCase.php` | `ItemModel.php` | + | YAML workflow | `kebab-case.yml` | `ci-joomla.yml` | + | Markdown doc | `kebab-case.md` | `installation-guide.md` | + + ## Commit Messages + + Format: `(): ` — imperative, lower-case subject, no trailing period. + + Valid types: `feat` · `fix` · `docs` · `chore` · `ci` · `refactor` · `style` · `test` · `perf` · `revert` · `build` + + ## Branch Naming + + Format: `/[/description]` + + Approved prefixes: `dev/` · `rc/` · `version/` · `patch/` · `copilot/` · `dependabot/` + + --- + + # GitHub Actions — Token Usage + + Every workflow must use **`secrets.GH_TOKEN`** (the org-level Personal Access Token). + + ```yaml + # ✅ Correct + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + ``` + + ```yaml + # ❌ Wrong — never use these + token: ${{ github.token }} + token: ${{ secrets.GITHUB_TOKEN }} + ``` + + --- + + # Keeping Documentation Current + + | Change type | Documentation to update | + |-------------|------------------------| + | New or renamed PHP class/method | PHPDoc block; `docs/api/` entry | + | New or changed `manifest.xml` | Sync version to `update.xml` and `README.md` | + | New release | Prepend `` to `update.xml`; update `CHANGELOG.md`; bump `README.md` | + | New or changed workflow | `docs/workflows/.md` | + | Any modified file | Update the `VERSION` field in that file's `FILE INFORMATION` block | + | **Every PR** | **Bump the patch version** — increment `XX.YY.ZZ` in `README.md`; `sync-version-on-merge` propagates it | + + --- + + # What NOT to Do + + - **Never commit directly to `main`** — all changes go through a PR. + - **Never hardcode version numbers** in body text — update `README.md` and let automation propagate. + - **Never let `manifest.xml`, `update.xml`, and `README.md` versions diverge.** + - **Never skip the FILE INFORMATION block** on a new source file. + - **Never use bare `catch (\Throwable $e) {}`** — always log or re-throw. + - **Never mix tabs and spaces** within a file — follow `.editorconfig`. + - **Never use `github.token` or `secrets.GITHUB_TOKEN` in workflows** — always use `secrets.GH_TOKEN`. + - **Never remove `defined('_JEXEC') or die;`** from web-accessible PHP files. + + --- + + # PR Checklist + + Before opening a PR, verify: + + - [ ] Patch version bumped in `README.md` (e.g. `01.02.03` → `01.02.04`) + - [ ] If this is a release: `manifest.xml` version updated; `update.xml` updated with new entry + - [ ] FILE INFORMATION headers updated in modified files + - [ ] CHANGELOG.md updated + - [ ] Tests pass + + --- + + # Key Policy Documents (MokoStandards) + + | Document | Purpose | + |----------|---------| + | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | + | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | + | [branching-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | + | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR conventions | + | [changelog-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | + | [joomla-development-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/guide/waas/joomla-development-guide.md) | MokoWaaS Joomla extension development guide | + MOKO_END + } + ] + subdirectories = [ + { + name = "workflows" + path = ".github/workflows" + description = "GitHub Actions workflows" + requirement_status = "required" + files = [ + { + name = "ci-joomla.yml" + extension = "yml" + description = "Joomla-specific CI workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/joomla/ci-joomla.yml.template" + }, + { + name = "codeql-analysis.yml" + extension = "yml" + description = "CodeQL security analysis workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/generic/codeql-analysis.yml.template" + }, + { + name = "standards-compliance.yml" + extension = "yml" + description = "MokoStandards compliance validation" + requirement_status = "required" + always_overwrite = true + template = ".github/workflows/standards-compliance.yml" + }, + { + name = "enterprise-firewall-setup.yml" + extension = "yml" + description = "Enterprise firewall configuration for trusted domain access" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/enterprise-firewall-setup.yml.template" + }, + { + name = "deploy-dev.yml" + extension = "yml" + description = "SFTP deployment of src/ to the development server" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-dev.yml.template" + }, + { + name = "deploy-demo.yml" + extension = "yml" + description = "SFTP deployment of src/ to the demo server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-demo.yml.template" + }, + { + name = "deploy-rs.yml" + extension = "yml" + description = "SFTP deployment of src/ to the release staging server on merge to main" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/deploy-rs.yml.template" + }, + { + name = "sync-version-on-merge.yml" + extension = "yml" + description = "Auto-bump patch version on merge and propagate to all file headers" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/sync-version-on-merge.yml.template" + }, + { + name = "auto-release.yml" + extension = "yml" + description = "Auto-create GitHub Release on push to main with version from README.md" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-release.yml.template" + }, + { + name = "repository-cleanup.yml" + extension = "yml" + description = "Scheduled cleanup: delete retired workflows, stale branches, old workflow runs" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/repository-cleanup.yml.template" + }, + { + name = "auto-dev-issue.yml" + extension = "yml" + description = "Auto-create tracking issue when a dev/** branch is pushed" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/shared/auto-dev-issue.yml.template" + }, + { + name = "repo_health.yml" + extension = "yml" + description = "Joomla-specific repository health check workflow" + requirement_status = "required" + always_overwrite = true + template = "templates/workflows/joomla/repo_health.yml.template" + } + ] + }, + { + name = "ISSUE_TEMPLATE" + path = ".github/ISSUE_TEMPLATE" + description = "GitHub issue templates synced from MokoStandards" + requirement_status = "required" + files = [ + { + name = "config.yml" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/config.yml" + }, + { + name = "adr.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/adr.md" + }, + { + name = "bug_report.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/bug_report.md" + }, + { + name = "documentation.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/documentation.md" + }, + { + name = "enterprise_support.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/enterprise_support.md" + }, + { + name = "feature_request.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/feature_request.md" + }, + { + name = "firewall-request.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/firewall-request.md" + }, + { + name = "question.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/question.md" + }, + { + name = "request-license.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/request-license.md" + }, + { + name = "rfc.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/rfc.md" + }, + { + name = "security.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/security.md" + }, + { + name = "joomla_issue.md" + always_overwrite = true + template = "templates/github/ISSUE_TEMPLATE/joomla_issue.md" + } + ] + } + ] + } + ] + + repository_requirements = { + secrets = [ + { + name = "GH_TOKEN" + description = "Org-level GitHub PAT for automation" + required = true + scope = "org" + }, + { + name = "DEV_FTP_KEY" + description = "SSH private key for SFTP dev deployment (preferred); if DEV_FTP_PASSWORD is also set it is used as the key passphrase, with password-only as fallback" + required = false + scope = "org" + }, + { + name = "DEV_FTP_PASSWORD" + description = "SFTP password for dev deployment; used as SSH key passphrase when DEV_FTP_KEY is also set, and as standalone fallback if key auth fails" + required = false + scope = "org" + note = "At least one of DEV_FTP_KEY or DEV_FTP_PASSWORD must be configured" + } + ] + + variables = [ + { + name = "DEV_FTP_HOST" + description = "Dev server hostname; may include port suffix (e.g. dev.example.com or dev.example.com:2222)" + required = true + scope = "org" + }, + { + name = "DEV_FTP_PATH" + description = "Base remote path for SFTP deployment (e.g. /var/www/html)" + required = true + scope = "org" + }, + { + name = "DEV_FTP_USERNAME" + description = "SFTP username for dev server authentication" + required = true + scope = "org" + }, + { + name = "DEV_FTP_PORT" + description = "Explicit SFTP port override; if omitted the port is parsed from DEV_FTP_HOST or defaults to 22" + required = false + scope = "org" + }, + { + name = "DEV_FTP_SUFFIX" + description = "Per-repo path suffix appended to DEV_FTP_PATH (e.g. /my-extension)" + required = false + scope = "repo" + } + ] + } + } +} diff --git a/definitions/sync/MokoTesting.def.tf b/definitions/sync/MokoTesting.def.tf index 6d7e9ab..1f727c8 100644 --- a/definitions/sync/MokoTesting.def.tf +++ b/definitions/sync/MokoTesting.def.tf @@ -99,7 +99,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -112,7 +112,7 @@ locals { platform = "multi-platform" last_updated = "2026-01-16T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoWaaS.def.tf b/definitions/sync/MokoWaaS.def.tf index f95873d..bef35e3 100644 --- a/definitions/sync/MokoWaaS.def.tf +++ b/definitions/sync/MokoWaaS.def.tf @@ -86,7 +86,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -99,7 +99,7 @@ locals { platform = "mokowaas" last_updated = "2026-01-15T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoWaaSAnnounce.def.tf b/definitions/sync/MokoWaaSAnnounce.def.tf index 464953f..507ce57 100644 --- a/definitions/sync/MokoWaaSAnnounce.def.tf +++ b/definitions/sync/MokoWaaSAnnounce.def.tf @@ -86,7 +86,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -99,7 +99,7 @@ locals { platform = "mokowaas" last_updated = "2026-01-15T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoWaaSBrand.def.tf b/definitions/sync/MokoWaaSBrand.def.tf index 03128c2..c5263d9 100644 --- a/definitions/sync/MokoWaaSBrand.def.tf +++ b/definitions/sync/MokoWaaSBrand.def.tf @@ -76,7 +76,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -89,7 +89,7 @@ locals { platform = "mokowaas" last_updated = "2026-01-15T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/MokoWinSetup.def.tf b/definitions/sync/MokoWinSetup.def.tf index aac801d..2da4aa4 100644 --- a/definitions/sync/MokoWinSetup.def.tf +++ b/definitions/sync/MokoWinSetup.def.tf @@ -99,7 +99,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -112,7 +112,7 @@ locals { platform = "multi-platform" last_updated = "2026-01-16T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/PLG_FINDER_MOKOVMSMARTSEARCH.def.tf b/definitions/sync/PLG_FINDER_MOKOVMSMARTSEARCH.def.tf index 4b4a6ba..e6d262e 100644 --- a/definitions/sync/PLG_FINDER_MOKOVMSMARTSEARCH.def.tf +++ b/definitions/sync/PLG_FINDER_MOKOVMSMARTSEARCH.def.tf @@ -99,7 +99,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -112,7 +112,7 @@ locals { platform = "multi-platform" last_updated = "2026-01-16T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/client-clarksvillefurs.def.tf b/definitions/sync/client-clarksvillefurs.def.tf index 6fc01ee..56f964f 100644 --- a/definitions/sync/client-clarksvillefurs.def.tf +++ b/definitions/sync/client-clarksvillefurs.def.tf @@ -112,7 +112,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -125,7 +125,7 @@ locals { platform = "multi-platform" last_updated = "2026-01-16T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/client-kiddieland.def.tf b/definitions/sync/client-kiddieland.def.tf index 4bfa5d9..8f63902 100644 --- a/definitions/sync/client-kiddieland.def.tf +++ b/definitions/sync/client-kiddieland.def.tf @@ -99,7 +99,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -112,7 +112,7 @@ locals { platform = "multi-platform" last_updated = "2026-01-16T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/definitions/sync/client-vexcreations.def.tf b/definitions/sync/client-vexcreations.def.tf index fac8cf5..b831647 100644 --- a/definitions/sync/client-vexcreations.def.tf +++ b/definitions/sync/client-vexcreations.def.tf @@ -86,7 +86,7 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.05.00 + * Version: 05.00.00 * Schema Version: 1.0 */ @@ -99,7 +99,7 @@ locals { platform = "mokowaas" last_updated = "2026-01-15T00:00:00Z" maintainer = "Moko Consulting" - version = "04.05.00" + version = "05.00.00" schema_version = "1.0" } diff --git a/monitoring/grafana/moko-waas-dashboard.json b/monitoring/grafana/moko-waas-dashboard.json index ea803b9..30edeb4 100644 --- a/monitoring/grafana/moko-waas-dashboard.json +++ b/monitoring/grafana/moko-waas-dashboard.json @@ -51,10 +51,10 @@ } }, "gridPos": { - "h": 4, - "w": 4, "x": 0, - "y": 1 + "y": 1, + "w": 12, + "h": 4 }, "id": 1, "options": { @@ -112,10 +112,10 @@ } }, "gridPos": { - "h": 4, - "w": 4, - "x": 4, - "y": 1 + "x": 12, + "y": 1, + "w": 12, + "h": 4 }, "id": 2, "options": { @@ -169,10 +169,10 @@ } }, "gridPos": { - "h": 4, - "w": 4, - "x": 8, - "y": 1 + "x": 0, + "y": 5, + "w": 12, + "h": 4 }, "id": 3, "options": { @@ -220,10 +220,10 @@ } }, "gridPos": { - "h": 4, - "w": 4, "x": 12, - "y": 1 + "y": 5, + "w": 12, + "h": 4 }, "id": 4, "options": { @@ -281,10 +281,10 @@ } }, "gridPos": { - "h": 4, - "w": 4, - "x": 16, - "y": 1 + "x": 0, + "y": 9, + "w": 12, + "h": 4 }, "id": 5, "options": { @@ -324,10 +324,10 @@ } }, "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 1 + "x": 12, + "y": 9, + "w": 12, + "h": 4 }, "id": 6, "options": { @@ -353,7 +353,7 @@ "h": 1, "w": 24, "x": 0, - "y": 5 + "y": 13 }, "id": 101, "title": "Joomla Core & Updates", @@ -377,10 +377,10 @@ } }, "gridPos": { - "h": 4, - "w": 6, "x": 0, - "y": 6 + "y": 14, + "w": 12, + "h": 4 }, "id": 10, "options": { @@ -439,10 +439,10 @@ } }, "gridPos": { - "h": 4, - "w": 6, - "x": 6, - "y": 6 + "x": 12, + "y": 14, + "w": 12, + "h": 4 }, "id": 11, "options": { @@ -481,10 +481,10 @@ } }, "gridPos": { - "h": 4, - "w": 4, - "x": 12, - "y": 6 + "x": 0, + "y": 18, + "w": 12, + "h": 4 }, "id": 12, "options": { @@ -523,10 +523,10 @@ } }, "gridPos": { - "h": 4, - "w": 4, - "x": 16, - "y": 6 + "x": 12, + "y": 18, + "w": 12, + "h": 4 }, "id": 13, "options": { @@ -573,10 +573,10 @@ } }, "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 6 + "x": 0, + "y": 22, + "w": 12, + "h": 4 }, "id": 14, "options": { @@ -602,7 +602,7 @@ "h": 1, "w": 24, "x": 0, - "y": 10 + "y": 26 }, "id": 102, "title": "Performance", @@ -622,7 +622,7 @@ "h": 8, "w": 16, "x": 0, - "y": 11 + "y": 27 }, "id": 20, "options": { @@ -687,7 +687,7 @@ "h": 8, "w": 8, "x": 16, - "y": 11 + "y": 27 }, "id": 22, "targets": [ @@ -709,7 +709,7 @@ "h": 1, "w": 24, "x": 0, - "y": 19 + "y": 35 }, "id": 104, "title": "Backup Status", @@ -753,10 +753,10 @@ } }, "gridPos": { - "h": 4, - "w": 8, "x": 0, - "y": 20 + "y": 36, + "w": 12, + "h": 4 }, "id": 40, "options": { @@ -804,10 +804,10 @@ } }, "gridPos": { - "h": 4, - "w": 8, - "x": 8, - "y": 20 + "x": 12, + "y": 36, + "w": 12, + "h": 4 }, "id": 41, "options": { @@ -850,10 +850,10 @@ } }, "gridPos": { - "h": 4, - "w": 8, - "x": 16, - "y": 20 + "x": 0, + "y": 40, + "w": 12, + "h": 4 }, "id": 42, "options": { @@ -879,7 +879,7 @@ "h": 1, "w": 24, "x": 0, - "y": 24 + "y": 44 }, "id": 103, "title": "Uptime History", @@ -921,7 +921,7 @@ "h": 8, "w": 24, "x": 0, - "y": 25 + "y": 45 }, "id": 30, "options": { @@ -983,4 +983,4 @@ "title": "MokoWaaS -- Joomla Sites", "uid": "moko-waas", "version": 1 -} \ No newline at end of file +} -- 2.52.0 From 34aace26388ea82480d391206d7747e1d1dce305 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Mon, 11 May 2026 16:40:53 -0500 Subject: [PATCH 2/6] =?UTF-8?q?refactor:=20remove=20docs/=20=E2=80=94=20wi?= =?UTF-8?q?ki-first,=20relocate=20non-doc=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove 52 markdown files from docs/ (all content lives in Gitea wiki) - Relocate legal_doc_generator.html → tools/ - Relocate mokostandards-schema.xsd → templates/schemas/ - Fix XSD path in MokoStandardsParser.php - Update index.md and README.md to reference wiki Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- README.md | 2 +- docs/ARCHITECTURE.md | 362 ---- docs/AUTO_CREATE_ORG_PROJECTS.md | 383 ---- docs/DRY_RUN_PATTERN.md | 98 - docs/LEGAL_DOC_GENERATOR_WEB_README.md | 138 -- docs/NEW_SCRIPTS.md | 392 ---- docs/QUICKSTART_ORG_PROJECTS.md | 178 -- docs/WORKFLOW_STANDARDS.md | 180 -- docs/api/analysis/index.md | 23 - docs/api/automation/index.md | 138 -- docs/api/definitions/default/index.md | 214 --- docs/api/definitions/sync/index.md | 224 --- docs/api/deploy/index.md | 162 -- docs/api/fix/index.md | 114 -- docs/api/index.md | 322 ---- docs/api/lib/index.md | 20 - docs/api/maintenance/index.md | 180 -- docs/api/plugin/index.md | 176 -- docs/api/tests/index.md | 62 - docs/api/tests/sample/index.md | 56 - docs/api/validate/index.md | 276 --- docs/api/wrappers/index.md | 20 - docs/automation/README.md | 136 -- docs/automation/branch-version-automation.md | 337 ---- docs/automation/push-files.md | 57 - docs/automation/repo-cleanup.md | 114 -- docs/client-repos.md | 117 -- docs/index.md | 32 - docs/standards/mokostandards-file-spec.md | 243 --- docs/workflows/README.md | 61 - docs/workflows/auto-release.md | 104 -- docs/workflows/branch-protection.md | 225 --- docs/workflows/build-release.md | 88 - docs/workflows/bulk-repo-sync.md | 775 -------- docs/workflows/cascade-dev.md | 222 --- docs/workflows/changelog-management.md | 338 ---- docs/workflows/demo-deployment.md | 75 - docs/workflows/dev-branch-tracking.md | 390 ---- docs/workflows/dev-deployment.md | 280 --- docs/workflows/index.md | 75 - docs/workflows/release-system.md | 212 --- docs/workflows/renovate.md | 82 - docs/workflows/reserve-dolibarr-module-id.md | 693 -------- docs/workflows/reusable-workflows.md | 567 ------ docs/workflows/rs-deployment.md | 43 - docs/workflows/secret-scanning.md | 72 - docs/workflows/shared-workflows.md | 239 --- docs/workflows/standards-compliance.md | 588 ------ docs/workflows/static-analysis.md | 72 - docs/workflows/sub-issue-management.md | 219 --- docs/workflows/update-server.md | 418 ----- docs/workflows/workflow-architecture.md | 560 ------ docs/workflows/workflow-inventory.md | 1577 ----------------- index.md | 10 +- lib/Enterprise/MokoStandardsParser.php | 2 +- .../schemas}/mokostandards-schema.xsd | 0 {docs => tools}/legal_doc_generator.html | 0 57 files changed, 5 insertions(+), 12738 deletions(-) delete mode 100644 docs/ARCHITECTURE.md delete mode 100644 docs/AUTO_CREATE_ORG_PROJECTS.md delete mode 100644 docs/DRY_RUN_PATTERN.md delete mode 100644 docs/LEGAL_DOC_GENERATOR_WEB_README.md delete mode 100644 docs/NEW_SCRIPTS.md delete mode 100644 docs/QUICKSTART_ORG_PROJECTS.md delete mode 100644 docs/WORKFLOW_STANDARDS.md delete mode 100644 docs/api/analysis/index.md delete mode 100644 docs/api/automation/index.md delete mode 100644 docs/api/definitions/default/index.md delete mode 100644 docs/api/definitions/sync/index.md delete mode 100644 docs/api/deploy/index.md delete mode 100644 docs/api/fix/index.md delete mode 100644 docs/api/index.md delete mode 100644 docs/api/lib/index.md delete mode 100644 docs/api/maintenance/index.md delete mode 100644 docs/api/plugin/index.md delete mode 100644 docs/api/tests/index.md delete mode 100644 docs/api/tests/sample/index.md delete mode 100644 docs/api/validate/index.md delete mode 100644 docs/api/wrappers/index.md delete mode 100644 docs/automation/README.md delete mode 100644 docs/automation/branch-version-automation.md delete mode 100644 docs/automation/push-files.md delete mode 100644 docs/automation/repo-cleanup.md delete mode 100644 docs/client-repos.md delete mode 100644 docs/index.md delete mode 100644 docs/standards/mokostandards-file-spec.md delete mode 100644 docs/workflows/README.md delete mode 100644 docs/workflows/auto-release.md delete mode 100644 docs/workflows/branch-protection.md delete mode 100644 docs/workflows/build-release.md delete mode 100644 docs/workflows/bulk-repo-sync.md delete mode 100644 docs/workflows/cascade-dev.md delete mode 100644 docs/workflows/changelog-management.md delete mode 100644 docs/workflows/demo-deployment.md delete mode 100644 docs/workflows/dev-branch-tracking.md delete mode 100644 docs/workflows/dev-deployment.md delete mode 100644 docs/workflows/index.md delete mode 100644 docs/workflows/release-system.md delete mode 100644 docs/workflows/renovate.md delete mode 100644 docs/workflows/reserve-dolibarr-module-id.md delete mode 100644 docs/workflows/reusable-workflows.md delete mode 100644 docs/workflows/rs-deployment.md delete mode 100644 docs/workflows/secret-scanning.md delete mode 100644 docs/workflows/shared-workflows.md delete mode 100644 docs/workflows/standards-compliance.md delete mode 100644 docs/workflows/static-analysis.md delete mode 100644 docs/workflows/sub-issue-management.md delete mode 100644 docs/workflows/update-server.md delete mode 100644 docs/workflows/workflow-architecture.md delete mode 100644 docs/workflows/workflow-inventory.md rename {docs/standards => templates/schemas}/mokostandards-schema.xsd (100%) rename {docs => tools}/legal_doc_generator.html (100%) diff --git a/README.md b/README.md index 51bf97d..179ca52 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ PHP implementation of MokoStandards — enterprise standards, automation framewo | `definitions/` | Repository structure definitions (`.tf` format) | | `deploy/` | Deployment scripts (SFTP, Joomla) | | `maintenance/` | Labels, inventory, SHA pinning, version sync | -| `docs/` | API documentation, workflow guides, automation docs | +| `tools/` | Standalone tools (legal doc generator) | | `tests/` | PHPUnit test suite | ## Installation diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md deleted file mode 100644 index 0bdcbb8..0000000 --- a/docs/ARCHITECTURE.md +++ /dev/null @@ -1,362 +0,0 @@ -# MokoStandards Scripts Architecture - -**Version**: 2.0 -**Last Updated**: 2026-01-19 -**Status**: Comprehensive rebuild in progress - -## Overview - -This document defines the top-down architecture for all MokoStandards scripts and workflows. - -## Design Principles - -1. **Separation of Concerns**: Each module has a single, well-defined responsibility -2. **Type Safety**: Full type hints on all public interfaces -3. **Error Handling**: Comprehensive error messages with actionable guidance -4. **Documentation**: Docstrings following Google style guide -5. **Testability**: All modules designed for unit testing with clear interfaces -6. **Logging**: Structured logging with consistent levels and formats -7. **Configuration**: Centralized configuration management -8. **Dependencies**: Minimal external dependencies, clear dependency tree - -## Module Hierarchy - -``` -scripts/ -├── lib/ # Core libraries (no external script dependencies) -│ ├── common.py # Foundation: constants, utilities, decorators -│ ├── validation_framework.py # Base classes for validators -│ ├── config_manager.py # Configuration handling -│ ├── github_client.py # GitHub API wrapper -│ ├── audit_logger.py # Structured logging -│ ├── extension_utils.py # Extension/package utilities -│ ├── joomla_manifest.py # Joomla-specific manifest handling -│ └── gui_utils.py # GUI utilities (optional) -│ -├── validate/ # Validation scripts (depend on lib/) -│ ├── auto_detect_platform.php # Platform detection (core) -│ ├── validate_structure_v2.py # Structure validation -│ ├── validate_repo_health.py # Repository health -│ ├── schema_aware_health_check.py # Schema-based validation -│ ├── check_repo_health.py # Health checker -│ ├── validate_codeql_config.py # CodeQL validation -│ ├── manifest.py # Manifest validation -│ ├── workflows.py # Workflow validation -│ ├── php_syntax.py # PHP syntax checking -│ ├── xml_wellformed.py # XML validation -│ ├── no_secrets.py # Secret detection -│ ├── tabs.py # Tab/whitespace checking -│ ├── paths.py # Path validation -│ └── generate_stubs.py # Stub generation -│ -├── automation/ # Automation scripts (depend on lib/, validate/) -│ ├── bulk_update_repos.php (v2) # Bulk repository sync -│ ├── auto_create_org_projects.py # Organization project automation -│ ├── sync_dolibarr_changelog.py # Dolibarr changelog sync -│ ├── sync_file_to_project.py # File sync to projects -│ ├── create_repo_project.py # Repository project creation -│ └── file-distributor.py # File distribution -│ -├── release/ # Release management (depend on lib/, validate/) -│ ├── detect_platform.py # Platform detection for releases -│ ├── package_extension.py # Extension packaging -│ └── dolibarr_release.py # Dolibarr release management -│ -├── maintenance/ # Maintenance scripts (depend on lib/) -│ ├── release_version.py # Version management -│ ├── update_changelog.py # Changelog updates -│ ├── validate_file_headers.py # Header validation -│ └── flush_actions_cache.py # GitHub Actions cache management -│ -├── analysis/ # Analysis tools (depend on lib/) -│ ├── analyze_pr_conflicts.py # PR conflict analysis -│ └── generate_canonical_config.py # Canonical configuration -│ -├── build/ # Build scripts (depend on lib/) -│ └── resolve_makefile.py # Makefile resolution -│ -├── docs/ # Documentation generation (depend on lib/) -│ └── rebuild_indexes.py # Index rebuilding -│ -├── run/ # Runtime scripts (depend on lib/, automation/) -│ └── setup_github_project_v2.py # GitHub Project v2 setup -│ -└── tests/ # Test scripts - ├── test_bulk_update_repos.php # Bulk update tests - └── test_dry_run.py # Dry run tests -``` - -## Core Library Modules (`lib/`) - -### common.py -**Purpose**: Foundation module with core utilities -**Exports**: -- Constants (VERSION dynamically read from README.md, REPO_URL, EXIT codes) -- File header generation -- Logging utilities -- Error handling decorators -- Path utilities -- Version extraction from README.md title line - -### validation_framework.py -**Purpose**: Base classes and interfaces for validation -**Exports**: -- `Validator` base class -- `ValidationResult` data class -- `ValidationRule` interface -- Common validation patterns - -### config_manager.py -**Purpose**: Centralized configuration management -**Exports**: -- `ConfigManager` class -- Configuration schema validation -- Environment variable handling -- Default configuration - -### github_client.py -**Purpose**: GitHub API wrapper with authentication -**Exports**: -- `GitHubClient` class -- API request handling with retries -- Rate limit management -- Common GitHub operations - -### audit_logger.py -**Purpose**: Structured logging framework -**Exports**: -- `AuditLogger` class -- Log level management -- Structured log formatting -- Log file handling - -## Validation Modules (`validate/`) - -All validation modules follow the pattern: -1. Import from `lib/` -2. Define validation rules -3. Implement `Validator` interface -4. Return `ValidationResult` objects -5. Provide CLI interface - -### auto_detect_platform.php -**Critical Module**: Platform detection for all automation -**Dependencies**: `lib/common`, `lib/validation_framework` -**Exports**: `detect_platform()`, `PlatformType` enum - -## Automation Modules (`automation/`) - -### bulk_update_repos.php (v2) -**Status**: ✅ Rebuilt (2026-01-19) -**Purpose**: Schema-driven bulk repository synchronization -**Dependencies**: `lib/`, `validate/auto_detect_platform` - -### auto_create_org_projects.py -**Purpose**: Automated organization project creation -**Dependencies**: `lib/github_client`, `lib/config_manager` - -## Workflows (`.github/workflows/`) - -### Reusable Workflows -All reusable workflows follow the pattern: -1. Clear input parameters with descriptions -2. Minimal dependencies -3. Comprehensive error handling -4. Status reporting - -### Workflow Categories -1. **CI/CD**: Build, test, deploy workflows -2. **Quality**: Code quality, linting, validation -3. **Automation**: Bulk updates, project management -4. **Security**: Secret scanning, CodeQL, confidentiality -5. **Maintenance**: Cache management, changelog updates - -## Coding Standards - -### Python -- **Style**: PEP 8 compliant -- **Type Hints**: Required for all public functions -- **Docstrings**: Google style, required for all public functions -- **Error Handling**: Use specific exception types -- **Logging**: Use `audit_logger` for all logging -- **Testing**: Unit tests for all public functions - -### YAML (Workflows) -- **Naming**: `kebab-case` for file names -- **Indentation**: 2 spaces -- **Comments**: Document all non-obvious steps -- **Secrets**: Use repository/organization secrets, never hardcode -- **Permissions**: Minimal required permissions only - -## File Header Standard - -All files must include: -```python -#!/usr/bin/env python3 -# Copyright (C) 2026 Moko Consulting -# -# This file is part of a Moko Consulting project. -# -# SPDX-License-Identifier: GPL-3.0-or-later -# -# [License text...] -# -# FILE INFORMATION -# DEFGROUP: [Group] -# INGROUP: [Parent Group] -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API -# PATH: [Relative path from repo root] -# VERSION: [X.Y.Z] # Version is dynamically read from README.md title line -# BRIEF: [One-line description] -``` - -**Note**: The VERSION constant in `common.py` and `MOKO_VERSION` in `common.sh` are now dynamically extracted from the README.md title line, which follows the format: -```markdown -# README - MokoStandards (VERSION: XX.YY.ZZ) -``` -This ensures a single source of truth for the repository version. - -## Error Handling Strategy - -### Exit Codes -- `0`: Success -- `1`: General error -- `2`: Invalid arguments -- `3`: File/resource not found -- `4`: Permission error -- `5`: Validation failed -- `6`: External dependency error - -### Error Messages -Format: `[LEVEL] Component: Message (Context)` -- **ERROR**: Unrecoverable errors -- **WARNING**: Non-fatal issues -- **INFO**: Informational messages -- **DEBUG**: Detailed diagnostic information - -## Testing Strategy - -### Unit Tests -- Located in `scripts/tests/` -- Use `pytest` framework -- Mock external dependencies -- 80%+ code coverage target - -### Integration Tests -- Test workflows end-to-end -- Use test repositories -- Validate against schemas - -### Validation Tests -- All validators must have test cases -- Test both valid and invalid inputs -- Test edge cases - -## Configuration Management - -### Configuration Hierarchy -1. Command-line arguments (highest priority) -2. Environment variables -3. Configuration files (`MokoStandards.override.xml`) -4. Default values (lowest priority) - -### Configuration Schema -Validated against `schemas/unified-repository-schema.json` - -## Logging Strategy - -### Log Levels -- **DEBUG**: Detailed diagnostic for development -- **INFO**: General informational messages -- **WARNING**: Warning messages, recoverable issues -- **ERROR**: Error messages, unrecoverable issues -- **CRITICAL**: Critical failures requiring immediate attention - -### Log Format -``` -[TIMESTAMP] [LEVEL] [COMPONENT] Message (context_key=value) -``` - -## Dependency Management - -### Python Dependencies -Minimal external dependencies: -- **Required**: None (stdlib only for core modules) -- **Optional**: - - `requests` for GitHub API (fallback to `subprocess` + `gh` CLI) - - `PyYAML` for YAML parsing (fallback to `json`) - - `pytest` for testing (dev only) - -### Dependency Installation -```bash -pip install -r requirements.txt # Production -pip install -r requirements-dev.txt # Development -``` - -## Migration Guide - -### From v1 to v2 -1. Update imports to use `lib/` modules -2. Replace ad-hoc validation with `validation_framework` -3. Use `ConfigManager` instead of manual config parsing -4. Replace print statements with `audit_logger` -5. Add type hints to all functions -6. Add docstrings to all public functions - -## Performance Considerations - -### Caching -- Platform detection results -- GitHub API responses (with expiry) -- Validation results for unchanged files - -### Parallelization -- Repository operations can run in parallel -- Use `concurrent.futures` for I/O-bound tasks -- Respect GitHub API rate limits - -## Security Considerations - -1. **No Hardcoded Secrets**: Use GitHub secrets -2. **Input Validation**: Validate all user inputs -3. **Path Traversal Prevention**: Validate all file paths -4. **Command Injection Prevention**: Use `subprocess` safely -5. **Least Privilege**: Minimal permissions in workflows - -## Maintenance - -### Version Numbering -- Major: Breaking changes (expected in v2 rebuild) -- Minor: New features -- Patch: Bug fixes - -### Changelog -All changes documented in `CHANGELOG.md` following Keep a Changelog format. - -### Review Process -1. All changes require pull request -2. Automated validation must pass -3. Manual review required -4. Tests must pass - -## Future Enhancements - -1. **Plugin System**: Allow custom validators -2. **Web Dashboard**: UI for health monitoring -3. **Metrics Collection**: Track validation trends -4. **AI Integration**: Automated issue detection -5. **Multi-language Support**: Beyond Python - -## References - -- [PEP 8 Style Guide](https://pep8.org/) -- [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html) -- [GitHub Actions Documentation](https://docs.github.com/en/actions) -- [Keep a Changelog](https://keepachangelog.com/) -- [Semantic Versioning](https://semver.org/) - ---- - -**Maintained by**: Moko Consulting -**Questions**: hello@mokoconsulting.tech -**Repository**: https://github.com/MokoConsulting/MokoStandards diff --git a/docs/AUTO_CREATE_ORG_PROJECTS.md b/docs/AUTO_CREATE_ORG_PROJECTS.md deleted file mode 100644 index f7af18c..0000000 --- a/docs/AUTO_CREATE_ORG_PROJECTS.md +++ /dev/null @@ -1,383 +0,0 @@ -# Auto-Create Organization Projects - -## Overview - -The `auto_create_org_projects.py` script automatically creates smart GitHub Projects for every repository in the mokoconsulting-tech organization. It intelligently detects project types (Joomla, Dolibarr, or Generic) and creates appropriate project structures with customized fields and views. - -## Features - -- **Automatic Project Type Detection**: Detects Joomla, Dolibarr, or generic projects -- **Smart Project Creation**: Creates projects with type-specific custom fields and views -- **Roadmap Generation**: Automatically generates roadmaps for repos that don't have one -- **Roadmap Push**: Pushes generated roadmaps directly to repository docs/ROADMAP.md -- **MokoStandards Integration**: Respects existing Project #7 for MokoStandards -- **Dry Run Mode**: Test without making actual changes -- **Verbose Logging**: Detailed output for debugging - -## Requirements - -### Authentication - -One of the following authentication methods: - -1. **GitHub Token** (Recommended for automation): - ```bash - export GH_PAT="your_personal_access_token" - ``` - -2. **GitHub CLI**: - ```bash - gh auth login - ``` - -### Token Permissions - -The token needs the following scopes: -- `repo` - Full repository access -- `project` - Project read/write access -- `read:org` - Organization read access - -### Python Dependencies - -```bash -pip3 install requests -``` - -## Usage - -### Basic Usage - -```bash -# Dry run first to see what would happen -python3 scripts/auto_create_org_projects.py --dry-run - -# Actually create projects and roadmaps -export GH_PAT="your_token" -python3 scripts/auto_create_org_projects.py -``` - -### With Verbose Logging - -```bash -python3 scripts/auto_create_org_projects.py --verbose -``` - -### For a Different Organization - -```bash -python3 scripts/auto_create_org_projects.py --org your-org-name -``` - -### Combined Options - -```bash -python3 scripts/auto_create_org_projects.py --dry-run --verbose --org MokoConsulting -``` - -## What It Does - -### 1. Repository Discovery - -- Fetches all repositories in the organization -- Filters out archived repositories -- Skips MokoStandards (Project #7 already exists) - -### 2. Project Type Detection - -Automatically detects project type based on repository contents: - -**Joomla Projects:** -- Presence of `.xml` manifest files -- Joomla-specific directory structure (`administrator/`, `components/`, etc.) -- Manifest content contains "joomla" keywords - -**Dolibarr Projects:** -- Module descriptor files (`mod*.class.php`) -- Dolibarr directory structure (`htdocs/`, `core/modules/`) -- Class files in standard Dolibarr structure - -**Generic Projects:** -- Any repository not matching Joomla or Dolibarr patterns -- Default fallback type - -### 3. Roadmap Management - -For each repository: - -1. **Check for Existing Roadmap**: Looks for `docs/ROADMAP.md` -2. **Generate if Missing**: Creates type-specific roadmap with: - - Version-based milestone structure - - Appropriate deliverables for project type - - Metadata and revision history -3. **Push to Repository**: Commits roadmap directly to default branch - -#### Roadmap Structure - -**Joomla Projects:** -- Joomla version compatibility tracking -- Extension-specific milestones -- Marketplace considerations - -**Dolibarr Projects:** -- Dolibarr version compatibility -- Module number and descriptor tracking -- Database migration planning - -**Generic Projects:** -- Standard version milestones -- Core functionality tracking -- General development phases - -### 4. Project Creation - -Creates GitHub Project v2 with: - -**Common Fields (All Types):** -- Status (Backlog, Todo, In Progress, etc.) -- Priority (Critical, High, Medium, Low) -- Size/Effort (XS, S, M, L, XL, XXL) -- Sprint -- Target Version -- Blocked Reason -- Acceptance Criteria - -**Joomla-Specific Fields:** -- Joomla Version -- Extension Type -- Marketplace Status -- Update Server URL -- PHP Minimum Version -- Installation Type - -**Dolibarr-Specific Fields:** -- Dolibarr Version -- Module Number -- Database Changes -- Module Descriptor Path -- Module Version -- Requires Sudo - -**Generic Fields:** -- Technology Stack -- Environment -- Release Channel -- API Version -- Deployment Status - -### 5. Project Views - -Creates standard views for each project: - -1. **Master Backlog** (Table) - All items by priority -2. **Sprint Board** (Board) - Kanban view by status -3. **Release Roadmap** (Roadmap) - Timeline by version -4. **Blocked Items** (Table) - Items needing attention - -Plus type-specific views: -- **Joomla**: Extension Compatibility Matrix, Marketplace Pipeline -- **Dolibarr**: Module Compatibility Matrix, Database Migration Tracker -- **Generic**: Deployment Pipeline, Technology Stack View - -## Example Output - -``` -============================================================================== -Auto-Create Smart Projects for Organization Repositories -============================================================================== - -🔍 Fetching repositories from mokoconsulting-tech... -✅ Found 15 total repositories (12 active) - -============================================================================== -Processing: MokoDoliTools -============================================================================== - 📦 Detected type: dolibarr - ⚠️ No roadmap found, creating one... - 📋 Creating/updating roadmap for MokoDoliTools... - ✅ Roadmap created/updated for MokoDoliTools - -📁 Creating project for MokoDoliTools (dolibarr)... - ✅ Project creation queued for MokoDoliTools - -============================================================================== -Processing: MokoJoomlaExtension -============================================================================== - 📦 Detected type: joomla - ✅ Roadmap already exists - -📁 Creating project for MokoJoomlaExtension (joomla)... - ✅ Project creation queued for MokoJoomlaExtension - -============================================================================== -SUMMARY REPORT -============================================================================== - -📊 Organization: mokoconsulting-tech -✅ Projects Created: 12 -📋 Roadmaps Created: 8 -⏭️ Repositories Skipped: 1 - -✅ Created Projects: - - MokoDoliTools - - MokoJoomlaExtension - ... - -📋 Created Roadmaps: - - MokoDoliTools - - MokoGenericProject - ... - -⏭️ Skipped Repositories: - - MokoStandards (existing) - -============================================================================== - -✅ Processing complete! -``` - -## Integration with Existing Infrastructure - -### Leverages Existing Templates - -The script uses the project configuration templates from: -- `templates/projects/joomla-project-config.json` -- `templates/projects/dolibarr-project-config.json` -- `templates/projects/generic-project-config.json` - -### Respects MokoStandards Project #7 - -The script explicitly skips MokoStandards repository since it already has Project #7 configured and operational. - -### Uses GitHub GraphQL API - -Leverages the same GraphQL API patterns as `setup_github_project_v2.py` for consistency. - -## Dry Run Mode - -Always test with `--dry-run` first: - -```bash -python3 scripts/auto_create_org_projects.py --dry-run --verbose -``` - -This will show you: -- Which repositories would be processed -- What project types would be detected -- Which roadmaps would be created -- What projects would be created - -No actual changes are made in dry run mode. - -## Error Handling - -The script handles errors gracefully: - -- **Authentication Failures**: Clear messages about token requirements -- **API Errors**: Captured and reported at the end -- **Missing Configs**: Falls back to generic template -- **Repository Access Issues**: Skips and continues - -All errors are collected and displayed in the summary report. - -## Troubleshooting - -### "requests library required" - -```bash -pip3 install requests -``` - -### "GitHub token required" - -```bash -export GH_PAT="your_token" -# OR -gh auth login -``` - -### "Permission denied" - -Ensure your token has: -- `repo` scope -- `project` scope -- `read:org` scope - -### "Failed to detect project type" - -The script will fall back to "generic" type. You can manually adjust the project after creation. - -### "Roadmap creation failed" - -Check that: -- Token has write access to repository -- Default branch name is correct -- `docs/` directory exists or can be created - -## Best Practices - -1. **Always Dry Run First**: Test with `--dry-run` before making changes -2. **Use Verbose Mode**: Easier to debug with `--verbose` -3. **Check Token Permissions**: Ensure token has all required scopes -4. **Review Generated Roadmaps**: Customize roadmaps after automatic generation -5. **Monitor API Rate Limits**: Script may hit rate limits with many repos - -## Next Steps After Running - -After the script completes: - -1. **Review Projects**: Check created projects in GitHub UI -2. **Customize Roadmaps**: Edit generated roadmaps for specific needs -3. **Configure Automations**: Set up GitHub Actions for project automation -4. **Add Initial Items**: Populate projects with issues and tasks -5. **Share with Team**: Notify team members about new project structure - -## Integration with CI/CD - -You can run this script in GitHub Actions: - -```yaml -name: Auto-Create Projects - -on: - schedule: - - cron: '0 0 * * 0' # Weekly - workflow_dispatch: - -jobs: - create-projects: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: Install dependencies - run: pip install requests - - name: Create projects - env: - GH_PAT: ${{ secrets.GH_PAT }} - run: python3 scripts/auto_create_org_projects.py --verbose -``` - -## See Also - -- [setup_github_project_v2.py](./run/setup_github_project_v2.py) - Single project setup -- [sync_file_to_project.py](./automation/sync_file_to_project.py) - Sync documentation files to Project #7 -- [templates/projects/README.md](../templates/projects/README.md) - Project templates documentation -- [bulk_update_repos.php](./bulk_update_repos.php) - Bulk repository updates - -## Support - -For issues or questions: -1. Check this documentation -2. Run with `--dry-run --verbose` for debugging -3. Review error messages in summary report -4. Open issue in MokoStandards repository -5. Contact development team - -## Version History - -| Version | Date | Changes | -| -------- | ---------- | ------------------------------------------------ | -| 01.00.00 | 2026-01-12 | Initial release with auto-detection and roadmap generation | diff --git a/docs/DRY_RUN_PATTERN.md b/docs/DRY_RUN_PATTERN.md deleted file mode 100644 index d2cb811..0000000 --- a/docs/DRY_RUN_PATTERN.md +++ /dev/null @@ -1,98 +0,0 @@ - -# Standard Dry-Run Pattern for MokoStandards Scripts - -## 1. Add --dry-run argument to argparse - -```python -parser.add_argument( - '--dry-run', - action='store_true', - help='Show what would be done without making changes' -) -``` - -## 2. Store in args and use throughout script - -```python -args = parser.parse_args() -dry_run = args.dry_run - -if dry_run: - print("[DRY-RUN] Mode enabled - no changes will be made") -``` - -## 3. Add dry-run checks before write operations - -```python -if dry_run: - print(f"[DRY-RUN] Would create file: {filepath}") -else: - with open(filepath, 'w') as f: - f.write(content) - print(f"Created file: {filepath}") -``` - -## 4. Pattern for file operations - -```python -def write_file(path, content, dry_run=False): - if dry_run: - print(f"[DRY-RUN] Would write to: {path}") - print(f"[DRY-RUN] Content length: {len(content)} bytes") - return - - with open(path, 'w') as f: - f.write(content) - print(f"Wrote to: {path}") -``` - -## 5. Pattern for API calls - -```python -def update_repository(repo, data, dry_run=False): - if dry_run: - print(f"[DRY-RUN] Would update repository: {repo}") - print(f"[DRY-RUN] Data: {data}") - return None - - response = api.update(repo, data) - print(f"Updated repository: {repo}") - return response -``` - -## 6. Pattern for shell commands - -```python -import subprocess - -def run_command(cmd, dry_run=False): - if dry_run: - print(f"[DRY-RUN] Would execute: {cmd}") - return 0 - - result = subprocess.run(cmd, shell=True) - return result.returncode -``` - -## 7. Summary reporting - -```python -def main(): - # ... script logic ... - - if dry_run: - print() - print("=" * 60) - print("[DRY-RUN] Summary:") - print(f" Files that would be modified: {modified_count}") - print(f" Files that would be created: {created_count}") - print(f" API calls that would be made: {api_call_count}") - print("=" * 60) - else: - print() - print("Summary:") - print(f" Files modified: {modified_count}") - print(f" Files created: {created_count}") - print(f" API calls made: {api_call_count}") -``` - diff --git a/docs/LEGAL_DOC_GENERATOR_WEB_README.md b/docs/LEGAL_DOC_GENERATOR_WEB_README.md deleted file mode 100644 index 3060b8e..0000000 --- a/docs/LEGAL_DOC_GENERATOR_WEB_README.md +++ /dev/null @@ -1,138 +0,0 @@ -# Legal Document Generator - Web Interface - -## Overview - -The Legal Document Generator Web Interface provides a browser-based UI for creating Terms of Service and Privacy Policy documents. Users can configure all options through an intuitive form and preview the generated HTML directly in their browser. - -## Features - -- **Interactive Web Interface**: Modern, responsive web UI -- **Real-time Preview**: See generated documents instantly in the browser -- **Download Capability**: Download generated HTML files directly -- **Three Website Types**: Support for membership, plain, and ecommerce websites -- **Customizable Options**: Company name, website URL, contact email -- **Professional Styling**: Generated documents include responsive CSS - -## Installation - -### Prerequisites - -- Python 3.7 or higher -- Flask web framework - -### Install Dependencies - -```bash -pip install flask -``` - -## Usage - -### Starting the Web Server - -Basic usage (runs on http://127.0.0.1:5000): -```bash -python scripts/legal_doc_generator_web.py -``` - -Custom port: -```bash -python scripts/legal_doc_generator_web.py --port 8080 -``` - -Make accessible from network: -```bash -python scripts/legal_doc_generator_web.py --host 0.0.0.0 --port 8080 -``` - -Debug mode: -```bash -python scripts/legal_doc_generator_web.py --debug -``` - -### Using the Interface - -1. **Start the server** using one of the commands above -2. **Open your browser** and navigate to the displayed URL (e.g., http://127.0.0.1:5000) -3. **Fill in the form**: - - Select your website type (Plain, Membership, or E-commerce) - - Enter your company name - - Enter your website URL - - Enter your contact email - - Choose which document(s) to generate -4. **Click "Generate Preview"** to see the document in the preview pane -5. **Click "Download HTML"** to save the generated document - -## Form Options - -### Website Type -- **Plain Website**: For informational websites with basic analytics and contact forms -- **Membership Website**: Includes terms for user accounts, membership fees, and user-generated content -- **E-commerce Website**: Includes terms for online sales, payments, shipping, and returns - -### Document Type -- **Terms of Service**: Generate only the Terms of Service document -- **Privacy Policy**: Generate only the Privacy Policy document -- **Both**: Generate a combined document with both policies - -## Features - -### Live Preview -The preview pane shows exactly how your document will look, with professional styling applied. - -### Instant Download -Click the download button to save the generated HTML file with an appropriate filename based on your company name. - -### Responsive Design -The web interface works on desktop, tablet, and mobile devices. - -## Security - -- All user input is sanitized using HTML escaping -- XSS vulnerabilities are prevented -- No data is stored on the server -- Documents are generated on-demand - -## Troubleshooting - -### Flask Not Found -If you see "Flask is required for the web interface": -```bash -pip install flask -``` - -### Port Already in Use -If port 5000 is already in use, specify a different port: -```bash -python scripts/legal_doc_generator_web.py --port 8080 -``` - -### Cannot Access from Other Devices -To make the server accessible from other devices on your network: -```bash -python scripts/legal_doc_generator_web.py --host 0.0.0.0 -``` - -## Command Line Alternative - -If you prefer command-line usage, the original CLI versions are still available: - -**Python:** -```bash -python scripts/legal_doc_generator.py --type membership --company-name "Acme Inc" -``` - -**PHP:** -```bash -php scripts/legal_doc_generator.php --type membership --company-name "Acme Inc" -``` - -## Disclaimer - -⚠️ **Important:** These generated documents are templates and should be reviewed by a qualified attorney before use. Customize them to fit your specific business needs and comply with applicable laws in your jurisdiction. - -## License - -Copyright (C) 2026 Moko Consulting - -This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. diff --git a/docs/NEW_SCRIPTS.md b/docs/NEW_SCRIPTS.md deleted file mode 100644 index cfeac0d..0000000 --- a/docs/NEW_SCRIPTS.md +++ /dev/null @@ -1,392 +0,0 @@ -# New Automation Scripts - v2.0.1 - -This document describes the new automation scripts added to MokoStandards. - -## Overview - -The following scripts have been added to enhance automation capabilities across analysis, validation, maintenance, documentation, and utility categories. - -## Analysis Scripts - -### `analyze_dependencies.py` -**Location:** `scripts/analysis/analyze_dependencies.py` - -Analyzes project dependencies across multiple package managers (Python, npm, composer). - -**Features:** -- Scans for requirements.txt, package.json, composer.json -- Lists all dependencies by type (production, dev) -- Optional check for outdated packages -- JSON output support - -**Usage:** -```bash -# Analyze current directory -python3 scripts/analysis/analyze_dependencies.py - -# Analyze specific path -python3 scripts/analysis/analyze_dependencies.py /path/to/project - -# JSON output -python3 scripts/analysis/analyze_dependencies.py --json - -# Check for outdated packages -python3 scripts/analysis/analyze_dependencies.py --check-outdated -``` - -### `code_metrics.py` -**Location:** `scripts/analysis/code_metrics.py` - -Analyzes code metrics including lines of code, file counts, and language distribution. - -**Features:** -- Counts total lines, code lines, and comment lines -- Breaks down by programming language -- Identifies largest files -- Comment ratio analysis -- JSON output support - -**Usage:** -```bash -# Analyze current directory -python3 scripts/analysis/code_metrics.py - -# Analyze specific path -python3 scripts/analysis/code_metrics.py /path/to/project - -# JSON output -python3 scripts/analysis/code_metrics.py --json -``` - -## Automation Scripts - -### `setup_dev_environment.py` -**Location:** `scripts/automation/setup_dev_environment.py` - -Quick setup script for new contributors to configure their development environment. - -**Features:** -- Checks for required tools (git, python3) -- Verifies Python version (3.8+) -- Sets up git commit message template -- Installs Python dependencies -- Configures pre-commit hooks -- Checks environment variables - -**Usage:** -```bash -# Full setup -python3 scripts/automation/setup_dev_environment.py - -# Skip dependency installation -python3 scripts/automation/setup_dev_environment.py --skip-install -``` - -### `check_outdated_actions.py` -**Location:** `scripts/automation/check_outdated_actions.py` - -Checks for outdated GitHub Actions in workflow files. - -**Features:** -- Scans all workflow files (.yml, .yaml) -- Identifies actions with multiple versions -- Detects SHA-based versions -- Compares against known latest versions -- Provides actionable recommendations - -**Usage:** -```bash -# Check default location (.github/workflows) -python3 scripts/automation/check_outdated_actions.py - -# Check custom workflow directory -python3 scripts/automation/check_outdated_actions.py --workflow-dir path/to/workflows -``` - -## Validation Scripts - -### `check_markdown_links.py` -**Location:** `scripts/validate/check_markdown_links.py` - -Validates links in markdown files to ensure they are not broken. - -**Features:** -- Extracts all links from markdown files -- Validates local file links -- Detects broken relative links -- Categorizes links (external, local, anchor) -- Reports broken links with file and line number - -**Usage:** -```bash -# Check current directory -python3 scripts/validate/check_markdown_links.py - -# Check specific path -python3 scripts/validate/check_markdown_links.py docs/ - -# Skip external link validation -python3 scripts/validate/check_markdown_links.py --skip-external -``` - -**Exit Code:** Returns 1 if broken links are found, 0 otherwise. - -### `find_todos.py` -**Location:** `scripts/validate/find_todos.py` - -Finds and reports TODO, FIXME, and other code comments across the codebase. - -**Features:** -- Searches for customizable markers (TODO, FIXME, HACK, XXX, BUG, NOTE) -- Supports multiple programming languages -- Groups results by marker type or file -- Excludes common directories (node_modules, vendor, etc.) - -**Usage:** -```bash -# Find all markers -python3 scripts/validate/find_todos.py - -# Find specific markers -python3 scripts/validate/find_todos.py --markers TODO FIXME - -# Group by file instead of marker -python3 scripts/validate/find_todos.py --group-by file - -# Search specific directory -python3 scripts/validate/find_todos.py src/ -``` - -### `check_license_headers.py` -**Location:** `scripts/validate/check_license_headers.py` - -Checks and optionally fixes missing or incorrect license headers in source files. - -**Features:** -- Validates GPL-3.0-or-later license headers -- Supports multiple file types (Python, JavaScript, PHP, Shell, etc.) -- Can automatically add missing headers -- Respects shebang lines in scripts -- Configurable copyright year - -**Usage:** -```bash -# Check for missing headers -python3 scripts/validate/check_license_headers.py - -# Add missing headers -python3 scripts/validate/check_license_headers.py --fix - -# Use specific year -python3 scripts/validate/check_license_headers.py --fix --year 2026 -``` - -**Exit Code:** Returns 1 if missing headers are found, 0 otherwise. - -## Maintenance Scripts - -### `update_copyright_year.py` -**Location:** `scripts/maintenance/update_copyright_year.py` - -Updates copyright year in file headers across the codebase. - -**Features:** -- Updates various copyright formats -- Processes multiple file types -- Dry-run mode by default -- Excludes common build/dependency directories -- Batch processing - -**Usage:** -```bash -# Dry run (preview changes) -python3 scripts/maintenance/update_copyright_year.py - -# Actually update files -python3 scripts/maintenance/update_copyright_year.py --apply - -# Use specific year -python3 scripts/maintenance/update_copyright_year.py --year 2026 --apply - -# Update specific directory -python3 scripts/maintenance/update_copyright_year.py src/ --apply -``` - -### `clean_old_branches.py` -**Location:** `scripts/maintenance/clean_old_branches.py` - -Identifies and optionally deletes old Git branches. - -**Features:** -- Finds branches older than specified days -- Checks if branches are merged -- Protects main/master/develop branches -- Shows last commit date and days since last commit -- Optional forced deletion - -**Usage:** -```bash -# Analyze branches older than 90 days -python3 scripts/maintenance/clean_old_branches.py - -# Use custom threshold -python3 scripts/maintenance/clean_old_branches.py --days 60 - -# Delete merged old branches -python3 scripts/maintenance/clean_old_branches.py --delete-merged - -# Delete all old branches (caution!) -python3 scripts/maintenance/clean_old_branches.py --delete-all --force - -# Use different base branch -python3 scripts/maintenance/clean_old_branches.py --base-branch develop -``` - -## Documentation Scripts - -### `generate_script_catalog.py` -**Location:** `scripts/docs/generate_script_catalog.py` - -Generates a comprehensive catalog of all scripts in the repository. - -**Features:** -- Scans all script directories -- Extracts metadata from file headers -- Organizes by category -- Generates markdown documentation -- Includes usage examples - -**Usage:** -```bash -# Generate catalog to stdout -python3 scripts/docs/generate_script_catalog.py - -# Save to file -python3 scripts/docs/generate_script_catalog.py --output SCRIPT_CATALOG.md - -# Use custom scripts directory -python3 scripts/docs/generate_script_catalog.py --scripts-dir custom/scripts -``` - -### `check_doc_coverage.py` -**Location:** `scripts/docs/check_doc_coverage.py` - -Checks documentation coverage by identifying undocumented scripts and templates. - -**Features:** -- Analyzes scripts and templates -- Calculates documentation coverage percentage -- Identifies missing README files -- Provides overall quality rating -- Lists undocumented items - -**Usage:** -```bash -# Check current directory -python3 scripts/docs/check_doc_coverage.py - -# Check specific path -python3 scripts/docs/check_doc_coverage.py /path/to/project -``` - -## Utility Scripts - -### `git_helper.sh` -**Location:** `scripts/run/git_helper.sh` - -Helper script for common git operations with enhanced output. - -**Features:** -- Enhanced status with statistics -- Interactive cleanup of untracked files -- Branch listing with dates -- Stash management with descriptions -- Commit history visualization -- Search commit messages -- Undo last commit (safely) -- Merge conflict detection - -**Usage:** -```bash -# Show enhanced status -bash scripts/run/git_helper.sh status - -# Clean untracked files -bash scripts/run/git_helper.sh clean - -# Sync with remote -bash scripts/run/git_helper.sh sync - -# List branches with dates -bash scripts/run/git_helper.sh branch - -# Stash with description -bash scripts/run/git_helper.sh stash "WIP: feature implementation" - -# Apply stash -bash scripts/run/git_helper.sh unstash - -# Show commit history -bash scripts/run/git_helper.sh history 20 - -# Search commits -bash scripts/run/git_helper.sh search "fix bug" - -# Undo last commit (keeps changes) -bash scripts/run/git_helper.sh undo-commit - -# Show diff statistics -bash scripts/run/git_helper.sh diff-stats - -# Check for merge conflicts -bash scripts/run/git_helper.sh conflicts -``` - -## Script Statistics - -**New Scripts Added:** 11 -- Analysis: 2 -- Automation: 2 -- Validation: 3 -- Maintenance: 2 -- Documentation: 2 -- Utility: 1 - -**Total Lines of Code:** ~9,800 lines - -## Common Features - -All new scripts include: -- Comprehensive docstrings and headers -- Command-line argument parsing -- Help messages (`--help`) -- Error handling and validation -- Progress indicators and colored output -- Exclusion of common directories (node_modules, vendor, etc.) -- Support for dry-run modes where applicable - -## Integration - -These scripts integrate seamlessly with the existing MokoStandards automation framework: -- Follow the same file header conventions -- Use consistent coding standards -- Compatible with existing workflows -- Can be called from CI/CD pipelines -- Support batch operations - -## Future Enhancements - -Potential future additions: -- Web-based dashboards for metrics -- GitHub Actions integration for automatic checks -- Email notifications for outdated dependencies -- Automated pull request creation for updates -- Integration with project management tools - -## Support - -For issues or questions about these scripts: -1. Check the script's `--help` output -2. Review this documentation -3. Open an issue in the repository -4. Contact hello@mokoconsulting.tech diff --git a/docs/QUICKSTART_ORG_PROJECTS.md b/docs/QUICKSTART_ORG_PROJECTS.md deleted file mode 100644 index 8c6f2b3..0000000 --- a/docs/QUICKSTART_ORG_PROJECTS.md +++ /dev/null @@ -1,178 +0,0 @@ -# Quick Start: Auto-Create Organization Projects - -This guide provides a quick start for automatically creating smart GitHub Projects for all repositories in the mokoconsulting-tech organization. - -## Prerequisites - -- GitHub Personal Access Token with permissions: - - `repo` (full repository access) - - `project` (read and write) - - `read:org` (organization read) -- Python 3.7+ with `requests` library installed - -## Option 1: GitHub Actions (Recommended) - -### Run via GitHub UI - -1. Go to **Actions** tab in the MokoStandards repository -2. Select **"Auto-Create Organization Projects"** workflow -3. Click **"Run workflow"** -4. Configure options: - - **Dry run**: Check to preview without making changes (recommended first time) - - **Verbose**: Check to enable detailed logging -5. Click **"Run workflow"** -6. Review the workflow logs and summary - -### Scheduled Runs - -The workflow automatically runs quarterly (every 3 months) in dry-run mode to detect new repositories and changes. - -## Option 2: Command Line - -### Dry Run First (Recommended) - -```bash -# Preview what would be created -python3 scripts/auto_create_org_projects.py --dry-run --verbose -``` - -### Create Projects and Roadmaps - -```bash -# Set your GitHub token -export GH_PAT="your_github_token" - -# Run the script -python3 scripts/auto_create_org_projects.py - -# Or with verbose logging -python3 scripts/auto_create_org_projects.py --verbose -``` - -## What Gets Created - -### For Each Repository - -1. **Project Type Detection** - - Joomla: Detects `.xml` manifests and Joomla directory structure - - Dolibarr: Detects `mod*.class.php` descriptors and Dolibarr structure - - Generic: Default for everything else - -2. **Roadmap Generation** (if missing) - - Creates `docs/ROADMAP.md` in the repository - - Type-specific content with version milestones - - Committed directly to default branch - -3. **GitHub Project Creation** - - Project with repository-specific name - - Custom fields based on project type - - Standard views (Master Backlog, Sprint Board, Release Roadmap, Blocked Items) - - Type-specific views - -### Custom Fields by Type - -**All Projects:** -- Status, Priority, Size/Effort, Sprint, Target Version -- Blocked Reason, Acceptance Criteria - -**Joomla Projects Add:** -- Joomla Version, Extension Type, Marketplace Status -- Update Server URL, Extension Version, PHP Minimum -- Installation Type, Has Frontend/Backend/API - -**Dolibarr Projects Add:** -- Dolibarr Version, Module Number, Database Changes -- Module Descriptor, Module Version, PHP Minimum -- Requires Sudo, Module Family, Has Triggers/Hooks/Widgets - -**Generic Projects Add:** -- Technology Stack, Environment, Release Channel -- API Version, Deployment Status, Infrastructure -- Database Type - -## Quick Workflow - -```bash -# 1. Test with dry run -python3 scripts/auto_create_org_projects.py --dry-run --verbose - -# 2. Review the output -# - Check detected project types -# - Verify roadmaps to be created -# - Confirm projects to be created - -# 3. Run for real -export GH_PAT="your_token" -python3 scripts/auto_create_org_projects.py --verbose - -# 4. Review created projects -# Visit: https://github.com/orgs/mokoconsulting-tech/projects -``` - -## Single Repository Mode - -To create a project for a specific repository: - -```bash -python3 scripts/create_repo_project.py REPO_NAME --type joomla -python3 scripts/create_repo_project.py REPO_NAME --type dolibarr -python3 scripts/create_repo_project.py REPO_NAME --type generic -``` - -## Troubleshooting - -### "GitHub token required" - -Set the `GH_PAT` environment variable: -```bash -export GH_PAT="ghp_your_token_here" -``` - -### "Permission denied" - -Verify your token has these scopes: -- `repo` - Full repository access -- `project` - Project read/write -- `read:org` - Organization read - -### "Failed to detect project type" - -The script defaults to "generic" type. Manually specify type when creating: -```bash -python3 scripts/create_repo_project.py REPO_NAME --type joomla -``` - -### "Rate limit exceeded" - -GitHub API has rate limits. Wait a few minutes and try again, or use a token with higher limits. - -## Best Practices - -1. **Always dry-run first** to preview changes -2. **Use verbose mode** for better visibility -3. **Review generated roadmaps** and customize as needed -4. **Check created projects** and adjust fields/views -5. **Configure automations** after project creation -6. **Add initial issues** to populate the project - -## Next Steps After Creation - -1. **Review Projects**: Visit each project and verify configuration -2. **Customize Roadmaps**: Edit generated roadmaps for specific needs -3. **Add Issues**: Populate projects with existing issues -4. **Configure Automations**: Set up workflow automations -5. **Share with Team**: Notify team members about new project boards - -## Documentation - -- [Full Documentation](./AUTO_CREATE_ORG_PROJECTS.md) -- [Project Templates](../templates/projects/README.md) -- [GitHub Projects v2 Standard](../templates/projects/README.md) - -## Support - -For issues: -1. Check logs with `--verbose` flag -2. Review error messages -3. Consult [AUTO_CREATE_ORG_PROJECTS.md](./AUTO_CREATE_ORG_PROJECTS.md) -4. Open issue in MokoStandards repository diff --git a/docs/WORKFLOW_STANDARDS.md b/docs/WORKFLOW_STANDARDS.md deleted file mode 100644 index 0c8532b..0000000 --- a/docs/WORKFLOW_STANDARDS.md +++ /dev/null @@ -1,180 +0,0 @@ -# Workflow Standards - -> Canonical reference for Gitea Actions CI/CD workflows across all Moko Consulting repositories. - -## Architecture - -``` -Template Repos (canonical source) → Production Repos (synced copies) -───────────────────────────────────── ────────────────────────────────── -MokoStandards-Template-Joomla → MokoOnyx, MokoCassiopeia, MokoJGDPC, etc. -MokoStandards-Template-Dolibarr → MokoCRM, MokoDoliForm, MokoDoliAuth, etc. -MokoStandards-Template-Generic → MokoISOUpdatePortable, etc. -MokoStandards-Template-Client → client-clarksvillefurs, client-kiddieland -``` - -**MokoOnyx** is the living reference implementation for Joomla workflows. Template repos are the **single source of truth** for workflow content. The MokoStandards-API repo does NOT store workflow templates — its sync engine (`RepositorySynchronizer.php`) clones template repos at runtime to get the latest workflows. - -### How Sync Works - -``` -bulk-repo-sync.yml (API repo) - → RepositorySynchronizer.php detects platform type - → Clones the matching template repo to /tmp/ - → Copies .gitea/workflows/*.yml from template → target repo -``` - -No workflow files are stored in the API repo. This prevents drift. - -## Template Repos - -| Repo | Purpose | Types | -|------|---------|-------| -| `MokoStandards-Template-Joomla` | All Joomla extension types in one repo | plugin, template, module, component, package, library | -| `MokoStandards-Template-Dolibarr` | Dolibarr module scaffold | — | -| `MokoStandards-Template-Generic` | Non-platform projects | — | -| `MokoStandards-Template-Client` | Client Joomla sites with media sync | — | - -## Standard Workflow Suite - -### Joomla Repositories (10 workflows) - -| Workflow | Trigger | Purpose | -|----------|---------|---------| -| `auto-release.yml` | PR merge to main (src/ changes) | Stable release: zip, Gitea release, version bump, updates.xml | -| `pre-release.yml` | Manual dispatch | Dev/alpha/beta/rc: patch bump, zip, pre-release | -| `ci-joomla.yml` | PRs to main | PHP lint, PHPStan, coding standards | -| `pr-check.yml` | PRs to main | Gate: manifest XML validation, build test | -| `deploy-manual.yml` | Manual dispatch | SFTP deploy to selected environment | -| `repo-health.yml` | Weekly schedule / manual | Structure compliance, required files | -| `update-server.yml` | Weekly schedule / manual | Validate updates.xml format + download URLs | -| `security-audit.yml` | Weekly + PR (lock file changes) | Dependency vulnerability scanning | -| `notify.yml` | Workflow completion | ntfy push on release success or failure | -| `cleanup.yml` | Weekly (Sunday 03:00 UTC) | Delete merged branches + old workflow runs | - -### Dolibarr Repositories (11 workflows) - -Same as Joomla except: -- `ci-dolibarr.yml` replaces `ci-joomla.yml` (Dolibarr-specific validation) -- `publish-to-mokodolimods.yml` added (copies src/ to mokodolimods on release) - -### Generic Repositories (9 workflows) - -Same as Joomla minus `ci-joomla.yml` (no platform-specific CI). - -### Client Repositories (10 workflows) - -Same as Joomla minus `update-server.yml` (no updates.xml — clients are sites, not extensions), plus: -- `sync-media.yml` — Bidirectional SFTP sync for `images/`, `files/`, `media/` between dev and production (every 6 hours + manual dispatch) - -**Per-client repo variables required for sync:** -| Variable | Purpose | -|----------|---------| -| `DEV_SYNC_HOST` | Dev server hostname | -| `DEV_SYNC_PORT` | Dev SSH port (default 22) | -| `DEV_SYNC_USERNAME` | Dev server user | -| `DEV_SYNC_PATH` | Base path on dev | -| `PROD_SYNC_HOST` | Production server hostname | -| `PROD_SYNC_PORT` | Production SSH port (default 22) | -| `PROD_SYNC_USERNAME` | Production server user | -| `PROD_SYNC_PATH` | Base path on production | - -**Per-client repo secrets:** `DEV_SYNC_KEY`, `PROD_SYNC_KEY` - -## Release Model - -``` -Feature branch → PR → merge to main → auto-release.yml (STABLE) - ↓ - pre-release.yml (manual dispatch for dev/alpha/beta/rc) -``` - -- **Stable releases** trigger automatically on PR merge to main (with `src/` changes) -- **Pre-releases** (dev, alpha, beta, rc) are manual via workflow_dispatch -- All releases overwrite the previous release for that channel (no history accumulation) -- Higher releases cascade-delete lower ones (stable deletes all pre-releases, rc deletes beta+alpha+dev, etc.) - -### Version Bump Policy - -| Trigger | Bump | Example | -|---------|------|---------| -| Stable (PR merge to main) | **Minor** — reset patch to 00 | `03.00.07` → `03.01.00` | -| Pre-release (manual) | **Patch** | `03.00.07` → `03.00.08` | -| Patch rollover (99→00) | Auto-bump minor | `03.00.99` → `03.01.00` | -| Minor rollover (99→00) | Auto-bump major | `03.99.00` → `04.00.00` | - -## Org-Level Configuration - -These secrets and variables are set at the MokoConsulting org level and available to all repos: - -### Secrets -| Name | Purpose | -|------|---------| -| `GA_TOKEN` | Gitea API token for releases, branch operations | -| `GH_TOKEN` | GitHub token for mirrors | -| `DEPLOY_SSH_KEY` | Universal SSH key for SFTP deploys | -| `DEV_SSH_KEY` | Dev server SSH key | -| `DEMO_FTP_KEY` | Demo server SFTP key | - -### Variables -| Name | Value | Purpose | -|------|-------|---------| -| `NTFY_URL` | `https://ntfy.mokoconsulting.tech` | Notification server | -| `NTFY_TOPIC` | `gitea-releases` | Default notification topic | -| `DEV_SSH_HOST` | `dev.mokoconsulting.tech` | Dev server hostname | -| `DEV_SSH_PORT` | `22` | Dev server SSH port | -| `DEV_SSH_USERNAME` | `mokoconsulting_dev` | Dev server username | -| `DEMO_FTP_HOST` | `demo.mokoconsulting.tech` | Demo server hostname | -| `DEMO_FTP_PORT` | `22` | Demo server port | -| `DEMO_FTP_USERNAME` | `mokoconsulting_demo` | Demo server username | - -## Syncing Workflows - -To update workflows across all repos from the canonical template: - -```bash -# Joomla repos — sync from unified template -for REPO in MokoOnyx MokoCassiopeia MokoJGDPC MokoJoomHero MokoJoomTOS MokoWaaS MokoWaaSAnnounce MokoDPCalendarAPI; do - cd /a/$REPO - rm -f .gitea/workflows/*.yml - cp /a/MokoStandards-Template-Joomla/.gitea/workflows/*.yml .gitea/workflows/ - git add .gitea/workflows/ && git commit -m "chore: sync workflows" && git push -done - -# Dolibarr repos — sync from Dolibarr template -for REPO in MokoCRM MokoDoliForm MokoDoliAuth MokoDolibarr ...; do - cd /a/$REPO - rm -f .gitea/workflows/*.yml - cp /a/MokoStandards-Template-Dolibarr/.gitea/workflows/*.yml .gitea/workflows/ - git add .gitea/workflows/ && git commit -m "chore: sync workflows" && git push -done - -# Client repos — sync from Client template -for REPO in client-clarksvillefurs client-kiddieland; do - cd /a/$REPO - rm -f .gitea/workflows/*.yml - cp /a/MokoStandards-Template-Client/.gitea/workflows/*.yml .gitea/workflows/ - git add .gitea/workflows/ && git commit -m "chore: sync workflows" && git push -done -``` - -## Changelog - -| Date | Change | -|------|--------| -| 2026-05-02 | Initial standardization: 10-workflow Joomla suite from MokoOnyx | -| 2026-05-02 | Added pre-release.yml for manual dev/alpha/beta/rc builds | -| 2026-05-02 | Removed auto-deploy (deploy is manual only) | -| 2026-05-02 | Modernized Dolibarr/Generic/Client templates to match | -| 2026-05-02 | Added workflows to all 22 Dolibarr production repos | -| 2026-05-02 | Moved canonical source from API repo to template repos | -| 2026-05-02 | Added sync-media.yml to Client template (bidirectional SFTP) | -| 2026-05-02 | Deployed workflows to client repos (clarksvillefurs, kiddieland) | -| 2026-05-02 | Consolidated 6 Joomla template repos → `MokoStandards-Template-Joomla` | -| 2026-05-02 | Deleted individual template repos (Plugin, Template, Module, Component, Package, Library) | -| 2026-05-02 | Cascade delete: higher releases auto-delete lower pre-release channels | -| 2026-05-02 | Release naming: includes extension element name (e.g. "mokodpcalendarapi 03.00.00 (stable)") | -| 2026-05-02 | Stable releases overwrite (not append) | -| 2026-05-04 | Removed updates.xml + update-server.yml from client repos (sites, not extensions) | -| 2026-05-04 | Added client.tf definition in MokoStandards-API | -| 2026-05-05 | Version policy: stable=minor bump, pre-release=patch bump (was major/patch) | diff --git a/docs/api/analysis/index.md b/docs/api/analysis/index.md deleted file mode 100644 index 4bc444c..0000000 --- a/docs/api/analysis/index.md +++ /dev/null @@ -1,23 +0,0 @@ -# Analysis Tools - -## Overview - -This directory contains documentation for analysis tools in `/api/analysis/`. - -Analysis tools provide code quality, dependency analysis, and other analytical capabilities. - -## Contents - -_To be documented_ - -## Related Documentation - -- [API Overview](../index.md) -- [Validation Tools](../validate/index.md) - ---- - -**Location**: `docs/api/analysis/` -**Mirrors**: `/api/analysis/` -**Last Updated**: 2026-03-03 -**Maintained By**: MokoStandards Team diff --git a/docs/api/automation/index.md b/docs/api/automation/index.md deleted file mode 100644 index 815c68f..0000000 --- a/docs/api/automation/index.md +++ /dev/null @@ -1,138 +0,0 @@ - - -# Automation Scripts - -Scripts in `api/automation/` orchestrate large-scale operations across multiple -repositories. They require a GitHub PAT (`GH_TOKEN`) with appropriate scopes. - ---- - -## bulk_sync.php - -Enterprise-grade bulk synchronization. Reads repository definitions from -`api/definitions/sync/`, applies template files to governed repositories, -and opens Pull Requests with the changes. - -**Base class:** `CLIApp` - -```bash -# Dry-run sync for the entire org -php api/automation/bulk_sync.php --org MokoConsulting --dry-run - -# Sync specific repositories -php api/automation/bulk_sync.php --org MokoConsulting --repos "repo-a,repo-b" - -# Exclude repos and skip archived -php api/automation/bulk_sync.php --org MokoConsulting --exclude "legacy-repo" --skip-archived - -# Auto-approve PRs (non-interactive) -php api/automation/bulk_sync.php --org MokoConsulting --yes -``` - -| Option | Description | -|--------|-------------| -| `--org ` | GitHub organization to sync | -| `--repos ` | Comma-separated list of specific repositories | -| `--exclude ` | Repositories to skip | -| `--skip-archived` | Skip archived repositories | -| `--yes` | Approve all PRs without prompting | -| `--dry-run` | Preview changes without creating PRs | -| `--verbose` / `-v` | Verbose output | -| `--help` / `-h` | Show help and exit | - -**Related:** See [Bulk Repo Sync](../../bulk-repo-sync-override-files.md) for -override file conventions. - ---- - -## push_files.php - -Targeted file push tool. Pushes one or more specific files from MokoStandards -templates to remote repositories without running a full sync. Supports both -definition-based lookup and arbitrary `source:destination` pairs. - -```bash -# Push a single file to one repo -php api/automation/push_files.php --files=.github/ISSUE_TEMPLATE/config.yml --repos=MokoCRM - -# Push multiple files to multiple repos -php api/automation/push_files.php --files=".github/workflows/ci.yml,.github/workflows/codeql-analysis.yml" --repos=MokoCRM,WaasComponent - -# Push directly to a branch (no PR) -php api/automation/push_files.php --files=templates/foo.txt:docs/foo.txt --repos=MyRepo --direct --branch=main -``` - -| Option | Description | -|--------|-------------| -| `--org ` | GitHub organization (default: MokoConsulting) | -| `--repos ` | Target repositories — comma-separated (required) | -| `--files ` | Files to push — destination paths or `source:dest` pairs (required) | -| `--message ` | Custom commit message | -| `--branch ` | Target branch for `--direct` pushes | -| `--direct` | Push directly instead of creating a PR | -| `--yes` | Auto-confirm without prompting | -| `--no-issue` | Skip creating a tracking issue | - ---- - -## repo_cleanup.php - -Enterprise repository cleanup. Comprehensive maintenance for governed repos: -delete stale sync branches, close superseded PRs, close resolved tracking -issues, delete retired workflows, clean workflow logs, verify labels, and -detect version drift. - -```bash -# Preview all cleanup operations -php api/automation/repo_cleanup.php --all --dry-run - -# Run all operations on specific repos -php api/automation/repo_cleanup.php --repos "MokoCRM MokoWaas" --all --yes - -# Delete retired workflow files only -php api/automation/repo_cleanup.php --delete-retired --yes - -# Close resolved issues and clean old logs -php api/automation/repo_cleanup.php --close-issues --clean-logs --log-days=14 --yes - -# Check version drift across all repos -php api/automation/repo_cleanup.php --check-drift --json -``` - -| Option | Description | -|--------|-------------| -| `--org ` | GitHub organization | -| `--repos ` | Specific repositories (space-separated) | -| `--skip-archived` | Skip archived repositories | -| `--close-issues` | Close resolved tracking issues | -| `--lock-old-issues` | Lock issues closed >30 days | -| `--clean-workflows` | Delete cancelled/stale workflow runs | -| `--clean-logs` | Delete workflow run logs older than `--log-days` | -| `--log-days ` | Days to keep logs (default: 30) | -| `--delete-retired` | Delete retired workflow files from repos | -| `--check-labels` | Verify mokostandards label exists | -| `--check-drift` | Check for version drift against README.md | -| `--all` | Run all cleanup operations | -| `--yes` | Auto-confirm prompts | -| `--dry-run` | Preview changes without making them | -| `--json` | Output results as JSON | - ---- - -**Location:** `docs/api/automation/` -**Mirrors:** `api/automation/` -**Last Updated:** 2026-04-04 diff --git a/docs/api/definitions/default/index.md b/docs/api/definitions/default/index.md deleted file mode 100644 index 7e730a5..0000000 --- a/docs/api/definitions/default/index.md +++ /dev/null @@ -1,214 +0,0 @@ -# Default Repository Definitions - -## Overview - -This directory contains base platform-specific definition files that serve as templates for repository validation and structure. These definitions are used as the foundation for generating repository-specific definitions during bulk sync operations. - -## Definition Files - -| File | Platform | Description | -|------|----------|-------------| -| **crm-module.tf** | Dolibarr | Structure for Dolibarr/CRM modules with core/modules structure, language files, SQL tables | -| **default-repository.json** | Generic | JSON format of default repository structure (legacy format) | -| **default-repository.tf** | Generic | Standard structure for generic repositories, libraries, and multi-language projects | -| **generic-repository.tf** | Generic | Alternative generic repository structure with minimal requirements | -| **standards-repository.tf** | Standards | Structure for MokoStandards organizational repository with api/, templates/, docs/, logs/ | -| **waas-component.tf** | Joomla | Structure for Joomla/WaaS components, modules, plugins with manifest validation | -| **mcp-server.tf** | MCP Server | Structure for MCP (Model Context Protocol) server projects — TypeScript/Node.js servers exposing REST APIs as AI tools | - -## File Format - -All definition files use Terraform HCL (HashiCorp Configuration Language) format with `.tf` extension: - -```hcl -locals { - repository_structure = { - metadata = { - name = "Repository Type Name" - description = "Detailed description" - repository_type = "type-identifier" - platform = "platform-name" - last_updated = "ISO8601-timestamp" - maintainer = "Maintainer Name" - version = "1.0" - schema_version = "1.0" - } - - root_files = [ - { - name = "filename.ext" - extension = "ext" - description = "File description" - required = true - audience = "general" - } - ] - - directories = [ - { - name = "dirname" - path = "path/to/dir" - description = "Directory description" - required = true - purpose = "Purpose description" - - files = [ /* nested files */ ] - subdirectories = [ /* nested directories */ ] - } - ] - - repository_requirements = { - secrets = [ /* required secrets */ ] - variables = [ /* required variables */ ] - branch_protections = { /* protection rules */ } - repository_settings = { /* settings */ } - } - } -} -``` - -## Usage - -### Platform Detection - -These definitions are automatically selected during platform detection: - -```bash -# Auto-detect platform and load appropriate definition -php api/validate/auto_detect_platform.php \ - --repo-path /path/to/repository \ - --schema-dir api/definitions/default -``` - -The detection script will: -1. Analyze repository structure and content -2. Score each platform based on indicators -3. Select the best-matching definition -4. Validate repository against the definition - -### Manual Selection - -You can manually specify which definition to use: - -```bash -# Use specific definition -php api/validate/auto_detect_platform.php \ - --repo-path /path/to/repository \ - --platform dolibarr -``` - -This will load `api/definitions/default/crm-module.tf`. - -### During Bulk Sync - -When bulk sync runs, it: -1. Detects the repository platform -2. Loads the corresponding base definition from this directory -3. Customizes it with repository-specific metadata -4. Saves to `api/definitions/sync/{repo}.def.tf` - -## Platform Mapping - -The auto-detection script maps platforms to definition files: - -| Platform | Definition File | -|----------|----------------| -| `joomla` | waas-component.tf | -| `dolibarr` | crm-module.tf | -| `nodejs` | nodejs-repository.tf (future) | -| `python` | python-repository.tf (future) | -| `terraform` | terraform-repository.tf (future) | -| `mcp-server` | mcp-server.tf | -| `standards` | standards-repository.tf | -| `generic` | default-repository.tf | - -## Creating New Definitions - -To create a new platform definition: - -1. **Copy an existing definition as template:** - ```bash - cp api/definitions/default/default-repository.tf \ - api/definitions/default/myplatform-repository.tf - ``` - -2. **Update metadata:** - - Change `name`, `description`, `repository_type`, `platform` - - Update `last_updated` timestamp - - Set appropriate `version` and `schema_version` - -3. **Define structure:** - - Update `root_files` array with platform-specific files - - Define `directories` with nested structure - - Add platform-specific validation rules - - Specify repository requirements (secrets, variables, etc.) - -4. **Update platform detection:** - Add mapping in `api/validate/auto_detect_platform.php`: - ```php - 'myplatform' => 'myplatform-repository.tf', - ``` - -5. **Add detection logic:** - Update detection scoring to recognize your platform based on: - - File patterns (e.g., `composer.json`, `package.json`) - - Directory structure - - Repository topics - - Naming conventions - -6. **Validate syntax:** - ```bash - # Using Terraform (if installed) - terraform fmt -check api/definitions/default/myplatform-repository.tf - ``` - -7. **Test definition:** - ```bash - php api/validate/auto_detect_platform.php \ - --repo-path /test/repository \ - --platform myplatform - ``` - -## Validation Levels - -Definitions support multiple requirement levels: - -| Level | Meaning | Impact | -|-------|---------|--------| -| **required** | MUST be present | Blocks deployment if missing | -| **suggested** | SHOULD be present | Warning if missing, reduces health score | -| **optional** | MAY be present | No validation, informational only | -| **not-allowed** | MUST NOT be present | Error if present (e.g., node_modules) | - -## Maintenance - -### Updating Definitions - -1. Edit the definition file -2. Update `last_updated` timestamp -3. Increment `version` if breaking changes -4. Test with validation script -5. Update CHANGELOG.md -6. Commit changes - -### Version Control - -- Definition files are versioned through git -- Breaking changes require major version bump -- Schema version tracked in definition metadata -- Maintain backward compatibility when possible - -## Related Documentation - -- [Synced Definitions](../sync/index.md) - Auto-generated repository definitions -- [Schema Guide](../../../docs/schemas/repohealth/schema-guide.md) - Complete schema specification -- [Validation Guide](../../../docs/guide/validation/auto-detection.md) - Platform detection and validation -- [Main Definitions README](../README.md) - Overview of definitions structure - ---- - -**Location**: `api/definitions/default/` -**Purpose**: Base platform-specific repository definitions -**Used By**: Auto-detection, validation, bulk sync -**Last Updated**: 2026-03-03 -**Maintained By**: MokoStandards Team diff --git a/docs/api/definitions/sync/index.md b/docs/api/definitions/sync/index.md deleted file mode 100644 index d41e351..0000000 --- a/docs/api/definitions/sync/index.md +++ /dev/null @@ -1,224 +0,0 @@ -# Synced Repository Definitions - -## Overview - -This directory contains auto-generated repository structure definitions created during bulk synchronization operations. Each synced repository gets its own definition file that captures its detected platform, structure, and configuration. - -## Purpose - -When the bulk sync process runs, it: - -1. **Detects the repository platform** (Joomla, Dolibarr, Node.js, etc.) -2. **Generates a repository-specific definition** based on the detected platform -3. **Saves the definition** in this directory as `{repo}.def.tf` -4. **Uses the definition** for validation and health checks - -This replaces the previous approach of creating `.github/override.tf` files in remote repositories. - -## File Naming Convention - -Files are named using the pattern: `{repository}.def.tf` - -The `.def.tf` extension follows Terraform conventions where: -- `.tf` indicates Terraform HCL format -- `.def` indicates this is a definition/configuration file -- Follows Terraform protocol standards for module and configuration naming - -**Examples:** -- `MokoDoliCGAdClaude.def.tf` - Dolibarr CRM module -- `joomla-component-example.def.tf` - Joomla component -- `nodejs-api.def.tf` - Node.js API project - -## File Format - -Each definition file uses Terraform HCL format (`.tf` extension) with the same structure as files in `api/definitions/default/`: - -```hcl -/** - * Repository Definition: {org}/{repo} - * Auto-generated during bulk sync on {date} - * Platform: {platform} - * Repository Type: {type} - */ - -locals { - repository_structure = { - metadata = { - name = "{Repository Name}" - description = "Repository structure for {org}/{repo}" - repository_type = "{type}" - platform = "{platform}" - last_updated = "{ISO8601 timestamp}" - maintainer = "{org}" - version = "1.0" - schema_version = "1.0" - - # Sync metadata - sync_generated = true - sync_date = "{ISO8601 timestamp}" - source_repo = "{org}/{repo}" - detected_platform = "{platform}" - } - - # Root files, directories, etc. inherited from platform definition - # with repository-specific customizations - ... - } -} -``` - -## Generation Process - -During bulk sync: - -1. **Platform Detection**: Auto-detect repository platform using `auto_detect_platform.php` -2. **Load Base Definition**: Load the appropriate base definition from `api/definitions/default/` -3. **Customize Metadata**: Add repository-specific metadata (org, repo name, sync date) -4. **Save Definition**: Write to `api/definitions/sync/{org}-{repo}.tf` -5. **Skip Remote Override**: Do NOT create `.github/override.tf` in the remote repository - -## Benefits - -### Centralized Management -- All repository definitions stored in MokoStandards repository -- Easy to track changes and history through git -- No scattered override files across multiple repositories - -### Audit Trail -- Complete history of when repositories were synced -- Platform detection results preserved -- Changes to repository structure tracked in version control - -### Validation & Health Checks -- Health check scripts can reference these definitions -- Validation scripts can compare actual vs. expected structure -- Automated compliance monitoring across all repositories - -### Clean Remote Repositories -- No `.github/override.tf` files cluttering remote repos -- Remote repositories only receive templates and workflows -- Cleaner git history in remote repositories - -## Usage - -### Validation Scripts - -Validation scripts automatically check both locations: - -```bash -# Auto-detect platform and validate using synced definition if available -php api/validate/auto_detect_platform.php \ - --repo-path /path/to/repository \ - --repo repository-name -``` - -The script will: -1. Check for synced definition in `api/definitions/sync/{repo}.def.tf` -2. Fall back to platform-based definition in `api/definitions/default/` if not found -3. Validate repository structure against the definition - -### Health Checks - -```bash -# Run health check using synced definition -php api/validate/check_repo_health.php \ - --repo-path /path/to/repository \ - --repo repository-name -``` - -### Manual Review - -To review a synced repository's definition: - -```bash -# View the definition -cat api/definitions/sync/MyRepo.def.tf - -# Compare with base definition -diff api/definitions/default/default-repository.tf \ - api/definitions/sync/MyRepo.def.tf -``` - -## Maintenance - -### Cleaning Stale Definitions - -Periodically review and remove definitions for repositories that: -- Have been deleted -- Have been archived -- Are no longer being synced - -```bash -# Find definitions for archived repositories -php api/maintenance/clean_stale_definitions.php --dry-run -``` - -### Updating Definitions - -Definitions are automatically regenerated on each bulk sync. To manually regenerate: - -```bash -# Regenerate definition for a specific repository -php api/automation/bulk_sync.php \ - --repos MokoConsulting/MyRepo \ - --regenerate-definitions -``` - -## Git Tracking - -All files in this directory are **tracked in git** for complete audit trail and version control: - -``` -api/definitions/sync/ -├── .gitignore # Git configuration -├── README.md # This documentation -└── *.def.tf # All synced repository definitions (TRACKED) -``` - -This approach: -- ✅ Preserves complete history of all synced repositories -- ✅ Provides audit trail of definition changes over time -- ✅ Enables diff/review of repository structure changes -- ✅ Allows rollback to previous definition versions -- ✅ Documents which repositories are actively synced - -## Migration Notes - -### From Previous Approach - -Previously, bulk sync created `.github/override.tf` files in each remote repository. This has been replaced with: - -**Old Approach:** -``` -Remote Repo: .github/override.tf (created by bulk sync) -MokoStandards: templates/github/override.tf.template -``` - -**New Approach:** -``` -Remote Repo: (no override file) -MokoStandards: api/definitions/sync/{repo}.def.tf (auto-generated) -``` - -### Existing Override Files - -For repositories that already have `.github/override.tf` files: -- They will continue to work (not deleted) -- New syncs will not update them -- Health checks will prefer synced definitions in MokoStandards -- Manual cleanup of old override files can be done separately - -## Related Documentation - -- [Default Definitions](../default/README.md) - Base platform definitions -- [Schema Guide](../../../docs/schemas/repohealth/schema-guide.md) - Definition schema specification -- [Bulk Sync Documentation](../../../docs/automation/bulk-repo-sync.md) - Bulk sync process -- [Validation Guide](../../../docs/guide/validation/auto-detection.md) - Platform detection and validation - ---- - -**Location**: `api/definitions/sync/` -**Purpose**: Auto-generated synced repository definitions -**Generated By**: Bulk sync automation -**Last Updated**: 2026-03-03 -**Maintained By**: MokoStandards automation (do not edit manually) diff --git a/docs/api/deploy/index.md b/docs/api/deploy/index.md deleted file mode 100644 index b5497f6..0000000 --- a/docs/api/deploy/index.md +++ /dev/null @@ -1,162 +0,0 @@ - - -# Deploy Scripts - -Scripts in `api/deploy/` upload repository source files to remote web servers via SFTP. - ---- - -## deploy-sftp.php - -**Path:** `api/deploy/deploy-sftp.php` -**Base class:** `MokoEnterprise\CliFramework` - -Reads connection details from a `sftp-config.json` file and recursively uploads -a repository's `src/` directory to the configured remote path. -Supports PuTTY `.ppk` keys and OpenSSH PEM keys via phpseclib. Strips `//` -line comments from the config file so the Sublime Text SFTP plugin format works -without modification. - -### Usage - -```bash -php api/deploy/deploy-sftp.php [OPTIONS] -``` - -| Option | Default | Description | -|--------|---------|-------------| -| `--path ` | `.` | Repository root to deploy | -| `--src-dir ` | `src` | Sub-directory inside the repo to upload | -| `--env ` | — | Target environment; selects named config file (see below) | -| `--config ` | — | Explicit config path — overrides `--env` and auto-lookup | -| `--key-passphrase ` | _(none)_ | Passphrase for encrypted SSH key | -| `--dry-run` | off | Preview uploads without connecting | -| `--verbose` / `-v` | off | Show per-file transfer details | -| `--quiet` / `-q` | off | Suppress all output except errors | -| `--help` / `-h` | — | Show help and exit | - -### Config File Resolution - -`--env` controls which config file is loaded from `{path}/scripts/sftp-config/`: - -| `--env` | Config file | -|---------|-------------| -| `dev` | `scripts/sftp-config/sftp-config.dev.json` | -| `demo` | `scripts/sftp-config/sftp-config.demo.json` | -| _(none)_ | `scripts/sftp-config/sftp-config.json` (generic fallback) | - -> **Note:** The `rs` environment has been retired. RS deployment is via the release pipeline only. - -`--config ` always takes precedence over `--env`. - -### Directory Layout - -Both directories are **gitignored** — create them locally and never commit their contents: - -``` -{repo_root}/ - scripts/ - sftp-config/ ← gitignored; copy templates from templates/scripts/deploy/ - sftp-config.dev.json ← copy of sftp-config.dev.json.example, filled in - sftp-config.demo.json ← copy of sftp-config.demo.json.example, filled in - keys/ ← gitignored; place your .ppk / PEM key file here -``` - -> **IMPORTANT:** `sftp-config.json` files are for local development only. In CI/CD, all credentials must come from GitHub variables and secrets. Never commit sftp-config files. - -See `templates/scripts/sftp-config/README.md` for step-by-step setup instructions. - -### Key Resolution - -`ssh_key_file` in `sftp-config.json` may be an absolute path or a bare filename. -When not absolute, the script looks for the key under `{path}/scripts/keys/` first, -then falls back to the value as a path relative to CWD. - -### Examples - -```bash -# Preview what would be uploaded (no connection) -php api/deploy/deploy-sftp.php --env dev --dry-run --verbose - -# Deploy src/ to dev server -php api/deploy/deploy-sftp.php --path /repos/mymodule --env dev - -# Deploy src/ to demo server -php api/deploy/deploy-sftp.php --path /repos/mymodule --env demo - -# Use a different source directory -php api/deploy/deploy-sftp.php --path /repos/mymodule --env dev --src-dir htdocs - -# Deploy with explicit config and encrypted key -php api/deploy/deploy-sftp.php \ - --path /repos/mymodule \ - --config /repos/mymodule/scripts/sftp-config/sftp-config.demo.json \ - --key-passphrase "my passphrase" -``` - -### Config Format - -Copy a template from `templates/scripts/deploy/` to `scripts/sftp-config/` and fill in your values: - -```json -{ - "type": "sftp", - "host": "iad1-shared-b7-01.dreamhost.com", - "user": "mokoconsulting_dev", - "ssh_key_file": "jmiller_private.ppk", - "port": "22", - "remote_path": "/home/mokoconsulting_dev/crm.dev.mokoconsulting.tech/htdocs/custom/mymodule/", - "ignore_regexes": [ - "\\.git*", - "sftp-config(-alt\\d?)?\\.json", - "\\.DS_Store", - "Thumbs\\.db" - ] -} -``` - -`ssh_key_file` may be a bare filename (resolved from `scripts/keys/`) or an -absolute path (e.g. `J:/My Drive/Keys/jmiller_private.ppk`). - -### Exit Codes - -| Code | Meaning | -|------|---------| -| `0` | All files uploaded successfully | -| `1` | Connection failed or one or more files could not be uploaded | -| `2` | Invalid arguments or config file error | - -### Called by Workflows - -| Workflow | Trigger | Target | Secrets prefix | -|----------|---------|--------|----------------| -| `deploy-dev.yml` | `workflow_call`, `workflow_dispatch` | Dev server | `DEV_FTP_` | -| `deploy-demo.yml` | `workflow_call`, `workflow_dispatch` | Demo server | `DEMO_FTP_` | - -> **Note:** The former `deploy-rs.yml` workflow (RS server, `RS_FTP_` prefix) has been retired. RS deployment is now handled via the release pipeline (`auto-release.yml`). - -See [Deploy Workflows](../../workflows/dev-deployment.md) for workflow usage. - -### GitHub Secrets and Variables Reference - -When called from CI, the script reads credentials from environment variables set by the workflow. See the [SFTP Deployment Guide](../../deployment/sftp.md#github-secrets-and-variables) for the full secrets/variables tables for `DEV_FTP_*` and `DEMO_FTP_*` environments, including types (Secret vs. Variable) and scopes (Org vs. Repo). - ---- - -**Location:** `docs/api/deploy/` -**Mirrors:** `api/deploy/` -**Last Updated:** 2026-04-07 diff --git a/docs/api/fix/index.md b/docs/api/fix/index.md deleted file mode 100644 index ac75113..0000000 --- a/docs/api/fix/index.md +++ /dev/null @@ -1,114 +0,0 @@ - - -# Fix Scripts - -Scripts in `api/fix/` make automated corrections to source files. All scripts: - -- Extend `CliBase` -- Support `--dry-run` (preview changes without writing) -- Support `--help` for usage information -- Operate on tracked files only (respects `.gitignore`) - -Always run with `--dry-run` first to review changes before applying them. - -```bash -php api/fix/ - - - - - - - - composer.json - - - - - - - -``` - -## Migration from Legacy Format - -The old format was a single YAML-like line: - -``` -platform: default-repository -``` - -The bulk sync will: -1. Read the legacy value -2. Generate a new XML `.mokostandards` with the detected platform -3. Commit the replacement file to `.gitea/.mokostandards` -4. Delete the old file from legacy locations (root, `.github/`) - -## Validation - -Repos are validated against `mokostandards-schema.xsd` during: -- Bulk sync (`automation/bulk_sync.php`) -- Standards compliance workflow (`.gitea/workflows/standards-compliance.yml`) -- Local validation via `vendor/bin/moko-validate` - -A missing or invalid `.mokostandards` file is a **compliance failure**. - -## Tooling Integration - -| Tool | How it uses `.mokostandards` | -|------|------------------------------| -| **bulk_sync.php** | Reads `` to select the correct definition `.tf` file; updates `` on success | -| **enforce_tags.sh** | Reads `` for tag naming | -| **deploy-*.yml** | Reads `` for host, path, method | -| **Makefile** | Can source `` for consistent `make` targets | -| **moko-validate** | Validates the XML against the XSD and checks required fields | -| **detectPlatform()** | Falls back to name/topic heuristics only when `.mokostandards` is missing or unparseable | diff --git a/docs/workflows/README.md b/docs/workflows/README.md deleted file mode 100644 index acdf125..0000000 --- a/docs/workflows/README.md +++ /dev/null @@ -1,61 +0,0 @@ -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Workflow Templates — Secondary Reference - -**Status**: Active | **Version**: 04.06.00 | **Effective**: 2026-05-05 - -> **Canonical documentation**: [WORKFLOW_STANDARDS.md](../WORKFLOW_STANDARDS.md) is the primary reference for workflow standards, inventory, and architecture. This file provides supplementary context only. - -## Architecture - -Workflow templates live in their respective **template repositories**, not in MokoStandards-API: - -- **MokoStandards-Template-Joomla** — Joomla extension workflows -- **MokoStandards-Template-Dolibarr** — Dolibarr module workflows -- **MokoStandards-Template-Generic** — Generic project workflows -- **MokoStandards-Template-Client** — Client site workflows - -The **sync engine** clones the appropriate template repo at runtime and applies workflows to target repositories. There is no local `templates/workflows/` directory to copy from. - -## How Workflows Reach Repos - -1. New repos are created from a template repo (e.g., `MokoStandards-Template-Joomla`), which includes `.gitea/workflows/` pre-populated. -2. Existing repos receive workflow updates via the bulk-sync engine, which clones the template repo, compares, and pushes changes. -3. All workflows run from `.gitea/workflows/` only — Gitea Actions does not execute workflows from `.github/workflows/`. - -## Important Notes - -- Releases use the 5-stream tag system (`stable`, `release-candidate`, `beta`, `alpha`, `development`). See [Release System](./release-system.md). -- All workflows require SPDX license headers (GPL-3.0-or-later). -- Pin action versions (use `@v4`, not `@main`). - -## Related Documentation - -- [WORKFLOW_STANDARDS.md](../WORKFLOW_STANDARDS.md) — Canonical workflow reference -- [Workflow Architecture](./workflow-architecture.md) -- [Workflow Inventory](./workflow-inventory.md) -- [Reusable Workflows](./reusable-workflows.md) -- [Release System](./release-system.md) -- [Build System](../build-system/README.md) -- [Health Scoring System](../policy/health-scoring.md) - -## Metadata - -| Field | Value | -|---|---| -| Document | Workflow Templates — Secondary Reference | -| Path | /docs/workflows/README.md | -| Repository | https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API | -| Owner | Moko Consulting | -| Status | Active | -| Version | 04.06.00 | -| Effective | 2026-05-05 | - -## Version History - -| Version | Date | Changes | -|---|---|---| -| 04.06.00 | 2026-05-05 | Rewritten to reflect current architecture: templates live in template repos, sync engine clones at runtime, removed stale `templates/workflows/` references | -| 04.00.04 | 2026-02-08 | Consolidated workflow templates | -| 04.00.04 | 2026-01-07 | Added public workflow templates documentation | -| 01.00.00 | 2026-01-07 | Initial comprehensive workflow documentation | diff --git a/docs/workflows/auto-release.md b/docs/workflows/auto-release.md deleted file mode 100644 index b6f43ed..0000000 --- a/docs/workflows/auto-release.md +++ /dev/null @@ -1,104 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Auto Release - -Creates or updates a GitHub Release on every push to main. Uses **major-only tags** (`vXX`) — one release per major version, with all minor+patch versions appending notes and assets to the same release. - -## Platform-Specific Pipelines - -### Generic Repos - -1. Reads `VERSION:` from README.md FILE INFORMATION block (e.g., `04.06.00`) -2. Extracts major version (e.g., `04`) -3. Creates or updates the `v04` tag on the release commit -4. Creates or updates the `v04` GitHub Release, appending changelog notes for this version -5. Auto-bumps patch version with `[skip ci]` commit -6. Auto-creates `version/XX` archive branch - -### Joomla Repos (waas-component) - -Joomla repos do **not** use FTP deploy. Distribution is via GitHub Release ZIPs. - -1. Reads `VERSION:` from README.md FILE INFORMATION block -2. Builds installable ZIP from `src/` directory -3. Computes SHA-256 hash of the ZIP -4. Uploads ZIP as an asset to the `vXX` GitHub Release (e.g., `com_myextension-01.02.03.zip`) -5. Updates `updates.xml` with the stable entry: version, download URL, and SHA-256 hash -6. Creates or updates the `vXX` tag and release, appending changelog notes -7. Auto-bumps patch version with `[skip ci]` commit -8. Auto-creates `version/XX` archive branch - -### Dolibarr Repos (crm-module, crm-platform) - -1. Reads `VERSION:` from README.md FILE INFORMATION block -2. Updates `$this->version` in `mod*.class.php` to the real version -3. Updates `update.txt` with the stable version string -4. Creates or updates the `vXX` tag and release, appending changelog notes -5. Auto-bumps patch version with `[skip ci]` commit -6. Auto-creates `version/XX` archive branch - -## Triggers - -- Push to `main` or `master` -- Skips commits by `gitea-actions[bot]` and commits with `[skip ci]` - -## Version Lifecycle - -| Phase | Branch | Module Version | Release? | -|-------|--------|---------------|----------| -| Development | `dev/**` | `XX.YY.00` (patch 00 = dev) | No | -| Alpha (optional) | `alpha/**` | `XX.YY.ZZ` | `alpha` tag release | -| Beta (optional) | `beta/**` | `XX.YY.ZZ` | `beta` tag release | -| Release Candidate | `rc/**` | `XX.YY.ZZ` (patch >= 01) | `release-candidate` tag (draft release created on RC branch creation) | -| Merge to main | `main` | Real version (e.g., `01.02.01`) | Yes — `vXX` tag + release | -| Auto-bump | `main` | Auto-incremented patch | No (skipped by `[skip ci]`) | - -**Note**: Alpha and beta stages are optional. Dev can go directly to rc when not needed. - -## Release Tags - -Each stability level has its own GitHub Release tag: - -| Tag | Stability | Source | -|-----|-----------|--------| -| `development` | Development | `dev/**` branches | -| `alpha` | Alpha | `alpha/**` branches | -| `beta` | Beta | `beta/**` branches | -| `release-candidate` | RC | `rc/**` branches | -| `vXX` | Stable production | `main` (major only, e.g., `v04`) | - -- The `vXX` production tag is **major only** — one GitHub Release per major version -- All minor+patch versions append release notes and ZIP assets to the same `vXX` release -- No minor or patch production tags are created -- Pre-release tags are updated in-place per stability level - -## Stream Tags (v2)Releases use stream-based git tags, NOT version numbers:- `stable` — production release- `release-candidate` — RC testing- `beta` — feature-complete stability testing- `alpha` — early testing- `development` — unstable dev buildsTo trigger a release, push the appropriate stream tag: `git tag -f stable && git push origin stable --force`### Cascade LogicEach stability level cascades to all lower levels in updates.xml:- **stable** → updates development, alpha, beta, rc, stable- **rc** → updates development, alpha, beta, rc- **beta** → updates development, alpha, beta- **alpha** → updates development, alpha- **development** → updates development only### SHA-256 Rules- Never leave `` empty — Joomla fails checksum verification on empty tags- Omit the `` tag entirely if no hash is available- Always set SHA when building a package### creationDateAlways update `` whenever version is bumped — in the manifest AND in updates.xml.### Auto-DetectionThe release workflow (`release.yml`) is fully generic:- `GITEA_REPO` derived from `github.event.repository.name`- `EXT_ELEMENT` auto-detected from the Joomla manifest `` tag- Falls back to manifest filename, then repo name (lowercased)- No per-repo customization needed### Version History (Stable Releases)Stable releases keep up to 5 previous versions in the Gitea release body. -## Requirements - -- `secrets.GH_TOKEN` with `contents: write` permission -- `VERSION:` field in README.md FILE INFORMATION block -- `.mokostandards` file with `platform:` field (`joomla`, `dolibarr`, or `generic`) - -## Changelog Extraction - -The workflow extracts release notes from `CHANGELOG.md` by finding the section header that matches the version number. If no match is found, it uses `"Release {VERSION}"` as the fallback. - -## Draft Release (RC Branches) - -When an `rc/**` branch is created, the branch tracking system auto-creates a **draft** GitHub Release for the `vXX` major version. This draft is later published by `auto-release.yml` when the RC merges to main. See [Dev Branch Tracking](./dev-branch-tracking.md) for details. diff --git a/docs/workflows/branch-protection.md b/docs/workflows/branch-protection.md deleted file mode 100644 index 1e30eaf..0000000 --- a/docs/workflows/branch-protection.md +++ /dev/null @@ -1,225 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Branch Protection Setup Workflow - -**Status**: ✅ Active | **Version**: 01.00.00 | **Last Updated**: 2026-05-07 - -## Table of Contents - -- [Overview](#overview) -- [Protection Rules](#protection-rules) -- [Override Authority](#override-authority) -- [Workflow Triggers](#workflow-triggers) -- [Configuration](#configuration) -- [Excluded Repositories](#excluded-repositories) -- [Usage](#usage) -- [Troubleshooting](#troubleshooting) -- [Related Documentation](#related-documentation) - ---- - -## Overview - -The **Branch Protection Setup** workflow applies standardised branch protection rules to all governed repositories in the MokoConsulting organization. It runs from the **MokoStandards-API** repository and uses the Gitea API to create or update protection rules across repos. - -### Purpose - -- **Consistency**: Uniform branch protection across all repositories -- **Drift Prevention**: Weekly scheduled runs enforce rules even if manually changed -- **Centralised Management**: Single workflow controls protection for the entire organization -- **Override Authority**: `jmiller` has full override capability on all branches - -### Key Features - -✅ **Idempotent**: Deletes and recreates rules to avoid update conflicts -✅ **Weekly Enforcement**: Scheduled every Monday at 02:00 UTC -✅ **Manual Dispatch**: Target specific repos or run against all -✅ **Dry Run Mode**: Preview changes without applying -✅ **Centralised**: Lives in MokoStandards-API, applies to all governed repos - ---- - -## Protection Rules - -### Rule Summary - -| Branch | Push | Push Whitelist | Force Push | Force Push Whitelist | Block Rejected Reviews | Priority | -|--------|------|---------------|------------|---------------------|----------------------|----------| -| `main` | Whitelist | jmiller | Whitelist | jmiller | Yes | 1 | -| `dev` | Open | — | Whitelist | jmiller | No | 2 | -| `rc/*` | Open | — | Whitelist | jmiller | No | 3 | -| `beta/*` | Open | — | Whitelist | jmiller | No | 4 | -| `alpha/*` | Open | — | Whitelist | jmiller | No | 5 | - -### Rule Details - -#### `main` (Priority 1 — Strictest) - -- **Push**: Restricted to whitelist (`jmiller` only) -- **Force Push**: Restricted to whitelist (`jmiller` only) -- **Block on Rejected Reviews**: Yes — prevents merging PRs with rejected reviews -- **Dismiss Stale Approvals**: Yes — new commits invalidate previous approvals -- **Required Approvals**: 0 (solo developer workflow) - -#### `dev` (Priority 2) - -- **Push**: Open to all collaborators -- **Force Push**: Restricted to `jmiller` only -- **Block on Rejected Reviews**: No -- **Purpose**: Development integration branch — needs open push for cascade workflow and CI bots - -#### `rc/*`, `beta/*`, `alpha/*` (Priority 3-5) - -- **Push**: Open to all collaborators -- **Force Push**: Restricted to `jmiller` only -- **Block on Rejected Reviews**: No -- **Purpose**: Pre-release channels — CI workflows push version bumps and package builds directly - ---- - -## Override Authority - -**`jmiller`** has full override authority across all branches: - -- Can push directly to `main` (bypassing PR requirement) -- Can force-push to any branch when needed (emergency fixes, history cleanup) -- Is the only user in force-push whitelists on all branches - -This ensures the organization owner can always intervene in emergencies without being blocked by protection rules. - ---- - -## Workflow Triggers - -| Trigger | Condition | -|---------|-----------| -| `schedule` | Every Monday at 02:00 UTC (drift enforcement) | -| `workflow_dispatch` | Manual — supports `dry_run` and `repos` inputs | - -### Inputs - -| Input | Type | Default | Description | -|-------|------|---------|-------------| -| `dry_run` | boolean | `false` | Preview mode — logs what would change without applying | -| `repos` | string | `""` (all) | Comma-separated repo names to target (empty = all governed repos) | - ---- - -## Configuration - -### Environment Variables - -| Variable | Value | Description | -|----------|-------|-------------| -| `GITEA_URL` | `https://git.mokoconsulting.tech` | Gitea instance URL | -| `GITEA_ORG` | `MokoConsulting` | Organization name | - -### Secrets - -| Secret | Required | Description | -|--------|----------|-------------| -| `GA_TOKEN` | Yes | Gitea API token with admin/repo permissions | - ---- - -## Excluded Repositories - -The following repos are excluded from protection rule application: - -| Repository | Reason | -|-----------|--------| -| `gitea-org-config` | Platform infrastructure | -| `org-profile` | Platform infrastructure | -| `gitea-private` | Platform infrastructure | -| `gitea-server-setup` | Platform infrastructure | -| `MokoStandards` | Standards repository | -| `MokoStandards-API` | Standards repository | -| `MokoTesting` | Testing infrastructure | -| `MokoStandards-Template-*` | Template repositories | -| `MokoDoliProjTemplate` | Template repository | - ---- - -## Usage - -### Apply to All Repos - -Trigger the workflow manually with default inputs (no dry run, all repos). - -### Apply to Specific Repos - -``` -repos: MokoOnyx,MokoJoomla,MokoJGDPC -``` - -### Preview Mode - -Set `dry_run: true` to see which rules would be applied without making changes. - -### API Approach - -The workflow uses a **delete-then-create** strategy for each rule: - -1. `DELETE /repos/{owner}/{repo}/branch_protections/{rule_name}` — remove existing rule (if any) -2. `POST /repos/{owner}/{repo}/branch_protections` — create fresh rule - -This avoids HTTP 422 errors from conflicting updates to existing rules. - ---- - -## Troubleshooting - -### HTTP 422 on Rule Creation - -**Symptom**: Rule fails to create with HTTP 422 - -**Common Causes**: -1. Username in whitelist doesn't exist as a Gitea user (e.g., bot accounts) -2. Rule name conflicts with an existing rule that wasn't deleted - -**Solution**: Check the error message in logs — it usually specifies which user or field is invalid - -### Rules Not Applying to Specific Repo - -**Symptom**: Repo not appearing in workflow output - -**Cause**: Repo is in the exclude list - -**Solution**: Check the `EXCLUDE` variable in the workflow and remove the repo if it should be governed - -### Protection Rules Reverted - -**Symptom**: Rules changed back to previous state after manual edit - -**Cause**: Weekly schedule re-applies standard rules every Monday - -**Solution**: Modify the workflow's rule definitions to make permanent changes — manual edits will be overwritten - ---- - -## Related Documentation - -- [Cascade Main → Dev](./cascade-dev.md) -- [Dev Branch Tracking](./dev-branch-tracking.md) -- [Bulk Repository Sync](./bulk-repo-sync.md) -- [Workflow Architecture](./workflow-architecture.md) - -## Changelog - -| Version | Date | Changes | -|---------|------|---------| -| 01.00.00 | 2026-05-07 | Initial release — 5 branch rules across all governed repos | diff --git a/docs/workflows/build-release.md b/docs/workflows/build-release.md deleted file mode 100644 index c71601b..0000000 --- a/docs/workflows/build-release.md +++ /dev/null @@ -1,88 +0,0 @@ - - -# Build & Release Pipeline - -Every governed repo has an `auto-release.yml` workflow that runs a 7-step build and release pipeline on every push to main. - -## Pipeline Steps - -``` -Push to main - │ - ├─ 1. Read VERSION from README.md - │ - ├─ 2. Create version/XX branch (snapshot) - │ - ├─ 3. Set platform version - │ ├─ Dolibarr: $this->version in mod*.class.php - │ └─ Joomla: in XML manifest - │ - ├─ 4. Update [VERSION: XX.YY.ZZ] badges in markdown files - │ - ├─ 5. Write update.txt (Dolibarr only — plain text version for checkForUpdate) - │ - ├─ 6. Create git tag vXX.YY.ZZ - │ - └─ 7. Create GitHub Release with changelog notes -``` - -## Triggers - -- Push to `main` or `master` -- Skips commits by `gitea-actions[bot]` and commits with `[skip ci]` -- Skips if tag + branch already exist (idempotent) - -## What Each Step Does - -### Step 1: Read version -Reads `VERSION:` from the README.md FILE INFORMATION block using `version_read.php`. - -### Step 2: Create version branch -Creates `version/XX` as a frozen snapshot of main at release time. If the branch already exists, this step is skipped. - -### Step 3: Set platform version -- **Dolibarr**: sets `$this->version` in `src/core/modules/mod*.class.php` to the real version AND rewrites `$this->url_last_version` to point to the main branch -- **Joomla**: sets `` in XML manifest files - -### Step 4: Update version badges -Finds all `[VERSION: XX.YY.ZZ]` badges in markdown files and updates them to the current version. - -### Step 5: Write update.txt -For Dolibarr repos only: writes the version number as plain text to `update.txt`. Dolibarr's `checkForUpdate()` expects raw text < 30 chars from `$this->url_last_version`. - -### Step 6: Create git tag -Creates `vXX.YY.ZZ` tag and pushes to remote. - -### Step 7: Create GitHub Release -Extracts release notes from CHANGELOG.md (section matching the version heading) and creates a GitHub Release targeting the version branch. - -## Version Lifecycle - -| Phase | Branch | Module Version | Badge | Release? | -|-------|--------|---------------|-------|----------| -| Development | `dev/**` | `"development"` | Dev version | No | -| Merge to main | `main` | Real version | Updated | Yes | -| Version bump | `main` | Auto-incremented | Updated | Next push | - -## Stream Tags (v2)Releases use stream-based git tags (`stable`, `release-candidate`, `beta`, `alpha`, `development`), NOT version numbers. To trigger a release, push the appropriate stream tag: `git tag -f stable && git push origin stable --force`### Cascade LogicEach stability level cascades to all lower levels in updates.xml:- **stable** → updates development, alpha, beta, rc, stable- **rc** → updates development, alpha, beta, rc- **beta** → updates development, alpha, beta- **alpha** → updates development, alpha- **development** → updates development only### SHA-256 Rules- Never leave `` empty — Joomla fails checksum verification on empty tags- Omit the `` tag entirely if no hash is available- Always set SHA when building a package### Auto-DetectionThe release workflow is fully generic:- `GITEA_REPO` derived from `github.event.repository.name`- `EXT_ELEMENT` auto-detected from the Joomla manifest `` tag- Falls back to manifest filename, then repo name (lowercased)- No per-repo customization needed -## Related Workflows - -| Workflow | Role | -|----------|------| -| `sync-version-on-merge.yml` | Auto-bumps patch version in README on push to main | -| `auto-release.yml` | This pipeline — builds, branches, tags, releases | -| `deploy-dev.yml` | Deploys to dev server with version="development" | -| `deploy-demo.yml` | Deploys to demo with real version | -| `repository-cleanup.yml` | Deletes old version branches on schedule | diff --git a/docs/workflows/bulk-repo-sync.md b/docs/workflows/bulk-repo-sync.md deleted file mode 100644 index 14db9ed..0000000 --- a/docs/workflows/bulk-repo-sync.md +++ /dev/null @@ -1,775 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) -![Enterprise Ready](https://img.shields.io/badge/enterprise-ready-green) -![Security Validated](https://img.shields.io/badge/security-validated-green) - -# Bulk Repository Sync Workflow - -**Status**: ✅ Active | **Version**: 2.0.0 | **Enterprise Ready**: ✅ Certified | **Last Updated**: 2026-02-26 - -## Table of Contents - -- [Overview](#overview) -- [Quick Start](#quick-start) -- [Enterprise Features](#enterprise-features) -- [How It Works](#how-it-works) -- [Workflow Triggers](#workflow-triggers) -- [Configuration](#configuration) -- [Usage Scenarios](#usage-scenarios) -- [Sync Behavior](#sync-behavior) -- [Troubleshooting](#troubleshooting) -- [Best Practices](#best-practices) -- [Security Considerations](#security-considerations) -- [Related Documentation](#related-documentation) - ---- - -## Overview - -The **Bulk Repository Sync** workflow is MokoStandards' automated system for deploying and maintaining organizational standards across all repositories in the mokoconsulting-tech organization. - -**Version 2.0 Updates**: Enhanced with enterprise libraries for audit logging, metrics collection, API rate limiting, and error recovery. - -### Purpose - -- **Consistency**: Ensure all repositories follow MokoStandards conventions -- **Automation**: Deploy workflows, scripts, and configurations automatically -- **Maintenance**: Keep repositories up-to-date with latest standards -- **Compliance**: Enforce organizational coding standards across projects -- **Observability**: Track operations with audit logs and metrics - -### Key Features - -✅ **Organization-Scoped**: Works only within mokoconsulting-tech organization -✅ **Monthly Automation**: Automatically syncs on 1st of each month -✅ **Manual Control**: Trigger sync for specific repos or use dry-run mode -✅ **Override Support**: Respects repository-specific configurations -✅ **Platform Detection**: Automatically detects terraform, dolibarr, joomla, generic projects -✅ **Safe PR Creation**: Creates pull requests instead of direct commits -✅ **Enterprise Audit Logging**: All operations logged for compliance -✅ **API Rate Limiting**: Intelligent GitHub API usage with circuit breaker -✅ **Error Recovery**: Automatic retry with checkpointing -✅ **Metrics Collection**: Performance and success metrics tracked -✅ **Security Validation**: Pre-sync vulnerability scanning -✅ **Dry-Run Mode**: Test changes without applying them -✅ **Enterprise Ready**: Certified with full enterprise library integration - -### Workflow Location - -- **File**: `.gitea/workflows/bulk-repo-sync.yml` -- **Script**: `api/automation/bulk_sync.php` -- **Version**: 5.0 (Rebuilt using Enterprise library) -- **Status**: ✅ **ENTERPRISE READY** - Fully integrated with enterprise security, audit logging, and metrics - ---- - -## Enterprise Features - -### Integrated Enterprise Libraries - -The bulk_sync.php script is **ENTERPRISE READY** with full integration of: - -1. **RepositorySynchronizer** (Primary Component) - - Core synchronization logic - - Repository listing and filtering - - Per-repository processing with checkpoints - - Progress tracking and reporting - -2. **ApiClient** - - Rate limiting (5000 requests/hour default) - - Exponential backoff retry logic - - Circuit breaker protection - - Response caching for performance - -3. **AuditLogger** - - Transaction tracking for each repository sync - - Per-file operation logging with timestamps - - Security event logging - - Compliance reports for audit trails - -4. **MetricsCollector** - - Success/failure rate tracking - - Sync duration measurements - - File count metrics (processed, synced, skipped) - - Performance indicators for monitoring - -5. **CheckpointManager** - - Automatic checkpoint saving during sync - - Resume capability after failures - - State persistence for long-running operations - -6. **SecurityValidator** - - Pre-sync vulnerability scanning - - Detection of hardcoded credentials and API keys - - Insecure pattern detection - - Security issues logged in audit trail - -### Monitoring Workflows - -New enterprise monitoring workflows are available: -- `audit-log-archival.yml` - Weekly audit log processing -- `metrics-collection.yml` - Daily metrics aggregation -- `health-check.yml` - Hourly health monitoring -- `security-scan.yml` - Enhanced security scanning -- `integration-tests.yml` - Enterprise library testing - ---- - -## Quick Start - -### Running a Test Sync (Dry Run) - -1. Go to **Actions** → **Bulk Repository Sync** in GitHub -2. Click **Run workflow** -3. Check **Dry run** box -4. Leave **Repositories** blank (tests all repos) -5. Click **Run workflow** - -This previews changes without applying them. - -### Syncing Specific Repositories - -1. Go to **Actions** → **Bulk Repository Sync** -2. Click **Run workflow** -3. Enter repository names: `MokoApp MokoWeb` (space-separated) -4. Leave **Dry run** unchecked -5. Click **Run workflow** - -This creates PRs in the specified repositories. - -### Syncing All Repositories (Scheduled Behavior) - -The workflow automatically runs on the 1st of each month at 00:00 UTC, syncing all non-archived repositories except MokoStandards itself. - ---- - -## How It Works - -### Workflow Flow Diagram - -``` -TRIGGER: Monthly Schedule (1st @ 00:00 UTC) or Manual Dispatch - │ - ▼ -┌──────────────────┐ -│ Parse Terraform │ -│ Override Config │───┐ Read override.config.tf -└──────────────────┘ │ Extract exclusions & configs - │ │ - ▼ │ -┌──────────────────┐ │ -│ List All Org │◀──┘ -│ Repositories │ -└──────────────────┘ - │ - ▼ -┌──────────────────┐ -│ Filter Repos │───┐ Apply exclusions -│ Apply Exclusions │ │ Skip archived/disabled -└──────────────────┘ │ - │ │ - ▼ │ -╔══════════════════╗ │ -║ FOR EACH REPO: ║◀──┘ -╚══════════════════╝ - │ - ├────────────────┬────────────────┬────────────────┐ - ▼ ▼ ▼ ▼ -┌─────────┐ ┌──────────┐ ┌─────────┐ ┌──────────┐ -│ Sync │ │ Sync │ │ Sync │ │ Create │ -│Workflows│ │ Scripts │ │ Configs │ │ PR │ -└─────────┘ └──────────┘ └─────────┘ └──────────┘ - │ │ │ │ - └────────────────┴────────────────┴────────────────┘ - │ - ▼ - ┌─────────────────┐ - │ OUTPUTS: │ - │ • Sync Report │ - │ • PR Links │ - │ • Error Summary │ - └─────────────────┘ -``` - -### Sync Process Steps - -1. **Clone Target Repository**: Clone each repository to temporary directory -2. **Load Override Configuration**: Check for `override.config.tf` in target repo -3. **Determine Platform Type**: Use override or auto-detect (infrastructure/terraform/dolibarr/joomla/generic) -4. **Select Files to Sync**: Based on platform type and override exclusions -5. **Create Branch**: Create `chore/sync-mokostandards-updates` branch -6. **Sync Files**: Copy workflows, scripts, and configurations -7. **Commit Changes**: Commit with descriptive message -8. **Create Pull Request**: Open PR for review (never direct push) - ---- - -## Workflow Triggers - -### 1. Scheduled Trigger (Monthly) - -**Schedule**: 1st of every month at 00:00 UTC - -```yaml -schedule: - - cron: '0 0 1 * *' -``` - -**Behavior**: -- Syncs to ALL non-archived repositories -- Automatically excludes: `MokoStandards`, `MokoStandards-Private` -- Creates PRs for review -- No manual intervention required - -**Use Cases**: -- Regular maintenance of organizational standards -- Deploy new workflow updates monthly -- Keep repositories in sync with latest templates - -### 2. Manual Trigger (workflow_dispatch) - -Trigger manually from GitHub Actions UI. - -**Inputs**: - -| Input | Type | Required | Default | Description | -|-------|------|----------|---------|-------------| -| `repos` | string | No | (all) | Space-separated list of repositories to sync | -| `exclude` | string | No | (none) | Space-separated list of repositories to exclude | -| `dry_run` | boolean | No | false | Preview changes without creating PRs | - -**Use Cases**: -- Test sync on specific repository before monthly run -- Emergency sync after critical workflow update -- Sync to newly created repositories -- Troubleshoot sync issues with dry-run mode - ---- - -## Configuration - -### Required Secrets - -The workflow requires the following GitHub secret: - -#### `GH_TOKEN` - -**Type**: Personal Access Token (PAT) or GitHub App token - -**Required Permissions**: -- `repo` (full control) -- `workflow` (update GitHub Actions workflows) -- `admin:org` (read org repositories) - -**Setup**: -1. Generate PAT with required permissions -2. Add to organization secrets as `GH_TOKEN` (GitHub organization Settings → Secrets and variables → Actions) -3. Workflow will automatically use it - -**Security Note**: As an organization secret, `GH_TOKEN` is available to all workflow runs across all repositories in the `mokoconsulting-tech` organization. - -### Repository Override Configuration - -Repositories can control sync behavior using `override.config.tf` file. - -**Example Override File**: - -```hcl -# override.config.tf -locals { - override_metadata = { - repository_type = "terraform" # Skip auto-detection - } - - sync_config = { - enabled = true - cleanup_mode = "conservative" - } - - exclude_files = [ - { - path = ".gitea/workflows/custom-ci.yml" - reason = "Custom CI workflow with special requirements" - } - ] - - protected_files = [ - { - path = ".gitignore" - reason = "Repository-specific ignore patterns" - } - ] -} -``` - -**For complete override documentation**, see: [Terraform Override Files Guide](../guide/terraform-override-files.md) - ---- - -## Usage Scenarios - -### Scenario 1: Test Sync on Single Repository - -**Situation**: You updated a workflow template and want to test before monthly sync. - -**Steps**: -1. Navigate to **Actions** → **Bulk Repository Sync** -2. Click **Run workflow** -3. **Inputs**: - - `repos`: `moko-test-project` - - `dry_run`: `true` -4. Review workflow output for proposed changes -5. If looks good, re-run with `dry_run`: `false` - -**Expected Outcome**: Workflow shows what files would be synced without creating PR. - -### Scenario 2: Emergency Workflow Update - -**Situation**: Security fix needed in all repositories immediately. - -**Steps**: -1. Update workflow template in MokoStandards -2. Commit and push changes -3. Navigate to **Actions** → **Bulk Repository Sync** -4. Click **Run workflow** -5. **Inputs**: - - `repos`: (leave empty for all) - - `exclude`: `archived-repo deprecated-project` - - `dry_run`: `false` -6. Monitor workflow progress -7. Review and merge PRs in target repositories - -**Expected Outcome**: PRs created in all active repositories with updated workflow. - -### Scenario 3: Sync to Newly Created Repository - -**Situation**: New repository created, needs standards applied. - -**Steps**: -1. Create repository in mokoconsulting-tech organization -2. Navigate to **Actions** → **Bulk Repository Sync** -3. Click **Run workflow** -4. **Inputs**: - - `repos`: `new-repository-name` - - `dry_run`: `false` -5. Review and merge the PR in new repository - -**Expected Outcome**: New repository receives all standard workflows and configurations. - -### Scenario 4: Exclude Specific Repositories - -**Situation**: Some repositories should not receive updates (archived, experimental, etc.) - -**Steps**: -1. Navigate to **Actions** → **Bulk Repository Sync** -2. Click **Run workflow** -3. **Inputs**: - - `repos`: (leave empty) - - `exclude`: `old-project experimental-repo archived-module` - - `dry_run`: `false` - -**Expected Outcome**: All repositories except specified ones receive updates. - -### Scenario 5: Troubleshooting Sync Failures - -**Situation**: Sync failed for a repository, need to diagnose. - -**Steps**: -1. Check workflow logs for error messages -2. Re-run with `dry_run`: `true` for that repository -3. Review proposed changes -4. Check if repository has `override.config.tf` with conflicts -5. Verify `GH_TOKEN` has correct permissions -6. Check if repository is archived or private with restricted access - ---- - -## Sync Behavior - -### What Gets Synced - -The bulk sync workflow synchronizes the following file types: - -#### 1. **Core Configuration Files** (All Repositories) - -- `.github/dependabot.yml` - Dependabot configuration -- `.github/copilot.yml` - GitHub Copilot configuration - -#### 2. **Universal Workflows** (All Repositories) - -- `.gitea/workflows/build.yml` - Build workflow -- `.gitea/workflows/ci.yml` - CI validation workflow - -#### 3. **Platform-Specific Workflows** - -**Terraform Repositories**: -- `.gitea/workflows/terraform-ci.yml` - Terraform CI -- `.gitea/workflows/terraform-deploy.yml` - Terraform deployment -- `.gitea/workflows/terraform-drift.yml` - Drift detection - -**Dolibarr Repositories**: -- `.gitea/workflows/release.yml` - Dolibarr release workflow -- `.gitea/workflows/sync-changelogs.yml` - Changelog sync - -**Joomla Repositories**: -- `.gitea/workflows/release.yml` - Joomla release workflow -- `.gitea/workflows/repo-health.yml` - Repository health checks - -**Generic Repositories**: -- `.gitea/workflows/code-quality.yml` - Code quality checks -- `.gitea/workflows/codeql-analysis.yml` - Security scanning -- `.gitea/workflows/repo-health.yml` - Health checks - -#### 4. **Reusable Workflows** (All Repositories) - -- `.gitea/workflows/reusable-build.yml` - Reusable build workflow -- `.gitea/workflows/reusable-release.yml` - Reusable release workflow -- `.gitea/workflows/reusable-project-detector.yml` - Project detection -- Additional reusable workflows based on platform - -#### 5. **Validation Scripts** (All Repositories) - -- `api/validate/auto_detect_platform.php` - Platform detection -- Schema definition files (required by validators) - -### What DOESN'T Get Synced - -The following are never synced (always excluded): - -❌ Repository-specific files (by default): -- `.gitignore` -- `.editorconfig` -- `README.md` -- `LICENSE` - -❌ Custom files in override's `protected_files` list - -❌ Files in override's `exclude_files` list - -❌ Repository-specific override file itself (`override.config.tf`) - -### Platform Detection Logic - -The sync tool determines platform type in this order: - -1. **Check Override First**: If `override.config.tf` specifies `repository_type`, use it -2. **Auto-Detection**: If no override, run `auto_detect_platform.php`: - - Checks for Terraform files (`.tf`, `infrastructure/terraform/`) - - Checks for Dolibarr structure (`htdocs/`, module XML) - - Checks for Joomla structure (`manifest.xml`, Joomla patterns) - - Falls back to "generic" if none detected -3. **Default**: Use "generic" if detection fails - -**Performance**: Override-based detection is ~2-3 seconds faster per repository. - -### File Cleanup Behavior - -The sync tool has three cleanup modes (configured in override): - -**1. `none`** - No cleanup -- Only adds or updates files -- Never removes files -- **Use for**: Initial sync, testing - -**2. `conservative`** (Default) -- Removes obsolete `.yml` and `.py` files from managed directories -- Only touches files that were previously synced -- **Use for**: Regular maintenance, most repositories - -**3. `aggressive`** -- Removes ALL files in managed directories not in sync list -- Can remove custom files if not protected -- **Use for**: Advanced users, strict compliance requirements - ---- - -## Troubleshooting - -### Common Issues - -#### Issue 1: Sync Fails with "Authentication Required" - -**Symptoms**: -- Workflow fails at git operations -- Error mentions authentication or permissions - -**Solutions**: -1. Verify `GH_TOKEN` secret exists -2. Check token hasn't expired -3. Verify token has `repo`, `workflow`, and `admin:org` permissions -4. Re-generate token if needed - -#### Issue 2: Repository Not Being Synced - -**Symptoms**: -- Repository missing from sync report -- No PR created in expected repository - -**Solutions**: -1. Check if repository is archived (archived repos skipped) -2. Verify repository name spelling -3. Check if repository is in exclude list -4. Review workflow logs for skip messages - -#### Issue 3: Files Not Syncing Despite No Override - -**Symptoms**: -- Expected files not appearing in PR -- Sync completes but files missing - -**Solutions**: -1. Check if files exist in MokoStandards templates -2. Verify platform detection is correct -3. Look for parse errors in workflow logs -4. Check if files are in default exclusion list - -#### Issue 4: Platform Detection Wrong - -**Symptoms**: -- Wrong workflows being synced (e.g., terraform workflows in PHP project) -- Platform shows as "generic" when should be specific - -**Solutions**: -1. Add `override.config.tf` with explicit `repository_type` -2. Verify repository structure matches expected patterns -3. Check auto-detection script works: `php api/validate/auto_detect_platform.php` - -#### Issue 5: Dry Run Shows No Changes - -**Symptoms**: -- Dry run reports no files to sync -- Repository clearly out of date - -**Solutions**: -1. Check if all files are in override's `exclude_files` -2. Verify cleanup mode isn't "none" -3. Check if repository already has latest files -4. Review sync configuration in override file - -### Getting Help - -If issues persist: - -1. **Review Logs**: Check workflow run logs for detailed error messages -2. **Check Override**: Verify `override.config.tf` syntax -3. **Dry Run**: Test with single repository in dry-run mode -4. **Open Issue**: Create issue in MokoStandards repository with: - - Repository name - - Workflow run URL - - Error messages - - Override file content (if applicable) - ---- - -## Best Practices - -### 1. Always Test with Dry Run First - -Before syncing to multiple repositories: - -``` -✓ DO: Test on one repo with dry_run: true -✓ DO: Review proposed changes carefully -✗ DON'T: Sync to all repos without testing -``` - -### 2. Use Override Files for Custom Repos - -For repositories with special requirements: - -``` -✓ DO: Create override.config.tf with exclusions -✓ DO: Protect custom files in protected_files list -✓ DO: Document reasons for exclusions -✗ DON'T: Rely on manual PR rejection -``` - -### 3. Monitor Monthly Syncs - -After scheduled syncs: - -``` -✓ DO: Review workflow run summary -✓ DO: Check for failed syncs -✓ DO: Review and merge PRs promptly -✗ DON'T: Ignore sync failures -``` - -### 4. Keep Override Files Updated - -When changing repository structure: - -``` -✓ DO: Update repository_type if platform changes -✓ DO: Update exclude_files as needed -✓ DO: Keep documentation current in reasons -✗ DON'T: Leave stale override configuration -``` - -### 5. Document Custom Workflows - -For excluded workflows: - -``` -✓ DO: Add clear comments explaining customization -✓ DO: Keep custom workflows maintained -✓ DO: Consider contributing improvements back to MokoStandards -✗ DON'T: Duplicate standard functionality -``` - ---- - -## Security Considerations - -### Token Security - -**GH_TOKEN Management**: - -✅ **DO**: -- Use fine-grained PAT with minimal required permissions -- Rotate token regularly (every 90 days) -- Audit token usage periodically -- Restrict token to MokoStandards repository only - -❌ **DON'T**: -- Share token with other workflows -- Use token with broader permissions than needed -- Store token in code or documentation -- Use personal token (use organization token) - -### Sync Security - -**PR Review Process**: - -✅ **DO**: -- Always review PRs before merging -- Check for unexpected file changes -- Verify workflow modifications are intentional -- Test workflows in PR branches before merging - -❌ **DON'T**: -- Auto-merge sync PRs without review -- Skip CI checks on sync PRs -- Merge without understanding changes - -### Repository Protection - -**Branch Protection Rules**: - -Sync PRs respect branch protection: -- Cannot override required reviewers -- Cannot bypass required status checks -- Cannot force-push to protected branches -- Creates PRs even on protected branches - ---- - -## Related Documentation - -### Essential Reading - -- **[Terraform Override Files Guide](../guide/terraform-override-files.md)** - Complete guide for configuring sync behavior -- **[Workflow Architecture](./workflow-architecture.md)** - Understanding workflow hierarchy -- **[Platform Detection](../guide/platform-detection.md)** - How auto-detection works - -### Related Workflows - -- **[Standards Compliance](./standards-compliance.md)** - Validation workflow -- **[Auto-Update SHA](./auto-update-sha.md)** - SHA hash management -- **[Terraform Drift Check](./terraform-drift-check.md)** - Infrastructure drift detection - -### Sync-Related Documentation - -- **[Branch Synchronization](../guide/branch-synchronization.md)** - Branch sync strategies -- **[Changelog Synchronization](../guide/changelog-synchronization.md)** - Changelog management -- **[Copilot Sync Standards](../guide/copilot-sync-standards.md)** - Copilot configuration sync - -### Script Documentation - -- **Script Source**: `api/automation/bulk_update_repos.php` -- **Platform Detection**: `api/validate/auto_detect_platform.php` -- **Run Help**: `php api/automation/bulk_update_repos.php --help` - ---- - -## Maintenance and Updates - -### Workflow Maintenance - -**Updating the Workflow**: - -1. Modify `.gitea/workflows/bulk-repo-sync.yml` -2. Test changes with manual trigger on test repository -3. Commit and push to MokoStandards -4. Next scheduled run uses updated workflow - -**Updating the Script**: - -1. Modify `api/automation/bulk_update_repos.php` -2. Test locally: `php api/automation/bulk_update_repos.php --dry-run --repos test-repo` -3. Verify changes work as expected -4. Commit and push to MokoStandards -5. Next sync uses updated script - -### Version History - -| Version | Date | Changes | -|---------|------|---------| -| 2.0.0 | 2026-01 | Terraform-based override system, platform detection priority | -| 1.0.0 | 2025-12 | Initial schema-driven architecture | - ---- - -## Support - -### Getting Support - -For questions or issues: - -1. **Documentation**: Review this guide and related documentation -2. **Dry Run**: Test with dry-run mode to diagnose issues -3. **Logs**: Check workflow logs for detailed error messages -4. **Issues**: Open issue in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/issues) - -### Contributing - -To improve the bulk sync workflow: - -1. Test changes thoroughly in fork -2. Document new features -3. Submit PR with clear description -4. Include examples and use cases - ---- - -**Last Updated**: 2026-02-09 -**Maintained By**: MokoStandards Team -**License**: GPL-3.0-or-later diff --git a/docs/workflows/cascade-dev.md b/docs/workflows/cascade-dev.md deleted file mode 100644 index 6da4a62..0000000 --- a/docs/workflows/cascade-dev.md +++ /dev/null @@ -1,222 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Cascade Main → Dev Workflow - -**Status**: ✅ Active | **Version**: 02.00.00 | **Last Updated**: 2026-05-07 - -## Table of Contents - -- [Overview](#overview) -- [How It Works](#how-it-works) -- [Workflow Triggers](#workflow-triggers) -- [Configuration](#configuration) -- [Conflict Resolution](#conflict-resolution) -- [Skipping Cascade](#skipping-cascade) -- [Deployment](#deployment) -- [Troubleshooting](#troubleshooting) -- [Related Documentation](#related-documentation) - ---- - -## Overview - -The **Cascade Main → Dev** workflow automatically forward-merges `main` into all open branches (`dev`, `rc/*`, `beta/*`, `alpha/*`) after every push to `main`. This keeps all development and pre-release branches in sync with stable releases without manual intervention. - -### Purpose - -- **Sync**: Ensure all open branches (`dev`, `rc/*`, `beta/*`, `alpha/*`) always include the latest stable code from `main` -- **Automation**: Eliminate manual merge-forward after releases -- **Conflict Detection**: Surface merge conflicts early via auto-created PRs -- **Safety**: Never force-pushes or overwrites — creates PRs for manual resolution when needed - -### Key Features - -✅ **API-Only**: No repository checkout required — uses Gitea REST API exclusively -✅ **Idempotent**: Safe to run multiple times — detects existing PRs and skips duplicates -✅ **Conflict-Safe**: Creates a PR for manual resolution when auto-merge fails -✅ **Skip Support**: Opt out per-commit with `[skip cascade]` or `[skip ci]` -✅ **Deployed Org-Wide**: Active on all governed (non-platform/standards) repositories - ---- - -## How It Works - -``` -Push to main - ↓ -Discover target branches (dev, dev/*, rc/*, beta/*, alpha/*) - ↓ (skip if none found) -For each target branch: - ↓ - Compare main vs branch (commits ahead) - ↓ (skip if already in sync) - Create PR (main → branch) - ↓ (reuse existing if one is open) - Check mergeable - ├─ Clean → Auto-merge PR ✅ - └─ Conflicts → Leave PR open for manual resolution ⚠️ -``` - -### Step-by-Step - -1. **Branch Discovery**: Queries all branches via paginated API, filters to targets matching `dev`, `dev/*`, `rc/*`, `beta/*`, `alpha/*` -2. **Diff Check**: For each target, queries `GET /repos/{owner}/{repo}/compare/{branch}...main` — if `total_commits` is 0, the branch is already in sync -3. **PR Creation**: Creates a PR via `POST /repos/{owner}/{repo}/pulls` with `head: main`, `base: {branch}` -4. **Duplicate Prevention**: Before creating, checks for existing open PRs with the same head/base -5. **Auto-Merge**: If `mergeable: true`, merges via `POST /repos/{owner}/{repo}/pulls/{index}/merge` with merge style -6. **Conflict Handling**: If `mergeable: false`, the PR stays open with a clear description for manual resolution - ---- - -## Workflow Triggers - -| Trigger | Condition | -|---------|-----------| -| `push` to `main` | Every push (PR merges, bot commits, direct pushes) | -| `workflow_dispatch` | Manual trigger from Gitea Actions UI | - -### Automatic Skipping - -The workflow skips execution when: -- The commit message contains `[skip ci]` -- The commit message contains `[skip cascade]` - ---- - -## Configuration - -### Environment Variables - -| Variable | Default | Description | -|----------|---------|-------------| -| `GITEA_URL` | `https://git.mokoconsulting.tech` | Gitea instance URL | -| `GITEA_ORG` | `github.repository_owner` | Organization name | -| `GITEA_REPO` | `github.event.repository.name` | Repository name | - -### Secrets - -| Secret | Required | Description | -|--------|----------|-------------| -| `GA_TOKEN` | Yes | Gitea API token with repo write + PR permissions | - -### Runner - -Runs on `ubuntu-latest` — no special runner requirements. - ---- - -## Conflict Resolution - -When the auto-merge detects conflicts: - -1. The workflow creates (or reuses) a PR titled `chore: cascade main → {branch} ({sha}) [skip ci]` -2. The PR body explains the conflict and links to the workflow -3. The workflow exits successfully (not a failure — conflicts are expected) -4. A developer must: - - Check out the PR locally - - Resolve conflicts - - Push the resolution - - Merge the PR - -### Common Conflict Sources - -- **Version files**: `README.md` VERSION header, `updates.xml` (dev has different version than main) -- **Changelog**: Both branches modified `CHANGELOG.md` -- **CI configs**: Workflow files modified independently on both branches - ---- - -## Skipping Cascade - -### Per-Commit - -Add `[skip cascade]` to the commit message: - -```bash -git commit -m "chore: version bump [skip cascade]" -``` - -### Per-Push - -The `[skip ci]` tag also prevents cascade (since the workflow checks both). - ---- - -## Deployment - -The workflow file `.gitea/workflows/cascade-dev.yml` is deployed to all governed repositories (non-platform, non-standards, non-template repos). - -### Excluded Repositories - -- `gitea-org-config`, `org-profile`, `gitea-private`, `gitea-server-setup` — Platform/infra -- `MokoStandards`, `MokoStandards-API`, `MokoTesting` — Standards repos -- `MokoStandards-Template-*`, `MokoDoliProjTemplate` — Template repos - -### Adding to a New Repository - -The cascade workflow is automatically deployed by the bulk sync process. To manually add: - -1. Copy `.gitea/workflows/cascade-dev.yml` from any governed repo -2. Ensure the repo has at least one target branch (`dev`, `rc/*`, `beta/*`, or `alpha/*`) -3. Ensure `GA_TOKEN` secret is configured - ---- - -## Troubleshooting - -### Cascade Not Triggering - -**Symptom**: Push to main but no cascade run - -**Causes**: -1. Commit message contains `[skip ci]` or `[skip cascade]` -2. Workflow file missing from repo -3. `GA_TOKEN` secret not configured - -**Solution**: Check Actions tab for skipped runs; verify workflow file exists on `main` - -### Cascade Creates PR But Doesn't Merge - -**Symptom**: PR created but left open - -**Cause**: Merge conflicts between `main` and the target branch - -**Solution**: Resolve conflicts locally and merge the PR manually - -### "No cascade target branches found" Message - -**Symptom**: Workflow logs show "No cascade target branches found" - -**Cause**: Repository doesn't have any target branches (`dev`, `rc/*`, `beta/*`, `alpha/*`) - -**Solution**: Create a target branch from main: `git checkout -b dev main && git push origin dev` - ---- - -## Related Documentation - -- [Branch Protection Setup](./branch-protection.md) -- [Dev Branch Tracking](./dev-branch-tracking.md) -- [Workflow Architecture](./workflow-architecture.md) -- [Bulk Repository Sync](./bulk-repo-sync.md) - -## Changelog - -| Version | Date | Changes | -|---------|------|---------| -| 01.00.00 | 2026-05-07 | Initial release — PR-based merge with conflict detection | -| 02.00.00 | 2026-05-07 | Cascade to all open branches (dev, rc/*, beta/*, alpha/*), not just dev | diff --git a/docs/workflows/changelog-management.md b/docs/workflows/changelog-management.md deleted file mode 100644 index 2cef524..0000000 --- a/docs/workflows/changelog-management.md +++ /dev/null @@ -1,338 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Changelog Management System - -This document describes the changelog management system for MokoStandards, including scripts and workflows for maintaining CHANGELOG.md according to [Keep a Changelog](https://keepachangelog.com/) format. - -## Overview - -The changelog management system consists of: - -1. **Scripts**: Python scripts for updating and releasing versions -2. **Workflows**: GitHub Actions for automated changelog management -3. **Format**: Follows Keep a Changelog with Semantic Versioning - -## Scripts - -### update_changelog.py - -Updates CHANGELOG.md by adding entries to the UNRELEASED section. - -**Usage**: -```bash -# Add a simple entry -python3 api/maintenance/update_changelog.py --category Added --entry "New feature X" - -# Add an entry with subcategory -python3 api/maintenance/update_changelog.py --category Changed --entry "Updated API" --subcategory "API" - -# Display current UNRELEASED section -python3 api/maintenance/update_changelog.py --show -``` - -**Categories**: Added, Changed, Deprecated, Removed, Fixed, Security - -**Features**: -- Automatically creates category sections if they don't exist -- Maintains proper formatting and indentation -- Supports subcategories for better organization -- Validates category names - -### release_version.py - -Releases a version by moving UNRELEASED items to a versioned section, updating VERSION headers in files, and optionally creating a GitHub release. - -**Usage**: -```bash -# Release version (updates CHANGELOG only) -python3 api/maintenance/release_version.py --version 05.01.00 - -# Release with custom date -python3 api/maintenance/release_version.py --version 05.01.00 --date 2026-01-15 - -# Release and update VERSION in all files -python3 api/maintenance/release_version.py --version 05.01.00 --update-files - -# Release, update files, and create GitHub release -python3 api/maintenance/release_version.py --version 05.01.00 --update-files --create-release - -# Dry run to preview changes -python3 api/maintenance/release_version.py --version 05.01.00 --update-files --create-release --dry-run -``` - -**Features**: -- Validates version format (XX.YY.ZZ) -- Moves UNRELEASED content to new version section -- Updates VERSION header in all repository files -- Creates GitHub releases with extracted notes -- Supports dry-run mode for testing - -## Workflows - -### Update Changelog Workflow - -**File**: `.gitea/workflows/changelog_update.yml` - -**Trigger**: Manual workflow dispatch - -**Purpose**: Add entries to CHANGELOG.md UNRELEASED section via GitHub Actions UI - -**Inputs**: -- `category`: Changelog category (Added/Changed/Deprecated/Removed/Fixed/Security) -- `entry`: Entry text -- `subcategory`: Optional subcategory/subheading - -**Process**: -1. Runs update_changelog.py script -2. Creates a Pull Request with changes -3. Labels PR with `documentation` and `automated` - -**Usage**: -1. Go to Actions → Update Changelog -2. Click "Run workflow" -3. Fill in the form -4. Review and merge the created PR - -### Version Release Workflow - -**File**: `.gitea/workflows/version_release.yml` - -**Trigger**: Manual workflow dispatch - -**Purpose**: Release a new version by moving UNRELEASED items, updating files, and creating GitHub release - -**Inputs**: -- `version`: Version number in XX.YY.ZZ format -- `date`: Optional release date (defaults to today) -- `update_files`: Whether to update VERSION in all files -- `create_release`: Whether to create GitHub release - -**Process**: -1. Validates version format -2. Releases version in CHANGELOG.md -3. Updates VERSION headers in all files (if enabled) -4. Commits changes -5. Creates Pull Request for review -6. Creates GitHub release after PR merge (if enabled) - -**Usage**: -1. Go to Actions → Release Version -2. Click "Run workflow" -3. Enter version number (e.g., 05.01.00) -4. Select options (update files, create release) -5. Review and merge the created PR -6. GitHub release is created automatically - -## Changelog Format - -### Structure - -```markdown -# Changelog - -## [UNRELEASED] - -## [05.01.00] - 2026-01-15 -### Added -- New feature description - -### Changed -- Change description - -### Security -- Security improvement - -## [05.00.00] - 2026-01-04 -... -``` - -### Categories - -- **Added**: New features -- **Changed**: Changes in existing functionality -- **Deprecated**: Soon-to-be removed features -- **Removed**: Removed features -- **Fixed**: Bug fixes -- **Security**: Security improvements - -### Best Practices - -1. **Be Specific**: Describe what changed and why -2. **User-Focused**: Write from user's perspective -3. **Group Related**: Use subcategories for related changes -4. **Link Issues**: Reference issue/PR numbers when relevant -5. **Keep Updated**: Add entries as changes are made - -## Version Format - -Versions follow the format: **XX.YY.ZZ** - -- **XX**: Major version (breaking changes) -- **YY**: Minor version (new features, backward compatible) -- **ZZ**: Patch version (bug fixes) - -Examples: `05.00.00`, `05.01.00`, `05.01.01` - -## Integration with Development Workflow - -### During Development - -1. Make code changes -2. Add changelog entry using script or workflow: - ```bash - python3 api/maintenance/update_changelog.py --category Added --entry "Feature description" - ``` -3. Commit both code and changelog changes - -### For Releases - -1. Ensure all changes are in UNRELEASED section -2. Run version release workflow: - - Actions → Release Version - - Enter version number - - Enable "Update files" and "Create release" -3. Review the created PR -4. Merge PR to complete release -5. GitHub release is created automatically - -### Manual Release (Alternative) - -```bash -# 1. Release version -python3 api/maintenance/release_version.py --version 05.01.00 --update-files - -# 2. Commit changes -git add . -git commit -m "release: version 05.01.00" - -# 3. Create GitHub release -python3 api/maintenance/release_version.py --version 05.01.00 --create-release - -# 4. Push changes -git push origin main -``` - -## File VERSION Headers - -All files with version headers are automatically updated during release: - -```markdown -VERSION: 04.06.00 -``` - -Supported file types: -- Markdown (`.md`) -- Python (`.py`) -- YAML (`.yml`, `.yaml`) -- Text (`.txt`) - -## GitHub Release Creation - -When `--create-release` is used, the script: - -1. Extracts release notes from CHANGELOG.md for the version -2. Creates a Git tag (e.g., `v05.01.00`) -3. Creates GitHub release with: - - Tag name: `v{version}` - - Title: `Release {version}` - - Notes: Extracted from CHANGELOG.md - -Requires `gh` CLI to be installed and authenticated. - -## Troubleshooting - -### UNRELEASED Section Not Found - -Ensure CHANGELOG.md has an `## [UNRELEASED]` heading. - -### Version Format Error - -Use XX.YY.ZZ format (e.g., `05.01.00`, not `5.1.0`). - -### GitHub Release Failed - -- Ensure `gh` CLI is installed: `gh --version` -- Authenticate: `gh auth login` -- Check repository permissions - -### File Update Issues - -- Ensure files have VERSION headers in correct format -- Check file permissions -- Review dry-run output first - -## Examples - -### Example 1: Add New Feature - -```bash -# Add to UNRELEASED -python3 api/maintenance/update_changelog.py \ - --category Added \ - --entry "Support for custom themes" \ - --subcategory "UI" - -# View changes -python3 api/maintenance/update_changelog.py --show -``` - -### Example 2: Release Minor Version - -```bash -# Release 05.01.00 -python3 api/maintenance/release_version.py \ - --version 05.01.00 \ - --update-files \ - --create-release -``` - -### Example 3: Security Update - -```bash -# Add security entry -python3 api/maintenance/update_changelog.py \ - --category Security \ - --entry "Fix XSS vulnerability in user input" - -# Release patch version -python3 api/maintenance/release_version.py \ - --version 05.00.01 \ - --update-files \ - --create-release -``` - -## References - -- [Keep a Changelog](https://keepachangelog.com/) -- [Semantic Versioning](https://semver.org/) -- [GitHub CLI Documentation](https://cli.github.com/manual/) - ---- - -## Metadata - -**Document Version**: 05.00.00 -**Last Updated**: 2026-01-04 -**Status**: Active - -## Revision History - -| Version | Date | Description | -|---------|------|-------------| -| 05.00.00 | 2026-01-04 | Initial changelog management system documentation | diff --git a/docs/workflows/demo-deployment.md b/docs/workflows/demo-deployment.md deleted file mode 100644 index dd37fa1..0000000 --- a/docs/workflows/demo-deployment.md +++ /dev/null @@ -1,75 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Demo Server Deployment - -Automated SFTP deployment of the `src/` directory to the demo server on merge to main. - -## Overview - -The `deploy-demo.yml` workflow pushes the contents of `src/` to a demo server over **SFTP** when: - -- A commit is pushed to `main` or `master` -- A pull request targeting `main`/`master` is **merged** -- Triggered manually via workflow dispatch - -Unlike `deploy-dev.yml`, the demo workflow deploys the **real version** (no "development" override). - -## Required Variables - -| Variable | Scope | Description | -|----------|-------|-------------| -| `DEMO_FTP_HOST` | org | Demo server hostname (may include `:port` suffix) | -| `DEMO_FTP_PATH` | org | Base remote path (e.g., `/var/www/demo`) | -| `DEMO_FTP_USERNAME` | org | SFTP username | -| `DEMO_FTP_SUFFIX` | repo | Repo-specific subdirectory appended to `DEMO_FTP_PATH` | -| `DEMO_FTP_PORT` | org (optional) | Explicit port override (auto-detected from host or defaults to 22) | - -## Required Secrets - -| Secret | Scope | Description | -|--------|-------|-------------| -| `DEMO_FTP_KEY` | org | SSH private key (preferred) | -| `DEMO_FTP_PASSWORD` | org | SFTP password or key passphrase | - -At least one of `DEMO_FTP_KEY` or `DEMO_FTP_PASSWORD` must be set. - -## Behaviour - -1. **Permission check** — `jmiller` and `gitea-actions[bot]` are always authorized; other actors need `admin` or `maintain` role -2. **Skip on chore/ branches** — PRs from `chore/` branches do not trigger deployment -3. **Skip if DEMO_FTP_SUFFIX not set** — repos without the variable are silently skipped -4. **Clear remote folder** — always clears the remote destination before uploading -5. **Upload** — deploys via `deploy-sftp.php` using phpseclib3 -6. **Failure issue** — creates/updates a `deploy-failure` issue on error - -## Differences from Dev Deployment - -| Feature | Dev | Demo | -|---------|-----|------| -| Triggers | `dev/**`, `develop`, `development` | `main`, `master` | -| Version | Set to `"development"` | Real version from README.md | -| Variables | `DEV_FTP_*` | `DEMO_FTP_*` | - -## See Also - -- [Dev Deployment](dev-deployment.md) -- [SFTP Guide](../deployment/sftp.md) -- [.ftpignore Reference](../deployment/ftpignore.md) - -> **Note:** `deploy-rs.yml` has been retired. RS deployment is handled via the release pipeline only. diff --git a/docs/workflows/dev-branch-tracking.md b/docs/workflows/dev-branch-tracking.md deleted file mode 100644 index 18e6076..0000000 --- a/docs/workflows/dev-branch-tracking.md +++ /dev/null @@ -1,390 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Dev Branch Tracking and Issue Coordination - -**Status**: Active | **Version**: 02.00.00 | **Effective**: 2026-04-07 - -## Overview - -This document describes the dev/rc branch tracking and issue coordination system. Dev branches use **manual workflow_dispatch** to create tracking issues, while RC branches **auto-create** tracking issues and a draft GitHub Release on branch creation. - -## Branch Issue Summary - -| Branch Type | Issue Creation | Sub-Issues | Draft Release? | -|-------------|---------------|------------|----------------| -| `dev/**` | Manual (workflow_dispatch) | 7 sub-issues | No | -| `alpha/**` | Manual (workflow_dispatch) | 7 sub-issues | No | -| `beta/**` | Manual (workflow_dispatch) | 7 sub-issues | No | -| `rc/**` | Automatic (on branch creation) | 5 sub-issues | Yes | - -**Note**: Alpha and beta branches are optional stages. Dev can go directly to rc when internal/external testing stages are not needed. - -## System Components - -The tracking system consists of three main components: - -### 1. Dev Branch Issue Creation (Manual) - -**Trigger**: Manual `workflow_dispatch` only - -**Purpose**: Creates a tracking issue + 7 sub-issues for a dev branch when manually triggered. - -**Why manual?** Dev branches are exploratory and may be short-lived. Not every dev branch needs full tracking overhead. - -**Actions**: -1. Creates tracking issue with branch details and version info -2. Creates 7 sub-issues: - - Feature development - - Unit testing - - Integration testing - - Code review - - Documentation updates - - Changelog updates - - Version management -3. Assigns issues to `copilot` and `jmiller` -4. Adds labels: `automation`, `version-management`, `dev-branch` - -### 2. RC Branch Issue Creation (Automatic) - -**Trigger**: Automatic on `rc/**` branch creation - -**Purpose**: Auto-creates a tracking issue + 5 sub-issues + draft GitHub Release when an RC branch is pushed. - -**Actions**: -1. Creates tracking issue with RC branch details and version -2. Creates 5 sub-issues: - - Comprehensive testing (functional, integration, performance) - - Bug fixes and regression testing - - Documentation and changelog finalization - - Release notes preparation - - Final verification and sign-off -3. Creates a **draft GitHub Release** for the major version (`vXX`) -4. Assigns issues to `copilot` and `jmiller` -5. Adds labels: `automation`, `version-management`, `rc-branch` - -The draft release is later published by `auto-release.yml` when the RC merges to main. - -### 2. Enterprise Issue Manager Workflow - -**File**: `.gitea/workflows/enterprise-issue-manager.yml` - -**Purpose**: Coordinates pull requests with dev branch tracking issues throughout the PR lifecycle. - -**Triggers**: -- Pull request events: `opened`, `closed`, `reopened`, `ready_for_review` -- Branch deletion events -- Manual workflow dispatch - -**Actions for PRs**: - -**When PR Opens** (targeting dev/rc branch): -1. Finds the tracking issue for the base branch -2. Adds PR as checklist item in the "📝 Pull Requests" section -3. Comments on the tracking issue with PR details - -**When PR Merges** (to dev/rc branch): -1. Updates checklist item from `[ ]` to `[x]` in tracking issue -2. Comments on tracking issue confirming merge - -**When PR Merges to Main**: -1. Closes the tracking issue for the merged branch -2. Adds comprehensive closing comment with merge details - -**When Branch Deleted**: -1. Finds and closes the tracking issue -2. Adds comment explaining branch deletion - -### 3. Dev Branch Tracking Issue Template - -**File**: `.github/ISSUE_TEMPLATE/dev-branch-tracking.md` - -**Purpose**: Manual creation of tracking issues for dev branches not created by the workflow. - -**Use Cases**: -- Manually created dev branches -- Retroactively adding tracking for existing branches -- Custom branch naming outside standard pattern - -**Contents**: -- Placeholder fields for branch name and version -- Complete 10-section launch checklist -- PR tracking section -- Labels and assignees pre-configured - -## Sub-Issue Checklists - -### Dev Branch Sub-Issues (7) - -When manually triggered via workflow_dispatch, the following sub-issues are created: - -1. **Feature Development** — implement planned features for this version -2. **Unit Testing** — write and pass unit tests for new code -3. **Integration Testing** — verify integration with other components -4. **Code Review** — address all review comments, re-review significant changes -5. **Documentation Updates** — update README, user guides, examples -6. **Changelog Updates** — document all changes grouped by type (Added, Changed, Fixed, etc.) -7. **Version Management** — ensure version consistency across all files, update headers - -### RC Branch Sub-Issues (5) - -Automatically created when an `rc/**` branch is pushed: - -1. **Comprehensive Testing** — functional, integration, and performance testing -2. **Bug Fixes and Regression** — fix issues found in testing, verify no regressions -3. **Documentation and Changelog** — finalize docs and CHANGELOG.md -4. **Release Notes Preparation** — draft release notes, document breaking changes, migration guide -5. **Final Verification and Sign-off** — all PRs merged, no blocking issues, ready for main - -## Workflow Sequence - -### Dev Branch Lifecycle (Manual Trigger) - -```mermaid -sequenceDiagram - participant Dev as Developer - participant GH as GitHub Actions - participant Issue as Tracking Issue - participant EIM as Enterprise Issue Manager - participant DevBranch as dev/XX.YY - - Dev->>DevBranch: Create dev branch manually - Dev->>GH: Run workflow_dispatch - GH->>Issue: Create tracking issue + 7 sub-issues - - Dev->>DevBranch: Open PR #123 - DevBranch->>EIM: Trigger on PR opened - EIM->>Issue: Add PR #123 to checklist - - Dev->>DevBranch: Merge PR #123 - DevBranch->>EIM: Trigger on PR closed - EIM->>Issue: Mark PR #123 as [x] -``` - -### RC Branch Lifecycle (Automatic) - -```mermaid -sequenceDiagram - participant Dev as Developer - participant RCBranch as rc/XX.YY.ZZ - participant GH as GitHub Actions - participant Issue as Tracking Issue - participant Release as Draft Release - participant Main as main - - Dev->>RCBranch: Push rc/XX.YY.ZZ branch - RCBranch->>GH: Auto-trigger on branch creation - GH->>Issue: Create tracking issue + 5 sub-issues - GH->>Release: Create draft GitHub Release (vXX) - - Dev->>RCBranch: Test and fix bugs - Dev->>Main: Merge RC to main via PR - Main->>GH: auto-release.yml publishes draft release - GH->>Issue: Close tracking issue -``` - -## Usage Examples - -### Automatic Workflow - -No action required. When a PR is merged to main: - -```bash -# Developer merges PR to main via GitHub UI -# Workflow automatically: -# 1. Creates dev/04.01 branch -# 2. Creates tracking issue #456 -# 3. Assigns to copilot and jmiller -``` - -### Manual Issue Creation - -For manually created dev branches: - -1. Navigate to repository Issues -2. Click "New Issue" -3. Select "Dev Branch Tracking" template -4. Fill in the placeholders: - - Replace `XX.YY.ZZ` with actual version - - Update branch name in details - - Add creation date -5. Submit issue - -### Working with Tracking Issues - -**As a Developer:** - -```bash -# 1. Check out the dev branch -git fetch origin -git checkout dev/04.01 - -# 2. Find the tracking issue (labeled 'dev-branch') -# 3. Create PR targeting the dev branch -gh pr create --base dev/04.01 --title "Add feature X" - -# 4. PR automatically added to tracking issue -# 5. When ready to merge to main, complete checklist in tracking issue -# 6. Create final PR to main -gh pr create --base main --head dev/04.01 --title "Release 04.00.04" -``` - -**As a Reviewer:** - -1. Review PR targeting dev branch -2. Check tracking issue for context -3. Verify checklist items as they're completed -4. Before approving final PR to main, verify all checklist items are complete - -## Integration with Other Workflows - -### Pre-Merge Checklist Policy - -The launch checklist aligns with the [Copilot Pre-Merge Checklist Policy](../policy/copilot-pre-merge-checklist.md): - -- Same 8 core sections -- Additional 2 sections specific to branch merges -- Reference link included in every tracking issue - -### Standards Compliance Workflow - -The "Standards Compliance" checklist section integrates with: -- `.gitea/workflows/standards-compliance.yml` -- File header validation -- Formatting standards checks - -### Security Workflows - -The "Security Scanning" checklist section integrates with: -- CodeQL security analysis -- Dependency review workflow -- Secret scanning - -## Configuration - -### Assignees - -Default assignees for tracking issues: -- `copilot` (GitHub Copilot agent) -- `jmiller` (organization owner — GitHub assignees must be a user account, not an org) - -To change assignees: -- **Auto-created issues**: Edit `.gitea/workflows/auto-create-dev-branch.yml` line 289 -- **Manual template**: Edit `.github/ISSUE_TEMPLATE/dev-branch-tracking.md` line 6 - -### Labels - -Default labels for tracking issues: -- `automation` - Automated process -- `version-management` - Version tracking -- `dev-branch` - Development branch marker - -To change labels: -- **Auto-created issues**: Edit `.gitea/workflows/auto-create-dev-branch.yml` line 288 -- **Manual template**: Edit `.github/ISSUE_TEMPLATE/dev-branch-tracking.md` line 5 - -### Branch Patterns - -The system tracks branches matching: -- `dev/*` - Development branches -- `alpha/*` - Alpha testing branches (optional stage) -- `beta/*` - Beta testing branches (optional stage) -- `rc/*` - Release candidate branches - -To modify patterns, edit `.gitea/workflows/enterprise-issue-manager.yml` line 143. - -## Troubleshooting - -### Tracking Issue Not Found - -**Symptom**: PR opened but not linked to tracking issue - -**Causes**: -1. Branch name doesn't match pattern (`dev/*`, `alpha/*`, `beta/*`, or `rc/*`) -2. Tracking issue doesn't exist -3. Tracking issue missing `dev-branch` label - -**Solution**: -1. Verify branch name starts with `dev/`, `alpha/`, `beta/`, or `rc/` -2. Check if tracking issue exists with label `dev-branch` -3. Manually create issue using template if needed - -### PR Not Added to Tracking Issue - -**Symptom**: PR opened but not appearing in tracking issue - -**Causes**: -1. Tracking issue has non-standard format -2. Missing "📝 Pull Requests" section -3. Workflow error (check Actions tab) - -**Solution**: -1. Check workflow run in Actions tab for errors -2. Manually add PR to tracking issue: `- [ ] #123 - PR Title (@author)` -3. Ensure tracking issue has "📝 Pull Requests" section - -### Tracking Issue Not Closing - -**Symptom**: Dev branch merged to main but issue still open - -**Causes**: -1. Branch name mismatch in issue body -2. Workflow not triggered on merge -3. Issue manually closed earlier - -**Solution**: -1. Verify issue body contains correct branch name in backticks -2. Check Actions tab for workflow run on merge -3. Manually close issue if workflow didn't run - -## Best Practices - -### For Maintainers - -1. **Monitor tracking issues** - Review open dev-branch issues regularly -2. **Complete checklists** - Don't skip checklist items before merging to main -3. **Update assignees** - Add relevant team members to tracking issues -4. **Link related issues** - Reference related issues in tracking issue comments - -### For Contributors - -1. **Check tracking issue** - Review before creating PR to dev branch -2. **Follow checklist** - Use checklist as guide for PR requirements -3. **Update status** - Comment on tracking issue with progress updates -4. **Test thoroughly** - Verify all checklist items apply to your changes - -### For CI/CD - -1. **Status checks** - Reference tracking issue in PR descriptions -2. **Automated tests** - Run tests mentioned in checklist automatically -3. **Quality gates** - Block merge if checklist items incomplete -4. **Documentation** - Auto-generate release notes from tracking issues - -## Related Documentation - -- [Copilot Pre-Merge Checklist Policy](../policy/copilot-pre-merge-checklist.md) -- [Auto-Create Dev Branch Workflow](../../.gitea/workflows/auto-create-dev-branch.yml) -- [Enterprise Issue Manager Workflow](../../.gitea/workflows/enterprise-issue-manager.yml) -- [Dev Branch Tracking Template](../../.github/ISSUE_TEMPLATE/dev-branch-tracking.md) -- [Workflow Architecture](./workflow-architecture.md) -- [Contributing Guide](../../CONTRIBUTING.md) - -## Changelog - -| Version | Date | Changes | -|---------|------|---------| -| 02.00.00 | 2026-04-07 | Rewrite: dev branches use manual workflow_dispatch, RC branches auto-create issues + draft release. Updated sub-issue counts (7 for dev, 5 for RC) | -| 01.00.00 | 2026-02-06 | Initial documentation of dev branch tracking system | diff --git a/docs/workflows/dev-deployment.md b/docs/workflows/dev-deployment.md deleted file mode 100644 index 7cabf35..0000000 --- a/docs/workflows/dev-deployment.md +++ /dev/null @@ -1,280 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Development Server Deployment - -Automated SFTP deployment of the `src/` directory to the development server. - -## Overview - -The `deploy-dev.yml` workflow pushes the contents of `src/` to a development server over **SFTP only** when: - -- A commit is pushed to `dev/**`, `alpha/**`, `beta/**`, `rc/**`, `develop`, or `development` branches (and `src/**` changed) -- A pull request targeting those branches is **merged** (skips `chore/` branches) -- Triggered manually via workflow dispatch - -**Access control:** `jmiller` and `gitea-actions[bot]` are always authorized. Other actors need **admin** or **maintain** role. - -**Skips when:** `DEV_FTP_SUFFIX` variable is not set, or the branch starts with `chore/`. - ---- - -## Configuration - -### Organization Variables (required) - -Configure at the **organization** level in **Settings → Secrets and variables → Actions → Variables**: - -| Variable | Example | Description | -|----------|---------|-------------| -| `DEV_FTP_HOST` | `dev.example.com` | Dev server hostname. May include an explicit port suffix — `dev.example.com:2222`. | -| `DEV_FTP_PATH` | `/var/www/html` | Base remote path where files are deployed. | -| `DEV_FTP_USERNAME` | `deployuser` | SFTP username for authentication. | - -### Organization Variable (optional) - -| Variable | Example | Description | -|----------|---------|-------------| -| `DEV_FTP_PORT` | `2222` | Explicit port override. See **Port resolution** below. | - -### Repository Variable (optional) - -| Variable | Example | Description | -|----------|---------|-------------| -| `DEV_FTP_SUFFIX` | `my-module` | Appended to `DEV_FTP_PATH` to form the final deploy path: `DEV_FTP_PATH/DEV_FTP_SUFFIX`. Useful for deploying multiple repos to the same server. | - -### Organization Secrets (credentials) - -At least one of the following must be set: - -| Secret | Description | -|--------|-------------| -| `DEV_FTP_KEY` | **Preferred.** SSH private key (any format supported by OpenSSH). | -| `DEV_FTP_PASSWORD` | SFTP password. Also used as the key passphrase when set alongside `DEV_FTP_KEY`. | - ---- - -## Authentication logic - -The workflow determines the connection method at runtime: - -| Secrets present | Behaviour | -|-----------------|-----------| -| `DEV_FTP_KEY` + `DEV_FTP_PASSWORD` | Key auth with `DEV_FTP_PASSWORD` as the key passphrase. If key auth fails, retries with `DEV_FTP_PASSWORD` alone as an SFTP password. | -| `DEV_FTP_KEY` only | Key auth (no passphrase). Fails hard on auth error — no password fallback. | -| `DEV_FTP_PASSWORD` only | Password auth directly. | -| Neither | Workflow fails with an error message. | - ---- - -## Port resolution - -The SFTP port is determined in the following order — the first match wins: - -1. **`DEV_FTP_PORT` variable** — explicit override, highest priority. -2. **Port suffix in `DEV_FTP_HOST`** — if the host value contains `:`, the suffix is extracted and the bare hostname is used (e.g. `dev.example.com:2222` → host `dev.example.com`, port `2222`). -3. **Default** — port **22** is assumed when neither of the above is present. - ---- - -## Remote path - -The final remote path is constructed as: - -``` -DEV_FTP_PATH/DEV_FTP_SUFFIX -``` - -`DEV_FTP_SUFFIX` is optional. When set, exactly one `/` is inserted between the base path and the value regardless of trailing/leading slashes in the values. - ---- - -## Manual dispatch - -1. Go to **Actions → Deploy to Dev Server (SFTP)**. -2. Click **Run workflow**. -3. Optionally override the source directory (default: `src`) or enable **Dry run** to list files without uploading. - ---- - -## Repository health checks - -The `check_repo_health.php` script scores deployment readiness as part of the overall health report. When `--repo owner/repo` is supplied, it also calls the GitHub API to verify secrets and variables are configured. - -### Deployment category checks - -| Check | Points | Requires `--repo` | -|-------|--------|------------------| -| `deploy-dev.yml` workflow exists | 5 | No | -| `DEV_FTP_HOST` variable configured | 3 | Yes | -| `DEV_FTP_PATH` variable configured | 3 | Yes | -| `DEV_FTP_USERNAME` variable configured | 2 | Yes | -| SFTP credentials configured (`DEV_FTP_KEY` or `DEV_FTP_PASSWORD`) | 2 | Yes | - -Variables and secrets are checked at both the **org level** and **repo level** — a check passes if the item exists at either scope. - ---- - -## Examples - -### Example 1 — SSH key with passphrase, custom port - -**Org variables:** -``` -DEV_FTP_HOST = dev.example.com -DEV_FTP_PORT = 2222 -DEV_FTP_PATH = /var/www/html -DEV_FTP_USERNAME = deployuser -``` - -**Org secrets:** -``` -DEV_FTP_KEY = -DEV_FTP_PASSWORD = mysecretphrase -``` - -**Behaviour:** Key loaded with `mysecretphrase` as passphrase. If key auth fails, retries with `mysecretphrase` as the SFTP password. - ---- - -### Example 2 — SSH key, port embedded in host - -**Org variables:** -``` -DEV_FTP_HOST = dev.example.com:2222 -DEV_FTP_PATH = /var/www/html -DEV_FTP_USERNAME = deployuser -``` - -**Org secret:** -``` -DEV_FTP_KEY = -``` - -**Behaviour:** Port `2222` extracted from host. Key used without passphrase; no password fallback. - ---- - -### Example 3 — Password only, default port - -**Org variables:** -``` -DEV_FTP_HOST = dev.example.com -DEV_FTP_PATH = /var/www/html -DEV_FTP_USERNAME = deployuser -``` - -**Org secret:** -``` -DEV_FTP_PASSWORD = secretpass -``` - -**Behaviour:** Port defaults to 22. Connects with password directly. - ---- - -### Example 4 — Multiple repos, same server - -Each repo sets its own `DEV_FTP_SUFFIX`: - -| Repo | Suffix | Deploys to | -|------|--------|------------| -| `project-a` | `/project-a` | `/var/www/html/project-a` | -| `project-b` | `/project-b` | `/var/www/html/project-b` | - ---- - -## Troubleshooting - -### Permission denied - -``` -❌ Deployment requires admin or maintain role. -``` - -Only org/repo administrators and maintainers may deploy. Contact your org administrator. - -### No credentials configured - -``` -❌ No SFTP credentials configured. - Set DEV_FTP_KEY (preferred) or DEV_FTP_PASSWORD as an org-level secret. -``` - -Set at least one of `DEV_FTP_KEY` or `DEV_FTP_PASSWORD` in **Org Settings → Secrets**. - -### Key authentication failed, no fallback - -``` -RuntimeError: Key authentication failed and no password fallback is available: ... -``` - -The SSH private key was rejected and `DEV_FTP_PASSWORD` is not set. Check the key is correct and authorized on the server, or add `DEV_FTP_PASSWORD` as a fallback. - -### Missing source directory - -``` -⚠️ Source directory 'src' not found — skipping deployment -``` - -Expected behaviour for repos without a `src/` directory. No files are uploaded; the workflow exits successfully. - -### Connection refused - -``` -[Errno 111] Connection refused -``` - -- Verify `DEV_FTP_HOST` is correct. -- Check the resolved port (shown in the **Resolve SFTP host and port** step log). -- Confirm the server firewall allows inbound SFTP on that port. - ---- - -## Related documentation - -- [Workflow inventory](./workflow-inventory.md) -- [Bulk repository sync](./bulk-repo-sync.md) -- [MokoStandards repo-sync guide](../guide/repo-sync.md) -- [Workflow template source](../../templates/workflows/shared/deploy-dev.yml.template) - ---- - -## Metadata - -| Field | Value | -|---------------|-------------------------------------------------------------| -| Document Type | Guide | -| Domain | Operations | -| Applies To | All Repositories | -| Jurisdiction | Tennessee, USA | -| Owner | Moko Consulting | -| Repo | https://git.mokoconsulting.tech/MokoConsulting/MokoStandards | -| Path | /docs/workflows/dev-deployment.md | -| Version | 04.06.00 | -| Status | Active | -| Last Reviewed | 2026-04-07 | -| Reviewed By | Documentation Team | - -## Revision History - -| Date | Author | Change | -|------------|-----------------|----------------------------------------------------------------------| -| 2026-03-12 | Moko Consulting | Rewrote for SFTP-only workflow; added auth fallback, port resolution, health check docs | -| 2026-01-28 | Moko Consulting | Standardized metadata and revision history | -| 2026-01-17 | Moko Consulting | Initial dev deployment workflow documentation | diff --git a/docs/workflows/index.md b/docs/workflows/index.md deleted file mode 100644 index 9bdafb7..0000000 --- a/docs/workflows/index.md +++ /dev/null @@ -1,75 +0,0 @@ -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Docs Index: /docs/workflows - -## Purpose - -Documentation for all GitHub Actions workflows used across governed repositories. - -## Deployment Workflows - -### Dolibarr + Generic (automatic FTP deploy) - -- [Dev Deployment](./dev-deployment.md) — deploy to dev FTP on push to `dev/**`, `alpha/**`, `beta/**`, or `rc/**` -- [Demo Deployment](./demo-deployment.md) — deploy to demo FTP on push to `main` - -> **Note:** `deploy-rs.yml` is **retired**. RS deployment is handled via the release pipeline only. See [RS Deployment (deprecated)](./rs-deployment.md). - -### Joomla (no automatic FTP deploy) - -Joomla repos use GitHub Release ZIPs via `auto-release.yml` + `updates.xml`. No automatic FTP deploy. - -- [Deploy Manual](./deploy-manual.md) — manual workflow_dispatch FTP deploy for Joomla dev testing - -## Release & Version Workflows - -- [Auto Release](./auto-release.md) — platform-specific GitHub Release on push to main (generic, Joomla, Dolibarr) -- [Build Release](./build-release.md) — build release artifacts -- [Release System](./release-system.md) — end-to-end release lifecycle (dev → rc → main) -- [Changelog Management](./changelog-management.md) — automated changelog generation -- [Changelog Validation](./changelog-validation.md) — validates CHANGELOG.md format on PR - -## Client Repositories - -- [Client Repo Standards](../client-repos.md) — naming, privacy, structure, deployment for client-* repos - -## CI & Compliance Workflows - -- [CI Joomla](./ci-joomla.md) — Joomla-specific CI checks (manifest validation, language files, XML lint) -- [CI Dolibarr](./ci-dolibarr.md) — Dolibarr-specific CI checks (module descriptor, PHP lint) -- [Standards Compliance](./standards-compliance.md) — enterprise standards validation -- [Repo Health](./repo-health.md) — platform-aware repository health checks -- [Shared Workflows](./shared-workflows.md) — reusable workflow templates -- [Reusable Workflows](./reusable-workflows.md) — reusable workflow reference -- [Workflow Architecture](./workflow-architecture.md) — design and architecture -- [Workflow Inventory](./workflow-inventory.md) — complete inventory of all workflows - -## Branch & Issue Management - -- [Dev Branch Tracking](./dev-branch-tracking.md) — manual issue creation for dev branches, auto-creation for rc branches -- [Sub-Issue Management](./sub-issue-management.md) — hierarchical issue tracking - -## Update Server - -- [Update Server](./update-server.md) — multi-entry Joomla updates.xml with stability filtering -- [Reserve Dolibarr Module ID](./reserve-dolibarr-module-id.md) — module ID reservation - -## Platform Workflow Matrix - -| Workflow | Joomla | Dolibarr | Generic | -|----------|--------|----------|---------| -| `auto-release.yml` | Yes (ZIP + SHA-256 + updates.xml) | Yes (update.txt) | Yes | -| `deploy-dev.yml` | No | Yes | Yes | -| `deploy-demo.yml` | No | Yes | Yes | -| `deploy-manual.yml` | Yes | No | No | -| `update-server.yml` | Yes | No | No | -| `ci-joomla.yml` | Yes | No | No | -| `ci-dolibarr.yml` | No | Yes | No | -| `repo_health.yml` | Yes | Yes | Yes | -| `changelog-validation.yml` | Yes | Yes | Yes | - -## Metadata - -- **Document Type:** index -- **Last Updated:** 2026-04-07 -- **Version:** 04.06.00 diff --git a/docs/workflows/release-system.md b/docs/workflows/release-system.md deleted file mode 100644 index 2348e7c..0000000 --- a/docs/workflows/release-system.md +++ /dev/null @@ -1,212 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Release System - -## Overview - -The MokoStandards release system uses a branch-based pipeline with platform-specific packaging. Releases flow through development, optional alpha/beta testing, release candidate, and production stages with automated GitHub Release creation, version archiving, and platform-aware asset publishing. - -## Release Lifecycle - -### Version Numbering - -All version files use three-part format: `XX.YY.ZZ` - -- **Patch 00** (`XX.YY.00`) = development only, no release created -- **Patch 01** (`XX.YY.01`) = first release for a minor version -- **Patch 02+** = subsequent releases (bug fixes, improvements) - -### Branch Flow - -``` -dev → [alpha] → [beta] → rc → version/XX → main → dev - optional (integration) (production) (feedback) -``` - -1. **`dev/XX.YY`** or **`dev/feature-name`** — Active development. Patch is 00. No release. -2. **`alpha/XX.YY.ZZ`** — *(Optional)* Early internal testing. Can be skipped — dev can go straight to rc. -3. **`beta/XX.YY.ZZ`** — *(Optional)* Broader external testing. Can be skipped — dev can go straight to rc. -4. **`rc/XX.YY.ZZ`** — Release candidate. Three-part version required (patch >= 01). Auto-creates tracking issue + draft GitHub Release. -5. **`version/XX`** — Major version integration branch (major number only, e.g., `version/04`). All minors and patches flow into the same major branch. -6. **`main`** — Production. Push triggers `auto-release.yml` which publishes the GitHub Release, creates/updates the major tag, and auto-bumps patch. -7. **`main` merges back to `dev`** — Completes the cycle. Ensures dev has the latest production state. - -### Release Tags - -Each stability level has its own GitHub Release tag: - -| Tag | Stability | Contents | -|-----|-----------|----------| -| `development` | Development | Dev ZIPs | -| `alpha` | Alpha | Alpha ZIPs | -| `beta` | Beta | Beta ZIPs | -| `release-candidate` | RC | RC ZIPs | -| `vXX` | Stable production | Stable ZIPs (major only, e.g., `v04`) | - -- The `vXX` production tag is **major only** — one release per major version -## Workflow Location (v2)All workflows MUST be in `.gitea/workflows/` only. Gitea Actions does not run workflows from `.github/workflows/`. Having files in `.github/workflows/` creates ghost queued runs that block the runner.## Stream TagsReleases use stream-based git tags, NOT version numbers:- `stable` — production release- `release-candidate` — RC testing- `beta` — feature-complete stability testing- `alpha` — early testing- `development` — unstable dev buildsTo trigger a release, push the appropriate stream tag: `git tag -f stable && git push origin stable --force`## Cascade LogicEach stability level cascades to all lower levels in updates.xml:- **stable** → updates development, alpha, beta, rc, stable- **rc** → updates development, alpha, beta, rc- **beta** → updates development, alpha, beta- **alpha** → updates development, alpha- **development** → updates development only## SHA-256 Rules- Never leave `` empty — Joomla fails checksum verification on empty tags- Omit the `` tag entirely if no hash is available- Always set SHA when building a package## creationDateAlways update `` whenever version is bumped — in the manifest AND in updates.xml.## Auto-DetectionThe release workflow (`release.yml`) is fully generic:- `GITEA_REPO` derived from `github.event.repository.name`- `EXT_ELEMENT` auto-detected from the Joomla manifest `` tag- Falls back to manifest filename, then repo name (lowercased)- No per-repo customization needed## Version History (Stable)Stable releases keep up to 5 previous versions in the Gitea release body. -- All minor+patch versions **append** release notes and ZIP assets to the same `vXX` release -- No minor or patch production tags are created -- Example: versions `04.01.01`, `04.02.00`, `04.03.05` all update the same `v04` release -- Pre-release tags (`development`, `alpha`, `beta`, `release-candidate`) are updated in-place - -### Standard Release Process - -1. **Start development**: Create `dev/XX.YY` branch from main -2. **Develop**: Work on the dev branch with version set to `XX.YY.00` -3. **Alpha testing** *(optional)*: Create `alpha/XX.YY.ZZ` branch from dev for early internal testing. Can be skipped. -4. **Beta testing** *(optional)*: Create `beta/XX.YY.ZZ` branch from alpha (or dev) for broader external testing. Can be skipped. -5. **Create RC**: Create `rc/XX.YY.01` branch from beta, alpha, or dev. This auto-creates a tracking issue with 5 sub-issues and a draft GitHub Release -6. **Test RC**: Fix bugs on the RC branch. Deploy to dev server for final testing -7. **Merge to version/XX**: Merge RC to the `version/XX` major integration branch -8. **Merge to main**: Merge `version/XX` to main via PR. `auto-release.yml` fires: - - Publishes the draft release (or creates new one) - - Uploads platform-specific assets (ZIP for Joomla, etc.) - - Creates/updates the `vXX` tag - - Auto-bumps patch version with `[skip ci]` commit -9. **Feedback loop**: Main merges back to dev to start the next cycle - -## Platform-Specific Pipelines - -### Generic Repos - -- `auto-release.yml`: Creates GitHub Release with changelog notes, `vXX` tag -- `deploy-dev.yml`: FTP deploy on push to `dev/**`, `alpha/**`, `beta/**`, or `rc/**` -- `deploy-demo.yml`: FTP deploy on push to `main` -- `changelog-validation.yml`: Validates CHANGELOG.md format on PRs - -### Joomla Repos (waas-component) - -Joomla repos do **not** use automatic FTP deploy workflows. Distribution is via `updates.xml` + GitHub Release ZIPs + manual dev deploy. - -- `auto-release.yml`: Builds ZIP from `src/`, uploads to major release, writes SHA-256 in `updates.xml` -- `update-server.yml`: Writes dev/alpha/beta/rc entries to `updates.xml` on branch push -- `deploy-manual.yml`: Manual workflow_dispatch FTP deploy for dev testing (no automatic deploy) -- `ci-joomla.yml`: Manifest validation, language file checks, XML lint -- `repo_health.yml`: Platform-aware health checks -- `changelog-validation.yml`: Validates CHANGELOG.md format on PRs - -### Dolibarr Repos (crm-module, crm-platform) - -- `auto-release.yml`: Creates GitHub Release, updates `update.txt` and module descriptor version -- `deploy-dev.yml` / `deploy-demo.yml`: FTP deploy -- `publish-to-mokodolimods.yml`: Publishes to MokoDolimods marketplace (crm-module only) -- `ci-dolibarr.yml`: Module descriptor validation, PHP lint -- `repo_health.yml`: Platform-aware health checks -- `changelog-validation.yml`: Validates CHANGELOG.md format on PRs - -## Version Format Summary - -| Context | Format | Example | -|---------|--------|---------| -| Version files | `XX.YY.ZZ` (three-part always) | `04.06.00` | -| Dev branches | `XX.YY` or `XX.YY.ZZ` or `feature-name` | `dev/04.06`, `dev/sidebar-fix` | -| Alpha branches | `XX.YY.ZZ` (three-part, optional stage) | `alpha/04.06.01` | -| Beta branches | `XX.YY.ZZ` (three-part, optional stage) | `beta/04.06.01` | -| RC branches | `XX.YY.ZZ` (three-part required) | `rc/04.06.01` | -| Version branches | `XX` (major only) | `version/04` | -| Release tags (stable) | `vXX` (major only) | `v04` | -| Release tags (pre) | Named per stability level | `development`, `alpha`, `beta`, `release-candidate` | - -## Version Detection - -The `auto-release.yml` workflow reads the version from the `VERSION:` field in the README.md FILE INFORMATION block. This is the single source of truth for the release version. - -## Skipping Releases - -To prevent automatic release creation, include `[skip ci]` in your commit message: - -```bash -git commit -m "docs: update README [skip ci]" -``` - -Commits by `gitea-actions[bot]` are also skipped automatically (e.g., auto-bump commits). - -## Architecture - -### Full Release Cycle - -``` -┌─────────────────────────────────────────────────────────────────┐ -│ dev → [alpha] → [beta] → rc → version/XX → main │ -│ optional optional │ │ -│ └──→ dev│ -└─────────────────────────────────────────────────────────────────┘ -``` - -### Auto-Release Pipeline (on push to main) - -``` -┌──────────────────────────────────────────────────────────┐ -│ Push to main branch │ -│ (version in README.md FILE INFORMATION) │ -└────────────────────┬─────────────────────────────────────┘ - │ - ▼ -┌──────────────────────────────────────────────────────────┐ -│ auto-release.yml (Detect + Route) │ -│ • Read VERSION from README.md │ -│ • Check if vXX tag exists (major-only) │ -│ • Detect platform (.mokostandards → platform field) │ -└────────────────────┬─────────────────────────────────────┘ - │ - ┌──────────┼──────────┐ - ▼ ▼ ▼ - ┌──────────┐ ┌──────────┐ ┌──────────────┐ - │ Generic │ │ Joomla │ │ Dolibarr │ - │ │ │ │ │ │ - │ Tag vXX │ │ Build ZIP│ │ Update │ - │ Release │ │ SHA-256 │ │ update.txt │ - │ notes │ │ update │ │ mod*.class │ - │ │ │ .xml │ │ Tag + release│ - └──────────┘ └──────────┘ └──────────────┘ - │ - ▼ -┌──────────────────────────────────────────────────────────┐ -│ GitHub Release (one per major) │ -│ • Create or update vXX release │ -│ • Append release notes for this minor.patch │ -│ • Upload ZIP assets (Joomla) │ -│ • Auto-bump patch version ([skip ci]) │ -│ • Main merges back to dev (feedback loop) │ -└──────────────────────────────────────────────────────────┘ -``` - -## Configuration Files - -- `.gitea/workflows/auto-release.yml` - Main release workflow (platform-aware) -- `.gitea/workflows/update-server.yml` - Joomla updates.xml generation for dev/alpha/beta/rc -- `.gitea/workflows/changelog-validation.yml` - CHANGELOG.md format validation -- `.mokostandards` - Platform configuration (`platform: joomla|dolibarr|generic`) -- `README.md` - VERSION field (single source of truth) -- `CHANGELOG.md` - Release notes source - -## Best Practices - -1. **Patch 00 is always dev** — never release from patch 00 -2. **RC before release** — always go through `rc/` before merging to main (alpha/beta are optional) -3. **Alpha and beta are optional** — dev can go straight to rc when internal/external testing stages are not needed -4. **One major release object** — all minor+patch append to the same `vXX` GitHub Release -5. **Let auto-bump handle patch** — don't manually bump patch on main -6. **Write clear changelog entries** before creating RC -7. **Test RC on dev server** — RC branches deploy to dev FTP (Dolibarr/Generic) or generate dev updates.xml entries (Joomla) -8. **Main feeds back to dev** — always merge main back to dev after a release to start the next cycle - ---- - -**Last Updated**: 2026-04-07 -**Maintained by**: Moko Consulting Infrastructure Team diff --git a/docs/workflows/renovate.md b/docs/workflows/renovate.md deleted file mode 100644 index 7eb4726..0000000 --- a/docs/workflows/renovate.md +++ /dev/null @@ -1,82 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Renovate Dependency Updates - -**Status**: ✅ Active | **Version**: 01.00.00 | **Last Updated**: 2026-05-07 - -## Overview - -Automated dependency update management using [Renovate](https://docs.renovatebot.com/). Runs centrally from MokoStandards-API and creates PRs for outdated dependencies across all governed repos. - -## Architecture - -- **Central runner**: `renovate.yml` workflow in MokoStandards-API scans all repos -- **Per-repo config**: `renovate.json` in each repo controls update behavior -- **Supported managers**: Composer (PHP), npm (JavaScript) - -## Schedule - -| Trigger | When | -|---------|------| -| Scheduled | Weekly Wednesday 04:00 UTC | -| Manual | Dispatch with optional repo filter and dry-run | - -## Update Behavior - -| Update Type | Action | -|-------------|--------| -| Patch (x.x.Y) | Auto-merge if CI passes | -| Minor (x.Y.0) | PR created, manual review required | -| Major (Y.0.0) | PR created, manual review required | - -## Per-Repo Configuration - -Each repo has a `renovate.json` that extends the recommended config: - -```json -{ - "extends": ["config:recommended", "schedule:weekly"], - "automerge": false, - "packageRules": [ - { "matchUpdateTypes": ["patch"], "automerge": true } - ] -} -``` - -Override in any repo by editing its `renovate.json`. - -## Inputs (Manual Dispatch) - -| Input | Default | Description | -|-------|---------|-------------| -| `repos` | all | Comma-separated repo names | -| `dry_run` | false | Log only, no PRs created | - -## Excluded Repos - -Same exclusion list as other centralized workflows (platform/standards/template repos). - -## Related Documentation - -- [Security Audit](./security-audit.md) -- [Secret Scanning](./secret-scanning.md) -- [Bulk Repository Sync](./bulk-repo-sync.md) - -## Changelog - -| Version | Date | Changes | -|---------|------|---------| -| 01.00.00 | 2026-05-07 | Initial release — centralized Renovate runner | diff --git a/docs/workflows/reserve-dolibarr-module-id.md b/docs/workflows/reserve-dolibarr-module-id.md deleted file mode 100644 index fce2c6d..0000000 --- a/docs/workflows/reserve-dolibarr-module-id.md +++ /dev/null @@ -1,693 +0,0 @@ -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Reserve Dolibarr Module ID Workflow - -**Status**: Active | **Version**: 04.00.04 | **Effective**: 2026-02-21 - -## Overview - -The `reserve-dolibarr-module-id.yml` workflow automates the reservation of Dolibarr module IDs from the Moko Consulting reserved range. Check the **[Module Registry](../development/crm/module-registry.md)** for the current next available ID. It simplifies the module ID reservation process by automatically updating the module registry table and creating a pull request for approval. - -## Quick Links - -- **[Module Registry](../development/crm/module-registry.md)** - Official Dolibarr module number registry -- **[Run Workflow](../../.gitea/workflows/reserve-dolibarr-module-id.yml)** - Reserve a module ID now -- **[Development Guide](../guide/crm/dolibarr-development-guide.md)** - CRM development guide -- **[Development Standards](../policy/crm/development-standards.md)** - Coding standards - -### Key Features - -- **Automatic URL Construction**: Repository URL automatically constructed from repo name with `mokoconsulting-tech` organization -- **Simple Input**: Only requires repository name - all other details are automatically handled -- **Auto-Assignment or Manual ID Selection**: Automatically assigns next available ID or accepts manual specification -- **Conflict Detection**: Validates that the requested ID is not already in use -- **Registry Update**: Updates the [module registry](../development/crm/module-registry.md) in MokoStandards -- **Pull Request Creation**: Automatically creates PR with all changes -- **Optional Remote Push**: Optionally scans the target repository for module ID references (`$this->numero`, `DOLIBARR_MODULE_ID=`), updates them, and opens a PR in that repository - -### Workflow Location - -**File**: `.gitea/workflows/reserve-dolibarr-module-id.yml` -**Trigger**: Manual (workflow_dispatch) -**Permissions**: `contents: write`, `pull-requests: write` -**Repository**: [https://git.mokoconsulting.tech/MokoConsulting/MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -## Architecture - -### Workflow Flow - -``` -┌─────────────────────────────────────────────────────────────────┐ -│ WORKFLOW FLOW DIAGRAM │ -└─────────────────────────────────────────────────────────────────┘ - - TRIGGER: Manual Workflow Dispatch - │ - ▼ - ┌──────────────────┐ - │ Extract Module │ - │ Name from Repo │───┐ github.repository → ModuleName - └──────────────────┘ │ - │ │ - ▼ │ - ┌──────────────────┐ │ - │ Determine ID │◀──┘ Manual or Auto-assign - │ (see registry) │ - └──────────────────┘ - │ - ▼ - ┌──────────────────┐ - │ Check for │ - │ Conflicts │───┐ Scan registry table - └──────────────────┘ │ - │ │ - ▼ │ - ┌──────────────────┐ │ - │ Update Module │◀──┘ - │ Registry Table │ - └──────────────────┘ - │ - ▼ - ┌──────────────────┐ - │ Update Override │───┐ Protect workflow file - │ Configuration │ │ - └──────────────────┘ │ - │ │ - ▼ │ - ┌──────────────────┐ │ - │ Create Branch │◀──┘ reserve-module-id/ - │ and Commit │ - └──────────────────┘ - │ - ▼ - ┌──────────────────┐ - │ Create Pull │───┐ Automated PR - │ Request │ │ - └──────────────────┘ │ - │ │ - ├─────────────────┘ - │ - ▼ - ┌──────────────────┐ - │ Push to Remote │ (Optional) - │ Repository │ - └──────────────────┘ -``` - -### Module ID Range - -**Reserved Range**: 185051-185099 (Moko Consulting) -**Assignment**: Sequential; the workflow scans the [module registry](../development/crm/module-registry.md) for all used IDs and auto-assigns the first free one. - -Always check the **[Module Registry](../development/crm/module-registry.md#dolibarr-extensions-registry)** to see which IDs are currently available before making a reservation. - -## Usage - -### Basic Usage (Auto-Assign, No Remote Push) - -When you want to reserve the next available module ID without pushing to remote: - -```yaml -# Trigger: Actions → Reserve Dolibarr Module ID → Run workflow - -Inputs: - repo_name: "MokoDoliExample" - module_id: (leave empty for auto-assignment) - push_to_remote: false -``` - -**Result**: -- Workflow will auto-assign the next available ID (check the [registry](../development/crm/module-registry.md#dolibarr-extensions-registry) to see which ID that will be) and create PR -- Repository URL automatically constructed as `https://git.mokoconsulting.tech/mokoconsulting-tech/MokoDoliExample` -- Module ID file NOT pushed to remote (you can create it manually later) - -### With Remote Push - -When you want the workflow to scan the remote repository for existing module ID references, update them, and open a PR: - -```yaml -Inputs: - repo_name: "MokoDoliSign" - module_id: 185070 - push_to_remote: true -``` - -**Result**: -- Workflow will validate and reserve ID 185070 (if available) -- Repository URL automatically constructed as `https://git.mokoconsulting.tech/mokoconsulting-tech/MokoDoliSign` -- Scans PHP files for `$this->numero = ` and updates them to `$this->numero = 185070` -- Scans other files for `DOLIBARR_MODULE_ID=` and updates them -- Creates `src/DOLIBARR_MODULE_ID.txt` with the reserved ID -- Opens a PR in the remote repository with all changes - -## Workflow Inputs - -### Required Inputs - -| Input | Type | Description | Example | -|-------|------|-------------|---------| -| `repo_name` | string | Repository name (org automatically set to mokoconsulting-tech) | "MokoDoliExample" | - -**Note**: The repository URL is automatically constructed as `https://git.mokoconsulting.tech/mokoconsulting-tech/{repo_name}`. - -### Optional Inputs - -| Input | Type | Default | Description | -|-------|------|---------|-------------| -| `module_id` | number | (auto-assign) | Specific module ID to assign (185064-185099) | -| `push_to_remote` | boolean | false | Scan remote repository for module ID references, update them, and open a PR with the new ID | - -## What the Workflow Does - -### 1. Module Name and URL Construction - -The workflow uses the provided `repo_name` input and automatically constructs the full repository URL: - -```bash -# Example transformations: -repo_name: "MokoDoliExample" → https://git.mokoconsulting.tech/mokoconsulting-tech/MokoDoliExample -repo_name: "MokoDoliSign" → https://git.mokoconsulting.tech/mokoconsulting-tech/MokoDoliSign -repo_name: "MyModule" → https://git.mokoconsulting.tech/mokoconsulting-tech/MyModule -``` - -**Note**: The organization is always `mokoconsulting-tech` and cannot be changed. - -### 2. Module ID Determination - -**Auto-Assignment Mode** (default): -- Scans [module registry](../development/crm/module-registry.md) for used IDs in range 185064-185099 -- Assigns first available ID sequentially -- Fails if all IDs are reserved - -**Manual Assignment Mode**: -- Validates ID is in range 185064-185099 -- Checks for conflicts -- Fails if ID is already in use - -### 3. Registry Table Update - -Updates [`docs/development/crm/module-registry.md`](../development/crm/module-registry.md): - -```markdown -| Module Name | Module Number | Status | Description | Repository | -|-------------|---------------|--------|-------------|------------| -| MokoDoliExample | 185064 | Reserved | Example module | https://git.mokoconsulting.tech/mokoconsulting-tech/repo | -``` - -**Insertion Point**: Before the "Available for Assignment" line. - -### 4. Override Configuration Update - -Updates `override.config.tf` to protect the workflow file: - -```hcl -{ - path = ".gitea/workflows/reserve-dolibarr-module-id.yml" - reason = "Dolibarr module ID reservation workflow" -}, -``` - -**Purpose**: Prevents the workflow file from being overwritten during bulk sync operations. - -### 5. Pull Request Creation - -Creates a PR with: -- **Branch**: `reserve-module-id/` -- **Title**: "Reserve Dolibarr Module ID {id} for {module_name}" -- **Labels**: `dolibarr`, `module-id-reservation`, `automated` -- **Description**: Comprehensive details about the reservation - -### 6. Optional Remote Push - -If `push_to_remote` is enabled, the workflow: - -1. Clones the remote repository using `GH_TOKEN` for authentication -2. Creates a new branch `reserve-module-id/` in the remote repo -3. Creates `src/DOLIBARR_MODULE_ID.txt` with the reserved ID -4. Scans all PHP files for the `$this->numero = ` pattern and updates every match to the new ID -5. Scans all other files for `DOLIBARR_MODULE_ID=` and updates every match -6. Commits all changes to the new branch -7. Opens a PR in the remote repository via the GitHub CLI - -The generated `src/DOLIBARR_MODULE_ID.txt` contains: - -``` -DOLIBARR_MODULE_ID=185064 - -This module ID has been officially reserved in MokoStandards. - -Module Name: MokoDoliExample -Module ID: 185064 -Reserved Range: 185051-185099 (Moko Consulting) -Description: Dolibarr module MokoDoliExample - -Reserved: 2026-02-19 16:30:00 UTC - -DO NOT CHANGE THIS ID! - -This ID is registered in the MokoStandards module registry: -https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/blob/main/docs/development/crm/module-registry.md -``` - -If `push_to_remote` is disabled (default), you can manually create this file and update the module descriptor later. - -## Workflow Steps - -### Detailed Step Breakdown - -1. **Checkout repository** - Fetches MokoStandards repository -2. **Configure Git** - Sets up git credentials for commits -3. **Extract module name** - Uses provided repo_name and constructs full URL -4. **Determine module ID** - Auto-assigns or validates manual ID -5. **Check for conflicts** - Ensures ID is available -6. **Update registry table** - Adds new entry to registry with auto-generated description -7. **Update override config** - Protects workflow file -8. **Create branch and commit** - Commits changes to new branch -9. **Create pull request** - Automated PR creation -10. **Add labels** - Tags PR with relevant labels -11. **Push to remote** - (Optional) Scans remote repo for module ID patterns, updates them, and opens a PR if enabled -12. **Output summary** - Displays reservation summary - -## Output - -### GitHub Actions Summary - -The workflow generates a summary with: - -```markdown -## 🎉 Module ID Reservation Summary - -**Module Name:** MokoDoliExample -**Reserved ID:** 185064 -**Repository:** https://git.mokoconsulting.tech/mokoconsulting-tech/MokoDoliExample -**Pull Request:** https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/pull/123 - -### Next Steps -1. The GitHub Actions workflow has created the pull request above automatically -2. Review the pull request -3. Get approval from CRM Development Lead -4. Merge the PR to officially reserve the module ID -5. Verify DOLIBARR_MODULE_ID.txt was created in https://git.mokoconsulting.tech/mokoconsulting-tech/MokoDoliExample -``` - -### Files Modified - -**In MokoStandards Repository**: -- `docs/development/crm/module-registry.md` - Registry table updated -- `override.config.tf` - Workflow protection added - -**In Remote Repository** (when `push_to_remote` is enabled): -- `src/DOLIBARR_MODULE_ID.txt` — module ID file created -- PHP module descriptor(s) — `$this->numero` updated to the reserved ID -- Any other files containing `DOLIBARR_MODULE_ID=` — updated to the reserved ID -- A PR is opened in the remote repository on branch `reserve-module-id/` - -## Error Handling - -### Common Errors and Solutions - -#### Error: "Module ID already in use" - -**Cause**: The requested module ID is already reserved in the registry. - -**Solution**: -- If auto-assigning: Workflow will try next available ID -- If manual: Choose a different ID or use auto-assignment - -```bash -# Check available IDs -grep -E "185064|185065|185066" docs/policy/crm/development-standards.md -``` - -#### Error: "Module ID must be in range 185064-185099" - -**Cause**: Manual module_id is outside the allowed range. - -**Solution**: Use an ID between 185064 and 185099 (inclusive). - -#### Error: "No available module IDs in range 185064-185099" - -**Cause**: All 36 IDs in the range are already reserved. - -**Solution**: Contact repository maintainers to discuss expanding the range or removing obsolete reservations. - -#### Error: "push_to_remote is enabled but remote_repository is not provided" - -**This error no longer applies** - The workflow now always pushes to the remote repository automatically constructed from the repo name. - -#### Error: "Could not find 'Available for Assignment' line in registry" - -**Cause**: Registry table structure has changed. - -**Solution**: Verify `docs/policy/crm/development-standards.md` contains the "Available for Assignment" marker line. - -## Best Practices - -### Reservation Guidelines - -1. **Use Descriptive Names**: Module name should clearly indicate purpose -2. **Provide Accurate Descriptions**: Help others understand the module -3. **Reserve Before Development**: Reserve ID before starting module development -4. **One ID Per Module**: Each module should have exactly one ID -5. **Update Status**: Change from "Reserved" to "Active" once deployed - -### Module Naming Conventions - -- **Prefix with "MokoDoli"**: Indicates Moko Consulting Dolibarr module -- **CamelCase**: Use PascalCase for module names -- **Descriptive**: Name should indicate functionality - -**Examples**: -- ✅ `MokoDoliSign` - Clear, follows conventions -- ✅ `MokoDoliForm` - Concise, descriptive -- ❌ `my-module` - Not CamelCase, not descriptive -- ❌ `Test123` - Not descriptive - -### Repository Structure - -After reservation, structure your Dolibarr module repository: - -``` -MokoDoliExample/ -├── src/ -│ ├── DOLIBARR_MODULE_ID.txt # Created by workflow -│ └── modMokoDoliExample.class.php # Module descriptor -├── class/ # Business logic -├── langs/ # Translations -│ ├── en_US/ -│ └── fr_FR/ -├── sql/ # Database scripts -├── admin/ # Admin pages -├── README.md -└── CHANGELOG.md -``` - -## Integration with MokoStandards - -### Module Registry - -The workflow updates the official module registry at: -`docs/policy/crm/development-standards.md` - -This registry is the single source of truth for all Moko Consulting Dolibarr module IDs. - -### Override Protection - -The workflow protects itself from being overwritten during bulk repository sync operations by adding an entry to `override.config.tf`. - -### Policy Compliance - -This workflow follows the module ID reservation process defined in: -[CRM Development Standards](../policy/crm/development-standards.md#module-id-reservation-process) - -## Advanced Usage - -### Batch Reservations - -For reserving multiple module IDs, run the workflow multiple times. Each run will auto-assign the next available ID. - -```bash -# First run: Reserves 185064 -# Second run: Reserves 185065 -# Third run: Reserves 185066 -``` - -### Checking Available IDs - -To see which IDs are still available: - -```bash -cd /home/runner/work/MokoStandards/MokoStandards -grep -oP '(?<=\| )1850(6[4-9]|[7-8][0-9]|9[0-9])(?= \|)' \ - docs/policy/crm/development-standards.md | sort -n -``` - -### Updating Reserved Status - -Once a module is deployed, update its status from "Reserved" to "Active": - -1. Edit `docs/policy/crm/development-standards.md` -2. Change status column from "Reserved" to "Active" -3. Update repository URL if needed -4. Create PR with changes - -## Troubleshooting - -### Workflow Run Failed - -**Check the Actions tab**: Review the failed step for error messages. - -**Common issues**: -- YAML syntax errors (validate with yamllint) -- Git configuration issues -- Permission errors -- Network connectivity to remote repository - -### PR Creation Failed - -**Possible causes**: -- Insufficient permissions -- Base branch doesn't exist -- Branch already exists - -**Solution**: Check workflow permissions in repository settings. - -### Remote Push Failed - -**Causes**: -- `GH_TOKEN` secret not set or lacks write access to the remote repository -- Invalid repository name (remote repo does not exist) -- Branch `reserve-module-id/` already exists in the remote repo - -**Solution**: -- Verify repository URL is correct -- Ensure GitHub token has push permissions -- Check default branch name (main vs master) - -### ID Conflict After Merge - -If two PRs reserve the same ID simultaneously: - -1. The first merged PR wins -2. The second PR will show conflicts -3. Close the second PR and re-run the workflow -4. The workflow will auto-assign the next available ID - -## Maintenance - -### Updating the Workflow - -When updating the workflow: - -1. Update the VERSION field in the file header -2. Update this documentation -3. Test with dry-run if possible -4. Update the workflow inventory - -### Monitoring - -Monitor the module registry regularly: - -```bash -# Count reserved IDs -grep -c "| Reserved |" docs/policy/crm/development-standards.md - -# Count active IDs -grep -c "| Active |" docs/policy/crm/development-standards.md - -# Show available slots -echo $((36 - $(grep -cE "185064|185065|..." docs/policy/crm/development-standards.md))) -``` - -## Examples - -### Example 1: Simple Reservation (No Remote Push) - -```yaml -# Input -repo_name: "MokoDoliPasskey" -push_to_remote: false - -# Result -Module ID: 185064 (auto-assigned) -Module Name: MokoDoliPasskey -Repository URL: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoDoliPasskey -PR Created: #123 -Remote File: NOT created (manual creation required) -``` - -### Example 2: Specific ID with Remote Push - -```yaml -# Input -repo_name: "MokoDoliMulti" -module_id: 185070 -push_to_remote: true - -# Result -Module ID: 185070 (manual) -Module Name: MokoDoliMulti -Repository URL: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoDoliMulti -PR Created: #124 -Remote PR: opened in MokoDoliMulti with $this->numero and DOLIBARR_MODULE_ID.txt updated to 185070 -``` - -### Example 3: Conflict Handling - -```yaml -# First run - Success -module_id: 185065 -Result: Reserved successfully - -# Second run - Conflict -module_id: 185065 -Error: "Module ID 185065 is already in use!" -``` - -## Security Considerations - -### Token Permissions - -The workflow requires: -- `contents: write` - To create branches and commits -- `pull-requests: write` - To create PRs - -### Remote Repository Access - -The workflow interacts with remote repositories using `GH_TOKEN`, which is an **organization-level Actions secret** (set under GitHub organization Settings → Secrets and variables → Actions): - -- Repository URL is constructed as `https://git.mokoconsulting.tech/mokoconsulting-tech/{repo_name}` -- `GH_TOKEN` must have `repo` (contents write) and `pull-requests: write` on the target repository -- The workflow creates a branch `reserve-module-id/` and opens a PR — it never pushes directly to the default branch -- Because `GH_TOKEN` is an organization secret it is automatically available to all repositories in the `mokoconsulting-tech` organization without any per-repo configuration - -### Protected Files - -The workflow file itself is protected via `override.config.tf` to prevent accidental deletion or modification during bulk sync operations. - -## Related Documentation - -- [CRM Development Standards](../policy/crm/development-standards.md) - Module ID reservation policy -- [Dolibarr Module Development Guide](../guide/crm/dolibarr-development-guide.md) - Complete development guide -- [Dolibarr Workflow Templates](../templates/workflows/dolibarr.md) - CI/CD templates for modules -- [Bulk Repository Sync](./bulk-repo-sync.md) - Understanding override protection -- [Workflow Architecture](./workflow-architecture.md) - Overall workflow design patterns - -## Changelog - -### Version 04.00.04 (2026-03-04) - -**Changed**: -- `push_to_remote` now scans remote repository PHP files for `$this->numero = ` and updates them to the reserved ID -- `push_to_remote` now scans other files for `DOLIBARR_MODULE_ID=` and updates them -- `push_to_remote` now creates a branch `reserve-module-id/` and opens a PR in the remote repository instead of pushing directly to the default branch -- Remote push uses `GH_TOKEN` for authenticated clone and PR creation -- Output summary now shows the remote PR URL when `push_to_remote` is enabled - -### Version 04.00.04 (2026-02-21) - -**Changed**: -- Remote push is now **optional** with `push_to_remote` input parameter (default: false) -- PR description now shows whether remote push was enabled -- Output summary shows remote push status (Enabled/Skipped) -- Next steps conditional based on push status - -**Added**: -- `push_to_remote` boolean input parameter (optional, default: false) -- Conditional execution of push step based on `push_to_remote` value -- Status indicator in workflow outputs - -**Fixed**: -- Push step now skips if `push_to_remote` is false -- Documentation updated to reflect optional push behavior -- Workflow diagram correctly shows push as "(Optional)" - -### Version 04.00.04 (2026-02-20) - -**Changed**: -- Simplified workflow inputs to only require `repo_name` -- Repository URL now automatically constructed as `https://git.mokoconsulting.tech/mokoconsulting-tech/{repo_name}` -- Organization is always assumed to be `mokoconsulting-tech` -- Description is automatically generated from module name -- Remote push is now always enabled (no longer optional) - -**Fixed**: -- Removed outdated "(Optional)" label from workflow diagram -- Updated documentation to reflect that remote push is mandatory -- Clarified that `DOLIBARR_MODULE_ID.txt` is always created in remote repository - -**Removed**: -- `description` input (auto-generated) -- `repository` input (auto-constructed) -- `push_to_remote` input (always true) -- `remote_repository` input (auto-constructed) -- `developer` input (removed in v04.00.04) - -**Added**: -- `repo_name` required input - single field for repository name - -### Version 04.00.04 (2026-02-19) - -**Changed**: -- Simplified from 866 to 450 lines (48% reduction) -- Removed module documentation generation -- Module name now auto-detected from repository name -- Added optional manual module ID assignment -- Focused on core functionality: ID assignment and registry update only - -**Added**: -- `module_id` optional input for manual ID assignment -- Automatic module name extraction from repository - -**Removed**: -- Module documentation creation (docs/modules/) -- Module README creation -- Module ID reference file creation -- Override protection for module docs (now only protects workflow) -- Module descriptor template creation in remote repos -- README creation in remote repos - -### Version 03.00.00 (2026-02-16) - -**Initial release**: -- Full documentation generation -- Registry table updates -- PR automation -- Remote push support - -## Support - -For issues or questions about this workflow: - -1. Check this documentation -2. Review the [CRM Development Standards](../policy/crm/development-standards.md) -3. Open an issue in the MokoStandards repository -4. Contact the MokoStandards maintainers - ---- - -**Last Updated**: 2026-02-19 -**Maintained By**: MokoStandards Team -**Category**: Workflow Documentation - -## Metadata - -| Field | Value | -|-------|-------| -| Document Type | Workflow Documentation | -| Domain | Documentation | -| Applies To | MokoStandards Repository | -| Jurisdiction | Tennessee, USA | -| Owner | Moko Consulting | -| Repo | https://git.mokoconsulting.tech/MokoConsulting/MokoStandards | -| Path | /docs/workflows/reserve-dolibarr-module-id.md | -| Version | 04.00.04 | -| Status | Active | -| Last Reviewed | 2026-02-19 | -| Reviewed By | Documentation Team | - -## Revision History - -| Date | Author | Change | Notes | -|------|--------|--------|-------| -| 2026-02-19 | GitHub Copilot | Initial documentation creation | Comprehensive workflow documentation for v04.00.04 | diff --git a/docs/workflows/reusable-workflows.md b/docs/workflows/reusable-workflows.md deleted file mode 100644 index d689e75..0000000 --- a/docs/workflows/reusable-workflows.md +++ /dev/null @@ -1,567 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Reusable Workflows - -MokoStandards provides seven reusable GitHub Actions workflows that enable consistent CI/CD across all organization repositories, with automatic project type detection for Joomla extensions, Dolibarr modules, and generic applications. - -## Quick Start - -```yaml -# Basic quality check -jobs: - quality: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-php-quality.yml@main - -# Type-aware build and release - build: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-build.yml@main - - release: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-release.yml@main - with: - version: '1.0.0' -``` - -## Workflow Categories - -### Quality & Testing Workflows -- **reusable-php-quality.yml** - PHP code quality analysis (PHPCS, PHPStan, Psalm) -- **reusable-joomla-testing.yml** - Joomla extension testing with matrix PHP/Joomla versions -- **reusable-ci-validation.yml** - Repository standards validation - -### Repository Maintenance Workflows -- **reusable-branch-cleanup.yml** - Automated cleanup of stale and merged branches - -### Type-Aware Orchestration Workflows -- **reusable-project-detector.yml** - Automatic project type detection -- **reusable-build.yml** - Universal build for all project types -- **reusable-release.yml** - Type-aware release creation and packaging -- **reusable-deploy.yml** - Multi-environment deployment - -> **Type-Aware Workflows** automatically detect whether your project is a Joomla extension, Dolibarr module, or generic application, and apply appropriate build/release/deploy steps. This enables a single workflow definition to work across all repositories. - ---- - -## Quality & Testing Workflows - -### PHP Quality Analysis - -Runs comprehensive PHP code quality checks using PHPCS, PHPStan, and Psalm with configurable standards and analysis levels. - -**Usage:** -```yaml -jobs: - quality: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-php-quality.yml@main - with: - php-versions: '["8.1", "8.2"]' - tools: '["phpcs", "phpstan", "psalm"]' - phpcs-standard: 'PSR12' - phpstan-level: '6' -``` - -**Key Inputs:** -- `php-versions` (string) - JSON array of PHP versions, default: `["7.4", "8.0", "8.1", "8.2"]` -- `tools` (string) - JSON array of tools, default: `["phpcs", "phpstan", "psalm"]` -- `phpcs-standard` (string) - Coding standard, default: `PSR12` -- `phpstan-level` (string) - Analysis level 0-9, default: `5` -- `fail-on-error` (boolean) - Fail on errors, default: `true` - -**Outputs:** `quality-score` - Overall quality score percentage (0-100) - -### Joomla Testing - -Matrix testing for Joomla extensions across PHP and Joomla versions with PHPUnit, MySQL, and code coverage support. - -**Usage:** -```yaml -jobs: - test: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-joomla-testing.yml@main - with: - php-versions: '["8.1", "8.2"]' - joomla-versions: '["4.4", "5.0", "5.1"]' - coverage: true - secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} -``` - -**Key Inputs:** -- `php-versions` (string) - JSON array, default: `["7.4", "8.0", "8.1", "8.2"]` -- `joomla-versions` (string) - JSON array, default: `["4.4", "5.0", "5.1"]` -- `coverage` (boolean) - Enable coverage, default: `false` -- `run-integration-tests` (boolean) - Run integration tests, default: `true` - -> Automatically excludes incompatible combinations (e.g., PHP 7.4 + Joomla 5.x) - -### CI Validation - -Repository standards validation with configurable profiles (basic, full, strict). - -**Usage:** -```yaml -jobs: - validate: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-ci-validation.yml@main - with: - profile: 'full' - validate-security: true -``` - -**Validation Profiles:** -- **basic** - Manifest, XML, PHP syntax, security checks -- **full** - Basic + changelog, license headers, language structure, paths, whitespace -- **strict** - Full validation with fail-on-warnings enabled - -**Key Inputs:** -- `profile` (string) - Validation profile, default: `basic` -- `validate-manifests` (boolean) - Validate XML manifests, default: `true` -- `validate-changelogs` (boolean) - Validate CHANGELOG.md, default: `true` -- `validate-licenses` (boolean) - Validate license headers, default: `true` -- `validate-security` (boolean) - Security checks, default: `true` -- `fail-on-warnings` (boolean) - Fail on warnings, default: `false` - ---- - -## Repository Maintenance Workflows - -### Branch Cleanup - -Automatically cleans up stale and merged branches with configurable exclusion patterns and dry-run support. - -**Usage:** -```yaml -jobs: - cleanup: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-branch-cleanup.yml@main - with: - stale-days: 90 - delete-merged: true - delete-stale: true - dry-run: false - permissions: - contents: write -``` - -**Key Inputs:** -- `stale-days` (number) - Days before branch is stale, default: `90` -- `delete-merged` (boolean) - Delete merged branches, default: `true` -- `delete-stale` (boolean) - Delete stale branches, default: `true` -- `dry-run` (boolean) - Preview without deleting, default: `false` -- `exclude-patterns` (string) - JSON array of regex patterns to exclude, default: `["main", "master", "develop", "dev", "dev/.*", "rc/.*", "release/.*", "staging", "production"]` -- `exclude-prefix` (string) - Comma-separated prefixes to exclude, default: `"dependabot/,renovate/"` - -**Features:** -- Detects and deletes branches merged into default branch -- Identifies stale branches based on last commit date -- Configurable exclusion patterns (regex and prefix-based) -- Dry-run mode for previewing changes -- Detailed summary of deleted and failed branches - -**Example with custom exclusions:** -```yaml -jobs: - cleanup: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-branch-cleanup.yml@main - with: - stale-days: 60 - delete-merged: true - delete-stale: true - dry-run: false - exclude-patterns: '["main", "master", "develop", "hotfix/.*"]' - exclude-prefix: 'dependabot/,renovate/,feature/' -``` - ---- - -## Type-Aware Orchestration Workflows - -### Project Type Detection - -Automatically detects project type and provides outputs for downstream workflows. - -**Usage:** -```yaml -jobs: - detect: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-project-detector.yml@main -``` - -**Outputs:** -- `project-type` - Detected type: `joomla`, `dolibarr`, or `generic` -- `extension-type` - Extension type: `component`, `module`, `plugin`, `template`, `package`, or `application` -- `has-php` - Whether project contains PHP files (true/false) -- `has-node` - Whether project contains package.json (true/false) - -### Type-Aware Build - -Universal build workflow that adapts to project type with automatic dependency management. - -**Usage:** -```yaml -jobs: - build: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-build.yml@main - with: - php-version: '8.1' - node-version: '20.x' - upload-artifacts: true -``` - -**Key Inputs:** -- `php-version` (string) - PHP version, default: `8.1` -- `node-version` (string) - Node.js version, default: `20.x` -- `upload-artifacts` (boolean) - Upload build artifacts, default: `true` -- `artifact-name` (string) - Artifact name, default: `build-artifacts` - -**Build Logic:** -- **Joomla:** Installs dependencies, runs npm build if available, prepares extension -- **Dolibarr:** Installs production dependencies, runs build scripts -- **Generic:** Runs npm build, checks for Makefile, executes build commands - -### Type-Aware Release - -Creates releases with type-specific packaging and marketplace support. - -**Usage:** -```yaml -jobs: - release: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-release.yml@main - with: - version: '1.0.0' - prerelease: false - create-github-release: true - permissions: - contents: write -``` - -**Key Inputs:** -- `version` (string, **required**) - Release version in semver format -- `prerelease` (boolean) - Mark as pre-release, default: `false` -- `draft` (boolean) - Create as draft, default: `false` -- `create-github-release` (boolean) - Create GitHub release, default: `true` -- `publish-to-marketplace` (boolean) - Publish to marketplace, default: `false` - -**Package Creation:** -- **Joomla/Dolibarr:** ZIP package with manifest version updates -- **Generic:** TAR.GZ package with build artifacts -- All packages include SHA256 and MD5 checksums - -### Type-Aware Deployment - -Multi-environment deployment with type-specific logic and health checks. - -**Usage:** -```yaml -jobs: - deploy: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-deploy.yml@main - with: - environment: staging - deployment-method: rsync - health-check-url: https://staging.example.com/health - secrets: - DEPLOY_HOST: ${{ secrets.STAGING_HOST }} - DEPLOY_USER: ${{ secrets.STAGING_USER }} - DEPLOY_KEY: ${{ secrets.STAGING_SSH_KEY }} - DEPLOY_PATH: ${{ secrets.STAGING_PATH }} - permissions: - contents: read - deployments: write -``` - -**Key Inputs:** -- `environment` (string, **required**) - Target: `staging` or `production` -- `deployment-method` (string) - Method: `rsync`, `ssh`, `ftp`, `kubernetes`, `custom`, default: `custom` -- `health-check-url` (string) - URL for post-deployment health check -- `health-check-timeout` (number) - Timeout in seconds, default: `300` - -**Deployment Methods:** -- **rsync:** Direct sync to remote server -- **ssh:** Package transfer and extraction via SSH -- **custom:** Type-specific deployment logic (Joomla extension, Dolibarr module, generic app) - ---- - -## Complete Pipeline Examples - -### Example 1: Type-Aware CI/CD Pipeline - -Single pipeline that works for Joomla, Dolibarr, and generic projects: - -```yaml -name: CI/CD Pipeline - -on: - push: - branches: [main, staging, dev/**] - pull_request: - branches: [main] - release: - types: [published] - -permissions: - contents: write - deployments: write - pull-requests: write - checks: write - -jobs: - # Auto-detect project type - detect: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-project-detector.yml@main - - # Validate code - validate: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-ci-validation.yml@main - with: - profile: 'full' - - # Check quality (PHP projects only) - quality: - needs: detect - if: needs.detect.outputs.has-php == 'true' - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-php-quality.yml@main - with: - php-versions: '["8.1", "8.2"]' - - # Test Joomla extensions - test: - needs: [detect, quality] - if: needs.detect.outputs.project-type == 'joomla' - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-joomla-testing.yml@main - with: - php-versions: '["8.1", "8.2"]' - coverage: true - secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - # Build (works for all types) - build: - needs: [detect, validate] - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-build.yml@main - - # Deploy to staging - deploy-staging: - needs: build - if: github.ref == 'refs/heads/staging' - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-deploy.yml@main - with: - environment: staging - deployment-method: rsync - secrets: inherit - - # Create release on tag - release: - needs: [detect, build] - if: startsWith(github.ref, 'refs/tags/v') - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-release.yml@main - with: - version: ${{ github.ref_name }} - - # Deploy to production - deploy-production: - needs: release - if: github.event_name == 'release' - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-deploy.yml@main - with: - environment: production - version: ${{ github.event.release.tag_name }} - secrets: inherit -``` - -### Example 2: Basic Quality and Testing - -Simple quality and testing pipeline: - -```yaml -name: Quality & Test - -on: [push, pull_request] - -jobs: - validate: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-ci-validation.yml@main - with: - profile: 'full' - - quality: - needs: validate - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-php-quality.yml@main - with: - php-versions: '["8.1", "8.2"]' - - test: - needs: quality - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-joomla-testing.yml@main - with: - coverage: true - secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} -``` - ---- - -## Best Practices - -### Version Pinning - -**Recommended:** Pin to main branch for automatic updates -```yaml -uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-php-quality.yml@main -``` - -**Stable:** Pin to specific tag -```yaml -uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-php-quality.yml@v1.0.0 -``` - -**Maximum Stability:** Pin to commit SHA -```yaml -uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-php-quality.yml@abc1234 -``` - -### Secret Management - -**Pass all secrets:** -```yaml -secrets: inherit -``` - -**Pass specific secrets:** -```yaml -secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} -``` - -### Progressive Adoption - -Start with basic validation, gradually increase strictness: - -```yaml -jobs: - # Dev branches: basic validation - validate-dev: - if: startsWith(github.ref, 'refs/heads/dev/') - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-ci-validation.yml@main - with: - profile: 'basic' - - # Main branch: strict validation - validate-main: - if: github.ref == 'refs/heads/main' - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-ci-validation.yml@main - with: - profile: 'strict' - fail-on-warnings: true -``` - ---- - -## Troubleshooting - -### Workflow Not Found -**Error:** `Unable to resolve action MokoConsulting/MokoStandards/.gitea/workflows/...` - -**Solution:** Ensure calling repository has access to MokoStandards. For private repositories, configure proper access permissions. - -### Missing Secrets -**Error:** `Secret CODECOV_TOKEN is not available` - -**Solution:** Add secret at organization or repository level, or pass explicitly: -```yaml -secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} -``` - -### Matrix Job Failures -Random matrix job failures may indicate rate limiting or resource contention. - -**Solution:** Reduce concurrency -```yaml -strategy: - matrix: - php: ['8.1', '8.2'] - max-parallel: 2 # Limit concurrent jobs -``` - -### Health Check Timeout -**Solution:** Increase timeout or verify URL accessibility -```yaml -with: - health-check-timeout: 600 # 10 minutes -``` - ---- - -## Migration from Local Workflows - -**Steps:** -1. Identify workflow type (quality, testing, validation, build, release, deploy) -2. Map your inputs to reusable workflow parameters -3. Update workflow file to call reusable workflow -4. Test on development branch -5. Archive old workflow once validated - -**Example Migration:** - -```yaml -# Before: Local workflow -jobs: - phpcs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: shivammathur/setup-php@v2 - - run: phpcs --standard=PSR12 src/ - -# After: Reusable workflow -jobs: - quality: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-php-quality.yml@main - with: - phpcs-standard: 'PSR12' - tools: '["phpcs"]' -``` - ---- - -## Support & Resources - -**Support:** -- Documentation: [CI Migration Guide](../CI_MIGRATION_GUIDE.md) -- Issues: Open issue in MokoStandards repository -- Slack: #devops-support channel - -**Related Documentation:** -- [CI Migration Guide](../CI_MIGRATION_GUIDE.md) - Detailed migration strategy -- [GitHub Reusing Workflows](https://docs.github.com/en/actions/using-workflows/reusing-workflows) -- [Workflow Templates](../../templates/workflows/) - Additional templates - ---- - -## Version History - -| Version | Date | Changes | -|---------|------|---------| -| 02.01.00 | 2026-01-11 | Added reusable-branch-cleanup workflow, standards-compliance workflow | -| 02.00.00 | 2026-01-09 | Consolidated documentation, added type-aware workflows | -| 01.00.00 | 2026-01-09 | Initial release (php-quality, joomla-testing, ci-validation) | diff --git a/docs/workflows/rs-deployment.md b/docs/workflows/rs-deployment.md deleted file mode 100644 index 6665db3..0000000 --- a/docs/workflows/rs-deployment.md +++ /dev/null @@ -1,43 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Release Staging (RS) Server Deployment - -> **DEPRECATED (v04.06.00):** The `deploy-rs.yml` workflow has been **retired**. RS deployment is now handled exclusively through the release pipeline. Release artifacts are published via GitHub Releases (`auto-release.yml`) and distributed through platform-specific channels (Joomla `updates.xml`, Dolibarr `update.txt`). The `RS_FTP_*` variables and secrets are no longer used. - -## Current Release Pipeline - -``` -dev → [alpha] → [beta] → rc → version/XX → main → dev - optional optional -``` - -Production/RS deployment is achieved by: - -1. **Joomla** — GitHub Release ZIP + SHA-256 + `updates.xml` with 5 stability entries (`development`, `alpha`, `beta`, `release-candidate`, `vXX`) -2. **Dolibarr** — GitHub Release + `update.txt` -3. **Generic** — GitHub Release - -There is no longer a separate SFTP deployment step to a release staging server. - -## See Also - -- [Dev Deployment](dev-deployment.md) — development server (still active) -- [Demo Deployment](demo-deployment.md) — demo server (still active) -- [Auto Release](auto-release.md) — release pipeline that replaced RS deployment -- [Release System](release-system.md) — end-to-end release lifecycle diff --git a/docs/workflows/secret-scanning.md b/docs/workflows/secret-scanning.md deleted file mode 100644 index 0353db4..0000000 --- a/docs/workflows/secret-scanning.md +++ /dev/null @@ -1,72 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Secret Scanning (Gitleaks) - -**Status**: ✅ Active | **Version**: 01.00.00 | **Last Updated**: 2026-05-07 - -## Overview - -Scans repositories for leaked secrets (API keys, tokens, passwords, private keys) using [Gitleaks](https://github.com/gitleaks/gitleaks). Deployed to all governed repositories. - -## Triggers - -| Trigger | Scope | -|---------|-------| -| PR to main/dev/** | Scans PR commits only (incremental) | -| Weekly Monday 05:00 UTC | Full repository history scan | -| Manual dispatch | Full scan | - -## What It Detects - -- API keys and tokens (AWS, GCP, Azure, GitHub, Gitea, etc.) -- Private keys (RSA, SSH, PGP) -- Database connection strings -- OAuth client secrets -- JWT tokens -- Generic high-entropy strings - -## Notifications - -Findings trigger an **urgent** ntfy alert to the `gitea-security` topic with instructions to rotate credentials immediately. - -## Configuration - -The workflow uses Gitleaks' built-in rules. To add custom rules or allowlists, create a `.gitleaks.toml` in the repo root. - -### Allowlisting False Positives - -```toml -# .gitleaks.toml -[allowlist] - paths = [ - '''vendor/''', - '''node_modules/''' - ] - commits = [ - "abc123..." - ] -``` - -## Related Documentation - -- [Security Audit (Dependencies)](./security-audit.md) -- [Branch Protection](./branch-protection.md) - -## Changelog - -| Version | Date | Changes | -|---------|------|---------| -| 01.00.00 | 2026-05-07 | Initial release | diff --git a/docs/workflows/shared-workflows.md b/docs/workflows/shared-workflows.md deleted file mode 100644 index 9dd0582..0000000 --- a/docs/workflows/shared-workflows.md +++ /dev/null @@ -1,239 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Shared Workflow Templates - -These workflows are synced to every governed repository via `bulk_sync.php`. They live in `templates/workflows/shared/` and are registered in all platform definitions. - -## Workflow Summary - -| Workflow | Triggers | Purpose | -|----------|----------|---------| -| `deploy-dev.yml` | `dev/**`, `alpha/**`, `beta/**`, `rc/**`, `develop` (src/** only) | SFTP deploy to dev server (dev=development, alpha/beta auto-bump patch, rc=rc tag) | -| `deploy-demo.yml` | `main`, `master` (src/** only) | SFTP deploy to demo server (stable tag) + update files | -| `sync-version-on-merge.yml` | push to `main` | Auto-bump patch version, propagate to all headers | -| `auto-release.yml` | push to `main` | Build & Release: every push tags + updates platform version/badges; minor (XX.YY.00) creates version branch + new Release; patch updates existing Release | -| `auto-dev-issue.yml` | branch creation (`dev/**`, `rc/**`) | Auto-create tracking issue (dev=feature, rc=release) | -| `repository-cleanup.yml` | schedule (1st + 15th) + dispatch | Recurring maintenance: labels, branches, logs, workflows, doc indexes | -| `enterprise-firewall-setup.yml` | push to `main` | Configure trusted domain access for enterprise environments | -| `repo_health.yml` | every push + PR | Platform-specific health checks (Dolibarr: module descriptor; Joomla: XML manifest) | - -### MokoStandards-only workflows (not synced) - -| Workflow | Triggers | Purpose | -|----------|----------|---------| -| `composer-validate.yml` | every push + PR | Validate composer.json schema, version consistency, autoload paths, bin scripts, enterprise dep pattern | -| `standards-compliance.yml` | push + PR | 28-job, 4-tier compliance check | -| `bulk-repo-sync.yml` | dispatch | Sync standards to all governed repos | - ---- - -## sync-version-on-merge.yml - -**Trigger:** Every push to `main`/`master` - -**What it does:** -1. If README.md was NOT part of the push, auto-increments the patch version (e.g., `04.00.72` → `04.00.73`) -2. Reads the VERSION from README.md FILE INFORMATION block -3. Runs `update_version_from_readme.php` to propagate to all file headers and badges -4. Commits updated files with `[skip ci]` - -**Requirements:** `secrets.GH_TOKEN` with write access - -**Skips:** Commits by `gitea-actions[bot]`, commits with `[skip ci]` - ---- - -## auto-release.yml - -**Trigger:** Every push to `main`/`master` (skips bot commits and `[skip ci]`) - -**What it does on every push:** -1. Reads version from README.md -2. Creates or updates `version/XX` branch (patches force-update existing branch) -3. Sets platform version (Dolibarr `$this->version`, Joomla ``) -4. Updates `[VERSION: XX.YY.ZZ]` badges in markdown files -5. Writes update files (Dolibarr `update.txt`, Joomla `updates.xml` with `stable`) -6. Creates git tag `vXX.YY.ZZ` - -**Additional steps on minor releases (patch == 00):** -7. Creates new GitHub Release with changelog notes - -**On patch releases (patch != 00):** -7. Updates the existing minor release (appends patch notes, updates title) - -**Protection:** Workflow files are protected by CODEOWNERS (requires @jmiller review) and a file path restriction ruleset. Only bypass actors can modify `.gitea/workflows/`. - -| Version | What happens | -|---------|-------------| -| `01.02.00` | Full release: version branch + tag + new GitHub Release | -| `01.02.01` | Patch: tag + update existing `v01.02.00` Release with patch notes | -| `01.02.02` | Patch: tag + update existing Release again | -| `01.03.00` | Full release: new version branch + tag + new GitHub Release | - -**Requirements:** `secrets.GH_TOKEN` with write access - ---- - -## enterprise-firewall-setup.yml - -**Trigger:** Push to `main` - -**What it does:** Configures trusted domain access rules for enterprise network environments. Ensures governed repositories can access required external services through corporate firewalls. - ---- - -## Deploy Workflows - -See dedicated docs: -- [Dev Deployment](dev-deployment.md) — development server -- [Demo Deployment](demo-deployment.md) — demo server - -> **Note:** `deploy-rs.yml` has been **retired** (v04.06.00). RS deployment is now via the release pipeline only. See [RS Deployment (deprecated)](rs-deployment.md). - -### Common Features (both deploy workflows) - -- **Permission check:** `jmiller` and `gitea-actions[bot]` hardcoded as authorized; others need `admin`/`maintain` role -- **Chore skip:** PRs from `chore/` branches do not deploy -- **Suffix required:** `{ENV}_FTP_SUFFIX` must be set or deployment is skipped -- **Clear before upload:** Remote folder is always cleared before uploading -- **`.ftpignore` support:** Gitignore-style file exclusion -- **Failure tracking:** Creates/updates a `deploy-failure` issue on error - -### Version Handling by Environment - -| Environment | Module Version | -|-------------|----------------| -| Dev (`dev/**`) | `"development"` — Dolibarr `$this->version` and Joomla `` set to literal "development" | -| Alpha (`alpha/**`) | `XX.YY.ZZ-alpha` — version with `-alpha` suffix (auto-bumps patch) | -| Beta (`beta/**`) | `XX.YY.ZZ-beta` — version with `-beta` suffix (auto-bumps patch) | -| RC (`rc/**`) | `XX.YY.ZZ-rc` — version with `-rc` suffix | -| Demo (`main`) | Real version from README.md | - -### Update Server Files by Environment - -| Environment | Dolibarr `update.txt` | Joomla `updates.xml ` | -|-------------|----------------------|--------------------------| -| Dev (`dev/**`) | `development` | `development` | -| Alpha (`alpha/**`) | `XX.YY.ZZ-alpha` | `alpha` | -| Beta (`beta/**`) | `XX.YY.ZZ-beta` | `beta` | -| RC (`rc/**`) | `XX.YY.ZZ-rc` | `release-candidate` | -| Release (`main` via auto-release) | `XX.YY.ZZ` | `vXX` | - -See [update-server.md](update-server.md) for the full update server specification. - ---- - -## auto-dev-issue.yml - -**Trigger:** Branch creation matching `dev/**` or `rc/**` - -**What it does:** Auto-creates a tracking issue when a new `dev/**` or `rc/**` branch is pushed. Assigns `jmiller`. - -| Branch type | Title prefix | Label | -|-------------|-------------|-------| -| `dev/**` | `feat(XX.YY.ZZ)` | `type: feature` | -| `rc/**` | `rc(XX.YY.ZZ)` | `type: release` | - -Skips if an issue for that version already exists. - ---- - -## repository-cleanup.yml - -**Trigger:** Schedule (1st + 15th of each month at 6:00 AM UTC) + manual dispatch - -**What it does (always):** -- Deletes 25 retired workflow files -- Checks for version drift across all files -- Creates `.gitea/workflows/custom/` directory if missing - -**What it does (toggleable):** -- Reset labels to 58-label standard set (manual only, off by default) -- Delete old sync branches -- Clean cancelled/stale workflow runs -- Delete workflow logs older than 30 days -- Strip copyright blocks from issue templates -- Rebuild `docs/` index files - ---- - -## Custom Workflows - -Every governed repo has a `.gitea/workflows/custom/` directory that is **never touched by sync or cleanup**. Place repo-specific workflows here: - -``` -.gitea/workflows/ -├── deploy-dev.yml ← Synced (overwritten on sync) -├── auto-release.yml ← Synced (overwritten on sync) -├── repository-cleanup.yml ← Synced (overwritten on sync) -└── custom/ ← SAFE — never touched - ├── README.md - └── my-custom-workflow.yml -``` - ---- - -## repo_health.yml (platform-specific) - -**Trigger:** Every push and PR (no path filter) - -**What it does:** Platform-specific health checks in addition to shared guardrails (release vars, scripts governance, repo artifacts, extended checks). - -### Dolibarr (`crm-module`) checks -- Module descriptor (`src/core/modules/mod*.class.php`) exists -- `$this->numero` is set and non-zero -- `$this->version` is not hardcoded -- `url_last_version` points to `update.txt` (not `update.json`) -- `url_last_version` references `/main/` on main branch -- `src/README.md` exists (module store requirement) -- `update.txt` exists in root - -### Joomla (`waas-component`) checks -- XML manifest with `` tag exists -- ``, ``, ``, `` tags present -- Extension `type` attribute is valid -- Language `.ini` files exist -- `updates.xml` exists in root -- `index.html` directory listing protection in `src/`, `src/admin/`, `src/site/` - ---- - -## composer-validate.yml (MokoStandards only) - -**Trigger:** Every push and PR - -**What it does:** Validates the `composer.json` integrity for the MokoStandards enterprise library: -- Schema validation (`composer validate --strict`) -- Lock file freshness -- Dependency resolution (dry run) -- Security advisories (`composer audit`) -- Version consistency: `composer.json` version = `README.md` VERSION = `STANDARDS_VERSION` in `RepositorySynchronizer.php` -- All autoload paths (PSR-4, classmap, files) exist on disk -- All bin scripts exist -- Enterprise dep constraint uses `dev-version/XX` pattern (not `dev-main`) - -> **Note:** Governed repos can manually set `dev-main` for bleeding-edge installs, but the sync system always corrects this to `dev-version/XX` on the next sync run. - ---- - -## Composer Enterprise Dependency - -On every sync, the `RepositorySynchronizer` checks if the remote `composer.json` requires `mokoconsulting-tech/enterprise`. If missing or stale (`dev-main`), it adds/updates it to `"dev-version/XX"` — always pinned to the current version branch, never bleeding-edge main. - -Governed repos can manually override to `dev-main` for bleeding-edge testing, but this will be corrected on the next sync. diff --git a/docs/workflows/standards-compliance.md b/docs/workflows/standards-compliance.md deleted file mode 100644 index 52cd394..0000000 --- a/docs/workflows/standards-compliance.md +++ /dev/null @@ -1,588 +0,0 @@ -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Standards Compliance Workflow - -**Workflow**: `standards-compliance.yml` -**Status**: Active | **Version**: 04.00.04 | **Last Updated**: 2026-02-21 - -## Overview - -The Standards Compliance workflow is a comprehensive validation system that ensures repositories meet MokoStandards requirements across multiple dimensions including structure, documentation quality, coding standards, security, and maintainability. - -## Purpose - -- **Enforce Standards**: Automatically validate compliance with MokoStandards policies -- **Quality Assurance**: Ensure consistent quality across all organization repositories -- **Early Detection**: Catch compliance issues before merge -- **Actionable Feedback**: Provide clear remediation steps for any violations -- **Comprehensive Reporting**: Generate detailed compliance reports with scores - -## Workflow Triggers - -```yaml -on: - push: - branches: - - main - - dev/** - - rc/** - pull_request: - branches: - - main - - dev/** - - rc/** - workflow_dispatch: -``` - -**Runs on**: -- Every push to main, dev/*, or rc/* branches -- Every pull request targeting main, dev/*, or rc/* -- Manual trigger via GitHub Actions UI - -## Validation Areas - -The workflow performs 10 comprehensive validation checks organized into two categories: - -### Critical Checks (Must Pass) - -These checks are **blocking** - the workflow will fail if any critical check fails: - -| Check | Description | Validator | Priority | -|-------|-------------|-----------|----------| -| 📁 **Repository Structure** | Validates required directories and files exist | Built-in shell | 🔴 Critical | -| 📚 **Documentation Quality** | Analyzes README, checks documentation completeness | Built-in shell | 🔴 Critical | -| 💻 **Coding Standards** | Runs language-specific linters (Python, PHP, YAML) | yamllint, black, pylint, phpcs | 🔴 Critical | -| ⚖️ **License Compliance** | Validates license file and SPDX identifiers | Built-in shell | 🔴 Critical | -| 🧹 **Git Repository Hygiene** | Checks commit messages, branch naming, .gitignore | Built-in shell | 🔴 Critical | -| ⚙️ **Workflow Configuration** | Validates GitHub Actions workflow files | actionlint, custom checks | 🔴 Critical | -| 🔢 **Version Consistency** | Ensures all version numbers match across repository | check_version_consistency.php | 🔴 Critical | -| 🔐 **Script Integrity** | Validates SHA-256 hashes of critical scripts | validate_script_registry.py | 🔴 Critical | - -### Informational Checks (Non-Blocking) - -These checks provide **recommendations** but don't fail the workflow: - -| Check | Description | Validator | Priority | -|-------|-------------|-----------|----------| -| 🏢 **Enterprise Readiness** | Assesses enterprise-grade features and patterns | check_enterprise_readiness.php | ℹ️ Info | -| 🏥 **Repository Health** | Evaluates overall repository quality metrics | check_repo_health.php | ℹ️ Info | - -## Detailed Check Descriptions - -### 1. Repository Structure Validation - -**What it checks**: -- Required directories: `docs/`, `scripts/`, `.github/` -- Required files: `README.md`, `LICENSE`, `CONTRIBUTING.md`, `SECURITY.md`, `CHANGELOG.md`, `.editorconfig` -- File size and completeness validation - -**Compliance Requirements**: -- All required directories must exist -- All required files must be present -- README must be at least 500 bytes -- LICENSE must be at least 100 bytes - -**Remediation**: -```bash -# Create missing directories -mkdir -p docs scripts .github/workflows - -# Create required files from templates -cp templates/docs/required/README.md ./ -cp templates/docs/required/CONTRIBUTING.md ./ -cp templates/docs/required/SECURITY.md ./ -``` - -### 2. Documentation Quality Check - -**What it checks**: -- README.md metrics (size, lines, words, headings, links, code blocks) -- Documentation completeness -- Content quality indicators - -**Compliance Requirements**: -- README minimum 500 bytes, 20 lines, 100 words -- At least 3 headings for structure -- Include links and code examples - -**Scoring**: -- Size: 500+ bytes (good), <500 (warning), >50KB (warning - too long) -- Headings: 3+ (good), <3 (warning) -- Links: 1+ (good), 0 (info - consider adding) -- Code blocks: 1+ (good), 0 (info - consider adding) - -### 3. Coding Standards Validation - -**What it checks**: -- YAML files: Validates syntax and formatting with `yamllint` -- Python files: Code formatting with `black`, linting with `pylint` -- PHP files: Coding standards with `phpcs` (PSR-12) - -**Compliance Requirements**: -- All YAML files must be valid and properly formatted -- Python code must follow Black formatting -- PHP code must follow PSR-12 standards - -**Remediation**: -```bash -# Fix YAML formatting -yamllint --format auto .gitea/workflows/*.yml - -# Fix Python formatting -black scripts/**/*.py - -# Fix PHP code style -phpcs --standard=PSR12 src/ -``` - -### 4. License Compliance - -**What it checks**: -- LICENSE file exists -- File headers contain copyright and SPDX identifiers -- Consistent licensing across repository - -**Compliance Requirements**: -- LICENSE file present at repository root -- All source files include copyright header -- SPDX-License-Identifier present in headers - -**Example Header**: -```php - -// SPDX-License-Identifier: GPL-3.0-or-later -``` - -### 5. Git Repository Hygiene - -**What it checks**: -- Commit message format -- Branch naming conventions -- .gitignore completeness -- No sensitive files in repository - -**Compliance Requirements**: -- Conventional commit messages -- Branch names follow pattern: `feature/*`, `bugfix/*`, `hotfix/*`, `release/*` -- Comprehensive .gitignore file - -### 6. Workflow Configuration Validation - -**What it checks**: -- Valid YAML syntax in workflow files -- Required workflows present -- CodeQL configuration if applicable -- Action version pinning for security - -**Compliance Requirements**: -- All workflows have valid YAML syntax -- Actions pinned to commit hashes for security -- Proper permissions configured - -### 7. Version Consistency Check ⭐ NEW - -**What it checks**: -- All version references match the canonical version in `composer.json` -- Checks 39+ files including: - - Documentation (README.md, CHANGELOG.md, CONTRIBUTING.md) - - Workflows (.gitea/workflows/*.yml) - - PHP source files (src/**/*.php) - - Configuration files - -**Compliance Requirements**: -- Single source of truth: version in `composer.json` -- All references must match exactly -- No version drift across repository - -**Validator**: `api/validate/check_version_consistency.php` - -**Remediation**: -```bash -# Check current status -php api/validate/check_version_consistency.php --verbose - -# Update all version references (if mismatches found) -# Manually update files or use bulk search/replace -``` - -### 8. Script Integrity Validation ⭐ NEW - -**What it checks**: -- SHA-256 hashes of critical scripts match registry -- No unauthorized modifications to security-critical scripts -- Registry file (scripts/.script-registry.json) is up-to-date - -**Compliance Requirements**: -- All scripts in registry must have valid SHA-256 hashes -- Critical priority scripts cannot have mismatches -- Changes to scripts must update registry - -**Validator**: `api/maintenance/validate_script_registry.py` - -**Remediation**: -```bash -# Validate current hashes -python3 api/maintenance/validate_script_registry.py --priority critical - -# Update registry after legitimate changes -python3 api/maintenance/generate_script_registry.py --update - -# Or use auto-update workflow -# .gitea/workflows/auto-update-sha.yml -``` - -### 9. Enterprise Readiness Check ⭐ NEW (Informational) - -**What it checks**: -- Enterprise-grade features implementation -- Security best practices -- Scalability patterns -- Error handling and logging -- Transaction management -- API design patterns - -**Assessment Areas**: -- Architecture patterns -- Error recovery mechanisms -- Monitoring and observability -- Documentation completeness -- Test coverage -- Security controls - -**Validator**: `api/validate/check_enterprise_readiness.php` - -**Note**: This check is **informational only** and does not block merges. It provides recommendations for improving enterprise readiness. - -### 10. Repository Health Check ⭐ NEW (Informational) - -**What it checks**: -- Code quality metrics -- Technical debt indicators -- Dependency health -- Documentation coverage -- Test coverage -- Issue/PR activity - -**Health Metrics**: -- File structure organization -- Code duplication -- Dependency freshness -- Security vulnerabilities -- Community engagement - -**Validator**: `api/validate/check_repo_health.php` - -**Note**: This check is **informational only** and does not block merges. It provides insights for continuous improvement. - -## Compliance Scoring - -The workflow calculates a compliance percentage based on critical checks: - -``` -Compliance % = (Critical Checks Passed / Total Critical Checks) × 100 -``` - -### Score Interpretation - -| Score | Status | Description | -|-------|--------|-------------| -| 100% | ✅ **COMPLIANT** | All critical checks passed - repository fully compliant | -| 80-99% | ⚠️ **MOSTLY COMPLIANT** | Most checks passed - minor issues to address | -| 50-79% | ⚠️ **PARTIALLY COMPLIANT** | Significant issues - requires attention | -| 0-49% | ❌ **NON-COMPLIANT** | Major compliance violations - immediate action required | - -### Example Output - -``` -## ✅ Overall Status: COMPLIANT (100%) - -**Critical Checks:** 8/8 passed -**Total Checks:** 10/10 passed -**Informational:** 0 warning(s) - -████████████████████ 100% - -## Validation Results - -| Area | Status | Result | Priority | -|-----------------------------|---------|------------|-------------| -| 📁 Repository Structure | ✅ Pass | Compliant | - | -| 📚 Documentation Quality | ✅ Pass | Compliant | - | -| 💻 Coding Standards | ✅ Pass | Compliant | - | -| ⚖️ License Compliance | ✅ Pass | Compliant | - | -| 🧹 Git Repository Hygiene | ✅ Pass | Compliant | - | -| ⚙️ Workflow Configuration | ✅ Pass | Compliant | - | -| 🔢 Version Consistency | ✅ Pass | All versions match | - | -| 🔐 Script Integrity | ✅ Pass | SHA hashes validated | - | -| 🏢 Enterprise Readiness | ✅ Pass | Ready for enterprise | ℹ️ Info | -| 🏥 Repository Health | ✅ Pass | Health check passed | ℹ️ Info | -``` - -## Usage Examples - -### Running Manually - -```bash -# Trigger workflow manually via GitHub Actions UI -# Go to: Actions → Standards Compliance → Run workflow - -# Or use GitHub CLI -gh workflow run standards-compliance.yml -``` - -### Local Validation - -Run individual validators locally before pushing: - -```bash -# Check version consistency -php api/validate/check_version_consistency.php --verbose - -# Validate script integrity -python3 api/maintenance/validate_script_registry.py --priority critical --verbose - -# Check enterprise readiness -php api/validate/check_enterprise_readiness.php --verbose - -# Check repository health -php api/validate/check_repo_health.php --verbose - -# Lint YAML files -yamllint .gitea/workflows/*.yml - -# Format Python code -black --check scripts/**/*.py - -# Check PHP code style -phpcs --standard=PSR12 src/ -``` - -### Fixing Common Issues - -#### Version Mismatches - -```bash -# 1. Identify current version -grep '"version"' composer.json - -# 2. Find mismatches -php api/validate/check_version_consistency.php - -# 3. Update all references to match -# Use sed or manually update files listed in output -``` - -#### Script Integrity Violations - -```bash -# If changes are legitimate: -python3 api/maintenance/generate_script_registry.py --update - -# If changes are NOT authorized: -git checkout HEAD -- scripts/ -``` - -#### Coding Standard Violations - -```bash -# Auto-fix Python formatting -black scripts/**/*.py - -# Auto-fix PHP code style -phpcbf --standard=PSR12 src/ - -# Fix YAML issues -# Manual fixes required based on yamllint output -``` - -## Integration with Pull Requests - -The workflow automatically: - -1. **Runs on every PR** to main, dev/*, or rc/* branches -2. **Posts results** in the PR checks section -3. **Provides detailed summary** in the workflow run -4. **Blocks merge** if critical checks fail -5. **Offers remediation steps** for any violations - -### PR Status Checks - -| Check Result | PR Status | Merge Allowed | -|--------------|-----------|---------------| -| All critical checks pass | ✅ Success | Yes | -| Any critical check fails | ❌ Failure | No (blocked) | -| Only informational warnings | ✅ Success | Yes | - -## Workflow Architecture - -``` -┌─────────────────────────────────────────────────────────────┐ -│ PARALLEL VALIDATION CHECKS │ -└─────────────────────────────────────────────────────────────┘ - │ - ├─────────────┬──────────────┬──────────────┬────────────┐ - ▼ ▼ ▼ ▼ ▼ -┌─────────┐ ┌──────────┐ ┌──────────┐ ┌─────────┐ ┌──────────┐ -│Repository │File Header │Code Style│ │ Docs │ │ License │ -│Structure│ │ Validation│ │ Check │ │ Check │ │ Check │ -└─────────┘ └──────────┘ └──────────┘ └─────────┘ └──────────┘ - │ │ │ │ │ - ├─────────────┼──────────────┼──────────────┼────────────┤ - ▼ ▼ ▼ ▼ ▼ -┌─────────┐ ┌──────────┐ ┌──────────┐ ┌─────────┐ ┌──────────┐ -│ Git │ │ Workflow │ │ Version │ │ Script │ │Enterprise│ -│ Hygiene │ │ Config │ │Consistency│ │Integrity│ │Readiness │ -└─────────┘ └──────────┘ └──────────┘ └─────────┘ └──────────┘ - │ │ │ │ │ - └─────────────┴──────────────┴──────────────┴────────────┘ - │ - ▼ - ┌──────────────────┐ - │ All Checks Pass?│ - └──────────────────┘ - │ │ - YES │ │ NO - ▼ ▼ - ┌──────────┐ ┌──────────────┐ - │ SUCCESS │ │ CREATE ISSUE │ - │ Summary │ │ with Failure │ - └──────────┘ │ Details │ - └──────────────┘ -``` - -## Customization - -### Adjusting Severity - -To change a critical check to informational (non-blocking): - -```yaml -# In the summary job, change from: -[ "$CHECK_STATUS" = "success" ] && PASSED=$((PASSED + 1)) || FAILED=$((FAILED + 1)) - -# To: -if [ "$CHECK_STATUS" = "success" ]; then - PASSED=$((PASSED + 1)) -else - WARNINGS=$((WARNINGS + 1)) -fi -``` - -### Adding Custom Checks - -Add a new validation job: - -```yaml -custom-check: - name: Custom Validation - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Run Custom Validator - run: | - ./scripts/custom-validator.sh -``` - -Then add it to the summary `needs` array. - -### Skipping Checks - -To skip a check temporarily, add to job: - -```yaml -if: false # Skip this check -``` - -Or make conditional: - -```yaml -if: ${{ github.event_name != 'pull_request' }} # Skip on PRs -``` - -## Troubleshooting - -### Workflow Fails Unexpectedly - -**Check**: -1. Review workflow run logs in GitHub Actions -2. Look for specific error messages in failed jobs -3. Check if required scripts exist (new checks depend on PHP/Python scripts) - -**Common Issues**: -- Missing validator scripts (version/enterprise/health checks) -- PHP/Python not available in runner -- Permissions issues with files - -### Version Consistency Always Fails - -**Cause**: Multiple version references across repository don't match - -**Fix**: -1. Identify canonical version: `grep '"version"' composer.json` -2. Find mismatches: `php api/validate/check_version_consistency.php` -3. Update all references to match canonical version - -### Script Integrity Violations - -**Legitimate Changes**: -```bash -# Update registry after modifying scripts -python3 api/maintenance/generate_script_registry.py --update -git add scripts/.script-registry.json -git commit -m "chore: update script registry" -``` - -**Unauthorized Changes**: -```bash -# Restore original scripts -git checkout HEAD -- scripts/ -``` - -## Related Documentation - -- [Workflow Architecture](./workflow-architecture.md) -- [Workflow Inventory](./workflow-inventory.md) -- [Repository Structure Standards](../policy/core-structure.md) -- [Coding Style Guide](../policy/coding-style-guide.md) -- [File Header Standards](../policy/file-header-standards.md) -- [License Compliance Policy](../policy/license-compliance.md) -- [Version Management](../guide/version-badge-guide.md) -- [Script Integrity Guide](../guide/script-integrity-validation.md) - -## Changelog - -### v04.00.04 (2026-02-21) - -**Added**: -- ✨ Version Consistency Check - Validates all version numbers match -- ✨ Script Integrity Validation - Verifies SHA-256 hashes -- ✨ Enterprise Readiness Check - Assesses enterprise patterns (informational) -- ✨ Repository Health Check - Evaluates overall quality (informational) - -**Changed**: -- 📊 Enhanced compliance scoring with critical vs informational distinction -- 📊 Improved summary reporting with detailed breakdowns -- 📊 Total validation checks increased from 6 to 10 - -**Fixed**: -- 🐛 Compliance percentage now correctly calculates based on critical checks only - -### v04.00.04 (2026-01-07) - -**Added**: -- Initial comprehensive standards compliance workflow -- Repository structure validation -- Documentation quality checks -- Coding standards enforcement -- License compliance validation -- Git hygiene checks -- Workflow configuration validation - ---- - -**Maintained by**: MokoStandards Team -**Last Review**: 2026-02-21 -**Next Review**: 2026-03-21 diff --git a/docs/workflows/static-analysis.md b/docs/workflows/static-analysis.md deleted file mode 100644 index 8dfacd1..0000000 --- a/docs/workflows/static-analysis.md +++ /dev/null @@ -1,72 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# PHPStan Static Analysis - -**Status**: ✅ Active | **Version**: 01.00.00 | **Last Updated**: 2026-05-07 - -## Overview - -PHPStan static analysis is integrated into the **Joomla Extension CI** workflow as the `static-analysis` job. It runs after lint-and-validate passes and catches type errors, undefined methods, incorrect return types, and other bugs that PHP lint misses. - -## Configuration - -### Default Behavior (No Config File) - -If no `phpstan.neon` exists in the repo, PHPStan runs at **level 3** (type inference) against `src/`, `htdocs/`, or `lib/`. - -### Custom Config - -Create `phpstan.neon` in the repo root: - -```neon -parameters: - level: 5 - paths: - - src - excludePaths: - - src/vendor - ignoreErrors: - - '#Call to an undefined method#' -``` - -### Analysis Levels - -| Level | What It Checks | -|-------|---------------| -| 0 | Basic checks (unknown classes, functions, methods) | -| 1 | Possibly undefined variables | -| 2 | Unknown methods on `$this` | -| **3** | **Default — return types, type inference** | -| 4 | Dead code, always true/false | -| 5 | Argument types | -| 6-9 | Increasingly strict | - -## Behavior - -- **Non-blocking**: Uses `continue-on-error: true` — failures are reported but don't block PRs -- **Incremental adoption**: Start at level 3, increase as codebase improves -- **Auto-install**: PHPStan is installed if not in composer dependencies - -## Related Documentation - -- [Joomla Extension CI](./ci-joomla.md) -- [Security Audit](./security-audit.md) - -## Changelog - -| Version | Date | Changes | -|---------|------|---------| -| 01.00.00 | 2026-05-07 | Initial release — level 3 default, non-blocking | diff --git a/docs/workflows/sub-issue-management.md b/docs/workflows/sub-issue-management.md deleted file mode 100644 index 278fac5..0000000 --- a/docs/workflows/sub-issue-management.md +++ /dev/null @@ -1,219 +0,0 @@ -# Sub-Issue Management Guide - -## Overview - -Sub-issues (also called sub-tasks) are a way to break down complex parent issues into smaller, manageable pieces of work. This guide explains how to create and manage sub-issues in the MokoStandards repository. - -## When to Use Sub-Issues - -Use sub-issues when: - -- A parent issue is too large to tackle in one PR -- Multiple people need to work on different aspects of an issue -- You want to track progress on specific components of a larger task -- An issue requires multiple sequential steps that should be tracked separately - -## Creating Sub-Issues - -### Method 1: Using the Issue Template (Manual) - -1. Go to the [New Issue page](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/issues/new/choose) -2. Select the "Sub-Task" template -3. Fill in the required fields: - - **Parent Issue**: The issue number this sub-task belongs to (e.g., #193) - - **Task Title**: A brief, descriptive title - - **Task Description**: Detailed description of the work - - **Task Type**: Investigation, Bug Fix, Feature Implementation, etc. - - **Priority**: Low, Medium, High, or Critical -4. Optionally add: - - Acceptance criteria (checklist format) - - Dependencies on other issues - - Additional notes or context -5. Submit the issue - -### Method 2: Using the Automated Workflow - -For programmatic sub-issue creation: - -1. Go to **Actions** → **Create Sub-Issue** -2. Click "Run workflow" -3. Fill in the workflow inputs: - - **Parent issue**: The parent issue number (e.g., 193) - - **Title**: Sub-issue title - - **Description**: Detailed description - - **Task type**: Choose from dropdown - - **Priority**: Choose from dropdown - - **Assignees**: Comma-separated GitHub usernames (optional) - - **Labels**: Additional labels, comma-separated (optional) -4. Click "Run workflow" - -The workflow will: -- Validate the parent issue exists -- Create the sub-issue with appropriate labels -- Link it to the parent issue -- Add a comment to the parent issue -- Validate all assignees before assignment - -## Sub-Issue Best Practices - -### Naming Convention - -Use clear, action-oriented titles: - -- ✅ Good: `[Task] Investigate GH_TOKEN permissions` -- ✅ Good: `[Task] Update documentation for bulk sync process` -- ❌ Bad: `Token stuff` -- ❌ Bad: `Fix #193` - -### Description Guidelines - -Include: -- Clear description of what needs to be done -- Why this work is necessary -- Any relevant context or background -- Links to related issues, PRs, or documentation - -### Acceptance Criteria - -Use checkboxes to define when the sub-task is complete: - -```markdown -- [ ] All token permissions verified -- [ ] Documentation updated with findings -- [ ] Changes tested in staging environment -``` - -### Labels - -Sub-issues automatically receive the `sub-task` label. Add additional labels as appropriate: - -- Priority labels: `priority/low`, `priority/medium`, `priority/high`, `priority/critical` -- Type labels: `bug`, `enhancement`, `documentation` -- Component labels: `automation`, `infrastructure`, `security` - -### Linking to Parent Issues - -Always reference the parent issue in the sub-issue description: - -```markdown -**Parent Issue**: #193 - Bulk Repository Sync Failed -``` - -The automated workflow does this automatically. - -## Tracking Progress - -### In the Sub-Issue - -Use the progress checklist in the sub-issue body to track completion: - -```markdown -### Progress Tracking -- [x] Task started -- [x] Implementation complete -- [x] Tests passing -- [ ] Documentation updated -- [ ] Code review complete -- [ ] Ready to close -``` - -### In the Parent Issue - -Add a section to the parent issue to track all sub-issues: - -```markdown -## Sub-Issues - -- [ ] #194 - Investigate GH_TOKEN permissions -- [x] #195 - Update bulk sync documentation -- [ ] #196 - Add retry logic to sync script -``` - -Update this as sub-issues are completed. - -## Example: Creating Sub-Issues for Issue #193 - -For issue #193 (Bulk Repository Sync Failed), you might create these sub-issues: - -1. **Investigation**: `[Task] Investigate GH_TOKEN permissions and scopes` -2. **Bug Fix**: `[Task] Add retry logic for transient network failures` -3. **Documentation**: `[Task] Document troubleshooting steps for sync failures` -4. **Testing**: `[Task] Test bulk sync with different repository configurations` - -Each sub-issue would: -- Reference #193 as the parent -- Have a clear, specific scope -- Include acceptance criteria -- Be assigned to the appropriate team member - -## Configuration - -Sub-issue behavior is controlled by `.github/issue-management-config.yml`: - -```yaml -# Sub-Issue Management -sub_issues: - enabled: true - - # Automatically create sub-issues for - auto_create_for: - - prs: true - - tasks: false - - # Sub-issue naming - naming: - pr_prefix: "[PR]" - task_prefix: "[Task]" - - # Progress tracking - progress: - update_parent: true - show_percentage: true - show_checklist: true -``` - -## Closing Sub-Issues - -Close a sub-issue when: -- All acceptance criteria are met -- The work has been reviewed and approved -- Any related PRs have been merged -- The parent issue acknowledges completion - -Add a closing comment explaining what was accomplished: - -```markdown -Closing this sub-issue. All acceptance criteria met: -- Token permissions verified and documented -- Updated documentation with findings -- Changes tested and working - -See PR #XXX for implementation details. -``` - -## Automation - -The Create Sub-Issue workflow provides automation for: - -- **Validation**: Ensures parent issue exists before creating sub-issue -- **Linking**: Automatically links sub-issue to parent with comments -- **Assignee validation**: Verifies assignees are valid GitHub users -- **Label management**: Applies appropriate labels based on inputs -- **Summary generation**: Provides clear summary of created sub-issue - -## Related Resources - -- [Issue Management Configuration](.github/issue-management-config.yml) -- [Sub-Task Template](.github/ISSUE_TEMPLATE/sub-task.yml) -- [Create Sub-Issue Workflow](.gitea/workflows/create-sub-issue.yml) -- [GitHub Issues Documentation](https://docs.github.com/en/issues) - -## Support - -If you encounter issues with sub-issue creation: - -1. Check that the parent issue number is correct -2. Verify you have permission to create issues -3. Ensure assignees are valid GitHub usernames -4. Review the workflow run logs for error details -5. Open a bug report if the issue persists diff --git a/docs/workflows/update-server.md b/docs/workflows/update-server.md deleted file mode 100644 index f5a4aef..0000000 --- a/docs/workflows/update-server.md +++ /dev/null @@ -1,418 +0,0 @@ - - -# Update Server Files - -MokoStandards automatically generates platform-specific update server files on every release and dev/alpha/beta/rc deployment. - -## Overview - -| Platform | File | Format | Reference | -|----------|------|--------|-----------| -| Dolibarr (`crm-module`) | `update.txt` | Plain text version string (< 30 chars) | Dolibarr `url_last_version` check | -| Joomla (`waas-component`) | `updates.xml` | Multi-entry XML following Joomla update server spec | [Joomla Update Server Docs](https://docs.joomla.org/Deploying_an_Update_Server) | - -## Stability Tags - -Joomla's `updates.xml` contains **multiple `` entries simultaneously** — one per stability level. Joomla filters which entries the admin sees based on the site's **Minimum Stability** setting (Extensions > Update > Options). - -| Stability | Joomla `` | Who sees it | Source workflow | -|-----------|---------------|-------------|----------------| -| Stable | `stable` | All sites (default) | `auto-release.yml` on `main` | -| Release Candidate | `rc` | Sites set to RC or lower | `update-server.yml` on `rc/**` push | -| Beta | `beta` | Sites set to Beta or lower | `update-server.yml` on `beta/**` push | -| Alpha | `alpha` | Sites set to Alpha or lower | `update-server.yml` on `alpha/**` push | -| Development | `development` | Sites set to Development | `update-server.yml` on `dev` or `dev/**` push | - -**Note**: Alpha and beta are optional stages. Not every release cycle will have alpha/beta entries. - -### `update-server.yml` Trigger Behavior - -The `update-server.yml` workflow triggers on **both direct pushes and PR merges** to the following branches: - -- `dev` (bare branch — no sub-path required) -- `dev/**` (versioned dev branches like `dev/02.01`) -- `alpha/**` -- `beta/**` -- `rc/**` - -Previously, the workflow only triggered on PR merges. The addition of push triggers ensures that direct commits to these branches (e.g., CI-generated version bumps, automated fixes) also update the `updates.xml` entries. - -### Cascade Release Channels - -Each stability level writes its own channel **and all lower channels** to `updates.xml`. This ensures Joomla sites on any "Minimum Stability" setting always see the latest available release: - -| Release Stream | Channels written to updates.xml | -|---------------|-------------------------------| -| development | `development` | -| alpha | `development`, `alpha` | -| beta | `development`, `alpha`, `beta` | -| rc | `development`, `alpha`, `beta`, `rc` | -| stable | `development`, `alpha`, `beta`, `rc`, `stable` | - -Without cascade, a site set to "Development" minimum stability would only see `development` entries and would miss stable releases entirely. The cascade ensures stable releases are visible to all sites regardless of their minimum stability setting. - -For full cascade documentation, see [Cascade Release Channels](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/src/branch/main/docs/release-management/cascade-channels.md). - -### Sync to Main - -Since Joomla sites read `updates.xml` from the `main` branch, the `update-server.yml` workflow **syncs `updates.xml` to `main` via the Gitea API** after building on non-main branches. This ensures pre-release channel entries (dev, alpha, beta, rc) are visible to sites checking for updates, without requiring a PR merge to main. - -Previously, `update-server.yml` only committed `updates.xml` to the current branch, so Joomla sites never saw dev/alpha/beta/rc releases until they were merged to main. - -### How Joomla Filters Updates - -Joomla's update system reads all `` entries from the XML file but only presents entries whose `` matches the site's minimum stability threshold: - -- **Minimum Stability = Stable** (default): Only sees `stable` entries -- **Minimum Stability = RC**: Sees `stable` + `rc` entries -- **Minimum Stability = Beta**: Sees `stable` + `rc` + `beta` entries -- **Minimum Stability = Alpha**: Sees `stable` + `rc` + `beta` + `alpha` entries -- **Minimum Stability = Development**: Sees all entries (`stable` + `rc` + `beta` + `alpha` + `development`) - -The admin always gets the **highest version** among visible entries. - -### Dolibarr Stability - -| Workflow | Branch | `update.txt` content | -|----------|--------|---------------------| -| `auto-release.yml` | `main` | `XX.YY.ZZ` (real version) | -| `deploy-dev.yml` | `rc/**` | `XX.YY.ZZ-rc` | -| `deploy-dev.yml` | `beta/**` | `XX.YY.ZZ-beta` | -| `deploy-dev.yml` | `alpha/**` | `XX.YY.ZZ-alpha` | -| `deploy-dev.yml` | `dev/**` | `development` | - -### Branch Lifecycle - -``` -dev → [alpha] → [beta] → rc → version/XX → main → dev - optional optional (integration) (production) (feedback) -``` - -- **`dev` or `dev/**`**: Active development. Update files tagged as `development`. -- **`alpha/**`**: *(Optional)* Early internal testing. Update files tagged as `alpha`. Can be skipped. -- **`beta/**`**: *(Optional)* Broader external testing. Update files tagged as `beta`. Can be skipped. -- **`rc/**`**: Release candidate. Update files tagged as `rc`. RC branches deploy to dev server for final testing. -- **`version/XX`**: Major version integration branch (major only). All minors and patches flow into the same major branch. -- **`main`**: Stable release. `auto-release.yml` creates GitHub Release and `vXX` tag. Update files tagged as `stable`. -- **Main merges back to `dev`** to start the next cycle. - -## Dolibarr: `update.txt` - -Dolibarr modules check for updates by fetching a plain-text file from the URL in `$this->url_last_version`. The file must contain only the version string (e.g., `01.02.03`) — no JSON, no XML, no newlines. - -**On release (main):** -``` -01.02.03 -``` - -**On RC deploy (rc/**):** -``` -01.02.03-rc -``` - -**On dev deploy (dev/**):** -``` -development -``` - -The module descriptor's `url_last_version` should point to: -``` -https://git.mokoconsulting.tech/MokoConsulting/{repo}/raw/branch/main/update.txt -``` - -## Joomla: `updates.xml` (Multi-Entry) - -The `updates.xml` file contains **up to five stability entries at once** (one per stability level). Joomla reads the entire file and filters by the site's minimum stability setting. - -### Platform Distribution - -| Release Type | Gitea Release | GitHub Release | Download URLs | -|-------------|---------------|----------------|---------------| -| **Stable** | Yes | Yes (via mirror) | Dual (Gitea + GitHub) | -| **RC** | Yes | No | Single (Gitea only) | -| **Beta** | Yes | No | Single (Gitea only) | -| **Alpha** | Yes | No | Single (Gitea only) | -| **Development** | Yes | No | Single (Gitea only) | - -Pre-release builds stay on Gitea for internal testing. Only stable releases are mirrored to GitHub. - -### Complete Multi-Entry Example - -```xml - - - - - My Extension - My Extension stable release - com_myextension - component - 01.02.03 - - stable - - https://git.mokoconsulting.tech/MokoConsulting/MyExtension/releases - - https://git.mokoconsulting.tech/MokoConsulting/MyExtension/releases/download/v01/com_myextension-01.02.03.zip - https://github.com/mokoconsulting-tech/MyExtension/releases/download/v01/com_myextension-01.02.03.zip - - - Moko Consulting - https://mokoconsulting.tech - - - - - My Extension - My Extension release candidate - com_myextension - component - 01.03.01-rc - - rc - - https://git.mokoconsulting.tech/MokoConsulting/MyExtension/src/branch/rc - - https://git.mokoconsulting.tech/MokoConsulting/MyExtension/releases/download/rc/com_myextension-01.03.01-rc.zip - - - Moko Consulting - https://mokoconsulting.tech - - - - - My Extension - My Extension beta build - com_myextension - component - 01.03.01-beta - - beta - - https://git.mokoconsulting.tech/MokoConsulting/MyExtension/src/branch/beta - - https://git.mokoconsulting.tech/MokoConsulting/MyExtension/releases/download/beta/com_myextension-01.03.01-beta.zip - - - Moko Consulting - https://mokoconsulting.tech - - - - - My Extension - My Extension alpha build - com_myextension - component - 01.03.01-alpha - - alpha - - https://git.mokoconsulting.tech/MokoConsulting/MyExtension/src/branch/alpha - - https://git.mokoconsulting.tech/MokoConsulting/MyExtension/releases/download/alpha/com_myextension-01.03.01-alpha.zip - - - Moko Consulting - https://mokoconsulting.tech - - - - - My Extension - My Extension development build - com_myextension - component - 01.04.00-dev - - development - - https://git.mokoconsulting.tech/MokoConsulting/MyExtension/src/branch/dev - - https://git.mokoconsulting.tech/MokoConsulting/MyExtension/releases/download/development/com_myextension-01.04.00-dev.zip - - - Moko Consulting - https://mokoconsulting.tech - - -``` - -### Which Workflow Writes Which Entry - -| Workflow | Trigger | Entry written | -|----------|---------|---------------| -| `auto-release.yml` | Push to `main` | `stable` — writes the stable entry with SHA-256 hash of the ZIP | -| `update-server.yml` | Push to `rc/**` | `rc` — adds/updates the RC entry (+ cascaded lower channels) | -| `update-server.yml` | Push to `beta/**` | `beta` — adds/updates the beta entry (+ cascaded lower channels) | -| `update-server.yml` | Push to `alpha/**` | `alpha` — adds/updates the alpha entry (+ cascaded lower channels) | -| `update-server.yml` | Push to `dev` or `dev/**` | `development` — adds/updates the development entry | - -The `auto-release.yml` workflow writes the stable entry and preserves any existing pre-release entries. The `update-server.yml` workflow writes its specific entry (and cascaded lower channels) and preserves the others. - -**Important**: All `update-server.yml` runs also sync the updated `updates.xml` to `main` via the Gitea API, since Joomla sites read the update server XML from the `main` branch. - -### XML Elements - -All metadata is auto-extracted from the extension's XML manifest at build time: - -| Element | Source | Notes | -|---------|--------|-------| -| `` | `` in manifest | Extension display name | -| `` | `` in manifest, or manifest filename | Must match installed extension | -| `` | `type` attribute on `` | `component`, `module`, `plugin`, `library`, `package`, `template` | -| `` | `client` attribute on `` | `site` or `administrator` — **required for plugins and modules** | -| `` | `group` attribute on `` | Plugin group (e.g., `system`, `content`) — **required for plugins** | -| `` | README.md VERSION field | Real version on release, `development` on dev | -| `` | Workflow determines | `stable` on release, `development` on dev | -| `` | `` in manifest | Falls back to Joomla 5.x / 6.x | -| `` | `` in manifest | Optional, included if present | -| `` | GitHub release/branch URL | Links to release page or branch | -| `` | GitHub release asset or branch archive | `type="full" format="zip"` | - -### Extension Manifest Setup - -For the updates.xml generation to work correctly, your Joomla extension manifest must include: - -```xml - - My Extension - com_myextension - - - - https://git.mokoconsulting.tech/mokoconsulting-tech/{repo}/raw/branch/main/updates.xml - - - https://raw.githubusercontent.com/mokoconsulting-tech/{repo}/main/updates.xml - - - -``` - -The `` tag tells Joomla where to check for updates. Both servers are declared for redundancy — Gitea (primary, priority 1) and GitHub mirror (fallback, priority 2). - -## How It Works - -### Joomla (updates.xml) - -1. **On release** (`auto-release.yml` → main branch): - - Builds ZIP from `src/` directory - - Uploads ZIP to the `vXX` major release on GitHub - - Computes SHA-256 hash of the ZIP - - Writes/updates the `stable` entry in `updates.xml` with version, download URL, and SHA-256 - - Cascades to all 5 stability channels - - Preserves any existing rc/dev entries in the file - - Commits updated `updates.xml` to main - -2. **On RC push** (`update-server.yml` → rc/** branches): - - Writes/updates the `rc` entry in `updates.xml` - - Cascades to `rc`, `beta`, `alpha`, and `development` channels - - Download URL points to the Gitea release ZIP - - Preserves all other stability entries - - Commits updated `updates.xml` to the rc branch - - **Syncs `updates.xml` to `main` via Gitea API** - -3. **On beta push** (`update-server.yml` → beta/** branches): - - Writes/updates the `beta` entry in `updates.xml` - - Cascades to `beta`, `alpha`, and `development` channels - - Download URL points to the Gitea release ZIP - - Preserves all other stability entries - - Commits updated `updates.xml` to the beta branch - - **Syncs `updates.xml` to `main` via Gitea API** - -4. **On alpha push** (`update-server.yml` → alpha/** branches): - - Writes/updates the `alpha` entry in `updates.xml` - - Cascades to `alpha` and `development` channels - - Download URL points to the Gitea release ZIP - - Preserves all other stability entries - - Commits updated `updates.xml` to the alpha branch - - **Syncs `updates.xml` to `main` via Gitea API** - -5. **On dev push** (`update-server.yml` → `dev` or `dev/**` branches): - - Writes/updates the `development` entry in `updates.xml` - - Download URL points to the Gitea release ZIP - - Preserves all other stability entries - - Commits updated `updates.xml` to the dev branch - - **Syncs `updates.xml` to `main` via Gitea API** - -### Dolibarr (update.txt) - -1. **On release** (`auto-release.yml` → main): writes real version to `update.txt` -2. **On RC deploy** (`deploy-dev.yml` → rc/**): writes `XX.YY.ZZ-rc` to `update.txt` -3. **On beta deploy** (`deploy-dev.yml` → beta/**): writes `XX.YY.ZZ-beta` to `update.txt` -4. **On alpha deploy** (`deploy-dev.yml` → alpha/**): writes `XX.YY.ZZ-alpha` to `update.txt` -5. **On dev deploy** (`deploy-dev.yml` → dev/**): writes `development` to `update.txt` - -### RC --> Main Flow - -When a release candidate is ready: - -1. `rc/XX.YY.ZZ` branch is tested with `rc` update entries -2. RC branch is merged to `main` via PR -3. Push to main triggers `auto-release.yml` → GitHub Release + `vXX` tag -4. `updates.xml` on main gets a new/updated `stable` entry -5. `version/XX` archive branch is auto-created - -## Health Checks - -The platform-specific `repo_health.yml` workflows verify: -- **Dolibarr**: `update.txt` exists in root, module descriptor valid, url_last_version correct -- **Joomla**: `updates.xml` exists in root, XML manifest valid, language files present - -## Rulesets - -Branch protection rulesets (applied via `sync_rulesets.php`): -- **MAIN**: prevents deletion, non-fast-forward, requires PRs -- **VERSION**: immutable — prevents updates, deletion, force-push -- **DEV**: prevents deletion, non-fast-forward -- **ALPHA**: prevents deletion, non-fast-forward -- **BETA**: prevents deletion, non-fast-forward -- **RC**: prevents deletion, non-fast-forward - -## Update Server Priority - -Joomla manifest `` entries MUST follow this priority order: - -| Priority | Server | URL pattern | -|----------|--------|-------------| -| **1 (primary)** | Gitea | `https://git.mokoconsulting.tech/MokoConsulting/{REPO}/raw/branch/main/updates.xml` | -| **2 (fallback)** | GitHub | `https://raw.githubusercontent.com/mokoconsulting-tech/{REPO}/main/updates.xml` | - -### Why Gitea first - -1. **Gitea is the source of truth** — all CI/CD runs on Gitea, releases are created here first -2. **GitHub is a push mirror** — it may lag behind by minutes or hours -3. **Self-hosted control** — Gitea is under our infrastructure, GitHub is third-party -4. **Availability** — if GitHub has an outage, Joomla sites still get updates from Gitea - -### Manifest example - -```xml - - - https://git.mokoconsulting.tech/MokoConsulting/RepoName/raw/branch/main/updates.xml - - - https://raw.githubusercontent.com/mokoconsulting-tech/RepoName/main/updates.xml - - -``` - -### Enforcement - -The `enforce_tags.sh` script and `repo_health.yml` workflow validate this ordering. -Repos with GitHub as priority 1 will be flagged as non-compliant. diff --git a/docs/workflows/workflow-architecture.md b/docs/workflows/workflow-architecture.md deleted file mode 100644 index 644e3d8..0000000 --- a/docs/workflows/workflow-architecture.md +++ /dev/null @@ -1,560 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# Workflow Architecture - -## Overview -> **Important (v2):** All workflows MUST be in `.gitea/workflows/` only. Gitea Actions does not run workflows from `.github/workflows/`. Having files in `.github/workflows/` creates ghost queued runs that block the runner. - -This document explains the workflow architecture used across Moko Consulting repositories, including the hierarchy, design patterns, reusable workflow patterns, and decision-making processes for workflow selection. - -## Purpose - -This architecture guide provides: - -- **Understanding**: Clear mental model of workflow organization -- **Guidance**: Decision trees for workflow selection -- **Patterns**: Reusable patterns and best practices -- **Relationships**: How workflows interact and depend on each other -- **Evolution**: How to extend and improve the workflow architecture - -## Three-Tier Workflow Architecture - -Moko Consulting uses a three-tier architecture for GitHub Actions workflows: - -``` -┌─────────────────────────────────────────────────────────────┐ -│ Tier 1: Organization-Wide Reusable Workflows │ -│ Location: .github-private repository │ -│ Visibility: Private │ -│ Purpose: Shared across all organization repositories │ -│ Examples: Deployment, compliance audits, security scanning │ -└─────────────────────────────────────────────────────────────┘ - ↓ (called by) -┌─────────────────────────────────────────────────────────────┐ -│ Tier 2: Public Reusable Workflows │ -│ Location: MokoStandards repository │ -│ Visibility: Public │ -│ Purpose: Templates and patterns for community use │ -│ Examples: CI validation, build automation, health checks │ -└─────────────────────────────────────────────────────────────┘ - ↓ (called by) -┌─────────────────────────────────────────────────────────────┐ -│ Tier 3: Local Workflows │ -│ Location: Individual repository .gitea/workflows/ │ -│ Visibility: Matches repository visibility │ -│ Purpose: Repository-specific automation │ -│ Examples: Project builds, tests, custom deployments │ -└─────────────────────────────────────────────────────────────┘ -``` - -### Tier 1: Organization-Wide Reusable Workflows - -**Location**: `mokoconsulting-tech/.github-private/.gitea/workflows/` - -**Characteristics**: -- Private and secure -- Contains sensitive organizational logic -- Requires organization secrets -- Enforces organization-wide compliance -- Centrally maintained with high governance -- Performs cross-repository operations - -**Examples**: -- `reusable-compliance-audit.yml` - Monthly compliance audits -- `reusable-standards-scan.yml` - Organization-wide standards scanning -- `reusable-branch-cleanup.yml` - Automated branch cleanup -- `reusable-auto-label.yml` - Automated issue/PR labeling -- `reusable-stale-management.yml` - Stale issue/PR management - -**When to Use**: -- Workflow contains proprietary logic -- Workflow requires organization-level secrets -- Workflow performs cross-repository operations -- Workflow enforces organization-wide policies -- Workflow handles sensitive data or operations - -### Tier 2: Public Reusable Workflows - -**Location**: `MokoConsulting/MokoStandards/.gitea/workflows/` - -**Characteristics**: -- Public and community-accessible -- Demonstrates best practices -- Platform-agnostic where possible -- Well-documented with examples -- Follows standards defined in `/docs/policy/` -- Suitable for open-source sharing - -**Examples**: -- `reusable-ci-validation.yml` - CI validation with project detection -- `reusable-build.yml` - Universal build workflow -- `reusable-deploy.yml` - Deployment workflow template -- `reusable-joomla-testing.yml` - Joomla-specific testing -- `reusable-php-quality.yml` - PHP code quality checks -- `reusable-project-detector.yml` - Automatic project type detection - -**When to Use**: -- Workflow is a common pattern across repositories -- Workflow can be public and shared -- Workflow demonstrates best practices -- Workflow is platform-agnostic or extensible -- Workflow serves as template for community - -### Tier 3: Local Workflows - -**Location**: Individual repository `.gitea/workflows/` - -**Characteristics**: -- Repository-specific -- Calls reusable workflows from Tier 1 or Tier 2 -- Contains minimal logic (orchestration only) -- Easy to understand and maintain -- Project-specific configuration - -**Examples**: -- `ci.yml` - Calls reusable CI validation workflow -- `release-pipeline.yml` - Orchestrates release process -- `repo-health.yml` - Repository health monitoring -- `standards-compliance.yml` - Standards validation - -**When to Use**: -- Workflow is specific to one repository -- Workflow doesn't fit reusable pattern -- Workflow is experimental or temporary -- Workflow orchestrates multiple reusable workflows - -## Workflow Design Patterns - -### Pattern 1: Project Detection and Conditional Execution - -Automatically detect project type and execute appropriate build/test strategy. - -```yaml -jobs: - detect: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-project-detector.yml@main - - build-joomla: - needs: detect - if: needs.detect.outputs.project-type == 'joomla' - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-joomla-testing.yml@main - - build-generic: - needs: detect - if: needs.detect.outputs.project-type == 'generic' - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-build.yml@main -``` - -**Benefits**: -- Single workflow supports multiple project types -- No manual configuration needed -- Easy to maintain and extend - -### Pattern 2: Composition through Reusable Workflows - -Build complex workflows by composing simple reusable workflows. - -```yaml -jobs: - # Step 1: Validate code - validate: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-ci-validation.yml@main - - # Step 2: Build if validation passes - build: - needs: validate - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-build.yml@main - - # Step 3: Deploy if build passes - deploy: - needs: build - if: github.ref == 'refs/heads/main' - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-deploy.yml@main - secrets: inherit -``` - -**Benefits**: -- Clear separation of concerns -- Reusable components -- Easy to test and debug -- Flexible composition - -### Pattern 3: Matrix Strategy for Multi-Platform Testing - -Test across multiple versions or platforms using matrix strategy. - -```yaml -jobs: - test: - strategy: - matrix: - php-version: ['7.4', '8.0', '8.1', '8.2'] - os: [ubuntu-latest, windows-latest] - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-php-quality.yml@main - with: - php-version: ${{ matrix.php-version }} -``` - -**Benefits**: -- Comprehensive testing coverage -- Parallel execution -- Configurable test matrix - -### Pattern 4: Conditional Deployment Based on Environment - -Deploy to different environments based on branch or tag. - -```yaml -jobs: - deploy-staging: - if: github.ref == 'refs/heads/dev' - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-deploy.yml@main - with: - environment: staging - - deploy-production: - if: startsWith(github.ref, 'refs/tags/v') - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-deploy.yml@main - with: - environment: production -``` - -**Benefits**: -- Safe deployment practices -- Environment-specific configuration -- Clear deployment triggers - -### Pattern 5: Workflow Dispatch with Manual Controls - -Allow manual triggering with customizable inputs. - -```yaml -on: - workflow_dispatch: - inputs: - environment: - description: 'Deployment environment' - required: true - type: choice - options: - - staging - - production - dry-run: - description: 'Perform dry run' - required: false - type: boolean - default: true - -jobs: - deploy: - uses: MokoConsulting/MokoStandards/.gitea/workflows/reusable-deploy.yml@main - with: - environment: ${{ inputs.environment }} - dry-run: ${{ inputs.dry-run }} -``` - -**Benefits**: -- Manual control when needed -- Safe defaults (dry-run) -- Clear input options - -## Workflow Relationships - -### Dependency Graph - -``` -repo-health.yml - │ - └──> Uses: reusable-project-detector.yml - │ - └──> Provides: project-type output - -ci.yml - │ - ├──> Uses: reusable-ci-validation.yml - │ │ - │ ├──> Uses: reusable-project-detector.yml - │ └──> Uses: reusable-php-quality.yml (if PHP) - │ - └──> Uses: reusable-build.yml - │ - └──> Uses: reusable-project-detector.yml - -release-pipeline.yml - │ - ├──> Uses: reusable-build.yml - ├──> Uses: reusable-release.yml - └──> Uses: reusable-deploy.yml -``` - -### Workflow Inheritance - -Workflows inherit behavior through composition: - -1. **Base Workflows**: Provide core functionality - - `reusable-project-detector.yml` - - `reusable-build.yml` - -2. **Specialized Workflows**: Add domain-specific logic - - `reusable-joomla-testing.yml` (extends base build) - - `reusable-php-quality.yml` (extends base validation) - -3. **Orchestration Workflows**: Combine multiple workflows - - `ci.yml` (combines validation + build) - - `release-pipeline.yml` (combines build + release + deploy) - -## Decision Trees - -### Choosing the Right Tier - -``` -Start: Need to create/modify workflow - │ - ├──> Contains sensitive/proprietary logic? - │ └──> YES: Use Tier 1 (.github-private) - │ - ├──> Common pattern across repositories? - │ └──> YES: Use Tier 2 (MokoStandards) - │ - └──> Repository-specific? - └──> YES: Use Tier 3 (local workflow) -``` - -### Choosing Between Reusable vs Local - -``` -Start: Creating new workflow - │ - ├──> Used by multiple repositories? - │ └──> YES: Create reusable workflow - │ - ├──> Complex multi-step process? - │ └──> YES: Break into reusable components - │ - └──> Simple repository-specific task? - └──> YES: Create local workflow -``` - -### Choosing Workflow Trigger - -``` -Start: When should workflow run? - │ - ├──> On code changes? - │ └──> Use: on.push, on.pull_request - │ - ├──> On schedule? - │ └──> Use: on.schedule (cron) - │ - ├──> Manual trigger needed? - │ └──> Use: on.workflow_dispatch - │ - └──> Called by other workflows? - └──> Use: on.workflow_call -``` - -## Workflow Evolution - -### Adding New Workflows - -1. **Identify Need**: What problem does this workflow solve? -2. **Check Existing**: Can existing workflow be extended? -3. **Design Interface**: Define inputs, outputs, secrets -4. **Choose Tier**: Public (Tier 2) or Private (Tier 1)? -5. **Implement**: Follow [Workflow Standards](../docs/policy/workflow-standards.md) -6. **Document**: Add to [REUSABLE_WORKFLOWS.md](./workflows/REUSABLE_WORKFLOWS.md) -7. **Test**: Validate in test repository -8. **Deploy**: Merge and communicate - -### Refactoring Workflows - -Signs a workflow needs refactoring: -- Duplicated logic across repositories -- Complex, hard-to-maintain workflow -- Frequent changes to same workflow across repos -- Lack of clear purpose or focus - -Refactoring process: -1. Identify common patterns -2. Extract to reusable workflow -3. Define clear interface -4. Update calling workflows -5. Test thoroughly -6. Document changes -7. Deprecate old approach - -### Deprecating Workflows - -Process for deprecating workflows: -1. Add deprecation notice to workflow -2. Provide migration path -3. Update documentation -4. Communicate to users -5. Wait minimum 90 days -6. Move to `archived/` directory -7. Update inventories - -## Best Practices - -### Keep Workflows Focused - -✅ **Good**: Single-purpose workflow -```yaml -# reusable-php-quality.yml - PHP quality checks only -jobs: - quality: - runs-on: ubuntu-latest - steps: - - name: Run PHP CodeSniffer - - name: Run PHPStan - - name: Run PHP Mess Detector -``` - -❌ **Bad**: Kitchen-sink workflow -```yaml -# mega-workflow.yml - Too many responsibilities -jobs: - everything: - steps: - - name: Lint - - name: Test - - name: Build - - name: Deploy - - name: Notify - - name: Update docs -``` - -### Use Composition Over Duplication - -✅ **Good**: Compose from reusable workflows -```yaml -jobs: - validate: - uses: org/repo/.gitea/workflows/reusable-validate.yml@main - build: - uses: org/repo/.gitea/workflows/reusable-build.yml@main -``` - -❌ **Bad**: Duplicate logic -```yaml -jobs: - validate-and-build: - steps: - - name: Checkout - - name: Setup - - name: Lint (duplicated across repos) - - name: Test (duplicated across repos) - - name: Build (duplicated across repos) -``` - -### Fail Fast - -✅ **Good**: Quick feedback on failures -```yaml -jobs: - validate: - runs-on: ubuntu-latest - steps: - - name: Quick syntax check - run: | - if ! php -l src/*.php; then - echo "::error::PHP syntax errors found" - exit 1 - fi - - test: - needs: validate # Only run if validation passes -``` - -❌ **Bad**: Slow feedback -```yaml -jobs: - everything: - steps: - - name: Run all tests (30 minutes) - - name: Then check syntax # Should be first! -``` - -## Common Anti-Patterns - -### Anti-Pattern 1: Monolithic Workflows - -**Problem**: One huge workflow that does everything - -**Solution**: Break into focused, composable workflows - -### Anti-Pattern 2: Hardcoded Values - -**Problem**: Hardcoded configuration in workflow files - -**Solution**: Use inputs and variables - -### Anti-Pattern 3: Insufficient Error Handling - -**Problem**: Workflows fail silently or with unclear errors - -**Solution**: Add error handling and clear error messages - -### Anti-Pattern 4: Overly Broad Permissions - -**Problem**: Workflows request more permissions than needed - -**Solution**: Follow principle of least privilege - -### Anti-Pattern 5: No Testing - -**Problem**: Workflows deployed without testing - -**Solution**: Test in feature branches first - -## References - -- [Workflow Standards Policy](../docs/policy/workflow-standards.md) -- [Reusable Workflows Documentation](./workflows/REUSABLE_WORKFLOWS.md) -- [Workflow Inventory](./WORKFLOW_INVENTORY.md) -- [GitHub Actions Documentation](https://docs.github.com/en/actions) -- [Repository Organization Guide](../docs/guide/repository-organization.md) - -## Metadata - -* **Document**: .github/WORKFLOW_ARCHITECTURE.md -* **Repository**: [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) -* **Owner**: Moko Consulting Engineering Team -* **Scope**: Workflow architecture and design patterns -* **Lifecycle**: Active -* **Audience**: All engineers and workflow authors - -## Revision History - -| Version | Date | Author | Notes | -| -------- | ---------- | ------------------------------- | ----------------------------------------------- | -| 01.00.00 | 2026-01-13 | GitHub Copilot | Initial workflow architecture documentation | diff --git a/docs/workflows/workflow-inventory.md b/docs/workflows/workflow-inventory.md deleted file mode 100644 index ba72ac1..0000000 --- a/docs/workflows/workflow-inventory.md +++ /dev/null @@ -1,1577 +0,0 @@ - - -[![MokoStandards](https://img.shields.io/badge/MokoStandards-04.06.00-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) - -# GitHub Actions Workflow Inventory - -## Overview - -This document provides a complete inventory of all GitHub Actions workflows in the MokoStandards repository, prepared for migration to `.github-private` repository. - -### Repository Architecture - -Moko Consulting maintains a dual-repository strategy: - -- **`MokoStandards`** - **Public Central Repository** - - Public standards, templates, and documentation - - Community-accessible workflow templates - - Open-source best practices - -- **`.github-private`** - **Private and Secure Centralization** - - Proprietary workflow implementations - - Organization-specific CI/CD pipelines - - Sensitive automation and deployment logic - -This inventory identifies which workflows stay in the public `MokoStandards` repository and which migrate to the private `.github-private` repository for secure centralization. - -## Workflow Summary - -| # | Workflow | LOC | Complexity | Secrets Used | Migration Decision | -|---|----------|-----|------------|--------------|-------------------| -| 1 | php_quality.yml | TBD | Medium | Org Secrets | **Centralize to .github-private** | -| 2 | release_pipeline.yml | TBD | High | Org Secrets | **Centralize to .github-private** | -| 3 | deploy_staging.yml | TBD | High | Org Secrets | **Centralize to .github-private** | -| 4 | joomla_testing.yml | TBD | Medium | Org Secrets | **Centralize to .github-private** | -| 5 | ci.yml | 98 | Low | None | **Keep Local** | -| 6 | repo_health.yml | 651 | High | GH_PAT | **Keep Local** | -| 7 | version_branch.yml | TBD | Medium | GH_PAT | **Keep Local** | -| 8 | codeql-analysis.yml | 93 | Low | None | Keep Local (security) | -| 9 | changelog_update.yml | 76 | Medium | GH_PAT | Evaluate | -| 10 | version_release.yml | 169 | High | GH_PAT | Evaluate | -| 11 | rebuild_docs_indexes.yml | 92 | Medium | GH_PAT | Evaluate | -| 12 | setup_project_v2.yml | 72 | Medium | GH_PAT | Evaluate | -| 13 | sync_docs_to_project.yml | 225 | High | GH_PAT | Evaluate | - -**Decision Summary:** -- **Centralize (4):** php_quality.yml, release_pipeline.yml, deploy_staging.yml, joomla_testing.yml -- **Keep Local (3):** ci.yml, repo_health.yml, version_branch.yml -- **Other (7):** Existing workflows to evaluate separately - -## Shared Scripts - -The following Python scripts will be shared across repositories via `.github-private`: - -| Script | Purpose | Current Location | Target Location | -|--------|---------|------------------|-----------------| -| `extension_utils.py` | Joomla extension utilities | Repository-specific | `.github-private/scripts/` | -| `common.py` | Common helper functions | Repository-specific | `.github-private/scripts/` | - -These scripts will be: -- Versioned and maintained centrally -- Imported via GitHub Actions checkout from `.github-private` -- Available to all workflows with organization access -- Documented with clear API contracts - -## Secret Configuration - -All secrets are configured at **organization level** with inheritance: - -| Secret Type | Scope | Usage | -|-------------|-------|-------| -| Deployment Keys | Organization | All deployment workflows | -| API Tokens | Organization | Release and quality workflows | -| Registry Credentials | Organization | Docker/package publishing | -| Service Accounts | Organization | External integrations | - -**Inheritance Pattern:** -```yaml -jobs: - deploy: - uses: mokoconsulting-tech/.github-private/.gitea/workflows/reusable/deploy-staging.yml@main - secrets: inherit # All org secrets automatically available -``` - -## Detailed Workflow Analysis - -### Workflows to Centralize to .github-private - -### 1. php_quality.yml - PHP Code Quality Analysis - -**Purpose:** Automated PHP code quality checks including linting, static analysis, and coding standards validation - -**Current Status:** To be migrated to `.github-private` - -**Triggers:** -- `push` to main and development branches (`dev/**`, `rc/**`) -- `pull_request` to main branch -- `workflow_dispatch` for manual execution - -**Jobs:** - -1. **syntax-check** - - Validates PHP syntax across all PHP files - - Runs `php -l` (lint) on changed files - - Fails fast if syntax errors found - -2. **phpcs** (PHP_CodeSniffer) - - Checks coding standards compliance - - Standard: PSR-12 (configurable) - - Reports: Summary with error count, detailed report artifact - - Error threshold: 0 errors, 10 warnings maximum - -3. **phpstan** (Static Analysis) - - Type checking and bug detection - - Level: 6 (out of 9) - - Memory limit: 1GB - - Cache enabled for faster subsequent runs - -4. **psalm** (Static Analysis) - - Additional type checking with different heuristics - - Error level: 3 - - Shows info about inferred types - - Integrates with PHPUnit for test assertions - -5. **phpmd** (Mess Detector) - - Code complexity and design analysis - - Rules: codesize, controversial, design, naming, unusedcode - - Cyclomatic complexity threshold: 10 - - NPath complexity threshold: 200 - -**Matrix Strategy:** -```yaml -strategy: - matrix: - php: ['7.4', '8.0', '8.1', '8.2'] - tools: ['phpcs', 'phpstan', 'psalm', 'phpmd'] - fail-fast: false -``` - -**Dependencies:** -- PHP 7.4-8.2 (multi-version testing) -- Composer for dependency management -- Quality tools installed via composer: - - `squizlabs/php_codesniffer:^3.7` - - `phpstan/phpstan:^1.10` - - `vimeo/psalm:^5.0` - - `phpmd/phpmd:^2.13` -- `extension_utils.py` for Joomla-specific validation -- `common.py` for reporting utilities - -**Environment Variables:** -```yaml -env: - COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} # For private packages - PHPSTAN_MEMORY_LIMIT: 1G - PHPCS_COLORS: 1 -``` - -**Outputs:** -- Quality scores (per tool, aggregated) -- Error/warning counts -- Detailed reports as artifacts -- PR comments with summary - -**Migration Type:** Convert to reusable workflow in `.github-private` - -**Proposed Location:** `.github-private/.gitea/workflows/reusable/php-quality.yml` - -**Migration Complexity:** ⭐⭐⭐ Medium -- Requires PHP tool setup and configuration -- Matrix testing adds complexity -- Integration with `extension_utils.py` needs testing -- Multiple output formats to support - -**Estimated LOC:** ~250 lines (including all jobs and steps) - -**Secrets Required:** -```yaml -secrets: - COMPOSER_AUTH: # Organization-level, for private Packagist/Composer repos - CODECOV_TOKEN: # Organization-level, optional for coverage upload - SONAR_TOKEN: # Organization-level, optional for SonarQube integration -``` - -**Shared Scripts Used:** -- `extension_utils.py` - Joomla manifest validation, custom rule checks -- `common.py` - Report formatting, PR comment generation - -**Reusable Workflow Interface:** -```yaml -on: - workflow_call: - inputs: - php-versions: - description: 'JSON array of PHP versions to test' - required: false - type: string - default: '["7.4", "8.0", "8.1", "8.2"]' - tools: - description: 'Quality tools to run' - required: false - type: string - default: '["phpcs", "phpstan", "psalm", "phpmd"]' - phpcs-standard: - description: 'PHP_CodeSniffer standard' - required: false - type: string - default: 'PSR12' - phpstan-level: - description: 'PHPStan analysis level (0-9)' - required: false - type: string - default: '6' - working-directory: - description: 'Working directory for checks' - required: false - type: string - default: '.' - fail-on-error: - description: 'Fail workflow if errors found' - required: false - type: boolean - default: true - upload-artifacts: - description: 'Upload detailed reports as artifacts' - required: false - type: boolean - default: true - outputs: - quality-score: - description: 'Overall quality score (0-100)' - value: ${{ jobs.aggregate.outputs.score }} - error-count: - description: 'Total number of errors found' - value: ${{ jobs.aggregate.outputs.errors }} - secrets: - COMPOSER_AUTH: - required: false - CODECOV_TOKEN: - required: false - SONAR_TOKEN: - required: false -``` - -**Success Criteria:** -- All syntax checks pass -- PHPCS: 0 errors, ≤10 warnings -- PHPStan: Level 6 with 0 errors -- Psalm: Error level 3 with 0 errors -- PHPMD: No violations of critical rules - -**Performance Optimizations:** -- Cache Composer dependencies (saves ~30 seconds) -- Cache PHPStan result cache (saves ~15 seconds) -- Parallel tool execution where possible -- Skip tools for unchanged file types - -**Known Issues:** -- PHPStan can be memory-intensive on large codebases (1GB limit set) -- PHPCS can be slow on monorepos (use path filters) -- Psalm may have false positives with complex types (configure baseline) - -**Example Usage After Migration:** -```yaml -name: PHP Quality - -on: - push: - branches: [main, dev/**] - pull_request: - branches: [main] - -jobs: - quality: - uses: mokoconsulting-tech/.github-private/.gitea/workflows/reusable/php-quality.yml@main - with: - php-versions: '["7.4", "8.0", "8.1", "8.2"]' - tools: '["phpcs", "phpstan", "psalm"]' - phpcs-standard: 'PSR12' - phpstan-level: '6' - secrets: inherit -``` - ---- - -### 2. release_pipeline.yml - Automated Release Management - -**Purpose:** Complete release automation including building, testing, packaging, and publishing to GitHub Releases and external marketplaces - -**Current Status:** To be migrated to `.github-private` - -**Triggers:** -- `workflow_dispatch` with manual inputs: - - `version` (required): Semver version string (e.g., "1.2.3") - - `platform` (required): Target platform (joomla, dolibarr, generic) - - `publish-to-marketplace` (optional): Whether to publish to JED/Dolistore - - `pre-release` (optional): Mark as pre-release -- `push` with tag matching pattern `v*.*.*` - -**Jobs:** - -1. **validate-version** - - Validates semver format (X.Y.Z) - - Checks version doesn't already exist - - Verifies version is newer than latest release - - Validates CHANGELOG.md has entry for version - - Duration: ~30 seconds - -2. **build-joomla** (conditional: platform == 'joomla') - - Builds Joomla extension package - - Steps: - - Install PHP dependencies (Composer) - - Install JS dependencies (npm/yarn) - - Compile SCSS to CSS - - Minify JavaScript - - Run webpack/build scripts - - Copy files to staging directory - - Update manifest XML with version - - Create ZIP package - - Uses: `extension_utils.py` for manifest updates - - Artifacts: `{extension-name}-{version}.zip` - - Duration: ~2-3 minutes - -3. **build-dolibarr** (conditional: platform == 'dolibarr') - - Builds Dolibarr module package - - Similar to Joomla but different structure - - Updates module descriptor - - Creates module archive - - Duration: ~2 minutes - -4. **build-generic** (conditional: platform == 'generic') - - Generic build process - - Configurable build command - - Creates distributable artifacts - - Duration: varies - -5. **generate-checksums** - - Generates SHA256 checksums for all artifacts - - Creates CHECKSUMS.txt file - - Signs checksums with GPG (optional) - - Duration: ~10 seconds - -6. **run-tests** - - Runs test suite on built packages - - Installs package in test environment - - Runs smoke tests - - Validates package integrity - - Duration: ~5 minutes - -7. **create-github-release** - - Creates GitHub Release via API - - Release notes from CHANGELOG.md - - Uploads all artifacts - - Tags commit with version - - Duration: ~30 seconds - -8. **publish-to-jed** (conditional: platform == 'joomla' && publish-to-marketplace) - - Publishes to Joomla Extensions Directory - - Uses JED API - - Updates extension listing - - Duration: ~1 minute - -9. **publish-to-dolistore** (conditional: platform == 'dolibarr' && publish-to-marketplace) - - Publishes to Dolibarr Store - - Uses Dolistore API - - Updates module listing - - Duration: ~1 minute - -10. **notify** - - Sends notifications (Slack, email) - - Updates project management tools - - Triggers documentation rebuild - - Duration: ~20 seconds - -**Workflow Orchestration:** -```yaml -jobs: - validate-version: - runs-on: ubuntu-latest - - build: - needs: validate-version - strategy: - matrix: - include: - - platform: joomla - artifact: extension - - platform: dolibarr - artifact: module - - checksums: - needs: build - - test: - needs: checksums - - release: - needs: test - if: success() - - publish: - needs: release - if: inputs.publish-to-marketplace - - notify: - needs: [release, publish] - if: always() -``` - -**Dependencies:** -- PHP 7.4+ for Joomla/Dolibarr -- Node.js 18+ for frontend builds -- zip/tar utilities -- GitHub CLI (`gh`) -- `extension_utils.py` for package creation -- `common.py` for notification utilities - -**Environment Variables:** -```yaml -env: - VERSION: ${{ inputs.version }} - PLATFORM: ${{ inputs.platform }} - BUILD_DIR: build/ - DIST_DIR: dist/ -``` - -**Secrets Required:** -```yaml -secrets: - GH_PAT: # GitHub Personal Access Token for release creation - MARKETPLACE_TOKEN: # JED API token - JED_API_KEY: # Joomla Extensions Directory API key - DOLISTORE_API_KEY: # Dolibarr Store API key - RELEASE_SIGNING_KEY: # GPG key for signing (optional) - SLACK_WEBHOOK: # Notification webhook - COMPOSER_AUTH: # For private dependencies (optional) -``` - -**Outputs:** -```yaml -outputs: - release-url: - description: 'URL of created GitHub Release' - artifact-urls: - description: 'JSON array of artifact download URLs' - marketplace-url: - description: 'URL of marketplace listing' -``` - -**Migration Type:** Convert to reusable workflow in `.github-private` - -**Proposed Location:** `.github-private/.gitea/workflows/reusable/release-pipeline.yml` - -**Migration Complexity:** ⭐⭐⭐⭐⭐ Very High -- Complex multi-stage process -- Multiple platform support -- External API integrations -- Rollback complexity -- Error handling critical - -**Estimated LOC:** ~450 lines (all jobs, error handling, rollback) - -**Shared Scripts Used:** -- `extension_utils.py` - Package creation, manifest updates, ZIP generation -- `common.py` - API client utilities, notification sending, error handling - -**Reusable Workflow Interface:** -```yaml -on: - workflow_call: - inputs: - version: - description: 'Release version (semver format)' - required: true - type: string - platform: - description: 'Target platform' - required: true - type: string # enum: joomla, dolibarr, generic - publish-to-marketplace: - description: 'Publish to external marketplace' - required: false - type: boolean - default: false - create-github-release: - description: 'Create GitHub release' - required: false - type: boolean - default: true - pre-release: - description: 'Mark as pre-release' - required: false - type: boolean - default: false - draft: - description: 'Create as draft release' - required: false - type: boolean - default: false - run-tests: - description: 'Run tests before release' - required: false - type: boolean - default: true - outputs: - release-url: - description: 'GitHub Release URL' - value: ${{ jobs.release.outputs.url }} - artifact-urls: - description: 'Artifact download URLs (JSON array)' - value: ${{ jobs.release.outputs.artifacts }} -``` - -**Rollback Strategy:** -```yaml -- name: Rollback on failure - if: failure() - run: | - # Delete GitHub release if created - gh release delete ${{ inputs.version }} --yes || true - - # Delete Git tag - git push --delete origin v${{ inputs.version }} || true - - # Unpublish from marketplace (if published) - if [ "${{ inputs.publish-to-marketplace }}" = "true" ]; then - curl -X DELETE "$JED_API_URL/extensions/$EXTENSION_ID/versions/$VERSION" \ - -H "Authorization: Bearer ${{ secrets.JED_API_KEY }}" - fi - - # Notify team of rollback - curl -X POST ${{ secrets.SLACK_WEBHOOK }} \ - -d '{"text":"Release ${{ inputs.version }} rolled back due to failure"}' -``` - -**Success Criteria:** -- Version validation passes -- All builds succeed -- Tests pass on built artifacts -- GitHub Release created -- Marketplace publishing succeeds (if enabled) -- Notifications sent - -**Performance Optimizations:** -- Cache build dependencies (Composer, npm) -- Parallel builds for multiple platforms -- Reuse test environments between runs - -**Known Issues:** -- JED API can be rate-limited (implement retry with exponential backoff) -- Large extension ZIPs can timeout on upload (increase timeout to 30 min) -- Dolistore API occasionally returns 500 (implement retry logic) - -**Example Usage After Migration:** -```yaml -name: Release - -on: - workflow_dispatch: - inputs: - version: - required: true - publish: - type: boolean - default: false - -jobs: - release: - uses: mokoconsulting-tech/.github-private/.gitea/workflows/reusable/release-pipeline.yml@main - with: - version: ${{ inputs.version }} - platform: 'joomla' - publish-to-marketplace: ${{ inputs.publish }} - pre-release: false - secrets: inherit -``` - -**Additional Notes:** -- Integrates with version_release.yml for version bumping -- Can trigger deploy workflows after successful release -- Supports multi-package releases (component + modules + plugins) -- Maintains release history in RELEASES.md - ---- - -### 3. deploy_staging.yml - Staging Environment Deployment - -**Purpose:** Automated deployment to staging environments for testing before production release - -**Current Status:** To be migrated to `.github-private` - -**Triggers:** -- `push` to develop branch -- `workflow_dispatch` for manual deployment with inputs: - - `environment` (default: 'staging'): Target environment - - `version` (optional): Specific version to deploy - - `skip-tests` (optional): Skip smoke tests -- Successful completion of `php_quality.yml` workflow - -**Jobs:** - -1. **pre-deploy-checks** - - Validates deployment configuration - - Checks target environment health - - Verifies required secrets are available - - Confirms no ongoing deployments - - Duration: ~30 seconds - -2. **build-deployment-package** - - Creates deployment artifact - - Includes only necessary files - - Excludes development files (.git, tests, etc.) - - Compresses package - - Duration: ~1-2 minutes - -3. **backup-current** - - Creates backup of current staging environment - - Backs up database - - Backs up files - - Stores backup with timestamp - - Duration: ~2-3 minutes - -4. **deploy-to-staging** - - SSHs to staging server - - Uploads deployment package - - Extracts files to correct location - - Sets proper permissions - - Runs database migrations - - Clears caches - - Duration: ~3-5 minutes - -5. **smoke-tests** - - Waits for application to stabilize (30 seconds) - - Runs HTTP health checks - - Validates critical endpoints - - Checks database connectivity - - Verifies file permissions - - Duration: ~2 minutes - -6. **integration-tests** (optional) - - Runs Selenium/Playwright tests - - Tests critical user flows - - Validates API endpoints - - Duration: ~5-10 minutes - -7. **notify-success** - - Sends deployment success notification - - Updates deployment tracking system - - Posts to Slack/Teams - - Duration: ~10 seconds - -8. **rollback** (on failure) - - Automatically triggered if any step fails - - Restores from backup - - Rolls back database - - Restores files - - Clears caches - - Notifies team of rollback - - Duration: ~3-5 minutes - -**Workflow Orchestration:** -```yaml -jobs: - pre-deploy-checks: - runs-on: ubuntu-latest - - backup: - needs: pre-deploy-checks - runs-on: ubuntu-latest - - deploy: - needs: backup - runs-on: ubuntu-latest - environment: - name: staging - url: https://staging.example.com - - smoke-tests: - needs: deploy - runs-on: ubuntu-latest - - integration-tests: - needs: smoke-tests - if: inputs.skip-tests == false - runs-on: ubuntu-latest - - notify: - needs: [deploy, smoke-tests, integration-tests] - if: always() - runs-on: ubuntu-latest -``` - -**Dependencies:** -- SSH client -- rsync for file transfer -- MySQL client for database operations -- curl for HTTP checks -- `common.py` for deployment utilities - -**Environment Variables:** -```yaml -env: - STAGING_HOST: ${{ secrets.STAGING_HOST }} - STAGING_USER: ${{ secrets.STAGING_USER }} - STAGING_PATH: /var/www/staging - BACKUP_PATH: /var/backups/staging - DATABASE_NAME: staging_db -``` - -**Secrets Required:** -```yaml -secrets: - STAGING_SSH_KEY: # SSH private key for staging server access - STAGING_HOST: # Staging server hostname/IP - STAGING_USER: # SSH username - STAGING_DB_PASSWORD: # Database password for migrations - SLACK_WEBHOOK: # Notification webhook - HEALTH_CHECK_TOKEN: # Token for health check endpoints (optional) -``` - -**Outputs:** -```yaml -outputs: - deployment-url: - description: 'URL of deployed application' - deployment-time: - description: 'Deployment timestamp' - backup-id: - description: 'Backup identifier for rollback' -``` - -**Migration Type:** Convert to reusable workflow in `.github-private` - -**Proposed Location:** `.github-private/.gitea/workflows/reusable/deploy-staging.yml` - -**Migration Complexity:** ⭐⭐⭐⭐ High -- Requires secure credential handling -- Complex deployment logic with rollback -- Environment-specific configurations -- Critical failure handling needed - -**Estimated LOC:** ~350 lines (including rollback logic) - -**Shared Scripts Used:** -- `common.py` - SSH utilities, health checks, notification sending - -**Reusable Workflow Interface:** -```yaml -on: - workflow_call: - inputs: - environment: - description: 'Target environment (staging, qa, demo)' - required: false - type: string - default: 'staging' - version: - description: 'Version to deploy (default: latest)' - required: false - type: string - skip-tests: - description: 'Skip smoke and integration tests' - required: false - type: boolean - default: false - health-check-url: - description: 'URL for health check' - required: true - type: string - rollback-on-failure: - description: 'Automatically rollback on failure' - required: false - type: boolean - default: true - outputs: - deployment-url: - description: 'Deployed application URL' - value: ${{ jobs.deploy.outputs.url }} - backup-id: - description: 'Backup ID (for manual rollback)' - value: ${{ jobs.backup.outputs.backup-id }} -``` - -**Rollback Strategy:** -```yaml -- name: Automatic Rollback - if: failure() && inputs.rollback-on-failure - run: | - echo "Deployment failed, rolling back to previous version..." - - # Restore files from backup - ssh $STAGING_USER@$STAGING_HOST "cd $BACKUP_PATH && ./restore.sh $BACKUP_ID" - - # Restore database - ssh $STAGING_USER@$STAGING_HOST "mysql -u$DB_USER -p$DB_PASS $DATABASE_NAME < $BACKUP_PATH/$BACKUP_ID/database.sql" - - # Clear caches - ssh $STAGING_USER@$STAGING_HOST "cd $STAGING_PATH && php artisan cache:clear" - - # Verify rollback successful - curl -f ${{ inputs.health-check-url }} || echo "⚠️ Health check failed after rollback" - - # Notify team - curl -X POST $SLACK_WEBHOOK \ - -d '{"text":"🔴 Staging deployment failed and was rolled back. Backup ID: '"$BACKUP_ID"'"}' -``` - -**Health Check Implementation:** -```yaml -- name: Run Health Checks - run: | - MAX_RETRIES=10 - RETRY_DELAY=5 - - for i in $(seq 1 $MAX_RETRIES); do - echo "Health check attempt $i/$MAX_RETRIES..." - - # Check HTTP 200 response - if curl -f -s -o /dev/null -w "%{http_code}" ${{ inputs.health-check-url }} | grep -q "200"; then - echo "✅ Health check passed" - exit 0 - fi - - echo "❌ Health check failed, retrying in ${RETRY_DELAY}s..." - sleep $RETRY_DELAY - done - - echo "❌ Health check failed after $MAX_RETRIES attempts" - exit 1 -``` - -**Success Criteria:** -- Pre-deploy checks pass -- Backup created successfully -- Files deployed without errors -- Database migrations succeed -- Health checks return 200 OK -- Smoke tests pass - -**Performance Optimizations:** -- Use rsync with compression for faster file transfer -- Parallel backup of files and database -- Skip unchanged files during deployment -- Cache SSH connections - -**Known Issues:** -- SSH connection can timeout on slow networks (increase timeout to 600s) -- Large database backups can be slow (implement incremental backups) -- Simultaneous deployments can cause conflicts (use deployment locks) - -**Example Usage After Migration:** -```yaml -name: Deploy to Staging - -on: - push: - branches: [develop] - -jobs: - deploy: - uses: mokoconsulting-tech/.github-private/.gitea/workflows/reusable/deploy-staging.yml@main - with: - environment: staging - health-check-url: 'https://staging.example.com/health' - skip-tests: false - secrets: inherit -``` - -**Additional Notes:** -- Integrates with monitoring tools (Datadog, New Relic) -- Supports blue-green deployments (future enhancement) -- Can trigger load testing after deployment -- Maintains deployment history and audit logs - ---- - -### 4. joomla_testing.yml - Joomla Extension Testing - -**Purpose:** Comprehensive testing for Joomla extensions across multiple PHP and Joomla versions with integration tests - -**Current Status:** To be migrated to `.github-private` - -**Triggers:** -- `push` to main and development branches -- `pull_request` to main -- `schedule`: Nightly at 2:00 AM UTC -- `workflow_dispatch` with manual inputs: - - `php-versions` (optional): PHP versions to test - - `joomla-versions` (optional): Joomla versions to test - - `coverage` (optional): Enable code coverage - -**Jobs:** - -1. **unit-tests** - - Runs PHPUnit tests without Joomla - - Fast feedback on core logic - - No database required - - Duration: ~1-2 minutes per PHP version - -2. **integration-tests** - - Sets up full Joomla installation - - Installs extension - - Runs integration tests - - Tests database interactions - - Duration: ~5-10 minutes per matrix combination - -3. **code-coverage** - - Collects coverage from all test runs - - Generates HTML/XML reports - - Uploads to Codecov/Coveralls - - Enforces minimum coverage threshold (80%) - - Duration: ~2 minutes - -4. **compatibility-check** - - Validates extension compatibility - - Checks manifest requirements - - Verifies update server - - Tests installation/uninstallation - - Duration: ~3 minutes - -5. **browser-tests** (optional) - - Selenium/Playwright E2E tests - - Tests admin interface - - Tests frontend functionality - - Screenshots on failure - - Duration: ~10-15 minutes - -**Matrix Strategy:** -```yaml -strategy: - matrix: - php: ['7.4', '8.0', '8.1', '8.2'] - joomla: ['4.4', '5.0', '5.1'] - include: - # Test PHP 8.3 with latest Joomla only - - php: '8.3' - joomla: '5.1' - exclude: - # Joomla 4.4 doesn't support PHP 8.2+ - - php: '8.2' - joomla: '4.4' - - php: '8.3' - joomla: '4.4' - fail-fast: false # Continue testing other combinations - max-parallel: 4 # Limit concurrent jobs -``` - -**Dependencies:** -- PHP 7.4-8.3 with extensions: `mysqli`, `gd`, `zip`, `xml`, `mbstring` -- MySQL/MariaDB 5.7+ -- Joomla CMS 4.4-5.1 -- PHPUnit 9.5+ -- Composer -- Node.js (for frontend builds) -- `extension_utils.py` for installation testing - -**Environment Variables:** -```yaml -env: - JOOMLA_DB_HOST: 127.0.0.1 - JOOMLA_DB_USER: root - JOOMLA_DB_PASS: root - JOOMLA_DB_NAME: joomla_test - JOOMLA_ADMIN_USER: admin - JOOMLA_ADMIN_PASS: admin123! - COVERAGE_THRESHOLD: 80 -``` - -**Services:** -```yaml -services: - mysql: - image: mysql:8.0 - env: - MYSQL_ROOT_PASSWORD: root - MYSQL_DATABASE: joomla_test - ports: - - 3306:3306 - options: >- - --health-cmd="mysqladmin ping" - --health-interval=10s - --health-timeout=5s - --health-retries=3 -``` - -**Secrets Required:** -```yaml -secrets: - CODECOV_TOKEN: # Code coverage service token - TEST_DB_PASSWORD: # Test database password (if different from env) - BROWSERSTACK_KEY: # BrowserStack for cross-browser testing (optional) -``` - -**Outputs:** -```yaml -outputs: - coverage-percentage: - description: 'Code coverage percentage' - test-results: - description: 'Summary of test results (JSON)' - compatibility-matrix: - description: 'Compatibility matrix results (JSON)' -``` - -**Migration Type:** Convert to reusable workflow in `.github-private` - -**Proposed Location:** `.github-private/.gitea/workflows/reusable/joomla-testing.yml` - -**Migration Complexity:** ⭐⭐⭐⭐ High -- Complex test matrix (PHP × Joomla versions) -- Full Joomla setup required -- Database service coordination -- Coverage collection from multiple jobs - -**Estimated LOC:** ~500 lines (including matrix, setup, all test types) - -**Shared Scripts Used:** -- `extension_utils.py` - Extension installation, manifest validation, update server checks -- `common.py` - Test result aggregation, coverage reporting - -**Reusable Workflow Interface:** -```yaml -on: - workflow_call: - inputs: - php-versions: - description: 'PHP versions to test (JSON array)' - required: false - type: string - default: '["7.4", "8.0", "8.1", "8.2"]' - joomla-versions: - description: 'Joomla versions to test (JSON array)' - required: false - type: string - default: '["4.4", "5.0", "5.1"]' - coverage: - description: 'Enable code coverage' - required: false - type: boolean - default: true - browser-tests: - description: 'Run browser-based E2E tests' - required: false - type: boolean - default: false - coverage-threshold: - description: 'Minimum coverage percentage required' - required: false - type: number - default: 80 - outputs: - coverage-percentage: - description: 'Overall code coverage' - value: ${{ jobs.coverage.outputs.percentage }} - tests-passed: - description: 'All tests passed (true/false)' - value: ${{ jobs.aggregate.outputs.success }} -``` - -**Test Setup Steps:** -```yaml -- name: Setup Joomla - run: | - # Download Joomla - wget https://downloads.joomla.org/cms/joomla${{ matrix.joomla }}/Joomla_${{ matrix.joomla }}.0-Stable-Full_Package.zip - - # Extract - unzip -q Joomla_${{ matrix.joomla }}.0-Stable-Full_Package.zip -d /var/www/html - - # Install Joomla via CLI - php /var/www/html/installation/joomla.php install \ - --site-name="Test Site" \ - --admin-user="$JOOMLA_ADMIN_USER" \ - --admin-password="$JOOMLA_ADMIN_PASS" \ - --admin-email="admin@example.com" \ - --db-type="mysqli" \ - --db-host="$JOOMLA_DB_HOST" \ - --db-user="$JOOMLA_DB_USER" \ - --db-pass="$JOOMLA_DB_PASS" \ - --db-name="$JOOMLA_DB_NAME" \ - --db-prefix="jos_" - - # Remove installation folder - rm -rf /var/www/html/installation - -- name: Install Extension - run: | - # Use extension_utils.py to install - python .github-private/scripts/extension_utils.py install \ - --joomla-path /var/www/html \ - --package dist/*.zip -``` - -**Success Criteria:** -- All unit tests pass -- All integration tests pass across matrix -- Code coverage ≥ 80% -- Extension installs successfully -- No PHP errors/warnings in logs -- Browser tests pass (if enabled) - -**Performance Optimizations:** -- Cache Joomla downloads (saves ~30 seconds) -- Cache Composer/npm dependencies -- Parallel test execution where possible -- Skip browser tests for draft PRs - -**Known Issues:** -- Joomla 5.x requires PHP 8.0+ (matrix excludes invalid combinations) -- MySQL 8.0 authentication issues with PHP 7.4 (use legacy auth) -- Browser tests can be flaky (implement retry logic) -- Large test suites can timeout (split into multiple jobs) - -**Example Usage After Migration:** -```yaml -name: Test Joomla Extension - -on: - push: - branches: [main, develop] - pull_request: - branches: [main] - -jobs: - test: - uses: mokoconsulting-tech/.github-private/.gitea/workflows/reusable/joomla-testing.yml@main - with: - php-versions: '["7.4", "8.0", "8.1", "8.2"]' - joomla-versions: '["4.4", "5.0", "5.1"]' - coverage: true - browser-tests: false - coverage-threshold: 80 - secrets: inherit -``` - -**Additional Notes:** -- Supports multiple extension types (component, module, plugin, template) -- Can test against Joomla nightly builds -- Integrates with PHPUnit code coverage -- Generates compatibility badge for README -- Saves test artifacts (logs, screenshots) for debugging - ---- - -### Workflows to Keep Local - -### 5. ci.yml - Continuous Integration - -**Purpose:** Validate repository standards and run compliance checks - -**Triggers:** -- Push to main, dev/**, rc/**, version/** branches -- Pull requests to main, dev/**, rc/**, version/** branches - -**Jobs:** -- Repository validation pipeline -- Script executability verification -- Required and optional validations - -**Dependencies:** -- Scripts in `api/validate/` -- Python 3.x -- ShellCheck - -**Decision:** **Keep Local** - -**Rationale:** -- Repository-specific validation rules -- No sensitive proprietary logic in this workflow -- Fast iteration without cross-repo dependencies -- Public transparency for CI process - ---- - -### 6. repo_health.yml - Repository Health & Governance - -**Purpose:** Comprehensive repository health checks and governance validation - -**Triggers:** -- Manual workflow_dispatch with profile selection -- Push to main (workflows, scripts, docs paths) -- Pull requests to main - -**Jobs:** -- Admin-only execution gate -- Scripts governance validation -- Repository artifact validation -- Content heuristics -- Extended health checks -- Audit trail generation - -**Dependencies:** -- Python 3.x for JSON processing -- ShellCheck -- Various governance artifacts - -**Decision:** **Keep Local** - -**Rationale:** -- Repository governance is repo-specific -- Complex proprietary validation logic best maintained locally -- Frequent updates needed for repository-specific rules -- Admin-only execution gate works better locally - -**Note:** While this contains proprietary governance logic, keeping it local allows for repository-specific customization and faster iteration. - ---- - -### 7. version_branch.yml - Version Branch Management - -**Purpose:** Automated creation and management of version-specific branches - -**Triggers:** -- Manual workflow_dispatch with version parameters -- Release creation events - -**Jobs:** -- Version branch creation -- Branch protection setup -- Documentation updates -- Changelog initialization - -**Dependencies:** -- Git operations -- Branch protection API -- Documentation generator - -**Decision:** **Keep Local** - -**Rationale:** -- Repository-specific branching strategies -- Different versioning schemes per repository -- Fast iteration on branching logic -- No sensitive deployment credentials - ---- - -### 8. codeql-analysis.yml - Security Code Scanning - -**Purpose:** Automated security vulnerability detection using CodeQL - -**Triggers:** -- Push to main -- Pull requests to main -- Schedule: Weekly on Mondays - -**Jobs:** -- CodeQL analysis for multiple languages -- Security alert generation - -**Dependencies:** -- GitHub CodeQL action -- Language detection - -**Decision:** **Keep Local** (security best practice) - -**Rationale:** -- Standard GitHub security feature -- Public transparency for security scanning -- Best practice to keep in public repositories -- No customization needed - ---- - -### Other Existing Workflows (To Evaluate Separately) - -### 9. changelog_update.yml - Changelog Management - -**Purpose:** Automated CHANGELOG.md updates and validation - -**Triggers:** -- Push to main -- Manual workflow_dispatch - -**Jobs:** -- Changelog validation -- Automatic updates -- Commit and push changes - -**Dependencies:** -- Python 3.x -- GH_PAT secret - -**Decision:** Evaluate - May keep local or integrate with release_pipeline.yml - ---- - -### 10. version_release.yml - Version Management - -**Purpose:** Automated version bumping and release creation - -**Triggers:** -- Manual workflow_dispatch with version inputs - -**Jobs:** -- Version validation -- File updates -- Branch creation -- Changelog updates -- Governance checks - -**Dependencies:** -- Python 3.x -- GH_PAT secret -- Multiple governance artifacts - -**Decision:** Evaluate - May integrate with release_pipeline.yml or keep local - ---- - -### 11. rebuild_docs_indexes.yml - Documentation Index Generation - -**Purpose:** Automatically rebuild documentation index files - -**Triggers:** -- Push to main (docs/ and templates/ paths) -- Pull requests to main -- Manual workflow_dispatch - -**Jobs:** -- Run Python script to generate indexes -- Commit and push changes - -**Dependencies:** -- Python 3.x -- `scripts/docs/rebuild_indexes.py` -- GH_PAT secret - -**Decision:** Evaluate - Repository-specific documentation may warrant keeping local - ---- - -### 12. setup_project_v2.yml - GitHub Projects v2 Setup - -**Purpose:** Automated GitHub Projects v2 creation and configuration - -**Triggers:** -- Manual workflow_dispatch with project parameters - -**Jobs:** -- Project creation -- Field configuration -- Item population - -**Dependencies:** -- Python 3.x -- GitHub GraphQL API -- GH_PAT secret -- Project setup scripts - -**Decision:** Evaluate - Project automation may benefit from centralization - ---- - -### 13. sync_docs_to_project.yml - Documentation Project Sync - -**Purpose:** Sync documentation files to GitHub Project items - -**Triggers:** -- Push to main (docs/ and templates/ paths) -- Manual workflow_dispatch - -**Jobs:** -- Scan documentation files -- Create/update project items -- Set custom fields -- Generate sync report - -**Dependencies:** -- Python 3.x -- GitHub GraphQL API -- GH_PAT secret -- `scripts/sync_file_to_project.py` - -**Decision:** Evaluate - Project sync may benefit from centralization - ---- - -## Secret Dependencies - -### Organization-Level Secrets (Configured) - -All secrets are configured at **organization level** with automatic inheritance to workflows: - -| Secret Category | Specific Secrets | Used By | Purpose | -|-----------------|------------------|---------|---------| -| **Deployment** | STAGING_SSH_KEY, STAGING_HOST | deploy_staging.yml | Staging deployment | -| **Releases** | MARKETPLACE_TOKEN, JED_API_KEY | release_pipeline.yml | Marketplace publishing | -| **Quality** | CODECOV_TOKEN, SONAR_TOKEN | php_quality.yml, joomla_testing.yml | Code coverage/quality | -| **Testing** | TEST_DB_PASSWORD | joomla_testing.yml | Test database setup | -| **General** | GH_PAT | Various | GitHub API access | - -### Inheritance Pattern - -Workflows use `secrets: inherit` to access all organization secrets: - -```yaml -jobs: - quality: - uses: mokoconsulting-tech/.github-private/.gitea/workflows/reusable/php-quality.yml@main - secrets: inherit # Automatically inherits all org secrets -``` - -**Benefits:** -- Single source of truth for secrets -- No per-repository secret configuration -- Automatic rotation across all repositories -- Centralized access control - -## Script Dependencies - -### Shared Scripts (Move to .github-private) - -| Script | Used By | Purpose | Target Location | -|--------|---------|---------|-----------------| -| **extension_utils.py** | php_quality.yml, joomla_testing.yml, release_pipeline.yml | Joomla extension operations | `.github-private/scripts/` | -| **common.py** | All centralized workflows | Common utilities | `.github-private/scripts/` | - -**Usage Pattern in Workflows:** -```yaml -- name: Checkout shared scripts - uses: actions/checkout@v4 - with: - repository: mokoconsulting-tech/.github-private - path: .github-private - token: ${{ secrets.GH_PAT }} - -- name: Use shared scripts - run: | - python .github-private/scripts/extension_utils.py -``` - -### Repository-Specific Scripts (Keep Local) - -| Script | Used By | Migration Action | -|--------|---------|------------------| -| `api/validate/*` | ci.yml | Keep in repository (repo-specific) | -| `scripts/docs/rebuild_indexes.py` | rebuild_docs_indexes.yml | Keep in repository | -| `scripts/setup_project_v2.py` | setup_project_v2.yml | Evaluate for centralization | -| `api/automation/sync_file_to_project.py` | sync_docs_to_project.yml | Keep in repository | - -## Migration Priority Matrix - -### Centralize to .github-private (Priority 1) -1. **php_quality.yml** - PHP code quality analysis with shared scripts -2. **release_pipeline.yml** - Release automation with marketplace integration -3. **deploy_staging.yml** - Staging deployment with sensitive credentials -4. **joomla_testing.yml** - Comprehensive Joomla testing matrix - -### Keep Local (Decided) -5. **ci.yml** - Repository-specific validation -6. **repo_health.yml** - Repository governance (proprietary but repo-specific) -7. **version_branch.yml** - Repository-specific branching -8. **codeql-analysis.yml** - Security best practice (keep public) - -### Evaluate Later -9. **changelog_update.yml** - May integrate with release_pipeline.yml -10. **version_release.yml** - May integrate with release_pipeline.yml -11. **rebuild_docs_indexes.yml** - Repository-specific documentation -12. **setup_project_v2.yml** - Project automation -13. **sync_docs_to_project.yml** - Project sync - -## Reusable Workflow Structure - -### Finalized .github-private Layout - -``` -.github-private/ -├── .github/ -│ └── workflows/ -│ ├── reusable/ -│ │ ├── php-quality.yml (php_quality.yml) -│ │ ├── release-pipeline.yml (release_pipeline.yml) -│ │ ├── deploy-staging.yml (deploy_staging.yml) -│ │ └── joomla-testing.yml (joomla_testing.yml) -│ └── templates/ -│ ├── php-quality-template.yml -│ ├── release-template.yml -│ ├── deploy-template.yml -│ └── testing-template.yml -├── scripts/ -│ ├── extension_utils.py (shared across repos) -│ ├── common.py (shared across repos) -│ └── README.md -└── docs/ - ├── README.md - ├── workflow-usage.md - └── script-api.md -``` - -## Migration Checklist - -### Pre-Migration -- [ ] Create `.github-private` repository -- [ ] Configure repository access -- [ ] Set up organization secrets -- [ ] Document all workflow dependencies -- [ ] Create backup of current workflows - -### Per-Workflow Migration -- [ ] Analyze workflow complexity -- [ ] Identify sensitive content -- [ ] Design reusable workflow interface -- [ ] Create reusable workflow in `.github-private` -- [ ] Test reusable workflow in isolation -- [ ] Update caller workflow in public repo -- [ ] Test integration end-to-end -- [ ] Archive old workflow with deprecation notice -- [ ] Update documentation -- [ ] Notify affected teams - -### Post-Migration -- [ ] Monitor workflow runs -- [ ] Verify all repositories using new workflows -- [ ] Clean up archived workflows -- [ ] Update repository documentation -- [ ] Conduct team training session -- [ ] Create runbook for common issues - -## Risk Assessment - -### High Risk -- **Breaking Changes:** Workflow interface changes could break existing implementations -- **Access Issues:** Repository permission problems could block workflow execution -- **Secret Management:** Incorrect secret configuration could expose sensitive data - -### Medium Risk -- **Performance:** Additional indirection could slow workflow execution -- **Debugging:** Harder to troubleshoot issues in private repository -- **Maintenance:** Two repositories to manage instead of one - -### Low Risk -- **Documentation:** Migration guide reduces knowledge transfer issues -- **Testing:** Comprehensive testing strategy mitigates most risks -- **Rollback:** Clear rollback plan available - -## Success Metrics - -### Migration Success -- All workflows migrated within 4-week timeline -- Zero downtime or failed runs during migration -- All secrets properly configured -- Complete documentation updated - -### Post-Migration Success -- Workflow run success rate > 95% -- Average workflow execution time maintained or improved -- Zero security incidents related to workflow access -- Team satisfaction rating > 4/5 - -## Metadata - -| Field | Value | -|-------|-------| -| Document | Workflow Inventory | -| Path | /.github/WORKFLOW_INVENTORY.md | -| Status | Active | -| Version | 01.00.00 | -| Date | 2026-01-04 | -| Last Updated | 2026-01-04 | - -## Revision History - -| Date | Change | Author | -|------|--------|--------| -| 2026-01-04 | Initial inventory created for migration planning | DevOps Team | diff --git a/index.md b/index.md index 2c9eacc..cc6445e 100644 --- a/index.md +++ b/index.md @@ -49,12 +49,8 @@ Shared library code - Extension utilities - GitHub client -### [Docs](docs/) -Documentation generation and maintenance -- Index rebuilding -- Documentation coverage -- Script catalogs -- Guides and architecture documentation +### [Wiki](https://git.mokoconsulting.tech/MokoConsulting/moko-platform/wiki) +All documentation lives in the Gitea wiki. ### [Tests](tests/) Test scripts @@ -86,4 +82,4 @@ All three languages may coexist in the same directory for the same functionality ## See Also - [README.md](README.md) - Comprehensive scripts documentation -- [docs/](docs/) - Additional guides and documentation +- [Wiki](https://git.mokoconsulting.tech/MokoConsulting/moko-platform/wiki) - Documentation (wiki-first) diff --git a/lib/Enterprise/MokoStandardsParser.php b/lib/Enterprise/MokoStandardsParser.php index 20d4819..fe033ad 100644 --- a/lib/Enterprise/MokoStandardsParser.php +++ b/lib/Enterprise/MokoStandardsParser.php @@ -283,7 +283,7 @@ class MokoStandardsParser public function validate(string $xmlContent, ?string $xsdPath = null): array { if ($xsdPath === null) { - $xsdPath = dirname(dirname(__DIR__)) . '/docs/standards/mokostandards-schema.xsd'; + $xsdPath = dirname(dirname(__DIR__)) . '/templates/schemas/mokostandards-schema.xsd'; } if (!file_exists($xsdPath)) { diff --git a/docs/standards/mokostandards-schema.xsd b/templates/schemas/mokostandards-schema.xsd similarity index 100% rename from docs/standards/mokostandards-schema.xsd rename to templates/schemas/mokostandards-schema.xsd diff --git a/docs/legal_doc_generator.html b/tools/legal_doc_generator.html similarity index 100% rename from docs/legal_doc_generator.html rename to tools/legal_doc_generator.html -- 2.52.0 From 38a975ee57cdb0508a19f679e7185196c6ab4ac3 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Mon, 11 May 2026 16:51:00 -0500 Subject: [PATCH 3/6] chore: remove VERSION from all file header comments Remove VERSION: XX.YY.ZZ lines from 213 file headers across PHP, TypeScript, TF definitions, workflows, CSS, markdown, and XML files. Version is tracked in composer.json and CHANGELOG.md only. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/branch-protection.yml | 1 - .gitea/workflows/bulk-repo-sync.yml | 1 - .gitea/workflows/renovate.yml | 1 - .gitea/workflows/sync-wikis.yml | 1 - automation/bulk_joomla_template.php | 1 - automation/bulk_sync.php | 1 - automation/migrate_to_gitea.php | 1 - automation/push_files.php | 1 - automation/repo_cleanup.php | 1 - bin/moko | 1 - cli/archive_repo.php | 1 - cli/create_project.php | 1 - cli/create_repo.php | 2 -- cli/joomla_release.php | 1 - cli/platform_detect.php | 1 - cli/release.php | 1 - cli/release_notes.php | 1 - cli/sync_rulesets.php | 1 - cli/version_bump.php | 1 - cli/version_read.php | 1 - cli/version_set_platform.php | 1 - definitions/default/client.tf | 1 - definitions/default/dolibarr.tf | 1 - definitions/default/generic-repository.tf | 1 - definitions/default/generic.tf | 1 - definitions/default/github-private-repository.tf | 1 - definitions/default/joomla.tf | 1 - definitions/default/mcp-server.tf | 1 - definitions/default/platform.tf | 1 - definitions/default/standards.tf | 1 - definitions/sync/.github-private.def.tf | 1 - definitions/sync/.github.def.tf | 1 - definitions/sync/Copy-PortablePath.def.tf | 1 - definitions/sync/DoliMods.def.tf | 1 - definitions/sync/MokoCRM.def.tf | 1 - definitions/sync/MokoCassiopeia.def.tf | 1 - definitions/sync/MokoDoliAdInsights.def.tf | 1 - definitions/sync/MokoDoliArt.def.tf | 1 - definitions/sync/MokoDoliAuth.def.tf | 1 - definitions/sync/MokoDoliCare.def.tf | 1 - definitions/sync/MokoDoliChimp.def.tf | 1 - definitions/sync/MokoDoliClaude.def.tf | 1 - definitions/sync/MokoDoliCredits.def.tf | 1 - definitions/sync/MokoDoliDymo.def.tf | 1 - definitions/sync/MokoDoliForm.def.tf | 1 - definitions/sync/MokoDoliG.def.tf | 1 - definitions/sync/MokoDoliGithub.def.tf | 1 - definitions/sync/MokoDoliHRM.def.tf | 1 - definitions/sync/MokoDoliMods.def.tf | 1 - definitions/sync/MokoDoliMulti.def.tf | 1 - definitions/sync/MokoDoliOffline.def.tf | 1 - definitions/sync/MokoDoliPhone.com.def.tf | 1 - definitions/sync/MokoDoliProjTemplate.def.tf | 1 - definitions/sync/MokoDoliRelease.def.tf | 1 - definitions/sync/MokoDoliSign.def.tf | 1 - definitions/sync/MokoDoliTools.def.tf | 1 - definitions/sync/MokoDoliTraining.def.tf | 1 - definitions/sync/MokoDolibarr.def.tf | 1 - definitions/sync/MokoISOUpdatePortable.def.tf | 1 - definitions/sync/MokoJoomHero.def.tf | 1 - definitions/sync/MokoJoomTOS.def.tf | 1 - definitions/sync/MokoPerfectPublisher-Discord.def.tf | 1 - definitions/sync/MokoStandards-Template-Client.def.tf | 1 - definitions/sync/MokoStandards-Template-Dolibarr.def.tf | 1 - definitions/sync/MokoStandards-Template-Generic.def.tf | 1 - definitions/sync/MokoStandards-Template-Joomla-Component.def.tf | 1 - definitions/sync/MokoStandards-Template-Joomla-Library.def.tf | 1 - definitions/sync/MokoStandards-Template-Joomla-Module.def.tf | 1 - definitions/sync/MokoStandards-Template-Joomla-Package.def.tf | 1 - definitions/sync/MokoStandards-Template-Joomla-Plugin.def.tf | 1 - definitions/sync/MokoStandards-Template-Joomla-Template.def.tf | 1 - definitions/sync/MokoTesting.def.tf | 1 - definitions/sync/MokoWaaS.def.tf | 1 - definitions/sync/MokoWaaSAnnounce.def.tf | 1 - definitions/sync/MokoWaaSBrand.def.tf | 1 - definitions/sync/MokoWinSetup.def.tf | 1 - definitions/sync/PLG_FINDER_MOKOVMSMARTSEARCH.def.tf | 1 - definitions/sync/client-clarksvillefurs.def.tf | 1 - definitions/sync/client-kiddieland.def.tf | 1 - definitions/sync/client-vexcreations.def.tf | 1 - deploy/deploy-joomla.php | 1 - deploy/deploy-sftp.php | 1 - fix/fix_line_endings.php | 1 - fix/fix_permissions.php | 1 - fix/fix_tabs.php | 1 - fix/fix_trailing_spaces.php | 1 - lib/CliBase.php | 1 - lib/Common.php | 1 - lib/Enterprise/CliFramework.php | 1 - lib/Enterprise/DefinitionParser.php | 1 - lib/Enterprise/EnterpriseReadinessValidator.php | 1 - lib/Enterprise/FileFixUtility.php | 1 - lib/Enterprise/GitHubAdapter.php | 1 - lib/Enterprise/GitPlatformAdapter.php | 1 - lib/Enterprise/GiteaAdapter.php | 1 - lib/Enterprise/MokoStandardsParser.php | 1 - lib/Enterprise/PackageBuilder.php | 1 - lib/Enterprise/PlatformAdapterFactory.php | 1 - lib/Enterprise/Plugins/ApiPlugin.php | 1 - lib/Enterprise/Plugins/DocumentationPlugin.php | 1 - lib/Enterprise/Plugins/DolibarrPlugin.php | 1 - lib/Enterprise/Plugins/GenericPlugin.php | 1 - lib/Enterprise/Plugins/JoomlaPlugin.php | 1 - lib/Enterprise/Plugins/McpServerPlugin.php | 1 - lib/Enterprise/Plugins/MobilePlugin.php | 1 - lib/Enterprise/Plugins/NodeJsPlugin.php | 1 - lib/Enterprise/Plugins/PythonPlugin.php | 1 - lib/Enterprise/Plugins/TerraformPlugin.php | 1 - lib/Enterprise/Plugins/WordPressPlugin.php | 1 - lib/Enterprise/ProjectConfigValidator.php | 1 - lib/Enterprise/ProjectMetricsCollector.php | 1 - lib/Enterprise/ProjectTypeDetector.php | 1 - lib/Enterprise/RepositoryHealthChecker.php | 1 - lib/Enterprise/RepositorySynchronizer.php | 1 - lib/Enterprise/SynchronizationException.php | 1 - lib/plugins/Joomla/UpdateXmlGenerator.php | 1 - maintenance/pin_action_shas.php | 1 - maintenance/repo_inventory.php | 1 - maintenance/rotate_secrets.php | 1 - maintenance/setup_labels.php | 1 - maintenance/sync_dolibarr_readmes.php | 1 - maintenance/update_repo_inventory.php | 1 - maintenance/update_sha_hashes.php | 1 - maintenance/update_version_from_readme.php | 1 - mcp/src/config.ts | 1 - mcp/src/index.ts | 1 - mcp/src/runner.ts | 1 - mcp/src/types.ts | 1 - plugin_health_check.php | 1 - plugin_list.php | 1 - plugin_metrics.php | 1 - plugin_readiness.php | 1 - plugin_validate.php | 1 - release/generate_dolibarr_version_txt.php | 1 - release/generate_joomla_update_xml.php | 1 - templates/configs/README.md | 1 - templates/configs/mokostandards.xml.template | 1 - templates/configs/mokostandards.yml.template | 1 - templates/docs/dolibarr/update-server.md | 1 - templates/docs/extra/template-CODE_OF_CONDUCT.md | 1 - templates/docs/required/template-CHANGELOG.md | 1 - templates/docs/required/template-INSTALLATION.md | 1 - templates/docs/required/template-LICENSE.md | 1 - templates/docs/required/template-README.md | 2 -- templates/docs/required/template-SECURITY.md | 1 - templates/gitea/README.md | 1 - templates/index.md | 1 - templates/schemas/mokostandards-schema.xsd | 1 - templates/schemas/template-repository-structure.xml | 1 - templates/scripts/common/CliBase.template.php | 1 - templates/scripts/release/package_dolibarr.php | 1 - templates/scripts/release/package_joomla.php | 1 - templates/scripts/sftp-config/README.md | 1 - templates/scripts/validate/dolibarr_module.php | 1 - templates/scripts/validate/validate_manifest.php | 1 - templates/scripts/validate/validate_structure.php | 1 - templates/stubs/dolibarr.php | 1 - templates/stubs/joomla.php | 1 - templates/web/assets/css/app.css | 1 - templates/workflows/gitleaks.yml.template | 1 - tests/Enterprise/GitPlatformAdapterTest.php | 1 - validate/auto_detect_platform.php | 1 - validate/check_changelog.php | 1 - validate/check_composer_deps.php | 1 - validate/check_dolibarr_module.php | 1 - validate/check_enterprise_readiness.php | 1 - validate/check_joomla_manifest.php | 1 - validate/check_language_structure.php | 1 - validate/check_license_headers.php | 1 - validate/check_no_secrets.php | 1 - validate/check_paths.php | 1 - validate/check_php_syntax.php | 1 - validate/check_repo_health.php | 1 - validate/check_structure.php | 1 - validate/check_tabs.php | 1 - validate/check_version_consistency.php | 1 - validate/check_wiki_health.php | 1 - validate/check_xml_wellformed.php | 1 - validate/scan_drift.php | 1 - wrappers/auto_detect_platform.php | 1 - wrappers/bulk_sync.php | 1 - wrappers/check_changelog.php | 1 - wrappers/check_dolibarr_module.php | 1 - wrappers/check_enterprise_readiness.php | 1 - wrappers/check_joomla_manifest.php | 1 - wrappers/check_language_structure.php | 1 - wrappers/check_license_headers.php | 1 - wrappers/check_no_secrets.php | 1 - wrappers/check_paths.php | 1 - wrappers/check_php_syntax.php | 1 - wrappers/check_repo_health.php | 1 - wrappers/check_structure.php | 1 - wrappers/check_tabs.php | 1 - wrappers/check_version_consistency.php | 1 - wrappers/check_xml_wellformed.php | 1 - wrappers/deploy_sftp.php | 1 - wrappers/fix_line_endings.php | 1 - wrappers/fix_permissions.php | 1 - wrappers/fix_tabs.php | 1 - wrappers/fix_trailing_spaces.php | 1 - wrappers/gen_wrappers.php | 2 -- wrappers/index.md | 1 - wrappers/pin_action_shas.php | 1 - wrappers/plugin_health_check.php | 1 - wrappers/plugin_list.php | 1 - wrappers/plugin_metrics.php | 1 - wrappers/plugin_readiness.php | 1 - wrappers/plugin_validate.php | 1 - wrappers/scan_drift.php | 1 - wrappers/setup_labels.php | 1 - wrappers/sync_dolibarr_readmes.php | 1 - wrappers/update_sha_hashes.php | 1 - wrappers/update_version_from_readme.php | 1 - 213 files changed, 216 deletions(-) diff --git a/.gitea/workflows/branch-protection.yml b/.gitea/workflows/branch-protection.yml index 30d2438..23c1bef 100644 --- a/.gitea/workflows/branch-protection.yml +++ b/.gitea/workflows/branch-protection.yml @@ -5,7 +5,6 @@ # INGROUP: MokoStandards-API.Automation # REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API # PATH: /.gitea/workflows/branch-protection.yml -# VERSION: 01.00.00 # BRIEF: Apply standardised branch protection rules to all governed repositories # # +========================================================================+ diff --git a/.gitea/workflows/bulk-repo-sync.yml b/.gitea/workflows/bulk-repo-sync.yml index 420d820..43b7495 100644 --- a/.gitea/workflows/bulk-repo-sync.yml +++ b/.gitea/workflows/bulk-repo-sync.yml @@ -5,7 +5,6 @@ # INGROUP: MokoStandards-API.Automation # REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API # PATH: /.gitea/workflows/bulk-repo-sync.yml -# VERSION: 04.06.12 # BRIEF: Bulk repo sync — runs from API repo, syncs standards to all governed repos name: Bulk Repository Sync diff --git a/.gitea/workflows/renovate.yml b/.gitea/workflows/renovate.yml index 8c215ed..711c9f3 100644 --- a/.gitea/workflows/renovate.yml +++ b/.gitea/workflows/renovate.yml @@ -7,7 +7,6 @@ # INGROUP: MokoStandards-API.Automation # REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API # PATH: /.gitea/workflows/renovate.yml -# VERSION: 01.00.00 # BRIEF: Run Renovate Bot across all governed repos for dependency updates # # +========================================================================+ diff --git a/.gitea/workflows/sync-wikis.yml b/.gitea/workflows/sync-wikis.yml index 763e0b1..d9630c2 100644 --- a/.gitea/workflows/sync-wikis.yml +++ b/.gitea/workflows/sync-wikis.yml @@ -6,7 +6,6 @@ # DEFGROUP: Gitea.Workflow # INGROUP: MokoStandards.Maintenance # PATH: /.gitea/workflows/sync-wikis.yml -# VERSION: 01.00.00 # BRIEF: Daily sync of all Gitea wikis to consolidated GitHub wiki repo name: Sync Wikis to GitHub diff --git a/automation/bulk_joomla_template.php b/automation/bulk_joomla_template.php index 60e2a7c..890ce79 100644 --- a/automation/bulk_joomla_template.php +++ b/automation/bulk_joomla_template.php @@ -11,7 +11,6 @@ * DEFGROUP: MokoStandards.Automation * INGROUP: MokoStandards.Scripts * PATH: /automation/bulk_joomla_template.php - * VERSION: 04.06.10 * BRIEF: Bulk scaffold and sync Joomla template repositories * * USAGE diff --git a/automation/bulk_sync.php b/automation/bulk_sync.php index ff525fc..ce984fe 100755 --- a/automation/bulk_sync.php +++ b/automation/bulk_sync.php @@ -12,7 +12,6 @@ * INGROUP: MokoStandards.Scripts * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /automation/bulk_sync.php - * VERSION: 04.06.00 * BRIEF: Enterprise-grade bulk repository synchronization */ diff --git a/automation/migrate_to_gitea.php b/automation/migrate_to_gitea.php index f0ab6b0..15c0421 100644 --- a/automation/migrate_to_gitea.php +++ b/automation/migrate_to_gitea.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /automation/migrate_to_gitea.php - * VERSION: 04.06.10 * BRIEF: Migrate repositories from GitHub to self-hosted Gitea instance * * USAGE diff --git a/automation/push_files.php b/automation/push_files.php index 2c671b9..34c46ca 100644 --- a/automation/push_files.php +++ b/automation/push_files.php @@ -12,7 +12,6 @@ * INGROUP: MokoStandards.Scripts * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /automation/push_files.php - * VERSION: 04.06.00 * BRIEF: Push one or more specific files to one or more remote repositories */ diff --git a/automation/repo_cleanup.php b/automation/repo_cleanup.php index 0ad5105..e80e6ee 100644 --- a/automation/repo_cleanup.php +++ b/automation/repo_cleanup.php @@ -12,7 +12,6 @@ * INGROUP: MokoStandards.Scripts * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /automation/repo_cleanup.php - * VERSION: 04.06.00 * BRIEF: Enterprise repository cleanup — branches, PRs, issues, workflows, labels, logs */ diff --git a/bin/moko b/bin/moko index f63ff50..c658eda 100644 --- a/bin/moko +++ b/bin/moko @@ -12,7 +12,6 @@ * INGROUP: MokoStandards * REPO: https://github.com/mokoconsulting-tech/MokoStandards * PATH: /bin/moko - * VERSION: 04.00.15 * BRIEF: Unified CLI dispatcher — run any MokoStandards script without needing GitHub Actions * * USAGE diff --git a/cli/archive_repo.php b/cli/archive_repo.php index 698955a..bfdc964 100644 --- a/cli/archive_repo.php +++ b/cli/archive_repo.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /cli/archive_repo.php - * VERSION: 04.06.10 * BRIEF: Gracefully retire a governed repository — archive, close issues/PRs, remove sync def * * USAGE diff --git a/cli/create_project.php b/cli/create_project.php index ae4bb9d..c869f8f 100644 --- a/cli/create_project.php +++ b/cli/create_project.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /cli/create_project.php - * VERSION: 04.06.00 * BRIEF: Create baseline GitHub Projects for repositories with standard fields and views * * USAGE diff --git a/cli/create_repo.php b/cli/create_repo.php index 2812d80..4ed3b60 100644 --- a/cli/create_repo.php +++ b/cli/create_repo.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /cli/create_repo.php - * VERSION: 04.06.10 * BRIEF: Scaffold a new governed repository with full MokoStandards baseline * * USAGE @@ -162,7 +161,6 @@ DEFGROUP: {$name} INGROUP: MokoStandards REPO: {$repoUrl} PATH: /README.md -VERSION: 01.00.00 BRIEF: {$description} --> diff --git a/cli/joomla_release.php b/cli/joomla_release.php index 487e29b..84222f0 100644 --- a/cli/joomla_release.php +++ b/cli/joomla_release.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /cli/joomla_release.php - * VERSION: 04.06.00 * BRIEF: Joomla release pipeline — build ZIP+tar.gz, upload to GitHub Release, update updates.xml * * USAGE diff --git a/cli/platform_detect.php b/cli/platform_detect.php index e04055e..37c3b0c 100644 --- a/cli/platform_detect.php +++ b/cli/platform_detect.php @@ -9,7 +9,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /cli/platform_detect.php - * VERSION: 04.06.00 * BRIEF: Detect platform from .mokostandards file — outputs platform string */ diff --git a/cli/release.php b/cli/release.php index 0a0e7c2..3fcb1e6 100644 --- a/cli/release.php +++ b/cli/release.php @@ -9,7 +9,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /cli/release.php - * VERSION: 04.06.00 * BRIEF: Automate the MokoStandards version branch release flow * * USAGE diff --git a/cli/release_notes.php b/cli/release_notes.php index f3839b9..de8e924 100644 --- a/cli/release_notes.php +++ b/cli/release_notes.php @@ -9,7 +9,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /cli/release_notes.php - * VERSION: 04.06.00 * BRIEF: Extract release notes from CHANGELOG.md for a given version */ diff --git a/cli/sync_rulesets.php b/cli/sync_rulesets.php index 6d1ab67..cce83c9 100644 --- a/cli/sync_rulesets.php +++ b/cli/sync_rulesets.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /cli/sync_rulesets.php - * VERSION: 04.06.10 * BRIEF: Apply branch protection rules to all repos via platform adapter * * USAGE diff --git a/cli/version_bump.php b/cli/version_bump.php index aa11c53..ff5e4a2 100644 --- a/cli/version_bump.php +++ b/cli/version_bump.php @@ -9,7 +9,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /cli/version_bump.php - * VERSION: 04.06.00 * BRIEF: Auto-increment patch version in README.md — outputs old → new */ diff --git a/cli/version_read.php b/cli/version_read.php index 484e92d..d8bbc7d 100644 --- a/cli/version_read.php +++ b/cli/version_read.php @@ -9,7 +9,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /cli/version_read.php - * VERSION: 04.06.00 * BRIEF: Read VERSION from README.md — outputs just the version string */ diff --git a/cli/version_set_platform.php b/cli/version_set_platform.php index d5ae577..a55f32f 100644 --- a/cli/version_set_platform.php +++ b/cli/version_set_platform.php @@ -9,7 +9,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /cli/version_set_platform.php - * VERSION: 04.06.00 * BRIEF: Set version in platform-specific files (Dolibarr $this->version, Joomla ) */ diff --git a/definitions/default/client.tf b/definitions/default/client.tf index 76b8c68..e8f95c8 100644 --- a/definitions/default/client.tf +++ b/definitions/default/client.tf @@ -8,7 +8,6 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 01.00.00 * Schema Version: 1.0 */ diff --git a/definitions/default/dolibarr.tf b/definitions/default/dolibarr.tf index 8cfe815..03b89b3 100644 --- a/definitions/default/dolibarr.tf +++ b/definitions/default/dolibarr.tf @@ -4,7 +4,6 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/default/generic-repository.tf b/definitions/default/generic-repository.tf index 03b83c3..ece7ef4 100644 --- a/definitions/default/generic-repository.tf +++ b/definitions/default/generic-repository.tf @@ -4,7 +4,6 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/default/generic.tf b/definitions/default/generic.tf index b68534d..a583949 100644 --- a/definitions/default/generic.tf +++ b/definitions/default/generic.tf @@ -4,7 +4,6 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/default/github-private-repository.tf b/definitions/default/github-private-repository.tf index 2467d04..a57a3b5 100644 --- a/definitions/default/github-private-repository.tf +++ b/definitions/default/github-private-repository.tf @@ -5,7 +5,6 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 * * NOTES diff --git a/definitions/default/joomla.tf b/definitions/default/joomla.tf index 7bd05b1..8474c25 100644 --- a/definitions/default/joomla.tf +++ b/definitions/default/joomla.tf @@ -4,7 +4,6 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/default/mcp-server.tf b/definitions/default/mcp-server.tf index cd610aa..a6a21b3 100644 --- a/definitions/default/mcp-server.tf +++ b/definitions/default/mcp-server.tf @@ -4,7 +4,6 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.06.00 * Schema Version: 1.0 */ diff --git a/definitions/default/platform.tf b/definitions/default/platform.tf index 477dcd5..97c0a94 100644 --- a/definitions/default/platform.tf +++ b/definitions/default/platform.tf @@ -8,7 +8,6 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/default/standards.tf b/definitions/default/standards.tf index ff82396..f36463b 100644 --- a/definitions/default/standards.tf +++ b/definitions/default/standards.tf @@ -4,7 +4,6 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/.github-private.def.tf b/definitions/sync/.github-private.def.tf index 43e3445..1a21a78 100644 --- a/definitions/sync/.github-private.def.tf +++ b/definitions/sync/.github-private.def.tf @@ -83,7 +83,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/.github.def.tf b/definitions/sync/.github.def.tf index ecf9918..d2018b0 100644 --- a/definitions/sync/.github.def.tf +++ b/definitions/sync/.github.def.tf @@ -98,7 +98,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/Copy-PortablePath.def.tf b/definitions/sync/Copy-PortablePath.def.tf index 33b8bd8..103790b 100644 --- a/definitions/sync/Copy-PortablePath.def.tf +++ b/definitions/sync/Copy-PortablePath.def.tf @@ -99,7 +99,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/DoliMods.def.tf b/definitions/sync/DoliMods.def.tf index f395231..b05ee48 100644 --- a/definitions/sync/DoliMods.def.tf +++ b/definitions/sync/DoliMods.def.tf @@ -89,7 +89,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoCRM.def.tf b/definitions/sync/MokoCRM.def.tf index 4c281d9..a6c9ad8 100644 --- a/definitions/sync/MokoCRM.def.tf +++ b/definitions/sync/MokoCRM.def.tf @@ -91,7 +91,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoCassiopeia.def.tf b/definitions/sync/MokoCassiopeia.def.tf index d682f19..2ab9446 100644 --- a/definitions/sync/MokoCassiopeia.def.tf +++ b/definitions/sync/MokoCassiopeia.def.tf @@ -86,7 +86,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliAdInsights.def.tf b/definitions/sync/MokoDoliAdInsights.def.tf index db9caf8..cd4e429 100644 --- a/definitions/sync/MokoDoliAdInsights.def.tf +++ b/definitions/sync/MokoDoliAdInsights.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliArt.def.tf b/definitions/sync/MokoDoliArt.def.tf index f7865bd..45adcca 100644 --- a/definitions/sync/MokoDoliArt.def.tf +++ b/definitions/sync/MokoDoliArt.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliAuth.def.tf b/definitions/sync/MokoDoliAuth.def.tf index 8051886..0a15d33 100644 --- a/definitions/sync/MokoDoliAuth.def.tf +++ b/definitions/sync/MokoDoliAuth.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliCare.def.tf b/definitions/sync/MokoDoliCare.def.tf index 2517fe8..169a5e3 100644 --- a/definitions/sync/MokoDoliCare.def.tf +++ b/definitions/sync/MokoDoliCare.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliChimp.def.tf b/definitions/sync/MokoDoliChimp.def.tf index 4f06fdb..46908f1 100644 --- a/definitions/sync/MokoDoliChimp.def.tf +++ b/definitions/sync/MokoDoliChimp.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliClaude.def.tf b/definitions/sync/MokoDoliClaude.def.tf index 24c5cb3..d45dcfb 100644 --- a/definitions/sync/MokoDoliClaude.def.tf +++ b/definitions/sync/MokoDoliClaude.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliCredits.def.tf b/definitions/sync/MokoDoliCredits.def.tf index 4787ffc..e66b5f8 100644 --- a/definitions/sync/MokoDoliCredits.def.tf +++ b/definitions/sync/MokoDoliCredits.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliDymo.def.tf b/definitions/sync/MokoDoliDymo.def.tf index e19bdea..c8c892d 100644 --- a/definitions/sync/MokoDoliDymo.def.tf +++ b/definitions/sync/MokoDoliDymo.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliForm.def.tf b/definitions/sync/MokoDoliForm.def.tf index 20f25d5..4ccf61c 100644 --- a/definitions/sync/MokoDoliForm.def.tf +++ b/definitions/sync/MokoDoliForm.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliG.def.tf b/definitions/sync/MokoDoliG.def.tf index 5eddea6..c45cb5b 100644 --- a/definitions/sync/MokoDoliG.def.tf +++ b/definitions/sync/MokoDoliG.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliGithub.def.tf b/definitions/sync/MokoDoliGithub.def.tf index e7cc94f..5b64074 100644 --- a/definitions/sync/MokoDoliGithub.def.tf +++ b/definitions/sync/MokoDoliGithub.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliHRM.def.tf b/definitions/sync/MokoDoliHRM.def.tf index 7888346..bcf96c8 100644 --- a/definitions/sync/MokoDoliHRM.def.tf +++ b/definitions/sync/MokoDoliHRM.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliMods.def.tf b/definitions/sync/MokoDoliMods.def.tf index c5cb7ce..990bb31 100644 --- a/definitions/sync/MokoDoliMods.def.tf +++ b/definitions/sync/MokoDoliMods.def.tf @@ -103,7 +103,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliMulti.def.tf b/definitions/sync/MokoDoliMulti.def.tf index 1b8b49f..5a93f51 100644 --- a/definitions/sync/MokoDoliMulti.def.tf +++ b/definitions/sync/MokoDoliMulti.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliOffline.def.tf b/definitions/sync/MokoDoliOffline.def.tf index 08af317..22cdcf1 100644 --- a/definitions/sync/MokoDoliOffline.def.tf +++ b/definitions/sync/MokoDoliOffline.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliPhone.com.def.tf b/definitions/sync/MokoDoliPhone.com.def.tf index afca29e..333caf4 100644 --- a/definitions/sync/MokoDoliPhone.com.def.tf +++ b/definitions/sync/MokoDoliPhone.com.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliProjTemplate.def.tf b/definitions/sync/MokoDoliProjTemplate.def.tf index 80362e4..8b13e9f 100644 --- a/definitions/sync/MokoDoliProjTemplate.def.tf +++ b/definitions/sync/MokoDoliProjTemplate.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliRelease.def.tf b/definitions/sync/MokoDoliRelease.def.tf index c306308..f4d24fe 100644 --- a/definitions/sync/MokoDoliRelease.def.tf +++ b/definitions/sync/MokoDoliRelease.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliSign.def.tf b/definitions/sync/MokoDoliSign.def.tf index f4f130d..94fc1cf 100644 --- a/definitions/sync/MokoDoliSign.def.tf +++ b/definitions/sync/MokoDoliSign.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliTools.def.tf b/definitions/sync/MokoDoliTools.def.tf index b20c8d4..f313cf8 100644 --- a/definitions/sync/MokoDoliTools.def.tf +++ b/definitions/sync/MokoDoliTools.def.tf @@ -81,7 +81,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDoliTraining.def.tf b/definitions/sync/MokoDoliTraining.def.tf index 2b6c156..1ed5f7c 100644 --- a/definitions/sync/MokoDoliTraining.def.tf +++ b/definitions/sync/MokoDoliTraining.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoDolibarr.def.tf b/definitions/sync/MokoDolibarr.def.tf index 0ab06d8..73352c6 100644 --- a/definitions/sync/MokoDolibarr.def.tf +++ b/definitions/sync/MokoDolibarr.def.tf @@ -103,7 +103,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoISOUpdatePortable.def.tf b/definitions/sync/MokoISOUpdatePortable.def.tf index e63839b..6675543 100644 --- a/definitions/sync/MokoISOUpdatePortable.def.tf +++ b/definitions/sync/MokoISOUpdatePortable.def.tf @@ -99,7 +99,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoJoomHero.def.tf b/definitions/sync/MokoJoomHero.def.tf index e49679c..7340428 100644 --- a/definitions/sync/MokoJoomHero.def.tf +++ b/definitions/sync/MokoJoomHero.def.tf @@ -85,7 +85,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoJoomTOS.def.tf b/definitions/sync/MokoJoomTOS.def.tf index d487bfd..5ff0180 100644 --- a/definitions/sync/MokoJoomTOS.def.tf +++ b/definitions/sync/MokoJoomTOS.def.tf @@ -85,7 +85,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoPerfectPublisher-Discord.def.tf b/definitions/sync/MokoPerfectPublisher-Discord.def.tf index 2eea2f3..2290213 100644 --- a/definitions/sync/MokoPerfectPublisher-Discord.def.tf +++ b/definitions/sync/MokoPerfectPublisher-Discord.def.tf @@ -99,7 +99,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoStandards-Template-Client.def.tf b/definitions/sync/MokoStandards-Template-Client.def.tf index 22d6a9c..8a6a951 100644 --- a/definitions/sync/MokoStandards-Template-Client.def.tf +++ b/definitions/sync/MokoStandards-Template-Client.def.tf @@ -99,7 +99,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoStandards-Template-Dolibarr.def.tf b/definitions/sync/MokoStandards-Template-Dolibarr.def.tf index f72d075..2af7a3e 100644 --- a/definitions/sync/MokoStandards-Template-Dolibarr.def.tf +++ b/definitions/sync/MokoStandards-Template-Dolibarr.def.tf @@ -90,7 +90,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoStandards-Template-Generic.def.tf b/definitions/sync/MokoStandards-Template-Generic.def.tf index bd1402e..a0498f1 100644 --- a/definitions/sync/MokoStandards-Template-Generic.def.tf +++ b/definitions/sync/MokoStandards-Template-Generic.def.tf @@ -99,7 +99,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoStandards-Template-Joomla-Component.def.tf b/definitions/sync/MokoStandards-Template-Joomla-Component.def.tf index a081178..eb54758 100644 --- a/definitions/sync/MokoStandards-Template-Joomla-Component.def.tf +++ b/definitions/sync/MokoStandards-Template-Joomla-Component.def.tf @@ -86,7 +86,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoStandards-Template-Joomla-Library.def.tf b/definitions/sync/MokoStandards-Template-Joomla-Library.def.tf index 817bbab..a88c949 100644 --- a/definitions/sync/MokoStandards-Template-Joomla-Library.def.tf +++ b/definitions/sync/MokoStandards-Template-Joomla-Library.def.tf @@ -86,7 +86,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoStandards-Template-Joomla-Module.def.tf b/definitions/sync/MokoStandards-Template-Joomla-Module.def.tf index 27d9f65..9132923 100644 --- a/definitions/sync/MokoStandards-Template-Joomla-Module.def.tf +++ b/definitions/sync/MokoStandards-Template-Joomla-Module.def.tf @@ -86,7 +86,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoStandards-Template-Joomla-Package.def.tf b/definitions/sync/MokoStandards-Template-Joomla-Package.def.tf index 9ce6e81..4043e79 100644 --- a/definitions/sync/MokoStandards-Template-Joomla-Package.def.tf +++ b/definitions/sync/MokoStandards-Template-Joomla-Package.def.tf @@ -86,7 +86,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoStandards-Template-Joomla-Plugin.def.tf b/definitions/sync/MokoStandards-Template-Joomla-Plugin.def.tf index 71c6a40..bb6ab8f 100644 --- a/definitions/sync/MokoStandards-Template-Joomla-Plugin.def.tf +++ b/definitions/sync/MokoStandards-Template-Joomla-Plugin.def.tf @@ -86,7 +86,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoStandards-Template-Joomla-Template.def.tf b/definitions/sync/MokoStandards-Template-Joomla-Template.def.tf index dc0876c..5e784af 100644 --- a/definitions/sync/MokoStandards-Template-Joomla-Template.def.tf +++ b/definitions/sync/MokoStandards-Template-Joomla-Template.def.tf @@ -86,7 +86,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoTesting.def.tf b/definitions/sync/MokoTesting.def.tf index 1f727c8..7ad3cd9 100644 --- a/definitions/sync/MokoTesting.def.tf +++ b/definitions/sync/MokoTesting.def.tf @@ -99,7 +99,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoWaaS.def.tf b/definitions/sync/MokoWaaS.def.tf index bef35e3..b211c54 100644 --- a/definitions/sync/MokoWaaS.def.tf +++ b/definitions/sync/MokoWaaS.def.tf @@ -86,7 +86,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoWaaSAnnounce.def.tf b/definitions/sync/MokoWaaSAnnounce.def.tf index 507ce57..d9c0d74 100644 --- a/definitions/sync/MokoWaaSAnnounce.def.tf +++ b/definitions/sync/MokoWaaSAnnounce.def.tf @@ -86,7 +86,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoWaaSBrand.def.tf b/definitions/sync/MokoWaaSBrand.def.tf index c5263d9..b2b1a60 100644 --- a/definitions/sync/MokoWaaSBrand.def.tf +++ b/definitions/sync/MokoWaaSBrand.def.tf @@ -76,7 +76,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/MokoWinSetup.def.tf b/definitions/sync/MokoWinSetup.def.tf index 2da4aa4..2d058af 100644 --- a/definitions/sync/MokoWinSetup.def.tf +++ b/definitions/sync/MokoWinSetup.def.tf @@ -99,7 +99,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/PLG_FINDER_MOKOVMSMARTSEARCH.def.tf b/definitions/sync/PLG_FINDER_MOKOVMSMARTSEARCH.def.tf index e6d262e..9bcc75d 100644 --- a/definitions/sync/PLG_FINDER_MOKOVMSMARTSEARCH.def.tf +++ b/definitions/sync/PLG_FINDER_MOKOVMSMARTSEARCH.def.tf @@ -99,7 +99,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/client-clarksvillefurs.def.tf b/definitions/sync/client-clarksvillefurs.def.tf index 56f964f..59c8f3c 100644 --- a/definitions/sync/client-clarksvillefurs.def.tf +++ b/definitions/sync/client-clarksvillefurs.def.tf @@ -112,7 +112,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/client-kiddieland.def.tf b/definitions/sync/client-kiddieland.def.tf index 8f63902..48c3859 100644 --- a/definitions/sync/client-kiddieland.def.tf +++ b/definitions/sync/client-kiddieland.def.tf @@ -99,7 +99,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/definitions/sync/client-vexcreations.def.tf b/definitions/sync/client-vexcreations.def.tf index b831647..74001f9 100644 --- a/definitions/sync/client-vexcreations.def.tf +++ b/definitions/sync/client-vexcreations.def.tf @@ -86,7 +86,6 @@ locals { * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 05.00.00 * Schema Version: 1.0 */ diff --git a/deploy/deploy-joomla.php b/deploy/deploy-joomla.php index ef209b2..cdde1f6 100644 --- a/deploy/deploy-joomla.php +++ b/deploy/deploy-joomla.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /deploy/deploy-joomla.php - * VERSION: 04.06.00 * BRIEF: Smart Joomla deploy — routes files to correct Joomla directories based on XML manifest * * Parses the extension's XML manifest to determine type (component, module, diff --git a/deploy/deploy-sftp.php b/deploy/deploy-sftp.php index 2afff3e..4d004de 100644 --- a/deploy/deploy-sftp.php +++ b/deploy/deploy-sftp.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /deploy/deploy-sftp.php - * VERSION: 04.06.00 * BRIEF: Deploy a repository src/ directory to a remote web server via SFTP */ diff --git a/fix/fix_line_endings.php b/fix/fix_line_endings.php index ccc11d1..aa11e4d 100644 --- a/fix/fix_line_endings.php +++ b/fix/fix_line_endings.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /fix/fix_line_endings.php - * VERSION: 04.06.00 * BRIEF: CLI script to fix line endings (CRLF → LF) in tracked files */ diff --git a/fix/fix_permissions.php b/fix/fix_permissions.php index f40bc96..afae010 100644 --- a/fix/fix_permissions.php +++ b/fix/fix_permissions.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /fix/fix_permissions.php - * VERSION: 04.06.00 * BRIEF: CLI script to fix file permissions (dirs 755, files 644, scripts 755) */ diff --git a/fix/fix_tabs.php b/fix/fix_tabs.php index e23c093..0243086 100644 --- a/fix/fix_tabs.php +++ b/fix/fix_tabs.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /fix/fix_tabs.php - * VERSION: 04.06.00 * BRIEF: CLI script to convert tabs to spaces in tracked source files */ diff --git a/fix/fix_trailing_spaces.php b/fix/fix_trailing_spaces.php index 21cb04b..52821fb 100644 --- a/fix/fix_trailing_spaces.php +++ b/fix/fix_trailing_spaces.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /fix/fix_trailing_spaces.php - * VERSION: 04.06.00 * BRIEF: CLI script to remove trailing whitespace from tracked source files */ diff --git a/lib/CliBase.php b/lib/CliBase.php index 010cde0..b68a5bf 100644 --- a/lib/CliBase.php +++ b/lib/CliBase.php @@ -10,7 +10,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/CliBase.php - * VERSION: 04.06.00 * BRIEF: Standalone base CLI class for scripts that do not use CliFramework */ diff --git a/lib/Common.php b/lib/Common.php index 52a803a..443730d 100644 --- a/lib/Common.php +++ b/lib/Common.php @@ -10,7 +10,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Common.php - * VERSION: 04.06.00 * BRIEF: Common utility functions for scripts * NOTE: Version format used throughout is zero-padded semver: XX.YY.ZZ (e.g. 04.00.04). * All version regex patterns enforce exactly two digits per component by design. diff --git a/lib/Enterprise/CliFramework.php b/lib/Enterprise/CliFramework.php index e25d973..6bed63c 100644 --- a/lib/Enterprise/CliFramework.php +++ b/lib/Enterprise/CliFramework.php @@ -10,7 +10,6 @@ * INGROUP: MokoStandards.Enterprise * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/CliFramework.php - * VERSION: 04.06.00 * BRIEF: CLI base classes — CliFramework (current) and CLIApp (legacy) * NOTE: All new scripts must extend CliFramework, not CLIApp. * CLIApp remains for backward-compatibility with existing scripts. diff --git a/lib/Enterprise/DefinitionParser.php b/lib/Enterprise/DefinitionParser.php index b1fde7f..f316bf0 100644 --- a/lib/Enterprise/DefinitionParser.php +++ b/lib/Enterprise/DefinitionParser.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/DefinitionParser.php - * VERSION: 04.06.00 * BRIEF: Parses Terraform HCL repository definition files into a flat sync-file list */ diff --git a/lib/Enterprise/EnterpriseReadinessValidator.php b/lib/Enterprise/EnterpriseReadinessValidator.php index 3b360ae..605b836 100644 --- a/lib/Enterprise/EnterpriseReadinessValidator.php +++ b/lib/Enterprise/EnterpriseReadinessValidator.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/EnterpriseReadinessValidator.php - * VERSION: 04.06.00 * BRIEF: Enterprise readiness validation library */ diff --git a/lib/Enterprise/FileFixUtility.php b/lib/Enterprise/FileFixUtility.php index b800fcc..4973d6a 100644 --- a/lib/Enterprise/FileFixUtility.php +++ b/lib/Enterprise/FileFixUtility.php @@ -10,7 +10,6 @@ * INGROUP: MokoStandards.Lib * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/FileFixUtility.php - * VERSION: 04.06.00 * BRIEF: Utility class for fixing file formatting issues (line endings, permissions, tabs, trailing spaces) */ diff --git a/lib/Enterprise/GitHubAdapter.php b/lib/Enterprise/GitHubAdapter.php index 312fab1..dc59ff6 100644 --- a/lib/Enterprise/GitHubAdapter.php +++ b/lib/Enterprise/GitHubAdapter.php @@ -10,7 +10,6 @@ * INGROUP: MokoStandards.Enterprise * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/GitHubAdapter.php - * VERSION: 04.06.10 * BRIEF: GitHub implementation of GitPlatformAdapter */ diff --git a/lib/Enterprise/GitPlatformAdapter.php b/lib/Enterprise/GitPlatformAdapter.php index 145218c..6526456 100644 --- a/lib/Enterprise/GitPlatformAdapter.php +++ b/lib/Enterprise/GitPlatformAdapter.php @@ -10,7 +10,6 @@ * INGROUP: MokoStandards.Enterprise * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/GitPlatformAdapter.php - * VERSION: 04.06.10 * BRIEF: Interface defining all git platform operations for GitHub/Gitea abstraction */ diff --git a/lib/Enterprise/GiteaAdapter.php b/lib/Enterprise/GiteaAdapter.php index 5aa9699..4afc732 100644 --- a/lib/Enterprise/GiteaAdapter.php +++ b/lib/Enterprise/GiteaAdapter.php @@ -10,7 +10,6 @@ * INGROUP: MokoStandards.Enterprise * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/GiteaAdapter.php - * VERSION: 04.06.10 * BRIEF: Gitea implementation of GitPlatformAdapter */ diff --git a/lib/Enterprise/MokoStandardsParser.php b/lib/Enterprise/MokoStandardsParser.php index fe033ad..0e7f45d 100644 --- a/lib/Enterprise/MokoStandardsParser.php +++ b/lib/Enterprise/MokoStandardsParser.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/MokoStandardsParser.php - * VERSION: 04.07.00 * BRIEF: Parser for the XML-based .mokostandards repository manifest */ diff --git a/lib/Enterprise/PackageBuilder.php b/lib/Enterprise/PackageBuilder.php index 76d6d3f..f867315 100644 --- a/lib/Enterprise/PackageBuilder.php +++ b/lib/Enterprise/PackageBuilder.php @@ -10,7 +10,6 @@ * INGROUP: MokoStandards.Lib * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/PackageBuilder.php - * VERSION: 04.06.00 * BRIEF: Builds release packages for generic, Dolibarr module, and Joomla component projects */ diff --git a/lib/Enterprise/PlatformAdapterFactory.php b/lib/Enterprise/PlatformAdapterFactory.php index 40ba2e5..a7d8182 100644 --- a/lib/Enterprise/PlatformAdapterFactory.php +++ b/lib/Enterprise/PlatformAdapterFactory.php @@ -10,7 +10,6 @@ * INGROUP: MokoStandards.Enterprise * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/PlatformAdapterFactory.php - * VERSION: 04.06.10 * BRIEF: Factory for creating platform-specific GitPlatformAdapter instances */ diff --git a/lib/Enterprise/Plugins/ApiPlugin.php b/lib/Enterprise/Plugins/ApiPlugin.php index 7276a9c..c0c41cc 100644 --- a/lib/Enterprise/Plugins/ApiPlugin.php +++ b/lib/Enterprise/Plugins/ApiPlugin.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/Plugins/ApiPlugin.php - * VERSION: 04.06.00 * BRIEF: Enterprise plugin for API/Microservices projects */ diff --git a/lib/Enterprise/Plugins/DocumentationPlugin.php b/lib/Enterprise/Plugins/DocumentationPlugin.php index 891a144..9e559de 100644 --- a/lib/Enterprise/Plugins/DocumentationPlugin.php +++ b/lib/Enterprise/Plugins/DocumentationPlugin.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/Plugins/DocumentationPlugin.php - * VERSION: 04.06.00 * BRIEF: Enterprise plugin for documentation projects */ diff --git a/lib/Enterprise/Plugins/DolibarrPlugin.php b/lib/Enterprise/Plugins/DolibarrPlugin.php index ce8b86a..8a82242 100644 --- a/lib/Enterprise/Plugins/DolibarrPlugin.php +++ b/lib/Enterprise/Plugins/DolibarrPlugin.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/Plugins/DolibarrPlugin.php - * VERSION: 04.06.00 * BRIEF: Enterprise plugin for Dolibarr modules */ diff --git a/lib/Enterprise/Plugins/GenericPlugin.php b/lib/Enterprise/Plugins/GenericPlugin.php index 9a48987..ce6f531 100644 --- a/lib/Enterprise/Plugins/GenericPlugin.php +++ b/lib/Enterprise/Plugins/GenericPlugin.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/Plugins/GenericPlugin.php - * VERSION: 04.06.00 * BRIEF: Enterprise plugin for generic projects */ diff --git a/lib/Enterprise/Plugins/JoomlaPlugin.php b/lib/Enterprise/Plugins/JoomlaPlugin.php index b7acbc0..a04f50e 100644 --- a/lib/Enterprise/Plugins/JoomlaPlugin.php +++ b/lib/Enterprise/Plugins/JoomlaPlugin.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/Plugins/JoomlaPlugin.php - * VERSION: 04.06.00 * BRIEF: Enterprise plugin for Joomla projects */ diff --git a/lib/Enterprise/Plugins/McpServerPlugin.php b/lib/Enterprise/Plugins/McpServerPlugin.php index aaf61ce..09a3011 100644 --- a/lib/Enterprise/Plugins/McpServerPlugin.php +++ b/lib/Enterprise/Plugins/McpServerPlugin.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/Plugins/McpServerPlugin.php - * VERSION: 04.06.00 * BRIEF: Enterprise plugin for MCP (Model Context Protocol) server projects */ diff --git a/lib/Enterprise/Plugins/MobilePlugin.php b/lib/Enterprise/Plugins/MobilePlugin.php index d28421a..6d53514 100644 --- a/lib/Enterprise/Plugins/MobilePlugin.php +++ b/lib/Enterprise/Plugins/MobilePlugin.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/Plugins/MobilePlugin.php - * VERSION: 04.06.00 * BRIEF: Enterprise plugin for mobile app projects */ diff --git a/lib/Enterprise/Plugins/NodeJsPlugin.php b/lib/Enterprise/Plugins/NodeJsPlugin.php index 9fa2d87..f166ba9 100644 --- a/lib/Enterprise/Plugins/NodeJsPlugin.php +++ b/lib/Enterprise/Plugins/NodeJsPlugin.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/Plugins/NodeJsPlugin.php - * VERSION: 04.06.00 * BRIEF: Enterprise plugin for Node.js/TypeScript projects */ diff --git a/lib/Enterprise/Plugins/PythonPlugin.php b/lib/Enterprise/Plugins/PythonPlugin.php index b316c6f..04a4998 100644 --- a/lib/Enterprise/Plugins/PythonPlugin.php +++ b/lib/Enterprise/Plugins/PythonPlugin.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/Plugins/PythonPlugin.php - * VERSION: 04.06.00 * BRIEF: Enterprise plugin for Python projects */ diff --git a/lib/Enterprise/Plugins/TerraformPlugin.php b/lib/Enterprise/Plugins/TerraformPlugin.php index dad733f..7b4b406 100644 --- a/lib/Enterprise/Plugins/TerraformPlugin.php +++ b/lib/Enterprise/Plugins/TerraformPlugin.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/Plugins/TerraformPlugin.php - * VERSION: 04.06.00 * BRIEF: Enterprise plugin for Terraform projects */ diff --git a/lib/Enterprise/Plugins/WordPressPlugin.php b/lib/Enterprise/Plugins/WordPressPlugin.php index e6bf729..b241d85 100644 --- a/lib/Enterprise/Plugins/WordPressPlugin.php +++ b/lib/Enterprise/Plugins/WordPressPlugin.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/Plugins/WordPressPlugin.php - * VERSION: 04.06.00 * BRIEF: Enterprise plugin for WordPress projects */ diff --git a/lib/Enterprise/ProjectConfigValidator.php b/lib/Enterprise/ProjectConfigValidator.php index cabbea1..0924dbd 100644 --- a/lib/Enterprise/ProjectConfigValidator.php +++ b/lib/Enterprise/ProjectConfigValidator.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/ProjectConfigValidator.php - * VERSION: 04.06.00 * BRIEF: Enterprise library for validating project configurations */ diff --git a/lib/Enterprise/ProjectMetricsCollector.php b/lib/Enterprise/ProjectMetricsCollector.php index 303bbe6..9131c88 100644 --- a/lib/Enterprise/ProjectMetricsCollector.php +++ b/lib/Enterprise/ProjectMetricsCollector.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/ProjectMetricsCollector.php - * VERSION: 04.06.00 * BRIEF: Enterprise library for collecting project-specific metrics */ diff --git a/lib/Enterprise/ProjectTypeDetector.php b/lib/Enterprise/ProjectTypeDetector.php index 7ddae4d..a917686 100644 --- a/lib/Enterprise/ProjectTypeDetector.php +++ b/lib/Enterprise/ProjectTypeDetector.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/ProjectTypeDetector.php - * VERSION: 04.06.00 * BRIEF: Enterprise library for detecting project types */ diff --git a/lib/Enterprise/RepositoryHealthChecker.php b/lib/Enterprise/RepositoryHealthChecker.php index deed3f2..85b3af3 100644 --- a/lib/Enterprise/RepositoryHealthChecker.php +++ b/lib/Enterprise/RepositoryHealthChecker.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/RepositoryHealthChecker.php - * VERSION: 04.06.00 * BRIEF: Repository health checking enterprise library */ diff --git a/lib/Enterprise/RepositorySynchronizer.php b/lib/Enterprise/RepositorySynchronizer.php index fff5d22..5ef8eb4 100644 --- a/lib/Enterprise/RepositorySynchronizer.php +++ b/lib/Enterprise/RepositorySynchronizer.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/RepositorySynchronizer.php - * VERSION: 04.06.00 * BRIEF: Repository synchronization enterprise library */ diff --git a/lib/Enterprise/SynchronizationException.php b/lib/Enterprise/SynchronizationException.php index 9e3436b..0b021b4 100644 --- a/lib/Enterprise/SynchronizationException.php +++ b/lib/Enterprise/SynchronizationException.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/Enterprise/SynchronizationException.php - * VERSION: 04.06.00 * BRIEF: Custom exception for repository synchronization errors */ diff --git a/lib/plugins/Joomla/UpdateXmlGenerator.php b/lib/plugins/Joomla/UpdateXmlGenerator.php index 98a8e31..189fccf 100644 --- a/lib/plugins/Joomla/UpdateXmlGenerator.php +++ b/lib/plugins/Joomla/UpdateXmlGenerator.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /lib/plugins/Joomla/UpdateXmlGenerator.php - * VERSION: 04.07.00 * BRIEF: Generates and updates Joomla extension updates.xml files */ diff --git a/maintenance/pin_action_shas.php b/maintenance/pin_action_shas.php index e525d93..4c70f83 100644 --- a/maintenance/pin_action_shas.php +++ b/maintenance/pin_action_shas.php @@ -12,7 +12,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /maintenance/pin_action_shas.php - * VERSION: 04.06.00 * BRIEF: Pin GitHub Actions to immutable commit SHAs in workflow files * NOTE: Resolves tag/branch refs to commit SHAs via the GitHub API to satisfy * the CodeQL "Unpinned tag for a non-immutable Action" security rule. diff --git a/maintenance/repo_inventory.php b/maintenance/repo_inventory.php index 2c3d783..4086fbb 100644 --- a/maintenance/repo_inventory.php +++ b/maintenance/repo_inventory.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /maintenance/repo_inventory.php - * VERSION: 04.06.00 * BRIEF: Generate a live inventory dashboard of all governed repos as a GitHub issue * * USAGE diff --git a/maintenance/rotate_secrets.php b/maintenance/rotate_secrets.php index 8e3e709..cfcb0ce 100644 --- a/maintenance/rotate_secrets.php +++ b/maintenance/rotate_secrets.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /maintenance/rotate_secrets.php - * VERSION: 04.06.00 * BRIEF: Audit FTP secrets and variables across all governed repos — report missing or stale * * USAGE diff --git a/maintenance/setup_labels.php b/maintenance/setup_labels.php index 6415385..fa87abd 100644 --- a/maintenance/setup_labels.php +++ b/maintenance/setup_labels.php @@ -13,7 +13,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /maintenance/setup_labels.php - * VERSION: 04.06.00 * BRIEF: REQUIRED label deployment script for all MokoStandards-governed repositories */ diff --git a/maintenance/sync_dolibarr_readmes.php b/maintenance/sync_dolibarr_readmes.php index 0932fc1..f12a4ed 100644 --- a/maintenance/sync_dolibarr_readmes.php +++ b/maintenance/sync_dolibarr_readmes.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /maintenance/sync_dolibarr_readmes.php - * VERSION: 04.06.00 * BRIEF: Keeps root README.md and src/README.md in sync for Dolibarr module repositories * NOTE: Version format is zero-padded semver: XX.YY.ZZ (e.g. 04.00.04). All version regex * patterns enforce exactly two digits per component by design. diff --git a/maintenance/update_repo_inventory.php b/maintenance/update_repo_inventory.php index 7c57e05..ff2228c 100644 --- a/maintenance/update_repo_inventory.php +++ b/maintenance/update_repo_inventory.php @@ -12,7 +12,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /maintenance/update_repo_inventory.php - * VERSION: 04.06.00 * BRIEF: Queries GitHub org repos and rewrites the auto-generated section of REPOSITORY_INVENTORY.md */ diff --git a/maintenance/update_sha_hashes.php b/maintenance/update_sha_hashes.php index 9b45a73..2c7c005 100755 --- a/maintenance/update_sha_hashes.php +++ b/maintenance/update_sha_hashes.php @@ -12,7 +12,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /maintenance/update_sha_hashes.php - * VERSION: 04.06.00 * BRIEF: Update SHA-256 hashes in script registry */ diff --git a/maintenance/update_version_from_readme.php b/maintenance/update_version_from_readme.php index 93c0499..7c42f03 100644 --- a/maintenance/update_version_from_readme.php +++ b/maintenance/update_version_from_readme.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /maintenance/update_version_from_readme.php - * VERSION: 04.06.00 * BRIEF: Reads VERSION from README.md FILE INFORMATION block and propagates it to all badges and FILE INFORMATION headers * NOTE: README.md is the single source of truth for the repository version. * Version format is zero-padded semver: XX.YY.ZZ (e.g. 04.00.04). All regex patterns diff --git a/mcp/src/config.ts b/mcp/src/config.ts index 1c36d96..892be4c 100644 --- a/mcp/src/config.ts +++ b/mcp/src/config.ts @@ -9,7 +9,6 @@ * INGROUP: MokoStandards-API * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /mcp/src/config.ts - * VERSION: 01.00.00 * BRIEF: Configuration loader for MokoStandards MCP server */ diff --git a/mcp/src/index.ts b/mcp/src/index.ts index 016df77..3483c33 100644 --- a/mcp/src/index.ts +++ b/mcp/src/index.ts @@ -10,7 +10,6 @@ * INGROUP: MokoStandards-API * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /mcp/src/index.ts - * VERSION: 01.00.00 * BRIEF: MCP server entry point — exposes MokoStandards governance tools */ diff --git a/mcp/src/runner.ts b/mcp/src/runner.ts index f23386d..d3b7439 100644 --- a/mcp/src/runner.ts +++ b/mcp/src/runner.ts @@ -9,7 +9,6 @@ * INGROUP: MokoStandards-API * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /mcp/src/runner.ts - * VERSION: 01.00.00 * BRIEF: PHP CLI command runner for MokoStandards tools — uses execFile (no shell injection) */ diff --git a/mcp/src/types.ts b/mcp/src/types.ts index dd2bee5..3d3fcf7 100644 --- a/mcp/src/types.ts +++ b/mcp/src/types.ts @@ -9,7 +9,6 @@ * INGROUP: MokoStandards-API * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /mcp/src/types.ts - * VERSION: 01.00.00 * BRIEF: TypeScript type definitions for MokoStandards MCP server */ diff --git a/plugin_health_check.php b/plugin_health_check.php index 40943c6..65d1011 100755 --- a/plugin_health_check.php +++ b/plugin_health_check.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /plugin_health_check.php - * VERSION: 04.06.00 * BRIEF: Run health checks on a project using the auto-detected or specified plugin */ diff --git a/plugin_list.php b/plugin_list.php index 77a8aa3..921d2f8 100755 --- a/plugin_list.php +++ b/plugin_list.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /plugin_list.php - * VERSION: 04.06.00 * BRIEF: List all available project-type plugins and their capabilities */ diff --git a/plugin_metrics.php b/plugin_metrics.php index f67a504..221b0ca 100755 --- a/plugin_metrics.php +++ b/plugin_metrics.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /plugin_metrics.php - * VERSION: 04.06.00 * BRIEF: Collect project metrics using the auto-detected or specified plugin */ diff --git a/plugin_readiness.php b/plugin_readiness.php index ef40ae8..dc78c81 100755 --- a/plugin_readiness.php +++ b/plugin_readiness.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /plugin_readiness.php - * VERSION: 04.06.00 * BRIEF: Check release readiness of a project using the auto-detected or specified plugin */ diff --git a/plugin_validate.php b/plugin_validate.php index 9e59141..b867b62 100755 --- a/plugin_validate.php +++ b/plugin_validate.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /plugin_validate.php - * VERSION: 04.06.00 * BRIEF: Validate a project's structure and standards using the auto-detected or specified plugin */ diff --git a/release/generate_dolibarr_version_txt.php b/release/generate_dolibarr_version_txt.php index 9cc4c3e..5271e17 100644 --- a/release/generate_dolibarr_version_txt.php +++ b/release/generate_dolibarr_version_txt.php @@ -12,7 +12,6 @@ * INGROUP: MokoStandards.Scripts * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /release/generate_dolibarr_version_txt.php - * VERSION: 04.06.00 * BRIEF: Create or update version.txt on Dolibarr module release * * Dolibarr Update Server helper. On each release it: diff --git a/release/generate_joomla_update_xml.php b/release/generate_joomla_update_xml.php index b7f0678..6f2e513 100644 --- a/release/generate_joomla_update_xml.php +++ b/release/generate_joomla_update_xml.php @@ -12,7 +12,6 @@ * INGROUP: MokoStandards.Scripts * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /release/generate_joomla_update_xml.php - * VERSION: 04.06.00 * BRIEF: Create or update the in updates.xml on release * * Minimal Joomla Update Server helper. On each release it: diff --git a/templates/configs/README.md b/templates/configs/README.md index 05b6e56..eee5324 100644 --- a/templates/configs/README.md +++ b/templates/configs/README.md @@ -10,7 +10,6 @@ DEFGROUP: MokoStandards.Templates INGROUP: MokoStandards REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards PATH: /templates/configs/README.md -VERSION: 04.06.00 BRIEF: Code quality and security tool configuration templates --> diff --git a/templates/configs/mokostandards.xml.template b/templates/configs/mokostandards.xml.template index b95e787..4b48379 100644 --- a/templates/configs/mokostandards.xml.template +++ b/templates/configs/mokostandards.xml.template @@ -7,7 +7,6 @@ INGROUP: MokoStandards.Templates REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API PATH: /templates/configs/mokostandards.xml.template - VERSION: 04.07.00 BRIEF: XML manifest template — synced to .gitea/.mokostandards in every governed repository NOTE: This template is a reference only. The bulk sync generates XML via MokoStandardsParser::generate(). diff --git a/templates/configs/mokostandards.yml.template b/templates/configs/mokostandards.yml.template index 09eaee9..bba82ed 100644 --- a/templates/configs/mokostandards.yml.template +++ b/templates/configs/mokostandards.yml.template @@ -5,7 +5,6 @@ # INGROUP: MokoStandards.Templates # REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards # PATH: /templates/configs/moko-standards.yml.template -# VERSION: 04.06.00 # BRIEF: Governance attachment template — synced to .mokostandards in every governed repository # NOTE: Tokens replaced at sync time: {{org}}, {{repo_name}}, {{platform}}, {{standards_version}} # diff --git a/templates/docs/dolibarr/update-server.md b/templates/docs/dolibarr/update-server.md index a110f34..39d1b26 100644 --- a/templates/docs/dolibarr/update-server.md +++ b/templates/docs/dolibarr/update-server.md @@ -10,7 +10,6 @@ DEFGROUP: MokoStandards.Documentation INGROUP: MokoStandards.Templates REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards PATH: /templates/docs/dolibarr/update-server.md -VERSION: 04.06.00 BRIEF: Developer guide for wiring up Dolibarr module update checks — synced to docs/ in all CRM repos --> diff --git a/templates/docs/extra/template-CODE_OF_CONDUCT.md b/templates/docs/extra/template-CODE_OF_CONDUCT.md index aa42da9..ad38856 100644 --- a/templates/docs/extra/template-CODE_OF_CONDUCT.md +++ b/templates/docs/extra/template-CODE_OF_CONDUCT.md @@ -14,7 +14,6 @@ DEFGROUP: INGROUP: Project.Documentation REPO: - VERSION: 04.06.00 PATH: ./CODE_OF_CONDUCT.md BRIEF: Reference + packaging repo for Moko Consulting Developer GPT Other Default --> diff --git a/templates/docs/required/template-CHANGELOG.md b/templates/docs/required/template-CHANGELOG.md index 80a7af3..190fcd4 100644 --- a/templates/docs/required/template-CHANGELOG.md +++ b/templates/docs/required/template-CHANGELOG.md @@ -13,7 +13,6 @@ DEFGROUP: INGROUP: Documentation REPO: - VERSION: 04.06.00 PATH: ./CHANGELOG.md BRIEF: Version history using Keep a Changelog --> diff --git a/templates/docs/required/template-INSTALLATION.md b/templates/docs/required/template-INSTALLATION.md index f83ed81..6e680ae 100644 --- a/templates/docs/required/template-INSTALLATION.md +++ b/templates/docs/required/template-INSTALLATION.md @@ -7,7 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later # FILE INFORMATION PATH: /docs/INSTALLATION.md -VERSION: 04.06.00 BRIEF: Installation and setup instructions for [PROJECT_NAME] --> diff --git a/templates/docs/required/template-LICENSE.md b/templates/docs/required/template-LICENSE.md index 313e5f6..eee9479 100644 --- a/templates/docs/required/template-LICENSE.md +++ b/templates/docs/required/template-LICENSE.md @@ -14,7 +14,6 @@ DEFGROUP: INGROUP: Project.Documentation REPO: - VERSION: 04.06.00 PATH: ./LICENSE.md BRIEF: Project license (GPL-3.0-or-later) --> diff --git a/templates/docs/required/template-README.md b/templates/docs/required/template-README.md index 18d11a5..76d3c72 100644 --- a/templates/docs/required/template-README.md +++ b/templates/docs/required/template-README.md @@ -15,7 +15,6 @@ You should have received a copy of the GNU General Public License (./LICENSE). DEFGROUP: {{DEFGROUP}} INGROUP: {{INGROUP}} REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/{{REPO_NAME}} -VERSION: 04.06.00 PATH: /README.md BRIEF: {{REPO_DESCRIPTION}} --> @@ -23,7 +22,6 @@ BRIEF: {{REPO_DESCRIPTION}} # {{REPO_NAME}} [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[VERSION: 04.06.00] [![MokoStandards](https://img.shields.io/badge/MokoStandards-{{standards_version}}-orange)](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards) > {{REPO_DESCRIPTION}} diff --git a/templates/docs/required/template-SECURITY.md b/templates/docs/required/template-SECURITY.md index 9c8d67a..6e82f30 100644 --- a/templates/docs/required/template-SECURITY.md +++ b/templates/docs/required/template-SECURITY.md @@ -23,7 +23,6 @@ DEFGROUP: [PROJECT_NAME] INGROUP: [PROJECT_NAME].Documentation REPO: [REPOSITORY_URL] PATH: /SECURITY.md -VERSION: 04.06.00 BRIEF: Security vulnerability reporting and handling policy --> diff --git a/templates/gitea/README.md b/templates/gitea/README.md index 8e77342..d596abe 100644 --- a/templates/gitea/README.md +++ b/templates/gitea/README.md @@ -23,7 +23,6 @@ DEFGROUP: MokoStandards.Templates INGROUP: MokoStandards.GitHub REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards PATH: /templates/github/README.md -VERSION: 04.06.00 BRIEF: GitHub-specific templates including issues, PRs, and CODEOWNERS --> diff --git a/templates/index.md b/templates/index.md index 9224458..2c86d6c 100644 --- a/templates/index.md +++ b/templates/index.md @@ -23,7 +23,6 @@ DEFGROUP: MokoStandards.Templates INGROUP: MokoStandards REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards PATH: /templates/index.md -VERSION: 04.06.00 BRIEF: Comprehensive catalog of all templates in MokoStandards --> diff --git a/templates/schemas/mokostandards-schema.xsd b/templates/schemas/mokostandards-schema.xsd index a039ea0..6023d44 100644 --- a/templates/schemas/mokostandards-schema.xsd +++ b/templates/schemas/mokostandards-schema.xsd @@ -7,7 +7,6 @@ INGROUP: MokoStandards.Governance REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API PATH: /docs/standards/mokostandards-schema.xsd - VERSION: 04.07.00 BRIEF: XML Schema Definition for the .mokostandards repository manifest file --> diff --git a/templates/scripts/validate/dolibarr_module.php b/templates/scripts/validate/dolibarr_module.php index dfe2368..b10a0e7 100644 --- a/templates/scripts/validate/dolibarr_module.php +++ b/templates/scripts/validate/dolibarr_module.php @@ -12,7 +12,6 @@ * INGROUP: MokoStandards.Templates * REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards * PATH: /templates/scripts/validate/dolibarr_module.php - * VERSION: 04.06.00 * BRIEF: Validate a Dolibarr module repository against MokoStandards requirements * NOTE: Deployed to bin/validate_module.php in governed Dolibarr module repos. * Run: php bin/validate_module.php [--path DIR] [--verbose] [--json] diff --git a/templates/scripts/validate/validate_manifest.php b/templates/scripts/validate/validate_manifest.php index ab49cd1..31895a7 100644 --- a/templates/scripts/validate/validate_manifest.php +++ b/templates/scripts/validate/validate_manifest.php @@ -12,7 +12,6 @@ * INGROUP: MokoStandards.Templates * REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards * PATH: /templates/scripts/validate/validate_manifest.php - * VERSION: 04.06.00 * BRIEF: Validate a Joomla component XML manifest against MokoStandards requirements * NOTE: Deployed to bin/validate_manifest.php in governed WaaS component repos. * Run: php bin/validate_manifest.php [--path DIR] [--verbose] diff --git a/templates/scripts/validate/validate_structure.php b/templates/scripts/validate/validate_structure.php index 975f45b..01afb51 100644 --- a/templates/scripts/validate/validate_structure.php +++ b/templates/scripts/validate/validate_structure.php @@ -12,7 +12,6 @@ * INGROUP: MokoStandards.Templates * REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards * PATH: /templates/scripts/validate/validate_structure.php - * VERSION: 04.06.00 * BRIEF: Validate a repository structure against MokoStandards requirements * NOTE: Deployed to bin/validate_structure.php in governed generic/default repos. * Run: php bin/validate_structure.php [--path DIR] [--verbose] diff --git a/templates/stubs/dolibarr.php b/templates/stubs/dolibarr.php index 63dbf3e..c773edd 100644 --- a/templates/stubs/dolibarr.php +++ b/templates/stubs/dolibarr.php @@ -9,7 +9,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards * PATH: /templates/stubs/dolibarr.php - * VERSION: 04.06.00 * BRIEF: PHPStan stub declarations for Dolibarr core classes * * These are declaration-only stubs (no implementations) that let PHPStan resolve diff --git a/templates/stubs/joomla.php b/templates/stubs/joomla.php index 0848eee..d4e4115 100644 --- a/templates/stubs/joomla.php +++ b/templates/stubs/joomla.php @@ -9,7 +9,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards * PATH: /templates/stubs/joomla.php - * VERSION: 04.06.00 * BRIEF: PHPStan stub declarations for Joomla framework classes * * Declaration-only stubs so PHPStan can resolve Joomla types in extension source diff --git a/templates/web/assets/css/app.css b/templates/web/assets/css/app.css index a018278..22d3f31 100644 --- a/templates/web/assets/css/app.css +++ b/templates/web/assets/css/app.css @@ -3,7 +3,6 @@ * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * Version: 04.00.00 * * Based on Material Design 3 (Material You) * https://m3.material.io/ diff --git a/templates/workflows/gitleaks.yml.template b/templates/workflows/gitleaks.yml.template index b29f881..113581a 100644 --- a/templates/workflows/gitleaks.yml.template +++ b/templates/workflows/gitleaks.yml.template @@ -7,7 +7,6 @@ # INGROUP: MokoStandards.Security # REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API # PATH: /templates/workflows/gitleaks.yml.template -# VERSION: 01.00.00 # BRIEF: Secret scanning — detect leaked credentials, API keys, and tokens # # +========================================================================+ diff --git a/tests/Enterprise/GitPlatformAdapterTest.php b/tests/Enterprise/GitPlatformAdapterTest.php index 60595e6..12060da 100644 --- a/tests/Enterprise/GitPlatformAdapterTest.php +++ b/tests/Enterprise/GitPlatformAdapterTest.php @@ -8,7 +8,6 @@ * INGROUP: MokoStandards.Tests * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /tests/Enterprise/GitPlatformAdapterTest.php - * VERSION: 04.06.10 * BRIEF: Tests verifying both adapters implement GitPlatformAdapter correctly */ diff --git a/validate/auto_detect_platform.php b/validate/auto_detect_platform.php index bf1fa19..024e7d1 100755 --- a/validate/auto_detect_platform.php +++ b/validate/auto_detect_platform.php @@ -12,7 +12,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/auto_detect_platform.php - * VERSION: 04.06.00 * BRIEF: Automatic platform detection and validation - PHP implementation */ diff --git a/validate/check_changelog.php b/validate/check_changelog.php index d7c3d79..b1b394f 100644 --- a/validate/check_changelog.php +++ b/validate/check_changelog.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/check_changelog.php - * VERSION: 04.06.00 * BRIEF: Validates CHANGELOG.md structure and format */ diff --git a/validate/check_composer_deps.php b/validate/check_composer_deps.php index 16d3058..cb40b3d 100644 --- a/validate/check_composer_deps.php +++ b/validate/check_composer_deps.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/check_composer_deps.php - * VERSION: 04.06.00 * BRIEF: Validate composer.json enterprise dependency across all governed repos * * USAGE diff --git a/validate/check_dolibarr_module.php b/validate/check_dolibarr_module.php index 4db18b9..8b55846 100644 --- a/validate/check_dolibarr_module.php +++ b/validate/check_dolibarr_module.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/check_dolibarr_module.php - * VERSION: 04.06.00 * BRIEF: Validates Dolibarr module directory structure */ diff --git a/validate/check_enterprise_readiness.php b/validate/check_enterprise_readiness.php index 37e85db..0ea65b1 100755 --- a/validate/check_enterprise_readiness.php +++ b/validate/check_enterprise_readiness.php @@ -12,7 +12,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/check_enterprise_readiness.php - * VERSION: 04.06.00 * BRIEF: Enterprise readiness checker - PHP implementation */ diff --git a/validate/check_joomla_manifest.php b/validate/check_joomla_manifest.php index 2704e4a..c9f0f00 100644 --- a/validate/check_joomla_manifest.php +++ b/validate/check_joomla_manifest.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/check_joomla_manifest.php - * VERSION: 04.06.00 * BRIEF: Validates Joomla XML manifest structure and required elements */ diff --git a/validate/check_language_structure.php b/validate/check_language_structure.php index 4350ba0..4fef11b 100644 --- a/validate/check_language_structure.php +++ b/validate/check_language_structure.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/check_language_structure.php - * VERSION: 04.06.00 * BRIEF: Validates language INI file structure (KEY=value format) */ diff --git a/validate/check_license_headers.php b/validate/check_license_headers.php index b111e9f..50a6887 100644 --- a/validate/check_license_headers.php +++ b/validate/check_license_headers.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/check_license_headers.php - * VERSION: 04.06.00 * BRIEF: Validates SPDX license headers in source files (advisory) */ diff --git a/validate/check_no_secrets.php b/validate/check_no_secrets.php index 7a2743f..5dd2759 100644 --- a/validate/check_no_secrets.php +++ b/validate/check_no_secrets.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/check_no_secrets.php - * VERSION: 04.06.00 * BRIEF: Checks for potential secrets in committed files (advisory) */ diff --git a/validate/check_paths.php b/validate/check_paths.php index 06b5dcc..0ce12fa 100644 --- a/validate/check_paths.php +++ b/validate/check_paths.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/check_paths.php - * VERSION: 04.06.00 * BRIEF: Validates that path separators use forward slashes (advisory) */ diff --git a/validate/check_php_syntax.php b/validate/check_php_syntax.php index 724d29a..60d50f0 100644 --- a/validate/check_php_syntax.php +++ b/validate/check_php_syntax.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/check_php_syntax.php - * VERSION: 04.06.00 * BRIEF: Validates PHP syntax for all tracked PHP files using php -l */ diff --git a/validate/check_repo_health.php b/validate/check_repo_health.php index 6fde3f4..cd0110c 100755 --- a/validate/check_repo_health.php +++ b/validate/check_repo_health.php @@ -9,7 +9,6 @@ * INGROUP: moko-platform * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_repo_health.php - * VERSION: 05.00.00 * BRIEF: Repository health checker — validates against current Moko standards (wiki-first, no docs/) * * Categories: diff --git a/validate/check_structure.php b/validate/check_structure.php index 6f6f041..c544884 100644 --- a/validate/check_structure.php +++ b/validate/check_structure.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/check_structure.php - * VERSION: 04.06.00 * BRIEF: Validates required repository directory and file structure */ diff --git a/validate/check_tabs.php b/validate/check_tabs.php index 6992169..c628eac 100644 --- a/validate/check_tabs.php +++ b/validate/check_tabs.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/check_tabs.php - * VERSION: 04.06.00 * BRIEF: Validates that no literal tab characters exist in source files */ diff --git a/validate/check_version_consistency.php b/validate/check_version_consistency.php index ec84389..fffc657 100755 --- a/validate/check_version_consistency.php +++ b/validate/check_version_consistency.php @@ -12,7 +12,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/check_version_consistency.php - * VERSION: 04.06.00 * BRIEF: Validates that version numbers are consistent across all critical repository files */ diff --git a/validate/check_wiki_health.php b/validate/check_wiki_health.php index 8a0d89b..fea8858 100644 --- a/validate/check_wiki_health.php +++ b/validate/check_wiki_health.php @@ -8,7 +8,6 @@ * DEFGROUP: MokoStandards.Validate * INGROUP: MokoStandards * PATH: /validate/check_wiki_health.php - * VERSION: 01.00.00 * BRIEF: Validate wiki health — checks Home page exists, has MokoStandards link, pages are indexed */ diff --git a/validate/check_xml_wellformed.php b/validate/check_xml_wellformed.php index 72e2d32..61d2831 100644 --- a/validate/check_xml_wellformed.php +++ b/validate/check_xml_wellformed.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/check_xml_wellformed.php - * VERSION: 04.06.00 * BRIEF: Validates that all tracked XML files are well-formed */ diff --git a/validate/scan_drift.php b/validate/scan_drift.php index 201aa4b..14860b5 100755 --- a/validate/scan_drift.php +++ b/validate/scan_drift.php @@ -12,7 +12,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /validate/scan_drift.php - * VERSION: 04.06.00 * BRIEF: Standards drift detection - scans repositories for divergence from templates */ diff --git a/wrappers/auto_detect_platform.php b/wrappers/auto_detect_platform.php index b16dbfd..d7ca181 100644 --- a/wrappers/auto_detect_platform.php +++ b/wrappers/auto_detect_platform.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/auto_detect_platform.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/auto_detect_platform.php */ diff --git a/wrappers/bulk_sync.php b/wrappers/bulk_sync.php index e62d9e6..7db3c53 100644 --- a/wrappers/bulk_sync.php +++ b/wrappers/bulk_sync.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/bulk_sync.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for automation/bulk_sync.php */ diff --git a/wrappers/check_changelog.php b/wrappers/check_changelog.php index efd221a..f6adf25 100644 --- a/wrappers/check_changelog.php +++ b/wrappers/check_changelog.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/check_changelog.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/check_changelog.php */ diff --git a/wrappers/check_dolibarr_module.php b/wrappers/check_dolibarr_module.php index 9431f3d..d31a5b8 100644 --- a/wrappers/check_dolibarr_module.php +++ b/wrappers/check_dolibarr_module.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/check_dolibarr_module.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/check_dolibarr_module.php */ diff --git a/wrappers/check_enterprise_readiness.php b/wrappers/check_enterprise_readiness.php index b206383..fcac0f7 100644 --- a/wrappers/check_enterprise_readiness.php +++ b/wrappers/check_enterprise_readiness.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/check_enterprise_readiness.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/check_enterprise_readiness.php */ diff --git a/wrappers/check_joomla_manifest.php b/wrappers/check_joomla_manifest.php index bc9e601..4b9e4fd 100644 --- a/wrappers/check_joomla_manifest.php +++ b/wrappers/check_joomla_manifest.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/check_joomla_manifest.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/check_joomla_manifest.php */ diff --git a/wrappers/check_language_structure.php b/wrappers/check_language_structure.php index dfdf329..2fa8871 100644 --- a/wrappers/check_language_structure.php +++ b/wrappers/check_language_structure.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/check_language_structure.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/check_language_structure.php */ diff --git a/wrappers/check_license_headers.php b/wrappers/check_license_headers.php index 54fd842..2ed5933 100644 --- a/wrappers/check_license_headers.php +++ b/wrappers/check_license_headers.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/check_license_headers.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/check_license_headers.php */ diff --git a/wrappers/check_no_secrets.php b/wrappers/check_no_secrets.php index edac90d..b11a5f3 100644 --- a/wrappers/check_no_secrets.php +++ b/wrappers/check_no_secrets.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/check_no_secrets.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/check_no_secrets.php */ diff --git a/wrappers/check_paths.php b/wrappers/check_paths.php index 7bad72e..f684a2c 100644 --- a/wrappers/check_paths.php +++ b/wrappers/check_paths.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/check_paths.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/check_paths.php */ diff --git a/wrappers/check_php_syntax.php b/wrappers/check_php_syntax.php index 3025501..717046a 100644 --- a/wrappers/check_php_syntax.php +++ b/wrappers/check_php_syntax.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/check_php_syntax.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/check_php_syntax.php */ diff --git a/wrappers/check_repo_health.php b/wrappers/check_repo_health.php index 82a47d5..6c940fe 100644 --- a/wrappers/check_repo_health.php +++ b/wrappers/check_repo_health.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/check_repo_health.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/check_repo_health.php */ diff --git a/wrappers/check_structure.php b/wrappers/check_structure.php index 40552e6..88361cb 100644 --- a/wrappers/check_structure.php +++ b/wrappers/check_structure.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/check_structure.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/check_structure.php */ diff --git a/wrappers/check_tabs.php b/wrappers/check_tabs.php index 95a62ab..b51a77f 100644 --- a/wrappers/check_tabs.php +++ b/wrappers/check_tabs.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/check_tabs.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/check_tabs.php */ diff --git a/wrappers/check_version_consistency.php b/wrappers/check_version_consistency.php index f67f067..3fdcc92 100644 --- a/wrappers/check_version_consistency.php +++ b/wrappers/check_version_consistency.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/check_version_consistency.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/check_version_consistency.php */ diff --git a/wrappers/check_xml_wellformed.php b/wrappers/check_xml_wellformed.php index 53306b0..f3391e1 100644 --- a/wrappers/check_xml_wellformed.php +++ b/wrappers/check_xml_wellformed.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/check_xml_wellformed.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/check_xml_wellformed.php */ diff --git a/wrappers/deploy_sftp.php b/wrappers/deploy_sftp.php index b947bda..0a66db1 100644 --- a/wrappers/deploy_sftp.php +++ b/wrappers/deploy_sftp.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/deploy_sftp.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for deploy/deploy-sftp.php */ diff --git a/wrappers/fix_line_endings.php b/wrappers/fix_line_endings.php index 5eac189..0cece56 100644 --- a/wrappers/fix_line_endings.php +++ b/wrappers/fix_line_endings.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/fix_line_endings.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for fix/fix_line_endings.php */ diff --git a/wrappers/fix_permissions.php b/wrappers/fix_permissions.php index dc77868..2036695 100644 --- a/wrappers/fix_permissions.php +++ b/wrappers/fix_permissions.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/fix_permissions.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for fix/fix_permissions.php */ diff --git a/wrappers/fix_tabs.php b/wrappers/fix_tabs.php index 0864532..6091385 100644 --- a/wrappers/fix_tabs.php +++ b/wrappers/fix_tabs.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/fix_tabs.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for fix/fix_tabs.php */ diff --git a/wrappers/fix_trailing_spaces.php b/wrappers/fix_trailing_spaces.php index aba8cb3..4963cbf 100644 --- a/wrappers/fix_trailing_spaces.php +++ b/wrappers/fix_trailing_spaces.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/fix_trailing_spaces.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for fix/fix_trailing_spaces.php */ diff --git a/wrappers/gen_wrappers.php b/wrappers/gen_wrappers.php index 48a8645..9155e2b 100644 --- a/wrappers/gen_wrappers.php +++ b/wrappers/gen_wrappers.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/gen_wrappers.php - * VERSION: 04.06.00 * BRIEF: Generate PHP CLI wrapper scripts for every PHP script in the repo */ @@ -87,7 +86,6 @@ function renderWrapper(string $name, string $scriptPath, string $category): stri * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/{$name}.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for {$scriptPath} */ diff --git a/wrappers/index.md b/wrappers/index.md index a861546..d6eefa9 100644 --- a/wrappers/index.md +++ b/wrappers/index.md @@ -10,7 +10,6 @@ DEFGROUP: MokoStandards.Wrappers INGROUP: MokoStandards REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API PATH: /wrappers/index.md -VERSION: 04.06.00 BRIEF: PHP wrapper scripts — one per CLI script in api/; add logging and repo-root detection --> diff --git a/wrappers/pin_action_shas.php b/wrappers/pin_action_shas.php index 59e85a7..63e988a 100644 --- a/wrappers/pin_action_shas.php +++ b/wrappers/pin_action_shas.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/pin_action_shas.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for maintenance/pin_action_shas.php */ diff --git a/wrappers/plugin_health_check.php b/wrappers/plugin_health_check.php index c5f9b40..0585fd1 100644 --- a/wrappers/plugin_health_check.php +++ b/wrappers/plugin_health_check.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/plugin_health_check.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for plugin_health_check.php */ diff --git a/wrappers/plugin_list.php b/wrappers/plugin_list.php index cc33ed7..1a52006 100644 --- a/wrappers/plugin_list.php +++ b/wrappers/plugin_list.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/plugin_list.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for plugin_list.php */ diff --git a/wrappers/plugin_metrics.php b/wrappers/plugin_metrics.php index ddade56..046a09b 100644 --- a/wrappers/plugin_metrics.php +++ b/wrappers/plugin_metrics.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/plugin_metrics.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for plugin_metrics.php */ diff --git a/wrappers/plugin_readiness.php b/wrappers/plugin_readiness.php index a1e8860..0032c1b 100644 --- a/wrappers/plugin_readiness.php +++ b/wrappers/plugin_readiness.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/plugin_readiness.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for plugin_readiness.php */ diff --git a/wrappers/plugin_validate.php b/wrappers/plugin_validate.php index 4c2ed6d..b0316e0 100644 --- a/wrappers/plugin_validate.php +++ b/wrappers/plugin_validate.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/plugin_validate.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for plugin_validate.php */ diff --git a/wrappers/scan_drift.php b/wrappers/scan_drift.php index 8659a02..a5360d2 100644 --- a/wrappers/scan_drift.php +++ b/wrappers/scan_drift.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/scan_drift.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for validate/scan_drift.php */ diff --git a/wrappers/setup_labels.php b/wrappers/setup_labels.php index 9a7c615..fbcd5a7 100644 --- a/wrappers/setup_labels.php +++ b/wrappers/setup_labels.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/setup_labels.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for maintenance/setup_labels.php */ diff --git a/wrappers/sync_dolibarr_readmes.php b/wrappers/sync_dolibarr_readmes.php index 6c14888..db80fd8 100644 --- a/wrappers/sync_dolibarr_readmes.php +++ b/wrappers/sync_dolibarr_readmes.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/sync_dolibarr_readmes.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for maintenance/sync_dolibarr_readmes.php */ diff --git a/wrappers/update_sha_hashes.php b/wrappers/update_sha_hashes.php index 09ccdfd..81308a7 100644 --- a/wrappers/update_sha_hashes.php +++ b/wrappers/update_sha_hashes.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/update_sha_hashes.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for maintenance/update_sha_hashes.php */ diff --git a/wrappers/update_version_from_readme.php b/wrappers/update_version_from_readme.php index 639c45a..af5f469 100644 --- a/wrappers/update_version_from_readme.php +++ b/wrappers/update_version_from_readme.php @@ -11,7 +11,6 @@ * INGROUP: MokoStandards * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API * PATH: /wrappers/update_version_from_readme.php - * VERSION: 04.06.00 * BRIEF: PHP wrapper for maintenance/update_version_from_readme.php */ -- 2.52.0 From 1d87be7d5eed99342da6094cfc0d46fd8bb4f786 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Mon, 11 May 2026 17:01:17 -0500 Subject: [PATCH 4/6] =?UTF-8?q?fix:=20standardize=20file=20headers=20?= =?UTF-8?q?=E2=80=94=20REPO=20rename,=20SPDX=20case,=20missing=20fields?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update REPO: from MokoStandards-API to moko-platform in 125 files - Fix wrong org path (mokoconsulting-tech → MokoConsulting) in 10 files - Fix SPDX-LICENSE-IDENTIFIER case in 2 template files - Add missing REPO: field to 3 files Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/branch-protection.yml | 2 +- .gitea/workflows/bulk-repo-sync.yml | 2 +- .gitea/workflows/renovate.yml | 2 +- .gitea/workflows/sync-wikis.yml | 1 + automation/bulk_joomla_template.php | 1 + automation/bulk_sync.php | 2 +- automation/migrate_to_gitea.php | 2 +- automation/push_files.php | 2 +- automation/repo_cleanup.php | 2 +- bin/moko | 2 +- cli/archive_repo.php | 2 +- cli/create_project.php | 2 +- cli/create_repo.php | 2 +- cli/joomla_release.php | 2 +- cli/platform_detect.php | 2 +- cli/release.php | 2 +- cli/release_notes.php | 2 +- cli/sync_rulesets.php | 2 +- cli/version_bump.php | 2 +- cli/version_read.php | 2 +- cli/version_set_platform.php | 2 +- deploy/deploy-joomla.php | 2 +- deploy/deploy-sftp.php | 2 +- fix/fix_line_endings.php | 2 +- fix/fix_permissions.php | 2 +- fix/fix_tabs.php | 2 +- fix/fix_trailing_spaces.php | 2 +- lib/CliBase.php | 2 +- lib/Common.php | 2 +- lib/Enterprise/CliFramework.php | 2 +- lib/Enterprise/DefinitionParser.php | 2 +- lib/Enterprise/EnterpriseReadinessValidator.php | 2 +- lib/Enterprise/FileFixUtility.php | 2 +- lib/Enterprise/GitHubAdapter.php | 2 +- lib/Enterprise/GitPlatformAdapter.php | 2 +- lib/Enterprise/GiteaAdapter.php | 2 +- lib/Enterprise/MokoStandardsParser.php | 2 +- lib/Enterprise/PackageBuilder.php | 2 +- lib/Enterprise/PlatformAdapterFactory.php | 2 +- lib/Enterprise/Plugins/ApiPlugin.php | 2 +- lib/Enterprise/Plugins/DocumentationPlugin.php | 2 +- lib/Enterprise/Plugins/DolibarrPlugin.php | 2 +- lib/Enterprise/Plugins/GenericPlugin.php | 2 +- lib/Enterprise/Plugins/JoomlaPlugin.php | 2 +- lib/Enterprise/Plugins/McpServerPlugin.php | 2 +- lib/Enterprise/Plugins/MobilePlugin.php | 2 +- lib/Enterprise/Plugins/NodeJsPlugin.php | 2 +- lib/Enterprise/Plugins/PythonPlugin.php | 2 +- lib/Enterprise/Plugins/TerraformPlugin.php | 2 +- lib/Enterprise/Plugins/WordPressPlugin.php | 2 +- lib/Enterprise/ProjectConfigValidator.php | 2 +- lib/Enterprise/ProjectMetricsCollector.php | 2 +- lib/Enterprise/ProjectTypeDetector.php | 2 +- lib/Enterprise/RepositoryHealthChecker.php | 2 +- lib/Enterprise/RepositorySynchronizer.php | 2 +- lib/Enterprise/SynchronizationException.php | 2 +- lib/plugins/Joomla/UpdateXmlGenerator.php | 2 +- maintenance/pin_action_shas.php | 2 +- maintenance/repo_inventory.php | 2 +- maintenance/rotate_secrets.php | 2 +- maintenance/setup_labels.php | 2 +- maintenance/sync_dolibarr_readmes.php | 2 +- maintenance/update_repo_inventory.php | 2 +- maintenance/update_sha_hashes.php | 2 +- maintenance/update_version_from_readme.php | 2 +- mcp/src/config.ts | 2 +- mcp/src/index.ts | 2 +- mcp/src/runner.ts | 2 +- mcp/src/types.ts | 2 +- plugin_health_check.php | 2 +- plugin_list.php | 2 +- plugin_metrics.php | 2 +- plugin_readiness.php | 2 +- plugin_validate.php | 2 +- release/generate_dolibarr_version_txt.php | 2 +- release/generate_joomla_update_xml.php | 2 +- templates/docs/extra/template-CODE_OF_CONDUCT.md | 2 +- templates/docs/required/template-LICENSE.md | 2 +- templates/gitea/ISSUE_TEMPLATE/config.yml | 2 +- templates/schemas/mokostandards-schema.xsd | 2 +- templates/scripts/common/CliBase.template.php | 2 +- templates/scripts/release/package_dolibarr.php | 2 +- templates/scripts/release/package_joomla.php | 2 +- templates/scripts/validate/dolibarr_module.php | 2 +- templates/scripts/validate/validate_manifest.php | 2 +- templates/scripts/validate/validate_structure.php | 2 +- templates/stubs/dolibarr.php | 2 +- templates/stubs/joomla.php | 2 +- templates/web/index.php | 2 +- tests/Enterprise/GitPlatformAdapterTest.php | 2 +- validate/auto_detect_platform.php | 2 +- validate/check_changelog.php | 2 +- validate/check_composer_deps.php | 2 +- validate/check_dolibarr_module.php | 2 +- validate/check_enterprise_readiness.php | 2 +- validate/check_joomla_manifest.php | 2 +- validate/check_language_structure.php | 2 +- validate/check_license_headers.php | 2 +- validate/check_no_secrets.php | 2 +- validate/check_paths.php | 2 +- validate/check_php_syntax.php | 2 +- validate/check_structure.php | 2 +- validate/check_tabs.php | 2 +- validate/check_version_consistency.php | 2 +- validate/check_wiki_health.php | 1 + validate/check_xml_wellformed.php | 2 +- validate/scan_drift.php | 2 +- wrappers/auto_detect_platform.php | 2 +- wrappers/bulk_sync.php | 2 +- wrappers/check_changelog.php | 2 +- wrappers/check_dolibarr_module.php | 2 +- wrappers/check_enterprise_readiness.php | 2 +- wrappers/check_joomla_manifest.php | 2 +- wrappers/check_language_structure.php | 2 +- wrappers/check_license_headers.php | 2 +- wrappers/check_no_secrets.php | 2 +- wrappers/check_paths.php | 2 +- wrappers/check_php_syntax.php | 2 +- wrappers/check_repo_health.php | 2 +- wrappers/check_structure.php | 2 +- wrappers/check_tabs.php | 2 +- wrappers/check_version_consistency.php | 2 +- wrappers/check_xml_wellformed.php | 2 +- wrappers/deploy_sftp.php | 2 +- wrappers/fix_line_endings.php | 2 +- wrappers/fix_permissions.php | 2 +- wrappers/fix_tabs.php | 2 +- wrappers/fix_trailing_spaces.php | 2 +- wrappers/gen_wrappers.php | 4 ++-- wrappers/index.md | 2 +- wrappers/pin_action_shas.php | 2 +- wrappers/plugin_health_check.php | 2 +- wrappers/plugin_list.php | 2 +- wrappers/plugin_metrics.php | 2 +- wrappers/plugin_readiness.php | 2 +- wrappers/plugin_validate.php | 2 +- wrappers/scan_drift.php | 2 +- wrappers/setup_labels.php | 2 +- wrappers/sync_dolibarr_readmes.php | 2 +- wrappers/update_sha_hashes.php | 2 +- wrappers/update_version_from_readme.php | 2 +- 141 files changed, 142 insertions(+), 139 deletions(-) diff --git a/.gitea/workflows/branch-protection.yml b/.gitea/workflows/branch-protection.yml index 23c1bef..35afa23 100644 --- a/.gitea/workflows/branch-protection.yml +++ b/.gitea/workflows/branch-protection.yml @@ -3,7 +3,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: MokoStandards-API.Automation -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API +# REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform # PATH: /.gitea/workflows/branch-protection.yml # BRIEF: Apply standardised branch protection rules to all governed repositories # diff --git a/.gitea/workflows/bulk-repo-sync.yml b/.gitea/workflows/bulk-repo-sync.yml index 43b7495..c81f0ad 100644 --- a/.gitea/workflows/bulk-repo-sync.yml +++ b/.gitea/workflows/bulk-repo-sync.yml @@ -3,7 +3,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: MokoStandards-API.Automation -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API +# REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform # PATH: /.gitea/workflows/bulk-repo-sync.yml # BRIEF: Bulk repo sync — runs from API repo, syncs standards to all governed repos diff --git a/.gitea/workflows/renovate.yml b/.gitea/workflows/renovate.yml index 711c9f3..dad4bd2 100644 --- a/.gitea/workflows/renovate.yml +++ b/.gitea/workflows/renovate.yml @@ -5,7 +5,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: MokoStandards-API.Automation -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API +# REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform # PATH: /.gitea/workflows/renovate.yml # BRIEF: Run Renovate Bot across all governed repos for dependency updates # diff --git a/.gitea/workflows/sync-wikis.yml b/.gitea/workflows/sync-wikis.yml index d9630c2..6c88dbb 100644 --- a/.gitea/workflows/sync-wikis.yml +++ b/.gitea/workflows/sync-wikis.yml @@ -5,6 +5,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: MokoStandards.Maintenance +# REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform # PATH: /.gitea/workflows/sync-wikis.yml # BRIEF: Daily sync of all Gitea wikis to consolidated GitHub wiki repo diff --git a/automation/bulk_joomla_template.php b/automation/bulk_joomla_template.php index 890ce79..6f1bb87 100644 --- a/automation/bulk_joomla_template.php +++ b/automation/bulk_joomla_template.php @@ -10,6 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Automation * INGROUP: MokoStandards.Scripts + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /automation/bulk_joomla_template.php * BRIEF: Bulk scaffold and sync Joomla template repositories * diff --git a/automation/bulk_sync.php b/automation/bulk_sync.php index ce984fe..0dfbbc5 100755 --- a/automation/bulk_sync.php +++ b/automation/bulk_sync.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Automation * INGROUP: MokoStandards.Scripts - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /automation/bulk_sync.php * BRIEF: Enterprise-grade bulk repository synchronization */ diff --git a/automation/migrate_to_gitea.php b/automation/migrate_to_gitea.php index 15c0421..9939a3f 100644 --- a/automation/migrate_to_gitea.php +++ b/automation/migrate_to_gitea.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Automation * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /automation/migrate_to_gitea.php * BRIEF: Migrate repositories from GitHub to self-hosted Gitea instance * diff --git a/automation/push_files.php b/automation/push_files.php index 34c46ca..6cf6ed5 100644 --- a/automation/push_files.php +++ b/automation/push_files.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Automation * INGROUP: MokoStandards.Scripts - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /automation/push_files.php * BRIEF: Push one or more specific files to one or more remote repositories */ diff --git a/automation/repo_cleanup.php b/automation/repo_cleanup.php index e80e6ee..e93f8ba 100644 --- a/automation/repo_cleanup.php +++ b/automation/repo_cleanup.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Automation * INGROUP: MokoStandards.Scripts - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /automation/repo_cleanup.php * BRIEF: Enterprise repository cleanup — branches, PRs, issues, workflows, labels, logs */ diff --git a/bin/moko b/bin/moko index c658eda..f0f600b 100644 --- a/bin/moko +++ b/bin/moko @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.CLI * INGROUP: MokoStandards - * REPO: https://github.com/mokoconsulting-tech/MokoStandards + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /bin/moko * BRIEF: Unified CLI dispatcher — run any MokoStandards script without needing GitHub Actions * diff --git a/cli/archive_repo.php b/cli/archive_repo.php index bfdc964..376f6e9 100644 --- a/cli/archive_repo.php +++ b/cli/archive_repo.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.CLI * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /cli/archive_repo.php * BRIEF: Gracefully retire a governed repository — archive, close issues/PRs, remove sync def * diff --git a/cli/create_project.php b/cli/create_project.php index c869f8f..bbe28db 100644 --- a/cli/create_project.php +++ b/cli/create_project.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.CLI * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /cli/create_project.php * BRIEF: Create baseline GitHub Projects for repositories with standard fields and views * diff --git a/cli/create_repo.php b/cli/create_repo.php index 4ed3b60..1e3314f 100644 --- a/cli/create_repo.php +++ b/cli/create_repo.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.CLI * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /cli/create_repo.php * BRIEF: Scaffold a new governed repository with full MokoStandards baseline * diff --git a/cli/joomla_release.php b/cli/joomla_release.php index 84222f0..721c221 100644 --- a/cli/joomla_release.php +++ b/cli/joomla_release.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.CLI * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /cli/joomla_release.php * BRIEF: Joomla release pipeline — build ZIP+tar.gz, upload to GitHub Release, update updates.xml * diff --git a/cli/platform_detect.php b/cli/platform_detect.php index 37c3b0c..c295acc 100644 --- a/cli/platform_detect.php +++ b/cli/platform_detect.php @@ -7,7 +7,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.CLI * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /cli/platform_detect.php * BRIEF: Detect platform from .mokostandards file — outputs platform string */ diff --git a/cli/release.php b/cli/release.php index 3fcb1e6..f92d5bc 100644 --- a/cli/release.php +++ b/cli/release.php @@ -7,7 +7,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.CLI * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /cli/release.php * BRIEF: Automate the MokoStandards version branch release flow * diff --git a/cli/release_notes.php b/cli/release_notes.php index de8e924..be91fe2 100644 --- a/cli/release_notes.php +++ b/cli/release_notes.php @@ -7,7 +7,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.CLI * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /cli/release_notes.php * BRIEF: Extract release notes from CHANGELOG.md for a given version */ diff --git a/cli/sync_rulesets.php b/cli/sync_rulesets.php index cce83c9..807be66 100644 --- a/cli/sync_rulesets.php +++ b/cli/sync_rulesets.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.CLI * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /cli/sync_rulesets.php * BRIEF: Apply branch protection rules to all repos via platform adapter * diff --git a/cli/version_bump.php b/cli/version_bump.php index ff5e4a2..d330ff7 100644 --- a/cli/version_bump.php +++ b/cli/version_bump.php @@ -7,7 +7,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.CLI * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /cli/version_bump.php * BRIEF: Auto-increment patch version in README.md — outputs old → new */ diff --git a/cli/version_read.php b/cli/version_read.php index d8bbc7d..13aa29f 100644 --- a/cli/version_read.php +++ b/cli/version_read.php @@ -7,7 +7,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.CLI * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /cli/version_read.php * BRIEF: Read VERSION from README.md — outputs just the version string */ diff --git a/cli/version_set_platform.php b/cli/version_set_platform.php index a55f32f..ea3c32a 100644 --- a/cli/version_set_platform.php +++ b/cli/version_set_platform.php @@ -7,7 +7,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.CLI * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /cli/version_set_platform.php * BRIEF: Set version in platform-specific files (Dolibarr $this->version, Joomla ) */ diff --git a/deploy/deploy-joomla.php b/deploy/deploy-joomla.php index cdde1f6..a1b9218 100644 --- a/deploy/deploy-joomla.php +++ b/deploy/deploy-joomla.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Deploy * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /deploy/deploy-joomla.php * BRIEF: Smart Joomla deploy — routes files to correct Joomla directories based on XML manifest * diff --git a/deploy/deploy-sftp.php b/deploy/deploy-sftp.php index 4d004de..a04279d 100644 --- a/deploy/deploy-sftp.php +++ b/deploy/deploy-sftp.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Deploy * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /deploy/deploy-sftp.php * BRIEF: Deploy a repository src/ directory to a remote web server via SFTP */ diff --git a/fix/fix_line_endings.php b/fix/fix_line_endings.php index aa11e4d..b48a667 100644 --- a/fix/fix_line_endings.php +++ b/fix/fix_line_endings.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Fix * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /fix/fix_line_endings.php * BRIEF: CLI script to fix line endings (CRLF → LF) in tracked files */ diff --git a/fix/fix_permissions.php b/fix/fix_permissions.php index afae010..7f88cf9 100644 --- a/fix/fix_permissions.php +++ b/fix/fix_permissions.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Fix * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /fix/fix_permissions.php * BRIEF: CLI script to fix file permissions (dirs 755, files 644, scripts 755) */ diff --git a/fix/fix_tabs.php b/fix/fix_tabs.php index 0243086..35508e3 100644 --- a/fix/fix_tabs.php +++ b/fix/fix_tabs.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Fix * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /fix/fix_tabs.php * BRIEF: CLI script to convert tabs to spaces in tracked source files */ diff --git a/fix/fix_trailing_spaces.php b/fix/fix_trailing_spaces.php index 52821fb..1e868b1 100644 --- a/fix/fix_trailing_spaces.php +++ b/fix/fix_trailing_spaces.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Fix * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /fix/fix_trailing_spaces.php * BRIEF: CLI script to remove trailing whitespace from tracked source files */ diff --git a/lib/CliBase.php b/lib/CliBase.php index b68a5bf..bd4e76a 100644 --- a/lib/CliBase.php +++ b/lib/CliBase.php @@ -8,7 +8,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Lib * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/CliBase.php * BRIEF: Standalone base CLI class for scripts that do not use CliFramework */ diff --git a/lib/Common.php b/lib/Common.php index 443730d..13a4149 100644 --- a/lib/Common.php +++ b/lib/Common.php @@ -8,7 +8,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Lib * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Common.php * BRIEF: Common utility functions for scripts * NOTE: Version format used throughout is zero-padded semver: XX.YY.ZZ (e.g. 04.00.04). diff --git a/lib/Enterprise/CliFramework.php b/lib/Enterprise/CliFramework.php index 6bed63c..ef83130 100644 --- a/lib/Enterprise/CliFramework.php +++ b/lib/Enterprise/CliFramework.php @@ -8,7 +8,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.CLI * INGROUP: MokoStandards.Enterprise - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/CliFramework.php * BRIEF: CLI base classes — CliFramework (current) and CLIApp (legacy) * NOTE: All new scripts must extend CliFramework, not CLIApp. diff --git a/lib/Enterprise/DefinitionParser.php b/lib/Enterprise/DefinitionParser.php index f316bf0..9fe29ab 100644 --- a/lib/Enterprise/DefinitionParser.php +++ b/lib/Enterprise/DefinitionParser.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/DefinitionParser.php * BRIEF: Parses Terraform HCL repository definition files into a flat sync-file list */ diff --git a/lib/Enterprise/EnterpriseReadinessValidator.php b/lib/Enterprise/EnterpriseReadinessValidator.php index 605b836..ab7a29e 100644 --- a/lib/Enterprise/EnterpriseReadinessValidator.php +++ b/lib/Enterprise/EnterpriseReadinessValidator.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/EnterpriseReadinessValidator.php * BRIEF: Enterprise readiness validation library */ diff --git a/lib/Enterprise/FileFixUtility.php b/lib/Enterprise/FileFixUtility.php index 4973d6a..3105ae1 100644 --- a/lib/Enterprise/FileFixUtility.php +++ b/lib/Enterprise/FileFixUtility.php @@ -8,7 +8,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise * INGROUP: MokoStandards.Lib - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/FileFixUtility.php * BRIEF: Utility class for fixing file formatting issues (line endings, permissions, tabs, trailing spaces) */ diff --git a/lib/Enterprise/GitHubAdapter.php b/lib/Enterprise/GitHubAdapter.php index dc59ff6..f45ebce 100644 --- a/lib/Enterprise/GitHubAdapter.php +++ b/lib/Enterprise/GitHubAdapter.php @@ -8,7 +8,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.Platform * INGROUP: MokoStandards.Enterprise - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/GitHubAdapter.php * BRIEF: GitHub implementation of GitPlatformAdapter */ diff --git a/lib/Enterprise/GitPlatformAdapter.php b/lib/Enterprise/GitPlatformAdapter.php index 6526456..ddb7f48 100644 --- a/lib/Enterprise/GitPlatformAdapter.php +++ b/lib/Enterprise/GitPlatformAdapter.php @@ -8,7 +8,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.Platform * INGROUP: MokoStandards.Enterprise - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/GitPlatformAdapter.php * BRIEF: Interface defining all git platform operations for GitHub/Gitea abstraction */ diff --git a/lib/Enterprise/GiteaAdapter.php b/lib/Enterprise/GiteaAdapter.php index 4afc732..a38cbcf 100644 --- a/lib/Enterprise/GiteaAdapter.php +++ b/lib/Enterprise/GiteaAdapter.php @@ -8,7 +8,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.Platform * INGROUP: MokoStandards.Enterprise - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/GiteaAdapter.php * BRIEF: Gitea implementation of GitPlatformAdapter */ diff --git a/lib/Enterprise/MokoStandardsParser.php b/lib/Enterprise/MokoStandardsParser.php index 0e7f45d..9d6374b 100644 --- a/lib/Enterprise/MokoStandardsParser.php +++ b/lib/Enterprise/MokoStandardsParser.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/MokoStandardsParser.php * BRIEF: Parser for the XML-based .mokostandards repository manifest */ diff --git a/lib/Enterprise/PackageBuilder.php b/lib/Enterprise/PackageBuilder.php index f867315..149b11d 100644 --- a/lib/Enterprise/PackageBuilder.php +++ b/lib/Enterprise/PackageBuilder.php @@ -8,7 +8,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise * INGROUP: MokoStandards.Lib - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/PackageBuilder.php * BRIEF: Builds release packages for generic, Dolibarr module, and Joomla component projects */ diff --git a/lib/Enterprise/PlatformAdapterFactory.php b/lib/Enterprise/PlatformAdapterFactory.php index a7d8182..9e1d423 100644 --- a/lib/Enterprise/PlatformAdapterFactory.php +++ b/lib/Enterprise/PlatformAdapterFactory.php @@ -8,7 +8,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.Platform * INGROUP: MokoStandards.Enterprise - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/PlatformAdapterFactory.php * BRIEF: Factory for creating platform-specific GitPlatformAdapter instances */ diff --git a/lib/Enterprise/Plugins/ApiPlugin.php b/lib/Enterprise/Plugins/ApiPlugin.php index c0c41cc..2c6baf0 100644 --- a/lib/Enterprise/Plugins/ApiPlugin.php +++ b/lib/Enterprise/Plugins/ApiPlugin.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.Plugins * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/Plugins/ApiPlugin.php * BRIEF: Enterprise plugin for API/Microservices projects */ diff --git a/lib/Enterprise/Plugins/DocumentationPlugin.php b/lib/Enterprise/Plugins/DocumentationPlugin.php index 9e559de..c98f8af 100644 --- a/lib/Enterprise/Plugins/DocumentationPlugin.php +++ b/lib/Enterprise/Plugins/DocumentationPlugin.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.Plugins * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/Plugins/DocumentationPlugin.php * BRIEF: Enterprise plugin for documentation projects */ diff --git a/lib/Enterprise/Plugins/DolibarrPlugin.php b/lib/Enterprise/Plugins/DolibarrPlugin.php index 8a82242..1bf3f0d 100644 --- a/lib/Enterprise/Plugins/DolibarrPlugin.php +++ b/lib/Enterprise/Plugins/DolibarrPlugin.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.Plugins * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/Plugins/DolibarrPlugin.php * BRIEF: Enterprise plugin for Dolibarr modules */ diff --git a/lib/Enterprise/Plugins/GenericPlugin.php b/lib/Enterprise/Plugins/GenericPlugin.php index ce6f531..27297b0 100644 --- a/lib/Enterprise/Plugins/GenericPlugin.php +++ b/lib/Enterprise/Plugins/GenericPlugin.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.Plugins * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/Plugins/GenericPlugin.php * BRIEF: Enterprise plugin for generic projects */ diff --git a/lib/Enterprise/Plugins/JoomlaPlugin.php b/lib/Enterprise/Plugins/JoomlaPlugin.php index a04f50e..ba842fb 100644 --- a/lib/Enterprise/Plugins/JoomlaPlugin.php +++ b/lib/Enterprise/Plugins/JoomlaPlugin.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.Plugins * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/Plugins/JoomlaPlugin.php * BRIEF: Enterprise plugin for Joomla projects */ diff --git a/lib/Enterprise/Plugins/McpServerPlugin.php b/lib/Enterprise/Plugins/McpServerPlugin.php index 09a3011..de0142e 100644 --- a/lib/Enterprise/Plugins/McpServerPlugin.php +++ b/lib/Enterprise/Plugins/McpServerPlugin.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.Plugins * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/Plugins/McpServerPlugin.php * BRIEF: Enterprise plugin for MCP (Model Context Protocol) server projects */ diff --git a/lib/Enterprise/Plugins/MobilePlugin.php b/lib/Enterprise/Plugins/MobilePlugin.php index 6d53514..87048dd 100644 --- a/lib/Enterprise/Plugins/MobilePlugin.php +++ b/lib/Enterprise/Plugins/MobilePlugin.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.Plugins * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/Plugins/MobilePlugin.php * BRIEF: Enterprise plugin for mobile app projects */ diff --git a/lib/Enterprise/Plugins/NodeJsPlugin.php b/lib/Enterprise/Plugins/NodeJsPlugin.php index f166ba9..2ee3488 100644 --- a/lib/Enterprise/Plugins/NodeJsPlugin.php +++ b/lib/Enterprise/Plugins/NodeJsPlugin.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.Plugins * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/Plugins/NodeJsPlugin.php * BRIEF: Enterprise plugin for Node.js/TypeScript projects */ diff --git a/lib/Enterprise/Plugins/PythonPlugin.php b/lib/Enterprise/Plugins/PythonPlugin.php index 04a4998..c8f6048 100644 --- a/lib/Enterprise/Plugins/PythonPlugin.php +++ b/lib/Enterprise/Plugins/PythonPlugin.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.Plugins * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/Plugins/PythonPlugin.php * BRIEF: Enterprise plugin for Python projects */ diff --git a/lib/Enterprise/Plugins/TerraformPlugin.php b/lib/Enterprise/Plugins/TerraformPlugin.php index 7b4b406..6054383 100644 --- a/lib/Enterprise/Plugins/TerraformPlugin.php +++ b/lib/Enterprise/Plugins/TerraformPlugin.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.Plugins * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/Plugins/TerraformPlugin.php * BRIEF: Enterprise plugin for Terraform projects */ diff --git a/lib/Enterprise/Plugins/WordPressPlugin.php b/lib/Enterprise/Plugins/WordPressPlugin.php index b241d85..0b54e0c 100644 --- a/lib/Enterprise/Plugins/WordPressPlugin.php +++ b/lib/Enterprise/Plugins/WordPressPlugin.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.Plugins * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/Plugins/WordPressPlugin.php * BRIEF: Enterprise plugin for WordPress projects */ diff --git a/lib/Enterprise/ProjectConfigValidator.php b/lib/Enterprise/ProjectConfigValidator.php index 0924dbd..93dbcef 100644 --- a/lib/Enterprise/ProjectConfigValidator.php +++ b/lib/Enterprise/ProjectConfigValidator.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.ProjectTypes * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/ProjectConfigValidator.php * BRIEF: Enterprise library for validating project configurations */ diff --git a/lib/Enterprise/ProjectMetricsCollector.php b/lib/Enterprise/ProjectMetricsCollector.php index 9131c88..fc9ed07 100644 --- a/lib/Enterprise/ProjectMetricsCollector.php +++ b/lib/Enterprise/ProjectMetricsCollector.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.ProjectTypes * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/ProjectMetricsCollector.php * BRIEF: Enterprise library for collecting project-specific metrics */ diff --git a/lib/Enterprise/ProjectTypeDetector.php b/lib/Enterprise/ProjectTypeDetector.php index a917686..73a88aa 100644 --- a/lib/Enterprise/ProjectTypeDetector.php +++ b/lib/Enterprise/ProjectTypeDetector.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise.ProjectTypes * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/ProjectTypeDetector.php * BRIEF: Enterprise library for detecting project types */ diff --git a/lib/Enterprise/RepositoryHealthChecker.php b/lib/Enterprise/RepositoryHealthChecker.php index 85b3af3..a82771c 100644 --- a/lib/Enterprise/RepositoryHealthChecker.php +++ b/lib/Enterprise/RepositoryHealthChecker.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/RepositoryHealthChecker.php * BRIEF: Repository health checking enterprise library */ diff --git a/lib/Enterprise/RepositorySynchronizer.php b/lib/Enterprise/RepositorySynchronizer.php index 5ef8eb4..747fbb8 100644 --- a/lib/Enterprise/RepositorySynchronizer.php +++ b/lib/Enterprise/RepositorySynchronizer.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/RepositorySynchronizer.php * BRIEF: Repository synchronization enterprise library */ diff --git a/lib/Enterprise/SynchronizationException.php b/lib/Enterprise/SynchronizationException.php index 0b021b4..c07fc7e 100644 --- a/lib/Enterprise/SynchronizationException.php +++ b/lib/Enterprise/SynchronizationException.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Enterprise * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/Enterprise/SynchronizationException.php * BRIEF: Custom exception for repository synchronization errors */ diff --git a/lib/plugins/Joomla/UpdateXmlGenerator.php b/lib/plugins/Joomla/UpdateXmlGenerator.php index 189fccf..7d9fbd0 100644 --- a/lib/plugins/Joomla/UpdateXmlGenerator.php +++ b/lib/plugins/Joomla/UpdateXmlGenerator.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Joomla * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /lib/plugins/Joomla/UpdateXmlGenerator.php * BRIEF: Generates and updates Joomla extension updates.xml files */ diff --git a/maintenance/pin_action_shas.php b/maintenance/pin_action_shas.php index 4c70f83..d0fdd52 100644 --- a/maintenance/pin_action_shas.php +++ b/maintenance/pin_action_shas.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Maintenance * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /maintenance/pin_action_shas.php * BRIEF: Pin GitHub Actions to immutable commit SHAs in workflow files * NOTE: Resolves tag/branch refs to commit SHAs via the GitHub API to satisfy diff --git a/maintenance/repo_inventory.php b/maintenance/repo_inventory.php index 4086fbb..fe3807f 100644 --- a/maintenance/repo_inventory.php +++ b/maintenance/repo_inventory.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Maintenance * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /maintenance/repo_inventory.php * BRIEF: Generate a live inventory dashboard of all governed repos as a GitHub issue * diff --git a/maintenance/rotate_secrets.php b/maintenance/rotate_secrets.php index cfcb0ce..22aed88 100644 --- a/maintenance/rotate_secrets.php +++ b/maintenance/rotate_secrets.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Maintenance * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /maintenance/rotate_secrets.php * BRIEF: Audit FTP secrets and variables across all governed repos — report missing or stale * diff --git a/maintenance/setup_labels.php b/maintenance/setup_labels.php index fa87abd..be6677f 100644 --- a/maintenance/setup_labels.php +++ b/maintenance/setup_labels.php @@ -11,7 +11,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Maintenance * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /maintenance/setup_labels.php * BRIEF: REQUIRED label deployment script for all MokoStandards-governed repositories */ diff --git a/maintenance/sync_dolibarr_readmes.php b/maintenance/sync_dolibarr_readmes.php index f12a4ed..a05609f 100644 --- a/maintenance/sync_dolibarr_readmes.php +++ b/maintenance/sync_dolibarr_readmes.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Maintenance * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /maintenance/sync_dolibarr_readmes.php * BRIEF: Keeps root README.md and src/README.md in sync for Dolibarr module repositories * NOTE: Version format is zero-padded semver: XX.YY.ZZ (e.g. 04.00.04). All version regex diff --git a/maintenance/update_repo_inventory.php b/maintenance/update_repo_inventory.php index ff2228c..9ec8d89 100644 --- a/maintenance/update_repo_inventory.php +++ b/maintenance/update_repo_inventory.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Maintenance * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /maintenance/update_repo_inventory.php * BRIEF: Queries GitHub org repos and rewrites the auto-generated section of REPOSITORY_INVENTORY.md */ diff --git a/maintenance/update_sha_hashes.php b/maintenance/update_sha_hashes.php index 2c7c005..0cb0c32 100755 --- a/maintenance/update_sha_hashes.php +++ b/maintenance/update_sha_hashes.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Maintenance * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /maintenance/update_sha_hashes.php * BRIEF: Update SHA-256 hashes in script registry */ diff --git a/maintenance/update_version_from_readme.php b/maintenance/update_version_from_readme.php index 7c42f03..dbee952 100644 --- a/maintenance/update_version_from_readme.php +++ b/maintenance/update_version_from_readme.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Maintenance * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /maintenance/update_version_from_readme.php * BRIEF: Reads VERSION from README.md FILE INFORMATION block and propagates it to all badges and FILE INFORMATION headers * NOTE: README.md is the single source of truth for the repository version. diff --git a/mcp/src/config.ts b/mcp/src/config.ts index 892be4c..5f399a4 100644 --- a/mcp/src/config.ts +++ b/mcp/src/config.ts @@ -7,7 +7,7 @@ * FILE INFORMATION * DEFGROUP: mokostandards-mcp.Config * INGROUP: MokoStandards-API - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /mcp/src/config.ts * BRIEF: Configuration loader for MokoStandards MCP server */ diff --git a/mcp/src/index.ts b/mcp/src/index.ts index 3483c33..78006a8 100644 --- a/mcp/src/index.ts +++ b/mcp/src/index.ts @@ -8,7 +8,7 @@ * FILE INFORMATION * DEFGROUP: mokostandards-mcp.Server * INGROUP: MokoStandards-API - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /mcp/src/index.ts * BRIEF: MCP server entry point — exposes MokoStandards governance tools */ diff --git a/mcp/src/runner.ts b/mcp/src/runner.ts index d3b7439..1dab7ab 100644 --- a/mcp/src/runner.ts +++ b/mcp/src/runner.ts @@ -7,7 +7,7 @@ * FILE INFORMATION * DEFGROUP: mokostandards-mcp.Runner * INGROUP: MokoStandards-API - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /mcp/src/runner.ts * BRIEF: PHP CLI command runner for MokoStandards tools — uses execFile (no shell injection) */ diff --git a/mcp/src/types.ts b/mcp/src/types.ts index 3d3fcf7..06229c0 100644 --- a/mcp/src/types.ts +++ b/mcp/src/types.ts @@ -7,7 +7,7 @@ * FILE INFORMATION * DEFGROUP: mokostandards-mcp.Types * INGROUP: MokoStandards-API - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /mcp/src/types.ts * BRIEF: TypeScript type definitions for MokoStandards MCP server */ diff --git a/plugin_health_check.php b/plugin_health_check.php index 65d1011..7aa9815 100755 --- a/plugin_health_check.php +++ b/plugin_health_check.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Plugin * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /plugin_health_check.php * BRIEF: Run health checks on a project using the auto-detected or specified plugin */ diff --git a/plugin_list.php b/plugin_list.php index 921d2f8..3259c8d 100755 --- a/plugin_list.php +++ b/plugin_list.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Plugin * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /plugin_list.php * BRIEF: List all available project-type plugins and their capabilities */ diff --git a/plugin_metrics.php b/plugin_metrics.php index 221b0ca..c8d6105 100755 --- a/plugin_metrics.php +++ b/plugin_metrics.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Plugin * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /plugin_metrics.php * BRIEF: Collect project metrics using the auto-detected or specified plugin */ diff --git a/plugin_readiness.php b/plugin_readiness.php index dc78c81..75dba45 100755 --- a/plugin_readiness.php +++ b/plugin_readiness.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Plugin * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /plugin_readiness.php * BRIEF: Check release readiness of a project using the auto-detected or specified plugin */ diff --git a/plugin_validate.php b/plugin_validate.php index b867b62..e8011b1 100755 --- a/plugin_validate.php +++ b/plugin_validate.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Plugin * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /plugin_validate.php * BRIEF: Validate a project's structure and standards using the auto-detected or specified plugin */ diff --git a/release/generate_dolibarr_version_txt.php b/release/generate_dolibarr_version_txt.php index 5271e17..fac9dc3 100644 --- a/release/generate_dolibarr_version_txt.php +++ b/release/generate_dolibarr_version_txt.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Release * INGROUP: MokoStandards.Scripts - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /release/generate_dolibarr_version_txt.php * BRIEF: Create or update version.txt on Dolibarr module release * diff --git a/release/generate_joomla_update_xml.php b/release/generate_joomla_update_xml.php index 6f2e513..6ade875 100644 --- a/release/generate_joomla_update_xml.php +++ b/release/generate_joomla_update_xml.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Release * INGROUP: MokoStandards.Scripts - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /release/generate_joomla_update_xml.php * BRIEF: Create or update the in updates.xml on release * diff --git a/templates/docs/extra/template-CODE_OF_CONDUCT.md b/templates/docs/extra/template-CODE_OF_CONDUCT.md index ad38856..e1ae3bf 100644 --- a/templates/docs/extra/template-CODE_OF_CONDUCT.md +++ b/templates/docs/extra/template-CODE_OF_CONDUCT.md @@ -2,7 +2,7 @@ This file is part of a Moko Consulting project. - SPDX-LICENSE-IDENTIFIER: GPL-3.0-or-later + SPDX-License-Identifier: GPL-3.0-or-later This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. diff --git a/templates/docs/required/template-LICENSE.md b/templates/docs/required/template-LICENSE.md index eee9479..b3a7105 100644 --- a/templates/docs/required/template-LICENSE.md +++ b/templates/docs/required/template-LICENSE.md @@ -2,7 +2,7 @@ This file is part of a Moko Consulting project. - SPDX-LICENSE-IDENTIFIER: GPL-3.0-or-later + SPDX-License-Identifier: GPL-3.0-or-later This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. diff --git a/templates/gitea/ISSUE_TEMPLATE/config.yml b/templates/gitea/ISSUE_TEMPLATE/config.yml index db5c43c..d4d49ec 100644 --- a/templates/gitea/ISSUE_TEMPLATE/config.yml +++ b/templates/gitea/ISSUE_TEMPLATE/config.yml @@ -8,7 +8,7 @@ contact_links: url: https://mokoconsulting.tech/ about: Get help or ask questions through our website - name: 📚 MokoStandards Documentation - url: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards + url: https://git.mokoconsulting.tech/MokoConsulting/moko-platform about: View our coding standards and best practices - name: 🔒 Report a Security Vulnerability url: https://git.mokoconsulting.tech/mokoconsulting-tech/.github-private/security/advisories/new diff --git a/templates/schemas/mokostandards-schema.xsd b/templates/schemas/mokostandards-schema.xsd index 6023d44..7b5cc54 100644 --- a/templates/schemas/mokostandards-schema.xsd +++ b/templates/schemas/mokostandards-schema.xsd @@ -5,7 +5,7 @@ FILE INFORMATION DEFGROUP: MokoStandards.Schema INGROUP: MokoStandards.Governance - REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform PATH: /docs/standards/mokostandards-schema.xsd BRIEF: XML Schema Definition for the .mokostandards repository manifest file --> diff --git a/templates/scripts/common/CliBase.template.php b/templates/scripts/common/CliBase.template.php index 248c5a4..c02df2d 100644 --- a/templates/scripts/common/CliBase.template.php +++ b/templates/scripts/common/CliBase.template.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Templates.Common * INGROUP: MokoStandards.Templates - * REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /templates/scripts/common/CliBase.template.php * BRIEF: PHP CLI script template — extends MokoEnterprise\CliFramework * NOTE: Copy this file as a starting point for new PHP CLI scripts in governed repos. diff --git a/templates/scripts/release/package_dolibarr.php b/templates/scripts/release/package_dolibarr.php index da6839e..6602466 100644 --- a/templates/scripts/release/package_dolibarr.php +++ b/templates/scripts/release/package_dolibarr.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Templates.Scripts.Release * INGROUP: MokoStandards.Templates - * REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /templates/scripts/release/package_dolibarr.php * BRIEF: Build a distributable ZIP package for a Dolibarr module * NOTE: Deployed to bin/build_package.php in governed Dolibarr module repos. diff --git a/templates/scripts/release/package_joomla.php b/templates/scripts/release/package_joomla.php index a440e29..a2810bf 100644 --- a/templates/scripts/release/package_joomla.php +++ b/templates/scripts/release/package_joomla.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Templates.Scripts.Release * INGROUP: MokoStandards.Templates - * REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /templates/scripts/release/package_joomla.php * BRIEF: Build a distributable ZIP package for a Joomla component * NOTE: Deployed to bin/build_package.php in governed WaaS component repos. diff --git a/templates/scripts/validate/dolibarr_module.php b/templates/scripts/validate/dolibarr_module.php index b10a0e7..36485c2 100644 --- a/templates/scripts/validate/dolibarr_module.php +++ b/templates/scripts/validate/dolibarr_module.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Templates.Scripts.Validate * INGROUP: MokoStandards.Templates - * REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /templates/scripts/validate/dolibarr_module.php * BRIEF: Validate a Dolibarr module repository against MokoStandards requirements * NOTE: Deployed to bin/validate_module.php in governed Dolibarr module repos. diff --git a/templates/scripts/validate/validate_manifest.php b/templates/scripts/validate/validate_manifest.php index 31895a7..3720783 100644 --- a/templates/scripts/validate/validate_manifest.php +++ b/templates/scripts/validate/validate_manifest.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Templates.Scripts.Validate * INGROUP: MokoStandards.Templates - * REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /templates/scripts/validate/validate_manifest.php * BRIEF: Validate a Joomla component XML manifest against MokoStandards requirements * NOTE: Deployed to bin/validate_manifest.php in governed WaaS component repos. diff --git a/templates/scripts/validate/validate_structure.php b/templates/scripts/validate/validate_structure.php index 01afb51..d5da100 100644 --- a/templates/scripts/validate/validate_structure.php +++ b/templates/scripts/validate/validate_structure.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Templates.Scripts.Validate * INGROUP: MokoStandards.Templates - * REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /templates/scripts/validate/validate_structure.php * BRIEF: Validate a repository structure against MokoStandards requirements * NOTE: Deployed to bin/validate_structure.php in governed generic/default repos. diff --git a/templates/stubs/dolibarr.php b/templates/stubs/dolibarr.php index c773edd..5f87992 100644 --- a/templates/stubs/dolibarr.php +++ b/templates/stubs/dolibarr.php @@ -7,7 +7,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Stubs * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /templates/stubs/dolibarr.php * BRIEF: PHPStan stub declarations for Dolibarr core classes * diff --git a/templates/stubs/joomla.php b/templates/stubs/joomla.php index d4e4115..7dea606 100644 --- a/templates/stubs/joomla.php +++ b/templates/stubs/joomla.php @@ -7,7 +7,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Stubs * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /templates/stubs/joomla.php * BRIEF: PHPStan stub declarations for Joomla framework classes * diff --git a/templates/web/index.php b/templates/web/index.php index 743e1cc..9bc6c4c 100644 --- a/templates/web/index.php +++ b/templates/web/index.php @@ -207,7 +207,7 @@ function handleDashboard(): Response diff --git a/tests/Enterprise/GitPlatformAdapterTest.php b/tests/Enterprise/GitPlatformAdapterTest.php index 12060da..7533874 100644 --- a/tests/Enterprise/GitPlatformAdapterTest.php +++ b/tests/Enterprise/GitPlatformAdapterTest.php @@ -6,7 +6,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Tests.Enterprise * INGROUP: MokoStandards.Tests - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /tests/Enterprise/GitPlatformAdapterTest.php * BRIEF: Tests verifying both adapters implement GitPlatformAdapter correctly */ diff --git a/validate/auto_detect_platform.php b/validate/auto_detect_platform.php index 024e7d1..8b8d92b 100755 --- a/validate/auto_detect_platform.php +++ b/validate/auto_detect_platform.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/auto_detect_platform.php * BRIEF: Automatic platform detection and validation - PHP implementation */ diff --git a/validate/check_changelog.php b/validate/check_changelog.php index b1b394f..8bf3fd4 100644 --- a/validate/check_changelog.php +++ b/validate/check_changelog.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_changelog.php * BRIEF: Validates CHANGELOG.md structure and format */ diff --git a/validate/check_composer_deps.php b/validate/check_composer_deps.php index cb40b3d..cdf4ff8 100644 --- a/validate/check_composer_deps.php +++ b/validate/check_composer_deps.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_composer_deps.php * BRIEF: Validate composer.json enterprise dependency across all governed repos * diff --git a/validate/check_dolibarr_module.php b/validate/check_dolibarr_module.php index 8b55846..3abf543 100644 --- a/validate/check_dolibarr_module.php +++ b/validate/check_dolibarr_module.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_dolibarr_module.php * BRIEF: Validates Dolibarr module directory structure */ diff --git a/validate/check_enterprise_readiness.php b/validate/check_enterprise_readiness.php index 0ea65b1..753a0b2 100755 --- a/validate/check_enterprise_readiness.php +++ b/validate/check_enterprise_readiness.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_enterprise_readiness.php * BRIEF: Enterprise readiness checker - PHP implementation */ diff --git a/validate/check_joomla_manifest.php b/validate/check_joomla_manifest.php index c9f0f00..de575a4 100644 --- a/validate/check_joomla_manifest.php +++ b/validate/check_joomla_manifest.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_joomla_manifest.php * BRIEF: Validates Joomla XML manifest structure and required elements */ diff --git a/validate/check_language_structure.php b/validate/check_language_structure.php index 4fef11b..edf408d 100644 --- a/validate/check_language_structure.php +++ b/validate/check_language_structure.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_language_structure.php * BRIEF: Validates language INI file structure (KEY=value format) */ diff --git a/validate/check_license_headers.php b/validate/check_license_headers.php index 50a6887..fb5bc5f 100644 --- a/validate/check_license_headers.php +++ b/validate/check_license_headers.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_license_headers.php * BRIEF: Validates SPDX license headers in source files (advisory) */ diff --git a/validate/check_no_secrets.php b/validate/check_no_secrets.php index 5dd2759..5d0ec3f 100644 --- a/validate/check_no_secrets.php +++ b/validate/check_no_secrets.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_no_secrets.php * BRIEF: Checks for potential secrets in committed files (advisory) */ diff --git a/validate/check_paths.php b/validate/check_paths.php index 0ce12fa..1d365c5 100644 --- a/validate/check_paths.php +++ b/validate/check_paths.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_paths.php * BRIEF: Validates that path separators use forward slashes (advisory) */ diff --git a/validate/check_php_syntax.php b/validate/check_php_syntax.php index 60d50f0..1b0f0cd 100644 --- a/validate/check_php_syntax.php +++ b/validate/check_php_syntax.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_php_syntax.php * BRIEF: Validates PHP syntax for all tracked PHP files using php -l */ diff --git a/validate/check_structure.php b/validate/check_structure.php index c544884..6c3c171 100644 --- a/validate/check_structure.php +++ b/validate/check_structure.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_structure.php * BRIEF: Validates required repository directory and file structure */ diff --git a/validate/check_tabs.php b/validate/check_tabs.php index c628eac..0743fd3 100644 --- a/validate/check_tabs.php +++ b/validate/check_tabs.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_tabs.php * BRIEF: Validates that no literal tab characters exist in source files */ diff --git a/validate/check_version_consistency.php b/validate/check_version_consistency.php index fffc657..bd167b6 100755 --- a/validate/check_version_consistency.php +++ b/validate/check_version_consistency.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_version_consistency.php * BRIEF: Validates that version numbers are consistent across all critical repository files */ diff --git a/validate/check_wiki_health.php b/validate/check_wiki_health.php index fea8858..0e36bc6 100644 --- a/validate/check_wiki_health.php +++ b/validate/check_wiki_health.php @@ -7,6 +7,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Validate * INGROUP: MokoStandards + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_wiki_health.php * BRIEF: Validate wiki health — checks Home page exists, has MokoStandards link, pages are indexed */ diff --git a/validate/check_xml_wellformed.php b/validate/check_xml_wellformed.php index 61d2831..4fd9668 100644 --- a/validate/check_xml_wellformed.php +++ b/validate/check_xml_wellformed.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/check_xml_wellformed.php * BRIEF: Validates that all tracked XML files are well-formed */ diff --git a/validate/scan_drift.php b/validate/scan_drift.php index 14860b5..83eb7ca 100755 --- a/validate/scan_drift.php +++ b/validate/scan_drift.php @@ -10,7 +10,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Scripts.Validate * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /validate/scan_drift.php * BRIEF: Standards drift detection - scans repositories for divergence from templates */ diff --git a/wrappers/auto_detect_platform.php b/wrappers/auto_detect_platform.php index d7ca181..086a68e 100644 --- a/wrappers/auto_detect_platform.php +++ b/wrappers/auto_detect_platform.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/auto_detect_platform.php * BRIEF: PHP wrapper for validate/auto_detect_platform.php */ diff --git a/wrappers/bulk_sync.php b/wrappers/bulk_sync.php index 7db3c53..6945e90 100644 --- a/wrappers/bulk_sync.php +++ b/wrappers/bulk_sync.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/bulk_sync.php * BRIEF: PHP wrapper for automation/bulk_sync.php */ diff --git a/wrappers/check_changelog.php b/wrappers/check_changelog.php index f6adf25..3e777b9 100644 --- a/wrappers/check_changelog.php +++ b/wrappers/check_changelog.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/check_changelog.php * BRIEF: PHP wrapper for validate/check_changelog.php */ diff --git a/wrappers/check_dolibarr_module.php b/wrappers/check_dolibarr_module.php index d31a5b8..c622a70 100644 --- a/wrappers/check_dolibarr_module.php +++ b/wrappers/check_dolibarr_module.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/check_dolibarr_module.php * BRIEF: PHP wrapper for validate/check_dolibarr_module.php */ diff --git a/wrappers/check_enterprise_readiness.php b/wrappers/check_enterprise_readiness.php index fcac0f7..f51bce3 100644 --- a/wrappers/check_enterprise_readiness.php +++ b/wrappers/check_enterprise_readiness.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/check_enterprise_readiness.php * BRIEF: PHP wrapper for validate/check_enterprise_readiness.php */ diff --git a/wrappers/check_joomla_manifest.php b/wrappers/check_joomla_manifest.php index 4b9e4fd..50d23b8 100644 --- a/wrappers/check_joomla_manifest.php +++ b/wrappers/check_joomla_manifest.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/check_joomla_manifest.php * BRIEF: PHP wrapper for validate/check_joomla_manifest.php */ diff --git a/wrappers/check_language_structure.php b/wrappers/check_language_structure.php index 2fa8871..b04666f 100644 --- a/wrappers/check_language_structure.php +++ b/wrappers/check_language_structure.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/check_language_structure.php * BRIEF: PHP wrapper for validate/check_language_structure.php */ diff --git a/wrappers/check_license_headers.php b/wrappers/check_license_headers.php index 2ed5933..019ff40 100644 --- a/wrappers/check_license_headers.php +++ b/wrappers/check_license_headers.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/check_license_headers.php * BRIEF: PHP wrapper for validate/check_license_headers.php */ diff --git a/wrappers/check_no_secrets.php b/wrappers/check_no_secrets.php index b11a5f3..0ad1cef 100644 --- a/wrappers/check_no_secrets.php +++ b/wrappers/check_no_secrets.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/check_no_secrets.php * BRIEF: PHP wrapper for validate/check_no_secrets.php */ diff --git a/wrappers/check_paths.php b/wrappers/check_paths.php index f684a2c..6a0c11c 100644 --- a/wrappers/check_paths.php +++ b/wrappers/check_paths.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/check_paths.php * BRIEF: PHP wrapper for validate/check_paths.php */ diff --git a/wrappers/check_php_syntax.php b/wrappers/check_php_syntax.php index 717046a..e5fc9fb 100644 --- a/wrappers/check_php_syntax.php +++ b/wrappers/check_php_syntax.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/check_php_syntax.php * BRIEF: PHP wrapper for validate/check_php_syntax.php */ diff --git a/wrappers/check_repo_health.php b/wrappers/check_repo_health.php index 6c940fe..1e5b466 100644 --- a/wrappers/check_repo_health.php +++ b/wrappers/check_repo_health.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/check_repo_health.php * BRIEF: PHP wrapper for validate/check_repo_health.php */ diff --git a/wrappers/check_structure.php b/wrappers/check_structure.php index 88361cb..3024a58 100644 --- a/wrappers/check_structure.php +++ b/wrappers/check_structure.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/check_structure.php * BRIEF: PHP wrapper for validate/check_structure.php */ diff --git a/wrappers/check_tabs.php b/wrappers/check_tabs.php index b51a77f..ddf6647 100644 --- a/wrappers/check_tabs.php +++ b/wrappers/check_tabs.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/check_tabs.php * BRIEF: PHP wrapper for validate/check_tabs.php */ diff --git a/wrappers/check_version_consistency.php b/wrappers/check_version_consistency.php index 3fdcc92..bb132ee 100644 --- a/wrappers/check_version_consistency.php +++ b/wrappers/check_version_consistency.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/check_version_consistency.php * BRIEF: PHP wrapper for validate/check_version_consistency.php */ diff --git a/wrappers/check_xml_wellformed.php b/wrappers/check_xml_wellformed.php index f3391e1..84d7ecf 100644 --- a/wrappers/check_xml_wellformed.php +++ b/wrappers/check_xml_wellformed.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/check_xml_wellformed.php * BRIEF: PHP wrapper for validate/check_xml_wellformed.php */ diff --git a/wrappers/deploy_sftp.php b/wrappers/deploy_sftp.php index 0a66db1..83d1a43 100644 --- a/wrappers/deploy_sftp.php +++ b/wrappers/deploy_sftp.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/deploy_sftp.php * BRIEF: PHP wrapper for deploy/deploy-sftp.php */ diff --git a/wrappers/fix_line_endings.php b/wrappers/fix_line_endings.php index 0cece56..7d18abc 100644 --- a/wrappers/fix_line_endings.php +++ b/wrappers/fix_line_endings.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/fix_line_endings.php * BRIEF: PHP wrapper for fix/fix_line_endings.php */ diff --git a/wrappers/fix_permissions.php b/wrappers/fix_permissions.php index 2036695..5706dcf 100644 --- a/wrappers/fix_permissions.php +++ b/wrappers/fix_permissions.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/fix_permissions.php * BRIEF: PHP wrapper for fix/fix_permissions.php */ diff --git a/wrappers/fix_tabs.php b/wrappers/fix_tabs.php index 6091385..0d85d69 100644 --- a/wrappers/fix_tabs.php +++ b/wrappers/fix_tabs.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/fix_tabs.php * BRIEF: PHP wrapper for fix/fix_tabs.php */ diff --git a/wrappers/fix_trailing_spaces.php b/wrappers/fix_trailing_spaces.php index 4963cbf..3258e05 100644 --- a/wrappers/fix_trailing_spaces.php +++ b/wrappers/fix_trailing_spaces.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/fix_trailing_spaces.php * BRIEF: PHP wrapper for fix/fix_trailing_spaces.php */ diff --git a/wrappers/gen_wrappers.php b/wrappers/gen_wrappers.php index 9155e2b..77aec52 100644 --- a/wrappers/gen_wrappers.php +++ b/wrappers/gen_wrappers.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/gen_wrappers.php * BRIEF: Generate PHP CLI wrapper scripts for every PHP script in the repo */ @@ -84,7 +84,7 @@ function renderWrapper(string $name, string $scriptPath, string $category): stri * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/{$name}.php * BRIEF: PHP wrapper for {$scriptPath} */ diff --git a/wrappers/index.md b/wrappers/index.md index d6eefa9..2cdff8c 100644 --- a/wrappers/index.md +++ b/wrappers/index.md @@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later # FILE INFORMATION DEFGROUP: MokoStandards.Wrappers INGROUP: MokoStandards -REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API +REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform PATH: /wrappers/index.md BRIEF: PHP wrapper scripts — one per CLI script in api/; add logging and repo-root detection --> diff --git a/wrappers/pin_action_shas.php b/wrappers/pin_action_shas.php index 63e988a..fc45f38 100644 --- a/wrappers/pin_action_shas.php +++ b/wrappers/pin_action_shas.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/pin_action_shas.php * BRIEF: PHP wrapper for maintenance/pin_action_shas.php */ diff --git a/wrappers/plugin_health_check.php b/wrappers/plugin_health_check.php index 0585fd1..6bb0427 100644 --- a/wrappers/plugin_health_check.php +++ b/wrappers/plugin_health_check.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/plugin_health_check.php * BRIEF: PHP wrapper for plugin_health_check.php */ diff --git a/wrappers/plugin_list.php b/wrappers/plugin_list.php index 1a52006..5242975 100644 --- a/wrappers/plugin_list.php +++ b/wrappers/plugin_list.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/plugin_list.php * BRIEF: PHP wrapper for plugin_list.php */ diff --git a/wrappers/plugin_metrics.php b/wrappers/plugin_metrics.php index 046a09b..2d85530 100644 --- a/wrappers/plugin_metrics.php +++ b/wrappers/plugin_metrics.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/plugin_metrics.php * BRIEF: PHP wrapper for plugin_metrics.php */ diff --git a/wrappers/plugin_readiness.php b/wrappers/plugin_readiness.php index 0032c1b..513007e 100644 --- a/wrappers/plugin_readiness.php +++ b/wrappers/plugin_readiness.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/plugin_readiness.php * BRIEF: PHP wrapper for plugin_readiness.php */ diff --git a/wrappers/plugin_validate.php b/wrappers/plugin_validate.php index b0316e0..6a321f7 100644 --- a/wrappers/plugin_validate.php +++ b/wrappers/plugin_validate.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/plugin_validate.php * BRIEF: PHP wrapper for plugin_validate.php */ diff --git a/wrappers/scan_drift.php b/wrappers/scan_drift.php index a5360d2..c87e20c 100644 --- a/wrappers/scan_drift.php +++ b/wrappers/scan_drift.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/scan_drift.php * BRIEF: PHP wrapper for validate/scan_drift.php */ diff --git a/wrappers/setup_labels.php b/wrappers/setup_labels.php index fbcd5a7..9b56b81 100644 --- a/wrappers/setup_labels.php +++ b/wrappers/setup_labels.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/setup_labels.php * BRIEF: PHP wrapper for maintenance/setup_labels.php */ diff --git a/wrappers/sync_dolibarr_readmes.php b/wrappers/sync_dolibarr_readmes.php index db80fd8..706bda1 100644 --- a/wrappers/sync_dolibarr_readmes.php +++ b/wrappers/sync_dolibarr_readmes.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/sync_dolibarr_readmes.php * BRIEF: PHP wrapper for maintenance/sync_dolibarr_readmes.php */ diff --git a/wrappers/update_sha_hashes.php b/wrappers/update_sha_hashes.php index 81308a7..24cac5b 100644 --- a/wrappers/update_sha_hashes.php +++ b/wrappers/update_sha_hashes.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/update_sha_hashes.php * BRIEF: PHP wrapper for maintenance/update_sha_hashes.php */ diff --git a/wrappers/update_version_from_readme.php b/wrappers/update_version_from_readme.php index af5f469..92397c7 100644 --- a/wrappers/update_version_from_readme.php +++ b/wrappers/update_version_from_readme.php @@ -9,7 +9,7 @@ * FILE INFORMATION * DEFGROUP: MokoStandards.Wrappers * INGROUP: MokoStandards - * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform * PATH: /wrappers/update_version_from_readme.php * BRIEF: PHP wrapper for maintenance/update_version_from_readme.php */ -- 2.52.0 From 1799401db579e26efd1a9633aaa8b4835c9c34fb Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Mon, 11 May 2026 17:10:19 -0500 Subject: [PATCH 5/6] feat: add standard file headers to all 57 files missing them - Add Copyright + FILE INFORMATION headers to 11 PHP enterprise classes - Add FILE INFORMATION blocks to 9 PHP files with incomplete headers - Add headers to 2 test files - Add markdown comment headers to 27 index/README files - Add headers to 5 root markdown files - Add FILE INFORMATION to 4 files with existing but incomplete headers All files now conform to moko-platform file header standard. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/pr-branch-check.yml | 7 +++++++ CHANGELOG.md | 11 +++++++++++ PLUGIN_SCRIPTS.md | 11 +++++++++++ README.md | 11 +++++++++++ analysis/index.md | 11 +++++++++++ automation/enrich_mokostandards_xml.php | 7 +++++++ automation/index.md | 11 +++++++++++ automation/push_mokostandards_xml.php | 7 +++++++ definitions/index.md | 11 +++++++++++ fix/index.md | 11 +++++++++++ index.md | 11 +++++++++++ lib/Enterprise/AbstractProjectPlugin.php | 14 ++++++++++++++ lib/Enterprise/ApiClient.php | 14 ++++++++++++++ lib/Enterprise/AuditLogger.php | 7 +++++++ lib/Enterprise/CheckpointManager.php | 7 +++++++ lib/Enterprise/Config.php | 14 ++++++++++++++ lib/Enterprise/ErrorRecovery.php | 7 +++++++ lib/Enterprise/InputValidator.php | 14 ++++++++++++++ lib/Enterprise/MetricsCollector.php | 14 ++++++++++++++ lib/Enterprise/PluginFactory.php | 14 ++++++++++++++ lib/Enterprise/PluginRegistry.php | 14 ++++++++++++++ lib/Enterprise/ProjectPluginInterface.php | 14 ++++++++++++++ lib/Enterprise/RecoveryError.php | 7 +++++++ lib/Enterprise/RecoveryManager.php | 7 +++++++ lib/Enterprise/RetryHelper.php | 7 +++++++ lib/Enterprise/SecurityValidator.php | 14 ++++++++++++++ lib/Enterprise/TransactionManager.php | 14 ++++++++++++++ lib/Enterprise/UnifiedValidation.php | 14 ++++++++++++++ lib/index.md | 11 +++++++++++ maintenance/index.md | 11 +++++++++++ src/functions.php | 15 +++++++++++---- templates/configs/index.md | 7 ++++++- templates/docs/README.md | 11 +++++++++++ templates/docs/extra/README.md | 11 +++++++++++ templates/docs/extra/index.md | 11 +++++++++++ templates/docs/index.md | 11 +++++++++++ templates/docs/required/README.md | 11 +++++++++++ templates/docs/required/index.md | 11 +++++++++++ templates/licenses/README.md | 11 +++++++++++ templates/licenses/index.md | 11 +++++++++++ templates/makefiles/README.md | 11 +++++++++++ templates/required/README.md | 11 +++++++++++ templates/schemas/README.md | 11 +++++++++++ templates/schemas/schemas/README.md | 11 +++++++++++ templates/scripts/README.md | 11 +++++++++++ templates/scripts/fix/index.md | 11 +++++++++++ templates/scripts/index.md | 11 +++++++++++ templates/scripts/release/index.md | 11 +++++++++++ templates/scripts/validate/index.md | 11 +++++++++++ templates/security/README.md | 11 +++++++++++ templates/security/index.php | 7 +++++++ templates/web/assets/css/app.css | 11 +++++++++-- tests/index.md | 11 +++++++++++ tests/test_circuit_breaker_handling.php | 14 ++++++++++++++ tests/test_enterprise_libraries.php | 14 ++++++++++++++ validate/SECURITY_SCANNING.md | 11 +++++++++++ validate/index.md | 11 +++++++++++ 57 files changed, 619 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/pr-branch-check.yml b/.gitea/workflows/pr-branch-check.yml index b8d9742..5f3010e 100644 --- a/.gitea/workflows/pr-branch-check.yml +++ b/.gitea/workflows/pr-branch-check.yml @@ -1,6 +1,13 @@ # Copyright (C) 2026 Moko Consulting # SPDX-License-Identifier: GPL-3.0-or-later # +# FILE INFORMATION +# DEFGROUP: MokoStandards.CI +# INGROUP: MokoStandards +# REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform +# PATH: /.gitea/workflows/pr-branch-check.yml +# BRIEF: PR branch merge policy enforcement +# # Enforces branch merge policy: # feature/* → dev only # fix/* → dev only diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fb3067..cd4ce7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ + + # Changelog All notable changes to this project will be documented in this file. diff --git a/PLUGIN_SCRIPTS.md b/PLUGIN_SCRIPTS.md index d2da37c..b991eba 100644 --- a/PLUGIN_SCRIPTS.md +++ b/PLUGIN_SCRIPTS.md @@ -1,3 +1,14 @@ + + # Plugin System CLI Scripts Command-line scripts for validating, health checking, and managing projects using the MokoStandards plugin system. diff --git a/README.md b/README.md index 179ca52..9fd41d3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,14 @@ + + # MokoStandards Enterprise API PHP implementation of MokoStandards — enterprise standards, automation framework, workflow templates, and bulk sync tooling. diff --git a/analysis/index.md b/analysis/index.md index 51855d1..7a220ad 100644 --- a/analysis/index.md +++ b/analysis/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /api/analysis ## Purpose diff --git a/automation/enrich_mokostandards_xml.php b/automation/enrich_mokostandards_xml.php index 69c830e..ac75e2d 100644 --- a/automation/enrich_mokostandards_xml.php +++ b/automation/enrich_mokostandards_xml.php @@ -4,6 +4,13 @@ * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Automation + * INGROUP: MokoStandards + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /automation/enrich_mokostandards_xml.php + * BRIEF: Enrich XML manifests with repo-specific build and deploy details + * * Enrich XML .mokostandards manifests with repo-specific build, deploy, and script details. * * Runs AFTER push_mokostandards_xml.php. Clones each repo, inspects its contents, diff --git a/automation/index.md b/automation/index.md index d105b1f..31b76d1 100644 --- a/automation/index.md +++ b/automation/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /api/automation ## Purpose diff --git a/automation/push_mokostandards_xml.php b/automation/push_mokostandards_xml.php index 23587e9..8080f9e 100644 --- a/automation/push_mokostandards_xml.php +++ b/automation/push_mokostandards_xml.php @@ -4,6 +4,13 @@ * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Automation + * INGROUP: MokoStandards + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /automation/push_mokostandards_xml.php + * BRIEF: Push XML manifests to all governed repositories + * * Push XML .mokostandards manifest to all governed repositories. * * Uses git SSH to bypass the Gitea reverse-proxy WAF that blocks diff --git a/definitions/index.md b/definitions/index.md index cc1f260..829bb18 100644 --- a/definitions/index.md +++ b/definitions/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /api/definitions ## Purpose diff --git a/fix/index.md b/fix/index.md index 88cc345..8edfc19 100644 --- a/fix/index.md +++ b/fix/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /api/fix ## Purpose diff --git a/index.md b/index.md index cc6445e..1433b96 100644 --- a/index.md +++ b/index.md @@ -1,3 +1,14 @@ + + # Scripts Index Quick navigation for MokoStandards scripts organized by function. diff --git a/lib/Enterprise/AbstractProjectPlugin.php b/lib/Enterprise/AbstractProjectPlugin.php index 7a829d3..e50594f 100644 --- a/lib/Enterprise/AbstractProjectPlugin.php +++ b/lib/Enterprise/AbstractProjectPlugin.php @@ -2,6 +2,20 @@ declare(strict_types=1); +/* Copyright (C) 2026 Moko Consulting + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Plugins + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/AbstractProjectPlugin.php + * BRIEF: Abstract base class for project plugins + */ + namespace MokoEnterprise; /** diff --git a/lib/Enterprise/ApiClient.php b/lib/Enterprise/ApiClient.php index c97814f..8c9a08b 100644 --- a/lib/Enterprise/ApiClient.php +++ b/lib/Enterprise/ApiClient.php @@ -2,6 +2,20 @@ declare(strict_types=1); +/* Copyright (C) 2026 Moko Consulting + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.API + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/ApiClient.php + * BRIEF: HTTP API client library + */ + /** * API Client Library - Rate-limited, resilient API interactions. * diff --git a/lib/Enterprise/AuditLogger.php b/lib/Enterprise/AuditLogger.php index 5677582..668eef0 100644 --- a/lib/Enterprise/AuditLogger.php +++ b/lib/Enterprise/AuditLogger.php @@ -21,6 +21,13 @@ declare(strict_types=1); * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Audit + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/AuditLogger.php + * BRIEF: Enterprise audit logging + * * @package MokoStandards\Enterprise * @version 04.00.04 * @author MokoStandards Team diff --git a/lib/Enterprise/CheckpointManager.php b/lib/Enterprise/CheckpointManager.php index 5656ea6..14ae022 100644 --- a/lib/Enterprise/CheckpointManager.php +++ b/lib/Enterprise/CheckpointManager.php @@ -9,6 +9,13 @@ declare(strict_types=1); * * SPDX-License-Identifier: GPL-3.0-or-later * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Checkpoint + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/CheckpointManager.php + * BRIEF: Checkpoint manager for resumable operations + * * @package MokoStandards\Enterprise * @version 04.00.04 * @author MokoStandards Team diff --git a/lib/Enterprise/Config.php b/lib/Enterprise/Config.php index 8df8ee4..e6d6266 100644 --- a/lib/Enterprise/Config.php +++ b/lib/Enterprise/Config.php @@ -2,6 +2,20 @@ declare(strict_types=1); +/* Copyright (C) 2026 Moko Consulting + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Config + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/Config.php + * BRIEF: Configuration manager + */ + /** * Configuration Manager - Centralized, environment-aware configuration. * diff --git a/lib/Enterprise/ErrorRecovery.php b/lib/Enterprise/ErrorRecovery.php index c5485e3..c943451 100644 --- a/lib/Enterprise/ErrorRecovery.php +++ b/lib/Enterprise/ErrorRecovery.php @@ -16,6 +16,13 @@ declare(strict_types=1); * * SPDX-License-Identifier: GPL-3.0-or-later * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Recovery + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/ErrorRecovery.php + * BRIEF: Error recovery framework + * * @package MokoStandards\Enterprise * @version 04.00.04 * @author MokoStandards Team diff --git a/lib/Enterprise/InputValidator.php b/lib/Enterprise/InputValidator.php index c57f34c..1c6bea0 100644 --- a/lib/Enterprise/InputValidator.php +++ b/lib/Enterprise/InputValidator.php @@ -2,6 +2,20 @@ declare(strict_types=1); +/* Copyright (C) 2026 Moko Consulting + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Validation + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/InputValidator.php + * BRIEF: Input validation library + */ + /** * Input Validation Library - Security-focused input validation and sanitization. * diff --git a/lib/Enterprise/MetricsCollector.php b/lib/Enterprise/MetricsCollector.php index eac3fa6..21f6afd 100644 --- a/lib/Enterprise/MetricsCollector.php +++ b/lib/Enterprise/MetricsCollector.php @@ -2,6 +2,20 @@ declare(strict_types=1); +/* Copyright (C) 2026 Moko Consulting + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Metrics + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/MetricsCollector.php + * BRIEF: Metrics collection framework + */ + /** * Metrics Collector for MokoStandards * diff --git a/lib/Enterprise/PluginFactory.php b/lib/Enterprise/PluginFactory.php index 79046a2..246d62c 100644 --- a/lib/Enterprise/PluginFactory.php +++ b/lib/Enterprise/PluginFactory.php @@ -2,6 +2,20 @@ declare(strict_types=1); +/* Copyright (C) 2026 Moko Consulting + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Plugins + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/PluginFactory.php + * BRIEF: Plugin factory for project type detection + */ + namespace MokoEnterprise; /** diff --git a/lib/Enterprise/PluginRegistry.php b/lib/Enterprise/PluginRegistry.php index 5d65228..1a7036b 100644 --- a/lib/Enterprise/PluginRegistry.php +++ b/lib/Enterprise/PluginRegistry.php @@ -2,6 +2,20 @@ declare(strict_types=1); +/* Copyright (C) 2026 Moko Consulting + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Plugins + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/PluginRegistry.php + * BRIEF: Plugin registry for available project plugins + */ + namespace MokoEnterprise; use MokoEnterprise\Plugins\JoomlaPlugin; diff --git a/lib/Enterprise/ProjectPluginInterface.php b/lib/Enterprise/ProjectPluginInterface.php index 4766907..ca03267 100644 --- a/lib/Enterprise/ProjectPluginInterface.php +++ b/lib/Enterprise/ProjectPluginInterface.php @@ -2,6 +2,20 @@ declare(strict_types=1); +/* Copyright (C) 2026 Moko Consulting + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Plugins + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/ProjectPluginInterface.php + * BRIEF: Interface for project type plugins + */ + namespace MokoEnterprise; /** diff --git a/lib/Enterprise/RecoveryError.php b/lib/Enterprise/RecoveryError.php index 04b31a7..96bfa7d 100644 --- a/lib/Enterprise/RecoveryError.php +++ b/lib/Enterprise/RecoveryError.php @@ -9,6 +9,13 @@ declare(strict_types=1); * * SPDX-License-Identifier: GPL-3.0-or-later * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Recovery + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/RecoveryError.php + * BRIEF: Recovery error exception class + * * @package MokoStandards\Enterprise * @version 04.00.04 * @author MokoStandards Team diff --git a/lib/Enterprise/RecoveryManager.php b/lib/Enterprise/RecoveryManager.php index cc05553..5373d7d 100644 --- a/lib/Enterprise/RecoveryManager.php +++ b/lib/Enterprise/RecoveryManager.php @@ -9,6 +9,13 @@ declare(strict_types=1); * * SPDX-License-Identifier: GPL-3.0-or-later * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Recovery + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/RecoveryManager.php + * BRIEF: Recovery manager for failed operations + * * @package MokoStandards\Enterprise * @version 04.00.04 * @author MokoStandards Team diff --git a/lib/Enterprise/RetryHelper.php b/lib/Enterprise/RetryHelper.php index b360a48..526182b 100644 --- a/lib/Enterprise/RetryHelper.php +++ b/lib/Enterprise/RetryHelper.php @@ -9,6 +9,13 @@ declare(strict_types=1); * * SPDX-License-Identifier: GPL-3.0-or-later * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Recovery + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/RetryHelper.php + * BRIEF: Retry helper with exponential backoff + * * @package MokoStandards\Enterprise * @version 04.00.04 * @author MokoStandards Team diff --git a/lib/Enterprise/SecurityValidator.php b/lib/Enterprise/SecurityValidator.php index 8f3a36c..ce7e0dd 100644 --- a/lib/Enterprise/SecurityValidator.php +++ b/lib/Enterprise/SecurityValidator.php @@ -2,6 +2,20 @@ declare(strict_types=1); +/* Copyright (C) 2026 Moko Consulting + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Security + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/SecurityValidator.php + * BRIEF: Security validation library + */ + /** * Security Validator for MokoStandards * diff --git a/lib/Enterprise/TransactionManager.php b/lib/Enterprise/TransactionManager.php index b992a2b..d457db3 100644 --- a/lib/Enterprise/TransactionManager.php +++ b/lib/Enterprise/TransactionManager.php @@ -2,6 +2,20 @@ declare(strict_types=1); +/* Copyright (C) 2026 Moko Consulting + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Transaction + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/TransactionManager.php + * BRIEF: Transaction manager for atomic operations + */ + /** * Transaction Manager for MokoStandards * diff --git a/lib/Enterprise/UnifiedValidation.php b/lib/Enterprise/UnifiedValidation.php index ad0f6fd..fffe02d 100644 --- a/lib/Enterprise/UnifiedValidation.php +++ b/lib/Enterprise/UnifiedValidation.php @@ -2,6 +2,20 @@ declare(strict_types=1); +/* Copyright (C) 2026 Moko Consulting + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Enterprise.Validation + * INGROUP: MokoStandards.Enterprise + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /lib/Enterprise/UnifiedValidation.php + * BRIEF: Unified validation framework + */ + /** * Unified Validation Framework for MokoStandards * diff --git a/lib/index.md b/lib/index.md index 0ac8b6e..b44c075 100644 --- a/lib/index.md +++ b/lib/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /api/lib ## Purpose diff --git a/maintenance/index.md b/maintenance/index.md index 68f1026..e8f6cc3 100644 --- a/maintenance/index.md +++ b/maintenance/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /api/maintenance ## Purpose diff --git a/src/functions.php b/src/functions.php index ab645eb..0f01e75 100644 --- a/src/functions.php +++ b/src/functions.php @@ -1,13 +1,20 @@ - * + * * SPDX-License-Identifier: GPL-3.0-or-later - * + * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Common + * INGROUP: MokoStandards + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /src/functions.php + * BRIEF: Common utility functions + * * This file provides global helper functions for MokoStandards. - * + * * @package MokoStandards * @version 04.00.04 */ diff --git a/templates/configs/index.md b/templates/configs/index.md index f05a262..3f02245 100644 --- a/templates/configs/index.md +++ b/templates/configs/index.md @@ -1,7 +1,12 @@ # Code Quality Configuration Templates diff --git a/templates/docs/README.md b/templates/docs/README.md index ab5406b..c6b80e4 100644 --- a/templates/docs/README.md +++ b/templates/docs/README.md @@ -1,3 +1,14 @@ + + # Documentation Templates ## Purpose diff --git a/templates/docs/extra/README.md b/templates/docs/extra/README.md index 90df0cb..193d9f7 100644 --- a/templates/docs/extra/README.md +++ b/templates/docs/extra/README.md @@ -1,3 +1,14 @@ + + # Extra Documentation Templates ## Purpose diff --git a/templates/docs/extra/index.md b/templates/docs/extra/index.md index aa969e1..04939d0 100644 --- a/templates/docs/extra/index.md +++ b/templates/docs/extra/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /templates/docs/extra ## Purpose diff --git a/templates/docs/index.md b/templates/docs/index.md index a384f2e..5892b90 100644 --- a/templates/docs/index.md +++ b/templates/docs/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /templates/docs ## Purpose diff --git a/templates/docs/required/README.md b/templates/docs/required/README.md index bc30eaf..c2dca78 100644 --- a/templates/docs/required/README.md +++ b/templates/docs/required/README.md @@ -1,3 +1,14 @@ + + # Required Documentation Templates ## Purpose diff --git a/templates/docs/required/index.md b/templates/docs/required/index.md index 9e47f20..c11ca53 100644 --- a/templates/docs/required/index.md +++ b/templates/docs/required/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /templates/docs/required ## Purpose diff --git a/templates/licenses/README.md b/templates/licenses/README.md index 34209b1..6025866 100644 --- a/templates/licenses/README.md +++ b/templates/licenses/README.md @@ -1,3 +1,14 @@ + + # License Templates ## Purpose diff --git a/templates/licenses/index.md b/templates/licenses/index.md index d6785ae..d5a8655 100644 --- a/templates/licenses/index.md +++ b/templates/licenses/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /templates/licenses ## Purpose diff --git a/templates/makefiles/README.md b/templates/makefiles/README.md index 1c2a07d..b10474d 100644 --- a/templates/makefiles/README.md +++ b/templates/makefiles/README.md @@ -1,3 +1,14 @@ + + # Makefile Templates This directory contains Makefile templates for different repository types. diff --git a/templates/required/README.md b/templates/required/README.md index ab327b7..031bd50 100644 --- a/templates/required/README.md +++ b/templates/required/README.md @@ -1,3 +1,14 @@ + + # Required Templates This directory contains **REQUIRED** files that must be present in all MokoStandards-compliant repositories. diff --git a/templates/schemas/README.md b/templates/schemas/README.md index 33e57c4..2a6b190 100644 --- a/templates/schemas/README.md +++ b/templates/schemas/README.md @@ -1,3 +1,14 @@ + + # Repository Structure Schemas This directory contains template schema files for defining custom repository structures. diff --git a/templates/schemas/schemas/README.md b/templates/schemas/schemas/README.md index 6f3183b..3973737 100644 --- a/templates/schemas/schemas/README.md +++ b/templates/schemas/schemas/README.md @@ -1,3 +1,14 @@ + + # Schema Directory - DEPRECATED ## ⚠️ NOTICE: This Directory Has Been Deprecated diff --git a/templates/scripts/README.md b/templates/scripts/README.md index 182fb26..6b43b24 100644 --- a/templates/scripts/README.md +++ b/templates/scripts/README.md @@ -1,3 +1,14 @@ + + # Script Templates This directory contains template scripts for common repository operations including validation, fixes, and release automation. diff --git a/templates/scripts/fix/index.md b/templates/scripts/fix/index.md index d9bc389..187592d 100644 --- a/templates/scripts/fix/index.md +++ b/templates/scripts/fix/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /templates/scripts/fix ## Purpose diff --git a/templates/scripts/index.md b/templates/scripts/index.md index d3501a3..112f03f 100644 --- a/templates/scripts/index.md +++ b/templates/scripts/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /templates/scripts ## Purpose diff --git a/templates/scripts/release/index.md b/templates/scripts/release/index.md index d7c1b65..73e45d5 100644 --- a/templates/scripts/release/index.md +++ b/templates/scripts/release/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /templates/scripts/release ## Purpose diff --git a/templates/scripts/validate/index.md b/templates/scripts/validate/index.md index 32cdc7f..744b736 100644 --- a/templates/scripts/validate/index.md +++ b/templates/scripts/validate/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /templates/scripts/validate ## Purpose diff --git a/templates/security/README.md b/templates/security/README.md index 4c643f4..dc56753 100644 --- a/templates/security/README.md +++ b/templates/security/README.md @@ -1,3 +1,14 @@ + + # Security Templates This directory contains security-related templates for MokoStandards repositories. diff --git a/templates/security/index.php b/templates/security/index.php index 9cee169..99c2fd6 100644 --- a/templates/security/index.php +++ b/templates/security/index.php @@ -5,6 +5,13 @@ * * SPDX-License-Identifier: GPL-3.0-or-later * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Templates.Security + * INGROUP: MokoStandards.Templates + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /templates/security/index.php + * BRIEF: Directory listing prevention script + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or diff --git a/templates/web/assets/css/app.css b/templates/web/assets/css/app.css index 22d3f31..94b7eef 100644 --- a/templates/web/assets/css/app.css +++ b/templates/web/assets/css/app.css @@ -1,9 +1,16 @@ /** * MokoStandards Web Interface - Material Design 3 - * + * * Copyright (C) 2026 Moko Consulting * SPDX-License-Identifier: GPL-3.0-or-later - * + * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Templates.Web + * INGROUP: MokoStandards.Templates + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /templates/web/assets/css/app.css + * BRIEF: Material Design 3 web interface stylesheet + * * Based on Material Design 3 (Material You) * https://m3.material.io/ */ diff --git a/tests/index.md b/tests/index.md index b50e6b4..c30ed84 100644 --- a/tests/index.md +++ b/tests/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /api/tests ## Purpose diff --git a/tests/test_circuit_breaker_handling.php b/tests/test_circuit_breaker_handling.php index e266609..2ea2f41 100644 --- a/tests/test_circuit_breaker_handling.php +++ b/tests/test_circuit_breaker_handling.php @@ -1,5 +1,19 @@ #!/usr/bin/env php + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Tests + * INGROUP: MokoStandards + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /tests/test_circuit_breaker_handling.php + * BRIEF: Circuit breaker handling tests + */ + /** * Test circuit breaker exception handling in bulk sync */ diff --git a/tests/test_enterprise_libraries.php b/tests/test_enterprise_libraries.php index a157206..8b8fcc6 100644 --- a/tests/test_enterprise_libraries.php +++ b/tests/test_enterprise_libraries.php @@ -2,6 +2,20 @@ declare(strict_types=1); +/* Copyright (C) 2026 Moko Consulting + * + * This file is part of a Moko Consulting project. + * + * SPDX-License-Identifier: GPL-3.0-or-later + * + * FILE INFORMATION + * DEFGROUP: MokoStandards.Tests + * INGROUP: MokoStandards + * REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform + * PATH: /tests/test_enterprise_libraries.php + * BRIEF: Enterprise library tests + */ + require_once __DIR__ . '/../../vendor/autoload.php'; use MokoEnterprise\MetricsCollector; diff --git a/validate/SECURITY_SCANNING.md b/validate/SECURITY_SCANNING.md index 38e5154..803fb07 100644 --- a/validate/SECURITY_SCANNING.md +++ b/validate/SECURITY_SCANNING.md @@ -1,3 +1,14 @@ + + # Security Scanning Guide **Version**: 01.00.00 | **Status**: Active | **Last Updated**: 2026-01-28 diff --git a/validate/index.md b/validate/index.md index 0cc29a3..beda89d 100644 --- a/validate/index.md +++ b/validate/index.md @@ -1,3 +1,14 @@ + + # Docs Index: /api/validate ## Purpose -- 2.52.0 From 0e273dae96835a5f529cfad6a7c94ca167315df4 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Mon, 11 May 2026 17:12:47 -0500 Subject: [PATCH 6/6] feat: add license header check to repo health (15 pts) New 'License Headers' category in check_repo_health.php: - Copyright headers present (>=80% of source files, 5 pts) - SPDX-License-Identifier present (>=80%, 5 pts) - FILE INFORMATION block present (>=70%, 5 pts) Scans PHP, TS, CSS, and YAML files, excluding vendor/node_modules/dist. Total health score now 155 pts (was 140). Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) --- validate/check_repo_health.php | 68 ++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/validate/check_repo_health.php b/validate/check_repo_health.php index cd0110c..4f09810 100755 --- a/validate/check_repo_health.php +++ b/validate/check_repo_health.php @@ -15,6 +15,7 @@ * Required Files (40) — README, LICENSE, CHANGELOG, CONTRIBUTING, SECURITY, CLAUDE.md, .gitignore, Makefile * Manifest & Config (20) — .moko-platform, workflows, README quality, CODE_OF_CONDUCT, .gitignore content, CLAUDE.md quality * Documentation (15) — wiki-first: docs/ must NOT exist, CHANGELOG [Unreleased] + * License Headers (15) — Copyright, SPDX, FILE INFORMATION in source files * Disallowed (10) — TODO.md, vendor/, node_modules/, .claude/, .mcp.json, renovate.json, profile.ps1 * Workflows (15) — repo-health, sync-roadmap-wiki, CI/deploy * Security (20) — SECURITY.md, scanning, no renovate.json, no secrets @@ -73,6 +74,7 @@ class RepoHealthChecker extends CliFramework $this->section('Required Files'); $this->checkRequiredFiles($path); $this->section('Manifest & Config'); $this->checkManifest($path); $this->section('Documentation'); $this->checkDocumentation($path); + $this->section('License Headers'); $this->checkLicenseHeaders($path); $this->section('Disallowed Items'); $this->checkDisallowed($path); $this->section('Workflows'); $this->checkWorkflows($path); $this->section('Security'); $this->checkSecurity($path); @@ -177,6 +179,72 @@ class RepoHealthChecker extends CliFramework $hasUnreleased, 5); } + // ── License Headers (15 pts) ──────────────────────────────────── + + private function checkLicenseHeaders(string $p): void + { + $cat = 'license_headers'; + $this->initCategory($cat, 'License Headers', 15); + + // Collect source files by scanning directories + $extensions = ['php', 'ts', 'css', 'yml', 'yaml']; + $files = []; + $dirs = [$p]; + while ($dirs) { + $dir = array_pop($dirs); + $base = basename($dir); + if (in_array($base, ['vendor', 'node_modules', 'dist', '.git'], true)) continue; + $items = @scandir($dir); + if (!$items) continue; + foreach ($items as $item) { + if ($item === '.' || $item === '..') continue; + $full = "{$dir}/{$item}"; + if (is_dir($full)) { $dirs[] = $full; continue; } + $ext = pathinfo($item, PATHINFO_EXTENSION); + if (in_array($ext, $extensions, true)) { + $files[] = $full; + } + } + } + + $total = count($files); + $withCopyright = 0; + $withSpdx = 0; + $withFileInfo = 0; + + foreach ($files as $fullPath) { + $header = ''; + $handle = @fopen($fullPath, 'r'); + if (!$handle) continue; + for ($j = 0; $j < 20 && !feof($handle); $j++) { + $header .= (string) fgets($handle); + } + fclose($handle); + + if (str_contains($header, 'Copyright')) $withCopyright++; + if (str_contains($header, 'SPDX-License-Identifier:')) $withSpdx++; + if (str_contains($header, 'FILE INFORMATION') || + str_contains($header, 'DEFGROUP:') || + str_contains($header, 'BRIEF:')) $withFileInfo++; + } + + if ($total === 0) { + $this->addCheck($cat, 'No source files found', true, 15); + return; + } + + $copyrightPct = $withCopyright / $total * 100; + $spdxPct = $withSpdx / $total * 100; + $fileInfoPct = $withFileInfo / $total * 100; + + $this->addCheck($cat, sprintf('Copyright headers (%.0f%% of %d files)', $copyrightPct, $total), + $copyrightPct >= 80, 5); + $this->addCheck($cat, sprintf('SPDX-License-Identifier (%.0f%%)', $spdxPct), + $spdxPct >= 80, 5); + $this->addCheck($cat, sprintf('FILE INFORMATION block (%.0f%%)', $fileInfoPct), + $fileInfoPct >= 70, 5); + } + // ── Disallowed Items (10 pts) ──────────────────────────────────── private function checkDisallowed(string $p): void -- 2.52.0