rule-scan
スター0
フォーク0
更新日2026年7月6日 08:28
Import legacy YAML rules into the SQLite rule database.
インストール
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SKILL.md
readonlyメニュー
Import legacy YAML rules into the SQLite rule database.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Check, edit, and select project rules.
Add project-level rules.
Capture project-level rule candidates from recent conversation.
Manage rule module enum entries after planned module governance.
Explain rule-system boundaries.
Update selected project rules.
| name | rule-scan |
| description | Import legacy YAML rules into the SQLite rule database. |
$rule-scan 是 v0.4 的显式旧数据导入入口。它从旧 .codex/project-rules 和 .codex/session-rules YAML 文件扫描规则,录入 <project_root>/.codex-rules/rules.db。
它不是运行时兼容层;导入完成后,$rule-add、$rule-check、$rule-list 等主路径仍然只读 SQLite。
$skillRoot = "C:\path\to\rule-system\skills\rule-scan"
$pluginRoot = Resolve-Path (Join-Path $skillRoot "..\..")
$exe = Join-Path $pluginRoot "bin/rule-system.exe"
# 默认从 <project_root>/.codex 扫描旧项目规则和旧会话规则
& $exe scan --project-root "F:\path\to\project"
# 只导入旧项目规则,不恢复旧 session 的选用关系
& $exe scan --project-root "F:\path\to\project" --project-only
# 指定旧 .codex 数据源目录
& $exe scan --project-root "F:\path\to\project" --source "F:\path\to\project\.codex"
# 机器可读回执
& $exe scan --project-root "F:\path\to\project" --json
<project_root>/.codex/project-rules/rules.yaml。<project_root>/.codex/session-rules/<session_id>/rules.yaml。session_id 对应的 rule_selections 选用关系。module 字段;没有时按 tags/title/content 推断 frontend/backend/docs/testing/workflow/output/global。global 模块会自动创建,便于后续用 $rule-module 和 $rule-check 整理。title + content 已存在时复用现有规则,不重复插入。title 或 content 的脏数据会被跳过。deprecated 规则会导入为 deprecated,但不会被恢复选用到会话。.codex/session-rules 或 .codex/project-rules 作为事实来源。$rule-check 编辑规则模块,或先走 Plan Mode 再用 $rule-module 治理模块枚举。project-memory。