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/README.md
CHANGED
|
@@ -4,14 +4,25 @@
|
|
|
4
4
|
|
|
5
5
|
The goal is not to make users run `ingest` or `record` commands. After install, normal Claude Code/Codex work should naturally become a project-local Markdown wiki under `llm-wiki/`.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Language Behavior
|
|
8
|
+
|
|
9
|
+
`llm-wiki-kit` is designed for mixed Korean and English teams:
|
|
10
|
+
|
|
11
|
+
- Korean user prompt -> Korean hook guidance.
|
|
12
|
+
- English user prompt -> English hook guidance.
|
|
13
|
+
- If there is no clear current prompt language, Claude Code `settings.json` `language` is used when present.
|
|
14
|
+
- If that setting is missing, local `CLAUDE.md` and `AGENTS.md` language signals are used.
|
|
15
|
+
- The fallback is English.
|
|
16
|
+
- Commands, paths, code identifiers, package names, logs, and original error text are not translated.
|
|
8
17
|
|
|
9
|
-
|
|
18
|
+
Codex and Claude Code users do not need different commands for Korean or English projects.
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
10
21
|
|
|
11
22
|
```bash
|
|
12
|
-
npm install -g llm-wiki-kit
|
|
13
|
-
llm-wiki install --workspace /
|
|
14
|
-
llm-wiki doctor --workspace /
|
|
23
|
+
npm install -g llm-wiki-kit@latest
|
|
24
|
+
llm-wiki install --workspace /path/to/project --profile standard
|
|
25
|
+
llm-wiki doctor --workspace /path/to/project
|
|
15
26
|
```
|
|
16
27
|
|
|
17
28
|
Restart Claude Code and Codex sessions after installation.
|
|
@@ -87,6 +98,7 @@ Use Claude Code or Codex normally.
|
|
|
87
98
|
The installed hooks:
|
|
88
99
|
|
|
89
100
|
- inject functional compact context at session start, instructions loaded, and prompt submit. The hook still uses `wiki/memory.md`, `wiki/index.md`, relevant wiki search results, maintenance signals, update status, and any compact recovery packet; it formats only the useful parts so user-visible hook context does not look like a raw debug dump.
|
|
101
|
+
- automatically choose Korean or English hook guidance from the current user prompt, then fall back to Claude Code `language`, local `CLAUDE.md`/`AGENTS.md`, and English.
|
|
90
102
|
- remove Codex-facing legacy `oh-my-codex:wiki`/`omx_wiki` surfaces at session start so `llm-wiki/` remains the active wiki implementation
|
|
91
103
|
- record small redacted raw event envelopes and per-turn state
|
|
92
104
|
- capture meaningful work and structured decision points, including tool evidence, changed files, and verification notes
|
|
@@ -141,7 +153,7 @@ Installed npm runtimes also perform a cached update notice check from hooks whil
|
|
|
141
153
|
|
|
142
154
|
For `llm-wiki-kit` code releases, source tests are not enough. After code changes, publish the package, install the newly published version, and verify the installed CLI and hooks with `version`, `status`, `doctor`, `update`, `lint`, and hook smoke checks before calling the release complete.
|
|
143
155
|
|
|
144
|
-
Native Windows changes require a real Windows smoke before release. The release gate is: install the packed candidate on a Windows host, run `llm-wiki install`, `llm-wiki status`, and `llm-wiki doctor` against a temporary Windows project, inspect `%USERPROFILE%\.codex\hooks.json` and `%USERPROFILE%\.claude\settings.json`, then repeat the minimal smoke after `npm install -g llm-wiki-kit@latest` once published. Simulated unit tests are not enough for the Windows support claim.
|
|
156
|
+
Native Windows changes require a real Windows smoke before release. The release gate is: install the packed candidate or published package on a Windows host, run `llm-wiki install`, `llm-wiki status`, and `llm-wiki doctor` against a temporary Windows project, inspect `%USERPROFILE%\.codex\hooks.json` and `%USERPROFILE%\.claude\settings.json`, then repeat the minimal smoke after `npm install -g llm-wiki-kit@latest` once published. Simulated unit tests are not enough for the Windows support claim.
|
|
145
157
|
|
|
146
158
|
After a plain `npm install -g llm-wiki-kit@latest`, existing hooks keep working when they already point at the global npm package path. The next `SessionStart`/`InstructionsLoaded` hook automatically reapplies safe managed template updates for the active project root. Clearly generated older `llm-wiki/AGENTS.md` and procedure files are refreshed even when old state is missing; user-edited files are not overwritten and are surfaced to the active agent as cleanup work. If hooks point at a source checkout or stale shim, run `llm-wiki post-update --workspace <project>` or `llm-wiki install --workspace <project>` once to reconnect them.
|
|
147
159
|
|
|
@@ -44,6 +44,8 @@ The hook records redacted turn summaries but does not deny tool calls only becau
|
|
|
44
44
|
|
|
45
45
|
At `SessionStart`/`InstructionsLoaded`, the hook first attempts a safe managed-template refresh, recovers stale turn state into `outputs/maintenance/queue.md`, performs a cached npm update notice check for npm installs, then injects functional compact context. The context still uses `llm-wiki/wiki/memory.md`, `llm-wiki/wiki/index.md`, relevant wiki/search state, operating rules, maintenance signals, passive runtime update status, and managed-template cleanup notes; the hook formats those signals so they are usable if shown in the Claude Code UI. At `UserPromptSubmit`, it recovers stale turn state, searches wiki pages with MiniSearch or substring fallback, expands one-hop wikilinks, redacts context fields, performs the same cached update notice check, and injects the smallest useful functional compact context set. Update notice cache is scoped by npm command, and maintenance reminders are shown only when the prompt is wiki/maintenance related or matches a queue topic.
|
|
46
46
|
|
|
47
|
+
Hook-visible language is selected from the current user prompt first. Korean prompts get Korean guidance, English prompts get English guidance. If no prompt language is clear, the hook checks Claude Code `settings.json` `language` when it exists, then local `CLAUDE.md`/`AGENTS.md` language signals, then English. The kit does not require Claude Code to expose a language setting.
|
|
48
|
+
|
|
47
49
|
`PostToolUse` and `PostToolBatch` record redacted tool summaries in the same turn buffer. `PreCompact` classifies the current turn before compaction: simple turns record only a context note, work-evidence or structured-decision turns write a chunked live Q&A checkpoint, and explicit durable candidates write a maintenance queue item only when no durable wiki update is detected. The checkpoint can include only a bounded redacted transcript tail, never the full raw transcript or raw `transcript_path`. Compaction is not blocked; if checkpoint storage fails, the hook records a compact recovery packet for the next legal context-injection event. `PostCompact` stores the redacted compact summary as a context note and prepares any pending recovery packet without returning model-visible context directly. In the default `answer-first` mode, `SubagentStop` does not create live Q&A, query, decision, or maintenance files. `Stop` and `SessionEnd` append chunked live Q&A only for work-evidence or structured-decision turns and do not auto-create `wiki/queries/` or `wiki/decisions/`. If the user explicitly asked to record or document durable knowledge and no durable wiki update is detected, `Stop`/`SessionEnd` queue a pending maintenance item for agent review. `Stop` and `SessionEnd` then clear the per-session turn buffer; `SubagentStop` does not.
|
|
48
50
|
|
|
49
51
|
Set `LLM_WIKI_KIT_AUTO_PROJECT_UPDATE=0` only while diagnosing automatic managed-template refresh behavior.
|
|
@@ -31,6 +31,7 @@ Expected behavior:
|
|
|
31
31
|
|
|
32
32
|
- `SessionStart` first attempts a safe managed-template refresh, removes Codex-facing legacy `oh-my-codex:wiki`/`omx_wiki` surfaces when they reappear, recovers stale turn state into `outputs/maintenance/queue.md`, performs a cached npm update notice check for npm installs, then injects functional compact context. The context still uses `llm-wiki/wiki/memory.md`, `llm-wiki/wiki/index.md`, relevant wiki/search state, operating rules, maintenance signals, passive runtime update status, and managed-template cleanup notes; the hook formats those signals so they are usable if shown in the Codex UI.
|
|
33
33
|
- `UserPromptSubmit` recovers stale turn state, searches project wiki pages with MiniSearch or substring fallback, expands one-hop wikilinks, redacts context fields, performs the same cached update notice check, and injects the smallest useful functional compact context set. Update notice cache is scoped by npm command, and maintenance reminders are shown only when the prompt is wiki/maintenance related or matches a queue topic.
|
|
34
|
+
- Hook-visible language is selected from the current user prompt first. Korean prompts get Korean guidance, English prompts get English guidance. If no prompt language is clear, Codex falls back to local `CLAUDE.md`/`AGENTS.md` language signals, then English.
|
|
34
35
|
- `PreToolUse` records redacted tool summaries without blocking tool calls.
|
|
35
36
|
- `PostToolUse` records redacted tool summaries in a turn buffer.
|
|
36
37
|
- `PreCompact` classifies the current turn before compaction. Simple turns record only a context note; work-evidence or structured-decision turns write a chunked live Q&A checkpoint; explicit durable candidates write a maintenance queue item only when no durable wiki update is detected. The checkpoint can include only a bounded redacted transcript tail, never the full raw transcript or raw `transcript_path`. Compaction is not blocked; if checkpoint storage fails, the hook records a compact recovery packet for the next legal context-injection event.
|