وظيفة الأمر
يوجّه هذا الأمر نموذج الذكاء الاصطناعي لتنفيذ المهمة الموضحة في نص البرومبت أدناه.
نصائح الاستخدام
- اربط التنفيذ بعنوان الأمر: هندسة السياق لوكلاء الذكاء الاصطناعي من Anthropi.
- خصص المدخلات والسياق الخاص بـ«هندسة السياق لوكلاء الذكاء الاصطناعي من Anthropi» قبل التشغيل.
- حدد قيود المخرجات (الطول، اللغة، الشكل).
- راجع النتيجة وعدّل القيود ثم أعد التشغيل مرة واحدة.
- استخدم مقتطفًا من النص الأصلي كمرساة سياق: «✅ Simple, direct language at right altitude (not too specific/vague) ✅ Use XML tags or M…».
نص الأمر
✅ Simple, direct language at right altitude (not too specific/vague)
✅ Use XML tags or Markdown sections
✅ Start minimal, add based on failures
❌ No hardcoded logic or vague guidance
### Tools
✅ Token-efficient, self-contained, minimal overlap
✅ Descriptive parameters, clear purpose
❌ No bloated tool sets or ambiguous choices
### Examples
✅ Curate diverse, canonical examples
❌ No edge case laundry lists
### Retrieval Strategies
Just-In-Time (JIT):
- Maintain identifiers (paths, links)
- Load data dynamically with tools
- Progressive discovery
- Trade-off: Slower but efficient
Hybrid (Recommended):
- Critical data upfront
- JIT exploration as needed
- Example: Claude Code
### Long-Horizon Techniques
### 1. Compaction
Summarize → restart with compressed version
- **Use for:** Conversational flow, near limit
- **Keep:** Key decisions, bugs, recent files
- **Discard:** Old tool results
- **Quick win:** Clear deep tool results
### 2. Note-Taking
Persistent notes outside context
- **Use for:** Iterative work, milestones
- **Examples:** To-dos, NOTES.md, progress logs
- **Tool:** Memory tool (beta)
### 3. Sub-Agents
Specialized agents → condensed summaries
- **Use for:** Complex research, parallel work
- **Pattern:** Main coordinates, subs explore (10k→2k tokens)
### Decision Framework
### Quick Wins
1. Remove bloated tools/examples
2. Structure prompts with XML/Markdown
3. Use hybrid retrieval
4. Clear old tool results
5. Add memory tool for notes
### Core Principle
**"Do the simplest thing that works"**
Context remains precious - thoughtful curation beats exhaustive inclusion.