{"id":47609044,"url":"https://github.com/looted/kibi","last_synced_at":"2026-04-07T19:01:08.398Z","repository":{"id":340958873,"uuid":"1160899855","full_name":"Looted/kibi","owner":"Looted","description":"Repo-local, per-git-branch, queryable knowledge base for LLM Agents.","archived":false,"fork":false,"pushed_at":"2026-04-01T16:29:54.000Z","size":2686,"stargazers_count":4,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2026-04-02T01:55:30.938Z","etag":null,"topics":["agentic-ai","knowledge-base","mcp","mcp-server","opencode-plugin","requirement-traceability","traceability"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Looted.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-18T14:00:48.000Z","updated_at":"2026-04-01T14:56:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"eb7aebdf-eed6-42ca-8f0f-316a47fa1164","html_url":"https://github.com/Looted/kibi","commit_stats":null,"previous_names":["looted/kibi"],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/Looted/kibi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Looted%2Fkibi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Looted%2Fkibi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Looted%2Fkibi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Looted%2Fkibi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Looted","download_url":"https://codeload.github.com/Looted/kibi/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Looted%2Fkibi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31524531,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","knowledge-base","mcp","mcp-server","opencode-plugin","requirement-traceability","traceability"],"created_at":"2026-04-01T19:52:22.506Z","updated_at":"2026-04-07T19:01:08.391Z","avatar_url":"https://github.com/Looted.png","language":"TypeScript","readme":"![Kibi Wordmark](assets/wordmark.svg)\n\n[![CI](https://github.com/Looted/kibi/actions/workflows/ci.yml/badge.svg)](https://github.com/Looted/kibi/actions/workflows/ci.yml)\n[![Coverage](https://codecov.io/gh/Looted/kibi/branch/develop/graph/badge.svg)](https://codecov.io/gh/Looted/kibi)\n\nKibi is a repo-local, per-git-branch, queryable knowledge base for software projects. It stores requirements, scenarios, tests, architecture decisions, and more as linked entities, ensuring end-to-end traceability between code and documentation.\n\n\n## Why Kibi\n\nKibi is designed to boost AI agents' memory during software development. It maintains a living, verifiable project memory that:\n\n- **Tracks context across branches** — Every git branch gets its own KB snapshot, preserving context as you switch between features\n- **Enforces traceability** — Links code symbols to requirements, preventing orphan features and technical debt\n- **Validates automatically** — Rules catch missing requirements, dangling references, and consistency issues\n- **Agent-friendly** — LLM assistants can query and update knowledge base via MCP without risking file corruption\n\n### What You Get\n\nKibi provides concrete, day-to-day benefits for developers and teams:\n\n- **Requirements Traceability** — Track every code symbol back to its requirement. Know why code exists and what business need it addresses.\n\n- **Test Coverage Visibility** — See which requirements have tests, which don't, and what's covered at a glance. Ensure nothing slips through the cracks.\n\n- **Architectural Constraints** — Link code to ADRs. Know what constraints apply to each symbol and verify architecture decisions are honored.\n\n- **Feature Flag Blast Radius** — See what code depends on a runtime/config gate before toggling it. Understand the impact of enabling or disabling a feature.\n\n- **Event-Driven Architecture** — Map who publishes and consumes each domain event. Trace event flows and identify couplings across the system.\n\n- **Branch-Local Memory** — Every git branch keeps its own KB snapshot. Switch contexts without losing traceability or polluting other branches.\n\nFor OpenCode users, bootstrap an existing repo with `/init-kibi`.\n\n\n\u003e **Entity Modeling Note:** Use `flag` for runtime/config gates only. Document bugs and workarounds as `fact` entities with `fact_kind: observation` or `meta`. See [Entity Schema](docs/entity-schema.md) and [AGENTS.md](AGENTS.md) for the canonical guidance.\n\n## Key Components\n\n- **kibi-core** — Prolog-based knowledge graph that tracks entities across branches\n- **kibi-cli** — Command-line interface for automation and hooks\n- **kibi-mcp** — Model Context Protocol server for LLM integration\n- **kibi-opencode** — OpenCode plugin that injects Kibi guidance and runs background syncs\n- **kibi-vscode** — VS Code extension for exploring the knowledge base\n\n## Prerequisites\n\n- **SWI-Prolog 9.0+** — Kibi's knowledge graph runs on Prolog\n\n\n\n\n## Installation\n\nKibi supports two common setups:\n\n- **Global install** for normal use across repositories\n- **Repo-local dogfood workflow** in this repository, where OpenCode and MCP use locally built artifacts\n\n```bash\n# Using npm (recommended)\nnpm install -g kibi-cli kibi-mcp\n\n# Using bun\nbun add -g kibi-cli kibi-mcp\n```\n\nAfter installation, verify that kibi is available:\n\n```bash\nkibi --version\n```\n\n### OpenCode Plugin\n\nAdd `kibi-opencode` to your project `opencode.json`:\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugin\": [\"kibi-opencode\"]\n}\n```\n\nOpenCode installs npm plugins declared in `plugin` automatically at startup.\n\n### VS Code Extension\n\nThe Kibi VS Code extension provides a TreeView explorer for your knowledge base and built-in MCP integration.\n\nDownload the latest `.vsix` from [GitHub Releases](https://github.com/Looted/kibi/releases), then install it:\n\n- **Command Palette**: `Ctrl+Shift+P` → `Extensions: Install from VSIX...` → select the file\n- **CLI**: `code --install-extension kibi-vscode-x.x.x.vsix`\n\nEvery GitHub release includes the latest VS Code extension build as a `.vsix` artifact.\n\n### Repo-local dogfood workflow (this repo)\n\nThis repository uses local built `kibi-mcp` and `kibi-opencode` artifacts during development. If you change package versions or local package wiring used by the OpenCode setup here, rebuild before testing:\n\n```bash\nbun run build\n```\n\n### VS Code MCP\n\nCreate `.vscode/mcp.json`:\n\n```json\n{\n  \"servers\": {\n    \"kibi\": {\n      \"type\": \"stdio\",\n      \"command\": \"kibi-mcp\"\n    }\n  }\n}\n```\n\nIf `kibi-mcp` is not on your `PATH`, replace `command` with the full executable path.\n\nFor complete installation steps and SWI-Prolog setup, see [detailed installation guide](docs/install.md).\n\n## Quick Start\n\nInitialize kibi in your repository:\n\n```bash\n# Verify environment prerequisites\nkibi doctor\n\n# Initialize .kb/ and install git hooks\nkibi init\n\n# Parse markdown docs and symbols into branch KB\nkibi sync\n\n# Discover relevant knowledge before exact lookups\nkibi search auth\n\n# Inspect current branch snapshot and freshness\nkibi status\n\n# Run integrity checks\nkibi check\n```\n\n\u003e **Note:** `kibi init` installs git hooks by default. Hooks automatically sync your KB on branch checkout and merge.\n\n### Typical discovery workflow\n\n```bash\n# Explore the KB first\nkibi search login\n\n# Then follow up with exact/source-linked queries\nkibi query req --source src/auth/login.ts --format table\n\n# Check branch attachment and freshness when needed\nkibi status\n\n# Ask focused reporting questions\nkibi gaps req --missing-rel specified_by,verified_by --format table\nkibi coverage --by req --format table\n```\n\n## Documentation\n\n- **[Installation Guide](docs/install.md)** — Prerequisites, SWI-Prolog setup, and verification steps\n- **[CLI Reference](docs/cli-reference.md)** — Complete command documentation with all flags and options\n- **[Troubleshooting](docs/troubleshooting.md)** — Recovery procedures and common issues\n- **[Entity Schema](docs/entity-schema.md)** — Entity types, relationships, and examples\n- **[Architecture](docs/architecture.md)** — System architecture and component descriptions\n- **[Inference Rules](docs/inference-rules.md)** — Validation rules and constraint logic\n- **[MCP Reference](docs/mcp-reference.md)** — MCP server documentation\n- **[LLM Prompts](docs/prompts/llm-rules.md)** — Ready-to-copy system prompts for agents\n- **[AGENTS.md](AGENTS.md)** — Guidelines for AI agents working on kibi projects\n- **[Contributing](CONTRIBUTING.md)** — Development setup and contributor workflow\n\n## Release and Versioning\n\nAll publishable npm packages in this repo (`kibi-core`, `kibi-cli`, `kibi-mcp`, `kibi-opencode`) follow the same Changesets workflow for versioning and changelog generation.\n\n```bash\n# Add release metadata for changed package(s)\nbun run changeset\n\n# Preview pending releases\nbunx changeset status\n\n# Apply version bumps and update package changelogs\nbun run version-packages\n```\n\n---\n\n⚠️ **Alpha Status:** Kibi is in early alpha. Expect breaking changes. Pin exact versions of `kibi-cli`, `kibi-mcp`, and `kibi-opencode` in your projects, and expect to occasionally delete and rebuild your `.kb` folder when upgrading.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flooted%2Fkibi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flooted%2Fkibi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flooted%2Fkibi/lists"}