59 Commits

Author SHA1 Message Date
Jonathan Miller 34ef05bd6e refactor: fix definition drift — migrate to .mokogitea, rename templates/gitea → templates/mokogitea
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Blocked by required conditions
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Blocked by required conditions
Platform: moko-platform CI / Gate 4: Governance (push) Blocked by required conditions
Platform: moko-platform CI / Gate 5: Template Integrity (push) Blocked by required conditions
Platform: moko-platform CI / CI Summary (push) Blocked by required conditions
Generic: Repo Health / Release configuration (push) Blocked by required conditions
Generic: Repo Health / Scripts governance (push) Blocked by required conditions
Generic: Repo Health / Repository health (push) Blocked by required conditions
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 1s
Universal: Cascade Main → Dev / Cascade main → branches (push) Successful in 3s
Platform: moko-platform CI / Gate 1: Code Quality (push) Failing after 46s
- Replace all .github/workflows refs in definitions with .mokogitea/workflows
- Add all 13 universal workflows to every platform definition
- Fix ISSUE_TEMPLATE paths: .github/ → .mokogitea/
- Fix template source paths: templates/github/ → templates/mokogitea/
- Remove 60+ dead template references pointing to non-existent files
- Rename templates/gitea/ directory to templates/mokogitea/
- Add orphaned workflows (ci-platform, issue-branch) to definitions

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-26 23:21:42 -05:00
Jonathan Miller 8ae829ad89 feat: add live deploy target with multi-instance support to deploy-module.yml
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 1s
Universal: Cascade Main → Dev / Cascade main → branches (push) Successful in 3s
Platform: moko-platform CI / Gate 1: Code Quality (push) Failing after 44s
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Has been cancelled
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Has been cancelled
Platform: moko-platform CI / Gate 4: Governance (push) Has been cancelled
Platform: moko-platform CI / Gate 5: Template Integrity (push) Has been cancelled
Platform: moko-platform CI / CI Summary (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
- Add 'live' and 'all' options to server selector
- Live deploy reads LIVE_TARGETS JSON secret for multiple production instances
- Move dev/demo host config from hardcoded env to vars.*
- Add summary step for deploy reporting

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-26 16:55:32 -05:00
jmiller 857525268a feat: add dependency-audit.yml
Universal: Cascade Main → Dev / Cascade main → branches (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Authored-by: Moko Consulting
2026-05-19 20:47:16 +00:00
Jonathan Miller 3be806d5af feat: add deploy-module workflow template for Dolibarr module deployment
Symlink-based deployment: clones module repo, pins to stable tag,
creates symlink in htdocs/custom/. Uses org-level GA_TOKEN and
DEPLOY_SSH_KEY secrets.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-16 12:44:39 -05:00
Jonathan Miller 38a975ee57 chore: remove VERSION from all file header comments
Branch Policy Check / Verify merge target (pull_request) Successful in 0s
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) <noreply@anthropic.com>
2026-05-11 16:51:00 -05:00
Jonathan Miller 0e82802f0c feat(mcp): add mokostandards MCP server with 24 governance tools
Embeds an MCP server in mcp/ that exposes MokoStandards CLI tools as
AI assistant tools: platform detection, repo health checks, validation
(structure, headers, secrets, changelog, version consistency, enterprise
readiness, drift scan), Joomla/Dolibarr-specific checks, definitions
browser, policy/guide reader, and release notes generation.

Also adds McpServerPlugin, MCP platform detection, and MCP workflow
templates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-07 15:44:10 -05:00
Jonathan Miller 38c2536c7b feat: add PHPStan, Gitleaks, and Renovate — templates, workflows, and docs [skip ci]
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-07 14:56:02 -05:00
Jonathan Miller c332c3ae5c chore: remove templates/workflows — canonical source is now template repos
Workflow templates live in:
- MokoStandards-Template-Joomla/.gitea/workflows/
- MokoStandards-Template-Dolibarr/.gitea/workflows/
- MokoStandards-Template-Client/.gitea/workflows/
- MokoStandards-Template-Generic/.gitea/workflows/

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-02 18:15:49 -05:00
Jonathan Miller a4fbcc0f87 refactor: update sync engine to use new canonical workflow sources
- Replace old .template files with actual workflow YMLs from template repos
- Update RepositorySynchronizer to use new 10/11-workflow standard
- Remove legacy shared workflows (enterprise-firewall, auto-assign, etc.)
- Joomla workflows sourced from MokoStandards-Template-Joomla
- Dolibarr workflows sourced from MokoStandards-Template-Dolibarr

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-02 18:12:50 -05:00
Jonathan Miller abc08fb6f2 docs: update for consolidated Joomla template repo
- Update WORKFLOW_STANDARDS.md to reference MokoStandards-Template-Joomla
- Remove 6 obsolete sync definitions for deleted individual template repos
- Update sync commands to use unified template

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-02 17:41:28 -05:00
Jonathan Miller 65e3c6acb6 docs: update workflow architecture — .gitea only, stream tags, cascade, auto-detect [skip ci]
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 19:30:30 -05:00
Jonathan Miller 7800eadbd7 fix: Gitea compatibility for artifact uploads and bulk sync
- Guard upload-artifact@v4 / download-artifact@v4 with
  github.server_url == 'https://github.com' so they skip on Gitea
- Add Gitea fallbacks (checkout or log message) where artifacts are used
- Make enforce-tags step continue-on-error so sync doesn't fail on tag issues
- Replace upload-artifact in bulk-repo-sync with step summary on Gitea
- Fix escaped variable references in bulk-repo-sync.yml

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-26 18:38:52 -05:00
jmiller 5db19b1201 fix: remove tag_exists gate from Step 7 — blocks patch releases [skip ci] 2026-04-23 23:01:37 +00:00
jmiller bcec65d285 fix: remove already_released skip gate — blocks patch releases [skip ci] 2026-04-23 22:43:16 +00:00
jmiller 764451d003 fix: add updates.xml sync-to-main step for non-main branches [skip ci] 2026-04-23 19:31:17 +00:00
jmiller 4c9bb73765 ci: remove DEV_FTP_SUFFIX — path is now set per repo as full absolute path 2026-04-23 19:18:59 +00:00
jmiller 57539c7592 feat: support separate SSH hosts for dev/live deploys
DEPLOY_SSH_HOST for dev, LIVE_SSH_HOST for live (falls back to DEPLOY_SSH_HOST)
2026-04-23 19:11:24 +00:00
jmiller e7ac5f2c0b fix: support bare dev branch + push triggers in update-server [skip ci] 2026-04-23 18:03:36 +00:00
jmiller 2f4420ce8b docs: document cascade release channels and dev-release workflow [skip ci] 2026-04-23 17:41:18 +00:00
jmiller 6fce7e6569 docs: add deploy.yml.template to Joomla workflow index 2026-04-23 17:29:01 +00:00
jmiller 7f5aa2f7f4 feat: add SSH rsync auto-deploy workflow template for client repos 2026-04-23 17:28:33 +00:00
Jonathan Miller 4d5d7edee5 feat: auto-push main to GitHub mirror after release (Step 10)
Ensures updates.xml on GitHub stays in sync with Gitea.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 07:23:53 -05:00
Jonathan Miller 94da1e3a51 fix: remove tar.gz from updates.xml in update-server template
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 02:17:31 -05:00
Jonathan Miller f850377f99 fix: remove tar.gz from updates.xml — Joomla may download it instead of ZIP, causing SHA mismatch
tar.gz is still built and uploaded as release asset for manual download,
but only ZIP appears in updates.xml with matching SHA-256.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 02:04:23 -05:00
Jonathan Miller e40de18dbb fix: switch back to direct API file update for updates.xml sync
PR-based sync fails with branch protection requiring reviews.
Direct API update bypasses protection for bot commits.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 21:30:38 -05:00
Jonathan Miller c244790e44 fix: PR sync always runs, cleans up stale branches first
Removed conditional on CURRENT_BRANCH — workflow may be on version/XX
after archiving. Deletes stale PR branch before creating fresh one.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 04:29:26 -05:00
Jonathan Miller 327ffc7032 feat: release workflows run on dedicated 'release' runner
Updated auto-release and update-server templates + docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 04:14:16 -05:00
Jonathan Miller 87ba8bc1c7 fix: install PHP+Composer if missing (works on any runner image)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 03:52:25 -05:00
Jonathan Miller c3e989d150 feat: sync updates.xml to main via PR (respects branch protection)
Creates chore/update-xml-<version> branch, updates file, creates PR,
auto-merges, cleans up branch. Replaces direct API file push.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 03:16:21 -05:00
Jonathan Miller d146b5d51e fix: derive element from XML filename, not display name
Plugins like MokoWaaS have display name "System - MokoWaaS" but
element should be "mokowaas" (from mokowaas.xml filename).
Falls back to repo name for generic filenames like templateDetails.xml.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 02:45:31 -05:00
Jonathan Miller 4cf967f92b fix: stream-based tags (stable not vXX), derive element from repo name
- release_tag=stable instead of v${MAJOR}
- download URLs use /stable/ path
- Element fallback uses repo name not display name
- Updated channel-to-workflow docs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 02:19:03 -05:00
Jonathan Miller 4d99ab9a4e fix: git push -u origin HEAD for version branch (no upstream)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 21:33:11 -05:00
Jonathan Miller 617344c4d7 fix: GH_MIRROR_TOKEN → GH_TOKEN in all templates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 21:12:12 -05:00
Jonathan Miller b57de90cef fix: add VERSION header to updates.xml in all workflow templates
Auto-release and update-server now write the copyright + VERSION
comment header when generating/rebuilding updates.xml.
Updated updates.xml.template scaffold to match.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 21:09:04 -05:00
Jonathan Miller dbd7ec8ae6 fix: hardcode MokoStandards-API branch to main (remove {{standards_branch}} placeholder)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 21:03:21 -05:00
Jonathan Miller f30c0dc9f9 docs: update multi-channel architecture — cascading channel updates
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 16:50:10 -05:00
Jonathan Miller dcd22dcfdc feat: cascading update channels — stable updates all, rc updates rc+below, etc
Channels cascade downward:
- stable → development, alpha, beta, rc, stable
- rc → development, alpha, beta, rc
- beta → development, alpha, beta
- alpha → development, alpha
- development → development

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 16:49:33 -05:00
Jonathan Miller 14b4477ff2 docs: document auto-bump on all branches in multi-channel architecture
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 12:30:21 -05:00
Jonathan Miller 032c32637f feat: auto-bump patch on all branches including dev
Previously dev branches were excluded from auto-bump. Now all
stability branches (dev, alpha, beta, rc) bump patch automatically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 12:26:57 -05:00
Jonathan Miller 16a86a94b7 docs: add multi-channel updates.xml architecture, update Joomla template listings
- Add Multi-Channel updates.xml Architecture section to README.md
- Document auto-release.yml.template and update-server.yml.template
- Update joomla/index.md with current template inventory

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 12:17:46 -05:00
Jonathan Miller b68a23622a fix: remove patch 00 skip in auto-release template, all patches release
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-21 12:11:31 -05:00
Jonathan Miller 005ae12598 feat: MySQL export reads from config files, hardcode jmiller permissions
export-mysql.yml.template:
- Reads MySQL credentials from remote config files automatically:
  - Joomla: configuration.php ($user, $password, $db)
  - Dolibarr: conf/conf.php ($dolibarr_main_db_*)
- No MySQL secrets needed — credentials come from the app config
- Auto-detects platform (Joomla vs Dolibarr)
- Removed DEV_MYSQL_PASSWORD/DEMO_MYSQL_PASSWORD secret requirements

Permission hardcoding:
- Added ALLOWED_USERS="jmiller gitea-actions[bot]" to:
  deploy-demo, deploy-dev, deploy-rs, branch-freeze templates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 17:18:48 -05:00
Jonathan Miller 3834781899 feat: add pull-from-dev and export-mysql workflow templates
pull-from-dev.yml.template:
- Downloads files from dev server via rsync/SSH into repo src/
- Configurable via DEV_SSH_HOST, DEV_SSH_USERNAME, DEV_PULL_PATH vars
- Auth via DEV_SSH_KEY secret
- Dry-run mode, branch selection, diff preview

export-mysql.yml.template:
- Exports MySQL database from dev or demo server
- Supports both Joomla and Dolibarr environments
- Sanitizes PII: passwords (bcrypt), emails, sessions, API keys, tokens
- Preserves admin/moko emails, strips everything else
- Dolibarr-specific: clears api_key, pass_crypted, ldap_pass, oauth secrets
- Saves as artifact (30d retention) or commits to sql/exports/
- Configurable per environment (dev/demo) via org or repo variables

Required variables (org or repo):
- DEV_SSH_HOST, DEV_SSH_PORT, DEV_SSH_USERNAME
- DEV_MYSQL_DATABASE, DEV_MYSQL_USER
- Secrets: DEV_SSH_KEY, DEV_MYSQL_PASSWORD

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-19 15:02:01 -05:00
Jonathan Miller 784f423973 Fix remaining --jq, --paginate, --input flags in workflow templates
branch-freeze, repository-cleanup, manage-repo-templates converted
from gh CLI flags to curl/jq equivalents.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 17:03:33 -05:00
Jonathan Miller 4742dfcbec fix: rename update.xml → updates.xml across all definitions and templates
Standardizes the Joomla update server filename to `updates.xml` (plural)
across all .tf definitions, workflow templates, and automation scripts.
The singular `update.xml` was inconsistent with the Joomla convention
and the updates.xml.template already in use.

Files fixed: 16 (definitions, templates, automation scripts)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 15:39:21 -05:00
Jonathan Miller 5dff3346f0 Fix auto-release template: use Gitea API for main sync, auth push URL
- Replace git push to main with Gitea contents API (bypasses branch protection)
- Add authenticated push URL step after checkout
- Matches MokoCassiopeia release.yml pattern

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 12:53:23 -05:00
Jonathan Miller 029033c2f6 Fix: set authenticated push URL in auto-release template for branch protection 2026-04-18 12:34:43 -05:00
Jonathan Miller 700e0abaac Fix: auto-release pushes updates.xml to main for update server
When releasing from a non-main branch, updates.xml is cherry-picked
to main so the Joomla update server always serves current data.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 12:02:21 -05:00
Jonathan Miller bbadbfd2ad Fix: jmiller-moko→jmiller, --jq→pipe jq, github-actions→gitea-actions
Remaining cleanup across 12 workflow templates:
- repo_health, auto-assign, auto-dev-issue, branch-freeze,
  deploy-*, repository-cleanup, terraform templates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-18 11:39:44 -05:00
Jonathan Miller c3fe454eb6 Fix: remove sha256: prefix from update XML templates (Joomla expects raw hex) 2026-04-18 11:33:30 -05:00