Add update command for a project's description and scores - #56
Merged
Merged
Conversation
A new `update <project-name>` shell command changes a project's description and/or any of its five scores; fields not given keep their current values. It rejects a call with nothing to change, an empty description, or a score outside 1-5, and reports an unknown name the same way `view` and `delete` do. ProjectService.updateProject builds the changed project and ProjectRepository.update replaces it in place, so it keeps its creation-order position, and persists it. The README lists the command with examples. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (performed inline in the same session; no independent reviewer was available):
Judgment notes (non-blocking):
Verdict: ready to merge. No protected paths are touched ( This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
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
update <project-name>shell command (UpdateProjectCommand) is added. It changes a project's description and/or any of its five scores through--description/-d,--impact/-i,--confidence/-c,--ease/-e,--reach/-rand--effort/-f. These are the same short flagscreateuses. Fields that are not given keep their current values, and the new ICE and RICE scores are printed.create. An unknown name is reported asProject not found: <name>, matchingviewanddelete.ProjectService.updateProjectbuilds the changed project, treating a null argument as "keep the current value".ProjectRepository.updateswaps it in at the same index, so the project keeps its place in creation order, and writes the JSON once.updateunder "Available commands" and gets an "Update Examples" section.updatecannot rename a project.Test plan
./gradlew test(JDK 21): 136 tests executed, 0 failures, 0 errors. The count comes from the summedbuild/test-results/test/*.xml.UpdateProjectCommandTest(7 tests) covers partial updates, the success message, keeping position among other projects, persistence to storage, nothing-to-update, empty description, out-of-range scores (high and low) leaving the project unchanged, and an unknown name.ProjectServiceTest(+3) covers updating only the given fields, distinct values on every field to catch transposed arguments, and an unknown name never reachingupdate.ProjectRepositoryTest(+2) covers in-place replacement with a single write, and an unknown name throwing without a write.app.projects.file:create, thenupdate Demo --impact 5 -d "New desc", thenview Demo, plusupdate Demo,update Demo -f 9andupdate Ghost -i 2. Each printed the expected output, which confirms the positional name and options parse in Spring Shell.Deferred issues
build.gradle. That file is on the dev loop's do-not-auto-merge list, so it needs its own human-reviewed PR.app.projects.fileinapplication.yaml, which is also on the do-not-auto-merge list.build.gradleand a decision about running the shell and the server together.Closes #21
This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson