feat: add --include-hidden flag for obsidian backend#4
Merged
skridlevsky merged 1 commit intoMar 10, 2026
Merged
Conversation
Add an --include-hidden CLI flag and WithIncludeHidden vault option that allows indexing directories starting with '.' (e.g., .specify/, .opencode/). The .git directory is always skipped regardless of the flag setting to prevent indexing git internals. This enables projects that store documentation or configuration in hidden directories to include that content in the knowledge graph. Changes: - Add includeHidden field to vault.Client struct - Add WithIncludeHidden(bool) Option constructor - Guard hidden directory skips in Load(), addWatcherDirs(), and handleEvent() with includeHidden check - Add --include-hidden CLI flag in runServe() - Add tests: default skip, include with flag, always skip .git, watcher integration with hidden directories
jflowers
added a commit
to unbound-force/unbound-force
that referenced
this pull request
Mar 8, 2026
Install graphthulhu with --include-hidden support (upstream PR submitted to skridlevsky/graphthulhu#4), create OpenCode MCP configuration, verify all 5 user stories, and enrich all 9 spec files with YAML frontmatter. Deliverables: - opencode.json: MCP server config for graphthulhu - verification-log.md: all verification results across 8 phases - tasks.md: all 49 tasks marked complete - YAML frontmatter added to all 9 spec files (001-009) - AGENTS.md and README.md updated with 010 references - Upstream PR: github.com/skridlevsky/graphthulhu/pull/4 Verified: search, graph analysis, live sync, link traversal, property queries, read-only enforcement, file non-modification. 50 pages indexed across all directories including .specify/ and .opencode/.
jflowers
added a commit
to unbound-force/unbound-force
that referenced
this pull request
Mar 8, 2026
Install graphthulhu with --include-hidden support (upstream PR submitted to skridlevsky/graphthulhu#4), create OpenCode MCP configuration, verify all 5 user stories, and enrich all 9 spec files with YAML frontmatter. Deliverables: - opencode.json: MCP server config for graphthulhu - verification-log.md: all verification results across 8 phases - tasks.md: all 49 tasks marked complete - YAML frontmatter added to all 9 spec files (001-009) - AGENTS.md and README.md updated with 010 references - Upstream PR: github.com/skridlevsky/graphthulhu/pull/4 Verified: search, graph analysis, live sync, link traversal, property queries, read-only enforcement, file non-modification. 50 pages indexed across all directories including .specify/ and .opencode/.
Owner
|
Great work. Merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an
--include-hiddenCLI flag andWithIncludeHiddenvault option that allows indexing directories starting with.when using the obsidian backend. The.gitdirectory is always skipped regardless of the flag setting to prevent indexing git internals.Motivation
Some projects store documentation and configuration in hidden directories (e.g.,
.specify/,.opencode/). Currently, the obsidian backend skips all directories starting with., which means this content is not indexed or searchable. This flag enables those projects to include that content in the knowledge graph.Our use case is the Unbound Force project, which stores its org constitution in
.specify/memory/constitution.mdand agent definitions in.opencode/agents/. Without this flag, these critical files are invisible to the knowledge graph.Changes
includeHidden boolfield tovault.ClientstructWithIncludeHidden(bool) Optionconstructor following the existingWithDailyFolderpatternLoad(),addWatcherDirs(), andhandleEvent()with!c.includeHiddencheck.gitdirectory regardless of flag (hardcoded exclusion)--include-hiddenCLI flag inrunServe()functionTests
Four new tests added to
vault/vault_test.go:TestIncludeHidden_DefaultSkipsHiddenDirs- Verifies default behavior is unchanged (hidden dirs skipped)TestIncludeHidden_WithFlagIndexesHiddenDirs- Verifies hidden dirs are indexed with flagTestIncludeHidden_AlwaysSkipsGitDir- Verifies.gitis always skipped even with flagTestIncludeHidden_WatcherIndexesHiddenFiles- Verifies file watcher picks up changes in hidden dirs with flagAll existing tests pass.
go test ./... -raceandgo vet ./...pass cleanly.Usage
graphthulhu serve --backend obsidian --vault . --include-hidden --read-onlyBackward Compatibility
Default behavior is unchanged. Hidden directories are skipped unless
--include-hiddenis explicitly set. No existing configuration or behavior is affected.