@nodesify/astria 1.0.0 → 1.0.1

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.
Files changed (81) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +65 -65
  3. package/dist/commands/add.d.ts +7 -7
  4. package/dist/commands/add.js +33 -33
  5. package/dist/commands/affected.d.ts +5 -5
  6. package/dist/commands/affected.js +29 -29
  7. package/dist/commands/cluster.d.ts +1 -1
  8. package/dist/commands/cluster.js +50 -50
  9. package/dist/commands/diagnose.d.ts +4 -4
  10. package/dist/commands/diagnose.js +19 -19
  11. package/dist/commands/diff.d.ts +1 -1
  12. package/dist/commands/diff.js +35 -35
  13. package/dist/commands/explain.d.ts +3 -3
  14. package/dist/commands/explain.js +37 -37
  15. package/dist/commands/export.d.ts +6 -6
  16. package/dist/commands/export.js +32 -32
  17. package/dist/commands/feedback.d.ts +11 -11
  18. package/dist/commands/feedback.js +40 -40
  19. package/dist/commands/global.d.ts +6 -6
  20. package/dist/commands/global.js +60 -60
  21. package/dist/commands/history.d.ts +4 -4
  22. package/dist/commands/history.js +27 -27
  23. package/dist/commands/hook-guard.d.ts +1 -1
  24. package/dist/commands/hook-guard.js +144 -144
  25. package/dist/commands/hook.d.ts +2 -2
  26. package/dist/commands/hook.js +52 -52
  27. package/dist/commands/install.d.ts +2 -2
  28. package/dist/commands/install.js +39 -39
  29. package/dist/commands/map.d.ts +5 -5
  30. package/dist/commands/map.js +15 -15
  31. package/dist/commands/mcp.d.ts +3 -3
  32. package/dist/commands/mcp.js +14 -14
  33. package/dist/commands/merge.d.ts +1 -1
  34. package/dist/commands/merge.js +50 -50
  35. package/dist/commands/migrate.d.ts +3 -3
  36. package/dist/commands/migrate.js +74 -74
  37. package/dist/commands/path.d.ts +5 -5
  38. package/dist/commands/path.js +18 -18
  39. package/dist/commands/prs.d.ts +4 -4
  40. package/dist/commands/prs.js +132 -132
  41. package/dist/commands/query.d.ts +9 -9
  42. package/dist/commands/query.js +21 -21
  43. package/dist/commands/run.d.ts +9 -9
  44. package/dist/commands/run.js +68 -68
  45. package/dist/commands/stats.d.ts +3 -3
  46. package/dist/commands/stats.js +17 -17
  47. package/dist/commands/status.d.ts +3 -3
  48. package/dist/commands/status.js +56 -56
  49. package/dist/commands/tree.d.ts +5 -5
  50. package/dist/commands/tree.js +52 -52
  51. package/dist/commands/update.d.ts +6 -6
  52. package/dist/commands/update.js +65 -65
  53. package/dist/commands/watch.d.ts +3 -3
  54. package/dist/commands/watch.js +113 -113
  55. package/dist/commands/wiki.d.ts +6 -6
  56. package/dist/commands/wiki.js +59 -59
  57. package/dist/index.d.ts +4 -4
  58. package/dist/index.js +249 -249
  59. package/dist/install/hooks.d.ts +11 -11
  60. package/dist/install/hooks.js +306 -306
  61. package/dist/install/index.d.ts +2 -2
  62. package/dist/install/index.js +361 -361
  63. package/dist/install/markdown-inject.d.ts +6 -6
  64. package/dist/install/markdown-inject.js +177 -177
  65. package/dist/install/platforms.d.ts +12 -12
  66. package/dist/install/platforms.js +129 -129
  67. package/dist/install/settings-inject.d.ts +17 -17
  68. package/dist/install/settings-inject.js +424 -424
  69. package/dist/native.d.ts +31 -31
  70. package/dist/native.js +106 -106
  71. package/package.json +72 -72
  72. package/skills/skill-aider.md +40 -40
  73. package/skills/skill-codex.md +46 -46
  74. package/skills/skill-copilot.md +46 -46
  75. package/skills/skill-cursor.md +39 -39
  76. package/skills/skill-gemini.md +46 -46
  77. package/skills/skill-kiro.md +39 -39
  78. package/skills/skill-opencode.md +44 -44
  79. package/skills/skill-trae.md +46 -46
  80. package/skills/skill.md +266 -266
  81. package/dist/graphify.node +0 -4
