# AI Assistant Guide for WordPress Plugin Development This guide helps AI assistants understand the project structure, workflows, and best practices for this repository. ## Project Overview - **Plugin Name**: Fix 'Plugin file does not exist' Notices - **Repository**: https://github.com/wpallstars/wp-fix-plugin-does-not-exist-notices - **Description**: Adds missing plugins to your plugins list with a "Remove Notice" action link, allowing you to safely clean up invalid plugin references. This plugin helps users clean up references to deleted plugins that cause "Plugin file does not exist" errors in the WordPress admin. It adds missing plugins to the plugins list with a "Remove Notice" link to safely remove invalid plugin entries. ## AI Workflows Detailed workflow documentation is available in the `.ai-workflows/` directory: - **@.ai-workflows/bug-fixing.md**: Guidelines for identifying and fixing bugs - **@.ai-workflows/code-review.md**: Standards for reviewing code changes - **@.ai-workflows/dev-prefs-memory.md**: Persistent memory of developer preferences - **@.ai-workflows/feature-development.md**: Process for developing new features - **@.ai-workflows/folder-structure.md**: Documentation of the plugin's folder structure and naming conventions - **@.ai-workflows/git-workflow.md**: Detailed git workflow and branch management guidelines - **@.ai-workflows/incremental-development.md**: Time-efficient approach for incremental development and testing - **@.ai-workflows/local-env-vars.md**: Local development environment paths and URLs - **@.ai-workflows/release-process.md**: Steps for preparing and publishing releases - **@.ai-workflows/wiki-documentation.md**: Guidelines for maintaining wiki documentation ## Version Management We follow [Semantic Versioning](https://semver.org/): - **MAJOR.MINOR.PATCH** (e.g., 2.2.2) - **MAJOR**: Breaking changes - **MINOR**: New features, non-breaking - **PATCH**: Bug fixes, non-breaking ### Time-Efficient Development Workflow For efficient development and testing: - Create descriptive branches (**fix/**, **feature/**, **patch/**, **refactor/**) without version numbers - **Don't update version numbers** during initial development and testing - Only create **version branches** (v2.2.3) and update version numbers when changes are confirmed working - Use **patch** increments for bug fixes, **minor** for features, and **major** for breaking changes - Mark versions as **stable** when confirmed working by the user - See **@.ai-workflows/incremental-development.md** for detailed guidelines When updating version numbers, see **@.ai-workflows/release-process.md** for the complete checklist. **IMPORTANT**: Always keep the changelogs in README.md, readme.txt, and CHANGELOG.md in sync to avoid confusion. All three files must be updated with the same changes for each release. ## Git Workflow Detailed git workflow documentation is available in **@.ai-workflows/git-workflow.md**. ### Key Principles - Always pull the latest main branch from origin before creating new branches (mandatory step) - Create one branch per issue/feature (fix/patch/feature) - Submit one pull/merge request per issue - Run CI/CD checks for each pull request - Create separate branches for suggested improvements outside the current issue ### Branch Naming Convention - Feature branches: `feature/descriptive-name` - Bug fix branches: `fix/issue-description` or `fix/issue-number-description` - Patch branches: `patch/descriptive-name` - Release branches: `v{MAJOR}.{MINOR}.{PATCH}` ### Commit Message Guidelines - Use present tense ("Add feature" not "Added feature") - Start with a verb - Keep the first line under 50 characters - Reference issues when relevant: "Fix #123: Resolve plugin detection issue" ## Remote Repositories The plugin is hosted on multiple repositories: - GitHub: https://github.com/wpallstars/wp-fix-plugin-does-not-exist-notices - Gitea: https://gitea.wpallstars.com/wpallstars/wp-fix-plugin-does-not-exist-notices - WordPress.org: https://wordpress.org/plugins/wp-fix-plugin-does-not-exist-notices/ Always push changes to all remotes to keep them in sync. ## Git Updater Integration The plugin integrates with Git Updater to allow updates directly from GitHub or Gitea. Important notes: 1. Git Updater reads version information from the readme.txt file in the main branch, not from tags or releases 2. Always merge release changes to the main branch immediately after creating a tag 3. The plugin includes proper headers for Git Updater in the main plugin file See **@.ai-workflows/release-process.md** for detailed Git Updater integration steps. ## Testing Guidelines Before releasing: 1. Test with the latest WordPress version 2. Test with PHP 7.0+ (minimum supported version) 3. Verify all features work as expected 4. Check for any PHP warnings or notices Local environment variables and paths are documented in **@.ai-workflows/local-env-vars.md**. ## Developer Preferences AI assistants should maintain a record of developer preferences in **@.ai-workflows/dev-prefs-memory.md**. When you learn about a new preference through user feedback or conversation: 1. Check if the preference is already documented 2. If not, add it to the appropriate section in the dev-prefs-memory.md file 3. Reference these preferences in future interactions This ensures consistency across coding sessions and reduces the need for developers to repeatedly explain their preferences. ## Wiki Documentation The plugin has a GitHub wiki that is automatically synced from the `.wiki` directory in the repository. When making changes to the codebase, it's important to keep the wiki documentation up-to-date. ### Key Principles - **Documentation Synchronization**: Ensure that README.md, readme.txt, and wiki documentation are kept in sync - **Feature Documentation**: Document new features, hooks, and filters in all relevant places - **Code Structure Documentation**: Update technical documentation when changing code structure - **Automatic Syncing**: Changes to the `.wiki` directory are automatically synced to the GitHub wiki For detailed guidelines on maintaining wiki documentation, see **@.ai-workflows/wiki-documentation.md**. **IMPORTANT**: When updating features, functions, hooks, or code structure, always check if the wiki documentation needs to be updated as well. This ensures that users have access to accurate and up-to-date information. ## Common Tasks For detailed instructions on common tasks like creating releases, adding features, fixing bugs, and testing previous versions, see **@.ai-workflows/release-process.md**.