Skip to content

feat: optimized workflow setup (wordcamp leipzig)#39

Draft
apermo wants to merge 19 commits into
mainfrom
wordcamp-leipzig
Draft

feat: optimized workflow setup (wordcamp leipzig)#39
apermo wants to merge 19 commits into
mainfrom
wordcamp-leipzig

Conversation

@apermo
Copy link
Copy Markdown
Owner

@apermo apermo commented May 8, 2026

Summary

This PR sets up a complete modern development pipeline for the plugin, recorded as a step-by-step screencast for WordCamp Leipzig. It is built up across 12 atomic commits — each with its own step-NN-slug tag for easy checkout during the talk.

The narrative arc: without tests + a pre-commit pipeline, AI ships plausible but subtly wrong code; with them, AI's mistakes are caught the moment they land.

The plan documents (reusable for your own projects)

The first commit on this branch (tag step--00-plan) introduces a bilingual, self-contained guide. The repository ends up with the exact pipeline this guide describes — but the guide itself is the reusable artifact:

Reusing the plan in your own project: copy whichever language version into your own repo, search-and-replace apermo-adminbar<your-plugin-slug>, adjust the PHP/WP version targets and the <file>/paths: entries to match your source tree, then point any AI assistant (or a human pair) at the file. The guide enforces atomic commits, per-step tags, and a pause-after-each-step protocol — so you can stop, review, and resume at any point.

Steps in this PR

# Tag Adds
step--00-plan Bilingual step-by-step guide in docs/optimized-workflow-{en,de}.md
00 step-00-bootstrap composer.json, package.json, .gitignore, .editorconfig
01 step-01-ddev DDEV config + custom orchestrate command (inpsyde-style)
02 step-02-phpcs WordPress Coding Standards via PHPCS
03 step-03-phpstan PHPStan + szepeviktor/phpstan-wordpress
04 step-04-eslint @wordpress/eslint-plugin
05 step-05-commitlint @commitlint/cli + conventional config
06 step-06-husky-lintstaged Husky pre-commit + commit-msg hooks via lint-staged
07 step-07-phpunit PHPUnit + Brain Monkey + Mockery (no WP runtime)
08 step-08-playwright Playwright e2e against the local DDEV install
09 step-09-github-actions Custom CI workflow (PHPCS / PHPStan / ESLint / PHPUnit)
10 step-10-plugin-check WordPress/plugin-check-action reusable workflow

Each commit is independently checkout-able (git checkout step-04-eslint) so the audience can follow along at any point during the screencast.

Decisions

  • PHP / WP target: PHP 8.1+ / WP 6.4+
  • Pre-commit tool: Husky + lint-staged
  • Unit tests: Brain Monkey + Mockery (no WP runtime — fast feedback for the AI demo)
  • Code: tooling only — existing plugin PHP stays untouched, so the linters surface real legacy findings for the AI-fix demo
  • Languages: the guide ships in EN and DE; each pins the assistant's reply language for runs

Test plan

  • Each step's verification commands pass (or fail in the documented expected way)
  • Each step produces exactly one atomic commit with the conventional-commit subject from the guide
  • Each step is tagged with its step-NN-slug and the tag is pushed to origin
  • PHPCS, PHPStan, ESLint, PHPUnit, and Playwright all runnable locally after their respective steps
  • CI (step 09) and plugin-check (step 10) workflows show green on GitHub
  • Both docs/optimized-workflow-en.md and docs/optimized-workflow-de.md stay in lock-step structurally as steps land

Zusammenfassung (Deutsch)

Dieser PR baut eine vollständige, moderne Entwicklungs-Pipeline für das Plugin auf, dokumentiert als Schritt-für-Schritt-Screencast für das WordCamp Leipzig. Aufgeteilt in 12 atomare Commits — jeder mit eigenem step-NN-slug-Tag, damit man im Vortrag an beliebiger Stelle einsteigen kann.

