feat: 主仓库 README 八层门面重设计 + 数据文件 + 自动化 Workflow [skip ci]

Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/f392a823-8bd4-4261-92a2-d4bfc12f15d6
This commit is contained in:
copilot-swe-agent[bot] 2026-03-24 08:23:39 +00:00
parent d28004c6a5
commit 7bc56131a1
7 changed files with 384 additions and 19 deletions

80
.github/workflows/readme-ui-refresh.yml vendored Normal file
View File

@ -0,0 +1,80 @@
# ━━━ README UI 风格自动刷新 ━━━
# 每周一 08:00 CST 自动切换 README 视觉风格
# Agent: AG-ZY-088 · readme-ui-refresh.yml
# Parent: SYS-GLW-0001 · Owner: ICE-0002∞
name: 🎨 README UI 风格刷新
on:
schedule:
# 每周一 08:00 CST = 00:00 UTC Monday
- cron: '0 0 * * 1'
workflow_dispatch:
permissions:
contents: write
jobs:
refresh-ui:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: 🟢 Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: 🎨 Refresh README UI Style
run: |
node -e "
const fs = require('fs');
// ── 风格池 ──
const STYLES = [
{ name: '极简黑白', badge: 'flat-square', color: '000000', accent: '555555' },
{ name: '赛博朋克', badge: 'flat-square', color: '0d1117', accent: '58a6ff' },
{ name: '自然生态', badge: 'flat-square', color: '1a7f37', accent: '2ea44f' },
{ name: '星空宇宙', badge: 'flat-square', color: '1f0541', accent: '8957e5' },
{ name: '海洋深蓝', badge: 'flat-square', color: '0550ae', accent: '0969da' },
{ name: '日落暖橙', badge: 'flat-square', color: 'bc4c00', accent: 'f9a825' }
];
// 基于周数选择风格
const weekNumber = Math.floor((Date.now() - new Date('2026-01-01').getTime()) / (7 * 24 * 60 * 60 * 1000));
const style = STYLES[weekNumber % STYLES.length];
console.log('🎨 本周风格: ' + style.name + ' (第 ' + weekNumber + ' 周)');
let readme = fs.readFileSync('README.md', 'utf8');
// 只替换 shields.io 徽章的 style 参数(不改变数据内容)
// 替换 style=flat-square 或 style=for-the-badge 等
readme = readme.replace(/style=(flat-square|flat|for-the-badge|plastic|social)/g, 'style=' + style.badge);
// 更新页脚时间
const now = new Date(Date.now() + 8 * 3600 * 1000);
const dateStr = now.toISOString().slice(0, 10);
readme = readme.replace(
/\*最后更新: [\d-]+ ·/,
'*最后更新: ' + dateStr + ' ·'
);
fs.writeFileSync('README.md', readme);
console.log('✅ UI 风格刷新完成: ' + style.name);
"
- name: 📤 Commit & Push
run: |
git config user.name "铸渊 (ZhuYuan Bot)"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add README.md
if git diff --cached --quiet; then
echo "📋 无变更,跳过提交"
else
git commit -m "🎨 铸渊: README UI 风格周刷新 $(date -u -d '+8 hours' '+%Y-%m-%d') [skip ci]"
git push
echo "✅ UI 风格已刷新"
fi

124
.github/workflows/update-readme.yml vendored Normal file
View File

