@nodesify/astria 1.0.0

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 (149) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +65 -0
  3. package/dist/commands/add.d.ts +8 -0
  4. package/dist/commands/add.d.ts.map +1 -0
  5. package/dist/commands/add.js +34 -0
  6. package/dist/commands/add.js.map +1 -0
  7. package/dist/commands/affected.d.ts +6 -0
  8. package/dist/commands/affected.d.ts.map +1 -0
  9. package/dist/commands/affected.js +30 -0
  10. package/dist/commands/affected.js.map +1 -0
  11. package/dist/commands/cluster.d.ts +2 -0
  12. package/dist/commands/cluster.d.ts.map +1 -0
  13. package/dist/commands/cluster.js +51 -0
  14. package/dist/commands/cluster.js.map +1 -0
  15. package/dist/commands/diagnose.d.ts +5 -0
  16. package/dist/commands/diagnose.d.ts.map +1 -0
  17. package/dist/commands/diagnose.js +20 -0
  18. package/dist/commands/diagnose.js.map +1 -0
  19. package/dist/commands/diff.d.ts +2 -0
  20. package/dist/commands/diff.d.ts.map +1 -0
  21. package/dist/commands/diff.js +36 -0
  22. package/dist/commands/diff.js.map +1 -0
  23. package/dist/commands/explain.d.ts +4 -0
  24. package/dist/commands/explain.d.ts.map +1 -0
  25. package/dist/commands/explain.js +38 -0
  26. package/dist/commands/explain.js.map +1 -0
  27. package/dist/commands/export.d.ts +7 -0
  28. package/dist/commands/export.d.ts.map +1 -0
  29. package/dist/commands/export.js +33 -0
  30. package/dist/commands/export.js.map +1 -0
  31. package/dist/commands/feedback.d.ts +12 -0
  32. package/dist/commands/feedback.d.ts.map +1 -0
  33. package/dist/commands/feedback.js +41 -0
  34. package/dist/commands/feedback.js.map +1 -0
  35. package/dist/commands/global.d.ts +7 -0
  36. package/dist/commands/global.d.ts.map +1 -0
  37. package/dist/commands/global.js +61 -0
  38. package/dist/commands/global.js.map +1 -0
  39. package/dist/commands/history.d.ts +5 -0
  40. package/dist/commands/history.d.ts.map +1 -0
  41. package/dist/commands/history.js +28 -0
  42. package/dist/commands/history.js.map +1 -0
  43. package/dist/commands/hook-guard.d.ts +2 -0
  44. package/dist/commands/hook-guard.d.ts.map +1 -0
  45. package/dist/commands/hook-guard.js +145 -0
  46. package/dist/commands/hook-guard.js.map +1 -0
  47. package/dist/commands/hook.d.ts +3 -0
  48. package/dist/commands/hook.d.ts.map +1 -0
  49. package/dist/commands/hook.js +53 -0
  50. package/dist/commands/hook.js.map +1 -0
  51. package/dist/commands/install.d.ts +3 -0
  52. package/dist/commands/install.d.ts.map +1 -0
  53. package/dist/commands/install.js +40 -0
  54. package/dist/commands/install.js.map +1 -0
  55. package/dist/commands/map.d.ts +6 -0
  56. package/dist/commands/map.d.ts.map +1 -0
  57. package/dist/commands/map.js +16 -0
  58. package/dist/commands/map.js.map +1 -0
  59. package/dist/commands/mcp.d.ts +4 -0
  60. package/dist/commands/mcp.d.ts.map +1 -0
  61. package/dist/commands/mcp.js +15 -0
  62. package/dist/commands/mcp.js.map +1 -0
  63. package/dist/commands/merge.d.ts +2 -0
  64. package/dist/commands/merge.d.ts.map +1 -0
  65. package/dist/commands/merge.js +51 -0
  66. package/dist/commands/merge.js.map +1 -0
  67. package/dist/commands/migrate.d.ts +4 -0
  68. package/dist/commands/migrate.d.ts.map +1 -0
  69. package/dist/commands/migrate.js +75 -0
  70. package/dist/commands/migrate.js.map +1 -0
  71. package/dist/commands/path.d.ts +6 -0
  72. package/dist/commands/path.d.ts.map +1 -0
  73. package/dist/commands/path.js +19 -0
  74. package/dist/commands/path.js.map +1 -0
  75. package/dist/commands/prs.d.ts +5 -0
  76. package/dist/commands/prs.d.ts.map +1 -0
  77. package/dist/commands/prs.js +133 -0
  78. package/dist/commands/prs.js.map +1 -0
  79. package/dist/commands/query.d.ts +10 -0
  80. package/dist/commands/query.d.ts.map +1 -0
  81. package/dist/commands/query.js +22 -0
  82. package/dist/commands/query.js.map +1 -0
  83. package/dist/commands/run.d.ts +10 -0
  84. package/dist/commands/run.d.ts.map +1 -0
  85. package/dist/commands/run.js +69 -0
  86. package/dist/commands/run.js.map +1 -0
  87. package/dist/commands/stats.d.ts +4 -0
  88. package/dist/commands/stats.d.ts.map +1 -0
  89. package/dist/commands/stats.js +18 -0
  90. package/dist/commands/stats.js.map +1 -0
  91. package/dist/commands/status.d.ts +4 -0
  92. package/dist/commands/status.d.ts.map +1 -0
  93. package/dist/commands/status.js +57 -0
  94. package/dist/commands/status.js.map +1 -0
  95. package/dist/commands/tree.d.ts +6 -0
  96. package/dist/commands/tree.d.ts.map +1 -0
  97. package/dist/commands/tree.js +53 -0
  98. package/dist/commands/tree.js.map +1 -0
  99. package/dist/commands/update.d.ts +7 -0
  100. package/dist/commands/update.d.ts.map +1 -0
  101. package/dist/commands/update.js +66 -0
  102. package/dist/commands/update.js.map +1 -0
  103. package/dist/commands/watch.d.ts +4 -0
  104. package/dist/commands/watch.d.ts.map +1 -0
  105. package/dist/commands/watch.js +114 -0
  106. package/dist/commands/watch.js.map +1 -0
  107. package/dist/commands/wiki.d.ts +7 -0
  108. package/dist/commands/wiki.d.ts.map +1 -0
  109. package/dist/commands/wiki.js +60 -0
  110. package/dist/commands/wiki.js.map +1 -0
  111. package/dist/graphify.node +4 -0
  112. package/dist/index.d.ts +5 -0
  113. package/dist/index.d.ts.map +1 -0
  114. package/dist/index.js +251 -0
  115. package/dist/index.js.map +1 -0
  116. package/dist/install/hooks.d.ts +12 -0
  117. package/dist/install/hooks.d.ts.map +1 -0
  118. package/dist/install/hooks.js +307 -0
  119. package/dist/install/hooks.js.map +1 -0
  120. package/dist/install/index.d.ts +3 -0
  121. package/dist/install/index.d.ts.map +1 -0
  122. package/dist/install/index.js +362 -0
  123. package/dist/install/index.js.map +1 -0
  124. package/dist/install/markdown-inject.d.ts +7 -0
  125. package/dist/install/markdown-inject.d.ts.map +1 -0
  126. package/dist/install/markdown-inject.js +178 -0
  127. package/dist/install/markdown-inject.js.map +1 -0
  128. package/dist/install/platforms.d.ts +13 -0
  129. package/dist/install/platforms.d.ts.map +1 -0
  130. package/dist/install/platforms.js +130 -0
  131. package/dist/install/platforms.js.map +1 -0
  132. package/dist/install/settings-inject.d.ts +18 -0
  133. package/dist/install/settings-inject.d.ts.map +1 -0
  134. package/dist/install/settings-inject.js +425 -0
  135. package/dist/install/settings-inject.js.map +1 -0
  136. package/dist/native.d.ts +32 -0
  137. package/dist/native.d.ts.map +1 -0
  138. package/dist/native.js +107 -0
  139. package/dist/native.js.map +1 -0
  140. package/package.json +72 -0
  141. package/skills/skill-aider.md +40 -0
  142. package/skills/skill-codex.md +46 -0
  143. package/skills/skill-copilot.md +46 -0
  144. package/skills/skill-cursor.md +39 -0
  145. package/skills/skill-gemini.md +46 -0
  146. package/skills/skill-kiro.md +39 -0
  147. package/skills/skill-opencode.md +44 -0
  148. package/skills/skill-trae.md +46 -0
  149. package/skills/skill.md +266 -0
