cg

Solid

Trace code and assess change impact via the pre-built symbol, call-graph and co-edit index.

Code & Development 37 stars 10 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 83/100

Stars 20%
53
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

Enter project graph exploration mode (CodeGraph). CodeGraph = pre-built symbol + call-graph index + git co-edit view. Six endpoints, each answers one class of question: | Question | Endpoint | |---|---| | Where is X defined / which files share the name? | search?q=X | | Who calls X? | callers?qname=X | | What does X call? | callees?qname=X | | Changing X affects which symbols? | impact?qname=X&depth=2 | | What symbols does file F contain? | file?path=F | | Which files are commonly edited alongside F? (conventional coupling / parallel registries) | coedit?filePath=F | All responses are coordinates / file paths — never source bodies. (One exception: `search&includeLiterals=true` echoes each matched literal's own text in `value`.) More precise than grep's textual match, cheaper in tokens than Reading whole files. ## The 6 graph endpoints ({{BASE_URL}}) ```bash # search: find symbols by name → hits carry the same node shape as every other # endpoint, so a hit's startLine/endLine feed Read directly. # q is normalized for naming style: user_profile / userProfile / user-profile / USER_PROFILE are equivalent # Pass includeLiterals=true to also search identifier-shaped string literals (tool names, event names, # config keys, route paths — the "looks like a name but isn't an identifier" strings). The response # then carries an extra literals[] array with value / filePath / line / enclosingSymbol per hit. curl -fsS "{{BASE_URL}}/api/projectGraph/search?cwd=$PWD&q=<NAME>" curl -fs...

Details

Author
Surething-io
Repository
Surething-io/cockpit
Created
7 months ago
Last Updated
3 days ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category