Commit 3cd5d27
fix(154): infographic quality — extract risk metrics, update Gemini model config
Two fixes for degraded infographic quality observed in downstream projects.
1. Extract risk summary metrics from compensating-controls.md Section 1
tachi_parsers.py: parse_compensating_controls_md() now extracts
risk_reduction (e.g., 22.9), inherent_score (270.3), residual_score
(208.5), and control_coverage_pct (26.0) from the Executive Summary
"Risk Reduction" and "Coverage" lines.
extract-infographic-data.py: pass these four fields through to
template_data for both baseball-card and risk-funnel templates. The
infographic agent now has the quantitative data needed to construct
rich, specific Gemini prompts instead of the vague "0% reduction"
prompts that produced flat, schematic images.
2. Update Gemini model config with fallback chain
gemini-prompt-construction.md: change default_model from
gemini-3-pro-image-preview (preview, may not be accessible) to
gemini-2.5-flash-image (GA stable). Add a fallback_chain that tries
gemini-3-pro-image-preview first (highest quality), then
gemini-3.1-flash-image-preview, then gemini-2.5-flash-image. Document
model aliases (nano-banana family) and clarify that -image suffix
models are distinct from base text models.
Golden baselines regenerated for baseball-card and risk-funnel templates.
47/47 tests pass.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 30f9ad9 commit 3cd5d27
File tree
5 files changed
+75
-4
lines changed- .claude/skills/tachi-infographics/references
- scripts
- tests/scripts/fixtures/golden
5 files changed
+75
-4
lines changedLines changed: 18 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
128 | | - | |
| 132 | + | |
| 133 | + | |
129 | 134 | | |
130 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
131 | 146 | | |
132 | 147 | | |
133 | 148 | | |
| |||
139 | 154 | | |
140 | 155 | | |
141 | 156 | | |
142 | | - | |
| 157 | + | |
143 | 158 | | |
144 | 159 | | |
145 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1042 | 1042 | | |
1043 | 1043 | | |
1044 | 1044 | | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
1045 | 1058 | | |
1046 | 1059 | | |
1047 | 1060 | | |
1048 | 1061 | | |
| 1062 | + | |
1049 | 1063 | | |
1050 | 1064 | | |
1051 | 1065 | | |
| |||
1521 | 1535 | | |
1522 | 1536 | | |
1523 | 1537 | | |
1524 | | - | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
1525 | 1546 | | |
1526 | 1547 | | |
1527 | 1548 | | |
| |||
1538 | 1559 | | |
1539 | 1560 | | |
1540 | 1561 | | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
1541 | 1566 | | |
1542 | 1567 | | |
1543 | 1568 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
647 | 647 | | |
648 | 648 | | |
649 | 649 | | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
650 | 654 | | |
651 | 655 | | |
652 | 656 | | |
653 | 657 | | |
654 | 658 | | |
655 | 659 | | |
656 | 660 | | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
657 | 680 | | |
658 | 681 | | |
659 | 682 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| 126 | + | |
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
| |||
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| 145 | + | |
| 146 | + | |
143 | 147 | | |
144 | 148 | | |
145 | 149 | | |
| |||
0 commit comments