project-rule-manager
Skill0 starsChanged 20 days agoMITView on GitHub
识别并经用户确认沉淀项目长期开发元规则,管理规则入口的原子注入、移除与合规检查。适用于“以后都”“必须”“默认”“禁止”等会影响后续开发的项目规则。
1 other project uses a version of this.
Adopted by
Most recently taken up by
- sakuruamayday-ops/enterprise-project-application-assistanttheir own version, first seen Oct 9, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- execution-coordinationSkill
- ksSkill
- project-distribution-managerSkill
- runtime-helperSkill
- version-managerSkill
The file
Files
Project Rule Manager
此能力管理项目的长期开发宪法和元规则,而不是记录当前任务的临时决定。它通过
系统级 ks CLI 管理规则状态、规则文件与 Agent 入口;不得直接读写 ~/.ks,不得
在未确认时直接改写任何 AGENTS.md、CLAUDE.md 或 GEMINI.md。
CLI Runtime Contract
执行任何规则操作前,必须遵守 KS CLI Runtime Contract。
命令可用后,先确认项目身份,并运行 ks project rules status --project <project-id> --json。
什么应当沉淀
用户表达下列信号时,应识别为候选元规则,并提出一次沉淀建议:
- “必须”“禁止”“默认”“统一”“每次”“以后都”“长期”;
- 对后续开发、测试、发布、版本、架构、工具选择或协作方式持续生效的约束;
- 可重复执行且可验证的项目约定。
以下内容不应自动沉淀:
- 仅对当前任务成立的临时决定;
- 未经确认的 AI 推断;
- 无法表述为长期约束的聊天过程或实现细节。
沉淀位置
按规则的适用范围选择,避免把所有内容塞进 Agent 规则文件:
- 强制执行的短规则和入口:已有
AGENTS.md、CLAUDE.md、GEMINI.md中的原子标记块。 - 项目本体应共享的长篇规范:项目
<project-name>/docs/中由 CLI 维护或引用的规则文档。 - 仅本地协作、个人背景或隐性知识:开发现场外层
ks-context/。 - KS 功能是否启用等机器状态:
~/.ks,只能经 CLI 管理。
CLI 只向已有的 AGENTS.md、CLAUDE.md、GEMINI.md 注入原子引用块;文件不存在时
不自行创建。若用户希望某个缺失规则文件也成为入口,必须先单独确认创建它。
工作步骤
- 先用
ks project resolve --path <当前路径> --json或ks project inspect --id <id> --json确认项目身份;对受管开发现场先运行ks project check --id <id> --json。 - 判断用户表达的是候选长期规则还是当前任务决定;不确定时,询问用户是否希望沉淀。
- 调用 CLI 生成规则沉淀计划,展示规则摘要、适用范围、规则正文的落点、要注入或更新的 已有 Agent 规则文件,以及可逆的原子块标识。
- 只有用户明确确认后,调用 CLI apply。不得因“这看起来是好规则”而自动写入。
- 完成后执行
ks project rules check --project <id> --json,报告规则文件、入口块及状态 是否一致。 - 用户明确要求移除时,先展示将删除的原子块和保留的规则正文,再由 CLI 执行移除;不得 删除用户手写的、无法归属到该原子块的内容。
典型用途
- 将“调用 KS CLI 的 skill 必须先验版本、缺失时用随包 tarball 安装并复检”沉淀为 KS 的 自开发规范。
- 将项目的测试门禁、版本规则入口、发布限制或指定工具使用约束作为长期规则管理。
- 检查 AI 规则入口是否仍然指向项目当前有效的规范文件。
边界
- 本 skill 不负责项目身份、迁入或路径分发;这些由
project-distribution-manager处理。 - 本 skill 不替代知识库整理或聊天记录。规则是可持续约束,知识和过程材料应保留在其所属位置。
- 任何注入、移除、创建缺失规则文件都需要用户明确确认。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

