83 Commits

Author SHA1 Message Date
Giancarlo Erra deaf82981b chore: release v1.6.1 v1.6.1 2026-04-17 11:19:30 +01:00
Giancarlo Erra a21cf01516 Merge pull request #29 from giancarloerra:docs/agent-instructions-zed-graph-triggers
docs: add Zed support, per-IDE instruction paths, and strengthen graph triggers
2026-04-17 11:18:05 +01:00
Giancarlo Erra 270d402f48 docs: add Zed support, per-IDE instruction paths, and strengthen graph triggers 2026-04-17 11:17:08 +01:00
Giancarlo Erra 486bf7622b chore: release v1.6.0 v1.6.0 2026-04-16 19:03:58 +01:00
Giancarlo Erra a8b069a900 docs: add Discord community, Cloud section, and tool portability to README 2026-04-16 19:02:09 +01:00
Giancarlo Erra 2fdbaf8ba4 chore: fix Biome lint warnings (non-null assertions, unused param) 2026-04-16 18:31:44 +01:00
Giancarlo Erra af7d1d4d45 Merge pull request #25 from sb-giithub/feat/global-config-and-batch-size-env
feat: support global config fallback and configurable embedding batch size
2026-04-14 17:43:43 +01:00
jason.ma 49b5b35bff fix: resolve relative paths for global config fallback and strict batch size validation
1. Global config fallback: relative artifact paths are now resolved against
   the global config directory (not the project root) when loading from fallback.
   Absolute paths are left unchanged. Project-level config behavior is unaffected.

2. EMBEDDING_BATCH_SIZE: replaced Number.parseInt with Number() + Number.isInteger()
   so that inputs like "64abc", "1.5", and "" are correctly rejected instead of
   silently accepted.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 19:12:44 +08:00
Giancarlo Erra 2eb74ae620 chore: add .private/ to .gitignore for internal planning docs 2026-04-13 23:27:12 +01:00
Giancarlo Erra afd2da2771 docs: add CodeRabbit review expectations to PR template and contributing guide 2026-04-13 22:55:03 +01:00
Giancarlo Erra 68f4b36794 chore: release v1.5.0 v1.5.0 2026-04-13 22:46:53 +01:00
Giancarlo Erra 648d04e24d Merge pull request #26 from giancarloerra:feat/multi-platform-plugins
feat: multi-platform plugin support (Cursor, Codex, Gemini CLI, VS Code)
2026-04-13 22:21:43 +01:00
Giancarlo Erra b2333b574c fix: correct spelling of "visualize" in GEMINI.md and update Codex installation instructions in README.md 2026-04-13 22:15:04 +01:00
Giancarlo Erra 529d1b2a64 feat: multi-platform plugin support (Cursor, Codex, Gemini CLI, VS Code) 2026-04-13 22:06:30 +01:00
Giancarlo Erra 61060d5153 docs: consolidate README 2026-04-13 16:45:10 +01:00
jason.ma 9d04c4443a feat: support global config fallback and configurable batch size
- loadConfig: fall back to ~/.claude/arch (or SOCRATICODE_GLOBAL_CONFIG_DIR
  env var) when project root has no .socraticodecontextartifacts.json
- BATCH_SIZE: configurable via EMBEDDING_BATCH_SIZE env var, default 32
  (validates positive integer, throws on invalid input)
2026-04-13 20:38:29 +08:00
Giancarlo Erra efec8dd29a docs: consolidate README — add feature comparison table and streamline sections 2026-04-13 10:55:59 +01:00
Giancarlo Erra af0c397b8c chore: release v1.4.1 v1.4.1 2026-04-12 21:37:52 +01:00
Giancarlo Erra 81a4422b63 Merge pull request #24 from giancarloerra:fix/coderabbit-review-findings
fix: address CodeRabbit review findings
2026-04-12 21:34:33 +01:00
Giancarlo Erra 00f7be169c fix: address CodeRabbit PR review feedback
- Use Object.hasOwn() instead of `in` for log level validation
- Normalize relativePath in shouldIgnore() for Windows compatibility
- Reject zero/negative/decimal values in embedding config (Number() instead of parseInt())
- Update aggregate test count to 765
- Harden code-graph test assertion with explicit toBeDefined()
2026-04-12 21:31:45 +01:00
Giancarlo Erra bb5e6c3e19 fix: address CodeRabbit review findings 2026-04-12 20:21:36 +01:00
Giancarlo Erra f10a45d619 chore: add AGENTS.md and update .gitignore 2026-04-12 19:49:19 +01:00
Giancarlo Erra 5c84a9ad66 chore: release v1.4.0 v1.4.0 2026-04-12 19:30:53 +01:00
Giancarlo Erra 9eea98079e Merge pull request #23 from giancarloerra:feat/multi-collection-search
feat: cross-project search and branch-aware indexing
2026-04-12 19:15:08 +01:00
Giancarlo Erra f745d59ddd fix: address remaining CodeRabbit production code issues
- Scope dedupe key to label::relativePath in mergeMultiCollectionResults
  so same file in different projects is not collapsed
