cross-reference-navigation
Fuse FTS5 + circuitry-graph + GitNexus + mechanism-spectrum into one confidence-graded retrieval front-door, faster than scanning each surface separately. Use this before broad exploration, grep, or any 'where is / what is this / find the code / what already exists' question. Also covers propagation-scan and capability-recall.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- cross-reference-navigation
- scope
- harness
- triggers
- [ "/xref", "cross reference", "navigate code", "where is", "find the code", "what already exists", "before broad exploration" ]
- invocation
- ability
- description
- Fuse FTS5 + circuitry-graph + GitNexus + mechanism-spectrum into one confidence-graded retrieval front-door, faster than scanning each surface separately. Use this before broad exploration, grep, or any 'where is / what is this / find the code / what already exists' question. Also covers propagation-scan and capability-recall.
03 SKILL.md 正文
Cross-Reference Navigation (XREF)
The GROUND step of the work loop, made reflexive. One question asked across all four siloed retrieval surfaces at once, returned as one merged, deduped, confidence-graded result set. Reach for this before grep, before reading a tree, before "let me explore" — it is faster and it tells you how much to trust each hit, which raw grep never does.
Use When
- Starting any non-trivial task: run xref first (the standing CLAUDE.md mandate).
- "Where is X / what is this / what calls this / what already exists for need Y."
- Before building a new primitive — xref auto-surfaces ⚡ capability hits at the top (capability-first).
- Locating siblings of a known circuitry node (use
--node).
Skip When
- You already know the exact file+line (just Read it — don't spawn navigation).
- Pure single-file edits with no unknowns.
The command
node _SYSTEM/Scripts/xref-query.mjs "<natural-language query>" # default merged read
node _SYSTEM/Scripts/xref-query.mjs "<query>" --node <circuitry-node> # + 1-hop graph neighbors
node _SYSTEM/Scripts/xref-query.mjs "<query>" --top 1000 --scan 5000 # widen the aperture
node _SYSTEM/Scripts/xref-query.mjs "<query>" --all --json # broad recall, machine-readable
--node <id>surfaces 1-hop neighbors of a circuitry node, tagged by edge kind (calls/reads→ MED;writesedges are excluded — verified data-flow ≠ shared mechanism).--top N/--scan Nscale the candidate pool — there is no hard 50-result cap; ask for thousands when you need breadth.--alldrops the FTS5/spectrum SQL slice for a broad recall aperture.--jsonfor structured consumption.- Pure read: never mutates, never writes, never touches protected paths.
Reading the output (the confidence model is the point)
Every merged hit is graded by the shared xref-provenance.scoreHit model and theater-gated:
| evidenceKind | confidence | meaning |
|---|---|---|
gitnexus-structural |
HIGH 0.8–1.0 | a real typed call-graph edge — trust it (downranked if the index is stale vs HEAD) |
graph-neighbor (calls/reads) |
MED | circuitry-graph adjacency |
lexical-only |
LOW < 0.55 | text overlap only; suppressed to the low-confidence sub-log unless it names a mismatch |
A sub-0.55 hit with no named mismatch is hidden from the main surface (theater-gate). Take HIGH structural hits as load-bearing; treat lexical-only as a lead, not proof.
Footguns (verified, designed-in — do not "simplify" them away)
- Two indexed yuri-os repos exist (live root + a stale worktree at
.claude/worktrees/vault-restructure). The gitnexus--repois PINNED to the live absolute root; an unpinned query can silently hit the wrong graph. xref already pins it — don't reimplement around it. - No "semantic" search. gitnexus embeddings = 0 → BM25/keyword ranking only; the structural leg is a typed call-graph proxy, not vector search. The tool never claims "semantic"; neither should you.
- Fail-CLOSED structural leg. If gitnexus is missing/throws/empty,
structuralLegAvailable=falseand every would-be-structural hit is capped at the lexical ceiling + taggedstructuralUnavailable— never silently presented as structurally corroborated. If you see that tag, the HIGH tier is unavailable that run (often the egress/subprocess block in this sandbox), not "no structural hits."
Pair with
capability-recall.mjs "<need>"— run FIRST before building anything; xref also folds ⚡ capability hits into its top results.propagation-scan.mjs <node-id> --dry-run— when a known circuitry node is in scope, apply the propagation law (note: the gitnexus structural leg can emit a bareAggregateErrorunder the sandbox egress block — that's environment, not a code fault; redirect to a file to read cleanly).- GitNexus tools (
gitnexus_impact,gitnexus_context) — for symbol-level impact before editing.
Session Notes
- 2026-06-13 — Skill created during the autonomous run after Marcel flagged "we have a new upgraded xref that can help." Grounded in
_SYSTEM/Scripts/xref-query.mjsheader (XREF-01..05): 4 fused surfaces, scoreHit grading, theater-gate, fail-closed structural leg, the F1–F3 footguns. Tools used: Bash (grep/sed reads), capability-recall (confirmed registered ascode-navigation-search). No corrections. Residual: xref's full live run wasn't exercised this session (sandbox egress blocks the gitnexus subprocess leg); the FTS5/graph/spectrum legs run clean.
04 同仓库更多 Skills
executing-plans
Use when you have a written implementation plan to execute in a separate session with review checkpoints
using-git-worktrees
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback
triage
Triage issues through a state machine driven by triage roles. Use when user wants to create an issue, triage issues, review incoming bugs or feature requests, prepare issues for an AFK agent, or manage issue workflow.
trade-edge-audit
The EDGE LENS for trading peers — recalls EVERY factor/indicator running from the live forecast ledger (no enumeration) and renders the whole pile through the edge arsenal off ONE call: multi-horizon scoring (the ladder) + deflated Sharpe (overfit) + Benjamini-Hochberg FDR (multiple-testing across the fleet) + spread-bounce + maker-fee falsification, then ranks only what survives ALL of it. Use when a peer must answer "does ANY running factor have real, overfit-corrected, multiple-testing-corrected, fee-surviving edge, and at which horizon" without hand-assembling 6 tools. The trade-engine analog of quantum-hypothesis-simulation.
trade-decision-sim
The DECISION LENS for trading peers — recalls the CURRENT signal snapshot per market from the live ledger and renders it through the sim arsenal off ONE call: quantum factor-circuit order-optimal sequencing + decision-sim CVaR-robust sizing, sized against the MEASURED per-factor edge (from the edge-audit), correlation-aware. Emits an actionable call per market {side, sizePct, confidence, sequence}. Flat/zero-size when there is no measured edge after cost — the honest default. Sibling of trade-edge-audit (the EDGE lens); the trade-engine analog of quantum-hypothesis-simulation for a live decision.
to-issues
Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into issues.