hypomnema 1.3.1 → 1.3.3

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.
Files changed (65) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/README.ko.md +11 -10
  4. package/README.md +11 -10
  5. package/commands/audit.md +1 -1
  6. package/commands/crystallize.md +11 -11
  7. package/commands/doctor.md +1 -1
  8. package/commands/feedback.md +2 -2
  9. package/commands/graph.md +1 -1
  10. package/commands/ingest.md +1 -1
  11. package/commands/init.md +1 -1
  12. package/commands/lint.md +1 -1
  13. package/commands/query.md +1 -1
  14. package/commands/rename.md +79 -0
  15. package/commands/resume.md +2 -2
  16. package/commands/stats.md +1 -1
  17. package/commands/uninstall.md +1 -1
  18. package/commands/upgrade.md +1 -1
  19. package/commands/verify.md +1 -1
  20. package/docs/ARCHITECTURE.md +3 -3
  21. package/docs/CONTRIBUTING.md +2 -2
  22. package/hooks/hypo-auto-commit.mjs +8 -24
  23. package/hooks/hypo-auto-minimal-crystallize.mjs +57 -11
  24. package/hooks/hypo-compact-guard.mjs +6 -3
  25. package/hooks/hypo-cwd-change.mjs +1 -1
  26. package/hooks/hypo-first-prompt.mjs +2 -2
  27. package/hooks/hypo-hot-rebuild.mjs +14 -1
  28. package/hooks/hypo-personal-check.mjs +91 -179
  29. package/hooks/hypo-pre-commit.mjs +1 -1
  30. package/hooks/hypo-session-end.mjs +1 -1
  31. package/hooks/hypo-session-start.mjs +7 -7
  32. package/hooks/hypo-shared.mjs +1082 -89
  33. package/hooks/hypo-web-fetch-ingest.mjs +2 -2
  34. package/hooks/version-check-fetch.mjs +2 -8
  35. package/hooks/version-check.mjs +18 -0
  36. package/package.json +3 -2
  37. package/scripts/check-tracker-ids.mjs +329 -0
  38. package/scripts/crystallize.mjs +322 -110
  39. package/scripts/doctor.mjs +6 -9
  40. package/scripts/feedback-sync.mjs +1 -1
  41. package/scripts/init.mjs +1 -1
  42. package/scripts/install-git-hooks.mjs +75 -40
  43. package/scripts/lib/check-tracker-ids.mjs +140 -0
  44. package/scripts/lib/design-history-stale.mjs +59 -14
  45. package/scripts/lib/extensions.mjs +4 -4
  46. package/scripts/lib/fix-manifest.mjs +2 -2
  47. package/scripts/lib/fix-status-verify.mjs +5 -4
  48. package/scripts/lib/plugin-detect.mjs +15 -6
  49. package/scripts/lib/project-create.mjs +1 -1
  50. package/scripts/lint.mjs +63 -8
  51. package/scripts/rename.mjs +836 -0
  52. package/scripts/resume.mjs +75 -19
  53. package/scripts/uninstall.mjs +1 -1
  54. package/scripts/upgrade.mjs +26 -25
  55. package/skills/crystallize/SKILL.md +12 -9
  56. package/skills/graph/SKILL.md +1 -1
  57. package/skills/ingest/SKILL.md +1 -1
  58. package/skills/lint/SKILL.md +1 -1
  59. package/skills/query/SKILL.md +1 -1
  60. package/skills/verify/SKILL.md +1 -1
  61. package/templates/SCHEMA.md +2 -2
  62. package/templates/hypo-config.md +2 -2
  63. package/templates/hypo-guide.md +22 -1
  64. package/templates/hypo-help.md +1 -0
  65. package/templates/projects/_template/index.md +1 -1
@@ -8,10 +8,10 @@
8
8
  },