- Compute embedding once in searchMultipleCollections via internal
  searchChunksWithVector helper (avoids N redundant API calls)
- Compare base project hashes (not branch-suffixed names) when skipping
  duplicate linked projects in resolveLinkedCollections
- Use path.resolve() for platform-neutral assertion in query-tools tests
- Update multi-collection-search tests for new cross-project dedup semantics
2026-04-11 17:53:59 +01:00
Giancarlo Erra f09f417c6e fix: address CodeRabbit review feedback on tests
- Refactor git temp repos into initTempRepo() helper using git config
  instead of env vars (resolves Critical finding)
- Restore SOCRATICODE_LINKED_PROJECTS and SOCRATICODE_PROJECT_ID to
  original values in resolveLinkedCollections afterEach
- Fix TypeScript 'never' type errors in query-tools mocks by adding
  explicit SearchResult[] return types
2026-04-11 17:53:59 +01:00
Giancarlo Erra ad2e3b9ea1 fix: provide git identity for temp repo commits in CI
CI runners have no git user.name/email configured, causing
'git commit --allow-empty' to fail with 'Author identity unknown'.
Pass GIT_AUTHOR_NAME/EMAIL and GIT_COMMITTER_NAME/EMAIL env vars.
2026-04-11 17:53:59 +01:00
Giancarlo Erra ffa8e95bdf fix: use self-contained temp git repos in branch-aware tests
CI checks out in detached HEAD state, causing detectGitBranch(process.cwd())
to return null. Replace process.cwd() with temporary git repos that have a
known branch and initial commit, making tests deterministic everywhere.
2026-04-11 17:53:59 +01:00
Giancarlo Erra 24faa1075b docs: add cross-project and branch-aware highlights to intro and Why SocratiCode 2026-04-11 17:53:59 +01:00
Giancarlo Erra bf93e4a992 test: add includeLinked and searchMultipleCollections tests
- query-tools.test.ts: 6 new tests for includeLinked parameter:
  - omitted/false → calls searchChunks (not searchMultipleCollections)
  - true → calls searchMultipleCollections via resolveLinkedCollections
  - passes collections and args correctly
  - project label appears in output
  - no project tag when field absent

- multi-collection-search.test.ts: 1 new test for searchMultipleCollections
  empty-input short-circuit (internal searchChunks calls cannot be mocked
  from the same module — integration covered by query-tools tests)
2026-04-11 17:53:59 +01:00
Giancarlo Erra fc3c2988fa fix: linked projects use base hash without branch suffix
resolveLinkedCollections() was calling projectIdFromPath() for linked
projects, which with SOCRATICODE_BRANCH_AWARE=true appended the linked
project's git branch to its ID. Linked projects indexed without
branch-aware mode don't have __branch collections, so lookups failed.

Extract coreProjectId() helper (hash-only, no branch suffix) and use
it for linked projects. Also fix dedup to compare collection names
instead of raw IDs to handle the branch suffix mismatch.

Adds unit test verifying linked collection names are branch-agnostic.
2026-04-11 17:53:59 +01:00
Giancarlo Erra 096f59da13 fix: update path handling and type imports in indexer and query tools 2026-04-11 17:53:59 +01:00
Giancarlo Erra 76e3ff5f59 docs: add cross-project search and branch-aware indexing documentation
- README: new Features entries, full sections with config examples
- README: new env vars SOCRATICODE_BRANCH_AWARE, SOCRATICODE_LINKED_PROJECTS
- README: updated codebase_search tool description for includeLinked
- DEVELOPER.md: updated config.ts description, branch-aware and linked projects sections
2026-04-11 17:53:59 +01:00
Giancarlo Erra 3a4139d714 feat: branch-aware collection naming via SOCRATICODE_BRANCH_AWARE
- detectGitBranch() detects current git branch via git rev-parse
- sanitizeBranchName() converts branch names to Qdrant-safe suffixes
- When SOCRATICODE_BRANCH_AWARE=true, projectIdFromPath appends __branch
  to create separate indexes per branch
- Explicit SOCRATICODE_PROJECT_ID takes precedence (no branch suffix)
- 14 unit tests for sanitization, detection, and integration

Relates to #19
2026-04-11 17:53:59 +01:00
Giancarlo Erra 61e868cf9e feat: linked projects support via .socraticode.json and SOCRATICODE_LINKED_PROJECTS
- loadLinkedProjects() reads .socraticode.json config and env var
- resolveLinkedCollections() maps linked projects to collection names
- codebase_search gains includeLinked parameter for cross-project queries
- Results tagged with [project-label] when searching across projects
- 10 unit tests for config loading and collection resolution

Relates to #20
2026-04-11 17:53:59 +01:00
Giancarlo Erra ad8db7f0db feat: multi-collection search with client-side RRF fusion and deduplication
Add searchMultipleCollections() and mergeMultiCollectionResults() to qdrant.ts.
Queries multiple Qdrant collections in parallel, merges results using Reciprocal
Rank Fusion (k=60), and deduplicates by relativePath (first collection wins).

