Skip to content

Commit 625f8d6

Browse files
authored
Merge pull request #3 from managedcode/codex/standardize-project-naming-and-improve-readme
Fix .NET 10 test runner and finalize `ragsharp-graph` rename / storage path changes
2 parents e10206a + bc5d972 commit 625f8d6

File tree

22 files changed

+115
-50
lines changed

22 files changed

+115
-50
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ bin/
22
obj/
33
.vs/
44
.idea/
5-
.codegraph/
5+
.ragsharp/graph/
66
dist/
77
artifacts/
88
TestResults/

Directory.Build.targets

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
<Target Name="_MTPBeforeVSTest" BeforeTargets="VSTest">
3+
<PropertyGroup>
4+
<_SupportsGlobalJsonTestRunner>false</_SupportsGlobalJsonTestRunner>
5+
</PropertyGroup>
6+
<CallTarget Condition="'$(VSTestNoBuild)' != 'true' AND '$(TargetFramework)' != ''" Targets="BuildProject" />
7+
</Target>
8+
</Project>

README.md

Lines changed: 54 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11
# RagSharp
22

3-
RagSharp provides a deterministic, offline-capable code graph indexer and skill installer for C#/.NET repositories. It ships a single NuGet package containing:
3+
RagSharp is a deterministic, offline-capable toolkit for indexing and querying C#/.NET repositories.
4+
It ships as a single NuGet package that provides two command-line tools:
45

5-
- `ragsharp`installer for Codex skills.
6-
- `ragsharp-codegraph` — code graph indexer/query CLI.
6+
- `ragsharp`installs/uninstalls Codex skills into a repository.
7+
- `ragsharp-graph`builds and queries a code graph index for fast, structured lookups.
78

89
See the Codex skill specification at https://agentskills.io/specification.
910

11+
## What RagSharp does
12+
13+
RagSharp focuses on repeatable, offline analysis of C# codebases:
14+
15+
- **Indexes** source code and builds a graph of types, members, usings, and relationships.
16+
- **Queries** the graph (symbols, inheritance, references) and outputs JSON for automation.
17+
- **Installs skills** that wrap common workflows such as indexing or querying.
18+
19+
All outputs are stored under `.ragsharp/graph/` by default to keep artifacts organized and
20+
easy to clean up.
21+
1022
## Requirements
1123

1224
- .NET SDK 10 (only target).
@@ -26,7 +38,7 @@ dotnet --list-sdks
2638
```bash
2739
dotnet build
2840

29-
dotnet test
41+
dotnet test ragsharp.slnx
3042
```
3143

3244
## Package
@@ -45,21 +57,53 @@ dotnet add package RagSharp --source /path/to/ragsharp/dist
4557
ragsharp install --root . --skill-dir .codex/skills
4658
```
4759

48-
## Index and query
60+
## RagSharp Graph quickstart
61+
62+
Build and query the graph:
4963

5064
```bash
51-
ragsharp-codegraph doctor --root .
65+
ragsharp-graph doctor --root .
5266

53-
ragsharp-codegraph index --root . --db .codegraph/index.db --state .codegraph/state.json
67+
ragsharp-graph index --root . --db .ragsharp/graph/index.db --state .ragsharp/graph/state.json
5468

