You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,9 @@ Target capabilities:
48
48
## Durable Project Rules
49
49
50
50
- Keep the core Markdown-to-graph pipeline deterministic and testable without network access.
51
+
- Keep the core runtime in-memory. Do not introduce localhost, HTTP server, background service, database server, or hosted API dependencies into the production library.
51
52
- Treat LLM/entity extraction as an adapter behind a small interface and implement that adapter through `Microsoft.Extensions.AI.IChatClient` from the start.
53
+
- Do not add an embedding dependency to the core graph pipeline. If vector/semantic indexing is added later, expose it as an optional adapter boundary through `Microsoft.Extensions.AI.IEmbeddingGenerator<,>` or a similarly small port, with the concrete provider owned by the host app.
52
54
- It is allowed for the production library to reference `Microsoft.Extensions.AI.Abstractions`; concrete OpenAI/Azure/Foundry providers must remain app-level dependencies unless an ADR says otherwise.
53
55
- The product/library name is `Markdown-LD Knowledge Bank`; do not rename it to a shorter marketing name.
54
56
- The C# root namespace, assembly identity, and package ID MUST be `ManagedCode.MarkdownLd.Kb`.
@@ -85,7 +87,7 @@ List only the skills this solution actually uses.
Copy file name to clipboardExpand all lines: docs/ADR/ADR-0001-rdf-sparql-library.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,10 @@ Related Features: `docs/Architecture.md`
10
10
11
11
-[x] Analyze upstream graph stack and .NET options.
12
12
-[x] Choose the RDF/SPARQL dependency.
13
-
-[] Add dotNetRDF to the production project.
14
-
-[] Add flow tests that query generated graphs through SPARQL.
15
-
-[] Run build, test, format, and coverage commands.
16
-
-[] Update `docs/Architecture.md` if dependency boundaries change.
13
+
-[x] Add dotNetRDF to the production project.
14
+
-[x] Add flow tests that query generated graphs through SPARQL.
15
+
-[x] Run build, test, format, and coverage commands.
16
+
-[x] Update `docs/Architecture.md` if dependency boundaries change.
17
17
18
18
## Context
19
19
@@ -46,6 +46,7 @@ Use dotNetRDF as the RDF graph, serialization, and SPARQL engine for the first .
46
46
Key points:
47
47
48
48
- dotNetRDF replaces Python RDFLib for the C# port.
49
+
- The selected package supports RDF/SPARQL in .NET and the user guide documents in-memory RDF data and in-memory SPARQL querying, which matches the no-server core runtime boundary.
49
50
- Markdig and YamlDotNet will handle Markdown/front matter parsing separately.
50
51
- AI extraction remains behind an extraction port that uses `Microsoft.Extensions.AI.IChatClient`; provider/orchestration packages are not part of this RDF dependency decision.
51
52
@@ -98,7 +99,7 @@ flowchart LR
98
99
99
100
Mitigations:
100
101
101
-
- Hide dependency details behind `KnowledgeGraph`, `KnowledgeQueryService`, and serialization methods where practical.
102
+
- Hide dependency details behind `KnowledgeGraph` query methods, `KnowledgeSearchService`, and serialization methods where practical.
102
103
- Add tests for serialization and SPARQL query paths.
103
104
- Keep remote/federated SPARQL out of the first slice.
Copy file name to clipboardExpand all lines: docs/Architecture.md
+15-8Lines changed: 15 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,22 +4,26 @@ Date: 2026-04-11
4
4
5
5
## Purpose
6
6
7
-
Markdown-LD Knowledge Bank is a .NET 10 library for converting human-authored Markdown knowledge-base files into an RDF knowledge graph and querying that graph through SPARQL or higher-level search APIs.
7
+
Markdown-LD Knowledge Bank is a .NET 10 library for converting human-authored Markdown knowledge-base files into an in-memory RDF knowledge graph and querying that graph through SPARQL or higher-level search APIs.
8
8
9
9
The upstream reference repository is kept as a read-only submodule at `external/lqdev-markdown-ld-kb`. This C# implementation ports the technology, not the Python file layout.
10
10
11
+
The core runtime has no localhost, HTTP server, background service, database server, or hosted API dependency. Callers pass files, directories, or in-memory document content into the library, and the library returns in-memory graph/search/query results.
12
+
13
+
The first-slice graph/search model does not require embeddings. The only AI boundary in the core pipeline is `Microsoft.Extensions.AI.IChatClient` for optional entity/assertion extraction. If semantic vector search is added later, it should be a separate optional adapter over `Microsoft.Extensions.AI.IEmbeddingGenerator<,>` or an equivalent small port, with the concrete provider owned by the host app.
|`api/function_app.py`|`KnowledgeQueryService`| SELECT/ASK safety, SPARQL execution, JSON result shape at library level |
89
+
|`api/function_app.py`|`KnowledgeGraph` query methods and `KnowledgeSearchService`| SELECT/ASK safety, in-memory SPARQL execution, JSON result shape at library level without a hosted function/server|
86
90
|`tools/llm_client.py`|`ChatClientKnowledgeFactExtractor`| structured LLM extraction through `Microsoft.Extensions.AI.IChatClient`|
87
91
|`api/nl_to_sparql.py`| future query adapter | schema-injected NL-to-SPARQL through `IChatClient`; Microsoft Agent Framework may orchestrate this later |
- RDF graph building and SPARQL execution depend on dotNetRDF.
94
98
- LLM extraction depends on `Microsoft.Extensions.AI.Abstractions` and accepts `IChatClient`.
99
+
- Embeddings are not required for the core graph build/query flow.
95
100
- Public API should prefer repository types over raw dependency types when feasible.
96
101
- AI adapters depend on the core extraction port. The core library must not depend on concrete provider packages or agent orchestration packages in the first slice.
97
102
@@ -117,5 +122,7 @@ Coverage requirement: 95%+ line coverage for changed production code.
Copy file name to clipboardExpand all lines: src/MarkdownLd.Kb/AGENTS.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,13 +16,15 @@ Purpose: Production library for Markdown-LD Knowledge Bank.
16
16
- The production library may reference `Microsoft.Extensions.AI` abstractions, Markdig, YamlDotNet, and dotNetRDF.
17
17
- Do not add provider-specific LLM SDKs here.
18
18
- Do not add Microsoft Agent Framework packages here without a new ADR.
19
+
- Do not add localhost, HTTP server, background service, database server, or hosted API dependencies. The production pipeline must build, store, query, and serialize graphs in memory.
20
+
- Do not add embedding/vector provider dependencies to the core pipeline. Future semantic/vector search must be optional and provider-neutral.
19
21
- Keep the root namespace, assembly name, and package ID as `ManagedCode.MarkdownLd.Kb`.
0 commit comments