refactor: 将默认看板生成文件名从 index.html 改为 board.html

- 避免在用户现有前端工程中意外冲掉项目入口 index.html
- 同步更新 package.json、SKILL.md 与 Pages 部署工作流

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
czm
2026-09-08 17:14:41 +08:00
co-authored by Claude
parent 89d074e275
commit 004b446de5
5 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -31,7 +31,8 @@ jobs:
- name: Prepare Pages Directory
run: |
mkdir -p _site
cp index.html _site/
cp board.html _site/
cp board.html _site/index.html
cp demo.html _site/ 2>/dev/null || true
cp -r assets _site/ 2>/dev/null || true
+3 -3
View File
@@ -115,7 +115,7 @@ Status: <状态>
npm run verify-agent-note-tree # 校验目录合法性、分类、文件名及相对 Markdown 链接有效性
npm run verify-agent-note-format # 校验头块、状态、必选节(Alternatives)与现在时禁令
npm run archive-agent-note <path> # 方案被取代时一键归档并提示修复入站相对死链
npm run init-board # [日常开发] 生成 ~69KB 轻量直连看板 index.html(推荐)
npm run init-board # [日常开发] 生成 ~69KB 轻量直连看板 board.html(推荐)
npm run bundle-board # [脱机打包] 生成内嵌全量数据的自包含演示看板 demo.html
```
@@ -126,7 +126,7 @@ npx tsx scripts/verify-agent-note-tree.ts
npx tsx scripts/verify-agent-note-format.ts
npx tsx scripts/archive-agent-note.ts <note-path>
# 日常开发(轻量直连,推荐):在工作目录快速生成轻量看板 index.html (仅 ~69KB)
# 日常开发(轻量直连,推荐):在工作目录快速生成轻量看板 board.html (仅 ~69KB)
npx tsx scripts/build-board.ts --init [targetPath] [projectName]
# 静态打包(脱机大单体):生成包含全量内嵌笔记数据的单文件 demo.html (供脱机分发或 GitHub Pages)
@@ -136,7 +136,7 @@ npx tsx scripts/build-board.ts --bundle [notesDir] [outputPath] [projectName]
### 💡 工程决策看板运行机制 (Agent Notes Board)
**1. 日常开发模式(推荐):**
- 运行 `npx tsx <skill路径>/scripts/build-board.ts --init index.html "项目决策看板"` 生成约 69KB 的纯模板文件;
- 运行 `npx tsx <skill路径>/scripts/build-board.ts --init board.html "项目决策看板"` 生成约 69KB 的纯模板文件;
- 用浏览器打开后,点击右上角 **「连接本地目录」** 授权选择 `.agents/notes`,浏览器通过 File System Access API 直读本地;
- **零构建、零大单体冗余**:开发或 Agent 增删改 Note 后,只要切回浏览器窗口立刻自动静默热更新!
View File
+2 -2
View File
@@ -8,9 +8,9 @@
"verify-agent-note-tree": "npx tsx scripts/verify-agent-note-tree.ts",
"verify-agent-note-format": "npx tsx scripts/verify-agent-note-format.ts",
"archive-agent-note": "npx tsx scripts/archive-agent-note.ts",
"init-board": "npx tsx scripts/build-board.ts --init index.html '工程决策看板'",
"init-board": "npx tsx scripts/build-board.ts --init board.html '工程决策看板'",
"bundle-board": "npx tsx scripts/build-board.ts --bundle .agents/notes demo.html '工程决策看板'",
"build-board": "npx tsx scripts/build-board.ts --init index.html '工程决策看板'",
"build-board": "npx tsx scripts/build-board.ts --init board.html '工程决策看板'",
"import-dsh-notes": "npx tsx scripts/import-dsh-notes.ts"
}
}
+1 -1
View File
@@ -36,7 +36,7 @@ function checkTargetSafety(targetPath: string) {
}
if (isInitMode) {
const targetPath = cleanArgs[0] ? resolve(cleanArgs[0]) : resolve(process.cwd(), 'index.html');
const targetPath = cleanArgs[0] ? resolve(cleanArgs[0]) : resolve(process.cwd(), 'board.html');
const projectName = cleanArgs[1] || '工程决策看板';
checkTargetSafety(targetPath);