@davesheffer/hunch 0.9.0 → 0.10.0

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 CHANGED
@@ -124,6 +124,7 @@ they all consult the same memory:
124
124
  | Cursor | `.cursor/mcp.json` | `.cursor/rules/hunch.mdc` (always-applied) |
125
125
  | VS Code (Copilot) | `.vscode/mcp.json` | `.github/copilot-instructions.md` |
126
126
  | Codex CLI | `.codex/config.toml` | `AGENTS.md` |
127
+ | Windsurf | `.windsurf/mcp_config.json` | `.windsurf/rules/hunch.md` (always-on) |
127
128
  | Anything else | — | `AGENTS.md` (cross-tool standard) |
128
129
 
129
130
  Each writer **merges** into existing files (other MCP servers and your own prose are
@@ -133,7 +134,7 @@ preserved) and is idempotent. Opt out with `hunch init --no-providers`.
133
134
 
134
135
  | Command | What |
135
136
  |---|---|
136
- | `hunch init` | scaffold `.hunch/`, index, install hook + merge driver, auto-install the advisory pre-commit guard, install the **Claude Code agent hooks**, and wire up **every assistant** (Claude Code, Cursor, VS Code/Copilot, Codex, AGENTS.md). Flags: `--no-enforce`, `--enforce-strict`, `--no-providers`, `--no-agent-hooks`, `--firmness <level>` |
137
+ | `hunch init` | scaffold `.hunch/`, index, install hook + merge driver, auto-install the advisory pre-commit guard, install the **Claude Code agent hooks**, and wire up **every assistant** (Claude Code, Cursor, VS Code/Copilot, Codex, Windsurf, AGENTS.md). Flags: `--no-enforce`, `--enforce-strict`, `--no-providers`, `--no-agent-hooks`, `--firmness <level>` |
137
138
  | `hunch index` | parse repo → symbols / edges / components (deterministic, no LLM) |
138
139
  | `hunch backfill --since 90d` | replay git history → seed decisions |
139
140
  | `hunch sync [sha]` | turn a commit into a Decision (run automatically by the hook) |
@@ -11,6 +11,7 @@
11
11
  * Cursor | .cursor/mcp.json | mcpServers | .cursor/rules/hunch.mdc
12
12
  * VS Code | .vscode/mcp.json | servers (+type)| .github/copilot-instructions.md
13
13
  * Codex CLI | .codex/config.toml | [mcp_servers.*]| AGENTS.md
14
+ * Windsurf | .windsurf/mcp_config.json| mcpServers | .windsurf/rules/hunch.md
14
15
  * (any other) | — | — | AGENTS.md (cross-tool standard)
15
16
  *
16
17
  * Every writer MERGES into existing files (preserving other servers / user prose)
@@ -206,6 +207,25 @@ export function writeCursorRule(root, store) {
206
207
  writeFileSync(file, body);
207
208
  return file;
208
209
  }
210
+ /** Windsurf (Cascade): .windsurf/mcp_config.json — same `mcpServers` shape as
211
+ * Cursor. Repo-local (committed, shared via git) to match Hunch's other configs,
212
+ * rather than the global ~/.codeium/windsurf path. Merges; refuses to clobber. */
213
+ export function writeWindsurfMcp(root, inv) {
214
+ const file = join(root, ".windsurf", "mcp_config.json");
215
+ const json = readJsonObj(file);
216
+ json.mcpServers = json.mcpServers ?? {};
217
+ json.mcpServers.hunch = { command: inv.command, args: [...inv.args, "mcp"] };
218
+ return writeJson(file, json);
219
+ }
220
+ /** Windsurf project rule (.windsurf/rules/hunch.md). `trigger: always_on` keeps the
221
+ * Hunch grounding in Cascade's context for every request. Fully managed (overwritten). */
222
+ export function writeWindsurfRule(root, store) {
223
+ const file = join(root, ".windsurf", "rules", "hunch.md");
224
+ const body = `---\ntrigger: always_on\ndescription: Hunch engineering memory — consult the hunch_* MCP tools before editing\n---\n\n${renderHunchSection(store)}\n`;
225
+ mkdirSync(dirname(file), { recursive: true });
226
+ writeFileSync(file, body);
227
+ return file;
228
+ }
209
229
  /** Scaffold MCP config + grounding for all supported assistants. Returns a
210
230
  * per-assistant summary for `hunch init` to print. Each assistant is isolated:
211
231
  * a writer that refuses to clobber a malformed file degrades to a warning rather
@@ -215,6 +235,7 @@ export function scaffoldProviders(root, inv, store) {
215
235
  ["Cursor", () => [writeCursorMcp(root, inv), writeCursorRule(root, store)]],
216
236
  ["VS Code (Copilot)", () => [writeVscodeMcp(root, inv), writeCopilotInstructions(root, store)]],
217
237
  ["Codex CLI", () => [writeCodexConfig(root, inv)]],
238
+ ["Windsurf", () => [writeWindsurfMcp(root, inv), writeWindsurfRule(root, store)]],
218
239
  ["Any (AGENTS.md)", () => [writeAgentsMd(root, store)]],
219
240
  ];
220
241
  return tasks.map(([assistant, run]) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@davesheffer/hunch",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "license": "MIT",
5
5
  "author": "Dave Sheffer <dave.sheffer1@gmail.com>",
6
6
  "description": "Hunch — an Engineering Memory OS: a persistent, git-native reasoning graph over a codebase, exposed to Claude Code via MCP.",