Document regex code navigation rule
This commit is contained in:
@@ -63,11 +63,13 @@ cmake --build --preset windows-msvc-default --config Debug --target clean
|
|||||||
|
|
||||||
## Code Navigation
|
## Code Navigation
|
||||||
|
|
||||||
Codex has a repo-specific skill named `panopainter-code-navigation`. Use it when
|
Codex has a repo-specific skill named `panopainter-code-navigation`. Agents must
|
||||||
|
use it when necessary: follow this path before broad text search when a task is
|
||||||
|
about C++ symbol identity, symbol families, declarations/definitions, override
|
||||||
|
groups, or platform/backend boundaries. Use it when
|
||||||
following C++ symbols, finding symbol families with regular expressions, tracing
|
following C++ symbols, finding symbol families with regular expressions, tracing
|
||||||
service/interface wiring, or checking platform/backend boundary usage.
|
service/interface wiring, or checking platform/backend boundary usage.
|
||||||
For C++ refactors, use the skill before broad `rg` searches when the question
|
Reach for `--name-regex`,
|
||||||
depends on symbol identity rather than plain text. Reach for `--name-regex`,
|
|
||||||
`--detail-regex`, or `--path-regex` when looking for generated-style name
|
`--detail-regex`, or `--path-regex` when looking for generated-style name
|
||||||
families, override groups, command/service families, signatures, or
|
families, override groups, command/service families, signatures, or
|
||||||
platform/backend path slices. Use normal `rg` for docs, build files, comments,
|
platform/backend path slices. Use normal `rg` for docs, build files, comments,
|
||||||
|
|||||||
@@ -109,10 +109,11 @@ Known local toolchain state:
|
|||||||
`python scripts/dev/clangd_nav.py self-test`, also registered as
|
`python scripts/dev/clangd_nav.py self-test`, also registered as
|
||||||
`panopainter_clangd_nav_regex_self_test`, so regex filter behavior can be
|
`panopainter_clangd_nav_regex_self_test`, so regex filter behavior can be
|
||||||
validated without clangd or a compile database.
|
validated without clangd or a compile database.
|
||||||
Use the repo skill `panopainter-code-navigation` before broad text searches
|
Agents must use the repo skill `panopainter-code-navigation` before broad
|
||||||
when a C++ refactor needs symbol-family lookup, generated-style names,
|
text searches when a C++ refactor needs symbol identity, symbol-family lookup,
|
||||||
signatures, override groups, or platform/backend path slices. Keep `rg` for
|
generated-style names, signatures, override groups, declarations/definitions,
|
||||||
docs, build files, string literals, comments, and exact non-symbol text.
|
or platform/backend path slices. Keep `rg` for docs, build files, string
|
||||||
|
literals, comments, and exact non-symbol text.
|
||||||
Reference lookup is guarded because a one-shot clangd process may not have a
|
Reference lookup is guarded because a one-shot clangd process may not have a
|
||||||
complete project index: pass `--background-index` for broader best-effort
|
complete project index: pass `--background-index` for broader best-effort
|
||||||
results or `--allow-incomplete-references` for explicitly
|
results or `--allow-incomplete-references` for explicitly
|
||||||
|
|||||||
@@ -320,7 +320,10 @@ XML; full document/app integration is debt-tracked as DEBT-0010 and full PPI
|
|||||||
body parsing is debt-tracked as DEBT-0013. Agent code navigation now includes
|
body parsing is debt-tracked as DEBT-0013. Agent code navigation now includes
|
||||||
`scripts/dev/clangd_nav.py` with symbol/detail/path regex filters and a
|
`scripts/dev/clangd_nav.py` with symbol/detail/path regex filters and a
|
||||||
`panopainter_clangd_nav_regex_self_test` CTest so broad symbol-family searches
|
`panopainter_clangd_nav_regex_self_test` CTest so broad symbol-family searches
|
||||||
can be validated before they guide refactors.
|
can be validated before they guide refactors. Agents must use the
|
||||||
|
`panopainter-code-navigation` skill before broad text search whenever C++
|
||||||
|
symbol identity, generated-style symbol families, declarations/definitions,
|
||||||
|
override groups, or platform/backend path slices are the real question.
|
||||||
|
|
||||||
Implementation tasks:
|
Implementation tasks:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user