refactor(llm-wiki): single-domain + dedup + progressive disclosure#31
Merged
Conversation
Karpathy 원전을 충실히 따라 위키를 단일 그래프로 운영하도록 리팩터.
[[slug]] cross-reference가 한 그래프 안에서만 유효하다는 위키 본질에
맞춰 multi-domain 추상화를 제거하고, 공통 규칙을 PRINCIPLES.md로
정본화한 뒤, SKILL.md를 라우터로 슬림화해 progressive disclosure 적용.
주요 변경:
- SKILL.md를 라우터로 재작성 (11.4KB → 3.4KB, 70% 감소)
- Phase 1 "Domain Discovery" 제거, Phase 0에 SCHEMA.md 존재 체크 통합
- 5개 operation 본문을 operations/{init,ingest,query,lint,update}.md 로 분리
- PRINCIPLES.md 를 공통 규칙 정본화
- frontmatter, slug rules, wikilink, bidirectional, page types,
immutability, log format 모두 단일 출처로 일원화
- templates/schema-template.md 슬림화 (1.0KB → 0.5KB)
- frontmatter/cross-ref/governance 4개 중복 섹션 제거하고
PRINCIPLES.md 참조로 단순화
- {domain} → {wiki_title} 변수 통일, README의 도메인 잔재 제거
Operation별 컨텍스트 절감 (기존 14.3KB 대비):
- init 5.3KB (-63%)
- ingest 10.6KB (-26%)
- query 5.2KB (-64%, no archive)
- lint 9.5KB (-34%)
- update 8.9KB (-38%)
Eval (정적 검증 + 6 시나리오 워크스루): blocker 없음.
사용자 기존 wiki(~/wiki)는 이미 평탄 구조라 마이그레이션 불요.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… to reasoning Iteration on PR #31 driven by 4 review passes (SKILL+PRINCIPLES, operations cross-check, scripts↔markdown contracts, deterministic-vs-reasoning) and two functional eval rounds (5-op + real-prompt). scripts - drop slugify.py (CJK input → "untitled" fallback; LLM transliterates better) - drop init_wiki.py (str.replace template render mishandles user input containing '{date}' etc.; mkdir + Write are LLM-friendly anyway) - keep lint_wiki.py (deterministic large-vault audit) + append_log.py (format consistency); both gain encoding="utf-8", wikilink #anchor support, index/overview as inbound source for orphan check, EOF-without-newline frontmatter parsing, description-newline refusal dedup - single-graph statement collapsed to PRINCIPLES.md architecture only - lazy-load policy stated once (PRINCIPLES.md head) - prereq line removed from each operation; SKILL.md dispatch handles it - backlink procedure described once in PRINCIPLES.md bidirectional; operations reference it instead of restating XML kept only where it carries semantics - <phase>, <routes>, <dispatch>, <refs>, <onaccept>, <onreject>, <forbid> - removed <step>, <layer>, <type>, <prereq> (headings/lists are clearer) clarity - Phase 0 step "op=init / op≠init" moved into dispatch (was paradox: op not yet known at Phase 0) - routes table flags "wiki_root 안의 기존 파일 경로면 update 우선" - "section" extraction defined as one ## heading block - init.md drops dead "사용자 페이지를 만들 때만 PRINCIPLES.md 참조" line - overview-template.md type: index → overview (matches PRINCIPLES.md)
리팩터(single-domain + dedup + progressive disclosure)와 후속 정리 (deterministic 작업을 scripts/로 분리)에 맞춰 버전 업. 캐시 무효화를 위해 플러그인 수정 시 버전 업이 필요. 부수: skill-creator workspace 디렉토리를 .gitignore에 추가. Co-Authored-By: Claude Opus 4.7 (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.
Summary
llm-wiki 플러그인을 (1) Karpathy 원전 충실 단일 도메인, (2) 공통 규칙 dedup, (3) operation별 progressive disclosure 세 단계로 리팩터.
위키는 단일 지식 그래프 —
[[slug]]cross-reference가 한 그래프 안에서만 유효하다는 본질에 맞춰 multi-domain 추상화를 제거. 공통 규칙은PRINCIPLES.md단일 정본으로 일원화하고,SKILL.md는 라우터로 슬림화해 operation 호출 시 필요한 파일만 컨텍스트에 들어가게 함.Why
기존 SKILL.md는 11.4KB에 5개 operation 본문 + 공통 규칙이 모두 들어있어, 어떤 operation을 부르든 전체가 컨텍스트에 로드됐음. 또 page types/frontmatter/governance 같은 규칙이 PRINCIPLES.md와 schema-template에 중복 정의되어 있었음. 사용자의 실제 위키(
~/wiki)도 이미 단일 도메인 평탄 구조로 운영 중이라 multi-domain 추상화는 가치 없이 복잡도만 추가하던 상태.Changes
Single-domain 리팩터
SKILL.mdPhase 1 "Domain Discovery" 제거, Phase 0에SCHEMA.md존재 체크 통합{wiki_root}/{domain}/...→{wiki_root}/...(디렉토리 한 단계 평탄화){domain_path}→{wiki_root}치환{domain}→{wiki_title}변수 통일Dedup (7개 항목 정본화)
templates/schema-template.md의 중복 4개 섹션 제거 후 PRINCIPLES.md 참조로 단순화 (1.0KB → 0.5KB).Progressive Disclosure
SKILL.md11.4KB → 3.4KB (-70%): 라우터(Phase 0 + Operation Detection + Dispatch)만 남김Operation별 컨텍스트 절감 (기존 14.3KB 대비)
Eval
정적 검증 + 6 시나리오 functional 워크스루 모두 통과. Blocker 없음.
리팩터 과정에서 발견한 기존 잠복 버그 `{scope_description}` placeholder 미스매치도 함께 수정.
Migration
사용자 기존 위키(
~/wiki)는 이미 단일 도메인 평탄 구조(~/wiki/SCHEMA.md)로 운영 중이라 데이터 마이그레이션 불요.Test Plan
🤖 Generated with Claude Code