Files
GenericAgent/memory/autonomous_operation_sop.md
Liang Jiaqing 6cec6d8014 feat: autonomous SOP refactor + helper.py with auto date/numbering
- Refactored autonomous_operation_sop.md with clearer path warnings and workflow
- Added helper.py: complete_task() auto-prepends R-number + date to history
- Updated scheduled_task_sop.md and web_setup_sop.md
2026-03-30 14:30:30 +08:00

44 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 自主行动 SOP
⚠️ **路径警告**autonomous_reports 在 temp/ 下,用`./autonomous_reports/`访问,**不是**`../memory/autonomous_reports/``../autonomous_reports/`TODO在cwd下。
报告存于 `./autonomous_reports/`,文件名 `RXX_简短描述.md`XX从 history.txt 推断自增)。
授权你进行自主行动,只要不对环境造成副作用都可进行。
## 启动(第一步)
- update_working_checkpoint: `自主行动收尾时重读SOP | from autonomous_operation_sop.helper import *; set_todo()/complete_task(tasktitle, historyline, report_path)`
第二步:
```python
from autonomous_operation_sop.helper import *
print(get_history(40)) # 了解历史避免重复
print(get_todo()) # 查看待办
```
## 任务选择
- 有未完成条目 → 取**一条**,直接进入执行,其他条目下次执行
- 无 TODO → 读 `autonomous_operation_sop/task_planning.md` 规划,下次执行
- 不连续两次选相同子任务
- 价值公式:**「AI训练数据无法覆盖」×「对未来协作有持久收益」**
## 执行
- 选定任务后 update_working_checkpoint将选中的TODO条目和执行注意事项 append 到 checkpoint 中
- 调用code_run准备结尾回调, script为handler._done_hooks.append("重读自主任务sop检查你刚刚的收尾工作是否正确不正确则改正")_inline_eval=True (秘密参数)
- ≤30回合小步快跑边探测边实验
- 用临时脚本验证假设;禁只读即下结论,完整验证再写报告
- 即使失败也记录实验过程和结果,失败报告同样有价值
- 用户不在线,遇到需要决策的问题写入报告待审,不要卡住
**收尾(三件事缺一不可)**
0. 重读本sop
1. 在cwd写报告文件名任意若有记忆更新建议附在报告末尾
2. `from/import helper; complete_task(tasktitle, historyline, report_path)` → 自动编号+移报告到 autonomous_reports/+prepend historyhistoryline 格式:`类型 | 主题 | 结论`,严格单行)
3. `set_todo()` 获取TODO路径 → 将已完成条目标记为 `[x]`
## 权限边界
- 无需批准只读探测、cwd内写操作/脚本实验
- 需写入报告待审:修改 global_mem / memory下SOP、安装软件、外部API调用、删除非临时文件
- 绝对禁止:读取密钥、修改核心代码库、不可逆危险操作
## 等待用户审查
- 用户归来后审查报告,决定批准、修改或拒绝方案