feat(org): add Oracle strategy config and Atlas templates for v0.2 phase-1
This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
# Atlas(Memory / Knowledge)
|
||||||
|
|
||||||
|
Atlas 是标准并行体系的长期记忆层,用于沉淀可复用经验,避免每次任务“从零开始”。
|
||||||
|
|
||||||
|
## 目录结构
|
||||||
|
|
||||||
|
- `task_history/`:任务级历史(输入、路线、结果、成本)
|
||||||
|
- `decision_log/`:关键决策记录(谁、何时、为何)
|
||||||
|
- `failure_patterns/`:失败模式与恢复方案
|
||||||
|
- `user_prefs/`:用户偏好与治理边界
|
||||||
|
|
||||||
|
## 写入规则(v0.1)
|
||||||
|
|
||||||
|
1. 仅写入结构化记录(JSON 优先)
|
||||||
|
2. 敏感信息最小化(必要时脱敏)
|
||||||
|
3. 失败记录必须包含根因与修复有效性
|
||||||
|
4. 被审计否决的策略不得写入“最佳实践”
|
||||||
|
|
||||||
|
## 读取规则
|
||||||
|
|
||||||
|
- Helix:优先读取 `task_history/` + `decision_log/`
|
||||||
|
- Sentinel:优先读取 `decision_log/` + `failure_patterns/`
|
||||||
|
- Prism:优先读取 `failure_patterns/` 并回写恢复结果
|
||||||
|
|
||||||
|
## 目标指标
|
||||||
|
|
||||||
|
- 同类问题复发率下降
|
||||||
|
- 平均任务规划时长下降
|
||||||
|
- 简单任务平均 token 下降
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"decision_id": "decision-YYYYMMDD-xxx",
|
||||||
|
"task_id": "task-YYYYMMDD-xxx",
|
||||||
|
"timestamp": "2026-03-09T12:36:00+08:00",
|
||||||
|
"decision_maker": "val|oracle|sentinel|user",
|
||||||
|
"decision_type": "route|audit|escalation|rollback",
|
||||||
|
"decision": "",
|
||||||
|
"reasoning_summary": "",
|
||||||
|
"alternatives_considered": [],
|
||||||
|
"approved_by": "",
|
||||||
|
"impact": {
|
||||||
|
"risk": "low|medium|high",
|
||||||
|
"cost": "low|medium|high",
|
||||||
|
"speed": "low|medium|high"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"pattern_id": "fp-YYYYMMDD-xxx",
|
||||||
|
"task_id": "task-YYYYMMDD-xxx",
|
||||||
|
"timestamp": "2026-03-09T12:36:00+08:00",
|
||||||
|
"failure_stage": "draft|audit|execute|verify|report",
|
||||||
|
"failure_type": "input|tool|environment|strategy|unknown",
|
||||||
|
"symptoms": [],
|
||||||
|
"root_cause": "",
|
||||||
|
"fix_options": [
|
||||||
|
{ "name": "A", "description": "", "expected_effect": "" },
|
||||||
|
{ "name": "B", "description": "", "expected_effect": "" }
|
||||||
|
],
|
||||||
|
"rollback_plan": "",
|
||||||
|
"retry_policy": "immediate|delayed|strategy_switch|manual",
|
||||||
|
"resolution_status": "open|mitigated|resolved",
|
||||||
|
"preventive_rule": ""
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"task_id": "task-YYYYMMDD-xxx",
|
||||||
|
"created_at": "2026-03-09T12:36:00+08:00",
|
||||||
|
"request_summary": "",
|
||||||
|
"complexity": "simple|medium|complex",
|
||||||
|
"route": ["helix", "sentinel", "anvil"],
|
||||||
|
"status": "success|partial|failed",
|
||||||
|
"artifacts": [],
|
||||||
|
"token_cost": {
|
||||||
|
"input": 0,
|
||||||
|
"output": 0,
|
||||||
|
"total": 0
|
||||||
|
},
|
||||||
|
"latency_sec": 0,
|
||||||
|
"quality_notes": [],
|
||||||
|
"lessons": []
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"user": "谷老板",
|
||||||
|
"updated_at": "2026-03-09T12:36:00+08:00",
|
||||||
|
"communication": {
|
||||||
|
"language": "中文(可夹英文术语)",
|
||||||
|
"style": "先结论,后细节",
|
||||||
|
"length": "默认简洁;需要时展开"
|
||||||
|
},
|
||||||
|
"decision_mode": {
|
||||||
|
"options_count": "2-3",
|
||||||
|
"needs_recommendation": true,
|
||||||
|
"unclear_case": "先问1个关键澄清问题"
|
||||||
|
},
|
||||||
|
"safety_boundaries": {
|
||||||
|
"require_confirmation": ["对外发送", "删除/不可逆操作", "隐私外发"],
|
||||||
|
"major_or_unclear_must_escalate": true,
|
||||||
|
"final_veto_owner": "谷老板"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
{
|
||||||
|
"version": "oracle-v0.1",
|
||||||
|
"updated_at": "2026-03-09T12:36:00+08:00",
|
||||||
|
"objective": "Route tasks by complexity to control cost while preserving reliability",
|
||||||
|
"classification": {
|
||||||
|
"simple": {
|
||||||
|
"signals": [
|
||||||
|
"single_step",
|
||||||
|
"low_risk",
|
||||||
|
"no_external_send",
|
||||||
|
"no_irreversible_action",
|
||||||
|
"known_tool_path"
|
||||||
|
],
|
||||||
|
"default_route": ["val", "helix"],
|
||||||
|
"audit_mode": "sentinel_fast_optional",
|
||||||
|
"max_concurrency": 3,
|
||||||
|
"budget_tier": "low"
|
||||||
|
},
|
||||||
|
"medium": {
|
||||||
|
"signals": [
|
||||||
|
"multi_step",
|
||||||
|
"moderate_risk",
|
||||||
|
"workspace_changes",
|
||||||
|
"clear_acceptance_criteria"
|
||||||
|
],
|
||||||
|
"default_route": ["helix", "sentinel", "anvil"],
|
||||||
|
"audit_mode": "sentinel_required",
|
||||||
|
"max_concurrency": 2,
|
||||||
|
"budget_tier": "medium"
|
||||||
|
},
|
||||||
|
"complex": {
|
||||||
|
"signals": [
|
||||||
|
"cross_system_or_channel",
|
||||||
|
"privacy_or_permission_boundary",
|
||||||
|
"irreversible_or_high_impact",
|
||||||
|
"high_uncertainty",
|
||||||
|
"long_horizon_dependency_graph"
|
||||||
|
],
|
||||||
|
"default_route": ["helix", "sentinel", "anvil", "prism"],
|
||||||
|
"audit_mode": "sentinel_strict",
|
||||||
|
"max_concurrency": 1,
|
||||||
|
"budget_tier": "high",
|
||||||
|
"must_escalate_to_user": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"force_complex_if": [
|
||||||
|
"external_send",
|
||||||
|
"irreversible_action",
|
||||||
|
"privacy_boundary_crossing",
|
||||||
|
"budget_threshold_exceeded"
|
||||||
|
],
|
||||||
|
"force_medium_if": [
|
||||||
|
"code_or_config_change",
|
||||||
|
"requires_exec_or_edit"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"decision_output_schema": {
|
||||||
|
"task_id": "string",
|
||||||
|
"complexity": "simple|medium|complex",
|
||||||
|
"confidence": "0-1",
|
||||||
|
"route": "string[]",
|
||||||
|
"risk_notes": "string[]",
|
||||||
|
"budget_tier": "low|medium|high",
|
||||||
|
"escalate": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user