Skip to content

docs: add Language Support section to smart-explore/SKILL.md (#1651)#1670

Merged
thedotmack merged 2 commits intothedotmack:mainfrom
ousamabenyounes:fix/issue-1651
Apr 15, 2026
Merged

docs: add Language Support section to smart-explore/SKILL.md (#1651)#1670
thedotmack merged 2 commits intothedotmack:mainfrom
ousamabenyounes:fix/issue-1651

Conversation

@ousamabenyounes
Copy link
Copy Markdown
Contributor

Summary

Fixes #1651

  • Added ## Language Support section to plugin/skills/smart-explore/SKILL.md documenting the tree-sitter AST parsing backend
  • Table lists all 10 bundled languages (JavaScript, TypeScript, TSX/JSX, Python, Go, Rust, Ruby, Java, C, C++) with their file extensions
  • Added fallback-to-text-search note for unrecognized file types

Verification

  • Baseline tests: 1109 pass, 0 pre-existing failures
  • Post-fix tests: 1109 pass, 0 regressions
  • New tests: 3 added (tests/utils/skill-docs-placement.test.ts), all pass
  • Review agent: issue alignment verified — all 3 gates PASS

Files changed

File Change
plugin/skills/smart-explore/SKILL.md Added Language Support + Bundled Languages table (21 lines)
tests/utils/skill-docs-placement.test.ts New regression test (3 tests)

Generated by Claude Code
Vibe coded by ousamabenyounes

…ack#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>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 74041967-4bf2-4214-9b9e-e83d8370c6b3

📥 Commits

Reviewing files that changed from the base of the PR and between 36a03f7 and e7bf2ac.

📒 Files selected for processing (2)
  • plugin/skills/smart-explore/SKILL.md
  • tests/utils/skill-docs-placement.test.ts
✅ Files skipped from review due to trivial changes (2)
  • tests/utils/skill-docs-placement.test.ts
  • plugin/skills/smart-explore/SKILL.md

Summary by CodeRabbit

  • Documentation
    • Enhanced smart-explore documentation with a new "Language Support" section, bundled language list, fallback behavior for unrecognized files, Markdown-specific behaviors (headings, code-fence-aware search, section expansion), and inclusion of frontmatter in outlines
  • Tests
    • Added a regression test to validate presence and contents of the updated documentation sections

Walkthrough

Added a "Language Support" section to the smart-explore skill documenting tree-sitter AST parsing, bundled-language mappings, Markdown-specific behavior, and instructions for project-local tree-sitter grammars via .claude-mem.json. Added a Bun regression test ensuring the language-support docs are present in smart-explore/SKILL.md and absent from mem-search/SKILL.md.

Changes

Cohort / File(s) Summary
Smart-explore language support documentation
plugin/skills/smart-explore/SKILL.md
New "Language Support" section describing tree-sitter-based structural extraction with a plain-text fallback, a bundled-language list (extensions → languages), Markdown-specific handling (heading-tree for smart_outline, code-fence-aware smart_search, section-aware smart_unfold, YAML frontmatter exposed as a frontmatter symbol), and instructions for adding custom tree-sitter grammars via a project-root .claude-mem.json mapping.
Documentation placement regression test
tests/utils/skill-docs-placement.test.ts
Added test verifying smart-explore/SKILL.md contains "Language Support", tree-sitter, and expected bundled language labels, plus the fallback note; and verifying mem-search/SKILL.md does not contain tree-sitter or bundled languages content.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I hopped through docs to find their place,

tucked tree-sitter wisdom in the right space.
Bundled tongues and markdown's gentle art,
tests guard the maps so nothing parts.
Hop hop — neat docs, a tidy heart!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a Language Support section to smart-explore/SKILL.md as specified in issue #1651.
Description check ✅ Passed The description is directly related to the changeset, documenting the addition of the Language Support section with bundled languages table and related content.
Linked Issues check ✅ Passed The PR successfully addresses issue #1651 by moving Smart-Explore language support documentation to the correct file and documenting bundled languages, custom grammars, and markdown support.
Out of Scope Changes check ✅ Passed All changes are within scope: documentation addition to smart-explore/SKILL.md and related regression tests to validate placement comply with issue #1651 requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
tests/utils/skill-docs-placement.test.ts (1)

23-32: Broaden assertions to cover the full language table and fallback contract

This test currently checks only 5 language names. Consider asserting all documented bundled languages plus the unsupported-extension fallback sentence to prevent partial doc regressions.

Proposed test hardening
   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');
+    const expectedLanguages = [
+      'JavaScript',
+      'TypeScript',
+      'TSX / JSX',
+      'Python',
+      'Go',
+      'Rust',
+      'Ruby',
+      'Java',
+      'C',
+      'C++',
+    ];
+
+    for (const language of expectedLanguages) {
+      expect(content).toContain(language);
+    }
+
+    expect(content).toContain('Files with unrecognized extensions are parsed as plain text');
   });
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugin/skills/smart-explore/SKILL.md`:
- Around line 147-166: The Language Support docs omit the required custom
grammar and markdown guidance: add instructions about the `.claude-mem.json`
custom-grammar file and note how markdown is specially supported (e.g., code
block handling, frontmatter, and which smart_search/smart_outline behaviors
differ) to the Smart-explore Language Support section; specifically update
SKILL.md near the "Bundled Languages" and fallback paragraph to mention the
`.claude-mem.json` custom grammar (what it contains and where to drop it) and a
short "Markdown special support" note describing how markdown files are parsed
differently and which features (smart_outline, smart_unfold, smart_search) are
affected.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 408bb155-45b9-4fb3-a909-64d2896aed2a

📥 Commits

Reviewing files that changed from the base of the PR and between cde4faa and 36a03f7.

📒 Files selected for processing (2)
  • plugin/skills/smart-explore/SKILL.md
  • tests/utils/skill-docs-placement.test.ts

Comment thread plugin/skills/smart-explore/SKILL.md
…rt-explore/SKILL.md

- Add Custom Grammars (.claude-mem.json) section explaining how to register
  additional tree-sitter parsers for unsupported file extensions
- Add Markdown Special Support section documenting heading-based outline,
  code-fence search, section unfold, and frontmatter extraction behaviors
- Expand bundled language test to cover all 10 documented languages plus
  the plain-text fallback sentence to prevent partial doc regressions

Co-Authored-By: Claude <noreply@anthropic.com>
@ousamabenyounes
Copy link
Copy Markdown
Contributor Author

Addressed in the latest commit: added the Custom Grammars (.claude-mem.json) section and Markdown Special Support section to smart-explore/SKILL.md; expanded the bundled-language test to assert all 10 documented languages plus the unrecognized-extension fallback sentence.

@thedotmack thedotmack merged commit 153ddb8 into thedotmack:main Apr 15, 2026
1 of 2 checks passed
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.

Smart-explore language support docs misplaced in mem-search SKILL.md

2 participants