From da588a3b6f383dbc249d9b99d53403c838298e71 Mon Sep 17 00:00:00 2001 From: Alexander Thorwaldson Date: Thu, 19 Mar 2026 13:40:24 -0700 Subject: [PATCH] chore: org migration and workflow standardization - Migrate module path from github.com/zoobzio/chisel to github.com/zoobz-io/chisel - Update all go.mod files, imports, README badges, and documentation links - Align CI, CodeQL, coverage, and release workflows to gold standard - Update .goreleaser.yml with full release configuration (owner: zoobz-io) - Add security target and -tags testing to Makefile - Add CODEOWNERS entry for @wintermute-zbz - Add GitHub topics and set homepage to chisel.zoobz.io - Add .claude/ to .gitignore --- .github/CODEOWNERS | 5 +- .github/settings.yml | 11 ++- .github/workflows/ci.yml | 36 +++---- .github/workflows/codeql.yml | 25 ++--- .github/workflows/coverage.yml | 131 +++----------------------- .github/workflows/release.yml | 112 ++++++++++------------ .gitignore | 3 + .goreleaser.yml | 130 +++++++++++++++++++++++++ Makefile | 26 ++--- README.md | 36 +++---- docs/1.learn/2.quickstart.md | 24 ++--- docs/2.guides/1.providers.md | 12 +-- docs/2.guides/2.testing.md | 8 +- docs/2.guides/3.troubleshooting.md | 6 +- docs/3.integrations/1.vicky.md | 4 +- docs/4.reference/1.api.md | 12 +-- go.mod | 2 +- golang/go.mod | 4 +- golang/golang.go | 2 +- golang/golang_test.go | 2 +- markdown/go.mod | 4 +- markdown/markdown.go | 2 +- markdown/markdown_test.go | 2 +- python/go.mod | 6 +- python/python.go | 2 +- python/python_test.go | 2 +- rust/go.mod | 6 +- rust/rust.go | 2 +- rust/rust_test.go | 2 +- testing/README.md | 2 +- testing/benchmarks/README.md | 2 +- testing/benchmarks/benchmarks_test.go | 10 +- testing/benchmarks/go.mod | 26 ++--- testing/go.mod | 4 +- testing/helpers.go | 2 +- testing/helpers_test.go | 2 +- typescript/go.mod | 6 +- typescript/typescript.go | 2 +- typescript/typescript_test.go | 2 +- 39 files changed, 336 insertions(+), 341 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0f79581..e2b6fee 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1 @@ -# Code ownership for chisel -# See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners - -* @zoobzio +* @zoobzio @wintermute-zbz diff --git a/.github/settings.yml b/.github/settings.yml index db6ba51..00622c7 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -1,7 +1,7 @@ repository: name: chisel description: AST-aware code chunking for semantic search and embeddings - homepage: https://github.com/zoobzio/chisel + homepage: https://chisel.zoobz.io has_wiki: true has_downloads: true default_branch: main @@ -9,6 +9,15 @@ repository: allow_merge_commit: false allow_rebase_merge: false delete_branch_on_merge: true + topics: + - go + - golang + - zoobzio + - ast + - code-chunking + - semantic-search + - embeddings + - tree-sitter branches: - name: main diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a211374..b9838bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ main ] + branches: [ main, master ] pull_request: - branches: [ main ] + branches: [ main, master ] jobs: test: @@ -13,7 +13,6 @@ jobs: strategy: matrix: go-version: ['1.24', '1.25'] - steps: - uses: actions/checkout@v4 @@ -22,9 +21,8 @@ jobs: with: go-version: ${{ matrix.go-version }} - - name: Test all modules - run: | - go test -v -race ./... ./golang/... ./markdown/... ./typescript/... ./python/... ./rust/... ./testing/... + - name: Test + run: make test lint: name: Lint @@ -41,17 +39,7 @@ jobs: uses: golangci/golangci-lint-action@v7 with: version: v2.7.2 - args: --config=.golangci.yml --timeout=5m ./... ./golang/... ./markdown/... ./typescript/... ./python/... ./rust/... ./testing/... - skip-cache: false - skip-save-cache: false - - - name: Security Report - if: always() - run: | - golangci-lint run --config=.golangci.yml --out-format=json ./... ./golang/... ./markdown/... ./typescript/... ./python/... ./rust/... ./testing/... > lint-report.json || true - echo "### Security Scan Summary" >> $GITHUB_STEP_SUMMARY - echo "Linters with findings:" >> $GITHUB_STEP_SUMMARY - jq -r '.Issues[] | .FromLinter' lint-report.json 2>/dev/null | sort | uniq -c | sort -nr >> $GITHUB_STEP_SUMMARY || echo "No issues found ✅" >> $GITHUB_STEP_SUMMARY + args: --config=.golangci.yml --timeout=5m security: name: Security @@ -67,18 +55,17 @@ jobs: with: go-version: '1.25' - - name: Run Gosec Security Scanner - uses: securego/gosec@v2.22.11 + - name: Run Gosec + uses: securego/gosec@master with: args: '-fmt sarif -out gosec-results.sarif --no-fail ./...' - - name: Upload SARIF file + - name: Upload SARIF uses: github/codeql-action/upload-sarif@v3 if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository continue-on-error: true with: sarif_file: gosec-results.sarif - wait-for-processing: true benchmark: name: Benchmark @@ -92,15 +79,14 @@ jobs: go-version: '1.25' - name: Run benchmarks - run: | - echo "### Provider Benchmarks" | tee benchmark_results.txt - go test -bench=. -benchmem -benchtime=1s ./testing/benchmarks/... | tee -a benchmark_results.txt + run: make test-bench - - name: Upload benchmark results + - name: Upload results uses: actions/upload-artifact@v4 with: name: benchmark-results path: benchmark_results.txt + if: always() ci-complete: name: CI Complete diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index bc100b2..a8d5a63 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,13 +2,12 @@ name: CodeQL on: push: - branches: [ main ] + branches: [ main, master ] pull_request: - branches: [ main ] - schedule: - - cron: '0 6 * * 1' + branches: [ main, master ] permissions: + actions: read contents: read security-events: write @@ -16,10 +15,8 @@ jobs: analyze: name: Analyze runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v5 @@ -32,18 +29,8 @@ jobs: languages: go queries: security-and-quality - - name: Build - run: | - go build ./... ./golang/... ./markdown/... ./typescript/... ./python/... ./rust/... ./testing/... + - name: Autobuild + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 - with: - category: "/language:go" - - - name: Security summary - if: always() - run: | - echo "### 🔒 CodeQL Security Analysis" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "Security analysis completed. Check the Security tab for detailed findings." >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 9b2c03b..db67f64 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -2,144 +2,39 @@ name: Coverage on: push: - branches: [ main ] + branches: [ main, master ] pull_request: - branches: [ main ] - -permissions: - contents: read - checks: write - pull-requests: write + branches: [ main, master ] jobs: coverage: - name: Test Coverage Analysis + name: Coverage runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 + - uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v5 with: go-version: '1.25' - cache: true - name: Run tests with coverage - run: | - # Test all modules and collect coverage - echo "=== Testing all modules ===" - go test -v -race -coverprofile=coverage.out -covermode=atomic \ - ./... ./golang/... ./markdown/... ./typescript/... ./python/... ./rust/... ./testing/... - - # Generate coverage report - go tool cover -func=coverage.out > coverage-summary.txt - echo "Coverage Summary:" - tail -1 coverage-summary.txt - - # Generate HTML report - go tool cover -html=coverage.out -o coverage.html + run: go test -tags testing -coverprofile=coverage.out -covermode=atomic ./... ./golang/... ./markdown/... ./typescript/... ./python/... ./rust/... ./testing/... - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + - name: Upload to Codecov + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.out - flags: unit - name: chisel-coverage + flags: unittests + name: codecov-chisel fail_ci_if_error: false verbose: true - - name: Generate coverage badge - run: | - COVERAGE=$(go tool cover -func=coverage.out | tail -1 | grep -oE '[0-9]+\.[0-9]+' | tail -1) - echo "Coverage: $COVERAGE%" - echo "COVERAGE=$COVERAGE" >> $GITHUB_ENV - - if awk "BEGIN {exit !($COVERAGE >= 80)}"; then - COLOR="green" - elif awk "BEGIN {exit !($COVERAGE >= 60)}"; then - COLOR="yellow" - else - COLOR="red" - fi - echo "COVERAGE_COLOR=$COLOR" >> $GITHUB_ENV - - - name: Create coverage comment (PR only) - if: github.event_name == 'pull_request' - uses: actions/github-script@v7 - with: - script: | - const fs = require('fs'); - - const summary = fs.readFileSync('coverage-summary.txt', 'utf8'); - const lines = summary.split('\n').filter(line => line.trim()); - - const totalLine = lines[lines.length - 1]; - const coverage = totalLine.match(/(\d+\.\d+)%/)?.[1] || 'N/A'; - - const body = `## 📊 Coverage Report - - **Total Coverage:** ${coverage}% - - ### Coverage by Package - \`\`\` - ${lines.slice(0, -1).join('\n')} - \`\`\` - - --- - *Coverage report generated by [Codecov](https://codecov.io)*`; - - const { data: comments } = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - }); - - const botComment = comments.find(comment => - comment.user.type === 'Bot' && comment.body.includes('📊 Coverage Report') - ); - - if (botComment) { - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: botComment.id, - body: body - }); - } else { - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - body: body - }); - } - continue-on-error: true - - - name: Upload coverage artifacts - uses: actions/upload-artifact@v4 - with: - name: coverage-reports - path: | - coverage.out - coverage.html - coverage-summary.txt - retention-days: 30 - - - name: Coverage summary + - name: Coverage Summary run: | - echo "### 📊 Test Coverage Summary" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Total Coverage:** ${{ env.COVERAGE }}%" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "#### Coverage by Package" >> $GITHUB_STEP_SUMMARY + go tool cover -func=coverage.out | tail -1 + echo "## Coverage Report" >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY - head -n -1 coverage-summary.txt >> $GITHUB_STEP_SUMMARY + go tool cover -func=coverage.out >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "#### Coverage Standards" >> $GITHUB_STEP_SUMMARY - echo "- 🎯 Target: 70% overall, 80% for new code" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 56eb681..a4c35d1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,45 +3,55 @@ name: Release on: push: tags: - - 'v*' + - 'v*.*.*' permissions: contents: write jobs: - release: - name: Release + validate: + name: Validate runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 + - uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v5 with: go-version: '1.25' - - name: Validate release + - name: Run tests + run: make test + + - name: Run linter run: | - # Ensure tests pass before release - go test -race ./... ./golang/... ./markdown/... ./typescript/... ./python/... ./rust/... ./testing/... + go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.7.2 + make lint - - name: Extract version - id: version + - name: Verify go.mod is tidy run: | - VERSION=${GITHUB_REF#refs/tags/} - echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "Releasing version: $VERSION" + go mod tidy + git diff --exit-code go.mod go.sum + + release: + name: Release + needs: validate + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.25' - name: Create submodule tags env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - VERSION=${{ steps.version.outputs.version }} - - # Tag each submodule with prefixed version + VERSION=${GITHUB_REF#refs/tags/} MODULES="golang markdown typescript python rust testing" for module in $MODULES; do @@ -50,56 +60,30 @@ jobs: git tag "$TAG" || echo "Tag $TAG already exists" done - # Push all tags git push origin --tags - - name: Generate release notes - id: notes - run: | - VERSION=${{ steps.version.outputs.version }} - - # Get commits since last tag - PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "") - - if [ -n "$PREV_TAG" ]; then - NOTES=$(git log --pretty=format:"- %s (%h)" "$PREV_TAG"..HEAD --no-merges) - else - NOTES=$(git log --pretty=format:"- %s (%h)" --no-merges -20) - fi - - # Write to file for multiline output - echo "$NOTES" > release_notes.txt - - - name: Create GitHub Release - uses: softprops/action-gh-release@v2 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 with: - name: ${{ steps.version.outputs.version }} - body_path: release_notes.txt - draft: false - prerelease: ${{ contains(steps.version.outputs.version, '-') }} - generate_release_notes: true + distribution: goreleaser + version: latest + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Release summary + verify: + name: Verify + needs: release + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.25' + + - name: Verify module run: | - VERSION=${{ steps.version.outputs.version }} - echo "### 🚀 Release $VERSION" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "#### Submodule Tags Created" >> $GITHUB_STEP_SUMMARY - echo "- \`golang/$VERSION\`" >> $GITHUB_STEP_SUMMARY - echo "- \`markdown/$VERSION\`" >> $GITHUB_STEP_SUMMARY - echo "- \`typescript/$VERSION\`" >> $GITHUB_STEP_SUMMARY - echo "- \`python/$VERSION\`" >> $GITHUB_STEP_SUMMARY - echo "- \`rust/$VERSION\`" >> $GITHUB_STEP_SUMMARY - echo "- \`testing/$VERSION\`" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "#### Installation" >> $GITHUB_STEP_SUMMARY - echo '```bash' >> $GITHUB_STEP_SUMMARY - echo "# Main module" >> $GITHUB_STEP_SUMMARY - echo "go get github.com/zoobzio/chisel@$VERSION" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "# Language providers" >> $GITHUB_STEP_SUMMARY - echo "go get github.com/zoobzio/chisel/golang@$VERSION" >> $GITHUB_STEP_SUMMARY - echo "go get github.com/zoobzio/chisel/typescript@$VERSION" >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY + sleep 60 + TAG=${GITHUB_REF#refs/tags/} + go install github.com/zoobz-io/chisel@$TAG || echo "Module verification pending proxy sync" + continue-on-error: true diff --git a/.gitignore b/.gitignore index 5cfa746..098f27b 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,6 @@ Thumbs.db # Build dist/ vendor/ + +# Claude +.claude/ diff --git a/.goreleaser.yml b/.goreleaser.yml index e5861b4..e367cff 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,11 +1,141 @@ +# GoReleaser configuration for chisel - AST-aware code chunking +# This configuration is optimized for a library package (no binaries in root) + version: 2 +# Set project name +project_name: chisel + +# Build configuration builds: + # Skip building binaries for the main library since it's a library package - skip: true +# Archive configuration +archives: + - id: source + # Include source files for library distribution + files: + - "*.go" + - "go.mod" + - "go.sum" + - "LICENSE" + - "README.md" + - "Makefile" + - "docs/**/*" + - ".golangci.yml" + name_template: "{{ .ProjectName }}_{{ .Version }}_source" + +# Checksum configuration +checksum: + name_template: "checksums.txt" + algorithm: sha256 + +# Changelog configuration changelog: + use: github sort: asc + abbrev: 7 + groups: + - title: "Features" + regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' + order: 0 + - title: "Bug Fixes" + regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' + order: 1 + - title: "Performance" + regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$' + order: 2 + - title: "Refactoring" + regexp: '^.*?refactor(\([[:word:]]+\))??!?:.+$' + order: 3 + - title: "Documentation" + regexp: '^.*?docs?(\([[:word:]]+\))??!?:.+$' + order: 4 + - title: "Testing" + regexp: '^.*?test(\([[:word:]]+\))??!?:.+$' + order: 5 + - title: "Maintenance" + regexp: '^.*?chore(\([[:word:]]+\))??!?:.+$' + order: 6 + - title: "Build System" + regexp: '^.*?build(\([[:word:]]+\))??!?:.+$' + order: 7 + - title: "Dependencies" + regexp: '^.*?deps?(\([[:word:]]+\))??!?:.+$' + order: 8 + - title: "Other Changes" + order: 999 filters: exclude: + - "^Merge" + - "^merge" + - "^wip" + - "^WIP" - "^docs:" - "^test:" + +# Release configuration +release: + github: + owner: zoobz-io + name: chisel + + # Release name template + name_template: "{{ .ProjectName }} v{{ .Version }}" + + # Draft release initially (can be changed in workflow) + draft: false + + # Mark as prerelease for beta/rc versions + prerelease: auto + + # Release notes mode + mode: append + + # Custom release header + header: | + ## chisel v{{ .Version }} + + AST-aware code chunking for semantic search and embeddings. + + ### Installation + + ```bash + go get github.com/zoobz-io/chisel@v{{ .Version }} + ``` + + ### Requirements + - Go 1.24 or higher + + # Custom release footer + footer: | + --- + + **Full Documentation:** https://github.com/zoobz-io/chisel/tree/v{{ .Version }} + + Thanks to all contributors! + +# Announce releases (optional) +announce: + skip: true + +# Snapshot configuration (for testing) +snapshot: + version_template: "{{ .Tag }}-next" + +# Source configuration +source: + enabled: true + name_template: "{{ .ProjectName }}_{{ .Version }}_source" + +# Git configuration +git: + # Tag sort order + tag_sort: -version:refname + + # Skip commits from these paths in changelog + ignore_tags: + - ".*-rc.*" + - ".*-beta.*" + - ".*-alpha.*" diff --git a/Makefile b/Makefile index 9f7be59..4929947 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: test test-unit test-integration test-bench lint lint-fix coverage clean help check ci install-tools install-hooks build +.PHONY: test test-unit test-integration test-bench lint lint-fix security coverage build clean help check ci install-tools install-hooks .DEFAULT_GOAL := help @@ -8,25 +8,28 @@ help: ## Display available commands @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}' test: ## Run all tests with race detector - @go test -v -race ./... ./golang/... ./markdown/... ./typescript/... ./python/... ./rust/... ./testing/... + @go test -v -race -tags testing ./... ./golang/... ./markdown/... ./typescript/... ./python/... ./rust/... ./testing/... test-unit: ## Run unit tests only (short mode) - @go test -v -race -short ./... ./golang/... ./markdown/... ./typescript/... ./python/... ./rust/... ./testing/... + @go test -v -race -tags testing -short ./... ./golang/... ./markdown/... ./typescript/... ./python/... ./rust/... ./testing/... test-integration: ## Run integration tests - @go test -v -race ./testing/integration/... + @go test -v -race -tags testing ./testing/integration/... test-bench: ## Run benchmarks - @go test -bench=. -benchmem -benchtime=1s ./testing/benchmarks/... + @go test -tags testing -bench=. -benchmem -benchtime=1s ./testing/benchmarks/... lint: ## Run linters - @golangci-lint run --config=.golangci.yml --timeout=5m ./... ./golang/... ./markdown/... ./typescript/... ./python/... ./rust/... ./testing/... + @golangci-lint run --config=.golangci.yml --timeout=5m lint-fix: ## Run linters with auto-fix - @golangci-lint run --config=.golangci.yml --fix ./... ./golang/... ./markdown/... ./typescript/... ./python/... ./rust/... ./testing/... + @golangci-lint run --config=.golangci.yml --fix + +security: ## Run security scanner + @gosec -quiet ./... coverage: ## Generate coverage report (HTML) - @go test -coverprofile=coverage.out ./... ./golang/... ./markdown/... ./typescript/... ./python/... ./rust/... ./testing/... + @go test -tags testing -coverprofile=coverage.out ./... ./golang/... ./markdown/... ./typescript/... ./python/... ./rust/... ./testing/... @go tool cover -html=coverage.out -o coverage.html @go tool cover -func=coverage.out | tail -1 @echo "Coverage report: coverage.html" @@ -42,7 +45,8 @@ clean: ## Remove generated files @find . -name "*.out" -delete install-tools: ## Install development tools - @go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.8.0 + @go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.7.2 + @go install github.com/securego/gosec/v2/cmd/gosec@latest install-hooks: ## Install git pre-commit hook @mkdir -p .git/hooks @@ -51,8 +55,8 @@ install-hooks: ## Install git pre-commit hook @chmod +x .git/hooks/pre-commit @echo "Pre-commit hook installed" -check: test lint ## Run tests and lint (quick validation) +check: lint test security ## Run lint, tests, and security scan @echo "All checks passed!" -ci: clean lint test coverage test-bench ## Full CI simulation +ci: clean check coverage test-bench ## Full CI simulation @echo "CI simulation complete!" diff --git a/README.md b/README.md index 0e8a260..207bbf5 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # chisel -[![CI Status](https://github.com/zoobzio/chisel/workflows/CI/badge.svg)](https://github.com/zoobzio/chisel/actions/workflows/ci.yml) -[![codecov](https://codecov.io/gh/zoobzio/chisel/graph/badge.svg?branch=main)](https://codecov.io/gh/zoobzio/chisel) -[![Go Report Card](https://goreportcard.com/badge/github.com/zoobzio/chisel)](https://goreportcard.com/report/github.com/zoobzio/chisel) -[![CodeQL](https://github.com/zoobzio/chisel/workflows/CodeQL/badge.svg)](https://github.com/zoobzio/chisel/security/code-scanning) -[![Go Reference](https://pkg.go.dev/badge/github.com/zoobzio/chisel.svg)](https://pkg.go.dev/github.com/zoobzio/chisel) -[![License](https://img.shields.io/github/license/zoobzio/chisel)](LICENSE) -[![Go Version](https://img.shields.io/github/go-mod/go-version/zoobzio/chisel)](go.mod) -[![Release](https://img.shields.io/github/v/release/zoobzio/chisel)](https://github.com/zoobzio/chisel/releases) +[![CI Status](https://github.com/zoobz-io/chisel/workflows/CI/badge.svg)](https://github.com/zoobz-io/chisel/actions/workflows/ci.yml) +[![codecov](https://codecov.io/gh/zoobz-io/chisel/graph/badge.svg?branch=main)](https://codecov.io/gh/zoobz-io/chisel) +[![Go Report Card](https://goreportcard.com/badge/github.com/zoobz-io/chisel)](https://goreportcard.com/report/github.com/zoobz-io/chisel) +[![CodeQL](https://github.com/zoobz-io/chisel/workflows/CodeQL/badge.svg)](https://github.com/zoobz-io/chisel/security/code-scanning) +[![Go Reference](https://pkg.go.dev/badge/github.com/zoobz-io/chisel.svg)](https://pkg.go.dev/github.com/zoobz-io/chisel) +[![License](https://img.shields.io/github/license/zoobz-io/chisel)](LICENSE) +[![Go Version](https://img.shields.io/github/go-mod/go-version/zoobz-io/chisel)](go.mod) +[![Release](https://img.shields.io/github/v/release/zoobz-io/chisel)](https://github.com/zoobz-io/chisel/releases) AST-aware code chunking for semantic search and embeddings. Chisel parses source code into meaningful units—functions, classes, methods—preserving the context that makes code searchable. @@ -52,17 +52,17 @@ Feed chunks to an embedding model, store in a vector database, and search code b ## Install ```bash -go get github.com/zoobzio/chisel +go get github.com/zoobz-io/chisel ``` **Language providers** (install only what you need): ```bash -go get github.com/zoobzio/chisel/golang # Go (stdlib, no deps) -go get github.com/zoobzio/chisel/markdown # Markdown (no deps) -go get github.com/zoobzio/chisel/typescript # TypeScript/JavaScript (tree-sitter) -go get github.com/zoobzio/chisel/python # Python (tree-sitter) -go get github.com/zoobzio/chisel/rust # Rust (tree-sitter) +go get github.com/zoobz-io/chisel/golang # Go (stdlib, no deps) +go get github.com/zoobz-io/chisel/markdown # Markdown (no deps) +go get github.com/zoobz-io/chisel/typescript # TypeScript/JavaScript (tree-sitter) +go get github.com/zoobz-io/chisel/python # Python (tree-sitter) +go get github.com/zoobz-io/chisel/rust # Rust (tree-sitter) ``` Requires Go 1.24+. @@ -76,9 +76,9 @@ import ( "context" "fmt" - "github.com/zoobzio/chisel" - "github.com/zoobzio/chisel/golang" - "github.com/zoobzio/chisel/typescript" + "github.com/zoobz-io/chisel" + "github.com/zoobz-io/chisel/golang" + "github.com/zoobz-io/chisel/typescript" ) func main() { @@ -174,7 +174,7 @@ Symbol names and kinds become metadata. Line ranges enable source navigation. Co Chisel provides the chunking layer for code intelligence pipelines: -- **[vicky](https://github.com/zoobzio/vicky)** — Code search and retrieval service +- **[vicky](https://github.com/zoobz-io/vicky)** — Code search and retrieval service ## Documentation diff --git a/docs/1.learn/2.quickstart.md b/docs/1.learn/2.quickstart.md index 642001c..d523efd 100644 --- a/docs/1.learn/2.quickstart.md +++ b/docs/1.learn/2.quickstart.md @@ -16,20 +16,20 @@ tags: Install the core package: ```bash -go get github.com/zoobzio/chisel +go get github.com/zoobz-io/chisel ``` Install providers for the languages you need: ```bash # Zero-dependency providers -go get github.com/zoobzio/chisel/golang -go get github.com/zoobzio/chisel/markdown +go get github.com/zoobz-io/chisel/golang +go get github.com/zoobz-io/chisel/markdown # Tree-sitter providers -go get github.com/zoobzio/chisel/typescript -go get github.com/zoobzio/chisel/python -go get github.com/zoobzio/chisel/rust +go get github.com/zoobz-io/chisel/typescript +go get github.com/zoobz-io/chisel/python +go get github.com/zoobz-io/chisel/rust ``` Requires Go 1.24+. @@ -43,8 +43,8 @@ import ( "context" "fmt" - "github.com/zoobzio/chisel" - "github.com/zoobzio/chisel/golang" + "github.com/zoobz-io/chisel" + "github.com/zoobz-io/chisel/golang" ) func main() { @@ -97,10 +97,10 @@ Use the `Chunker` to route files to the appropriate provider: ```go import ( - "github.com/zoobzio/chisel" - "github.com/zoobzio/chisel/golang" - "github.com/zoobzio/chisel/typescript" - "github.com/zoobzio/chisel/python" + "github.com/zoobz-io/chisel" + "github.com/zoobz-io/chisel/golang" + "github.com/zoobz-io/chisel/typescript" + "github.com/zoobz-io/chisel/python" ) // Create a chunker with multiple providers diff --git a/docs/2.guides/1.providers.md b/docs/2.guides/1.providers.md index 0020521..8b2ef9b 100644 --- a/docs/2.guides/1.providers.md +++ b/docs/2.guides/1.providers.md @@ -15,7 +15,7 @@ Each language provider extracts semantic chunks according to that language's idi ## Go -**Package:** `github.com/zoobzio/chisel/golang` +**Package:** `github.com/zoobz-io/chisel/golang` **Dependencies:** None (uses stdlib `go/parser`) @@ -66,7 +66,7 @@ Produces: ## TypeScript -**Package:** `github.com/zoobzio/chisel/typescript` +**Package:** `github.com/zoobz-io/chisel/typescript` **Dependencies:** `go-tree-sitter` (cgo) @@ -120,7 +120,7 @@ Produces: ## JavaScript -**Package:** `github.com/zoobzio/chisel/typescript` (use `NewJavaScript()`) +**Package:** `github.com/zoobz-io/chisel/typescript` (use `NewJavaScript()`) **Dependencies:** `go-tree-sitter` (cgo) @@ -136,7 +136,7 @@ chunks, err := provider.Chunk(ctx, "app.js", source) ## Python -**Package:** `github.com/zoobzio/chisel/python` +**Package:** `github.com/zoobz-io/chisel/python` **Dependencies:** `go-tree-sitter` (cgo) @@ -189,7 +189,7 @@ Produces: ## Rust -**Package:** `github.com/zoobzio/chisel/rust` +**Package:** `github.com/zoobz-io/chisel/rust` **Dependencies:** `go-tree-sitter` (cgo) @@ -253,7 +253,7 @@ Produces: ## Markdown -**Package:** `github.com/zoobzio/chisel/markdown` +**Package:** `github.com/zoobz-io/chisel/markdown` **Dependencies:** None diff --git a/docs/2.guides/2.testing.md b/docs/2.guides/2.testing.md index 1fee8b6..e5944e5 100644 --- a/docs/2.guides/2.testing.md +++ b/docs/2.guides/2.testing.md @@ -15,14 +15,14 @@ This guide covers how to test code that uses chisel, including test helpers, fix ## Test Helpers -Chisel provides test utilities in `github.com/zoobzio/chisel/testing`: +Chisel provides test utilities in `github.com/zoobz-io/chisel/testing`: ```go import ( "testing" - "github.com/zoobzio/chisel" - chitesting "github.com/zoobzio/chisel/testing" + "github.com/zoobz-io/chisel" + chitesting "github.com/zoobz-io/chisel/testing" ) func TestChunking(t *testing.T) { @@ -213,7 +213,7 @@ func TestFixtures(t *testing.T) { Chisel includes benchmarks in `testing/benchmarks/`. Run them with: ```bash -go test -bench=. github.com/zoobzio/chisel/testing/benchmarks -benchmem +go test -bench=. github.com/zoobz-io/chisel/testing/benchmarks -benchmem ``` To add benchmarks for your own code: diff --git a/docs/2.guides/3.troubleshooting.md b/docs/2.guides/3.troubleshooting.md index fd9f5ea..5c5f8c5 100644 --- a/docs/2.guides/3.troubleshooting.md +++ b/docs/2.guides/3.troubleshooting.md @@ -52,8 +52,8 @@ source := []byte("func working() {}") **Solution:** Install the specific provider: ```bash -go get github.com/zoobzio/chisel/golang -go get github.com/zoobzio/chisel/typescript +go get github.com/zoobz-io/chisel/golang +go get github.com/zoobz-io/chisel/typescript ``` ### CGO errors with tree-sitter @@ -194,7 +194,7 @@ Don't accumulate all chunks in memory if you can process them incrementally. If you encounter an issue not covered here: -1. Check [GitHub Issues](https://github.com/zoobzio/chisel/issues) +1. Check [GitHub Issues](https://github.com/zoobz-io/chisel/issues) 2. Open a new issue with: - Go version - Chisel version diff --git a/docs/3.integrations/1.vicky.md b/docs/3.integrations/1.vicky.md index 84c73d6..5d51380 100644 --- a/docs/3.integrations/1.vicky.md +++ b/docs/3.integrations/1.vicky.md @@ -78,5 +78,5 @@ This enables queries like: ## Learn More -- [Vicky Repository](https://github.com/zoobzio/vicky) -- [Vicky Documentation](https://github.com/zoobzio/vicky/tree/main/docs) +- [Vicky Repository](https://github.com/zoobz-io/vicky) +- [Vicky Documentation](https://github.com/zoobz-io/vicky/tree/main/docs) diff --git a/docs/4.reference/1.api.md b/docs/4.reference/1.api.md index cdae847..b909436 100644 --- a/docs/4.reference/1.api.md +++ b/docs/4.reference/1.api.md @@ -102,7 +102,7 @@ c.HasProvider(chisel.TypeScript) // false ## Go Provider -**Package:** `github.com/zoobzio/chisel/golang` +**Package:** `github.com/zoobz-io/chisel/golang` ### New @@ -145,7 +145,7 @@ Returns `chisel.Go`. ## TypeScript Provider -**Package:** `github.com/zoobzio/chisel/typescript` +**Package:** `github.com/zoobz-io/chisel/typescript` ### New @@ -194,7 +194,7 @@ Returns `chisel.TypeScript` or `chisel.JavaScript` depending on constructor. ## Python Provider -**Package:** `github.com/zoobzio/chisel/python` +**Package:** `github.com/zoobz-io/chisel/python` ### New @@ -228,7 +228,7 @@ Returns `chisel.Python`. ## Rust Provider -**Package:** `github.com/zoobzio/chisel/rust` +**Package:** `github.com/zoobz-io/chisel/rust` ### New @@ -262,7 +262,7 @@ Returns `chisel.Rust`. ## Markdown Provider -**Package:** `github.com/zoobzio/chisel/markdown` +**Package:** `github.com/zoobz-io/chisel/markdown` ### New @@ -298,7 +298,7 @@ Returns `chisel.Markdown`. ## Test Helpers -**Package:** `github.com/zoobzio/chisel/testing` +**Package:** `github.com/zoobz-io/chisel/testing` ### AssertChunkCount diff --git a/go.mod b/go.mod index 98aab5e..bbb4b1b 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/zoobzio/chisel +module github.com/zoobz-io/chisel go 1.24 diff --git a/golang/go.mod b/golang/go.mod index 08b95ac..f59c102 100644 --- a/golang/go.mod +++ b/golang/go.mod @@ -1,5 +1,5 @@ -module github.com/zoobzio/chisel/golang +module github.com/zoobz-io/chisel/golang go 1.24.5 -require github.com/zoobzio/chisel v0.0.0 +require github.com/zoobz-io/chisel v0.0.0 diff --git a/golang/golang.go b/golang/golang.go index 5e5bb47..95a52d0 100644 --- a/golang/golang.go +++ b/golang/golang.go @@ -8,7 +8,7 @@ import ( "go/parser" "go/token" - "github.com/zoobzio/chisel" + "github.com/zoobz-io/chisel" ) // Provider chunks Go source files using go/parser. diff --git a/golang/golang_test.go b/golang/golang_test.go index 55c6fe1..ce02b1d 100644 --- a/golang/golang_test.go +++ b/golang/golang_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/zoobzio/chisel" + "github.com/zoobz-io/chisel" ) func TestProvider_Language(t *testing.T) { diff --git a/markdown/go.mod b/markdown/go.mod index f7e4799..71bb000 100644 --- a/markdown/go.mod +++ b/markdown/go.mod @@ -1,5 +1,5 @@ -module github.com/zoobzio/chisel/markdown +module github.com/zoobz-io/chisel/markdown go 1.24.5 -require github.com/zoobzio/chisel v0.0.0 +require github.com/zoobz-io/chisel v0.0.0 diff --git a/markdown/markdown.go b/markdown/markdown.go index 0950b65..50d07e1 100644 --- a/markdown/markdown.go +++ b/markdown/markdown.go @@ -5,7 +5,7 @@ import ( "context" "strings" - "github.com/zoobzio/chisel" + "github.com/zoobz-io/chisel" ) // Provider chunks Markdown files by header sections. diff --git a/markdown/markdown_test.go b/markdown/markdown_test.go index fb60c90..8a8c1df 100644 --- a/markdown/markdown_test.go +++ b/markdown/markdown_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/zoobzio/chisel" + "github.com/zoobz-io/chisel" ) func TestProvider_Language(t *testing.T) { diff --git a/python/go.mod b/python/go.mod index 2831f48..5417983 100644 --- a/python/go.mod +++ b/python/go.mod @@ -1,10 +1,10 @@ -module github.com/zoobzio/chisel/python +module github.com/zoobz-io/chisel/python go 1.24.5 require ( github.com/smacker/go-tree-sitter v0.0.0-20240827094217-dd81d9e9be82 - github.com/zoobzio/chisel v0.0.0 + github.com/zoobz-io/chisel v0.0.0 ) -replace github.com/zoobzio/chisel => ../ +replace github.com/zoobz-io/chisel => ../ diff --git a/python/python.go b/python/python.go index 125cf1d..e41c5a9 100644 --- a/python/python.go +++ b/python/python.go @@ -7,7 +7,7 @@ import ( sitter "github.com/smacker/go-tree-sitter" "github.com/smacker/go-tree-sitter/python" - "github.com/zoobzio/chisel" + "github.com/zoobz-io/chisel" ) // Provider chunks Python files using tree-sitter. diff --git a/python/python_test.go b/python/python_test.go index 5e3d265..92717b8 100644 --- a/python/python_test.go +++ b/python/python_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/zoobzio/chisel" + "github.com/zoobz-io/chisel" ) func TestProvider_Language(t *testing.T) { diff --git a/rust/go.mod b/rust/go.mod index 045343e..5a379b1 100644 --- a/rust/go.mod +++ b/rust/go.mod @@ -1,10 +1,10 @@ -module github.com/zoobzio/chisel/rust +module github.com/zoobz-io/chisel/rust go 1.24.5 require ( github.com/smacker/go-tree-sitter v0.0.0-20240827094217-dd81d9e9be82 - github.com/zoobzio/chisel v0.0.0 + github.com/zoobz-io/chisel v0.0.0 ) -replace github.com/zoobzio/chisel => ../ +replace github.com/zoobz-io/chisel => ../ diff --git a/rust/rust.go b/rust/rust.go index 42c165e..45f2dcf 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -7,7 +7,7 @@ import ( sitter "github.com/smacker/go-tree-sitter" "github.com/smacker/go-tree-sitter/rust" - "github.com/zoobzio/chisel" + "github.com/zoobz-io/chisel" ) // Provider chunks Rust files using tree-sitter. diff --git a/rust/rust_test.go b/rust/rust_test.go index a31f3c5..a267815 100644 --- a/rust/rust_test.go +++ b/rust/rust_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/zoobzio/chisel" + "github.com/zoobz-io/chisel" ) func TestProvider_Language(t *testing.T) { diff --git a/testing/README.md b/testing/README.md index d343b56..350430e 100644 --- a/testing/README.md +++ b/testing/README.md @@ -17,7 +17,7 @@ testing/ The `testing` package provides domain-specific assertion helpers: ```go -import chitesting "github.com/zoobzio/chisel/testing" +import chitesting "github.com/zoobz-io/chisel/testing" func TestMyChunker(t *testing.T) { chunks := getChunks() diff --git a/testing/benchmarks/README.md b/testing/benchmarks/README.md index 0dc04b8..c97649c 100644 --- a/testing/benchmarks/README.md +++ b/testing/benchmarks/README.md @@ -8,7 +8,7 @@ Performance benchmarks for chisel providers. make test-bench # Or directly: -go test -bench=. github.com/zoobzio/chisel/testing/benchmarks -benchmem +go test -bench=. github.com/zoobz-io/chisel/testing/benchmarks -benchmem ``` ## Current Results diff --git a/testing/benchmarks/benchmarks_test.go b/testing/benchmarks/benchmarks_test.go index f9c992f..8ecfcbe 100644 --- a/testing/benchmarks/benchmarks_test.go +++ b/testing/benchmarks/benchmarks_test.go @@ -4,11 +4,11 @@ import ( "context" "testing" - "github.com/zoobzio/chisel/golang" - "github.com/zoobzio/chisel/markdown" - "github.com/zoobzio/chisel/python" - "github.com/zoobzio/chisel/rust" - "github.com/zoobzio/chisel/typescript" + "github.com/zoobz-io/chisel/golang" + "github.com/zoobz-io/chisel/markdown" + "github.com/zoobz-io/chisel/python" + "github.com/zoobz-io/chisel/rust" + "github.com/zoobz-io/chisel/typescript" ) // Sample sources for benchmarking diff --git a/testing/benchmarks/go.mod b/testing/benchmarks/go.mod index 84111d9..6e411ec 100644 --- a/testing/benchmarks/go.mod +++ b/testing/benchmarks/go.mod @@ -1,28 +1,28 @@ -module github.com/zoobzio/chisel/testing/benchmarks +module github.com/zoobz-io/chisel/testing/benchmarks go 1.24.5 require ( - github.com/zoobzio/chisel/golang v0.0.0 - github.com/zoobzio/chisel/markdown v0.0.0 - github.com/zoobzio/chisel/python v0.0.0 - github.com/zoobzio/chisel/rust v0.0.0 - github.com/zoobzio/chisel/typescript v0.0.0 + github.com/zoobz-io/chisel/golang v0.0.0 + github.com/zoobz-io/chisel/markdown v0.0.0 + github.com/zoobz-io/chisel/python v0.0.0 + github.com/zoobz-io/chisel/rust v0.0.0 + github.com/zoobz-io/chisel/typescript v0.0.0 ) require ( github.com/smacker/go-tree-sitter v0.0.0-20240827094217-dd81d9e9be82 // indirect - github.com/zoobzio/chisel v0.0.0 // indirect + github.com/zoobz-io/chisel v0.0.0 // indirect ) -replace github.com/zoobzio/chisel => ../../ +replace github.com/zoobz-io/chisel => ../../ -replace github.com/zoobzio/chisel/golang => ../../golang +replace github.com/zoobz-io/chisel/golang => ../../golang -replace github.com/zoobzio/chisel/markdown => ../../markdown +replace github.com/zoobz-io/chisel/markdown => ../../markdown -replace github.com/zoobzio/chisel/python => ../../python +replace github.com/zoobz-io/chisel/python => ../../python -replace github.com/zoobzio/chisel/rust => ../../rust +replace github.com/zoobz-io/chisel/rust => ../../rust -replace github.com/zoobzio/chisel/typescript => ../../typescript +replace github.com/zoobz-io/chisel/typescript => ../../typescript diff --git a/testing/go.mod b/testing/go.mod index 8a964db..acccfce 100644 --- a/testing/go.mod +++ b/testing/go.mod @@ -1,5 +1,5 @@ -module github.com/zoobzio/chisel/testing +module github.com/zoobz-io/chisel/testing go 1.24.5 -require github.com/zoobzio/chisel v0.0.0 +require github.com/zoobz-io/chisel v0.0.0 diff --git a/testing/helpers.go b/testing/helpers.go index bf03a68..a74ffd3 100644 --- a/testing/helpers.go +++ b/testing/helpers.go @@ -4,7 +4,7 @@ package testing import ( "testing" - "github.com/zoobzio/chisel" + "github.com/zoobz-io/chisel" ) // AssertChunkCount checks that the expected number of chunks were produced. diff --git a/testing/helpers_test.go b/testing/helpers_test.go index 876382f..7aff9f2 100644 --- a/testing/helpers_test.go +++ b/testing/helpers_test.go @@ -3,7 +3,7 @@ package testing import ( "testing" - "github.com/zoobzio/chisel" + "github.com/zoobz-io/chisel" ) func TestFindBySymbol(t *testing.T) { diff --git a/typescript/go.mod b/typescript/go.mod index b9028d4..f3da59b 100644 --- a/typescript/go.mod +++ b/typescript/go.mod @@ -1,10 +1,10 @@ -module github.com/zoobzio/chisel/typescript +module github.com/zoobz-io/chisel/typescript go 1.24.5 require ( github.com/smacker/go-tree-sitter v0.0.0-20240827094217-dd81d9e9be82 - github.com/zoobzio/chisel v0.0.0 + github.com/zoobz-io/chisel v0.0.0 ) -replace github.com/zoobzio/chisel => ../ +replace github.com/zoobz-io/chisel => ../ diff --git a/typescript/typescript.go b/typescript/typescript.go index 5b2f556..3df4504 100644 --- a/typescript/typescript.go +++ b/typescript/typescript.go @@ -7,7 +7,7 @@ import ( sitter "github.com/smacker/go-tree-sitter" "github.com/smacker/go-tree-sitter/typescript/typescript" - "github.com/zoobzio/chisel" + "github.com/zoobz-io/chisel" ) // Provider chunks TypeScript files using tree-sitter. diff --git a/typescript/typescript_test.go b/typescript/typescript_test.go index 538bda5..a2073a7 100644 --- a/typescript/typescript_test.go +++ b/typescript/typescript_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/zoobzio/chisel" + "github.com/zoobz-io/chisel" ) func TestProvider_Language(t *testing.T) {