匠人学院 JR Academy
  • Position

    Where am I now, and where should I go?

    How your job is changing, where your experience can take you and what you still need for a target role, worked out from what you have actually done. Free, and the full result needs no sign-up.

    Analyse my career and skills

    Look up a career

    Will AI replace my job?AI impact and transition paths for common careersNew jobs in the AI eraWhat they do, what they need, how to move in

    Focused tools

    AI Engineer interview readiness30 timed questions on what you still need before interviewsCareer personality testDirections that suit how you workReturning to China checkJob prospects in China by school, major and graduation date

    AI coach

    Talk to your AI coachStill unsure after your result? Talk through what is holding you back
  • Core courses

    AI Engineer BootcampEngineering bootcamp from LLM apps to agentsAI Engineer Full-Stack Project Class16 weeks · RAG and full-stack AI projectsVibe Coding Masterclass8 weeks · direct agents to build and ship a productAI Essentials10 hours · use AI for email, reports, data and copyAI Office Automation Course8 weeks · help a whole company adopt AIOne-Person Company (OPC) Bootcamp15 weeks in person · build a one-person company with AIAll courses →

    AI engineering

    Machine Learning & Data Engineering Full-Stack ClassAI Agent & MCP Project BootcampAI Engineer Core TechniquesAI Engineer FoundationsAI Engineer Advanced: RAG to Agents and TuningClaude Code TasterAll AI engineering courses →

    AI at work

    AI Coding for everyoneClaude Code One-Day Masterclass (Non-Technical)Enterprise AI Automation BootcampAI Marketing BootcampAI Risk, Governance and Audit CourseOpenClaw 4-Week Personal AI Assistant BootcampAll AI-at-work courses →

    Career development

    AI Product Manager (BA) Bootcamp + InternshipAustralia IT Interview BootcampAustralia IT Technical Interview BootcampAustralia IT Resume BootcampAustralia Big Tech Job Search BootcampAustralia IT Career Planning BootcampAll career courses →

    Learn free first

    Vibe CodingAI for office workPrompt MasterAI EngineerAI data analysisResource centerInstructorsAll learning paths →
  • Evidence

    What will convince an employer?

    Certifications, projects, team work and competition entries, collected into one portfolio.

    See the portfolio

    Certifications

    Cert Master · all certificationsPrep and mock exams for AWS, Azure, GCP, Claude and moreAWS CLF-C02Entry-level AWS cloud certificationAWS SAA-C03Entry certification for cloud architectsClaude certificationsAnthropic Claude certification seriesAll certifications →

    Projects and team work

    P3 team projectsBuild a project with real teammates in a simulated team workflowP3 project experienceThe parts of a P3 project that go on your resumeDemo DayProject showcaseP3 certificatesProof once a project is completeAll of P3 →

    Competitions and work

    HackathonsBuild something against the clockSubmit your workAdd your project to the showcaseCareerOS portfolioDo tasks in the desktop app; your results become portfolio pieces
    Cert MasterBrowser extension, app and mini programScreenshot a question for analysis and practise anywhereAbout Cert Master
  • Connect

    How do I get myself in front of employers?

    Resume, interviews, referrals and mentors. See how far you are from the target role first, then decide what to fix.

    Start with Jobpin

    Resume and openings

    Graduate careersGraduate preparation across Australia, China, Malaysia, Singapore, the US and UKJobpinAI job search workspace: resume, roles, applicationsAI resumeRewrite your resume against a job descriptionReferralsRoles shared by students and mentorsOpportunitiesInternships, projects and collaborationsOffer boardOffers students have received

    Interviews

    AI Engineer interview guideSeven areas, with worked examplesFDE interview guideFive rounds, from scoping to the customer roundAI mock interviewPractise by text or voice and see the gapsInterview storiesReal interview experiencesSystem Design handbookPrepare for system design interviewsAll interview prep →

    Mentors

    1:1 mentorsBook AI, career and technical mentors by the hourGroup tutoringShare a tutor with a few others and pay less eachCareer coachingResume, interview and direction packages
    Jobpin desktopOne workspace for the whole job searchOrganise real experience and refine resume versions for target roles on macOS or Windows.About Jobpin
BusinessMembershipDownload CareerOS
0
匠人学院 JR Academy

Follow Us

linkedinfacebooktwitterinstagramyoutube

We Accept

/image/layout/pay-paypal.png/image/layout/pay-visa.png/image/layout/pay-master-card.png/image/layout/pay-airwallex.png/image/layout/pay-alipay.png
Airbotix · AI learning & creation for kids Another Life · AI story game
Products46