Roter Faden des Vortrags: Ohne Tests und Pre-Commit-Pipeline liefert die KI plausibel aussehenden, aber subtil falschen Code; mit ihnen werden die Fehler im Moment des Auftretens gefangen.

Die Plan-Dokumente (für eigene Projekte wiederverwendbar)

Der erste Commit auf diesem Branch (Tag step--00-plan) führt eine zweisprachige, in sich geschlossene Anleitung ein. Das Repo bekommt am Ende exakt die Pipeline, die die Anleitung beschreibt — die Anleitung selbst ist aber das eigentlich wiederverwendbare Artefakt:

Plan im eigenen Projekt nachnutzen: Eine der beiden Sprachversionen ins eigene Repo kopieren, apermo-adminbar<dein-plugin-slug> global ersetzen, PHP/WP-Versionsziele und die <file>-/paths:-Einträge an den eigenen Source-Tree anpassen, dann eine KI (oder ein Pair) auf die Datei zeigen lassen. Die Anleitung erzwingt atomare Commits, Per-Step-Tags und ein Pause-nach-jedem-Schritt-Protokoll — du kannst jederzeit stoppen, prüfen und weitermachen.

Schritte in diesem PR

# Tag Bringt
step--00-plan Zweisprachige Schritt-für-Schritt-Anleitung in docs/optimized-workflow-{en,de}.md
00 step-00-bootstrap composer.json, package.json, .gitignore, .editorconfig
01 step-01-ddev DDEV-Config + eigener orchestrate-Befehl (inpsyde-Stil)
02 step-02-phpcs WordPress Coding Standards via PHPCS
03 step-03-phpstan PHPStan + szepeviktor/phpstan-wordpress
04 step-04-eslint @wordpress/eslint-plugin
05 step-05-commitlint @commitlint/cli + Conventional-Config
06 step-06-husky-lintstaged Husky-Hooks (pre-commit + commit-msg) via lint-staged
07 step-07-phpunit PHPUnit + Brain Monkey + Mockery (keine WP-Runtime)
08 step-08-playwright Playwright-E2E gegen die lokale DDEV-Installation
09 step-09-github-actions Eigener CI-Workflow (PHPCS / PHPStan / ESLint / PHPUnit)
10 step-10-plugin-check WordPress/plugin-check-action Reusable Workflow

Entscheidungen

  • PHP / WP-Ziel: PHP 8.1+ / WP 6.4+
  • Pre-Commit-Tool: Husky + lint-staged
  • Unit-Tests: Brain Monkey + Mockery (keine WP-Runtime — schnelles Feedback für die KI-Demo)
  • Code: nur Tooling — bestehender Plugin-PHP-Code bleibt unangetastet, damit die Linter echte Legacy-Funde für die KI-Fix-Demo liefern
  • Sprachen: die Anleitung gibt es in EN und DE; jede pinnt die Antwortsprache des Assistenten für den Lauf

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces comprehensive German and English guides for a modern WordPress development workflow, covering environment setup, linting, testing, and CI/CD. The review feedback identified several opportunities for improvement: replacing local user paths with generic home directory references, removing unused helper scripts from the documentation lists, and optimizing the lint-staged configuration to avoid inefficient globbing. Additionally, it was suggested to use relative paths in Playwright tests to leverage the configured baseURL for better maintainability.

Comment thread docs/optimized-workflow-de.md Outdated
Comment thread docs/optimized-workflow-de.md Outdated
Comment thread docs/optimized-workflow-de.md Outdated
Comment thread docs/optimized-workflow-de.md Outdated
Comment thread docs/optimized-workflow-en.md Outdated
Comment thread docs/optimized-workflow-en.md Outdated
Comment thread docs/optimized-workflow-en.md Outdated
Comment thread docs/optimized-workflow-en.md
@apermo apermo changed the title docs: add wordcamp leipzig screencast plan feat: optimized workflow setup (wordcamp leipzig) May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant