From c4fc5fd0b9451e8a00cec5b7338f35160f1ddcc8 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Mon, 13 Jul 2026 10:22:01 -0500 Subject: [PATCH] chore: MokoGitea + MokoCLI/mokocli rebrand, metadata via API, AI-client files Applied on canonical Gitea main. MokoStandards retired; MokoCLI branding (lowercase mokocli URLs); Gitea->MokoGitea; metadata via MokoGitea Metadata field (API); .mokogitea/GEMINI.md + MOKOAI.md; gitignore AI entries. Authored-by: Moko Consulting --- .gitattributes | 2 +- .gitignore | 8 +++ .mokogitea/GEMINI.md | 51 +++++++++++++++++++ .mokogitea/ISSUE_TEMPLATE/config.yml | 4 +- .mokogitea/ISSUE_TEMPLATE/documentation.md | 2 +- .mokogitea/ISSUE_TEMPLATE/feature_request.md | 2 +- .mokogitea/ISSUE_TEMPLATE/security.md | 2 +- .mokogitea/MOKOAI.md | 51 +++++++++++++++++++ .mokogitea/branch-protection.yml | 10 ++-- .mokogitea/workflows/auto-bump.yml | 8 +-- .mokogitea/workflows/auto-release.yml | 12 ++--- .mokogitea/workflows/branch-cleanup.yml | 4 +- .mokogitea/workflows/ci-generic.yml | 4 +- .mokogitea/workflows/ci-issue-reporter.yml | 6 +-- .mokogitea/workflows/cleanup.yml | 6 +-- .mokogitea/workflows/gitleaks.yml | 4 +- .mokogitea/workflows/issue-branch.yml | 2 +- .mokogitea/workflows/mcp-auto-release.yml | 4 +- .mokogitea/workflows/notify.yml | 6 +-- .mokogitea/workflows/pr-check.yml | 15 ++++-- .mokogitea/workflows/pre-release.yml | 8 +-- .mokogitea/workflows/rc-revert.yml | 4 +- .mokogitea/workflows/repo-health.yml | 4 +- .mokogitea/workflows/version-set.yml | 2 +- .../workflows/workflow-sync-trigger.yml | 8 +-- CLAUDE.md | 6 +-- CONTRIBUTING.md | 2 +- LICENSE | 6 +-- README.md | 6 +-- 29 files changed, 182 insertions(+), 67 deletions(-) create mode 100644 .mokogitea/GEMINI.md create mode 100644 .mokogitea/MOKOAI.md diff --git a/.gitattributes b/.gitattributes index b01309b..9d6ce14 100644 --- a/.gitattributes +++ b/.gitattributes @@ -41,7 +41,7 @@ # CI and automation .github/ export-ignore .github/workflows/ export-ignore -.gitea/ export-ignore +.mokogitea/ export-ignore .gitlab/ export-ignore # Development and tooling diff --git a/.gitignore b/.gitignore index e96bf8e..14df317 100644 --- a/.gitignore +++ b/.gitignore @@ -205,6 +205,14 @@ hypothesis/ profile.ps1 .mcp.json +# ============================================================ +# AI client working directories and instruction files +# ============================================================ +.gemini/ +.mokoai/ +/GEMINI.md +/MOKOAI.md + # ============================================================ # Local wiki clone (not version controlled) # ============================================================ diff --git a/.mokogitea/GEMINI.md b/.mokogitea/GEMINI.md new file mode 100644 index 0000000..dedc400 --- /dev/null +++ b/.mokogitea/GEMINI.md @@ -0,0 +1,51 @@ +# {{REPO_NAME}} + +{{REPO_DESCRIPTION}} + +> AI-client instructions for **Gemini**. Mirrors `.mokogitea/CLAUDE.md` — keep CLAUDE.md, GEMINI.md, and MOKOAI.md in sync. + +## First-Run Setup + +> Before starting any work, complete these steps: +> +> 1. Replace all `{{REPO_NAME}}` placeholders with the actual repository name +> 2. Replace `{{REPO_DESCRIPTION}}` with a one-line project description +> 3. Replace `{{PLATFORM_TYPE}}` with the project type (e.g. `generic`, `nodejs`, `python`) +> 4. Replace `{{PRIMARY_LANGUAGE}}` with the dominant language +> 5. Set repository metadata via the MokoGitea **Metadata** field — repository **Settings → Metadata**, or the REST API `PUT /api/v1/repos/{owner}/{repo}/manifest` (identity, platform, language, package-type, entry-point). There is no metadata file in the repo. +> 6. Update the **Architecture** section for your project +> 7. Update the Commands section with actual build commands +> 8. Delete this setup block after completing all steps +> 9. Commit: `chore: initialize {{REPO_NAME}}` + +## Quick Reference + +| Field | Value | +|---|---| +| **Platform** | {{PLATFORM_TYPE}} | +| **Language** | {{PRIMARY_LANGUAGE}} | +| **Branch** | develop on `dev`, merge to `main` (protected) | +| **Wiki** | [Wiki](https://git.mokoconsulting.tech/MokoConsulting/{{REPO_NAME}}/wiki) | + +## Commands + +```bash +make build # Build the project +make lint # Run linters +make validate # Validate structure +make release # Full release pipeline +make clean # Clean build artifacts +``` + +## Architecture + + + +## Rules + +- **Never commit** `.gemini/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js` +- **Attribution**: `Authored-by: Moko Consulting` +- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`) +- **Metadata**: set via the MokoGitea **Metadata** field (API / Settings → Metadata), never a committed manifest file +- **Wiki**: documentation lives in the MokoGitea wiki, not `docs/` files +- **Standards**: [MokoCLI](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home) diff --git a/.mokogitea/ISSUE_TEMPLATE/config.yml b/.mokogitea/ISSUE_TEMPLATE/config.yml index ef3e244..c52380c 100644 --- a/.mokogitea/ISSUE_TEMPLATE/config.yml +++ b/.mokogitea/ISSUE_TEMPLATE/config.yml @@ -7,8 +7,8 @@ contact_links: - name: 💬 Ask a Question url: https://mokoconsulting.tech/ about: Get help or ask questions through our website - - name: 📚 MokoStandards Documentation - url: https://git.mokoconsulting.tech/MokoConsulting/MokoCLI + - name: 📚 MokoCLI Documentation + url: https://git.mokoconsulting.tech/MokoConsulting/mokocli about: View our coding standards and best practices - name: 🔒 Report a Security Vulnerability url: https://git.mokoconsulting.tech/MokoConsulting/.github-private/security/advisories/new diff --git a/.mokogitea/ISSUE_TEMPLATE/documentation.md b/.mokogitea/ISSUE_TEMPLATE/documentation.md index ed4dabc..8156651 100644 --- a/.mokogitea/ISSUE_TEMPLATE/documentation.md +++ b/.mokogitea/ISSUE_TEMPLATE/documentation.md @@ -42,7 +42,7 @@ Suggested text here ## Standards Alignment -- [ ] Follows MokoStandards documentation guidelines +- [ ] Follows MokoCLI documentation guidelines - [ ] Uses en_US/en_GB localization - [ ] Includes proper SPDX headers where applicable diff --git a/.mokogitea/ISSUE_TEMPLATE/feature_request.md b/.mokogitea/ISSUE_TEMPLATE/feature_request.md index 7b76dc9..650523c 100644 --- a/.mokogitea/ISSUE_TEMPLATE/feature_request.md +++ b/.mokogitea/ISSUE_TEMPLATE/feature_request.md @@ -37,7 +37,7 @@ If you have ideas about how this could be implemented, share them here: Add any other context, mockups, or screenshots about the feature request here. ## Relevant Standards -Does this relate to any standards in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)? +Does this relate to any standards in [MokoCLI](https://git.mokoconsulting.tech/MokoConsulting/mokocli)? - [ ] Accessibility (WCAG 2.1 AA) - [ ] Localization (en_US/en_GB) - [ ] Security best practices diff --git a/.mokogitea/ISSUE_TEMPLATE/security.md b/.mokogitea/ISSUE_TEMPLATE/security.md index f57b284..37a266d 100644 --- a/.mokogitea/ISSUE_TEMPLATE/security.md +++ b/.mokogitea/ISSUE_TEMPLATE/security.md @@ -35,7 +35,7 @@ Use this template only for: ## Standards Reference -Does this relate to security standards in [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoStandards)? +Does this relate to security standards in [MokoCLI](https://git.mokoconsulting.tech/MokoConsulting/mokocli)? - [ ] SPDX license identifiers - [ ] Secret management - [ ] Dependency security diff --git a/.mokogitea/MOKOAI.md b/.mokogitea/MOKOAI.md new file mode 100644 index 0000000..87c029e --- /dev/null +++ b/.mokogitea/MOKOAI.md @@ -0,0 +1,51 @@ +# {{REPO_NAME}} + +{{REPO_DESCRIPTION}} + +> AI-client instructions for **MokoAI**. Mirrors `.mokogitea/CLAUDE.md` — keep CLAUDE.md, GEMINI.md, and MOKOAI.md in sync. + +## First-Run Setup + +> Before starting any work, complete these steps: +> +> 1. Replace all `{{REPO_NAME}}` placeholders with the actual repository name +> 2. Replace `{{REPO_DESCRIPTION}}` with a one-line project description +> 3. Replace `{{PLATFORM_TYPE}}` with the project type (e.g. `generic`, `nodejs`, `python`) +> 4. Replace `{{PRIMARY_LANGUAGE}}` with the dominant language +> 5. Set repository metadata via the MokoGitea **Metadata** field — repository **Settings → Metadata**, or the REST API `PUT /api/v1/repos/{owner}/{repo}/manifest` (identity, platform, language, package-type, entry-point). There is no metadata file in the repo. +> 6. Update the **Architecture** section for your project +> 7. Update the Commands section with actual build commands +> 8. Delete this setup block after completing all steps +> 9. Commit: `chore: initialize {{REPO_NAME}}` + +## Quick Reference + +| Field | Value | +|---|---| +| **Platform** | {{PLATFORM_TYPE}} | +| **Language** | {{PRIMARY_LANGUAGE}} | +| **Branch** | develop on `dev`, merge to `main` (protected) | +| **Wiki** | [Wiki](https://git.mokoconsulting.tech/MokoConsulting/{{REPO_NAME}}/wiki) | + +## Commands + +```bash +make build # Build the project +make lint # Run linters +make validate # Validate structure +make release # Full release pipeline +make clean # Clean build artifacts +``` + +## Architecture + + + +## Rules + +- **Never commit** `.mokoai/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js` +- **Attribution**: `Authored-by: Moko Consulting` +- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`) +- **Metadata**: set via the MokoGitea **Metadata** field (API / Settings → Metadata), never a committed manifest file +- **Wiki**: documentation lives in the MokoGitea wiki, not `docs/` files +- **Standards**: [MokoCLI](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home) diff --git a/.mokogitea/branch-protection.yml b/.mokogitea/branch-protection.yml index bb1a256..ca631ee 100644 --- a/.mokogitea/branch-protection.yml +++ b/.mokogitea/branch-protection.yml @@ -2,9 +2,9 @@ # SPDX-License-Identifier: GPL-3.0-or-later # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow -# INGROUP: mokocli.Automation -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCLI -# PATH: /.gitea/workflows/branch-protection.yml +# INGROUP: MokoCLI.Automation +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli +# PATH: /.mokogitea/workflows/branch-protection.yml # BRIEF: Apply standardised branch protection rules to all governed repositories # # +========================================================================+ @@ -62,8 +62,8 @@ jobs: API="${GITEA_URL}/api/v1" # Platform/standards/infra repos to exclude - EXCLUDE="gitea-org-config org-profile gitea-private .mokogitea-private MokoStandards mokocli MokoTesting" - EXCLUDE="$EXCLUDE MokoStandards-Template-Client MokoStandards-Template-Dolibarr MokoStandards-Template-Generic MokoStandards-Template-Joomla MokoDoliProjTemplate" + EXCLUDE="gitea-org-config org-profile gitea-private .mokogitea-private mokocli MokoTesting" + EXCLUDE="$EXCLUDE Template-Client Template-Dolibarr Template-Generic Template-Joomla MokoDoliProjTemplate" if [ -n "${{ inputs.repos }}" ]; then # User-specified repos diff --git a/.mokogitea/workflows/auto-bump.yml b/.mokogitea/workflows/auto-bump.yml index c888f77..a47661a 100644 --- a/.mokogitea/workflows/auto-bump.yml +++ b/.mokogitea/workflows/auto-bump.yml @@ -4,8 +4,8 @@ # # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow -# INGROUP: mokocli.Release -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCLI +# INGROUP: MokoCLI.Release +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /.mokogitea/workflows/auto-bump.yml # VERSION: 09.02.00 # BRIEF: Auto patch-bump version on every push to dev (skips merge commits) @@ -43,7 +43,7 @@ jobs: token: ${{ secrets.MOKOGITEA_TOKEN }} fetch-depth: 1 - - name: Setup mokocli tools + - name: Setup MokoCLI tools run: | if ! command -v composer &> /dev/null; then sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer >/dev/null 2>&1 @@ -52,7 +52,7 @@ jobs: echo "MOKO_CLI=/opt/mokocli/cli" >> "$GITHUB_ENV" else git clone --depth 1 --branch main --quiet \ - "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/MokoConsulting/MokoCLI.git" \ + "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/MokoConsulting/mokocli.git" \ /tmp/mokocli cd /tmp/mokocli && composer install --no-dev --no-interaction --quiet echo "MOKO_CLI=/tmp/mokocli/cli" >> "$GITHUB_ENV" diff --git a/.mokogitea/workflows/auto-release.yml b/.mokogitea/workflows/auto-release.yml index 72d93ca..a40703c 100644 --- a/.mokogitea/workflows/auto-release.yml +++ b/.mokogitea/workflows/auto-release.yml @@ -4,8 +4,8 @@ # # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow -# INGROUP: mokocli.Release -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCLI +# INGROUP: MokoCLI.Release +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /templates/workflows/universal/auto-release.yml.template # VERSION: 05.00.00 # BRIEF: Universal build & release � detects platform from manifest.xml @@ -76,7 +76,7 @@ jobs: token: ${{ secrets.MOKOGITEA_TOKEN }} fetch-depth: 1 - - name: Setup mokocli tools + - name: Setup MokoCLI tools env: MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting @@ -90,7 +90,7 @@ jobs: sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1 fi rm -rf /tmp/mokocli - CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoCLI.git + CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/mokocli.git git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli cd /tmp/mokocli composer install --no-dev --no-interaction --quiet @@ -193,7 +193,7 @@ jobs: fi echo "No conflict markers found" - - name: Setup mokocli tools + - name: Setup MokoCLI tools env: MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting @@ -208,7 +208,7 @@ jobs: sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1 fi rm -rf /tmp/mokocli - CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoCLI.git + CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/mokocli.git git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli cd /tmp/mokocli composer install --no-dev --no-interaction --quiet diff --git a/.mokogitea/workflows/branch-cleanup.yml b/.mokogitea/workflows/branch-cleanup.yml index 1cb1222..4b3e81b 100644 --- a/.mokogitea/workflows/branch-cleanup.yml +++ b/.mokogitea/workflows/branch-cleanup.yml @@ -4,8 +4,8 @@ # # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow -# INGROUP: MokoStandards.Universal -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCLI +# INGROUP: MokoCLI.Universal +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /.mokogitea/workflows/branch-cleanup.yml # VERSION: 01.00.00 # BRIEF: Delete feature branches after PR merge diff --git a/.mokogitea/workflows/ci-generic.yml b/.mokogitea/workflows/ci-generic.yml index 1fb0113..f0ba70a 100644 --- a/.mokogitea/workflows/ci-generic.yml +++ b/.mokogitea/workflows/ci-generic.yml @@ -4,9 +4,9 @@ # # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow -# INGROUP: MokoStandards.CI +# INGROUP: MokoCLI.CI # REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic -# PATH: /.gitea/workflows/ci-generic.yml +# PATH: /.mokogitea/workflows/ci-generic.yml # VERSION: 01.00.00 # BRIEF: CI pipeline — lint, validate, and test for generic projects (PHP + Node.js) diff --git a/.mokogitea/workflows/ci-issue-reporter.yml b/.mokogitea/workflows/ci-issue-reporter.yml index 4a5198f..335e92f 100644 --- a/.mokogitea/workflows/ci-issue-reporter.yml +++ b/.mokogitea/workflows/ci-issue-reporter.yml @@ -4,8 +4,8 @@ # # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow -# INGROUP: mokocli.Universal -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCLI +# INGROUP: MokoCLI.Universal +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /.mokogitea/workflows/ci-issue-reporter.yml # VERSION: 01.00.00 # BRIEF: Reusable workflow — creates/updates a MokoGitea issue when a CI gate fails. @@ -52,7 +52,7 @@ jobs: MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} run: | MOKOGITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}" - git clone --depth 1 --filter=blob:none --sparse "${MOKOGITEA_URL}/MokoConsulting/MokoCLI.git" /tmp/mokocli + git clone --depth 1 --filter=blob:none --sparse "${MOKOGITEA_URL}/MokoConsulting/mokocli.git" /tmp/mokocli cd /tmp/mokocli && git sparse-checkout set cli/ci_issue_reporter.sh - name: Report CI failure diff --git a/.mokogitea/workflows/cleanup.yml b/.mokogitea/workflows/cleanup.yml index 942e982..e2cca0e 100644 --- a/.mokogitea/workflows/cleanup.yml +++ b/.mokogitea/workflows/cleanup.yml @@ -4,9 +4,9 @@ # # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow -# INGROUP: MokoStandards.Maintenance -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards -# PATH: /.gitea/workflows/cleanup.yml +# INGROUP: MokoCLI.Maintenance +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli +# PATH: /.mokogitea/workflows/cleanup.yml # VERSION: 01.00.00 # BRIEF: Scheduled cleanup — delete merged branches and old workflow runs diff --git a/.mokogitea/workflows/gitleaks.yml b/.mokogitea/workflows/gitleaks.yml index 5c1d05d..23b843e 100644 --- a/.mokogitea/workflows/gitleaks.yml +++ b/.mokogitea/workflows/gitleaks.yml @@ -4,8 +4,8 @@ # # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow -# INGROUP: MokoStandards.Security -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API +# INGROUP: MokoCLI.Security +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /templates/workflows/gitleaks.yml.template # VERSION: 01.00.00 # BRIEF: Secret scanning — detect leaked credentials, API keys, and tokens diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogitea/workflows/issue-branch.yml index eb67f8f..12a4b11 100644 --- a/.mokogitea/workflows/issue-branch.yml +++ b/.mokogitea/workflows/issue-branch.yml @@ -4,7 +4,7 @@ # # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow -# INGROUP: mokocli.Automation +# INGROUP: MokoCLI.Automation # VERSION: 01.00.00 # BRIEF: Auto-create feature branch when an issue is opened diff --git a/.mokogitea/workflows/mcp-auto-release.yml b/.mokogitea/workflows/mcp-auto-release.yml index b454ae9..8369e41 100644 --- a/.mokogitea/workflows/mcp-auto-release.yml +++ b/.mokogitea/workflows/mcp-auto-release.yml @@ -88,13 +88,13 @@ jobs: done # ── Version ────────────────────────────────────────────────────── - - name: Setup mokocli tools + - name: Setup MokoCLI tools env: GH_TOKEN: ${{ secrets.GH_TOKEN || github.token }} COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GH_TOKEN || github.token }}"}}' run: | git clone --depth 1 --branch version/04 --quiet \ - "https://x-access-token:${GH_TOKEN}@github.com/MokoConsulting/MokoCLI.git" \ + "https://x-access-token:${GH_TOKEN}@github.com/MokoConsulting/mokocli.git" \ /tmp/mokostandards cd /tmp/mokostandards composer install --no-dev --no-interaction --quiet diff --git a/.mokogitea/workflows/notify.yml b/.mokogitea/workflows/notify.yml index 0c450f3..b048dd3 100644 --- a/.mokogitea/workflows/notify.yml +++ b/.mokogitea/workflows/notify.yml @@ -4,9 +4,9 @@ # # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow -# INGROUP: MokoStandards.Notifications -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards -# PATH: /.gitea/workflows/notify.yml +# INGROUP: MokoCLI.Notifications +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli +# PATH: /.mokogitea/workflows/notify.yml # VERSION: 01.00.00 # BRIEF: Push notifications via ntfy on release success or workflow failure diff --git a/.mokogitea/workflows/pr-check.yml b/.mokogitea/workflows/pr-check.yml index 086d82b..f817c8b 100644 --- a/.mokogitea/workflows/pr-check.yml +++ b/.mokogitea/workflows/pr-check.yml @@ -4,8 +4,8 @@ # # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow -# INGROUP: mokocli.CI -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCLI +# INGROUP: MokoCLI.CI +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /templates/workflows/universal/pr-check.yml.template # VERSION: 09.23.00 # BRIEF: PR gate — branch policy + code validation before merge @@ -146,10 +146,15 @@ jobs: - name: Detect platform id: platform + env: + MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} + MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} run: | - # Read platform from XML manifest ( tag) or plain text fallback - PLATFORM=$(sed -n 's/.*\([^<]*\)<\/platform>.*/\1/p' .mokogitea/manifest.xml 2>/dev/null | head -1) - [ -z "$PLATFORM" ] && PLATFORM=$(cat .mokogitea/manifest.xml 2>/dev/null | tr -d '[:space:]') + # Read platform from the MokoGitea Metadata field (Settings → Metadata, + # API: PUT/GET /api/v1/repos/{owner}/{repo}/manifest). No committed metadata file. + META=$(curl -s -H "Authorization: token ${MOKOGITEA_TOKEN}" \ + "${MOKOGITEA_URL}/api/v1/repos/${GITHUB_REPOSITORY}/manifest" 2>/dev/null || true) + PLATFORM=$(printf '%s' "$META" | sed -n 's/.*\([^<]*\)<\/platform>.*/\1/p' | head -1) [ -z "$PLATFORM" ] && PLATFORM="generic" echo "platform=$PLATFORM" >> "$GITHUB_OUTPUT" diff --git a/.mokogitea/workflows/pre-release.yml b/.mokogitea/workflows/pre-release.yml index cc1dd70..42cd283 100644 --- a/.mokogitea/workflows/pre-release.yml +++ b/.mokogitea/workflows/pre-release.yml @@ -4,8 +4,8 @@ # # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow -# INGROUP: mokocli.Release -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCLI +# INGROUP: MokoCLI.Release +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /templates/workflows/universal/pre-release.yml.template # VERSION: 05.02.00 # BRIEF: Auto pre-release on push to dev/alpha/beta/rc branches @@ -65,7 +65,7 @@ jobs: run: | git submodule foreach --quiet 'git checkout main && git pull --quiet origin main' 2>/dev/null || true - - name: Setup mokocli tools + - name: Setup MokoCLI tools env: MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting @@ -80,7 +80,7 @@ jobs: sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1 fi rm -rf /tmp/mokocli - CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoCLI.git + CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/mokocli.git git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli cd /tmp/mokocli && composer install --no-dev --no-interaction --quiet echo MOKO_CLI=/tmp/mokocli/cli >> $GITHUB_ENV diff --git a/.mokogitea/workflows/rc-revert.yml b/.mokogitea/workflows/rc-revert.yml index 59eab16..8874441 100644 --- a/.mokogitea/workflows/rc-revert.yml +++ b/.mokogitea/workflows/rc-revert.yml @@ -4,8 +4,8 @@ # # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow -# INGROUP: mokocli.Universal -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCLI +# INGROUP: MokoCLI.Universal +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /.mokogitea/workflows/rc-revert.yml # VERSION: 09.23.00 # BRIEF: Rename rc/ branch back to dev/ when PR is closed without merge diff --git a/.mokogitea/workflows/repo-health.yml b/.mokogitea/workflows/repo-health.yml index c155a6a..31736e8 100644 --- a/.mokogitea/workflows/repo-health.yml +++ b/.mokogitea/workflows/repo-health.yml @@ -7,8 +7,8 @@ # # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow -# INGROUP: mokocli.Validation -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCLI +# INGROUP: MokoCLI.Validation +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /templates/workflows/joomla/repo_health.yml.template # VERSION: 09.23.00 # BRIEF: Enforces repository guardrails by validating scripts governance, tooling availability, and core repository health artifacts. diff --git a/.mokogitea/workflows/version-set.yml b/.mokogitea/workflows/version-set.yml index 36b7a04..172c085 100644 --- a/.mokogitea/workflows/version-set.yml +++ b/.mokogitea/workflows/version-set.yml @@ -4,7 +4,7 @@ # # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow.Template -# INGROUP: MokoStandards.CI +# INGROUP: MokoCLI.CI # REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Joomla # PATH: /.mokogitea/workflows/version-set.yml # VERSION: 01.00.00 diff --git a/.mokogitea/workflows/workflow-sync-trigger.yml b/.mokogitea/workflows/workflow-sync-trigger.yml index 4a94caf..ddc21a6 100644 --- a/.mokogitea/workflows/workflow-sync-trigger.yml +++ b/.mokogitea/workflows/workflow-sync-trigger.yml @@ -4,8 +4,8 @@ # # FILE INFORMATION # DEFGROUP: MokoGitea.Workflow -# INGROUP: mokocli.Universal -# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoCLI +# INGROUP: MokoCLI.Universal +# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # PATH: /.mokogitea/workflows/workflow-sync-trigger.yml # VERSION: 01.01.00 # BRIEF: Trigger workflow sync to live repos when a PR is merged to main @@ -48,12 +48,12 @@ jobs: echo "platform=$PLATFORM" >> "$GITHUB_OUTPUT" echo "Platform: ${PLATFORM:-all}" - - name: Clone mokocli + - name: Clone MokoCLI env: MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} run: | MOKOGITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}" - git clone --depth 1 "${MOKOGITEA_URL}/MokoConsulting/MokoCLI.git" /tmp/mokocli + git clone --depth 1 "${MOKOGITEA_URL}/MokoConsulting/mokocli.git" /tmp/mokocli - name: Install PHP run: | diff --git a/CLAUDE.md b/CLAUDE.md index 92f6ce7..3c11ba3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This file provides guidance to Claude Code when working with this repository. ## Project Overview -**Template-MCP** -- Template repository for creating MokoStandards-compliant MCP API servers +**Template-MCP** -- Template repository for creating MokoCLI-compliant MCP API servers | Field | Value | |---|---| @@ -13,7 +13,7 @@ This file provides guidance to Claude Code when working with this repository. | **Default branch** | main | | **License** | GPL-3.0-or-later | | **Wiki** | [Template-MCP Wiki](https://git.mokoconsulting.tech/MokoConsulting/Template-MCP/wiki) | -| **Standards** | [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoCLI/wiki/Home) | +| **Standards** | [MokoCLI](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home) | ## Common Commands @@ -49,4 +49,4 @@ This is an MCP (Model Context Protocol) server. Key files: - **Branch strategy**: develop on `dev`, merge to `main` for release - **Minification**: handled at build time (CI) and runtime (MokoMinifyHelper for Joomla templates) - **Wiki**: documentation lives in the MokoGitea wiki, not in `docs/` files -- **Standards**: this repo follows [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoCLI/wiki/Home) +- **Standards**: this repo follows [MokoCLI](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 18d83be..7d286f4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -150,7 +150,7 @@ Every repo maintains 5 standard release channel tags: - MokoGitea Actions runs all CI workflows - GitHub Actions are disabled on mirrored repos -- Workflows live in both `.github/workflows/` and `.gitea/workflows/` +- Workflows live in both `.github/workflows/` and `.mokogitea/workflows/` ### Update Servers (Joomla) diff --git a/LICENSE b/LICENSE index abeb1e8..ca1066e 100644 --- a/LICENSE +++ b/LICENSE @@ -11,9 +11,9 @@ You should have received a copy of the GNU General Public License (./LICENSE). # FILE INFORMATION - DEFGROUP: MokoStandards - INGROUP: MokoStandards.Documentation - REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards/ + DEFGROUP: MokoCLI + INGROUP: MokoCLI.Documentation + REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli/ VERSION: 05.00.00 PATH: ./LICENSE BRIEF: Project license (GPL-3.0-or-later) diff --git a/README.md b/README.md index 542a49d..7c5c408 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![Language](https://img.shields.io/badge/language-TypeScript-3178C6?style=flat-square&logo=typescript&logoColor=white) ![License](https://img.shields.io/badge/license-GPL--3.0--or--later-green?style=flat-square) ![Platform](https://img.shields.io/badge/platform-Node.js%20%7C%20MCP-339933?style=flat-square&logo=node.js&logoColor=white) ![Wiki](https://img.shields.io/badge/wiki-Template--MCP-blue?style=flat-square) -Template repository for creating MokoStandards-compliant Model Context Protocol (MCP) API servers. Provides the scaffolding, configuration patterns, and architecture conventions used by all Moko Consulting MCP servers, enabling AI assistants like Claude to interact with REST APIs through a standardized tool interface. +Template repository for creating MokoCLI-compliant Model Context Protocol (MCP) API servers. Provides the scaffolding, configuration patterns, and architecture conventions used by all Moko Consulting MCP servers, enabling AI assistants like Claude to interact with REST APIs through a standardized tool interface. ## Features @@ -11,7 +11,7 @@ Template repository for creating MokoStandards-compliant Model Context Protocol - **REST API bridge architecture** -- standardized pattern for bridging any REST API as MCP tools, with typed request/response handling - **TypeScript-first** -- full TypeScript setup with `tsconfig.json`, strict mode, and ES module output - **Build tooling** -- Makefile with `build`, `dev`, `clean`, and `lint` targets; npm scripts for compilation and development -- **MokoStandards compliant** -- follows all Moko Consulting governance conventions: file headers, commit messages, `.gitattributes`, `.gitmessage`, PR/issue templates +- **MokoCLI compliant** -- follows all Moko Consulting governance conventions: file headers, commit messages, `.gitattributes`, `.gitmessage`, PR/issue templates - **Example configuration** -- `config.example.json` demonstrates the connection configuration schema - **Documentation templates** -- wiki pages for API reference, architecture overview, and installation pre-generated @@ -77,7 +77,7 @@ This project is licensed under the GNU General Public License v3.0 or later -- s --- -*[Moko Consulting](https://mokoconsulting.tech) -- [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/MokoCLI/wiki/Home)* +*[Moko Consulting](https://mokoconsulting.tech) -- [MokoCLI](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home)* ## Template CI Notes -- 2.52.0