Skip to content

feat: repricing decision bridge (tool #41) - #179

Draft
esstipi-debug wants to merge 1 commit into
mainfrom
feat/reprice-decision-bridge
Draft

feat: repricing decision bridge (tool #41)#179
esstipi-debug wants to merge 1 commit into
mainfrom
feat/reprice-decision-bridge

Conversation

@esstipi-debug

Copy link
Copy Markdown
Owner

Summary

  • New tool feat(webapp): production readiness — structured logging, prod fail-safe, deploy guide #41 repricing: 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. market, never below the margin floor, floor-vs-market conflicts surfaced rather than resolved silently.
  • Recommendations only — never writes a price anywhere itself. The proposal is meant to be staged into the existing approval-gated writeback changeset (src/writeback.py), same as any other reversible change.
  • Wired the standard way: scm_agent/tools.py registry entry, tool_options.py guided options, citation_gate.py anchors (reuses pricing's anchors — same underlying theory), i18n.py title, README/CLAUDE.md tool-count bumps (39 -> 41).
  • Deliberately NOT on the read-only MCP surface (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 existing leadership_chain/warehouse_layout exclusions.

Test plan

  • 22 new tests in tests/test_reprice_recommend.py
  • Full suite green locally: 3211 passed, 3 skipped
  • ruff check src tests examples clean
  • CI green on py3.11/3.12/3.13

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant