Skip to content

Commit 47815a5

Browse files
committed
chore: 添加 Codex 项目约定
1 parent d25778c commit 47815a5

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# AGENTS.md
2+
3+
本文件只约束当前仓库 `tech-detector-extension`,不要套用到其他项目。
4+
5+
## 项目背景
6+
7+
- 这是 StackPrism 浏览器扩展项目,用于检测网页前端、后端、CDN、SaaS、广告营销、统计、登录、支付、网站程序和主题模板线索。
8+
- 用户主要使用中文沟通,回复和提交说明默认使用中文。
9+
10+
## 工作约定
11+
12+
- 用户要求“继续补充匹配规则”时,默认直接实现、验证、递增版本号并提交,不要只给方案。
13+
- 改动仓库文件后,提交前必须查看 `git status`,只提交本次任务相关文件;遇到用户已有改动时不要顺手纳入提交。
14+
- 涉及规则、功能、文档、项目元数据等仓库改动时,同步递增 `package.json` 版本号。
15+
- 版本递增规则:`x.y.99` 之后变为 `x.(y+1).0`,不要产生 `x.y.100`
16+
- 每 10 个小版本发布一次 release,包含大版本节点,例如 `1.1.90``1.2.0``1.2.10`;其他版本例如 `1.1.95``1.2.15` 不发布 release。
17+
- release notes 使用 `git log --oneline vPREV..HEAD` 作为来源,整理成中文说明,不要直接粘 commit 列表。
18+
- release notes 不写“质量检查”这类表述。
19+
20+
## 规则质量
21+
22+
- 补充匹配规则时优先使用高特征信号:响应头、资源 URL、generator meta、专属路径、window global、明确版权注释或官方 SDK 包名。
23+
- 避免短词或宽泛文本匹配,例如只靠 `spring``phoenix``typecho``p-*``container` 等容易误判的线索。
24+
- 论坛、文档站、文章内容里提到的竞品名称不能直接视为实际使用;需要资源、URL、header、global 或 generator 等更强证据。
25+
- 新规则尽量限定 `matchIn`,优先用 `resources``url``headers` 等明确来源,减少纯 HTML 文本误报。
26+
27+
## 验证要求
28+
29+
- 规则改动后至少验证 JSON 可解析、正则可编译、`git diff --check` 通过。
30+
- 涉及构建产物或版本号时运行 `pnpm run build`
31+
- 验证通过后提交;如果版本号命中 release 节点,继续创建对应 release。
32+
33+
## 不要触碰
34+
35+
- `d:\tmp\sp-audit\audit.py` 和其他临时审计脚本不属于本仓库任务,除非用户明确要求,不要修改或提交。

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "stackprism",
33
"private": true,
4-
"version": "1.2.9",
4+
"version": "1.2.10",
55
"type": "module",
66
"description": "StackPrism 用于检测网页前端、后端、CDN、SaaS、广告营销、统计、登录、支付、网站程序和主题模板线索。",
77
"scripts": {

0 commit comments

Comments
 (0)