Add CLAUDE.md with codebase orientation for AI assistants - #2
Closed
Shubochandrosarker wants to merge 1 commit into
Closed
Add CLAUDE.md with codebase orientation for AI assistants#2Shubochandrosarker wants to merge 1 commit into
Shubochandrosarker wants to merge 1 commit into
Conversation
Documents the plugin's architecture, the conventions that are not discoverable from a single file, and the workflows CI enforces. The parts worth writing down are the ones that silently break work: there is no autoloader (a new class is inert until it is added to Plugin::load_dependencies()), schema changes need three coordinated edits plus a DB-version bump, settings are one array option behind memberistic_get_setting(), the admin apps are hand-written wp.element with no build step, and two test suites assert against the source to stop seeded plans, partner branding, or a PMPro dependency coming back. Also records the release checklist (the version string lives in five places, none of them checked by CI) and which docs a behaviour change is expected to update. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WEEDSfVaCP1Z5wBv1SR2uZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
CLAUDE.mdat the repository root: a single orientation document for AI assistants (and new contributors) covering the plugin's structure, its development workflows, and the conventions that aren't discoverable from any one file.There was no existing
CLAUDE.md, so this is a new file. Nothing else in the repository changes.What it documents
Commands and CI.
composer install+vendor/bin/phpunit -c phpunit.xml, plus the exactphp -landnode --checkinvocations CI runs. Notes thatcomposer testaborts under root (Composer refuses to load plugins as super-user) and that thephpcsjob is advisory and always exits 0 — so a green phpcs proves nothing.Layout. A directory map of
includes/(database, rest, admin, frontend, waivers, integrations, payments, corporate, cli, utilities),assets/,templates/,docs/, andtests/.The parts that silently break work:
Plugin::load_dependencies()is a hand-orderedrequire_oncearray of ~70 files; a new class is inert until it's added there.Schema::create_tables(), an idempotent migration returningtrue, and aMEMBERISTIC_DB_VERSIONbump with registration inMigrations::migrations().memberistic_get_setting(), with Stripe secrets lockable bywp-config.phpconstants and never returned in plain text over REST.memberistic/v1, mandatorypermission_callback,__return_truebanned, and whypii_permissions_check()is deliberately narrower than the admin check. Webhooks authenticate by signature before parsing.administrator.wp.elementwith no JSX and no build output; conditional per-screen enqueueing and thewindow.memberistic*Settingshandoff. Frontend assets load only on pages that need them, so a new shortcode needs adding to that list.Schedulercron hooks, and the four WP-CLI commands.Guard tests.
FreshInstallDefaultsTestandPmproRemovalTestassert against the source files rather than behaviour, and will fail a change that reintroduces seeded plans, partner branding, or a PMPro dependency. Also explains thattests/bootstrap.phpruns with no live WordPress and loads only two production files, so testing anything else means extending the stubs.Code style. WordPress Coding Standards (tabs, Yoda,
array()), the sanitize/escape/nonce helpers, i18n requirements, and the codebase's most distinctive habit — comments that explain the reasoning and the failure mode avoided, not the mechanics.Release checklist. The version string lives in five places and CI checks none of them.
Doc sync table. Which of
docs/HOOKS.md,docs/INTEGRATIONS.md,docs/entitlements.md,README.md,CHANGELOG.md, andreadme.txta given kind of change is expected to update.Verification
vendor/bin/phpunit -c phpunit.xml— OK (47 tests, 831 assertions)class-plugin.php,Migrations/Schema,Capabilities,REST_Controller,Integrations_Registry,Scheduler,helpers.php, the CLI registrations, and both guard tests.Generated by Claude Code