ワンクリックで
lore-evolve
Compile knowledge increments into project snapshot with conflict detection
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Compile knowledge increments into project snapshot with conflict detection
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Automatically discover modules and partition knowledge into modular structure
Create and manage L0 prescriptive design specs before writing code
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-evolve |
| description | Compile knowledge increments into project snapshot with conflict detection |
| category | ai-context |
Compile all accumulated increment files into a single, coherent .ai-context/snapshot.md — the agent's "long-term memory" of the project. This is the project's living architecture document that grows more accurate with each compilation.
Check if .ai-context/modules/ directory exists.
Read:
.ai-context/snapshot.md — current snapshot (may not exist for first compile).ai-context/modules/_index.md — module registry (if modular mode)modules/<name>/knowledge.md.ai-context/increments/ — sorted by date (oldest first)modules/<name>/increments/.ai-context/config.yaml — project configurationFor each uncompiled increment (global or per-module):
Determine target:
domain: <module-name> meta field AND module exists in _index.md → target that module's knowledge.mddomain field but affected_files paths match a module's code path → infer domain, target that moduledomain and no file path match → target global snapshot.mddomain references unknown module → create warning, route to global snapshot.mdFor each new increment, check against its target (snapshot.md or modules//knowledge.md):
Conflict scenarios:
Conflict handling:
### [CONFLICT] Payment timeout threshold
- Snapshot says: 3000ms (recorded 2026-04-01, author: 张三, status: verified)
- New increment says: 5000ms (recorded 2026-04-23, author: 利普, status: unverified)
- 状态: pending_resolution
- 处理: 需要人工裁决。在确认前,快照保留双方记录。
Rules:
[CONFLICT] pending_resolution_index.mdFor non-conflicting new increments, merge into the target. For each section:
When compiling snapshot:
[待验证]## Pending Verification (low confidence knowledge, needs confirmation)
- [EXTERNAL] AbilityExpand 有 3 个字段 — 来源: agent 推断, 需验证
Write .ai-context/snapshot.md (global knowledge):
# AI Context Snapshot
> Auto-generated by /evolve. Do not edit manually.
> Last compiled: YYYY-MM-DD
> Compiled increments: 2026-04-23_payment-timeout-adjust, 2026-04-25_add-scene-image, ...
[All merged sections follow]
## Conflict Log
- [CONFLICT] Payment timeout: pending_resolution (see Key Decisions)
Write modules/<name>/knowledge.md for each affected module using templates/module-knowledge.md.
Write updated modules/_index.md if new modules were discovered or cross-refs changed.
Size constraint: Keep each knowledge file under 200 lines. If it grows beyond:
modules/<name>/archive/decisions-history.mdknowledge.mdMove all compiled increments to archive:
# Global increments
mv .ai-context/increments/*.md .ai-context/increments/archive/ 2>/dev/null || true
# Per-module increments
for module_dir in .ai-context/modules/*/; do
mv "$module_dir/increments"/*.md "$module_dir/increments/archive/" 2>/dev/null || true
done
If /lore-evolve discovered new modules during routing (from affected_files paths), add them to _index.md.
git add .ai-context/snapshot.md
git add .ai-context/increments/archive/
git add .ai-context/modules/
Report to user:
Snapshot compiled:
- Mode: modular (X modules) | legacy (single-file)
- Updated sections: Architecture, Key Decisions, Constraints
- New knowledge: +2 decisions, +1 constraint
- Module changes: order +1 decision, payment +1 constraint
- Conflicts: 1 pending_resolution (Payment timeout)
- Low confidence: 1 item pending verification
- Archived: 3 global increments, 2 module increments
- Snapshot size: 145 lines (global), 98 (order), 67 (payment)