[PF-22] Add planforge model command for interactive mode/provider/model/effort-or-reasoning selection - #24
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Purpose
Add a
planforge modelsubcommand that interactively selects mode (planner/implementer), provider, model, and effort (Claude) or reasoning (Codex), then updatesplanforge.json. Model and option lists are loaded frompackages/core/models.json.Description
planforge model— TUI flow: Mode → Provider (skipped when only one) → Model → Effort (Claude) or Reasoning (Codex). All steps use Up/Down + Enter; no left/right keys.packages/core/models.jsondefines modes,modeProviders, and per-providermodels,effort,reasoning. Shipped via core package (Nodefiles, Python wheel force-include).getModelsJsonPath()(cli-js), Pythonget_models_json_path()(cli-py). Fallback topackages/core/models.jsonwhen the package path is missing (e.g. monorepo dev).effortis written (noreasoning); for Codex onlyreasoning(noeffort). Role block is replaced entirely so the other field is removed.process.exit(0)/sys.exit(0)./i(implement) is documented to run in the foreground so output streams in the agent terminal; completion is summarized or errors are returned (no “start in background and end turn”).Files changed / added
packages/core/models.json(new),package.json(files),pyproject.toml(force-include)src/commands/model.ts(new),src/utils/paths.ts(getModelsJsonPath),src/index.ts(model command)planforge/commands/model.py(new),planforge/utils/paths.py(get_models_json_path),planforge/cli.py(model command),pyproject.toml(readchar)templates/cursor/rules/workflow.mdc,.cursor/rules/workflow.mdc(implement foreground wording)How to test
planforge model(Node CLI:pnpm run buildinpackages/cli-jsfirst if needed).planforge.jsonis updated for the selected mode withprovider,model, and eithereffortorreasoning(not both).Updated planforge.json: planner -> claude / claude-opus-4-6 (effort: high)).planforge initand check that.cursor/rules/workflow.mdcstill describes/ias running in the foreground.Review Requirement
getModelsJsonPath/get_models_json_pathand fallback topackages/core/models.jsonwhen used from monorepo.Additional Info