@oriro/orirocli 0.1.9 → 0.1.12

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 (166) hide show
  1. package/README.md +16 -18
  2. package/dist/cli.js +4776 -2964
  3. package/package.json +2 -2
  4. package/skills/craft/ai-engineering/SKILL.md +2 -2
  5. package/skills/graphify/SKILL.md +0 -619
  6. package/skills/graphify/__init__.py +0 -28
  7. package/skills/graphify/__main__.py +0 -4582
  8. package/skills/graphify/affected.py +0 -154
  9. package/skills/graphify/always_on/agents-md.md +0 -12
  10. package/skills/graphify/always_on/antigravity-rules.md +0 -14
  11. package/skills/graphify/always_on/claude-md.md +0 -9
  12. package/skills/graphify/always_on/gemini-md.md +0 -9
  13. package/skills/graphify/always_on/kiro-steering.md +0 -5
  14. package/skills/graphify/always_on/vscode-instructions.md +0 -17
  15. package/skills/graphify/analyze.py +0 -724
  16. package/skills/graphify/benchmark.py +0 -155
  17. package/skills/graphify/build.py +0 -487
  18. package/skills/graphify/cache.py +0 -417
  19. package/skills/graphify/callflow_html.py +0 -2020
  20. package/skills/graphify/cluster.py +0 -272
  21. package/skills/graphify/command-kilo.md +0 -15
  22. package/skills/graphify/dedup.py +0 -429
  23. package/skills/graphify/detect.py +0 -1379
  24. package/skills/graphify/diagnostics.py +0 -390
  25. package/skills/graphify/export.py +0 -1408
  26. package/skills/graphify/extract.py +0 -11570
  27. package/skills/graphify/global_graph.py +0 -159
  28. package/skills/graphify/google_workspace.py +0 -223
  29. package/skills/graphify/hooks.py +0 -457
  30. package/skills/graphify/ingest.py +0 -331
  31. package/skills/graphify/llm.py +0 -1896
  32. package/skills/graphify/manifest.py +0 -4
  33. package/skills/graphify/mcp_ingest.py +0 -392
  34. package/skills/graphify/multigraph_compat.py +0 -212
  35. package/skills/graphify/pg_introspect.py +0 -142
  36. package/skills/graphify/prs.py +0 -748
  37. package/skills/graphify/querylog.py +0 -70
  38. package/skills/graphify/report.py +0 -218
  39. package/skills/graphify/scip_ingest.py +0 -363
  40. package/skills/graphify/security.py +0 -336
  41. package/skills/graphify/semantic_cleanup.py +0 -319
  42. package/skills/graphify/serve.py +0 -1309
  43. package/skills/graphify/skill-aider.md +0 -1246
  44. package/skills/graphify/skill-amp.md +0 -613
  45. package/skills/graphify/skill-claw.md +0 -616
  46. package/skills/graphify/skill-codex.md +0 -613
  47. package/skills/graphify/skill-copilot.md +0 -616
  48. package/skills/graphify/skill-devin.md +0 -1372
  49. package/skills/graphify/skill-droid.md +0 -613
  50. package/skills/graphify/skill-kilo.md +0 -625
  51. package/skills/graphify/skill-kiro.md +0 -615
  52. package/skills/graphify/skill-opencode.md +0 -608
  53. package/skills/graphify/skill-pi.md +0 -615
  54. package/skills/graphify/skill-trae.md +0 -614
  55. package/skills/graphify/skill-vscode.md +0 -612
  56. package/skills/graphify/skill-windows.md +0 -651
  57. package/skills/graphify/skills/amp/references/add-watch.md +0 -56
  58. package/skills/graphify/skills/amp/references/exports.md +0 -71
  59. package/skills/graphify/skills/amp/references/extraction-spec.md +0 -68
  60. package/skills/graphify/skills/amp/references/github-and-merge.md +0 -46
  61. package/skills/graphify/skills/amp/references/hooks.md +0 -33
  62. package/skills/graphify/skills/amp/references/query.md +0 -249
  63. package/skills/graphify/skills/amp/references/transcribe.md +0 -48
  64. package/skills/graphify/skills/amp/references/update.md +0 -179
  65. package/skills/graphify/skills/claude/references/add-watch.md +0 -56
  66. package/skills/graphify/skills/claude/references/exports.md +0 -71
  67. package/skills/graphify/skills/claude/references/extraction-spec.md +0 -68
  68. package/skills/graphify/skills/claude/references/github-and-merge.md +0 -46
  69. package/skills/graphify/skills/claude/references/hooks.md +0 -33
  70. package/skills/graphify/skills/claude/references/query.md +0 -103
  71. package/skills/graphify/skills/claude/references/transcribe.md +0 -48
  72. package/skills/graphify/skills/claude/references/update.md +0 -179
  73. package/skills/graphify/skills/claw/references/add-watch.md +0 -56
  74. package/skills/graphify/skills/claw/references/exports.md +0 -71
  75. package/skills/graphify/skills/claw/references/extraction-spec.md +0 -29
  76. package/skills/graphify/skills/claw/references/github-and-merge.md +0 -46
  77. package/skills/graphify/skills/claw/references/hooks.md +0 -33
  78. package/skills/graphify/skills/claw/references/query.md +0 -249
  79. package/skills/graphify/skills/claw/references/transcribe.md +0 -48
  80. package/skills/graphify/skills/claw/references/update.md +0 -179
  81. package/skills/graphify/skills/codex/references/add-watch.md +0 -56
  82. package/skills/graphify/skills/codex/references/exports.md +0 -71
  83. package/skills/graphify/skills/codex/references/extraction-spec.md +0 -29
  84. package/skills/graphify/skills/codex/references/github-and-merge.md +0 -46
  85. package/skills/graphify/skills/codex/references/hooks.md +0 -33
  86. package/skills/graphify/skills/codex/references/query.md +0 -249
  87. package/skills/graphify/skills/codex/references/transcribe.md +0 -48
  88. package/skills/graphify/skills/codex/references/update.md +0 -179
  89. package/skills/graphify/skills/copilot/references/add-watch.md +0 -56
  90. package/skills/graphify/skills/copilot/references/exports.md +0 -71
  91. package/skills/graphify/skills/copilot/references/extraction-spec.md +0 -68
  92. package/skills/graphify/skills/copilot/references/github-and-merge.md +0 -46
  93. package/skills/graphify/skills/copilot/references/hooks.md +0 -33
  94. package/skills/graphify/skills/copilot/references/query.md +0 -249
  95. package/skills/graphify/skills/copilot/references/transcribe.md +0 -48
  96. package/skills/graphify/skills/copilot/references/update.md +0 -179
  97. package/skills/graphify/skills/droid/references/add-watch.md +0 -56
  98. package/skills/graphify/skills/droid/references/exports.md +0 -71
  99. package/skills/graphify/skills/droid/references/extraction-spec.md +0 -68
  100. package/skills/graphify/skills/droid/references/github-and-merge.md +0 -46
  101. package/skills/graphify/skills/droid/references/hooks.md +0 -33
  102. package/skills/graphify/skills/droid/references/query.md +0 -249
  103. package/skills/graphify/skills/droid/references/transcribe.md +0 -48
  104. package/skills/graphify/skills/droid/references/update.md +0 -179
  105. package/skills/graphify/skills/kilo/references/add-watch.md +0 -56
  106. package/skills/graphify/skills/kilo/references/exports.md +0 -71
  107. package/skills/graphify/skills/kilo/references/extraction-spec.md +0 -68
  108. package/skills/graphify/skills/kilo/references/github-and-merge.md +0 -46
  109. package/skills/graphify/skills/kilo/references/hooks.md +0 -33
  110. package/skills/graphify/skills/kilo/references/query.md +0 -249
  111. package/skills/graphify/skills/kilo/references/transcribe.md +0 -48
  112. package/skills/graphify/skills/kilo/references/update.md +0 -179
  113. package/skills/graphify/skills/kiro/references/add-watch.md +0 -56
  114. package/skills/graphify/skills/kiro/references/exports.md +0 -71
  115. package/skills/graphify/skills/kiro/references/extraction-spec.md +0 -29
  116. package/skills/graphify/skills/kiro/references/github-and-merge.md +0 -46
  117. package/skills/graphify/skills/kiro/references/hooks.md +0 -33
  118. package/skills/graphify/skills/kiro/references/query.md +0 -249
  119. package/skills/graphify/skills/kiro/references/transcribe.md +0 -48
  120. package/skills/graphify/skills/kiro/references/update.md +0 -179
  121. package/skills/graphify/skills/opencode/references/add-watch.md +0 -56
  122. package/skills/graphify/skills/opencode/references/exports.md +0 -71
  123. package/skills/graphify/skills/opencode/references/extraction-spec.md +0 -68
  124. package/skills/graphify/skills/opencode/references/github-and-merge.md +0 -46
  125. package/skills/graphify/skills/opencode/references/hooks.md +0 -33
  126. package/skills/graphify/skills/opencode/references/query.md +0 -249
  127. package/skills/graphify/skills/opencode/references/transcribe.md +0 -48
  128. package/skills/graphify/skills/opencode/references/update.md +0 -179
  129. package/skills/graphify/skills/pi/references/add-watch.md +0 -56
  130. package/skills/graphify/skills/pi/references/exports.md +0 -71
  131. package/skills/graphify/skills/pi/references/extraction-spec.md +0 -29
  132. package/skills/graphify/skills/pi/references/github-and-merge.md +0 -46
  133. package/skills/graphify/skills/pi/references/hooks.md +0 -33
  134. package/skills/graphify/skills/pi/references/query.md +0 -249
  135. package/skills/graphify/skills/pi/references/transcribe.md +0 -48
  136. package/skills/graphify/skills/pi/references/update.md +0 -179
  137. package/skills/graphify/skills/trae/references/add-watch.md +0 -56
  138. package/skills/graphify/skills/trae/references/exports.md +0 -71
  139. package/skills/graphify/skills/trae/references/extraction-spec.md +0 -68
  140. package/skills/graphify/skills/trae/references/github-and-merge.md +0 -46
  141. package/skills/graphify/skills/trae/references/hooks.md +0 -35
  142. package/skills/graphify/skills/trae/references/query.md +0 -249
  143. package/skills/graphify/skills/trae/references/transcribe.md +0 -48
  144. package/skills/graphify/skills/trae/references/update.md +0 -179
  145. package/skills/graphify/skills/vscode/references/add-watch.md +0 -56
  146. package/skills/graphify/skills/vscode/references/exports.md +0 -71
  147. package/skills/graphify/skills/vscode/references/extraction-spec.md +0 -68
  148. package/skills/graphify/skills/vscode/references/github-and-merge.md +0 -46
  149. package/skills/graphify/skills/vscode/references/hooks.md +0 -33
  150. package/skills/graphify/skills/vscode/references/query.md +0 -249
  151. package/skills/graphify/skills/vscode/references/transcribe.md +0 -48
  152. package/skills/graphify/skills/vscode/references/update.md +0 -179
  153. package/skills/graphify/skills/windows/references/add-watch.md +0 -56
  154. package/skills/graphify/skills/windows/references/exports.md +0 -71
  155. package/skills/graphify/skills/windows/references/extraction-spec.md +0 -68
  156. package/skills/graphify/skills/windows/references/github-and-merge.md +0 -46
  157. package/skills/graphify/skills/windows/references/hooks.md +0 -33
  158. package/skills/graphify/skills/windows/references/query.md +0 -249
  159. package/skills/graphify/skills/windows/references/transcribe.md +0 -48
  160. package/skills/graphify/skills/windows/references/update.md +0 -179
  161. package/skills/graphify/symbol_resolution.py +0 -538
  162. package/skills/graphify/transcribe.py +0 -184
  163. package/skills/graphify/tree_html.py +0 -582
  164. package/skills/graphify/validate.py +0 -72
  165. package/skills/graphify/watch.py +0 -898
  166. package/skills/graphify/wiki.py +0 -282
