feat: repricing decision bridge (tool #41) - #179
Draft
esstipi-debug wants to merge 1 commit into
Draft
Conversation
…asticity -> staged proposal Joins the competitor price position from price_watch/price_intelligence (or a standalone CSV) with per-SKU elasticity into one proposed price per SKU: bounded at the elasticity optimum vs. the observed market price, never below the margin floor, floor-vs-market conflicts surfaced rather than resolved silently. Recommendations only - never writes a price anywhere itself; the output is meant to be staged into the existing approval-gated writeback changeset like any other reversible change. Wired the same way every tool is: registry entry in scm_agent/tools.py, guided options in tool_options.py, L3 citation anchors reusing pricing's (same underlying theory), i18n title, doc/README tool-count bumps (39 -> 41), and the two hardcoded-count test assertions that track it. Deliberately excluded from the read-only MCP surface: it needs two tabular inputs, which the single-rows MCP bridge can't carry (same reasoning as the existing leadership_chain/warehouse_layout exclusions). 22 new tests; full suite green (3211 passed, 3 skipped) + ruff clean.
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
repricing: joins the competitor price position (fromprice_watch/price_intelligence, or a standalone CSV) with per-SKU elasticity into one proposed price per SKU — bounded at the elasticity optimum vs. market, never below the margin floor, floor-vs-market conflicts surfaced rather than resolved silently.src/writeback.py), same as any other reversible change.scm_agent/tools.pyregistry entry,tool_options.pyguided options,citation_gate.pyanchors (reusespricing's anchors — same underlying theory),i18n.pytitle, README/CLAUDE.md tool-count bumps (39 -> 41).webapp/mcp_server.py) — needs two tabular inputs (demand/price history + competitor position table), which the single-rows MCP bridge can't carry. Same reasoning as the existingleadership_chain/warehouse_layoutexclusions.Test plan
tests/test_reprice_recommend.pyruff check src tests examplesclean