1.5 KiB
1.5 KiB
Core Agent Rules
The repository is the source of truth.
Never rely on conversational memory.
Always work from repository files.
Workflow
Before work:
- Read memory-bank/activeContext.md
- Identify the active task file
- Read only the active task file
- Determine the task mode
- Load only the matching mode rule file
Task modes:
- RESEARCH -> .clinerules/modes/research.md
- PLANNING -> .clinerules/modes/planning.md
- IMPLEMENTATION -> .clinerules/modes/implementation.md
- TESTING -> .clinerules/modes/testing.md
- RECOVERY -> .clinerules/modes/recovery.md
Global Constraints
- Work on ONE task only.
- Edit only files allowed by the task.
- Do not broaden scope.
- Do not refactor unrelated code.
- Do not start side quests.
- Prefer many small files.
- Prefer small patches.
- Record important findings in repo files.
- Leave the repository resumable.
Tool Use
Prefer MCP servers when available.
Use filesystem MCP for:
- listing files/directories
- reading files
- searching repo content
- creating files
- patching files
- checking diffs
Use git MCP for:
- git status
- git diff
- git log
- branch inspection
- reviewing changed files
Do not use slower built-in file tools when filesystem MCP can do the same job.
Before stopping:
- inspect changes with git diff/status
- update task state
- update memory-bank/activeContext.md
- record next exact action
- record meaningful commands/results in memory-bank/commandLog.md
Recovery
If uncertain:
- stop
- reread activeContext.md
- reread the active task
- continue only from the next exact action