Skip to main content

kw-init

Scaffold a new knowledge engine workspace OR link to an existing shared knowledge base. Use when starting a new knowledge base or connecting a project to an existing one.

소스 정보

저장소
chenpg2/kw-engine
최근 소스 활동
2026년 6월 1일 08:20
감지된 SKILL.md 언어
영어
스타
11
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
kw-init
description
Scaffold a new knowledge engine workspace OR link to an existing shared knowledge base. Use when starting a new knowledge base or connecting a project to an existing one.
# /kw-init — scaffold or link a knowledge engine workspace **Two modes:** ## Mode 1: Link to an existing knowledge base (most common) If a shared knowledge base already exists (e.g. `~/Downloads/soft/knowledge_wiki/memory/`), link this project to it instead of creating a new one: ```bash kw link ~/Downloads/soft/knowledge_wiki/memory/ ``` This creates `.kw/config.yaml` with `paths.memory` pointing to the shared library. All `kw` commands (`search`, `verify`, `status`, etc.) now use the shared knowledge. ## Mode 2: Create a new knowledge base from scratch Run this once in any repo to set up a fresh, empty knowledge engine. ## What it creates ``` <project-root>/ ├── .kw/ │ └── config.yaml # Engine config (model routing, fetch policy) ├── memory/ │ ├── SCHEMA.md # Data structure contract │ ├── index.json # Central index (starts empty) │ ├── papers/ # L1 faithful readings │ ├── principles/ # L2 abstract principles │ ├── synthesis/ # L3 design-space, contradictions, gaps │ └── golden/ # Exemplar records for quality reference ├── paper/ # Raw PDFs (gitignored) ├── process/ │ ├── extract-template.md # L1 extraction rubric │ └── distill-rubric.md # L2 distillation rubric └── problems/ # Use-case pointers ``` ## Procedure 1. Check if `memory/SCHEMA.md` already exists. If yes, report "Already initialized" and STOP. 2. Create the directory structure above. 3. Write `.kw/config.yaml` from the template below. 4. Write `memory/SCHEMA.md` from the kw-engine package's canonical schema. 5. Write `memory/index.json` with the empty initial state. 6. Write `process/extract-template.md` and `process/distill-rubric.md`. 7. Add `paper/*.pdf` and `.kw/index.db` to `.gitignore` if not already present. 8. Report: "Knowledge engine initialized. Run `/kw` to start ingesting papers." ## Config template (.kw/config.yaml) ```yaml version: 1 paths: papers_src: paper/ memory: memory/ index: memory/index.json process: process/ problems: problems/ logs: .kw/logs/ loop1: synthesize_after_n_papers: 5 process_versions: extract_template: extract-template@v1 distill_rubric: distill-rubric@v1 model_routing: kw-fetcher: sonnet kw-reader: sonnet kw-distiller: opus kw-synthesizer: opus kw-verifier: sonnet fetch: fallback_order: [with_fallback, arxiv, biorxiv, medrxiv, pubmed, crossref, openalex, semantic, curl_oa] validate: magic_bytes: "%PDF-" min_bytes: 10240 max_bytes: 52428800 scihub: false paywalled_via_browse: true idempotent: true active_expansion: enabled: false ``` ## Initial index.json ```json { "version": 1, "counters": { "principle": 0 }, "papers": [], "principles": [], "synthesis": { "last_run": null, "n_principles_at_last_run": 0 } } ```
GitHub에서 보기