54d9540c08
Files changed: - .wikitool-kb.json - AGENTS.md - CHANGES.md - INSTALL-MCP.md - INSTALL.md - README.md - VERSION - instructions/capture-session.md - instructions/dev/issue-tracking.md - instructions/german-terminology.md - instructions/kb-profiles.md - instructions/migrate-corpus.md - instructions/migrations/5.0.0-confidence-removal.md - instructions/private-instance.md - instructions/setup-instance.md - instructions/wiki-lint/SKILL.md - instructions/wiki-manage/SKILL.md - instructions/wiki-query/SKILL.md - kb/CONTRACT.md - kb/CONVENTIONS.md - kb/CONVENTIONS.md.template - kb/concepts/architectures/Consolidation Tiers.md - kb/concepts/architectures/Context Isolation.md - kb/concepts/architectures/Cross-platform Agent Skills.md - kb/concepts/architectures/Episodic Memory.md - kb/concepts/architectures/Hybrid Search.md - kb/concepts/architectures/Implementation Spectrum.md - kb/concepts/architectures/Knowledge Graph.md - kb/concepts/architectures/LLM Wiki Pattern.md - kb/concepts/architectures/MCP-Leseserver.md - kb/concepts/architectures/Memory Lifecycle.md - kb/concepts/architectures/OKF Compatibility.md - kb/concepts/architectures/Optional Instance Context File.md - kb/concepts/architectures/Personalization Plane.md - kb/concepts/architectures/Procedural Memory.md - kb/concepts/architectures/RAG.md - kb/concepts/architectures/Scale Ceiling.md - kb/concepts/architectures/Semantic Memory.md - kb/concepts/architectures/Three-Layer Architecture.md - kb/concepts/architectures/Token Economics.md - kb/concepts/architectures/Working Memory.md - kb/concepts/decisions/Delete Rather Than Anonymize.md - kb/concepts/decisions/Denylist over Allowlist.md - kb/concepts/decisions/Diff-Reviewable Agent Edits.md - kb/concepts/decisions/Dual Licensing by File Plan.md - kb/concepts/decisions/Issue Label Scheme.md - kb/concepts/decisions/KB Stack Versioning.md - kb/concepts/decisions/Structural Enforcement over Documented Rule.md - kb/concepts/patterns/Audit Trail.md - kb/concepts/patterns/BM25.md - kb/concepts/patterns/Command Round-Trip Integrity.md - kb/concepts/patterns/Confidence Scoring.md - kb/concepts/patterns/Contradiction Resolution.md - kb/concepts/patterns/Entity Extraction.md - kb/concepts/patterns/Filter on Ingest.md - kb/concepts/patterns/Forgetting.md - kb/concepts/patterns/Graph Traversal.md - kb/concepts/patterns/Mesh Sync.md - kb/concepts/patterns/Quality Scoring.md - kb/concepts/patterns/Reciprocal Rank Fusion.md - kb/concepts/patterns/Self-Healing.md - kb/concepts/patterns/Shared vs Private.md - kb/concepts/patterns/Typed Relationships.md - kb/concepts/patterns/Vector Search.md - kb/concepts/patterns/Work Coordination.md - kb/concepts/problems/Ambient Environment Dependency.md - kb/concepts/problems/Detect-Repair Asymmetry.md - kb/concepts/problems/Green Suite Blind Spot.md - kb/concepts/problems/Naming Convention Conflict.md - kb/concepts/problems/Write-Once Frontmatter Fields.md - kb/concepts/protocols/CPPC.md - kb/concepts/protocols/Modbus.md - kb/concepts/protocols/SSD TRIM.md - kb/concepts/workflows/Anti-Cramming Heuristic.md - kb/concepts/workflows/Bulk Operations.md - kb/concepts/workflows/CI Integration.md - kb/concepts/workflows/Checkpoint Audit.md - kb/concepts/workflows/Claude Code Auto Mode.md - kb/concepts/workflows/Content Quality Control.md - kb/concepts/workflows/Crystallization.md - kb/concepts/workflows/Event-Driven Automation.md - kb/concepts/workflows/Hooks.md - kb/concepts/workflows/Index Scaling.md - kb/concepts/workflows/Iteration and Cost Limits.md - kb/concepts/workflows/KB Migration.md - kb/concepts/workflows/Knowledge Compounding.md - kb/concepts/workflows/Lint Workflow.md - kb/concepts/workflows/Mass-Update Gate.md - kb/concepts/workflows/Multi-Agent Collaboration.md - kb/concepts/workflows/Privacy and Governance.md - kb/concepts/workflows/Publish-Remote Gate.md - kb/concepts/workflows/Quality and Self-Correction.md - kb/concepts/workflows/Semantic Lint Automation.md - kb/concepts/workflows/Session Orientation.md - kb/concepts/workflows/Split Merge Reclassify.md - kb/concepts/workflows/Split Threshold.md - kb/concepts/workflows/Stub Threshold.md - kb/concepts/workflows/Supersession.md - kb/concepts/workflows/User Management.md - kb/concepts/workflows/Workflow Extraction.md - kb/concepts/workflows/Workflow Orchestration.md - kb/entities/people/Andrej Karpathy.md - kb/entities/people/E3DC GmbH.md - kb/entities/people/Rohit Gupta.md - kb/entities/people/Vannevar Bush.md - kb/entities/projects/BCDModule.md - kb/entities/projects/Chemenu.md - kb/entities/projects/andybalholm-edl.md - kb/entities/projects/goresponsiveness.md - kb/entities/projects/ha-core.md - kb/entities/projects/hacs-e3dc.md - kb/entities/projects/hacs-integration-blueprint.md - kb/entities/projects/llm-wiki-skills.md - kb/entities/projects/plugnburn-edl.md - kb/entities/projects/wiki-skills-vanillaflava.md - kb/entities/projects/wiki-skills.md - kb/entities/systems/AGENTS.md.md - kb/entities/systems/CLAUDE.md.md - kb/entities/systems/E3DC.md - kb/entities/systems/ENVIRONMENT.md.md - kb/entities/systems/Memex.md - kb/entities/systems/Tolkien Gateway.md - kb/entities/technologies/Arch Linux.md - kb/entities/technologies/Disk Encryption.md - kb/entities/technologies/Docker.md - kb/entities/technologies/GRUB.md - kb/entities/technologies/Gitea Actions.md - kb/entities/technologies/Gitea.md - kb/entities/technologies/Go.md - kb/entities/technologies/Home Assistant.md - kb/entities/technologies/Kernel PM Governors.md - kb/entities/technologies/LVM.md - kb/entities/technologies/Linux Kernel.md - kb/entities/technologies/MQTT.md - kb/entities/technologies/OPC UA.md - kb/entities/technologies/Python.md - kb/entities/technologies/Rust.md - kb/entities/technologies/Wine GE.md - kb/entities/technologies/Wine-Staging.md - kb/entities/technologies/acpi-cpufreq.md - kb/entities/technologies/amd-pstate.md - kb/entities/technologies/iii Engine.md - kb/entities/tools/AUR.md - kb/entities/tools/Act Runner.md - kb/entities/tools/Agent Memory.md - kb/entities/tools/Aura.md - kb/entities/tools/Bottles.md - kb/entities/tools/ChatGPT.md - kb/entities/tools/Claude Code.md - kb/entities/tools/Codex CLI.md - kb/entities/tools/Dataview.md - kb/entities/tools/GPG.md - kb/entities/tools/GitHub Copilot.md - kb/entities/tools/Gitea MCP Server.md - kb/entities/tools/Lutris.md - kb/entities/tools/Marp.md - kb/entities/tools/Mistral Vibe.md - kb/entities/tools/NotebookLM.md - kb/entities/tools/Obsidian Web Clipper.md - kb/entities/tools/Obsidian.md - kb/entities/tools/OpenAI Codex.md - kb/entities/tools/OpenCode.md - kb/entities/tools/Pi.md - kb/entities/tools/Proton.md - kb/entities/tools/Steam.md - kb/entities/tools/Wine.md - kb/entities/tools/awesome-llm-wiki.md - kb/entities/tools/farzaa gist.md - kb/entities/tools/gdeploy.md - kb/entities/tools/makepkg.md - kb/entities/tools/pascalandy schema.md - kb/entities/tools/qmd.md - kb/entities/tools/wikitool.md - kb/index.md - kb/log.md - raw/CONTRACT.md - tools/CONTRACT.md - tools/README.md - tools/chemenu/api.py - tools/chemenu/cli.py - tools/chemenu/commands/confidence_decay.py - tools/chemenu/commands/docs_verify.py - tools/chemenu/commands/doctor.py - tools/chemenu/commands/index_build.py - tools/chemenu/commands/new_page.py - tools/chemenu/commands/search.py - tools/chemenu/commands/touch.py - tools/chemenu/commands/version_cmd.py - tools/chemenu/conventions.py - tools/chemenu/corpus_diff.py - tools/chemenu/frontmatter_io.py - tools/chemenu/lint_core.py - tools/chemenu/mcp/server.py - tools/chemenu/page.py - tools/chemenu/search/base.py - tools/chemenu/search/filters.py - tools/chemenu/search/ripgrep.py - tools/chemenu/search/service.py - tools/chemenu/search/types.py - tools/chemenu/tests/conftest.py - tools/chemenu/tests/test_api.py - tools/chemenu/tests/test_confidence_decay.py - tools/chemenu/tests/test_corpus_diff.py - tools/chemenu/tests/test_docs_verify.py - tools/chemenu/tests/test_frontmatter_io.py - tools/chemenu/tests/test_index_build.py - tools/chemenu/tests/test_kb_scan.py - tools/chemenu/tests/test_lint.py - tools/chemenu/tests/test_mcp_server.py - tools/chemenu/tests/test_new_page.py - tools/chemenu/tests/test_page_ops.py - tools/chemenu/tests/test_provenance.py - tools/chemenu/tests/test_raw_cmd.py - tools/chemenu/tests/test_search.py - tools/chemenu/tests/test_touch.py - tools/chemenu/tests/test_type_resolver.py - tools/chemenu/tests/test_version_cmd.py - tools/chemenu/tests/test_xref.py - tools/chemenu/version.py - types/concept.md - types/concept.schema.yaml - types/entity.md - types/entity.schema.yaml - types/instruction.md - types/type-spec.md
186 lines
9.3 KiB
Markdown
186 lines
9.3 KiB
Markdown
---
|
|
type: types/instruction.md
|
|
name: capture-session
|
|
description: How to save a finished Claude Code session as one or more raw/notes/ transcripts and ingest each one, including how to cut a multi-topic session and why the ingests must not run in parallel.
|
|
manual: true
|
|
---
|
|
# Capture a finished session into the wiki
|
|
|
|
A working session produces knowledge that exists nowhere else: why a design came out the way it
|
|
did, what was tried and rejected, what a command actually printed. When the session ends, that
|
|
is gone. This procedure turns it into a `raw/` source and then into compiled pages, so a later
|
|
session can look it up instead of re-deriving it.
|
|
|
|
**Run this only when asked, by name.** It is `manual: true` for a reason: capturing every
|
|
session would fill `raw/` with material nobody will ever cite, and the judgment of "was this
|
|
session worth keeping" is the user's, not the agent's. Nothing links to this file from
|
|
`AGENTS.md` or a skill, and nothing should - a link there is exactly how a deliberate procedure
|
|
stops being deliberate.
|
|
|
|
<!-- wikitool:toc -->
|
|
## Contents
|
|
|
|
- [Where a session's output belongs](#where-a-sessions-output-belongs)
|
|
- [When to run](#when-to-run)
|
|
- [Steps](#steps)
|
|
- [1. Cut the session into topics](#1-cut-the-session-into-topics)
|
|
- [2. Fix the fidelity before writing a word](#2-fix-the-fidelity-before-writing-a-word)
|
|
- [3. Write each transcript](#3-write-each-transcript)
|
|
- [4. File what is still open, before ingesting](#4-file-what-is-still-open-before-ingesting)
|
|
- [5. Ingest, one transcript at a time](#5-ingest-one-transcript-at-a-time)
|
|
- [6. Verify the set, not just the last one](#6-verify-the-set-not-just-the-last-one)
|
|
- [Decision points](#decision-points)
|
|
<!-- /wikitool:toc -->
|
|
|
|
## Where a session's output belongs
|
|
|
|
Three surfaces, three jobs. Collapsing them is the failure this procedure exists to prevent.
|
|
|
|
| Surface | Holds | Lifetime |
|
|
|---------|-------|----------|
|
|
| `raw/notes/` | The transcript - **evidence** of what was said and done | Permanent, immutable |
|
|
| The issue tracker | What is still open: decisions not made, work not done | Until closed |
|
|
| `kb/` | What was learned, compiled into pages that stay true | Permanent, maintained |
|
|
|
|
A transcript is not a to-do list and not a project status. Live work belongs in issues, where it
|
|
has state and closure; a chat trace kept as the record of "what is happening now" forces every
|
|
later reader to reconstruct the state from a log. When this procedure finds an open thread in a
|
|
session, it files an issue and the transcript merely records that it did.
|
|
|
|
## When to run
|
|
|
|
- The user asks to capture, save, or ingest "this session" / "diesen Thread".
|
|
- A session ended with decisions or findings that exist only in its own scrollback.
|
|
|
|
Not for: a routine session that changed nothing worth citing, and never automatically at the end
|
|
of a session.
|
|
|
|
## Steps
|
|
|
|
### 1. Cut the session into topics
|
|
|
|
One transcript per topic, one topic per transcript. A session that fixed a bug, reorganised the
|
|
issue board, and argued about harness behaviour is three files, not one.
|
|
|
|
The reason is downstream: one raw file gets one source page, and a source page's `summary:`,
|
|
`entities:` and `concepts:` describe *one* thing. A three-topic file produces a source page that
|
|
describes none of them well, and every page citing it inherits that vagueness. Cutting late is
|
|
expensive - splitting a raw file after ingest means renaming a file every citation points at.
|
|
|
|
Cut where the *subject* changes, not where the day did. Signals that two stretches are one
|
|
topic: they share an artifact (the same module, the same issue), or one is the verification of
|
|
the other. Signals that they are two: a different part of the stack, a different audience for
|
|
the answer, or one is about the wiki and the other about the harness that operates it.
|
|
|
|
When a finding spans two topics, put it in **one** transcript in full and let the other
|
|
reference it by name. Two half-accounts produce two source pages claiming the same fact, which
|
|
`lint` will not catch because both are individually well-formed.
|
|
|
|
### 2. Fix the fidelity before writing a word
|
|
|
|
Capture is layered, and **the layer is decided at capture and never rises afterwards.** No
|
|
citation syntax and no later review can promote a paraphrase to a quote; only going back to the
|
|
original can, and a session's scrollback will not be there to go back to.
|
|
|
|
So decide, per passage, before writing:
|
|
|
|
- **Verbatim** - the user's instructions, decisions and objections; real command output; issue
|
|
text quoted from the tracker. Anything a later page might quote or a reader might need to
|
|
check word-for-word.
|
|
- **Paraphrase** - the agent's reasoning, the shape of an argument, what was read in what order.
|
|
Condensed on purpose. A page citing this may cite it, but must not quote it.
|
|
- **Second-hand** - material that reached the session through an intermediary: a subagent's
|
|
findings, a summary of a document nobody in the session opened. **Name the intermediary in
|
|
the transcript**, because the provenance chain has a party in the middle whose fidelity is an
|
|
assumption.
|
|
|
|
If a passage is likely to be load-bearing - a number, a path, a version, a command line, a
|
|
decision the user made - quote it verbatim now. Promoting it later is not possible.
|
|
|
|
### 3. Write each transcript
|
|
|
|
Filename: `raw/notes/Conversation Transcript - <Topic> Session <YYYY-MM-DD>.md`. Match the
|
|
existing files; a comma in the topic phrase is fine and correctly quoted on write.
|
|
|
|
Every transcript opens with a header block declaring what the reader is holding:
|
|
|
|
```markdown
|
|
# Conversation Transcript - <Topic> Session
|
|
|
|
> Source: Claude Code session (`<model>`), <workspace> workspace
|
|
> Collected: <YYYY-MM-DD>
|
|
> Participant: <name>
|
|
> Fidelity: **faithful summary transcript, not a verbatim log.** <What is quoted verbatim, what
|
|
> is condensed, and whether command outputs are real.>
|
|
> <Any second-hand material and its intermediary.>
|
|
> <Whether credentials appeared.>
|
|
> <If the session was cut: one of N transcripts, and what the others cover.>
|
|
|
|
<Two or three sentences: what this covers, which commits and issues resulted.>
|
|
```
|
|
|
|
Then the body, in turns. Per turn: the user's instruction verbatim as the heading or first line,
|
|
what was read or run, what was decided **and what was rejected**, and the evidence. Rejected
|
|
alternatives are the highest-value part and the first thing lost - a page can record what the
|
|
code does, but only the transcript records what it deliberately does not do.
|
|
|
|
Close with an outcome table: version, commits, tests, issues touched, CI.
|
|
|
|
Write the file with `Write`. Never with a shell heredoc: a transcript is long, and a heredoc
|
|
gives the user no diff to review.
|
|
|
|
### 4. File what is still open, before ingesting
|
|
|
|
Any thread the session left open - a gap in the tooling, an unchecked assumption, a decision
|
|
needing the user - becomes an issue now, not a paragraph in the transcript. Then the transcript
|
|
records the issue number, and the transcript stays what it is: evidence.
|
|
|
|
### 5. Ingest, one transcript at a time
|
|
|
|
Run `wiki-ingest` per transcript. **Sequentially. Never in parallel**, even when delegating to
|
|
subagents.
|
|
|
|
Concurrent ingests of the same corpus collide in three places, and each collision is a silent
|
|
lost write rather than an error:
|
|
|
|
- **Shared entity pages.** Two transcripts from one session almost always touch the same
|
|
entities. Two agents running `touch` or `xref add` against the same file overwrite each other.
|
|
- **Generated files.** `kb/index.md`, `kb/log.md` and `kb/provenance.md` are rebuilt wholesale;
|
|
the last writer wins and the others' entries vanish.
|
|
- **`publish`.** Two commits racing on one branch, and the Mass-Update Gate's `--confirm` token
|
|
digests a file list that the other run is still changing.
|
|
|
|
When delegating, give each subagent its own `WIKITOOL_SESSION_ID` so the budget is scoped per
|
|
transcript rather than shared - see [session-setup.md](session-setup.md). Several ingests are
|
|
several planned units, which is what makes a fresh id legitimate rather than a way around a
|
|
refusal ([gates.md](gates.md)).
|
|
|
|
Start the next one only after the previous has published and its tree is clean.
|
|
|
|
### 6. Verify the set, not just the last one
|
|
|
|
After the final ingest:
|
|
|
|
```bash
|
|
tools/wikitool sources coverage
|
|
tools/wikitool lint
|
|
```
|
|
|
|
`coverage` must report every new transcript as covered and no raw file claimed by two source
|
|
pages - the specific failure a badly cut session produces. `lint` must be clean.
|
|
|
|
## Decision points
|
|
|
|
- **One transcript or several?** Several, unless the whole session had one subject. The cost of
|
|
over-cutting is a few extra source pages; the cost of under-cutting is a source page that
|
|
describes nothing precisely, and it is paid by every page that cites it.
|
|
- **Is this worth capturing at all?** The test is whether a later session would ask a question
|
|
this transcript answers. "We shipped a release" is in the changelog. "We rejected the obvious
|
|
design and here is why" is not, and that is what earns a transcript.
|
|
- **Does the transcript go in before or after the work is published?** After. A transcript
|
|
written before the verification step records intentions, and the point of it is to record
|
|
what actually happened, including the parts that did not work.
|
|
- **The session discussed the harness, not the wiki.** Still worth capturing, in its own
|
|
transcript. It ingests into entities about the tooling environment rather than the stack, and
|
|
keeping it separate is what stops those pages from bleeding into the wiki's own concepts.
|