Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the README into a concise overview with links to new dedicated documentation pages, fixes MCP query consistency issues for sourceFile and tags filters, and bumps package versions.
Changes:
- Slim down README.md and extract detailed content into new docs (
install.md,cli-reference.md,troubleshooting.md,retroactive-init.md); add branding assets - Fix
kb_entities_by_sourcein Prolog to usesource=(matching entity property format) instead ofsource-, with type normalization viasource_value_atom/2 - Move tag filtering from Prolog to JavaScript with deduplication, and add comprehensive integration/unit tests for tag, source, and dedup queries
Reviewed changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Condensed to overview with links to new docs pages |
| AGENTS.md | Added Staged Symbol Traceability section for agents |
| docs/install.md | New installation guide with SWI-Prolog and kibi setup |
| docs/cli-reference.md | New complete CLI command reference |
| docs/troubleshooting.md | New troubleshooting and recovery guide |
| docs/prompts/retroactive-init.md | New prompt for bootstrapping kibi in existing repos |
| packages/core/src/kb.pl | Fixed kb_entities_by_source source property lookup and added source_value_atom/2 |
| packages/mcp/src/tools/query.ts | Moved tag filtering to JS with hasAnyTag, normalizeTagValue, dedupeEntities |
| packages/mcp/tests/tools/query.test.ts | Updated mocks, added tag dedup test, removed Prolog-level tag assertions |
| packages/mcp/tests/tools/crud.test.ts | Added integration tests for sourceFile, tags, and dedup queries |
| packages/core/package.json | Version bump to 0.1.8 |
| packages/mcp/package.json | Version bump to 0.2.4, updated kibi-core dep |
| packages/core/CHANGELOG.md | Added 0.1.8 changelog entry |
| packages/mcp/CHANGELOG.md | Added 0.2.4 changelog entry |
| assets/logo.svg | New logo asset |
| assets/wordmark.svg | New wordmark asset |
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+14
to
+23
| ## Prerequisites | ||
|
|
||
| - **SWI-Prolog 9.0+**: The core RDF graph and validation rules run on Prolog. You must have `swipl` installed and available in your PATH. | ||
| - **kibi-core** (installed automatically with kibi-cli) — Prolog-based knowledge graph that tracks entities across branches | ||
| - **SWI-Prolog 9.0+** — Kibi's knowledge graph runs on Prolog | ||
| ### Key Components | ||
|
|
||
| - **kibi-core** — Prolog-based knowledge graph that tracks entities across branches | ||
| - **kibi-cli** — Command-line interface for automation and hooks | ||
| - **kibi-mcp** — Model Context Protocol server for LLM integration | ||
| - **kibi-vscode** — VS Code extension for exploring the knowledge base |
| - **Tracks context across branches** — Every git branch gets its own KB snapshot, preserving context as you switch between features | ||
| - **Enforces traceability** — Links code symbols to requirements, preventing orphan features and technical debt | ||
| - **Validates automatically** — Rules catch missing requirements, dangling references, and consistency issues | ||
| - **Agent-friendly** — LLM assistants can query and update knowledge base via MCP without risking file corruption |
Comment on lines
124
to
130
| } else if (tags && tags.length > 0) { | ||
| const tagList = `[${tags.map((t) => `'${escapeAtomContent(t)}'`).join(",")}]`; | ||
| if (type) { | ||
| const safeType = escapeAtomContent(type); | ||
| goal = `findall([Id,'${safeType}',Props], (kb_entity(Id, '${safeType}', Props), memberchk(tags=Tags, Props), member(Tag, Tags), member(Tag, ${tagList})), Results)`; | ||
| goal = `findall([Id,'${safeType}',Props], kb_entity(Id, '${safeType}', Props), Results)`; | ||
| } else { | ||
| goal = `findall([Id,Type,Props], (kb_entity(Id, Type, Props), memberchk(tags=Tags, Props), member(Tag, Tags), member(Tag, ${tagList})), Results)`; | ||
| goal = "findall([Id,Type,Props], kb_entity(Id, Type, Props), Results)"; | ||
| } |
Comment on lines
+7
to
+9
| - Fix MCP query consistency after upsert by normalizing source lookups and stabilizing tag filtering/dedup behavior. | ||
|
|
||
| This resolves inconsistent `kb_query` results across `sourceFile` and `tags` filters and prevents duplicate entities when multiple tags match. |
Owner
Author
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Contributor
…ng TODO Co-authored-by: Looted <6255880+Looted@users.noreply.github.com>
Fix README structure, core CHANGELOG accuracy, and document JS tag filtering tradeoff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.