Skip to content

Commit 30cccf2

Browse files
committed
README update
1 parent 05990b5 commit 30cccf2

2 files changed

Lines changed: 79 additions & 5 deletions

File tree

README.md

Lines changed: 77 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,73 @@ A thread is a container for an **idea or project**, not just a feature or task.
1414

1515
---
1616

17+
## Claude Code Plugin
18+
19+
Threadlinking ships as a **Claude Code plugin** — when you run `threadlinking init`, it installs an MCP server that gives Claude direct access to threadlinking tools. Claude can create threads, save snippets, link files, and search context without you ever touching the CLI.
20+
21+
### MCP Tools
22+
23+
These are the tools Claude gets when the MCP server is active:
24+
25+
| Tool | What it does |
26+
|------|-------------|
27+
| `threadlinking_snippet` | Save decision context to a thread |
28+
| `threadlinking_create` | Create a new empty thread |
29+
| `threadlinking_attach` | Link a file to a thread |
30+
| `threadlinking_detach` | Unlink a file from a thread |
31+
| `threadlinking_explain` | Show why a file exists |
32+
| `threadlinking_show` | View full thread details |
33+
| `threadlinking_list` | List all threads + pending files |
34+
| `threadlinking_search` | Keyword search across threads |
35+
| `threadlinking_semantic_search` | Natural language search by meaning |
36+
| `threadlinking_analytics` | Usage stats and insights |
37+
| `threadlinking_export` | Export threads (markdown, JSON, timeline) |
38+
| `threadlinking_status` | Check available features and version |
39+
40+
### Slash Commands
41+
42+
The plugin adds slash commands you can use directly in Claude Code:
43+
44+
| Command | What it does |
45+
|---------|-------------|
46+
| `/threadlink <thread> "context" [file]` | Save context and optionally attach a file |
47+
| `/context [thread]` | List all threads, or show details of one |
48+
| `/explain <file>` | Show why a file exists |
49+
| `/save-context <thread> <context>` | Quick-save decision context |
50+
| `/context-capture [thread]` | Analyze the session and capture what was done and why |
51+
| `/thread-review [thread]` | Review full history of a thread |
52+
| `/find-context <query>` | Semantic + keyword search across threads |
53+
| `/thread-stats` | Usage analytics and insights |
54+
| `/explain-file <file>` | Show the decisions behind a file |
55+
56+
### Hooks
57+
58+
Two Claude Code hooks automate context tracking:
59+
60+
- **PostToolUse** — When Claude creates or edits a file, the hook automatically adds it to the pending files list so nothing slips through untracked.
61+
- **SessionStart** — At the start of every session, shows your active threads and any pending unlinked files, so Claude (and you) have immediate context.
62+
63+
### CLAUDE.md Integration
64+
65+
The init also appends instructions to your global `~/.claude/CLAUDE.md` that teach Claude *when* and *how* to save context — detecting decisions, prompting for thread names, and saving snippets at natural points in the conversation.
66+
67+
### Claude Desktop
68+
69+
The MCP server also works with Claude Desktop. Add it to your config manually:
70+
71+
```json
72+
// ~/Library/Application Support/Claude/claude_desktop_config.json
73+
{
74+
"mcpServers": {
75+
"threadlinking": {
76+
"command": "threadlinking-mcp"
77+
}
78+
}
79+
}
80+
```
81+
82+
---
83+
1784
## Installation
1885

1986
### Quick Start
@@ -99,11 +166,9 @@ See [Commands](#commands) for the full reference.
99166

100167
If you prefer to configure components individually instead of using `init`:
101168

102-
**MCP Server only** (Claude Desktop or Claude Code):
169+
**MCP Server only** (add to `~/.claude/mcp.json`):
103170

104171
```json
105-
// ~/.claude/mcp.json (Claude Code)
106-
// or ~/Library/Application Support/Claude/claude_desktop_config.json (Claude Desktop)
107172
{
108173
"mcpServers": {
109174
"threadlinking": {
@@ -113,11 +178,14 @@ If you prefer to configure components individually instead of using `init`:
113178
}
114179
```
115180

181+
For Claude Desktop, see [Claude Desktop](#claude-desktop) above.
182+
116183
### What Gets Installed
117184

118185
| Component | Purpose | Location |
119186
|-----------|---------|----------|
120187
| PostToolUse hook | Auto-tracks files you create/edit | `~/.claude/settings.json` |
188+
| SessionStart hook | Shows thread context at session start | `~/.claude/settings.json` |
121189
| MCP Server | Gives Claude direct tool access | `~/.claude/mcp.json` |
122190
| CLAUDE.md block | Teaches Claude when/how to use threadlinking | `~/.claude/CLAUDE.md` |
123191
| Ignore file | Filters noise from pending files | `~/.threadlinkingignore` |
@@ -307,7 +375,12 @@ threadlinking export --format markdown myproject # Single thread
307375

308376
## Data Storage
309377

310-
Everything is stored locally at `~/.threadlinking/thread_index.json`. No cloud, no sync — just a simple JSON file your team controls.
378+
Everything is stored locally at `~/.threadlinking/`. No cloud, no sync — just JSON files your team controls.
379+
380+
- `index.json` — thread metadata (names, summaries, file counts)
381+
- `threads/*.json` — one file per thread with snippets and linked files
382+
- `semantic_index/` — local embeddings for semantic search
383+
- `pending_files.json` — files edited but not yet linked
311384

312385
---
313386

plugin/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ Threads are long-lived containers that accumulate context over time.
9999
## Data Storage
100100

101101
All data is stored locally:
102-
- `~/.threadlinking/thread_index.json` - All threads and snippets
102+
- `~/.threadlinking/index.json` - Thread metadata (names, summaries, file counts)
103+
- `~/.threadlinking/threads/*.json` - One file per thread with snippets and linked files
103104
- `~/.threadlinking/semantic_index/` - Semantic search index
104105
- `~/.threadlinking/pending_files.json` - Tracked but unlinked files
105106

0 commit comments

Comments
 (0)