# Prove semantic navigation with the ordinary project compiler Task ID: T-PLAN-STOCK-NAVIGATION-014 Role: astra_planner Status: READY ## 1. Context and baseline Shared /home/faumaray/Projects/VoidLanguageServer, feat/implement-roadmap at ca04975 plus local edits. Normal editor diagnostics use stock GCC 16.2 through an opt-in sealed frontend profile. The private compiler IDE hook resolves a closed int/double fixture but gives no occurrences in the real Void DocumentSnapshot.cpp. Earlier T-PLAN-SEMANTICS-010 proved the stock compiler resolves the two actual Void::Hash::fnv1a64 overloads after editing argument text, with controlled diagnostic tagging. Stock GCC/GDB was also tried for constexpr inspection. Native build metadata and disk/overlay views already exist. ## 2. Objective and deliverables Investigate a concrete route to compiler-proven hover and definition with an unmodified installed GCC 16.2. Try a separate, explicitly application-owned GCC plugin against the actual stock package if headers/ABI available. Produce an executable counterexample or proof on terminal call-token attribution, selected declaration/definition, canonical type, file provenance and manual overload edit. Recommend the next implementable ownership packages and honest limitations. The roadmap requires normal editor entry points after the evidence, not a benchmark-only static index. ## 3. Scope and non-goals Use closed benign in-memory or private local fixtures then a private checked copy of the existing real source. Preserve production profile and host compiler; no compiler patch or install. A workspace database may never select a plugin. No new stock plugin approval policy or arbitrary plugin loading. ## 4. Files to inspect Read src/Documents/DocumentSnapshot.cpp, prepared build/voidlibrary/current/include/Void/Core/Hash.hpp, tests/corpus/frontend/gcc-queries.cpp, existing compiler-patches/gcc-16.2.0/0002-ide-occurrences.patch and 0003 if present, include/vls/semantic/StockCompiler.hpp and src/semantic/{StockCompiler.cpp,EditorDiagnostics.cpp}, docs/roadmap/{08-frontend-feasibility,14-completion-hover}.md (verify actual paths). Check stock GCC's installed plugin include directory and callback declarations. Only look at named source files in the private GCC checkout for evidence, not unrelated targets. ## 5. Write ownership and coordination Write scope: none Private probe sources and artifacts only in build/plan-stock-navigation-014. No new tracked sources, patches, manifests, Git mutations, shared compilation or shared caches. Other agents own their tasks. Root integrates real interfaces and any subsequent changes. ## 6. Implementation or investigation approach Use dev cpp-gcc to locate g++ and g++ -print-file-name=plugin, inspect available headers and stock version. A private ordinary GCC plugin may register PLUGIN_PRE_GENERICIZE or FINISH_PARSE_FUNCTION if the ABI supports it. Exercise the AST for two same-spelling calls at different physical tokens choosing distinct overloads; capture exact byte endpoints, observed declaration/type or explicit gaps. Check if location is the opening parenthesis or entire expression, if physical spelling can be proved using private source bytes and compiler evidence, if origin is a declaration-only target or real definition. Capture at least one real executable result or a concrete compiler/API evidence blocker. Avoid synthetic reflection semantics and source-lexical overload guessing. ## 7. Interfaces and data contracts Any proposed occurrence facts must bind to TU, source snapshot, lookup closure, generation and toolchain identity, both physical source ranges and target origin. Distinguish declaration from observed definition and unknown macro/remap cases. Report stock capability and patch-dependent capabilities separately. Generated/private plugin ABI can be version-limited and installed with VLS only in a later authorized packaging task. ## 8. Dependencies and integration Root can provide the current comparison compiler worker and existing replay adapter runs separately. Reuse existing closed view and approved profile for proposed worker integration; it has no provision for arbitrarily supplied GCC plugins. Avoid changing the application while proving the ordinary compiler route. The original project distributes no custom compiler or license yet. ## 9. Edge cases security and performance Probe same-name declarations/overloads, macro spelling, tabs/Unicode, primary file vs headers, declaration-only and malformed edit, active and stale views as appropriate. A true AST type and resolved UID do not prove a specific physical use or definition. Bound any output to selected project sources and one local compiler; no external upload or untrusted project/tool execution. ## 10. Acceptance criteria 1. Stock binary/version/ABI and evidence of which callback facts it exposes. 2. Real overload selection/edit and trustworthy or explicitly missing use/target/type facts on stock. 3. Address applicability to real C++26 Void headers and normal entry points. 4. Return the smallest genuinely compiler-backed milestone for hover/definition, a concrete implementation/test graph, a fallback when any input is unproven, and the approval implications if any. ## 11. Verification commands and evidence Use dev cpp-gcc -c g++ --version and dev cpp-gcc -c g++ -print-file-name=plugin. Compile only a task-owned plugin and benign task-owned fixture under the private path, with absolute paths and bounded output. Run the unchanged project compiler on the original and edited fixture. Compare with tests/corpus/frontend/gcc-queries.cpp and T-PLAN-SEMANTICS-010 and retain exact commands/exit codes. No blanket rebuild of stock GCC, no plugin from workspace flags. ## 12. Constraints and stop conditions Report missing plugin headers or incompatible library as evidence and inspect whether matching headers already exist in the private prepared build. Never patch installed files, probe a third-party service, escalate or contact the user. No workspace licenses/distribution changes. ## 13. Authorization and decisions The full roadmap is approved D-022. Primary VBS D-025. The user wants regular-compiler compatibility and approved local backend evaluation; use GPT-6.2 Astra Max per D-027/029. D-030 licenses no distribution. ## 14. Return format T-PLAN-STOCK-NAVIGATION-014 DONE/PARTIAL, commands, actual compiler facts, failed routes, proposed reviewed packages, dependencies/risks and next acceptance steps. Send the first real matched occurrence early. No subagents.