@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.
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
package/skills/skill.md CHANGED
@@ -1,266 +1,266 @@
1
- ---
2
- name: astria
3
- description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
- ---
5
-
6
- # /astria
7
-
8
- Turn any directory of source code into a queryable knowledge graph with community detection, hub node analysis, and a plain-language graph report. Uses AST-based extraction via tree-sitter for deterministic, fast analysis.
9
-
10
- ## What You Must Do When Invoked
11
-
12
- If no path was given, use `.` (current directory). Do not ask the user for a path.
13
-
14
- Follow these steps in order. Do not skip steps.
15
-
16
- ### Step 1 - Check graph state and build if needed
17
-
18
- ```bash
19
- node -e "const fs=require('fs');const p='.astria/graph.json';if(!fs.existsSync(p)){console.log('missing');process.exit(0)}const age=Math.round((Date.now()-fs.statSync(p).mtimeMs)/60000);console.log(age>30?'stale':'fresh')"
20
- ```
21
-
22
- Act on the result:
23
- - `missing`: Run `astria run .` — this builds the full graph from scratch. Wait for it to complete.
24
- - `stale`: Run `astria update .` — incremental rebuild of changed files. Wait for it to complete.
25
- - `fresh`: Skip to Step 2.
26
-
27
- After running `run` or `update`, verify with `astria stats --graph .` that Nodes > 0 (an incremental update with no changes correctly reports 0 nodes added). If Nodes is 0, tell the user: "No supported files found. astria supports Python, JS, TS, Rust, Go, Java, C, C++, Ruby, Swift, Scala, PHP, C#, Lua, Haskell, Elixir, Bash, Dart, Zig, CSS, Markdown, plain text, and PDF."
28
-
29
- ### Step 2 - Read the graph report
30
-
31
- Read `.astria/graph_report.md`. Present a clean summary:
32
-
33
- ```
34
- Knowledge graph built: X nodes, Y edges, Z communities
35
-
36
- Hub nodes (most connected):
37
- 1. NodeName — N connections (community C)
38
- 2. ...
39
-
40
- Surprising connections:
41
- - SourceNode → TargetNode [cross-community edge]
42
-
43
- Suggested questions:
44
- - "Question 1?"
45
- - "Question 2?"
46
- ```
47
-
48
- Do NOT dump the raw report. Summarize it.
49
-
50
- ### Step 3 - Ready for queries
51
-
52
- Tell the user the graph is ready and they can ask questions. Example queries they might try:
53
- - `astria query "authentication flow"`
54
- - `astria path "AuthService" "UserModel"`
55
- - `astria explain "validate_token"`
56
-
57
- ## Enforcement Rules
58
-
59
- When working in a project with a `.astria/` directory, these rules are MANDATORY:
60
-
61
- ### FORBIDDEN
62
-
63
- Do NOT use `Grep`, `Glob`, or file browsing as your first step for architecture or codebase questions. This includes:
64
- - Searching for "where is X defined"
65
- - Looking for "how does X connect to Y"
66
- - Exploring "what files are in this project"
67
- - Finding "all files that reference X"
68
-
69
- ### REQUIRED
70
-
71
- Instead, use these astria commands:
72
-
73
- | User asks | Use this command |
74
- |-----------|-----------------|
75
- | "Where is X implemented?" | `astria query "X"` |
76
- | "How does X connect to Y?" | `astria path "X" "Y"` |
77
- | "What does X do?" | `astria explain "X"` |
78
- | "What is the architecture?" | Read `.astria/wiki/index.md` if present, else `.astria/graph_report.md` |
79
- | "Give me a navigable overview" | `astria wiki --graph .` then read `.astria/wiki/index.md` |
80
- | "Find all references to X" | `astria query "X" --depth 3` |
81
- | "What community is X in?" | `astria explain "X"` |
82
-
83
- Only use native file reading AFTER the graph has identified the exact files you need.
84
-
85
- ### When native tools ARE appropriate
86
-
87
- - Editing a specific file (after graph identified which file)
88
- - Reading a file the user explicitly named
89
- - Running tests or build commands
90
- - Git operations
91
-
92
- ### When direct search / file reading is better than the graph
93
-
94
- The graph models entities and relationships — it does NOT model behavior.
95
- Use Grep/Glob/file reads first for:
96
-
97
- - **Predicate-level bugs**: "is this window check off by one?", "does this
98
- regex match branch slugs?" — expression semantics are invisible to a
99
- graph. Read the code.
100
- - **Exact string audits**: checking every occurrence of a literal in a
101
- handful of files, or auditing env var names and CLI flags. Grep is
102
- deterministic and fast here.
103
- - **Natural-language discovery**: the graph anchors on symbol names.
104
- `query` handles typos and partial matches, but if you don't know any
105
- symbol name yet, a broad grep for a distinctive string is often faster.
106
-
107
- Rule of thumb: use the graph to identify WHICH files matter (blast radius,
108
- architecture, cross-module dependencies), then read those files directly
109
- for exact logic. Graph output includes `file:line` anchors precisely so
110
- you can jump straight from a node or edge to the source.
111
-
112
- ### Provenance and reference nodes
113
-
114
- - Every `NODE` line in `query` output carries `src=path:line`, and every
115
- `EDGE` line ends with `@path:line` — the exact spot the relationship was
116
- extracted from. `explain` prints `File: path:line` for the node and each
117
- neighbor.
118
- - Identifier-shaped string literals (env vars like `PLANE_URL`, snake_case
119
- keys like `needs_human`, dotted/kebab/slash chains like
120
- `harness/hr-101-fix-redis-leak`) are indexed as global `reference` nodes
121
- with `references` edges — so "where is this config key / status value
122
- used?" is a graph query, not a grep. Query output ends with a
123
- `# graph built at <timestamp>` line so you can judge freshness.
124
-
125
- ## Command Reference
126
-
127
- ### `astria run <path>`
128
-
129
- Full pipeline: detect → extract → build → cluster → analyze → report.
130
-
131
- Creates `.astria/` with `db.sqlite`, `graph.json`, `graph_report.md`.
132
-
133
- ### `astria update <path>`
134
-
135
- Incremental rebuild — only re-extracts files that changed (SHA-256 detection).
136
-
137
- Much faster than `run` for existing projects.
138
-
139
- ### `astria query <question> [options]`
140
-
141
- BFS (default) or DFS graph traversal from nodes matching your question.
142
-
143
- ```
144
- astria query "authentication" # BFS, depth 2, budget 2000
145
- astria query "database" --dfs --depth 3 # DFS, deeper
146
- astria query "error handling" --budget 3000 # more output
147
- ```
148
-
149
- Options:
150
- - `--dfs` — depth-first search (traces specific paths)
151
- - `--depth <n>` — traversal depth (default: 2)
152
- - `--budget <n>` — token budget for output (default: 2000)
153
- - `--directed` — follow edges only in their stored direction (caller -> callee, importer -> module)
154
- - `--detail high` — keep only EXTRACTED/DECLARED facts, dropping inferred/semantic edges
155
- - `--cursor <n>` — continuation token from a previous truncated query
156
- - `--graph <path>` — project root (default: `.`)
157
-
158
- ### `astria explain <node> [options]`
159
-
160
- Show a node's details and all its connections.
161
-
162
- ```
163
- astria explain "UserService"
164
- ```
165
-
166
- ### `astria path <A> <B> [options]`
167
-
168
- Find shortest path between two concepts.
169
-
170
- ```
171
- astria path "AuthService" "Database"
172
- astria path "AuthService" "Database" --directed # only caller -> callee direction
173
- ```
174
-
175
- ### `astria affected <node> [options]`
176
-
177
- Blast radius — everything impacted by changing a node (reverse reachability over calls/imports/uses).
178
-
179
- ```
180
- astria affected "UserService" --depth 3
181
- astria affected "UserService" --relation calls
182
- ```
183
-
184
- ### `astria map [options]`
185
-
186
- Aider-style repo map: files ranked by PageRank over the reference graph, with each file's most-connected symbols. Best first command when orienting on a codebase.
187
-
188
- ```
189
- astria map --budget 2000
190
- ```
191
-
192
- ### Semantic layer (local embeddings)
193
-
194
- When the graph was built with `run --embed`, `query` automatically merges semantic recall with token matching — conceptual questions with zero string overlap still find their symbols, and `similar_to` edges link related concepts across files. No API key; the model is downloaded once and cached (`ASTRIA_EMBED_CACHE_DIR` overrides the location).
195
-
196
- ### Learning from usage
197
-
198
- Repeated queries leave a trace: node pairs that keep coming up across distinct questions are promoted to `learned` edges on the next `run`/`update`. The graph gets better connected in exactly the places the codebase is actually explored.
199
-
200
- ### MCP server
201
-
202
- `astria mcp --graph .` runs an MCP stdio server exposing the graph to AI agents with tools: `query_graph` (supports `cursor` continuation and `detail` tiers), `repo_map`, `explain`, `get_neighbors`, `shortest_path`, `affected`, `god_nodes`, `list_communities`, `graph_stats`.
203
-
204
-
205
- ### `astria stats [options]`
206
-
207
- Quick graph health check: node count, edge count, communities, files.
208
-
209
- ### `astria status [options]`
210
-
211
- Graph staleness check: fresh/stale/very_stale with age in minutes.
212
-
213
- ### `astria export [options]`
214
-
215
- Export graph to JSON, HTML, GraphML, or Cypher (Neo4j).
216
-
217
- ```
218
- astria export --format html --out graph.html
219
- astria export --format graphml --out graph.graphml
220
- astria export --format cypher --out astria.cypher # idempotent MERGE script for Neo4j
221
- ```
222
-
223
- ### `astria wiki [options]`
224
-
225
- Wikipedia-style markdown wiki of the graph: `index.md` plus one article per community and per god node, cross-linked with relative markdown links. Readable by any agent without the CLI — point an agent at `.astria/wiki/index.md` and it navigates by reading files.
226
-
227
- ```
228
- astria wiki --graph . # writes .astria/wiki/
229
- astria wiki --out docs/wiki # e.g. for GitHub
230
- astria wiki --format obsidian --out my-vault # Obsidian vault + canvas
231
- ```
232
-
233
- ## Post-Edit Protocol
234
-
235
- After modifying code files in a session with an active graph:
236
-
237
- ```bash
238
- astria update .
239
- ```
240
-
241
- Or start a watcher at session beginning:
242
-
243
- ```bash
244
- astria watch . --debounce 3000
245
- ```
246
-
247
- This keeps the graph current so subsequent queries reflect your changes.
248
-
249
- ## Troubleshooting
250
-
251
- **"Graph is empty (0 nodes)"**
252
- - Run `astria run .` to build from scratch
253
- - Check that the directory has supported file types
254
-
255
- **"Query returns no results"**
256
- - Try different search terms (partial matches work)
257
- - Use broader terms: "auth" instead of "authenticateUserWithOAuth"
258
- - Check `astria stats` to verify graph has data
259
-
260
- **"Graph seems stale"**
261
- - Run `astria update .` for incremental refresh
262
- - Or `astria run .` for full rebuild
263
-
264
- **"Status says stale"**
265
- - The `graph.json` was built more than 30 minutes ago
266
- - Run `astria update .` before querying
1
+ ---
2
+ name: astria
3
+ description: Turn any directory into a queryable knowledge graph. Trigger: /astria
4
+ ---
5
+
6
+ # /astria
7
+
8
+ Turn any directory of source code into a queryable knowledge graph with community detection, hub node analysis, and a plain-language graph report. Uses AST-based extraction via tree-sitter for deterministic, fast analysis.
9
+
10
+ ## What You Must Do When Invoked
11
+
12
+ If no path was given, use `.` (current directory). Do not ask the user for a path.
13
+
14
+ Follow these steps in order. Do not skip steps.
15
+
16
+ ### Step 1 - Check graph state and build if needed
17
+
18
+ ```bash
19
+ node -e "const fs=require('fs');const p='.astria/graph.json';if(!fs.existsSync(p)){console.log('missing');process.exit(0)}const age=Math.round((Date.now()-fs.statSync(p).mtimeMs)/60000);console.log(age>30?'stale':'fresh')"
20
+ ```
21
+
22
+ Act on the result:
23
+ - `missing`: Run `astria run .` — this builds the full graph from scratch. Wait for it to complete.
24
+ - `stale`: Run `astria update .` — incremental rebuild of changed files. Wait for it to complete.
25
+ - `fresh`: Skip to Step 2.
26
+
27
+ After running `run` or `update`, verify with `astria stats --graph .` that Nodes > 0 (an incremental update with no changes correctly reports 0 nodes added). If Nodes is 0, tell the user: "No supported files found. astria supports Python, JS, TS, Rust, Go, Java, C, C++, Ruby, Swift, Scala, PHP, C#, Lua, Haskell, Elixir, Bash, Dart, Zig, CSS, Markdown, plain text, and PDF."
28
+
29
+ ### Step 2 - Read the graph report
30
+
31
+ Read `.astria/graph_report.md`. Present a clean summary:
32
+
33
+ ```
34
+ Knowledge graph built: X nodes, Y edges, Z communities
35
+
36
+ Hub nodes (most connected):
37
+ 1. NodeName — N connections (community C)
38
+ 2. ...
39
+
40
+ Surprising connections:
41
+ - SourceNode → TargetNode [cross-community edge]
42
+
43
+ Suggested questions:
44
+ - "Question 1?"
45
+ - "Question 2?"
46
+ ```
47
+
48
+ Do NOT dump the raw report. Summarize it.
49
+
50
+ ### Step 3 - Ready for queries
51
+
52
+ Tell the user the graph is ready and they can ask questions. Example queries they might try:
53
+ - `astria query "authentication flow"`
54
+ - `astria path "AuthService" "UserModel"`
55
+ - `astria explain "validate_token"`
56
+
57
+ ## Enforcement Rules
58
+
59
+ When working in a project with a `.astria/` directory, these rules are MANDATORY:
60
+
61
+ ### FORBIDDEN
62
+
63
+ Do NOT use `Grep`, `Glob`, or file browsing as your first step for architecture or codebase questions. This includes:
64
+ - Searching for "where is X defined"
65
+ - Looking for "how does X connect to Y"
66
+ - Exploring "what files are in this project"
67
+ - Finding "all files that reference X"
68
+
69
+ ### REQUIRED
70
+
71
+ Instead, use these astria commands:
72
+
73
+ | User asks | Use this command |
74
+ |-----------|-----------------|
75
+ | "Where is X implemented?" | `astria query "X"` |
76
+ | "How does X connect to Y?" | `astria path "X" "Y"` |
77
+ | "What does X do?" | `astria explain "X"` |
78
+ | "What is the architecture?" | Read `.astria/wiki/index.md` if present, else `.astria/graph_report.md` |
79
+ | "Give me a navigable overview" | `astria wiki --graph .` then read `.astria/wiki/index.md` |
80
+ | "Find all references to X" | `astria query "X" --depth 3` |
81
+ | "What community is X in?" | `astria explain "X"` |
82
+
83
+ Only use native file reading AFTER the graph has identified the exact files you need.
84
+
85
+ ### When native tools ARE appropriate
86
+
87
+ - Editing a specific file (after graph identified which file)
88
+ - Reading a file the user explicitly named
89
+ - Running tests or build commands
90
+ - Git operations
91
+
92
+ ### When direct search / file reading is better than the graph
93
+
94
+ The graph models entities and relationships — it does NOT model behavior.
95
+ Use Grep/Glob/file reads first for:
96
+
97
+ - **Predicate-level bugs**: "is this window check off by one?", "does this
98
+ regex match branch slugs?" — expression semantics are invisible to a
99
+ graph. Read the code.
100
+ - **Exact string audits**: checking every occurrence of a literal in a
101
+ handful of files, or auditing env var names and CLI flags. Grep is
102
+ deterministic and fast here.
103
+ - **Natural-language discovery**: the graph anchors on symbol names.
104
+ `query` handles typos and partial matches, but if you don't know any
105
+ symbol name yet, a broad grep for a distinctive string is often faster.
106
+
107
+ Rule of thumb: use the graph to identify WHICH files matter (blast radius,
108
+ architecture, cross-module dependencies), then read those files directly
109
+ for exact logic. Graph output includes `file:line` anchors precisely so
110
+ you can jump straight from a node or edge to the source.
111
+
112
+ ### Provenance and reference nodes
113
+
114
+ - Every `NODE` line in `query` output carries `src=path:line`, and every
115
+ `EDGE` line ends with `@path:line` — the exact spot the relationship was
116
+ extracted from. `explain` prints `File: path:line` for the node and each
117
+ neighbor.
118
+ - Identifier-shaped string literals (env vars like `PLANE_URL`, snake_case
119
+ keys like `needs_human`, dotted/kebab/slash chains like
120
+ `harness/hr-101-fix-redis-leak`) are indexed as global `reference` nodes
121
+ with `references` edges — so "where is this config key / status value
122
+ used?" is a graph query, not a grep. Query output ends with a
123
+ `# graph built at <timestamp>` line so you can judge freshness.
124
+
125
+ ## Command Reference
126
+
127
+ ### `astria run <path>`
128
+
129
+ Full pipeline: detect → extract → build → cluster → analyze → report.
130
+
131
+ Creates `.astria/` with `db.sqlite`, `graph.json`, `graph_report.md`.
132
+
133
+ ### `astria update <path>`
134
+
135
+ Incremental rebuild — only re-extracts files that changed (SHA-256 detection).
136
+
137
+ Much faster than `run` for existing projects.
138
+
139
+ ### `astria query <question> [options]`
140
+
141
+ BFS (default) or DFS graph traversal from nodes matching your question.
142
+
143
+ ```
144
+ astria query "authentication" # BFS, depth 2, budget 2000
145
+ astria query "database" --dfs --depth 3 # DFS, deeper
146
+ astria query "error handling" --budget 3000 # more output
147
+ ```
148
+
149
+ Options:
150
+ - `--dfs` — depth-first search (traces specific paths)
151
+ - `--depth <n>` — traversal depth (default: 2)
152
+ - `--budget <n>` — token budget for output (default: 2000)
153
+ - `--directed` — follow edges only in their stored direction (caller -> callee, importer -> module)
154
+ - `--detail high` — keep only EXTRACTED/DECLARED facts, dropping inferred/semantic edges
155
+ - `--cursor <n>` — continuation token from a previous truncated query
156
+ - `--graph <path>` — project root (default: `.`)
157
+
158
+ ### `astria explain <node> [options]`
159
+
160
+ Show a node's details and all its connections.
161
+
162
+ ```
163
+ astria explain "UserService"
164
+ ```
165
+
166
+ ### `astria path <A> <B> [options]`
167
+
168
+ Find shortest path between two concepts.
169
+
170
+ ```
171
+ astria path "AuthService" "Database"
172
+ astria path "AuthService" "Database" --directed # only caller -> callee direction
173
+ ```
174
+
175
+ ### `astria affected <node> [options]`
176
+
177
+ Blast radius — everything impacted by changing a node (reverse reachability over calls/imports/uses).
178
+
179
+ ```
180
+ astria affected "UserService" --depth 3
181
+ astria affected "UserService" --relation calls
182
+ ```
183
+
184
+ ### `astria map [options]`
185
+
186
+ Aider-style repo map: files ranked by PageRank over the reference graph, with each file's most-connected symbols. Best first command when orienting on a codebase.
187
+
188
+ ```
189
+ astria map --budget 2000
190
+ ```
191
+
192
+ ### Semantic layer (local embeddings)
193
+
194
+ When the graph was built with `run --embed`, `query` automatically merges semantic recall with token matching — conceptual questions with zero string overlap still find their symbols, and `similar_to` edges link related concepts across files. No API key; the model is downloaded once and cached (`ASTRIA_EMBED_CACHE_DIR` overrides the location).
195
+
196
+ ### Learning from usage
197
+
198
+ Repeated queries leave a trace: node pairs that keep coming up across distinct questions are promoted to `learned` edges on the next `run`/`update`. The graph gets better connected in exactly the places the codebase is actually explored.
199
+
200
+ ### MCP server
201
+
202
+ `astria mcp --graph .` runs an MCP stdio server exposing the graph to AI agents with tools: `query_graph` (supports `cursor` continuation and `detail` tiers), `repo_map`, `explain`, `get_neighbors`, `shortest_path`, `affected`, `god_nodes`, `list_communities`, `graph_stats`.
203
+
204
+
205
+ ### `astria stats [options]`
206
+
207
+ Quick graph health check: node count, edge count, communities, files.
208
+
209
+ ### `astria status [options]`
210
+
211
+ Graph staleness check: fresh/stale/very_stale with age in minutes.
212
+
213
+ ### `astria export [options]`
214
+
215
+ Export graph to JSON, HTML, GraphML, or Cypher (Neo4j).
216
+
217
+ ```
218
+ astria export --format html --out graph.html
219
+ astria export --format graphml --out graph.graphml
220
+ astria export --format cypher --out astria.cypher # idempotent MERGE script for Neo4j
221
+ ```
222
+
223
+ ### `astria wiki [options]`
224
+
225
+ Wikipedia-style markdown wiki of the graph: `index.md` plus one article per community and per god node, cross-linked with relative markdown links. Readable by any agent without the CLI — point an agent at `.astria/wiki/index.md` and it navigates by reading files.
226
+
227
+ ```
228
+ astria wiki --graph . # writes .astria/wiki/
229
+ astria wiki --out docs/wiki # e.g. for GitHub
230
+ astria wiki --format obsidian --out my-vault # Obsidian vault + canvas
231
+ ```
232
+
233
+ ## Post-Edit Protocol
234
+
235
+ After modifying code files in a session with an active graph:
236
+
237
+ ```bash
238
+ astria update .
239
+ ```
240
+
241
+ Or start a watcher at session beginning:
242
+
243
+ ```bash
244
+ astria watch . --debounce 3000
245
+ ```
246
+
247
+ This keeps the graph current so subsequent queries reflect your changes.
248
+
249
+ ## Troubleshooting
250
+
251
+ **"Graph is empty (0 nodes)"**
252
+ - Run `astria run .` to build from scratch
253
+ - Check that the directory has supported file types
254
+
255
+ **"Query returns no results"**
256
+ - Try different search terms (partial matches work)
257
+ - Use broader terms: "auth" instead of "authenticateUserWithOAuth"
258
+ - Check `astria stats` to verify graph has data
259
+
260
+ **"Graph seems stale"**
261
+ - Run `astria update .` for incremental refresh
262
+ - Or `astria run .` for full rebuild
263
+
264
+ **"Status says stale"**
265
+ - The `graph.json` was built more than 30 minutes ago
266
+ - Run `astria update .` before querying
@@ -1,4 +0,0 @@
1
- [diffend] Oversized file quarantined before diffing.
2
- name: package/dist/graphify.node
3
- size: 91789824 bytes
4
- sha256: 70397036de5272faab55542b0b292b9a00a416d2f1e5c250838eba0de3cd7354