新闻详情

新闻详情

首页 / 资讯中心 / 详情

[Feature/Task Name] Implementation Plan

发布时间:2026/9/15 19:17:28来源:尧图网络
[Feature/Task Name] Implementation Plan
[Feature/Task Name] Implementation Plan【免费下载链接】humanlayerThe best way to get AI coding agents to solve hard problems in complex codebases.项目地址: https://gitcode.com/GitHub_Trending/hu/humanlayerOverview[Brief description of what were implementing and why]Current State Analysis[What exists now, whats missing, key constraints discovered]Desired End State[A Specification of the desired end state after this plan is complete, and how to verify it]Key Discoveries:[Important finding with file:line reference][Pattern to follow][Constraint to work within]What Were NOT Doing[Explicitly list out-of-scope items to prevent scope creep]Implementation Approach[High-level strategy and reasoning]Phase 1: [Descriptive Name]Overview[What this phase accomplishes]Changes Required:1. [Component/File Group]File:path/to/file.extChanges: [Summary of changes]// Specific code to add/modifySuccess Criteria:Automated Verification:Migration applies cleanly:make migrateUnit tests pass:make test-componentType checking passes:npm run typecheckLinting passes:make lintIntegration tests pass:make test-integrationManual Verification:Feature works as expected when tested via UIPerformance is acceptable under loadEdge case handling verified manuallyNo regressions in related featuresImplementation Note: After completing this phase and all automated verification passes, pause here for manual confirmation from the human that the manual testing was successful before proceeding to the next phase.Phase 2: [Descriptive Name][Similar structure with both automated and manual success criteria...]Testing StrategyUnit Tests:[What to test][Key edge cases]Integration Tests:[End-to-end scenarios]Manual Testing Steps:[Specific step to verify feature][Another verification step][Edge case to test manually]Performance Considerations[Any performance implications or optimizations needed]Migration Notes[If applicable, how to handle existing data/systems]ReferencesOriginal ticket:thoughts/allison/tickets/eng_XXXX.mdRelated research:thoughts/shared/research/[relevant].mdSimilar implementation:[file:line]模板的几个设计要点值得注意 - **What Were NOT Doing** 显式列出范围外事项防止范围蔓延scope creep - **每个阶段都同时包含自动化与手动两类成功标准** - **阶段之间的实现注记**要求自动化验证通过后暂停等待人工确认手动测试成功再进入下一阶段——把人机协同落实到流程级别。 ## 七、Step 5同步与审查 计划写好后需要与 thoughts 系统同步 1. **运行 humanlayer thoughts sync** 同步新创建的计划确保其被正确索引并可用 2. **呈现草稿计划位置**请用户审查阶段划分是否合理、成功标准是否足够具体、技术细节是否需调整、是否遗漏边界情况 3. **基于反馈迭代**补充缺失阶段、调整技术方案、澄清成功标准自动与手动、增删范围项修改后再次运行 humanlayer thoughts sync 4. **持续精炼**直到用户满意。 ### thoughts 系统的底层支撑 humanlayer thoughts sync 由 [hlyr/src/commands/thoughts/sync.ts](https://link.gitcode.com/i/6d911761a347e3f11a2f2ff6d546603b) 实现。从源码看它的执行链路包括 - 检查 thoughts 配置与当前仓库是否已初始化未初始化时报错并提示先运行 humanlayer thoughts init - 调用 createSearchDirectory 重建 thoughts/searchable/ 索引——将 thoughts 目录下所有文件跟随符号链接、排除 CLAUDE.md 与隐藏文件以**硬链接**方式放入 searchable 目录供 AI 工具无需跟随 symlink 即可搜索 - 在 thoughts 仓库中执行 git add -A、git commit无变更时跳过、git pull --rebase冲突时给出明确的人工解决指引、git push无 remote 或推送失败时降级为警告。 而整个 thoughts 系统的目录设计在 [hlyr/THOUGHTS.md](https://link.gitcode.com/i/d7df079aadaf907031cefdcba2305053) 中有完整说明 your-project/ ├── thoughts/ # Added by thoughts system │ ├── alice/ # → ~/thoughts/repos/your-project/alice │ ├── shared/ # → ~/thoughts/repos/your-project/shared │ ├── global/ # → ~/thoughts/global │ └── searchable/ # Hard links for AI search (auto-generated) 配置结构定义于 [hlyr/src/thoughtsConfig.ts](https://link.gitcode.com/i/cf3575d8b0a3207b9f2127f4e80c3428)包含 thoughtsRepo、reposDir、globalDir、user、repoMappings 与可选的 profiles 字段。ensureThoughtsRepoExists 还会在仓库不存在时自动执行 git init 并生成初始 .gitignore保证 thoughts 仓库开箱即用。 ## 八、重要指导原则六条硬性约束 命令用独立章节列出了 AI 在规划全过程中必须遵守的原则[.claude/commands/create_plan.md](https://link.gitcode.com/i/086a5807fb63ce2501c62e152dd6a06b) 第 306–343 行 1. **保持怀疑Be Skeptical**质疑模糊需求、尽早识别潜在问题、多问为什么和那又怎样、不要假设——用代码验证。 2. **保持交互Be Interactive**不要一次性写完整个计划在每个主要步骤获取认可、允许中途修正、协作式工作。 3. **保持彻底Be Thorough**规划前完整读完所有上下文文件用并行子任务研究真实代码模式包含具体文件路径和行号写出可度量的成功标准并明确区分自动化 vs 手动自动化步骤应优先使用 make 命令例如用 make -C humanlayer-wui check 而非 cd humanlayer-wui bun run fmt。 4. **保持务实Be Practical**聚焦增量、可测试的变更考虑迁移与回滚思考边界情况包含What were NOT doing。 5. **追踪进度Track Progress**用 TodoWrite 追踪规划任务及时更新与标记完成。 6. **最终计划不允许有未解决问题No Open Questions in Final Plan**规划中遇到悬而未决的问题必须立即停止、研究或询问澄清**绝不允许带着未解决问题写完计划**计划必须完整且可执行最终定稿前每个决策都必须已做出。 ## 九、成功标准指南自动化与手动二分法 成功标准被强制分为两类这是整个模板体系中最具可操作性的设计 **自动化验证可由执行 agent 直接运行** - 可运行的命令如 make test、npm run lint - 应存在的具体文件 - 代码编译/类型检查 - 自动化测试套件。 **手动验证需要真人测试** - UI/UX 功能 - 真实条件下的性能表现 - 难以自动化的边界情况 - 用户验收标准。 官方格式示例 markdown ### Success Criteria: #### Automated Verification: - [ ] Database migration runs successfully: make migrate - [ ] All unit tests pass: go test ./... - [ ] No linting errors: golangci-lint run - [ ] API endpoint returns 200: curl localhost:8080/api/new-endpoint #### Manual Verification: - [ ] New feature appears correctly in the UI - [ ] Performance is acceptable with 1000 items - [ ] Error messages are user-friendly - [ ] Feature works correctly on mobile devices ## 十、常见模式针对不同变更类型的规划策略 命令内置了三类最常见的规划模式 ### 数据库变更 按依赖顺序推进先 schema/migration → 增加 store 方法 → 更新业务逻辑 → 通过 API 暴露 → 更新客户端。 ### 新功能 先研究既有模式 → 从数据模型开始 → 构建后端逻辑 → 添加 API 端点 → 最后实现 UI。 ### 重构 先记录当前行为 → 规划增量变更 → 保持向后兼容 → 包含迁移策略。 这些模式与 HumanLayer 自身的工程结构高度吻合例如 [hld/store/sqlite.go](https://link.gitcode.com/i/6dbd87e187a74dc1ca8001b24d3e75b4) 与 [packages/database/drizzle/](https://link.gitcode.com/i/8c6e01ed4b70e5ec5fb7bfdee3bab744) 目录中的迁移文件0000_*.sql、0001_*.sql、0002_*.sql正是先 schema 后逻辑模式的落地实例。 ## 十一、子任务派发最佳实践 命令对并行研究子任务的派发给出了明确规范 1. **并行派生多个任务**以提高效率 2. **每个任务聚焦特定领域** 3. **提供详细指令**包括精确搜索什么、聚焦哪些目录、提取什么信息、期望的输出格式 4. **对目录极其具体**ticket 提到 WUI 就指定 humanlayer-wui/ 目录提到 daemon 就指定 hld/ 目录绝不使用 UI 这种泛指词在提示词中包含完整路径上下文 5. **指定只读工具** 6. **要求响应中包含具体的 file:line 引用** 7. **等待所有任务完成后再综合** 8. **验证子任务结果**结果异常时派生后续任务复查将发现与实际代码交叉核对不接受看似错误的结果。 代码示例伪代码形式给出 python # Spawn these tasks concurrently: tasks [ Task(Research database schema, db_research_prompt), Task(Find API patterns, api_research_prompt), Task(Investigate UI components, ui_research_prompt), Task(Check test patterns, test_research_prompt) ] ## 十二、示例交互流程 命令以一段完整的对话示例收尾直观展示了无参数 → 引导 → 提供 ticket → 读取文件 → 给出有依据的理解并提问 → 交互式推进的完整节奏 User: /create_plan Assistant: Ill help you create a detailed implementation plan... User: We need to add parent-child tracking for Claude sub-tasks. See thoughts/allison/tickets/eng_1478.md Assistant: Let me read that ticket file completely first... [Reads file fully] Based on the ticket, I understand we need to track parent-child relationships for Claude sub-task events in the hld daemon. Before I start planning, I have some questions... [Interactive process continues...]【免费下载链接】humanlayerThe best way to get AI coding agents to solve hard problems in complex codebases.项目地址: https://gitcode.com/GitHub_Trending/hu/humanlayer创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
网站建设高端定制企业官网
RELATED