55-
ragsharp-codegraph query symbols --db .codegraph/index.db --format json --limit 50 --symbol "Greeter"
69+
ragsharp-graph query symbols --db .ragsharp/graph/index.db --format json --limit 50 --symbol "Greeter"
70+
```
71+
72+
Export the graph:
73+
74+
```bash
75+
ragsharp-graph export --db .ragsharp/graph/index.db --format dot --out .ragsharp/graph/graph.dot
5676
```
5777

78+
## CLI reference
79+
80+
### `ragsharp`
81+
82+
- `ragsharp install --root <path> --skill-dir <path>` — install skills.
83+
- `ragsharp uninstall --root <path> --skill-dir <path>` — uninstall skills.
84+
85+
### `ragsharp-graph`
86+
87+
- `doctor` — verify the environment and print the repository root.
88+
- `index` — build a fresh index.
89+
- `update` — incrementally update the index and remove deleted files.
90+
- `query <type>` — query the index (`symbols`, `usings`, etc.) and emit JSON.
91+
- `export` — export the graph as `dot` or `gexf`.
92+
5893
## Output locations
5994

6095
- `.codex/skills/` contains installed skills.
61-
- `.codegraph/` contains the index and state files (not committed).
62-
- Ensure `.codegraph/` and `state.json` remain in `.gitignore`.
96+
- `.ragsharp/graph/` contains the index and state files (not committed).
97+
- Ensure `.ragsharp/graph/` and `state.json` remain in `.gitignore`.
98+
99+
## Example prompts
100+
101+
Use these with your assistant after indexing:
102+
103+
- “List the top 20 symbols that inherit from `BaseType` in JSON.”
104+
- “Show usages of `HttpClient` and include 3 context lines.”
105+
- “Find all public methods in `src/` that return `Task`.”
106+
- “Export the graph to DOT and summarize the top 10 node kinds.”
63107

64108
## Troubleshooting
65109

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
name: ragsharp-build-code-graph
33
description: |
4-
Build or update a code graph index for C#/.NET repositories using ragsharp-codegraph.
4+
Build or update a code graph index for C#/.NET repositories using ragsharp-graph.
55
Triggers: build index, update index, refresh index, code graph, dependency graph, static analysis, Roslyn, line numbers.
66
---
77
## Steps
8-
1. Run `ragsharp-codegraph doctor --root .`.
9-
2. Run `ragsharp-codegraph index --root . --db .codegraph/index.db --state .codegraph/state.json`.
10-
3. For incremental updates, run `ragsharp-codegraph update --root . --db .codegraph/index.db --state .codegraph/state.json`.
8+
1. Run `ragsharp-graph doctor --root .`.
9+
2. Run `ragsharp-graph index --root . --db .ragsharp/graph/index.db --state .ragsharp/graph/state.json`.
10+
3. For incremental updates, run `ragsharp-graph update --root . --db .ragsharp/graph/index.db --state .ragsharp/graph/state.json`.
1111

1212
## Expected Results
13-
- `.codegraph/index.db` exists.
14-
- `.codegraph/state.json` is updated.
13+
- `.ragsharp/graph/index.db` exists.
14+
- `.ragsharp/graph/state.json` is updated.
1515
- Output goes to stderr, JSON is emitted only for query commands.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Build Code Graph Skill
22

33
Use this skill to initialize or refresh the code graph index.
4-
- `ragsharp-codegraph doctor` validates tooling.
5-
- `ragsharp-codegraph index` builds the graph.
6-
- `ragsharp-codegraph update` applies incremental changes.
4+
- `ragsharp-graph doctor` validates tooling.
5+
- `ragsharp-graph index` builds the graph.
6+
- `ragsharp-graph update` applies incremental changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
param([string]$Root = ".")
2-
ragsharp-codegraph index --root $Root --db .codegraph/index.db --state .codegraph/state.json
2+
ragsharp-graph index --root $Root --db .ragsharp/graph/index.db --state .ragsharp/graph/state.json
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
3-
ragsharp-codegraph index --root "${1:-.}" --db .codegraph/index.db --state .codegraph/state.json
3+
ragsharp-graph index --root "${1:-.}" --db .ragsharp/graph/index.db --state .ragsharp/graph/state.json

assets/skill-templates/query-code-graph/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ description: |
55
Triggers: find usages, where defined, callers, callees, dependency path, project deps, type hierarchy, line numbers, evidence.
66
---
77
## Steps
8-
1. Run `ragsharp-codegraph query symbols --db .codegraph/index.db --format json --limit 50 --symbol "SymbolName"`.
8+
1. Run `ragsharp-graph query symbols --db .ragsharp/graph/index.db --format json --limit 50 --symbol "SymbolName"`.
99
2. Use the JSON output to answer questions with file:line-range evidence.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
param([string]$Symbol = "")
2-
ragsharp-codegraph query symbols --db .codegraph/index.db --format json --limit 50 --symbol $Symbol
2+
ragsharp-graph query symbols --db .ragsharp/graph/index.db --format json --limit 50 --symbol $Symbol
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
3-
ragsharp-codegraph query symbols --db .codegraph/index.db --format json --limit 50 --symbol "${1:-}"
3+
ragsharp-graph query symbols --db .ragsharp/graph/index.db --format json --limit 50 --symbol "${1:-}"

0 commit comments

Comments
 (0)