wiki-save
Skill16 starsChanged 3 months agoApache-2.0View on GitHub
Session close-out (warm, O(this session)) — file THIS session into the log, consolidate its durable concepts into the topic encyclopedia (5_topic), refresh L0 (current-state), finish with overview·lint. The every-session habit; volume work (backlog · review · gaps · re-distill) defers to the periodic `/wiki-deep` deep pass
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- nathanaday/atlas-obsidiantheir own version, first seen Sep 28, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- nathanaday/atlas-obsidian★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- wiki-askSkill
- wiki-deepSkill
- wiki-doctorSkill
- wiki-quizSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 5 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
Custom conventions: if a team llmwiki.config.toml (or a per-repo configs/*.toml) is active (check: llmwiki config <repo> shows a …
- Very specific: line 50
Use exactly these folders under docs/wiki/.
- Very specific: line 59
Don't create or reference other folders (concepts/, entities/, synthesis/, next/, flat milestones/…).
- Distinctive: line 66
Write pages in the SAME language as the session/conversation (or the existing wiki pages) — do not force or translate to a fixed language.
- Distinctive: line 71
Use sections once a page carries more than one group of points (roughly 6+ top-level bullets).
- Distinctive: line 74
Endings: prefer noun phrases or telegraphic endings natural to the page language.
- Distinctive: line 75
Density: keep each bullet to one useful line when possible.
- Very specific: line 81
Surface candidates: Run llmwiki consolidate <repo> (dry-run) to list which concepts this session touches and which already have a 5_topic/ …
- Very specific: line 173
Run llmwiki save-current <repo> --session <that id> — it resolves THIS session's transcript(s) by exact identity, enqueues them (manual …
- Very specific: line 181
not grounded → omit. Noise (trivial Q&A, no record value) → no page, update-done --skipped.
- Very specific: line 189
Read docs/wiki/current-state.md and propose updating only the 'now (TL;DR)' and 'next (remaining work)' sections from this session + recent …
- Distinctive: line 201
Maintenance signal (cheap; never repair here): run exactly this opt-in notice after lint.
- Very specific: line 205
If the CLI emits threshold guidance, report the measured databaseBytes, freeBytes, and freeRatio = freeBytes / databaseBytes, then name …
- Very specific: line 208
Silent-death check (required with backgrounding): if any review output you DO see carries prev_launch_incomplete, report it in chat ("이전 …
- Very specific: line 216
After the routine-judgment rule, 0_review is almost entirely direction-shift confirmation.
- Very specific: line 245
Use /wiki-save to close out a session (this skill), /wiki-ask for a question, /wiki-deep for the periodic deep pass (backlog · review · …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Engine invocation — resolve it ONCE, in this order, and use the first that exists:
bun "<plugin-root>/src/cli.ts", where<plugin-root>is the directory TWO levels above this skill's base directory (skills/<name>/ → plugin root). This is the plugin and clone install — the normal case. Stop here when that file exists.bun "$LLMWIKI_ROOT/src/cli.ts"whenLLMWIKI_ROOTis set — a host that copied this skill folder OUT of the plugin (OpenClaw, Hermes,skills add) leaves step 1 pointing at that host's skills directory, not at an engine.llmwikion PATH — the launchersetup.shwrites to~/.local/bin, or the npm bin.If none of the three resolve, say so once and stop. Do NOT guess a path: the engine writes into a repository, and a guessed root writes into the wrong one. Every
llmwiki …or engine-CLI reference below means the invocation you resolved here.
/wiki-save — session close-out (warm, human-present)
Close the session by filing THIS session's work into durable knowledge, right here (warm context), and keep the reading input (L0) fresh. This is the primary integration path — warm, human-present, not an unattended cron. Minutes, not tens of minutes: close-out latency is what makes people abandon a wiki (the maintenance-burden rule), so this pass is strictly O(this session). Everything heavier — the transcript backlog, the gap queue, topic re-distillation — belongs to the periodic /wiki-deep deep pass (the semantic review is the one exception: the close-out launches it in the background behind the engine's cadence gate, step 8, precisely so it never adds wall-clock here), and deferring it is safe within the harness's retention window (Claude Code deletes its transcripts on cleanupPeriodDays, default 30; Codex keeps them): the capture watermarks, gap queue, and lint backlog are durable, so everything deferred stays queued — but the transcript itself is not immutable, and once the harness deletes it that session can no longer be filed. An un-filed session that ages out is self-selection, not loss — the human judged it not worth keeping (2026-07-28: for daily work the "expiring soon" band is perpetually non-empty, so the engine never pushes deadlines; retention detail is on pull only, via llmwiki doctor).
(Why a human-invoked command and not a hook: no harness offers a reliable LLM-capable "session end" hook — Claude Code's SessionEnd is shell-only with a ~1.5s budget, OpenCode has no true session-close event, Codex automates only via hooks. The warm command is the quality path; any session that skips it lands safely in the backlog for /wiki-deep.)
Two passes, two scopes
| Pass | Scope | When | Work |
/wiki-save (this skill) | THIS session | every session close | file the session into the log + fold its durable concepts into 5_topic + L0 freshness + deterministic checks |
/wiki-deep (deep) | everything queued | day end · weekly · when the close-out report recommends it | file what matters from the transcript backlog (skip the rest) + semantic review + gap queue + re-distill oversized topics |
The wiki itself has two layers on different axes: the log (2_milestone·3_decision·4_insight — time axis, one immutable entry per session, append-only) and the topic encyclopedia (5_topic — concept axis, one living page per recurring concept, create-or-update merged in place). A close-out writes the session's log entry AND selectively folds its durable concepts into 5_topic. Promotion is one-directional (log → topic), never the reverse.
★ Execution rules
- Custom conventions: if a team
llmwiki.config.toml(or a per-repoconfigs/*.toml) is active (check:llmwiki config <repo>shows a non-default source), runllmwiki conventions <repo>FIRST and follow ITS category table (dirs · domains · review gates) over any category names written below. - Scratch-artifact protocol for subagents (issue-#956 class failure): a subagent asked to return a long document must WRITE it to a scratchpad file and return only the path — long inline returns intermittently collapse into summaries and the original is unrecoverable. The orchestrator Reads the file; inline return is the fallback only when the file is missing/empty.
- Inline, warm — done directly in this session. No sub-agent delegation (context is quality).
- This is the write moment: cold-start rule 3 defers ALL mid-session page-writing to this close-out, so sweep the WHOLE session — the decision made in its first hour was deliberately left unwritten then and lands here, not just the last thing worked on.
- Standalone CLI engine — only
bun "<plugin-root>/src/cli.ts"+<repo>/docs/wiki/. Don't confuse it with other wiki/MCP tools. - Routine judgment by the strong model, only direction by the human: the LLM decides classification, grounding checks, topic merges, and decision/insight confirmation directly as
status: ready. Don't check with the human one by one. But never fabricate ungrounded claims — omit them. Only direction shifts and unresolved contradictions go to0_reviewfor the human. - Latency contract: this close-out is O(this session), not O(backlog) or O(wiki). Defer volume work (backlog drain, gap queue, topic distill) to
/wiki-deepor the unattendedautoupdatedaemon instead of doing it inline, and run the one heavy in-pass step (semantic review, step 8) in the background, never waited on — deferral is safe by design (durable queues); slowness is not (it kills the habit, and an unused wiki records nothing). - Single-purpose close-out: this ritual only maintains the wiki. Don't absorb unrelated tail work mid-run (applying code-review findings, running test suites, committing code) — finish or queue that BEFORE starting /wiki-save.
- Validate as you write (kills the write→lint→fix rework loop): immediately after writing or editing each page, run
llmwiki index <repo> >/dev/null && llmwiki lint <repo> --path '<page path under docs/wiki>' --errors-onlyand fix findings NOW, while the file is still in context. The close-out lint then confirms instead of repairs. - Secrets never enter a page (a git-connected wiki is clone-distributed; a pushed credential cannot be recalled): never reproduce credential/token values, private endpoints, or personal data in page prose or 0_review drafts — name the thing and describe or cite it instead of quoting the value (
SLACK_TOKEN: issued, stored in 1Passwordpasses; the value itself never does; config placeholders likeAPI_KEY=<your-key>are fine). Thepage-secret/excerpt-secretlint errors enforce this deterministically at close-out — fix by removing the VALUE, never by deleting the claim or its citation. - Routine filing needs routine reasoning: most of this ritual is mechanical (classify, cite, cross-link). Don't deliberate at length over routine filing; reserve depth for contradictions, judgment-bearing merges, and direction shifts.
Categories (number = reading order)
Use exactly these folders under docs/wiki/.
1_direction/— big direction/strategy (and this session's shift: from→to, why). Rare. Human-judgment area → file into0_reviewto confirm.status: draft.2_milestone/— work progress + what's next (built/changed/measured + remaining TODOs).status: ready.3_decision/— a problem the human faced → alternatives → choice (ADR: context · decision · alternatives · consequences). Strong-model-confirmed after a grounding check.status: ready.4_insight/— realizations·gotchas·wins gained while working with the human. Strong-model-confirmed.status: ready.5_topic/— the topic encyclopedia (concept/module/pattern pages, NOT people). Built only by consolidation; create-or-update; merged in place. See "Topic consolidation" below.0_review/(human-judgment queue) — direction shifts + unresolved contradictions only. Everything else the strong model decides directly. Once the human resolves an item, apply it and delete the file.
Don't create or reference other folders (concepts/, entities/, synthesis/, next/, flat milestones/…). If a category has no real content this session, don't write it.
Writing philosophy (most important)
- The human doesn't hand-write the wiki. The LLM writes all categories — by summarizing what the human decided/realized this session, grounded in the transcript.
- But never fabricate opinions or decisions:
decision/insightcapture only decisions/realizations the human expressed. If not grounded, omit it rather than write it. (No model-collapse — keep the loop warm and human-present, not a self-feeding cron.) - Judge everything by is this useful to the next session. No filler, no obvious restatement.
- Write pages in the SAME language as the session/conversation (or the existing wiki pages) — do not force or translate to a fixed language; instructions are English but content matches the source.
- Regardless of the prose language, keep code identifiers, file paths, function/API names, CLI commands, config keys, and error strings VERBATIM (never translate/transliterate) — they are the language-invariant search anchors of the wiki.
- Terminology (lint-enforced, advisory): avoid jargon a person wouldn't naturally say — e.g. when writing Korean prefer
방향성over 진북/북극성,업데이트over distill. - Body structure: numbered sections holding a hierarchical bullet outline — write for a person scanning the page, not for a parser.
## 1. <label>,## 2. <label>… in reading order; split a section as### 1-1. <label>only when it genuinely has parts.- Use sections once a page carries more than one group of points (roughly 6+ top-level bullets). A short single-group page stays a bare bullet list under the TL;DR — no ceremony.
- Inside a section: one concrete claim, decision, result, or action per
-line; supporting detail at-; deeper detail at-. No fourth level — that means the section wants splitting.
- One point per line: a bullet that enumerates more than three items becomes a parent line plus one child bullet per item. Never a
·//-joined pile-up that a human has to re-parse (lint flags it asdense-bullet). - Endings: prefer noun phrases or telegraphic endings natural to the page language; avoid polite/full-sentence endings and abstract framing. Keep verbs when actor, action, condition, or outcome would otherwise be unclear.
- Density: keep each bullet to one useful line when possible; do not restate the heading/TL;DR or add a child that merely paraphrases its parent. Frontmatter, evidence/quotes, code, conflict/Q&A callouts, and the one-line TL;DR are exempt.
Topic consolidation (the heart of this ritual)
Turn this session's durable concepts into living 5_topic/ pages. Four moves:
- Surface candidates. Run
llmwiki consolidate <repo>(dry-run) to list which concepts this session touches and which already have a5_topic/page (FTS-matched). Also eyeballllmwiki topics <repo>(the deterministic topic view). - Select (be selective — this is the opposite of the log). Promote a concept to
5_topic/ONLY if one holds:- it recurs (mentioned across 2+ sessions / already has a topic page), OR
- it is explicitly durable (enriches an existing topic page), OR
- it is a concept directly tied to a decision/direction. Everything episodic stays in the log only. When unsure, leave it in the log.
- Merge (re-ground from raw — the anti-drift rule). For each selected concept:
- Update-vs-create by the 5-dimension overlap rubric (compound-engineering port): ①concept/problem ②mechanism ③approach ④files/modules ⑤operating rule. High(4-5 dims)=merge into the existing page, Moderate(2-3)=new page + note a consolidation-review line in the close-out report, Low=new page. Judge overlap semantically across languages — the same concept in Korean and English is ONE page (merge keeps the existing page's language; new bullets follow the session's language).
- No page yet → create
5_topic/<concept-slug>.md(format below). - Page exists → add the new fact as a bullet with its own citation; preserve every existing grounded line verbatim. Never rewrite the page from itself.
- Build the merge ONLY from the session transcript / raw evidence — never re-summarize other wiki pages (wiki→wiki re-derivation is forbidden; it causes drift).
- Cross-link + conflicts. Add wikilinks from the topic page to the relevant
3_decision/2_milestonepages using an explicit relation word (grounds,extends,contradicts,exemplifies,enables). If the new fact contradicts an existing line, do NOT overwrite — add a conflict callout on the page and route the resolution to0_reviewif it is a direction-level conflict.
5_topic/ page format
---
title: <concept / module / pattern name>
description: <one sentence>
date: YYYY-MM-DD
updated: YYYY-MM-DD
tags: [<hub>, topic]
status: ready # if direction-tied/unresolved → draft + 0_review
domain: topic
source: <transcript>.jsonl
---
TL;DR — one line.
## 1. <first group — what it is / what changed>
- <core fact / mechanism> [^s1]
- <supporting condition / result> [^s1]
- <deeper implementation detail, only when useful> [^s1]
- <a later session adds this; existing lines stay untouched> [^s2]
## 2. <second group — consequence / remaining work>
- <concrete point> [^s2]
### 2-1. <only when this group has parts>
- <concrete point> [^s2]
> [conflict] <other-page> claims X; this session says Y — needs human review
## Related
- [[3_decision/<page>]] — grounds
- [[2_milestone/<page>]] — exemplifies
[^s1]: <transcript-1>.jsonl
> [2026-06-29 14:02 user] "<the human's own words, verbatim>"
[^s2]: <transcript-2>.jsonl
> [tool a3f9c2d1] bun test → 272 passEach fact keeps its own footnote, so a topic page accumulates [^s1] [^s2] … from many sessions — provenance is per-claim, traceable down to the real transcript.
Evidence excerpts (page format v3) — the indented > line under a footnote carries 1–2 lines of the evidence itself, so a teammate who does NOT have your transcript can still read what grounds the claim:
- Get it from the engine, never from memory:
llmwiki excerpt <transcript.jsonl> [--kind judgment|fact]. It quotes verbatim, caps length, and screens secrets — a hand-written excerpt does all three wrong. - Judgment claims (decision · direction) take a
userquote — what the human actually said. Fact claims (milestone · insight) take a tool record ([tool <hash>]). Lint verifies judgment quotes really appear in the transcript. - The footnote definition line itself never changes — the excerpt goes on the NEXT line, indented 4 spaces. Appending to the definition line silently breaks teammate citations (
tests/page-format-v3.test.tspins this). - Excerpts are excluded from the search index and from the topic-page budget, so adding evidence never costs retrieval quality or squeezes prose.
Page frontmatter (required)
title description date tags(≥2) status(ready|draft) domain(direction|milestone|decision|insight|topic) source. Every fact/judgment claim needs a footnote [^1]: <transcript filename or bare code path> (a :line suffix is tolerated — the engine absorbs it — but the bare path is canonical: line numbers rot as code moves, and the verbatim grounding lives on the v3 evidence line). Cross-link related pages.
Never add author: — authorship is read from git, never cached in frontmatter (decision 2026-07-10): a stamped author goes stale the moment a teammate edits the page, and git already knows. llmwiki digest renders contributors from git history (mailmap-aware; ensureSkeleton seeds a .mailmap so one person's several git identities count once). Legacy pages that still carry author: are left as-is — historical records, not a format to continue. On a 0_review item, always stamp owner: <github login> — the file owner whose judgment is awaited (cold-start shows [→ owner]). Resolve the login as gh api user --jq .login → else git config user.email local-part → else git config user.name. Stamp it regardless of solo/team (not reliably distinguishable, and a file owner is useful either way).
Engine CLI (bun "<plugin-root>/src/cli.ts")
llmwiki update-status <repo>— list unprocessed transcripts (only those with tail after the watermark).llmwiki update-next <repo> <transcript>— extract only the unprocessed part of that transcript (incremental, cheap). First line:cwd/session/new_offset.llmwiki update-done <repo> <transcript> <offset>— advance the watermark (processed). Use--skippedfor noise.llmwiki consolidate <repo>— surface topic candidates for this session (dry-run);--commitruns the gated unattended merge (strong-model write→independent verify→grounding→lint). In a warm close-out, use dry-run to see candidates, then author/merge the pages yourself.llmwiki topics <repo>— deterministic topic view (pages clustered by shared tag/citation; no LLM, regenerable). Eyeball the encyclopedia's shape.llmwiki index <repo>/lint <repo> [--path <page>] [--errors-only]— close-out checks (indexrebuilds the refs graph too).--pathscopes lint to one page (write-time validation);--errors-onlyprints errors in full and collapses warnings to per-code counts (the backlog stays visible, context stays small).llmwiki review <repo> --commit --if-due— semantic review behind the engine-enforced cadence gate: skips deterministically unlessLLMWIKI_REVIEW_INTERVAL_DAYS(default 7) have passed since the last committed review (--forceoverrides). In a per-session close-out this is launched in the background (step 8) so the close-out never stalls on it; the engine stamps a launch marker and reportsprev_launch_incompleteon its next invocation if a backgrounded run died before committing.llmwiki reconcile <repo> --commit— advance the capture watermark for sessions a wiki page now cites (a warm close-out doesn't auto-advance it).llmwiki register-transcript <repo>— register this session's transcripts as citable sources so pages can cite the real session ([^1]: <transcript>.jsonl) instead of code.update-nextalready registers the transcript it processes; run this only if you wrote a page outside that flow.llmwiki excerpt <transcript.jsonl> [--kind judgment|fact] [--limit N]— candidate evidence excerpts for the v3 footnote continuation line (verbatim, capped, secret-screened).judgment= the human's own words (decision · direction pages);fact= tool records (milestone · insight).llmwiki digest <repo>— deterministic relational digest (hubs · freshness · 0_review). No LLM, regenerable.
$ARGUMENTS
Procedure (minutes, O(this session))
- REPO = the repo this session's WORK concerned — normally cwd (
$CLAUDE_PROJECT_DIR; argument none/here= current repo, or pass another repo's path). A session that ran from an enrolled home or any other catch-basin cwd while its edits went to a different enrolled repo files into THAT repo — you did the work warm, you know where it happened, andupdate-nextprints a deterministic# touched:/# ⚠ route:line for the cold case. Ifdocs/wiki/is missing, create it withllmwiki skeleton <repo>then proceed.
1b. 0_review first (announce, apply, delete): if docs/wiki/0_review/*.md exist, announce them in chat first ("0_review: N items — <titles>"). Two files are engine-managed and are NOT Q./A. items — never delete them here: gap-queue.md (persistent self-closing backlog) and semantic-review-*.md reports (inputs to llmwiki gaps; a review report is deleted only after its gaps have been folded into the queue in step 8). Skip both and process the rest. For each, check the A. line — if an answer is written, apply the Draft/resolution into the right category (or discard) and delete the file; if empty, show the Q. and get the answer, then apply and delete. After processing, 0_review/ should hold no Q./A. items.
- File THIS session into the log — current-session selection is EXACT, never nearest:
- Resolve the current session id (harness-provided, deterministic — never inferred from recency):
- Claude Code: run
printf '%s\n' "${CLAUDE_SESSION_ID:-$CLAUDE_CODE_SESSION_ID}"in Bash — the harness substitutes the first form inside command files, and the Bash subprocess env var covers every other case. - OpenCode: use the
[llmwiki] current OpenCode session id: …line injected into this command's prompt by the llmwiki plugin. - Codex:
session_idfrom the hook payload in context (it is also the rollout transcript's filename).
- Claude Code: run
- Run
llmwiki save-current <repo> --session <that id>— it resolves THIS session's transcript(s) by exact identity, enqueues them (manual save: the daemon's 50-line auto-capture threshold does NOT apply here), and prints their exact paths. - If save-current fails (no exact match): file NOTHING for this session. Report the failure in the close-out summary and continue with the remaining steps. Never fall back to the newest pending entry or any other session's transcript — a recency pick can select a different session or even a different harness and record someone else's work as this session's judgment.
llmwiki update-status <repo>→ from the pending list take only the path(s) save-current printed → for each,llmwiki update-next <repo> <transcript>(judge from the extract alone — never load the full transcript into context;update-nextprints a harness-summary block when one exists — use it as draft material but ground every claim in the raw extract). Route check first: the extract header's# touched:line lists the git roots this segment's file mutations landed in, and a# ⚠ route:advisory appears when the dominant root is NOT this repo — then file the session into the dominant repo's wiki (this procedure, with that repo as REPO) and afterwards advance the watermark where the transcript is actually queued:llmwiki update-done <bucket-repo> <transcript> <offset>. Thecwd=field cannot catch this — capture buckets by session cwd, so bucket and cwd agree even when every edit went elsewhere. From the extract, pick out only what the human actually said/decided/realized; discard model-generated analysis. Route by category (create a page only for categories that have content):- execution/measurement results + remaining TODOs →
2_milestone/(include numbers in the 1-line TL;DR if any,status: ready) - a realization/gotcha/learning the human expressed →
4_insight/(grounded → the strong model confirmsstatus: ready— no human sign-off) - a decision the human made →
3_decision/(ADR form; grounded → the strong model confirmsstatus: ready) - ambiguous classification → don't ask the human; the strong model confirms into the best-fit folder (not 0_review).
- only when direction/strategy actually shifted → file a Q./A. question/draft (format below) into
0_review/for the human. The transcript that produced a question file does not advance its watermark (unresolved, so it reappears next time). - not grounded → omit. Noise (trivial Q&A, no record value) → no page,
update-done --skipped. Then advance the watermark:llmwiki update-done <repo> <transcript> <new_offset>. Leave the rest of the backlog pending and report the count — it is safely queued behind byte watermarks for/wiki-deepor the unattendedautoupdatedaemon. Do NOT drain it inline: measured cost is ~40s+/session, so an 11-session backlog turns a close-out into a 10-minute wait. If 0 pending, skip.
- Resolve the current session id (harness-provided, deterministic — never inferred from recency):
2b. Same-topic weave-in (optional, zero pressure): run llmwiki related <repo> <this session's transcript> — deterministic (~0.5s on a 60-session backlog, no LLM), it matches the HUMAN's own utterances only (injected hook text and harness-fed user-role text like skill bodies are excluded by construction). If it lists candidates, mention them once. Weave one in ONLY when it would enrich a page this close-out is already writing (same topic page, same decision) — via the normal update-next → file → update-done flow, each woven session getting its own log entry. Skipping is the default and is final for today (self-selection): the list is candidates, never debt, and never a reason to recommend /wiki-deep.
- Consolidate the topic encyclopedia (5_topic) — per the "Topic consolidation" section above: dry-run
llmwiki consolidate <repo>→ select durable/recurring concepts only → create-or-update5_topic/<slug>.mdpages (add new facts with their own citations, preserve existing lines, build from the transcript/raw only) → cross-link with explicit relation words; flag contradictions as callouts (direction-level →0_review). - Refresh L0 freshness (the reading input — most important):
- Read
docs/wiki/current-state.mdand propose updating only the 'now (TL;DR)' and 'next (remaining work)' sections from this session + recent milestones + new topic pages. - Apply the compact hierarchy contract above to Now/Next: main state or task on
-, evidence/owner/blocker under-, and only necessary deeper detail under-. - L0 is the team handoff packet: on a shared wiki, write 'now/next' assuming the NEXT reader may be a teammate's session, not yours — name the owner on a 'next' item when it belongs to someone (
- <task> (→ name)). - Trim to the budget while you are here (~1,600 chars): L0 is injected whole at every cold start, so an over-budget L0 is a per-session tax the cold-start banner keeps flagging until someone acts — and "someone" is THIS step, because invoking the close-out is the moment the human has already accepted upkeep latency (2026-08-05 direction). Move displaced detail to the paired detail page (
current-state-detail.md, create it beside L0 if absent, link it from L0) — move, never delete: cutting content instead of relocating it silently discards the handoff. Keep only 'now'+'next' in L0 itself. - Direction and absolute rules are the human's. A direction change → propose a
1_direction/draft + a draft-marked direction section. Show as a diff; record after approval. Refreshupdated:.
- Read
- Update overview (keep it bounded — entry point, not a changelog): refresh
docs/wiki/overview.mdKey Findings only (concept/topic pointers — one line + link each). Do NOT prepend a per-session paragraph. Session-by-session history lives inlog.md(step 6) and the milestone pages — overview must not duplicate it. Then runllmwiki overview --normalize <repo>to enforce this structurally (it collapses any grown "Recent Updates" section to a single[[log.md]]pointer, preserves curated sections, and warns if the page is over budget — LLM-0, idempotent). Rationale: the entry point's size must stay O(tracks), not O(sessions), so it never approaches the context-overflow cliff (ref: LLM-Wiki-v3 namespace index, KnowledgeWeaver). - Log: append
## [YYYY-MM-DD] update | <one-line session>todocs/wiki/log.md(include topic pages touched). - Close out (deterministic):
llmwiki register-transcript <repo>→llmwiki index <repo>→llmwiki reconcile <repo> --commit→llmwiki lint <repo> --errors-only→llmwiki daemon-sync. The last is engine hygiene, one line, always exit 0: it restarts the capture daemon only when it predates the code on disk (observed 2026-08-21: a live daemon ran the day's fixes 209 minutes late because restarting relied on a human remembering launchctl). It rides here because the close-out is where upkeep latency is already consented to — never fail the close-out over it. Thanks to validate-as-you-write this should confirm 0 errors, not open a repair phase; fix any residue until 0 errors. Warnings arrive collapsed to per-code counts — report the counts as advisory backlog, don't over-format to silence them.- Unresolved-citation guard (never strip to silence): if lint flags
unresolved-citation, fix the footnote — never delete it (deleting only downgrades to ano-citationwarning and discards provenance). First decide the claim's KIND: a human decision / judgment / statement → the source is the session transcript, NOT code (normally already citable viaupdate-next; elsellmwiki register-transcript <repo>), cite[^n]: <transcript>.jsonl— never repoint a decision to a code file; a factual claim about code → cite one repo-relative path that exists. One path per footnote (no globs/commas/parentheticals); one footnote per source. Keep the definition LINE to the bare source — an evidence excerpt belongs on the indented line below it (v3), never appended to the definition, which would break teammate citations. Only if no real source exists, drop the underlying claim. - Maintenance signal (cheap; never repair here): run exactly this opt-in notice after lint. It records the notification cooldown but does not compact, VACUUM, or alter wiki pages:
If the CLI emits threshold guidance, report the measuredllmwiki db-health <repo> --noticedatabaseBytes,freeBytes, andfreeRatio = freeBytes / databaseBytes, then name/wiki-deepas the exact next pass. Otherwise reportmaintenance: no action. Never runcompact,VACUUM,wiki-clean, orwiki-clean-applyfrom/wiki-save.
- Unresolved-citation guard (never strip to silence): if lint flags
- Semantic review — engine-gated, launched in the background: whenever this session created or updated pages, launch
llmwiki review <repo> --commit --if-duein the background (harness background execution) and continue to the report immediately — never wait for it. Rationale: the review is the one heavy step in an otherwise minutes-scale close-out, and it hits every repo's first close-out unconditionally (no prior state → always due) — inline it breaks the latency contract exactly when first impressions matter; backgrounded, cadence and wall-clock are both kept. The engine skips it deterministically unless the cadence interval (~7 days,LLMWIKI_REVIEW_INTERVAL_DAYS) has passed since the last committed review — trust the gate; don't re-derive it fromlog.mdand don't--forcein a per-session close-out.- Silent-death check (required with backgrounding): if any review output you DO see carries
prev_launch_incomplete, report it in chat ("이전 백그라운드 리뷰가 커밋 없이 종료") — the cadence gate makes the died review due again, so this launch already re-runs it; the flag exists so a background death is never invisible. - Findings are durable, warmth is optional: the advisory draft lands in
0_review/(never edits live pages) and the next session's cold-start surfaces the0_reviewcount — nothing is lost by not waiting. If the background run happens to finish while this session is still open, handle findings warm: announce them in chat; for a real contradiction, add a> [conflict] …callout to the relevant5_topicpage (never overwrite), and route only direction-level conflicts to0_reviewfor the human. Otherwise that handling falls to the next close-out or/wiki-deep. - Then run
llmwiki gaps <repo>(fast, deterministic — folds committed reviews to date; today's backgrounded findings get folded on the next pass) to keep the tracked, self-closing0_review/gap-queue.mdcurrent (a gap auto-closes once review stops re-flagging it for 2 runs; review is bounded+cached by P1-A2). - Fast gap quota — fill at most 2 quick gaps now, oldest first, and only the cheap kinds: a
next-questioncross-link gap → add the wikilinks with explicit relation words, or the> [conflict]callout. Missing-concept pages and the rest of the queue are/wiki-deep's job — announce the open count. A deferred gap is never lost: it stays tracked in the queue until some pass fills it (never hand-edit the queue's<!-- gap:… -->markers).
- Silent-death check (required with backgrounding): if any review output you DO see carries
- Report (1–2 lines): "log reflected N (this session) / backlog deferred: B sessions / topic pages: created A, updated B / gaps filled K (open M) / 0_review pending N / L0 refreshed: yes/no / lint error·warn counts / review: launched-bg|not-due|prev-incomplete / maintenance: no-action|db
<databaseBytes>B free<freeBytes>B ratio<freeRatio>→/wiki-deep/ deep pass (/wiki-deep) recommended: yes/no (why)". Recommend/wiki-deeponly for WIKI-maintenance signals: lint showstopic-oversize· open gaps keep being deferred · the maintenance notice emits threshold guidance. The pending-backlog count is NEVER a reason to recommend it — un-filed past sessions are self-selection (2026-07-28), report the count as a bare fact and move on.
0_review file format — Q./A. form (no emojis)
After the routine-judgment rule, 0_review is almost entirely direction-shift confirmation. Labels/guidance in English; content (question + draft) in the wiki's own language. Separate paragraphs with blank lines so the human can write the answer directly under A.:
---
title: "[review] <short title>"
kind: direction # direction-shift confirmation (human-owned)
status: pending
created: <YYYY-MM-DD>
owner: <github login> # always stamp — file owner whose judgment is awaited; cold-start shows [→ owner]
source: <transcript filename>
---
Q. This session looks like a direction shift from <from> → <to>. Confirm?
A. (write your decision below; on the next /wiki-save or /wiki-deep the LLM applies it and deletes this file)
Draft (candidate 1_direction page; moved into 1_direction/ once confirmed):
<transcript-grounded summary + draft of the direction page to move on confirmation>Principles
- Supersession (never delete or rewrite a decision): when a new decision replaces an old one, write a NEW page and mark the old page in place — body untouched, frontmatter
status: superseded+superseded_by: <new page path>+superseded_at: YYYY-MM-DD(lint errors without the pointer). Search/turn-context auto-demote superseded pages, so never move them to an archive folder. Numeric confidence values (confidence: 0.85) are banned — certainty is expressed only through footnoted evidence chains. - Two layers: the log is immutable per-session truth; the topic encyclopedia is the living, merged synthesis. Promotion is one-directional (log → topic), never the reverse.
- Topic merges re-ground from the raw transcript, never from other wiki pages. transcript = immutable raw (citation only). Incremental: process only past the watermark → zero re-cost.
- Routine judgment (classification, grounding, topic merge) is the strong model's; direction and unresolved contradictions are the human's (omit, never fabricate).
- Be selective with
5_topic(opposite of the log): only durable/recurring concepts. Don't force-fill. Don't over-format to silence warnings. - Defer, don't drain: this pass defers volume work — transcripts are immutable; watermarks, the gap queue, and the lint backlog are durable and self-tracking. The backlog is raw material, not debt:
/wiki-deepfiles what is important and skips the rest, and unfiled records expire by design. Slowness, not deferral, is what loses information: a close-out people skip records nothing. - Concurrency-safe: mostly new pages + appends. Commits are in the user's name alone — only when instructed.
- Team merge recovery:
log.mdmerges automatically (merge=unionvia the skeleton's.gitattributes).gap-queue.mdandoverview.mdare whole-file regenerated — on a git conflict, take either side, then re-runllmwiki gaps <repo>/llmwiki overview --normalize <repo>; both converge. Never hand-merge their generated bodies. - Use
/wiki-saveto close out a session (this skill),/wiki-askfor a question,/wiki-deepfor the periodic deep pass (backlog · review · gaps · re-distill).
<!-- generated by src/plugin/build-assets.ts — edit skill/*.md, then re-run -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

