AGENT SKILL
knowledge-sync
Synchronize knowledge after code, test, build, or architecture changes.
- License 许可
- Apache-2.0
- 最近更新
- 2026-07-21
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- knowledge-sync
- description
- Synchronize knowledge after code, test, build, or architecture changes.
03 SKILL.md 正文
Knowledge Sync
Use this skill whenever code or project behavior changes.
Steps
-
Run:
aih knowledge prepare -
Read the generated context file:
.aih/runtime/knowledge-sync-context.md -
Analyze:
- Git log
- Committed diff
- Staged diff
- Unstaged diff
- Relevant untracked files
- Changed source files
- Existing architecture docs
- Existing module docs
- Existing pitfalls
- Existing decisions
- Relevant tests
-
Update knowledge files:
- Only update docs supported by actual changes
- Do not invent or guess behavior
- Update
architecture.mdif architecture actually changed - Update
pitfalls.mdif you found reproducible, non-obvious issues - Update or create module docs if interfaces changed
-
Create a Session:
aih session new --agent codex --title "brief description"Fill in:
- Goal: What was this session trying to achieve?
- Changes Made: List actual changes
- Validation: What was tested
- Knowledge Updates: Which docs were changed
- Decisions Created: Any ADRs
- Remaining Work: Unfinished items
- Uncertainties: Open questions
-
Create Decision (ADR) ONLY if:
- Module boundaries changed
- Public interfaces changed
- Data formats changed
- Compiler pipeline or pass order changed
- Long-term dependencies introduced
- Performance or memory strategy chosen
- Clear tradeoffs made with alternatives
aih decision new --title "decision title" -
Finalize:
aih knowledge finalize --agent codex -
Report:
- Session created
- Decisions created
- Documents updated
- Documents intentionally NOT updated
- Validation performed
- Remaining uncertainty
Rules
- Session is mandatory for significant code changes
- Decisions are rare and only for long-term architectural choices
- All updates must be supported by actual diff evidence
- Do not complete task until finalize succeeds
04 同仓库更多 Skills
{{SKILL_NAME=null}=null}
Describe when this skill should be used.
★ 0
record-session
Create a session documenting completed work.
★ 0
record-decision
Create an Architecture Decision Record (ADR).
★ 0
code-review
Review code changes for quality, correctness, and knowledge impact.
★ 0