원클릭으로
lore-modularize
Automatically discover modules and partition knowledge into modular structure
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Automatically discover modules and partition knowledge into modular structure
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Create and manage L0 prescriptive design specs before writing code
Compile knowledge increments into project snapshot with conflict detection
Auto-scan project structure and sync L1 knowledge layer with codebase
Compress knowledge window by merging, deduping, and summarizing buffer entries
Manage L2 constraint layer - knowledge stabilization, protection, and indexing
Flush knowledge buffer into versioned increment files with source tracing
| name | lore-modularize |
| description | Automatically discover modules and partition knowledge into modular structure |
| category | ai-context |
全自动模块发现与知识分区。不需要用户确认,代码结构即定义。
/lore-evolve detects no modules/ directory but has accumulated knowledge with file references扫描代码目录结构,自动识别模块边界,将现有知识按 affected_files 路径归类到对应模块。零干预,猜错了后续对话会自动修正。
.ai-context/modules/ already exists → exit silently (already modular)snapshot.md does not exist → exit silently (nothing to partition)扫描项目目录结构,识别独立模块。判定标准:
一个目录包含以下任一即视为模块:
模块命名规则:
src/order/ → order)排除规则:
test/, __tests__/, spec/, fixtures/ — 测试目录不是模块shared/, common/, util/, helpers/ — 共享工具不是模块读取 snapshot.md 和所有 increments,对每条知识:
affected_files 和关联文件路径.ai-context/modules/
├── _index.md # 模块注册表
├── {{module-name}}/
│ ├── knowledge.md # 模块知识(L1+L3)
│ ├── specs/ # prescriptive 层(L0,由 /lore-spec 管理)
│ │ └── index.md # Spec 目录索引
│ ├── increments/ # 模块增量
│ ├── progress.md # 模块进度
│ └── cross-refs.md # 跨模块依赖
对每个模块,创建 specs/index.md:
# Specs: {{module-name}}
> Managed by /lore-spec. Do not edit manually.
## Specs
| Spec | Type | Status | Created |
|------|------|--------|---------|
## Status Legend
- **draft**: 正在设计
- **proposed**: 已提出,待评审
- **approved**: 已批准,可以实现
- **implemented**: 已实现,知识已提取
- **superseded**: 已废弃
对每个模块,使用 templates/module-knowledge.md 模板创建 knowledge.md:
创建 modules/_index.md:
对每个模块创建 progress.md:
在 snapshot.md 顶部添加标记:
> LEGACY: Superseded by modular knowledge base. See modules/_index.md
> This file is kept for backward compatibility.
git add .ai-context/modules/
git add .ai-context/snapshot.md
+ Modular knowledge base created:
- Discovered X modules: {{list}}
- Partitioned Y knowledge entries
- Global knowledge: Z entries (unchanged in snapshot.md)