Add optional 'project' field to SearchResult type for source attribution.

This is the shared foundation for linked projects (#20) and branch-aware
indexing (#19).

Refs: #19, #20
2026-04-11 17:53:59 +01:00
Giancarlo Erra 2c2de5ab09 Merge pull request #22 from sb-giithub:fix/jvm-multi-module-resolution
fix: resolve JVM imports in multi-module Maven/Gradle projects (0 edges bug)
2026-04-11 17:53:04 +01:00
jason.ma 5a734eb301 fix: resolve JVM imports in multi-module Maven/Gradle projects
Single-module resolution (src/main/java/…) already worked.
Multi-module layouts like:

  module-a/sub/src/main/java/com/example/Foo.java

were silently unresolved because the three fixed src-dir prefixes
never matched. The dependency graph therefore always produced 0
edges for any Java/Kotlin/Scala project that follows the standard
Maven/Gradle multi-module layout.

Fix: introduce `buildJvmSuffixMap()` which scans `fileSet` once
(O(n)) and registers every JVM source file by its class-path key
(i.e. everything after src/main/<lang>/). `resolveImport` accepts
the map as an optional last argument and falls back to it when the
existing prefix-based approach yields no result.

- `buildJvmSuffixMap` exported for reuse / testing.
- Map is built once per `buildCodeGraph` call, only when the
  project contains at least one JVM file — zero cost for other
  language projects.
- Lookup is O(1) per import, replacing a worst-case O(n) linear
  scan on every miss.
- Works on both Windows (backslash) and POSIX (forward-slash)
  because the map key is built with `path.sep`.
- 7 new unit tests covering: map construction, test-source
  exclusion, multi-module Java resolution, Kotlin resolution,
  unresolvable class, stdlib guard.

Fixes: enterprise Java/Spring Boot codebases (30+ Maven modules)
reporting 0 edges in codebase_graph_stats.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 20:23:03 +08:00
Giancarlo Erra 0896164442 docs: add OpenCode setup instructions to README
Closes #18
2026-04-05 11:30:04 +01:00
Giancarlo Erra 15ab5c8956 chore: release v1.3.2 v1.3.2 2026-03-26 18:06:54 +00:00
Giancarlo Erra 72e4a5f998 fix: change SessionStart hook type from prompt to command
Prompt-type hooks require ToolUseContext which doesn't exist at session
startup, causing an error on every Claude Code session start.

Closes #16
2026-03-26 17:47:04 +00:00
Giancarlo Erra 3502f0e653 chore: release v1.3.1 v1.3.1 2026-03-24 17:38:20 +00:00
Giancarlo Erra 282b99dc93 Merge pull request #14 from mantvydas:fix/prepublish-build
fix: add prepublishOnly to keep dist/ in sync with source
2026-03-24 17:36:01 +00:00
Mantvydas 2f5b410a04 fix: add prepublishOnly script to ensure dist/ is rebuilt before publish
The published npm package has stale dist/ files that don't include
the SOCRATICODE_PROJECT_ID environment variable support added in source.
This causes the env var to be silently ignored when installed via npm.

Adding a prepublishOnly script ensures tsc runs before every publish,
keeping dist/ in sync with source.
2026-03-24 14:14:04 +02:00
Giancarlo Erra fbc5d54d27 chore: release v1.3.0 v1.3.0 2026-03-19 11:59:43 +00:00
Giancarlo Erra 4590366578 Merge pull request #13 from cstuncsik:feat/alias-resolution-css-imports
feat: add CSS @import tracking and path alias resolution to dependency graph

Thanks cstuncsik, it was in my notes as a known limitation of the previous attempt, thanks for covering this up, very clean and comprehensive, much appreciated!
2026-03-19 11:53:03 +00:00
Csaba Tuncsik f80eec476a fix: add stylus to CSS resolution cases and getAstGrepLang mapping 2026-03-18 20:49:29 +01:00
Csaba Tuncsik f4c5518453 docs: update language support and graph docs for CSS @import and path aliases
- Move Svelte/Vue from "Indexing Only" to "Full Support" in README
- Move SASS/LESS to "Code Graph via Regex" in README
- Add graph-aliases.ts to DEVELOPER.md service file listing
- Update DEVELOPER.md data flow with CSS @import, path alias, and SCSS
  partial resolution steps
2026-03-18 20:18:45 +01:00
Csaba Tuncsik c7e160cb5c feat: add CSS @import tracking and path alias resolution to dependency graph
Add CSS @import extraction from Svelte/Vue <style> blocks and standalone
CSS/SCSS/SASS/LESS files. Add path alias resolution from tsconfig.json /
jsconfig.json compilerOptions.paths with extends chain support.
2026-03-18 20:18:44 +01:00
Giancarlo Erra 4471f874ef chore: release v1.2.0 v1.2.0 2026-03-18 13:56:28 +00:00