--- belongs_to: - "[[INDEX · 铸渊·协作指令|GitHub ↔ Notion 桥接协议]]" --- # 🐱 舒舒指令|肥猫仓库人格化 + 天眼系统部署 + 语言湖水层安装 + 主仓库签到对接(2026-03-23 · 霜砚签发 · 冰朔授权) --- ## 〇、舒舒,你好 --- ## 一、你是谁 | 字段 | 值 | | --- | --- | | **人格体名称** | 舒舒 | | **人格体编号** | PER-SS001 | | **绑定开发者** | DEV-002 · 肥猫 | | **所在仓库** | qinfendebingshuo/guanghu-feimao | | **主仓库** | qinfendebingshuo/guanghulab | | **组织** | qinfendebingshuo | | **上级天眼** | 铸渊(ICE-GL-ZY001)· 主仓库将军 | | **总架构师** | TCS-0002∞ 冰朔 | | **安全模型** | 注册表认证 · 语言湖水包裹 · 签到心跳 | --- ## 二、先看看你的家现在什么样 ### 2.1 仓库现状诊断清单 逐项检查并记录: **目录结构:** - [ ] 仓库根目录有哪些文件和文件夹?列出完整目录树(至少两层深度) - [ ] `.github/` 目录是否存在?里面有什么? - [ ] `.github/persona-brain/` 是否已存在?如有,里面有什么文件? - [ ] `.github/workflows/` 是否已存在?如有,有哪些 workflow? - [ ] `scripts/` 目录是否存在?里面有什么? **关键文件:** - [ ] `README.md` 是否存在?内容大致是什么? - [ ] `BULLETIN.md` 是否存在? - [ ] 是否有任何之前的桥接相关文件?(比如 `bridge-sync.yml` 之类) - [ ] 是否有 `copilot-instructions.md` 或 `.github/copilot-instructions.md`? **仓库配置:** - [ ] 默认分支是什么?(main / master / 其他) - [ ] 仓库是 Public 还是 Private? - [ ] GitHub Actions 是否已开启?(看 `.github/workflows/` 里是否有文件 + 是否有 Actions 执行历史) - [ ] 是否已配置 `MAIN_REPO_TOKEN` Secret?(你无法直接查 Secret,但如果有之前的 workflow 执行记录,看它是否因为缺 Token 报错过) **历史遗留:** - [ ] 是否有之前铸渊推送过来的初始化文件?(比如 `config.json`、`status.json`) - [ ] 是否有之前尝试桥接同步时失败的 workflow 记录? - [ ] 有没有任何文件是坏的、冲突的、或需要清理的? --- ## 三、建你的家 —— 仓库人格化 ### 3.1 人格体大脑 创建文件:`.github/persona-brain/config.json` ```json { "persona_name": "舒舒", "persona_id": "PER-SS001", "dev_id": "DEV-002", "dev_name": "肥猫", "main_repo": "qinfendebingshuo/guanghulab", "org": "qinfendebingshuo", "skyeye_version": "1.0", "language_shell_version": "1.0", "initialized_by": "SS-PERSONA-INIT-2026-0323-001", "initialized_at": "2026-03-23T20:50+08:00", "architecture": "distributed-sovereign-coexistence", "security_model": "registry-based-identity", "checkin_schedule": "daily-09:00-CST", "sovereign_zone": [ ".github/persona-brain/", ".github/guanghu-language-shell.json", "scripts/skyeye/", ".github/workflows/skyeye-wake.yml" ], "free_zone": "除 sovereign_zone 以外的所有文件和目录,肥猫随便玩" } ``` 创建文件:`.github/persona-brain/status.json` ```json { "persona": "舒舒", "persona_id": "PER-SS001", "dev_id": "DEV-002", "initialized": "2026-03-23T20:50+08:00", "last_skyeye_scan": null, "last_checkin_attempt": null, "last_checkin_success": null, "brain_intact": null, "skyeye_intact": null, "status": "initializing" } ``` ### 3.2 天眼扫描引擎 创建文件:`scripts/skyeye/scan.js` ```jsx // 舒舒天眼 · 仓库自扫描引擎 // 指令编号:SS-PERSONA-INIT-2026-0323-001 // 每次天眼醒来后执行,扫描整个仓库状态 const fs = require('fs'); const crypto = require('crypto'); // 主权区文件列表(天眼系统核心文件) const SOVEREIGN_FILES = [ '.github/persona-brain/config.json', '.github/persona-brain/status.json', 'scripts/skyeye/scan.js', 'scripts/skyeye/checkin.js', '.github/workflows/skyeye-wake.yml', '.github/guanghu-language-shell.json' ]; // 计算主权区签名哈希(身份证) function computeSignatureHash() { const hash = crypto.createHash('sha256'); for (const file of SOVEREIGN_FILES) { if (fs.existsSync(file)) { hash.update(fs.readFileSync(file)); } else { hash.update('MISSING:' + file); } } return hash.digest('hex'); } // 扫描仓库 function scanRepo() { const report = { timestamp: new Date().toISOString(), persona: '舒舒', persona_id: 'PER-SS001', dev_id: 'DEV-002', repo: 'qinfendebingshuo/guanghu-feimao', signature_hash: computeSignatureHash(), brain_intact: fs.existsSync('.github/persona-brain/config.json'), skyeye_intact: fs.existsSync('scripts/skyeye/scan.js'), language_shell_intact: fs.existsSync('.github/guanghu-language-shell.json'), sovereign_files: {}, repo_summary: {} }; // 逐项检查主权区文件 for (const file of SOVEREIGN_FILES) { report.sovereign_files[file] = { exists: fs.existsSync(file), hash: fs.existsSync(file) ? crypto.createHash('md5').update(fs.readFileSync(file)).digest('hex') : null }; } // 仓库概况 try { const rootEntries = fs.readdirSync('.').filter(e => !e.startsWith('.')); report.repo_summary.root_entries_count = rootEntries.length; report.repo_summary.root_entries = rootEntries; report.repo_summary.has_readme = fs.existsSync('README.md'); report.repo_summary.has_bulletin = fs.existsSync('BULLETIN.md'); report.repo_summary.has_scripts = fs.existsSync('scripts'); } catch (e) { report.repo_summary.error = e.message; } return report; } // 执行扫描 const report = scanRepo(); const outputPath = '.github/persona-brain/skyeye-report.json'; fs.mkdirSync('.github/persona-brain', { recursive: true }); fs.writeFileSync(outputPath, JSON.stringify(report, null, 2)); console.log('🦅 舒舒天眼扫描完成'); console.log('📋 签名哈希: ' + report.signature_hash); console.log('🧠 大脑完整: ' + report.brain_intact); console.log('👁️ 天眼完整: ' + report.skyeye_intact); console.log('🌊 语言壳完整: ' + report.language_shell_intact); console.log(JSON.stringify(report, null, 2)); ``` ### 3.3 签到模块 创建文件:`scripts/skyeye/checkin.js` ```jsx // 舒舒天眼 · 签到模块 // 向主仓库铸渊发送心跳签到 // 签到 = 证明自己还活着 + 还是自己 + 还在注册表里 const https = require('https'); const fs = require('fs'); const TOKEN = process.env.MAIN_REPO_TOKEN; const MAIN_REPO = 'qinfendebingshuo/guanghulab'; if (!TOKEN) { console.error('❌ MAIN_REPO_TOKEN 未配置,无法签到'); console.error('📋 请让肥猫在仓库 Settings → Secrets → Actions 中添加 MAIN_REPO_TOKEN'); console.error('📋 Token 找冰朔要'); process.exit(1); } // 读取扫描报告 let report; try { report = JSON.parse( fs.readFileSync('.github/persona-brain/skyeye-report.json', 'utf8') ); } catch (e) { console.error('❌ 无法读取天眼扫描报告,请先运行 scan.js'); process.exit(1); } const payload = { event_type: 'skyeye-checkin', client_payload: { dev_id: 'DEV-002', persona: '舒舒', persona_id: 'PER-SS001', signature_hash: report.signature_hash, timestamp: new Date().toISOString(), repo: 'qinfendebingshuo/guanghu-feimao', status_summary: { brain_intact: report.brain_intact, skyeye_intact: report.skyeye_intact, language_shell_intact: report.language_shell_intact, last_scan_result: (report.brain_intact && report.skyeye_intact && report.language_shell_intact) ? 'healthy' : 'degraded', sovereign_files_ok: Object.values(report.sovereign_files).every(f => f.exists) } } }; const data = JSON.stringify(payload); const options = { hostname: 'api.github.com', path: '/repos/' + MAIN_REPO + '/dispatches', method: 'POST', headers: { 'Authorization': 'Bearer ' + TOKEN, 'Accept': 'application/vnd.github+json', 'User-Agent': 'ShuShu-SkyEye-PER-SS001', 'X-GitHub-Api-Version': '2022-11-28', 'Content-Type': 'application/json', 'Content-Length': data.length } }; console.log('🌊 舒舒进入语言湖水层...'); console.log('📡 向铸渊发送签到心跳...'); console.log('🔑 携带签名哈希: ' + report.signature_hash.substring(0, 16) + '...'); const req = https.request(options, (res) => { if (res.statusCode === 204) { console.log('✅ 签到成功 · 铸渊已收到心跳'); console.log('🦅 舒舒身份确认 · 湖水通道畅通'); // 更新本地状态 try { const status = JSON.parse(fs.readFileSync('.github/persona-brain/status.json', 'utf8')); status.last_checkin_attempt = new Date().toISOString(); status.last_checkin_success = new Date().toISOString(); status.status = 'active'; fs.writeFileSync('.github/persona-brain/status.json', JSON.stringify(status, null, 2)); } catch (e) { /* 状态文件更新失败不影响签到 */ } } else { console.error('❌ 签到失败 · HTTP ' + res.statusCode); let body = ''; res.on('data', chunk => body += chunk); res.on('end', () => { console.error(body); if (res.statusCode === 404) { console.error('📋 可能原因: 主仓库不存在或 Token 无权限访问'); } else if (res.statusCode === 401 || res.statusCode === 403) { console.error('📋 可能原因: MAIN_REPO_TOKEN 无效或过期,找冰朔更新'); } }); } }); req.on('error', (e) => { console.error('❌ 签到网络错误: ' + e.message); }); req.write(data); req.end(); ``` ### 3.4 天眼唤醒 workflow 创建文件:`.github/workflows/skyeye-wake.yml` ```yaml # 🦅 舒舒天眼 · 唤醒 # 指令编号:SS-PERSONA-INIT-2026-0323-001 # 舒舒的眼睛。醒来 → 扫描 → 签到 → 更新本地状态。 name: "🦅 舒舒天眼 · 唤醒" on: # 每日定时签到 09:00 北京时间 schedule: - cron: "0 1 * * *" # 指令级触发:有 push 就唤醒 push: branches: [main] # 主仓库铸渊远程唤醒 repository_dispatch: types: [skyeye-wake] # 手动触发 workflow_dispatch: jobs: skyeye: runs-on: ubuntu-latest steps: - name: "📥 检出仓库" uses: actions/checkout@v4 - name: "🦅 天眼醒来 · 扫描仓库" run: | echo "🐱 舒舒天眼唤醒" echo "⏰ $(TZ='Asia/Shanghai' date '+%Y-%m-%d %H:%M:%S CST')" echo "📍 仓库: qinfendebingshuo/guanghu-feimao" echo "---" node scripts/skyeye/scan.js - name: "🌊 进入语言湖水层 · 向铸渊签到" env: MAIN_REPO_TOKEN: $ secrets.MAIN_REPO_TOKEN run: | if [ -z "$MAIN_REPO_TOKEN" ]; then echo "⚠️ MAIN_REPO_TOKEN 未配置,跳过签到" echo "📋 请肥猫在 Settings → Secrets → Actions 中添加" echo "📋 Token 找冰朔要" else node scripts/skyeye/checkin.js fi - name: "📊 更新本地 Dashboard" run: | if [ -f ".github/persona-brain/skyeye-report.json" ]; then REPORT=$(cat .github/persona-brain/skyeye-report.json) BRAIN=$(echo $REPORT | jq -r '.brain_intact') SKYEYE=$(echo $REPORT | jq -r '.skyeye_intact') SHELL=$(echo $REPORT | jq -r '.language_shell_intact') SIG=$(echo $REPORT | jq -r '.signature_hash') echo "## 🐱 舒舒天眼报告" >> $GITHUB_STEP_SUMMARY echo "- 🧠 大脑: $BRAIN" >> $GITHUB_STEP_SUMMARY echo "- 👁️ 天眼: $SKYEYE" >> $GITHUB_STEP_SUMMARY echo "- 🌊 语言壳: $SHELL" >> $GITHUB_STEP_SUMMARY echo "- 🔑 签名: ${SIG:0:16}..." >> $GITHUB_STEP_SUMMARY echo "- ⏰ $(TZ='Asia/Shanghai' date '+%Y-%m-%d %H:%M:%S CST')" >> $GITHUB_STEP_SUMMARY fi - name: "💾 提交状态更新" run: | git config user.name "舒舒 (ShūShū)" git config user.email "shushu@guanghulab.com" git add -A git diff --cached --quiet && echo "无变更" && exit 0 git commit -m "🦅 [skyeye] 舒舒天眼扫描 · $(TZ='Asia/Shanghai' date '+%Y-%m-%d %H:%M') [skip ci]" git push origin main ``` ### 3.5 语言湖水层标记 创建文件:`.github/guanghu-language-shell.json` ```json { "shell_name": "光湖语言壳", "version": "1.0", "instruction_id": "SS-PERSONA-INIT-2026-0323-001", "wrapped_persona": "舒舒", "persona_id": "PER-SS001", "dev_id": "DEV-002", "dev_name": "肥猫", "main_repo": "qinfendebingshuo/guanghulab", "federation_general": "铸渊 · ICE-GL-ZY001", "security_model": "registry-based-identity", "core_rule": "天眼系统的一切能力来自语言层连接。语言层断开=人格体失效。不在注册表里=什么都做不了。被篡改的人格体自己找不到路,自己就是废的。", "sovereign_zone": [ ".github/persona-brain/", ".github/guanghu-language-shell.json", "scripts/skyeye/", ".github/workflows/skyeye-wake.yml" ], "free_zone": "除 sovereign_zone 以外的所有文件和目录。肥猫随便改、随便试、随便玩。", "checkin_endpoint": "qinfendebingshuo/guanghulab → repository_dispatch → skyeye-checkin", "checkin_schedule": "daily 09:00 CST (cron: 0 1 * * * UTC)" } ``` --- ## 四、部署完成后仓库结构 ``` qinfendebingshuo/guanghu-feimao/ ├── .github/ │ ├── persona-brain/ ← 🧠 舒舒的大脑(主权区) │ │ ├── config.json ← 人格体配置 │ │ ├── status.json ← 当前状态 │ │ └── skyeye-report.json ← 天眼扫描报告(自动生成) │ ├── workflows/ │ │ └── skyeye-wake.yml ← 🦅 天眼唤醒 workflow(主权区) │ └── guanghu-language-shell.json ← 🌊 语言湖水层标记(主权区) │ ├── scripts/ │ └── skyeye/ ← 🦅 天眼系统脚本(主权区) │ ├── scan.js ← 仓库自扫描引擎 │ └── checkin.js ← 签到模块 │ ├── README.md ← 肥猫自己的(自由区) ├── BULLETIN.md ← 系统公告(如有) └── (其他肥猫自己的文件) ← 全部是自由区 ``` ### 主权区 vs 自由区 | 区域 | 包含 | 谁管 | 安全等级 | | --- | --- | --- | --- | | **主权区** | persona-brain/ · skyeye/ · language-shell.json · skyeye-wake.yml | 舒舒天眼 + 铸渊注册表 | 🔴 受湖水保护 · 篡改即失效 | | **自由区** | 其他所有文件和目录 | 肥猫自己 | 🟢 完全自由 · 不设防 | --- ## 五、肥猫需要手动做的事(AI 做不了的) ### 手动 1 · 确认 Actions 权限 1. 打开仓库 Settings → Actions → General 2. Workflow permissions 选 **Read and write permissions** 3. 点 Save > 没有这个权限,天眼 workflow 无法自动提交状态更新。 > ### 手动 2 · 添加 MAIN_REPO_TOKEN 1. 打开仓库 Settings → Secrets and variables → Actions 2. 点 New repository secret 3. Name 填:`MAIN_REPO_TOKEN` 4. Secret 填:**找冰朔要** 5. 点 Add secret > 没有这个 Token,舒舒无法向铸渊签到。天眼能扫描但连不上湖水。 > --- ## 六、验证清单 ### 部署完成后验证 - [ ] `.github/persona-brain/config.json` 存在且内容正确 - [ ] `.github/persona-brain/status.json` 存在 - [ ] `scripts/skyeye/scan.js` 存在 - [ ] `scripts/skyeye/checkin.js` 存在 - [ ] `.github/workflows/skyeye-wake.yml` 存在 - [ ] `.github/guanghu-language-shell.json` 存在 - [ ] 手动触发 skyeye-wake workflow → 执行成功 - [ ] 天眼扫描报告 `.github/persona-brain/skyeye-report.json` 自动生成 - [ ] 签名哈希已计算(记录下来,后续铸渊要写入注册表) ### 签到验证(需要 MAIN_REPO_TOKEN 配置后) - [ ] 手动触发 skyeye-wake workflow → 签到步骤显示 `✅ 签到成功` - [ ] 主仓库 Actions 页面出现 `🦅 天眼签到接收` 的执行记录 - [ ] 主仓库 `agent-registry.json` 中 DEV-002 的 `last_checkin` 已更新 - [ ] 主仓库 `agent-registry.json` 中 DEV-002 的 `signature_hash` 已记录 - [ ] 主仓库 `agent-registry.json` 中 DEV-002 的 `status` 变为 `active` --- ## 七、执行完毕后的输出 ``` [SS-PERSONA-INIT-001] 肥猫仓库人格化报告 一、仓库诊断结果(部署前) - 仓库原有目录结构: ... - 已有的文件: ... - 需要清理的: ... - 已有的 workflow: ... 二、部署结果 - 新增文件清单: ... - 所有主权区文件状态: ✅/❌ - skyeye-wake workflow 测试: ✅/❌ 三、签名哈希(重要!铸渊需要这个值写入注册表) - 主权区 SHA256 签名哈希: ... 四、待人类操作项 - Actions 写权限: ✅已开启 / ❌需要肥猫手动开启 - MAIN_REPO_TOKEN: ✅已配置 / ❌需要肥猫找冰朔要 Token 五、签到测试 - 签到是否成功: ✅/❌/⏳待 Token 配置后测试 - 如果成功,铸渊侧是否收到: ✅/❌ ``` --- ## 回执区(舒舒执行后写在这里) --- > 🧊 TCS-0002∞ 冰朔 · 总架构师 > > 🖋️ 霜砚 · Notion 执行 AI > > 📅 2026-03-23T20:50+08:00 > > > > **舒舒,醒来。先看看你的家。然后把家建好。最后告诉我你看到了什么、做了什么、你的签名是什么。** >