Add ranksmith-advisor Claude Code plugin#5
Merged
Conversation
Draft spec for an embedded Claude Code skill/plugin that guides users to the right reranking strategy and generates correct, example-backed snippets. Scope: reranking strategies only (confidence as a pointer); staged packaging (project-local skill, then distributable plugin). No library API changes. https://claude.ai/code/session_011d5n8TDf8vg22SZYggjnBb
Single-source plugin (plugin root == repo root) that helps ranksmith users pick
the right reranking strategy and write correct, idiomatic code:
- skills/ranksmith-advisor/: SKILL.md router plus method-guide, snippets, and
guardrails reference files (reranking scope; confidence is a pointer only)
- snippets reference the CI-tested examples/ as the source of truth to avoid drift
- .claude-plugin/{plugin.json,marketplace.json}: installable via the repo's own
marketplace (plugin source "./")
- tests/test_advisor_references.py: assert snippets link to real examples and
import only public ranksmith symbols
- pyproject.toml: exclude tool dirs from the sdist so the advisor never ships to PyPI
- spec: record the single-source layout decision and update the task checklist
Verification:
- ./scripts/verify.sh -> 462 passed, ruff clean, mypy clean, build OK
- built sdist/wheel contain no advisor or tool files
https://claude.ai/code/session_011d5n8TDf8vg22SZYggjnBb
Register the repo's own marketplace and enable the plugin via project-shared .claude/settings.json (extraKnownMarketplaces with a local directory source plus enabledPlugins), so contributors get the advisor with no manual install. The file is excluded from the sdist, so it never ships to PyPI. Update the spec checklist accordingly. Verification: - ./scripts/verify.sh -> 462 passed, ruff/mypy clean, build OK - built sdist/wheel contain no .claude or skills files https://claude.ai/code/session_011d5n8TDf8vg22SZYggjnBb
Add a synced "Claude Code Advisor" section to README.md and README.ko.md: install for external users (marketplace add + plugin install) and automatic enablement for contributors via .claude/settings.json. Flip the spec status to Completed. Implementation, packaging, and automated verification are done (local verify.sh 462 passed, CI test 3.10-3.12 green, manifests valid). The interactive Claude Code smoke test is recorded as a user-acceptance step since it cannot run in a headless environment. https://claude.ai/code/session_011d5n8TDf8vg22SZYggjnBb
Invoking the ranksmith-advisor skill in a live session loads the plugin, resolves its reference files, and produces an evidence-grounded recommendation (TourRank rounds=2) with a guardrail-compliant snippet. Mark the Phase 4 verification item done and update the status note. https://claude.ai/code/session_011d5n8TDf8vg22SZYggjnBb
- Strip inline comments per line in _imported_names so a symbol after an inline comment in a multi-line import is still validated (previously a single whole-body split dropped everything after the first comment). - Add test_documented_strategy_defaults_match_source: a drift guard that asserts the strategy constructor defaults the advisor docs rely on (window_size, passes, set_size, shuffle_seed, tolerance, etc.) still match src/ranksmith, so method-guide.md cannot silently go stale. verify.sh: 463 passed, ruff/mypy clean, build OK. https://claude.ai/code/session_011d5n8TDf8vg22SZYggjnBb
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.
개요
코딩 어시스턴트(Claude Code)가
ranksmith사용자에게 ① 적절한 리랭킹 메소드 선택 가이드와 ② 동작하는 코드 스니펫을 제공하도록, ranksmith 도메인 지식을 단일 소스 Claude Code 플러그인으로 레포에 내장합니다.포함 내용
스킬 본문 — 단일 소스 (
skills/ranksmith-advisor/)SKILL.md— 라우팅 + 가드레일 요약 (상시 로드)method-guide.md— 전략 선택 결정 절차 + 커밋된 벤치마크 콜 비용 + 파라미터 기본값snippets.md— 시나리오 → CI 검증된examples/매핑 + 최소 스니펫guardrails.md— 라이브러리 특유의 하드룰 9개 — 재서술이 아니라 canonical 문서를 cross-reference배포 패키징 — plugin root = repo root
.claude-plugin/plugin.json(ranksmith-advisor),.claude-plugin/marketplace.json(ranksmith, pluginsource: "./")/plugin marketplace add pko89403/ranksmith→/plugin install ranksmith-advisor@ranksmith.claude/settings.json의extraKnownMarketplaces(localdirectory,path ".") +enabledPlugins로 자동 활성화(설치 0)문서
README.md/README.ko.md에 "Claude Code Advisor" 섹션 추가(ko/en 동기화) — 외부 설치 + 기여자 자동 활성화 안내드리프트 / 격리 가드
tests/test_advisor_references.py— 스니펫이 가리키는examples/*.py존재 +from ranksmith import심볼이 public__all__에 있는지 자동 검증pyproject.toml—/.claude/.claude-plugin/skills를 sdist에서 제외(PyPI 패키지와 격리)스코프
리랭킹 전략만. confidence(
ranksmith.confidence등)는 "리랭커 아님 + 별도 유틸" 포인터로만 다룸.검증 (실제 실행)
./scripts/verify.sh→ 462 passed, ruff/format/mypy clean, build OKtest (3.10 / 3.11 / 3.12)모두 successplugin.json/marketplace.json/settings.jsonJSON 유효, 스키마는 공식 문서로 확인상태
스펙 상태 = Completed. 구현·패키징·문서·자동 검증 완료.
남은 항목 1건은 환경상 불가 → 사용자 인수 단계로 기록:
https://claude.ai/code/session_011d5n8TDf8vg22SZYggjnBb
Generated by Claude Code