9
9
  "plugins": [
10
10
  {
11
- "name": "hypomnema",
11
+ "name": "hypo",
12
12
  "source": "./",
13
13
  "description": "LLM-native personal wiki — session-aware knowledge base for Claude Code",
14
- "version": "1.3.1",
14
+ "version": "1.3.3",
15
15
  "homepage": "https://github.com/sk-lim19f/Hypomnema"
16
16
  }
17
17
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "hypomnema",
3
- "version": "1.3.1",
2
+ "name": "hypo",
3
+ "version": "1.3.3",
4
4
  "description": "LLM-native personal wiki system — session-aware knowledge base for Claude Code",
5
5
  "author": {
6
6
  "name": "sk-lim19f",
package/README.ko.md CHANGED
@@ -24,14 +24,14 @@ _Claude에게 기록을 맡기세요 — 그리고 그 기록이 실제로 쌓
24
24
  > **아래에서 자주 쓰이는 용어 간단 정리.** *프런트매터(frontmatter)* = 마크다운 파일 맨 위의 YAML 블록. *위키링크(wikilink)* = `[[페이지-슬러그]]` 형태의 교차 참조. *ADR* = "Architecture Decision Record" — 어떤 설계 결정을 *왜* 했는지 짧게 적은 마크다운 페이지. *projection*(투영) = 한 방향 자동 파생(`pages/feedback/*.md` → `MEMORY.md` / `<learned_behaviors>`). *훅(hook)* = Claude Code가 라이프사이클 이벤트에서 자동으로 실행하는 스크립트. *hot.md* / *session-state.md* = "방금 무엇을 했는지"와 "다음에 무엇을 할지"를 담는 프로젝트별 캐시 파일 — 멈춘 프로젝트를 한 번에 이어 받을 수 있게 합니다. 전체 용어 풀이는 [용어 사전](#용어-사전) 참조.
25
25
 
26
26
  > **현재 자동화 범위와 다음 목표.** v1.3.0(현재)은 트리거 모델을 솔직하게 정리합니다. 위키 작업(자료 정리·검색·세션 마무리)은 여전히 사용자가 `/hypo:*` 명령어를 직접 입력해 시작합니다. 다만 **v1.1.0**부터 위키가 한 세션에서 얼마나 활용됐는지를 측정하는 *관측성 지표(observability score)* 가 들어갔고, **v1.2.0**은 그 위에 사용자가 시키지 않아도 자동으로 동작하는 영역 4개를 추가했습니다:
27
- > - **`feedback` 페이지를 단일 원천(source of truth)으로**(ADR 0031) — `pages/feedback/`에 한 번만 적으면, 위키가 `MEMORY.md`와 `~/.claude/CLAUDE.md`의 `<learned_behaviors>` 블록을 자동으로 갱신합니다.
28
- > - **확장 파일 동봉 동기화**(ADR 0024) — 위키 안의 `~/hypomnema/extensions/{agents,commands,hooks,skills}/`에 둔 파일을 자동으로 `~/.claude/`에 반영합니다. `--codex` 옵션을 추가하면 `hooks`·`commands`는 `~/.codex/`에도 반영되지만, `agents`와 `skills`는 Claude 전용이라 의도적으로 건너뜁니다.
29
- > - **프로젝트 자동 생성**(ADR 0023) — 작업 디렉터리를 git 저장소(`package.json`·`Cargo.toml` 등의 프로젝트 표식이 있는 곳)로 옮겼을 때 대응하는 위키 프로젝트가 없으면, 새로 만들지 물어봅니다.
30
- > - **세션 종료 자동 정리와 `/clear` 복구**(ADR 0022) — 의미 있는 세션이 끝날 때 "마무리 메모를 짧게 남길까요?"가 자동으로 뜨고, 마무리하지 않은 채 `/clear`를 입력해도 다음 세션 시작 시 이어서 정리할 수 있습니다.
27
+ > - **`feedback` 페이지를 단일 원천(source of truth)으로** — `pages/feedback/`에 한 번만 적으면, 위키가 `MEMORY.md`와 `~/.claude/CLAUDE.md`의 `<learned_behaviors>` 블록을 자동으로 갱신합니다.
28
+ > - **확장 파일 동봉 동기화** — 위키 안의 `~/hypomnema/extensions/{agents,commands,hooks,skills}/`에 둔 파일을 자동으로 `~/.claude/`에 반영합니다. `--codex` 옵션을 추가하면 `hooks`·`commands`는 `~/.codex/`에도 반영되지만, `agents`와 `skills`는 Claude 전용이라 의도적으로 건너뜁니다.
29
+ > - **프로젝트 자동 생성** — 작업 디렉터리를 git 저장소(`package.json`·`Cargo.toml` 등의 프로젝트 표식이 있는 곳)로 옮겼을 때 대응하는 위키 프로젝트가 없으면, 새로 만들지 물어봅니다.
30
+ > - **세션 종료 자동 정리와 `/clear` 복구** — 의미 있는 세션이 끝날 때 "마무리 메모를 짧게 남길까요?"가 자동으로 뜨고, 마무리하지 않은 채 `/clear`를 입력해도 다음 세션 시작 시 이어서 정리할 수 있습니다.
31
31
  >
32
32
  > 스키마(`SCHEMA.md`)는 2.0으로 올라갑니다. `feedback` 페이지 타입에 9개의 필수 항목이 추가되며, `hypomnema upgrade --apply`를 실행하면 위키 루트에 `MIGRATION-v2.0.md`가 생성되어 단계별 보강 체크리스트를 제공합니다. 사용자가 직접 편집한 `SCHEMA.md`는 upgrade가 **덮어쓰지 않습니다** — 안내만 표시하고, 실제 반영은 사용자가 수동으로 결정합니다(이 정책을 코드에서는 *Option C*로 부릅니다).
33
33
  >
34
- > **v1.3.0**은 자율성을 넓히기보다 이 레이어를 다듬습니다. 세션 마무리 흐름에 *권고형* 성찰 4가지(자동 실행 없이 제안만 — ADR 0029)가 들어가고, `hypomnema lint --strict`가 선택된 경고를 에러로 승격해 릴리스 게이트로 쓸 수 있으며, 설치가 **stale-sibling 감지**로 단단해집니다 — `$PATH`에 남은 더 오래된 `hypomnema`가 더는 활성 훅을 조용히 다운그레이드하지 못합니다(ADR 0038).
34
+ > **v1.3.0**은 자율성을 넓히기보다 이 레이어를 다듬습니다. 세션 마무리 흐름에 *권고형* 성찰 4가지(자동 실행 없이 제안만)가 들어가고, `hypomnema lint --strict`가 선택된 경고를 에러로 승격해 릴리스 게이트로 쓸 수 있으며, 설치가 **stale-sibling 감지**로 단단해집니다 — `$PATH`에 남은 더 오래된 `hypomnema`가 더는 활성 훅을 조용히 다운그레이드하지 못합니다.
35
35
 
36
36
  ---
37
37
 
@@ -45,7 +45,7 @@ Claude Code 안에서:
45
45
 
46
46
  ```
47
47
  /plugin marketplace add sk-lim19f/Hypomnema
48
- /plugin install hypomnema@hypomnema
48
+ /plugin install hypo@hypomnema
49
49
  /hypo:init
50
50
  ```
51
51
 
@@ -225,6 +225,7 @@ v1.0에서는 `personal / shared / public` 3-mode를 만들었습니다. 현실
225
225
  | `/hypo:verify` | `verify_by` 프런트매터가 붙은 페이지를 점검 | 시간이 지나 옛 정보가 됐을 가능성이 있을 때 |
226
226
  | `/hypo:lint` | frontmatter, 위키링크, 스키마 검증 | 커밋 전, CI에서 |
227
227
  | `/hypo:graph` | 위키링크 의존성 그래프 생성 | 구조적 성장을 보고 싶을 때 |
228
+ | `/hypo:rename` | 페이지·디렉터리 이름 변경 + 인바운드 `[[위키링크]]` 갱신 | 페이지나 프로젝트 폴더 이름을 바꿀 때 |
228
229
 
229
230
  ### 라이프사이클 훅 (14개)
230
231
 
@@ -240,16 +241,16 @@ v1.0에서는 `personal / shared / public` 3-mode를 만들었습니다. 현실
240
241
  | `hypo-auto-commit.mjs` | `Stop` | 자동 commit + pull + push |
241
242
  | `hypo-hot-rebuild.mjs` | `Stop` | `hot.md` 재생성 |
242
243
  | `hypo-personal-check.mjs` | `PreCompact` | lint 실패 / session-close 미완 시 compact 차단 |
243
- | `hypo-session-end.mjs` | `SessionEnd` | SessionEnd 마커 기록 — 다음 SessionStart가 `source=clear` 복구를 감지하기 위함 (ADR 0022) |
244
+ | `hypo-session-end.mjs` | `SessionEnd` | SessionEnd 마커 기록 — 다음 SessionStart가 `source=clear` 복구를 감지하기 위함 |
244
245
  | `hypo-session-record.mjs` | `Stop` | observability 점수 + auto-resume 신호용 세션 메타데이터 기록 |
245
- | `hypo-auto-minimal-crystallize.mjs` | `Stop` | 단순하지 않은 세션이 끝났을 때 `/hypo:crystallize --apply-session-close --minimal`을 자동 제안 (사용자가 동의하면 실행, ADR 0022 Layer 3) |
246
+ | `hypo-auto-minimal-crystallize.mjs` | `Stop` | 단순하지 않은 세션이 끝났을 때 `/hypo:crystallize --apply-session-close --minimal`을 자동 제안 (사용자가 동의하면 실행) |
246
247
  | `hypo-web-fetch-ingest.mjs` | `PostToolUse(WebFetch/WebSearch)` | WebFetch/WebSearch 완료 후 `additionalContext`에 `/hypo:ingest` 권유 안내 주입 (privacy 보호: WebFetch URL의 query/hash/userinfo 제거) |
247
248
 
248
249
  모든 훅은 위키 루트를 `HYPO_DIR` 환경변수 → `hypo-config.md` 스캔 → `~/hypomnema` 기본값 순으로 해결하며, `hypo-shared.mjs`(`hooks.json`의 `shared` 필드로 선언)를 공유합니다.
249
250
 
250
251
  이와 별도로 `SessionStart` 훅은 npm 레지스트리와 Claude Code 플러그인 마켓플레이스를 백그라운드에서 확인합니다(세션 시작을 막지 않습니다). 새 버전이 게시되어 있으면 다음 세션 시작 시 "Update available!" 안내가 한 줄 표시됩니다. `HYPO_NO_UPDATE_CHECK=1`, `NO_UPDATE_NOTIFIER=1`을 지정하거나 `CI=true` 환경에서 실행하면 점검을 건너뜁니다.
251
252
 
252
- 위 네 가지 레인 외의 v1.3 세부 수정 — 세션 마무리 lint를 건드린 파일로 스코프해 무관한 debt로 `/compact`가 막히지 않게 한 변경(ADR 0037), `feedback` scope 검증기가 cwd 유래 project id를 수용하게 한 수정(OQ-34), `--strict`가 에러로 승격하는 안정적 lint 경고 ID `W1`/`W2`/`W4`(`--fix`로 자동복구되는 `W3`는 경고로 유지) — 은 [`CHANGELOG.md`](CHANGELOG.md)를 참고하세요.
253
+ 위 네 가지 레인 외의 v1.3 세부 수정 — 세션 마무리 lint를 건드린 파일로 스코프해 무관한 debt로 `/compact`가 막히지 않게 한 변경, `feedback` scope 검증기가 cwd 유래 project id를 수용하게 한 수정, `--strict`가 에러로 승격하는 안정적 lint 경고 ID `W1`/`W2`/`W4`(`--fix`로 자동복구되는 `W3`는 경고로 유지) — 은 [`CHANGELOG.md`](CHANGELOG.md)를 참고하세요. **v1.3.1**은 수정 전용 패치입니다: 업데이트 notifier 배너가 이제 보이지 않던 stderr 출력 대신 top-level `systemMessage` 채널로 실제 사용자에게 도달하고, `/hypo:upgrade`가 플러그인·dual(수동+플러그인) 설치에서 core 훅을 중복 등록하지 않으며, 세션 마무리가 두 프로젝트가 같은 최신 날짜를 가질 때 완료된 close를 false-block 하지 않습니다. **v1.3.2**는 비-프로젝트(툴링·위키 전용) 세션을 무관한 프로젝트에 엮지 않고 닫는 1급 log-only close 경로와, 페이지 이름을 바꿀 때 해당하는 인바운드 위키링크를 갱신하는 `rename` 헬퍼를 추가합니다(모호하거나 append-only인 참조는 갱신하지 않고 보고합니다). 또한 세션 마무리 게이트(오늘 활동한 모든 프로젝트를 게이트, 세션별 마커와 `/compact`가 하나의 게이트를 공유, 도출 가능한 루트 `log.md` 항목 자동 도출)와 linter(`--json`이 파이프에서 잘리지 않음, 볼트 관습 위키링크를 오탐 대신 정상 해석)를 수정합니다. **v1.3.3**은 세션 마무리 게이트를 실수 발동에 대해 단단히 합니다: 모델이 실제 사용자 종료 신호 없이 세션을 닫을 수 없고, 종료 관련 텍스트를 읽는 것이 턴을 false-block하지 않으며, `--apply-session-close`가 사용자 종료 신호가 있는 close에서 payload 커밋과 마커 기록을 한 번에 끝내고, 일상적 트래커 bookkeeping이 무관한 프로젝트의 `/compact`를 cross-block하지 않습니다. 또한 `rename`을 디렉터리 서브트리 전체 이동으로 확장합니다(`/hypo:rename` 커맨드와 대상 경로가 이미 있을 때의 merge/renumber 충돌 리포트 포함).
253
254
 
254
255
  ### 셋업 & 유지보수
255
256
 
@@ -348,7 +349,7 @@ Claude가 잘못한 순간 — 또는 반대로 정확히 잘한 순간 — `/hy
348
349
 
349
350
  > **모델 사업자에게 전송되는 범위 안내.** Hypomnema 훅은 위키 본문을 Claude Code의 추가 컨텍스트(`additionalContext`)에 실어 보내며, 이 내용은 프롬프트의 일부로 Claude 모델 사업자에게 전송됩니다. 따라서 `.hypoignore`에 등록된 경로는 모든 주입 훅(`hypo-file-watch`, `hypo-session-start`, `hypo-cwd-change`, `hypo-lookup`)과 `ingest`에서 제외되지만, 등록되지 *않은* 파일은 전송 대상이 됩니다. (`hypo-auto-stage`/`hypo-auto-commit`은 git 스테이징용 훅이라 컨텍스트를 주입하지는 않지만, 스테이징 판단에도 동일하게 `.hypoignore`를 참고합니다.) 비밀 정보는 위키에 두지 마시고, `HYPO_DIR` 아래에 민감한 내용을 저장하기 전에 `.hypoignore` 패턴을 먼저 점검하시기 바랍니다.
350
351
 
351
- > **git sync 범위.** Hypomnema는 `~/hypomnema/` 위키 자체만 git sync합니다. 단, `init` / `upgrade`는 `~/.claude/` 내부의 관리 대상 영역 — Hypomnema 자체 hook(`~/.claude/hooks/`), 슬래시 커맨드(`~/.claude/commands/hypo/`), `settings.json` 등록 — 을 설치·SHA 추적하며, v1.2.0 **extensions companion sync**(ADR 0024)에 의해 위키의 `~/hypomnema/extensions/`에 둔 `agents/`·`commands/`·`hooks/`·`skills/`도 자동 미러링합니다(`--codex` 옵션 시 `hooks`·`commands` 부분 집합만 `~/.codex/`로). 이 관리 대상 영역 *바깥*의 `~/.claude/` 콘텐츠는 의도적으로 Hypomnema가 **관리하지 않습니다** — 위키를 거치지 않는 기타 agent/skill, 머신 고유 `settings.local.json` 등 일반적인 Claude Code 설정 기기 간 동기화는 [chezmoi](https://www.chezmoi.io/) 같은 별도 dotfiles 매니저 사용을 권장합니다.
352
+ > **git sync 범위.** Hypomnema는 `~/hypomnema/` 위키 자체만 git sync합니다. 단, `init` / `upgrade`는 `~/.claude/` 내부의 관리 대상 영역 — Hypomnema 자체 hook(`~/.claude/hooks/`), 슬래시 커맨드(`~/.claude/commands/hypo/`), `settings.json` 등록 — 을 설치·SHA 추적하며, v1.2.0 **extensions companion sync**에 의해 위키의 `~/hypomnema/extensions/`에 둔 `agents/`·`commands/`·`hooks/`·`skills/`도 자동 미러링합니다(`--codex` 옵션 시 `hooks`·`commands` 부분 집합만 `~/.codex/`로). 이 관리 대상 영역 *바깥*의 `~/.claude/` 콘텐츠는 의도적으로 Hypomnema가 **관리하지 않습니다** — 위키를 거치지 않는 기타 agent/skill, 머신 고유 `settings.local.json` 등 일반적인 Claude Code 설정 기기 간 동기화는 [chezmoi](https://www.chezmoi.io/) 같은 별도 dotfiles 매니저 사용을 권장합니다.
352
353
 
353
354
  ### `/hypo:*` 커맨드는 어디서 오는가?
354
355
 
package/README.md CHANGED
@@ -24,14 +24,14 @@ _Make Claude take notes — and measure whether it actually does._
24
24
  > **Quick decoder for terms used below.** *frontmatter* = the YAML block at the top of a markdown file; *wikilink* = a `[[page-slug]]` cross-reference; *ADR* = "Architecture Decision Record", a short markdown page that records *why* a design choice was made; *projection* = a one-way derive (`pages/feedback/*.md` → `MEMORY.md` / `<learned_behaviors>`); *hook* = a script that Claude Code runs automatically on lifecycle events; *hot.md* / *session-state.md* = the per-project cache files that hold "what just happened" and "what's next" so a paused project resumes in one read. Full glossary lives under [Term decoder](#term-decoder).
25
25
 
26
26
  > **Current state vs. v2 vision.** v1.3.0 (today) is honest about its trigger model: most wiki behavior — ingest, query, session-close — still fires on **explicit `/hypo:*` commands**, but the auto-behavior surface is growing. The v2 thesis is *fully autonomous* — Claude reading, writing, and synthesizing the wiki without being asked. **v1.1.0** shipped the **observability score** that measures how often the wiki is actually used per session (ingest / query / session-close / citation rates). **v1.2.0** adds four load-bearing autonomous lanes on top:
27
- > - **feedback-as-SoT with one-way projections** — `pages/feedback/` becomes the single source-of-truth (SoT) for behavior corrections; the wiki one-way derives `MEMORY.md` and the `<learned_behaviors>` block inside `~/.claude/CLAUDE.md`, so you edit one place and the projections refresh on their own (ADR 0031 — full design rationale lives in `projects/hypomnema/decisions/0031-*.md` inside your wiki).
28
- > - **extensions companion sync** — anything you drop under `~/hypomnema/extensions/{agents,commands,hooks,skills}/` is mirrored into `~/.claude/` automatically; the optional `--codex` flag additionally mirrors `hooks` and `commands` into `~/.codex/` (agents/skills are Claude-only and skipped on the Codex target by design) (ADR 0024).
29
- > - **auto-project creation on cwd match** — when you `cd` into a git repo with a project marker (`package.json`, `Cargo.toml`, etc.) and no matching wiki project exists, Hypomnema offers to scaffold one for you (ADR 0023).
30
- > - **Stop-chain auto-minimal-crystallize + `/clear` recovery** — non-trivial sessions get an automatic "save a minimal session-close note?" prompt; `/clear` after a forgotten close is detected and recovered cleanly (ADR 0022).
27
+ > - **feedback-as-SoT with one-way projections** — `pages/feedback/` becomes the single source-of-truth (SoT) for behavior corrections; the wiki one-way derives `MEMORY.md` and the `<learned_behaviors>` block inside `~/.claude/CLAUDE.md`, so you edit one place and the projections refresh on their own.
28
+ > - **extensions companion sync** — anything you drop under `~/hypomnema/extensions/{agents,commands,hooks,skills}/` is mirrored into `~/.claude/` automatically; the optional `--codex` flag additionally mirrors `hooks` and `commands` into `~/.codex/` (agents/skills are Claude-only and skipped on the Codex target by design).
29
+ > - **auto-project creation on cwd match** — when you `cd` into a git repo with a project marker (`package.json`, `Cargo.toml`, etc.) and no matching wiki project exists, Hypomnema offers to scaffold one for you.
30
+ > - **Stop-chain auto-minimal-crystallize + `/clear` recovery** — non-trivial sessions get an automatic "save a minimal session-close note?" prompt; `/clear` after a forgotten close is detected and recovered cleanly.
31
31
  >
32
32
  > The schema (`SCHEMA.md`) bumps to 2.0 — the `feedback` page type now requires 9 mandatory frontmatter fields. `hypomnema upgrade --apply` writes `MIGRATION-v2.0.md` into the wiki root with a step-by-step backfill checklist. Your own `SCHEMA.md` is **never overwritten** by upgrade — we call this policy *Option C*: the upgrade only tells you what changed, and you apply the diff yourself.
33
33
  >
34
- > **v1.3.0** refines this layer rather than expanding autonomy: the session-close flow gains four *advisory* reflections (they suggest, never auto-act — ADR 0029), `hypomnema lint --strict` promotes selected warnings to errors for release gates, and install hardens with **stale-sibling detection** — an older `hypomnema` on `$PATH` can no longer silently downgrade your active hooks (ADR 0038).
34
+ > **v1.3.0** refines this layer rather than expanding autonomy: the session-close flow gains four *advisory* reflections (they suggest, never auto-act), `hypomnema lint --strict` promotes selected warnings to errors for release gates, and install hardens with **stale-sibling detection** — an older `hypomnema` on `$PATH` can no longer silently downgrade your active hooks.
35
35
 
36
36
  ---
37
37
 
@@ -45,7 +45,7 @@ Inside Claude Code:
45
45
 
46
46
  ```
47
47
  /plugin marketplace add sk-lim19f/Hypomnema
48
- /plugin install hypomnema@hypomnema
48
+ /plugin install hypo@hypomnema
49
49
  /hypo:init
50
50
  ```
51
51
 
@@ -225,6 +225,7 @@ Eight commands cover the full capture → retrieval → consolidation cycle.
225
225
  | `/hypo:verify` | Audits pages with `verify_by` frontmatter | When time-bound knowledge might have aged out |
226
226
  | `/hypo:lint` | Validates frontmatter, wikilinks, schema | Before commits, in CI |
227
227
  | `/hypo:graph` | Generates a wikilink dependency graph | When you want to see structural growth |
228
+ | `/hypo:rename` | Renames a page or directory and rewrites inbound `[[wikilinks]]` | When a page or project folder needs a new name |
228
229
 
229
230
  ### Lifecycle hooks (14)
230
231
 
@@ -240,16 +241,16 @@ Eight commands cover the full capture → retrieval → consolidation cycle.
240
241
  | `hypo-auto-commit.mjs` | `Stop` | Auto commit + pull + push |
241
242
  | `hypo-hot-rebuild.mjs` | `Stop` | Rebuild `hot.md` |
242
243
  | `hypo-personal-check.mjs` | `PreCompact` | Block compact on lint failures or unfinished session-close |
243
- | `hypo-session-end.mjs` | `SessionEnd` | Write a SessionEnd marker so SessionStart can detect `source=clear` recovery (ADR 0022) |
244
+ | `hypo-session-end.mjs` | `SessionEnd` | Write a SessionEnd marker so SessionStart can detect `source=clear` recovery |
244
245
  | `hypo-session-record.mjs` | `Stop` | Record session metadata for the observability score and auto-resume signaling |
245
- | `hypo-auto-minimal-crystallize.mjs` | `Stop` | Offer (and on consent run) `/hypo:crystallize --apply-session-close --minimal` after non-trivial sessions (ADR 0022 Layer 3) |
246
+ | `hypo-auto-minimal-crystallize.mjs` | `Stop` | Offer (and on consent run) `/hypo:crystallize --apply-session-close --minimal` after non-trivial sessions |
246
247
  | `hypo-web-fetch-ingest.mjs` | `PostToolUse(WebFetch/WebSearch)` | Inject a `/hypo:ingest` nudge into `additionalContext` after a URL resolution (privacy-aware: redacts query/hash/userinfo) |
247
248
 
248
249
  All hooks resolve the wiki root via `HYPO_DIR` env → `hypo-config.md` scan → `~/hypomnema` default, and share `hypo-shared.mjs` (declared via `hooks.json`'s `shared` field).
249
250
 
250
251
  Additionally, the `SessionStart` hook performs a non-blocking background check against npm and the Claude Code plugin marketplace and prints an "Update available!" banner the next time a newer Hypomnema version has been published. Opt out with `HYPO_NO_UPDATE_CHECK=1`, `NO_UPDATE_NOTIFIER=1`, or by running under `CI=true`.
251
252
 
252
- For fix-level v1.3 detail beyond the lanes above — session-close lint scoped to touched files so `/compact` is no longer blocked by unrelated debt (ADR 0037), the `feedback` scope validator accepting cwd-derived project ids (OQ-34), and the stable lint warning IDs `W1`/`W2`/`W4` that `--strict` promotes to errors (while `W3`, auto-repaired by `--fix`, stays a warning) — see [`CHANGELOG.md`](CHANGELOG.md).
253
+ For fix-level v1.3 detail beyond the lanes above — session-close lint scoped to touched files so `/compact` is no longer blocked by unrelated debt, the `feedback` scope validator accepting cwd-derived project ids, and the stable lint warning IDs `W1`/`W2`/`W4` that `--strict` promotes to errors (while `W3`, auto-repaired by `--fix`, stays a warning) — see [`CHANGELOG.md`](CHANGELOG.md). **v1.3.1** is a fixes-only patch: update-notifier banners now actually reach the user via the top-level `systemMessage` channel instead of an invisible stderr write, `/hypo:upgrade` no longer double-registers core hooks for plugin or dual (manual + plugin) installs, and session-close no longer false-blocks a completed close when two projects share the latest date. **v1.3.2** adds a first-class log-only session-close path, so a non-project (tooling or wiki-only) session closes cleanly without being forced onto an unrelated project, plus a `rename` helper that rewrites the eligible inbound wikilinks when you rename a page (ambiguous or append-only references are reported, not rewritten). It also tightens the session-close gate (every project with activity today is gated, the per-session marker and `/compact` share one gate, and the derivable root `log.md` entry auto-derives) and the linter (`--json` no longer truncates on a pipe, and vault-convention wikilinks resolve instead of being false-flagged). **v1.3.3** hardens the session-close gate against accidental triggers: the model can no longer mark a session closed without a real user close signal, reading close-related text no longer false-blocks the turn, `--apply-session-close` commits its payload and writes the marker in one step on a close that carries a user close signal, and routine tracker bookkeeping no longer cross-blocks an unrelated project's `/compact`. It also extends `rename` to move a whole directory subtree (with a `/hypo:rename` command and a merge/renumber collision report when a destination already exists).
253
254
 
254
255
  ### Setup & maintenance
255
256
 
@@ -348,7 +349,7 @@ Place a `hypo-config.md` at the wiki root to make it portable across machines wi
348
349
 
349
350
  > **Provider transmission disclaimer.** Hypomnema hooks emit wiki content into Claude Code's `additionalContext`, which is transmitted to the Claude model provider as part of the prompt. `.hypoignore` is enforced at every content-injection hook (`hypo-file-watch`, `hypo-session-start`, `hypo-cwd-change`, `hypo-lookup`) and at `ingest`, but any file *not* matched by `.hypoignore` is fair game for transmission. (`hypo-auto-stage` and `hypo-auto-commit` are git-staging hooks, not injection points, and also honor `.hypoignore` for their staging decisions.) Keep secrets out of the wiki, and review `.hypoignore` patterns before storing anything sensitive under `HYPO_DIR`.
350
351
 
351
- > **Scope of git sync.** Hypomnema git-syncs only the `~/hypomnema/` wiki itself. `init` / `upgrade` actively install and SHA-track a defined surface inside `~/.claude/` — Hypomnema's own hooks (`~/.claude/hooks/`), slash commands (`~/.claude/commands/hypo/`), and `settings.json` registrations — plus, via v1.2.0 **extensions companion sync** (ADR 0024), any `agents/` · `commands/` · `hooks/` · `skills/` you ship inside `~/hypomnema/extensions/` (and with `--codex`, the `hooks` + `commands` subset into `~/.codex/`). Anything *outside* that defined surface in `~/.claude/` is intentionally **not** managed by Hypomnema — for general cross-machine sync of Claude Code configuration (other agents/skills not staged via the wiki, machine-specific `settings.local.json`, etc.), the recommended pattern is still a separate dotfiles manager such as [chezmoi](https://www.chezmoi.io/).
352
+ > **Scope of git sync.** Hypomnema git-syncs only the `~/hypomnema/` wiki itself. `init` / `upgrade` actively install and SHA-track a defined surface inside `~/.claude/` — Hypomnema's own hooks (`~/.claude/hooks/`), slash commands (`~/.claude/commands/hypo/`), and `settings.json` registrations — plus, via v1.2.0 **extensions companion sync**, any `agents/` · `commands/` · `hooks/` · `skills/` you ship inside `~/hypomnema/extensions/` (and with `--codex`, the `hooks` + `commands` subset into `~/.codex/`). Anything *outside* that defined surface in `~/.claude/` is intentionally **not** managed by Hypomnema — for general cross-machine sync of Claude Code configuration (other agents/skills not staged via the wiki, machine-specific `settings.local.json`, etc.), the recommended pattern is still a separate dotfiles manager such as [chezmoi](https://www.chezmoi.io/).
352
353
 
353
354
  ### Where do `/hypo:*` commands live?
354
355
 
package/commands/audit.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Run the observability audit on recent sessions and (optionally) write the weekly report
2
+ description: Audit recent sessions for observability gaps and optionally write the weekly report. Use when the user asks to review session quality, find tracking gaps, or generate the weekly summary.
3
3
  ---
4
4
 
5
5
  You are running `/hypo:audit`. Inspect recent Claude Code sessions to see how much of the wiki's value motion is actually happening (search, ingest, citation, feedback), then either show the result inline or write a weekly observability page.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Crystallize draft notes into stable knowledge also the session-close alias
2
+ description: Crystallize draft notes into stable wiki knowledge; also the session-close path. Use when the user explicitly signals session end (종료/마무리/wrap up), asks to save or consolidate notes, or before a /compact. Task completion alone is not a close signal.
3
3
  ---
4
4
 
5
5
  You are running `/hypo:crystallize`. This command serves two purposes:
@@ -11,7 +11,7 @@ You are running `/hypo:crystallize`. This command serves two purposes:
11
11
 
12
12
  ## Step 1 — Detect context
13
13
 
14
- If the user invoked `/hypo:crystallize` to close a session (phrases like "세션 종료", "오늘 작업 마무리", "session close", or "wrap up"), run Step 1a (advisory reflections) then Steps 2–4 (session-close mechanical apply + recovery) **before** the synthesis scan. Otherwise skip to Step 5.
14
+ If `/hypo:crystallize` was invoked to close a session (via an explicit close signal like "세션 종료" / "오늘 작업 마무리" / "session close" / "wrap up", an accepted proactive-offer [세션 마무리], or `/compact`), run Step 1a (advisory reflections) then Steps 2–4 (session-close mechanical apply + recovery) **before** the synthesis scan. Task completion alone does not put you in close mode. Otherwise skip to Step 5.
15
15
 
16
16
  ---
17
17
 
@@ -20,8 +20,8 @@ If the user invoked `/hypo:crystallize` to close a session (phrases like "세션
20
20
  Before composing the payload (Step 2), run these four reflections and surface each to the user. Every one is **advisory** (ADR 0029 identity guard) — the user confirms or declines, and none performs an automatic action, writes a file on its own, or bypasses the mandatory gate.
21
21
 
22
22
  1. **Trivial-session check (#44)** — Was this session trivial (a single bug fix, a single-file edit, or Q&A with no durable artifact)? If so, recommend skipping session-close: *"이 세션은 trivial해 보입니다 — session-close를 건너뛸까요?"* and proceed only if the user wants a close. A trivial skip is a recommendation, **not** a bypass: it must not mark the session closed, must not run `--mark-session-closed`, and must not claim `/compact` can pass. Any real close still requires all 5 mandatory files.
23
- 2. **ADR-candidate check (#41)** — Did this session make an architectural or design decision (a new pattern, a tradeoff chosen, a convention established)? If yes, ask whether it warrants an ADR and, if so, capture that intent in the `sessionLog` entry you compose in Step 2. If nothing rose to ADR level, record `ADR 없음 — <one-line reason>` in that same `sessionLog` entry. **Never auto-write an ADR file** — recording the decision (or its absence) in the session-log payload is the only action here.
24
- 3. **design-history staleness check (#42)** — If `projects/<name>/design-history.md` exists and this session changed design decisions it does not yet reflect, recommend updating it (the W8 lint warning flags this mechanically; an active-project W8 can also block at PreCompact). If the file does not exist, skip silently — do **not** create it just for this check. Never auto-update it.
23
+ 2. **ADR-candidate check (#41)** — Did this session make an architectural or design decision (a new pattern, a tradeoff chosen, a convention established)? If yes, ask whether it warrants an ADR and, if so, capture that intent in the `sessionLog` entry you compose in Step 2. If nothing rose to ADR level, you may record `ADR 없음 — <one-line reason>` in that same `sessionLog` entry — but gate it on #42's bar: the marker is machine-read and W8 excludes an entry carrying `ADR 없음` (with no ADR reference) from the design-history staleness check. Write it only when the session had **no design change at all**; a sub-ADR design shift takes #42a (append) instead, since the marker would suppress the W8 nudge it needs. **Never auto-write an ADR file** — recording the decision (or its absence) in the session-log payload is the only action here.
24
+ 3. **design-history staleness check (#42)** — Two branches, so a stale W8 never blocks a clean close: (a) if this session changed design decisions `projects/<name>/design-history.md` does not yet reflect including sub-ADR background / tradeoff / differentiation shifts — recommend appending now (the W8 lint warning flags this mechanically; an active-project W8 hard-blocks at PreCompact append before you commit). (b) only if the session made **no** design change does the `ADR 없음` marker (#41) exempt the entry from W8; do not touch design-history. `ADR 없음` means "no design change," a stricter bar than "no ADR-level decision." If the file does not exist, skip silently — do **not** create it just for this check. Never auto-update it.
25
25
  4. **Ingest check (#43)** — Did this session consume trustworthy external knowledge (a fetched URL, official docs, or code you verified directly)? If so, recommend running `/hypo:ingest` to capture it under `sources/`. Proceed only on the user's confirmation.
26
26
 
27
27
  These are judgment calls; when uncertain, surface the question rather than skip it. None of the four blocks the close or writes on its own.
@@ -30,7 +30,7 @@ These are judgment calls; when uncertain, surface the question rather than skip
30
30
 
31
31
  ## Step 2 — Compose the session-close payload
32
32
 
33
- The session-close path is **payload-driven** (fix #38). Instead of writing the 5 mandatory files one-by-one, you compose a single JSON payload that describes the full session-close state, then hand it to `crystallize.mjs --apply-session-close`, which performs idempotent atomic writes and gates the result with lint.
33
+ The session-close path is **payload-driven**. Instead of writing the 5 mandatory files one-by-one, you compose a single JSON payload that describes the full session-close state, then hand it to `crystallize.mjs --apply-session-close`, which performs idempotent atomic writes and gates the result with lint.
34
34
 
35
35
  Payload shape (5 required + 1 conditional, per Spec §5.2.7 / §8.3 + ADR 0029):
36
36
 
@@ -41,7 +41,7 @@ Payload shape (5 required + 1 conditional, per Spec §5.2.7 / §8.3 + ADR 0029):
41
41
  "sessionState": { "content": "<full body of projects/<name>/session-state.md>" },
42
42
  "projectHot": { "content": "<full body of projects/<name>/hot.md>" },
43
43
  "rootHot": { "content": "<full body of <hypo-root>/hot.md>" },
44
- "sessionLog": { "entry": "<entry to append to projects/<name>/session-log/YYYY-MM.md>" },
44
+ "sessionLog": { "entry": "<entry to append to projects/<name>/session-log/YYYY-MM-DD.md (daily shard)>" },
45
45
  "log": { "entry": "<entry to append to <hypo-root>/log.md>" },
46
46
  "openQuestions": { "content": "<full body of pages/open-questions.md>" }
47
47
  }
@@ -67,7 +67,7 @@ Content guidance for each slot:
67
67
  1. **sessionState** — next tasks list for the upcoming session (what to tackle first next time).
68
68
  2. **projectHot** — session snapshot under 500 words: what changed and decisions made. Do **not** put next-step tasks here; those belong in `sessionState`.
69
69
  3. **rootHot** — active-projects pointer table with this project's `Last Session` date set to today.
70
- 4. **sessionLog** — one session entry to append to `projects/<name>/session-log/YYYY-MM.md`.
70
+ 4. **sessionLog** — one session entry to append to `projects/<name>/session-log/YYYY-MM-DD.md` (daily shard).
71
71
  5. **log** — one `session` entry to append to `<hypo-root>/log.md`.
72
72
  6. **openQuestions** (conditional) — only if `pages/open-questions.md` exists and questions were raised or resolved this session.
73
73
 
@@ -84,7 +84,7 @@ node <package-root>/scripts/crystallize.mjs \
84
84
  --json
85
85
  ```
86
86
 
87
- **`--session-id` (fix #27 PR-C):** pass the current session's id whenever you
87
+ **`--session-id`:** pass the current session's id whenever you
88
88
  know it — most importantly when this close was triggered by a `[WIKI_AUTOCLOSE]`
89
89
  Stop-hook block (the block reason prints the exact `--session-id` to use). On a
90
90
  verified close (`ok: true` + clean git tree), it writes the per-session marker
@@ -93,7 +93,7 @@ Stop-chain Layer 3 hook (`hypo-auto-minimal-crystallize`) the session is closed,
93
93
  so it stops re-prompting. Omit it only when running crystallize purely for
94
94
  synthesis (no session-close intent) — the marker is then simply not written.
95
95
 
96
- **Behavior (fix #39 option D + fix #40 lint gates):**
96
+ **Behavior (option D + lint gates):**
97
97
 
98
98
  | Invocation | Behavior |
99
99
  |---|---|
@@ -102,14 +102,14 @@ synthesis (no session-close intent) — the marker is then simply not written.
102
102
  | `--apply-session-close --payload=<path> --session-id=<id>` | Same as above, **plus** writes the per-session closed marker on success (clean git required). The Stop-chain Layer 3 path. |
103
103
  | `--apply-session-close --force` | Skips the probe early-exit. `--payload` still required for any actual apply work. |
104
104
 
105
- **Two lint gates run automatically (fix #40), scoped to the files this close writes:**
105
+ **Two lint gates run automatically, scoped to the files this close writes:**
106
106
 
107
107
  Both gates judge only the **payload files** (the 5 mandatory close files + `open-questions.md`). Lint debt in other projects or shared `pages/` this close did not author is reported as a non-blocking `notices[]` entry, never gated — so an unrelated broken page elsewhere cannot block your close.
108
108
 
109
109
  1. **Preflight** — `lint.mjs --json` runs **before** any payload bytes are written. Errors in overwrite targets (sessionState / projectHot / rootHot / openQuestions) are filtered (about to be replaced). Errors in an **append target** (session-log / log.md) still block (appending can't repair existing corruption) → exit 1 with `stage='preflight-lint'`. Errors outside the payload files → `notices[]`, apply proceeds.
110
110
  2. **Post-apply** — lint re-runs after the writes. Blocks only on **errors** in payload files (a payload-introduced malformed body / bad frontmatter); pre-existing errors elsewhere → `notices[]`. A lint crash (unparseable output) always blocks. Broken wikilinks are lint **warnings** (W4 — forward references to planned pages are normal) and are not gated here. Surfaces as `stage='post-apply-lint'` (or `'post-apply-verification+lint'` if freshness also fails).
111
111
 
112
- > **Manual close (direct Write tool calls)** clears the Stop-chain block via `--mark-session-closed --session-id=<id>`. Pass `--transcript-path=<path>` (the Stop hook surfaces it in its block message) so the marker is refused when a file **this session edited** still has lint errorskeeping the marker coherent with the PreCompact gate. Without `--transcript-path` it falls back to freshness + clean-git only (lint left to PreCompact).
112
+ > **Manual close (direct Write tool calls)** clears the Stop-chain block via `--mark-session-closed --session-id=<id>`. Both marker writers apply a **user-close hard gate** (ADR 0055): the marker is written only when the session's transcript carries a genuine user close signal — an NL close phrase, a `/compact`, or an accepted AskUserQuestion [세션 마무리] answer. The transcript is resolved **strictly from `--session-id`** (a globally-unique id, globbed under `~/.claude/projects/`), never from a CLI arg, so a model that runs the writer on its own without the user ever signalling close — is refused, and a forged path cannot point the gate at someone else's close-intent. The lint scope is widened from that same resolved transcript. `--transcript-path` is **not** consulted by the marker gate; it survives only to scope `--check-session-close`'s lint (which writes no marker).
113
113
 
114
114
  ---
115
115
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Health check for a Hypomnema wiki installation
2
+ description: Run a health check on a Hypomnema wiki installation (hooks, settings, structure). Use when the user reports the wiki misbehaving, after an install or upgrade, or to diagnose setup problems.
3
3
  ---
4
4
 
5
5
  You are running `/hypo:doctor`. Verify the health of the current Hypomnema wiki installation.
@@ -1,8 +1,8 @@
1
1
  ---
2
- description: Record an AI behavior correction or preference into the wiki
2
+ description: Record an AI behavior correction or preference into the wiki. Use when the user corrects how you work or states a lasting preference to remember.
3
3
  ---
4
4
 
5
- You are running `/hypo:feedback`. Capture a behavior correction or preference into `pages/feedback/` — the **single source of truth** for learned behaviors (ADR 0031 / fix #37).
5
+ You are running `/hypo:feedback`. Capture a behavior correction or preference into `pages/feedback/` — the **single source of truth** for learned behaviors (ADR 0031).
6
6
 
7
7
  ## What this does
8
8
 
package/commands/graph.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Generate a wikilink dependency graph for the wiki
2
+ description: Generate a wikilink dependency graph from wiki pages (json, mermaid, or dot). Use when the user asks to visualize wiki structure or find orphan and hub pages.
3
3
  ---
4
4
 
5
5
  You are running `/hypo:graph`. Generate a link dependency graph from wiki pages.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Ingest an external source into the wiki
2
+ description: Ingest an external source (URL, doc, article, command output) into the wiki as a citable page. Use when the user shares a source to capture or wants external knowledge saved for reuse.
3
3
  ---
4
4
 
5
5
  You are running `/hypo:ingest`. Save a raw source and synthesize it into wiki pages.
package/commands/init.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Initialize a new Hypomnema wiki
2
+ description: Initialize a new Hypomnema wiki (structure, config, hooks). Use when the user is setting up a wiki for the first time or starting a fresh vault.
3
3
  ---
4
4
 
5
5
  You are running `/hypo:init`. Set up a new personal wiki powered by Hypomnema.
package/commands/lint.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Validate wiki pages for frontmatter correctness and broken wikilinks
2
+ description: Validate wiki pages for frontmatter correctness and broken wikilinks. Use when the user asks to check wiki health, before a commit, or after bulk edits or renames.
3
3
  ---
4
4
 
5
5
  You are running `/hypo:lint`. Validate all wiki pages for frontmatter correctness and broken `[[wikilink]]` references.
package/commands/query.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Query the wiki and synthesize an answer from relevant pages
2
+ description: Query the wiki and synthesize an answer from the relevant pages. Use when the user asks what the wiki knows, wants to recall a past decision, or needs prior context before starting work.
3
3
  ---
4
4
 
5
5
  You are running `/hypo:query`. Answer a question by searching the wiki and synthesizing from relevant pages.
@@ -0,0 +1,79 @@
1
+ ---
2
+ description: Rename a wiki page or directory and rewrite the inbound wikilinks so live links survive. Use when the user wants to move or rename a page or folder without breaking references.
3
+ ---
4
+
5
+ You are running `/hypo:rename`. Move a page or directory and content-aware rewrite every inbound `[[wikilink]]` across the vault so the rename never breaks a link.
6
+
7
+ ## What this does
8
+
9
+ - Resolves `--from` to a page (`.md`) or a directory
10
+ - Page mode: moves the single page, rewrites every inbound `[[old]]` / `[[old|alias]]` / `[[old#anchor]]` / `[[dir/old]]` that resolves unambiguously to it
11
+ - Directory mode: relocates the whole subtree (carrying non-`.md` assets) and rewrites inbound full-slug and dir-relative links for every moved page
12
+ - Skips append-only time records (journal / session-log / weekly / archive / postmortems / root `log.md`) and immutable `sources/*` as link sources
13
+ - Reports ambiguous bare links it refuses to auto-rewrite, and refuses a merge/renumber into an existing destination
14
+
15
+ ---
16
+
17
+ ## Step 1 — Locate package root
18
+
19
+ Locate the Hypomnema package root (the directory containing this file's parent `commands/`).
20
+
21
+ If the user specified a Hypomnema directory, pass it as `--hypo-dir="<path>"`. Otherwise omit the flag.
22
+
23
+ ---
24
+
25
+ ## Step 2 — Dry-run first
26
+
27
+ Always run the dry-run (no `--apply`) before writing anything:
28
+
29
+ ```bash
30
+ node <package-root>/scripts/rename.mjs \
31
+ [--hypo-dir="<path>"] \
32
+ --from=<slug|rel|dir> \
33
+ --to=<slug|rel|dir> \
34
+ [--json]
35
+ ```
36
+
37
+ Options:
38
+ - `--from` — the page slug / relative path, OR an existing directory to relocate
39
+ - `--to` — the new name. A bare name renames in place within the same directory; a path with `/` moves across directories. For a directory `--from`, `--to` must be a fresh (non-existing) directory in the same top-level area
40
+ - `--json` — machine-readable result (recommended so you can present a precise summary)
41
+ - `--apply` — perform the move + rewrites (Step 4)
42
+
43
+ ---
44
+
45
+ ## Step 3 — Present the dry-run result
46
+
47
+ From the JSON, report:
48
+ - `from` → `to`, and for directory mode `pages_moved`
49
+ - `links_rewritten` across `files_rewritten` files — list the `from`→`to` per file
50
+ - `ambiguous` — any bare links shared by more than one page that were NOT rewritten. Tell the user to resolve these manually (use a dir-relative or full-slug form)
51
+
52
+ If the result is `ok: false`:
53
+ - `reason: "renumber-or-merge"` — the destination directory already exists. List `destination_collisions` and explain this is a merge/renumber: resolve manually, then retry into a fresh directory.
54
+ - `reason: "form-collision"` — the move would create ambiguous link forms. List `form_collisions`.
55
+ - Any other error — surface the `error` message verbatim.
56
+
57
+ ---
58
+
59
+ ## Step 4 — Apply
60
+
61
+ Once the user confirms the dry-run looks right, re-run with `--apply`:
62
+
63
+ ```bash
64
+ node <package-root>/scripts/rename.mjs \
65
+ [--hypo-dir="<path>"] \
66
+ --from=<slug|rel|dir> \
67
+ --to=<slug|rel|dir> \
68
+ --apply --json
69
+ ```
70
+
71
+ Then confirm: the page/subtree moved, `links_rewritten` applied, and any `ambiguous` links still pending manual fixup.
72
+
73
+ ---
74
+
75
+ ## Notes
76
+
77
+ - Directory mode rewrites a relocated time-record's intra-subtree links as `[[new|old]]`, preserving the rendered historical label while pointing at the live page.
78
+ - Bare `[[name]]` links to a moved page are intentionally left untouched in directory mode: a directory rename does not change basenames, so they keep resolving.
79
+ - After a large rename, run `/hypo:lint` to confirm no broken links remain.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Resume the most recent session for an active project
2
+ description: Resume an active project and pick up where you left off. Use when the user asks to continue prior work or what they were working on.
3
3
  ---
4
4
 
5
5
  You are running `/hypo:resume`. Load the session state for an active project and pick up where you left off.
@@ -20,7 +20,7 @@ If the user named a project in the command invocation, use that. Otherwise, loca
20
20
  node <package-root>/scripts/resume.mjs [--hypo-dir="<path>"] [--project=<name>]
21
21
  ```
22
22
 
23
- The script will resolve the most recently active project from `hot.md` if `--project` is omitted.
23
+ When `--project` is omitted, the script prefers the project whose `working_dir` contains the current directory (cwd-first); if nothing under the current directory matches, it falls back to the most recently active project from `hot.md`.
24
24
 
25
25
  ---
26
26
 
package/commands/stats.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Show statistics about the wiki
2
+ description: Show statistics about the wiki (page counts, link density, growth). Use when the user asks how big the wiki is, how it has grown, or its overall shape.
3
3
  ---
4
4
 
5
5
  You are running `/hypo:stats`. Display a summary of wiki health and activity.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Remove Hypomnema hooks and clean up settings.json
2
+ description: Remove Hypomnema hooks and clean up settings.json. Use when the user wants to uninstall or disable the wiki integration.
3
3
  ---
4
4
 
5
5
  You are running `/hypo:uninstall`. Remove Hypomnema from this machine.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Check for Hypomnema updates and optionally apply them
2
+ description: Check for Hypomnema updates and optionally apply them. Use when the user asks to update Hypomnema or sees an update-available notice.
3
3
  ---
4
4
 
5
5
  You are running `/hypo:upgrade`. Check if the installed Hypomnema wiki is out of date and offer to apply updates.
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Check verify_by fields and surface overdue or missing verifications
2
+ description: Check verify_by fields and surface overdue or missing verifications. Use when the user asks what wiki knowledge needs re-checking or wants to audit freshness.
3
3
  ---
4
4
 
5
5
  You are running `/hypo:verify`. Audit wiki pages for overdue or missing `verify_by` fields.
@@ -80,7 +80,7 @@ The synthesis-heavy commands (`ingest`, `query`, `crystallize`, `lint`, `verify`
80
80
 
81
81
  ## Agent Skills
82
82
 
83
- `skills/<name>/SKILL.md` follows the Claude Agent Skills convention (per ADR `decisions/0001` in the wiki). When a conversation matches the skill's description, Claude auto-loads it without needing the slash command.
83
+ `skills/<name>/SKILL.md` follows the Claude Agent Skills convention. When a conversation matches the skill's description, Claude auto-loads it without needing the slash command.
84
84
 
85
85
  > v1.0 originally planned flat `skills/*.md` files; v1.1 switched to `<name>/SKILL.md` for compatibility with the official Agent Skills loader.
86
86
 
@@ -179,7 +179,7 @@ Helpers used by command scripts only. Not deployed to hooks.
179
179
  │ ├── hot.md ← project-level current state
180
180
  │ ├── session-state.md ← next tasks + last session summary
181
181
  │ └── session-log/
182
- │ └── YYYY-MM.md ← append-only monthly session log
182
+ │ └── YYYY-MM-DD.md ← append-only daily session-log shard
183
183
  ├── journal/
184
184
  │ ├── daily/
185
185
  │ ├── weekly/
@@ -331,7 +331,7 @@ scripts/weekly-report.mjs ← aggregated weekly autonomy score
331
331
  journal/weekly/<YYYY-Www>.md ← committed report (heuristic v0, spec §6.4 SoT)
332
332
  ```
333
333
 
334
- ### Transcript dual-source (ADR 0019)
334
+ ### Transcript dual-source
335
335
 
336
336
  `session-audit.mjs` reads transcripts from two locations, in priority order:
337
337
 
@@ -142,7 +142,7 @@ npm run fix:verify # Phase 1 of learned_behavior #6 — verifies fix #N status c
142
142
  When a test verifies behavior tied to a numbered fix in the wiki spec, add an anchor immediately above the `suite(...)` or `test(...)` call:
143
143
 
144
144
  ```js
145
- // @fix #25: replay-compact-guard-detects-slash-clear: /clear with incomplete wiki → WIKI_AUTOCLOSE
145
+ // @fix #N: replay-compact-guard-detects-slash-clear: /clear with incomplete wiki → WIKI_AUTOCLOSE
146
146
  test('replay-compact-guard-detects-slash-clear: /clear with incomplete wiki → WIKI_AUTOCLOSE', () => { ... });
147
147
  ```
148
148
 
@@ -317,7 +317,7 @@ Major bumps must include an `upgrade.mjs` migration fixture in `tests/runner.mjs
317
317
  These documents live in the maintainer's personal wiki, not in this repo:
318
318
 
319
319
  - `~/hypomnema/projects/hypomnema/prd-v1.1.md` — current product requirements
320
- - `~/hypomnema/projects/hypomnema/decisions/0001..0014.md` — architecture decision records
320
+ - `~/hypomnema/projects/hypomnema/decisions/*.md` — architecture decision records
321
321
  - `~/hypomnema/projects/hypomnema/design-history.md` — narrative design history
322
322
  - `~/hypomnema/projects/hypomnema/backlog-v1.0.md` — historical gap analysis (archived)
323
323
  - `~/hypomnema/projects/hypomnema/test-cases-v1.0.md` — historical QA spec (archived)
@@ -6,8 +6,7 @@
6
6
  */
7
7
 
8
8
  import { spawnSync } from 'child_process';
9
- import { HYPO_DIR, loadHypoIgnore, isIgnored, appendSyncFailure } from './hypo-shared.mjs';
10
- import { join } from 'path';
9
+ import { HYPO_DIR, appendSyncFailure, commitWikiChanges } from './hypo-shared.mjs';
11
10
 
12
11
  function git(...args) {
13
12
  return spawnSync('git', ['-C', HYPO_DIR, ...args], { encoding: 'utf-8', timeout: 30000 });
@@ -18,28 +17,13 @@ function hasRemote() {
18
17
  return (r.stdout || '').trim().length > 0;
19
18
  }
20
19
 
21
- // `.hypoignore` is the project privacy boundary. `git add -A` ignores it, so
22
- // enumerate changed paths, drop ignored ones, then stage explicitly.
23
- const ignorePatterns = loadHypoIgnore(HYPO_DIR);
24
- const porcelain = git('status', '--porcelain', '-uall');
25
- const paths = [];
26
- for (const line of (porcelain.stdout || '').split('\n')) {
27
- if (!line) continue;
28
- const file = line.slice(3).replace(/^"|"$/g, '').split(' -> ').pop().trim();
29
- if (!file) continue;
30
- if (ignorePatterns.length > 0 && isIgnored(join(HYPO_DIR, file), HYPO_DIR, ignorePatterns))
31
- continue;
32
- paths.push(file);
33
- }
34
- if (paths.length > 0) git('add', '--', ...paths);
35
- const staged = git('diff', '--cached', '--name-only').stdout?.trim() || '';
36
- if (staged) {
37
- const today = new Date().toISOString().slice(0, 10);
38
- const commit = git('commit', '-m', `auto: ${today} wiki update`);
39
- if (commit.status !== 0) {
40
- console.log(JSON.stringify({ continue: true, suppressOutput: true }));
41
- process.exit(0);
42
- }
20
+ // Stage + commit via the shared helper (same .hypoignore filter the apply path
21
+ // uses ADR 0056). A real commit failure short-circuits before sync, exactly as
22
+ // the inline logic did; "nothing to commit" is success and falls through to sync.
23
+ const result = commitWikiChanges(HYPO_DIR);
24
+ if (!result.committed) {
25
+ console.log(JSON.stringify({ continue: true, suppressOutput: true }));
26
+ process.exit(0);
43
27
  }
44
28
 
45
29
  if (hasRemote()) {