@cstart/coldstart 2.0.0 → 2.0.1
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 +81 -49
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -1,6 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<h1>❄️ coldstart</h1>
|
|
4
|
+
|
|
5
|
+
<p>
|
|
6
|
+
<b>Codebase navigation and a codebase notebook for AI agents.</b><br/>
|
|
7
|
+
Find the right file in milliseconds — and remember what the last session figured out.
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
<p>
|
|
11
|
+
<a href="https://www.npmjs.com/package/@cstart/coldstart"><img alt="npm version" src="https://img.shields.io/npm/v/%40cstart%2Fcoldstart?style=flat-square&label=npm&color=16708f&labelColor=0d1520"></a>
|
|
12
|
+
<img alt="node >= 18" src="https://img.shields.io/badge/node-%E2%89%A5%2018-16708f?style=flat-square&labelColor=0d1520">
|
|
13
|
+
<a href="#license"><img alt="MIT license" src="https://img.shields.io/badge/license-MIT-16708f?style=flat-square&labelColor=0d1520"></a>
|
|
14
|
+
<img alt="for Claude Code, Codex, Cursor" src="https://img.shields.io/badge/for-Claude%20Code%2C%20Codex%2C%20Cursor-c26714?style=flat-square&labelColor=0d1520">
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p>
|
|
18
|
+
<a href="https://akashgoenka.github.io/coldstart/"><b>Website</b></a> ·
|
|
19
|
+
<a href="https://akashgoenka.github.io/coldstart/docs.html"><b>Docs</b></a> ·
|
|
20
|
+
<a href="./PHILOSOPHY.md"><b>Philosophy</b></a> ·
|
|
21
|
+
<a href="https://www.npmjs.com/package/@cstart/coldstart"><b>npm</b></a>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
</div>
|
|
4
25
|
|
|
5
26
|
Two layers, one tool:
|
|
6
27
|
|
|
@@ -11,6 +32,43 @@ No embeddings, no model to run, no service to babysit. Agents are already good a
|
|
|
11
32
|
|
|
12
33
|
---
|
|
13
34
|
|
|
35
|
+
## Install
|
|
36
|
+
|
|
37
|
+
Requires Node.js 18+.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install -g @cstart/coldstart --legacy-peer-deps
|
|
41
|
+
cd your-project
|
|
42
|
+
coldstart init # navigation: coldstart.md + client wiring + background index warm-up
|
|
43
|
+
coldstart kb init # notebook: skeleton + capture/recall hooks (optional but recommended)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`init` asks two things — the **experience** (`cli`, recommended, or `mcp`) and the **client** — then writes a single `coldstart.md` at your repo root (the agent-facing guidance) and wires it in. Pass `--experience` / `--client` to skip the prompts. The client is never auto-detected; you always pick it.
|
|
47
|
+
|
|
48
|
+
- **Claude Code** → ensures `CLAUDE.md` imports it via `@coldstart.md`, and registers the find/gs search hooks in `.claude/settings.json` (a PostToolUse nudge + a PreToolUse find-dedup guard — merged into any existing settings, never overwriting them). The `mcp` experience also writes `.mcp.json`.
|
|
49
|
+
- **Codex** → adds a coldstart section to `AGENTS.md` and registers Codex-specific navigation plus notebook hooks in `.codex/hooks.json`. The capture hook understands Codex rollout and subagent transcripts. The `mcp` experience also writes `[mcp_servers.coldstart]` into `.codex/config.toml`.
|
|
50
|
+
- **Cursor** → writes `.cursor/rules/coldstart.mdc` (an always-applied rule referencing `@coldstart.md`) and registers Cursor-specific navigation plus notebook hooks in `.cursor/hooks.json` (a `preToolUse` find-dedup guard, a `postToolUse` nudge, `beforeSubmitPrompt` recall, and `stop`/`subagentStop` capture — merged into any existing hooks). The capture hook parses Cursor's own conversation transcript. The `mcp` experience also writes `.cursor/mcp.json`.
|
|
51
|
+
- **Other** → writes `coldstart.md` only, and prints the wiring directions (plus the MCP server entry for the `mcp` experience).
|
|
52
|
+
|
|
53
|
+
`init` then warms the index in the background, so your first lookup is instant. Re-running either init is safe — they never duplicate entries.
|
|
54
|
+
|
|
55
|
+
> [!IMPORTANT]
|
|
56
|
+
> **Why `--legacy-peer-deps`?** The tree-sitter grammar packages under-declare their peer-dep ranges (some say `^0.21.x`, others `^0.22.x`). Without the flag npm's strict resolver enters a long retry loop on a cold cache and can appear to hang. The flag tells npm to use our tested versions as-is. We can't set it from inside the package — npm reads install config only from your environment.
|
|
57
|
+
|
|
58
|
+
### Upgrading
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm install -g @cstart/coldstart@latest --legacy-peer-deps
|
|
62
|
+
coldstart init # re-run in each project to refresh coldstart.md
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
A version stamp in the keeper's lockfile makes the old background keeper shut down on the next lookup; a fresh one spawns from the new binary. No manual restart needed.
|
|
66
|
+
|
|
67
|
+
> [!NOTE]
|
|
68
|
+
> **Migrating from `coldstart-mcp`:** the package was renamed `coldstart-mcp` → **`coldstart`** at 2.0.0 (the CLI is now the primary surface). `coldstart-mcp` is deprecated but still installs; switch with `npm uninstall -g coldstart-mcp && npm install -g coldstart --legacy-peer-deps && coldstart init`. The `coldstart-mcp` binary name is kept as an alias, so existing MCP configs keep working.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
14
72
|
## The notebook
|
|
15
73
|
|
|
16
74
|
A repo-local knowledge base written and read by agents, in `.coldstart/notebook/`:
|
|
@@ -44,7 +102,8 @@ coldstart kb status / lint / render / init / migrate
|
|
|
44
102
|
|
|
45
103
|
**Language-agnostic.** The notebook's freshness machinery is content-hash based, so it works on any codebase — including languages the navigation index doesn't parse. Where the index does parse, notes additionally get symbol-level freshness.
|
|
46
104
|
|
|
47
|
-
|
|
105
|
+
> [!NOTE]
|
|
106
|
+
> **The notebook is young.** What's verified today: notes written by agents in real sessions checked out accurate against the code; the stale-note loop closes end-to-end (flag → re-read → correction); capture, recall, and concurrent writes hold up under stress. The bet — stated as a bet — is that a corpus like this compounds over a repo's lifetime: the second time any question comes up, the answer is one `Read` away instead of a re-derivation.
|
|
48
107
|
|
|
49
108
|
---
|
|
50
109
|
|
|
@@ -57,13 +116,23 @@ The notebook is young. What's verified today: notes written by agents in real se
|
|
|
57
116
|
|
|
58
117
|
The intended flow: **`find`** a concept → pick the best path → **`gs`** that file for its shape and who uses it → `Read` only for the implementation inside a method body. Notebook summaries ride along on `find` results, so often the orientation step answers itself.
|
|
59
118
|
|
|
119
|
+
```mermaid
|
|
120
|
+
flowchart LR
|
|
121
|
+
A["coldstart find<br/>which files?"] --> B["coldstart gs<br/>what is it? who uses it?"] --> C["Read<br/>just the method body"]
|
|
122
|
+
class A,B cold
|
|
123
|
+
class C warm
|
|
124
|
+
classDef cold stroke:#16708f,stroke-width:2px
|
|
125
|
+
classDef warm stroke:#c26714,stroke-width:2px
|
|
126
|
+
```
|
|
127
|
+
|
|
60
128
|
### `find` — locate the files for a concept
|
|
61
129
|
|
|
62
130
|
```bash
|
|
63
131
|
coldstart find auth session cookie
|
|
64
132
|
```
|
|
65
133
|
|
|
66
|
-
|
|
134
|
+
> [!TIP]
|
|
135
|
+
> **Pass every salient identifier** from your task — the symbol, the domain noun, the rare token you half-remember — not one distilled keyword. `find` ranks files by how many of your terms each one covers and shows, per file, which terms it defines vs. imports and a preview of the lines where they cluster. Often that's enough to answer without opening anything.
|
|
67
136
|
|
|
68
137
|
Speed-wise, `find` competes with raw grep: its repo-wide reference pass runs on **ripgrep** — yours from PATH, the bundled copy, or an editor's (`COLDSTART_RG` overrides) — with `git grep`/`grep` fallbacks, and the ranked page comes from the pre-built index, not a scan.
|
|
69
138
|
|
|
@@ -108,55 +177,18 @@ The notebook is the same philosophy applied to memory: coldstart still computes
|
|
|
108
177
|
|
|
109
178
|
---
|
|
110
179
|
|
|
111
|
-
## Install
|
|
112
|
-
|
|
113
|
-
Requires Node.js 18+.
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
npm install -g @cstart/coldstart --legacy-peer-deps
|
|
117
|
-
cd your-project
|
|
118
|
-
coldstart init # navigation: coldstart.md + client wiring + background index warm-up
|
|
119
|
-
coldstart kb init # notebook: skeleton + capture/recall hooks (optional but recommended)
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
`init` asks two things — the **experience** (`cli`, recommended, or `mcp`) and the **client** — then writes a single `coldstart.md` at your repo root (the agent-facing guidance) and wires it in. Pass `--experience` / `--client` to skip the prompts. The client is never auto-detected; you always pick it.
|
|
123
|
-
|
|
124
|
-
- **Claude Code** → ensures `CLAUDE.md` imports it via `@coldstart.md`, and registers the find/gs search hooks in `.claude/settings.json` (a PostToolUse nudge + a PreToolUse find-dedup guard — merged into any existing settings, never overwriting them). The `mcp` experience also writes `.mcp.json`.
|
|
125
|
-
- **Codex** → adds a coldstart section to `AGENTS.md` and registers Codex-specific navigation plus notebook hooks in `.codex/hooks.json`. The capture hook understands Codex rollout and subagent transcripts. The `mcp` experience also writes `[mcp_servers.coldstart]` into `.codex/config.toml`.
|
|
126
|
-
- **Cursor** → writes `.cursor/rules/coldstart.mdc` (an always-applied rule referencing `@coldstart.md`) and registers Cursor-specific navigation plus notebook hooks in `.cursor/hooks.json` (a `preToolUse` find-dedup guard, a `postToolUse` nudge, `beforeSubmitPrompt` recall, and `stop`/`subagentStop` capture — merged into any existing hooks). The capture hook parses Cursor's own conversation transcript. The `mcp` experience also writes `.cursor/mcp.json`.
|
|
127
|
-
- **Other** → writes `coldstart.md` only, and prints the wiring directions (plus the MCP server entry for the `mcp` experience).
|
|
128
|
-
|
|
129
|
-
`init` then warms the index in the background, so your first lookup is instant. Re-running either init is safe — they never duplicate entries.
|
|
130
|
-
|
|
131
|
-
> **Why `--legacy-peer-deps`?** The tree-sitter grammar packages under-declare their peer-dep ranges (some say `^0.21.x`, others `^0.22.x`). Without the flag npm's strict resolver enters a long retry loop on a cold cache and can appear to hang. The flag tells npm to use our tested versions as-is. We can't set it from inside the package — npm reads install config only from your environment.
|
|
132
|
-
|
|
133
|
-
### Upgrading
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
npm install -g @cstart/coldstart@latest --legacy-peer-deps
|
|
137
|
-
coldstart init # re-run in each project to refresh coldstart.md
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
A version stamp in the keeper's lockfile makes the old background keeper shut down on the next lookup; a fresh one spawns from the new binary. No manual restart needed.
|
|
141
|
-
|
|
142
|
-
> **Migrating from `coldstart-mcp`:** the package was renamed `coldstart-mcp` → **`coldstart`** at 2.0.0 (the CLI is now the primary surface). `coldstart-mcp` is deprecated but still installs; switch with `npm uninstall -g coldstart-mcp && npm install -g coldstart --legacy-peer-deps && coldstart init`. The `coldstart-mcp` binary name is kept as an alias, so existing MCP configs keep working.
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
180
|
## How the index stays fresh
|
|
147
181
|
|
|
148
182
|
coldstart is **one keeper, thin readers**:
|
|
149
183
|
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
coldstart find coldstart gs MCP server
|
|
159
|
-
(reads cache, prints) (reads cache, prints) (reads cache, stdio to client)
|
|
184
|
+
```mermaid
|
|
185
|
+
flowchart TD
|
|
186
|
+
K["keeper — coldstart --daemon<br/>watches repo, patches/rebuilds, saves cache<br/>serves nothing"] -->|debounced save| C[("on-disk cache")]
|
|
187
|
+
C --> F["coldstart find<br/>reads cache, prints"]
|
|
188
|
+
C --> G["coldstart gs<br/>reads cache, prints"]
|
|
189
|
+
C --> M["MCP server<br/>reads cache, stdio"]
|
|
190
|
+
class K cold
|
|
191
|
+
classDef cold stroke:#16708f,stroke-width:2px
|
|
160
192
|
```
|
|
161
193
|
|
|
162
194
|
- A single **keeper** process per repo watches the filesystem and keeps the on-disk cache current. It does **not** answer queries.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cstart/coldstart",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -29,10 +29,14 @@
|
|
|
29
29
|
"tree-sitter"
|
|
30
30
|
],
|
|
31
31
|
"license": "MIT",
|
|
32
|
+
"homepage": "https://akashgoenka.github.io/coldstart/",
|
|
32
33
|
"repository": {
|
|
33
34
|
"type": "git",
|
|
34
35
|
"url": "https://github.com/AkashGoenka/coldstart"
|
|
35
36
|
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/AkashGoenka/coldstart/issues"
|
|
39
|
+
},
|
|
36
40
|
"scripts": {
|
|
37
41
|
"build": "tsc --noEmit false",
|
|
38
42
|
"dev": "tsc --watch",
|