CareerOS and tools

  • CareerOS
  • Cert Master
  • Jobpin
  • Jobpin web
  • Jobpin report
  • Jobpin desktop download
  • My job search reports
  • Buy report credits
  • Jobpin billing
  • AI Toolbox
  • AI Skill Marketplace

Membership

  • Membership
  • AI membership

Courses

  • Bootcamps
  • Training Camp
  • Kanban learning
  • AI Builder course
  • MCP course
  • NotebookLM workshop
  • Business Analyst course
  • Web Full-Stack Bootcamp
  • DevOps Bootcamp
  • Data Engineering Bootcamp
  • Data Analysis Bootcamp
  • Coding for Beginners
  • Algorithm Bootcamp

Career services

  • Graduate careers
  • Graduate careers in Australia
  • Graduate careers in China
  • Graduate careers in Malaysia
  • Graduate careers in Singapore
  • Graduate careers in the US
  • Graduate careers in the UK
  • 1:1 coaching
  • Career coaching
  • AI Engineer VIP
  • BA & PM Internship
  • Data Science Internship
  • Data Analysis Internship
  • Marketing Internship
  • Resume Review
  • Interview Coaching
  • Job Application Service
  • Job Monitoring
  • LinkedIn Management
  • LinkedIn Networking
Library57

Learning paths

  • All Learning Paths
  • AI Engineer
  • Context Engineering
  • Vibe Coding
  • Prompt Master
  • AI Builder
  • AI Product Manager
  • Python Basics
  • AI Productivity
  • AI Data Analysis
  • AI Finance
  • AI Content Creation
  • AI Image Creation
  • Frontend Development
  • Hermes Agent
  • OpenClaw Local Agent

Interactive labs

  • Prompt Lab
  • Frontend Lab
  • JavaScript Lab
  • Python Lab
  • AWS Lab
  • Azure Lab
  • LLM Lab
  • Git Lab

Reference and guides

  • Resources
  • Wiki
  • Cheat sheets
  • Roadmaps
  • AI roadmaps
  • Videos
  • Ebooks
  • Blog
  • Interview handbook
  • Mock exams
  • Free resources

Cities

  • Sydney
  • Melbourne
  • Brisbane
  • Adelaide
  • Singapore
  • Kuala Lumpur
  • London
  • New York
  • San Francisco
  • Los Angeles
  • Seattle
  • Toronto
  • Vancouver

Immigration

  • Australia Immigration
  • Skilled Visa 189/190/491
  • Employer Sponsored 482/186/494
  • Business Visa 188/888
  • UK Immigration
  • US Immigration
  • Canada Immigration
  • Singapore immigration
  • Malaysia immigration
Business20

For business

  • AI for Business
  • Business portal sign-in
  • Corporate Training
  • Internship Partnership
  • Recruitment Partnership
  • Enterprise (EN)

Metatree AI Lab

  • Metatree AI Lab (Chinese)
  • AI solutions (Chinese)
  • Digital employees (Chinese)
  • Case studies (Chinese)
  • Metatree AI Lab
  • AI services
  • Digital employees
  • Case studies

AI education for kids

  • Airbotix — AI Learning & Creation for Kids
  • AU Family Resource Hub
  • NAPLAN Report Guide
  • My School Data Guide
  • Sydney Private School Fees 2026
  • Kids Coding Programs
About15

Company

  • About Us
  • Our Mentors
  • Become a Mentor
  • Metaverse Classroom
  • JR Careers
  • Another Life — AI Story Game
  • Contact Us

Help and policies

  • FAQs
  • Terms & Conditions
  • Privacy Policy
  • Cancellation & Refund Policy
  • Site map

Friend links

  • CS Browser

Contact

  • hello@jiangren.com.au
  • 0421-672-555

Offices

Level 10b, 144 Edward Street, Brisbane CBD (Headquarter)
Level 2, 171 La Trobe St, Melbourne VIC 3000
45A13, Block B, Oriental Hope Tianxiang Plaza, 500 Tianfu Avenue Middle Section, Wuhou District, Chengdu, Sichuan, China
Business Hub, 155 Waymouth St, Adelaide SA 5000
Disclaimer
footer-disclaimerfooter-disclaimer

JR Academy acknowledges Traditional Owners of Country throughout Australia and recognises the continuing connection to lands, waters and communities. We pay our respect to Aboriginal and Torres Strait Islander cultures; and to Elders past and present. Aboriginal and Torres Strait Islander peoples should be aware that this website may contain images or names of people who have since passed away.

