llm-wiki-kit 0.2.10 → 0.2.12
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/README.md +24 -9
- package/docs/concepts.md +6 -5
- package/docs/integrations/claude-code.md +3 -1
- package/docs/integrations/codex.md +3 -2
- package/docs/manual.md +132 -383
- package/docs/operations.md +4 -1
- package/package.json +12 -2
- package/src/capture-policy.js +30 -23
- package/src/cli.js +17 -2
- package/src/hook.js +15 -7
- package/src/language.js +73 -0
- package/src/live-qa.js +321 -0
- package/src/maintenance.js +13 -8
- package/src/project-state.js +20 -9
- package/src/project.js +7 -29
- package/src/templates.js +89 -82
- package/src/update-notice.js +14 -4
- package/src/wiki-lint.js +49 -0
- package/src/wiki-search.js +35 -13
package/docs/manual.md
CHANGED
|
@@ -1,36 +1,45 @@
|
|
|
1
1
|
# llm-wiki-kit Manual
|
|
2
2
|
|
|
3
|
-
`llm-wiki-kit
|
|
3
|
+
`llm-wiki-kit` is a hook-first runtime that keeps a project-local living Markdown wiki while users work normally in Codex or Claude Code.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The core rule is answer-first operation. Users should not need to remember a separate `record`, `ingest`, or maintenance command loop. Hooks inject useful context, store redacted operational evidence, and help the active agent move durable knowledge into `llm-wiki/` when it matters.
|
|
6
|
+
|
|
7
|
+
## Language Behavior
|
|
8
|
+
|
|
9
|
+
The runtime supports seamless Korean/English use:
|
|
10
|
+
|
|
11
|
+
- If the current user prompt is clearly Korean, hook-visible guidance is Korean.
|
|
12
|
+
- If the current user prompt is clearly English, hook-visible guidance is English.
|
|
13
|
+
- When there is no clear prompt language, Claude Code may use its `settings.json` `language` value when present.
|
|
14
|
+
- If no setting exists, the runtime checks local `CLAUDE.md` and `AGENTS.md` language signals.
|
|
15
|
+
- The fallback is English.
|
|
16
|
+
- Commands, paths, code identifiers, package names, API names, logs, and original error text are kept unchanged.
|
|
17
|
+
|
|
18
|
+
This is intentionally instruction-driven for both Codex and Claude Code. Claude Code may expose a language setting in some versions, but the kit does not depend on that setting being present.
|
|
6
19
|
|
|
7
20
|
## Mental Model
|
|
8
21
|
|
|
9
|
-
|
|
22
|
+
The wiki has three layers:
|
|
10
23
|
|
|
11
24
|
```text
|
|
12
25
|
raw evidence -> curated wiki -> rules and retrieval
|
|
13
26
|
```
|
|
14
27
|
|
|
15
|
-
- `raw/`:
|
|
16
|
-
- `wiki/`:
|
|
17
|
-
- `outputs/`: live Q&A,
|
|
18
|
-
- `AGENTS.md`, `CLAUDE.md`, `procedures/`:
|
|
28
|
+
- `raw/`: immutable or redacted evidence. Default hooks store small redacted event envelopes, not full transcripts.
|
|
29
|
+
- `wiki/`: curated project knowledge maintained by the agent.
|
|
30
|
+
- `outputs/`: live Q&A chunks, reports, and maintenance candidates.
|
|
31
|
+
- `AGENTS.md`, `CLAUDE.md`, and `procedures/`: instructions and operating rules for agents.
|
|
19
32
|
|
|
20
|
-
|
|
33
|
+
Chat history is temporary. Durable project knowledge belongs in repository Markdown so it survives new sessions, compaction, and different agents.
|
|
21
34
|
|
|
22
|
-
##
|
|
35
|
+
## Created Structure
|
|
23
36
|
|
|
24
|
-
|
|
37
|
+
Bootstrap or install creates:
|
|
25
38
|
|
|
26
39
|
```text
|
|
27
40
|
llm-wiki/
|
|
28
41
|
├── .kit-state.json
|
|
29
42
|
├── raw/
|
|
30
|
-
│ ├── inbox/
|
|
31
|
-
│ ├── sessions/
|
|
32
|
-
│ ├── sources/
|
|
33
|
-
│ └── assets/
|
|
34
43
|
├── wiki/
|
|
35
44
|
│ ├── index.md
|
|
36
45
|
│ ├── memory.md
|
|
@@ -50,80 +59,55 @@ llm-wiki/
|
|
|
50
59
|
└── procedures/
|
|
51
60
|
```
|
|
52
61
|
|
|
53
|
-
`wiki/memory.md
|
|
54
|
-
|
|
55
|
-
`wiki/index.md`는 wiki 전체의 navigation map이다. agent는 넓은 질문을 받으면 여기와 `memory.md`에서 시작한다.
|
|
56
|
-
|
|
57
|
-
`.kit-state.json`은 현재 project rules/templates가 어느 runtime version으로 적용되었는지 기록한다. runtime update와 project knowledge는 별개다. npm package update가 기존 wiki 내용을 덮어쓰지 않는다.
|
|
62
|
+
`wiki/memory.md` is the short hot index used in hook context. `wiki/index.md` is the navigation map. `.kit-state.json` records which runtime last applied managed templates. Runtime updates do not overwrite curated project knowledge.
|
|
58
63
|
|
|
59
64
|
## Normal Use
|
|
60
65
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
설치된 hook은 다음 일을 자동으로 수행한다.
|
|
66
|
+
Use Codex or Claude Code normally. Installed hooks:
|
|
64
67
|
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
68
|
+
- inject functional compact context at session start, instructions loaded, and prompt submit;
|
|
69
|
+
- select Korean or English hook guidance from the current user prompt and local instruction files;
|
|
70
|
+
- use `wiki/memory.md`, `wiki/index.md`, relevant wiki search, maintenance signals, update notices, and compact recovery packets;
|
|
71
|
+
- record redacted prompt/tool/result summaries in per-turn state;
|
|
72
|
+
- archive only meaningful work turns or structured decision/debugging turns into chunked `outputs/questions/YYYY-MM-DD/live-qa-001.md` files;
|
|
73
|
+
- avoid automatic `wiki/queries/` and `wiki/decisions/` promotion in the default answer-first mode;
|
|
74
|
+
- queue durable cleanup candidates only for explicit documentation requests that were not reflected in durable wiki files, or when stale turn state is recovered;
|
|
75
|
+
- refresh clearly managed rules/templates for older projects at session start;
|
|
76
|
+
- remove legacy Codex-facing `oh-my-codex:wiki`/`omx_wiki` surfaces when they reappear.
|
|
74
77
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
매번 저장 여부를 사용자가 고민해야 한다면 잘못 쓰고 있는 것이다. 답변보다 wiki maintenance가 먼저 오면 안 된다. 현재 사용자 요청을 먼저 처리하고, 오래 쓸 지식만 필요한 만큼 정리한다.
|
|
78
|
+
If wiki maintenance delays the actual answer, the workflow is being used wrong. The current user request comes first.
|
|
78
79
|
|
|
79
80
|
## Capture Modes
|
|
80
81
|
|
|
81
|
-
|
|
82
|
+
Default:
|
|
82
83
|
|
|
83
84
|
```bash
|
|
84
85
|
LLM_WIKI_KIT_CAPTURE_MODE=answer-first
|
|
85
86
|
```
|
|
86
87
|
|
|
87
|
-
`answer-first`
|
|
88
|
-
|
|
89
|
-
- 단순 Q&A나 상태 확인은 durable wiki로 승격하지 않는다.
|
|
90
|
-
- 의미 있는 작업 turn은 live Q&A archive에 남길 수 있다.
|
|
91
|
-
- explicit durable request가 빠졌을 때만 selective maintenance queue를 만든다.
|
|
92
|
-
- reusable fact는 active agent가 기존 wiki 문서에 병합한다.
|
|
88
|
+
`answer-first` keeps simple Q&A, status checks, and keyword-only replies out of durable wiki and live Q&A by default. It archives work turns with tool evidence, changed-file evidence, verification, or structured `Decision:`/`Root cause:` style conclusions. Explicit durable requests create maintenance queue candidates only when no durable wiki update is detected.
|
|
93
89
|
|
|
94
|
-
|
|
90
|
+
Deprecated compatibility mode:
|
|
95
91
|
|
|
96
92
|
```bash
|
|
97
93
|
LLM_WIKI_KIT_CAPTURE_MODE=legacy-eager
|
|
98
94
|
```
|
|
99
95
|
|
|
100
|
-
`legacy-eager
|
|
96
|
+
Use `legacy-eager` only to preserve older query/decision auto-promotion behavior.
|
|
101
97
|
|
|
102
|
-
##
|
|
98
|
+
## Install
|
|
103
99
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
### `llm-wiki manual`
|
|
107
|
-
|
|
108
|
-
이 문서를 출력한다.
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
llm-wiki manual
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
새 기능이나 명령이 추가되면 `docs/manual.md`를 함께 갱신한다. 이 문서가 CLI manual의 단일 원본이다.
|
|
115
|
-
|
|
116
|
-
### `llm-wiki install`
|
|
117
|
-
|
|
118
|
-
Codex/Claude Code hook을 설치하고 workspace를 bootstrap한다.
|
|
100
|
+
Linux/macOS:
|
|
119
101
|
|
|
120
102
|
```bash
|
|
121
|
-
|
|
103
|
+
npm install -g llm-wiki-kit@latest
|
|
122
104
|
llm-wiki install --workspace /path/to/project --profile standard
|
|
123
|
-
llm-wiki
|
|
105
|
+
llm-wiki doctor --workspace /path/to/project
|
|
124
106
|
```
|
|
125
107
|
|
|
126
|
-
|
|
108
|
+
Use `sudo npm install -g llm-wiki-kit@latest` only when the global npm prefix is root-owned. Run `llm-wiki install` as the user who owns the Codex/Claude settings.
|
|
109
|
+
|
|
110
|
+
Native Windows:
|
|
127
111
|
|
|
128
112
|
```powershell
|
|
129
113
|
npm install -g llm-wiki-kit@latest
|
|
@@ -131,396 +115,161 @@ llm-wiki install --workspace C:\path\to\project --profile standard
|
|
|
131
115
|
llm-wiki doctor --workspace C:\path\to\project
|
|
132
116
|
```
|
|
133
117
|
|
|
134
|
-
`
|
|
135
|
-
|
|
136
|
-
- context injection
|
|
137
|
-
- redacted summary recording
|
|
138
|
-
- tool call allow with storage redaction
|
|
139
|
-
- project-local `llm-wiki/` bootstrap
|
|
140
|
-
- hook entry merge
|
|
141
|
-
|
|
142
|
-
`--no-project`는 hook/bin 설치만 하고 현재 workspace bootstrap은 하지 않을 때 사용한다.
|
|
143
|
-
|
|
144
|
-
global npm package 설치 자체는 환경에 따라 `npm install -g` 또는 `sudo npm install -g`로 수행한다. hook 설정 갱신은 보통 일반 사용자 home 아래 파일을 수정하므로 `llm-wiki install`은 해당 user로 실행한다. Windows에서는 npm이 만든 `llm-wiki.cmd`를 표준 command shim으로 사용하며 Unix-style `~/.local/bin` symlink를 만들지 않는다. Codex hook에는 Windows 실행용 `commandWindows`가 함께 기록된다.
|
|
145
|
-
|
|
146
|
-
### `llm-wiki update`
|
|
118
|
+
Windows uses npm's `llm-wiki.cmd` shim. The installer writes Codex `commandWindows` hooks and Claude Code Windows-safe `node.exe <bin>` commands. Restart Codex and Claude Code after installing or updating hooks.
|
|
147
119
|
|
|
148
|
-
|
|
120
|
+
Source checkout development:
|
|
149
121
|
|
|
150
122
|
```bash
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
llm-wiki update --workspace /path/to/project --current-only
|
|
155
|
-
llm-wiki update --workspace /path/to/project --dry-run
|
|
156
|
-
llm-wiki update --workspace /path/to/search-root --timeout-ms 120000 --max-dirs 5000
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
`--check`는 network를 사용하지만 파일을 변경하지 않는다. installed version보다 registry target이 최신일 때만 update available을 보고한다.
|
|
160
|
-
|
|
161
|
-
기본 `update --workspace <search-root>`는 runtime update를 한 번 수행한 뒤, known/discovered project roots의 managed templates를 재적용한다. 기존 wiki contents는 덮어쓰지 않는다. `update`는 registry lookup, npm install, post-update, project discovery 진행 상태를 stderr에 출력한다. JSON 모드에서도 stdout은 JSON만 유지하고 progress는 stderr로 분리한다.
|
|
162
|
-
|
|
163
|
-
`--timeout-ms`는 `npm view`, `npm install -g`, internal `post-update` 같은 외부 command timeout을 지정한다. timeout 후 SIGTERM과 짧은 grace period 뒤 SIGKILL을 사용해 child process가 terminal을 계속 붙잡는 hard hang을 방지한다. `--max-dirs`는 search root 아래 project discovery가 검사할 최대 directory 수를 제한한다.
|
|
164
|
-
|
|
165
|
-
`update`는 source checkout에서 self-update하지 않는다. source checkout 개발 중에는 npm package나 local tarball로 global install한 뒤 update behavior를 테스트한다.
|
|
166
|
-
|
|
167
|
-
global npm runtime으로 설치된 경우 hook은 사용 흐름 중 cached update notice check를 수행한다. 자동 설치는 하지 않는다. 새 npm release가 감지되면 hook context에는 passive runtime update status가 들어간다. 이 block은 현재 runtime, npm registry target, 업데이트/정비 요청이 있을 때 쓸 수 있는 `llm-wiki update --workspace <project-or-search-root>` 명령을 짧게 보여주는 상태 정보다. 현재 답변을 중단하거나 업데이트 권유를 하라는 지시문이 아니다. cache는 lookup에 사용한 npm command별로 분리되어 test/fake npm 결과가 일반 hook session에 섞이지 않는다. `LLM_WIKI_KIT_UPDATE_NOTICE=0`으로 이 status block만 끌 수 있다.
|
|
168
|
-
|
|
169
|
-
### `llm-wiki post-update`
|
|
170
|
-
|
|
171
|
-
npm install 없이 현재 runtime으로 hook entries와 managed project templates를 다시 적용한다.
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
llm-wiki post-update --workspace /path/to/project
|
|
175
|
-
llm-wiki post-update --all --workspace /path/to/search-root
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
plain `npm install -g llm-wiki-kit@latest` 후 hook/template을 다시 맞출 때 사용한다.
|
|
179
|
-
|
|
180
|
-
### `llm-wiki projects`
|
|
181
|
-
|
|
182
|
-
search root 아래의 project roots를 찾고 update 상태를 요약한다.
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
llm-wiki projects --workspace /apps
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
`llm-wiki/.kit-state.json`이 있거나 older `llm-wiki/wiki/index.md`가 있는 root를 찾는다. 출력 끝에는 전체 update, current-only update, post-update command 예시가 함께 나온다.
|
|
189
|
-
|
|
190
|
-
### `llm-wiki status`
|
|
191
|
-
|
|
192
|
-
offline consistency check다.
|
|
193
|
-
|
|
194
|
-
```bash
|
|
195
|
-
llm-wiki status --workspace /path/to/project
|
|
196
|
-
llm-wiki status
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
보고 항목:
|
|
200
|
-
|
|
201
|
-
- runtime version과 install source
|
|
202
|
-
- binary path와 `PATH` command가 current runtime을 가리키는지
|
|
203
|
-
- Codex/Claude hook이 current runtime인지
|
|
204
|
-
- project applied runtime
|
|
205
|
-
- managed templates current 여부
|
|
206
|
-
- auto-updateable rules count
|
|
207
|
-
- agent cleanup이 필요한 managed-looking rules count
|
|
208
|
-
- pending maintenance count
|
|
209
|
-
|
|
210
|
-
network를 사용하지 않는다.
|
|
211
|
-
|
|
212
|
-
### `llm-wiki version`
|
|
213
|
-
|
|
214
|
-
installed runtime version만 출력한다.
|
|
215
|
-
|
|
216
|
-
```bash
|
|
217
|
-
llm-wiki version
|
|
218
|
-
llm-wiki --version
|
|
219
|
-
llm-wiki -v
|
|
123
|
+
npm install
|
|
124
|
+
./install.sh --workspace /apps --profile standard
|
|
125
|
+
node --test
|
|
220
126
|
```
|
|
221
127
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
### `llm-wiki doctor`
|
|
225
|
-
|
|
226
|
-
설치와 hook roundtrip을 진단한다.
|
|
128
|
+
Pre-publish smoke:
|
|
227
129
|
|
|
228
130
|
```bash
|
|
229
|
-
|
|
131
|
+
npm pack --pack-destination /tmp
|
|
132
|
+
npm install -g /tmp/llm-wiki-kit-<version>.tgz
|
|
133
|
+
llm-wiki install --workspace /path/to/project --profile standard
|
|
230
134
|
```
|
|
231
135
|
|
|
232
|
-
|
|
136
|
+
## Commands
|
|
233
137
|
|
|
234
|
-
-
|
|
235
|
-
- docs presence
|
|
236
|
-
- Codex/Claude command availability
|
|
237
|
-
- state directory writability
|
|
238
|
-
- hook target 상태
|
|
239
|
-
- sample hook roundtrip
|
|
240
|
-
- status summary
|
|
138
|
+
Most users should not need these during daily coding. They are for install, update, diagnostics, and agent-side maintenance.
|
|
241
139
|
|
|
242
|
-
|
|
140
|
+
- `llm-wiki manual`: print this manual.
|
|
141
|
+
- `llm-wiki install --workspace <project> --profile standard`: install hooks and bootstrap the workspace.
|
|
142
|
+
- `llm-wiki update --check --workspace <project> [--to <version-or-tag>]`: check npm without changing files.
|
|
143
|
+
- `llm-wiki update --workspace <project-or-search-root>`: update the global runtime when npm has a newer target, then reapply hooks and managed templates.
|
|
144
|
+
- `llm-wiki post-update --workspace <project> [--all]`: reapply hooks and managed templates without running npm install.
|
|
145
|
+
- `llm-wiki projects --workspace <search-root>`: list known/discovered project roots and update commands.
|
|
146
|
+
- `llm-wiki status --workspace <project>`: offline consistency report.
|
|
147
|
+
- `llm-wiki version`: print the installed runtime version.
|
|
148
|
+
- `llm-wiki doctor --workspace <project>`: installation and hook roundtrip diagnostics.
|
|
149
|
+
- `llm-wiki bootstrap --workspace <project>`: create project-local wiki structure.
|
|
150
|
+
- `llm-wiki migrate --workspace <project>`: copy legacy wiki material into the current layout.
|
|
151
|
+
- `llm-wiki context "<query>" --workspace <project>`: verbose debug view of hook context sources.
|
|
152
|
+
- `llm-wiki lint --workspace <project>`: wiki health check.
|
|
153
|
+
- `llm-wiki consolidate --workspace <project> [--dry-run]`: refresh generated blocks in `memory.md` and `index.md`.
|
|
154
|
+
- `llm-wiki maintenance --workspace <project> [--json]`: show pending durable cleanup candidates and review health.
|
|
155
|
+
- `llm-wiki archive-questions --workspace <project> [--date YYYY-MM-DD] [--dry-run]`: split old flat live Q&A files into chunks.
|
|
156
|
+
- `llm-wiki uninstall`: remove kit-managed hook entries, leaving project wiki contents intact.
|
|
243
157
|
|
|
244
|
-
|
|
158
|
+
## Update Flow
|
|
245
159
|
|
|
246
|
-
|
|
160
|
+
`llm-wiki update --check` contacts npm and reports an update only when the registry target is newer than the installed runtime.
|
|
247
161
|
|
|
248
|
-
|
|
249
|
-
llm-wiki bootstrap --workspace /path/to/project
|
|
250
|
-
```
|
|
162
|
+
`llm-wiki update`:
|
|
251
163
|
|
|
252
|
-
|
|
164
|
+
- runs `npm install -g llm-wiki-kit@<target>` only when needed;
|
|
165
|
+
- skips npm install when the installed runtime already satisfies the target;
|
|
166
|
+
- restarts into the updated binary for post-update work;
|
|
167
|
+
- reinstalls hooks without duplicating them;
|
|
168
|
+
- updates only managed project templates and policy blocks;
|
|
169
|
+
- preserves user-edited files and curated wiki contents;
|
|
170
|
+
- prints progress to stderr so JSON stdout remains parseable;
|
|
171
|
+
- supports `--timeout-ms` and `--max-dirs` for slow npm, WSL, or large search roots.
|
|
253
172
|
|
|
254
|
-
|
|
173
|
+
Installed npm runtimes also perform a cached hook-side update notice check. It never installs automatically. It only shows passive status in hook context when a newer npm release exists and the user is already working.
|
|
255
174
|
|
|
256
|
-
|
|
175
|
+
## Context And Search
|
|
257
176
|
|
|
258
|
-
|
|
259
|
-
llm-wiki migrate --workspace /path/to/project
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
older OMX/OMC/`omx_wiki/` material은 migration input일 뿐이다. 현재 project knowledge는 `llm-wiki-kit`과 `llm-wiki/` 아래에서 유지한다.
|
|
263
|
-
|
|
264
|
-
### `llm-wiki context`
|
|
265
|
-
|
|
266
|
-
hook이 사용하는 layered context source를 full debug 형태로 수동 확인한다. Codex/Claude hook은 같은 source를 functional compact context로 정제해 주입할 수 있지만, 이 CLI는 retrieval과 formatting 문제를 점검할 수 있도록 verbose debug 출력을 유지한다.
|
|
177
|
+
Hook context is compact and function-focused. The full debug form is:
|
|
267
178
|
|
|
268
179
|
```bash
|
|
269
180
|
llm-wiki context "auth architecture" --workspace /path/to/project
|
|
270
181
|
llm-wiki context "auth architecture" --workspace /path/to/project --json
|
|
271
|
-
llm-wiki context "auth architecture" --workspace /path/to/project --limit 8
|
|
272
|
-
llm-wiki context "auth architecture" --workspace /path/to/project --no-expand
|
|
182
|
+
llm-wiki context "auth architecture" --workspace /path/to/project --limit 8 --no-expand
|
|
273
183
|
llm-wiki context "auth architecture" --workspace /path/to/project --include-episodic
|
|
274
184
|
llm-wiki context "auth architecture" --workspace /path/to/project --include-archived
|
|
275
185
|
```
|
|
276
186
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
- `wiki/memory.md`
|
|
280
|
-
- `wiki/index.md`
|
|
281
|
-
- recent `wiki/log.md` excerpt
|
|
282
|
-
- MiniSearch 또는 substring fallback 결과
|
|
283
|
-
- strong match의 one-hop wikilink neighbors
|
|
284
|
-
|
|
285
|
-
기본 검색은 durable semantic/procedural page를 우선하고, episodic `wiki/queries/`, `wiki/context/`, `session-log` 계열은 숨긴다. 해당 page가 `memory_type: semantic|procedural`이고 `importance >= 4`이면 promoted durable page로 취급한다. `status: archived` 또는 `superseded_by`가 있는 page도 기본 검색에서 제외하며, 필요한 조사 때만 `--include-archived`로 복구한다. `status: stale` page는 보존하고 검색할 수 있지만 score를 낮춘다. JSON 출력에는 memory/index/hit/snippet budget metadata가 포함된다.
|
|
286
|
-
|
|
287
|
-
### `llm-wiki lint`
|
|
288
|
-
|
|
289
|
-
wiki health check를 수행한다. 파일을 수정하지 않는다.
|
|
290
|
-
|
|
291
|
-
```bash
|
|
292
|
-
llm-wiki lint --workspace /path/to/project
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
점검 항목:
|
|
296
|
-
|
|
297
|
-
- missing `index.md`, `memory.md`, `log.md`
|
|
298
|
-
- missing/invalid frontmatter
|
|
299
|
-
- broken or ambiguous `[[wikilinks]]`
|
|
300
|
-
- broken relative Markdown links
|
|
301
|
-
- invalid or unsafe `source_ids`
|
|
302
|
-
- missing source files
|
|
303
|
-
- secret-like content
|
|
304
|
-
- duplicate aliases/titles
|
|
305
|
-
- stale pages and orphan candidates
|
|
306
|
-
- `memory.md` near-budget/oversized 상태
|
|
307
|
-
- wiki page count가 search cap에 근접했는지
|
|
308
|
-
- default-hidden episodic/context/session page 성장
|
|
309
|
-
- stale/archived page의 supersession/link discoverability
|
|
310
|
-
- outdated managed rules/templates
|
|
311
|
-
- stale or oversized maintenance queue
|
|
312
|
-
|
|
313
|
-
broken links, invalid source IDs, secret-like content는 error이며 exit code 1을 반환한다. metadata/discoverability gap은 warning이다.
|
|
314
|
-
|
|
315
|
-
### `llm-wiki consolidate`
|
|
316
|
-
|
|
317
|
-
generated marker block만 보수적으로 갱신한다.
|
|
318
|
-
|
|
319
|
-
```bash
|
|
320
|
-
llm-wiki consolidate --workspace /path/to/project
|
|
321
|
-
llm-wiki consolidate --workspace /path/to/project --dry-run
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
갱신 대상:
|
|
325
|
-
|
|
326
|
-
- `wiki/memory.md`의 generated memory map
|
|
327
|
-
- `wiki/index.md`의 generated page map
|
|
328
|
-
|
|
329
|
-
handwritten content는 보존한다. malformed marker block은 덮어쓰지 않고 건너뛴다. generated map에는 durable non-archived page만 넣는다. `stale`, `archived`, `superseded_by` page는 보존하지만 generated map에서는 제외한다. 기본 `query`, `context`, `session-log` page는 explicit durable metadata가 없으면 generated map에서 제외한다. `--dry-run` 결과는 indexed durable pages, hidden episodic pages, archived/stale/superseded skipped counts를 보고한다.
|
|
187
|
+
Default search prioritizes durable semantic/procedural wiki pages. Episodic `wiki/queries/`, `wiki/context/`, and `session-log` pages are hidden unless promoted with durable metadata or explicitly requested. Archived and superseded pages are hidden unless `--include-archived` is used. Stale pages remain searchable with lower score.
|
|
330
188
|
|
|
331
|
-
|
|
189
|
+
## Maintenance
|
|
332
190
|
|
|
333
|
-
maintenance queue
|
|
191
|
+
`llm-wiki maintenance` reports pending queue state and review health. It does not merge pages automatically. The active agent should merge reusable items into existing durable pages and mark queue items `done` or `skipped`.
|
|
334
192
|
|
|
335
|
-
|
|
336
|
-
llm-wiki maintenance --workspace /path/to/project
|
|
337
|
-
llm-wiki maintenance --workspace /path/to/project --json
|
|
338
|
-
```
|
|
193
|
+
Hook reminders are soft:
|
|
339
194
|
|
|
340
|
-
|
|
195
|
+
- session start and instructions loaded may show a one-item summary;
|
|
196
|
+
- prompt submit shows a reminder only when the prompt is wiki/maintenance-related or matches a queue topic.
|
|
341
197
|
|
|
342
|
-
|
|
198
|
+
## PreCompact
|
|
343
199
|
|
|
344
|
-
|
|
200
|
+
Pre-compact preservation never blocks compaction. Defaults:
|
|
345
201
|
|
|
346
202
|
```bash
|
|
347
|
-
|
|
348
|
-
llm-wiki maintenance --workspace /path/to/project
|
|
349
|
-
llm-wiki consolidate --workspace /path/to/project --dry-run
|
|
350
|
-
llm-wiki consolidate --workspace /path/to/project
|
|
203
|
+
LLM_WIKI_KIT_PRECOMPACT_ENFORCEMENT=limited
|
|
351
204
|
```
|
|
352
205
|
|
|
353
|
-
|
|
206
|
+
`limited` and `soft` emit non-blocking warnings on checkpoint failure. `off` suppresses warnings. `LLM_WIKI_KIT_PRECOMPACT_TRANSCRIPT_TAIL_BYTES` controls the small bounded transcript tail used for redacted checkpoints.
|
|
354
207
|
|
|
355
|
-
|
|
208
|
+
## Security
|
|
356
209
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
210
|
+
- Full raw transcript capture is disabled by default.
|
|
211
|
+
- Hook payloads are stored as small redacted event envelopes.
|
|
212
|
+
- Tool calls are not blocked only because input looks sensitive.
|
|
213
|
+
- Tokens, passwords, bearer credentials, private keys, and raw `.env` contents are redacted before durable storage.
|
|
214
|
+
- Phone numbers, emails, dates, and business identifiers are preserved by default because they can be useful local work context.
|
|
215
|
+
- `llm-wiki lint` reports secret-like wiki content as an error.
|
|
362
216
|
|
|
363
|
-
|
|
217
|
+
## Release Verification
|
|
364
218
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
```bash
|
|
368
|
-
llm-wiki hook codex SessionStart
|
|
369
|
-
llm-wiki hook codex UserPromptSubmit
|
|
370
|
-
llm-wiki hook codex Stop
|
|
371
|
-
llm-wiki hook claude InstructionsLoaded
|
|
372
|
-
llm-wiki hook claude Stop
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
일반 사용자가 직접 호출할 필요는 거의 없다. hook integration이나 smoke test를 디버깅할 때만 사용한다.
|
|
376
|
-
|
|
377
|
-
## Hook Events
|
|
378
|
-
|
|
379
|
-
Codex handled events:
|
|
380
|
-
|
|
381
|
-
- `SessionStart`
|
|
382
|
-
- `UserPromptSubmit`
|
|
383
|
-
- `PreToolUse`
|
|
384
|
-
- `PostToolUse`
|
|
385
|
-
- `PreCompact`
|
|
386
|
-
- `PostCompact`
|
|
387
|
-
- `SubagentStop`
|
|
388
|
-
- `Stop`
|
|
389
|
-
|
|
390
|
-
Claude Code handled events:
|
|
391
|
-
|
|
392
|
-
- `SessionStart`
|
|
393
|
-
- `InstructionsLoaded`
|
|
394
|
-
- `UserPromptSubmit`
|
|
395
|
-
- `PreToolUse`
|
|
396
|
-
- `PostToolUse`
|
|
397
|
-
- `PostToolBatch`
|
|
398
|
-
- `PreCompact`
|
|
399
|
-
- `PostCompact`
|
|
400
|
-
- `SubagentStop`
|
|
401
|
-
- `Stop`
|
|
402
|
-
- `SessionEnd`
|
|
403
|
-
|
|
404
|
-
Hook payload는 full transcript가 아니라 작은 redacted event envelope다. context output도 field별 redaction을 거친다. `PreCompact`는 checkpoint 생성을 위해 작은 bounded transcript tail만 읽을 수 있고, 저장 전 인증값과 raw `transcript_path`를 redaction한다.
|
|
405
|
-
|
|
406
|
-
Context를 반환하는 Codex/Claude hook event는 기능을 제거하지 않는다. memory hot index, navigation index, relevant wiki hits, link expansion, maintenance signal, passive runtime update status, compact recovery packet을 계속 사용할 수 있고, 사용자 화면에 보일 수 있는 `additionalContext`만 functional compact context로 정제한다. `PostCompact`는 compact summary 저장과 recovery packet 준비만 수행하고 model-visible context를 직접 반환하지 않는다. `llm-wiki context` CLI의 full debug 출력은 이 hook formatting 정책과 별도로 유지한다.
|
|
407
|
-
|
|
408
|
-
Pre-compact 보존은 compact를 block하지 않는다. `LLM_WIKI_KIT_PRECOMPACT_ENFORCEMENT=off`는 실패 warning을 억제하고, `limited`/`soft`는 checkpoint/queue 저장 실패 시 non-blocking warning만 남긴다. `LLM_WIKI_KIT_PRECOMPACT_TRANSCRIPT_TAIL_BYTES`로 transcript tail byte 한도를 조정한다.
|
|
409
|
-
|
|
410
|
-
## Security Defaults
|
|
411
|
-
|
|
412
|
-
기본 정책은 aggressive blocking보다 useful local work wiki를 우선한다.
|
|
413
|
-
|
|
414
|
-
- input이 민감해 보인다는 이유만으로 tool call을 막지 않는다.
|
|
415
|
-
- token, password, bearer credential, private key, `.env` 원문 같은 authentication value는 durable summary에 쓰기 전 redaction한다.
|
|
416
|
-
- phone number, email, date, business identifier는 local work context로 유용할 수 있어 기본 보존한다.
|
|
417
|
-
- full raw transcript capture는 기본 기능이 아니다.
|
|
418
|
-
- `PreCompact` checkpoint는 bounded redacted transcript tail만 사용할 수 있으며 full transcript와 raw `transcript_path`는 저장하지 않는다.
|
|
419
|
-
- `llm-wiki lint`는 wiki 안의 secret-like content를 error로 보고한다.
|
|
420
|
-
|
|
421
|
-
민감한 raw command output, log, screenshot, transcript를 저장해야 할 때는 먼저 redaction한다. 인증값은 wiki, report, live Q&A, command history에 남기지 않는다.
|
|
422
|
-
|
|
423
|
-
## Updating Existing Installs
|
|
424
|
-
|
|
425
|
-
일반 흐름:
|
|
426
|
-
|
|
427
|
-
```bash
|
|
428
|
-
npm install -g llm-wiki-kit@latest --registry=https://registry.npmjs.org/ --prefer-online
|
|
429
|
-
llm-wiki post-update --all --workspace /apps
|
|
430
|
-
llm-wiki status --workspace /apps
|
|
431
|
-
llm-wiki doctor --workspace /apps
|
|
432
|
-
```
|
|
433
|
-
|
|
434
|
-
system global npm prefix가 root-owned인 서버에서는 package install에 `sudo npm install -g`가 필요할 수 있다. 단, user home의 Codex/Claude hook 설정을 갱신하는 `llm-wiki install` 또는 `llm-wiki post-update`는 해당 user로 실행하는 것이 일반적으로 맞다.
|
|
435
|
-
|
|
436
|
-
source checkout 개발 중 pre-publish smoke:
|
|
437
|
-
|
|
438
|
-
```bash
|
|
439
|
-
npm pack --pack-destination /tmp
|
|
440
|
-
npm install -g /tmp/llm-wiki-kit-<version>.tgz
|
|
441
|
-
llm-wiki install --workspace /apps --profile standard
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
publish 전 검증:
|
|
219
|
+
For `llm-wiki-kit` releases, source tests are not enough. A complete release includes:
|
|
445
220
|
|
|
446
221
|
```bash
|
|
447
222
|
node --test
|
|
448
223
|
npm pack --dry-run
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
```powershell
|
|
454
|
-
npm install -g .\llm-wiki-kit-<version>.tgz
|
|
224
|
+
git diff --check
|
|
225
|
+
npm publish
|
|
226
|
+
npm view llm-wiki-kit version dist-tags
|
|
227
|
+
sudo npm install -g llm-wiki-kit@latest
|
|
455
228
|
llm-wiki version
|
|
456
|
-
llm-wiki
|
|
457
|
-
llm-wiki
|
|
458
|
-
llm-wiki
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
검증에는 `%USERPROFILE%\.codex\hooks.json`의 `commandWindows`, `%USERPROFILE%\.claude\settings.json`의 Windows-safe `node.exe` command, project-local `llm-wiki/` 생성, sample hook roundtrip이 포함된다. 원격 자동화는 WinRM을 사용하되 credential은 환경변수나 secret store로만 전달하고 wiki/log에 저장하지 않는다.
|
|
462
|
-
|
|
463
|
-
publish 후 검증:
|
|
464
|
-
|
|
465
|
-
```bash
|
|
466
|
-
npm view llm-wiki-kit version --registry=https://registry.npmjs.org/
|
|
467
|
-
npm install -g llm-wiki-kit@<published-version> --registry=https://registry.npmjs.org/ --prefer-online
|
|
468
|
-
llm-wiki version
|
|
469
|
-
llm-wiki manual
|
|
470
|
-
llm-wiki status --workspace /apps
|
|
471
|
-
llm-wiki doctor --workspace /apps
|
|
472
|
-
llm-wiki update --workspace /apps --dry-run
|
|
473
|
-
llm-wiki update --workspace /apps --current-only
|
|
229
|
+
llm-wiki status --workspace /path/to/project
|
|
230
|
+
llm-wiki doctor --workspace /path/to/project
|
|
231
|
+
llm-wiki update --check --workspace /path/to/project
|
|
474
232
|
```
|
|
475
233
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
Windows 지원 변경이 포함된 릴리스는 publish 후에도 같은 Windows host에서 `npm install -g llm-wiki-kit@latest` 후 최소 `version/status/doctor` smoke를 반복한다.
|
|
234
|
+
Native Windows support claims require a real Windows smoke: install the published package, run `install`, `status`, and `doctor` against a Windows project, inspect `%USERPROFILE%\.codex\hooks.json` and `%USERPROFILE%\.claude\settings.json`, and run hook smoke tests through `llm-wiki.cmd`.
|
|
479
235
|
|
|
480
|
-
## Troubleshooting
|
|
236
|
+
## Troubleshooting
|
|
481
237
|
|
|
482
|
-
|
|
238
|
+
If hooks do not run:
|
|
483
239
|
|
|
484
240
|
```bash
|
|
485
|
-
llm-wiki status --workspace /path/to/project
|
|
486
241
|
llm-wiki doctor --workspace /path/to/project
|
|
242
|
+
llm-wiki status --workspace /path/to/project
|
|
243
|
+
llm-wiki install --workspace /path/to/project --profile standard
|
|
487
244
|
```
|
|
488
245
|
|
|
489
|
-
|
|
246
|
+
If npm install succeeds but `llm-wiki` is old:
|
|
490
247
|
|
|
491
248
|
```bash
|
|
492
249
|
which -a llm-wiki
|
|
493
250
|
readlink -f "$(command -v llm-wiki)"
|
|
251
|
+
npm ls -g llm-wiki-kit --depth=0
|
|
494
252
|
npm root -g
|
|
495
253
|
node "$(npm root -g)/llm-wiki-kit/bin/llm-wiki.js" version
|
|
254
|
+
llm-wiki install --workspace /path/to/project --profile standard
|
|
255
|
+
hash -r
|
|
496
256
|
```
|
|
497
257
|
|
|
498
|
-
Windows
|
|
258
|
+
On Windows:
|
|
499
259
|
|
|
500
260
|
```powershell
|
|
501
261
|
where llm-wiki
|
|
262
|
+
npm ls -g llm-wiki-kit --depth=0
|
|
502
263
|
npm root -g
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
local shim이 npm global command를 shadowing하면:
|
|
507
|
-
|
|
508
|
-
```bash
|
|
509
|
-
llm-wiki install --workspace /path/to/project --profile standard
|
|
510
|
-
hash -r
|
|
511
|
-
llm-wiki version
|
|
264
|
+
llm-wiki install --workspace C:\path\to\project --profile standard
|
|
265
|
+
llm-wiki doctor --workspace C:\path\to\project
|
|
512
266
|
```
|
|
513
267
|
|
|
514
|
-
|
|
268
|
+
If `update` appears slow, use bounded dry runs:
|
|
515
269
|
|
|
516
270
|
```bash
|
|
517
|
-
llm-wiki
|
|
518
|
-
llm-wiki
|
|
519
|
-
llm-wiki consolidate --workspace /path/to/project
|
|
271
|
+
llm-wiki update --dry-run --workspace /path/to/project --current-only --timeout-ms 30000
|
|
272
|
+
llm-wiki update --dry-run --workspace /path/to/search-root --max-dirs 1000 --timeout-ms 30000
|
|
520
273
|
```
|
|
521
274
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
이 문서는 `llm-wiki manual`의 출력 원본이다.
|
|
525
|
-
|
|
526
|
-
새 public command, option, hook behavior, directory convention, security policy, update flow가 생기면 구현과 같은 change set에서 `docs/manual.md`를 갱신한다. README는 빠른 시작과 요약을 담고, 자세한 기능 설명은 이 manual에 둔다.
|
|
275
|
+
This file is the source for `llm-wiki manual`. Update it in the same change set as public command, option, hook behavior, directory convention, security policy, language behavior, or update-flow changes.
|