Drop closing blanks, honor primary_driver, catalog data-services SKUs
All checks were successful
Deploy Skill to OCI / deploy (push) Successful in 23s

- oci_deck_gen / oci_bizcase_gen: stop appending the Thank You + Oracle
  logo-only closing slides at the end of every generated deck.
- oci_bizcase_gen: Business Drivers now reads primary_driver at the
  drivers-level and at the top level, and renders natural-language values
  verbatim (only snake_case enum tokens are Title-cased). A spec-provided
  drivers.items / additional / secondary list replaces the hardcoded
  "Financial Impact of Inaction" + "Operational Impact" fallback cards.
- oci-sku-catalog.yaml: add data_services category with the four real
  Big Data Service SKUs (B91128/B91129/B91130/B93555) plus EST-DS-NOTEBOOK,
  EST-DS-MODEL, EST-DF-SPARK as estimate placeholders (OCI Data Science /
  Data Flow have no dedicated SKUs in the public pricing API — they are
  billed via the underlying compute shape).
- oci_bom_gen: resolver now prints a stderr warning and tags estimate/
  unknown line items with an explicit note; the xlsx writer renders
  "other" category items under an "Uncategorized — confirm SKUs" section
  at the end instead of silently dropping them.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
root
2026-04-22 12:34:37 -03:00
parent 490072a4b7
commit fc550c14bb
4 changed files with 134 additions and 29 deletions

View File

@@ -637,23 +637,56 @@ class BusinessCaseDeckGenerator(OraclePresBase):
# Slide 3: Business Drivers
drivers_data = bc.get("drivers", {})
if drivers_data:
# Accept primary_driver at the top level as well (common user shape)
top_primary = pick(bc, "primary_driver", "main_driver")
# Accept a plain string or list for drivers
if isinstance(drivers_data, str):
drivers_data = {"primary": drivers_data}
elif isinstance(drivers_data, list):
drivers_data = {"items": drivers_data}
elif not isinstance(drivers_data, dict):
drivers_data = {}
if drivers_data or top_primary:
driver_statements = []
primary = pick(drivers_data, "primary")
urgency = pick(drivers_data, "urgency")
coi = drivers_data.get("cost_of_inaction", {})
primary = pick(drivers_data, "primary", "primary_driver", "main_driver") or top_primary
urgency = pick(drivers_data, "urgency", "why_now")
coi = drivers_data.get("cost_of_inaction", {}) or {}
if primary:
driver_statements.append(f"Primary Driver: {primary.replace('_', ' ').title()}\n{urgency}" if urgency else primary.replace('_', ' ').title())
financial = pick(coi, "financial")
operational = pick(coi, "operational")
strategic = pick(coi, "strategic")
if financial:
driver_statements.append(f"Financial Impact of Inaction\n{financial}")
if operational:
driver_statements.append(f"Operational Impact\n{operational}")
elif strategic:
driver_statements.append(f"Strategic Risk\n{strategic}")
primary_text = primary if isinstance(primary, str) else str(primary)
# Only rewrite snake_case enum tokens ("compliance_driven"); leave natural
# language intact so values like "Soberanía de datos + compliance regulatorio"
# render verbatim.
if "_" in primary_text and " " not in primary_text and len(primary_text) <= 40:
headline = f"Primary Driver: {primary_text.replace('_', ' ').title()}"
else:
headline = primary_text
driver_statements.append(f"{headline}\n{urgency}" if urgency else headline)
# Spec-provided additional cards take precedence over the inaction fallback
extra_items = pick_list(drivers_data, "items", "additional", "secondary", "cards")
for item in extra_items:
if isinstance(item, str) and item.strip():
driver_statements.append(item.strip())
elif isinstance(item, dict):
label = pick(item, "label", "headline", "title", "name")
desc = pick(item, "detail", "description", "text", "body")
if label and desc:
driver_statements.append(f"{label}\n{desc}")
elif label or desc:
driver_statements.append(label or desc)
if not extra_items:
financial = pick(coi, "financial")
operational = pick(coi, "operational")
strategic = pick(coi, "strategic")
if financial:
driver_statements.append(f"Financial Impact of Inaction\n{financial}")
if operational:
driver_statements.append(f"Operational Impact\n{operational}")
elif strategic:
driver_statements.append(f"Strategic Risk\n{strategic}")
if driver_statements:
gen.add_business_drivers_slide(driver_statements)
@@ -700,10 +733,6 @@ class BusinessCaseDeckGenerator(OraclePresBase):
next_steps=pick_list(rec, "next_steps"),
)
# Closing slides
prepared_by = pick(bc, "prepared_by", "author")
gen.add_closing_slide(name=prepared_by)
return gen