All content on the JR Academy website, including course materials, logos, and information provided, is protected under Australian intellectual property laws. Unauthorized use, sale, distribution, reproduction, or modification is strictly prohibited. Violations may result in legal action. By accessing our website, you agree to respect our intellectual property. JR Academy Pty Ltd reserves all rights, including patents, trademarks, and copyrights. Any infringement will be subject to legal prosecution. View Terms of Service

© 2017-2026 JR Academy Pty Ltd. All rights reserved.

ABN 26621887572

HomeLearnCoursesCerts
  1. Home
  2. Learn
  3. Blog
  4. OpenHands 实战指南:开源 AI 编程 Agent — Planning Mode 实战:先规划,再执行
JR Academy · BlogCareer insights

OpenHands 实战指南:开源 AI 编程 Agent — Planning Mode 实战:先规划,再执行

OpenHands 2026 新功能:Plan Mode + Code Mode 双模式工作流,用 PLAN.md 把模糊需求变成可审核的执行计划,避免 AI 走错方向

Published2026-12-01
Reading time1 min
Author

Contents

  • 为什么需要"先规划"
  • 如何开启
  • PLAN.md 的结构
  • 什么情况用 Plan Mode,什么情况直接 Code
  • 写出好的 Plan 提示
  • 审核计划,拒绝"听话但走错路的 AI"
  • 已知限制

为什么需要"先规划"

把一个模糊的需求直接丢给 OpenHands——比如"重构用户认证模块"——它会立刻开始动文件,等你发现方向不对时,可能已经改了十几个文件。

Planning Mode 解决的就是这个问题。2026 年 3 月(v1.6.0),OpenHands 引入了独立的 Planning Agent,把工作流拆成两步:

Plan Mode → 生成 PLAN.md → 你审核确认 → Code Mode → 按计划执行

类比真实团队协作:相当于你先写 Design Doc,Review 通过后再开始开发,而不是边写边猜。

如何开启

在 OpenHands Web GUI 右上角有模式切换:Plan ↔ Code。

默认是 Code Mode(直接执行)。切换到 Plan Mode 后:

  1. 输入你的任务描述
  2. Planning Agent 读取项目代码库(只读,不修改任何文件)
  3. 如果任务描述有模糊点,它会先提问澄清
  4. 生成 PLAN.md 保存在工作区
  5. 你确认计划后,切回 Code Mode 按计划执行

Plan Mode 目前支持 Cloud 版和 Docker v1.7+ 的 GUI,CLI 暂不支持。

PLAN.md 的结构

以"给注册流程加邮箱验证"为例,Planning Agent 生成的计划大致如下:

# 计划:用户注册邮箱验证

## 目标
用户注册后收到验证邮件,24 小时内点击链接完成验证,否则账号禁用。

## 当前状态
- `src/auth/register.ts`:已有注册逻辑,无邮箱验证步骤
- `src/models/User.ts`:缺少 `emailVerified`、`verificationToken` 字段
- 已有 SendGrid 依赖(`package.json`)

## 变更计划

### 步骤 1:数据库迁移
修改 `prisma/schema.prisma`,User 表新增三个字段:
- `emailVerified Boolean @default(false)`
- `verificationToken String?`
- `tokenExpiry DateTime?`

### 步骤 2:邮件服务
新建 `src/services/email.ts`,封装 `sendVerificationEmail(to, token)` 函数

### 步骤 3:注册流程
修改 `src/auth/register.ts`:
1. 注册后生成随机 token
2. 存入 DB,设 24h 过期
3. 调邮件服务发验证链接

新增 `GET /auth/verify?token=xxx` endpoint

### 步骤 4:测试
- 单元测试:token 生成逻辑、邮件服务 mock
- 集成测试:完整注册 → 验证流程

## 不改的部分
- 登录流程
- 密码重置
- 第三方 OAuth 登录
- 前端 UI(仅后端逻辑改动)

这份计划让你能在代码动之前就判断:它要改的文件对不对?有没有漏掉什么?有没有边界情况没考虑到?

什么情况用 Plan Mode,什么情况直接 Code

适合 Plan Mode 直接 Code Mode 更快
改动跨 5 个以上文件 小改动(加一个函数、改一行配置)
涉及数据库迁移 你自己知道要改什么
你对代码库不熟 明确的 bug 修复(有清晰的复现步骤)
有架构决策需要确认 写单元测试
需求本身模糊、有分支选择 生成样板代码

经验法则:如果你自己都不确定要改哪些文件,先 Plan。

写出好的 Plan 提示

