@alenfitz/spec-copilot 2.5.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,33 +4,34 @@
4
4
 
5
5
  ---
6
6
 
7
- ## [2.5.0] - 2026-05-23
7
+ ## [2.5.1] - 2026-05-23
8
8
 
9
- ### 新增
9
+ ### 变更
10
10
 
11
- **Guard 代码级护栏系统 "提示词是建议,代码是法律"**
11
+ **Guard 护栏重构:chmod 主防线 + git hook 附加层**
12
12
 
13
- 核心问题:AI 工具不遵守 AGENTS.md 中的铁律(说改 spec.md 就改了,说跳过 smoke 就跳了)。
14
- Guard 把关键约束从提示词搬到 git pre-commit hook,所有 AI 工具通用。
13
+ v2.5.0 依赖 git hook 拦截,但不是所有项目都用 git。
14
+ v2.5.1 改为 chmod 444(操作系统级只读)为主防线,不依赖任何 VCS:
15
15
 
16
- - **`spec-copilot guard install`**:安装 pre-commit hook + 初始化保护配置
17
- - **`spec-copilot guard status`**:查看当前保护状态(锁定文件列表、hook 安装状态)
18
- - **`spec-copilot guard lock [file]`**:手动锁定文件(无参数 = 按阶段自动锁定)
19
- - **`spec-copilot guard unlock <file>`**:解锁文件(仅限人类操作)
20
- - **`spec-copilot guard check`**:运行检查(hook 自动调用)
16
+ - **主防线:chmod 444** 被保护文件设为只读,AI 工具调 write/edit 时 OS 直接拒绝
17
+ - **附加层:git hook** — 有 git 时自动安装,做骨架组件 + 相位门禁检查
18
+ - 支持 Windows(attrib +R)和 macOS/Linux(chmod 444)
19
+ - `guard check` 增加完整性校验:检查锁定文件的 chmod 状态和内容 hash
20
+ - `guard install` 在非 git 项目中也能工作(仅 chmod,跳过 hook
21
+ - `guard lock/unlock` 直接操作文件权限,立即生效
21
22
 
22
- pre-commit hook 自动拦截三类违规:
23
- 1. **文件保护**:spec.md 审批后锁定、domain-rules.md / project-context.md 永久保护
24
- 2. **相位门禁**:没有 smoke 哨兵不能提交 review 变更
25
- 3. **骨架组件**:.vue 文件只有占位组件或 TODO 不能提交
23
+ ---
26
24
 
27
- Gate 集成:`gate <name> smoke/apply` 通过后自动锁定 spec.md(写入 `.spec-copilot/locks.json`)。
25
+ ## [2.5.0] - 2026-05-23
26
+
27
+ ### 新增
28
28
 
29
- **所有 AI 工具通用**:Claude Code / Cursor / Windsurf / Copilot / Cline / opencode。
30
- 人类紧急操作:`git commit --no-verify`。
29
+ **Guard 代码级护栏系统 "提示词是建议,代码是法律"**
31
30
 
32
- - `doctor` 命令显示 Guard 护栏状态
33
- - `.spec-copilot/guard.json` 声明式配置(可自定义保护规则)
31
+ - `spec-copilot guard install/status/lock/unlock/check` 命令
32
+ - pre-commit hook 拦截:文件保护、相位门禁、骨架组件
33
+ - Gate 集成:通过后自动锁定 spec.md
34
+ - `.spec-copilot/guard.json` 声明式配置
34
35
 
35
36
  ---
36
37
 
package/framework/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.0
1
+ 2.5.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alenfitz/spec-copilot",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "description": "Spec-Driven Development Framework — one package, six AI coding tools (opencode, Claude Code, Cursor, Windsurf, GitHub Copilot, Cline)",
5
5
  "keywords": [
6
6
  "ai-coding",