File tree Expand file tree Collapse file tree
docs-starter-kit/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010jobs :
1111 deploy :
1212 runs-on : ubuntu-latest
13+ timeout-minutes : 30
1314 steps :
1415 - uses : actions/checkout@v4
1516
17+ # 部署前门禁(2026-08 审计 #11):server 变更直接部署前先跑完整测试,
18+ # 防止未验证代码上线(pr-check 只在 PR 流程生效,main 直推会绕过)
19+ - name : Gate - AI Gateway tests
20+ uses : actions/setup-python@v5
21+ with :
22+ python-version : ' 3.12'
23+ - name : Run AI Gateway tests
24+ run : |
25+ cd server/ai-gateway
26+ pip install -r requirements.txt
27+ pip install ruff pytest pytest-asyncio httpx
28+ ruff check .
29+ pytest tests/ -q
30+ - name : Gate - Sync service tests
31+ uses : actions/setup-go@v5
32+ with :
33+ go-version : ' 1.25'
34+ - name : Run Sync service tests
35+ run : |
36+ cd server/sync-service
37+ go build ./... && go vet ./... && go test ./... -count=1
38+
1639 # 上传 server/ 源码到服务器(服务器非 git 仓库,代码由 CI 同步)
1740 # 注意:rm 必须为 false —— 服务器上的 .env.production 为真实生产密钥,
1841 # 不在仓库内(被 gitignore),删除目标目录会导致密钥永久丢失。
Original file line number Diff line number Diff line change 1010jobs :
1111 deploy :
1212 runs-on : ubuntu-latest
13+ timeout-minutes : 30
1314 steps :
1415 # lfs: true 必需:beian.png / sponsor-qr.png 等由 Git LFS 托管(.gitattributes:
1516 # *.png filter=lfs),不拉取则为 131 字节指针文件,线上为坏图
Original file line number Diff line number Diff line change 1010 # ===========================================================================
1111 changes :
1212 runs-on : ubuntu-latest
13+ timeout-minutes : 10
1314 # dorny/paths-filter 需要读取 PR 变更文件列表;Dependabot PR 的只读 token
1415 # 默认不含该权限,显式声明后 Dependabot PR 的路径检测才能正常工作
1516 permissions :
4950 needs : changes
5051 if : needs.changes.outputs.client == 'true'
5152 runs-on : ubuntu-latest
53+ timeout-minutes : 30
5254 steps :
5355 - uses : actions/checkout@v4
5456 - uses : actions/setup-node@v4
8688 needs : changes
8789 if : needs.changes.outputs.sync-service == 'true'
8890 runs-on : ubuntu-latest
91+ timeout-minutes : 20
8992 defaults :
9093 run :
9194 working-directory : server/sync-service
@@ -110,6 +113,7 @@ jobs:
110113 needs : changes
111114 if : needs.changes.outputs.ai-gateway == 'true'
112115 runs-on : ubuntu-latest
116+ timeout-minutes : 20
113117 defaults :
114118 run :
115119 working-directory : server/ai-gateway
@@ -136,6 +140,7 @@ jobs:
136140 needs : changes
137141 if : needs.changes.outputs.website == 'true'
138142 runs-on : ubuntu-latest
143+ timeout-minutes : 20
139144 defaults :
140145 run :
141146 working-directory : website
@@ -161,6 +166,7 @@ jobs:
161166 needs : changes
162167 if : needs.changes.outputs.docs == 'true'
163168 runs-on : ubuntu-latest
169+ timeout-minutes : 10
164170 steps :
165171 - uses : actions/checkout@v4
166172 - uses : actions/setup-node@v4
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ concurrency:
2424jobs :
2525 lint-test :
2626 runs-on : ubuntu-latest
27+ timeout-minutes : 30
2728 steps :
2829 - uses : actions/checkout@v4
2930 - uses : actions/setup-node@v4
4546 matrix :
4647 os : [windows-latest]
4748 runs-on : ${{ matrix.os }}
49+ # Electron 打包 + 上传 + CDN 同步:上限 90 分钟
50+ timeout-minutes : 90
4851 steps :
4952 # lfs: true 必需:app-icon.png 等 PNG 由 Git LFS 托管(.gitattributes:
5053 # *.png filter=lfs),不拉取则仅为 131 字节指针文件,
@@ -101,6 +104,7 @@ jobs:
101104 release :
102105 needs : build
103106 runs-on : ubuntu-latest
107+ timeout-minutes : 30
104108 # secrets 上下文**不可用于 if 条件**(仅限 env/with/run),否则整个
105109 # workflow 文件解析失败、所有触发立即 0 秒报错。
106110 # 故先将条件所需值注入 job 级 env,再在 step 的 if 中用 env.* 引用。
Original file line number Diff line number Diff line change 2323 release :
2424 name : Semantic Release
2525 runs-on : ubuntu-latest
26+ timeout-minutes : 20
2627 # 发布提交自身携带 [skip ci] 已可被 GitHub 拦截,此处再加一层双保险,防止回环触发
2728 if : ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
2829 steps :
4243 node-version : 20
4344
4445 - name : Install release tooling
45- run : npm install --no-audit --no-fund
46+ # npm ci:基于 lockfile 可复现安装(2026-08 审计 #12)
47+ run : npm ci --no-audit --no-fund
4648
4749 - name : Semantic Release
4850 env :
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ node_modules/
33vendor /
44__pycache__ /
55* .pyc
6+ .pytest_cache /
7+ .ruff_cache /
68
79# Build
810dist /
@@ -47,8 +49,9 @@ Thumbs.db
4749! client /.env.production
4850
4951# Brainstorm scratch (personal notes)
50- brainstorm * .md
51- ui_brainstorm.md
52+ # 注意:锚定根目录(/brainstorm*.md),避免误吞 docs/templates/brainstorm-template.md
53+ /brainstorm * .md
54+ /ui_brainstorm.md
5255
5356# Logs
5457* .log
@@ -61,6 +64,12 @@ coverage/
6164# Scripts temp
6265scripts /.mp3tmp /
6366scripts /sounds_backup_original /
67+ # 软著源码文档生成输出(generate_source_code_doc.ps1)
68+ docs /softcopy-materials /
69+
70+ # 临时截图/审计 scratch(勿提交)
71+ tmp- * .png
72+ missing_ai_context.txt
6473
6574# 音效源文件备份(42 个 wav,零代码引用,勿再提交)
6675client /public /sounds /_backup_original /
Original file line number Diff line number Diff line change 1+ # 头脑风暴记录
2+
3+ ## 基本信息
4+
5+ | 字段 | 内容 |
6+ | ------| ------|
7+ | 主题 | |
8+ | 日期 | |
9+ | 参与者 | |
10+ | 时长 | |
11+ | 目标 | [ 这次头脑风暴要解决什么问题/产出什么] |
12+
13+ ---
14+
15+ ## 1. 问题定义
16+
17+ ### 核心问题
18+ [ 用一句话描述要解决的问题]
19+
20+ ### 约束条件
21+ - 时间:
22+ - 预算:
23+ - 技术:
24+ - 其他:
25+
26+ ### 成功标准
27+ [ 什么样的结果算成功?]
28+
29+ ---
30+
31+ ## 2. 发散阶段(不评判,只产出)
32+
33+ ### 规则提醒
34+ - 不批评任何想法
35+ - 鼓励疯狂的想法
36+ - 追求数量
37+ - 在他人想法上延伸
38+
39+ ### 想法列表
40+ | # | 想法 | 提出者 | 备注 |
41+ | ---| ------| --------| ------|
42+ | 1 | | | |
43+ | 2 | | | |
44+ | 3 | | | |
45+ | 4 | | | |
46+ | 5 | | | |
47+ | 6 | | | |
48+ | 7 | | | |
49+ | 8 | | | |
50+
51+ ### 灵感触发
52+ - 如果没有任何限制,会怎么做?
53+ - 竞品/其他领域怎么解决类似问题?
54+ - 反过来做会怎样?
55+ - 5 年后这个问题还存在吗?
56+ - 用户真正想要的是什么(不是说的,是需要的)?
57+
58+ ---
59+
60+ ## 3. 收敛阶段(评估与筛选)
61+
62+ ### 评估矩阵
63+
64+ | 想法 | 可行性 (1-5) | 影响力 (1-5) | 创新性 (1-5) | 总分 | 排名 |
65+ | ------| -------------| -------------| -------------| ------| ------|
66+ | | | | | | |
67+ | | | | | | |
68+ | | | | | | |
69+
70+ ### 分类
71+ ** 立即执行(高可行 + 高影响):**
72+ -
73+
74+ ** 重点规划(高影响 + 中可行):**
75+ -
76+
77+ ** 快速尝试(高可行 + 中影响):**
78+ -
79+
80+ ** 暂时搁置(低可行 or 低影响):**
81+ -
82+
83+ ---
84+
85+ ## 4. 行动计划
86+
87+ | 想法 | 下一步 | 负责人 | 截止日期 |
88+ | ------| --------| --------| ---------|
89+ | | | | |
90+ | | | | |
91+
92+ ---
93+
94+ ## 5. 遗留问题
95+
96+ - [ 需要进一步调研的问题]
97+ - [ 需要验证的假设]
98+
99+ ---
100+
101+ ## 6. 回顾
102+
103+ ### 本次头脑风暴效果
104+ - 产出想法数量:
105+ - 有价值想法数量:
106+ - 过程是否顺畅:
107+
108+ ### 改进建议
109+ - 下次可以改进的地方:
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ SMTP_PASS=
5858** 规则:**
5959- ` .env.example ` 提交到 Git(只有键和说明,无真实值)
6060- ` .env ` / ` .env.local ` / ` .env.production ` 绝不提交(在 .gitignore 中)
61+ - ** 唯一例外** :` client/.env.production ` (内容全部为公开值——Supabase publishable anon key + 公网 URL,本就随安装包分发;CI 打包依赖它注入渲染进程 VITE_ 变量)。该文件必须满足"零敏感值"审计:只允许 publishable/anon 级凭据与公网地址,任何 service_role/私钥/密码一律禁止放入
6162- 每个变量有注释说明用途
6263- 敏感值留空或写占位符
6364
Original file line number Diff line number Diff line change 1+ # 头脑风暴记录
2+
3+ ## 基本信息
4+
5+ | 字段 | 内容 |
6+ | ------| ------|
7+ | 主题 | |
8+ | 日期 | |
9+ | 参与者 | |
10+ | 时长 | |
11+ | 目标 | [ 这次头脑风暴要解决什么问题/产出什么] |
12+
13+ ---
14+
15+ ## 1. 问题定义
16+
17+ ### 核心问题
18+ [ 用一句话描述要解决的问题]
19+
20+ ### 约束条件
21+ - 时间:
22+ - 预算:
23+ - 技术:
24+ - 其他:
25+
26+ ### 成功标准
27+ [ 什么样的结果算成功?]
28+
29+ ---
30+
31+ ## 2. 发散阶段(不评判,只产出)
32+
33+ ### 规则提醒
34+ - 不批评任何想法
35+ - 鼓励疯狂的想法
36+ - 追求数量
37+ - 在他人想法上延伸
38+
39+ ### 想法列表
40+ | # | 想法 | 提出者 | 备注 |
41+ | ---| ------| --------| ------|
42+ | 1 | | | |
43+ | 2 | | | |
44+ | 3 | | | |
45+ | 4 | | | |
46+ | 5 | | | |
47+ | 6 | | | |
48+ | 7 | | | |
49+ | 8 | | | |
50+
51+ ### 灵感触发
52+ - 如果没有任何限制,会怎么做?
53+ - 竞品/其他领域怎么解决类似问题?
54+ - 反过来做会怎样?
55+ - 5 年后这个问题还存在吗?
56+ - 用户真正想要的是什么(不是说的,是需要的)?
57+
58+ ---
59+
60+ ## 3. 收敛阶段(评估与筛选)
61+
62+ ### 评估矩阵
63+
64+ | 想法 | 可行性 (1-5) | 影响力 (1-5) | 创新性 (1-5) | 总分 | 排名 |
65+ | ------| -------------| -------------| -------------| ------| ------|
66+ | | | | | | |
67+ | | | | | | |
68+ | | | | | | |
69+
70+ ### 分类
71+ ** 立即执行(高可行 + 高影响):**
72+ -
73+
74+ ** 重点规划(高影响 + 中可行):**
75+ -
76+
77+ ** 快速尝试(高可行 + 中影响):**
78+ -
79+
80+ ** 暂时搁置(低可行 or 低影响):**
81+ -
82+
83+ ---
84+
85+ ## 4. 行动计划
86+
87+ | 想法 | 下一步 | 负责人 | 截止日期 |
88+ | ------| --------| --------| ---------|
89+ | | | | |
90+ | | | | |
91+
92+ ---
93+
94+ ## 5. 遗留问题
95+
96+ - [ 需要进一步调研的问题]
97+ - [ 需要验证的假设]
98+
99+ ---
100+
101+ ## 6. 回顾
102+
103+ ### 本次头脑风暴效果
104+ - 产出想法数量:
105+ - 有价值想法数量:
106+ - 过程是否顺畅:
107+
108+ ### 改进建议
109+ - 下次可以改进的地方:
You can’t perform that action at this time.
0 commit comments