Skip to content

Commit 12ead69

Browse files
committed
docs: add community standards (LICENSE, CoC, contributing, security, templates)
1 parent a7d9a95 commit 12ead69

File tree

7 files changed

+293
-0
lines changed

7 files changed

+293
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug to help us improve
4+
title: '[Bug] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Description
10+
A clear description of the bug.
11+
12+
## Steps to Reproduce
13+
1. ...
14+
2. ...
15+
3. ...
16+
17+
## Expected Behavior
18+
What you expected to happen.
19+
20+
## Actual Behavior
21+
What actually happened.
22+
23+
## Environment
24+
- OS: [e.g., macOS 14, Ubuntu 22.04]
25+
- Node.js version: [e.g., 22.0.0]
26+
- Plugin version: [e.g., 0.1.10]
27+
- Embedding provider: [e.g., github-copilot, openai]
28+
29+
## Additional Context
30+
Any other relevant information, logs, or screenshots.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: '[Feature] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Problem
10+
A clear description of the problem you're trying to solve.
11+
12+
## Proposed Solution
13+
How you'd like this to work.
14+
15+
## Alternatives Considered
16+
Any alternative solutions you've considered.
17+
18+
## Additional Context
19+
Any other context, mockups, or examples.

.github/pull_request_template.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Summary
2+
3+
Brief description of changes.
4+
5+
## Changes
6+
7+
-
8+
-
9+
-
10+
11+
## Testing
12+
13+
How were these changes tested?
14+
15+
- [ ] Unit tests added/updated
16+
- [ ] Manual testing performed
17+
- [ ] Build passes (`npm run build`)
18+
- [ ] Tests pass (`npm run test:run`)
19+
- [ ] Lint passes (`npm run lint`)
20+
21+
## Related Issues
22+
23+
Fixes #(issue number)

CODE_OF_CONDUCT.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to a positive environment:
15+
16+
* Using welcoming and inclusive language
17+
* Being respectful of differing viewpoints and experiences
18+
* Gracefully accepting constructive criticism
19+
* Focusing on what is best for the community
20+
* Showing empathy towards other community members
21+
22+
Examples of unacceptable behavior:
23+
24+
* The use of sexualized language or imagery and unwelcome sexual attention
25+
* Trolling, insulting/derogatory comments, and personal or political attacks
26+
* Public or private harassment
27+
* Publishing others' private information without explicit permission
28+
* Other conduct which could reasonably be considered inappropriate
29+
30+
## Enforcement
31+
32+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
33+
reported to the project maintainers. All complaints will be reviewed and
34+
investigated and will result in a response that is deemed necessary and
35+
appropriate to the circumstances.
36+
37+
## Attribution
38+
39+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
40+
version 2.0.

CONTRIBUTING.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Contributing to opencode-codebase-index
2+
3+
Thank you for your interest in contributing! This document provides guidelines and information for contributors.
4+
5+
## Getting Started
6+
7+
1. **Fork the repository** on GitHub
8+
2. **Clone your fork** locally:
9+
```bash
10+
git clone https://github.com/YOUR_USERNAME/opencode-codebase-index.git
11+
cd opencode-codebase-index
12+
```
13+
3. **Install dependencies**:
14+
```bash
15+
npm install
16+
```
17+
4. **Build the project**:
18+
```bash
19+
npm run build
20+
```
21+
22+
## Development Setup
23+
24+
### Prerequisites
25+
26+
- Node.js >= 18
27+
- Rust toolchain (for native module)
28+
- npm
29+
30+
### Building
31+
32+
```bash
33+
# Build everything (TypeScript + Rust)
34+
npm run build
35+
36+
# Build only TypeScript
37+
npm run build:ts
38+
39+
# Build only Rust native module
40+
npm run build:native
41+
```
42+
43+
### Testing
44+
45+
```bash
46+
# Run all tests
47+
npm run test:run
48+
49+
# Run tests in watch mode
50+
npm run test
51+
52+
# Run Rust tests
53+
cd native && cargo test
54+
```
55+
56+
### Linting
57+
58+
```bash
59+
# Run ESLint
60+
npm run lint
61+
62+
# Run Clippy (Rust)
63+
cd native && cargo clippy
64+
```
65+
66+
## Making Changes
67+
68+
1. **Create a feature branch**:
69+
```bash
70+
git checkout -b feature/my-feature
71+
```
72+
73+
2. **Make your changes** and add tests if applicable
74+
75+
3. **Run checks** before committing:
76+
```bash
77+
npm run build && npm run test:run && npm run lint
78+
```
79+
80+
4. **Commit with a descriptive message**:
81+
```bash
82+
git commit -m "feat: add my feature"
83+
```
84+
85+
We follow [Conventional Commits](https://www.conventionalcommits.org/):
86+
- `feat:` - New feature
87+
- `fix:` - Bug fix
88+
- `docs:` - Documentation changes
89+
- `perf:` - Performance improvement
90+
- `refactor:` - Code refactoring
91+
- `test:` - Adding/updating tests
92+
- `chore:` - Maintenance tasks
93+
94+
5. **Push and open a pull request**:
95+
```bash
96+
git push origin feature/my-feature
97+
```
98+
99+
## Pull Request Guidelines
100+
101+
- Keep PRs focused and atomic
102+
- Include tests for new functionality
103+
- Update documentation if needed
104+
- Ensure CI passes before requesting review
105+
106+
## Project Structure
107+
108+
```
109+
src/ # TypeScript source
110+
├── indexer/ # Core indexing logic
111+
├── embeddings/ # Embedding providers
112+
├── tools/ # OpenCode tool definitions
113+
├── native/ # Rust module wrapper
114+
└── config/ # Configuration schema
115+
116+
native/src/ # Rust native module
117+
├── parser.rs # Tree-sitter parsing
118+
├── store.rs # Vector storage
119+
└── inverted_index.rs # BM25 search
120+
121+
tests/ # Unit tests
122+
```
123+
124+
## Questions?
125+
126+
Open an issue for any questions or concerns. We're happy to help!

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Kenneth Helweg
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

SECURITY.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| 0.1.x | :white_check_mark: |
8+
9+
## Reporting a Vulnerability
10+
11+
If you discover a security vulnerability, please report it responsibly:
12+
13+
1. **Do not** open a public issue
14+
2. Email the maintainers directly or use GitHub's private vulnerability reporting
15+
3. Include:
16+
- Description of the vulnerability
17+
- Steps to reproduce
18+
- Potential impact
19+
- Any suggested fixes (optional)
20+
21+
We will acknowledge receipt within 48 hours and provide a detailed response within 7 days.
22+
23+
## Security Considerations
24+
25+
This plugin:
26+
- Stores vector indices locally in your project directory
27+
- Sends code chunks to embedding APIs (GitHub Copilot, OpenAI, Google, or local Ollama)
28+
- Does not transmit data to any other third parties
29+
30+
### Data Privacy
31+
32+
- All index data is stored locally
33+
- Code is only sent to your configured embedding provider
34+
- No telemetry or analytics are collected

0 commit comments

Comments
 (0)