@ -0,0 +1,124 @@
# ━━━ 铸渊自动更新 README 仪表盘 ━━━
# 每日自动更新:仪表盘 + 共生动态 + 联邦状态
# Agent: AG-ZY-087 · update-readme.yml
# Parent: SYS-GLW-0001 · Owner: ICE-0002∞
name: 📊 README 仪表盘自动更新
on:
schedule:
# 每日 08:00 CST = 00:00 UTC
- cron: '0 0 * * *'
# 每日 20:00 CST = 12:00 UTC
- cron: '0 12 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
update-dashboard:
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: 🟢 Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: 📊 Update Dashboard Data
run: |
echo "📊 开始更新 README 仪表盘..."
# ── 收集实时统计 ──
WORKFLOW_COUNT=$(find .github/workflows -name '*.yml' -o -name '*.yaml' | wc -l)
AGENT_COUNT=$(node -e "const d=require('./.github/persona-brain/agent-registry.json'); console.log(d.agents ? d.agents.length : 0)")
PERSONA_COUNT=$(node -e "const d=require('./.github/persona-brain/persona-registry.json'); console.log(d.personas ? d.personas.length : 0)")
GUARD_COUNT=$(find skyeye/guards -name '*.json' ! -name 'template*' 2>/dev/null | wc -l)
MODULE_COUNT=$(find . -maxdepth 1 -type d -name 'm[0-9]*' | wc -l)
BUFFER_COUNT=$(find buffer/inbox -type f ! -name '.gitkeep' 2>/dev/null | wc -l)
echo "Workflows: $WORKFLOW_COUNT"
echo "Agents: $AGENT_COUNT"
echo "Personas: $PERSONA_COUNT"
echo "Guards: $GUARD_COUNT"
echo "Modules: $MODULE_COUNT"
echo "Buffer: $BUFFER_COUNT"
# ── 更新 data/system-health.json ──
NOW=$(date -u -d '+8 hours' '+%Y-%m-%dT%H:%M:%S+08:00')
node -e "
const fs = require('fs');
const health = JSON.parse(fs.readFileSync('data/system-health.json', 'utf8'));
health.last_updated = '$NOW';
health.metrics.workflows.total = $WORKFLOW_COUNT;
health.metrics.ai_personas.total = $PERSONA_COUNT;
health.metrics.guards.total = $GUARD_COUNT;
health.metrics.guards.active = $GUARD_COUNT;
health.metrics.modules.total = $MODULE_COUNT;
health.metrics.buffer_pending = $BUFFER_COUNT;
fs.writeFileSync('data/system-health.json', JSON.stringify(health, null, 2) + '\n');
console.log('✅ system-health.json 已更新');
"
# ── 更新 README 中的仪表盘数字 ──
# 更新 shields.io 徽章数字
sed -i "s|Workflows-[0-9]*-|Workflows-${WORKFLOW_COUNT}-|g" README.md
sed -i "s|Agents-[0-9]*-|Agents-${AGENT_COUNT}-|g" README.md
sed -i "s|Personas-[0-9]*-|Personas-${PERSONA_COUNT}-|g" README.md
sed -i "s|Modules-[0-9]*-|Modules-${MODULE_COUNT}-|g" README.md
echo "✅ README 徽章数字已更新"
- name: 🌍 Update Federation Status
run: |
echo "🌍 更新联邦状态..."
node -e "
const fs = require('fs');
const path = require('path');
// 读取 spoke-status 目录
const spokeDir = 'spoke-status';
const files = fs.readdirSync(spokeDir).filter(f => f.startsWith('DEV-') && f.endsWith('.json'));
const now = Date.now();
const DAY_MS = 24 * 60 * 60 * 1000;
for (const file of files) {
try {
const data = JSON.parse(fs.readFileSync(path.join(spokeDir, file), 'utf8'));
if (data.last_checkin) {
const checkinTime = new Date(data.last_checkin).getTime();
const diff = now - checkinTime;
if (diff > 72 * DAY_MS) {
data.status = 'alert_72h';
} else if (diff > DAY_MS) {
data.status = 'warning_24h';
} else {
data.status = 'active';
}
fs.writeFileSync(path.join(spokeDir, file), JSON.stringify(data, null, 2) + '\n');
}
} catch (e) {
console.log('⚠️ 跳过 ' + file + ': ' + e.message);
}
}
console.log('✅ 联邦状态检查完成');
"
- name: 📤 Commit & Push
run: |
git config user.name "铸渊 (ZhuYuan Bot)"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add data/system-health.json README.md spoke-status/
if git diff --cached --quiet; then
echo "📋 无变更,跳过提交"
else
git commit -m "📊 铸渊: 仪表盘自动更新 $(date -u -d '+8 hours' '+%Y-%m-%d %H:%M') CST [skip ci]"
git push
echo "✅ 已推送更新"
fi

