Skip to content

feat(cli): add plan subcommand#11

Merged
nucleuskit merged 1 commit into
mainfrom
feat/plan
Jun 15, 2026
Merged

feat(cli): add plan subcommand#11
nucleuskit merged 1 commit into
mainfrom
feat/plan

Conversation

@nucleuskit

Copy link
Copy Markdown
Owner

Summary

Adds a new nucleus plan CLI 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 contract submodule pointer from bd52725 to 924d1bb and adds tests for plan output, blocked edits, pretty JSON, and the hello-http example.

Type

  • Bug fix
  • Feature
  • Documentation
  • Refactor
  • Build or CI

Contract / Manifest Impact

  • No public contract or manifest impact
  • OpenAPI changed
  • Protobuf changed
  • api/errors.yaml changed
  • nucleus.yaml changed
  • Generated files refreshed

Additional impact: contract submodule updated from bd52725 to 924d1bb.

Verification

go test ./... -> passed: 25 tests in 6 packages
go test ./... -race -count=1 -> passed: 25 tests in 6 packages
go run ./cmd/nucleus validate --dir example/hello-http -> OK, 0 errors, 0 warnings
go run ./cmd/nucleus validate --dir example/hello-http --json -> ok=true
go run ./cmd/nucleus lint --dir example/hello-http -> OK, findings: 0
go run ./cmd/nucleus --dir example/hello-http plan --task "新增 HTTP 接口" --json -> ok=true, blocked_edits=[]

Note: go run ./cmd/nucleus verify --dir example/hello-http --json currently exits non-zero because this branch does not wire a verify subcommand; nucleus --help lists describe, lint, plan, and validate.

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 contract submodule pointer.

- 在 root 命令中注册新的 plan 子命令
- 实现 plan 命令的核心逻辑,包括任务解析和执行规划
- 添加可执行计划构建功能,支持机器可读输出格式
- 实现编辑表面验证机制,确保改动范围可控
- 提供多种输出格式支持(JSON、可执行、人类可读)
- 集成风险评估和命令执行策略
- 支持不同类型任务的自动化规划(HTTP、gRPC、能力接入等)
@nucleuskit nucleuskit requested a review from spelens-gud June 15, 2026 11:05
@nucleuskit nucleuskit requested a review from Anniext June 15, 2026 11:16
@nucleuskit nucleuskit merged commit 9267c5e into main Jun 15, 2026
4 checks passed
@nucleuskit nucleuskit deleted the feat/plan branch June 15, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants