Four-Color Card Generation Skill (Tongzhengsi + Jianchayuan + Chengxiangfu)
How to Use
- Mainly invoked by the Tongzhengsi Worker to generate the blue card (facts) / green card (explanation).
- The yellow card (risk) is handed to the Jianchayuan for review of overclaiming; the red card (action) is handed to the Chengxiangfu to complete strategic recommendations.
- The four cards are uniformly recorded by the Taishige to ensure each card is traceable.
Input
markdown: Structured document produced by Mijuanfang parsing
intent: User intent / query objective
llm_available: Whether the LLM is available (affects the yellow card generation path)
Output
blue_card: Fact card—traceable statements, with source snippets
green_card: Explanation card—mechanism/background explanation of the facts
yellow_card: Risk card—overclaiming, uncertainty, and potential bias (reviewed by the Jianchayuan)
red_card: Action card—next-step recommendations (completed by the Chengxiangfu)
Dependencies
- LLM API (generates blue/green/red cards)
- Overclaiming detection rule set (provided by the Jianchayuan, used for the yellow card)
- Parsing confidence (from doc-parse; low confidence triggers a manual review flag)
Failure Handling
- LLM unavailable → degrade to the rule engine for card generation, with the yellow/red cards explicitly marked "LLM not enabled".
- Jianchayuan review timeout → the yellow card is temporarily delivered using the rule engine result, and marked
pending_review。
- Missing source → the corresponding fact is marked "no source" in the blue card, and no assertion is generated directly.
Reuse Value
- Methodology is general: scientific research analysis, financial research reports, and legal document analysis can all apply the four-color card framework.
- Strong auditability: each card carries its source and generation method, naturally fitting the observability/audit review dimensions of Agent Infra.
Semifinal code package execution (runnable package)
- Real entry point:
scripts/run_four_color_cards.py --stage {extract|review|propose}
- Mapping of the three subtasks:
extract → Tongzhengsi comm.tongzhengsi.TongZhengSiAgent(blue card: fact extraction)
review → Jianchayuan audit.jichayuan.JianChaYuanAgent(green card: Gap/explanation)
propose → Chengxiangfu strategy.chengxiangfu.ChengXiangFuAgent(red card: action recommendations)
- Run example:
python skills/four-color-cards/scripts/run_four_color_cards.py --stage extract
python skills/four-color-cards/scripts/run_four_color_cards.py --stage review
python skills/four-color-cards/scripts/run_four_color_cards.py --stage propose
- Artifacts:
examples/snse_survey/skill_outputs/four_color_<stage>.json
- Iron rule of traceability: the green card cites the blue card, and the red card cites the green/blue cards; nothing may be stored without a source (enforced by card_model).