agent-rule-cli 0.1.0

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.
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # agent-rule-cli
2
+
3
+ 扫描当前项目,并通过交互式向导生成可追溯、可校验的 AI Agent 项目规则。
4
+
5
+ ## 一键使用
6
+
7
+ 在需要生成规则的项目根目录运行:
8
+
9
+ ```bash
10
+ npx agent-rule-cli
11
+ ```
12
+
13
+ 无需交互、使用推荐默认值:
14
+
15
+ ```bash
16
+ npx agent-rule-cli --defaults
17
+ ```
18
+
19
+ 校验已经生成的规则:
20
+
21
+ ```bash
22
+ npx agent-rule-cli --verify
23
+ ```
24
+
25
+ 在 CI 中进行严格校验:
26
+
27
+ ```bash
28
+ npx agent-rule-cli --verify --strict
29
+ ```
30
+
31
+ 也可以指定其他项目目录:
32
+
33
+ ```bash
34
+ npx agent-rule-cli --root /path/to/project
35
+ ```
36
+
37
+ ## 生成内容
38
+
39
+ 命令会在目标项目中生成 `AGENTS.md` 和 `.agent-rules/`。已有规则会在覆盖前备份,手工维护的规则应放在 `.agent-rules/project-custom.md` 中。
40
+
41
+ 运行环境要求 Node.js 12 或更高版本,运行时不依赖第三方 npm 包。
42
+
43
+ ## 发布
44
+
45
+ ```bash
46
+ npm login
47
+ npm publish
48
+ ```
49
+
50
+ 发布前可用 `npm pack --dry-run` 检查包内文件。包名首次发布后,后续版本需要先更新 `package.json` 中的 `version`。