Software Archaeologist: Pointing GitHub Copilot Agents at Any Codebase with Git Submodules
by | November 1, 2026
John describes a workflow that keeps AI investigation tooling in a separate host repository while mounting the unfamiliar codebase as a Git submodule at `target/`, preserving the target’s history and pinning analysis to an exact commit. He explains how Git submodules work, how GitHub Copilot discovers repository instructions, skills, and custom agents across the host/submodule boundary, and what happens when Copilot is launched from the root versus inside the submodule. The post also introduces guardrailed PowerShell scripts for swapping targets safely and offline regression tests that verify the replacement process.
