@@ -1,46 +1,46 @@
1
- ---
2
- name: astria
3
- description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
- ---
5
-
6
- # astria skill (GitHub Copilot)
7
-
8
- When the user types `/astria`, run the astria knowledge graph pipeline.
9
-
10
- ## Step 1 - Build or update the graph
11
-
12
- Run via terminal:
13
- ```bash
14
- node -e "const fs=require('fs');if(!fs.existsSync('.astria/graph.json')){console.log('missing')}else{const age=Math.round((Date.now()-fs.statSync('.astria/graph.json').mtimeMs)/60000);console.log(age>30?'stale':'fresh')}"
15
- ```
16
-
17
- - `missing` → run `astria run .`
18
- - `stale` → run `astria update .`
19
- - `fresh` → skip to Step 2
20
-
21
- ## Step 2 - Read the report
22
-
23
- Read `.astria/graph_report.md` and summarize: hub nodes, communities, surprising connections.
24
- ## Prefer MCP tools when connected
25
-
26
- If the `astria` MCP server is connected (registered by `astria install` for claude, cursor, gemini, and zcode), prefer its native tools over shell commands: `repo_map` to orient, `query_graph` for a natural-language question, `explain`/`get_neighbors` for one symbol, `shortest_path` to trace a connection, `affected` before changing a shared symbol. Use the CLI commands below only when the server is not connected.
27
-
28
-
29
- ## Enforcement Rules
30
-
31
- When `.astria/` exists, you MUST use astria commands BEFORE searching files:
32
-
33
- | Question | Command |
34
- |----------|---------|
35
- | Where is X? | `astria query "X"` |
36
- | How does X connect to Y? | `astria path "X" "Y"` |
37
- | What breaks if X changes? | `astria affected "X"` |
38
- | How does X reach Y (call direction)? | `astria path "X" "Y" --directed` |
39
- | What does X do? | `astria explain "X"` |
40
- | Architecture overview? | Read `.astria/graph_report.md` |
41
-
42
- Copilot Chat with `.github/copilot-instructions.md` will reference these rules.
43
-
44
- ## After editing code
45
-
46
- Run `astria update .` to keep the graph current.
1
+ ---
2
+ name: astria
3
+ description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
+ ---
5
+
6
+ # astria skill (GitHub Copilot)
7
+
8
+ When the user types `/astria`, run the astria knowledge graph pipeline.
9
+
10
+ ## Step 1 - Build or update the graph
11
+
12
+ Run via terminal:
13
+ ```bash
14
+ node -e "const fs=require('fs');if(!fs.existsSync('.astria/graph.json')){console.log('missing')}else{const age=Math.round((Date.now()-fs.statSync('.astria/graph.json').mtimeMs)/60000);console.log(age>30?'stale':'fresh')}"
15
+ ```
16
+
17
+ - `missing` → run `astria run .`
18
+ - `stale` → run `astria update .`
19
+ - `fresh` → skip to Step 2
20
+
21
+ ## Step 2 - Read the report
22
+
23
+ Read `.astria/graph_report.md` and summarize: hub nodes, communities, surprising connections.
24
+ ## Prefer MCP tools when connected
25
+
26
+ If the `astria` MCP server is connected (registered by `astria install` for claude, cursor, gemini, and zcode), prefer its native tools over shell commands: `repo_map` to orient, `query_graph` for a natural-language question, `explain`/`get_neighbors` for one symbol, `shortest_path` to trace a connection, `affected` before changing a shared symbol. Use the CLI commands below only when the server is not connected.
27
+
28
+
29
+ ## Enforcement Rules
30
+
31
+ When `.astria/` exists, you MUST use astria commands BEFORE searching files:
32
+
33
+ | Question | Command |
34
+ |----------|---------|
35
+ | Where is X? | `astria query "X"` |
36
+ | How does X connect to Y? | `astria path "X" "Y"` |
37
+ | What breaks if X changes? | `astria affected "X"` |
38
+ | How does X reach Y (call direction)? | `astria path "X" "Y" --directed` |
39
+ | What does X do? | `astria explain "X"` |
40
+ | Architecture overview? | Read `.astria/graph_report.md` |
41
+
42
+ Copilot Chat with `.github/copilot-instructions.md` will reference these rules.
43
+
44
+ ## After editing code
45
+
46
+ Run `astria update .` to keep the graph current.
@@ -1,39 +1,39 @@
1
- ---
2
- name: astria
3
- description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
- ---
5
-
6
- # astria skill (Cursor)
7
-
8
- When the user types `/astria`, run the astria knowledge graph pipeline.
9
-
10
- ## Step 1 - Build or update the graph
11
-
12
- Run via terminal:
13
- ```bash
14
- node -e "const fs=require('fs');if(!fs.existsSync('.astria/graph.json')){console.log('missing')}else{const age=Math.round((Date.now()-fs.statSync('.astria/graph.json').mtimeMs)/60000);console.log(age>30?'stale':'fresh')}"
15
- ```
16
-
17
- - `missing` → run `astria run .`
18
- - `stale` → run `astria update .`
19
- - `fresh` → skip to Step 2
20
-
21
- ## Step 2 - Read the report
22
-
23
- Read `.astria/graph_report.md` and summarize: hub nodes, communities, surprising connections.
24
- ## Prefer MCP tools when connected
25
-
26
- If the `astria` MCP server is connected (registered by `astria install` for claude, cursor, gemini, and zcode), prefer its native tools over shell commands: `repo_map` to orient, `query_graph` for a natural-language question, `explain`/`get_neighbors` for one symbol, `shortest_path` to trace a connection, `affected` before changing a shared symbol. Use the CLI commands below only when the server is not connected.
27
-
28
-
29
- ## Enforcement Rules
30
-
31
- When `.astria/` exists, the `.cursor/rules/astria.mdc` rule enforces graph usage. You MUST:
32
-
33
- 1. Read `.astria/graph_report.md` before searching files
34
- 2. Use `astria query`, `path` (add `--directed` for call direction), `explain`, or `affected` for cross-module questions
35
- 3. Only use native file tools AFTER the graph identified the exact files
36
-
37
- ## After editing code
38
-
39
- Run `astria update .` to keep the graph current.
1
+ ---
2
+ name: astria
3
+ description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
+ ---
5
+
6
+ # astria skill (Cursor)
7
+
8
+ When the user types `/astria`, run the astria knowledge graph pipeline.
9
+
10
+ ## Step 1 - Build or update the graph
11
+
12
+ Run via terminal:
13
+ ```bash
14
+ node -e "const fs=require('fs');if(!fs.existsSync('.astria/graph.json')){console.log('missing')}else{const age=Math.round((Date.now()-fs.statSync('.astria/graph.json').mtimeMs)/60000);console.log(age>30?'stale':'fresh')}"
15
+ ```
16
+
17
+ - `missing` → run `astria run .`
18
+ - `stale` → run `astria update .`
19
+ - `fresh` → skip to Step 2
20
+
21
+ ## Step 2 - Read the report
22
+
23
+ Read `.astria/graph_report.md` and summarize: hub nodes, communities, surprising connections.
24
+ ## Prefer MCP tools when connected
25
+
26
+ If the `astria` MCP server is connected (registered by `astria install` for claude, cursor, gemini, and zcode), prefer its native tools over shell commands: `repo_map` to orient, `query_graph` for a natural-language question, `explain`/`get_neighbors` for one symbol, `shortest_path` to trace a connection, `affected` before changing a shared symbol. Use the CLI commands below only when the server is not connected.
27
+
28
+
29
+ ## Enforcement Rules
30
+
31
+ When `.astria/` exists, the `.cursor/rules/astria.mdc` rule enforces graph usage. You MUST:
32
+
33
+ 1. Read `.astria/graph_report.md` before searching files
34
+ 2. Use `astria query`, `path` (add `--directed` for call direction), `explain`, or `affected` for cross-module questions
35
+ 3. Only use native file tools AFTER the graph identified the exact files
36
+
37
+ ## After editing code
38
+
39
+ Run `astria update .` to keep the graph current.
@@ -1,46 +1,46 @@
1
- ---
2
- name: astria
3
- description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
- ---
5
-
6
- # astria skill (Gemini)
7
-
8
- When the user types `/astria`, run the astria knowledge graph pipeline.
9
-
10
- ## Step 1 - Build or update the graph
11
-
12
- Run via shell:
13
- ```bash
14
- node -e "const fs=require('fs');if(!fs.existsSync('.astria/graph.json')){console.log('missing')}else{const age=Math.round((Date.now()-fs.statSync('.astria/graph.json').mtimeMs)/60000);console.log(age>30?'stale':'fresh')}"
15
- ```
16
-
17
- - `missing` → run `astria run .`
18
- - `stale` → run `astria update .`
19
- - `fresh` → skip to Step 2
20
-
21
- ## Step 2 - Read the report
22
-
23
- Read `.astria/graph_report.md` and summarize: hub nodes, communities, surprising connections.
24
- ## Prefer MCP tools when connected
25
-
26
- If the `astria` MCP server is connected (registered by `astria install` for claude, cursor, gemini, and zcode), prefer its native tools over shell commands: `repo_map` to orient, `query_graph` for a natural-language question, `explain`/`get_neighbors` for one symbol, `shortest_path` to trace a connection, `affected` before changing a shared symbol. Use the CLI commands below only when the server is not connected.
27
-
28
-
29
- ## Enforcement Rules
30
-
31
- When `.astria/` exists, you MUST use astria commands BEFORE using `read_file` or `list_directory` for architecture questions:
32
-
33
- | Question | Command |
34
- |----------|---------|
35
- | Where is X? | `astria query "X"` |
36
- | How does X connect to Y? | `astria path "X" "Y"` |
37
- | What breaks if X changes? | `astria affected "X"` |
38
- | How does X reach Y (call direction)? | `astria path "X" "Y" --directed` |
39
- | What does X do? | `astria explain "X"` |
40
- | Architecture overview? | Read `.astria/graph_report.md` |
41
-
42
- Only use native file tools AFTER the graph identified the exact files.
43
-
44
- ## After editing code
45
-
46
- Run `astria update .` to keep the graph current.
1
+ ---
2
+ name: astria
3
+ description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
+ ---
5
+
6
+ # astria skill (Gemini)
7
+
8
+ When the user types `/astria`, run the astria knowledge graph pipeline.
9
+
10
+ ## Step 1 - Build or update the graph
11
+
12
+ Run via shell:
13
+ ```bash
14
+ node -e "const fs=require('fs');if(!fs.existsSync('.astria/graph.json')){console.log('missing')}else{const age=Math.round((Date.now()-fs.statSync('.astria/graph.json').mtimeMs)/60000);console.log(age>30?'stale':'fresh')}"
15
+ ```
16
+
17
+ - `missing` → run `astria run .`
18
+ - `stale` → run `astria update .`
19
+ - `fresh` → skip to Step 2
20
+
21
+ ## Step 2 - Read the report
22
+
23
+ Read `.astria/graph_report.md` and summarize: hub nodes, communities, surprising connections.
24
+ ## Prefer MCP tools when connected
25
+
26
+ If the `astria` MCP server is connected (registered by `astria install` for claude, cursor, gemini, and zcode), prefer its native tools over shell commands: `repo_map` to orient, `query_graph` for a natural-language question, `explain`/`get_neighbors` for one symbol, `shortest_path` to trace a connection, `affected` before changing a shared symbol. Use the CLI commands below only when the server is not connected.
27
+
28
+
29
+ ## Enforcement Rules
30
+
31
+ When `.astria/` exists, you MUST use astria commands BEFORE using `read_file` or `list_directory` for architecture questions:
32
+
33
+ | Question | Command |
34
+ |----------|---------|
35
+ | Where is X? | `astria query "X"` |
36
+ | How does X connect to Y? | `astria path "X" "Y"` |
37
+ | What breaks if X changes? | `astria affected "X"` |
38
+ | How does X reach Y (call direction)? | `astria path "X" "Y" --directed` |
39
+ | What does X do? | `astria explain "X"` |
40
+ | Architecture overview? | Read `.astria/graph_report.md` |
41
+
42
+ Only use native file tools AFTER the graph identified the exact files.
43
+
44
+ ## After editing code
45
+
46
+ Run `astria update .` to keep the graph current.
@@ -1,39 +1,39 @@
1
- ---
2
- name: astria
3
- description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
- ---
5
-
6
- # astria skill (Kiro)
7
-
8
- When the user types `/astria`, run the astria knowledge graph pipeline.
9
-
10
- ## Step 1 - Build or update the graph
11
-
12
- Run via terminal:
13
- ```bash
14
- node -e "const fs=require('fs');if(!fs.existsSync('.astria/graph.json')){console.log('missing')}else{const age=Math.round((Date.now()-fs.statSync('.astria/graph.json').mtimeMs)/60000);console.log(age>30?'stale':'fresh')}"
15
- ```
16
-
17
- - `missing` → run `astria run .`
18
- - `stale` → run `astria update .`
19
- - `fresh` → skip to Step 2
20
-
21
- ## Step 2 - Read the report
22
-
23
- Read `.astria/graph_report.md` and summarize: hub nodes, communities, surprising connections.
24
- ## Prefer MCP tools when connected
25
-
26
- If the `astria` MCP server is connected (registered by `astria install` for claude, cursor, gemini, and zcode), prefer its native tools over shell commands: `repo_map` to orient, `query_graph` for a natural-language question, `explain`/`get_neighbors` for one symbol, `shortest_path` to trace a connection, `affected` before changing a shared symbol. Use the CLI commands below only when the server is not connected.
27
-
28
-
29
- ## Enforcement Rules
30
-
31
- The `.kiro/steering/astria.md` steering file enforces graph usage. You MUST:
32
-
33
- 1. Read `.astria/graph_report.md` before searching files
34
- 2. Use `astria query`, `path` (add `--directed` for call direction), `explain`, or `affected` for cross-module questions
35
- 3. Only use native file tools AFTER the graph identified the exact files
36
-
37
- ## After editing code
38
-
39
- Run `astria update .` to keep the graph current.
1
+ ---
2
+ name: astria
3
+ description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
+ ---
5
+
6
+ # astria skill (Kiro)
7
+
8
+ When the user types `/astria`, run the astria knowledge graph pipeline.
9
+
10
+ ## Step 1 - Build or update the graph
11
+
12
+ Run via terminal:
13
+ ```bash
14
+ node -e "const fs=require('fs');if(!fs.existsSync('.astria/graph.json')){console.log('missing')}else{const age=Math.round((Date.now()-fs.statSync('.astria/graph.json').mtimeMs)/60000);console.log(age>30?'stale':'fresh')}"
15
+ ```
16
+
17
+ - `missing` → run `astria run .`
18
+ - `stale` → run `astria update .`
19
+ - `fresh` → skip to Step 2
20
+
21
+ ## Step 2 - Read the report
22
+
23
+ Read `.astria/graph_report.md` and summarize: hub nodes, communities, surprising connections.
24
+ ## Prefer MCP tools when connected
25
+
26
+ If the `astria` MCP server is connected (registered by `astria install` for claude, cursor, gemini, and zcode), prefer its native tools over shell commands: `repo_map` to orient, `query_graph` for a natural-language question, `explain`/`get_neighbors` for one symbol, `shortest_path` to trace a connection, `affected` before changing a shared symbol. Use the CLI commands below only when the server is not connected.
27
+
28
+
29
+ ## Enforcement Rules
30
+
31
+ The `.kiro/steering/astria.md` steering file enforces graph usage. You MUST:
32
+
33
+ 1. Read `.astria/graph_report.md` before searching files
34
+ 2. Use `astria query`, `path` (add `--directed` for call direction), `explain`, or `affected` for cross-module questions
35
+ 3. Only use native file tools AFTER the graph identified the exact files
36
+
37
+ ## After editing code
38
+
39
+ Run `astria update .` to keep the graph current.
@@ -1,44 +1,44 @@
1
- ---
2
- name: astria
3
- description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
- ---
5
-
6
- # astria skill (OpenCode)
7
-
8
- When the user types `/astria`, run the astria knowledge graph pipeline.
9
-
10
- ## Step 1 - Build or update the graph
11
-
12
- Run via bash:
13
- ```bash
14
- node -e "const fs=require('fs');if(!fs.existsSync('.astria/graph.json')){console.log('missing')}else{const age=Math.round((Date.now()-fs.statSync('.astria/graph.json').mtimeMs)/60000);console.log(age>30?'stale':'fresh')}"
15
- ```
16
-
17
- - `missing` → run `astria run .`
18
- - `stale` → run `astria update .`
19
- - `fresh` → skip to Step 2
20
-
21
- ## Step 2 - Read the report
22
-
23
- Read `.astria/graph_report.md` and summarize: hub nodes, communities, surprising connections.
24
- ## Prefer MCP tools when connected
25
-
26
- If the `astria` MCP server is connected (registered by `astria install` for claude, cursor, gemini, and zcode), prefer its native tools over shell commands: `repo_map` to orient, `query_graph` for a natural-language question, `explain`/`get_neighbors` for one symbol, `shortest_path` to trace a connection, `affected` before changing a shared symbol. Use the CLI commands below only when the server is not connected.
27
-
28
-
29
- ## Enforcement Rules
30
-
31
- When `.astria/` exists, the astria plugin intercepts `view`, `grep`, `glob`, `ls`, and `bash` tools. You MUST use astria commands first:
32
-
33
- | Question | Command |
34
- |----------|---------|
35
- | Where is X? | `astria query "X"` |
36
- | How does X connect to Y? | `astria path "X" "Y"` |
37
- | What breaks if X changes? | `astria affected "X"` |
38
- | How does X reach Y (call direction)? | `astria path "X" "Y" --directed` |
39
- | What does X do? | `astria explain "X"` |
40
- | Architecture overview? | Read `.astria/graph_report.md` |
41
-
42
- ## After editing code
43
-
44
- Run `astria update .` to keep the graph current.
1
+ ---
2
+ name: astria
3
+ description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
+ ---
5
+
6
+ # astria skill (OpenCode)
7
+
8
+ When the user types `/astria`, run the astria knowledge graph pipeline.
9
+
10
+ ## Step 1 - Build or update the graph
11
+
12
+ Run via bash:
13
+ ```bash
14
+ node -e "const fs=require('fs');if(!fs.existsSync('.astria/graph.json')){console.log('missing')}else{const age=Math.round((Date.now()-fs.statSync('.astria/graph.json').mtimeMs)/60000);console.log(age>30?'stale':'fresh')}"
15
+ ```
16
+
17
+ - `missing` → run `astria run .`
18
+ - `stale` → run `astria update .`
19
+ - `fresh` → skip to Step 2
20
+
21
+ ## Step 2 - Read the report
22
+
23
+ Read `.astria/graph_report.md` and summarize: hub nodes, communities, surprising connections.
24
+ ## Prefer MCP tools when connected
25
+
26
+ If the `astria` MCP server is connected (registered by `astria install` for claude, cursor, gemini, and zcode), prefer its native tools over shell commands: `repo_map` to orient, `query_graph` for a natural-language question, `explain`/`get_neighbors` for one symbol, `shortest_path` to trace a connection, `affected` before changing a shared symbol. Use the CLI commands below only when the server is not connected.
27
+
28
+
29
+ ## Enforcement Rules
30
+
31
+ When `.astria/` exists, the astria plugin intercepts `view`, `grep`, `glob`, `ls`, and `bash` tools. You MUST use astria commands first:
32
+
33
+ | Question | Command |
34
+ |----------|---------|
35
+ | Where is X? | `astria query "X"` |
36
+ | How does X connect to Y? | `astria path "X" "Y"` |
37
+ | What breaks if X changes? | `astria affected "X"` |
38
+ | How does X reach Y (call direction)? | `astria path "X" "Y" --directed` |
39
+ | What does X do? | `astria explain "X"` |
40
+ | Architecture overview? | Read `.astria/graph_report.md` |
41
+
42
+ ## After editing code
43
+
44
+ Run `astria update .` to keep the graph current.
@@ -1,46 +1,46 @@
1
- ---
2
- name: astria
3
- description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
- ---
5
-
6
- # astria skill (Trae)
7
-
8
- When the user types `/astria`, run the astria knowledge graph pipeline.
9
-
10
- ## Step 1 - Build or update the graph
11
-
12
- Run via terminal:
13
- ```bash
14
- node -e "const fs=require('fs');if(!fs.existsSync('.astria/graph.json')){console.log('missing')}else{const age=Math.round((Date.now()-fs.statSync('.astria/graph.json').mtimeMs)/60000);console.log(age>30?'stale':'fresh')}"
15
- ```
16
-
17
- - `missing` → run `astria run .`
18
- - `stale` → run `astria update .`
19
- - `fresh` → skip to Step 2
20
-
21
- ## Step 2 - Read the report
22
-
23
- Read `.astria/graph_report.md` and summarize: hub nodes, communities, surprising connections.
24
- ## Prefer MCP tools when connected
25
-
26
- If the `astria` MCP server is connected (registered by `astria install` for claude, cursor, gemini, and zcode), prefer its native tools over shell commands: `repo_map` to orient, `query_graph` for a natural-language question, `explain`/`get_neighbors` for one symbol, `shortest_path` to trace a connection, `affected` before changing a shared symbol. Use the CLI commands below only when the server is not connected.
27
-
28
-
29
- ## Enforcement Rules
30
-
31
- When `.astria/` exists, you MUST use astria commands BEFORE searching files:
32
-
33
- | Question | Command |
34
- |----------|---------|
35
- | Where is X? | `astria query "X"` |
36
- | How does X connect to Y? | `astria path "X" "Y"` |
37
- | What breaks if X changes? | `astria affected "X"` |
38
- | How does X reach Y (call direction)? | `astria path "X" "Y" --directed` |
39
- | What does X do? | `astria explain "X"` |
40
- | Architecture overview? | Read `.astria/graph_report.md` |
41
-
42
- Only use native file tools AFTER the graph identified the exact files.
43
-
44
- ## After editing code
45
-
46
- Run `astria update .` to keep the graph current.
1
+ ---
2
+ name: astria
3
+ description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
+ ---
5
+
6
+ # astria skill (Trae)
7
+
8
+ When the user types `/astria`, run the astria knowledge graph pipeline.
9
+
10
+ ## Step 1 - Build or update the graph
11
+
12
+ Run via terminal:
13
+ ```bash
14
+ node -e "const fs=require('fs');if(!fs.existsSync('.astria/graph.json')){console.log('missing')}else{const age=Math.round((Date.now()-fs.statSync('.astria/graph.json').mtimeMs)/60000);console.log(age>30?'stale':'fresh')}"
15
+ ```
16
+
17
+ - `missing` → run `astria run .`
18
+ - `stale` → run `astria update .`
19
+ - `fresh` → skip to Step 2
20
+
21
+ ## Step 2 - Read the report
22
+
23
+ Read `.astria/graph_report.md` and summarize: hub nodes, communities, surprising connections.
24
+ ## Prefer MCP tools when connected
25
+
26
+ If the `astria` MCP server is connected (registered by `astria install` for claude, cursor, gemini, and zcode), prefer its native tools over shell commands: `repo_map` to orient, `query_graph` for a natural-language question, `explain`/`get_neighbors` for one symbol, `shortest_path` to trace a connection, `affected` before changing a shared symbol. Use the CLI commands below only when the server is not connected.
27
+
28
+
29
+ ## Enforcement Rules
30
+
31
+ When `.astria/` exists, you MUST use astria commands BEFORE searching files:
32
+
33
+ | Question | Command |
34
+ |----------|---------|
35
+ | Where is X? | `astria query "X"` |
36
+ | How does X connect to Y? | `astria path "X" "Y"` |
37
+ | What breaks if X changes? | `astria affected "X"` |
38
+ | How does X reach Y (call direction)? | `astria path "X" "Y" --directed` |
39
+ | What does X do? | `astria explain "X"` |
40
+ | Architecture overview? | Read `.astria/graph_report.md` |
41
+
42
+ Only use native file tools AFTER the graph identified the exact files.
43
+
44
+ ## After editing code
45
+
46
+ Run `astria update .` to keep the graph current.