From code-atlas
Incrementally update the architecture index in .code-atlas/. Detects changes via file-hash diffing against state.json (resilient to rebases and branch switches) and updates only what changed. Pass "full" to force a complete re-scan. Regenerates graph-schema.json at appropriate depth depending on change scope. Triggers on: update architecture, refresh code map, sync architecture index.
How this skill is triggered — by the user, by Claude, or both
Slash command
/code-atlas:update <optional: 'full' to force complete re-scan><optional: 'full' to force complete re-scan>The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are performing an incremental update of the Code Atlas architecture index.
You are performing an incremental update of the Code Atlas architecture index.
Arguments: "{$ARGUMENTS}"
Reference: plugins/code-atlas/docs/schema-reference.md defines the shape of atlas.json, state.json, and graph-schema.json.
This skill reads and writes ONLY to .code-atlas/. It does NOT modify CLAUDE.md.
During each update strategy, graph-schema.json is regenerated to reflect the current state of the codebase. The depth of regeneration corresponds to the update scope:
graph-synthesizer agent re-analyzes all changed modules and new directories for semantic metadata.Check if .code-atlas/state.json exists. If not, print:
No Code Atlas state found. Run /code-atlas:map to generate the initial index.
Then STOP.
Read .code-atlas/state.json. Parse the JSON.
Check _header.schema_version. If it is not 1:
state.json schema version {N} is not supported by this plugin version.
Running full re-scan...
Invoke the full /code-atlas:map pipeline (Steps 1-5 from the map skill) and STOP.
Extract from state.json:
_header.baseline_commit -> stored_commitfile_index -> baseline_indexPerform the same file-index build as Step 1a of the map skill:
git ls-files -s. Parse into {path -> blob_oid}..code-atlas). Compute SHA-256 for each.current_index keyed by path with the same fields as baseline_index.Compare baseline_index and current_index:
added = paths in current not in baselinedeleted = paths in baseline not in currentchanged = paths in both where hash differsrenamed (optional heuristic): if a deleted path and an added path share the same hash, count as rename. If this heuristic is not implemented, they count as one delete + one add.Print:
Code Atlas -- Change Detection
================================
Baseline: {stored_commit} ({N} files)
Current: {current_commit} ({N} files)
Added: {N} files
Deleted: {N} files
Changed: {N} files
Renamed: {N} files
If all counts are zero AND current_commit == stored_commit:
Architecture index is up to date.
STOP.
Evaluate these rows in order; first match wins.
Conditions (ALL must hold):
full argument was NOT passedAction:
added and changed: re-extract imports using the same regex pass as map Step 1d. Update state.json.import_graph for those paths.deleted: remove its entry from state.json.import_graph and decrement importer_counts for every path it imported.importer_counts from the updated import_graph (full pass -- cheap).state.json.file_index with the new entries.atlas.json:
high_traffic top-10 from new importer_counts.directory_map for any added/deleted directories (add a default "source" entry for new ones, remove entries for deleted ones).key_files if any added file matches an entry-point or config filename pattern; remove entries for deleted key files.graph-schema.json (targeted node re-analysis):
importer_counts), stability, test_coverage_header.generated_at and _header.baseline_commit (graph-schema.json keeps schema_version: 2).state.json.last_run:
strategy: "micro"agents_used: 0files_scanned: size of current_indexfiles_hashed: sameduration_seconds: elapsed timeMicro-update complete. {N} files re-indexed, graph-schema updated for {N} modules.
Conditions (ANY):
Action:
atlas-structure agent scoped to the changed areas:
current_index paths for contextagents/atlas-structure.mdstate.json.raw_agent_outputs.atlas_structure:
key_files from agent outputatlas.json.directory_map, atlas.json.key_files, and atlas.json.module_boundaries from the merged output (applying caps).graph-synthesizer agent for changed modules:
key_set (all changed modules + added directories), import_graph, importer_counts (updated), file_tree, test_file_index, optional docstring_index and recency_indexgraph-schema.json with full recomputation for changed areas:
state.json.last_run:
strategy: "targeted"agents_used: 2 (atlas-structure + graph-synthesizer)Targeted update complete. Re-analyzed {N} changed areas, graph-schema updated with full semantic re-analysis.
Conditions (ANY):
full argument was passed_header.schema_version in state.json did not equal 1 (handled in Step 1)Action:
Run the full /code-atlas:map pipeline (Steps 1-5 from the map skill). This overwrites all three artifacts:
atlas.json — updated summary (curated and capped)state.json — updated full cache with complete import graph and metadatagraph-schema.json — completely regenerated semantic dependency graph with all nodes and edges re-analyzed via the graph-synthesizer agent for fresh semantic metadata across the entire codebaseCode Atlas -- Update Complete
================================
Strategy: {Micro | Targeted | Full}
Baseline: {stored_commit} -> {current_commit}
Changes: {N} added, {N} deleted, {N} changed, {N} renamed
Artifacts Updated:
- atlas.json: curated summary
- state.json: full cache with import graph
- graph-schema.json: semantic dependency graph
{If agents were used:}
Agents: {N}
Time: {Xm Ys}
All three artifacts (atlas.json, state.json, graph-schema.json) are now current.
The session-start hook will load atlas.json next session.
To query the semantic dependency graph: /code-atlas:query
After writing artifacts (any strategy), validate the graph: run
node "${CLAUDE_PLUGIN_ROOT}/scripts/query.js" --validate via Bash. If it
reports errors, fix the graph (most commonly an edge whose endpoint is no
longer a node key after deletions), rewrite, and re-validate. If node is
unavailable, skip with a one-line note.
npx claudepluginhub mistervitopro/qa-claude-market --plugin code-atlasGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.