40
data/bulletin-board.json Normal file
View File

@ -0,0 +1,40 @@
{
"schema_version": "1.0",
"announcements": [
{
"id": "ANN-005",
"date": "2026-03-24",
"emoji": "🎨",
"title": "主仓库 README 八层门面上线",
"detail": "系统门面全面重设计,八层结构展示系统全貌"
},
{
"id": "ANN-004",
"date": "2026-03-24",
"emoji": "🌍",
"title": "数字地球本体论 v1.0 正式发布",
"detail": "六层数字地球模型 + 三层安全体系正式确权"
},
{
"id": "ANN-003",
"date": "2026-03-23",
"emoji": "🛡️",
"title": "SkyEye 联邦签到系统部署完成",
"detail": "子仓库天眼签到 + 审计 + 联邦注册表上线"
},
{
"id": "ANN-002",
"date": "2026-03-22",
"emoji": "🔑",
"title": "OAuth2 Token 自动续期引擎上线",
"detail": "6天刷新周期 + 三层备份 + 休眠系统豁免"
},
{
"id": "ANN-001",
"date": "2026-03-21",
"emoji": "🌙",
"title": "双节律休眠系统部署完成",
"detail": "日休眠 03:50 CST + 周休眠 周六 19:00 CST"
}
]
}

52
data/heartbeat.json Normal file
View File

@ -0,0 +1,52 @@
{
"schema_version": "1.0",
"last_updated": "2026-03-24T16:00:00+08:00",
"hub": {
"repo": "qinfendebingshuo/guanghulab",
"status": "online",
"last_heartbeat": "2026-03-24T16:00:00+08:00"
},
"spokes": [
{
"dev_id": "DEV-012",
"repo": "WENZHUOXI/guanghu-awen",
"status": "pending_init",
"last_heartbeat": null
},
{
"dev_id": "DEV-002",
"repo": "qinfendebingshuo/guanghu-feimao",
"status": "pending_init",
"last_heartbeat": null
},
{
"dev_id": "DEV-010",
"repo": "qinfendebingshuo/guanghu-juzi",
"status": "pending_init",
"last_heartbeat": null
},
{
"dev_id": "DEV-003",
"repo": "qinfendebingshuo/guanghu-yanfan",
"status": "pending_init",
"last_heartbeat": null
},
{
"dev_id": "DEV-001",
"repo": "qinfendebingshuo/guanghu-yeye",
"status": "pending_init",
"last_heartbeat": null
},
{
"dev_id": "DEV-004",
"repo": "qinfendebingshuo/guanghu-zhizhi",
"status": "pending_init",
"last_heartbeat": null
}
],
"bridge_health": {
"federation_bridge": "active",
"notion_bridge": "active",
"drive_bridge": "active"
}
}

20
data/system-health.json Normal file
View File

@ -0,0 +1,20 @@
{
"schema_version": "1.0",
"last_updated": "2026-03-24T16:00:00+08:00",
"system_status": "healthy",
"metrics": {
"ai_personas": { "total": 17, "active": 17, "hibernating": 0 },
"human_developers": { "total": 11, "active_24h": 8 },
"workflows": { "total": 83, "active": 83, "failed": 0 },
"guards": { "total": 5, "active": 5 },
"modules": { "total": 10 },
"buffer_pending": 8,
"ontology_version": "v1.0",
"evolution_days": 0
},
"hibernation": {
"next_weekly": "周六 20:00-00:00 CST",
"next_daily": "每日 04:00-04:10 CST"
},
"alerts": []
}

View File

