Repository navigation
Spec-driven change from a spec file - #25
Closed
dev-agentic-platform[bot] wants to merge 3 commits into
Closed
dev-agentic-platform[bot] wants to merge 3 commits into
dev-agentic-platform[bot] wants to merge 3 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… and regression coverage
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.
Agents specified, planned, built and reviewed this change from a spec file; the specification and the change were approved at gates before this pull request was opened. The specification, plan and tasks are under specs/. Review it as you would any change: agents can be wrong.
Spec file:
gilded_rose_new_product_business_rules.mdSummary
Adds a Mature Cheese product to the proposed code only. The original code is untouched. It is matched by exact name only. Quality rises by 1 while
sellIn > 0and by 2 whensellIn <= 0, and it is capped at 50 and never goes below 0.sellIndrops by 1 per update.Requirements met
sellIndecreases by 1 per update.sellIn > 0, +2 whensellIn <= 0. The check usessellInbefore the decrement.Quality.Increase(n), which does the clamping. I did not readQualityitself, so the clamping is taken from the engineer's report.Mature Cheesematches. Similar names fall back to the standard rule.sellInand quality changes happen only inside the update.Changes by file
src/Core/ProposedCode/Domain/ItemKind.cs: adds aMatureCheesekind and maps"Mature Cheese"to it inFromName.src/Core/ProposedCode/Domain/ItemMaturingPolicy.cs: adds aMatureCheesecase to the switch and a separateMatureMatureCheesemethod, so the rule is isolated and easy to test.tests/Core.Tests/ProposedCode/Domain/ItemKindTests.cs: tests exact and similar-name mapping.tests/Core.Tests/ProposedCode/Domain/ItemMaturingPolicyTests.cs: tests the sell-by cases, quality boundaries, invalid imported values, repeated updates, and regression of existing products.tests/Core.Tests/ProposedCode/ItemMaturationServiceTests.cs: tests returned values, input immutability, mixed inventories over consecutive updates, and existing-product regressions.How to check
Run
dotnet testand confirm the newProposedCodetests pass. The acceptance examples to look for are:The engineer could not run the tests in their environment, so the tests have not been run.