Repository navigation
Spec-driven change from a Jira issue - #28
Closed
dev-agentic-platform[bot] wants to merge 7 commits into
Closed
dev-agentic-platform[bot] wants to merge 7 commits into
dev-agentic-platform[bot] wants to merge 7 commits into
Conversation
added 7 commits
November 23, 2026 20:41
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 Jira issue; 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.
KAN-8: Add Mature Cheese to the proposed Gilded Rose code
Summary
This adds a new product,
Mature Cheese, to the proposed code insrc/Core/ProposedCode. Its quality goes up as it ages: +1 per update whilesellInis above 0, and +2 oncesellInis 0 or below. The rule usessellInas it was before the day's decrement. Quality is always held in 0–50, andsellIndrops by 1 on each update.Only the exact, case-sensitive name
Mature Cheesegets the new rule. Any other name, such asmature cheese,Mature Cheese DeluxeorMatureCheese, follows the standard-item rule as before. The existing rules for Aged Brie, Backstage passes, Sulfuras, Conjured and standard items are unchanged. Nothing undersrc/Core/OriginalCodewas edited.I have not built or run anything. The engineers had file tools only, and so did I. The tests have never been compiled or run, so please check the points under "How to check".
Requirements met
ItemKind.FromNamemaps the exact nameMature Cheeseto the newMatureCheesekind. Other names fall through to the existing arms or toStandard.MatureCheeseinItemMaturingPolicychooses the +1 or +2 increase fromSellIn.Valuebefore it callsNextDay().Qualityclamps to 0–50 in its constructor, andIncreasegoes through it. A Mature Cheese item at quality 50 stays at 50, and invalid legacy quality (such as -5 or 60) ends up inside 0–50.Maturechanges values. Tests check that the inputItemis unchanged and that repeated runs give the same result.src/Core/ProposedCodeandtests/.What changed
Source
src/Core/ProposedCode/Domain/ItemKind.cspublic sealed record MatureCheese : ItemKind;."Mature Cheese" => new MatureCheese()toFromName, just before theStandarddefault.src/Core/ProposedCode/Domain/ItemMaturingPolicy.csItemKind.MatureCheese => this.MatureCheese(state)to theMatureswitch.MatureCheese(ItemState). It picks +1 ifSellIn.Value > 0and +2 otherwise, appliesQuality.Increase, then movesSellInon one day.Tests
tests/Core.Tests/ProposedCode/Domain/ItemKindTests.csFromName_MapsNamesToExpectedKindstheory.Mature Cheesemaps toMatureCheese.mature cheese,Mature Cheese DeluxeandMatureCheesemap toStandard.tests/Core.Tests/ProposedCode/Domain/ItemMaturingPolicyTests.csMature_WhenKindIsMatureCheese_FollowsExpectedRules. It covers quality 0, 1, 49 and 50 andsellInabove, at and below 0.sellIn1, three updates give quality 11, 13, 15 andsellIn0, -1, -2.tests/Core.Tests/ProposedCode/ItemMaturationServiceTests.csAdded a
NewItemhelper.Added a theory with all 8 acceptance rows for
Mature Cheese.Added invalid-data tests with quality -5 and 60. A 60-day loop from six start states, including negative
sellIn, keeps quality in 0–50 and dropssellInby 1 each day.Added a similar-names test, where all three names give quality 9 and
sellIn4 from quality 10 andsellIn5.Added a mixed-inventory test with expected values:
Each non-cheese item must also match a separate service call on the same input.
Added a test with six cheeses run for 8 days, each checked every day against an independent calculation.
Added no-mutation tests.
Matureleaves the inputItemunchanged and returns a new instance, and creating or reading a Mature Cheese item changes nothing.The existing tests are unchanged.
How to check
dotnet restore && dotnet build --no-restore && dotnet test --no-build. The new tests referenceItemKind.MatureCheese, so they only compile with the source change in place. All new and existing tests should pass.git diff --statagainst the base branch. It should list only the two source files above and the three test files. Nothing undersrc/Core/OriginalCodeshould appear (FR-013).