بنقرة واحدة
kb-update
Update knowledge base — sync KB files with recent code changes without weakening specs.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Update knowledge base — sync KB files with recent code changes without weakening specs.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Audit code quality against KB-defined properties, invariants, and naming conventions.
Quality and compliance audit — combines code-quality and spec-compliance into one actionable report.
Periodic friction analysis — proposes new skills, deterministic tools, and adaptations.
Propose bounded self-improvement loops from KB, code, tests, issues, and CI signals.
Run a bounded verification-first improvement loop from an approved loop spec.
Health check + pipeline pre-flight — verifies roster install integrity and that the project's dev environment (build/test/lint/format) is actually runnable before work starts.
| name | kb-update |
| description | Update knowledge base — sync KB files with recent code changes without weakening specs. |
| when_to_use | Use after code changes to sync the KB without weakening specs. Trigger: 'update the KB', post-merge doc sync. |
| version | 1.1.1 |
Synchronize the project knowledge base with recent changes. This is the standalone invocable version of the KB agent's update mode.
kb/index.md to understand the KB layout and file purposes.spec.md, properties.md, glossary.md, architecture.md, and any domain-specific files listed in the index.git diff HEAD~5..HEAD --name-only to find recently changed source files (adjust range if user specifies).git diff HEAD~5..HEAD for the actual diffs.For each changed concept, classify the delta:
| Delta Type | Action |
|---|---|
| Code contradicts KB spec | FLAG AS ERROR. Do NOT update KB. Report: "Code at <file>:<line> violates spec: <quote>. Fix the code or open a spec amendment discussion." |
| Code extends KB (new feature, new term) | Add entries to relevant KB files. Update kb/index.md if new files created. |
| Code refines existing concept | Update the KB entry with more precise language. Preserve or strengthen existing properties. |
| KB entry has no corresponding code | Flag as potentially stale. Do not remove — ask the user. |
last-updated field to today's date.kb/glossary.md with definitions.Summarize: files updated, entries added/modified, contradictions found, ambiguity issues.
[ -d kb/.index ] && echo "index: present" || echo "index: absent"
If kb/.index/ exists: invoke /kb-reindex in incremental mode, passing the list of files modified in Steps 4 and 5. This keeps the search index in sync without a full reindex.
If kb/.index/ does not exist: skip silently — the index is opt-in.
properties.md — properties can only be strengthened or added, never relaxed.spec.md to match code — spec is the source of truth. If code diverges, flag it.