READ FIRST: docs/file-management-spec.md
- List affected files explicitly
- State file operations clearly:
DELETE: path/to/old-file.js (reason)CREATE: path/to/new-file.js (purpose)UPDATE: path/to/existing-file.js (changes)
- Update
docs/file-references.mdafter changes
Always check docs/file-references.md for the current file structure before making changes.
BEFORE: "I need to refactor the authentication"
REQUIRED FORMAT:
"I need to refactor authentication:
- DELETE: src/utils/oldAuth.js (outdated implementation)
- CREATE: src/hooks/useAuth.js (modern React hook)
- CREATE: src/services/authService.js (API integration)
- UPDATE: src/components/Login.js (use new hook)
- UPDATE: src/components/UserProfile.js (use new hook)"
If Selena MCP is available, use these commands to maintain project memory:
{
"remember": "Always follow file-management-spec.md protocol",
"never_forget": "Delete old files when creating new implementations",
"protocol": "List DELETE/CREATE/UPDATE operations before every change",
"reference_file": "docs/file-references.md contains current project structure",
"cleanup_rule": "No outdated files should remain after refactoring"
}# List all source files
find src -type f \( -name "*.js" -o -name "*.jsx" -o -name "*.ts" -o -name "*.tsx" \) | sort
# Find references to old functions/files
grep -r "oldFunctionName" src/
grep -r "from './old-file'" src/
# Check for unused imports
npx eslint src/ --fix- Never leave old and new implementations coexisting
- Always update imports when moving/renaming files
- Maintain docs/file-references.md as single source of truth
- Explicit file operations prevent confusion
## Instructions for Using Selena MCP
If Selena MCP is available in your Claude Code session, run these commands:
@selena remember "Project uses file-management-spec.md protocol - always DELETE old files when creating new ones"
@selena remember "Before any code changes: list affected files, state DELETE/CREATE/UPDATE operations explicitly"
@selena remember "docs/file-references.md contains current project structure - check it before making changes"
@selena remember "Never leave outdated files mixed with new implementations - this causes logic conflicts"
@selena save-rule "file-management: Always follow the protocol in docs/file-management-spec.md"