Skip to content

fix: sync claude references/query.md with full vocab-expansion Step 0 (closes #1255) - #1256

Open
burrows99 wants to merge 3 commits into
Graphify-Labs:v8from
burrows99:fix/claude-query-md-vocab-expansion
Open

burrows99 wants to merge 3 commits into
Graphify-Labs:v8from
burrows99:fix/claude-query-md-vocab-expansion

Conversation

@burrows99

@burrows99 burrows99 commented Jun 11, 2026 •

Copy link
Copy Markdown

What

graphify/skills/claude/references/query.md was 103 lines — missing the Step 0 Constrained query expansion block that every other platform skill (vscode, codex, copilot, opencode, claw, kiro, amp, pi, trae, droid, kilo, windows) already ships at 249 lines.

Additionally, a cross-platform bug was found (via reviewer @uditstocks) and fixed across all 13 platform skills: Step 1's length filter used len(t) > 3 (min 4 chars) while Step 0 extracts tokens with len(t) >= 3 (min 3 chars), silently dropping valid 3-char tokens like api, use, get, tok, auth before BFS/DFS.

Root cause

The skills/claude/ directory contains a stale copy of references/query.md that predates the vocabulary-expansion rewrite. All other platform directories received the update; claude/ did not.

The len(t) > 3 vs >= 3 mismatch existed in the source file and was copied to all platforms — making it cross-platform from the start.

Fix

Commit a1ac4cb — sync skills/claude/references/query.md (103 lines → 249 lines):

before: 103 lines  graphify/skills/claude/references/query.md
after:  249 lines  graphify/skills/claude/references/query.md

Commit 5643c7f — align Step 1 filter for claude/ (> 3 → >= 3 on line 49)

Commit f485fc2 — same >= 3 fix applied to all 12 remaining platforms:
amp, claw, codex, copilot, droid, kilo, kiro, opencode, pi, trae, vscode, windows

See: #1256 (comment)

Why it matters

Without Step 0, the graphify query CLI latches onto wrong start nodes for natural-language questions. The binary does no stemming or synonym matching — it relies entirely on the agent first expanding the question against actual graph vocabulary tokens.

Without the >= 3 fix, tokens that Step 0 deliberately selected from graph vocab are silently discarded before traversal even begins.

Verified on a 757-file, 11 634-node TypeScript/Next.js repo: after applying this fix, natural-language query quality matches VS Code Copilot results from the identical graph.

Closes #1255

skills/claude/references/query.md was 103 lines — missing the constrained
vocabulary expansion step (Step 0) that all other platform skill installs
(vscode, codex, copilot, opencode, etc.) already ship at 249 lines.

Without Step 0, the graphify query CLI latches onto wrong start nodes for
natural-language questions (e.g. 'how does auth work' starts BFS from a
Session test fixture instead of auth.ts) because the binary does no stemming
or synonym matching — it relies on the agent to expand the question against
the actual graph vocabulary first.

Fix: copy skills/vscode/references/query.md → skills/claude/references/query.md
so both are identical.

Closes Graphify-Labs#1255

@uditstocks uditstocks left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spotted a minor inconsistency between Step 0 and Step 1.
inline comment added on line 49.

Step 0 extracts vocab tokens with if 3 <= len(t) <= 30, so 3-char
tokens (api, use, get, tok, auth) are deliberately included. Step 1 was
filtering with len(t) > 3 (minimum 4 chars), silently dropping those
same tokens before BFS/DFS.

Change to len(t) >= 3 to align both steps.

Addresses review comment by @uditstocks on PR Graphify-Labs#1256.
Same >= 3 fix applied to amp, claw, codex, copilot, droid, kilo, kiro,
opencode, pi, trae, vscode, windows - all had the same len(t) > 3 bug.
@burrows99

Copy link
Copy Markdown
Author

Also addressed the reviewer's observation cross-platform in f485fc2.

The len(t) > 3 bug (Step 1 silently dropping 3-char tokens that Step 0 deliberately selected) was present in all 13 platform skills, not just claude/. Fixed in the same commit:

amp, claw, codex, copilot, droid, kilo, kiro, opencode, pi, trae, vscode, windows

All 13 platforms now use len(t) >= 3 on line 49, consistent with Step 0's if 3 <= len(t) <= 30 threshold.

@LeanderBlume

LeanderBlume commented Jun 15, 2026 •

Copy link
Copy Markdown

As far as I can tell, none (or very few, I haven't looked at all of them) of the shipped skills include this step 0. Looks like skillgen wasn't done correctly?

Edit: Nevermind, I figured out that none of the other platforms have it because they use the cli-inline query variant. Not sure why or why that one doesn't include this step 0 (which seems pretty important to get good results), but that's a different issue.

This branch has not been deployed

No deployments
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.

fix: graphify install --project ships older references/query.md (103 lines, no Step 0 vocab expansion) vs graphify vscode install (249 lines)

3 participants