mirror of
https://github.com/thedotmack/claude-mem
synced 2026-04-25 17:15:04 +02:00
docs: add Language Support section to smart-explore/SKILL.md (#1651)
tree-sitter language docs belonged in smart-explore but were absent; this adds the Bundled Languages table (10 languages) with correct placement. Generated by Claude Code Vibe coded by ousamabenyounes Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -143,3 +143,24 @@ Use smart_* tools for code exploration, Read for non-code files. Mix freely.
|
||||
| Explore agent | ~39,000-59,000 | Cross-file synthesis with narrative |
|
||||
|
||||
**4-8x savings** on file understanding (outline + unfold vs Read). **11-18x savings** on codebase exploration vs Explore agent. The narrower the query, the wider the gap — a 27-line function costs 55x less to read via unfold than via an Explore agent, because the agent still reads the entire file.
|
||||
|
||||
## Language Support
|
||||
|
||||
Smart-explore uses **tree-sitter AST parsing** for structural analysis. Unsupported file types fall back to text-based search.
|
||||
|
||||
### Bundled Languages
|
||||
|
||||
| Language | Extensions |
|
||||
|----------|-----------|
|
||||
| JavaScript | `.js`, `.mjs`, `.cjs` |
|
||||
| TypeScript | `.ts` |
|
||||
| TSX / JSX | `.tsx`, `.jsx` |
|
||||
| Python | `.py`, `.pyw` |
|
||||
| Go | `.go` |
|
||||
| Rust | `.rs` |
|
||||
| Ruby | `.rb` |
|
||||
| Java | `.java` |
|
||||
| C | `.c`, `.h` |
|
||||
| C++ | `.cpp`, `.cc`, `.cxx`, `.hpp`, `.hh` |
|
||||
|
||||
Files with unrecognized extensions are parsed as plain text — `smart_search` still works (grep-style), but `smart_outline` and `smart_unfold` will not extract structured symbols.
|
||||
|
||||
43
tests/utils/skill-docs-placement.test.ts
Normal file
43
tests/utils/skill-docs-placement.test.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* Regression test for misplaced smart-explore language docs (#1651)
|
||||
*
|
||||
* The smart-explore language support section was missing from smart-explore/SKILL.md
|
||||
* and had previously been in mem-search/SKILL.md (where it doesn't belong).
|
||||
*/
|
||||
import { describe, it, expect } from 'bun:test';
|
||||
import { existsSync, readFileSync } from 'fs';
|
||||
import { join } from 'path';
|
||||
|
||||
const SKILLS_DIR = join(import.meta.dir, '../../plugin/skills');
|
||||
|
||||
describe('skill docs placement (#1651)', () => {
|
||||
it('smart-explore/SKILL.md contains Language Support section', () => {
|
||||
const path = join(SKILLS_DIR, 'smart-explore/SKILL.md');
|
||||
expect(existsSync(path)).toBe(true);
|
||||
const content = readFileSync(path, 'utf-8');
|
||||
|
||||
expect(content).toContain('Language Support');
|
||||
expect(content).toContain('tree-sitter');
|
||||
});
|
||||
|
||||
it('smart-explore/SKILL.md lists bundled languages', () => {
|
||||
const content = readFileSync(join(SKILLS_DIR, 'smart-explore/SKILL.md'), 'utf-8');
|
||||
|
||||
// Core languages must be documented
|
||||
expect(content).toContain('JavaScript');
|
||||
expect(content).toContain('TypeScript');
|
||||
expect(content).toContain('Python');
|
||||
expect(content).toContain('Go');
|
||||
expect(content).toContain('Rust');
|
||||
});
|
||||
|
||||
it('mem-search/SKILL.md does NOT contain tree-sitter or language grammar docs', () => {
|
||||
const path = join(SKILLS_DIR, 'mem-search/SKILL.md');
|
||||
expect(existsSync(path)).toBe(true);
|
||||
const content = readFileSync(path, 'utf-8');
|
||||
|
||||
// Language support docs belong in smart-explore, not mem-search
|
||||
expect(content).not.toContain('tree-sitter');
|
||||
expect(content).not.toContain('Bundled Languages');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user