Loading...
Loading...
Compare original and translation side by side
Main Goal: [High-level objective]
├─ Sub-goal 1: [Component 1]
│ ├─ Task 1.1: [Atomic action]
│ └─ Task 1.2: [Atomic action]
├─ Sub-goal 2: [Component 2]
│ ├─ Task 2.1: [Atomic action]
│ └─ Task 2.2: [Atomic action]
└─ Sub-goal 3: [Component 3]
└─ Task 3.1: [Atomic action]Main Goal: [High-level objective]
├─ Sub-goal 1: [Component 1]
│ ├─ Task 1.1: [Atomic action]
│ └─ Task 1.2: [Atomic action]
├─ Sub-goal 2: [Component 2]
│ ├─ Task 2.1: [Atomic action]
│ └─ Task 2.2: [Atomic action]
└─ Sub-goal 3: [Component 3]
└─ Task 3.1: [Atomic action]Task A → Task B → Task C
(B requires A's output, C requires B's output)Task A ─┐
Task B ─┼─ [All can run simultaneously]
Task C ─┘Task A ─┐
Task B ─┼─> Task D (requires A, B, C)
Task C ─┘Task A (needs resource X)
Task B (needs resource X)
→ Sequential or resource pooling requiredTask A → Task B → Task C
(B requires A's output, C requires B's output)Task A ─┐
Task B ─┼─ [All can run simultaneously]
Task C ─┘Task A ─┐
Task B ─┼─> Task D (requires A, B, C)
Task C ─┘Task A (needs resource X)
Task B (needs resource X)
→ Sequential or resource pooling requiredUser Request: [Original request]
Analysis:
- Primary Goal: [Main objective]
- Type: [Implementation/Debug/Refactor/Analysis]
- Domain: [Specific area of codebase]
- Complexity: [Simple/Medium/Complex]用户请求: [原始请求]
分析:
- 核心目标: [主要目标]
- 类型: [实现/调试/重构/分析]
- 领域: [代码库的特定领域]
- 复杂度: [简单/中等/复杂]Main Goal: Implement batch pattern update feature
Major Components:
1. Database layer (Turso + redb)
2. API layer (public interface)
3. Business logic (batch processing)
4. Testing (unit + integration)
5. Documentation (API docs + examples)主目标: 实现批量模式更新功能
主要组件:
1. 数据库层 (Turso + redb)
2. API层 (公共接口)
3. 业务逻辑 (批量处理)
4. 测试 (单元测试 + 集成测试)
5. 文档 (API文档 + 示例)Component: Database layer
Tasks:
1. Design batch schema/structure
- Input: Pattern data structures
- Output: Schema definition
- Success: Supports efficient batch operations
2. Implement Turso batch operations
- Input: Schema, patterns array
- Output: Batch insert/update functions
- Success: Atomic transaction, proper error handling
3. Implement redb batch caching
- Input: Schema, patterns array
- Output: Batch cache update functions
- Success: Fast writes, consistency maintained组件: 数据库层
任务:
1. 设计批量模式/结构
- 输入: 模式数据结构
- 输出: 模式定义
- 成功标准: 支持高效批量操作
2. 实现Turso批量操作
- 输入: 模式、模式数组
- 输出: 批量插入/更新函数
- 成功标准: 原子事务、正确的错误处理
3. 实现redb批量缓存
- 输入: 模式、模式数组
- 输出: 批量缓存更新函数
- 成功标准: 快速写入、保持一致性Dependency Graph:
[Design schema] ──┬──> [Implement Turso batch] ──┐
│ ├──> [Write tests]
└──> [Implement redb batch] ───┘
[Write tests] ──> [Write documentation]依赖关系图:
[设计模式] ──┬──> [实现Turso批量操作] ──┐
│ ├──> [编写测试]
└──> [实现redb批量缓存] ───┘
[编写测试] ──> [编写文档]Task: [Name]
- Complexity: [Low/Medium/High]
- Effort: [Small/Medium/Large]
- Risk: [Low/Medium/High]
- Dependencies: [List]任务: [名称]
- 复杂度: [低/中/高]
- 工作量: [小/中/大]
- 风险: [低/中/高]
- 依赖项: [列表]1. Data/Storage layer
2. Business logic layer
3. API/Interface layer
4. Testing layer
5. Documentation layer1. 数据/存储层
2. 业务逻辑层
3. API/接口层
4. 测试层
5. 文档层1. Core functionality (MVP)
2. Error handling & edge cases
3. Performance optimization
4. Integration with existing system
5. Testing & validation
6. Documentation & examples1. 核心功能 (MVP)
2. 错误处理与边缘情况
3. 性能优化
4. 与现有系统集成
5. 测试与验证
6. 文档与示例Phase 1: Research & Design
Phase 2: Foundation & Infrastructure
Phase 3: Core Implementation
Phase 4: Integration & Testing
Phase 5: Optimization & Polish
Phase 6: Documentation & Release阶段1: 研究与设计
阶段2: 基础与基础设施
阶段3: 核心实现
阶段4: 集成与测试
阶段5: 优化与打磨
阶段6: 文档与发布1. Reproduce issue
2. Diagnose root cause
3. Design solution
4. Implement fix
5. Verify fix
6. Prevent regression (tests)1. 复现问题
2. 诊断根本原因
3. 设计解决方案
4. 实施修复
5. 验证修复
6. 防止回归(测试)Request: "Fix failing test in pattern extraction"
Analysis: Simple, focused task
Decomposition:
1. Run test to observe failure
2. Identify failure cause
3. Apply fix
4. Verify test passes
5. Check for similar issues
Dependencies: Sequential (1→2→3→4→5)
Complexity: Low
Strategy: Single agent, sequential execution请求: "修复模式提取中失败的测试"
分析: 简单、聚焦的任务
拆解:
1. 运行测试以观察失败情况
2. 确定失败原因
3. 应用修复
4. 验证测试通过
5. 检查是否存在类似问题
依赖关系: 顺序执行 (1→2→3→4→5)
复杂度: 低
策略: 单个Agent,顺序执行Request: "Add caching to episode retrieval"
Analysis: Medium complexity, multiple components
Decomposition:
1. Design cache strategy
2. Implement cache layer
3. Integrate with retrieval
4. Add tests
5. Measure performance
Dependencies:
- 1 → 2 → 3 (sequential)
- 4 depends on 3
- 5 depends on 3
Strategy: Sequential with parallel testing请求: "为剧集检索添加缓存"
分析: 中等复杂度,多组件
拆解:
1. 设计缓存策略
2. 实现缓存层
3. 与检索功能集成
4. 添加测试
5. 衡量性能
依赖关系:
- 1 → 2 → 3 (顺序)
- 4 依赖于3
- 5 依赖于3
策略: 顺序执行 + 并行测试Request: "Refactor storage layer to support multiple backends"
Analysis: High complexity, architectural change
Major Components:
1. Storage abstraction layer
2. Turso backend implementation
3. redb backend implementation
4. Backend factory & configuration
5. Migration utilities
6. Testing infrastructure
7. Documentation
Strategy: Multi-phase hybrid execution
Coordination: GOAP agent + multiple specialized agents请求: "重构存储层以支持多种后端"
分析: 高复杂度,架构变更
主要组件:
1. 存储抽象层
2. Turso后端实现
3. redb后端实现
4. 后端工厂与配置
5. 迁移工具
6. 测试基础设施
7. 文档
策略: 多阶段混合执行
协调: GOAP Agent + 多个专业Agent