llm-wiki-kit 0.2.11 → 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 +18 -6
- package/docs/integrations/claude-code.md +2 -0
- package/docs/integrations/codex.md +1 -0
- package/docs/manual.md +132 -396
- package/package.json +12 -2
- package/src/capture-policy.js +11 -4
- package/src/cli.js +2 -2
- package/src/hook.js +15 -7
- package/src/language.js +73 -0
- package/src/live-qa.js +1 -1
- package/src/maintenance.js +13 -8
- package/src/project-state.js +20 -9
- package/src/project.js +5 -3
- package/src/templates.js +89 -82
- package/src/update-notice.js +14 -4
- 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나 live Q&A archive로 승격하지 않는다.
|
|
90
|
-
- tool evidence, changed-file evidence, verification, 구조화된 `Decision:`/`Root cause:` 같은 결론이 있는 turn은 live Q&A archive에 남길 수 있다.
|
|
91
|
-
- explicit durable request가 durable wiki에 반영되지 않았을 때만 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,409 +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`
|
|
147
|
-
|
|
148
|
-
npm registry target과 installed runtime을 비교하고, 필요하면 global package를 업데이트한 뒤 hook과 managed project templates를 갱신한다.
|
|
149
|
-
|
|
150
|
-
```bash
|
|
151
|
-
llm-wiki update --check --workspace /path/to/project
|
|
152
|
-
llm-wiki update --workspace /path/to/search-root
|
|
153
|
-
llm-wiki update --workspace /path/to/search-root --to 0.2.1
|
|
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
|
|
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.
|
|
209
119
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
### `llm-wiki version`
|
|
213
|
-
|
|
214
|
-
installed runtime version만 출력한다.
|
|
120
|
+
Source checkout development:
|
|
215
121
|
|
|
216
122
|
```bash
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
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
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
llm-wiki
|
|
250
|
-
|
|
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.
|
|
251
157
|
|
|
252
|
-
|
|
158
|
+
## Update Flow
|
|
253
159
|
|
|
254
|
-
|
|
160
|
+
`llm-wiki update --check` contacts npm and reports an update only when the registry target is newer than the installed runtime.
|
|
255
161
|
|
|
256
|
-
|
|
162
|
+
`llm-wiki update`:
|
|
257
163
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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.
|
|
261
172
|
|
|
262
|
-
|
|
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.
|
|
263
174
|
|
|
264
|
-
|
|
175
|
+
## Context And Search
|
|
265
176
|
|
|
266
|
-
|
|
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
|
-
점검 항목:
|
|
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.
|
|
296
188
|
|
|
297
|
-
|
|
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
|
-
- oversized legacy live Q&A files or oversized live Q&A chunks
|
|
189
|
+
## Maintenance
|
|
313
190
|
|
|
314
|
-
|
|
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`.
|
|
315
192
|
|
|
316
|
-
|
|
193
|
+
Hook reminders are soft:
|
|
317
194
|
|
|
318
|
-
|
|
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.
|
|
319
197
|
|
|
320
|
-
|
|
321
|
-
llm-wiki consolidate --workspace /path/to/project
|
|
322
|
-
llm-wiki consolidate --workspace /path/to/project --dry-run
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
갱신 대상:
|
|
326
|
-
|
|
327
|
-
- `wiki/memory.md`의 generated memory map
|
|
328
|
-
- `wiki/index.md`의 generated page map
|
|
329
|
-
|
|
330
|
-
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를 보고한다.
|
|
331
|
-
|
|
332
|
-
### `llm-wiki maintenance`
|
|
333
|
-
|
|
334
|
-
maintenance queue summary를 출력한다.
|
|
335
|
-
|
|
336
|
-
```bash
|
|
337
|
-
llm-wiki maintenance --workspace /path/to/project
|
|
338
|
-
llm-wiki maintenance --workspace /path/to/project --json
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
이 명령은 page merge를 자동 수행하지 않는다. 정기 maintenance는 agent-side task이며 사용자가 매 turn 실행할 필요가 없다. active agent가 pending item을 읽고, 가장 가까운 durable wiki 문서에 병합한 뒤 queue item을 `done` 또는 `skipped`로 표시한다.
|
|
342
|
-
|
|
343
|
-
JSON 출력에는 `reviewDue`, `reviewReasons`, `pendingCount`, `stalePendingCount`, `health`, `recommendedCommands`가 포함된다. Review due 조건은 마지막 review 후 14일 경과, pending 5개 이상, stale/result-missing pending item, lint warning/error, `memory.md` near-budget 이상, wiki page count가 search cap의 80% 이상인 경우다. Hook은 due 상태를 `SessionStart`/`InstructionsLoaded`에서만 짧게 보여주고, `UserPromptSubmit`에서는 사용자가 wiki/maintenance/정리 관련 질문을 했을 때만 보여준다. 현재 답변을 중단하거나 정리를 강제하지 않는다.
|
|
344
|
-
|
|
345
|
-
### `llm-wiki archive-questions`
|
|
346
|
-
|
|
347
|
-
legacy daily live Q&A 파일을 chunked archive layout으로 분할한다.
|
|
348
|
-
|
|
349
|
-
```bash
|
|
350
|
-
llm-wiki archive-questions --workspace /path/to/project --dry-run
|
|
351
|
-
llm-wiki archive-questions --workspace /path/to/project --date 2026-06-07
|
|
352
|
-
llm-wiki archive-questions --workspace /path/to/project --date 2026-06-07 --json
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
대상은 `outputs/questions/YYYY-MM-DD-live-qa.md` 형식의 기존 파일이다. 실행하면 원본은 `outputs/questions/archive/originals/` 아래에 SHA-256 sidecar와 함께 보존하고, 새 기록은 `outputs/questions/YYYY-MM-DD/index.md`와 `live-qa-001.md` style chunk들로 나눈다. 기존 top-level 파일은 새 위치를 가리키는 짧은 stub로 대체한다. `--dry-run`은 어떤 파일도 쓰지 않고 split 계획만 출력한다.
|
|
356
|
-
|
|
357
|
-
Agent checklist:
|
|
358
|
-
|
|
359
|
-
```bash
|
|
360
|
-
llm-wiki lint --workspace /path/to/project
|
|
361
|
-
llm-wiki maintenance --workspace /path/to/project
|
|
362
|
-
llm-wiki consolidate --workspace /path/to/project --dry-run
|
|
363
|
-
llm-wiki consolidate --workspace /path/to/project
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
### `llm-wiki uninstall`
|
|
367
|
-
|
|
368
|
-
kit이 설치한 hook entries를 제거한다.
|
|
369
|
-
|
|
370
|
-
```bash
|
|
371
|
-
llm-wiki uninstall
|
|
372
|
-
```
|
|
373
|
-
|
|
374
|
-
project-local `llm-wiki/` contents는 남긴다. 지식 저장소를 삭제하는 명령이 아니다.
|
|
198
|
+
## PreCompact
|
|
375
199
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
Codex/Claude Code hook target으로 쓰는 내부 runtime command다.
|
|
200
|
+
Pre-compact preservation never blocks compaction. Defaults:
|
|
379
201
|
|
|
380
202
|
```bash
|
|
381
|
-
|
|
382
|
-
llm-wiki hook codex UserPromptSubmit
|
|
383
|
-
llm-wiki hook codex Stop
|
|
384
|
-
llm-wiki hook claude InstructionsLoaded
|
|
385
|
-
llm-wiki hook claude Stop
|
|
203
|
+
LLM_WIKI_KIT_PRECOMPACT_ENFORCEMENT=limited
|
|
386
204
|
```
|
|
387
205
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
## Hook Events
|
|
391
|
-
|
|
392
|
-
Codex handled events:
|
|
393
|
-
|
|
394
|
-
- `SessionStart`
|
|
395
|
-
- `UserPromptSubmit`
|
|
396
|
-
- `PreToolUse`
|
|
397
|
-
- `PostToolUse`
|
|
398
|
-
- `PreCompact`
|
|
399
|
-
- `PostCompact`
|
|
400
|
-
- `SubagentStop`
|
|
401
|
-
- `Stop`
|
|
402
|
-
|
|
403
|
-
Claude Code handled events:
|
|
404
|
-
|
|
405
|
-
- `SessionStart`
|
|
406
|
-
- `InstructionsLoaded`
|
|
407
|
-
- `UserPromptSubmit`
|
|
408
|
-
- `PreToolUse`
|
|
409
|
-
- `PostToolUse`
|
|
410
|
-
- `PostToolBatch`
|
|
411
|
-
- `PreCompact`
|
|
412
|
-
- `PostCompact`
|
|
413
|
-
- `SubagentStop`
|
|
414
|
-
- `Stop`
|
|
415
|
-
- `SessionEnd`
|
|
416
|
-
|
|
417
|
-
Hook payload는 full transcript가 아니라 작은 redacted event envelope다. context output도 field별 redaction을 거친다. `PreCompact`는 checkpoint 생성을 위해 작은 bounded transcript tail만 읽을 수 있고, 저장 전 인증값과 raw `transcript_path`를 redaction한다.
|
|
418
|
-
|
|
419
|
-
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 정책과 별도로 유지한다.
|
|
420
|
-
|
|
421
|
-
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 한도를 조정한다.
|
|
422
|
-
|
|
423
|
-
## Security Defaults
|
|
424
|
-
|
|
425
|
-
기본 정책은 aggressive blocking보다 useful local work wiki를 우선한다.
|
|
426
|
-
|
|
427
|
-
- input이 민감해 보인다는 이유만으로 tool call을 막지 않는다.
|
|
428
|
-
- token, password, bearer credential, private key, `.env` 원문 같은 authentication value는 durable summary에 쓰기 전 redaction한다.
|
|
429
|
-
- phone number, email, date, business identifier는 local work context로 유용할 수 있어 기본 보존한다.
|
|
430
|
-
- full raw transcript capture는 기본 기능이 아니다.
|
|
431
|
-
- `PreCompact` checkpoint는 bounded redacted transcript tail만 사용할 수 있으며 full transcript와 raw `transcript_path`는 저장하지 않는다.
|
|
432
|
-
- `llm-wiki lint`는 wiki 안의 secret-like content를 error로 보고한다.
|
|
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.
|
|
433
207
|
|
|
434
|
-
|
|
208
|
+
## Security
|
|
435
209
|
|
|
436
|
-
|
|
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.
|
|
437
216
|
|
|
438
|
-
|
|
217
|
+
## Release Verification
|
|
439
218
|
|
|
440
|
-
|
|
441
|
-
npm install -g llm-wiki-kit@latest --registry=https://registry.npmjs.org/ --prefer-online
|
|
442
|
-
llm-wiki post-update --all --workspace /apps
|
|
443
|
-
llm-wiki status --workspace /apps
|
|
444
|
-
llm-wiki doctor --workspace /apps
|
|
445
|
-
```
|
|
446
|
-
|
|
447
|
-
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로 실행하는 것이 일반적으로 맞다.
|
|
448
|
-
|
|
449
|
-
source checkout 개발 중 pre-publish smoke:
|
|
450
|
-
|
|
451
|
-
```bash
|
|
452
|
-
npm pack --pack-destination /tmp
|
|
453
|
-
npm install -g /tmp/llm-wiki-kit-<version>.tgz
|
|
454
|
-
llm-wiki install --workspace /apps --profile standard
|
|
455
|
-
```
|
|
456
|
-
|
|
457
|
-
publish 전 검증:
|
|
219
|
+
For `llm-wiki-kit` releases, source tests are not enough. A complete release includes:
|
|
458
220
|
|
|
459
221
|
```bash
|
|
460
222
|
node --test
|
|
461
223
|
npm pack --dry-run
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
```powershell
|
|
467
|
-
npm install -g .\llm-wiki-kit-<version>.tgz
|
|
468
|
-
llm-wiki version
|
|
469
|
-
llm-wiki install --workspace C:\Temp\llm-wiki-kit-smoke --profile standard
|
|
470
|
-
llm-wiki status --workspace C:\Temp\llm-wiki-kit-smoke
|
|
471
|
-
llm-wiki doctor --workspace C:\Temp\llm-wiki-kit-smoke
|
|
472
|
-
```
|
|
473
|
-
|
|
474
|
-
검증에는 `%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에 저장하지 않는다.
|
|
475
|
-
|
|
476
|
-
publish 후 검증:
|
|
477
|
-
|
|
478
|
-
```bash
|
|
479
|
-
npm view llm-wiki-kit version --registry=https://registry.npmjs.org/
|
|
480
|
-
npm install -g llm-wiki-kit@<published-version> --registry=https://registry.npmjs.org/ --prefer-online
|
|
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
|
|
481
228
|
llm-wiki version
|
|
482
|
-
llm-wiki
|
|
483
|
-
llm-wiki
|
|
484
|
-
llm-wiki
|
|
485
|
-
llm-wiki update --workspace /apps --dry-run
|
|
486
|
-
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
|
|
487
232
|
```
|
|
488
233
|
|
|
489
|
-
|
|
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`.
|
|
490
235
|
|
|
491
|
-
|
|
236
|
+
## Troubleshooting
|
|
492
237
|
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
hook이 안 돈다면:
|
|
238
|
+
If hooks do not run:
|
|
496
239
|
|
|
497
240
|
```bash
|
|
498
|
-
llm-wiki status --workspace /path/to/project
|
|
499
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
|
|
500
244
|
```
|
|
501
245
|
|
|
502
|
-
|
|
246
|
+
If npm install succeeds but `llm-wiki` is old:
|
|
503
247
|
|
|
504
248
|
```bash
|
|
505
249
|
which -a llm-wiki
|
|
506
250
|
readlink -f "$(command -v llm-wiki)"
|
|
251
|
+
npm ls -g llm-wiki-kit --depth=0
|
|
507
252
|
npm root -g
|
|
508
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
|
|
509
256
|
```
|
|
510
257
|
|
|
511
|
-
Windows
|
|
258
|
+
On Windows:
|
|
512
259
|
|
|
513
260
|
```powershell
|
|
514
261
|
where llm-wiki
|
|
262
|
+
npm ls -g llm-wiki-kit --depth=0
|
|
515
263
|
npm root -g
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
local shim이 npm global command를 shadowing하면:
|
|
520
|
-
|
|
521
|
-
```bash
|
|
522
|
-
llm-wiki install --workspace /path/to/project --profile standard
|
|
523
|
-
hash -r
|
|
524
|
-
llm-wiki version
|
|
264
|
+
llm-wiki install --workspace C:\path\to\project --profile standard
|
|
265
|
+
llm-wiki doctor --workspace C:\path\to\project
|
|
525
266
|
```
|
|
526
267
|
|
|
527
|
-
|
|
268
|
+
If `update` appears slow, use bounded dry runs:
|
|
528
269
|
|
|
529
270
|
```bash
|
|
530
|
-
llm-wiki
|
|
531
|
-
llm-wiki
|
|
532
|
-
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
|
|
533
273
|
```
|
|
534
274
|
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
이 문서는 `llm-wiki manual`의 출력 원본이다.
|
|
538
|
-
|
|
539
|
-
새 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.
|