diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e330784 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: Build and Test + +on: + push: + branches: [main, release/*] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Type check + run: npx tsc --noEmit diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..fe0bcf6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,39 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [1.0.0] - 2026-03-17 + +### Added +- Vector embeddings (OpenAI text-embedding-3-small) +- Ollama embeddings support (local, free) +- Vector store with memory and file backends +- RAG query engine with LLM integration +- Citation tracking with source attribution +- GitHub connector (issues, PRs, discussions) +- MCP server ready +- TypeScript support +- Complete documentation (README, PRD, Tech Architecture) + +### Features +- Cosine similarity calculation +- Semantic search across documents +- Context-aware answers with citations +- Configurable embedding providers +- Configurable vector storage + +### Documentation +- README.md with installation and usage +- PRD.md with product requirements +- TECHNICAL-ARCHITECTURE.md with system design +- IMPLEMENTATION-PLAN.md with milestones + +## [0.1.0] - 2026-03-17 + +### Added +- Initial prototype +- Core modules (embeddings, vector-store, citations) +- Basic GitHub connector diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..7a791ec --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,64 @@ +# Contributing to Phantom Knowledge Layer + +Thank you for your interest in contributing! + +## Development Setup + +```bash +# Clone the repo +git clone https://github.com/sir-ad/phantom-knowledge.git +cd phantom-knowledge + +# Install dependencies +npm install + +# Build +npm run build + +# Test +npm test +``` + +## Project Structure + +``` +phantom-knowledge/ +├── src/ +│ ├── index.ts # Main exports +│ ├── types.ts # Type definitions +│ ├── engine.ts # Knowledge engine +│ ├── embeddings.ts # Vector embeddings +│ ├── vector-store.ts # Vector storage +│ ├── rag-query.ts # RAG query +│ ├── citations.ts # Citation tracking +│ └── connectors/ # Data connectors +│ └── github.ts +├── dist/ # Compiled output +├── package.json +└── tsconfig.json +``` + +## Adding a New Connector + +1. Create a new file in `src/connectors/` +2. Implement the `Connector` interface +3. Export from `src/connectors/index.ts` +4. Add tests + +## Release Process + +1. Update version in `package.json` +2. Update `CHANGELOG.md` +3. Create a git tag: `git tag v1.0.0` +4. Push: `git push origin main --tags` + +## Code Style + +- Use TypeScript +- Follow existing code patterns +- Add JSDoc comments for public APIs +- Test new features + +## Questions? + +Open an issue at: https://github.com/sir-ad/phantom-knowledge/issues diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..61cfbbc --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Adarsh Agrahari + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/package.json b/package.json index d3d1ba4..364d509 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,24 @@ { "name": "@phantom-pm/knowledge", - "version": "0.1.0", - "description": "Phantom Knowledge Layer - Vector embeddings, RAG, and connectors", + "version": "1.0.0", + "description": "Phantom Knowledge Layer - Vector embeddings, RAG, and connectors for Phantom PM OS", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/sir-ad/phantom-knowledge.git" + }, + "homepage": "https://github.com/sir-ad/phantom-knowledge", + "bugs": { + "url": "https://github.com/sir-ad/phantom-knowledge/issues" + }, "scripts": { "build": "tsc", "dev": "tsc -w", - "test": "node --test dist/**/*.test.js" + "test": "node --test dist/**/*.test.js", + "lint": "eslint src/", + "format": "prettier --write src/" }, "devDependencies": { "@types/node": "^20.0.0", @@ -19,11 +29,19 @@ }, "keywords": [ "phantom", + "phantom-pm", "knowledge", "rag", "embeddings", - "vector" + "vector", + "llm", + "ai", + "pm", + "product-management" ], - "author": "", - "license": "ISC" + "author": "Adarsh Agrahari", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } }