Expand description
System Surface Map compiler (Wave 14, Level 1): the actual callable code surface built from the TrustedGraphView — an Aider RepoMap equivalent on System IR.
Every SYMBOL entity in the trusted view becomes a SurfaceEntry
carrying exact signatures (source + canonical + semantic), visibility,
modifiers/annotations, component attribution, and the architectural
meaning attached to the symbol (flows, contracts, state ownership,
invocation surfaces, callers/callees). Deterministic and no-panic:
unparseable signatures degrade to name-only SemanticSignatures.
Structs§
- Surface
Pipeline Stages - Stage toggles for the ablation matrix (
build_surface_staged): the same pipeline with one stage switched off. All on =build_surface. - Surface
Policy - Pipeline policy knobs for one surface render.
- Surface
Request - One surface render request: the mode, the token budget, whether to explain selection scores, the pipeline policy, and the optional semantic scorer.
Enums§
- Surface
Mode - The surface mode: global (the historical production pipeline) or task (task PPR + novelty suppression with the same pipeline tail).
Functions§
- build_
surface - THE one authoritative surface pipeline: compile candidates →
heterogeneous PPR (global or task) →
[
pagerank::SystemRanker::project_to_symbols] → per-entry importance (final_importance) → required coverage → MMR diversify → token-aware quotas → soft/hard budget selection → render. Global mode is the historicalselect_and_render_globalpipeline; Task mode adds task PPR (lexical seeds, warm global start), novelty suppression against the ledger, and the same MMR/quotas/selector/render tail. Every surface consumer (production, CLI, MCP, plugin, benchmark ablations) routes through this service — no consumer reimplements ranking. Deterministic and no-panic. - build_
surface_ cached - 15.2-cache-seam: cache-aware sibling of
build_surface(Wave 15.2, REQ-global-rank-cached-per-model-epoch). Whencacheholds a validcrate::startup::GlobalRankCache(loaded bycrate::startup::load_global_rank_cache), the global PPR vector + symbol projection come from the cache — skippingSystemRanker::new(the heterogeneous node graph + adjacency + rarity build) and the 50 power iterations ofglobal_vector(). The pipeline tail (required coverage, MMR, quotas, budget selection, render) runs identically, so the output is byte-identical tobuild_surface. On a miss (cacheisNone) the ranker is built once and the cache is FILLED (the caller persists it viacrate::startup::store_global_rank_cache). Additive: B’ssemanticfield lands onSurfaceRequest/build_surfaceindependently. - build_
surface_ staged build_surfacewith stage toggles for the ablation matrix (benchmark ablations toggle stages here — they never reimplement ranking).lexicaloff skips PPR entirely and scores by lexical match;global_pproff drops the global vector;task_pproff seeds no task vector;mmroff skips diversification;quotasoff skips per-kind caps;optimizeroff renders in importance order up to the budget. Deterministic and no-panic.- compile_
surface_ map - Build the System Surface Map (Level 1) from the trusted view.
- entry_
lexical - Lexical relevance of an entry to the goal terms: name hits count double, signature hits count single (shared with the task-delta pipeline). Lexical relevance of an entry to the goal terms (engine ranking seam).
- important_
symbols - Top-N important symbols (audit item 3): the ranked map’s entries
sorted by the mode’s score (task_ppr for Task, global-weighted total
for Global), each carrying its derived
scc_core::ImportanceProfile. READ-ONLY ranking view: no rescoring, no budget, no render — callers (startup sections,scc important) decide presentation.limitcaps the returned entries (0 = all). - render_
important - Render the IMPORTANT SYMBOLS section (audit item 3): numbered entries with badges, exact fan-in/fan-out, flow/contract counts, and the overall score — the fast “where do I pay attention first” answer before the long Surface Map detail.
- render_
surface_ map - Deterministic, budget-capped render of a
SystemSurfaceMap. - required_
ids - Entries the pipeline MUST never omit: critical invocation surfaces
(non-empty
invocation_surfaces), invariant-enforcing APIs (contracts containing an invariant name), primary flow entrypoints (entrypoint of a triggered flow), and state owners of critical (invariant-scoped) state. Entries the pipeline MUST never omit (engine ranking seam: same setbuild_surfacepartitions on, soranking.symbolscriticality matches). - select_
and_ render_ global - The FULL production global surface pipeline (historical entry point —
kept as a thin wrapper over
build_surfaceso the traced contract and legacy callers stay stable): global heterogeneous PPR, required coverage, MMR, quotas, budget selection, render. - select_
and_ render_ task - The FULL production task surface pipeline (historical entry point —
kept as a thin wrapper over
build_surfaceso the traced contract and legacy callers stay stable): task PPR + novelty suppression against the ledger + the same MMR/quotas/selector/render tail. - surface_
quotas - The spec’s global surface budget quotas (keys consumed by
selector::enforce_quotas): 30% public/entrypoint, 25% core impl, 15% types/interfaces, 10% state owners, 10% contract APIs, 10% flow-critical.