Add documentation for working in multi-repository workspaces to prevent feature hallucination

This commit is contained in:
2025-04-17 04:25:30 +01:00
parent 81ca661b75
commit eb711db17d
5 changed files with 192 additions and 10 deletions

View File

@ -2,6 +2,14 @@
This guide helps AI assistants understand the project structure, workflows, and best practices for this repository.
## IMPORTANT: Repository Context
This workspace may contain multiple repository folders. Always focus ONLY on the current repository you're working in and avoid hallucinating functionality from other repositories in the workspace.
- **Current Repository**: wp-fix-plugin-does-not-exist-notices
- **Repository Purpose**: Adds missing plugins to your plugins list with a "Remove Notice" action link, allowing you to safely clean up invalid plugin references
- **Repository Scope**: All code changes, documentation, and functionality discussions should be limited to THIS repository only
## Project Overview
- **Plugin Name**: Fix 'Plugin file does not exist' Notices
@ -23,7 +31,6 @@ Detailed workflow documentation is available in the `.ai-workflows/` directory:
- **@.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
@ -109,20 +116,21 @@ AI assistants should maintain a record of developer preferences in **@.ai-workfl
This ensures consistency across coding sessions and reduces the need for developers to repeatedly explain their preferences.
## Wiki Documentation
## Avoiding Cross-Repository Confusion
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.
When working in a multi-repository workspace, follow these guidelines to avoid confusion:
### Key Principles
1. **Verify Repository Context**: Always check which repository you're currently working in before making any changes or recommendations.
- **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
2. **Limit Code Search Scope**: When searching for code or functionality, explicitly limit your search to the current repository.
For detailed guidelines on maintaining wiki documentation, see **@.ai-workflows/wiki-documentation.md**.
3. **Don't Assume Features**: Never assume that features present in one repository should be implemented in another. Each repository has its own specific purpose and feature set.
**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.
4. **Repository-Specific Documentation**: Documentation should only reflect the actual features and functionality of the current repository.
5. **Cross-Repository Inspiration**: If you want to implement a feature inspired by another repository, explicitly mention that it's a new feature being added, not an existing one.
6. **Verify Before Implementation**: Before implementing or documenting a feature, verify that it actually exists in the current repository by checking the codebase.
## Common Tasks