@nodesify/astria 1.0.0 → 1.0.2
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/LICENSE +21 -21
- package/README.md +65 -65
- package/dist/commands/add.d.ts +7 -7
- package/dist/commands/add.js +33 -33
- package/dist/commands/affected.d.ts +5 -5
- package/dist/commands/affected.js +29 -29
- package/dist/commands/cluster.d.ts +1 -1
- package/dist/commands/cluster.js +50 -50
- package/dist/commands/diagnose.d.ts +4 -4
- package/dist/commands/diagnose.js +19 -19
- package/dist/commands/diff.d.ts +1 -1
- package/dist/commands/diff.js +35 -35
- package/dist/commands/explain.d.ts +3 -3
- package/dist/commands/explain.js +37 -37
- package/dist/commands/export.d.ts +6 -6
- package/dist/commands/export.js +32 -32
- package/dist/commands/feedback.d.ts +11 -11
- package/dist/commands/feedback.js +40 -40
- package/dist/commands/global.d.ts +6 -6
- package/dist/commands/global.js +60 -60
- package/dist/commands/history.d.ts +4 -4
- package/dist/commands/history.js +27 -27
- package/dist/commands/hook-guard.d.ts +1 -1
- package/dist/commands/hook-guard.js +144 -144
- package/dist/commands/hook.d.ts +2 -2
- package/dist/commands/hook.js +52 -52
- package/dist/commands/install.d.ts +2 -2
- package/dist/commands/install.js +39 -39
- package/dist/commands/map.d.ts +5 -5
- package/dist/commands/map.js +15 -15
- package/dist/commands/mcp.d.ts +3 -3
- package/dist/commands/mcp.js +14 -14
- package/dist/commands/merge.d.ts +1 -1
- package/dist/commands/merge.js +50 -50
- package/dist/commands/migrate.d.ts +3 -3
- package/dist/commands/migrate.js +74 -74
- package/dist/commands/path.d.ts +5 -5
- package/dist/commands/path.js +18 -18
- package/dist/commands/prs.d.ts +4 -4
- package/dist/commands/prs.js +132 -132
- package/dist/commands/query.d.ts +9 -9
- package/dist/commands/query.js +21 -21
- package/dist/commands/run.d.ts +9 -9
- package/dist/commands/run.js +68 -68
- package/dist/commands/stats.d.ts +3 -3
- package/dist/commands/stats.js +17 -17
- package/dist/commands/status.d.ts +3 -3
- package/dist/commands/status.js +56 -56
- package/dist/commands/tree.d.ts +5 -5
- package/dist/commands/tree.js +52 -52
- package/dist/commands/update.d.ts +6 -6
- package/dist/commands/update.js +65 -65
- package/dist/commands/watch.d.ts +3 -3
- package/dist/commands/watch.js +113 -113
- package/dist/commands/wiki.d.ts +6 -6
- package/dist/commands/wiki.js +59 -59
- package/dist/index.d.ts +4 -4
- package/dist/index.js +249 -249
- package/dist/install/hooks.d.ts +11 -11
- package/dist/install/hooks.js +306 -306
- package/dist/install/index.d.ts +2 -2
- package/dist/install/index.js +361 -361
- package/dist/install/markdown-inject.d.ts +6 -6
- package/dist/install/markdown-inject.js +177 -177
- package/dist/install/platforms.d.ts +12 -12
- package/dist/install/platforms.js +129 -129
- package/dist/install/settings-inject.d.ts +17 -17
- package/dist/install/settings-inject.js +424 -424
- package/dist/native.d.ts +31 -31
- package/dist/native.js +106 -106
- package/package.json +72 -72
- package/skills/skill-aider.md +40 -40
- package/skills/skill-codex.md +46 -46
- package/skills/skill-copilot.md +46 -46
- package/skills/skill-cursor.md +39 -39
- package/skills/skill-gemini.md +46 -46
- package/skills/skill-kiro.md +39 -39
- package/skills/skill-opencode.md +44 -44
- package/skills/skill-trae.md +46 -46
- package/skills/skill.md +266 -266
- package/dist/graphify.node +0 -4
package/skills/skill-copilot.md
CHANGED
|
@@ -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.
|
package/skills/skill-cursor.md
CHANGED
|
@@ -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.
|
package/skills/skill-gemini.md
CHANGED
|
@@ -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.
|
package/skills/skill-kiro.md
CHANGED
|
@@ -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.
|
package/skills/skill-opencode.md
CHANGED
|
@@ -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.
|
package/skills/skill-trae.md
CHANGED
|
@@ -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.
|