Planning Agent 的输出质量完全取决于你的输入。同样的任务,描述方式不同,计划质量差异很大。

差的提示:

重构认证系统

Planning Agent 面对这种描述只能猜,计划会很泛泛。

好的提示:

我要把用户认证从 JWT 换成 server-side session + Redis。

现状:
- 用 jsonwebtoken 生成 JWT,存在客户端 localStorage
- /api/auth/login、/api/auth/logout、/api/auth/refresh 三个接口

目标:
- 换成 express-session + Redis,session 存服务端
- 保持这三个接口的请求/响应格式不变(前端不改)
- 加 session 过期时间 24h

不动的部分:
- Google/GitHub OAuth 登录逻辑
- 密码加密方式
- 用户数据模型

先分析改动范围,写出 PLAN.md,确认后我们再开始改代码。

有效提示包含:当前状态 + 目标状态 + 明确的边界(不改什么)。

审核计划,拒绝"听话但走错路的 AI"

PLAN.md 生成后,重点检查这几项:

审核 checklist:
✅ 改动文件列表是否完整、有没有漏的
✅ 步骤顺序是否合理(比如先迁移 DB 再改业务逻辑)
✅ "不改的部分"有没有正确识别边界
✅ 测试策略是否覆盖主要场景
❌ 有没有过度设计(计划一个简单功能却要引入新框架)
❌ 有没有不必要的破坏性改动

发现问题?直接在 Plan Mode 里说出修改意见,Planning Agent 会更新计划。满意后再切 Code Mode。

这个 Review 环节是 Planning Mode 最核心的价值——人做架构判断,AI 做执行,而不是把决策也甩给 AI。

已知限制

  • 计划生成后只能整体重新生成,不支持局部编辑
  • 超大型 monorepo(50+ 个目录)分析阶段可能需要 2-3 分钟
  • 如果任务本身需要运行代码才能判断方案(比如性能优化),Plan Mode 帮助有限——这类任务更适合直接 Code Mode + 实验驱动
Author
Share or copy the link
← Previous articleOpenHands 实战指南:开源 AI 编程 Agent — 常见问题、定价与选型建议Next article →OpenHands 实战指南:开源 AI 编程 Agent — Automations 与成本追踪:让 Agent 定期自动跑

Related articles

USYD 医疗初创盘点、网络平台注意义务法案、全身 MRI 广告研究

2026-12-02

UQ 皮肤癌在线硕士开办 20 周年、中澳绿色钢铁对话、HIV 预防提醒

2026-12-02

UNSW iFire 2.3 火场模拟系统、AI 卵巢癌预后研究、艺术家与 AI 版权调查

2026-12-02

ANS-C01 退役倒计时 29 天 · AIB-C01 Beta $50 新认证上线 · MLA-C02 Beta 报名开放

2026-12-02

Amazon开放首个自研大模型Ergo,代理作弊率实测差距悬殊,Anthropic格密码结果暂无现实威胁

2026-12-02

GitHub Copilot 实战指南 — Copilot AI Code Review:30 秒让 AI 帮你审 PR,三档深度随需切换

2026-12-01
View all articles →

Done reading? Next steps

Not sure what to learn next? Tell us where you are

Tell us what you do now and where you want to go. See your gaps in skills, evidence, experience, expression and positioning, and what to work on first. No sign-in needed.

Compare with my situation
  • SkillAI Engineer Bootcamp13 weeks, 12 Theory + 13 Practice live classes. You build one Agent system across Context, RAG, Tools, Memory and production Evals. Built for Applied AI and Agent Engineer roles.See the program →
  • PositioningLearning roadmaps by roleFrontend, backend, data, AI and more, laid out stage by stage in the order to learn them.All roadmaps →
  • ExpressionTry an AI mock interviewPick a role and run a mock interview to practise explaining your experience and projects.Practise now →

Not sure what to do next?

Take this page's topic with you and see where your gaps are.

Compare with my situation
JR Academy
AI learning for the global Chinese community
BootcampsFree resourcesLearn AICareer coaching
精选推荐
AI Career Impact Map
Assess career exposure and explore transition paths and learning options
Popular tool
AI & Data Bootcamps
Build your skills through structured courses and hands-on projects
Popular courses
1:1 Career Coaching
Work with an experienced mentor on your resume and interview preparation
Career coaching
Custom Corporate Training
AI training tailored to your team
Business services
Popular tags
Vibe CodingAI codingCursorClaudeJob searchPromptFrontend developmentBackend development
Subscribe to updates

Receive AI learning resources, technical tutorials and career advice by email.

We respect your privacy and do not send spam.