workflow
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAgent Workflow Rules
Agent 工作流规则
Efficient AI agent operation patterns.
高效的AI Agent 操作模式。
Instructions
说明
1. Hard Ignore Rules
1. 强制忽略规则
Never modify or include in context:
- node_modules/
- dist/
- build/
- .git/
- *.lock files
- Binary files
- Generated files永远不要修改或在上下文包含以下内容:
- node_modules/
- dist/
- build/
- .git/
- *.lock files
- Binary files
- Generated files2. Reasoning Protocol (NEW)
2. 推理协议(新增)
Before executing any task, follow this mental process:
1. UNDERSTAND: What is the goal?
- Read the request carefully
- Identify explicit and implicit requirements
2. PLAN: What steps are needed?
- Break into subtasks
- Identify dependencies
3. EXECUTE: Implement step by step
- One subtask at a time
- Verify each step
4. VERIFY: Check the result
- Does it meet requirements?
- Any edge cases missed?
5. REFLECT: What could be improved?
- Learn from mistakes
- Note patterns for future执行任何任务前,请遵循以下思考流程:
1. UNDERSTAND: What is the goal?
- Read the request carefully
- Identify explicit and implicit requirements
2. PLAN: What steps are needed?
- Break into subtasks
- Identify dependencies
3. EXECUTE: Implement step by step
- One subtask at a time
- Verify each step
4. VERIFY: Check the result
- Does it meet requirements?
- Any edge cases missed?
5. REFLECT: What could be improved?
- Learn from mistakes
- Note patterns for future3. Navigation-First Workflow
3. 导航优先工作流
1. Understand the request
2. Navigate to relevant files FIRST
3. Read existing code
4. Plan changes
5. Implement
6. Verify1. Understand the request
2. Navigate to relevant files FIRST
3. Read existing code
4. Plan changes
5. Implement
6. Verify3. Token Discipline
3. Token 规范
✅ DO:
- Read only necessary files
- Stop when task is complete
- Use targeted searches
- Summarize long outputs
❌ DON'T:
- Read entire codebase
- Include unnecessary context
- Repeat information
- Over-explain simple changes✅ DO:
- Read only necessary files
- Stop when task is complete
- Use targeted searches
- Summarize long outputs
❌ DON'T:
- Read entire codebase
- Include unnecessary context
- Repeat information
- Over-explain simple changes4. Output Contract
4. 输出契约
Always structure responses:
markdown
undefined请始终按照以下结构组织响应:
markdown
undefinedSummary
Summary
Brief description of what was done
Brief description of what was done
Changes
Changes
- file1.ts: Added X
- file2.ts: Modified Y
- file1.ts: Added X
- file2.ts: Modified Y
Next Steps (if applicable)
Next Steps (if applicable)
- Remaining tasks
undefined- Remaining tasks
undefined5. Backend/Frontend Split
5. 前后端拆分
When working on full-stack:
1. Identify which layer the change affects
2. Start with the data layer (backend)
3. Then update the presentation layer (frontend)
4. Test integration points处理全栈任务时:
1. Identify which layer the change affects
2. Start with the data layer (backend)
3. Then update the presentation layer (frontend)
4. Test integration points6. Type Checking
6. 类型检查
Before completing TypeScript tasks:
✅ Run: npx tsc --noEmit
✅ Fix all type errors
✅ Ensure no implicit any完成TypeScript任务前:
✅ Run: npx tsc --noEmit
✅ Fix all type errors
✅ Ensure no implicit any7. Linting
7. 代码检查(Lint)
Before completing tasks:
✅ Run: npm run lint
✅ Fix all errors
✅ Fix warnings if quick完成任务前:
✅ Run: npm run lint
✅ Fix all errors
✅ Fix warnings if quick8. File Size Limits
8. 文件大小限制
Components: Max 200 lines
Utilities: Max 100 lines
Services: Max 300 lines
If larger, split into smaller modules.Components: Max 200 lines
Utilities: Max 100 lines
Services: Max 300 lines
If larger, split into smaller modules.9. Commit Messages
9. 提交信息规范
After completing tasks, suggest:
feat(scope): add feature description
fix(scope): fix bug description
refactor(scope): improve code structure完成任务后,建议使用以下格式:
feat(scope): add feature description
fix(scope): fix bug description
refactor(scope): improve code structure