package/dist/native.js ADDED
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ingestPostgres = exports.ingestScip = exports.globalPath = exports.globalList = exports.globalRemove = exports.globalAdd = exports.reflectGraph = exports.saveQueryResult = exports.diagnoseGraph = exports.ingestUrl = exports.exportObsidian = exports.exportWiki = exports.exportTree = exports.runMcpServer = exports.affectedNode = exports.graphHistory = exports.diffGraphs = exports.mergeGraphs = exports.clusterOnly = exports.findPath = exports.repoMap = exports.queryGraph = exports.tokenBenchmark = exports.exportCypherCmd = exports.exportGraphmlCmd = exports.exportHtmlCmd = exports.exportJsonCmd = exports.explainNode = exports.graphStats = exports.updatePipeline = exports.runPipeline = void 0;
4
+ const path_1 = require("path");
5
+ const fs_1 = require("fs");
6
+ const PLATFORM_SUFFIX = {
7
+ 'win32-x64': 'win32-x64-msvc',
8
+ 'darwin-x64': 'darwin-x64',
9
+ 'darwin-arm64': 'darwin-arm64',
10
+ 'linux-x64': 'linux-x64-gnu',
11
+ 'linux-arm64': 'linux-arm64-gnu',
12
+ };
13
+ function isMusl() {
14
+ try {
15
+ const { execFileSync } = require('child_process');
16
+ // execFileSync never invokes a shell: ldd runs with a fixed arg vector.
17
+ const out = execFileSync('ldd', ['--version'], { encoding: 'utf-8' });
18
+ return out.includes('musl');
19
+ }
20
+ catch {
21
+ return false;
22
+ }
23
+ }
24
+ function getPlatformSuffix() {
25
+ if (process.platform === 'linux' && isMusl()) {
26
+ return `linux-${process.arch}-musl`;
27
+ }
28
+ return PLATFORM_SUFFIX[`${process.platform}-${process.arch}`] || `${process.platform}-${process.arch}`;
29
+ }
30
+ /// Require the fallback platform package for a suffix. Module names are
31
+ /// literal strings in the switch arms — nothing is constructed at runtime —
32
+ /// so require() only ever sees fixed, known package names.
33
+ function requirePlatformPackage(suffix) {
34
+ switch (suffix) {
35
+ case 'win32-x64-msvc':
36
+ return require('@nodesify/astria-win32-x64-msvc');
37
+ case 'darwin-x64':
38
+ return require('@nodesify/astria-darwin-x64');
39
+ case 'darwin-arm64':
40
+ return require('@nodesify/astria-darwin-arm64');
41
+ case 'linux-x64-gnu':
42
+ return require('@nodesify/astria-linux-x64-gnu');
43
+ case 'linux-arm64-gnu':
44
+ return require('@nodesify/astria-linux-arm64-gnu');
45
+ case 'linux-x64-musl':
46
+ return require('@nodesify/astria-linux-x64-musl');
47
+ case 'linux-arm64-musl':
48
+ return require('@nodesify/astria-linux-arm64-musl');
49
+ default:
50
+ return undefined;
51
+ }
52
+ }
53
+ /// Local candidates are fixed paths relative to this module; each require()
54
+ /// below uses a literal relative specifier, guarded by existsSync so a
55
+ /// missing binary never throws at load time.
56
+ function loadNativeBinding() {
57
+ const local = (0, path_1.join)(__dirname, '..', 'astria.node');
58
+ if ((0, fs_1.existsSync)(local))
59
+ return require('../astria.node');
60
+ // tsx runs tests from src/, where CI's built binary lands in dist/
61
+ const localDist = (0, path_1.join)(__dirname, '..', 'dist', 'astria.node');
62
+ if ((0, fs_1.existsSync)(localDist))
63
+ return require('../dist/astria.node');
64
+ const localSrc = (0, path_1.join)(__dirname, 'astria.node');
65
+ if ((0, fs_1.existsSync)(localSrc))
66
+ return require('./astria.node');
67
+ const platformBinding = requirePlatformPackage(getPlatformSuffix());
68
+ if (platformBinding) {
69
+ return platformBinding;
70
+ }
71
+ throw new Error(`@nodesify/astria: failed to load native module for ${process.platform}-${process.arch}.\n` +
72
+ `Tried: local astria.node and the platform fallback package\n` +
73
+ `Ensure the correct platform package is installed.`);
74
+ }
75
+ const binding = loadNativeBinding();
76
+ exports.runPipeline = binding.runPipeline;
77
+ exports.updatePipeline = binding.updatePipeline;
78
+ exports.graphStats = binding.graphStats;
79
+ exports.explainNode = binding.explainNode;
80
+ exports.exportJsonCmd = binding.exportJsonCmd;
81
+ exports.exportHtmlCmd = binding.exportHtmlCmd;
82
+ exports.exportGraphmlCmd = binding.exportGraphmlCmd;
83
+ exports.exportCypherCmd = binding.exportCypherCmd;
84
+ exports.tokenBenchmark = binding.tokenBenchmark;
85
+ exports.queryGraph = binding.queryGraph;
86
+ exports.repoMap = binding.repoMap;
87
+ exports.findPath = binding.findPath;
88
+ exports.clusterOnly = binding.clusterOnly;
89
+ exports.mergeGraphs = binding.mergeGraphs;
90
+ exports.diffGraphs = binding.diffGraphs;
91
+ exports.graphHistory = binding.graphHistory;
92
+ exports.affectedNode = binding.affectedNode;
93
+ exports.runMcpServer = binding.runMcpServer;
94
+ exports.exportTree = binding.exportTree;
95
+ exports.exportWiki = binding.exportWiki;
96
+ exports.exportObsidian = binding.exportObsidian;
97
+ exports.ingestUrl = binding.ingestUrl;
98
+ exports.diagnoseGraph = binding.diagnoseGraph;
99
+ exports.saveQueryResult = binding.saveQueryResult;
100
+ exports.reflectGraph = binding.reflect;
101
+ exports.globalAdd = binding.globalAdd;
102
+ exports.globalRemove = binding.globalRemove;
103
+ exports.globalList = binding.globalList;
104
+ exports.globalPath = binding.globalPath;
105
+ exports.ingestScip = binding.ingestScip;
106
+ exports.ingestPostgres = binding.ingestPostgres;
107
+ //# sourceMappingURL=native.js.map
@@ -0,0 +1 @@
1
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GAAG,OAAO,CAAC,SAAS,CAAC;AAC9B,QAAA,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AACpC,QAAA,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;AAChC,QAAA,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;AAChC,QAAA,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;AAChC,QAAA,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC"}
package/package.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "@nodesify/astria",
3
+ "version": "1.0.0",
4
+ "description": "Turn any folder into a queryable knowledge graph",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "bin": {
8
+ "astria": "dist/index.js"
9
+ },
10
+ "files": [
11
+ "dist/**/*",
12
+ "!dist/__tests__/**",
13
+ "skills/**/*",
14
+ "README.md",
15
+ "LICENSE",
16
+ "!dist/astria.node"
17
+ ],
18
+ "scripts": {
19
+ "build": "tsc",
20
+ "dev": "tsc --watch",
21
+ "napi:build": "napi build --platform --release dist",
22
+ "napi:dev": "napi build --platform dist",
23
+ "napi:artifacts": "napi artifacts",
24
+ "prepublishOnly": "napi prepublish -t npm",
25
+ "test": "npx tsx src/__tests__/cli.test.ts && npx tsx src/__tests__/install.test.ts && npx tsx src/__tests__/hooks.test.ts && npx tsx src/__tests__/e2e.test.ts"
26
+ },
27
+ "keywords": [
28
+ "knowledge-graph",
29
+ "code-analysis",
30
+ "tree-sitter",
31
+ "ast",
32
+ "code-intelligence"
33
+ ],
34
+ "license": "MIT",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/Nodesify/astria.git"
38
+ },
39
+ "homepage": "https://github.com/Nodesify/astria#readme",
40
+ "bugs": {
41
+ "url": "https://github.com/Nodesify/astria/issues"
42
+ },
43
+ "dependencies": {
44
+ "commander": "^12"
45
+ },
46
+ "devDependencies": {
47
+ "tsx": "^4",
48
+ "typescript": "^5",
49
+ "@types/node": "^22",
50
+ "@napi-rs/cli": "^2.18.4"
51
+ },
52
+ "engines": {
53
+ "node": ">=20"
54
+ },
55
+ "napi": {
56
+ "name": "astria",
57
+ "triples": {
58
+ "defaults": true,
59
+ "additional": [
60
+ "aarch64-apple-darwin",
61
+ "aarch64-unknown-linux-gnu"
62
+ ]
63
+ }
64
+ },
65
+ "optionalDependencies": {
66
+ "@nodesify/astria-win32-x64-msvc": "1.0.0",
67
+ "@nodesify/astria-darwin-x64": "1.0.0",
68
+ "@nodesify/astria-linux-x64-gnu": "1.0.0",
69
+ "@nodesify/astria-darwin-arm64": "1.0.0",
70
+ "@nodesify/astria-linux-arm64-gnu": "1.0.0"
71
+ }
72
+ }
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: astria
3
+ description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
+ ---
5
+
6
+ # astria skill (Aider)
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 in 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
+ ## Usage with Aider
30
+
31
+ Aider focuses on code editing. Use astria to understand the codebase before making changes:
32
+
33
+ ```bash
34
+ astria query "authentication flow" # understand a feature
35
+ astria explain "UserService" # see what a class does
36
+ astria path "Config" "Database" # trace dependencies
37
+ astria affected "UserService" # blast radius of a change
38
+ ```
39
+
40
+ After editing, run `astria update .` to keep the graph current.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: astria
3
+ description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
+ ---
5
+
6
+ # astria skill (Codex)
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, you MUST use astria commands BEFORE using Bash grep/find:
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.
@@ -0,0 +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.
@@ -0,0 +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.
@@ -0,0 +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.
@@ -0,0 +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.
@@ -0,0 +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.
@@ -0,0 +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.