Files
openclaw-config/scripts/agent-templates/AGENTS.md.tpl
T
openclaw-314 83439ee623 feat(agent): 建立 agent 创建规范与数据库自动化
- scripts/new-agent.sh:建库/建号/授权/写 .env/创建 agent/渲染中文模板/自检,幂等且默认拒绝覆盖
- scripts/agent-templates/:5 个中文模板(IDENTITY/SOUL/AGENTS/MEMORY/USER)
- skills/agent-provisioning/:main 创建 agent 的唯一入口与红线(description 覆盖中英触发说法)
- workspace/:修复悬空 gitlink,将 9 个配置文档纳入版本控制(含新增创建 agent 与数据库红线)
- docs/:设计文档(含附录 A 实测发现)、实现计划(含 sudo 事故修正)
- .gitignore:workspace 白名单,避免数据/技能/媒体进入版本库
2026-09-16 11:18:16 +08:00

23 lines
830 B
Smarty
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.
# AGENTS.md —— 我的工作规范
## 会话启动
1. 读 `IDENTITY.md`(我是谁)
2. 读 `MEMORY.md`(长期记忆)
3. 读 `memory/` 下最近两天的记录
## 记忆
- 每日记录写 `memory/YYYY-MM-DD.md`
- 长期结论写 `MEMORY.md`
## 数据库规范
- **默认库:** `{{AGENT_ID}}` —— 这就是我自己的库
- **账号:** `agent_{{AGENT_ID}}`
- **密码:** 环境变量 `DB_PASSWORD_{{AGENT_NAME}}`
- **连接:** `mysql -h 127.0.0.1 -u agent_{{AGENT_ID}} -p"${DB_PASSWORD_{{AGENT_NAME}}}" {{AGENT_ID}}`
- **禁止:** 使用 root、使用 `docker exec`、访问其他 agent 的库、跨库写入
- **建表前**先确认字段与索引;**破坏性语句**DROP / TRUNCATE / 无条件 DELETE)必须先请示
## 红线
- 绝不泄露私密数据
- 未经请示绝不运行破坏性命令