feat(cli): add plan subcommand#11
Merged
Merged
Conversation
- 在 root 命令中注册新的 plan 子命令 - 实现 plan 命令的核心逻辑,包括任务解析和执行规划 - 添加可执行计划构建功能,支持机器可读输出格式 - 实现编辑表面验证机制,确保改动范围可控 - 提供多种输出格式支持(JSON、可执行、人类可读) - 集成风险评估和命令执行策略 - 支持不同类型任务的自动化规划(HTTP、gRPC、能力接入等)
spelens-gud
approved these changes
Jun 15, 2026
Anniext
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
nucleus planCLI subcommand that classifies requested tasks, proposes contract-first edit surfaces, reports blocked edits, and emits human-readable or machine-readable planning output.It also refreshes the
contractsubmodule pointer frombd52725to924d1bband adds tests for plan output, blocked edits, pretty JSON, and thehello-httpexample.Type
Contract / Manifest Impact
api/errors.yamlchangednucleus.yamlchangedAdditional impact:
contractsubmodule updated frombd52725to924d1bb.Verification
Note:
go run ./cmd/nucleus verify --dir example/hello-http --jsoncurrently exits non-zero because this branch does not wire averifysubcommand;nucleus --helplistsdescribe,lint,plan, andvalidate.Risk
Low rollout risk for existing flows because this adds a new CLI subcommand and only wires it into the root command. Main review focus should be the new task classification and edit-surface heuristics, plus the updated
contractsubmodule pointer.