@g3nomaly/g3n-skills 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@g3nomaly/g3n-skills",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "The g3n skills, each with its own hooks: a skill source for @g3nomaly/skills and a Claude Code plugin marketplace.",
5
5
  "type": "module",
6
6
  "files": [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "g3n",
3
3
  "description": "The g3n tools: query a repository with analyze, and install skills, mods and components with their installers.",
4
- "version": "0.1.8",
4
+ "version": "0.1.9",
5
5
  "license": "UNLICENSED",
6
6
  "skills": [
7
7
  "./analyze",
@@ -10,9 +10,10 @@ disable-model-invocation: false
10
10
 
11
11
  1. **Find** the node: `search <words>`. It matches names first, then meaning, and lists the hits of each section under its own heading, at most 5 each. Short keywords find code best; add `--section code` to search the code only. Done when a hit's `id` names what you want.
12
12
  2. **Read** it: `show <id>`. Text, signature, parameters, fields and every edge. `file:` gives the lines it spans, such as `src/app.ts:29-45`, to read just that range.
13
- 3. **Follow** its edges: `refs <id>`. Add `--incoming` for what uses it, `--outgoing` for what it uses, `--edge <kind>` to keep one kind, such as `calls` or `affects`. `--depth <n>` follows the edges `n` hops, such as every caller of every caller with `--incoming --edge calls --depth 3`.
14
- 4. **Connect** two nodes: `path <from> <to>` prints the shortest chain of edges between them. It follows edges the way they point, so try the other order when it finds none.
15
- 5. **Narrow** any of these with `--kind`, `--section` and `-n`. `list --kind <kind>` lists every node of a kind.
13
+ 3. **Follow** its edges: `refs <id>`. Add `--incoming` for what uses it, `--outgoing` for what it uses, `--edge <kind>` to keep one kind, such as `calls` or `affects`. `--depth <n>` follows the edges `n` hops, such as every caller of every caller with `--incoming --edge calls --depth 3`. A call, a passed function or an import says where it is made: `calls (add.ts:86)` is line 86 of `add.ts`. Done when the lines you need are named.
14
+ 4. **Compare files**: `refs <file> --level files` lists the links between that file and other files, one line per file, such as `imports (add.ts:7), calls (add.ts:86): file …/classify.ts`. Use it to ask which files use a file.
15
+ 5. **Connect** two nodes: `path <from> <to>` prints the shortest chain of edges between them. It follows edges the way they point, so try the other order when it finds none. It skips `mentions`, the links descriptions make, unless you add `--include-mentions`.
16
+ 6. **Narrow** any of these with `--kind`, `--section` and `-n`. `list --kind <kind>` lists every node of a kind.
16
17
 
17
18
  Add `--json` when a script reads the output. A `<node>` may be an `id`, a file path or a name. A name that fits several nodes prints the candidates, and one that fits none suggests the closest names.
18
19
 
@@ -22,6 +23,8 @@ A _member_, a parameter, field, operation or definition, is found by search but
22
23
 
23
24
  A function handed on without being called, such as a callback or the entry of a command map, links as `passes`, not `calls`. Calls made at the top level of a file, outside every function, link nowhere.
24
25
 
26
+ An import by name, such as `import { get } from "./selectors"`, links to `get`, not to the file. Only an import of a _whole_ file links to the file: `import "./x"`, `import * as x`, a default import, `export * from`, `#include`. So `refs <file> --incoming` at the default level misses the files that import names from it; add `--level files`.
27
+
25
28
  Flags, kinds and edge kinds: [`references/commands.md`](references/commands.md).
26
29
 
27
30
  ## Update
@@ -27,13 +27,13 @@ await createDocs({ repo, out: "/tmp/site.html" });
27
27
  | `kinds`, `section`, `communities` | queries | `--kind`, `--section`, `--community` |
28
28
  | `query`, `by`, `limit` | `search` | `<query>`, `--by`, `-n` |
29
29
  | `target` | `show`, `refs` | `<node>` |
30
- | `incoming`, `outgoing`, `edges`, `depth`, `limit` | `refs` | `--incoming`, `--outgoing`, `--edge`, `--depth`, `-n` |
31
- | `start`, `end`, `edges` | `path` | `<from>`, `<to>`, `--edge` |
30
+ | `incoming`, `outgoing`, `edges`, `depth`, `limit`, `level` | `refs` | `--incoming`, `--outgoing`, `--edge`, `--depth`, `-n`, `--level` |
31
+ | `start`, `end`, `edges`, `includeMentions` | `path` | `<from>`, `<to>`, `--edge`, `--include-mentions` |
32
32
  | `title`, `out` | `createDocs` | `--title`, `--out` |
33
33
  | `onWarning` | all | — |
34
34
 
35
35
  `path` takes `start` and `end`, since `from` names a site to read.
36
36
 
37
- Search hits come grouped by section, each with its `section`. `score` is set only for a match by meaning. `member` names the parameter or field that matched, and `duplicates` lists the other nodes an identical hit stands for. Each `refs` reference holds its next hop in `next`; `omitted` counts what the limit left out.
37
+ Search hits come grouped by section, each with its `section`. `score` is set only for a match by meaning. `member` names the parameter or field that matched, and `duplicates` lists the other nodes an identical hit stands for. Each `refs` reference holds its next hop in `next`; `omitted` counts what the limit left out. A reference of a call, a passed function or an import has `location`, such as `{ path: "packages/core/src/cli/commands/add.ts", lines: [86] }`; any other has `location: null`.
38
38
 
39
39
  Warnings go to `onWarning` and are dropped without it.
@@ -32,11 +32,15 @@ A name with spaces goes in quotes, such as `path "Line item" choose_route`.
32
32
  | `--by <way>` | `search` | `name`, `meaning` or `both` |
33
33
  | `--incoming`, `--outgoing` | `refs` | One direction only |
34
34
  | `--depth <n>` | `refs` | Hops to follow. Default: 1 |
35
- | `--edge <kind>` | `refs`, `path`, `graph` | Only this edge kind. Repeatable |
35
+ | `--edge <kind>` | `refs`, `path`, `graph` | Only this edge kind. Repeatable. `path` without it follows every kind but `mentions` |
36
+ | `--include-mentions` | `path` | Also follow `mentions`. Of equally short chains, the one with fewest `mentions` wins |
36
37
  | `--level <level>` | `graph` | `packages`, `communities`, `files`, `entries` or `all`. Default: `files` |
38
+ | `--level <level>` | `refs` | `entries`, the stored links, or `files`, the links between files. Default: `entries` |
37
39
 
38
40
  Each flag has an `ANALYZE_*` variable, such as `ANALYZE_REPO` or `ANALYZE_OUT`. A flag wins over its variable.
39
41
 
42
+ `refs` and `path` print where a call, a passed function or an import is made, as `calls (add.ts:86, 112)`. The links to one node share a line, and a heading counts the lines under it.
43
+
40
44
  The commands exit with 0 when they answer, also for a search that finds nothing; with 1 for a node that does not exist, a name that fits several nodes, a `path` with no chain, or a repository that cannot be read; and with 2 for a call that is not valid.
41
45
 
42
46
  ## Kinds
@@ -62,6 +66,6 @@ The JSON of a node has its `kind` and its `type`, the finer sort, such as `metho
62
66
  | `references` | table → table of its foreign key |
63
67
  | `reads`, `writes` | query → table |
64
68
  | `names`, `depends` | plan, phase or task → node it names, task it waits for |
65
- | `imports` | source file → source file it imports |
69
+ | `imports` | source file → file it imports whole, or class, function or type it imports by name |
66
70
  | `calls` | function → function it calls |
67
71
  | `passes` | function → function it hands on as a value, uncalled |
@@ -10,4 +10,4 @@
10
10
  | **Database** | `.sql` files. One with `CREATE TABLE` is a schema, any other a query |
11
11
  | **Tasks** | The task-manager tree in `docs/task-manager`, or the directory `.g3n.config.json` names |
12
12
 
13
- Inline code that names a type or function, such as `` `choose_route` ``, links to it from any text.
13
+ Inline code that names a type or function, such as `` `choose_route` ``, links to it from any text. In a doc comment it does not link to a method by its bare name outside the method's file, to what another package does not export, to a test helper, or past a parameter or field of the same name; write `` `Owner.method` `` to link a method.