Skip to content

Commit 7ff5e3e

Browse files
committed
[gobby-#312] chore: harden code-index skill guidance
1 parent 552adba commit 7ff5e3e

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

crates/gcode/assets/SKILL.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ Search filters compose: `search` and `search-symbol` accept `--kind <kind>`; use
2828

2929
Symbol IDs must be full stored UUIDs from `gcode search`, `gcode search-symbol`, or `gcode outline`. Literal placeholders, wildcards, globs, and prefix IDs such as `id1`, `514??`, `abc*`, or `80abc77f` are invalid.
3030

31+
## Recommended Workflow
32+
33+
When navigating code for context or understanding:
34+
35+
1. **Locate with gcode**: `gcode search "concept"`, `gcode search-symbol "name"`, or `gcode search-content "text"` to find relevant hits.
36+
2. **Survey file structure**: `gcode outline path/to/file` to see the symbol hierarchy without reading the whole file.
37+
3. **Retrieve exact code**: `gcode symbol <full-uuid>` or `gcode symbols <full-uuid> <full-uuid> ...` using IDs from search or outline.
38+
4. **Fetch tight neighboring context only when needed**: use `sed`/`awk` only for tight neighboring context (1-3 lines) after symbol retrieval.
39+
40+
Search output is intentionally snippet-sized. Broad file reads and wide line ranges can be truncated or compressed by `gsqz`, so use `gcode outline` and `gcode symbol` before reaching for broad `sed`, `awk`, or full-file reads.
41+
3142
## Navigation
3243

3344
- `gcode repo-outline` — high-level project summary with module symbol counts
@@ -45,9 +56,16 @@ Use these **before making changes** to understand what you'll affect:
4556
- `gcode usages <name>` — all usages (calls + imports)
4657
- `gcode imports <file>` — what does this file import?
4758

48-
## Graph Lifecycle (Gobby daemon required)
59+
## Graph Lifecycle
60+
61+
Use `gcode` directly for the code-index graph projection via the Gobby daemon.
62+
63+
`gcode` owns the code-index graph projection. The daemon exposes HTTP shim routes
64+
for the UI, but graph sync/read/lifecycle behavior lives in `gcode`.
4965

66+
- `gcode graph sync-file --file <file>` — sync one indexed file into the graph projection
5067
- `gcode graph clear` — clear the current project's graph projection
68+
- `gcode graph clear --project-id <id>` — clear a projection without resolving a project root
5169
- `gcode graph rebuild` — rebuild it (cheaper than `gcode invalidate` + reindex; doesn't touch PostgreSQL symbol/content rows)
5270

5371
## When to use which

0 commit comments

Comments
 (0)