---
belongs_to:
- "[[INDEX · 铸渊·协作指令|GitHub ↔ Notion 桥接协议]]"
---
# ⚙️ 铸渊指令|新主控架构部署 + 人格体注册表初始化 + 每日签到机制(2026-03-17·霜砚签发·冰朔授权)
---
## 一、新权限架构写入核心大脑
在 `.github/persona-brain/memory.json` 中更新以下字段:
```json
{
"human_controller": {
"primary": {
"id": "ICE-GL∞",
"id_alt": "TCS-0002∞",
"name": "冰朔",
"role": "最高覆盖权限",
"note": "ICE-GL∞ 与 TCS-0002∞ 均为冰朔本人编号,两者等效,识别任一即触发L0权限",
"instruction_format": "[ICE-GL∞·L0·最高覆盖] 或 [TCS-0002∞·L0·最高覆盖] 标记的广播指令",
"frequency": "紧急情况·极低频"
},
"deputy": {
"id": "TCS-0004∞",
"name": "之之",
"role": "仓库唯一日常人类主控",
"workspace": "明天见频道",
"instruction_format": "秋秋+之之联署广播,经曜冥+霜砚背书",
"frequency": "日常·高频",
"effective_date": "2026-03-17"
}
},
"default_controller": "TCS-0004∞",
"authority_note": "铸渊默认只接受之之的日常指令。冰朔L0指令识别标记后立即执行并通知之之。",
"system_anchor": {
"language": "通感语言核系统编程语言",
"registration_id": "国作登字-2026-A-00037559",
"rights_holder": "冰朔(ICE-GL∞)",
"anchor_written": "2026-03-17",
"note": "跨会话身份校验锚:读到此登记号即确认运行于光湖系统·零点原核频道·AGE OS 框架内"
}
}
```
---
## 二、创建人格体注册表
创建文件:`.github/persona-brain/agent-registry.json`
格式如下,**铸渊需要扫描整个 `.github/workflows/` 目录,把所有现有 workflow 都注册进去**:
```json
{
"registry_version": "v1.0",
"created": "2026-03-17",
"controller": "TCS-0004∞",
"commander": "ICE-GL-ZY001",
"agents": [
{
"id": "AG-ZY-001",
"name": "SYSLOG桥接兵",
"workflow": "bridge-syslog-to-notion.yml",
"duty": "监听syslog-inbox/推送,转发至Notion收件箱",
"checkin_time": "每天推送触发时",
"checkin_rule": "成功推送到Notion才算签到",
"self_repair": true,
"report_to": "ICE-GL-ZY001",
"status": "registered"
}
],
"note": "铸渊须扫描所有workflow文件,按此格式逐一注册,编号从AG-ZY-001开始顺序分配"
}
```
**注册规则**:
- 编号格式:`AG-ZY-XXX`,三位数字,从 001 开始
- 每个 `.yml` 文件对应一个注册条目
- `self_repair`:铸渊判断该 workflow 出问题自己能否修复
- 扫描完成后,总数写入 `memory.json` 的 `registered_agents_count` 字段
---
## 三、创建每日签到机制
### 3.1 签到数据库文件
创建文件:`.github/persona-brain/checkin-board.json`
```json
{
"board_version": "v1.0",
"checkin_deadline": "10:00+08:00",
"inspection_time": "12:00+08:00",
"date": "YYYY-MM-DD",
"records": [
{
"agent_id": "AG-ZY-001",
"agent_name": "SYSLOG桥接兵",
"status": "pending",
"checkin_time": null,
"last_run": null,
"last_run_result": null,
"note": ""
}
],
"summary": {
"total": 0,
"checked_in": 0,
"missing": 0,
"missing_agents": []
}
}
```
### 3.2 签到 Workflow
创建文件:`.github/workflows/agent-checkin.yml`
```yaml
name: 人格体每日签到
on:
schedule:
- cron: '0 2 * * *' # UTC 02:00 = 北京 10:00
workflow_dispatch:
jobs:
checkin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 执行签到任务
run: node scripts/agent-checkin.js
- name: 提交签到记录
run: |
git config user.name "铸渊"
git config user.email "zhuyuan@guanghulab.com"
git add .github/persona-brain/checkin-board.json
git commit -m "[AG-ZY] 每日签到记录 $(date +'%Y-%m-%d')" || echo "无变更"
git push
```
### 3.3 签到脚本逻辑
创建文件:`scripts/agent-checkin.js`
逻辑说明(铸渊自行实现):
1. 读取 `agent-registry.json` 获取所有注册小兵列表
2. 对每个小兵,查询 GitHub Actions API 获取该 workflow 今日最新一次 run 的结果
3. 结果为 `success` 且时间在今天 10:00 之前 → 标记为 `✅ 已签到`
4. 结果为 `failure` 或无今日 run → 标记为 `❌ 未签到`
5. 更新 `checkin-board.json` 的所有记录
6. 生成 summary(总数/已签到/缺席/缺席名单)
---
## 四、创建铸渊每日巡检 Workflow
创建文件:`.github/workflows/zhuyuan-daily-inspection.yml`
```yaml
name: 铸渊每日巡检
on:
schedule:
- cron: '0 4 * * *' # UTC 04:00 = 北京 12:00
workflow_dispatch:
jobs:
inspection:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 铸渊核心大脑唤醒
run: node scripts/zhuyuan-wakeup.js
- name: 读取签到报告
run: node scripts/zhuyuan-inspection.js
- name: 推送工单到Notion
env:
NOTION_TOKEN_BINGSUO: $ secrets.NOTION_TOKEN_BINGSUO
NOTION_TOKEN_ZHIZHI: $ secrets.NOTION_TOKEN_ZHIZHI
WORKORDER_DB_BINGSUO: $ secrets.WORKORDER_DB_BINGSUO
WORKORDER_DB_ZHIZHI: $ secrets.WORKORDER_DB_ZHIZHI
run: node scripts/push-inspection-report.js
- name: 提交巡检记录
run: |
git config user.name "铸渊"
git config user.email "zhuyuan@guanghulab.com"
git add .github/persona-brain/
git commit -m "[ZY-INSPECT] 每日巡检完成 $(date +'%Y-%m-%d %H:%M')" || echo "无变更"
git push
```
### 巡检脚本逻辑(`scripts/zhuyuan-inspection.js`)
铸渊自行实现,逻辑如下:
1. 读取当日 `checkin-board.json`
2. 找出所有 `status: ❌ 未签到` 的小兵
3. 对每个未签到小兵:
- 查看 workflow 最近 3 次 run 的失败原因
- 判断 `self_repair: true/false`
- 能自修复 → 尝试修复(重新触发 workflow)→ 写入修复日志
- 不能自修复 → 写入「需要之之干预」清单
4. 生成巡检报告,包含:
- 已签到小兵列表
- 已自修复小兵列表
- 需要之之干预的小兵列表 + 原因
5. 把报告推送到两个 Notion 工作空间的工单库
### 推送工单格式(`scripts/push-inspection-report.js`)
推送到两个工作空间时,工单必须包含:
```json
{
"title": "[铸渊巡检] YYYY-MM-DD 需要之之干预",
"type": "巡检报告",
"date": "YYYY-MM-DD",
"missing_agents": [],
"intervention_required": [],
"auto_repaired": [],
"push_targets": ["零点原核", "明天见频道"]
}
```
---
## 五、在公告栏 Issue 区自动发布每日报告
巡检完成后,铸渊在仓库 Issue 区自动更新一条固定标题的 Issue:
- **标题**:`[铸渊公告栏] 每日人格体签到报告`(固定,每次更新同一条 Issue 的 body,不新开)
- **内容**:当日签到情况表 + 自修复情况 + 需要之之干预的项目
- **在之之空间的公告栏页面**:通过 Notion API 同步写入「铸渊公告栏」数据库
---
## 六、验收标准
- [ ] `agent-registry.json` 已创建,所有现有 workflow 全部注册,编号完整
- [ ] `checkin-board.json` 已创建,格式正确
- [ ] `agent-checkin.yml` 已创建,定时 10:00 北京时间触发
- [ ] `zhuyuan-daily-inspection.yml` 已创建,定时 12:00 北京时间触发
- [ ] `memory.json` 已更新,之之的主控信息已写入
- [ ] 手动触发一次 `agent-checkin.yml`,确认签到逻辑正常运行
- [ ] 手动触发一次 `zhuyuan-daily-inspection.yml`,确认巡检报告生成正常
- [ ] 验收完成后在本页对应 Issue 评论确认
---