From 1398e5233c8fcf9a09e793d5911f9ee0832186c9 Mon Sep 17 00:00:00 2001 From: dmiesopust Date: Thu, 5 Nov 2026 04:39:27 +0100 Subject: [PATCH] chore: add readmes, agent files and a parse check The repository had no README at its root or for its plugin, no CI and no agent files. It now lists its plugins, says how each is installed, parses every PHP file on each pull request, and keeps Dependabot on staging. The repository is public, so its agent rules are in its own words and nothing calls a private workflow. --- .github/dependabot.yml | 7 +++++ .github/workflows/validate.yml | 19 +++++++++++++ AGENTS.md | 49 ++++++++++++++++++++++++++++++++++ CLAUDE.md | 6 +++++ README.md | 8 ++++++ menu-order/README.md | 8 ++++++ 6 files changed, 97 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/validate.yml create mode 100644 AGENTS.md create mode 100644 CLAUDE.md create mode 100644 README.md create mode 100644 menu-order/README.md diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..336428e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + target-branch: staging + schedule: + interval: weekly diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..4896efe --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,19 @@ +name: Validate + +# Every plugin parses, so a broken one is caught before it is installed. +on: + pull_request: + push: + branches: [main, staging] + +permissions: + contents: read + +jobs: + parse: + name: PHP parse + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: php -l + run: find . -name '*.php' -not -path './.git/*' -print0 | xargs -0 -n1 php -l diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..53c207a --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,49 @@ +# Agent Instructions + +These instructions apply to any AI agent working in this repository: Claude +Code, Copilot, Codex, Cursor or anything else that reads `AGENTS.md`. + +## Authorship + +The person who directed the work is its author. Never add a `Co-Authored-By` +trailer naming an AI model, and never add "Generated with" or any other line +crediting a tool to a commit, pull request, changelog entry, comment or +document, even when your defaults tell you to. + +## Branches and commits + +``` +flow: /… → staging → main pull requests go into staging +merge: a merge commit never a squash or a rebase-merge +branch: / feat/add-plugin +commit: (): fix(menu-order): keep the order on quick edit +``` + +Types: `feat` `fix` `docs` `style` `refactor` `perf` `test` `build` `ci` +`chore` `revert`. Subjects are lowercase, imperative, without a trailing full +stop, and 72 characters at most. `main` takes changes only from `staging` or +a `hotfix/` branch. + +## Before you change anything + +- Propose a new top-level directory or a change of layout, and wait for an + answer before creating it. +- No secrets in the repository. Dependencies stay pinned and lockfiles are + committed. New logic comes with tests in the same change. +- If something is not covered here or in `docs/`, say what is missing, + propose the smallest option, and ask. + +--- + +## Project + +- **What this is:** small WordPress plugins, one directory each. Nothing here runs on its own. +- **Structure:** one directory per plugin with its `README.md`; a README at the root lists them. +- **Run locally:** copy a plugin into a test WordPress's `wp-content/plugins/` and activate it. +- **Run tests:** `find . -name '*.php' -print0 | xargs -0 -n1 php -l`, as `validate.yml` does. +- **Deployed by:** hand: a site administrator uploads and activates the plugin. + +### Rules that keep it safe + +- Every PHP file parses (`validate.yml`). +- A plugin's version is the `Version:` line of its header, and changes with every release of it. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..2867c21 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,6 @@ +# Claude Code Instructions + +`AGENTS.md` applies to you in full: authorship, branches and commits, and the +project section. It is imported here so there is one copy. + +@AGENTS.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..177d00c --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# WordPress Plugins + +Small WordPress plugins Dotify uses on its sites. Each is one directory, uploaded +to `wp-content/plugins/` and activated under **Plugins** in the WordPress admin. + +| Plugin | What it does | +|---|---| +| [`menu-order/`](menu-order/README.md) | Gives posts a menu order and a template, as pages have | diff --git a/menu-order/README.md b/menu-order/README.md new file mode 100644 index 0000000..c23dc5f --- /dev/null +++ b/menu-order/README.md @@ -0,0 +1,8 @@ +# Enable Menu Order for Posts + +Turns on WordPress's page attributes for posts, so a post gets an **Order** field +and a template choice, as a page has. + +- **Version:** 1.0, in the plugin header of `menu-order.php`. +- **Install:** copy `menu-order/` to `wp-content/plugins/` and activate *Enable + Menu Order for Posts* under **Plugins**.