{"_id":"@dtranllc/kb-genie","_rev":"4-8b0d60c74999fd5d0e5c71a626eb4147","name":"@dtranllc/kb-genie","dist-tags":{"latest":"1.1.4"},"versions":{"1.1.1":{"name":"@dtranllc/kb-genie","version":"1.1.1","keywords":["cursor-plugin","knowledge-base","kb-genie","ingestion","chunking"],"author":{"name":"DTRAN"},"license":"MIT","_id":"@dtranllc/kb-genie@1.1.1","maintainers":[{"name":"dinhduy","email":"dinhduy.tran@live.com"}],"homepage":"https://github.com/DINHDUY/kb-genie#readme","bugs":{"url":"https://github.com/DINHDUY/kb-genie/issues"},"bin":{"kb-genie":"bin/cli.js"},"dist":{"shasum":"3cfe2a238c260d9221291bc7536f8dc96773861d","tarball":"https://registry.npmjs.org/@dtranllc/kb-genie/-/kb-genie-1.1.1.tgz","fileCount":16,"integrity":"sha512-tncm8cCri3o1ZQRQ6u8gz4fRQr0Sz9jdBWZFD/xZaDRqnug26i6S8aSxTch4tDb33/TYBDKMJh4eHdDR7Wrpig==","signatures":[{"sig":"MEUCIQCS3ijuky+XYssn9vjk23I31PVGnEicqdVgg68G0r2l1wIgPtxncjVSE/QqX4fCxtWodb1pR2W9bcsmXAmjPqHoX+g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13284},"engines":{"node":">=18.0.0"},"gitHead":"c1309e1ac271d5b1cd0998deb6ea8aec1c295eb3","scripts":{"init":"node bin/cli.js init","test":"node scripts/validate-plugin.mjs","start":"node bin/cli.js","validate":"node scripts/validate-plugin.mjs"},"_npmUser":{"name":"dinhduy","email":"dinhduy.tran@live.com"},"repository":{"url":"git+https://github.com/DINHDUY/kb-genie.git","type":"git"},"_npmVersion":"11.10.0","description":"Cursor plugin that turns raw technical documents into an agent-optimized knowledge base. This package is a companion CLI that initializes a knowledge-base folder template.","directories":{},"_nodeVersion":"25.4.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/kb-genie_1.1.1_1787006280915_0.2722344954601008","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@dtranllc/kb-genie","version":"1.1.2","keywords":["cursor-plugin","knowledge-base","kb-genie","ingestion","chunking"],"author":{"name":"DTRAN"},"license":"MIT","_id":"@dtranllc/kb-genie@1.1.2","maintainers":[{"name":"dinhduy","email":"dinhduy.tran@live.com"}],"homepage":"https://github.com/DINHDUY/kb-genie#readme","bugs":{"url":"https://github.com/DINHDUY/kb-genie/issues"},"bin":{"kb-genie":"bin/cli.js"},"dist":{"shasum":"3f491536778559d2680a700f8854183c46d04ef8","tarball":"https://registry.npmjs.org/@dtranllc/kb-genie/-/kb-genie-1.1.2.tgz","fileCount":16,"integrity":"sha512-Kic4qiftmqxip1ZVG17I99S9RGf8n8jUSXwZc3kAD6bv6K9Kj4zmSvT3lasMApapKmuBDINOit0QK6jyow+AqQ==","signatures":[{"sig":"MEQCIC14vLn7xdRqHp//7WB6OaCXLm+4Ko7cO2M8dvGTHaY8AiAyKgL8TosHVS7KOOuEARv6YQs0FiAlKMpLQuEhP9gEhw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13284},"engines":{"node":">=18.0.0"},"gitHead":"c1309e1ac271d5b1cd0998deb6ea8aec1c295eb3","scripts":{"init":"node bin/cli.js init","test":"node scripts/validate-plugin.mjs","start":"node bin/cli.js","validate":"node scripts/validate-plugin.mjs"},"_npmUser":{"name":"dinhduy","email":"dinhduy.tran@live.com"},"repository":{"url":"git+https://github.com/DINHDUY/kb-genie.git","type":"git"},"_npmVersion":"11.10.0","description":"Cursor plugin that turns raw technical documents into an agent-optimized knowledge base. This package is a companion CLI that initializes a knowledge-base folder template.","directories":{},"_nodeVersion":"25.4.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/kb-genie_1.1.2_1787006594779_0.06096348074846958","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@dtranllc/kb-genie","version":"1.1.3","keywords":["cursor-plugin","knowledge-base","kb-genie","ingestion","chunking"],"author":{"name":"DTRAN"},"license":"MIT","_id":"@dtranllc/kb-genie@1.1.3","maintainers":[{"name":"dinhduy","email":"dinhduy.tran@live.com"}],"homepage":"https://github.com/DINHDUY/kb-genie#readme","bugs":{"url":"https://github.com/DINHDUY/kb-genie/issues"},"bin":{"kb-genie":"bin/cli.js"},"dist":{"shasum":"0e2d866a2e99e0f8f4400b9d23a180d3c40ddadb","tarball":"https://registry.npmjs.org/@dtranllc/kb-genie/-/kb-genie-1.1.3.tgz","fileCount":16,"integrity":"sha512-VmBIzLkXKUXXabna4/HPIs7DGG7O1Qsva2LKnxJVHwAozlIDnwJVdMir8hWwjgzwfk1JrbUITNKLj3tQlNLieA==","signatures":[{"sig":"MEUCIA0buhFCr0b7XMetFtRNZWGgDq2GpvPTReEEq0oQaIneAiEA4RouzGxjyOUDdfKPGv+AMVKZO6p0J77U42/qkA57OLM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dtranllc%2fkb-genie@1.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":13284},"engines":{"node":">=18.0.0"},"gitHead":"c75ad9f9d728b87888a705118d54f76a7ad2e1c0","scripts":{"init":"node bin/cli.js init","test":"node scripts/validate-plugin.mjs","start":"node bin/cli.js","validate":"node scripts/validate-plugin.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:033436da-ad0c-4517-928a-bf95e9347ddd"}},"repository":{"url":"git+https://github.com/DINHDUY/kb-genie.git","type":"git"},"_npmVersion":"11.17.0","description":"Cursor plugin that turns raw technical documents into an agent-optimized knowledge base. This package is a companion CLI that initializes a knowledge-base folder template.","directories":{},"_nodeVersion":"24.19.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/kb-genie_1.1.3_1787007070398_0.8181557114494531","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"@dtranllc/kb-genie","version":"1.1.4","description":"Cursor plugin that turns raw technical documents into an agent-optimized knowledge base. This package is a companion CLI that initializes a knowledge-base folder template.","bin":{"kb-genie":"bin/cli.js"},"scripts":{"start":"node bin/cli.js","init":"node bin/cli.js init","validate":"node scripts/validate-plugin.mjs","test":"node scripts/validate-plugin.mjs"},"keywords":["cursor-plugin","knowledge-base","kb-genie","ingestion","chunking"],"author":{"name":"DTRAN"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/DINHDUY/kb-genie.git"},"homepage":"https://github.com/DINHDUY/kb-genie#readme","bugs":{"url":"https://github.com/DINHDUY/kb-genie/issues"},"engines":{"node":">=18.0.0"},"dependencies":{},"publishConfig":{"access":"public"},"gitHead":"a1b78068af4ae858b63e21eb99ce308315686a53","_id":"@dtranllc/kb-genie@1.1.4","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-kxp5bL3g9iKQWVIeMHcdMJ0p4X4axUeYarjUGSCRFpPtVtfTpBwVFnGsOlyUsjcZbQSWudsYFOywiIrqkg4LAg==","shasum":"2a70fc82044ec6ea6eeb0efb9da6fcc50c08a2fd","tarball":"https://registry.npmjs.org/@dtranllc/kb-genie/-/kb-genie-1.1.4.tgz","fileCount":16,"unpackedSize":14269,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dtranllc%2fkb-genie@1.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCNpGNOVNeN15Z73Zq1+z1YXdy47q3k+nmoqZQH+UwRVwIgdjUganBeOn89ouyTyic7fddtXd4VqtNBidIiBm2MZLI="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:033436da-ad0c-4517-928a-bf95e9347ddd"}},"directories":{},"maintainers":[{"name":"dinhduy","email":"dinhduy.tran@live.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/kb-genie_1.1.4_1787096548236_0.7363258107961783"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-17T22:38:00.767Z","modified":"2026-08-18T23:42:28.723Z","1.1.1":"2026-08-17T22:38:01.046Z","1.1.2":"2026-08-17T22:43:14.925Z","1.1.3":"2026-08-17T22:51:10.542Z","1.1.4":"2026-08-18T23:42:28.375Z"},"bugs":{"url":"https://github.com/DINHDUY/kb-genie/issues"},"author":{"name":"DTRAN"},"license":"MIT","homepage":"https://github.com/DINHDUY/kb-genie#readme","keywords":["cursor-plugin","knowledge-base","kb-genie","ingestion","chunking"],"repository":{"type":"git","url":"git+https://github.com/DINHDUY/kb-genie.git"},"description":"Cursor plugin that turns raw technical documents into an agent-optimized knowledge base. This package is a companion CLI that initializes a knowledge-base folder template.","maintainers":[{"name":"dinhduy","email":"dinhduy.tran@live.com"}],"readme":"# KB Genie — Agentic Workflow Plugin\n\nTransform raw technical documents into an agent-optimized hierarchical knowledge base with semantic chunks, structured summaries, a living concept wiki, and quality-gated indexing.\n\n## What It Does\n\n1. **Converts raw documents to clean Markdown** — normalizes heading hierarchy, removes headers/footers/page numbers/OCR noise, preserves code blocks and tables\n2. **Produces structured document summaries** — extracts key claims, methods, results, limitations, relevance assessment, and search tags into YAML frontmatter\n3. **Splits documents into semantic chunks** — divides content on heading boundaries (not arbitrary token limits), enriches each chunk with summary, keywords, entities, semantic key, and potential questions\n4. **Maintains a living concept wiki** — extracts concepts from all documents, creates new wiki entries and updates existing ones as new documents are ingested\n5. **Keeps an authoritative master index** — single YAML catalog listing every processed document with metadata, file paths, chunk counts, and concept links\n6. **Builds a knowledge graph** (optional) — extracts entities and relations from chunks to produce a structured graph in JSON format\n7. **Runs quality spot-checks** — samples 20% of documents (minimum 3), validates all metadata fields, checks for near-duplicate chunks, verifies index completeness\n\n## Agents\n\n| Agent | Model | Role |\n|-------|-------|------|\n| `@kb-orchestrator` | sonnet | Plans ingestion runs, spawns workers, monitors progress, maintains index.yaml, produces status reports |\n| `@kb-ingestion` | sonnet | Detects new/changed files in raw/, converts to clean Markdown, extracts bibliographic metadata |\n| `@kb-summarizer` | sonnet | Produces structured document-level summaries with YAML frontmatter |\n| `@kb-chunker` | sonnet | Splits Markdown into semantic chunks with rich metadata enrichment |\n| `@kb-concept-distiller` | sonnet | Maintains living wiki under concepts/ — creates and updates concept pages |\n| `@kb-indexer` | fast | Keeps index.yaml authoritative — scans outputs, updates catalog |\n| `@kb-graph-builder` | sonnet | Extracts entities and relations from chunks to produce knowledge graph JSON |\n| `@kb-critic` | sonnet | Quality spot-checks of summaries, chunks, concept pages, and index |\n\n## Skills\n\nCanonical skill files live only under `plugins/kb-genie/skills/`.\n\n| Skill | When to use |\n|-------|-------------|\n| `kb-genie` | Chat starts with `Genie,`, `Genie!`, or `Genie:` — answer from the knowledge base via `kb-rag` only |\n| `kb-ingest` | Run the full ingestion pipeline on `raw/` |\n| `kb-check` | Quality spot-check after an ingestion run |\n| `kb-index-rebuild` | Rebuild stale or incomplete `index.yaml` |\n\n## Commands\n\n| Command | What it does |\n|---------|--------------|\n| `/kb-ingest` | Run the full ingestion pipeline |\n| `/kb-check` | Quality spot-check |\n| `/kb-index-rebuild` | Rebuild `index.yaml` from output directories |\n| `/kb-retrieve` | Retrieve ranked, cited context via `kb-rag` |\n\n## Quick Start\n\n### Install the Cursor plugin (Import from Repo)\n\nThis repository is a Cursor Team Marketplace. Cursor reads [`.cursor-plugin/marketplace.json`](.cursor-plugin/marketplace.json) and loads the plugin from `plugins/kb-genie/`.\n\n1. Push this repository to GitHub.\n2. In Cursor, open **Dashboard → Plugins → Team Marketplaces**.\n3. Choose **Import from Repo** and paste the GitHub URL.\n4. Review the parsed `kb-genie` plugin, then save the marketplace.\n\n### Test locally (optional)\n\nCopy the plugin directory into Cursor’s local plugins folder. Use a real directory — Cursor rejects external symlinks.\n\n```bash\nmkdir -p ~/.cursor/plugins/local\nrm -rf ~/.cursor/plugins/local/kb-genie\ncp -R plugins/kb-genie ~/.cursor/plugins/local/kb-genie\n```\n\nThen restart Cursor or run **Developer: Reload Window**.\n\nFor Genie chat and `/kb-retrieve`, install the bundled `kb-rag` CLI:\n\n```bash\npip install -e plugins/kb-genie/skills/kb-genie/tools/kb-rag\n```\n\n### Knowledge-base folder template\n\n`npx @dtranllc/kb-genie` only copies a `knowledge-base/` folder template. It does not install the Cursor plugin.\n\n```bash\nnpx @dtranllc/kb-genie init\n```\n\n### Ingest Documents\n\n1. Create a knowledge base directory and place your documents in `raw/`:\n\n```\nknowledge-base/\n└── raw/\n    ├── whitepaper-2026.pdf\n    ├── spec-api-v2.docx\n    └── notes-meeting-2026.md\n```\n\n2. Open Cursor and invoke the orchestrator:\n\n```\n@kb-orchestrator\n\nKnowledge base root: /path/to/knowledge-base/\nIngest all new files in raw/\n```\n\nThe orchestrator will run all 7 specialist agents automatically, validate outputs at each phase, and produce a final status report.\n\n### Individual Agent Invocation\n\nYou do not have to run the full pipeline every time:\n\n```\n@kb-chunker\n\nKnowledge base root: /path/to/knowledge-base/\nDocuments: whitepaper-2026, spec-api-v2\n```\n\n```\n@kb-critic\n\nKnowledge base root: /path/to/knowledge-base/\n```\n\n```\n@kb-indexer\n\nKnowledge base root: /path/to/knowledge-base/\n```\n\n## Knowledge Base Folder Structure\n\n```\nknowledge-base/\n├── raw/                          # IMMUTABLE originals (never modified by agents)\n├── markdown/                     # Clean full-document Markdown\n├── summaries/                    # Document-level summaries (YAML frontmatter)\n├── chunks/                       # Semantic chunks (one .md per chunk)\n├── concepts/                     # Living wiki (one .md per concept)\n├── graphs/                       # Knowledge graph JSON (optional)\n├── index.yaml                    # Master catalog\n├── logs/\n│   └── ingestion-runs/\n│       ├── run-YYYYMMDD-NNN.log\n│       └── run-YYYYMMDD-NNN-quality.md\n└── tasks/\n    ├── pending/\n    ├── in-progress/\n    └── completed/\n```\n\n## CLI Reference\n\n```bash\nnpx @dtranllc/kb-genie              # Show usage\nnpx @dtranllc/kb-genie init         # Copy knowledge-base template to current directory\nnpx @dtranllc/kb-genie info         # Show agent inventory\n```\n\n## Pipeline\n\n```\nInput: knowledge base root directory + (optional) file list\n         ↓\n[Stage 1]  kb-orchestrator → run log + task queue\n         ↓\n[Stage 2]  kb-ingestion    → markdown/<doc_id>.md + summaries/<doc_id>.meta.yaml\n         ↓\n[Stage 3]  kb-summarizer   → summaries/<doc_id>.md\n         ↓\n[Stage 4]  kb-chunker      → chunks/<chunk_id>.md\n         ↓\n[Stage 5]  kb-concept-distiller → concepts/<concept-slug>.md\n         ↓\n[Stage 6]  kb-indexer      → index.yaml\n         ↓\n[Stage 7]  kb-graph-builder  → graphs/knowledge-graph.json (optional, parallel)\n[Stage 7]  kb-critic         → run log quality report (parallel)\n         ↓\n   Final Status Report → User\n```\n\n## Dependencies\n\n```bash\n# Required CLI tools for document conversion:\n\n# Pandoc — universal document converter (macOS: brew install pandoc, Linux: apt-get install pandoc)\n# pdftotext — PDF text extraction (macOS: brew install poppler, Linux: apt-get install poppler-utils)\n\n# Optional: Python for embedding-based near-duplicate detection\npip install sentence-transformers numpy\n\n# Optional: kb-rag CLI for Genie chat and /kb-retrieve\npip install -e plugins/kb-genie/skills/kb-genie/tools/kb-rag\n```\n\n## Quality Gates\n\n| Gate | Requirement |\n|------|-------------|\n| Every chunk | non-empty summary |\n| Every chunk | non-empty semantic_key |\n| Every chunk | at least one potential_question |\n| Every concept page | cites at least one source chunk |\n| Every concept page | non-empty Definition section |\n| Every document summary | non-empty relevance_to_software |\n| Near-duplicate chunks | cosine similarity > 0.95 → merge or flag |\n| index.yaml | lists every processed document |\n\n## License\n\nMIT\n","readmeFilename":"README.md"}