Skip to content

feat: add hash-based file change detection (works without Git)#7

Open
vjache wants to merge 2 commits intokraklabs:mainfrom
vjache:main
Open

feat: add hash-based file change detection (works without Git)#7
vjache wants to merge 2 commits intokraklabs:mainfrom
vjache:main

Conversation

@vjache
Copy link
Copy Markdown

@vjache vjache commented Feb 25, 2026

Description

Fixes #6 - Adds automatic reindexing via file watcher and hash-based change detection for VCS-agnostic operation.

When CIE runs as MCP server, it now:

  1. Watches files for changes and auto-triggers incremental reindex
  2. Uses hash-based detection (no Git required) by default
  3. Logs all events to .cie/index.log for diagnostics
  4. Provides cie_reindex tool for explicit reindexing from AI clients

Related Issue

Fixes #6

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Testing

  • Tested locally with KiloCode MCP client
  • File watcher detects changes and triggers reindex automatically
  • Hash-based detection works without Git repository
  • cie_reindex tool callable from MCP client

Key Changes

  • pkg/ingestion/hash_delta.go - Hash-based change detection (VCS-agnostic)
  • cmd/cie/watch.go - File watcher with debounce for auto-reindex
  • pkg/ingestion/index_log.go - Structured logging to .cie/index.log
  • cmd/cie/config.go - Watch: true, UseGit: false by default
  • cmd/cie/mcp.go - cie_reindex tool and reindex lifecycle logging

Backwards Compatibility

Fully backwards compatible. Existing behavior available via config:

  • indexing.use_git: true - Use git-based detection
  • indexing.watch: false - Disable file watcher

Checklist

  • My code follows the project's code style
  • I have tested this locally
  • My changes generate no new warnings

- Add HashDeltaDetector for VCS-agnostic change detection
- Add UseGitDelta config option (default: false for hash-based)
- Add indexing.use_git config option for YAML
- Enable watch by default for incremental indexing
- Add structured logging to .cie/index.log

Closes: hash-based detection for non-Git repositories
@vjache vjache marked this pull request as draft February 25, 2026 03:21
@vjache vjache marked this pull request as ready for review February 25, 2026 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: When used as MCP one can't reindex.

1 participant