phycool-retrieval-refresh

Orchestrates full rebuild of symbol graphs, document embeddings, and retrieval indexes with drift detection.

10|3|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/Cynthia1070711/PHYCOOL_Tools --skill phycool-retrieval-refresh-cynthia1070711
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: phycool-retrieval-refresh
Source: https://github.com/Cynthia1070711/PHYCOOL_Tools/tree/main/config-templates/claude/skills/phycool-retrieval-refresh
Command: npx skills add https://github.com/Cynthia1070711/PHYCOOL_Tools --skill phycool-retrieval-refresh-cynthia1070711

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After major refactors or commits, retrieval infrastructure (symbol graphs, document embeddings, god_nodes, GitNexus indexes) becomes stale, and manually running each rebuild script is error-prone. This Skill wraps the refresh-all-retrieval.cjs orchestrator to rebuild everything in one controlled pass, with dry-run previews, PID locking against concurrent execution, and drift verification. ## Core Features & Use Cases - One-command full rebuild: Orchestrates symbol graph harvest, re-embedding, document index sync, and god_nodes centrality computation via existing wrapper scripts, with optional GitNexus reindex after commits. - Safety guardrails: Mandatory --dry-run planning before destructive runs, a shared PID lock across four entry points preventing concurrent execution conflicts, and fail-safe abort thresholds protecting against corrupted graphs. - Documentation counter sync: After a refresh, sync-retrieval-doc-counters.cjs updates metric numbers across README, HTML mirrors, SKILL.md, and CLAUDE.md using seven anti-miswrite protections, but only after explicit user confirmation. - Use Case: After merging a large refactor, run the orchestrator with --dry-run to review the 4-step plan, execute the full rebuild, review the drift report, then confirm and apply documentation counter updates. ## Quick Start Ask the AI to run a dry-run of the full retrieval refresh to review the rebuild plan before executing the actual reindex.

Frequently Asked Questions about phycool-retrieval-refresh

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I rebuild all retrieval indexes after a major refactor?

Run refresh-all-retrieval.cjs with --dry-run first to review the 4-step plan, then execute it without flags to rebuild the symbol graph, re-embed symbols, sync document indexes, and recompute god_nodes. Add --with-gitnexus only if you also committed and need GitNexus reindexed.

How do I update stale symbol embeddings and document indexes in one command?

The orchestrator chains harvest-and-reembed.cjs --force for the symbol graph and maintenance-refresh.cjs --force for documents and embeddings, then runs drift verification. A full run takes roughly 1-2 minutes without GitNexus.

What happens if two retrieval refresh scripts run at the same time?

A shared PID lock file prevents concurrent execution across all four entry points. A second instance exits with code 3 while a live lock exists; stale locks from dead PIDs or locks older than 20 minutes are cleaned up automatically.

Does the refresh automatically update documentation numbers like table counts?

No. The orchestrator only reports drift and never writes back automatically. Documentation counter updates require explicit user confirmation, then sync-retrieval-doc-counters.cjs runs a dry-run review before --apply writes changes with seven anti-miswrite protections.

When should I not run a full retrieval rebuild?

Skip it for single-engine incremental updates, which the individual wrapper scripts handle with their own staleness gates. CodeGraph updates itself via a file watcher in about 500ms, and routine runs without a refactor, commit, or detected drift are forbidden.