Initial commit: KingClawArmy AI Agent Team spec v4
Pure OpenClaw architecture for 15-17 agent team covering quant research, marketing, content, and engineering. Includes org structure, role definitions, collaboration patterns, scheduling, memory architecture, Discord integration, rollout plan, and JSON schemas. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
412
docs/spec_v3_schemas.md
Normal file
412
docs/spec_v3_schemas.md
Normal file
@@ -0,0 +1,412 @@
|
||||
# KingClawArmy - 第八部分:JSON Schema
|
||||
|
||||
> 基於 v2 schema 更新,新增會議相關 schema
|
||||
> 所有 schema 只保留格式模板,不放假資料
|
||||
|
||||
---
|
||||
|
||||
## 8.1 共用欄位
|
||||
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"project_id": "<string>",
|
||||
"agent_id": "<string>",
|
||||
"role": "<string>",
|
||||
"timestamp": "<ISO-8601 string>",
|
||||
"status": "<pending|running|pass|revise|block|done|cancelled>",
|
||||
"input_version": "<string>"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 8.2 管理層 Schema
|
||||
|
||||
### Task_Spec.json(CEO/COO 產出)
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"project_id": "<string>",
|
||||
"agent_id": "ceo_coo",
|
||||
"role": "ceo_coo",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"status": "<pending|running|done>",
|
||||
"goal": "<string>",
|
||||
"success_criteria": ["<string>"],
|
||||
"routes": [
|
||||
{
|
||||
"agent_id": "<string>",
|
||||
"subtask": "<string>",
|
||||
"required_output": "<string>",
|
||||
"collaboration_mode": "<task_handoff|meeting>"
|
||||
}
|
||||
],
|
||||
"priority": "<low|medium|high>",
|
||||
"meeting_required": "<boolean>",
|
||||
"meeting_type": "<meeting_quant_debate|meeting_strategy_review|meeting_cross_team_sync|null>",
|
||||
"notes": ["<string>"]
|
||||
}
|
||||
```
|
||||
|
||||
### Final_Decision_Packet.json(CEO/COO 產出)
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"project_id": "<string>",
|
||||
"agent_id": "ceo_coo",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"status": "done",
|
||||
"summary": "<string>",
|
||||
"options": [
|
||||
{
|
||||
"name": "<string>",
|
||||
"description": "<string>",
|
||||
"pros": ["<string>"],
|
||||
"cons": ["<string>"],
|
||||
"risk_level": "<low|medium|high>"
|
||||
}
|
||||
],
|
||||
"recommended_option": "<string>",
|
||||
"review_verdict": "<pass|revise|block>",
|
||||
"meeting_conclusions": ["<string>"],
|
||||
"decision_needed": ["<string>"]
|
||||
}
|
||||
```
|
||||
|
||||
### Meeting_Summary.json(秘書產出)
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"project_id": "<string>",
|
||||
"agent_id": "secretary",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"meeting_type": "<string>",
|
||||
"topic": "<string>",
|
||||
"participants": ["<agent_id>"],
|
||||
"key_points": ["<string>"],
|
||||
"consensus": "<string>",
|
||||
"disagreements": ["<string>"],
|
||||
"action_items": [
|
||||
{
|
||||
"owner": "<agent_id>",
|
||||
"task": "<string>",
|
||||
"deadline": "<ISO-8601|null>"
|
||||
}
|
||||
],
|
||||
"unresolved": ["<string>"]
|
||||
}
|
||||
```
|
||||
|
||||
### State_Diff.json(秘書產出)
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"agent_id": "secretary",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"added": ["<string>"],
|
||||
"changed": ["<string>"],
|
||||
"removed": ["<string>"]
|
||||
}
|
||||
```
|
||||
|
||||
### Review_Report.json(審查員產出)
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"agent_id": "reviewer",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"reviewed_agent_id": "<string>",
|
||||
"reviewed_output_type": "<string>",
|
||||
"verdict": "<pass|revise|block>",
|
||||
"issues": [
|
||||
{
|
||||
"severity": "<low|medium|high>",
|
||||
"category": "<string>",
|
||||
"evidence": "<string>",
|
||||
"required_fix": "<string>"
|
||||
}
|
||||
],
|
||||
"revise_count": "<number>",
|
||||
"recommend_meeting": "<boolean>",
|
||||
"notes": "<string>"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 8.3 量化研究 Schema
|
||||
|
||||
### Finance_Research_Brief.json
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"agent_id": "finance_researcher",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"sources": [
|
||||
{
|
||||
"title": "<string>",
|
||||
"url": "<string>",
|
||||
"published_at": "<ISO-8601>",
|
||||
"source_type": "<news|blog|forum|official>",
|
||||
"summary": "<string>",
|
||||
"confidence": "<number 0-1>",
|
||||
"dedupe_key": "<string>"
|
||||
}
|
||||
],
|
||||
"macro_summary": "<string>",
|
||||
"conflicts": ["<string>"],
|
||||
"takeaways": ["<string>"]
|
||||
}
|
||||
```
|
||||
|
||||
### Market_Structure_Report.json
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"agent_id": "market_structure_researcher",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"timeframes_used": ["<string>"],
|
||||
"structure_summary": ["<string>"],
|
||||
"liquidity_zones": ["<string>"],
|
||||
"poi_candidates": ["<string>"],
|
||||
"mss_signals": ["<string>"],
|
||||
"bias": "<bullish|bearish|neutral|unclear>",
|
||||
"confidence": "<number 0-1>",
|
||||
"notes": ["<string>"]
|
||||
}
|
||||
```
|
||||
|
||||
### Bullish_Research_Report.json
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"agent_id": "bullish_researcher",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"bull_case": ["<string>"],
|
||||
"supporting_evidence": ["<string>"],
|
||||
"expected_edge": ["<string>"],
|
||||
"invalidations": ["<string>"],
|
||||
"conviction_level": "<low|medium|high>"
|
||||
}
|
||||
```
|
||||
|
||||
### Bearish_Research_Report.json
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"agent_id": "bearish_researcher",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"bear_case": ["<string>"],
|
||||
"supporting_evidence": ["<string>"],
|
||||
"risk_warnings": ["<string>"],
|
||||
"trade_rejection_reasons": ["<string>"],
|
||||
"conviction_level": "<low|medium|high>"
|
||||
}
|
||||
```
|
||||
|
||||
### Quant_Strategy_Spec.json(含風控)
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"agent_id": "quant_strategist",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"strategy_hypothesis": ["<string>"],
|
||||
"entry_rules": ["<string>"],
|
||||
"exit_rules": ["<string>"],
|
||||
"risk_control": {
|
||||
"position_sizing": ["<string>"],
|
||||
"stop_rules": ["<string>"],
|
||||
"take_profit_rules": ["<string>"],
|
||||
"max_drawdown": "<string>",
|
||||
"max_concurrent_positions": "<number>"
|
||||
},
|
||||
"bias_checks": ["<string>"],
|
||||
"meeting_based": "<boolean>",
|
||||
"meeting_id": "<string|null>"
|
||||
}
|
||||
```
|
||||
|
||||
### Backtest_Delivery.json
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"agent_id": "quant_engineer",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"implementation_type": "<pine|python|both>",
|
||||
"rules_implemented": ["<string>"],
|
||||
"data_used": ["<string>"],
|
||||
"assumptions": ["<string>"],
|
||||
"results_summary": {
|
||||
"winrate": "<number>",
|
||||
"expectancy": "<number>",
|
||||
"max_drawdown": "<number>",
|
||||
"sharpe_ratio": "<number>",
|
||||
"total_trades": "<number>",
|
||||
"period": "<string>"
|
||||
},
|
||||
"artifacts": ["<string>"],
|
||||
"bias_warnings": ["<string>"],
|
||||
"handoff_notes": ["<string>"]
|
||||
}
|
||||
```
|
||||
|
||||
### Data_Analysis_Report.json
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"agent_id": "data_analyst",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"report_type": "<daily|weekly|backtest_analysis|ad_hoc>",
|
||||
"kpi_summary": ["<string>"],
|
||||
"insights": ["<string>"],
|
||||
"anomalies": ["<string>"],
|
||||
"recommendations": ["<string>"]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 8.4 行銷 & 內容 Schema
|
||||
|
||||
### Market_Research_Brief.json / Market_Analysis_Report.json
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"agent_id": "market_researcher",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"report_type": "<brief|analysis>",
|
||||
"sources": [
|
||||
{
|
||||
"title": "<string>",
|
||||
"url": "<string>",
|
||||
"summary": "<string>",
|
||||
"confidence": "<number 0-1>"
|
||||
}
|
||||
],
|
||||
"pain_points": ["<string>"],
|
||||
"competitor_patterns": ["<string>"],
|
||||
"trend_signals": ["<string>"],
|
||||
"takeaways": ["<string>"]
|
||||
}
|
||||
```
|
||||
|
||||
### Brand_Strategy_Plan.json / Growth_Strategy_Plan.json
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"agent_id": "strategy_director",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"plan_type": "<brand|growth>",
|
||||
"usp": ["<string>"],
|
||||
"target_audience": ["<string>"],
|
||||
"core_messages": ["<string>"],
|
||||
"campaign_direction": ["<string>"],
|
||||
"funnel_plan": ["<string>"],
|
||||
"test_plan": ["<string>"]
|
||||
}
|
||||
```
|
||||
|
||||
### Ads_Performance_Report.json
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"agent_id": "ads_analyst",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"performance_summary": ["<string>"],
|
||||
"diagnosis": ["<string>"],
|
||||
"optimization_suggestions": ["<string>"],
|
||||
"alerts": ["<string>"]
|
||||
}
|
||||
```
|
||||
|
||||
### Copywriting_Pack.json
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"agent_id": "copywriter",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"content_type": "<ad_copy|video_script|both>",
|
||||
"hooks": ["<string>"],
|
||||
"bodies": ["<string>"],
|
||||
"ctas": ["<string>"],
|
||||
"video_sections": [
|
||||
{
|
||||
"scene": "<number>",
|
||||
"message": "<string>",
|
||||
"duration_seconds": "<number>"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Static_Creative_Brief.json / Storyboard_Brief.json
|
||||
```json
|
||||
{
|
||||
"task_id": "<string>",
|
||||
"agent_id": "creative_director",
|
||||
"timestamp": "<ISO-8601>",
|
||||
"brief_type": "<static|storyboard>",
|
||||
"visual_direction": ["<string>"],
|
||||
"must_include": ["<string>"],
|
||||
"asset_specs": ["<string>"],
|
||||
"shots": [
|
||||
{
|
||||
"scene": "<number>",
|
||||
"visual": "<string>",
|
||||
"motion": "<string>",
|
||||
"caption": "<string>"
|
||||
}
|
||||
],
|
||||
"style_notes": ["<string>"]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 8.5 新增:會議相關 Schema
|
||||
|
||||
### Meeting_Request.json(發起會議)
|
||||
```json
|
||||
{
|
||||
"meeting_id": "<string>",
|
||||
"meeting_type": "<meeting_quant_debate|meeting_strategy_review|meeting_cross_team_sync|meeting_daily_premarket|custom>",
|
||||
"topic": "<string>",
|
||||
"requested_by": "<agent_id>",
|
||||
"participants": ["<agent_id>"],
|
||||
"moderator": "<agent_id>",
|
||||
"input_context": ["<schema_name>"],
|
||||
"max_rounds": "<number>",
|
||||
"stop_condition": "<string>",
|
||||
"discord_channel": "<string>"
|
||||
}
|
||||
```
|
||||
|
||||
### Meeting_Conclusion.json(會議結論)
|
||||
```json
|
||||
{
|
||||
"meeting_id": "<string>",
|
||||
"meeting_type": "<string>",
|
||||
"topic": "<string>",
|
||||
"participants": ["<agent_id>"],
|
||||
"moderator": "<agent_id>",
|
||||
"total_rounds": "<number>",
|
||||
"conclusion": "<string>",
|
||||
"consensus_reached": "<boolean>",
|
||||
"key_arguments": [
|
||||
{
|
||||
"agent_id": "<string>",
|
||||
"position": "<string>",
|
||||
"key_points": ["<string>"]
|
||||
}
|
||||
],
|
||||
"action_items": [
|
||||
{
|
||||
"owner": "<agent_id>",
|
||||
"task": "<string>"
|
||||
}
|
||||
],
|
||||
"dissenting_opinions": ["<string>"],
|
||||
"next_steps": ["<string>"]
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user