Repository navigation
km:search — 구조 정리 + 검색 수리(허브 선택 · CLI 콜론 · 규칙 코퍼스) - #19
Merged
Merged
Conversation
search.md 를 엔트리 파일과 search-references/ 참조 파일 6개로 나눴다. 정상 Tier 1 성공 경로는 참조 파일을 읽지 않고, Tier 2~4 폴백·DEEP·0건·부재 단정 때만 해당 참조를 1회 읽는다. 검색 동작 자체는 바꾸지 않았다. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Phase 0.4 허브 선택: awk 1패스(겹친 키워드 수 순 · 동점 = 지도 위쪽 · zsh/bash 같은 결과 · 공백 든 허브명 보존) - Tier 1-S·Tier 2 CLI: 콜론 든 질의 이스케이프(scripts/km_cli_query.py) · 보강 판정 = JSON 배열 1건+ · 보강 질의 = 키워드 2개 - Tier 1-R(새): km-config search.ruleCorpus 가 있을 때만 규칙·스킬 코퍼스 후보 ≤5(scripts/km_rules_route.py) · 다른 vault 색인(other)이면 건너뜀 · 설정이 없으면 RULES: off(기본 동작 불변) - tier2-struct-prelude: 허브·키워드 순회를 줄 단위로(zsh 비분할 결함 수리) - 영수증 vault-lookup 호출: 홈 경로 고정을 빼고 VAULT_PATH 의 .claude/scripts → 없으면 호출 위치 git 최상위 순으로 찾음(둘 다 없으면 VL_UNAVAILABLE) · zsh 에서 검색어 분할이 실패하던 결함 수리(read -a → set -f + set --) - 부재·단정 절 제목 정리(「부재·단정 확인 절차」 · 동작 변경 없음) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Keep successful searches self-contained and load detailed instructions when needed
The search command keeps the steps needed for a successful search in its main
document: reading configuration, selecting the target, searching, opening source
documents, and giving a concise answer. Detailed fallback instructions and
expanded output guidance move to separate reference files that are loaded only
when the search needs them.
The current version also includes keyword-based ranking of hub notes (navigation
notes that link to related notes), query escaping for CLI searches, validation of
freshness results, optional search over configured rule documents, and checks
before claiming that information is absent. Target restrictions and the record
written after each completed search (search receipt) remain part of the workflow.
The main search document is shorter: 30,384 → 23,099 characters, counted the same
way for both versions. The effect on conversation context size has not been
re-measured for this version, and the change does not establish an improvement
in answer accuracy or response time.
Counting method: Python Unicode code-point count, including whitespace and
line endings, with no trimming or Unicode normalization. The baseline is
commands/search.md at d75ed0e3db43330c000852f5007c2907d9413cad;
the current file has SHA-256
05e891b3c993b050d4708de4355ed7cb0d79465ec909f5cc46e44a01afc299fc.
Package and installation test results are reported together with the code diff
they test.