Skip to content

Commit ecb068e

Browse files
draft: simplify skill to single .graph format only
1 parent d977e4b commit ecb068e

1 file changed

Lines changed: 7 additions & 21 deletions

File tree

cmd/skill.go

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,16 @@ import (
66
"github.com/spf13/cobra"
77
)
88

9-
const skillPrompt = `This repository contains Supermodel graph files next to source files that describe code relationships.
9+
const skillPrompt = `This repository has .graph.* files next to source files containing code relationship data from Supermodel.
1010
11-
## What's in the graph files
11+
Each .graph file has three sections:
12+
- [deps] — what this file imports and what imports it
13+
- [calls] — function call relationships with file paths and line numbers
14+
- [impact] — blast radius: risk level, affected domains, direct/transitive dependents
1215
13-
Depending on the format, you'll find either three files or one combined file per source file:
16+
Read the .graph file before the source file. It shows the full dependency and call picture in far fewer tokens.
1417
15-
**Three-file format** (files ending in .calls.*, .deps.*, .impact.*):
16-
- .calls files: function call relationships — who calls what, with file path and line number
17-
- .deps files: import/dependency relationships — what this file imports and what imports it
18-
- .impact files: blast radius — risk level, affected domains, count of direct and transitive dependents
19-
20-
**Single-file format** (files ending in .graph.*):
21-
- Contains all three sections ([deps], [calls], [impact]) in one file
22-
23-
## How to use them
24-
25-
When you need to understand a file before changing it:
26-
1. Read its .deps (or .graph) file to see what it depends on and what depends on it
27-
2. Read its .calls (or .graph) file to see the full call chain — who calls functions in this file and what they call
28-
3. Read its .impact (or .graph) file to check the blast radius before making changes
29-
30-
When searching the codebase with grep or rg, these files appear in results alongside source code. The relationship data in them tells you where to look next without additional searches.
31-
32-
Example: if you grep for "calculateTotal" and see a .calls file in results, it shows you every caller and callee of that function with exact file paths and line numbers — saving you from grepping for each one individually.`
18+
When you grep for a function name, .graph files appear in results showing every caller and callee — use this to navigate instead of grepping for each one individually.`
3319

3420
func init() {
3521
c := &cobra.Command{

0 commit comments

Comments
 (0)