@@ -1,154 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from collections import deque
4
- from dataclasses import dataclass
5
- from pathlib import Path
6
- from typing import Iterable
7
-
8
- import networkx as nx
9
-
10
-
11
- DEFAULT_AFFECTED_RELATIONS = (
12
- "calls",
13
- "references",
14
- "imports",
15
- "imports_from",
16
- "re_exports",
17
- "inherits",
18
- "extends",
19
- "implements",
20
- "uses",
21
- "mixes_in",
22
- "embeds",
23
- )
24
-
25
-
26
- @dataclass(frozen=True)
27
- class AffectedHit:
28
- node_id: str
29
- depth: int
30
- via_relation: str
31
-
32
-
33
- def _node_label(graph: nx.Graph, node_id: str) -> str:
34
- data = graph.nodes[node_id]
35
- return str(data.get("label") or node_id)
36
-
37
-
38
- def _format_location(data: dict) -> str:
39
- source_file = data.get("source_file") or "-"
40
- source_location = data.get("source_location")
41
- if source_location:
42
- return f"{source_file}:{source_location}"
43
- return str(source_file)
44
-
45
-
46
- def resolve_seed(graph: nx.Graph, query: str) -> str | None:
47
- if query in graph:
48
- return query
49
- query_lower = query.lower()
50
- exact_label_matches = [
51
- str(node_id)
52
- for node_id, data in graph.nodes(data=True)
53
- if str(data.get("label", "")).lower() == query_lower
54
- ]
55
- if len(exact_label_matches) == 1:
56
- return exact_label_matches[0]
57
- exact_source_matches = [
58
- str(node_id)
59
- for node_id, data in graph.nodes(data=True)
60
- if str(data.get("source_file", "")).lower() == query_lower
61
- ]
62
- if len(exact_source_matches) == 1:
63
- return exact_source_matches[0]
64
- contains_matches = [
65
- str(node_id)
66
- for node_id, data in graph.nodes(data=True)
67
- if query_lower in str(data.get("label", "")).lower()
68
- ]
69
- if len(contains_matches) == 1:
70
- return contains_matches[0]
71
- return None
72
-
73
-
74
- def affected_nodes(
75
- graph: nx.Graph,
76
- seed: str,
77
- *,
78
- relations: Iterable[str] = DEFAULT_AFFECTED_RELATIONS,
79
- depth: int = 2,
80
- ) -> list[AffectedHit]:
81
- relation_set = set(relations)
82
- seen = {seed}
83
- queue: deque[tuple[str, int]] = deque([(seed, 0)])
84
- hits: list[AffectedHit] = []
85
-
86
- while queue:
87
- current, current_depth = queue.popleft()
88
- if current_depth >= depth:
89
- continue
90
- if hasattr(graph, "in_edges"):
91
- incoming = graph.in_edges(current, data=True)
92
- else:
93
- incoming = (
94
- (source, target, data)
95
- for source, target, data in graph.edges(data=True)
96
- if target == current
97
- )
98
- for source, _target, data in incoming:
99
- relation = str(data.get("relation", ""))
100
- if relation not in relation_set:
101
- continue
102
- source = str(source)
103
- if source in seen:
104
- continue
105
- seen.add(source)
106
- hit = AffectedHit(source, current_depth + 1, relation)
107
- hits.append(hit)
108
- queue.append((source, current_depth + 1))
109
-
110
- return hits
111
-
112
-
113
- def format_affected(
114
- graph: nx.Graph,
115
- query: str,
116
- *,
117
- relations: Iterable[str] = DEFAULT_AFFECTED_RELATIONS,
118
- depth: int = 2,
119
- ) -> str:
120
- relation_list = tuple(relations)
121
- seed = resolve_seed(graph, query)
122
- if seed is None:
123
- return f"No unique node match for {query}"
124
-
125
- hits = affected_nodes(graph, seed, relations=relation_list, depth=depth)
126
- lines = [
127
- f"Affected nodes for {_node_label(graph, seed)}",
128
- f"Relations: {', '.join(relation_list)}",
129
- f"Depth: {depth}",
130
- ]
131
- if not hits:
132
- lines.append("No affected nodes found.")
133
- return "\n".join(lines)
134
-
135
- for hit in hits:
136
- data = graph.nodes[hit.node_id]
137
- lines.append(
138
- f"- {_node_label(graph, hit.node_id)} [{hit.via_relation}] {_format_location(data)}"
139
- )
140
- return "\n".join(lines)
141
-
142
-
143
- def load_graph(path: Path) -> nx.Graph:
144
- import json
145
- from networkx.readwrite import json_graph
146
-
147
- raw = json.loads(path.read_text(encoding="utf-8"))
148
- # Force directed so stored caller→callee direction survives the round-trip;
149
- # mirrors serve.py and __main__.py (#1174).
150
- raw = {**raw, "directed": True}
151
- try:
152
- return json_graph.node_link_graph(raw, edges="links")
153
- except TypeError:
154
- return json_graph.node_link_graph(raw)
@@ -1,12 +0,0 @@
1
- ## graphify
2
-
3
- This project has a knowledge graph at graphify-out/ with god nodes, community structure, and cross-file relationships.
4
-
5
- When the user types `/graphify`, invoke the `skill` tool with `skill: "graphify"` before doing anything else.
6
-
7
- Rules:
8
- - For codebase questions, first run `graphify query "<question>"` when graphify-out/graph.json exists. Use `graphify path "<A>" "<B>"` for relationships and `graphify explain "<concept>"` for focused concepts. These return a scoped subgraph, usually much smaller than GRAPH_REPORT.md or raw grep output.
9
- - Dirty graphify-out/ files are expected after hooks or incremental updates; dirty graph files are not a reason to skip graphify. Only skip graphify if the task is about stale or incorrect graph output, or the user explicitly says not to use it.
10
- - If graphify-out/wiki/index.md exists, use it for broad navigation instead of raw source browsing.
11
- - Read graphify-out/GRAPH_REPORT.md only for broad architecture review or when query/path/explain do not surface enough context.
12
- - After modifying code, run `graphify update .` to keep the graph current (AST-only, no API cost).
@@ -1,14 +0,0 @@
1
- ---
2
- trigger: always_on
3
- description: Consult the graphify knowledge graph at graphify-out/ for codebase and architecture questions.
4
- ---
5
-
6
- ## graphify
7
-
8
- This project has a graphify knowledge graph at graphify-out/.
9
-
10
- Rules:
11
- - For codebase or architecture questions, when `graphify-out/graph.json` exists, first run `graphify query "<question>"` (CLI) or `query_graph` (MCP). Use `graphify path "<A>" "<B>"` / `shortest_path` for relationships and `graphify explain "<concept>"` / `get_node` for focused concepts. These return a scoped subgraph, usually much smaller than `GRAPH_REPORT.md` or raw grep output.
12
- - If graphify-out/wiki/index.md exists, navigate it instead of reading raw files
13
- - Read graphify-out/GRAPH_REPORT.md only for broad architecture review or when query/path/explain do not surface enough context
14
- - After modifying code files in this session, run `graphify update .` to keep the graph current (AST-only, no API cost)
@@ -1,9 +0,0 @@
1
- ## graphify
2
-
3
- This project has a knowledge graph at graphify-out/ with god nodes, community structure, and cross-file relationships.
4
-
5
- Rules:
6
- - For codebase questions, first run `graphify query "<question>"` when graphify-out/graph.json exists. Use `graphify path "<A>" "<B>"` for relationships and `graphify explain "<concept>"` for focused concepts. These return a scoped subgraph, usually much smaller than GRAPH_REPORT.md or raw grep output.
7
- - If graphify-out/wiki/index.md exists, use it for broad navigation instead of raw source browsing.
8
- - Read graphify-out/GRAPH_REPORT.md only for broad architecture review or when query/path/explain do not surface enough context.
9
- - After modifying code, run `graphify update .` to keep the graph current (AST-only, no API cost).
@@ -1,9 +0,0 @@
1
- ## graphify
2
-
3
- This project has a knowledge graph at graphify-out/ with god nodes, community structure, and cross-file relationships.
4
-
5
- Rules:
6
- - For codebase questions, first run `graphify query "<question>"` when graphify-out/graph.json exists. Use `graphify path "<A>" "<B>"` for relationships and `graphify explain "<concept>"` for focused concepts. These return a scoped subgraph, usually much smaller than GRAPH_REPORT.md or raw grep output.
7
- - If graphify-out/wiki/index.md exists, use it for broad navigation instead of raw source browsing.
8
- - Read graphify-out/GRAPH_REPORT.md only for broad architecture review or when query/path/explain do not surface enough context.
9
- - After modifying code, run `graphify update .` to keep the graph current (AST-only, no API cost).
@@ -1,5 +0,0 @@
1
- ---
2
- inclusion: always
3
- ---
4
-
5
- graphify: A knowledge graph of this project lives in `graphify-out/`. For codebase, architecture, or dependency questions, when `graphify-out/graph.json` exists, first run `graphify query "<question>"` (or `graphify path "<A>" "<B>"` / `graphify explain "<concept>"`). These return a scoped subgraph, usually much smaller than `GRAPH_REPORT.md` or raw grep output. Read `GRAPH_REPORT.md` only for broad architecture review or when those commands do not surface enough context.
@@ -1,17 +0,0 @@
1
- ## graphify
2
-
3
- For any question about this repo's architecture, structure, components, or how to add/modify/find
4
- code, your first action should be `graphify query "<question>"` when `graphify-out/graph.json`
5
- exists. Use `graphify path "<A>" "<B>"` for relationship questions and `graphify explain "<concept>"`
6
- for focused-concept questions. These return a scoped subgraph, usually much smaller than the full
7
- report or raw grep output.
8
-
9
- Triggers: "how do I…", "where is…", "what does … do", "add/modify a <component>",
10
- "explain the architecture", or anything that depends on how files or classes relate.
11
-
12
- If `graphify-out/wiki/index.md` exists, use it for broad navigation. Read `graphify-out/GRAPH_REPORT.md`
13
- only for broad architecture review or when query/path/explain do not surface enough context. Only read
14
- source files when (a) modifying/debugging specific code, (b) the graph lacks the needed detail, or
15
- (c) the graph is missing or stale.
16
-
17
- Type `/graphify` in Copilot Chat to build or update the graph.