Four-Color Card Generation Skill (Tongzhengsi + Jianchayuan + Chengxiangfu)
How to Use
- Mainly invoked by the Tongzhengsi Worker to generate blue cards (facts) / green cards (explanations).
- Yellow cards (risks) are handed to the Jianchayuan for review of overclaiming; red cards (actions) are 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 — a traceable statement, with source snippets attached
green_card: Explanation card — mechanism/background explanation of the facts
yellow_card: Risk card — overclaiming, uncertainty, and potential bias (reviewed by Jianchayuan)
red_card: Action card — next-step recommendations (completed by Chengxiangfu)
Dependencies
- LLM API (generates blue/green/red cards)
- Overclaiming detection rule set (provided by Jianchayuan, used for yellow cards)
- Parsing confidence (from doc-parse; low confidence triggers a manual review flag)
Failure Handling
- LLM unavailable → degrade to the rule engine to generate cards, and explicitly mark yellow/red cards as "LLM not enabled".
- Jianchayuan review timeout → yellow cards are temporarily delivered using rule engine results, and mark
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}
- Three subtask mappings:
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: green cards cite blue cards, red cards cite green/blue cards, and nothing may be stored without a source (enforced by card_model).