Loading...
Loading...
Compare original and translation side by side
.excalidraw.excalidraw.json.excalidraw.excalidraw.jsonTask: Extract and explain the components in [file.excalidraw.json]
Approach:
1. Read the Excalidraw JSON
2. Extract only text elements (ignore positioning/styling)
3. Identify relationships between components
4. Summarize architecture/flow
Return:
- List of components/services with descriptions
- Connection/dependency relationships
- Key insights about the architecture
- DO NOT return raw JSON or verbose element detailsTask: Extract and explain the components in [file.excalidraw.json]
Approach:
1. Read the Excalidraw JSON
2. Extract only text elements (ignore positioning/styling)
3. Identify relationships between components
4. Summarize architecture/flow
Return:
- List of components/services with descriptions
- Connection/dependency relationships
- Key insights about the architecture
- DO NOT return raw JSON or verbose element detailsTask: Add [component] to [file.excalidraw.json], connected to [existing-component]
Approach:
1. Read file to identify existing elements
2. Find [existing-component] and its position
3. Create new element JSON for [component]
4. Add arrow elements for connections
5. Write updated file
Return:
- Confirmation of changes made
- Position of new element
- IDs of created elementsTask: Add [component] to [file.excalidraw.json], connected to [existing-component]
Approach:
1. Read file to identify existing elements
2. Find [existing-component] and its position
3. Create new element JSON for [component]
4. Add arrow elements for connections
5. Write updated file
Return:
- Confirmation of changes made
- Position of new element
- IDs of created elementsTask: Create new Excalidraw diagram showing [description]
Approach:
1. Design layout for [number] components
2. Create rectangle elements with text labels
3. Add arrows showing relationships
4. Use consistent styling (colors, fonts)
5. Write to [file.excalidraw.json]
Return:
- Confirmation of file created
- Summary of components included
- File locationTask: Create new Excalidraw diagram showing [description]
Approach:
1. Design layout for [number] components
2. Create rectangle elements with text labels
3. Add arrows showing relationships
4. Use consistent styling (colors, fonts)
5. Write to [file.excalidraw.json]
Return:
- Confirmation of file created
- Summary of components included
- File locationTask: Compare architecture approaches in [file1] vs [file2]
Approach:
1. Read both files
2. Extract text labels from each
3. Identify structural differences
4. Compare component relationships
Return:
- Key differences in architecture
- Components unique to each approach
- Relationship/flow differences
- DO NOT return full element details from both filesTask: Compare architecture approaches in [file1] vs [file2]
Approach:
1. Read both files
2. Extract text labels from each
3. Identify structural differences
4. Compare component relationships
Return:
- Key differences in architecture
- Components unique to each approach
- Relationship/flow differences
- DO NOT return full element details from both files| Excuse | Reality | What to Do |
|---|---|---|
| "Direct reading is most efficient" | Consumes 4k-22k tokens unnecessarily | Delegate to subagent |
| "It's token-efficient to read directly" | Baseline tests showed 9-45% budget used | Always delegate |
| "This is optimal for one-time analysis" | "One-time" still pollutes main context | Subagent isolation |
| "The JSON is straightforward" | Simplicity ≠ token efficiency | Delegate anyway |
| "I need to understand the format" | Format understanding not needed in main agent | Subagent handles format |
| "Within reasonable bounds" (18k tokens) | "Reasonable" is subjective rationalization | Hard rule: delegate |
| "Just a quick check of components" | "Quick check" still loads full JSON | Extract text via subagent |
| "File is small (16K)" | 4k tokens is NOT small | Size threshold doesn't matter |
| 借口 | 实际情况 | 正确做法 |
|---|---|---|
| "直接读取最有效率" | 会不必要地消耗4k-22k tokens | 委托给子代理 |
| "直接读取令牌成本低" | 基准测试显示会消耗9-45%的预算 | 始终委托 |
| "一次性分析这样做最优" | "一次性"操作仍会污染主上下文 | 子代理隔离 |
| "这个JSON很简单" | 简单性≠令牌效率 | 无论如何都要委托 |
| "我需要理解格式" | 主代理无需理解格式 | 由子代理处理格式 |
| "在合理范围内"(18k tokens) | "合理"是主观的自我合理化 | 硬性规则:委托 |
| "只是快速检查组件" | "快速检查"仍会加载完整JSON | 通过子代理提取文本 |
| "文件很小(16K)" | 4k tokens并不小 | 大小阈值无关紧要 |
| Operation | Main Agent Action | Subagent Returns |
|---|---|---|
| Understand diagram | Delegate with "Extract and explain" template | Component list + relationships |
| Modify diagram | Delegate with "Add [X] connected to [Y]" template | Confirmation + changes made |
| Create diagram | Delegate with "Create showing [description]" template | File location + summary |
| Compare diagrams | Delegate with "Compare [A] vs [B]" template | Key differences (not raw JSON) |
| 操作 | 主代理操作 | 子代理返回内容 |
|---|---|---|
| 理解图表 | 使用"提取并解释"模板委托 | 组件列表+关系 |
| 修改图表 | 使用"添加[X]并连接到[Y]"模板委托 | 确认信息+修改内容 |
| 创建图表 | 使用"创建展示[描述]的图表"模板委托 | 文件位置+摘要 |
| 比较图表 | 使用"比较[A]与[B]"模板委托 | 核心差异(非原始JSON) |
| Scenario | Without Delegation | With Delegation | Savings |
|---|---|---|---|
| Single large file | 22k tokens (45% budget) | ~500 tokens (subagent summary) | 98% |
| Two-file comparison | 18k tokens (9% budget) | ~800 tokens (diff summary) | 96% |
| Modification task | 14k tokens (7% budget) | ~300 tokens (confirmation) | 98% |
| 场景 | 不使用委托 | 使用委托 | 节省比例 |
|---|---|---|---|
| 单个大文件 | 22k tokens(45%预算) | ~500 tokens(子代理摘要) | 98% |
| 双文件比较 | 18k tokens(9%预算) | ~800 tokens(差异摘要) | 96% |
| 修改任务 | 14k tokens(7%预算) | ~300 tokens(确认信息) | 98% |
User: "What architecture is shown in detailed-architecture.excalidraw.json?"
Agent: Let me read that file... [reads 22k tokens into main context]User: "What architecture is shown in detailed-architecture.excalidraw.json?"
Agent: I'll use a subagent to extract the architecture details.
[Dispatches Task tool with general-purpose subagent]
Task: Extract and explain components in .ryanquinn3/ticketing/detailed-architecture.excalidraw.json
[Receives ~500 token summary with component list and relationships]
[Responds to user with architecture explanation, main context preserved]用户:"detailed-architecture.excalidraw.json中展示了什么架构?"
代理:让我读取这个文件... [将22k tokens加载到主上下文]用户:"detailed-architecture.excalidraw.json中展示了什么架构?"
代理:我将使用子代理提取架构细节。
[通过任务工具分派给通用子代理]
Task: Extract and explain components in .ryanquinn3/ticketing/detailed-architecture.excalidraw.json
[收到约500 tokens的组件列表和关系摘要]
[向用户回复架构说明,主上下文得以保留]