← ClaudeAtlas

namht-rescanlisted

Incrementally update an existing Knowledge Base after code changes — re-analyze only what changed (via git diff) and refresh the affected knowledge-base/ docs, modules, and Section 14 review rules, instead of regenerating everything. Use when the user asks to "rescan", "/rescan", "update the KB", or "refresh the knowledge base after my changes".
NamHT4Devlop/nam-claude-skill · ★ 0 · Code & Development · score 72
Install: claude install-skill NamHT4Devlop/nam-claude-skill
# Spec Rescan — update the Knowledge Base incrementally A native port of Auto Spec extension's `/rescan`. Keep `knowledge-base/` accurate without paying for a full rebuild. If there is no existing KB, fall back to a full `/namht-scan`. ## Procedure 1. **Confirm the branch + diff base, then find what changed.** The rescan reads the **working tree of the currently checked-out branch** (it does NOT switch branches). Get the branch with `git rev-parse --abbrev-ref HEAD`. Pick the **diff base**: by default the last commit the KB was built from (usually `HEAD` / the most recent commit), else a **branch or commit the user names** (e.g. `main`, a tag, a release branch). List changed source files with `git diff --name-only <base>` **plus** uncommitted changes (`git status --short`). State it plainly before proceeding: *"Rescanning branch `<X>`, changes vs `<base>` (+ N uncommitted)."* If git isn't usable, ask the user which areas changed. 2. **Map changes → KB docs.** Determine which knowledge-base files the changes affect: - new/changed entities or migrations → `05-domain-model.md`, `08-database-schema.md` - new/changed endpoints → `11-api-docs.md`, `03-entry-points.md` - changed flows/services → `10-core-flows.md`, `06-modules.md`, the relevant `modules/<m>.md` - new validation/business logic → `13-business-rules.md`, `04-business-domain.md`. **Rule ids are append-only:** an amended rule keeps its id, a new rule takes the next free one, a