相关资讯

更多精彩内容,欢迎继续阅读

较早相关资讯

最新相关资讯

VeraCrypt 磁盘加密实战:3 步建出你的第一块加密硬盘 2026/9/15 19:59:33

VeraCrypt 磁盘加密实战:3 步建出你的第一块加密硬盘

VeraCrypt 磁盘加密实战:3 步建出你的第一块加密硬盘 【免费下载链接】VeraCrypt Disk encryption with strong security based on TrueCrypt 项目地址: https://gitcode.com/GitHub_Trending/ve/VeraCrypt U 盘落在出租车上,里面的资料却再也找不…

阅读更多 →
ScyllaDB 升级指南:从 2026.x 到 2026.3 的滚动升级、回滚与指标变更全解析 2026/9/15 19:59:33

ScyllaDB 升级指南:从 2026.x 到 2026.3 的滚动升级、回滚与指标变更全解析

ScyllaDB 升级指南:从 2026.x 到 2026.3 的滚动升级、回滚与指标变更全解析 【免费下载链接】scylladb NoSQL data store using the Seastar framework, compatible with Apache Cassandra and Amazon DynamoDB 项目地址: https://gitcode.com/GitHub_Trending/sc…

阅读更多 →
Moonshine 仅加载 ORT 格式模型:迁移指南与底层实现解析 2026/9/15 19:59:33

