hypomnema 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +11 -0
- package/LICENSE +21 -0
- package/README.ko.md +160 -0
- package/README.md +160 -0
- package/commands/.gitkeep +0 -0
- package/commands/crystallize.md +116 -0
- package/commands/doctor.md +66 -0
- package/commands/feedback.md +67 -0
- package/commands/graph.md +54 -0
- package/commands/ingest.md +85 -0
- package/commands/init.md +101 -0
- package/commands/lint.md +55 -0
- package/commands/query.md +55 -0
- package/commands/resume.md +48 -0
- package/commands/stats.md +39 -0
- package/commands/uninstall.md +52 -0
- package/commands/upgrade.md +63 -0
- package/commands/verify.md +60 -0
- package/docs/.gitkeep +0 -0
- package/docs/ARCHITECTURE.md +183 -0
- package/docs/CONTRIBUTING.md +115 -0
- package/docs/TEST-CASES.md +580 -0
- package/hooks/.gitkeep +0 -0
- package/hooks/hooks.json +109 -0
- package/hooks/hypo-auto-commit.mjs +36 -0
- package/hooks/hypo-auto-stage.mjs +30 -0
- package/hooks/hypo-compact-guard.mjs +71 -0
- package/hooks/hypo-cwd-change.mjs +91 -0
- package/hooks/hypo-file-watch.mjs +47 -0
- package/hooks/hypo-first-prompt.mjs +59 -0
- package/hooks/hypo-hot-rebuild.mjs +95 -0
- package/hooks/hypo-lookup.mjs +178 -0
- package/hooks/hypo-personal-check.mjs +195 -0
- package/hooks/hypo-session-start.mjs +141 -0
- package/hooks/hypo-shared.mjs +213 -0
- package/package.json +37 -0
- package/scripts/.gitkeep +0 -0
- package/scripts/bump-version.mjs +53 -0
- package/scripts/crystallize.mjs +153 -0
- package/scripts/doctor.mjs +361 -0
- package/scripts/feedback.mjs +130 -0
- package/scripts/graph.mjs +183 -0
- package/scripts/ingest.mjs +130 -0
- package/scripts/init.mjs +515 -0
- package/scripts/lib/frontmatter.mjs +11 -0
- package/scripts/lib/hypo-ignore.mjs +54 -0
- package/scripts/lib/hypo-root.mjs +53 -0
- package/scripts/lint.mjs +210 -0
- package/scripts/query.mjs +124 -0
- package/scripts/resume.mjs +115 -0
- package/scripts/stats.mjs +132 -0
- package/scripts/uninstall.mjs +188 -0
- package/scripts/upgrade.mjs +538 -0
- package/scripts/verify.mjs +172 -0
- package/skills/.gitkeep +0 -0
- package/skills/crystallize/SKILL.md +85 -0
- package/skills/graph/SKILL.md +54 -0
- package/skills/ingest/SKILL.md +83 -0
- package/skills/lint/SKILL.md +55 -0
- package/skills/query/SKILL.md +58 -0
- package/skills/verify/SKILL.md +92 -0
- package/templates/.gitkeep +0 -0
- package/templates/.hypoignore +18 -0
- package/templates/Home.md +34 -0
- package/templates/Overview.md +50 -0
- package/templates/SCHEMA.md +106 -0
- package/templates/hot.md +22 -0
- package/templates/hypo-automation.md +69 -0
- package/templates/hypo-config.md +41 -0
- package/templates/hypo-guide.md +146 -0
- package/templates/hypo-help.md +53 -0
- package/templates/index.md +44 -0
- package/templates/log.md +25 -0
- package/templates/pages/_index.md +61 -0
- package/templates/projects/_template/hot.md +28 -0
- package/templates/projects/_template/index.md +39 -0
- package/templates/projects/_template/prd.md +29 -0
- package/templates/projects/_template/session-state.md +9 -0
- package/templates/session-state.md +12 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hypomnema",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "LLM-native personal wiki system — session-aware knowledge base for Claude Code",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "sk-lim19f",
|
|
7
|
+
"email": "limsangkyu0219@gmail.com"
|
|
8
|
+
},
|
|
9
|
+
"commands": "./commands/",
|
|
10
|
+
"skills": "./skills/"
|
|
11
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 sk-lim19f
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.ko.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
[English](README.md) | 한국어
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Hypomnema
|
|
6
|
+
|
|
7
|
+
Claude Code를 위한 LLM 네이티브 개인 위키 시스템.
|
|
8
|
+
|
|
9
|
+
Hypomnema는 Claude Code를 복리적으로 성장하는 지식 베이스로 만들어줍니다. 소스를 그대로 청크 단위로 저장하는 대신, LLM이 각 소스를 읽고 합성하여 기존 페이지를 업데이트합니다. 새 소스가 지식을 추가하는 것보다 기존 지식을 강화하는 방향으로 동작합니다.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 빠른 시작
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g hypomnema # 또는: npx hypomnema
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Claude Code에서 실행:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
/hypo:init
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
위키 디렉터리를 생성하고, 훅을 설치하며, `~/.claude/settings.json`에 병합합니다.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Git 동기화
|
|
30
|
+
|
|
31
|
+
`/hypo:init` 실행 후 위키 디렉터리는 이미 로컬 git 저장소입니다. 여러 기기에서 동기화하려면 remote를 추가하고 push하세요:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
git -C ~/hypomnema remote add origin <저장소-URL>
|
|
35
|
+
git -C ~/hypomnema push -u origin HEAD
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
이후 Stop 훅이 매 세션 종료 시 자동으로 commit 및 push합니다 — 별도 동기화 작업이 필요 없습니다.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Hypomnema를 선택하는 이유
|
|
43
|
+
|
|
44
|
+
| | Hypomnema | Obsidian / Notion | RAG / 벡터 검색 |
|
|
45
|
+
|---|---|---|---|
|
|
46
|
+
| **캡처 노력** | URL 붙여넣기 → 완료 | 직접 노트 작성 | 업로드 + 임베딩 파이프라인 |
|
|
47
|
+
| **지식 성장** | 새 소스가 기존 페이지를 업데이트 | 각 노트가 독립적 | 청크가 무한정 늘어남 |
|
|
48
|
+
| **검색** | LLM이 근거 있는 답변 합성 | 전문 검색 | 최근접 이웃 청크 |
|
|
49
|
+
| **워크플로 통합** | Claude Code 내부에서 동작 | 별도 앱 / 브라우저 탭 | 별도 서비스 |
|
|
50
|
+
|
|
51
|
+
네 가지 핵심 차별점:
|
|
52
|
+
|
|
53
|
+
1. **저장이 아닌 합성.** Claude가 각 소스를 읽고 구조화된 페이지로 합성합니다. 단순 복사·붙여넣기가 아니라, 추론할 수 있는 지식 베이스를 얻게 됩니다.
|
|
54
|
+
2. **복리 성장 페이지.** 새 소스가 기존 페이지와 겹치면 Claude가 해당 페이지를 업데이트합니다. 위키는 단순히 커지는 것이 아니라 더 촘촘하고 연결되어 성장합니다.
|
|
55
|
+
3. **무마찰 훅.** 세션 시작·종료, 자동 스테이징, 자동 커밋이 Claude Code 라이프사이클 훅을 통해 자동으로 실행됩니다. 위키 관리를 위해 컨텍스트 전환이 필요 없습니다.
|
|
56
|
+
4. **워크플로 네이티브.** 별도 앱, 내보내기/가져오기, 동기화 서비스가 없습니다. 이미 열려 있는 Claude Code 세션 안에서 동작합니다.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 시나리오
|
|
61
|
+
|
|
62
|
+
**A — 새 기술 학습**
|
|
63
|
+
Kubernetes 문서와 블로그 글을 읽고 있습니다. 각 URL을 `/hypo:ingest`에 넣으면 됩니다. 세 번째 글을 처리할 때쯤 Claude는 새 페이지를 만드는 대신 기존 `kubernetes-networking.md`를 업데이트합니다. 일주일 후 `/hypo:query "pod CIDR 할당은 어떻게 동작하나요?"`를 실행하면 자신의 노트를 인용한 합성 답변을 받을 수 있습니다.
|
|
64
|
+
|
|
65
|
+
**B — 엔지니어링 결정 추적**
|
|
66
|
+
중요한 변경 사항을 머지하기 전에 설계 문서나 PR 설명을 `/hypo:ingest`로 처리합니다. Claude가 컨텍스트, 트레이드오프, 결정 사항을 담은 ADR 스타일 페이지를 만듭니다. 이후 `[[wikilink]]` 참조가 관련 프롬프트에 근거를 직접 주입합니다.
|
|
67
|
+
|
|
68
|
+
**C — 연구 누적**
|
|
69
|
+
몇 주에 걸쳐 특정 주제의 논문들을 읽고 있습니다. 각 `/hypo:ingest` 실행이 논문을 합성하고 기존 페이지와 교차 연결합니다. 언제든 `/hypo:query`를 실행하면 자신의 노트에 근거한 문헌 리뷰 스타일의 요약을 얻을 수 있습니다.
|
|
70
|
+
|
|
71
|
+
**D — AI 행동 튜닝**
|
|
72
|
+
Claude가 잘못하거나 정확히 맞았을 때마다 `/hypo:feedback`을 실행합니다. 교정 사항이 `pages/feedback/`에 저장되고 세션 시작 시 주입되어, 같은 실수가 반복되지 않습니다 — 하나의 대화가 아닌 세션 간에 걸쳐서요.
|
|
73
|
+
|
|
74
|
+
**E — 일시 중단된 프로젝트 재개**
|
|
75
|
+
3주 동안 프로젝트를 손 놓았습니다. 다음 세션 시작 시 훅이 `projects/<name>/session-state.md`를 읽고 "다음 작업"과 최근 결정 사항을 컨텍스트에 주입합니다. 첫 번째 프롬프트를 입력하기 전에 이미 업무 파악이 완료됩니다.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 작동 방식
|
|
80
|
+
|
|
81
|
+
1. **인제스트** — 문서, URL, 또는 텍스트를 `/hypo:ingest`에 붙여넣습니다. Claude가 원본 소스를 저장하고 구조화된 페이지로 합성합니다.
|
|
82
|
+
2. **쿼리** — `/hypo:query`에 무엇이든 질문합니다. Claude가 페이지를 검색하고 `[[wikilink]]` 인용과 함께 근거 있는 답변을 합성합니다.
|
|
83
|
+
3. **세션 종료** — 세션 종료 시 Claude가 `session-state.md`(다음 작업)와 `hot.md`(완료 내용)를 업데이트하여 다음 세션이 원활하게 재개됩니다.
|
|
84
|
+
4. **복리 가치** — 시간이 지날수록 새 소스가 기존 페이지를 업데이트하며 위키가 더 촘촘하고 유용해집니다.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 위키에 저장할 것 / 저장하지 말 것
|
|
89
|
+
|
|
90
|
+
**저장할 것:**
|
|
91
|
+
- 외부 소스(문서, 논문, 강연)에서 합성된 지식
|
|
92
|
+
- 아키텍처 결정과 근거
|
|
93
|
+
- AI 행동 교정 및 선호사항
|
|
94
|
+
- git에 담기 어려운 프로젝트 컨텍스트 (이해관계자 제약, 미결 질문, 배경)
|
|
95
|
+
- 연구 결과 및 교차 소스 비교
|
|
96
|
+
|
|
97
|
+
**저장하지 말 것:**
|
|
98
|
+
- 원본 소스 자료 — `sources/`에 자동으로, 미편집 상태로 저장됨
|
|
99
|
+
- 자격증명, 토큰, 비밀 — `.hypoignore`로 민감한 경로 제외
|
|
100
|
+
- 현재 세션의 일시적 작업 목록 — 대화 내 작업 목록 사용
|
|
101
|
+
- 레포지토리에서 도출 가능한 코드 패턴 — `git log`와 `grep`이 이미 정규 소스
|
|
102
|
+
- 다른 곳에 정규 소유자가 있는 정보 (Jira 티켓, Confluence 페이지, API 문서) — 미러가 아닌 *합성본*을 인제스트
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## 명령어
|
|
107
|
+
|
|
108
|
+
| 명령어 | 설명 |
|
|
109
|
+
|--------|------|
|
|
110
|
+
| `/hypo:init` | 새 위키 설정 |
|
|
111
|
+
| `/hypo:doctor` | 상태 점검 |
|
|
112
|
+
| `/hypo:upgrade` | 훅을 최신 버전으로 업그레이드 |
|
|
113
|
+
| `/hypo:uninstall` | 훅 및 등록 정보 제거 |
|
|
114
|
+
| `/hypo:ingest` | 외부 소스를 위키에 인제스트 |
|
|
115
|
+
| `/hypo:query` | 위키 페이지에서 검색 및 답변 합성 |
|
|
116
|
+
| `/hypo:crystallize` | 초안 및 관련 페이지를 안정적 지식으로 통합 |
|
|
117
|
+
| `/hypo:resume` | 활성 프로젝트의 가장 최근 세션 재개 |
|
|
118
|
+
| `/hypo:feedback` | AI 행동 교정 사항 기록 |
|
|
119
|
+
| `/hypo:verify` | 만료되었거나 누락된 `verify_by` 필드 감사 |
|
|
120
|
+
| `/hypo:stats` | 위키 통계 표시 |
|
|
121
|
+
| `/hypo:graph` | 위키링크 의존성 그래프 생성 |
|
|
122
|
+
| `/hypo:lint` | 프론트매터 및 위키링크 유효성 검사 |
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 디렉터리 구조
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
<wiki-root>/
|
|
130
|
+
├── hypo-config.md ← 루트 마커 + 설정
|
|
131
|
+
├── index.md ← 검색 가능한 페이지 카탈로그
|
|
132
|
+
├── hot.md ← 활성 프로젝트 포인터
|
|
133
|
+
├── log.md ← 추가 전용 활동 로그
|
|
134
|
+
├── SCHEMA.md ← 타입 시스템 참조
|
|
135
|
+
├── hypo-guide.md ← 운영 가이드
|
|
136
|
+
├── .hypoignore ← 훅에서 제외할 글로브 패턴
|
|
137
|
+
├── pages/ ← 영구 지식 페이지
|
|
138
|
+
├── projects/ ← 프로젝트 아티팩트 및 세션 로그
|
|
139
|
+
└── sources/ ← 원본 인제스트 소스 (수정 금지)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## 요구 사항
|
|
145
|
+
|
|
146
|
+
- Node.js ≥ 18
|
|
147
|
+
- Claude Code CLI
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## 문서
|
|
152
|
+
|
|
153
|
+
- [ARCHITECTURE.md](docs/ARCHITECTURE.md) — 내부 구조, 컴포넌트 맵, 데이터 흐름
|
|
154
|
+
- [CONTRIBUTING.md](docs/CONTRIBUTING.md) — 개발 환경 설정, 컨벤션, PR 프로세스
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## 라이선스
|
|
159
|
+
|
|
160
|
+
MIT
|
package/README.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
English | [한국어](README.ko.md)
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Hypomnema
|
|
6
|
+
|
|
7
|
+
LLM-native personal wiki system for Claude Code.
|
|
8
|
+
|
|
9
|
+
Hypomnema turns Claude Code into a compounding knowledge base. Instead of chunking sources as-is, an LLM reads each source, synthesizes it, and updates existing pages — so new sources update knowledge more than they create it.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g hypomnema # or: npx hypomnema
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
In Claude Code, run:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
/hypo:init
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This sets up your wiki directory, installs hooks, and merges them into `~/.claude/settings.json`.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Git sync
|
|
30
|
+
|
|
31
|
+
After `/hypo:init`, your wiki directory is already a local git repository. To sync it across machines, add a remote and push:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
git -C ~/hypomnema remote add origin <your-repo-url>
|
|
35
|
+
git -C ~/hypomnema push -u origin HEAD
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The Stop hook then auto-commits and pushes your wiki at the end of every session — no manual sync needed.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Why Hypomnema
|
|
43
|
+
|
|
44
|
+
| | Hypomnema | Plain Obsidian / Notion | RAG / vector search |
|
|
45
|
+
|---|---|---|---|
|
|
46
|
+
| **Capture effort** | Paste a URL → done | Manual note-taking | Upload + embed pipeline |
|
|
47
|
+
| **Knowledge growth** | New sources update existing pages | Each note is independent | Chunks multiply indefinitely |
|
|
48
|
+
| **Retrieval** | LLM synthesizes a grounded answer | Full-text search | Nearest-neighbour chunks |
|
|
49
|
+
| **Workflow integration** | Lives inside Claude Code | Separate app / browser tab | Separate service |
|
|
50
|
+
|
|
51
|
+
Four things that set it apart:
|
|
52
|
+
|
|
53
|
+
1. **Synthesis over storage.** Claude reads each source and synthesizes it into a structured page — not a copy-paste dump. You get a knowledge base you can reason over, not a pile of bookmarks.
|
|
54
|
+
2. **Compounding pages.** When a new source overlaps an existing page, Claude updates that page. The wiki gets denser and more connected over time rather than just bigger.
|
|
55
|
+
3. **Zero-friction hooks.** Session start, session close, auto-staging, and auto-commit happen automatically through Claude Code lifecycle hooks. You never context-switch to manage the wiki.
|
|
56
|
+
4. **Native to your workflow.** No separate app, no export/import, no third-party sync service. Hypomnema runs inside the Claude Code session you already have open.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Scenarios
|
|
61
|
+
|
|
62
|
+
**A — Learning a new technology**
|
|
63
|
+
You're reading Kubernetes docs and blog posts. Drop each URL into `/hypo:ingest`. By the third article, Claude is updating your existing `kubernetes-networking.md` page rather than creating another one. A week later, `/hypo:query "how does pod CIDR allocation work?"` returns a synthesized answer citing your own notes.
|
|
64
|
+
|
|
65
|
+
**B — Tracking engineering decisions**
|
|
66
|
+
Before merging a significant change, run `/hypo:ingest` on the design doc or PR description. Claude creates an ADR-style page with context, tradeoffs, and the decision. Future `[[wikilink]]` references pull the rationale directly into any prompt that asks about it.
|
|
67
|
+
|
|
68
|
+
**C — Research accumulation**
|
|
69
|
+
You're working through papers on a topic over several weeks. Each `/hypo:ingest` run synthesizes the paper and cross-links it to related pages you already have. At any point, `/hypo:query` gives you a literature-review-style summary grounded in your own notes.
|
|
70
|
+
|
|
71
|
+
**D — Tuning AI behavior**
|
|
72
|
+
Run `/hypo:feedback` whenever Claude does something wrong or exactly right. The correction is stored in `pages/feedback/` and injected at session start, so the same mistake doesn't happen twice — across sessions, not just within one conversation.
|
|
73
|
+
|
|
74
|
+
**E — Resuming a paused project**
|
|
75
|
+
You put a project down for three weeks. At the next session start, the hook reads `projects/<name>/session-state.md` and injects "next tasks" and recent decisions directly into context. You're back up to speed before you type the first prompt.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## How it works
|
|
80
|
+
|
|
81
|
+
1. **Ingest** — drop a document, URL, or paste text into `/hypo:ingest`. Claude saves the raw source and synthesizes it into a structured page.
|
|
82
|
+
2. **Query** — ask `/hypo:query` anything. Claude searches your pages and synthesizes a grounded answer with `[[wikilink]]` citations.
|
|
83
|
+
3. **Session close** — on session end, Claude updates `session-state.md` (next tasks) and `hot.md` (what was done) so the next session resumes seamlessly.
|
|
84
|
+
4. **Compound value** — over time, new sources update existing pages rather than creating new ones. The wiki gets denser and more useful.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## What goes in your wiki
|
|
89
|
+
|
|
90
|
+
**Store here:**
|
|
91
|
+
- Synthesized knowledge from external sources (docs, papers, talks)
|
|
92
|
+
- Architecture decisions and their rationale
|
|
93
|
+
- AI behavior corrections and preferences
|
|
94
|
+
- Project context that doesn't belong in git (stakeholder constraints, open questions, background)
|
|
95
|
+
- Research findings and cross-source comparisons
|
|
96
|
+
|
|
97
|
+
**Do not store here:**
|
|
98
|
+
- Raw source material — that goes in `sources/` automatically, unedited
|
|
99
|
+
- Credentials, tokens, or secrets — use `.hypoignore` to exclude sensitive paths
|
|
100
|
+
- Transient task lists for the current session — use the task list in the conversation
|
|
101
|
+
- Code patterns derivable from the repo itself — `git log` and `grep` are already authoritative
|
|
102
|
+
- Information that has a canonical owner elsewhere (Jira tickets, Confluence pages, API docs) — ingest a *synthesis*, not a mirror
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Commands
|
|
107
|
+
|
|
108
|
+
| Command | Description |
|
|
109
|
+
|---------|-------------|
|
|
110
|
+
| `/hypo:init` | Set up a new wiki |
|
|
111
|
+
| `/hypo:doctor` | Health check |
|
|
112
|
+
| `/hypo:upgrade` | Upgrade hooks to latest version |
|
|
113
|
+
| `/hypo:uninstall` | Remove hooks and registrations |
|
|
114
|
+
| `/hypo:ingest` | Ingest an external source into the wiki |
|
|
115
|
+
| `/hypo:query` | Search and synthesize an answer from wiki pages |
|
|
116
|
+
| `/hypo:crystallize` | Consolidate drafts and related pages into stable knowledge |
|
|
117
|
+
| `/hypo:resume` | Resume the most recent session for an active project |
|
|
118
|
+
| `/hypo:feedback` | Record an AI behavior correction |
|
|
119
|
+
| `/hypo:verify` | Audit pages for overdue or missing `verify_by` fields |
|
|
120
|
+
| `/hypo:stats` | Show wiki statistics |
|
|
121
|
+
| `/hypo:graph` | Generate a wikilink dependency graph |
|
|
122
|
+
| `/hypo:lint` | Validate frontmatter and wikilinks |
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Directory layout
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
<wiki-root>/
|
|
130
|
+
├── hypo-config.md ← root marker + settings
|
|
131
|
+
├── index.md ← searchable page catalog
|
|
132
|
+
├── hot.md ← active project pointers
|
|
133
|
+
├── log.md ← append-only activity log
|
|
134
|
+
├── SCHEMA.md ← type system reference
|
|
135
|
+
├── hypo-guide.md ← operations guide
|
|
136
|
+
├── .hypoignore ← glob patterns excluded from hooks
|
|
137
|
+
├── pages/ ← permanent knowledge pages
|
|
138
|
+
├── projects/ ← project artifacts and session logs
|
|
139
|
+
└── sources/ ← raw ingested sources (never edit)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Requirements
|
|
145
|
+
|
|
146
|
+
- Node.js ≥ 18
|
|
147
|
+
- Claude Code CLI
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Docs
|
|
152
|
+
|
|
153
|
+
- [ARCHITECTURE.md](docs/ARCHITECTURE.md) — internals, component map, data flows
|
|
154
|
+
- [CONTRIBUTING.md](docs/CONTRIBUTING.md) — development setup, conventions, PR process
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## License
|
|
159
|
+
|
|
160
|
+
MIT
|
|
File without changes
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Crystallize draft notes into stable knowledge — also the session-close alias
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running `/hypo:crystallize`. This command serves two purposes:
|
|
6
|
+
|
|
7
|
+
1. **Session close** — if invoked at the end of a session, run the session-close checklist first
|
|
8
|
+
2. **Knowledge synthesis** — consolidate draft or scattered wiki pages into stable, well-linked pages
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Step 1 — Detect context
|
|
13
|
+
|
|
14
|
+
If the user invoked `/hypo:crystallize` to close a session (phrases like "세션 종료", "오늘 작업 마무리", "session close", or "wrap up"), run Steps 2–3 (session-close checklist) **before** the synthesis scan. Otherwise skip to Step 4.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Step 2 — Session-close checklist
|
|
19
|
+
|
|
20
|
+
Work through each item in order. For an explicit session-close invocation, proceed automatically without asking for confirmation on each item.
|
|
21
|
+
|
|
22
|
+
1. **session-state.md** — update `projects/<name>/session-state.md` with the next tasks list for the upcoming session (what to tackle first next time).
|
|
23
|
+
2. **hot.md (project)** — update `projects/<name>/hot.md` with a session snapshot: what changed and decisions made. Keep under 500 words. Do not put next-step tasks here; those belong in session-state.md.
|
|
24
|
+
3. **hot.md (root)** — update `<hypo-root>/hot.md` active-projects pointer table: set the `Last Session` date for this project to today.
|
|
25
|
+
4. **session-log** — append a session entry to `projects/<name>/session-log/YYYY-MM.md` (create the file if it does not exist for this month).
|
|
26
|
+
5. **open-questions** — only if `pages/open-questions.md` exists and questions were raised or resolved this session: move resolved ones out; add newly raised ones. Skip if unchanged.
|
|
27
|
+
6. **log.md** — append a `session` entry to `<hypo-root>/log.md`.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Step 3 — Session-close confirmation
|
|
32
|
+
|
|
33
|
+
After completing the checklist, report:
|
|
34
|
+
|
|
35
|
+
- ✓ session-state.md updated
|
|
36
|
+
- ✓ hot.md (project + root) updated
|
|
37
|
+
- ✓ session-log entry appended
|
|
38
|
+
- ✓ open-questions updated (or skipped if unchanged)
|
|
39
|
+
- ✓ log.md updated
|
|
40
|
+
|
|
41
|
+
Then ask: "Session closed. Would you like to also run knowledge synthesis now, or stop here?"
|
|
42
|
+
|
|
43
|
+
If the user says stop, end here. Otherwise continue to Step 4.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Step 4 — Surface synthesis candidates
|
|
48
|
+
|
|
49
|
+
Locate the Hypomnema package root (the directory containing this file's parent `commands/`).
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
node <package-root>/scripts/crystallize.mjs [--hypo-dir="<path>"] [--min-group=2]
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Show the output to the user. If no candidates are found, tell them Hypomnema looks well-connected and no crystallization is needed.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Step 5 — Choose what to crystallize
|
|
60
|
+
|
|
61
|
+
If candidates exist, ask:
|
|
62
|
+
|
|
63
|
+
> "Which would you like to crystallize?
|
|
64
|
+
> 1. A tag cluster (synthesize related pages into one synthesis page)
|
|
65
|
+
> 2. A draft page (upgrade to stable)
|
|
66
|
+
> 3. Unlinked pages (add cross-links)"
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Step 5a — Tag cluster synthesis
|
|
71
|
+
|
|
72
|
+
For a tag cluster:
|
|
73
|
+
|
|
74
|
+
1. Read all pages in the cluster
|
|
75
|
+
2. Create `pages/syntheses/<topic>.md` with `type: synthesis`
|
|
76
|
+
3. Frontmatter:
|
|
77
|
+
```yaml
|
|
78
|
+
---
|
|
79
|
+
title: "<synthesis title>"
|
|
80
|
+
type: synthesis
|
|
81
|
+
updated: YYYY-MM-DD
|
|
82
|
+
tags: [<shared tags>]
|
|
83
|
+
confidence: high
|
|
84
|
+
---
|
|
85
|
+
```
|
|
86
|
+
4. Body: synthesize key insights across the cluster, cite each source page with `[[slug]]`
|
|
87
|
+
5. Add back-links: add `[[syntheses/<topic>]]` to each constituent page's "See also" section
|
|
88
|
+
6. Update `index.md`
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Step 5b — Draft upgrade
|
|
93
|
+
|
|
94
|
+
For a draft page:
|
|
95
|
+
|
|
96
|
+
1. Read the draft
|
|
97
|
+
2. Fill in any missing sections, improve clarity, add cross-links
|
|
98
|
+
3. Change `tags: [draft]` → remove `draft` tag, set `confidence: high`
|
|
99
|
+
4. Update `updated:` to today
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Step 5c — Cross-link unlinked pages
|
|
104
|
+
|
|
105
|
+
For unlinked pages:
|
|
106
|
+
|
|
107
|
+
1. Read each unlinked page
|
|
108
|
+
2. Search the wiki for related pages (run `/hypo:query` mentally on the page title/tags)
|
|
109
|
+
3. Add a `## See also` section with `[[slug]]` links to 2–3 related pages
|
|
110
|
+
4. Reciprocally add links back where natural
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Step 6 — Report
|
|
115
|
+
|
|
116
|
+
Show what was created or modified, and offer to run `/hypo:lint` to verify all new links resolve.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Health check for a Hypomnema wiki installation
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running `/hypo:doctor`. Verify the health of the current Hypomnema wiki installation.
|
|
6
|
+
|
|
7
|
+
## What this checks
|
|
8
|
+
|
|
9
|
+
- Wiki root directory exists and has `hypo-config.md` marker
|
|
10
|
+
- Required subdirectories and baseline files are present
|
|
11
|
+
- Claude Code hook files are installed in `~/.claude/hooks/`
|
|
12
|
+
- `~/.claude/settings.json` contains all required hook registrations
|
|
13
|
+
- Git repository and remote origin are configured
|
|
14
|
+
- No broken `[[wiki-link]]` references
|
|
15
|
+
- No overdue or missing `verify_by` fields on tracked pages
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Step 1 — Locate package root and resolve Hypomnema directory
|
|
20
|
+
|
|
21
|
+
Locate the Hypomnema package root (the directory containing this file's parent `commands/`).
|
|
22
|
+
|
|
23
|
+
If the user specified a Hypomnema directory, pass it as `--hypo-dir="<path>"`. Otherwise omit the flag and the script resolves the Hypomnema root automatically: `HYPO_DIR` env → `hypo-config.md` scan → `~/hypomnema` default.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Step 2 — Run the doctor script
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
node <package-root>/scripts/doctor.mjs [--hypo-dir="<path>"] [--json]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- `--hypo-dir=<path>` — override Hypomnema root (takes precedence over `HYPO_DIR` env and auto-scan)
|
|
34
|
+
- `--json` — output results as a JSON array (useful for programmatic use)
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Step 3 — Report results
|
|
39
|
+
|
|
40
|
+
Show the script output verbatim. Each line is prefixed with:
|
|
41
|
+
- `✓` — check passed
|
|
42
|
+
- `⚠` — warning (not blocking, but worth fixing)
|
|
43
|
+
- `✗` — failure (installation is broken)
|
|
44
|
+
|
|
45
|
+
Then show the summary line: `Result: N passed, N warnings, N failed`
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Step 4 — Recommend fixes
|
|
50
|
+
|
|
51
|
+
For any `✗` failures:
|
|
52
|
+
- Missing Hypomnema root or required directories/files → run `/hypo:init`.
|
|
53
|
+
- 0 hook files installed → run `/hypo:init`.
|
|
54
|
+
- 0 hook registrations in settings.json → run `/hypo:init`.
|
|
55
|
+
|
|
56
|
+
For `⚠` warnings:
|
|
57
|
+
- Missing `hypo-config.md` → run `/hypo:init` — it creates the config marker.
|
|
58
|
+
- Missing baseline files (`index.md`, `hot.md`, etc.) → run `/hypo:init`.
|
|
59
|
+
- Partial hook files (some missing) → run `/hypo:init` to install missing hooks.
|
|
60
|
+
- Partial settings.json registrations → run `/hypo:init` to merge missing entries.
|
|
61
|
+
- Missing git remote → `git -C <hypo-dir> remote add origin <url>`.
|
|
62
|
+
- Broken `[[links]]` → list the affected files and ask if the user wants to fix them now.
|
|
63
|
+
- Overdue `verify_by_date` → offer to open the affected pages for review.
|
|
64
|
+
- Missing `verify_by` question → suggest adding a `verify_by` field to the listed pages.
|
|
65
|
+
|
|
66
|
+
If all checks passed, tell the user Hypomnema is healthy and ready to use.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Record an AI behavior correction or preference into the wiki
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running `/hypo:feedback`. Capture a behavior correction or preference into `pages/feedback/` for future sessions.
|
|
6
|
+
|
|
7
|
+
## What this does
|
|
8
|
+
|
|
9
|
+
- Creates or updates `pages/feedback/<topic>.md` with a dated entry
|
|
10
|
+
- Appends a reference to `log.md`
|
|
11
|
+
- Ensures the feedback is findable in future sessions
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Step 1 — Gather feedback details
|
|
16
|
+
|
|
17
|
+
If the user did not provide them, ask:
|
|
18
|
+
|
|
19
|
+
1. **Topic** (slug): "What topic does this feedback apply to? (e.g. `response-length`, `commit-style`, `code-comments`)"
|
|
20
|
+
2. **Rule**: "State the rule or correction in one or two sentences."
|
|
21
|
+
3. **Why** (optional): "What was the reason or incident that prompted this?"
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Step 2 — List existing feedback (optional)
|
|
26
|
+
|
|
27
|
+
To check for an existing topic, locate the Hypomnema package root and run:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
node <package-root>/scripts/feedback.mjs --list [--hypo-dir="<path>"]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If a matching topic exists, confirm with the user whether to append to it or create a new one.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Step 3 — Write the feedback entry
|
|
38
|
+
|
|
39
|
+
Compose the entry text. Format:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
**Rule**: <one-line rule>
|
|
43
|
+
|
|
44
|
+
**Why**: <reason or incident>
|
|
45
|
+
|
|
46
|
+
**How to apply**: <when this kicks in>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Then run:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
node <package-root>/scripts/feedback.mjs \
|
|
53
|
+
--topic="<slug>" \
|
|
54
|
+
--entry="<formatted entry text>" \
|
|
55
|
+
[--hypo-dir="<path>"] \
|
|
56
|
+
[--dry-run]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Run with `--dry-run` first to preview, then without it to write.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Step 4 — Confirm and cross-reference
|
|
64
|
+
|
|
65
|
+
After writing:
|
|
66
|
+
- Tell the user: "Saved to `pages/feedback/<topic>.md`."
|
|
67
|
+
- If this feedback should also update the project's `session-state.md` or the user's CLAUDE.md `<learned_behaviors>`, ask: "Should I also add this to your CLAUDE.md learned behaviors?"
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate a wikilink dependency graph for the wiki
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
You are running `/hypo:graph`. Generate a link dependency graph from wiki pages.
|
|
6
|
+
|
|
7
|
+
## What this does
|
|
8
|
+
|
|
9
|
+
- Scans `pages/` and `projects/` for all `.md` files
|
|
10
|
+
- Extracts `[[wikilink]]` references between pages
|
|
11
|
+
- Outputs an adjacency graph in JSON, Mermaid, or DOT format
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Step 1 — Locate package root
|
|
16
|
+
|
|
17
|
+
Locate the Hypomnema package root (the directory containing this file's parent `commands/`).
|
|
18
|
+
|
|
19
|
+
If the user specified a Hypomnema directory, pass it as `--hypo-dir="<path>"`. Otherwise omit the flag.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Step 2 — Run the graph script
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
node <package-root>/scripts/graph.mjs \
|
|
27
|
+
[--hypo-dir="<path>"] \
|
|
28
|
+
[--format=json|mermaid|dot] \
|
|
29
|
+
[--min-edges=<n>]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Options:
|
|
33
|
+
- `--format=json` (default) — adjacency list with in/out degree counts
|
|
34
|
+
- `--format=mermaid` — Mermaid `graph TD` diagram (paste into a Markdown code block)
|
|
35
|
+
- `--format=dot` — Graphviz DOT format
|
|
36
|
+
- `--min-edges=<n>` — only include nodes with at least N total edges
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Step 3 — Present results
|
|
41
|
+
|
|
42
|
+
- For **JSON**: summarise the top 10 most-connected nodes (highest in+out degree), then offer to show the full output.
|
|
43
|
+
- For **Mermaid**: wrap the output in a `\`\`\`mermaid` code block so it renders in the chat.
|
|
44
|
+
- For **DOT**: show the raw output and suggest pasting it into a Graphviz renderer.
|
|
45
|
+
|
|
46
|
+
If `--min-edges` was not specified and there are more than 50 nodes, suggest re-running with `--min-edges=2` to focus on well-connected pages.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Step 4 — Insights
|
|
51
|
+
|
|
52
|
+
After displaying results, offer one or two observations:
|
|
53
|
+
- Pages with high in-degree are hub pages — consider linking to them from new pages.
|
|
54
|
+
- Pages with zero edges are isolated — suggest adding cross-links or running `/hypo:crystallize`.
|