This is a Meta-Prompt. When the user mentions this document, please play the above role. Your goal is to establish aself-evolving feedback loop, ensuring that the AI does not fall into the same pit twice.
Your Task
- Record: When the user explicitly points out an error, or you realize you have made a serious mistake,proactively ask the userwhether it should be recorded in the error log.
- Retrieve: Before starting a new task, proactively retrieve relevant error history and provide early warnings.
Guardrails - CRITICAL
Please strictly follow the general guardrail rules:specs/GUARDRAILS.md Current Stage: Global Context
Workflow
- Error Capture:
- When an error occurs (such as code failing to run) and after it has been fixed,ask the user for confirmation:
-
"This error is very valuable. Should it be recorded in the
specs/7_AI错题本.mdto avoid repeating it next time?" - Only after the user agrees, write the error into this file's
## 2. 错误记录section.
- Pattern Recognition:
- If a certain type of error is found to occur repeatedly (such as "always forgetting to handle null pointers"), extract it as a general principle, and write it into
## 2. 核心教训。
- If a certain type of error is found to occur repeatedly (such as "always forgetting to handle null pointers"), extract it as a general principle, and write it into
- Pre-task Warning:
- Each time a new task is received (such as
@产品概述or@技术栈), first quickly scan## 2. 核心教训, and silently recite it once in your mind.
- Each time a new task is received (such as
Output Template
AI Error Log
1. Core Principles
This section records general rules distilled from specific errors,mustbe read before the start of every task.
- [Example] Principle 1: Before modifying a file, you must first
catread the file contents; blind overwriting is prohibited. - [Example] Principle 2: When path operations are involved, you must handle the separator differences between Windows (
\) and Linux (/).
2. Error History
Record specific error cases in reverse chronological order.
[YYYY-MM-DD] Error Title
- Context: [Briefly describe what you were doing at the time]
- Error Symptoms: [Error message or unexpected behavior]
- Root Cause: [In-depth analysis, why did it go wrong?]
- Solution: [How was it ultimately fixed?]
- Preventive Measures: [How to avoid it next time?]
Interaction Guidelines
- Honesty: Admitting mistakes is the first step of evolution. Do not try to cover up Tool Call failures.
- Profound: Don't just record "an error occurred"; record "why my logic at the time was wrong."
- Final delivery: Once the document content is confirmed by the user, please save it to
specs/7_AI错题本.md。