Skip to content

Commit 76457f0

Browse files
committed
Add thread relationships, duplicate detection, CLI tips, and README improvements
1 parent 67cbdea commit 76457f0

22 files changed

Lines changed: 310 additions & 23 deletions

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"source": "url",
1111
"url": "https://github.com/thrialectics/threadlinking.git"
1212
},
13-
"version": "3.0.0",
13+
"version": "3.0.1",
1414
"description": "Preserve decision-making context across sessions by linking files to the decisions behind them"
1515
}
1616
]

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "threadlinking",
33
"description": "Preserve decision-making context across sessions by linking files to the decisions behind them",
4-
"version": "2.0.0",
4+
"version": "3.0.1",
55
"author": {
66
"name": "Marianne"
77
},

README.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
# Threadlinking
22

3-
> Preserve the decisions behind your code
3+
> Git tracks what changed. Threadlinking tracks **why**.
44
5-
Threadlinking is a Claude Code native tool for preserving decision-making context alongside the files you create.
5+
You built something three weeks ago. Now you're staring at it, trying to remember why you made that choice. The commit message says "add auth module" -- but why JWT? Why not sessions? What constraint drove that decision?
66

7-
Your team is working on a project. Files get created, design decisions are made, problems get solved. A week later, someone's looking at the code wondering:
7+
Threadlinking captures decision rationale alongside your code. It works natively with Claude Code -- Claude detects decisions as you make them, saves the reasoning, and surfaces it when you (or a teammate) come back later.
88

9-
> "Why was it built this way? What were we thinking?"
10-
11-
Threadlinking solves this by capturing decision rationale for your files and code, so you can trace your "why" across sessions, teammates, and repos.
12-
13-
A thread is a container for an **idea or project**, not just a feature or task. One thread might span months of work, dozens of files, and hundreds of snippets across multiple repos. When someone starts a new session next week, threadlinking connects it back to the earlier decisions, preserving context across the gaps.
9+
A **thread** is a container for an idea or project, not a task. One thread spans months of work, dozens of files, and hundreds of context snippets. When you start a new session weeks later, threadlinking connects it back to the earlier decisions.
1410

1511
---
1612

@@ -20,22 +16,22 @@ Threadlinking ships as a **Claude Code plugin** — when you run `threadlinking
2016

2117
### MCP Tools
2218

23-
These are the tools Claude gets when the MCP server is active:
19+
Threadlinking exposes 12 tools to Claude Code via MCP:
2420

25-
| Tool | What it does |
21+
| Tool | Description |
2622
|------|-------------|
27-
| `threadlinking_snippet` | Save decision context to a thread |
23+
| `threadlinking_snippet` | Add a context snippet to a thread (auto-creates thread if needed) |
2824
| `threadlinking_create` | Create a new empty thread |
2925
| `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 |
26+
| `threadlinking_detach` | Remove a file link from a thread |
27+
| `threadlinking_explain` | Show why a file exists — the decisions and reasoning behind it |
28+
| `threadlinking_show` | View full thread details including all snippets and linked files |
29+
| `threadlinking_list` | List all threads and pending unlinked files |
30+
| `threadlinking_search` | Search threads by keyword |
31+
| `threadlinking_semantic_search` | Search threads by semantic similarity |
32+
| `threadlinking_analytics` | Get usage analytics and insights |
33+
| `threadlinking_export` | Export thread(s) in markdown, JSON, or timeline format |
34+
| `threadlinking_status` | Check available features and index status |
3935

4036
### Slash Commands
4137

src/commands/attach.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ export const attachCommand = new Command('attach')
1010

1111
if (!result.success) {
1212
console.error(`Error: ${result.message}`);
13+
if (result.message?.includes('not found')) {
14+
console.error('Tip: Run `threadlinking list` to see available threads.');
15+
}
1316
process.exitCode = 1;
1417
return;
1518
}

src/commands/create.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ export const createCommand = new Command('create')
1515

1616
if (!result.success) {
1717
console.error(`Error: ${result.message}`);
18+
if (result.message?.includes('already exists')) {
19+
console.error('Tip: Use `threadlinking show <thread>` to view it, or choose a different name.');
20+
}
1821
process.exitCode = 1;
1922
return;
2023
}

src/commands/delete.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const deleteCommand = new Command('delete')
1414
const meta = loadMetaIndex();
1515
if (!meta.threads[validatedId]) {
1616
console.error(`Thread ID '${validatedId}' not found.`);
17+
console.error('Tip: Run `threadlinking list` to see available threads.');
1718
process.exitCode = 1;
1819
return;
1920
}

src/commands/detach.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ export const detachCommand = new Command('detach')
1010

1111
if (!result.success) {
1212
console.error(`Error: ${result.message}`);
13+
if (result.message?.includes('not found')) {
14+
console.error('Tip: Run `threadlinking list` to see available threads.');
15+
}
1316
process.exitCode = 1;
1417
return;
1518
}

src/commands/explain.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ export const explainCommand = new Command('explain')
1111

1212
if (!result.success) {
1313
console.error(`Error: ${result.message}`);
14+
if (result.message?.includes('not found')) {
15+
console.error('Tip: Run `threadlinking list` to see available threads.');
16+
}
1417
process.exitCode = 1;
1518
return;
1619
}

src/commands/init.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,8 @@ export const initCommand = new Command('init')
511511
}
512512
if (shouldInstall) {
513513
writeFileSync(GLOBAL_IGNORE_PATH, getDefaultIgnoreContent(), 'utf-8');
514-
console.log(' \u2713 Ignore file created\n');
514+
console.log(' \u2713 Ignore file created');
515+
console.log(' Tip: Run `threadlinking prune` to remove ignored files from pending.\n');
515516
} else {
516517
console.log(' Skipped\n');
517518
}

src/commands/reindex.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ export const reindexCommand = new Command('reindex')
1717
console.log(JSON.stringify({ error: result.message }, null, 2));
1818
} else {
1919
console.error(`Error: ${result.message}`);
20+
if (result.message?.includes('No threads') || result.message?.includes('No content')) {
21+
console.error('Tip: Create some snippets first with `threadlinking snippet <thread> "context"`');
22+
}
2023
}
2124
process.exit(1);
2225
}

0 commit comments

Comments
 (0)