Moonshine 仅加载 ORT 格式模型:迁移指南与底层实现解析

Moonshine 仅加载 ORT 格式模型:迁移指南与底层实现解析 【免费下载链接】moonshine Very low latency speech to text, intent recognition, and text to speech, for building voice agents and interfaces 项目地址: https://gitcode.com/GitHub_Trending/moon…

阅读更多 →
如何将 Sourcetrail 接入 CLion 或 IntelliJ IDEA:安装 idea-sourcetrail 插件并发送代码位置 2026/9/15 19:59:33

如何将 Sourcetrail 接入 CLion 或 IntelliJ IDEA:安装 idea-sourcetrail 插件并发送代码位置

如何将 Sourcetrail 接入 CLion 或 IntelliJ IDEA:安装 idea-sourcetrail 插件并发送代码位置 【免费下载链接】Sourcetrail Sourcetrail - free and open-source interactive source explorer 项目地址: https://gitcode.com/GitHub_Trending/so/Sourcetrail …

阅读更多 →
Apache Thrift 之 PHP 客户端库使用指南:环境要求、依赖分析与版本迁移要点 2026/9/15 19:59:33

Apache Thrift 之 PHP 客户端库使用指南:环境要求、依赖分析与版本迁移要点

Apache Thrift 之 PHP 客户端库使用指南:环境要求、依赖分析与版本迁移要点 【免费下载链接】thrift Apache Thrift 项目地址: https://gitcode.com/GitHub_Trending/thr/thrift Apache Thrift 是跨语言的高效 RPC 框架,其 PHP 库为 PHP 开发者提…

阅读更多 →
发票钓鱼邮件攻击全解析:从诱饵设计到企业防护 2026/9/15 19:56:33

发票钓鱼邮件攻击全解析:从诱饵设计到企业防护

中午刚过,财务小林的邮箱里跳出一封标题为“[请确认] 贵司欠款发票,金额 48650.00 元”的邮件。发件人显示名是合作了三年的供应商老熟人“华信科技-张姐”,正文里还带了一句“这是上季度最后一批开票,麻烦今天下班前确认&#xf…

阅读更多 →

今日资讯

本周资讯

本月资讯

看完文章仍有疑问?

联系尧图顾问,获取一对一建站咨询

立即免费咨询 📞 400-888-8888
📞