docs: LLM执行协议开发规范+可复用JSON schema
- docs/llm-execution-protocol.md: 从重评流程提取的通用协议(输入/prompt/解析/校验/写入/错误处理) - specs/schemas/reassess-output.json: 重评LLM输出节标题schema - specs/schemas/trade-capture-output.json: 截图识别LLM输出schema - 可复用组件: _section_line/snapshot_strategy_history/write_holding_strategy/门禁模式
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"description": "重评 LLM 输出的节标题格式(parse_response 使用)",
|
||||
"sections": [
|
||||
{"name": "综合结论", "field": "signal", "type": "enum", "values": ["买入","关注","观望","卖出","止盈","持有","弱势持有","可加仓","可买入"]},
|
||||
{"name": "买入区间", "field": "entry", "type": "range", "constraint": "下沿<上沿<下沿x3"},
|
||||
{"name": "建议止损", "field": "stop_loss", "type": "number", "constraint": "必须低于买入区下沿"},
|
||||
{"name": "建议止盈", "field": "take_profit", "type": "number", "constraint": "必须高于买入区上沿"},
|
||||
{"name": "操作建议", "field": "action_advice", "type": "string", "max_length": 200},
|
||||
{"name": "建议仓位", "field": "position", "type": "percentage", "constraint": "1-30%,仅买入信号时填写"},
|
||||
{"name": "策略判断", "field": "strategy_judge", "type": "enum", "values": ["维持原策略","修改参数","策略失效需更换"]},
|
||||
{"name": "策略失效理由", "field": "strategy_reason", "type": "string", "required_if": "strategy_judge≠维持原策略"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"description": "交易截图识别 LLM 输出格式",
|
||||
"sections": [
|
||||
{"name": "交易动作", "field": "action", "type": "enum", "values": ["买入","卖出"]},
|
||||
{"name": "股票代码", "field": "code", "type": "string", "constraint": "6位数字"},
|
||||
{"name": "股票名称", "field": "name", "type": "string"},
|
||||
{"name": "交易数量", "field": "shares", "type": "integer", "constraint": "必须>0"},
|
||||
{"name": "交易价格", "field": "price", "type": "number", "constraint": "必须>0,与现价偏差±10%"},
|
||||
{"name": "交易时间", "field": "time", "type": "datetime", "format": "YYYY-MM-DD HH:MM"}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user