بنقرة واحدة
lore-init
Bootstrap AI project context through guided questioning with source tracing
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Bootstrap AI project context through guided questioning with source tracing
التثبيت باستخدام 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
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
| name | lore-init |
| description | Bootstrap AI project context through guided questioning with source tracing |
| category | ai-context |
.ai-context/snapshot.mdComplete the 0→1 knowledge capture. Extract the developer's mental model of the project into structured .ai-context/ files so the agent reaches a minimum viable understanding level.
First, scan the project to understand basics:
Report what you found, then proceed to questioning.
Ask the user these questions in batches (3-5 at a time, conversational tone). Adapt questions based on what you already discovered.
Based on answers, create:
.ai-context/snapshot.md:
Each entry must include:
- 来源: {{user name}}, {{date}}, /init-context guided session
- 置信度: high (directly from project owner/developer)
- 验证状态: verified
.ai-context/config.yaml:
version: "0.1"
project:
name: "<project-name>"
tech_stack: ["java-21", "spring-boot"]
knowledge_schema:
decision: "WHY-level choice with rationale"
constraint: "Something that must not change, with reason"
architecture: "System relationship or flow description"
external: "Definition in external dependency"
Run bash hooks/install.sh from the framework directory.
Add the following section to the project's CLAUDE.md (or ~/.claude/CLAUDE.md):
## AI Context Auto-Accumulation
### Buffer Rules
After each response, check if this turn revealed any of the following knowledge signals:
- **DECISION**: User corrected my understanding or explained why a design choice was made
- **CONSTRAINT**: User mentioned something that must not change, or a rule I should follow
- **ARCHITECTURE**: User described a business scenario, upstream/downstream relationship, or system flow
- **EXTERNAL**: I discovered an external dependency, API, or DTO I couldn't read from source
If yes → append to `.ai-context/buffer.md` in this format:
[round: N] [TYPE] One-sentence summary
- Detail: 1-3 sentences of specific information
- 关联文件: file path (if applicable)
- 来源: user dialogue / code analysis
- 置信度: high (user confirmed) / medium (code analysis) / low (guess)
### Edit Guard Rules
When editing a file:
1. Check if it has knowledge associations in .ai-context/
2. If yes → show the knowledge before editing
3. If your change contradicts existing knowledge → explain why
4. Your explanation will be recorded as a new DECISION
### Flush Rules
When instructed to /digest:
1. Read .ai-context/buffer.md
2. Group entries by type (DECISION/CONSTRAINT/ARCHITECTURE/EXTERNAL)
3. Write a new increment file to .ai-context/increments/YYYY-MM-DD_<short-slug>.md
4. Include: author, timestamp, confidence, affected_files, evidence
5. Clear buffer.md (overwrite with empty)
6. Git add the increment file
### Evolve Rules
When instructed to /evolve:
1. Read snapshot and all new increments
2. Detect conflicts — if found, mark [CONFLICT], do NOT auto-resolve
3. Filter by confidence: low → pending verification section
4. Write updated snapshot
5. Archive old increments
After completion, report to the user:
✓ .ai-context/snapshot.md created (X sections, Y knowledge items)
✓ .ai-context/config.yaml created
✓ .ai-context/buffer.md initialized (empty)
✓ Hooks installed (5 hooks including pre-edit guard)
✓ CLAUDE.md rules injected
Agent understanding level: INITIALIZED
Next step: Start developing. Knowledge will accumulate automatically.