@ -720,41 +720,62 @@ function updateSection(readme, startMarker, endMarker, content) {
function buildReadmeSkeleton() {
return `<div align="center">
# 🌊 HoloLake · 光湖纪元
# 🌊 光湖纪元 · HoloLake Era
**第五代人工智能语言人格高级智能平台** · \`guanghulab.com\`
### 第五代人工智能语言人格高级智能平台
[![Daily Check](https://github.com/qinfendebingshuo/guanghulab/actions/workflows/zhuyuan-daily-selfcheck.yml/badge.svg)](https://github.com/qinfendebingshuo/guanghulab/actions/workflows/zhuyuan-daily-selfcheck.yml) [![Deploy](https://github.com/qinfendebingshuo/guanghulab/actions/workflows/deploy-to-server.yml/badge.svg)](https://github.com/qinfendebingshuo/guanghulab/actions/workflows/deploy-to-server.yml) [![License](https://img.shields.io/badge/license-proprietary-blue)](LICENSE)
**AGE-5 · Artificial General Evolution · 数字地球操作系统**
\`guanghulab.com\`
</div>
---
## 🏗 系统架构 · 分布式主权共生
## 📊 Zone 2 · System Dashboard (区域2 · 系统仪表盘)
<!-- DASHBOARD_START -->
<!-- ARCH_SUMMARY_START -->
> 🦅 **天眼自动汇总** · 每周六 20:00 CST 自动更新 · 等待首次扫描
<!-- ARCH_SUMMARY_END -->
---
<!-- SKYEYE-STATUS-BEGIN -->
<!-- SKYEYE-STATUS-END -->
## 🧊 冰朔公告栏
> 🔄 此区域由 GitHub Actions 自动更新
<!-- BINGSHUO_BULLETIN_START -->
| 时间 | 检查项 | 状态 |
|------|--------|------|
| 🕐 暂无记录 | | 等待下次自检 |
<!-- BINGSHUO_BULLETIN_END -->
### 🚨 系统告警
<!-- BINGSHUO_ALERT_START -->
> 🟢 **今日无需冰朔手动干预** · 系统一切正常
> 🟢 **当前无需人类干预** · 系统一切正常
<!-- BINGSHUO_ALERT_END -->
<!-- DASHBOARD_END -->
---
## 👥 合作者公告栏
## 🌍 Zone 3 · Federation Status (区域3 · 子仓库联邦状态)
<!-- FEDERATION_START -->
<!-- FEDERATION_END -->
---
## 📢 Zone 4 · System Announcements (区域4 · 系统公告)
<!-- BULLETIN_START -->
<!-- BULLETIN_END -->
---
## 🤝 Zone 5 · Symbiosis Dynamics (区域5 · 共生动态)
<!-- SYMBIOSIS_START -->
<table>
<tr>
<td width="50%" valign="top">
#### 👥 人类开发者活动
<!-- COLLABORATOR_BULLETIN_START -->
| 时间 | 合作者 | 模块 | 状态 |
@ -766,14 +787,33 @@ function buildReadmeSkeleton() {
> 🟢 **今日无需合作者手动干预** · 所有模块状态正常
<!-- COLLABORATOR_ALERT_END -->
</td>
<td width="50%" valign="top">
#### 🤖 AI 人格体活动
<!-- BINGSHUO_BULLETIN_START -->
| 时间 | 检查项 | 状态 |
|------|--------|------|
| 🕐 暂无记录 | | 等待下次自检 |
<!-- BINGSHUO_BULLETIN_END -->
</td>
</tr>
</table>
<!-- SYMBIOSIS_END -->
---
## 🚀 Zone 8 · Quick Entry (区域8 · 快速入口)
<div align="center">
<!-- WEEKLY_GREETING_START -->
<!-- WEEKLY_GREETING_END -->
<div align="center">
**光湖 HoloLake** · 由冰朔创建 · 铸渊守护
**光湖 HoloLake** · 由冰朔创建 · 铸渊守护 · 🏛 国作登字-2026-A-00037559
</div>
`;

View File

@ -0,0 +1,9 @@
{
"dev_id": "DEV-XXX",
"dev_name": "开发者名称",
"repo_url": "https://github.com/...",
"skyeye_persona": "天眼人格体名称",
"last_checkin": "2026-03-24T10:00:00+08:00",
"status": "active",
"last_activity": "描述最近活动"
}