diff --git a/cli/create_project.php b/cli/create_project.php index f7926ef..a80a733 100644 --- a/cli/create_project.php +++ b/cli/create_project.php @@ -95,6 +95,10 @@ class CreateProjectCli extends CliFramework $repoRoot = dirname(__DIR__, 2); $templatesDir = "{$repoRoot}/templates/projects"; + if (!is_dir($templatesDir)) { + $this->log('ERROR', "Project templates directory not found: {$templatesDir}"); + return 1; + } $repos = []; diff --git a/cli/release.php b/cli/release.php index ef059d4..8117395 100644 --- a/cli/release.php +++ b/cli/release.php @@ -131,19 +131,7 @@ class ReleaseCli extends CliFramework file_put_contents($bulkSyncFile, $bulkContent); } - // -- Step 5: Update repository-cleanup.yml current branch -- - echo "Updating repository-cleanup.yml -> chore/sync-mokostandards-v{$minorVersion}\n"; - if (!$this->dryRun) { - $cleanupContent = file_get_contents($cleanupFile); - $cleanupContent = preg_replace( - '/CURRENT="chore\/sync-mokostandards-v[^"]*"/', - "CURRENT=\"chore/sync-mokostandards-v{$minorVersion}\"", - $cleanupContent - ); - file_put_contents($cleanupFile, $cleanupContent); - } - - // -- Step 6: Commit changes -- + // -- Step 5: Commit changes -- if (!$this->dryRun) { echo "Committing...\n"; passthru("cd {$repoRoot} && git add -A && git commit -m \"chore(release): prepare {$currentVersion} release [skip ci]\""); diff --git a/lib/Enterprise/RepositorySynchronizer.php b/lib/Enterprise/RepositorySynchronizer.php index 51e0e57..8063079 100644 --- a/lib/Enterprise/RepositorySynchronizer.php +++ b/lib/Enterprise/RepositorySynchronizer.php @@ -1083,20 +1083,6 @@ class RepositorySynchronizer } } - // CODEOWNERS — GitHub only; Gitea doesn't enforce it - if ($this->adapter->getPlatformName() === 'github') { - $shared[] = ['templates/mokogitea/CODEOWNERS', '.github/CODEOWNERS']; - } - - // Platform-specific gitignore (merged, not replaced) - $gitignoreMap = [ - 'dolibarr' => 'templates/configs/gitignore.dolibarr', - 'platform' => 'templates/configs/gitignore.dolibarr', - 'joomla' => 'templates/configs/.gitignore.joomla', - ]; - $gitignoreTemplate = $gitignoreMap[$platform] ?? 'templates/configs/gitignore'; - $shared[] = [$gitignoreTemplate, '.gitignore']; - // Create TODO.md stub if it doesn't exist (gitignored after first commit) $entries[] = [ 'inline_content' => "# TODO\n\n> **Note:** This file is not tracked in " diff --git a/templates/client-provision-example.json b/templates/client-provision-example.json deleted file mode 100644 index 39bbfa9..0000000 --- a/templates/client-provision-example.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "exampleclient", - "org": "ExampleClient", - "gitea_url": "https://git.mokoconsulting.tech", - - "variables": { - "DEV_SYNC_HOST": "dev.exampleclient.com", - "DEV_SYNC_PORT": "22", - "DEV_SYNC_USER": "exampleclient", - "DEV_SYNC_PATH": "/home/exampleclient/dev.exampleclient.com", - "DEV_SITE_URL": "https://dev.exampleclient.com", - "LIVE_SSH_HOST": "iad1-shared-b7-01.dreamhost.com", - "LIVE_SSH_PORT": "22", - "LIVE_SSH_USER": "exampleclient", - "LIVE_SYNC_PATH": "/home/exampleclient/exampleclient.com", - "RS_FTP_PATH_SUFFIX": "exampleclient.com" - }, - - "secrets": { - "DEV_SYNC_KEY": "@keys/exampleclient-dev.pem", - "LIVE_SSH_KEY": "@keys/exampleclient-live.pem" - }, - - "monitoring": { - "urls": [ - "https://exampleclient.com", - "https://dev.exampleclient.com" - ], - "domains": [ - "exampleclient.com" - ], - "grafana_dashboard": "monitoring/grafana/client-joomla-dashboard.json", - "grafana_folder": "Clients" - } -} diff --git a/templates/config/issue-management-config.yml.template b/templates/config/issue-management-config.yml.template deleted file mode 100644 index 308bcd2..0000000 --- a/templates/config/issue-management-config.yml.template +++ /dev/null @@ -1,63 +0,0 @@ -# Enterprise Issue Management Configuration Template -# Copyright (C) 2026 Moko Consulting -# SPDX-License-Identifier: GPL-3.0-or-later -# -# Deploy to: .github/issue-management-config.yml - -version: "1.0.0" - -enterprise: - organization: - name: "ORGANIZATION_NAME" - default_assignees: - - "copilot" - - projects: - enabled: true - default_project_number: null - auto_add_issues: true - - milestones: - enabled: true - auto_assign: true - create_if_missing: true - - labels: - priority: - critical: - name: "priority/critical" - color: "d73a4a" - sla_hours: 4 - high: - name: "priority/high" - color: "ff9800" - sla_hours: 24 - medium: - name: "priority/medium" - color: "fbca04" - sla_hours: 72 - -automation: - create_on_branch: true - branch_patterns: - - "dev/**" - - "rc/**" - close_on_merge: true - close_on_branch_delete: true - link_prs_to_issues: true - create_sub_tasks_for_prs: true - -sla: - enabled: true - timezone: "UTC" - -audit: - enabled: true - retention_days: 365 - -metrics: - enabled: true - -error_handling: - retry_on_failure: true - max_retries: 3 diff --git a/templates/configs/.eslintrc.json b/templates/configs/.eslintrc.json deleted file mode 100644 index 351fe80..0000000 --- a/templates/configs/.eslintrc.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "env": { - "browser": true, - "es2021": true, - "node": true - }, - "extends": [ - "eslint:recommended" - ], - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "indent": ["error", 2], - "linebreak-style": ["error", "unix"], - "quotes": ["error", "single"], - "semi": ["error", "always"], - "no-unused-vars": ["warn"], - "no-console": ["warn", { "allow": ["warn", "error"] }], - "eqeqeq": ["error", "always"], - "curly": ["error", "all"], - "brace-style": ["error", "1tbs"], - "no-trailing-spaces": "error", - "no-multiple-empty-lines": ["error", { "max": 1 }], - "eol-last": ["error", "always"] - } -} diff --git a/templates/configs/.gitignore.joomla b/templates/configs/.gitignore.joomla deleted file mode 100644 index 625c77a..0000000 --- a/templates/configs/.gitignore.joomla +++ /dev/null @@ -1,220 +0,0 @@ -# ============================================================ -# Local task tracking (not version controlled) -# ============================================================ -TODO.md - -# ============================================================ -# Environment and secrets -# ============================================================ -.env -.env.local -.env.*.local -*.local.php -*.secret.php -configuration.php -configuration.*.php -configuration.local.php -conf/conf.php -conf/conf*.php -secrets/ -*.secrets.* - -# ============================================================ -# Logs, dumps and databases -# ============================================================ -*.db -*.db-journal -*.dump -*.log -*.pid -*.seed - - -# ============================================================ -# OS / Editor / IDE cruft -# ============================================================ -.DS_Store -Thumbs.db -desktop.ini -Thumbs.db:encryptable -ehthumbs.db -ehthumbs_vista.db -$RECYCLE.BIN/ -System Volume Information/ -*.lnk -Icon? -.idea/ -.settings/ -.claude/ -.claude-worktree*/ -.vscode/* -!.vscode/tasks.json -!.vscode/settings.json.example -!.vscode/extensions.json -*.code-workspace -*.sublime* -.project -.buildpath -.classpath -*.bak -*.swp -*.swo -*.tmp -*.old -*.orig - -# ============================================================ -# Dev scripts and scratch -# ============================================================ -TODO.md -todo* -*ffs* - -# ============================================================ -# SFTP / sync tools -# ============================================================ -sftp-config*.json -sftp-config.json.template -sftp-settings.json - -# ============================================================ -# Sublime SFTP / FTP sync -# ============================================================ -*.sublime-project -*.sublime-workspace -*.sublime-settings -.libsass.json -*.ffs* - -# ============================================================ -# Replit / cloud IDE -# ============================================================ -.replit -replit.md - -# ============================================================ -# Archives / release artifacts -# ============================================================ -*.7z -*.rar -*.tar -*.tar.gz -*.tgz -*.zip -artifacts/ -release/ -releases/ - -# ============================================================ -# Build outputs and site generators -# ============================================================ -.mkdocs-build/ -.cache/ -.parcel-cache/ -build/ -dist/ -out/ -/site/ -*.map -*.css.map -*.js.map -*.tsbuildinfo - -# ============================================================ -# CI / test artifacts -# ============================================================ -.coverage -.coverage.* -coverage/ -coverage.xml -htmlcov/ -junit.xml -reports/ -test-results/ -tests/_output/ -.github/local/ -.github/workflows/*.log - -# ============================================================ -# Node / JavaScript -# ============================================================ -node_modules/ -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -.pnpm-store/ -.yarn/ -.npmrc -.eslintcache -package-lock.json - -# ============================================================ -# PHP / Composer tooling -# ============================================================ -/vendor/ -!src/media/vendor/ -composer.lock -*.phar -codeception.phar -.phpunit.result.cache -.php_cs.cache -.php-cs-fixer.cache -.phpstan.cache -.phplint-cache -phpmd-cache/ -.psalm/ -.rector/ - -# ============================================================ -# Python -# ============================================================ -__pycache__/ -*.py[cod] -*.pyc -*$py.class -*.so -.Python -.eggs/ -*.egg -*.egg-info/ -.installed.cfg -MANIFEST -develop-eggs/ -downloads/ -eggs/ -parts/ -sdist/ -var/ -wheels/ -ENV/ -env/ -.venv/ -venv/ -.pytest_cache/ -.mypy_cache/ -.ruff_cache/ -.pyright/ -.tox/ -.nox/ -*.cover -*.coverage -hypothesis/ - -# ============================================================ -# Local wiki clone (not version controlled) -# ============================================================ -wiki/ - -# ============================================================ -# Joomla runtime / development -# ============================================================ -cache/ -tmp/ -logs/ -configuration.php -user.css -user.js -colors_custom.css -modulebuilder.txt -administrator/components/com_akeebabackup/backup/ diff --git a/templates/configs/.htmlhintrc b/templates/configs/.htmlhintrc deleted file mode 100644 index 866999f..0000000 --- a/templates/configs/.htmlhintrc +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "htmlhint:recommended", - "tagname-lowercase": true, - "attr-lowercase": true, - "attr-value-double-quotes": true, - "doctype-first": true, - "tag-pair": true, - "spec-char-escape": true, - "id-unique": true, - "src-not-empty": true, - "attr-no-duplication": true, - "title-require": true, - "alt-require": true, - "doctype-html5": true, - "style-disabled": false, - "inline-style-disabled": false, - "inline-script-disabled": false, - "space-tab-mixed-disabled": "space", - "id-class-ad-disabled": false, - "href-abs-or-rel": false, - "attr-unsafe-chars": true -} diff --git a/templates/configs/.prettierrc.json b/templates/configs/.prettierrc.json deleted file mode 100644 index ec18ce1..0000000 --- a/templates/configs/.prettierrc.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "semi": true, - "trailingComma": "es5", - "singleQuote": true, - "printWidth": 100, - "tabWidth": 2, - "useTabs": false, - "endOfLine": "lf", - "arrowParens": "always", - "bracketSpacing": true -} diff --git a/templates/configs/.pylintrc b/templates/configs/.pylintrc deleted file mode 100644 index 8479652..0000000 --- a/templates/configs/.pylintrc +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright (C) 2026 Moko Consulting -# -# This file is part of a Moko Consulting project. -# -# SPDX-License-Identifier: GPL-3.0-or-later - -# Pylint configuration for MokoCli projects - -[MASTER] -# Python code to execute, usually for sys.path manipulation -init-hook='import sys; sys.path.append(".")' - -# Use multiple processes to speed up Pylint -jobs=0 - -# Pickle collected data for later comparisons -persistent=yes - -# List of plugins (as comma separated values of python module names) -load-plugins= - -# Minimum Python version to use for version dependent checks -py-version=3.8 - -[MESSAGES CONTROL] -# Disable specific messages -disable= - missing-module-docstring, - missing-function-docstring, - too-few-public-methods, - too-many-arguments, - too-many-locals, - too-many-branches, - too-many-statements, - duplicate-code, - fixme - -[REPORTS] -# Set the output format -output-format=text - -# Tells whether to display a full report or only the messages -reports=no - -# Activate the evaluation score -score=yes - -[BASIC] -# Good variable names -good-names=i,j,k,ex,Run,_,id,pk - -# Regular expressions for acceptable names -variable-rgx=[a-z_][a-z0-9_]{0,30}$ -const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ -class-rgx=[A-Z_][a-zA-Z0-9]+$ -function-rgx=[a-z_][a-z0-9_]{1,50}$ -method-rgx=[a-z_][a-z0-9_]{1,50}$ - -[FORMAT] -# Maximum number of characters on a single line -max-line-length=100 - -# Maximum number of lines in a module -max-module-lines=1000 - -# String used for indentation -indent-string=' ' - -[DESIGN] -# Maximum number of arguments for function / method -max-args=7 - -# Maximum number of attributes for a class -max-attributes=10 - -[IMPORTS] -# Deprecated modules which should not be used -deprecated-modules=optparse,imp - -[CLASSES] -# List of method names used to declare instance attributes -defining-attr-methods=__init__,__new__,setUp - -# List of valid names for the first argument in a class method -valid-classmethod-first-arg=cls - -# List of valid names for the first argument in a metaclass class method -valid-metaclass-classmethod-first-arg=mcs - -[EXCEPTIONS] -# Exceptions that will emit a warning when caught -overgeneral-exceptions=builtins.Exception diff --git a/templates/configs/README.md b/templates/configs/README.md deleted file mode 100644 index 00d121d..0000000 --- a/templates/configs/README.md +++ /dev/null @@ -1,306 +0,0 @@ - - -# Code Quality Configuration Templates - -This directory contains standardized configuration files for code quality, linting, and security tools used across mokocli projects. - -## Available Configurations - -### PHP Tools - -#### `phpcs.xml` - PHP_CodeSniffer -**Purpose**: Enforce PHP coding standards (PSR-12 based) - -**Usage**: -```bash -# Copy to your project root -cp phpcs.xml /path/to/your/project/ - -# Run PHPCS -phpcs --standard=phpcs.xml src/ - -# Auto-fix issues -phpcbf --standard=phpcs.xml src/ -``` - -**Features**: -- PSR-12 compliance -- Line length limits (120 chars) -- Forbidden functions detection (eval, var_dump, etc.) -- Commented-out code detection - -#### `phpstan.neon` - PHPStan -**Purpose**: Static analysis for PHP code - -**Usage**: -```bash -# Copy to your project root -cp phpstan.neon /path/to/your/project/ - -# Install PHPStan -composer require --dev phpstan/phpstan - -# Run analysis -phpstan analyse -``` - -**Configuration**: -- Level 5 analysis (adjust as needed) -- Checks for type errors, dead code, and more -- Configurable ignore patterns - -#### `psalm.xml` - Psalm -**Purpose**: Advanced static analysis for PHP - -**Usage**: -```bash -# Copy to your project root -cp psalm.xml /path/to/your/project/ - -# Install Psalm -composer require --dev vimeo/psalm - -# Initialize and run -psalm --init -psalm -``` - -**Configuration**: -- Error level 4 (balanced strictness) -- Finds unused code (optional) -- Customizable issue handlers - -### JavaScript/TypeScript Tools - -#### `.eslintrc.json` - ESLint -**Purpose**: Identify and fix JavaScript code issues - -**Usage**: -```bash -# Copy to your project root -cp .eslintrc.json /path/to/your/project/ - -# Install ESLint -npm install --save-dev eslint - -# Run linting -npx eslint . - -# Auto-fix issues -npx eslint . --fix -``` - -**Features**: -- ES2021 support -- Tab indentation (2-space visual width) -- Unix line endings -- Single quotes for strings -- Semicolon enforcement - -#### `.prettierrc.json` - Prettier -**Purpose**: Opinionated code formatter for JavaScript/TypeScript - -**Usage**: -```bash -# Copy to your project root -cp .prettierrc.json /path/to/your/project/ - -# Install Prettier -npm install --save-dev prettier - -# Check formatting -npx prettier --check . - -# Auto-format -npx prettier --write . -``` - -**Configuration**: -- 100 character line width -- Single quotes -- Trailing commas (ES5) -- Tab indentation (2-space visual width) - -### Python Tools - -#### `.pylintrc` - Pylint -**Purpose**: Python code analysis and style checking - -**Usage**: -```bash -# Copy to your project root -cp .pylintrc /path/to/your/project/ - -# Install Pylint -pip install pylint - -# Run analysis -pylint **/*.py -``` - -**Features**: -- PEP 8 compliance -- 100 character line limit -- Configurable message disabling -- Custom naming conventions - -#### `pyproject.toml` - Python Project Configuration -**Purpose**: Unified configuration for Black, isort, mypy, and pytest - -**Usage**: -```bash -# Copy to your project root -cp pyproject.toml /path/to/your/project/ - -# Install tools -pip install black isort mypy pytest pytest-cov - -# Run Black formatter -black . - -# Sort imports with isort -isort . - -# Type check with mypy -mypy src/ - -# Run tests with coverage -pytest --cov=src -``` - -**Tools Configured**: -- **Black**: Opinionated Python formatter -- **isort**: Import statement sorter -- **mypy**: Static type checker -- **pytest**: Test framework -- **coverage**: Code coverage measurement - -### HTML Tools - -#### `.htmlhintrc` - HTMLHint -**Purpose**: HTML5 validation and best practices - -**Usage**: -```bash -# Copy to your project root -cp .htmlhintrc /path/to/your/project/ - -# Install HTMLHint -npm install -g htmlhint - -# Run validation -htmlhint **/*.html -``` - -**Features**: -- HTML5 doctype validation -- Tag and attribute validation -- Accessibility checks (alt, title requirements) -- Style and script validation - -## Integration with GitHub Actions - -All these tools are integrated into the `code-quality.yml` workflow template. To use: - -1. **Copy the workflow**: - ```bash - cp templates/workflows/code-quality.yml.template .github/workflows/code-quality.yml - ``` - -2. **Copy relevant config files**: - ```bash - # For PHP projects - cp templates/configs/phpcs.xml . - cp templates/configs/phpstan.neon . - - # For JavaScript projects - cp templates/configs/.eslintrc.json . - cp templates/configs/.prettierrc.json . - - # For Python projects - cp templates/configs/.pylintrc . - cp templates/configs/pyproject.toml . - - # For HTML projects - cp templates/configs/.htmlhintrc . - ``` - -3. **Customize for your project**: Adjust tool configurations based on your specific requirements - -## Tool Installation - -### PHP -```bash -# Via Composer -composer require --dev squizlabs/php_codesniffer phpstan/phpstan vimeo/psalm -``` - -### JavaScript/TypeScript -```bash -# Via npm -npm install --save-dev eslint prettier @typescript-eslint/parser @typescript-eslint/eslint-plugin -``` - -### Python -```bash -# Via pip -pip install pylint black mypy isort pytest pytest-cov -``` - -### HTML -```bash -# Via npm (global) -npm install -g htmlhint -``` - -## Configuration Customization - -Each configuration file can be customized for your project: - -1. **Adjust severity levels**: Change error levels to match your team's standards -2. **Add ignore patterns**: Exclude specific files or directories -3. **Enable/disable rules**: Fine-tune which checks are active -4. **Set code style preferences**: Modify indentation, line length, etc. - -## Security Best Practices - -These configurations include security-focused rules: - -- **PHP**: Forbidden functions (eval, create_function) -- **JavaScript**: No console.log in production -- **Python**: Import security patterns -- **HTML**: XSS prevention patterns - -## CI/CD Integration - -These tools work seamlessly with: - -- GitHub Actions (see workflow templates) -- GitLab CI -- Jenkins -- CircleCI -- Travis CI - -## Support and Updates - -Configuration templates are maintained in the mokocli repository: -- **Repository**: https://git.mokoconsulting.tech/MokoConsulting/mokocli -- **Documentation**: https://git.mokoconsulting.tech/MokoConsulting/mokocli/tree/main/docs -- **Issues**: Report problems or suggest improvements via GitHub Issues - -## Version History - -- **v1.0.0** (2026-01): Initial release with PHP, JavaScript, Python, and HTML configurations diff --git a/templates/configs/composer.dolibarr.json b/templates/configs/composer.dolibarr.json deleted file mode 100644 index b4b0aba..0000000 --- a/templates/configs/composer.dolibarr.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "mokoconsulting-tech/{{repo_name_lower}}", - "description": "{{repo_name}} Dolibarr module by Moko Consulting", - "type": "dolibarr-module", - "version": "01.00.00", - "license": "GPL-3.0-or-later", - "authors": [ - { - "name": "Moko Consulting", - "email": "hello@mokoconsulting.tech" - } - ], - "minimum-stability": "dev", - "prefer-stable": true, - "require": { - "php": ">=8.1", - "mokoconsulting-tech/enterprise": "dev-version/04.02.00" - }, - "require-dev": { - "phpunit/phpunit": "^10.5", - "phpstan/phpstan": "^2.0", - "squizlabs/php_codesniffer": "^4.0" - }, - "autoload": { - "psr-4": { - "MokoConsulting\\{{repo_name}}\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "MokoConsulting\\{{repo_name}}\\Tests\\": "tests/" - } - }, - "repositories": [ - { - "type": "vcs", - "url": "https://git.mokoconsulting.tech/mokoconsulting-tech/MokoCli-API" - } - ], - "config": { - "sort-packages": true, - "optimize-autoloader": true, - "preferred-install": "dist", - "allow-plugins": { - "composer/installers": true - } - }, - "scripts": { - "validate-module": "vendor/bin/validate-module --path .", - "build": "vendor/bin/build-package --path .", - "test": "phpunit", - "phpcs": "phpcs --standard=vendor/mokoconsulting-tech/enterprise/phpcs.xml src/", - "phpstan": "phpstan analyse -c phpstan.neon src/" - } -} diff --git a/templates/configs/composer.generic.json b/templates/configs/composer.generic.json deleted file mode 100644 index f5be9d8..0000000 --- a/templates/configs/composer.generic.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "mokoconsulting-tech/{{repo_name_lower}}", - "description": "{{repo_name}} library by Moko Consulting", - "type": "library", - "version": "01.00.00", - "license": "GPL-3.0-or-later", - "authors": [ - { - "name": "Moko Consulting", - "email": "hello@mokoconsulting.tech" - } - ], - "minimum-stability": "stable", - "prefer-stable": true, - "require": { - "php": ">=8.1", - "mokoconsulting-tech/enterprise": "dev-version/04.02.00" - }, - "require-dev": { - "phpunit/phpunit": "^10.5", - "phpstan/phpstan": "^2.0", - "squizlabs/php_codesniffer": "^4.0" - }, - "autoload": { - "psr-4": { - "MokoConsulting\\{{repo_name}}\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "MokoConsulting\\{{repo_name}}\\Tests\\": "tests/" - } - }, - "repositories": [ - { - "type": "vcs", - "url": "https://git.mokoconsulting.tech/mokoconsulting-tech/MokoCli-API" - } - ], - "config": { - "sort-packages": true, - "optimize-autoloader": true, - "preferred-install": "dist" - }, - "scripts": { - "validate": "vendor/bin/validate-structure --path .", - "test": "phpunit", - "phpcs": "phpcs --standard=vendor/mokoconsulting-tech/enterprise/phpcs.xml src/", - "phpstan": "phpstan analyse -c vendor/mokoconsulting-tech/enterprise/phpstan.neon src/" - } -} diff --git a/templates/configs/composer.joomla.json b/templates/configs/composer.joomla.json deleted file mode 100644 index 514d6cd..0000000 --- a/templates/configs/composer.joomla.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "mokoconsulting-tech/{{repo_name_lower}}", - "description": "{{repo_name}} Joomla component by Moko Consulting", - "type": "joomla-component", - "version": "01.00.00", - "license": "GPL-3.0-or-later", - "authors": [ - { - "name": "Moko Consulting", - "email": "hello@mokoconsulting.tech" - } - ], - "minimum-stability": "stable", - "prefer-stable": true, - "require": { - "php": ">=8.1", - "mokoconsulting-tech/enterprise": "dev-version/04.02.00" - }, - "require-dev": { - "phpunit/phpunit": "^10.5", - "phpstan/phpstan": "^2.0", - "squizlabs/php_codesniffer": "^4.0" - }, - "autoload": { - "psr-4": { - "MokoConsulting\\{{repo_name}}\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "MokoConsulting\\{{repo_name}}\\Tests\\": "tests/" - } - }, - "repositories": [ - { - "type": "vcs", - "url": "https://git.mokoconsulting.tech/mokoconsulting-tech/MokoCli-API" - } - ], - "config": { - "sort-packages": true, - "optimize-autoloader": true, - "preferred-install": "dist", - "allow-plugins": { - "composer/installers": true - } - }, - "scripts": { - "validate-manifest": "vendor/bin/validate-manifest --path .", - "build": "vendor/bin/build-package --path .", - "test": "phpunit", - "phpcs": "phpcs --standard=vendor/mokoconsulting-tech/enterprise/phpcs.xml src/", - "phpstan": "phpstan analyse -c phpstan.neon src/" - } -} diff --git a/templates/configs/ftpignore b/templates/configs/ftpignore deleted file mode 100644 index 63e7979..0000000 --- a/templates/configs/ftpignore +++ /dev/null @@ -1,47 +0,0 @@ -# .ftpignore — FTP/SFTP upload exclusion rules -# Syntax mirrors .gitignore: blank lines and # comments are ignored, -# * matches within a path segment, ** matches across segments, ? matches one char. -# A leading / anchors to the upload root; a trailing / matches directories only. -# Negation (!) is not supported. -# -# Copyright (C) 2026 Moko Consulting -# SPDX-License-Identifier: GPL-3.0-or-later - -# ── Version-control metadata ────────────────────────────────────────────────── -.git/ -.gitignore -.gitkeep -.gitattributes -.gitmodules - -# ── CI / editor / tooling artefacts ────────────────────────────────────────── -.github/ -.editorconfig -.yamllint -.phpcs.xml -.phpstan.neon -.psalm.xml -.mokostandards - -# ── Dependency directories ──────────────────────────────────────────────────── -vendor/ -node_modules/ - -# ── Build / cache / temp ────────────────────────────────────────────────────── -build/ -dist/ -*.log -*.tmp -*.cache - -# ── Secrets & local config (HARDCODED DENY — never deploy these) ───────────── -.env -.env.* -sftp-config*.json -sftp-config.json.template -scripts/sftp-config/ -scripts/keys/ -*.ppk -*.pem -*.key -.ftpignore diff --git a/templates/configs/gitignore b/templates/configs/gitignore deleted file mode 100644 index 2529535..0000000 --- a/templates/configs/gitignore +++ /dev/null @@ -1,208 +0,0 @@ -# ============================================================ -# Local task tracking (not version controlled) -# ============================================================ -TODO.md - -# ============================================================ -# Environment and secrets -# ============================================================ -.env -.env.local -.env.*.local -*.local.php -*.secret.php -configuration.php -configuration.*.php -configuration.local.php -conf/conf.php -conf/conf*.php -secrets/ -*.secrets.* - -# ============================================================ -# Logs, dumps and databases -# ============================================================ -*.db -*.db-journal -*.dump -*.log -*.pid -*.seed - - -# ============================================================ -# OS / Editor / IDE cruft -# ============================================================ -.DS_Store -Thumbs.db -desktop.ini -Thumbs.db:encryptable -ehthumbs.db -ehthumbs_vista.db -$RECYCLE.BIN/ -System Volume Information/ -*.lnk -Icon? -.idea/ -.settings/ -.claude/ -.claude-worktree*/ -.vscode/* -!.vscode/tasks.json -!.vscode/settings.json.example -!.vscode/extensions.json -*.code-workspace -*.sublime* -.project -.buildpath -.classpath -*.bak -*.swp -*.swo -*.tmp -*.old -*.orig - -# ============================================================ -# Dev scripts and scratch -# ============================================================ -TODO.md -todo* -*ffs* - -# ============================================================ -# SFTP / sync tools -# ============================================================ -sftp-config*.json -sftp-config.json.template -sftp-settings.json - -# ============================================================ -# Sublime SFTP / FTP sync -# ============================================================ -*.sublime-project -*.sublime-workspace -*.sublime-settings -.libsass.json -*.ffs* - -# ============================================================ -# Replit / cloud IDE -# ============================================================ -.replit -replit.md - -# ============================================================ -# Archives / release artifacts -# ============================================================ -*.7z -*.rar -*.tar -*.tar.gz -*.tgz -*.zip -artifacts/ -release/ -releases/ - -# ============================================================ -# Build outputs and site generators -# ============================================================ -.mkdocs-build/ -.cache/ -.parcel-cache/ -build/ -dist/ -out/ -/site/ -*.map -*.css.map -*.js.map -*.tsbuildinfo - -# ============================================================ -# CI / test artifacts -# ============================================================ -.coverage -.coverage.* -coverage/ -coverage.xml -htmlcov/ -junit.xml -reports/ -test-results/ -tests/_output/ -.github/local/ -.github/workflows/*.log - -# ============================================================ -# Node / JavaScript -# ============================================================ -node_modules/ -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -.pnpm-store/ -.yarn/ -.npmrc -.eslintcache -package-lock.json - -# ============================================================ -# PHP / Composer tooling -# ============================================================ -/vendor/ -!src/media/vendor/ -composer.lock -*.phar -codeception.phar -.phpunit.result.cache -.php_cs.cache -.php-cs-fixer.cache -.phpstan.cache -.phplint-cache -phpmd-cache/ -.psalm/ -.rector/ - -# ============================================================ -# Python -# ============================================================ -__pycache__/ -*.py[cod] -*.pyc -*$py.class -*.so -.Python -.eggs/ -*.egg -*.egg-info/ -.installed.cfg -MANIFEST -develop-eggs/ -downloads/ -eggs/ -parts/ -sdist/ -var/ -wheels/ -ENV/ -env/ -.venv/ -venv/ -.pytest_cache/ -.mypy_cache/ -.ruff_cache/ -.pyright/ -.tox/ -.nox/ -*.cover -*.coverage -hypothesis/ - -# ============================================================ -# Local wiki clone (not version controlled) -# ============================================================ -wiki/ - diff --git a/templates/configs/gitignore.dolibarr b/templates/configs/gitignore.dolibarr deleted file mode 100644 index 8e9cd4a..0000000 --- a/templates/configs/gitignore.dolibarr +++ /dev/null @@ -1,225 +0,0 @@ -# ============================================================ -# Local task tracking (not version controlled) -# ============================================================ -TODO.md - -# ============================================================ -# Environment and secrets -# ============================================================ -.env -.env.local -.env.*.local -*.local.php -*.secret.php -configuration.php -configuration.*.php -configuration.local.php -conf/conf.php -conf/conf*.php -secrets/ -*.secrets.* - -# ============================================================ -# Logs, dumps and databases -# ============================================================ -*.db -*.db-journal -*.dump -*.log -*.pid -*.seed - - -# ============================================================ -# OS / Editor / IDE cruft -# ============================================================ -.DS_Store -Thumbs.db -desktop.ini -Thumbs.db:encryptable -ehthumbs.db -ehthumbs_vista.db -$RECYCLE.BIN/ -System Volume Information/ -*.lnk -Icon? -.idea/ -.settings/ -.claude/ -.claude-worktree*/ -.vscode/* -!.vscode/tasks.json -!.vscode/settings.json.example -!.vscode/extensions.json -*.code-workspace -*.sublime* -.project -.buildpath -.classpath -*.bak -*.swp -*.swo -*.tmp -*.old -*.orig - -# ============================================================ -# Dev scripts and scratch -# ============================================================ -TODO.md -todo* -*ffs* - -# ============================================================ -# SFTP / sync tools -# ============================================================ -sftp-config*.json -sftp-config.json.template -sftp-settings.json - -# ============================================================ -# Sublime SFTP / FTP sync -# ============================================================ -*.sublime-project -*.sublime-workspace -*.sublime-settings -.libsass.json -*.ffs* - -# ============================================================ -# Replit / cloud IDE -# ============================================================ -.replit -replit.md - -# ============================================================ -# Archives / release artifacts -# ============================================================ -*.7z -*.rar -*.tar -*.tar.gz -*.tgz -*.zip -artifacts/ -release/ -releases/ - -# ============================================================ -# Build outputs and site generators -# ============================================================ -.mkdocs-build/ -.cache/ -.parcel-cache/ -build/ -dist/ -out/ -site/ -*.map -*.css.map -*.js.map -*.tsbuildinfo - -# ============================================================ -# CI / test artifacts -# ============================================================ -.coverage -.coverage.* -coverage/ -coverage.xml -htmlcov/ -junit.xml -reports/ -test-results/ -tests/_output/ -.github/local/ -.github/workflows/*.log - -# ============================================================ -# Node / JavaScript -# ============================================================ -node_modules/ -npm-debug.log* -yarn-debug.log* -yarn-error.log* -pnpm-debug.log* -.pnpm-store/ -.yarn/ -.npmrc -.eslintcache -package-lock.json - -# ============================================================ -# PHP / Composer tooling -# ============================================================ -/vendor/ -!src/media/vendor/ -composer.lock -*.phar -codeception.phar -.phpunit.result.cache -.php_cs.cache -.php-cs-fixer.cache -.phpstan.cache -.phplint-cache -phpmd-cache/ -.psalm/ -.rector/ - -# ============================================================ -# Python -# ============================================================ -__pycache__/ -*.py[cod] -*.pyc -*$py.class -*.so -.Python -.eggs/ -*.egg -*.egg-info/ -.installed.cfg -MANIFEST -develop-eggs/ -downloads/ -eggs/ -parts/ -sdist/ -var/ -wheels/ -ENV/ -env/ -.venv/ -venv/ -.pytest_cache/ -.mypy_cache/ -.ruff_cache/ -.pyright/ -.tox/ -.nox/ -*.cover -*.coverage -hypothesis/ - -# ============================================================ -# Local wiki clone (not version controlled) -# ============================================================ -wiki/ - -# ============================================================ -# Dolibarr runtime / data -# ============================================================ -documents/ -dolibarr_documents/ -uploads/ -thumbs/ -data/ -cache/ -temp/ -tmp/ -logs/ -htdocs/documents/ -htdocs/cache/ -htdocs/tmp/ -htdocs/logs/ -conf/conf.php diff --git a/templates/configs/index.md b/templates/configs/index.md deleted file mode 100644 index 94bd1b6..0000000 --- a/templates/configs/index.md +++ /dev/null @@ -1,43 +0,0 @@ - - -# Code Quality Configuration Templates - -Standardized configuration files for code quality and security tools. - -## Available Configurations - -### PHP -- `phpcs.xml` - PHP_CodeSniffer (PSR-12) -- `phpstan.neon` - PHPStan static analysis -- `psalm.xml` - Psalm advanced analysis - -### JavaScript/TypeScript -- `.eslintrc.json` - ESLint linting -- `.prettierrc.json` - Prettier formatting - -### Python -- `.pylintrc` - Pylint analysis -- `pyproject.toml` - Black, isort, mypy, pytest - -### HTML -- `.htmlhintrc` - HTMLHint validation - -## Quick Start - -```bash -# Copy configuration for your language -cp templates/configs/.eslintrc.json . -cp templates/configs/phpcs.xml . -cp templates/configs/.pylintrc . -``` - -See [README.md](README.md) for detailed documentation. diff --git a/templates/configs/manifest.xml.template b/templates/configs/manifest.xml.template deleted file mode 100644 index 58326ca..0000000 --- a/templates/configs/manifest.xml.template +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - {{REPO_NAME}} - {{org}} - {{REPO_DESCRIPTION}} - GNU General Public License v3 - - - - {{platform}} - {{standards_version}} - https://git.mokoconsulting.tech/MokoConsulting/mokocli - - - - {{PRIMARY_LANGUAGE}} - - - diff --git a/templates/configs/manifest.yml.template b/templates/configs/manifest.yml.template deleted file mode 100644 index e712a25..0000000 --- a/templates/configs/manifest.yml.template +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2026 Moko Consulting -# SPDX-License-Identifier: GPL-3.0-or-later -# FILE INFORMATION -# DEFGROUP: MokoPlatform.Templates.Config -# INGROUP: MokoPlatform.Templates -# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli -# PATH: /templates/configs/manifest.yml.template -# BRIEF: Governance attachment template — synced to .mokogitea/manifest.xml in every governed repository -# NOTE: Tokens replaced at sync time: {{org}}, {{repo_name}}, {{platform}}, {{standards_version}} -# -# This file is managed automatically by mokocli bulk sync. -# Do not edit manually — changes will be overwritten on the next sync. -# To update governance settings, open a PR in mokocli instead: -# https://git.mokoconsulting.tech/MokoConsulting/mokocli - -standards_source: "https://git.mokoconsulting.tech/MokoConsulting/mokocli" -standards_version: "{{standards_version}}" -platform: "{{platform}}" -governed_repo: "{{org}}/{{repo_name}}" diff --git a/templates/configs/mokostandards.xml.template b/templates/configs/mokostandards.xml.template deleted file mode 100644 index ed72e27..0000000 --- a/templates/configs/mokostandards.xml.template +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - {{REPO_NAME}} - {{org}} - {{REPO_DESCRIPTION}} - GNU General Public License v3 - - - - {{platform}} - {{standards_version}} - https://git.mokoconsulting.tech/MokoConsulting/mokocli - - - - {{PRIMARY_LANGUAGE}} - - - diff --git a/templates/configs/mokostandards.yml.template b/templates/configs/mokostandards.yml.template deleted file mode 100644 index 12bbd0e..0000000 --- a/templates/configs/mokostandards.yml.template +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2026 Moko Consulting -# SPDX-License-Identifier: GPL-3.0-or-later -# FILE INFORMATION -# DEFGROUP: MokoPlatform.Templates.Config -# INGROUP: MokoPlatform.Templates -# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli -# PATH: /templates/configs/moko-standards.yml.template -# BRIEF: Governance attachment template — synced to .mokostandards in every governed repository -# NOTE: Tokens replaced at sync time: {{org}}, {{repo_name}}, {{platform}}, {{standards_version}} -# -# This file is managed automatically by mokocli bulk sync. -# Do not edit manually — changes will be overwritten on the next sync. -# To update governance settings, open a PR in mokocli instead: -# https://git.mokoconsulting.tech/MokoConsulting/mokocli - -standards_source: "https://git.mokoconsulting.tech/MokoConsulting/mokocli" -standards_version: "{{standards_version}}" -platform: "{{platform}}" -governed_repo: "{{org}}/{{repo_name}}" diff --git a/templates/configs/pa11yci.json b/templates/configs/pa11yci.json deleted file mode 100644 index c08219a..0000000 --- a/templates/configs/pa11yci.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "defaults": { - "standard": "WCAG2AA", - "timeout": 30000, - "wait": 1000, - "ignore": [], - "chromeLaunchConfig": { - "args": [ - "--no-sandbox", - "--disable-setuid-sandbox" - ] - } - }, - "urls": [ - { - "url": "http://localhost:8080/", - "actions": [] - } - ], - "concurrency": 2, - "useIncognitoBrowserContext": true -} \ No newline at end of file diff --git a/templates/configs/phpcs.xml b/templates/configs/phpcs.xml deleted file mode 100644 index babfcca..0000000 --- a/templates/configs/phpcs.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - PHP_CodeSniffer configuration for mokocli projects - - - src - tests - - - */vendor/* - */node_modules/* - */.git/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/configs/phpstan.dolibarr.neon b/templates/configs/phpstan.dolibarr.neon deleted file mode 100644 index 00ec81c..0000000 --- a/templates/configs/phpstan.dolibarr.neon +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 2026 Moko Consulting -# SPDX-License-Identifier: GPL-3.0-or-later -# -# PHPStan configuration for Dolibarr module repositories. -# Extends the base MokoCli config and adds Dolibarr class stubs -# so PHPStan can resolve CommonObject, DoliDB, Conf, User, etc. -# without requiring a full Dolibarr installation. - -parameters: - level: 5 - - paths: - - src - - excludePaths: - - vendor - - node_modules - - # Dolibarr class stubs — resolved via the enterprise package from vendor/ - stubFiles: - - vendor/mokoconsulting-tech/enterprise/templates/stubs/dolibarr.php - - # Suppress errors that are structural in Dolibarr's dynamic architecture - ignoreErrors: - # Dolibarr uses dynamic properties heavily (pre-PHP 8.2 pattern) - - '#Access to an undefined property [A-Za-z]+::\$#' - # Module descriptors use magic property assignment in __construct - - '#Variable \$[a-z]+ might not be defined\.#' - - # Common Dolibarr globals declared at script entry point - dynamicConstantNames: - - DOL_DOCUMENT_ROOT - - DOL_URL_ROOT - - DOL_VERSION - - MAIN_DB_PREFIX - - reportUnmatchedIgnoredErrors: false - checkMissingIterableValueType: false - checkGenericClassInNonGenericObjectType: false diff --git a/templates/configs/phpstan.joomla.neon b/templates/configs/phpstan.joomla.neon deleted file mode 100644 index 9bb35ef..0000000 --- a/templates/configs/phpstan.joomla.neon +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2026 Moko Consulting -# SPDX-License-Identifier: GPL-3.0-or-later -# -# PHPStan configuration for Joomla extension repositories. -# Extends the base MokoCli config and adds Joomla framework class stubs -# so PHPStan can resolve Factory, CMSApplication, User, Table, etc. -# without requiring a full Joomla installation. - -parameters: - level: 5 - - paths: - - src - - excludePaths: - - vendor - - node_modules - - # Joomla framework stubs — resolved via the enterprise package from vendor/ - stubFiles: - - vendor/mokoconsulting-tech/enterprise/templates/stubs/joomla.php - - # Suppress errors that are structural in Joomla's service-container architecture - ignoreErrors: - # Joomla's service-based dependency injection returns mixed from getApplication() - - '#Cannot call method .+ on Joomla\\CMS\\Application\\CMSApplication\|null#' - # Factory::getX() patterns are safe at runtime even when nullable in stubs - - '#Call to static method [a-zA-Z]+\(\) on an interface#' - - reportUnmatchedIgnoredErrors: false - checkMissingIterableValueType: false - checkGenericClassInNonGenericObjectType: false diff --git a/templates/configs/phpstan.neon b/templates/configs/phpstan.neon deleted file mode 100644 index 1182786..0000000 --- a/templates/configs/phpstan.neon +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2026 Moko Consulting -# -# This file is part of a Moko Consulting project. -# -# SPDX-License-Identifier: GPL-3.0-or-later - -# PHPStan configuration for MokoCli projects -parameters: - level: 5 - paths: - - src - - tests - excludePaths: - - vendor - - node_modules - - # Report unknown classes and functions - reportUnmatchedIgnoredErrors: false - - # Check for dead code - checkMissingIterableValueType: false - checkGenericClassInNonGenericObjectType: false - - # Additional checks - checkAlwaysTrueCheckTypeFunctionCall: true - checkAlwaysTrueInstanceof: true - checkAlwaysTrueStrictComparison: true - checkExplicitMixedMissingReturn: true - checkFunctionNameCase: true - checkInternalClassCaseSensitivity: true - - # Ignore common patterns - ignoreErrors: - # Add project-specific ignores here - # - '#Call to an undefined method#' diff --git a/templates/configs/psalm.xml b/templates/configs/psalm.xml deleted file mode 100644 index a1b21ba..0000000 --- a/templates/configs/psalm.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/templates/configs/pyproject.toml b/templates/configs/pyproject.toml deleted file mode 100644 index 9747912..0000000 --- a/templates/configs/pyproject.toml +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright (C) 2026 Moko Consulting -# -# This file is part of a Moko Consulting project. -# -# SPDX-License-Identifier: GPL-3.0-or-later - -# Python project configuration for MokoCli projects - -[tool.black] -line-length = 100 -target-version = ['py38', 'py39', 'py310', 'py311'] -include = '\.pyi?$' -exclude = ''' -/( - \.git - | \.venv - | venv - | \.eggs - | \.tox - | build - | dist - | __pycache__ - | node_modules -)/ -''' - -[tool.isort] -profile = "black" -line_length = 100 -multi_line_output = 3 -include_trailing_comma = true -force_grid_wrap = 0 -use_parentheses = true -ensure_newline_before_comments = true - -[tool.mypy] -python_version = "3.8" -warn_return_any = true -warn_unused_configs = true -disallow_untyped_defs = false -disallow_incomplete_defs = false -check_untyped_defs = true -disallow_untyped_calls = false -disallow_untyped_decorators = false -no_implicit_optional = true -warn_redundant_casts = true -warn_unused_ignores = true -warn_no_return = true -warn_unreachable = true -strict_equality = true -ignore_missing_imports = true - -[[tool.mypy.overrides]] -module = "tests.*" -disallow_untyped_defs = false - -[tool.pytest.ini_options] -minversion = "6.0" -addopts = "-ra -q --strict-markers" -testpaths = [ - "tests", -] -python_files = "test_*.py" -python_classes = "Test*" -python_functions = "test_*" - -[tool.coverage.run] -source = ["src"] -omit = [ - "*/tests/*", - "*/__pycache__/*", - "*/venv/*", - "*/.venv/*", -] - -[tool.coverage.report] -exclude_lines = [ - "pragma: no cover", - "def __repr__", - "raise AssertionError", - "raise NotImplementedError", - "if __name__ == .__main__.:", - "if TYPE_CHECKING:", - "@abstractmethod", -] diff --git a/templates/configs/renovate.json b/templates/configs/renovate.json deleted file mode 100644 index 15c6a10..0000000 --- a/templates/configs/renovate.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:recommended", - "schedule:weekly", - ":disableDependencyDashboard" - ], - "labels": ["dependencies"], - "automerge": false, - "platformAutomerge": false, - "rangeStrategy": "bump", - "packageRules": [ - { - "matchUpdateTypes": ["patch"], - "automerge": true - }, - { - "matchManagers": ["composer"], - "enabled": true - }, - { - "matchManagers": ["npm"], - "enabled": true - } - ] -} diff --git a/templates/docs/README.md b/templates/docs/README.md deleted file mode 100644 index c71b0df..0000000 --- a/templates/docs/README.md +++ /dev/null @@ -1,117 +0,0 @@ - - -# Documentation Templates - -## Purpose - -This directory contains governed documentation templates for the mokocli organization. These templates ensure consistency, completeness, and compliance across all documentation artifacts. - -## Intended Use - -Use these templates when: - -- Creating new documentation files -- Establishing documentation in new repositories -- Ensuring compliance with documentation standards -- Maintaining consistency across projects - -## Instructions - -### Template Categories - -Templates are organized into two categories: - -1. **Required Templates** - `/templates/docs/required/` - - Mandatory documentation files for all repositories - - Must be present and maintained - - Subject to compliance review - -2. **Extra Templates** - `/templates/docs/extra/` - - Optional documentation files - - Recommended for specific use cases - - Enhance documentation quality - -### Using Templates - -To use a template: - -1. Navigate to appropriate template category (required or extra) -2. Copy the template file to your target location -3. Rename the file removing the `template-` prefix -4. Replace all placeholder content with actual information -5. Complete all required fields -6. Remove example sections or mark them explicitly as examples -7. Follow the template instructions section -8. Validate against Document Formatting Policy - -### Template Maintenance - -Templates are governed assets and must: - -- Follow Document Formatting Policy requirements -- Include all required sections for templates -- Contain no production data -- Use placeholder values only -- Be reviewed per governance schedule -- Have Project task entries - -## Required Fields - -When using templates, ensure these fields are completed: - -- All section headers and content -- Metadata fields specific to the document -- Revision history -- Purpose and scope statements -- Responsibilities and governance rules (where applicable) - -## Example Usage - -### Creating a New Repository README - -```bash -# Copy template to target location -cp /templates/docs/required/template-README.md /path/to/repo/README.md - -# Edit the file -# - Replace "[Repository Name]" with actual repository name -# - Complete all sections -# - Update metadata -# - Customize content for your repository -``` - -### Creating a New Policy Document - -```bash -# Use policy template structure -# Follow /docs/policy/ examples -# Ensure all mandatory policy sections included -# Obtain required approvals per policy -``` - -## Metadata - -- **Document Type:** overview -- **Document Subtype:** catalog -- **Owner Role:** Documentation Owner -- **Approval Required:** No -- **Evidence Required:** Yes -- **Review Cycle:** Annual -- **Retention:** Indefinite -- **Compliance Tags:** Governance -- **Status:** Published - -## Revision History - -- Initial template catalog established -- Template categories and usage instructions defined -- Template maintenance requirements documented diff --git a/templates/docs/extra/README.md b/templates/docs/extra/README.md deleted file mode 100644 index ea89df0..0000000 --- a/templates/docs/extra/README.md +++ /dev/null @@ -1,200 +0,0 @@ - - -# Extra Documentation Templates - -## Purpose - -This directory contains optional documentation templates that enhance repository documentation quality and completeness. These templates are recommended but not mandatory, providing additional documentation capabilities beyond baseline requirements. - -## Intended Use - -Use these templates when: - -- Enhanced documentation is beneficial -- Specific use cases require additional documentation -- Improving documentation beyond minimum requirements -- Addressing stakeholder needs for additional information -- Meeting specific project or compliance needs - -## Instructions - -### Optional Templates - -Extra templates provide documentation for: - -1. **Code of Conduct** - Community behavior guidelines -2. **Security Policy** - Security reporting and disclosure -3. **Support Documentation** - Support channels and procedures -4. **Governance Documents** - Decision-making and authority -5. **Additional Technical Documentation** - Architecture, design, API docs - -### Template Selection - -Choose extra templates based on: - -- **Project Size** - Larger projects benefit from comprehensive documentation -- **Community Size** - Projects with external contributors need governance docs -- **Security Requirements** - Security-sensitive projects need security policy -- **Stakeholder Needs** - Specific stakeholder requirements -- **Compliance Requirements** - Regulatory or audit requirements - -### Template Usage - -For each extra template: - -1. Determine if template is needed for your project -2. Copy the template file from this directory -3. Rename removing the `template-` prefix -4. Place in appropriate repository location -5. Complete all sections -6. Replace all placeholder values -7. Customize for your project context -8. Create Project task if document is critical -9. Maintain per appropriate review cycle - -### When to Use Extra Templates - -#### Code of Conduct - -Use when: - -- Repository accepts external contributions -- Community interactions expected -- Need to establish behavioral expectations -- Creating inclusive environment - -#### Security Policy - -Use when: - -- Repository contains security-sensitive code -- Security vulnerabilities may be discovered -- Need coordinated disclosure process -- Compliance requires security documentation - -#### Support Documentation - -Use when: - -- Users need support information -- Multiple support channels exist -- Support expectations must be clear -- SLA or support tiers defined - -#### Governance Documents - -Use when: - -- Decision-making authority must be clear -- Multiple maintainers or teams involved -- Escalation procedures needed -- Organizational governance required - -## Required Fields - -When using extra templates, ensure these fields are completed: - -- All section headers with appropriate content -- Purpose and scope clearly defined -- Contact information where applicable -- Procedures and processes clearly documented -- Metadata (for governed documents) -- Revision history - -## Example Usage - -### Adding Code of Conduct - -```bash -# Copy template -cp /templates/docs/extra/template-CODE_OF_CONDUCT.md ./CODE_OF_CONDUCT.md - -# Edit the file -# - Complete all sections -# - Add contact information for enforcement -# - Customize behavioral expectations -# - Add reporting procedures - -# Commit to repository -git add CODE_OF_CONDUCT.md -git commit -m "Add Code of Conduct" -``` - -### Adding Security Policy - -```bash -# Copy template -cp /templates/docs/extra/template-SECURITY.md ./SECURITY.md - -# Edit the file -# - Define supported versions -# - Add vulnerability reporting procedures -# - Define disclosure timelines -# - Add security contact information - -# Commit to repository -git add SECURITY.md -git commit -m "Add security policy" -``` - -### Adding Support Documentation - -```bash -# Copy template -cp /templates/docs/extra/template-SUPPORT.md ./SUPPORT.md - -# Edit the file -# - List support channels -# - Define response expectations -# - Add support tiers if applicable -# - Include escalation procedures - -# Commit to repository -git add SUPPORT.md -git commit -m "Add support documentation" -``` - -## Template List - -- **template-CODE_OF_CONDUCT.md** - Community behavior guidelines template -- Additional templates as needed for specific use cases - -Note: Extra templates are created on-demand based on organizational needs. Check this directory for available templates or request new templates through governance channels. - -## Best Practices - -When using extra templates: - -- Only use templates that add value to your project -- Keep documentation current and accurate -- Follow Document Formatting Policy -- Create Project tasks for critical documents -- Review and update per appropriate schedule -- Remove unused templates to reduce maintenance burden - -## Metadata - -- **Document Type:** overview -- **Document Subtype:** catalog -- **Owner Role:** Documentation Owner -- **Approval Required:** No -- **Evidence Required:** Yes -- **Review Cycle:** Annual -- **Retention:** Indefinite -- **Compliance Tags:** Governance -- **Status:** Published - -## Revision History - -- Initial extra templates catalog established -- Template selection guidance defined -- Usage instructions and best practices documented diff --git a/templates/docs/extra/index.md b/templates/docs/extra/index.md deleted file mode 100644 index 554d598..0000000 --- a/templates/docs/extra/index.md +++ /dev/null @@ -1,32 +0,0 @@ - - -# Docs Index: /templates/docs/extra - -## Purpose - -This index provides navigation to documentation within this folder. - -## Documents - -- [README](./README.md) -- [template-CODE_OF_CONDUCT](./template-CODE_OF_CONDUCT.md) - -## Metadata - -- **Document Type:** index -- **Auto-generated:** This file is automatically generated by rebuild_indexes.py - -## Revision History - -| Change | Notes | Author | -| --- | --- | --- | -| Automated update | Generated by documentation index automation | rebuild_indexes.py | diff --git a/templates/docs/extra/template-CODE_OF_CONDUCT.md b/templates/docs/extra/template-CODE_OF_CONDUCT.md deleted file mode 100644 index e1ae3bf..0000000 --- a/templates/docs/extra/template-CODE_OF_CONDUCT.md +++ /dev/null @@ -1,86 +0,0 @@ - -# Code of Conduct - -## 1. Purpose - -The purpose of this Code of Conduct is to ensure a safe, inclusive, and respectful environment for all contributors and participants in Moko Consulting projects. This applies to all interactions, whether in repositories, issue trackers, documentation, meetings, or community spaces. - -## 2. Our Standards - -Participants are expected to uphold behaviors that strengthen our community, including: - - Demonstrating empathy and respect toward others. - Being inclusive of diverse viewpoints and backgrounds. - Gracefully accepting constructive feedback. - Prioritizing collaboration over conflict. - Showing professionalism in all interactions. - -### Unacceptable behavior includes: - - Harassment, discrimination, or derogatory comments. - Threatening or violent language or actions. - Disruptive, aggressive, or intentionally harmful behavior. - Publishing others’ private information without permission. - Any behavior that violates applicable laws. - -## 3. Responsibilities of Maintainers - -Maintainers are responsible for: - - Clarifying acceptable behavior. - Taking appropriate corrective action when unacceptable behavior occurs. - Removing, editing, or rejecting contributions that violate this Code. - Temporarily or permanently banning contributors who engage in repeated or severe violations. - -## 4. Scope - -This Code applies to: - - All Moko Consulting repositories. - All documentation and collaboration platforms. - Public and private communication related to project activities. - Any representation of Moko Consulting in online or offline spaces. - -## 5. Enforcement - -Instances of misconduct may be reported to: -**[hello@mokoconsulting.tech](mailto:hello@mokoconsulting.tech)** - -All reports will be reviewed and investigated promptly and fairly. Maintainers are obligated to maintain confidentiality where possible. - -Consequences may include: - - A warning. - Required training or mediation. - Temporary or permanent bans. - Escalation to legal authorities when required. - -## 6. Acknowledgements - -This Code of Conduct is inspired by widely adopted community guidelines, including the Contributor Covenant and major open-source collaboration standards. - -## 7. Related Documents - - [Governance Guide](./docs-governance.md) - [Contributor Guide](./docs-contributing.md) - [Documentation Index](./docs-index.md) - -This Code of Conduct is a living document and may be updated following the established Change Management process. diff --git a/templates/docs/extra/template-ROADMAP.md b/templates/docs/extra/template-ROADMAP.md deleted file mode 100644 index dc01995..0000000 --- a/templates/docs/extra/template-ROADMAP.md +++ /dev/null @@ -1,142 +0,0 @@ - - -# [Project Name] Roadmap - -## Scope and Intent - -This document defines the roadmap for [Project Name] starting with version **[X.Y.Z]**. It establishes the sequencing, intent, and maturity expectations for deliverables governed by this project. - -This roadmap is forward-looking by design. Completed work prior to the current baseline version is considered foundational and is intentionally excluded. This file tracks **current and future-state development only**. - -## Version [X.Y.Z] — [Phase Name] ✅ COMPLETED / 🔄 IN PROGRESS / 📋 PLANNED - -Focus: [Brief description of this version's primary focus] - -### Completed Deliverables - -* ✅ **[Category Name]** - * ✅ [Specific deliverable or feature] - * ✅ [Specific deliverable or feature] -* ✅ **[Category Name]** - * ✅ [Specific deliverable or feature] - -### In Progress - -* 🔄 [Item currently being worked on] -* 🔄 [Item currently being worked on] - -### Planned Deliverables - -* [Future planned item] -* [Future planned item] - -### Achieved Outcomes - -* ✅ [Measurable outcome or benefit] -* ✅ [Measurable outcome or benefit] -* 🔄 [Partially achieved outcome] - -## Version [X.Y+1.Z] — [Next Phase Name] - -Focus: [Brief description of next version's primary focus] - -### In-Scope Deliverables - -* [Deliverable for next version] -* [Deliverable for next version] - -### Outcomes - -* [Expected outcome or benefit] -* [Expected outcome or benefit] - -## Version [X.Y+2.Z] — [Future Phase Name] - -Focus: [Brief description of future version's primary focus] - -### Planned Deliverables - -* [Future deliverable] -* [Future deliverable] - -### Outcomes - -* [Expected outcome] -* [Expected outcome] - -## Version [X.Y+3.Z] and Beyond — [Long-term Vision] - -Focus: [Long-term strategic direction] - -### Forward-Looking Initiatives - -* [Strategic initiative] -* [Strategic initiative] - -### Outcomes - -* [Long-term goal] -* [Long-term goal] - ---- - -This roadmap is intentionally conservative and additive. New versions extend prior guarantees without breaking existing contracts. - -## Guidelines for Version Planning - -### Version Numbering - -Use semantic versioning for clarity: -- **Major versions** (X.0.0): Breaking changes, major architectural shifts -- **Minor versions** (X.Y.0): New features, significant enhancements -- **Patch versions** (X.Y.Z): Bug fixes, minor improvements - -### Planning Horizon - -- **Current Version**: Actively being delivered -- **Next 2-3 Versions**: Clearly defined with specific deliverables -- **Future Versions**: High-level themes and strategic direction - -### Status Indicators - -- ✅ **COMPLETED**: Delivered and validated -- 🔄 **IN PROGRESS**: Active development underway -- 📋 **PLANNED**: Scheduled but not yet started -- ⏸️ **PAUSED**: Temporarily on hold -- ❌ **CANCELLED**: No longer pursuing - -## Metadata - -``` -Owner: [Owner Name/Role] -Reviewers: [Reviewer Names/Roles] -Status: Active -Last Updated: [YYYY-MM-DD] -Next Review: [YYYY-MM-DD] -``` - -## Revision History - -| Date | Version | Author | Notes | -| ---------- | -------- | -------------- | ------------------------------- | -| YYYY-MM-DD | X.Y.Z | [Author Name] | [Description of changes] | -| YYYY-MM-DD | X.Y.Z | [Author Name] | [Description of changes] | diff --git a/templates/docs/index.md b/templates/docs/index.md deleted file mode 100644 index bac85a8..0000000 --- a/templates/docs/index.md +++ /dev/null @@ -1,36 +0,0 @@ - - -# Docs Index: /templates/docs - -## Purpose - -This index provides navigation to documentation within this folder. - -## Subfolders - -- [extra/](./extra/index.md) -- [required/](./required/index.md) - -## Documents - -- [README](./README.md) - -## Metadata - -- **Document Type:** index -- **Auto-generated:** This file is automatically generated by rebuild_indexes.py - -## Revision History - -| Change | Notes | Author | -| --- | --- | --- | -| Automated update | Generated by documentation index automation | rebuild_indexes.py | diff --git a/templates/docs/required/CODEOWNERS b/templates/docs/required/CODEOWNERS deleted file mode 100644 index 990bc8a..0000000 --- a/templates/docs/required/CODEOWNERS +++ /dev/null @@ -1,37 +0,0 @@ -# CODEOWNERS - -## Repository Ownership Matrix - -``` -# GLOBAL DEFAULT -* @mokoconsulting-tech - -# DOCUMENTATION SUITE -/docs/ @mokoconsulting-tech -/docs/templates/ @mokoconsulting-tech -/docs/adr/ @mokoconsulting-tech -/docs/diagrams/ @mokoconsulting-tech -/docs/security/ @mokoconsulting-tech - -# ENGINEERING + CODE ASSETS -/htdocs/ @mokoconsulting-tech -/src/ @mokoconsulting-tech -/api/ @mokoconsulting-tech - -# CI/CD WORKFLOWS -/.github/workflows/ @mokoconsulting-tech - -# ISSUE TEMPLATES -/.github/ISSUE_TEMPLATE/ @mokoconsulting-tech - -# GOVERNANCE + OPERATIONAL FILES -/CONTRIBUTING.md @mokoconsulting-tech -/GOVERNANCE.md @mokoconsulting-tech -/CODE_OF_CONDUCT.md @mokoconsulting-tech - -# SECURITY -/SECURITY.md @mokoconsulting-tech - -# TEMPLATE LIBRARY -/docs/templates/ @mokoconsulting-tech -``` diff --git a/templates/docs/required/GOVERNANCE.md b/templates/docs/required/GOVERNANCE.md deleted file mode 100644 index 0a1cb09..0000000 --- a/templates/docs/required/GOVERNANCE.md +++ /dev/null @@ -1,119 +0,0 @@ - - -[![mokocli](https://img.shields.io/badge/moko--platform-{{standards_version}}-blue)](https://git.mokoconsulting.tech/MokoConsulting/mokocli) - -# Project Governance - -## Overview - -This document defines the governance model for the `{{repo_name}}` repository within the -`{{org}}` organization. It is automatically maintained by -[mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli) v{{standards_version}}. - -Full governance policy is defined in the mokocli source repository: -[docs/policy/GOVERNANCE.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/GOVERNANCE.md) - ---- - -## Roles and Responsibilities - -### Maintainer - -**GitHub**: @mokoconsulting-tech - -**Authority**: Final decision-making authority on all matters for this repository. - -**Responsibilities**: -- Review and merge pull requests -- Maintain code quality and standards compliance -- Manage releases and versioning -- Respond to issues and security reports - -### Contributors - -**Authority**: Submit changes via pull requests. - -**Requirements**: -- Read and accept `CODE_OF_CONDUCT.md` -- Follow `CONTRIBUTING.md` guidelines - ---- - -## Decision-Making - -All changes must be submitted as pull requests. The maintainer (@mokoconsulting-tech) -reviews and approves all changes before they are merged. - -### Sole Operator Policy - -This organization operates under a **sole operator** model. The maintainer (@mokoconsulting-tech) -is the sole employee and owner and may self-approve pull requests when no second reviewer is -available. The following requirements remain mandatory regardless: - -1. **Pull Requests Required** — all changes to protected branches go through a PR. -2. **Automated Checks** — all CI checks must pass before merging. -3. **Audit Trail** — issues, pull requests, and commit history are preserved. -4. **Documentation** — changes are documented in `CHANGELOG.md`. - -See the full policy: -[Sole Operator Policy](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/GOVERNANCE.md#sole-operator-policy) - ---- - -## Change Management - -| Change Type | Approval | Process | -|-------------|----------|---------| -| Routine (docs, bug fixes) | Maintainer | PR → CI pass → merge | -| Significant (new features) | Maintainer | PR with description → CI pass → merge | -| Major (breaking, architecture) | Maintainer | Issue discussion → PR → CI pass → merge | -| Emergency (security) | Maintainer | Labelled `EMERGENCY` → immediate merge → post-mortem | - ---- - -## Reporting Issues - -- **Bugs / Features**: Open a [GitHub Issue](https://github.com/{{org}}/{{repo_name}}/issues) -- **Security vulnerabilities**: See [SECURITY.md](./SECURITY.md) -- **Code of Conduct**: See [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) -- **Contact**: dev@mokoconsulting.tech - ---- - -## Metadata - -| Field | Value | -| ------------- | ----------------------------------------------- | -| Document Type | Policy | -| Domain | Governance | -| Applies To | {{org}}/{{repo_name}} | -| Jurisdiction | Tennessee, USA | -| Maintainer | @mokoconsulting-tech | -| Standards | mokocli v{{standards_version}} | -| Repo | https://github.com/{{org}}/{{repo_name}} | -| Path | /GOVERNANCE.md | -| Status | Active — auto-maintained by mokocli | diff --git a/templates/docs/required/README.md b/templates/docs/required/README.md deleted file mode 100644 index 8b5d4dd..0000000 --- a/templates/docs/required/README.md +++ /dev/null @@ -1,176 +0,0 @@ - - -# Required Documentation Templates - -## Purpose - -This directory contains mandatory documentation templates that MUST be present in all repositories governed by mokocli documentation policies. These templates ensure baseline documentation compliance and organizational consistency. - -## Intended Use - -Use these templates when: - -- Creating a new repository -- Establishing baseline repository documentation -- Ensuring compliance with documentation governance -- Meeting mandatory documentation requirements - -## Instructions - -### Mandatory Templates - -All repositories MUST include these documentation files: - -1. **README.md** - Repository overview and entry point -2. **CHANGELOG.md** - Change tracking and release history -3. **CONTRIBUTING.md** - Contribution guidelines and workflow -4. **LICENSE** - License terms and copyright (see templates/licenses/ for authoritative versions) -5. **SECURITY.md** - Security vulnerability reporting and handling policy - -### Template Usage - -For each required template: - -1. Copy the template file from this directory -2. Rename removing the `template-` prefix -3. Place in repository root directory -4. Complete all required sections -5. Replace all placeholder values -6. Customize for your repository context -7. Validate compliance with Document Formatting Policy -8. Create Project task for the document - -### Compliance Requirements - -Required documentation MUST: - -- Exist at repository root level -- Follow template structure -- Include all mandatory sections -- Contain accurate, current information -- Be maintained per review cycle -- Have corresponding Project task entries - -### Non-Compliance Consequences - -Repositories without required documentation: - -- Are considered non-compliant -- May not satisfy audit requirements -- Cannot be used for production purposes -- Must remediate before deployment approval - -## Required Fields - -All required templates must have these completed: - -### README.md - -- Repository name and purpose -- Installation and usage instructions -- License information -- Contribution guidelines reference -- Contact information - -### CHANGELOG.md - -- Structured change history -- Release information -- Breaking changes documentation -- Migration guidance where applicable - -### CONTRIBUTING.md - -- Contribution workflow -- Code of conduct reference -- Development guidelines -- Pull request requirements -- Testing requirements - -### LICENSE.md - -- License text -- Copyright information -- License terms -- Redistribution terms - -### SECURITY.md - -- Supported versions -- Vulnerability reporting process -- Security best practices -- Response timeline and severity classification - -## Example Usage - -### New Repository Setup - -```bash -# Create repository directory -mkdir my-new-repo -cd my-new-repo - -# Initialize git -git init - -# Copy required templates -cp /templates/docs/required/template-README.md ./README.md -cp /templates/docs/required/template-CHANGELOG.md ./CHANGELOG.md -cp /templates/docs/required/template-CONTRIBUTING.md ./CONTRIBUTING.md -cp /templates/licenses/GPL-3.0 ./LICENSE -cp /templates/docs/required/template-SECURITY.md ./SECURITY.md - -# Edit each file to complete required fields -# Validate compliance -# Commit to repository -git add README.md CHANGELOG.md CONTRIBUTING.md LICENSE SECURITY.md -git commit -m "Add required documentation" -``` - -### Existing Repository Compliance - -```bash -# Check for missing required files -ls -1 README.md CHANGELOG.md CONTRIBUTING.md LICENSE.md SECURITY.md - -# Copy missing templates -# Complete required fields -# Commit to repository -``` - -## Template List - -- **template-README.md** - Repository overview template -- **template-CHANGELOG.md** - Change log template -- **template-CONTRIBUTING.md** - Contribution guidelines template -- **template-SECURITY.md** - Security policy template -- **template-CODE_OF_CONDUCT.md** - Community code of conduct template - -**Note**: LICENSE templates are in `/templates/licenses/` directory (see [templates/licenses/README.md](../../licenses/README.md)) - -## Metadata - -- **Document Type:** overview -- **Document Subtype:** catalog -- **Owner Role:** Documentation Owner -- **Approval Required:** No -- **Evidence Required:** Yes -- **Review Cycle:** Annual -- **Retention:** Indefinite -- **Compliance Tags:** Governance, Compliance -- **Status:** Published - -## Revision History - -- Initial required templates catalog established -- Mandatory template requirements defined -- Compliance and usage instructions documented diff --git a/templates/docs/required/index.md b/templates/docs/required/index.md deleted file mode 100644 index 7b8a9f8..0000000 --- a/templates/docs/required/index.md +++ /dev/null @@ -1,36 +0,0 @@ - - -# Docs Index: /templates/docs/required - -## Purpose - -This index provides navigation to documentation within this folder. - -## Documents - -- [README](./README.md) -- [template-CHANGELOG](./template-CHANGELOG.md) -- [template-CONTRIBUTING](./template-CONTRIBUTING.md) -- [template-LICENSE](./template-LICENSE.md) -- [template-README](./template-README.md) -- [template-SECURITY](./template-SECURITY.md) - -## Metadata - -- **Document Type:** index -- **Auto-generated:** This file is automatically generated by rebuild_indexes.py - -## Revision History - -| Change | Notes | Author | -| --- | --- | --- | -| Automated update | Generated by documentation index automation | rebuild_indexes.py | diff --git a/templates/docs/required/template-CHANGELOG.md b/templates/docs/required/template-CHANGELOG.md deleted file mode 100644 index 190fcd4..0000000 --- a/templates/docs/required/template-CHANGELOG.md +++ /dev/null @@ -1,27 +0,0 @@ - -# Changelog - -## [Unreleased] -### Added -- Initial defaults and docs - -## [1.0] - YYYY-MM-DD -### Added -- First published draft diff --git a/templates/docs/required/template-CONTRIBUTING.md b/templates/docs/required/template-CONTRIBUTING.md deleted file mode 100644 index b1dc0a8..0000000 --- a/templates/docs/required/template-CONTRIBUTING.md +++ /dev/null @@ -1,128 +0,0 @@ - - -# Contributing - -Thank you for your interest in contributing to **{{REPO_NAME}}**! - -This repository is governed by **[mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli)** — the authoritative source of coding standards, workflows, and policies for all Moko Consulting repositories. - -## Branch Strategy - -| Branch | Purpose | Deploys To | -|--------|---------|------------| -| `main` | Bleeding edge — all development merges here | CI only | -| `dev/XX.YY.ZZ` | Feature development | Dev server (version: "development") | -| `version/XX` | Stable frozen snapshot | Demo + RS servers | - -### Development Workflow - -``` -1. Create branch: git checkout -b dev/XX.YY.ZZ/my-feature -2. Develop + test (dev server auto-deploys on push) -3. Open PR → main (squash merge only) -4. Auto-release (version branch + tag + GitHub Release created automatically) -``` - -### Branch Naming - -| Prefix | Use | -|--------|-----| -| `dev/XX.YY.ZZ` | Feature development (e.g., `dev/02.00.00/add-extrafields`) | -| `version/XX` | Stable release (auto-created, never manually pushed) | -| `chore/` | Automated sync branches (managed by mokocli) | - -> **Never use** `feature/`, `hotfix/`, or `release/` prefixes — they are not part of the mokocli branch strategy. - -## Commit Conventions - -Use [conventional commits](https://www.conventionalcommits.org/): - -``` -feat(scope): add new extrafield for invoice tracking -fix(sql): correct column type in llx_mytable -docs(readme): update installation instructions -chore(deps): bump enterprise library to 04.02.30 -``` - -**Valid types:** `feat` | `fix` | `docs` | `chore` | `ci` | `refactor` | `style` | `test` | `perf` | `revert` | `build` - -## Pull Request Workflow - -1. **Branch** from `main` using `dev/XX.YY.ZZ/description` format -2. **Bump** the patch version in `README.md` before opening the PR -3. **Title** must be a valid conventional commit subject line -4. **Target** `main` — squash merge only (merge commits are disabled) -5. **CI checks** must pass before merge - -### What Happens on Merge - -When your PR is merged to `main`, these workflows run automatically: - -1. **sync-version-on-merge** — auto-bumps patch version, propagates to all file headers -2. **auto-release** — creates `version/XX` branch, git tag, and GitHub Release -3. **deploy-demo / deploy-rs** — deploys to demo and RS servers (if `src/**` changed) - -## Coding Standards - -All contributions must follow [mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli): - -| Standard | Reference | -|----------|-----------| -| Coding Style | [coding-style-guide.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/coding-style-guide.md) | -| File Headers | [file-header-standards.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/file-header-standards.md) | -| Branching | [branch-release-strategy.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/branch-release-strategy.md) | -| Merge Strategy | [merge-strategy.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/merge-strategy.md) | -| Scripting | [scripting-standards.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/scripting-standards.md) | -| Build & Release | [build-release.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/workflows/build-release.md) | - -## PR Checklist - -- [ ] Branch named `dev/XX.YY.ZZ/description` -- [ ] Patch version bumped in `README.md` -- [ ] Conventional commit format for PR title -- [ ] All new files have FILE INFORMATION headers -- [ ] `declare(strict_types=1)` in all PHP files -- [ ] PHPDoc on all public methods -- [ ] Tests pass -- [ ] CHANGELOG.md updated -- [ ] No secrets, tokens, or credentials committed - -## Custom Workflows - -Place repo-specific workflows in `.mokogitea/workflows/custom/` — they are **never overwritten or deleted** by mokocli sync: - -``` -.mokogitea/workflows/ -├── deploy-dev.yml ← Synced from mokocli -├── auto-release.yml ← Synced from mokocli -└── custom/ ← Your custom workflows (safe) - └── my-custom-ci.yml -``` - -## License - -By contributing, you agree that your contributions will be licensed under the [GPL-3.0-or-later](LICENSE) license. - ---- - -*This file is synced from [mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli). Do not edit directly — changes will be overwritten on the next sync.* diff --git a/templates/docs/required/template-INSTALLATION.md b/templates/docs/required/template-INSTALLATION.md deleted file mode 100644 index 6e680ae..0000000 --- a/templates/docs/required/template-INSTALLATION.md +++ /dev/null @@ -1,440 +0,0 @@ - - -# Installation - -## Overview - -This document provides comprehensive installation and setup instructions for **[PROJECT_NAME]**. - -## Table of Contents - -- [Prerequisites](#prerequisites) -- [Installation Methods](#installation-methods) -- [Quick Start](#quick-start) -- [Detailed Installation](#detailed-installation) -- [Configuration](#configuration) -- [Verification](#verification) -- [Troubleshooting](#troubleshooting) -- [Next Steps](#next-steps) - -## Prerequisites - -### System Requirements - -- **Operating System**: [Specify supported OS versions] -- **Runtime**: [e.g., PHP 8.1+, Node.js 20+, Python 3.9+] -- **Memory**: [Minimum RAM required] -- **Disk Space**: [Minimum disk space required] - -### Software Dependencies - -**Required:** -- [List required dependencies with versions] -- Example: Git 2.30+ -- Example: Composer 2.0+ - -**Optional:** -- [List optional dependencies] - -### Access Requirements - -- [Any required access permissions, credentials, or accounts] -- Example: GitHub account for cloning private repositories -- Example: Database access credentials - -## Installation Methods - -### Method 1: Using Package Manager (Recommended) - -**For [Platform/Package Manager]:** - -```bash -# Installation command -[package-manager] install [package-name] - -# Verify installation -[package-name] --version -``` - -### Method 2: From Source - -**Clone the repository:** - -```bash -# Clone from GitHub -git clone https://github.com/[organization]/[repository].git -cd [repository] - -# Checkout stable version (recommended) -git checkout tags/v[VERSION] -``` - -### Method 3: Using Pre-built Binary/Package - -**Download and install:** - -```bash -# Download release -wget https://github.com/[organization]/[repository]/releases/download/v[VERSION]/[package-name] - -# Make executable (if applicable) -chmod +x [package-name] - -# Move to system path (optional) -sudo mv [package-name] /usr/local/bin/ -``` - -## Quick Start - -For users who want to get started quickly: - -```bash -# 1. Install -[installation-command] - -# 2. Configure -[configuration-command] - -# 3. Run -[run-command] - -# 4. Verify -[verification-command] -``` - -## Detailed Installation - -### Step 1: Prepare Environment - -**1.1 Install System Dependencies** - -For Ubuntu/Debian: -```bash -sudo apt update -sudo apt install [dependencies] -``` - -For macOS: -```bash -brew install [dependencies] -``` - -For Windows: -```powershell -# PowerShell commands or link to Windows-specific guide -``` - -**1.2 Set Up Environment Variables** - -```bash -# Add to ~/.bashrc or ~/.zshrc -export [VAR_NAME]=[value] - -# Reload shell configuration -source ~/.bashrc -``` - -### Step 2: Install Application - -**2.1 Install via [Method]** - -```bash -[Detailed installation commands with explanations] -``` - -**2.2 Install Dependencies** - -```bash -# For PHP projects -composer install --no-dev - -# For Node.js projects -npm install --production - -# For Python projects -pip install -r requirements.txt -``` - -### Step 3: Initial Configuration - -**3.1 Create Configuration File** - -```bash -# Copy example configuration -cp config/config.example.php config/config.php - -# Or use configuration wizard -php bin/configure.php -``` - -**3.2 Configure Database (if applicable)** - -```bash -# Create database -mysql -u root -p -e "CREATE DATABASE [db_name];" - -# Import schema -mysql -u root -p [db_name] < database/schema.sql - -# Update configuration -nano config/database.php -``` - -**3.3 Set Permissions** - -```bash -# Set appropriate ownership -sudo chown -R www-data:www-data /var/www/[project] - -# Set directory permissions (755) -find /var/www/[project] -type d -exec chmod 755 {} \; - -# Set file permissions (644 for most files) -find /var/www/[project] -type f -exec chmod 644 {} \; - -# Make executable files executable (if needed) -chmod +x /var/www/[project]/bin/* - -# Restrict sensitive directories (storage, cache, logs) -chmod 750 /var/www/[project]/storage -chmod 750 /var/www/[project]/cache -``` - -### Step 4: Initialize Application - -**4.1 Run Setup Script** - -```bash -# Run initialization -php bin/setup.php - -# Or for other platforms -./scripts/setup.sh -``` - -**4.2 Create Admin User (if applicable)** - -```bash -# Create first admin user -php bin/create-admin.php --email=admin@example.com --name="Admin User" -``` - -## Configuration - -### Configuration Files - -| File | Purpose | Required | -|------|---------|----------| -| `config/config.php` | Main configuration | Yes | -| `config/database.php` | Database settings | Yes | -| `config/cache.php` | Cache configuration | No | -| `.env` | Environment variables | Yes | - -### Essential Configuration Options - -**config/config.php:** - -```php -return [ - 'app_name' => '[APPLICATION_NAME]', - 'app_url' => 'https://example.com', - 'debug' => false, // Set to true for development - 'timezone' => 'UTC', -]; -``` - -**Database Configuration:** - -```php -return [ - 'host' => 'localhost', - 'port' => 3306, - 'database' => '[db_name]', - 'username' => '[db_user]', - 'password' => '[db_password]', -]; -``` - -### Environment Variables - -Create `.env` file: - -```bash -APP_ENV=production -APP_DEBUG=false -APP_URL=https://example.com - -DB_HOST=localhost -DB_PORT=3306 -DB_DATABASE=[db_name] -DB_USERNAME=[db_user] -DB_PASSWORD=[db_password] -``` - -## Verification - -### Verify Installation - -**Check version:** - -```bash -[command] --version -# Expected output: v[VERSION] -``` - -**Run health check:** - -```bash -[command] health-check -# or -php bin/health-check.php -``` - -**Test basic functionality:** - -```bash -# Run test command -[command] test - -# Access web interface -curl http://localhost:[port]/health -``` - -### Expected Output - -``` -✓ Application installed successfully -✓ Database connection established -✓ All dependencies available -✓ Configuration valid -✓ System ready for use -``` - -## Troubleshooting - -### Common Issues - -#### Issue: Installation fails with dependency error - -**Symptom:** -``` -Error: Package [package-name] not found -``` - -**Solution:** -```bash -# Update package manager -[package-manager] update - -# Retry installation -[package-manager] install [package-name] -``` - -#### Issue: Database connection fails - -**Symptom:** -``` -Error: SQLSTATE[HY000] [2002] Connection refused -``` - -**Solution:** -1. Verify database service is running: - ```bash - sudo systemctl status mysql - ``` - -2. Check database credentials in configuration - -3. Verify database host and port are correct - -#### Issue: Permission denied errors - -**Symptom:** -``` -Error: Permission denied: /var/www/[project]/storage -``` - -**Solution:** -```bash -# Fix ownership -sudo chown -R www-data:www-data /var/www/[project] - -# Fix permissions -sudo chmod -R 755 /var/www/[project]/storage -``` - -### Getting Help - -If you encounter issues not covered here: - -1. **Check Logs:** - ```bash - tail -f logs/application.log - tail -f /var/log/apache2/error.log - ``` - -2. **Enable Debug Mode:** - ```bash - # In config/config.php - 'debug' => true - ``` - -3. **Consult Documentation:** - - [Troubleshooting Guide](guide/troubleshooting.md) - - [FAQ](guide/faq.md) - -4. **Community Support:** - - GitHub Issues: [link] - - Discussion Forum: [link] - - Email: support@example.com - -## Next Steps - -After successful installation: - -1. **Review Configuration:** - - [Configuration Guide](guide/configuration.md) - - [Security Hardening](guide/security.md) - -2. **Read Getting Started:** - - [Quick Start Guide](guide/quickstart.md) - - [User Guide](guide/user-guide.md) - -3. **For Developers:** - - [Development Setup](development/setup.md) - - [Contributing Guidelines](../CONTRIBUTING.md) - -4. **For Operators:** - - [Deployment Guide](deployment/procedures.md) - - [Monitoring Setup](operations/monitoring.md) - -## Additional Resources - -- [Project Documentation](README.md) -- [API Reference](reference/api/) -- [Change Log](../CHANGELOG.md) -- [Security Policy](../SECURITY.md) - ---- - -## Support - -For installation support: -- **Documentation**: Review all guides in [docs/guide/](guide/) -- **Issues**: Report problems at [GitHub Issues](https://github.com/[organization]/[repository]/issues) -- **Email**: support@mokoconsulting.tech - ---- - -*Last Updated: [DATE]* -*Version: [VERSION]* diff --git a/templates/docs/required/template-LICENSE.md b/templates/docs/required/template-LICENSE.md deleted file mode 100644 index b3a7105..0000000 --- a/templates/docs/required/template-LICENSE.md +++ /dev/null @@ -1,694 +0,0 @@ - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. - diff --git a/templates/docs/required/template-README.md b/templates/docs/required/template-README.md deleted file mode 100644 index d2ae455..0000000 --- a/templates/docs/required/template-README.md +++ /dev/null @@ -1,53 +0,0 @@ - - -# {{REPO_NAME}} - -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -[![mokocli](https://img.shields.io/badge/moko--platform-{{standards_version}}-orange)](https://git.mokoconsulting.tech/MokoConsulting/mokocli) - -> {{REPO_DESCRIPTION}} - -## Overview - - - -## Installation - - - -## Usage - - - -## Contributing - -See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. This repository follows [mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli). - -## License - -This project is licensed under the GNU General Public License v3.0 or later — see the [LICENSE](LICENSE) file for details. - -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. - -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/templates/docs/required/template-SECURITY.md b/templates/docs/required/template-SECURITY.md deleted file mode 100644 index a9631c5..0000000 --- a/templates/docs/required/template-SECURITY.md +++ /dev/null @@ -1,239 +0,0 @@ - - -# Security Policy - -## Purpose and Scope - -This document defines the security vulnerability reporting, response, and disclosure policy for [PROJECT_NAME] and all repositories governed by these standards. It establishes the authoritative process for responsible disclosure, assessment, remediation, and communication of security issues. - -## Supported Versions - -Security updates are provided for the following versions: - -| Version | Supported | -| ------- | ------------------ | -| [X.x.x] | :white_check_mark: | -| < [X.0] | :x: | - -Only the current major version receives security updates. Users should upgrade to the latest supported version to receive security patches. - -## Reporting a Vulnerability - -### Where to Report - -**DO NOT** create public GitHub issues for security vulnerabilities. - -Report security vulnerabilities privately to: - -**Email**: `security@[DOMAIN]` - -**Subject Line**: `[SECURITY] Brief Description` - -### What to Include - -A complete vulnerability report should include: - -1. **Description**: Clear explanation of the vulnerability -2. **Impact**: Potential security impact and severity assessment -3. **Affected Versions**: Which versions are vulnerable -4. **Reproduction Steps**: Detailed steps to reproduce the issue -5. **Proof of Concept**: Code, configuration, or demonstration (if applicable) -6. **Suggested Fix**: Proposed remediation (if known) -7. **Disclosure Timeline**: Your expectations for public disclosure - -### Response Timeline - -* **Initial Response**: Within 3 business days -* **Assessment Complete**: Within 7 business days -* **Fix Timeline**: Depends on severity (see below) -* **Disclosure**: Coordinated with reporter - -## Severity Classification - -Vulnerabilities are classified using the following severity levels: - -### Critical -* Remote code execution -* Authentication bypass -* Data breach or exposure of sensitive information -* **Fix Timeline**: 7 days - -### High -* Privilege escalation -* SQL injection or command injection -* Cross-site scripting (XSS) with significant impact -* **Fix Timeline**: 14 days - -### Medium -* Information disclosure (limited scope) -* Denial of service -* Security misconfigurations with moderate impact -* **Fix Timeline**: 30 days - -### Low -* Security best practice violations -* Minor information leaks -* Issues requiring user interaction or complex preconditions -* **Fix Timeline**: 60 days or next release - -## Remediation Process - -1. **Acknowledgment**: Security team confirms receipt and begins investigation -2. **Assessment**: Vulnerability is validated, severity assigned, and impact analyzed -3. **Development**: Security patch is developed and tested -4. **Review**: Patch undergoes security review and validation -5. **Release**: Fixed version is released with security advisory -6. **Disclosure**: Public disclosure follows coordinated timeline - -## Security Advisories - -Security advisories are published via: - -* GitHub Security Advisories -* Release notes and CHANGELOG.md -* Security mailing list (when established) - -Advisories include: - -* CVE identifier (if applicable) -* Severity rating -* Affected versions -* Fixed versions -* Mitigation steps -* Attribution (with reporter consent) - -## Security Best Practices - -For repositories adopting mokocli: - -### Required Controls - -* Enable GitHub security features (Dependabot, code scanning) -* Implement branch protection on `main` -* Require code review for all changes -* Enforce signed commits (recommended) -* Use secrets management (never commit credentials) -* Maintain security documentation -* Follow secure coding standards defined in `/docs/policy/` - -### CI/CD Security - -* Validate all inputs -* Sanitize outputs -* Use least privilege access -* Pin dependencies with hash verification -* Scan for vulnerabilities in dependencies -* Audit third-party actions and tools - -#### Automated Security Scanning - -All repositories MUST implement: - -**CodeQL Analysis**: -* Enabled for all supported languages (Python, JavaScript, TypeScript, Java, C/C++, C#, Go, Ruby) -* Runs on: push to main, pull requests, weekly schedule -* Query sets: `security-extended` and `security-and-quality` -* Configuration: `.github/workflows/codeql-analysis.yml` - -**Dependabot Security Updates**: -* Weekly scans for vulnerable dependencies -* Automated pull requests for security patches -* Configuration: `.github/dependabot.yml` - -**Secret Scanning**: -* Enabled by default with push protection -* Prevents accidental credential commits -* Partner patterns enabled - -**Dependency Review**: -* Required for all pull requests -* Blocks introduction of known vulnerable dependencies -* Automatic license compliance checking - -See [Security Scanning Policy](docs/policy/security-scanning.md) for detailed requirements. - -### Dependency Management - -* Keep dependencies up to date -* Monitor security advisories for dependencies -* Remove unused dependencies -* Audit new dependencies before adoption -* Document security-critical dependencies - -## Compliance and Governance - -This security policy is binding for all repositories governed by mokocli. Deviations require documented justification and approval from the Security Owner. - -Security policies are reviewed and updated at least annually or following significant security incidents. - -## Attribution and Recognition - -We acknowledge and appreciate responsible disclosure. With your permission, we will: - -* Credit you in security advisories -* List you in CHANGELOG.md for the fix release -* Recognize your contribution publicly (if desired) - -## Contact and Escalation - -* **Security Team**: security@[DOMAIN] -* **Primary Contact**: [CONTACT_EMAIL] -* **Escalation**: For urgent matters requiring immediate attention, contact the maintainer directly via GitHub - -## Out of Scope - -The following are explicitly out of scope: - -* Issues in third-party dependencies (report directly to maintainers) -* Social engineering attacks -* Physical security issues -* Denial of service via resource exhaustion without amplification -* Issues requiring physical access to systems -* Theoretical vulnerabilities without proof of exploitability - ---- - -## Metadata - -| Field | Value | -| ------------ | ----------------------------------------------- | -| Document | Security Policy | -| Path | /SECURITY.md | -| Repository | [REPOSITORY_URL] | -| Owner | [OWNER_NAME] | -| Scope | Security vulnerability handling | -| Applies To | All repositories governed by mokocli | -| Status | Active | -| Effective | [YYYY-MM-DD] | - -## Revision History - -| Date | Change Description | Author | -| ---------- | ------------------------------------------------- | --------------- | -| [YYYY-MM-DD] | Initial creation | [AUTHOR_NAME] | diff --git a/templates/docs/required/template-TODO.md b/templates/docs/required/template-TODO.md deleted file mode 100644 index c9b35e9..0000000 --- a/templates/docs/required/template-TODO.md +++ /dev/null @@ -1,10 +0,0 @@ -# TODO - -## Critical - - - -## Normal - - - -## Low - - diff --git a/templates/fonts/Google/Open Sans-300.ttf b/templates/fonts/Google/Open Sans-300.ttf deleted file mode 100644 index 3556a92..0000000 Binary files a/templates/fonts/Google/Open Sans-300.ttf and /dev/null differ diff --git a/templates/fonts/Google/Open Sans-300italic.ttf b/templates/fonts/Google/Open Sans-300italic.ttf deleted file mode 100644 index 02a66f1..0000000 Binary files a/templates/fonts/Google/Open Sans-300italic.ttf and /dev/null differ diff --git a/templates/fonts/Google/Open Sans-500.ttf b/templates/fonts/Google/Open Sans-500.ttf deleted file mode 100644 index 5fe31ed..0000000 Binary files a/templates/fonts/Google/Open Sans-500.ttf and /dev/null differ diff --git a/templates/fonts/Google/Open Sans-500italic.ttf b/templates/fonts/Google/Open Sans-500italic.ttf deleted file mode 100644 index f9dfd7e..0000000 Binary files a/templates/fonts/Google/Open Sans-500italic.ttf and /dev/null differ diff --git a/templates/fonts/Google/Open Sans-600.ttf b/templates/fonts/Google/Open Sans-600.ttf deleted file mode 100644 index be167af..0000000 Binary files a/templates/fonts/Google/Open Sans-600.ttf and /dev/null differ diff --git a/templates/fonts/Google/Open Sans-600italic.ttf b/templates/fonts/Google/Open Sans-600italic.ttf deleted file mode 100644 index 5196de8..0000000 Binary files a/templates/fonts/Google/Open Sans-600italic.ttf and /dev/null differ diff --git a/templates/fonts/Google/Open Sans-700.ttf b/templates/fonts/Google/Open Sans-700.ttf deleted file mode 100644 index 1658163..0000000 Binary files a/templates/fonts/Google/Open Sans-700.ttf and /dev/null differ diff --git a/templates/fonts/Google/Open Sans-700italic.ttf b/templates/fonts/Google/Open Sans-700italic.ttf deleted file mode 100644 index 23e6b86..0000000 Binary files a/templates/fonts/Google/Open Sans-700italic.ttf and /dev/null differ diff --git a/templates/fonts/Google/Open Sans-800.ttf b/templates/fonts/Google/Open Sans-800.ttf deleted file mode 100644 index c1799c5..0000000 Binary files a/templates/fonts/Google/Open Sans-800.ttf and /dev/null differ diff --git a/templates/fonts/Google/Open Sans-800italic.ttf b/templates/fonts/Google/Open Sans-800italic.ttf deleted file mode 100644 index 683066a..0000000 Binary files a/templates/fonts/Google/Open Sans-800italic.ttf and /dev/null differ diff --git a/templates/fonts/Google/Open Sans-Italic.ttf b/templates/fonts/Google/Open Sans-Italic.ttf deleted file mode 100644 index 222edf6..0000000 Binary files a/templates/fonts/Google/Open Sans-Italic.ttf and /dev/null differ diff --git a/templates/fonts/Google/Open Sans-Regular.ttf b/templates/fonts/Google/Open Sans-Regular.ttf deleted file mode 100644 index 4d3ff73..0000000 Binary files a/templates/fonts/Google/Open Sans-Regular.ttf and /dev/null differ diff --git a/templates/fonts/Google/OpenSans-Bold.ttf b/templates/fonts/Google/OpenSans-Bold.ttf deleted file mode 100644 index a803d91..0000000 Binary files a/templates/fonts/Google/OpenSans-Bold.ttf and /dev/null differ diff --git a/templates/fonts/Google/OpenSans-BoldItalic.ttf b/templates/fonts/Google/OpenSans-BoldItalic.ttf deleted file mode 100644 index 741b0dd..0000000 Binary files a/templates/fonts/Google/OpenSans-BoldItalic.ttf and /dev/null differ diff --git a/templates/fonts/Google/OpenSans-ExtraBold.ttf b/templates/fonts/Google/OpenSans-ExtraBold.ttf deleted file mode 100644 index a98b73c..0000000 Binary files a/templates/fonts/Google/OpenSans-ExtraBold.ttf and /dev/null differ diff --git a/templates/fonts/Google/OpenSans-ExtraBoldItalic.ttf b/templates/fonts/Google/OpenSans-ExtraBoldItalic.ttf deleted file mode 100644 index 29ea988..0000000 Binary files a/templates/fonts/Google/OpenSans-ExtraBoldItalic.ttf and /dev/null differ diff --git a/templates/fonts/Google/OpenSans-Italic.ttf b/templates/fonts/Google/OpenSans-Italic.ttf deleted file mode 100644 index 6533045..0000000 Binary files a/templates/fonts/Google/OpenSans-Italic.ttf and /dev/null differ diff --git a/templates/fonts/Google/OpenSans-ItalicVariable.ttf b/templates/fonts/Google/OpenSans-ItalicVariable.ttf deleted file mode 100644 index 6533045..0000000 Binary files a/templates/fonts/Google/OpenSans-ItalicVariable.ttf and /dev/null differ diff --git a/templates/fonts/Google/OpenSans-Light.ttf b/templates/fonts/Google/OpenSans-Light.ttf deleted file mode 100644 index 141eca7..0000000 Binary files a/templates/fonts/Google/OpenSans-Light.ttf and /dev/null differ diff --git a/templates/fonts/Google/OpenSans-LightItalic.ttf b/templates/fonts/Google/OpenSans-LightItalic.ttf deleted file mode 100644 index 940a773..0000000 Binary files a/templates/fonts/Google/OpenSans-LightItalic.ttf and /dev/null differ diff --git a/templates/fonts/Google/OpenSans-Medium.ttf b/templates/fonts/Google/OpenSans-Medium.ttf deleted file mode 100644 index bba26bb..0000000 Binary files a/templates/fonts/Google/OpenSans-Medium.ttf and /dev/null differ diff --git a/templates/fonts/Google/OpenSans-MediumItalic.ttf b/templates/fonts/Google/OpenSans-MediumItalic.ttf deleted file mode 100644 index 7485365..0000000 Binary files a/templates/fonts/Google/OpenSans-MediumItalic.ttf and /dev/null differ diff --git a/templates/fonts/Google/OpenSans-Regular.ttf b/templates/fonts/Google/OpenSans-Regular.ttf deleted file mode 100644 index c8a301e..0000000 Binary files a/templates/fonts/Google/OpenSans-Regular.ttf and /dev/null differ diff --git a/templates/fonts/Google/OpenSans-RegularVariable.ttf b/templates/fonts/Google/OpenSans-RegularVariable.ttf deleted file mode 100644 index c8a301e..0000000 Binary files a/templates/fonts/Google/OpenSans-RegularVariable.ttf and /dev/null differ diff --git a/templates/fonts/Google/OpenSans-SemiBold.ttf b/templates/fonts/Google/OpenSans-SemiBold.ttf deleted file mode 100644 index 7f6e04a..0000000 Binary files a/templates/fonts/Google/OpenSans-SemiBold.ttf and /dev/null differ diff --git a/templates/fonts/Google/OpenSans-SemiBoldItalic.ttf b/templates/fonts/Google/OpenSans-SemiBoldItalic.ttf deleted file mode 100644 index 4d2828e..0000000 Binary files a/templates/fonts/Google/OpenSans-SemiBoldItalic.ttf and /dev/null differ diff --git a/templates/fonts/osaka-re.ttf b/templates/fonts/osaka-re.ttf deleted file mode 100644 index db295e2..0000000 Binary files a/templates/fonts/osaka-re.ttf and /dev/null differ diff --git a/templates/governance.yml b/templates/governance.yml deleted file mode 100644 index 5a9925e..0000000 --- a/templates/governance.yml +++ /dev/null @@ -1,86 +0,0 @@ -# governance.yml — Repository governance configuration -# Place this file in each Template-* repo to define branch protections, -# labels, secrets, variables, and repository settings for governed repos. -# -# Copyright (C) 2026 Moko Consulting -# SPDX-License-Identifier: GPL-3.0-or-later -# Schema Version: 1.0 - -schema_version: "1.0" - -branch_protections: - - pattern: main - require_pull_request: true - required_approvals: 0 - dismiss_stale_reviews: true - block_on_rejected_reviews: true - restrict_pushes: true - push_whitelist: [jmiller] - enable_force_push: true - force_push_whitelist: [jmiller] - enforce_admins: false - - pattern: dev - require_pull_request: false - restrict_pushes: false - enable_force_push: true - force_push_whitelist: [jmiller] - - pattern: "rc/*" - require_pull_request: false - restrict_pushes: false - enable_force_push: true - force_push_whitelist: [jmiller] - - pattern: "beta/*" - require_pull_request: false - restrict_pushes: false - enable_force_push: true - force_push_whitelist: [jmiller] - - pattern: "alpha/*" - require_pull_request: false - restrict_pushes: false - enable_force_push: true - force_push_whitelist: [jmiller] - -labels: - - name: bug - color: d73a4a - description: "Something isn't working" - - name: enhancement - color: a2eeef - description: "New feature or request" - - name: documentation - color: "0075ca" - description: "Improvements or additions to documentation" - - name: security - color: ee0701 - description: "Security vulnerability or concern" - -secrets: - - name: GA_TOKEN - description: "Gitea API token for automation" - required: true - scope: org - - name: GH_TOKEN - description: "GitHub PAT for mirror operations" - required: false - scope: org - -variables: - - name: GITEA_URL - description: "Gitea instance URL" - default: "https://git.mokoconsulting.tech" - scope: org - - name: GITEA_ORG - description: "Gitea organization name" - default: "MokoConsulting" - scope: org - -repo_settings: - has_issues: true - has_projects: true - has_wiki: false - has_discussions: false - allow_merge_commit: true - allow_squash_merge: true - allow_rebase_merge: false - delete_branch_on_merge: true - allow_auto_merge: false diff --git a/templates/images/primary/apple-touch-icon.png b/templates/images/primary/apple-touch-icon.png deleted file mode 100644 index 6ee8e51..0000000 Binary files a/templates/images/primary/apple-touch-icon.png and /dev/null differ diff --git a/templates/images/primary/background.png b/templates/images/primary/background.png deleted file mode 100644 index 9dd154a..0000000 Binary files a/templates/images/primary/background.png and /dev/null differ diff --git a/templates/images/primary/background.svg b/templates/images/primary/background.svg deleted file mode 100644 index 593bf3d..0000000 --- a/templates/images/primary/background.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/templates/images/primary/favicon-96x96.png b/templates/images/primary/favicon-96x96.png deleted file mode 100644 index db33cbe..0000000 Binary files a/templates/images/primary/favicon-96x96.png and /dev/null differ diff --git a/templates/images/primary/favicon.gif b/templates/images/primary/favicon.gif deleted file mode 100644 index fb11e2f..0000000 Binary files a/templates/images/primary/favicon.gif and /dev/null differ diff --git a/templates/images/primary/favicon.ico b/templates/images/primary/favicon.ico deleted file mode 100644 index bb4ce54..0000000 Binary files a/templates/images/primary/favicon.ico and /dev/null differ diff --git a/templates/images/primary/favicon.svg b/templates/images/primary/favicon.svg deleted file mode 100644 index 0b89898..0000000 --- a/templates/images/primary/favicon.svg +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/images/primary/favicon_120.png b/templates/images/primary/favicon_120.png deleted file mode 100644 index 036b90d..0000000 Binary files a/templates/images/primary/favicon_120.png and /dev/null differ diff --git a/templates/images/primary/favicon_256.png b/templates/images/primary/favicon_256.png deleted file mode 100644 index a44ce8e..0000000 Binary files a/templates/images/primary/favicon_256.png and /dev/null differ diff --git a/templates/images/primary/logo.png b/templates/images/primary/logo.png deleted file mode 100644 index 91683ca..0000000 Binary files a/templates/images/primary/logo.png and /dev/null differ diff --git a/templates/images/primary/logo.svg b/templates/images/primary/logo.svg deleted file mode 100644 index 444e24c..0000000 --- a/templates/images/primary/logo.svg +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/images/primary/logo_tiger.png b/templates/images/primary/logo_tiger.png deleted file mode 100644 index ff43fd2..0000000 Binary files a/templates/images/primary/logo_tiger.png and /dev/null differ diff --git a/templates/images/primary/tigerhead_3.svg b/templates/images/primary/tigerhead_3.svg deleted file mode 100644 index 79f5a34..0000000 --- a/templates/images/primary/tigerhead_3.svg +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/templates/images/primary/web-app-manifest-192x192.png b/templates/images/primary/web-app-manifest-192x192.png deleted file mode 100644 index 1c01176..0000000 Binary files a/templates/images/primary/web-app-manifest-192x192.png and /dev/null differ diff --git a/templates/images/primary/web-app-manifest-512x512.png b/templates/images/primary/web-app-manifest-512x512.png deleted file mode 100644 index 4e42389..0000000 Binary files a/templates/images/primary/web-app-manifest-512x512.png and /dev/null differ diff --git a/templates/index.md b/templates/index.md deleted file mode 100644 index 0b85c2f..0000000 --- a/templates/index.md +++ /dev/null @@ -1,433 +0,0 @@ - - -# Templates Catalog - -## Overview - -This directory contains all templates and reference implementations provided by mokocli. Templates are non-authoritative examples that demonstrate how to implement the standards defined in `/docs/policy/`. - -## Purpose - -Templates serve to: - -- **Accelerate Development**: Provide ready-to-use starting points -- **Demonstrate Standards**: Show concrete implementations of policies -- **Ensure Consistency**: Standardize common patterns across repositories -- **Reduce Errors**: Pre-validated templates minimize mistakes -- **Guide Implementation**: Provide examples for complex requirements - -## Template Categories - -### Images (`images/`) - -Brand and favicon image assets for all Moko Consulting governed repositories. - -**Contents (`images/primary/`):** -- `logo.png` / `logo.svg` — Primary Moko Consulting logo -- `logo_tiger.png` / `tigerhead_3.svg` — Tiger-head brand variant -- `background.png` / `background.svg` — Full-width hero backgrounds -- `favicon_256.png` — ★ **Sync template** — deployed to Dolibarr module `img/` directories as `object_favicon_256.png` -- `favicon_120.png`, `favicon-96x96.png`, `favicon.svg`, `favicon.ico`, `favicon.gif` — favicon set -- `apple-touch-icon.png` — iOS home-screen icon -- `web-app-manifest-192x192.png`, `web-app-manifest-512x512.png` — PWA manifest icons - -**Documentation**: [docs/templates/images/index.md](../docs/templates/images/index.md) - -### Fonts (`fonts/`) - -Locally bundled typefaces for offline, print, and native use cases. - -**Contents:** -- `osaka-re.ttf` — Osaka Re, the **official stylized logo font** (TrueType, for wordmark and brand lockups only) - -Body text uses **Open Sans** via Google Fonts. -See [Google Fonts Policy](../docs/policy/google-fonts.md) for requirements. - -**Documentation**: [docs/templates/fonts/index.md](../docs/templates/fonts/index.md) - -### Workflows (`workflows/`) - -GitHub Actions workflow templates for CI/CD automation. - -**Categories:** -- **Joomla**: Joomla-specific workflows (CI, testing, deployment) -- **Dolibarr**: Dolibarr-specific workflows (CI, testing, deployment) -- **Generic**: Platform-agnostic workflows (CI, health checks, standards) - -**Key Templates:** -- Build and test automation -- Repository health monitoring -- Version branch management -- Standards compliance validation - -**Documentation**: [workflows/README.md](./workflows/README.md) - -### Configurations (`configs/`) - -Configuration file templates for common tools. - -**Templates:** -- `.editorconfig` - Editor configuration for consistent code style -- `.gitignore` - Git ignore patterns by project type -- `.yamllint` - YAML linting configuration -- Language-specific configuration files - -**Documentation**: [configs/README.md](./configs/README.md) - -### Documentation (`docs/`) - -Documentation file templates aligned with mokocli policies. - -**Templates:** -- `README.md.template` - Repository README template -- `CONTRIBUTING.md.template` - Contribution guidelines template -- `SECURITY.md.template` - Security policy template -- `CHANGELOG.md.template` - Changelog template -- Policy, guide, and checklist templates - -**Documentation**: [docs/index.md](./docs/index.md) - -### GitHub (`github/`) - -GitHub-specific templates for issues, PRs, and repository configuration. - -**Templates:** -- Issue templates (bug reports, feature requests, custom) -- Pull request template -- CODEOWNERS template -- GitHub Actions workflow examples - -**Documentation**: [github/README.md](./github/README.md) - -### Scripts (`scripts/`) - -Script templates and utilities for automation. - -**Templates:** -- Build automation scripts -- Validation and testing scripts -- Deployment scripts -- Documentation generation scripts - -**Requirements**: All scripts follow [Scripting Standards](../docs/policy/scripting-standards.md) - -**Documentation**: [scripts/index.md](./scripts/index.md) - -### Schemas (`schemas/`) - -Repository structure schema templates for defining custom repository types. - -**Templates:** -- `template-repository-structure.xml` - Base template for custom schemas -- Schema documentation and usage examples - -**Purpose**: -- Define required files and directories for repository types -- Enable automated structure validation -- Support platform-specific requirements - -**Documentation**: [docs/reference/schemas.md](./docs/reference/schemas.md) - -### Build (`build/`) - -Build system templates and configurations. - -**Templates:** -- Makefile templates by project type -- Build script templates -- Package configuration templates -- CI/CD build integration - -**Documentation**: [build/README.md](./build/README.md) - -### Security (`security/`) - -Security templates for directory listing prevention and web server protection. - -**Templates:** -- `index.html` - Static HTML redirect template (all projects) -- `index.php` - PHP server-side redirect template (PHP projects) - -**Purpose**: -- Prevent directory listing exposure on web servers -- Redirect unauthorized access to repository root -- Provide dual-layer protection for PHP-based projects - -**Usage:** -```bash -# For PHP projects (e.g., Dolibarr/MokoCRM) -find src -type d -exec sh -c 'cp templates/security/index.html "$1" && cp templates/security/index.php "$1"' _ {} \; - -# For non-PHP projects -find src -type d -exec cp templates/security/index.html {} \; -``` - -**Policy**: [SEC-DIR-001 Directory Listing Prevention](../docs/policy/security/directory-listing-prevention.md) - -**Documentation**: [security/README.md](./security/README.md) - -### Projects (`projects/`) - -Project management and planning templates. - -**Templates:** -- Project structure templates -- Task management templates -- Planning and roadmap templates - -**Documentation**: [projects/README.md](./projects/README.md) - -## Using Templates - -### Basic Usage - -1. **Identify Need**: Determine what template you need -2. **Locate Template**: Find appropriate template in this catalog -3. **Copy Template**: Copy template to your repository -4. **Customize**: Adapt template to your project needs -5. **Validate**: Ensure template meets standards -6. **Maintain**: Keep template updated with standards - -### Template vs Policy - -**Important Distinction:** - -- **Templates** (this directory): Non-binding examples and starting points -- **Policies** (`/docs/policy/`): Binding requirements that must be followed - -Templates demonstrate one way to implement policies, but other valid implementations may exist. Always refer to policies for requirements. - -### Customization Guidelines - -When customizing templates: - -1. **Preserve Structure**: Maintain overall organization -2. **Follow Standards**: Adhere to policies even when customizing -3. **Add Context**: Include project-specific information -4. **Update Headers**: Update file headers with your project info -5. **Document Changes**: Note significant deviations from template -6. **Keep Organized**: Maintain clear directory structure - -### Template Selection Guide - -**For New Repositories:** -- Review [Repository Organization Guide](../docs/guide/repository-organization.md) for structure -- Add documentation templates from `docs/` -- Copy workflow templates from `workflows/` -- Add configuration templates from `configs/` -- Apply security templates from `security/` to src directories - -**For Existing Repositories:** -- Identify gaps in current structure -- Add missing documentation from `docs/` -- Integrate workflows from `workflows/` -- Adopt configuration standards from `configs/` -- Apply security templates from `security/` to src directories - -**For Standards Compliance:** -- Use templates to meet minimum requirements -- Validate against policies in `/docs/policy/` -- Run compliance checks after implementation - -**For Security Hardening:** -- Apply `security/index.html` to all src directories (required) -- Apply `security/index.php` to all src directories in PHP projects (required) -- Refer to [SEC-DIR-001](../docs/policy/security/directory-listing-prevention.md) for requirements - -**Note:** Repository structure templates have been moved to individual scaffold repositories. See the [Repository Organization Guide](../docs/guide/repository-organization.md) for details. - -## Template Organization - -### Directory Structure - -``` -templates/ -├── index.md # This file - catalog of all templates -├── images/ # Brand and favicon image assets -│ └── primary/ # Current production brand set (logo, favicon_256, etc.) -├── fonts/ # Locally bundled typeface files (offline / print / native use) -│ └── osaka-re.ttf # Osaka Re — stylized logo font (TrueType) -├── workflows/ # GitHub Actions workflow templates -│ ├── joomla/ # Joomla-specific workflows -│ ├── dolibarr/ # Dolibarr-specific workflows -│ ├── generic/ # Platform-agnostic workflows -│ └── README.md -├── configs/ # Configuration file templates -│ ├── .editorconfig -│ ├── .gitignore -│ ├── .yamllint -│ └── README.md -├── docs/ # Documentation templates -│ ├── required/ # Required documentation files -│ ├── extra/ # Optional documentation -│ ├── README.md -│ └── index.md -├── github/ # GitHub-specific templates -│ ├── ISSUE_TEMPLATE/ # Issue templates -│ ├── PULL_REQUEST_TEMPLATE.md -│ ├── CODEOWNERS.template -│ └── README.md -├── security/ # Security templates -│ ├── index.html # Static redirect template -│ ├── index.php # PHP redirect template -│ └── README.md -├── scripts/ # Script templates -│ └── index.md -├── build/ # Build system templates -│ └── README.md -└── projects/ # Project management templates - └── README.md -``` - -**Note:** Repository structure templates (formerly in `repos/`) have been moved to individual scaffold repositories for better maintainability. - -### Naming Conventions - -**Template Files:** -- Use `.template` suffix for files meant to be copied and renamed -- Use descriptive names: `README.md.template`, `CODEOWNERS.template` -- Use lowercase with hyphens for multi-word names - -**Directories:** -- Use lowercase names -- Use singular nouns when possible -- Be descriptive but concise - -## Template Maintenance - -### Version Control - -Templates are versioned with file headers: - -```markdown -# FILE INFORMATION -VERSION: XX.YY.ZZ -``` - -**Version Increments:** -- **Major (XX)**: Breaking changes to template structure -- **Minor (YY)**: New sections or significant additions -- **Patch (ZZ)**: Minor fixes, typos, clarifications - -### Update Process - -1. **Identify Need**: Determine what needs to change -2. **Update Template**: Make changes following standards -3. **Update Version**: Increment version number appropriately -4. **Document Change**: Add to template's revision history -5. **Test Template**: Validate template works as expected -6. **Submit PR**: Create pull request for review -7. **Communicate**: Notify users of significant changes - -### Deprecation - -To deprecate a template: - -1. Add deprecation notice at top of template -2. Provide alternative template or approach -3. Set removal date (minimum 90 days) -4. Update catalog and documentation -5. After removal date, archive or remove - -## Best Practices - -### Creating New Templates - -1. **Start with Standards**: Review relevant policies first -2. **Use Existing Templates**: Base on similar templates when possible -3. **Include Headers**: Add proper file headers with metadata -4. **Document Usage**: Include inline comments and usage notes -5. **Provide Examples**: Show concrete usage examples -6. **Test Thoroughly**: Validate template works as intended -7. **Get Review**: Have template reviewed before publishing - -### Using Templates - -1. **Understand Purpose**: Read template documentation first -2. **Review Policies**: Understand requirements being implemented -3. **Customize Appropriately**: Adapt to project needs -4. **Validate Result**: Ensure result meets standards -5. **Keep Updated**: Periodically review for updates -6. **Report Issues**: Feedback improves templates - -### Common Pitfalls - -- **Don't treat templates as requirements**: Templates are examples, policies are requirements -- **Don't blindly copy**: Understand what you're copying and why -- **Don't skip customization**: Templates need project-specific adaptation -- **Don't ignore updates**: Old templates may not reflect current standards -- **Don't forget headers**: Update file headers when using templates - -## Support and Resources - -### Documentation - -- [Repository Organization Guide](../docs/guide/repository-organization.md) -- [File Header Standards](../docs/policy/file-header-standards.md) -- [Scripting Standards](../docs/policy/scripting-standards.md) -- [Workflow Standards](../docs/policy/workflow-standards.md) - -### Getting Help - -- Browse existing templates for examples -- Review mokocli repository as reference implementation -- Consult with repository maintainers -- Submit issues for template problems or requests - -### Contributing - -To contribute new templates or improvements: - -1. Review [CONTRIBUTING.md](../CONTRIBUTING.md) -2. Follow template creation best practices -3. Submit pull request with: - - New/updated template - - Documentation updates - - Test results or validation -4. Address review feedback -5. Template merged after approval - -## Metadata - -* **Document**: templates/index.md -* **Repository**: [mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli) -* **Owner**: Moko Consulting Engineering Team -* **Scope**: Template catalog and usage guide -* **Lifecycle**: Active -* **Audience**: All engineers and developers - -## Revision History - -| Version | Date | Author | Notes | -| -------- | ---------- | ------------------------------- | ----------------------------------------------- | -| 03.00.00 | 2026-01-28 | GitHub Copilot | Version bump to 03.00.00 across repository | -| 02.02.00 | 2026-01-16 | GitHub Copilot | Removed repos/ - moved to individual scaffold repositories | -| 02.01.00 | 2026-01-16 | GitHub Copilot | Added security templates section and reorganized for usability | -| 02.00.00 | 2026-01-13 | GitHub Copilot | Comprehensive templates catalog creation | -| 01.00.00 | 2025-01-XX | rebuild_indexes.py | Auto-generated initial index | diff --git a/templates/joomla/index.html b/templates/joomla/index.html deleted file mode 100644 index 7d3e719..0000000 --- a/templates/joomla/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/templates/licenses/GPL-3.0 b/templates/licenses/GPL-3.0 deleted file mode 100644 index 1120bdf..0000000 --- a/templates/licenses/GPL-3.0 +++ /dev/null @@ -1,696 +0,0 @@ - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. - diff --git a/templates/licenses/README.md b/templates/licenses/README.md deleted file mode 100644 index eb97d3a..0000000 --- a/templates/licenses/README.md +++ /dev/null @@ -1,216 +0,0 @@ - - -# License Templates - -## Purpose - -This directory contains authoritative license files that serve as the official templates for all repositories in the `mokoconsulting-tech` organization. These files are the single source of truth for license text used across all projects. - -## Authoritative Licenses - -The following license files are maintained as authoritative sources: - -### GPL-3.0 (GNU General Public License v3.0 or later) - -**File**: `GPL-3.0` - -**SPDX Identifier**: `GPL-3.0-or-later` - -**Usage**: This is the **primary and default license** for all Moko Consulting projects unless explicitly specified otherwise. - -**Source**: Official text from Free Software Foundation (https://www.gnu.org/licenses/gpl-3.0.txt) - -**Default License For**: -- **Generic repositories** (default) -- **Joomla/WaaS component repositories** (default) -- **Dolibarr/CRM module repositories** (default) -- All software projects, libraries, frameworks, tools and utilities - -**Repository Requirements**: -- Copy this file to repository root as `LICENSE` (no extension) -- Include copyright notice in project files -- Update copyright year and owner in project header comments - -### MIT License - -**File**: `MIT` - -**SPDX Identifier**: `MIT` - -**Usage**: Alternative permissive license for specific use cases. - -**When to Use**: -- When GPL compatibility is not required -- Maximum permissiveness desired -- Integration with MIT-licensed dependencies - -### Apache License 2.0 - -**File**: `Apache-2.0` - -**SPDX Identifier**: `Apache-2.0` - -**Usage**: Alternative license providing patent protection. - -**When to Use**: -- Projects requiring explicit patent grant -- Apache ecosystem integration -- When patent protection is critical - -## Using These Licenses - -### For New Repositories - -1. **Copy the license file** to your repository root: - ```bash - # From your repository root - cp /path/to/mokocli/templates/licenses/GPL-3.0 ./LICENSE - ``` - -2. **No file extension**: The LICENSE file must not have an extension (use `LICENSE`, not `LICENSE.txt` or `LICENSE.md`) - -3. **Add copyright notice**: Update your project's README and source files with appropriate copyright notices - -4. **Reference in documentation**: Mention the license in your README.md - -### For Existing Repositories - -1. **Verify license text**: Compare your existing LICENSE file with the authoritative version -2. **Update if needed**: If text differs, update to match the authoritative version -3. **Document changes**: Note license updates in CHANGELOG.md - -## Updating License Templates - -When updating these authoritative license files: - -1. **Verify source**: Ensure updates come from official sources (FSF, OSI, Apache Foundation) -2. **Document changes**: Update this README with change details -3. **Notify stakeholders**: Announce updates to development team -4. **Version control**: Commit changes with detailed commit message -5. **Propagate**: Update existing repositories as needed - -## License Selection Guide - -### Decision Tree - -``` -Is this a new Moko Consulting project? - └─ Yes → Use GPL-3.0-or-later (default) - └─ No → See exceptions below - -Project Type Default Licenses: - - Generic Repository → GPL-3.0-or-later - - Joomla/WaaS Component → GPL-3.0-or-later - - Dolibarr/CRM Module → GPL-3.0-or-later - -Exceptions requiring different licenses: - - Third-party integration requiring MIT → Use MIT - - Patent-sensitive project → Use Apache-2.0 - - Client-specific requirements → Consult legal team -``` - -### Compatibility Matrix - -| Your License | Can Use GPL-3.0 | Can Use MIT | Can Use Apache-2.0 | -|--------------|-----------------|-------------|-------------------| -| GPL-3.0-or-later | ✅ Yes | ✅ Yes | ✅ Yes | -| MIT | ❌ No | ✅ Yes | ✅ Yes | -| Apache-2.0 | ⚠️ Compatible but becomes GPL | ✅ Yes | ✅ Yes | - -## Compliance Requirements - -### GPL-3.0-or-later Projects - -**Must**: -- Include complete license text in LICENSE file -- Include copyright notice in source files -- Provide source code to recipients -- Document modifications to GPL code -- License derivative works under GPL-3.0-or-later - -**Must Not**: -- Remove or modify license text -- Claim proprietary ownership of GPL code -- Impose additional restrictions - -### File Headers - -Include this header in all source files: - -``` -Copyright (C) [YEAR] Moko Consulting - -This file is part of [PROJECT NAME]. - -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. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -``` - -## Verification - -### Verify License Text Integrity - -```bash -# Check if your LICENSE matches the authoritative version -diff LICENSE /path/to/mokocli/templates/licenses/GPL-3.0 - -# Calculate checksum for verification -sha256sum LICENSE -``` - -### Automated Verification - -The repository health workflow automatically verifies: -- LICENSE file exists -- LICENSE file has no extension -- License text matches authoritative version (for GPL-3.0) -- SPDX identifier is present in source files - -## References - -- [GNU GPL v3.0 Official](https://www.gnu.org/licenses/gpl-3.0.html) -- [SPDX License List](https://spdx.org/licenses/) -- [Choose a License](https://choosealicense.com/) -- [GPL Compliance Guide](https://www.gnu.org/licenses/gpl-compliance.html) -- [mokocli License Policy](../../docs/policy/license-compliance.md) - -## Maintenance - -**Owner**: Legal/Compliance Team -**Review Cycle**: Annual or when FSF updates licenses -**Last Updated**: 2026-01-16 -**Next Review**: 2027-01-16 - -## Change History - -| Date | Change | Reason | Author | -|------|--------|--------|--------| -| 2026-01-16 | Initial creation with GPL-3.0 | Establish authoritative license source | GitHub Copilot | - -## Contact - -For questions about license selection or compliance: -- **Email**: legal@mokoconsulting.tech -- **Documentation**: See [License Compliance Policy](../../docs/policy/license-compliance.md) -- **Issues**: Open an issue in mokocli repository diff --git a/templates/licenses/index.md b/templates/licenses/index.md deleted file mode 100644 index 0139a89..0000000 --- a/templates/licenses/index.md +++ /dev/null @@ -1,43 +0,0 @@ - - -# Docs Index: /templates/licenses - -## Purpose - -This directory contains authoritative license files that serve as the official templates for all repositories in the organization. - -## License Files - -- [GPL-3.0](./GPL-3.0) - GNU General Public License v3.0 or later (Primary license) -- [README](./README.md) - License selection guide and compliance requirements - -## Usage - -Copy the appropriate license file to your repository root as `LICENSE` (no extension). - -See README.md for: -- License selection guidance -- Compliance requirements -- File header templates -- Verification procedures - -## Metadata - -- **Document Type:** index -- **Owner:** Legal/Compliance Team -- **Review Cycle:** Annual - -## Revision History - -| Change | Notes | Author | -| --- | --- | --- | -| Initial creation | Added authoritative license templates | GitHub Copilot | diff --git a/templates/makefiles/Makefile.dolibarr.template b/templates/makefiles/Makefile.dolibarr.template deleted file mode 100644 index 253fa30..0000000 --- a/templates/makefiles/Makefile.dolibarr.template +++ /dev/null @@ -1,402 +0,0 @@ -# Makefile for Dolibarr Modules -# Copyright (C) 2026 Moko Consulting -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This is a reference Makefile for building Dolibarr modules. -# Copy this to your repository root as "Makefile" and customize as needed. - -# ============================================================================== -# CONFIGURATION - Customize these for your module -# ============================================================================== - -# Module Configuration -MODULE_NAME := mokoexample -MODULE_VERSION := 1.0.0 -MODULE_NUMBER := 500000 -# Module number should be unique (500000+ for custom modules) - -# Directories -SRC_DIR := . -BUILD_DIR := build -DIST_DIR := dist -DOCS_DIR := docs - -# Dolibarr Installation (for local testing - customize path) -DOLIBARR_ROOT := /var/www/html/dolibarr -DOLIBARR_CUSTOM := $(DOLIBARR_ROOT)/htdocs/custom/$(MODULE_NAME) - -# Tools -PHP := php -COMPOSER := composer -PHPCS := vendor/bin/phpcs -PHPCBF := vendor/bin/phpcbf -PHPSTAN := vendor/bin/phpstan -PHPUNIT := vendor/bin/phpunit -MSGFMT := msgfmt - -# Coding Standards -PHPCS_STANDARD := PSR12 -PHPSTAN_LEVEL := 5 - -# Files to include in package (customize as needed) -PACKAGE_FILES := admin class core img langs lib sql *.md *.php - -# Colors for output -COLOR_RESET := \033[0m -COLOR_GREEN := \033[32m -COLOR_YELLOW := \033[33m -COLOR_BLUE := \033[34m -COLOR_RED := \033[31m - -# ============================================================================== -# TARGETS -# ============================================================================== - -.PHONY: help -help: ## Show this help message - @echo "$(COLOR_BLUE)╔════════════════════════════════════════════════════════════╗$(COLOR_RESET)" - @echo "$(COLOR_BLUE)║ Dolibarr Module Makefile ║$(COLOR_RESET)" - @echo "$(COLOR_BLUE)╚════════════════════════════════════════════════════════════╝$(COLOR_RESET)" - @echo "" - @echo "Module: $(MODULE_NAME) v$(MODULE_VERSION) (#$(MODULE_NUMBER))" - @echo "" - @echo "$(COLOR_GREEN)Available targets:$(COLOR_RESET)" - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " $(COLOR_BLUE)%-20s$(COLOR_RESET) %s\n", $$1, $$2}' - @echo "" - @echo "$(COLOR_YELLOW)Quick Start:$(COLOR_RESET)" - @echo " 1. make install-deps # Install dependencies" - @echo " 2. make build # Build module package" - @echo " 3. make test # Run tests" - @echo "" - -.PHONY: install-deps -install-deps: ## Install development dependencies - @echo "$(COLOR_BLUE)Installing dependencies...$(COLOR_RESET)" - @if [ -f "composer.json" ]; then \ - $(COMPOSER) install; \ - echo "$(COLOR_GREEN)✓ Composer dependencies installed$(COLOR_RESET)"; \ - else \ - echo "$(COLOR_YELLOW)⚠ No composer.json found$(COLOR_RESET)"; \ - fi - -.PHONY: update-deps -update-deps: ## Update dependencies - @echo "$(COLOR_BLUE)Updating dependencies...$(COLOR_RESET)" - @if [ -f "composer.json" ]; then \ - $(COMPOSER) update; \ - echo "$(COLOR_GREEN)✓ Composer dependencies updated$(COLOR_RESET)"; \ - fi - -.PHONY: lint -lint: ## Run PHP linter (syntax check) - @echo "$(COLOR_BLUE)Running PHP linter...$(COLOR_RESET)" - @find . -name "*.php" ! -path "./vendor/*" ! -path "./$(BUILD_DIR)/*" \ - -exec $(PHP) -l {} \; | grep -v "No syntax errors" || true - @echo "$(COLOR_GREEN)✓ PHP linting complete$(COLOR_RESET)" - -.PHONY: phpcs -phpcs: ## Run PHP CodeSniffer - @echo "$(COLOR_BLUE)Running PHP CodeSniffer...$(COLOR_RESET)" - @if [ -f "$(PHPCS)" ]; then \ - $(PHPCS) --standard=$(PHPCS_STANDARD) --extensions=php --ignore=vendor,$(BUILD_DIR) .; \ - else \ - echo "$(COLOR_YELLOW)⚠ PHP CodeSniffer not installed. Run: make install-deps$(COLOR_RESET)"; \ - fi - -.PHONY: phpcbf -phpcbf: ## Fix coding standards automatically - @echo "$(COLOR_BLUE)Running PHP Code Beautifier...$(COLOR_RESET)" - @if [ -f "$(PHPCBF)" ]; then \ - $(PHPCBF) --standard=$(PHPCS_STANDARD) --extensions=php --ignore=vendor,$(BUILD_DIR) .; \ - echo "$(COLOR_GREEN)✓ Code formatting applied$(COLOR_RESET)"; \ - else \ - echo "$(COLOR_YELLOW)⚠ PHP Code Beautifier not installed. Run: make install-deps$(COLOR_RESET)"; \ - fi - -.PHONY: phpstan -phpstan: ## Run PHPStan static analysis - @echo "$(COLOR_BLUE)Running PHPStan...$(COLOR_RESET)" - @if [ -f "$(PHPSTAN)" ]; then \ - $(PHPSTAN) analyse --level=$(PHPSTAN_LEVEL) --no-progress class admin core || true; \ - else \ - echo "$(COLOR_YELLOW)⚠ PHPStan not installed. Run: make install-deps$(COLOR_RESET)"; \ - fi - -.PHONY: validate -validate: lint phpcs ## Run all validation checks - @echo "$(COLOR_GREEN)✓ All validation checks passed$(COLOR_RESET)" - -.PHONY: test -test: ## Run PHPUnit tests - @echo "$(COLOR_BLUE)Running tests...$(COLOR_RESET)" - @if [ -f "$(PHPUNIT)" ] && [ -f "phpunit.xml" ]; then \ - $(PHPUNIT); \ - else \ - echo "$(COLOR_YELLOW)⚠ PHPUnit not configured$(COLOR_RESET)"; \ - fi - -.PHONY: test-coverage -test-coverage: ## Run tests with coverage report - @echo "$(COLOR_BLUE)Running tests with coverage...$(COLOR_RESET)" - @if [ -f "$(PHPUNIT)" ] && [ -f "phpunit.xml" ]; then \ - $(PHPUNIT) --coverage-html $(BUILD_DIR)/coverage; \ - echo "$(COLOR_GREEN)✓ Coverage report: $(BUILD_DIR)/coverage/index.html$(COLOR_RESET)"; \ - else \ - echo "$(COLOR_YELLOW)⚠ PHPUnit not configured$(COLOR_RESET)"; \ - fi - -.PHONY: compile-translations -compile-translations: ## Compile translation files (.po to .mo) - @echo "$(COLOR_BLUE)Compiling translation files...$(COLOR_RESET)" - @if command -v $(MSGFMT) >/dev/null 2>&1; then \ - for po in langs/*/*.po 2>/dev/null; do \ - if [ -f "$$po" ]; then \ - mo=$${po%.po}.mo; \ - $(MSGFMT) -o "$$mo" "$$po"; \ - echo " Compiled: $$po -> $$mo"; \ - fi; \ - done; \ - echo "$(COLOR_GREEN)✓ Translation files compiled$(COLOR_RESET)"; \ - else \ - echo "$(COLOR_YELLOW)⚠ msgfmt not installed. Install: apt-get install gettext$(COLOR_RESET)"; \ - fi - -.PHONY: validate-structure -validate-structure: ## Validate Dolibarr module structure - @echo "$(COLOR_BLUE)Validating module structure...$(COLOR_RESET)" - @ERRORS=0; \ - \ - if [ ! -d "core/modules" ]; then \ - echo "$(COLOR_RED)✗ Missing core/modules/ directory$(COLOR_RESET)"; \ - ERRORS=$$((ERRORS + 1)); \ - fi; \ - \ - if [ ! -f "core/modules/mod$(MODULE_NAME).class.php" ]; then \ - echo "$(COLOR_YELLOW)⚠ Module descriptor not found: core/modules/mod$(MODULE_NAME).class.php$(COLOR_RESET)"; \ - fi; \ - \ - if [ ! -d "admin" ]; then \ - echo "$(COLOR_YELLOW)⚠ No admin/ directory (may be optional)$(COLOR_RESET)"; \ - fi; \ - \ - if [ ! -d "class" ]; then \ - echo "$(COLOR_YELLOW)⚠ No class/ directory (may be optional)$(COLOR_RESET)"; \ - fi; \ - \ - if [ $$ERRORS -eq 0 ]; then \ - echo "$(COLOR_GREEN)✓ Module structure appears valid$(COLOR_RESET)"; \ - else \ - echo "$(COLOR_RED)✗ Module structure validation failed$(COLOR_RESET)"; \ - exit 1; \ - fi - -.PHONY: check-migrations -check-migrations: ## Check SQL migration files - @echo "$(COLOR_BLUE)Checking database migration files...$(COLOR_RESET)" - @if [ -d "sql" ]; then \ - SQL_FILES=$$(find sql -name "*.sql" 2>/dev/null | wc -l); \ - if [ $$SQL_FILES -gt 0 ]; then \ - echo "$(COLOR_GREEN)✓ Found $$SQL_FILES SQL migration files$(COLOR_RESET)"; \ - find sql -name "*.sql" -exec echo " {}" \;; \ - else \ - echo "$(COLOR_YELLOW)⚠ No SQL migration files found$(COLOR_RESET)"; \ - fi; \ - else \ - echo "$(COLOR_YELLOW)⚠ No sql/ directory$(COLOR_RESET)"; \ - fi - -.PHONY: clean -clean: ## Clean build artifacts - @echo "$(COLOR_BLUE)Cleaning build artifacts...$(COLOR_RESET)" - @rm -rf $(BUILD_DIR) $(DIST_DIR) vendor - @find . -name "*.log" -delete - @find . -name ".DS_Store" -delete - @echo "$(COLOR_GREEN)✓ Build artifacts cleaned$(COLOR_RESET)" - -.PHONY: build -build: clean validate validate-structure compile-translations ## Build module package - @echo "$(COLOR_BLUE)Building Dolibarr module package...$(COLOR_RESET)" - @mkdir -p $(DIST_DIR) $(BUILD_DIR)/$(MODULE_NAME) - - # Copy files to build directory - @rsync -av --progress \ - --exclude='$(BUILD_DIR)' \ - --exclude='$(DIST_DIR)' \ - --exclude='vendor' \ - --exclude='.git*' \ - --exclude='Makefile' \ - --exclude='composer.json' \ - --exclude='composer.lock' \ - --exclude='phpunit.xml' \ - --exclude='phpstan.neon' \ - --exclude='tests/' \ - $(PACKAGE_FILES) $(BUILD_DIR)/$(MODULE_NAME)/ 2>/dev/null || true - - # Create ZIP package - @cd $(BUILD_DIR) && zip -r ../$(DIST_DIR)/$(MODULE_NAME)-$(MODULE_VERSION).zip $(MODULE_NAME) - - @echo "$(COLOR_GREEN)✓ Package created: $(DIST_DIR)/$(MODULE_NAME)-$(MODULE_VERSION).zip$(COLOR_RESET)" - -.PHONY: package -package: build ## Alias for build - @echo "$(COLOR_GREEN)✓ Package ready for distribution$(COLOR_RESET)" - -.PHONY: install-local -install-local: build ## Install module to local Dolibarr - @echo "$(COLOR_BLUE)Installing module to local Dolibarr...$(COLOR_RESET)" - @if [ ! -d "$(DOLIBARR_ROOT)" ]; then \ - echo "$(COLOR_RED)✗ Dolibarr root not found at $(DOLIBARR_ROOT)$(COLOR_RESET)"; \ - echo "Update DOLIBARR_ROOT in Makefile"; \ - exit 1; \ - fi - - # Remove existing installation - @rm -rf $(DOLIBARR_CUSTOM) - - # Extract package - @mkdir -p $(DOLIBARR_ROOT)/htdocs/custom - @unzip -o $(DIST_DIR)/$(MODULE_NAME)-$(MODULE_VERSION).zip -d $(DOLIBARR_ROOT)/htdocs/custom/ - - # Set permissions (if running as root/sudo) - @if [ "$$EUID" -eq 0 ]; then \ - chown -R www-data:www-data $(DOLIBARR_CUSTOM); \ - echo "$(COLOR_GREEN)✓ Permissions set$(COLOR_RESET)"; \ - fi - - @echo "$(COLOR_GREEN)✓ Module installed at $(DOLIBARR_CUSTOM)$(COLOR_RESET)" - @echo "$(COLOR_YELLOW)Enable module at: Home → Setup → Modules/Applications$(COLOR_RESET)" - -.PHONY: uninstall-local -uninstall-local: ## Uninstall module from local Dolibarr - @echo "$(COLOR_BLUE)Uninstalling module...$(COLOR_RESET)" - @if [ -d "$(DOLIBARR_CUSTOM)" ]; then \ - rm -rf $(DOLIBARR_CUSTOM); \ - echo "$(COLOR_GREEN)✓ Module uninstalled$(COLOR_RESET)"; \ - else \ - echo "$(COLOR_YELLOW)⚠ Module not installed at $(DOLIBARR_CUSTOM)$(COLOR_RESET)"; \ - fi - -.PHONY: dev-install -dev-install: ## Create symlink for development - @echo "$(COLOR_BLUE)Creating development symlink...$(COLOR_RESET)" - @if [ ! -d "$(DOLIBARR_ROOT)" ]; then \ - echo "$(COLOR_RED)✗ Dolibarr root not found at $(DOLIBARR_ROOT)$(COLOR_RESET)"; \ - echo "Update DOLIBARR_ROOT in Makefile"; \ - exit 1; \ - fi - - @rm -rf $(DOLIBARR_CUSTOM) - @mkdir -p $(DOLIBARR_ROOT)/htdocs/custom - @ln -s "$(PWD)" $(DOLIBARR_CUSTOM) - - @echo "$(COLOR_GREEN)✓ Development symlink created at $(DOLIBARR_CUSTOM)$(COLOR_RESET)" - @echo "$(COLOR_YELLOW)Enable module at: Home → Setup → Modules/Applications$(COLOR_RESET)" - -.PHONY: watch -watch: ## Watch for changes and rebuild - @echo "$(COLOR_BLUE)Watching for changes...$(COLOR_RESET)" - @echo "$(COLOR_YELLOW)Press Ctrl+C to stop$(COLOR_RESET)" - @while true; do \ - inotifywait -r -e modify,create,delete --exclude '($(BUILD_DIR)|$(DIST_DIR)|vendor)' . 2>/dev/null || \ - (echo "$(COLOR_YELLOW)⚠ inotifywait not installed. Install: apt-get install inotify-tools$(COLOR_RESET)" && sleep 5); \ - make validate; \ - done - -.PHONY: docs -docs: ## Generate documentation - @echo "$(COLOR_BLUE)Generating documentation...$(COLOR_RESET)" - @mkdir -p $(DOCS_DIR) - @if command -v phpdoc >/dev/null 2>&1; then \ - phpdoc -d class,admin,core -t $(DOCS_DIR); \ - echo "$(COLOR_GREEN)✓ Documentation generated in $(DOCS_DIR)$(COLOR_RESET)"; \ - else \ - echo "$(COLOR_YELLOW)⚠ phpDocumentor not installed$(COLOR_RESET)"; \ - fi - -.PHONY: db-install -db-install: ## Install database tables (requires DB credentials) - @echo "$(COLOR_BLUE)Installing database tables...$(COLOR_RESET)" - @if [ -z "$(DB_NAME)" ]; then \ - echo "$(COLOR_RED)✗ DB_NAME not set$(COLOR_RESET)"; \ - echo "Usage: make db-install DB_NAME=dolibarr DB_USER=root MYSQL_PWD=password"; \ - exit 1; \ - fi - @if [ ! -d "sql" ]; then \ - echo "$(COLOR_YELLOW)⚠ No sql/ directory found$(COLOR_RESET)"; \ - exit 0; \ - fi - @for sql in sql/llx_$(MODULE_NAME)_*.sql 2>/dev/null; do \ - if [ -f "$$sql" ]; then \ - echo "Executing $$sql..."; \ - mysql -u $(DB_USER) $(DB_NAME) < "$$sql"; \ - fi; \ - done - @echo "$(COLOR_GREEN)✓ Database tables installed$(COLOR_RESET)" - -.PHONY: db-uninstall -db-uninstall: ## Remove database tables (requires DB credentials) - @echo "$(COLOR_BLUE)Removing database tables...$(COLOR_RESET)" - @if [ -z "$(DB_NAME)" ]; then \ - echo "$(COLOR_RED)✗ DB_NAME not set$(COLOR_RESET)"; \ - echo "Usage: make db-uninstall DB_NAME=dolibarr DB_USER=root MYSQL_PWD=password"; \ - exit 1; \ - fi - @mysql -u $(DB_USER) $(DB_NAME) -e "SHOW TABLES LIKE 'llx_$(MODULE_NAME)_%';" | tail -n +2 | while read table; do \ - echo "Dropping $$table..."; \ - mysql -u $(DB_USER) $(DB_NAME) -e "DROP TABLE IF EXISTS $$table;"; \ - done - @echo "$(COLOR_GREEN)✓ Database tables removed$(COLOR_RESET)" - -.PHONY: tail-logs -tail-logs: ## Tail Dolibarr error logs - @if [ -f "$(DOLIBARR_ROOT)/documents/dolibarr.log" ]; then \ - tail -f $(DOLIBARR_ROOT)/documents/dolibarr.log; \ - else \ - echo "$(COLOR_YELLOW)⚠ Log file not found at $(DOLIBARR_ROOT)/documents/dolibarr.log$(COLOR_RESET)"; \ - fi - -.PHONY: clear-cache -clear-cache: ## Clear Dolibarr cache - @echo "$(COLOR_BLUE)Clearing cache...$(COLOR_RESET)" - @if [ -d "$(DOLIBARR_ROOT)/documents/temp" ]; then \ - rm -rf $(DOLIBARR_ROOT)/documents/temp/*; \ - echo "$(COLOR_GREEN)✓ Cache cleared$(COLOR_RESET)"; \ - else \ - echo "$(COLOR_YELLOW)⚠ Cache directory not found$(COLOR_RESET)"; \ - fi - -.PHONY: version -version: ## Display version information - @echo "$(COLOR_BLUE)Module Information:$(COLOR_RESET)" - @echo " Name: $(MODULE_NAME)" - @echo " Version: $(MODULE_VERSION)" - @echo " Number: $(MODULE_NUMBER)" - -.PHONY: security-check -security-check: ## Run security checks on dependencies - @echo "$(COLOR_BLUE)Running security checks...$(COLOR_RESET)" - @if [ -f "composer.json" ]; then \ - $(COMPOSER) audit || echo "$(COLOR_YELLOW)⚠ Vulnerabilities found$(COLOR_RESET)"; \ - fi - -.PHONY: release -release: validate test build ## Create a release (validate + test + build) - @echo "$(COLOR_GREEN)✓ Release package ready$(COLOR_RESET)" - @echo "" - @echo "$(COLOR_BLUE)Release Checklist:$(COLOR_RESET)" - @echo " [ ] Update CHANGELOG.md" - @echo " [ ] Update version in module descriptor" - @echo " [ ] Test installation in clean Dolibarr" - @echo " [ ] Test database migrations" - @echo " [ ] Tag release in git: git tag v$(MODULE_VERSION)" - @echo " [ ] Push tags: git push --tags" - @echo " [ ] Create GitHub release" - @echo "" - @echo "$(COLOR_GREEN)Package: $(DIST_DIR)/$(MODULE_NAME)-$(MODULE_VERSION).zip$(COLOR_RESET)" - -.PHONY: all -all: install-deps validate test build ## Run complete build pipeline - @echo "$(COLOR_GREEN)✓ Complete build pipeline finished$(COLOR_RESET)" - -# Default target -.DEFAULT_GOAL := help diff --git a/templates/makefiles/Makefile.generic.template b/templates/makefiles/Makefile.generic.template deleted file mode 100644 index abccdf9..0000000 --- a/templates/makefiles/Makefile.generic.template +++ /dev/null @@ -1,402 +0,0 @@ -# Generic Project Makefile -# Copyright (C) 2026 Moko Consulting -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This is a reference Makefile for generic PHP/Node.js projects. -# Copy this to your repository root as "Makefile" and customize as needed. - -# ============================================================================== -# CONFIGURATION - Customize these for your project -# ============================================================================== - -# Project Configuration -PROJECT_NAME := myproject -PROJECT_VERSION := 1.0.0 - -# Directories -SRC_DIR := src -BUILD_DIR := build -DIST_DIR := dist -TESTS_DIR := tests -DOCS_DIR := docs - -# Tools -PHP := php -COMPOSER := composer -NPM := npm -NODE := node -PHPCS := vendor/bin/phpcs -PHPCBF := vendor/bin/phpcbf -PHPUNIT := vendor/bin/phpunit -PHPSTAN := vendor/bin/phpstan - -# Coding Standards -PHPCS_STANDARD := PSR12 -PHPSTAN_LEVEL := 5 - -# Build types (development, production, staging) -BUILD_TYPE ?= production - -# Colors for output -COLOR_RESET := \033[0m -COLOR_GREEN := \033[32m -COLOR_YELLOW := \033[33m -COLOR_BLUE := \033[34m -COLOR_RED := \033[31m - -# ============================================================================== -# TARGETS -# ============================================================================== - -.PHONY: help -help: ## Show this help message - @echo "$(COLOR_BLUE)╔════════════════════════════════════════════════════════════╗$(COLOR_RESET)" - @echo "$(COLOR_BLUE)║ Generic Project Makefile ║$(COLOR_RESET)" - @echo "$(COLOR_BLUE)╚════════════════════════════════════════════════════════════╝$(COLOR_RESET)" - @echo "" - @echo "Project: $(PROJECT_NAME) v$(PROJECT_VERSION)" - @echo "Build Type: $(BUILD_TYPE)" - @echo "" - @echo "$(COLOR_GREEN)Available targets:$(COLOR_RESET)" - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " $(COLOR_BLUE)%-20s$(COLOR_RESET) %s\n", $$1, $$2}' - @echo "" - @echo "$(COLOR_YELLOW)Quick Start:$(COLOR_RESET)" - @echo " 1. make install-deps # Install dependencies" - @echo " 2. make build # Build project" - @echo " 3. make test # Run tests" - @echo "" - @echo "$(COLOR_YELLOW)Build Types:$(COLOR_RESET)" - @echo " make build BUILD_TYPE=development" - @echo " make build BUILD_TYPE=production" - @echo " make build BUILD_TYPE=staging" - @echo "" - -.PHONY: install-deps -install-deps: ## Install all dependencies (Composer + npm) - @echo "$(COLOR_BLUE)Installing dependencies...$(COLOR_RESET)" - @if [ -f "composer.json" ]; then \ - echo "Installing Composer dependencies..."; \ - $(COMPOSER) install; \ - echo "$(COLOR_GREEN)✓ Composer dependencies installed$(COLOR_RESET)"; \ - fi - @if [ -f "package.json" ]; then \ - echo "Installing npm dependencies..."; \ - $(NPM) install; \ - echo "$(COLOR_GREEN)✓ npm dependencies installed$(COLOR_RESET)"; \ - fi - -.PHONY: update-deps -update-deps: ## Update all dependencies - @echo "$(COLOR_BLUE)Updating dependencies...$(COLOR_RESET)" - @if [ -f "composer.json" ]; then \ - $(COMPOSER) update; \ - echo "$(COLOR_GREEN)✓ Composer dependencies updated$(COLOR_RESET)"; \ - fi - @if [ -f "package.json" ]; then \ - $(NPM) update; \ - echo "$(COLOR_GREEN)✓ npm dependencies updated$(COLOR_RESET)"; \ - fi - -.PHONY: lint -lint: ## Run linters (PHP + JavaScript) - @echo "$(COLOR_BLUE)Running linters...$(COLOR_RESET)" - - # PHP linting - @if find . -name "*.php" ! -path "./vendor/*" ! -path "./node_modules/*" ! -path "./$(BUILD_DIR)/*" | head -1 | grep -q .; then \ - echo "Linting PHP files..."; \ - find . -name "*.php" ! -path "./vendor/*" ! -path "./node_modules/*" ! -path "./$(BUILD_DIR)/*" \ - -exec $(PHP) -l {} \; | grep -v "No syntax errors" || true; \ - echo "$(COLOR_GREEN)✓ PHP linting complete$(COLOR_RESET)"; \ - fi - - # JavaScript linting - @if [ -f "package.json" ] && grep -q "eslint" package.json 2>/dev/null; then \ - echo "Linting JavaScript files..."; \ - $(NPM) run lint 2>/dev/null || echo "$(COLOR_YELLOW)⚠ ESLint not configured$(COLOR_RESET)"; \ - fi - -.PHONY: phpcs -phpcs: ## Run PHP CodeSniffer - @echo "$(COLOR_BLUE)Running PHP CodeSniffer...$(COLOR_RESET)" - @if [ -f "$(PHPCS)" ]; then \ - $(PHPCS) --standard=$(PHPCS_STANDARD) --extensions=php --ignore=vendor,node_modules,$(BUILD_DIR) $(SRC_DIR); \ - else \ - echo "$(COLOR_YELLOW)⚠ PHP CodeSniffer not installed. Run: make install-deps$(COLOR_RESET)"; \ - fi - -.PHONY: phpcbf -phpcbf: ## Fix PHP coding standards automatically - @echo "$(COLOR_BLUE)Running PHP Code Beautifier...$(COLOR_RESET)" - @if [ -f "$(PHPCBF)" ]; then \ - $(PHPCBF) --standard=$(PHPCS_STANDARD) --extensions=php --ignore=vendor,node_modules,$(BUILD_DIR) $(SRC_DIR); \ - echo "$(COLOR_GREEN)✓ Code formatting applied$(COLOR_RESET)"; \ - else \ - echo "$(COLOR_YELLOW)⚠ PHP Code Beautifier not installed. Run: make install-deps$(COLOR_RESET)"; \ - fi - -.PHONY: phpstan -phpstan: ## Run PHPStan static analysis - @echo "$(COLOR_BLUE)Running PHPStan...$(COLOR_RESET)" - @if [ -f "$(PHPSTAN)" ]; then \ - $(PHPSTAN) analyse --level=$(PHPSTAN_LEVEL) --no-progress $(SRC_DIR) || true; \ - else \ - echo "$(COLOR_YELLOW)⚠ PHPStan not installed. Run: make install-deps$(COLOR_RESET)"; \ - fi - -.PHONY: format -format: ## Format code (PHP + JavaScript) - @echo "$(COLOR_BLUE)Formatting code...$(COLOR_RESET)" - @$(MAKE) phpcbf - @if [ -f "package.json" ] && grep -q "prettier" package.json 2>/dev/null; then \ - $(NPM) run format 2>/dev/null || echo "$(COLOR_YELLOW)⚠ Prettier not configured$(COLOR_RESET)"; \ - fi - -.PHONY: validate -validate: lint phpcs ## Run all validation checks - @echo "$(COLOR_GREEN)✓ All validation checks passed$(COLOR_RESET)" - -.PHONY: test -test: ## Run all tests - @echo "$(COLOR_BLUE)Running tests...$(COLOR_RESET)" - - # PHP tests - @if [ -f "$(PHPUNIT)" ] && [ -f "phpunit.xml" ]; then \ - echo "Running PHPUnit tests..."; \ - $(PHPUNIT); \ - fi - - # JavaScript tests - @if [ -f "package.json" ] && grep -q "\"test\":" package.json; then \ - echo "Running JavaScript tests..."; \ - $(NPM) test; \ - fi - - @echo "$(COLOR_GREEN)✓ All tests complete$(COLOR_RESET)" - -.PHONY: test-coverage -test-coverage: ## Run tests with coverage report - @echo "$(COLOR_BLUE)Running tests with coverage...$(COLOR_RESET)" - @mkdir -p $(BUILD_DIR)/coverage - - @if [ -f "$(PHPUNIT)" ] && [ -f "phpunit.xml" ]; then \ - $(PHPUNIT) --coverage-html $(BUILD_DIR)/coverage/php; \ - echo "$(COLOR_GREEN)✓ PHP coverage: $(BUILD_DIR)/coverage/php/index.html$(COLOR_RESET)"; \ - fi - - @if [ -f "package.json" ] && grep -q "test:coverage" package.json; then \ - $(NPM) run test:coverage; \ - echo "$(COLOR_GREEN)✓ JavaScript coverage generated$(COLOR_RESET)"; \ - fi - -.PHONY: clean -clean: ## Clean build artifacts - @echo "$(COLOR_BLUE)Cleaning build artifacts...$(COLOR_RESET)" - @rm -rf $(BUILD_DIR) $(DIST_DIR) - @find . -name "*.log" -delete - @find . -name ".DS_Store" -delete - @echo "$(COLOR_GREEN)✓ Build artifacts cleaned$(COLOR_RESET)" - -.PHONY: build -build: clean validate ## Build project - @echo "$(COLOR_BLUE)Building project ($(BUILD_TYPE))...$(COLOR_RESET)" - @mkdir -p $(BUILD_DIR) $(DIST_DIR) - - # Install production dependencies - @if [ -f "composer.json" ]; then \ - if [ "$(BUILD_TYPE)" = "production" ]; then \ - $(COMPOSER) install --no-dev --optimize-autoloader --no-interaction; \ - else \ - $(COMPOSER) install --no-interaction; \ - fi; \ - fi - - @if [ -f "package.json" ]; then \ - if [ "$(BUILD_TYPE)" = "production" ]; then \ - $(NPM) ci --production; \ - else \ - $(NPM) ci; \ - fi; \ - fi - - # Build assets if build script exists - @if [ -f "package.json" ] && grep -q "\"build\":" package.json; then \ - echo "Building assets..."; \ - $(NPM) run build; \ - echo "$(COLOR_GREEN)✓ Assets built$(COLOR_RESET)"; \ - fi - - # Copy source files to build directory - @rsync -av --progress \ - --exclude='$(BUILD_DIR)' \ - --exclude='$(DIST_DIR)' \ - --exclude='.git*' \ - --exclude='node_modules/' \ - --exclude='tests/' \ - --exclude='Makefile' \ - --exclude='phpunit.xml' \ - --exclude='*.md' \ - $(SRC_DIR)/ $(BUILD_DIR)/ - - @echo "$(COLOR_GREEN)✓ Build complete: $(BUILD_DIR)/$(COLOR_RESET)" - -.PHONY: package -package: build ## Create distribution package - @echo "$(COLOR_BLUE)Creating distribution package...$(COLOR_RESET)" - @mkdir -p $(DIST_DIR) - - # Create tarball - @tar -czf $(DIST_DIR)/$(PROJECT_NAME)-$(PROJECT_VERSION).tar.gz -C $(BUILD_DIR) . - - # Create zip - @cd $(BUILD_DIR) && zip -r ../$(DIST_DIR)/$(PROJECT_NAME)-$(PROJECT_VERSION).zip . - - @echo "$(COLOR_GREEN)✓ Packages created:$(COLOR_RESET)" - @echo " - $(DIST_DIR)/$(PROJECT_NAME)-$(PROJECT_VERSION).tar.gz" - @echo " - $(DIST_DIR)/$(PROJECT_NAME)-$(PROJECT_VERSION).zip" - -.PHONY: dev -dev: ## Start development server - @echo "$(COLOR_BLUE)Starting development server...$(COLOR_RESET)" - @if [ -f "package.json" ] && grep -q "\"dev\":" package.json; then \ - $(NPM) run dev; \ - elif [ -f "composer.json" ] && command -v php >/dev/null 2>&1; then \ - echo "Starting PHP built-in server..."; \ - $(PHP) -S localhost:8000 -t $(SRC_DIR); \ - else \ - echo "$(COLOR_RED)✗ No development server configuration found$(COLOR_RESET)"; \ - exit 1; \ - fi - -.PHONY: watch -watch: ## Watch for changes and rebuild - @echo "$(COLOR_BLUE)Watching for changes...$(COLOR_RESET)" - @if [ -f "package.json" ] && grep -q "\"watch\":" package.json; then \ - $(NPM) run watch; \ - else \ - echo "$(COLOR_YELLOW)⚠ No watch script configured$(COLOR_RESET)"; \ - echo "Add to package.json: \"watch\": \"nodemon --exec make build\""; \ - fi - -.PHONY: docs -docs: ## Generate documentation - @echo "$(COLOR_BLUE)Generating documentation...$(COLOR_RESET)" - @mkdir -p $(DOCS_DIR) - - # PHP documentation - @if command -v phpdoc >/dev/null 2>&1; then \ - phpdoc -d $(SRC_DIR) -t $(DOCS_DIR)/php; \ - echo "$(COLOR_GREEN)✓ PHP documentation: $(DOCS_DIR)/php$(COLOR_RESET)"; \ - fi - - # JavaScript documentation - @if [ -f "package.json" ] && grep -q "jsdoc" package.json; then \ - $(NPM) run docs 2>/dev/null || echo "$(COLOR_YELLOW)⚠ JSDoc not configured$(COLOR_RESET)"; \ - fi - -.PHONY: version -version: ## Display version information - @echo "$(COLOR_BLUE)Project Information:$(COLOR_RESET)" - @echo " Name: $(PROJECT_NAME)" - @echo " Version: $(PROJECT_VERSION)" - @echo "" - @if [ -f "composer.json" ]; then \ - echo "PHP Dependencies:"; \ - $(COMPOSER) show -i | head -5; \ - echo ""; \ - fi - @if [ -f "package.json" ]; then \ - echo "Node.js Dependencies:"; \ - $(NPM) list --depth=0 | head -10; \ - fi - -.PHONY: security-check -security-check: ## Run security checks on dependencies - @echo "$(COLOR_BLUE)Running security checks...$(COLOR_RESET)" - - @if [ -f "composer.json" ]; then \ - echo "Checking Composer dependencies..."; \ - $(COMPOSER) audit || echo "$(COLOR_YELLOW)⚠ Composer vulnerabilities found$(COLOR_RESET)"; \ - fi - - @if [ -f "package.json" ]; then \ - echo "Checking npm dependencies..."; \ - $(NPM) audit || echo "$(COLOR_YELLOW)⚠ npm vulnerabilities found$(COLOR_RESET)"; \ - fi - - @echo "$(COLOR_GREEN)✓ Security checks complete$(COLOR_RESET)" - -.PHONY: outdated -outdated: ## Check for outdated dependencies - @echo "$(COLOR_BLUE)Checking for outdated dependencies...$(COLOR_RESET)" - - @if [ -f "composer.json" ]; then \ - echo "Composer outdated packages:"; \ - $(COMPOSER) outdated --direct || true; \ - echo ""; \ - fi - - @if [ -f "package.json" ]; then \ - echo "npm outdated packages:"; \ - $(NPM) outdated || true; \ - fi - -.PHONY: fix -fix: ## Fix code issues automatically - @$(MAKE) phpcbf - @$(MAKE) format - -.PHONY: ci -ci: install-deps validate test ## Run CI pipeline (install, validate, test) - @echo "$(COLOR_GREEN)✓ CI pipeline complete$(COLOR_RESET)" - -.PHONY: release -release: validate test build package ## Create a release - @echo "$(COLOR_GREEN)✓ Release ready$(COLOR_RESET)" - @echo "" - @echo "$(COLOR_BLUE)Release Checklist:$(COLOR_RESET)" - @echo " [ ] Update CHANGELOG.md" - @echo " [ ] Update version in package.json/composer.json" - @echo " [ ] Test package installation" - @echo " [ ] Tag release: git tag v$(PROJECT_VERSION)" - @echo " [ ] Push tags: git push --tags" - @echo " [ ] Create GitHub release" - @echo "" - @echo "$(COLOR_GREEN)Packages:$(COLOR_RESET)" - @ls -lh $(DIST_DIR)/ - -.PHONY: benchmark -benchmark: ## Run performance benchmarks - @echo "$(COLOR_BLUE)Running benchmarks...$(COLOR_RESET)" - @if [ -f "package.json" ] && grep -q "benchmark" package.json; then \ - $(NPM) run benchmark; \ - else \ - echo "$(COLOR_YELLOW)⚠ No benchmark script configured$(COLOR_RESET)"; \ - fi - -.PHONY: profile -profile: ## Profile application performance - @echo "$(COLOR_BLUE)Profiling application...$(COLOR_RESET)" - @if command -v xdebug >/dev/null 2>&1; then \ - echo "Xdebug profiling enabled"; \ - $(PHP) -d xdebug.mode=profile $(SRC_DIR)/index.php; \ - else \ - echo "$(COLOR_YELLOW)⚠ Xdebug not installed$(COLOR_RESET)"; \ - fi - -.PHONY: deploy -deploy: ## Deploy application (customize for your infrastructure) - @echo "$(COLOR_BLUE)Deploying application...$(COLOR_RESET)" - @echo "$(COLOR_YELLOW)⚠ Deploy target not configured$(COLOR_RESET)" - @echo "Customize this target for your deployment needs" - @echo "Examples:" - @echo " - rsync to remote server" - @echo " - Docker container build/push" - @echo " - Cloud provider deployment (AWS, GCP, Azure)" - @echo " - FTP/SFTP upload" - -.PHONY: all -all: install-deps validate test build package ## Run complete pipeline - @echo "$(COLOR_GREEN)✓ Complete pipeline finished$(COLOR_RESET)" - -# Default target -.DEFAULT_GOAL := help diff --git a/templates/makefiles/Makefile.joomla.template b/templates/makefiles/Makefile.joomla.template deleted file mode 100644 index ec94cc9..0000000 --- a/templates/makefiles/Makefile.joomla.template +++ /dev/null @@ -1,333 +0,0 @@ -# Makefile for Joomla Extensions -# Copyright (C) 2026 Moko Consulting -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This is a reference Makefile for building Joomla extensions. -# Copy this to your repository root as "Makefile" and customize as needed. -# -# Supports: Modules, Plugins, Components, Packages, Templates - -# ============================================================================== -# CONFIGURATION - Customize these for your extension -# ============================================================================== - -# Extension Configuration -EXTENSION_NAME := mokoexample -EXTENSION_TYPE := module -# Options: module, plugin, component, package, template -EXTENSION_VERSION := 1.0.0 - -# Module Configuration (for modules only) -MODULE_TYPE := site -# Options: site, admin - -# Plugin Configuration (for plugins only) -PLUGIN_GROUP := system -# Options: system, content, user, authentication, etc. - -# Directories -SRC_DIR := . -BUILD_DIR := build -DIST_DIR := dist -DOCS_DIR := docs - -# Joomla Installation (for local testing - customize paths) -JOOMLA_ROOT := /var/www/html/joomla -JOOMLA_VERSION := 4 - -# Tools -PHP := php -COMPOSER := composer -NPM := npm -PHPCS := vendor/bin/phpcs -PHPCBF := vendor/bin/phpcbf -PHPUNIT := vendor/bin/phpunit -ZIP := zip - -# Coding Standards -PHPCS_STANDARD := Joomla - -# Colors for output -COLOR_RESET := \033[0m -COLOR_GREEN := \033[32m -COLOR_YELLOW := \033[33m -COLOR_BLUE := \033[34m -COLOR_RED := \033[31m - -# ============================================================================== -# TARGETS -# ============================================================================== - -.PHONY: help -help: ## Show this help message - @echo "$(COLOR_BLUE)╔════════════════════════════════════════════════════════════╗$(COLOR_RESET)" - @echo "$(COLOR_BLUE)║ Joomla Extension Makefile ║$(COLOR_RESET)" - @echo "$(COLOR_BLUE)╚════════════════════════════════════════════════════════════╝$(COLOR_RESET)" - @echo "" - @echo "Extension: $(EXTENSION_NAME) ($(EXTENSION_TYPE)) v$(EXTENSION_VERSION)" - @echo "" - @echo "$(COLOR_GREEN)Available targets:$(COLOR_RESET)" - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " $(COLOR_BLUE)%-20s$(COLOR_RESET) %s\n", $$1, $$2}' - @echo "" - @echo "$(COLOR_YELLOW)Quick Start:$(COLOR_RESET)" - @echo " 1. make install-deps # Install dependencies" - @echo " 2. make build # Build extension package" - @echo " 3. make test # Run tests" - @echo "" - -.PHONY: install-deps -install-deps: ## Install all dependencies (Composer + npm) - @echo "$(COLOR_BLUE)Installing dependencies...$(COLOR_RESET)" - @if [ -f "composer.json" ]; then \ - $(COMPOSER) install; \ - echo "$(COLOR_GREEN)✓ Composer dependencies installed$(COLOR_RESET)"; \ - fi - @if [ -f "package.json" ]; then \ - $(NPM) install; \ - echo "$(COLOR_GREEN)✓ npm dependencies installed$(COLOR_RESET)"; \ - fi - -.PHONY: update-deps -update-deps: ## Update all dependencies - @echo "$(COLOR_BLUE)Updating dependencies...$(COLOR_RESET)" - @if [ -f "composer.json" ]; then \ - $(COMPOSER) update; \ - echo "$(COLOR_GREEN)✓ Composer dependencies updated$(COLOR_RESET)"; \ - fi - @if [ -f "package.json" ]; then \ - $(NPM) update; \ - echo "$(COLOR_GREEN)✓ npm dependencies updated$(COLOR_RESET)"; \ - fi - -.PHONY: lint -lint: ## Run PHP linter (syntax check) - @echo "$(COLOR_BLUE)Running PHP linter...$(COLOR_RESET)" - @find . -name "*.php" ! -path "./vendor/*" ! -path "./node_modules/*" ! -path "./$(BUILD_DIR)/*" \ - -exec $(PHP) -l {} \; | grep -v "No syntax errors" || true - @echo "$(COLOR_GREEN)✓ PHP linting complete$(COLOR_RESET)" - -.PHONY: phpcs -phpcs: ## Run PHP CodeSniffer (Joomla standards) - @echo "$(COLOR_BLUE)Running PHP CodeSniffer...$(COLOR_RESET)" - @if [ -f "$(PHPCS)" ]; then \ - $(PHPCS) --standard=$(PHPCS_STANDARD) --extensions=php --ignore=vendor,node_modules,$(BUILD_DIR) .; \ - else \ - echo "$(COLOR_YELLOW)⚠ PHP CodeSniffer not installed. Run: make install-deps$(COLOR_RESET)"; \ - fi - -.PHONY: phpcbf -phpcbf: ## Fix coding standards automatically - @echo "$(COLOR_BLUE)Running PHP Code Beautifier...$(COLOR_RESET)" - @if [ -f "$(PHPCBF)" ]; then \ - $(PHPCBF) --standard=$(PHPCS_STANDARD) --extensions=php --ignore=vendor,node_modules,$(BUILD_DIR) .; \ - echo "$(COLOR_GREEN)✓ Code formatting applied$(COLOR_RESET)"; \ - else \ - echo "$(COLOR_YELLOW)⚠ PHP Code Beautifier not installed. Run: make install-deps$(COLOR_RESET)"; \ - fi - -.PHONY: validate -validate: lint phpcs ## Run all validation checks - @echo "$(COLOR_GREEN)✓ All validation checks passed$(COLOR_RESET)" - -.PHONY: test -test: ## Run PHPUnit tests - @echo "$(COLOR_BLUE)Running tests...$(COLOR_RESET)" - @if [ -f "$(PHPUNIT)" ] && [ -f "phpunit.xml" ]; then \ - $(PHPUNIT); \ - else \ - echo "$(COLOR_YELLOW)⚠ PHPUnit not configured$(COLOR_RESET)"; \ - fi - -.PHONY: test-coverage -test-coverage: ## Run tests with coverage report - @echo "$(COLOR_BLUE)Running tests with coverage...$(COLOR_RESET)" - @if [ -f "$(PHPUNIT)" ] && [ -f "phpunit.xml" ]; then \ - $(PHPUNIT) --coverage-html $(BUILD_DIR)/coverage; \ - echo "$(COLOR_GREEN)✓ Coverage report: $(BUILD_DIR)/coverage/index.html$(COLOR_RESET)"; \ - else \ - echo "$(COLOR_YELLOW)⚠ PHPUnit not configured$(COLOR_RESET)"; \ - fi - -.PHONY: clean -clean: ## Clean build artifacts - @echo "$(COLOR_BLUE)Cleaning build artifacts...$(COLOR_RESET)" - @rm -rf $(BUILD_DIR) $(DIST_DIR) - @echo "$(COLOR_GREEN)✓ Build artifacts cleaned$(COLOR_RESET)" - -.PHONY: build -build: clean validate ## Build extension package - @echo "$(COLOR_BLUE)Building Joomla extension package...$(COLOR_RESET)" - @mkdir -p $(DIST_DIR) $(BUILD_DIR) - - # Determine package prefix based on extension type - @case "$(EXTENSION_TYPE)" in \ - module) \ - PACKAGE_PREFIX="mod_$(EXTENSION_NAME)"; \ - BUILD_TARGET="$(BUILD_DIR)/$$PACKAGE_PREFIX"; \ - ;; \ - plugin) \ - PACKAGE_PREFIX="plg_$(PLUGIN_GROUP)_$(EXTENSION_NAME)"; \ - BUILD_TARGET="$(BUILD_DIR)/$$PACKAGE_PREFIX"; \ - ;; \ - component) \ - PACKAGE_PREFIX="com_$(EXTENSION_NAME)"; \ - BUILD_TARGET="$(BUILD_DIR)/$$PACKAGE_PREFIX"; \ - ;; \ - package) \ - PACKAGE_PREFIX="pkg_$(EXTENSION_NAME)"; \ - BUILD_TARGET="$(BUILD_DIR)/$$PACKAGE_PREFIX"; \ - ;; \ - template) \ - PACKAGE_PREFIX="tpl_$(EXTENSION_NAME)"; \ - BUILD_TARGET="$(BUILD_DIR)/$$PACKAGE_PREFIX"; \ - ;; \ - *) \ - echo "$(COLOR_RED)✗ Unknown extension type: $(EXTENSION_TYPE)$(COLOR_RESET)"; \ - exit 1; \ - ;; \ - esac; \ - \ - mkdir -p "$$BUILD_TARGET"; \ - \ - echo "Building $$PACKAGE_PREFIX..."; \ - \ - rsync -av --progress \ - --exclude='$(BUILD_DIR)' \ - --exclude='$(DIST_DIR)' \ - --exclude='.git*' \ - --exclude='vendor/' \ - --exclude='node_modules/' \ - --exclude='tests/' \ - --exclude='Makefile' \ - --exclude='composer.json' \ - --exclude='composer.lock' \ - --exclude='package.json' \ - --exclude='package-lock.json' \ - --exclude='phpunit.xml' \ - --exclude='*.md' \ - --exclude='.editorconfig' \ - . "$$BUILD_TARGET/"; \ - \ - cd $(BUILD_DIR) && $(ZIP) -r "../$(DIST_DIR)/$${PACKAGE_PREFIX}-$(EXTENSION_VERSION).zip" "$${PACKAGE_PREFIX}"; \ - \ - echo "$(COLOR_GREEN)✓ Package created: $(DIST_DIR)/$${PACKAGE_PREFIX}-$(EXTENSION_VERSION).zip$(COLOR_RESET)" - -.PHONY: package -package: build ## Alias for build - @echo "$(COLOR_GREEN)✓ Package ready for distribution$(COLOR_RESET)" - -.PHONY: install-local -install-local: build ## Install to local Joomla (upload via admin) - @echo "$(COLOR_BLUE)Package ready for installation$(COLOR_RESET)" - @case "$(EXTENSION_TYPE)" in \ - module) PACKAGE="mod_$(EXTENSION_NAME)";; \ - plugin) PACKAGE="plg_$(PLUGIN_GROUP)_$(EXTENSION_NAME)";; \ - component) PACKAGE="com_$(EXTENSION_NAME)";; \ - package) PACKAGE="pkg_$(EXTENSION_NAME)";; \ - template) PACKAGE="tpl_$(EXTENSION_NAME)";; \ - esac; \ - echo "$(COLOR_YELLOW)Upload $(DIST_DIR)/$${PACKAGE}-$(EXTENSION_VERSION).zip via Joomla Administrator$(COLOR_RESET)"; \ - echo "Admin URL: $(JOOMLA_ROOT) → Extensions → Install" - -.PHONY: dev-install -dev-install: ## Create symlink for development (Joomla 4+) - @echo "$(COLOR_BLUE)Creating development symlink...$(COLOR_RESET)" - @if [ ! -d "$(JOOMLA_ROOT)" ]; then \ - echo "$(COLOR_RED)✗ Joomla root not found at $(JOOMLA_ROOT)$(COLOR_RESET)"; \ - echo "Update JOOMLA_ROOT in Makefile"; \ - exit 1; \ - fi - - @case "$(EXTENSION_TYPE)" in \ - module) \ - if [ "$(MODULE_TYPE)" = "admin" ]; then \ - TARGET="$(JOOMLA_ROOT)/administrator/modules/mod_$(EXTENSION_NAME)"; \ - else \ - TARGET="$(JOOMLA_ROOT)/modules/mod_$(EXTENSION_NAME)"; \ - fi; \ - ;; \ - plugin) \ - TARGET="$(JOOMLA_ROOT)/plugins/$(PLUGIN_GROUP)/$(EXTENSION_NAME)"; \ - ;; \ - component) \ - echo "$(COLOR_YELLOW)⚠ Components require complex symlink setup$(COLOR_RESET)"; \ - echo "Manual setup recommended for component development"; \ - exit 1; \ - ;; \ - *) \ - echo "$(COLOR_RED)✗ dev-install not supported for $(EXTENSION_TYPE)$(COLOR_RESET)"; \ - exit 1; \ - ;; \ - esac; \ - \ - rm -rf "$$TARGET"; \ - ln -s "$(PWD)" "$$TARGET"; \ - echo "$(COLOR_GREEN)✓ Development symlink created at $$TARGET$(COLOR_RESET)" - -.PHONY: watch -watch: ## Watch for changes and rebuild - @echo "$(COLOR_BLUE)Watching for changes...$(COLOR_RESET)" - @echo "$(COLOR_YELLOW)Press Ctrl+C to stop$(COLOR_RESET)" - @while true; do \ - inotifywait -r -e modify,create,delete --exclude '($(BUILD_DIR)|$(DIST_DIR)|vendor|node_modules)' . 2>/dev/null || \ - (echo "$(COLOR_YELLOW)⚠ inotifywait not installed. Install: apt-get install inotify-tools$(COLOR_RESET)" && sleep 5); \ - make build; \ - done - -.PHONY: version -version: ## Display version information - @echo "$(COLOR_BLUE)Extension Information:$(COLOR_RESET)" - @echo " Name: $(EXTENSION_NAME)" - @echo " Type: $(EXTENSION_TYPE)" - @echo " Version: $(EXTENSION_VERSION)" - @if [ "$(EXTENSION_TYPE)" = "module" ]; then \ - echo " Module: $(MODULE_TYPE)"; \ - fi - @if [ "$(EXTENSION_TYPE)" = "plugin" ]; then \ - echo " Group: $(PLUGIN_GROUP)"; \ - fi - -.PHONY: docs -docs: ## Generate documentation - @echo "$(COLOR_BLUE)Generating documentation...$(COLOR_RESET)" - @mkdir -p $(DOCS_DIR) - @echo "$(COLOR_YELLOW)⚠ Documentation generation not configured$(COLOR_RESET)" - @echo "Consider adding phpDocumentor or similar" - -.PHONY: release -release: validate test build ## Create a release (validate + test + build) - @echo "$(COLOR_GREEN)✓ Release package ready$(COLOR_RESET)" - @echo "" - @echo "$(COLOR_BLUE)Release Checklist:$(COLOR_RESET)" - @echo " [ ] Update CHANGELOG.md" - @echo " [ ] Update version in XML manifest" - @echo " [ ] Test installation in clean Joomla" - @echo " [ ] Tag release in git: git tag v$(EXTENSION_VERSION)" - @echo " [ ] Push tags: git push --tags" - @echo " [ ] Create GitHub release" - @echo "" - @case "$(EXTENSION_TYPE)" in \ - module) PACKAGE="mod_$(EXTENSION_NAME)";; \ - plugin) PACKAGE="plg_$(PLUGIN_GROUP)_$(EXTENSION_NAME)";; \ - component) PACKAGE="com_$(EXTENSION_NAME)";; \ - package) PACKAGE="pkg_$(EXTENSION_NAME)";; \ - template) PACKAGE="tpl_$(EXTENSION_NAME)";; \ - esac; \ - echo "$(COLOR_GREEN)Package: $(DIST_DIR)/$${PACKAGE}-$(EXTENSION_VERSION).zip$(COLOR_RESET)" - -.PHONY: security-check -security-check: ## Run security checks on dependencies - @echo "$(COLOR_BLUE)Running security checks...$(COLOR_RESET)" - @if [ -f "composer.json" ]; then \ - $(COMPOSER) audit || echo "$(COLOR_YELLOW)⚠ Vulnerabilities found$(COLOR_RESET)"; \ - fi - @if [ -f "package.json" ]; then \ - $(NPM) audit || echo "$(COLOR_YELLOW)⚠ Vulnerabilities found$(COLOR_RESET)"; \ - fi - -.PHONY: all -all: install-deps validate test build ## Run complete build pipeline - @echo "$(COLOR_GREEN)✓ Complete build pipeline finished$(COLOR_RESET)" - -# Default target -.DEFAULT_GOAL := help diff --git a/templates/makefiles/README.md b/templates/makefiles/README.md deleted file mode 100644 index 819d8f0..0000000 --- a/templates/makefiles/README.md +++ /dev/null @@ -1,103 +0,0 @@ - - -# Makefile Templates - -This directory contains Makefile templates for different repository types. - -## Template Files - -### Makefile.generic.template -Generic Makefile for standard repositories. Includes common targets for: -- Building and compiling -- Testing and linting -- Cleaning and maintenance -- Development workflow automation - -**Usage:** -```bash -cp templates/makefiles/Makefile.generic.template ./Makefile -``` - -### Makefile.joomla.template -Joomla-specific Makefile for extensions (components, modules, plugins, etc.). Includes targets for: -- Joomla manifest validation -- Extension packaging -- Installation and deployment -- Testing with Joomla framework -- Build artifact creation - -**Usage:** -```bash -cp templates/makefiles/Makefile.joomla.template ./Makefile -``` - -### Makefile.dolibarr.template -Dolibarr-specific Makefile for modules. Includes targets for: -- Module descriptor validation -- SQL migration management -- Module packaging -- Installation and deployment -- Testing with Dolibarr framework -- Build artifact creation - -**Usage:** -```bash -cp templates/makefiles/Makefile.dolibarr.template ./Makefile -``` - -## Template Naming Convention - -All Makefile templates use the `.template` extension to clearly distinguish them from active Makefile files. When copying to your repository: - -1. **Remove the .template extension**: `Makefile.generic.template` → `Makefile` -2. **Customize for your project**: Update variables and targets as needed -3. **Test the targets**: Run `make help` to see available targets - -## Customization - -After copying a template: - -1. Update project-specific variables at the top of the Makefile -2. Modify paths to match your repository structure -3. Add or remove targets based on your needs -4. Update dependencies between targets if necessary - -## Schema Integration - -These Makefile templates are referenced in the repository structure schemas: - -- **default-repository.xml**: Uses `Makefile.generic.template` (suggested) -- **waas-component.xml**: Uses `Makefile.joomla.template` (required) -- **crm-module.xml**: Uses `Makefile.dolibarr.template` (required) - -The schemas define source/destination mappings that automatically convert `.template` extensions to the final `Makefile` name. - -## Common Targets - -Most templates include these standard targets: - -- `make help` - Display available targets -- `make build` - Build the project -- `make test` - Run tests -- `make lint` - Run linters -- `make clean` - Clean build artifacts -- `make install` - Install dependencies -- `make package` - Create distribution package - -Platform-specific templates may include additional targets relevant to their ecosystem. - -## Support - -For questions or issues with Makefile templates: -- See main mokocli documentation -- Check the platform-specific guides (Joomla, Dolibarr) -- Review the schema documentation for source/destination details diff --git a/templates/mokogitea/CLAUDE.dolibarr.md.template b/templates/mokogitea/CLAUDE.dolibarr.md.template deleted file mode 100644 index 708901d..0000000 --- a/templates/mokogitea/CLAUDE.dolibarr.md.template +++ /dev/null @@ -1,296 +0,0 @@ - - -> [!IMPORTANT] -> **🔧 AI Self-Update Required on First Use** -> -> This file may contain unfilled `{{TOKEN}}` placeholders. The mokocli 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** `.gitea/copilot-instructions.md` and `.gitea/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://git.mokoconsulting.tech/mokoconsulting-tech/` | -> | `{{REPO_DESCRIPTION}}` | First paragraph of `README.md` body, or the GitHub repo description | -> | `{{MODULE_NAME}}` | The module name as used in Dolibarr (lowercase, e.g. `mymodule`) — from the `langs/en_US/*.lang` filename or `$this->rights_class` in the module descriptor | -> | `{{MODULE_CLASS}}` | PascalCase module class name (e.g. `MyModule`) — from the `src/core/modules/mod*.class.php` filename | -> | `{{MODULE_ID}}` | The `$this->numero` value in `src/core/modules/mod*.class.php`; check [module-registry.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/development/crm/module-registry.md) if creating a new module | -> -> --- - -# What This Repo Is - -**{{REPO_NAME}}** is a Moko Consulting **MokoCRM** (Dolibarr) module repository. - -{{REPO_DESCRIPTION}} - -Module name: **{{MODULE_NAME}}** -Module class: **{{MODULE_CLASS}}** -Module ID: **{{MODULE_ID}}** *(unique, immutable — registered in [module-registry.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/development/crm/module-registry.md))* -Repository URL: {{REPO_URL}} - -This repository is governed by [mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli) — 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/ # Module source (deployed to Dolibarr) -│ ├── index.php # REQUIRED — accessforbidden() guard -│ ├── README.md # End-user documentation -│ ├── core/ -│ │ ├── index.php # REQUIRED — accessforbidden() guard -│ │ └── modules/ -│ │ ├── index.php # REQUIRED — accessforbidden() guard -│ │ └── mod{{MODULE_CLASS}}.class.php # Main module descriptor -│ ├── langs/ -│ │ ├── index.php # REQUIRED — accessforbidden() guard -│ │ └── en_US/ -│ │ ├── index.php # REQUIRED — accessforbidden() guard -│ │ └── {{MODULE_NAME}}.lang -│ ├── sql/ # Database schema -│ │ └── index.php # REQUIRED — accessforbidden() guard -│ ├── class/ # PHP class files -│ │ └── index.php # REQUIRED — accessforbidden() guard -│ └── lib/ # Library files -│ └── index.php # REQUIRED — accessforbidden() guard -├── docs/ # Technical documentation -├── scripts/ # Build and maintenance scripts -├── tests/ # Test suite -│ ├── unit/ -│ └── integration/ -├── .gitea/ -│ ├── workflows/ # CI/CD workflows (synced from mokocli) -│ ├── copilot-instructions.md -│ └── CLAUDE.md # This file -├── README.md # Version source of truth -├── CHANGELOG.md -├── CONTRIBUTING.md -├── LICENSE # GPL-3.0-or-later -└── Makefile # Build automation -``` - -**Every directory inside `src/` MUST have an `index.php`** that either contains live code or calls `accessforbidden()`. Standard guard template (adjust the relative fallback path to match directory depth from `htdocs/`): - -```php - - * SPDX-License-Identifier: GPL-3.0-or-later - * FILE INFORMATION / BRIEF: Directory access guard - */ -// Adjust relative path below per depth: mymodule/subdir/ uses ../../../main.inc.php -$res = 0; -if (!$res && !empty($_SERVER["DOCUMENT_ROOT"])) { - $res = @include $_SERVER["DOCUMENT_ROOT"]."/main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { die("Include of main fails"); } -accessforbidden(); -``` - ---- - -# Primary Language - -**PHP** (≥ 8.1) is the primary language for this Dolibarr module. 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. - -### Dolibarr Version Alignment - -Two artefacts must always carry the same version: - -| Artefact | Location | -|----------|----------| -| `README.md` | `FILE INFORMATION VERSION` field + badge | -| Module descriptor | `$this->version` in `src/core/modules/mod{{MODULE_CLASS}}.class.php` | - ---- - -# Module Descriptor Class - -The file `src/core/modules/mod{{MODULE_CLASS}}.class.php` is the Dolibarr module descriptor. The key properties: - -```php -public $numero = {{MODULE_ID}}; // IMMUTABLE — never change; registered globally -public $version = 'XX.YY.ZZ'; // Must match README.md version exactly -``` - -**`$numero` is permanent.** It was registered in [module-registry.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/development/crm/module-registry.md) when this module was created. Changing it would break all Dolibarr installations that have this module activated. - -Before creating a new module, always check the registry for the next available ID. - ---- - -# 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}}.Module - * INGROUP: {{REPO_NAME}} - * REPO: {{REPO_URL}} - * PATH: /src/class/MyClass.php - * VERSION: XX.YY.ZZ - * BRIEF: One-line description of file purpose - */ -``` - -**Markdown / YAML / Shell:** Use the appropriate comment syntax with the same fields. - ---- - -# Coding Standards - -## Naming Conventions - -| Context | Convention | Example | -|---------|-----------|---------| -| PHP class | `PascalCase` | `MyService` | -| PHP method / function | `camelCase` | `getUserData()` | -| PHP variable | `$snake_case` | `$module_name` | -| PHP constant | `UPPER_SNAKE_CASE` | `MAX_RETRIES` | -| PHP class file | `PascalCase.php` | `ApiClient.php` | -| PHP script file | `snake_case.php` | `check_health.php` | -| YAML workflow | `kebab-case.yml` | `ci-dolibarr.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 }} -``` - -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 - -| Change type | Documentation to update | -|-------------|------------------------| -| New or renamed PHP class/method | PHPDoc block; `docs/api/` entry | -| New or changed module version | Update `$this->version` in module descriptor; bump `README.md` | -| 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` | -| 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 change `$this->numero`** — the module ID is permanent and globally registered. -- **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 register a new module ID** without first consulting module-registry.md. -- **Never let `$this->version` and `README.md` version diverge.** -- **Never create a directory inside `src/` without adding an `index.php`** — every directory must have an `index.php` with live code or `accessforbidden()`. - ---- - -# PR Checklist - -Before opening a PR, verify: - -- [ ] Patch version bumped in `README.md` (e.g. `01.02.03` → `01.02.04`) -- [ ] `$this->version` in module descriptor updated to match -- [ ] FILE INFORMATION headers updated in modified files -- [ ] CHANGELOG.md updated -- [ ] Every new directory inside `src/` has an `index.php` (live code or `accessforbidden()` guard) - ---- - -# Key Policy Documents (mokocli) - -| Document | Purpose | -|----------|---------| -| [file-header-standards.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | -| [coding-style-guide.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | -| [branching-strategy.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | -| [merge-strategy.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR conventions | -| [changelog-standards.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | -| [module-registry.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/development/crm/module-registry.md) | Dolibarr module ID registry — check before reserving a new ID | -| [crm/development-standards.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/crm/development-standards.md) | MokoCRM Dolibarr module development standards | -| [dolibarr-development-guide.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/guide/crm/dolibarr-development-guide.md) | MokoCRM full development guide | diff --git a/templates/mokogitea/CLAUDE.joomla.md.template b/templates/mokogitea/CLAUDE.joomla.md.template deleted file mode 100644 index ac67dac..0000000 --- a/templates/mokogitea/CLAUDE.joomla.md.template +++ /dev/null @@ -1,301 +0,0 @@ - - -> [!IMPORTANT] -> **🔧 AI Self-Update Required on First Use** -> -> This file may contain unfilled `{{TOKEN}}` placeholders. The mokocli 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** `.gitea/copilot-instructions.md` and `.gitea/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://git.mokoconsulting.tech/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 [mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli) — 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) -├── updates.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 -├── .gitea/ -│ ├── workflows/ # CI/CD workflows (synced from mokocli) -│ ├── 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 | -| `updates.xml` | `` in the most recent `` block | - -The `make release` command / release workflow syncs all three automatically. - ---- - -# updates.xml — Required in Repo Root - -`updates.xml` is the Joomla update server manifest. It allows Joomla installations to check for new versions of this extension via: - -```xml - - - - https://git.mokoconsulting.tech/mokoconsulting-tech/{{REPO_NAME}}/raw/branch/main/updates.xml - - - https://raw.githubusercontent.com/mokoconsulting-tech/{{REPO_NAME}}/main/updates.xml - - -``` - -**Rules:** -- Every release prepends a new `` block at the top — older entries are preserved. -- `` in `updates.xml` must exactly match `` in `manifest.xml` and `README.md`. -- `` must include two `` entries: Gitea release asset (primary) and GitHub release asset (mirror). -- `` — backslash is literal (Joomla regex syntax). - -Example `updates.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 - - - - 8.2 - 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 `updates.xml` and `README.md` | -| New release | Prepend `` to `updates.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`, `updates.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; `updates.xml` updated with new entry -- [ ] FILE INFORMATION headers updated in modified files -- [ ] CHANGELOG.md updated -- [ ] Tests pass - ---- - -# Key Policy Documents (mokocli) - -| Document | Purpose | -|----------|---------| -| [file-header-standards.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | -| [coding-style-guide.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | -| [branching-strategy.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | -| [merge-strategy.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR conventions | -| [changelog-standards.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | -| [joomla-development-guide.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/guide/waas/joomla-development-guide.md) | MokoWaaS Joomla extension development guide | - -### Update Server Priority - -In the manifest XML `` block, Gitea MUST be priority 1 and GitHub priority 2. -Never set GitHub as the primary update server — Gitea is the source of truth. diff --git a/templates/mokogitea/CLAUDE.md.template b/templates/mokogitea/CLAUDE.md.template deleted file mode 100644 index 94187df..0000000 --- a/templates/mokogitea/CLAUDE.md.template +++ /dev/null @@ -1,34 +0,0 @@ -# {{REPO_NAME}} - -{{REPO_DESCRIPTION}} - -## Quick Reference - -| Field | Value | -|---|---| -| **Platform** | {{PLATFORM_TYPE}} | -| **Language** | {{PRIMARY_LANGUAGE}} | -| **Branch** | develop on `dev`, merge to `main` (protected) | -| **Wiki** | [{{REPO_NAME}} 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** `.claude/`, `.mcp.json`, `TODO.md`, `*.min.css`/`*.min.js` -- **Attribution**: `Authored-by: Moko Consulting` -- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`) -- **Wiki**: documentation lives in the Gitea wiki, not `docs/` files -- **Standards**: [mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli/wiki/Home) diff --git a/templates/mokogitea/CODEOWNERS b/templates/mokogitea/CODEOWNERS deleted file mode 100644 index f818f4a..0000000 --- a/templates/mokogitea/CODEOWNERS +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (C) 2026 Moko Consulting -# SPDX-License-Identifier: GPL-3.0-or-later -# -# CODEOWNERS — require approval from jmiller for protected paths -# Synced from MokoCli. Do not edit manually. -# -# Changes to these paths require review from the listed owners before merge. -# Combined with branch protection (require PR reviews), this prevents -# unauthorized modifications to workflows, configs, and governance files. - -# ── Synced workflows (managed by MokoCli — do not edit manually) ──── -/.github/workflows/deploy-dev.yml @jmiller -/.github/workflows/deploy-demo.yml @jmiller -/.github/workflows/deploy-manual.yml @jmiller -/.github/workflows/auto-release.yml @jmiller -/.github/workflows/auto-dev-issue.yml @jmiller -/.github/workflows/auto-assign.yml @jmiller -/.github/workflows/sync-version-on-merge.yml @jmiller -/.github/workflows/enterprise-firewall-setup.yml @jmiller -/.github/workflows/repository-cleanup.yml @jmiller -/.github/workflows/standards-compliance.yml @jmiller -/.github/workflows/codeql-analysis.yml @jmiller -/.github/workflows/repo_health.yml @jmiller -/.github/workflows/ci-joomla.yml @jmiller -/.github/workflows/update-server.yml @jmiller -/.github/workflows/deploy-manual.yml @jmiller -/.github/workflows/ci-dolibarr.yml @jmiller -/.github/workflows/publish-to-mokodolimods.yml @jmiller -/.github/workflows/changelog-validation.yml @jmiller -/.github/workflows/branch-freeze.yml @jmiller -# Custom workflows in .github/workflows/ not listed above are repo-owned. - -# ── GitHub configuration ───────────────────────────────────────────────── -/.github/ISSUE_TEMPLATE/ @jmiller -/.github/CODEOWNERS @jmiller -/.github/copilot.yml @jmiller -/.github/copilot-instructions.md @jmiller -/.github/CLAUDE.md @jmiller -/.github/.mokostandards @jmiller - -# ── Build and config files ─────────────────────────────────────────────── -/composer.json @jmiller -/phpstan.neon @jmiller -/Makefile @jmiller -/.ftpignore @jmiller -/.gitignore @jmiller -/.gitattributes @jmiller -/.editorconfig @jmiller - -# ── Governance documents ───────────────────────────────────────────────── -/LICENSE @jmiller -/CONTRIBUTING.md @jmiller -/SECURITY.md @jmiller -/GOVERNANCE.md @jmiller -/CODE_OF_CONDUCT.md @jmiller diff --git a/templates/mokogitea/CODEOWNERS.template b/templates/mokogitea/CODEOWNERS.template deleted file mode 100644 index 50d270a..0000000 --- a/templates/mokogitea/CODEOWNERS.template +++ /dev/null @@ -1,51 +0,0 @@ -# CODEOWNERS Template -# -# This file defines code ownership for automatic review assignment. -# Copy to .gitea/CODEOWNERS (remove .template suffix) and customize. -# -# Syntax: -# pattern owner(s) -# -# Examples: -# * @org/default-team -# /docs/ @org/docs-team -# *.js @org/frontend-team -# /src/security/ @org/security-team -# -# Last matching pattern takes precedence. -# See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners - -# Default owners for everything in the repo -# These owners will be requested for review when someone opens a PR -# Unless a later match takes precedence -* @mokoconsulting-tech/maintainers - -# Documentation -/docs/ @mokoconsulting-tech/docs-team -/README.md @mokoconsulting-tech/docs-team -/CHANGELOG.md @mokoconsulting-tech/docs-team -/CONTRIBUTING.md @mokoconsulting-tech/docs-team - -# GitHub configuration -/.gitea/ @mokoconsulting-tech/devops-team -/.gitea/workflows/ @mokoconsulting-tech/devops-team - -# Security-related files -/SECURITY.md @mokoconsulting-tech/security-team -/docs/policy/security-*.md @mokoconsulting-tech/security-team -/.gitea/workflows/security-*.yml @mokoconsulting-tech/security-team - -# API and automation -/api/ @mokoconsulting-tech/automation-team - -# Build system -/Makefiles/ @mokoconsulting-tech/build-team - -# Policies (require policy owner approval) -/docs/policy/ @mokoconsulting-tech/policy-owners - -# Templates -/templates/ @mokoconsulting-tech/template-maintainers - -# Schemas -/schemas/ @mokoconsulting-tech/architecture-team diff --git a/templates/mokogitea/ISSUE_TEMPLATE/adr.md b/templates/mokogitea/ISSUE_TEMPLATE/adr.md deleted file mode 100644 index eb40760..0000000 --- a/templates/mokogitea/ISSUE_TEMPLATE/adr.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -name: Architecture Decision Record (ADR) -about: Propose or document an architectural decision -title: '[ADR] ' -labels: 'architecture, decision' -assignees: '' - ---- - - -## ADR Number -ADR-XXXX - -## Status -- [ ] Proposed -- [ ] Accepted -- [ ] Deprecated -- [ ] Superseded by ADR-XXXX - -## Context -Describe the issue or problem that motivates this decision. - -## Decision -State the architecture decision and provide rationale. - -## Consequences -### Positive -- List positive consequences - -### Negative -- List negative consequences or trade-offs - -### Neutral -- List neutral aspects - -## Alternatives Considered -### Alternative 1 -- Description -- Pros -- Cons -- Why not chosen - -### Alternative 2 -- Description -- Pros -- Cons -- Why not chosen - -## Implementation Plan -1. Step 1 -2. Step 2 -3. Step 3 - -## Stakeholders -- **Decision Makers**: @user1, @user2 -- **Consulted**: @user3, @user4 -- **Informed**: team-name - -## Technical Details -### Architecture Diagram -``` -[Add diagram or link] -``` - -### Dependencies -- Dependency 1 -- Dependency 2 - -### Impact Analysis -- **Performance**: [Impact description] -- **Security**: [Impact description] -- **Scalability**: [Impact description] -- **Maintainability**: [Impact description] - -## Testing Strategy -- [ ] Unit tests -- [ ] Integration tests -- [ ] Performance tests -- [ ] Security tests - -## Documentation -- [ ] Architecture documentation updated -- [ ] API documentation updated -- [ ] Developer guide updated -- [ ] Runbook created - -## Migration Path -Describe how to migrate from current state to new architecture. - -## Rollback Plan -Describe how to rollback if issues occur. - -## Timeline -- **Proposal Date**: -- **Decision Date**: -- **Implementation Start**: -- **Expected Completion**: - -## References -- Related ADRs: -- External resources: -- RFCs: - -## Review Checklist -- [ ] Aligns with enterprise architecture principles -- [ ] Security implications reviewed -- [ ] Performance implications reviewed -- [ ] Cost implications reviewed -- [ ] Compliance requirements met -- [ ] Team consensus achieved diff --git a/templates/mokogitea/ISSUE_TEMPLATE/bug_report.md b/templates/mokogitea/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 38a16a7..0000000 --- a/templates/mokogitea/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -name: Bug Report -about: Report a bug or issue with the project -title: '[BUG] ' -labels: 'bug' -assignees: '' - ---- - - -## Bug Description -A clear and concise description of what the bug is. - -## Steps to Reproduce -1. Go to '...' -2. Click on '...' -3. Scroll down to '...' -4. See error - -## Expected Behavior -A clear and concise description of what you expected to happen. - -## Actual Behavior -A clear and concise description of what actually happened. - -## Screenshots -If applicable, add screenshots to help explain your problem. - -## Environment -- **Project**: [e.g., MokoDoliTools, moko-cassiopeia] -- **Version**: [e.g., 1.2.3] -- **Platform**: [e.g., Dolibarr 18.0, Joomla 5.0] -- **PHP Version**: [e.g., 8.1] -- **Database**: [e.g., MySQL 8.0, PostgreSQL 14] -- **Browser** (if applicable): [e.g., Chrome 120, Firefox 121] -- **OS**: [e.g., Ubuntu 22.04, Windows 11] - -## Additional Context -Add any other context about the problem here. - -## Possible Solution -If you have suggestions on how to fix the issue, please describe them here. - -## Checklist -- [ ] I have searched for similar issues before creating this one -- [ ] I have provided all the requested information -- [ ] I have tested this on the latest stable version -- [ ] I have checked the documentation and couldn't find a solution diff --git a/templates/mokogitea/ISSUE_TEMPLATE/config.yml b/templates/mokogitea/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index f392686..0000000 --- a/templates/mokogitea/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -blank_issues_enabled: true -contact_links: - - name: 💼 Enterprise Support - url: https://mokoconsulting.tech/enterprise - about: Enterprise-level support and consultation services - - name: 💬 Ask a Question - url: https://mokoconsulting.tech/ - about: Get help or ask questions through our website - - 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-tech/.github-private/security/advisories/new - about: Report security vulnerabilities privately (for critical issues) - - name: 💡 Community Discussions - url: https://github.com/orgs/mokoconsulting-tech/discussions - about: Join community discussions and Q&A diff --git a/templates/mokogitea/ISSUE_TEMPLATE/documentation.md b/templates/mokogitea/ISSUE_TEMPLATE/documentation.md deleted file mode 100644 index 43ad195..0000000 --- a/templates/mokogitea/ISSUE_TEMPLATE/documentation.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -name: Documentation Issue -about: Report an issue with documentation -title: '[DOCS] ' -labels: 'documentation' -assignees: '' - ---- - - -## Documentation Issue - -**Location**: - - -## Issue Type - -- [ ] Typo or grammar error -- [ ] Outdated information -- [ ] Missing documentation -- [ ] Unclear explanation -- [ ] Broken links -- [ ] Missing examples -- [ ] Other (specify below) - -## Description - - -## Current Content - -``` -Current text here -``` - -## Suggested Improvement - -``` -Suggested text here -``` - -## Additional Context - - -## Standards Alignment -- [ ] Follows mokocli documentation guidelines -- [ ] Uses en_US/en_GB localization -- [ ] Includes proper SPDX headers where applicable - -## Checklist -- [ ] I have searched for similar documentation issues -- [ ] I have provided a clear description -- [ ] I have suggested an improvement (if applicable) diff --git a/templates/mokogitea/ISSUE_TEMPLATE/dolibarr_issue.md b/templates/mokogitea/ISSUE_TEMPLATE/dolibarr_issue.md deleted file mode 100644 index 8366ff2..0000000 --- a/templates/mokogitea/ISSUE_TEMPLATE/dolibarr_issue.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -name: Dolibarr Module Issue -about: Report an issue with a Dolibarr module -title: '[DOLIBARR] ' -labels: 'dolibarr' -assignees: '' - ---- - - -## Module Details -- **Module Name**: [e.g., MokoDoliTools] -- **Module Version**: [e.g., 1.2.3] -- **Module Type**: [Custom Module / Third-party Module] - -## Dolibarr Environment -- **Dolibarr Version**: [e.g., 18.0.0] -- **PHP Version**: [e.g., 8.1.0] -- **Database**: [MySQL / PostgreSQL / MariaDB] -- **Database Version**: [e.g., 8.0] -- **Server**: [Apache / Nginx / IIS] -- **Hosting**: [Shared / VPS / Dedicated / Cloud] - -## Issue Description -Provide a clear and detailed description of the issue. - -## Steps to Reproduce -1. Log into Dolibarr -2. Navigate to '...' -3. Click on '...' -4. See error - -## Expected Behavior -What you expected to happen. - -## Actual Behavior -What actually happened. - -## Error Messages -``` -# Paste any error messages from Dolibarr logs -# Location: documents/dolibarr.log -``` - -## PHP Error Logs -```php -// Paste any PHP errors from error_log -``` - -## Screenshots -Add screenshots to help explain the issue. - -## Module Configuration -```php -// Paste relevant module configuration (sanitize sensitive data) -``` - -## Installed Modules -List other installed modules that might conflict: -- Module 1 (version) -- Module 2 (version) - -## User Permissions -- **User Type**: [Admin / User] -- **Permissions**: List relevant permissions enabled - -## Database Tables -- [ ] Module tables created correctly -- [ ] Data migration completed -- [ ] Foreign keys intact - -## Additional Context -- **Multi-Company**: [Yes / No] -- **Custom Hooks**: [Yes / No] -- **Third-party Integrations**: [List any] -- **Cron Jobs**: [Enabled / Disabled] - -## Performance Impact -- **Page Load Time**: [seconds] -- **Database Query Count**: [if known] -- **Memory Usage**: [if known] - -## Checklist -- [ ] I have cleared Dolibarr cache -- [ ] I have disabled other modules to test for conflicts -- [ ] I have checked Dolibarr logs -- [ ] I have verified database tables are correct -- [ ] I have checked PHP error logs -- [ ] I have tested with default Dolibarr theme -- [ ] I have searched for similar issues -- [ ] I am using a supported Dolibarr version -- [ ] I have proper user permissions diff --git a/templates/mokogitea/ISSUE_TEMPLATE/dolibarr_module_id_request.md b/templates/mokogitea/ISSUE_TEMPLATE/dolibarr_module_id_request.md deleted file mode 100644 index 39dfe59..0000000 --- a/templates/mokogitea/ISSUE_TEMPLATE/dolibarr_module_id_request.md +++ /dev/null @@ -1,189 +0,0 @@ ---- -name: Dolibarr Module ID Request -about: Request a unique module ID for a Dolibarr module -title: '[MODULE ID] ' -labels: ['dolibarr', 'module-id-request', 'admin'] -assignees: ['jmiller'] ---- - - -## Module ID Request - -### Module Information - -**Module Name**: -**Module Technical Name** (for descriptor class): mod_______ -**Module Version**: -**Short Description**: - -### Developer Information - -**Developer Name**: -**GitHub Username**: @ -**Email**: @mokoconsulting.tech -**Team/Department**: -**Manager**: @ - -### Distribution Intent - -**Where will this module be used?** -- [ ] Internal use only (Moko Consulting Tech organization) -- [ ] Client-specific custom module -- [ ] Public distribution (DoliStore / GitHub public) -- [ ] Open source community contribution - -**Expected Distribution Timeline**: -- [ ] Development phase (not ready for distribution) -- [ ] Beta testing (internal) -- [ ] Ready for public release -- [ ] Already in use (needs ID for existing module) - -### Module Purpose - -**What problem does this module solve?** - -**Key Features**: -- -- -- - -**Target Dolibarr Version(s)**: -- [ ] Dolibarr 18.x -- [ ] Dolibarr 19.x -- [ ] Dolibarr 20.x -- [ ] Other (specify): _______ - -### Technical Details - -**Module Type**: -- [ ] New standalone module -- [ ] Extension of existing module -- [ ] Fork of existing module (specify original): _______ -- [ ] Migration from another platform - -**Dependencies**: -List any Dolibarr modules or external libraries this module depends on: -- -- - -**Database Changes**: -- [ ] Creates new tables -- [ ] Modifies existing tables -- [ ] No database changes - -**Hooks Used**: -List Dolibarr hooks this module will use: -- -- - -### Repository Information - -**Repository Location**: -- [ ] Repository already exists: https://git.mokoconsulting.tech/mokoconsulting-tech/_______ -- [ ] Repository will be created after ID assignment -- [ ] Private repository (internal use) -- [ ] Public repository - -**Documentation**: -- [ ] Module design document exists -- [ ] README prepared -- [ ] User manual planned -- [ ] Developer documentation available - -### ID Range Preference - -Based on the [Dolibarr Module ID Policy](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/DOLIBARR_MODULE_ID_REQUEST.md): - -**Preferred Range** (will be assigned by coordinator): -- [ ] Internal module (100000-109999) -- [ ] Client-specific (110000-119999) -- [ ] Public module (120000+, requires external registration) - -**Justification for preference**: - -### Security and Compliance - -**For Public Modules** (required before external registration): -- [ ] Code follows mokocli -- [ ] Security review completed -- [ ] No sensitive data or credentials in code -- [ ] License properly defined (GPL-3.0-or-later) -- [ ] Copyright headers included -- [ ] SPDX identifiers present - -**For Internal/Client Modules**: -- [ ] Follows internal coding standards -- [ ] Approved for intended use case -- [ ] Manager approval received - -### Conflict Check - -**Have you checked for conflicts?** -- [ ] Verified no internal module uses this name -- [ ] Searched Dolibarr Wiki for similar modules -- [ ] Checked DoliStore for existing modules -- [ ] Reviewed internal registry (docs/reference/dolibarr-module-ids.md) - -**Similar Modules Found**: -- [ ] None found -- [ ] Found similar modules (list below) - -If similar modules exist, explain why a new module is needed: - -### Additional Context - -**Urgency**: -- [ ] Urgent (needed within 48 hours - please justify below) -- [ ] Normal (2 business days for internal, 1-2 weeks for public) -- [ ] Low priority (when available) - -**If urgent, explain why**: - -**Additional Information**: - -### Acknowledgments - -- [ ] I have read the [Dolibarr Module ID Policy](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/DOLIBARR_MODULE_ID_REQUEST.md) -- [ ] I understand internal modules use range 100000-119999 -- [ ] I understand public modules require external registration with Dolibarr Foundation -- [ ] I understand module IDs are never reused once allocated -- [ ] I will implement the assigned ID in the module descriptor correctly -- [ ] I will follow Dolibarr module development best practices - ---- - -## For Coordinator Use Only - -**Do not edit below this line** - -### Review Checklist - -- [ ] Request is complete and clear -- [ ] No conflicts found in internal registry -- [ ] No conflicts found in DoliStore (for public modules) -- [ ] Manager approval verified (if required) -- [ ] Security review completed (for public modules) -- [ ] Distribution intent is appropriate - -### ID Assignment - -**Assigned Module ID**: _______ -**ID Range**: [Internal 100k / Client 110k / Public 120k+] -**Date Assigned**: _______ -**Assigned By**: @_______ - -**Registry Updated**: -- [ ] Added to docs/reference/dolibarr-module-ids.md -- [ ] Repository created/updated -- [ ] Developer notified with implementation guidelines - -### External Registration (Public Modules Only) - -- [ ] Request submitted to Dolibarr Foundation -- [ ] Submission date: _______ -- [ ] Dolibarr Wiki updated: _______ -- [ ] DoliStore registration: _______ -- [ ] Official ID confirmed: _______ -- [ ] Confirmation date: _______ - -**Notes**: diff --git a/templates/mokogitea/ISSUE_TEMPLATE/enterprise_support.md b/templates/mokogitea/ISSUE_TEMPLATE/enterprise_support.md deleted file mode 100644 index 4c3f0b4..0000000 --- a/templates/mokogitea/ISSUE_TEMPLATE/enterprise_support.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -name: Enterprise Support Request -about: Request enterprise-level support or consultation -title: '[ENTERPRISE] ' -labels: 'enterprise, support' -assignees: '' - ---- - - -## Support Request Type -- [ ] Critical Production Issue -- [ ] Performance Optimization -- [ ] Security Audit -- [ ] Architecture Review -- [ ] Custom Development -- [ ] Migration Support -- [ ] Training & Onboarding -- [ ] Other (please specify) - -## Priority Level -- [ ] P0 - Critical (Production Down) -- [ ] P1 - High (Major Feature Broken) -- [ ] P2 - Medium (Non-Critical Issue) -- [ ] P3 - Low (Enhancement/Question) - -## Organization Details -- **Company Name**: -- **Contact Person**: -- **Email**: -- **Phone** (for P0/P1 issues): -- **Timezone**: - -## Issue Description -Provide a clear and detailed description of your request or issue. - -## Business Impact -Describe the impact on your business operations: -- Number of users affected: -- Revenue impact (if applicable): -- Deadline/SLA requirements: - -## Environment Details -- **Deployment Type**: [On-Premise / Cloud / Hybrid] -- **Platform**: [Joomla / Dolibarr / Custom] -- **Version**: -- **Infrastructure**: [AWS / Azure / GCP / Other] -- **Scale**: [Users / Transactions / Data Volume] - -## Current Configuration -```yaml -# Paste relevant configuration (sanitize sensitive data) -``` - -## Logs and Diagnostics -``` -# Paste relevant logs (sanitize sensitive data) -``` - -## Attempted Solutions -Describe any troubleshooting steps already taken. - -## Expected Resolution -Describe your expected outcome or resolution. - -## Additional Resources -- **Documentation Links**: -- **Related Issues**: -- **Screenshots/Videos**: - -## Enterprise SLA -- [ ] Standard Support (initial response within 1–3 weeks) -- [ ] Premium Support (initial response within 5 business days) -- [ ] Critical Support (initial response within 72 hours) -- [ ] Custom SLA (specify): - -## Compliance Requirements -- [ ] GDPR -- [ ] HIPAA -- [ ] SOC 2 -- [ ] ISO 27001 -- [ ] Other (specify): - ---- -**Note**: Enterprise support requests require an active support contract. If you don't have one, please contact us at enterprise@mokoconsulting.tech diff --git a/templates/mokogitea/ISSUE_TEMPLATE/feature_request.md b/templates/mokogitea/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 2f7d663..0000000 --- a/templates/mokogitea/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -name: Feature Request -about: Suggest a new feature or enhancement -title: '[FEATURE] ' -labels: 'enhancement' -assignees: '' - ---- - - -## Feature Description -A clear and concise description of the feature you'd like to see. - -## Problem or Use Case -Describe the problem this feature would solve or the use case it addresses. -Ex. I'm always frustrated when [...] - -## Proposed Solution -A clear and concise description of what you want to happen. - -## Alternative Solutions -A clear and concise description of any alternative solutions or features you've considered. - -## Benefits -Describe how this feature would benefit users: -- Who would use this feature? -- What problems does it solve? -- What value does it add? - -## Implementation Details (Optional) -If you have ideas about how this could be implemented, share them here: -- Technical approach -- Files/components that might need changes -- Any concerns or challenges you foresee - -## Additional Context -Add any other context, mockups, or screenshots about the feature request here. - -## Relevant Standards -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 -- [ ] Code quality standards -- [ ] Other: [specify] - -## Checklist -- [ ] I have searched for similar feature requests before creating this one -- [ ] I have clearly described the use case and benefits -- [ ] I have considered alternative solutions -- [ ] This feature aligns with the project's goals and scope diff --git a/templates/mokogitea/ISSUE_TEMPLATE/firewall-request.md b/templates/mokogitea/ISSUE_TEMPLATE/firewall-request.md deleted file mode 100644 index 0691b93..0000000 --- a/templates/mokogitea/ISSUE_TEMPLATE/firewall-request.md +++ /dev/null @@ -1,190 +0,0 @@ ---- -name: Firewall Request -about: Request firewall rule changes or access to external resources -title: '[FIREWALL] [Resource Name] - [Brief Description]' -labels: ['firewall-request', 'infrastructure', 'security'] -assignees: ['jmiller'] ---- - - -## Firewall Request - -### Request Type -- [ ] Allow outbound access to external service/API -- [ ] Allow inbound access from external source -- [ ] Modify existing firewall rule -- [ ] Remove/revoke firewall rule -- [ ] Other (specify): - -### Resource Information -**Service/Domain Name**: -**IP Address(es)**: -**Port(s)**: -**Protocol**: -- [ ] HTTP (80) -- [ ] HTTPS (443) -- [ ] SSH (22) -- [ ] FTP (21) -- [ ] SFTP (22) -- [ ] Custom (specify): _______________ - -### Requestor Information -**Name**: -**GitHub Username**: @ -**Email**: @mokoconsulting.tech -**Team/Department**: -**Manager**: @ - -### Business Justification -**Why is this access needed?** - -**Which project(s) require this access?** - -**What functionality will break without this access?** - -**Is there an alternative solution?** -- [ ] Yes (explain): -- [ ] No - -### Security Considerations -**Data Classification**: -- [ ] Public -- [ ] Internal -- [ ] Confidential -- [ ] Restricted - -**Sensitive Data Transmission**: -- [ ] No sensitive data will be transmitted -- [ ] Sensitive data will be transmitted (encryption required) -- [ ] Authentication credentials will be transmitted (secure storage required) - -**Third-Party Service**: -- [ ] This is a trusted/verified third-party service -- [ ] This is a new/unverified service (security review required) - -**Service Documentation**: -(Provide link to service documentation or API specs) - -### Access Scope -**Affected Systems**: -- [ ] Development environment only -- [ ] Staging environment only -- [ ] Production environment -- [ ] All environments - -**Access Duration**: -- [ ] Permanent (ongoing business need) -- [ ] Temporary (specify end date): _______________ -- [ ] Testing only (specify duration): _______________ - -### Technical Details -**Source System(s)**: -(Which internal systems need access?) - -**Destination System(s)**: -(Which external systems need to be accessed?) - -**Expected Traffic Volume**: -(e.g., requests per hour/day) - -**Traffic Pattern**: -- [ ] Continuous -- [ ] Periodic (specify frequency): _______________ -- [ ] On-demand/manual -- [ ] Scheduled (specify schedule): _______________ - -### Testing Requirements -**Pre-Production Testing**: -- [ ] Request includes dev/staging access for testing -- [ ] Testing can be done with production access only -- [ ] No testing required (modify existing rule) - -**Testing Plan**: - -**Rollback Plan**: -(What happens if access needs to be revoked?) - -### Compliance & Audit -**Compliance Requirements**: -- [ ] GDPR considerations -- [ ] SOC 2 compliance required -- [ ] PCI DSS considerations -- [ ] Other regulatory requirements: _______________ -- [ ] No specific compliance requirements - -**Audit/Logging Requirements**: -- [ ] Standard logging sufficient -- [ ] Enhanced logging/monitoring required -- [ ] Real-time alerting required - -### Urgency -- [ ] Critical (production down, immediate access needed) -- [ ] High (needed within 24 hours) -- [ ] Normal (needed within 1 week) -- [ ] Low priority (needed within 1 month) - -**If critical/high urgency, explain why:** - -### Approvals -**Manager Approval**: -- [ ] Manager has been notified and approves this request - -**Security Team Review Required**: -- [ ] Yes (new external service, sensitive data) -- [ ] No (minor change, established service) - -### Additional Information - -**Related Documentation**: -(Links to relevant docs, RFCs, tickets, etc.) - -**Dependencies**: -(Other systems or changes this depends on) - -**Comments/Questions**: - ---- - -## For Infrastructure/Security Team Use Only - -**Do not edit below this line** - -### Security Review -- [ ] Security team review completed -- [ ] Risk assessment: Low / Medium / High -- [ ] Encryption required: Yes / No -- [ ] VPN required: Yes / No -- [ ] Additional security controls: _______________ - -**Reviewed By**: @_______________ -**Review Date**: _______________ -**Review Notes**: - -### Implementation -- [ ] Firewall rule created/modified -- [ ] Rule tested in dev/staging -- [ ] Rule deployed to production -- [ ] Monitoring/alerting configured -- [ ] Documentation updated - -**Firewall Rule ID**: _______________ -**Implementation Date**: _______________ -**Implemented By**: @_______________ - -**Configuration Details**: -``` -Source: -Destination: -Port/Protocol: -Action: Allow/Deny -``` - -### Verification -- [ ] Requestor confirmed access working -- [ ] Logs reviewed (no anomalies) -- [ ] Security scan completed (if applicable) - -**Verification Date**: _______________ -**Verified By**: @_______________ - -### Notes diff --git a/templates/mokogitea/ISSUE_TEMPLATE/joomla_issue.md b/templates/mokogitea/ISSUE_TEMPLATE/joomla_issue.md deleted file mode 100644 index d808f79..0000000 --- a/templates/mokogitea/ISSUE_TEMPLATE/joomla_issue.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -name: Joomla Extension Issue -about: Report an issue with a Joomla extension -title: '[JOOMLA] ' -labels: 'joomla' -assignees: '' - ---- - - -## Issue Type -- [ ] Component Issue -- [ ] Module Issue -- [ ] Plugin Issue -- [ ] Template Issue - -## Extension Details -- **Extension Name**: [e.g., moko-cassiopeia] -- **Extension Version**: [e.g., 1.2.3] -- **Extension Type**: [Component / Module / Plugin / Template] - -## Joomla Environment -- **Joomla Version**: [e.g., 4.4.0, 5.0.0] -- **PHP Version**: [e.g., 8.1.0] -- **Database**: [MySQL / PostgreSQL / MariaDB] -- **Database Version**: [e.g., 8.0] -- **Server**: [Apache / Nginx / IIS] -- **Hosting**: [Shared / VPS / Dedicated / Cloud] - -## Issue Description -Provide a clear and detailed description of the issue. - -## Steps to Reproduce -1. Go to '...' -2. Click on '...' -3. Configure '...' -4. See error - -## Expected Behavior -What you expected to happen. - -## Actual Behavior -What actually happened. - -## Error Messages -``` -# Paste any error messages from Joomla error logs -# Location: administrator/logs/error.php -``` - -## Browser Console Errors -```javascript -// Paste any JavaScript console errors (F12 in browser) -``` - -## Screenshots -Add screenshots to help explain the issue. - -## Configuration -```ini -# Paste extension configuration (sanitize sensitive data) -``` - -## Installed Extensions -List other installed extensions that might conflict: -- Extension 1 (version) -- Extension 2 (version) - -## Template Overrides -- [ ] Using template overrides -- [ ] Custom CSS -- [ ] Custom JavaScript - -## Additional Context -- **Multilingual Site**: [Yes / No] -- **Cache Enabled**: [Yes / No] -- **Debug Mode**: [Yes / No] -- **SEF URLs**: [Yes / No] - -## Checklist -- [ ] I have cleared Joomla cache -- [ ] I have disabled other extensions to test for conflicts -- [ ] I have checked Joomla error logs -- [ ] I have tested with a default Joomla template -- [ ] I have checked browser console for JavaScript errors -- [ ] I have searched for similar issues -- [ ] I am using a supported Joomla version diff --git a/templates/mokogitea/ISSUE_TEMPLATE/question.md b/templates/mokogitea/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 3175013..0000000 --- a/templates/mokogitea/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -name: Question -about: Ask a question about usage, features, or best practices -title: '[QUESTION] ' -labels: ['question'] -assignees: ['jmiller'] ---- - - -## Question - -**Your question:** - - -## Context - -**What are you trying to accomplish?** - - -**What have you already tried?** - - -**Category**: -- [ ] Script usage -- [ ] Configuration -- [ ] Workflow setup -- [ ] Documentation interpretation -- [ ] Best practices -- [ ] Integration -- [ ] Other: __________ - -## Environment (if relevant) - -**Your setup**: -- Operating System: -- Version: - -## What You've Researched - -**Documentation reviewed**: -- [ ] README.md -- [ ] Project documentation -- [ ] Other (specify): __________ - -**Similar issues/questions found**: -- # -- # - -## Expected Outcome - -**What result are you hoping for?** - - -## Code/Configuration Samples - -**Relevant code or configuration** (if applicable): - -```bash -# Your code here -``` - -## Additional Context - -**Any other relevant information:** - - -**Screenshots** (if helpful): - - -## Urgency - -- [ ] Urgent (blocking work) -- [ ] Normal (can work on other things meanwhile) -- [ ] Low priority (just curious) - -## Checklist - -- [ ] I have searched existing issues and discussions -- [ ] I have reviewed relevant documentation -- [ ] I have provided sufficient context -- [ ] I have included code/configuration samples if relevant -- [ ] This is a genuine question (not a bug report or feature request) diff --git a/templates/mokogitea/ISSUE_TEMPLATE/request-license.md b/templates/mokogitea/ISSUE_TEMPLATE/request-license.md deleted file mode 100644 index 7327adf..0000000 --- a/templates/mokogitea/ISSUE_TEMPLATE/request-license.md +++ /dev/null @@ -1,107 +0,0 @@ ---- -name: License Request -about: Request an organization license for Sublime Text -title: '[LICENSE REQUEST] Sublime Text - [Your Name]' -labels: ['license-request', 'admin'] -assignees: ['jmiller'] ---- - - -## License Request - -### Tool Information -**Tool Name**: Sublime Text - -**License Type Requested**: Organization Pool - -**Personal Purchase**: -- [ ] I prefer to purchase my own license ($99 USD - recommended, immediate access) -- [ ] I prefer an organization license (1-2 business days, organization use only) -- [ ] I have already purchased my own license (registration only for support) - -### Requestor Information -**Name**: -**GitHub Username**: @ -**Email**: @mokoconsulting.tech -**Team/Department**: -**Manager**: @ - -### Justification -**Why do you need this license?** - -**Primary use case**: -- [ ] Remote development (SFTP to servers) -- [ ] Local development -- [ ] Code review -- [ ] Documentation editing -- [ ] Other (specify): - -**Which projects/repositories will you work on?** - -**Have you evaluated the free trial?** -- [ ] Yes, I've used the trial and Sublime Text meets my needs -- [ ] No, requesting license before trial - -**Alternative tools considered**: -- [ ] VS Code (free alternative) -- [ ] Vim/Neovim (free, terminal-based) -- [ ] Other: _______________ - -### Platform -- [ ] Windows -- [ ] macOS -- [ ] Linux (distribution: ________) - -### Urgency -- [ ] Urgent (needed within 24 hours - please justify) -- [ ] Normal (1-2 business days) -- [ ] Low priority (when available) - -**If urgent, please explain why:** - -### SFTP Plugin -**Note**: Sublime SFTP plugin ($16 USD) is a **separate personal purchase** and is NOT provided by the organization. - -- [ ] I understand SFTP plugin requires separate personal purchase -- [ ] I have already purchased SFTP plugin -- [ ] I will purchase SFTP plugin if needed for my work -- [ ] I don't need SFTP plugin (local development only) - -### Acknowledgments -- [ ] I have read the License Management Policy (/docs/github-private/LICENSE_MANAGEMENT.md) -- [ ] I understand organization licenses are for work use only -- [ ] I understand organization licenses must be returned upon leaving -- [ ] I understand personal purchases ($99) are an alternative with lifetime access -- [ ] I understand SFTP plugin ($16) requires separate personal purchase -- [ ] I agree to the terms of use - -### Additional Information - -**Expected daily usage hours**: _____ hours/day - -**Duration of need**: -- [ ] Permanent (ongoing role) -- [ ] Temporary project (_____ months) -- [ ] Trial/Evaluation (_____ weeks) - -**Comments/Questions**: - ---- - -## For Admin Use Only - -**Do not edit below this line** - -- [ ] Manager approval received (@manager-username) -- [ ] License available in pool (current: __/20) -- [ ] License type confirmed (Organization / Personal registration) -- [ ] License key sent via encrypted email -- [ ] Activation confirmed by user -- [ ] Added to license tracking sheet -- [ ] User notified of SFTP plugin requirement - -**License Key ID**: _____________ -**Date Issued**: _____________ -**Issued By**: @_____________ - -**Notes**: diff --git a/templates/mokogitea/ISSUE_TEMPLATE/rfc.md b/templates/mokogitea/ISSUE_TEMPLATE/rfc.md deleted file mode 100644 index 6f09af7..0000000 --- a/templates/mokogitea/ISSUE_TEMPLATE/rfc.md +++ /dev/null @@ -1,126 +0,0 @@ ---- -name: Request for Comments (RFC) -about: Propose a significant change for community discussion -title: '[RFC] ' -labels: 'rfc, discussion' -assignees: '' - ---- - - -## RFC Summary -One-paragraph summary of the proposal. - -## Motivation -Why are we doing this? What use cases does it support? What is the expected outcome? - -## Detailed Design -### Overview -Provide a detailed explanation of the proposed change. - -### API Changes (if applicable) -```php -// Before -function oldApi($param1) { } - -// After -function newApi($param1, $param2) { } -``` - -### User Experience Changes -Describe how users will interact with this change. - -### Implementation Approach -High-level implementation strategy. - -## Drawbacks -Why should we *not* do this? - -## Alternatives -What other designs have been considered? What is the impact of not doing this? - -### Alternative 1 -- Description -- Trade-offs - -### Alternative 2 -- Description -- Trade-offs - -## Adoption Strategy -How will existing users adopt this? Is this a breaking change? - -### Migration Guide -```bash -# Steps to migrate -``` - -### Deprecation Timeline -- **Announcement**: -- **Deprecation**: -- **Removal**: - -## Unresolved Questions -- Question 1 -- Question 2 - -## Future Possibilities -What future work does this enable? - -## Impact Assessment -### Performance -Expected performance impact. - -### Security -Security considerations and implications. - -### Compatibility -- **Backward Compatible**: [Yes / No] -- **Breaking Changes**: [List] - -### Maintenance -Long-term maintenance considerations. - -## Community Input -### Stakeholders -- [ ] Core team -- [ ] Module developers -- [ ] End users -- [ ] Enterprise customers - -### Feedback Period -**Duration**: [e.g., 2 weeks] -**Deadline**: [date] - -## Implementation Timeline -### Phase 1: Design -- [ ] RFC discussion -- [ ] Design finalization -- [ ] Approval - -### Phase 2: Implementation -- [ ] Core implementation -- [ ] Tests -- [ ] Documentation - -### Phase 3: Release -- [ ] Beta release -- [ ] Feedback collection -- [ ] Stable release - -## Success Metrics -How will we measure success? -- Metric 1 -- Metric 2 - -## References -- Related RFCs: -- External documentation: -- Prior art: - -## Open Questions for Community -1. Question 1? -2. Question 2? - ---- -**Note**: This RFC is open for community discussion. Please provide feedback in the comments below. diff --git a/templates/mokogitea/ISSUE_TEMPLATE/security.md b/templates/mokogitea/ISSUE_TEMPLATE/security.md deleted file mode 100644 index ea85959..0000000 --- a/templates/mokogitea/ISSUE_TEMPLATE/security.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -name: Security Vulnerability Report -about: Report a security vulnerability (use only for non-critical issues) -title: '[SECURITY] ' -labels: 'security' -assignees: '' - ---- - - -## ⚠️ IMPORTANT: Private Disclosure Required - -**For critical security vulnerabilities, DO NOT use this template.** -Follow the process in [SECURITY.md](../SECURITY.md) for responsible disclosure. - -Use this template only for: -- Security improvements -- Non-critical security suggestions -- Security documentation updates - ---- - -## Security Issue - -**Severity**: - - -## Description - - -## Affected Components - - -## Suggested Mitigation - - -## Standards Reference -Does this relate to security standards in [mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli)? -- [ ] SPDX license identifiers -- [ ] Secret management -- [ ] Dependency security -- [ ] Access control -- [ ] Other: [specify] - -## Additional Context - - -## Checklist -- [ ] This is NOT a critical vulnerability requiring private disclosure -- [ ] I have reviewed the SECURITY.md policy -- [ ] I have provided sufficient detail for evaluation diff --git a/templates/mokogitea/ISSUE_TEMPLATE/version.md b/templates/mokogitea/ISSUE_TEMPLATE/version.md deleted file mode 100644 index 6328421..0000000 --- a/templates/mokogitea/ISSUE_TEMPLATE/version.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Version Bump -about: Request or track a version change -title: '[VERSION] ' -labels: 'version, type: version' -assignees: 'jmiller' ---- - -## Version Change - -**Current version**: -**Requested version**: -**Change type**: - -## Reason - - - -## Checklist - -- [ ] README.md `VERSION:` field updated -- [ ] CHANGELOG.md entry added -- [ ] Module descriptor version updated (Dolibarr: `$this->version`, Joomla: ``) -- [ ] All file headers will be auto-propagated by `sync-version-on-merge` workflow diff --git a/templates/mokogitea/PULL_REQUEST_TEMPLATE.md b/templates/mokogitea/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 55e1428..0000000 --- a/templates/mokogitea/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,86 +0,0 @@ - - -# Pull Request - -## Description - -Please include a summary of the changes and the related issue. Include relevant motivation and context. - -Fixes # (issue) - -## Type of Change - -Please delete options that are not relevant. - -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) -- [ ] Documentation update -- [ ] Performance improvement -- [ ] Code refactoring -- [ ] CI/CD improvement -- [ ] Dependency update - -## How Has This Been Tested? - -Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. - -- [ ] Test A -- [ ] Test B - -**Test Configuration**: -- OS: -- Version: -- Other relevant configuration: - -## Checklist - -- [ ] My code follows the style guidelines of this project -- [ ] I have performed a self-review of my own code -- [ ] I have commented my code, particularly in hard-to-understand areas -- [ ] I have made corresponding changes to the documentation -- [ ] My changes generate no new warnings -- [ ] I have added tests that prove my fix is effective or that my feature works -- [ ] New and existing unit tests pass locally with my changes -- [ ] Any dependent changes have been merged and published in downstream modules -- [ ] I have checked my code and corrected any misspellings -- [ ] I have updated the CHANGELOG.md file -- [ ] **Patch version bumped** — incremented `XX.YY.ZZ` in `README.md` (e.g. `01.02.03` → `01.02.04`); `sync-version-on-merge` propagates it to all file headers and badges on merge -- [ ] All file headers are present and correct - -## Breaking Changes - -Does this PR introduce any breaking changes? If yes, please describe the impact and migration path: - -## Screenshots (if applicable) - -Add screenshots to help explain your changes. - -## Additional Context - -Add any other context about the pull request here. - -## Related Issues/PRs - -- Related to # -- Depends on # -- Blocks # diff --git a/templates/mokogitea/PULL_REQUEST_TEMPLATE.md.backup b/templates/mokogitea/PULL_REQUEST_TEMPLATE.md.backup deleted file mode 100644 index 7b56431..0000000 --- a/templates/mokogitea/PULL_REQUEST_TEMPLATE.md.backup +++ /dev/null @@ -1,85 +0,0 @@ - - -# Pull Request - -## Description - -Please include a summary of the changes and the related issue. Include relevant motivation and context. - -Fixes # (issue) - -## Type of Change - -Please delete options that are not relevant. - -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) -- [ ] Documentation update -- [ ] Performance improvement -- [ ] Code refactoring -- [ ] CI/CD improvement -- [ ] Dependency update - -## How Has This Been Tested? - -Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. - -- [ ] Test A -- [ ] Test B - -**Test Configuration**: -- OS: -- Version: -- Other relevant configuration: - -## Checklist - -- [ ] My code follows the style guidelines of this project -- [ ] I have performed a self-review of my own code -- [ ] I have commented my code, particularly in hard-to-understand areas -- [ ] I have made corresponding changes to the documentation -- [ ] My changes generate no new warnings -- [ ] I have added tests that prove my fix is effective or that my feature works -- [ ] New and existing unit tests pass locally with my changes -- [ ] Any dependent changes have been merged and published in downstream modules -- [ ] I have checked my code and corrected any misspellings -- [ ] I have updated the CHANGELOG.md file -- [ ] All file headers are present and correct - -## Breaking Changes - -Does this PR introduce any breaking changes? If yes, please describe the impact and migration path: - -## Screenshots (if applicable) - -Add screenshots to help explain your changes. - -## Additional Context - -Add any other context about the pull request here. - -## Related Issues/PRs - -- Related to # -- Depends on # -- Blocks # diff --git a/templates/mokogitea/README.md b/templates/mokogitea/README.md deleted file mode 100644 index 2566e09..0000000 --- a/templates/mokogitea/README.md +++ /dev/null @@ -1,385 +0,0 @@ - - -# GitHub Templates - -## Overview - -This directory contains templates for GitHub-specific features including issue templates, pull request templates, and CODEOWNERS files. These templates help standardize collaboration and contribution processes across repositories. - -## Purpose - -GitHub templates provide: - -- **Consistent Issue Reporting**: Standardized bug reports and feature requests -- **Structured Pull Requests**: Clear PR descriptions and checklists -- **Code Ownership**: Defined code ownership for reviews -- **Better Collaboration**: Clear expectations for contributors -- **Quality Control**: Ensure all necessary information is captured - -## Template Categories - -### Issue Templates - -Located in `ISSUE_TEMPLATE/` directory: - -- **Bug Report** (`bug_report.md`): Template for reporting bugs -- **Feature Request** (`feature_request.md`): Template for requesting features -- **Custom Templates**: Project-specific issue types -- **Configuration** (`config.yml`): Issue template configuration - -**Usage**: Copy entire `ISSUE_TEMPLATE/` directory to your repository's `.mokogitea/` directory. - -### Pull Request Template - -**File**: `PULL_REQUEST_TEMPLATE.md` - -**Purpose**: Standardize pull request descriptions and ensure all necessary information is provided before review. - -**Usage**: Copy to `.mokogitea/PULL_REQUEST_TEMPLATE.md` in your repository. - -### CODEOWNERS Template - -**File**: `CODEOWNERS.template` - -**Purpose**: Define code ownership for automatic review assignment. - -**Usage**: -1. Copy to `.mokogitea/CODEOWNERS` (remove `.template` suffix) -2. Customize with your team and file patterns -3. Commit to repository - -## Using These Templates - -### Setup Process - -1. **Choose Templates**: Identify which templates your repository needs -2. **Copy to Repository**: Copy templates to your repository's `.mokogitea/` directory -3. **Customize**: Adapt templates to your project's needs -4. **Test**: Create test issues/PRs to validate templates -5. **Document**: Update README with any project-specific requirements - -### Directory Structure in Your Repository - -``` -your-repository/ -└── .mokogitea/ - ├── ISSUE_TEMPLATE/ - │ ├── bug_report.md - │ ├── feature_request.md - │ └── config.yml - ├── PULL_REQUEST_TEMPLATE.md - └── CODEOWNERS -``` - -## Issue Templates - -### Bug Report Template - -**Purpose**: Capture all information needed to reproduce and fix bugs. - -**Required Information:** -- Bug description -- Steps to reproduce -- Expected behavior -- Actual behavior -- Environment details -- Screenshots (if applicable) - -**Customization:** -- Add project-specific environment fields -- Add relevant labels automatically -- Customize sections for your workflow - -### Feature Request Template - -**Purpose**: Clearly describe desired functionality and use cases. - -**Required Information:** -- Feature description -- Use case and motivation -- Proposed solution -- Alternatives considered -- Additional context - -**Customization:** -- Add project-specific fields -- Include acceptance criteria template -- Add design review section if needed - -### Configuration File - -**File**: `config.yml` - -**Purpose**: Configure issue template behavior. - -**Options:** -- Disable blank issues -- Add external links -- Set contact links -- Configure template chooser - -**Example:** -```yaml -blank_issues_enabled: false -contact_links: - - name: "📚 Documentation" - url: https://git.mokoconsulting.tech/MokoConsulting/mokocli/docs - about: "Check the documentation first" - - name: "💬 Discussions" - url: https://git.mokoconsulting.tech/MokoConsulting/mokocli/discussions - about: "Ask questions and discuss ideas" -``` - -## Pull Request Template - -### Standard Sections - -The PR template includes: - -1. **Description**: What changes are being made and why -2. **Type of Change**: Classification of the change -3. **Checklist**: Pre-merge verification items -4. **Testing**: How changes were tested -5. **Related Issues**: Links to related issues -6. **Breaking Changes**: Any breaking changes -7. **Documentation**: Documentation updates needed - -### Customization - -Add project-specific sections: -- **Performance Impact**: For performance-critical projects -- **Security Considerations**: For security-focused projects -- **UI Changes**: For projects with user interfaces -- **Database Migrations**: For projects with databases -- **Rollback Plan**: For production deployments - -### Best Practices - -- **Keep It Concise**: Don't make template too long -- **Use Checkboxes**: Make requirements clear and verifiable -- **Provide Examples**: Show good PR descriptions -- **Link to Guidelines**: Reference CONTRIBUTING.md -- **Make It Helpful**: Template should aid contributors - -## CODEOWNERS Template - -### Purpose - -The CODEOWNERS file: -- Defines ownership of code areas -- Automatically requests reviews from owners -- Protects critical code paths -- Documents team structure -- Ensures expertise is consulted - -### Syntax - -``` -# Pattern # Owner(s) -* @org/default-team -/docs/ @org/docs-team -/src/ @org/dev-team -/.mokogitea/workflows/ @org/devops-team -/scripts/ @org/automation-team -/docs/policy/security-*.md @org/security-team -``` - -### Customization - -1. **Replace Organization**: Change `@org/` to your organization -2. **Define Teams**: Match GitHub team structure -3. **Set Patterns**: Use glob patterns for files -4. **Order Matters**: Last matching pattern wins -5. **Test Ownership**: Verify assignments work correctly - -### Best Practices - -- **Start Broad**: Default owner for all files -- **Get Specific**: Specific patterns for critical areas -- **Use Teams**: Prefer teams over individuals -- **Document Intent**: Add comments explaining ownership -- **Keep Updated**: Review quarterly - -### Protection Rules - -Combine CODEOWNERS with branch protection: -- Require code owner review -- Prevent bypassing by admins -- Ensure critical code is reviewed - -## Template Maintenance - -### Version Control - -Track template changes: -- Use semantic versioning in headers -- Document changes in revision history -- Communicate template updates -- Provide migration guidance - -### Review Cadence - -**Quarterly Review:** -- Evaluate template effectiveness -- Gather user feedback -- Update for new requirements -- Remove obsolete sections -- Add missing sections - -**Annual Review:** -- Major template overhaul -- Align with updated standards -- Benchmark against industry practices -- Solicit team feedback - -### Testing Templates - -Before publishing templates: -1. Create test issue using template -2. Create test PR using template -3. Verify CODEOWNERS assignments -4. Check for broken links -5. Validate formatting -6. Get team review - -## Examples - -### Example: Minimal Setup - -For small projects: -``` -.mokogitea/ -├── ISSUE_TEMPLATE/ -│ └── bug_report.md -└── PULL_REQUEST_TEMPLATE.md -``` - -### Example: Complete Setup - -For large projects: -``` -.mokogitea/ -├── ISSUE_TEMPLATE/ -│ ├── bug_report.md -│ ├── feature_request.md -│ ├── security_report.md -│ ├── documentation.md -│ └── config.yml -├── PULL_REQUEST_TEMPLATE.md -└── CODEOWNERS -``` - -### Example: Multi-Project Setup - -For repositories with multiple components: -``` -.mokogitea/ -├── ISSUE_TEMPLATE/ -│ ├── bug_report.md -│ ├── feature_request.md -│ ├── performance_issue.md -│ ├── security_report.md -│ └── config.yml -├── PULL_REQUEST_TEMPLATE/ -│ ├── pull_request_template.md # Default -│ ├── hotfix.md # Hotfix template -│ └── release.md # Release template -└── CODEOWNERS -``` - -## Common Pitfalls - -### Anti-Patterns to Avoid - -1. **Overly Complex Templates**: Templates that are too long discourage use -2. **Too Many Required Fields**: Makes template tedious -3. **Vague Instructions**: Unclear what's expected -4. **Outdated Information**: References to old processes -5. **No Customization**: Generic templates don't fit all projects -6. **Ignored Templates**: Templates that aren't enforced -7. **Missing Documentation**: No guidance on using templates - -### How to Avoid Them - -- Keep templates concise and focused -- Make fields optional when possible -- Provide clear examples -- Review and update regularly -- Customize for your project -- Enforce template usage in reviews -- Document template purpose and usage - -## Integration with Workflows - -### Automated Validation - -Use GitHub Actions to validate: -- Required sections are present -- Links are valid -- Labels are applied correctly -- Assignees are set -- CODEOWNERS are requested - -### Auto-Labeling - -Automatically label issues/PRs based on: -- Template used -- Files changed -- Keywords in description -- Size of change - -### Status Checks - -Require status checks that verify: -- PR template checklist completed -- All required reviewers approved -- Documentation updated -- Tests passing - -## References - -- [GitHub Issue Templates Documentation](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository) -- [GitHub PR Templates Documentation](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository) -- [GitHub CODEOWNERS Documentation](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) -- [mokocli Repository](https://git.mokoconsulting.tech/MokoConsulting/mokocli) - -## Metadata - -* **Document**: templates/mokogitea/README.md -* **Repository**: [mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli) -* **Owner**: Moko Consulting Engineering Team -* **Scope**: GitHub templates and configuration -* **Lifecycle**: Active -* **Audience**: All repository maintainers and contributors - -## Revision History - -| Version | Date | Author | Notes | -| -------- | ---------- | ------------------------------- | ----------------------------------------------- | -| 01.00.00 | 2026-01-13 | GitHub Copilot | Initial GitHub templates documentation | diff --git a/templates/mokogitea/copilot-instructions.dolibarr.md.template b/templates/mokogitea/copilot-instructions.dolibarr.md.template deleted file mode 100644 index 75611e7..0000000 --- a/templates/mokogitea/copilot-instructions.dolibarr.md.template +++ /dev/null @@ -1,335 +0,0 @@ - - -> [!IMPORTANT] -> **🔧 AI Self-Update Required on First Use** -> -> This file may contain unfilled `{{TOKEN}}` placeholders. The mokocli 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** `.gitea/copilot-instructions.md` and `.gitea/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://git.mokoconsulting.tech/mokoconsulting-tech/` | -> | `{{MODULE_NAME}}` | The module name as used in Dolibarr (lowercase, e.g. `mymodule`) — from the `langs/en_US/*.lang` filename or `$this->rights_class` in the module descriptor | -> | `{{MODULE_CLASS}}` | PascalCase module class name (e.g. `MyModule`) — from the `src/core/modules/mod*.class.php` filename | -> | `{{MODULE_ID}}` | The `$this->numero` value in `src/core/modules/mod*.class.php`; check [module-registry.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/development/crm/module-registry.md) if creating a new module | -> | `{{PRIMARY_LANGUAGE}}` | Primary programming language (usually `PHP`) | -> -> --- - -# {{REPO_NAME}} — GitHub Copilot Custom Instructions - -## What This Repo Is - -This is a **Moko Consulting MokoCRM** (Dolibarr) module repository governed by [mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli). All coding standards, workflows, and policies are defined there and enforced here via bulk sync. - -Repository URL: {{REPO_URL}} -Module name: **{{MODULE_NAME}}** -Module class: **{{MODULE_CLASS}}** -Module ID: **{{MODULE_ID}}** -Platform: **Dolibarr / MokoCRM** - ---- - -## Primary Language - -**PHP** (≥ 8.1) is the primary language for this Dolibarr module. 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}}.Module - * INGROUP: {{REPO_NAME}} - * REPO: {{REPO_URL}} - * PATH: /src/path/to/file.php - * VERSION: XX.YY.ZZ - * BRIEF: One-line description of purpose - */ -``` - -**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 `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. - -### Dolibarr Module Version Alignment - -The version in `README.md` **must always match** the `$this->version` property in the main module descriptor class (`src/core/modules/mod{{MODULE_CLASS}}.class.php`). - -```php -// In src/core/modules/mod{{MODULE_CLASS}}.class.php -public $version = '01.02.04'; // Must match README.md version -``` - ---- - -## Dolibarr Module Structure - -``` -{{REPO_NAME}}/ -├── src/ # Module source code (deployed to Dolibarr) -│ ├── index.php # REQUIRED — accessforbidden() guard -│ ├── README.md # End-user documentation -│ ├── core/ -│ │ ├── index.php # REQUIRED — accessforbidden() guard -│ │ └── modules/ -│ │ ├── index.php # REQUIRED — accessforbidden() guard -│ │ └── mod{{MODULE_CLASS}}.class.php # Main module descriptor -│ ├── langs/ -│ │ ├── index.php # REQUIRED — accessforbidden() guard -│ │ └── en_US/ -│ │ ├── index.php # REQUIRED — accessforbidden() guard -│ │ └── {{MODULE_NAME}}.lang -│ ├── sql/ # Database schema -│ │ ├── index.php # REQUIRED — accessforbidden() guard -│ │ ├── llx_{{MODULE_NAME}}.sql -│ │ └── llx_{{MODULE_NAME}}.key.sql -│ ├── class/ # PHP class files -│ │ └── index.php # REQUIRED — accessforbidden() guard -│ └── lib/ # Library files -│ └── index.php # REQUIRED — accessforbidden() guard -├── docs/ # Technical documentation -├── scripts/ # Build and maintenance scripts -├── tests/ # Test suite -├── .gitea/ -│ ├── 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 -``` - -**Every directory inside `src/` MUST have an `index.php`** that either contains live code or calls Dolibarr's built-in `accessforbidden()` to block direct web access. Use this guard template for non-public directories (adjust the relative fallback path to match the directory depth from `htdocs/`): - -```php - - * SPDX-License-Identifier: GPL-3.0-or-later - * FILE INFORMATION / BRIEF: Directory access guard - */ -// Adjust relative path below per depth: mymodule/subdir/ uses ../../../main.inc.php -$res = 0; -if (!$res && !empty($_SERVER["DOCUMENT_ROOT"])) { - $res = @include $_SERVER["DOCUMENT_ROOT"]."/main.inc.php"; -} -if (!$res && file_exists("../../../main.inc.php")) { - $res = @include "../../../main.inc.php"; -} -if (!$res) { die("Include of main fails"); } -accessforbidden(); -``` - ---- - -## Module Descriptor Class Pattern - -The main module descriptor (`src/core/modules/mod{{MODULE_CLASS}}.class.php`) must follow this pattern: - -```php -db = $db; - $this->numero = {{MODULE_ID}}; // Unique module ID — do not change - $this->rights_class = '{{MODULE_NAME}}'; - $this->family = 'crm'; - $this->module_position = '50'; - $this->name = preg_replace('/^mod/i', '', get_class($this)); - $this->description = 'Description of {{MODULE_NAME}} module'; - $this->version = 'XX.YY.ZZ'; // Must match README.md version - $this->const_name = 'MAIN_MODULE_' . strtoupper($this->name); - $this->picto = 'object_favicon_256.png@mokocrm'; - $this->editor_name = 'Moko Consulting'; - $this->editor_url = 'https://mokoconsulting.tech'; // Must be an external online web site - $this->editor_squarred_logo = 'object_favicon_256.png@mokocrm'; - } -} -``` - -**Key rules for the module descriptor:** -- `$this->numero` is a globally unique ID registered in [module-registry.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/development/crm/module-registry.md) — **never change it**. -- `$this->version` must exactly match the version in `README.md`. -- Register new modules in the module registry before using any ID. - ---- - -## 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 }} -``` - -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. - ---- - -## mokocli Reference - -This repository is governed by [mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli). Authoritative policies: - -| Document | Purpose | -|----------|---------| -| [file-header-standards.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | -| [coding-style-guide.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | -| [branching-strategy.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | -| [merge-strategy.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR title/body conventions | -| [changelog-standards.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | -| [module-registry.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/development/crm/module-registry.md) | Dolibarr module ID registry — check before reserving a new ID | -| [crm-development-standards.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/crm/development-standards.md) | MokoCRM Dolibarr module development standards | - ---- - -## Naming Conventions - -| Context | Convention | Example | -|---------|-----------|---------| -| PHP class | `PascalCase` | `MyService` | -| PHP method / function | `camelCase` | `getUserData()` | -| PHP variable | `$snake_case` | `$module_name` | -| PHP constant | `UPPER_SNAKE_CASE` | `MAX_RETRIES` | -| PHP class file | `PascalCase.php` | `ApiClient.php` | -| PHP script file | `snake_case.php` | `check_health.php` | -| YAML workflow | `kebab-case.yml` | `ci-dolibarr.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 public PHP method | PHPDoc block; `docs/api/` index for that class | -| New or changed module version | Update `$this->version` in module descriptor; bump `README.md` | -| 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` | -| 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 change `$this->numero` (module ID) — it is permanently registered in the module registry -- 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 the module descriptor `$this->version` and `README.md` version go out of sync -- Never register a new module ID without first checking module-registry.md for the next available ID -- Never create a new directory inside `src/` without adding an `index.php` that calls `accessforbidden()` or contains live code diff --git a/templates/mokogitea/copilot-instructions.joomla.md.template b/templates/mokogitea/copilot-instructions.joomla.md.template deleted file mode 100644 index a9f213e..0000000 --- a/templates/mokogitea/copilot-instructions.joomla.md.template +++ /dev/null @@ -1,310 +0,0 @@ - - -> [!IMPORTANT] -> **🔧 AI Self-Update Required on First Use** -> -> This file may contain unfilled `{{TOKEN}}` placeholders. The mokocli 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** `.gitea/copilot-instructions.md` and `.gitea/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://git.mokoconsulting.tech/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 [mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli). 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 `updates.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) -├── updates.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 -├── .gitea/ -│ ├── 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 -``` - ---- - -## updates.xml — Required in Repo Root - -`updates.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 BOTH update servers: -```xml - - - https://git.mokoconsulting.tech/mokoconsulting-tech/{{REPO_NAME}}/raw/branch/main/updates.xml - - - https://raw.githubusercontent.com/mokoconsulting-tech/{{REPO_NAME}}/main/updates.xml - - -``` - -**Rules:** -- Every release must prepend a new `` block at the top of `updates.xml` — old entries must be preserved below. -- The `` in `updates.xml` must exactly match `` in `manifest.xml` and the version in `README.md`. -- `` must include two `` entries: Gitea release asset (primary) and GitHub release asset (mirror). -- `` — 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 `updates.xml`. -- Must include `` block pointing to this repo's `updates.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 }} -``` - ---- - -## mokocli Reference - -This repository is governed by [mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli). Authoritative policies: - -| Document | Purpose | -|----------|---------| -| [file-header-standards.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | -| [coding-style-guide.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | -| [branching-strategy.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | -| [merge-strategy.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR title/body conventions | -| [changelog-standards.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | -| [joomla-development-guide.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/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 `updates.xml` version; bump README.md version | -| New release | Prepend `` block to `updates.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, `updates.xml` version, and `README.md` version go out of sync - -## Update Server Priority -In , Gitea must be priority 1 and GitHub priority 2. Never reverse this. diff --git a/templates/mokogitea/copilot-instructions.md.template b/templates/mokogitea/copilot-instructions.md.template deleted file mode 100644 index eaa2eac..0000000 --- a/templates/mokogitea/copilot-instructions.md.template +++ /dev/null @@ -1,328 +0,0 @@ - - -> [!IMPORTANT] -> **🔧 AI Self-Update Required on First Use** -> -> This file may contain unfilled `{{TOKEN}}` placeholders. The mokocli 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** `.gitea/copilot-instructions.md` and `.gitea/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://git.mokoconsulting.tech/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 [mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli). 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 [mokocli coding-style-guide](https://git.mokoconsulting.tech/MokoConsulting/mokocli/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. - -### Badge Colors - -Each badge type has a designated color — no two types share the same color: - -| Badge | Color | Example | -|-------|-------|---------| -| Version | `blue` | `badge/version-XX.YY.ZZ-blue?logo=v` | -| License | `green` | `badge/license-GPL--3.0-green` | -| PHP | `777BB4` | `badge/PHP-8.2%2B-777BB4?logo=php` | -| Joomla | `red` | `badge/Joomla-5.x-red?logo=joomla` | -| Dolibarr | `red` | `badge/Dolibarr-20.x-red` | -| mokocli | `orange` | `badge/moko--platform-04.06.00-orange` | - ---- - -## 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - 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 mokocli enterprise library. The `composer.json` must include: - -```json -{ - "repositories": [ - { - "type": "vcs", - "url": "https://git.mokoconsulting.tech/MokoConsulting/mokocli" - } - ], - "require": { - "mokoconsulting/mokostandards": "^4.0" - } -} -``` - -Run `composer install` after adding the dependency. See [package-installation.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/guide/package-installation.md) for full instructions. - ---- - -## PHP Script Pattern - -All PHP scripts **must** extend `MokoCli\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 - -Approved prefixes: `dev/` · `alpha/` · `beta/` · `rc/` · `version/` · `copilot/` · `dependabot/` - -Pipeline: `dev → [alpha] → [beta] → rc → version/XX → main → dev` -- Alpha and beta are optional — dev can go straight to rc - -- `dev/XX.YY` or `dev/feature-name` — development (version optional) -- `alpha/XX.YY.ZZ` — early internal testing (optional, three-part required) -- `beta/XX.YY.ZZ` — broader external testing (optional, three-part required) -- `rc/XX.YY.ZZ` — release candidate (three-part required) -- `version/XX` — major version integration branch (major only, e.g., `version/04`) -- Release tags: `vXX` (major only — one release per major version) -- Pre-release tags: `development` · `alpha` · `beta` · `release-candidate` -- Patch `00` = development (no release), first release = `01` - -Examples: -- ✅ `dev/04.06` · `dev/new-dashboard` · `alpha/04.06.01` · `beta/04.06.01` · `rc/04.06.01` -- ❌ `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 `MokoCli\Enterprise\CliFramework` -- Never call `$script->run()` as the entry point — call `$script->execute()` -- Policy documents and guides must not be mixed - ---- - -## mokocli Reference - -This repository is governed by [mokocli](https://git.mokoconsulting.tech/MokoConsulting/mokocli). Authoritative policies: - -| Document | Purpose | -|----------|---------| -| [file-header-standards.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/file-header-standards.md) | Copyright-header rules for every file type | -| [coding-style-guide.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/coding-style-guide.md) | Naming and formatting conventions | -| [branching-strategy.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/branching-strategy.md) | Branch naming, hierarchy, and release workflow | -| [merge-strategy.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/merge-strategy.md) | Squash-merge policy and PR title/body conventions | -| [changelog-standards.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/changelog-standards.md) | How and when to update CHANGELOG.md | -| [scripting-standards.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/policy/scripting-standards.md) | PHP script requirements and CliFramework usage | -| [package-installation.md](https://git.mokoconsulting.tech/MokoConsulting/mokocli/blob/main/docs/guide/package-installation.md) | Installing `mokoconsulting/mokostandards` via Composer | diff --git a/templates/mokogitea/dependabot.yml.template b/templates/mokogitea/dependabot.yml.template deleted file mode 100644 index 6b7e0b2..0000000 --- a/templates/mokogitea/dependabot.yml.template +++ /dev/null @@ -1,151 +0,0 @@ -# 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: GitHub.Dependabot -# INGROUP: MokoPlatform.Security -# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli -# PATH: /templates/mokogitea/dependabot.yml.template -# VERSION: XX.YY.ZZ -# BRIEF: Template Dependabot configuration for governed repositories -# NOTE: Copy to .gitea/dependabot.yml and remove ecosystems that don't apply. -# Keep the github-actions entry — it is required for all governed repos. -# The templates/workflows entry only applies if your repo ships template -# workflow files (.yml) under templates/workflows/. -# .yml.template files are NOT scanned by Dependabot; update them manually. - -version: 2 -updates: - - # ------------------------------------------------------------------------- - # GitHub Actions — REQUIRED for all governed repositories - # Monitors uses: pins in .gitea/workflows/*.yml - # ------------------------------------------------------------------------- - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "monthly" - open-pull-requests-limit: 5 - labels: - - "dependencies" - - "security" - - "automated" - commit-message: - prefix: "chore(deps)" - include: "scope" - reviewers: - - "mokoconsulting-tech/maintainers" - assignees: - - "jmiller" - groups: - github-actions: - patterns: - - "*" - - # ------------------------------------------------------------------------- - # GitHub Actions — template workflows - # Include only if this repo ships template .yml files under templates/workflows/ - # Remove this block if templates/workflows/ does not exist in your repo. - # ------------------------------------------------------------------------- - # - package-ecosystem: "github-actions" - # directory: "/templates/workflows" - # schedule: - # interval: "monthly" - # open-pull-requests-limit: 5 - # labels: - # - "dependencies" - # - "security" - # - "automated" - # - "templates" - # commit-message: - # prefix: "chore(deps)" - # include: "scope" - # reviewers: - # - "mokoconsulting-tech/maintainers" - # assignees: - # - "jmiller" - # groups: - # github-actions-templates: - # patterns: - # - "*" - - # ------------------------------------------------------------------------- - # Composer — PHP repositories - # Remove this block if the repo has no composer.json - # ------------------------------------------------------------------------- - - package-ecosystem: "composer" - directory: "/" - schedule: - interval: "monthly" - open-pull-requests-limit: 5 - labels: - - "dependencies" - - "security" - - "automated" - - "php" - commit-message: - prefix: "chore(deps)" - include: "scope" - reviewers: - - "mokoconsulting-tech/maintainers" - assignees: - - "jmiller" - groups: - composer-dependencies: - patterns: - - "*" - - # ------------------------------------------------------------------------- - # npm — Node.js / JavaScript repositories - # Remove this block if the repo has no package.json - # ------------------------------------------------------------------------- - # - package-ecosystem: "npm" - # directory: "/" - # schedule: - # interval: "monthly" - # open-pull-requests-limit: 5 - # labels: - # - "dependencies" - # - "security" - # - "automated" - # - "javascript" - # commit-message: - # prefix: "chore(deps)" - # include: "scope" - # reviewers: - # - "mokoconsulting-tech/maintainers" - # assignees: - # - "jmiller" - # groups: - # npm-dependencies: - # patterns: - # - "*" - - # ------------------------------------------------------------------------- - # pip — Python repositories - # Remove this block if the repo has no requirements.txt / pyproject.toml - # ------------------------------------------------------------------------- - # - package-ecosystem: "pip" - # directory: "/" - # schedule: - # interval: "monthly" - # open-pull-requests-limit: 5 - # labels: - # - "dependencies" - # - "security" - # - "automated" - # - "python" - # commit-message: - # prefix: "chore(deps)" - # include: "scope" - # reviewers: - # - "mokoconsulting-tech/maintainers" - # assignees: - # - "jmiller" - # groups: - # python-dependencies: - # patterns: - # - "*" diff --git a/templates/mokogitea/override.tf.template b/templates/mokogitea/override.tf.template deleted file mode 100644 index 3f50b2b..0000000 --- a/templates/mokogitea/override.tf.template +++ /dev/null @@ -1,114 +0,0 @@ -# Repository Health Check Override Configuration -# Location: .gitea/override.tf -# -# This file allows repository-specific customization of health checks. -# It overrides the default configuration from mokocli. -# -# AUTO-GENERATED: This file is automatically synced from mokocli -# To customize: Edit this file and it will be preserved on future syncs - -locals { - # Repository-specific metadata - override_metadata = { - repository_name = "REPOSITORY_NAME_PLACEHOLDER" - repository_type = "REPOSITORY_TYPE_PLACEHOLDER" # Options: generic, nodejs, terraform, joomla, dolibarr, standards - override_reason = "Repository-specific health check customization" - last_updated = "AUTO_UPDATED" - auto_synced = true - } - - # Disable specific checks (by check ID) - # Uncomment and add check IDs to disable them - disabled_checks = [ - # Example: "npm-publish-workflow", - # Example: "deployment-secrets-documented", - # Example: "terraform-docs-generation", - ] - - # Adjust point values for specific checks - # Uncomment and modify to change point values - custom_point_values = { - # Example: "ci-workflow-present" = 10 # Increase from default - # Example: "security-scan" = 15 - # Example: "branch-protection-enabled" = 8 - } - - # Custom category point adjustments - # Uncomment to override entire category point totals - custom_category_points = { - # Example: ci_cd_status = 20 - # Example: security = 25 - # Example: workflows = 15 - } - - # Custom threshold percentages - # Uncomment to adjust pass/fail thresholds - custom_thresholds = { - # excellent = 95 # Default: 90 - # good = 80 # Default: 70 - # fair = 60 # Default: 50 - # poor = 0 # Default: 0 - } - - # Additional repository-specific checks - # Add custom checks unique to this repository - additional_checks = { - # Example custom check: - # custom_database_migration = { - # id = "custom-database-migration" - # name = "Database Migration Scripts" - # description = "Check for database migration scripts" - # points = 5 - # check_type = "directory-exists" - # category = "required-folders" - # required = false - # remediation = "Add database migration scripts" - # parameters = { - # directory_path = "db/migrations" - # } - # } - } - - # File sync exclusions - # Files to exclude from automatic sync - sync_exclusions = [ - # Example: ".gitea/workflows/custom-workflow.yml", - # Example: ".gitea/ISSUE_TEMPLATE/custom-template.md", - ] - - # Protected files - # Files that should never be overwritten by sync - protected_files = [ - # Example: ".gitea/workflows/deployment.yml", - # Example: "scripts/release/custom-release.sh", - ] -} - -# Export overrides for consumption by health check validation -output "health_check_overrides" { - description = "Repository-specific health check overrides" - value = { - metadata = local.override_metadata - disabled_checks = local.disabled_checks - custom_points = local.custom_point_values - custom_categories = local.custom_category_points - custom_thresholds = local.custom_thresholds - additional_checks = local.additional_checks - sync_exclusions = local.sync_exclusions - protected_files = local.protected_files - } -} - -# Override configuration summary -output "override_summary" { - description = "Summary of active overrides" - value = { - total_disabled_checks = length(local.disabled_checks) - total_custom_points = length(local.custom_point_values) - total_custom_categories = length(local.custom_category_points) - total_additional_checks = length(local.additional_checks) - total_sync_exclusions = length(local.sync_exclusions) - total_protected_files = length(local.protected_files) - has_custom_thresholds = length(local.custom_thresholds) > 0 - } -} diff --git a/templates/mokogitea/renovate.json b/templates/mokogitea/renovate.json deleted file mode 100644 index f1f37eb..0000000 --- a/templates/mokogitea/renovate.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:recommended", - ":automergeMinor", - ":automergeDigest", - ":semanticCommits", - ":label(dependencies)" - ], - "schedule": ["before 6am on Monday"], - "timezone": "America/Chicago", - "packageRules": [ - { - "matchPackagePatterns": ["*"], - "groupName": "all dependencies", - "groupSlug": "all" - }, - { - "matchDepTypes": ["devDependencies"], - "automerge": true - }, - { - "matchUpdateTypes": ["major"], - "automerge": false, - "labels": ["breaking-change", "dependencies"] - } - ], - "php": { - "enabled": true - }, - "composer": { - "enabled": true - }, - "vulnerabilityAlerts": { - "enabled": true, - "labels": ["security"] - } -} diff --git a/templates/repos/Template-Client b/templates/repos/Template-Client deleted file mode 160000 index ea812e0..0000000 --- a/templates/repos/Template-Client +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ea812e081762b3a7db00f13178c522d894954f0f diff --git a/templates/repos/Template-Generic b/templates/repos/Template-Generic deleted file mode 160000 index 1964c36..0000000 --- a/templates/repos/Template-Generic +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1964c36ffeae26e102b541124f25970f17d6b5f2 diff --git a/templates/repos/Template-Joomla b/templates/repos/Template-Joomla deleted file mode 160000 index 0f52a81..0000000 --- a/templates/repos/Template-Joomla +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0f52a816924156f689a4ffc95317af0f0778b158 diff --git a/templates/repos/Template-MCP b/templates/repos/Template-MCP deleted file mode 160000 index a5d777c..0000000 --- a/templates/repos/Template-MCP +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a5d777c62fce3d6f75eb4fc9713b70f9e597740f diff --git a/templates/required/README.md b/templates/required/README.md deleted file mode 100644 index 18e1faa..0000000 --- a/templates/required/README.md +++ /dev/null @@ -1,170 +0,0 @@ - - -# Required Templates - -This directory contains **REQUIRED** files that must be present in all mokocli-compliant repositories. - -## Overview - -Required templates are essential files that provide core functionality and ensure consistency across all repositories in the organization. These files must be copied to target repositories and kept synchronized with mokocli updates. - -## Required Files - -### 1. setup-labels.sh - -**Status**: ✅ REQUIRED -**Target Location**: `scripts/maintenance/setup-labels.sh` -**Purpose**: Deploy standardized GitHub labels to repository - -**Installation**: -```bash -# Quick install -curl -fsSL https://raw.githubusercontent.com/MokoConsulting/mokocli/main/templates/required/setup-labels.sh > scripts/maintenance/setup-labels.sh -chmod +x scripts/maintenance/setup-labels.sh - -# Or copy from mokocli -cp /path/to/mokocli/templates/required/setup-labels.sh scripts/maintenance/setup-labels.sh -chmod +x scripts/maintenance/setup-labels.sh -``` - -**Usage**: -```bash -# Preview labels (dry-run) -./scripts/maintenance/setup-labels.sh --dry-run - -# Deploy labels -./scripts/maintenance/setup-labels.sh -``` - -**Features**: -- 46 standard labels across 8 categories -- Project types (joomla, dolibarr, generic) -- Languages (php, javascript, typescript, python, css, html) -- Components (documentation, ci-cd, docker, tests, security, dependencies, config, build) -- Workflow (automation, mokocli, needs-review, work-in-progress, breaking-change) -- Priority (critical, high, medium, low) -- Type (bug, feature, enhancement, refactor, chore) -- Status (pending, in-progress, blocked, on-hold, wontfix) -- Size (xs, s, m, l, xl, xxl) -- Health (excellent, good, fair, poor) - -**Requirements**: -- GitHub CLI (gh) installed -- Authenticated with GitHub CLI -- Admin access to repository - -**Validation**: -```bash -# Check if present -[ -f scripts/maintenance/setup-labels.sh ] && echo "✅ Present" || echo "❌ Missing" - -# Check if executable -[ -x scripts/maintenance/setup-labels.sh ] && echo "✅ Executable" || echo "❌ Not executable" - -# Verify labels deployed -gh label list | wc -l # Should show 46+ labels -``` - -## Compliance Checking - -### Check Repository Compliance - -```bash -# Check if all required files are present -required_files=( - "scripts/maintenance/setup-labels.sh" -) - -for file in "${required_files[@]}"; do - if [ -f "$file" ]; then - echo "✅ $file" - else - echo "❌ $file - MISSING" - fi -done -``` - -### Automated Compliance - -Use the mokocli validation scripts: - -```bash -# From mokocli repository -python3 scripts/validate/validate_repo_health.py --check-required-files - -# Or use bulk validation -php scripts/automation/bulk_update_repos.php --validate-only -``` - -## Syncing Updates - -Required files should be kept in sync with mokocli: - -```bash -# Update single file -curl -fsSL https://raw.githubusercontent.com/MokoConsulting/mokocli/main/templates/required/setup-labels.sh > scripts/maintenance/setup-labels.sh - -# Or use bulk sync -cd /path/to/mokocli -./scripts/automation/bulk_update_repos.sh --org MokoConsulting --sync-required -``` - -## Using with GitHub Copilot - -To deploy required files to a repository using GitHub Copilot: - -```markdown -Deploy required mokocli files to this repository. - -Required files to deploy: -1. setup-labels.sh - Label deployment script - -Process: -1. Create scripts/maintenance/ directory if not exists -2. Download setup-labels.sh from MokoConsulting/mokocli -3. Copy to scripts/maintenance/setup-labels.sh -4. Make executable: chmod +x scripts/maintenance/setup-labels.sh -5. Test with dry-run: ./scripts/maintenance/setup-labels.sh --dry-run -6. Deploy labels: ./scripts/maintenance/setup-labels.sh -7. Verify labels in repository settings - -Source: https://git.mokoconsulting.tech/MokoConsulting/mokocli/tree/main/templates/required -``` - -## Future Required Files - -As mokocli evolves, additional required files may be added: - -- **PLANNED**: `.github/labeler.yml` - Auto-labeling configuration -- **PLANNED**: `.editorconfig` - Editor configuration -- **PLANNED**: `scripts/validate/check_compliance.sh` - Standards compliance checker -- **PLANNED**: `.github/workflows/standards-check.yml` - Automated standards validation - -## Support - -- **Documentation**: [Copilot Sync Standards Guide](../../docs/guide/copilot-sync-standards.md) -- **Label Guide**: [Label Deployment Guide](../../docs/guides/label-deployment.md) -- **Issues**: https://git.mokoconsulting.tech/MokoConsulting/mokocli/issues -- **Contact**: hello@mokoconsulting.tech - -## Related Documentation - -- [Copilot Sync Standards Guide](../../docs/guide/copilot-sync-standards.md) -- [Label Deployment Guide](../../docs/guides/label-deployment.md) -- [Bulk Repository Updates](../../docs/guide/bulk-repository-updates.md) -- [Template Catalog](../README.md) - ---- - -**Last Updated**: 2026-01-28 -**Version**: 03.01.00 -**Maintained By**: mokocli Team diff --git a/templates/schemas/README.md b/templates/schemas/README.md deleted file mode 100644 index cabd2f5..0000000 --- a/templates/schemas/README.md +++ /dev/null @@ -1,83 +0,0 @@ - - -# Repository Structure Schemas - -This directory contains template schema files for defining custom repository structures. - -## Overview - -Schema files define the expected structure, files, and directories for different types of repositories in the Moko Consulting ecosystem. - -## Available Schemas - -### template-repository-structure.xml - -A base template schema that can be customized for new repository types. This template includes: - -- Required root-level files (README, LICENSE, CHANGELOG, etc.) -- Core directory structure (docs, scripts, .github) -- Basic GitHub Actions workflow requirements -- Documentation standards - -## Usage - -To create a custom schema: - -1. Copy `template-repository-structure.xml` to your desired location -2. Update the `` section with your repository type details -3. Customize the `` and `` sections -4. Reference appropriate templates from the `/templates/` directory -5. Save with a descriptive name (e.g., `my-project-type.xml`) - -## Schema Structure - -Each schema file contains: - -- **Metadata**: Repository type, platform, maintainer information -- **Root Files**: Required files in the repository root -- **Directories**: Required and optional directory structure -- **Files within Directories**: Specific files expected in each directory - -## Requirement Status Values - -- `required`: Must be present -- `suggested`: Recommended but optional -- `optional`: Nice to have -- `not-allowed`: Should not be present - -## Template References - -Use the `