devsmind-mcp 4.0.1 → 4.1.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 +22 -14
- package/dist/cli/index.js +17 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/integrations/memory-topics.d.ts +12 -7
- package/dist/cli/integrations/memory-topics.js +21 -14
- package/dist/cli/integrations/memory-topics.js.map +1 -1
- package/dist/cli/integrations/memory.d.ts +20 -13
- package/dist/cli/integrations/memory.js +27 -14
- package/dist/cli/integrations/memory.js.map +1 -1
- package/dist/cli/integrations/prompt.d.ts +3 -1
- package/dist/cli/integrations/prompt.js +3 -1
- package/dist/cli/integrations/prompt.js.map +1 -1
- package/dist/cli/integrations/registry.d.ts +39 -13
- package/dist/cli/integrations/registry.js +27 -20
- package/dist/cli/integrations/registry.js.map +1 -1
- package/dist/cli/integrations/skill.d.ts +17 -0
- package/dist/cli/integrations/skill.js +103 -0
- package/dist/cli/integrations/skill.js.map +1 -0
- package/dist/cli/rule.js +7 -1
- package/dist/cli/rule.js.map +1 -1
- package/dist/mcp/server.d.ts +3 -1
- package/dist/mcp/server.js +234 -10
- package/dist/mcp/server.js.map +1 -1
- package/dist/utils/edit.d.ts +14 -0
- package/dist/utils/edit.js +64 -0
- package/dist/utils/edit.js.map +1 -1
- package/package.json +1 -1
|
@@ -25,11 +25,10 @@ export interface RuleScope {
|
|
|
25
25
|
file: OsPath;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* Where
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* guidance instead of a write that might silently do nothing or get clobbered.
|
|
28
|
+
* Where a tool's own persistent agent-memory/skills store WOULD live — distinct from `rules`,
|
|
29
|
+
* which is a static file a human maintains. `devsmind memory` no longer writes here (see
|
|
30
|
+
* `IdeTarget.memory`'s doc comment) — kept as research, populated only for tools where it was
|
|
31
|
+
* once confirmed the tool actually read back a file it didn't create itself.
|
|
33
32
|
*/
|
|
34
33
|
export interface MemoryScope {
|
|
35
34
|
scope: Scope;
|
|
@@ -70,19 +69,34 @@ export interface IdeTarget {
|
|
|
70
69
|
wrap?: (body: string) => string;
|
|
71
70
|
};
|
|
72
71
|
memory: {
|
|
73
|
-
/**
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
|
|
72
|
+
/** Whether this tool has a genuine background/persistent memory concept AT ALL — independent
|
|
73
|
+
* of whether DevsMind could ever write to it (it doesn't try, see integrations/memory.ts).
|
|
74
|
+
* `false` means asking the tool to "remember this" has nothing to attach to: no store exists,
|
|
75
|
+
* so `devsmind memory` skips straight to pointing at `devsmind skill` instead of printing a
|
|
76
|
+
* prompt that would just get acknowledged and dropped. Confirmed `false` for Antigravity
|
|
77
|
+
* (IDE + CLI — its only persistence is Skills), Codex (no documented explicit-ask trigger for
|
|
78
|
+
* its opaque `~/.codex/memories/`), and Kiro (steering is static; its Knowledge store is
|
|
79
|
+
* explicit-command-only, not autonomous). `true` for the other five, even where the
|
|
80
|
+
* mechanism itself is shaky (Cursor requires manual approval; still real enough to ask). */
|
|
81
|
+
hasRealMechanism: boolean;
|
|
79
82
|
/** The tool's own name for this feature — use it verbatim in prompts, not a generic "memory". */
|
|
80
83
|
featureName: string;
|
|
84
|
+
/** AI-voiced, one or two sentences — how THIS tool's memory actually gets saved, inserted
|
|
85
|
+
* directly into the pasted prompt itself (unlike `note` below, which is human-facing and
|
|
86
|
+
* printed separately in the terminal, never pasted). Only meaningful when
|
|
87
|
+
* `hasRealMechanism` is true; the substance mirrors `note` but rephrased for the AI reading
|
|
88
|
+
* it as part of the request rather than for the developer deciding whether to run the
|
|
89
|
+
* command. E.g. Cursor's memory only saves once the human approves what the agent proposes,
|
|
90
|
+
* so the agent needs to be told to propose it, not just silently "remember" it. */
|
|
91
|
+
askHint?: string;
|
|
81
92
|
scopes?: MemoryScope[];
|
|
82
93
|
wrap?: (body: string) => string;
|
|
83
|
-
/** The one-line caveat shown alongside the printed prompt
|
|
94
|
+
/** The one-line caveat shown alongside the printed prompt (or, when `hasRealMechanism` is
|
|
95
|
+
* false, alongside the skip message explaining why there's nothing to ask). Human-facing —
|
|
96
|
+
* printed separately in the terminal, never part of the pasted prompt itself (see `askHint`). */
|
|
84
97
|
note: string;
|
|
85
|
-
/** Unused by `devsmind memory`
|
|
98
|
+
/** Unused by `devsmind memory` — retained only alongside `scopes` as research, in case a
|
|
99
|
+
* genuinely safe write target ever becomes available again. */
|
|
86
100
|
pointerFile?: {
|
|
87
101
|
file: string;
|
|
88
102
|
style: 'append-section';
|
|
@@ -123,5 +137,17 @@ export declare function resolveOsPath(p: OsPath): string;
|
|
|
123
137
|
* Project scopes are joined onto `workspaceRoot`; global scopes are absolute.
|
|
124
138
|
*/
|
|
125
139
|
export declare function resolveScopeFile(file: OsPath, scope: Scope, workspaceRoot: string): string;
|
|
140
|
+
/**
|
|
141
|
+
* Skill format: YAML frontmatter (name + description) + markdown body.
|
|
142
|
+
*
|
|
143
|
+
* Shared by every target that reads `.agents/skills/` — Antigravity (IDE + CLI) and Codex all
|
|
144
|
+
* discover the SAME `.agents/skills/devsmind/SKILL.md`. One wrap, deliberately: these writes are
|
|
145
|
+
* whole-file (`standalone`), so per-tool frontmatter would mean whichever command ran last
|
|
146
|
+
* silently rewrote the others' file. Identical bytes make that collision a no-op instead.
|
|
147
|
+
*/
|
|
148
|
+
export declare const skillMdWrap: (body: string) => string;
|
|
149
|
+
/** The one skill location all `.agents/skills/` readers share. See {@link skillMdWrap}.
|
|
150
|
+
* Also the write target for `devsmind skill` (src/cli/integrations/skill.ts). */
|
|
151
|
+
export declare const AGENTS_SKILL_SCOPE: MemoryScope;
|
|
126
152
|
export declare const TARGETS: IdeTarget[];
|
|
127
153
|
export declare function getTarget(id: string): IdeTarget | undefined;
|
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.TARGETS = void 0;
|
|
36
|
+
exports.TARGETS = exports.AGENTS_SKILL_SCOPE = exports.skillMdWrap = void 0;
|
|
37
37
|
exports.stdioEntry = stdioEntry;
|
|
38
38
|
exports.httpEntry = httpEntry;
|
|
39
39
|
exports.resolveOsPath = resolveOsPath;
|
|
@@ -115,8 +115,10 @@ const cursorMdcWrap = (body) => `---\ndescription: DevsMind — Team AI Brain wo
|
|
|
115
115
|
* silently rewrote the others' file. Identical bytes make that collision a no-op instead.
|
|
116
116
|
*/
|
|
117
117
|
const skillMdWrap = (body) => `---\nname: devsmind\ndescription: DevsMind team code-graph MCP server — when and how to use it\n---\n\n${body}\n`;
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
exports.skillMdWrap = skillMdWrap;
|
|
119
|
+
/** The one skill location all `.agents/skills/` readers share. See {@link skillMdWrap}.
|
|
120
|
+
* Also the write target for `devsmind skill` (src/cli/integrations/skill.ts). */
|
|
121
|
+
exports.AGENTS_SKILL_SCOPE = {
|
|
120
122
|
scope: 'project',
|
|
121
123
|
dir: '.agents/skills/devsmind',
|
|
122
124
|
file: 'SKILL.md',
|
|
@@ -151,7 +153,8 @@ exports.TARGETS = [
|
|
|
151
153
|
wrap: cursorMdcWrap,
|
|
152
154
|
},
|
|
153
155
|
memory: {
|
|
154
|
-
|
|
156
|
+
hasRealMechanism: true,
|
|
157
|
+
askHint: "You won't save this just by reading it — after this message, explicitly PROPOSE it as a Cursor Memory yourself, so the developer sees it and can approve it. Cursor only saves a memory once approved, even for an explicit request like this one.",
|
|
155
158
|
featureName: 'Memories',
|
|
156
159
|
note: 'Cursor\'s Memories are stored in an internal, undocumented database and only save after the agent proposes one and you approve it — there is no file DevsMind can safely write to. Ask the agent to remember the DevsMind workflow in conversation (e.g. "remember to always search_nodes before grep, and edit_node + commit_changes after every change") and approve the memory Cursor proposes.',
|
|
157
160
|
},
|
|
@@ -174,7 +177,8 @@ exports.TARGETS = [
|
|
|
174
177
|
style: 'append-section',
|
|
175
178
|
},
|
|
176
179
|
memory: {
|
|
177
|
-
|
|
180
|
+
hasRealMechanism: true,
|
|
181
|
+
askHint: "Copilot Memory builds up from real usage over several sessions rather than saving instantly from one request — treat this less as a single save and more as the first strong signal. The developer can check what's actually landed with the \"Chat: Show Memory Files\" command.",
|
|
178
182
|
featureName: 'Copilot Memory',
|
|
179
183
|
note: 'Copilot Memory has no documented write API and its file format has changed shape multiple times through 2026 — writing into it directly risks corrupting it. It should pick up the DevsMind workflow itself after a few real sessions using the tools; check what it has learned with the "Chat: Show Memory Files" command.',
|
|
180
184
|
},
|
|
@@ -196,7 +200,8 @@ exports.TARGETS = [
|
|
|
196
200
|
style: 'standalone',
|
|
197
201
|
},
|
|
198
202
|
memory: {
|
|
199
|
-
|
|
203
|
+
hasRealMechanism: true,
|
|
204
|
+
askHint: "Don't just acknowledge this — actually create a Cascade Memory of it now (e.g. by explicitly stating you're creating one), since that's the only way it persists past this conversation.",
|
|
200
205
|
featureName: 'Cascade Memories',
|
|
201
206
|
note: 'Cascade Memories are stored at ~/.codeium/windsurf/memories/, keyed per-workspace by a mechanism Windsurf doesn\'t document — there\'s no confirmed evidence a manually-placed file there is ever discovered. Ask Cascade directly to "create a memory of the DevsMind workflow" and it will generate one through its own supported path.',
|
|
202
207
|
},
|
|
@@ -218,7 +223,7 @@ exports.TARGETS = [
|
|
|
218
223
|
style: 'standalone',
|
|
219
224
|
},
|
|
220
225
|
memory: {
|
|
221
|
-
|
|
226
|
+
hasRealMechanism: false,
|
|
222
227
|
featureName: 'Knowledge / PR-comment learning',
|
|
223
228
|
note: 'Kiro has no file-based memory: its manual "Knowledge" store uses JSON + embeddings (not something safe to hand-write), and its autonomous agent\'s PR-comment-driven learning is an undocumented, AWS-internal, non-file-based store. The one thing DevsMind CAN influence — steering docs — is already handled by `devsmind rule`. To also engage the autonomous agent\'s learning, leave a PR review comment once, e.g. "always call search_nodes before grep, and edit_node + commit_changes after every change."',
|
|
224
229
|
},
|
|
@@ -241,10 +246,10 @@ exports.TARGETS = [
|
|
|
241
246
|
style: 'append-section',
|
|
242
247
|
},
|
|
243
248
|
memory: {
|
|
244
|
-
|
|
249
|
+
hasRealMechanism: false,
|
|
245
250
|
featureName: 'Skills (/learn)',
|
|
246
|
-
scopes: [AGENTS_SKILL_SCOPE],
|
|
247
|
-
wrap: skillMdWrap,
|
|
251
|
+
scopes: [exports.AGENTS_SKILL_SCOPE],
|
|
252
|
+
wrap: exports.skillMdWrap,
|
|
248
253
|
note: 'Antigravity discovers skills by scanning .agents/skills/ for any SKILL.md — same mechanism whether it was created via /learn or placed here directly. Codex reads this same file.',
|
|
249
254
|
},
|
|
250
255
|
},
|
|
@@ -273,7 +278,8 @@ exports.TARGETS = [
|
|
|
273
278
|
style: 'append-section',
|
|
274
279
|
},
|
|
275
280
|
memory: {
|
|
276
|
-
|
|
281
|
+
hasRealMechanism: true,
|
|
282
|
+
askHint: "This is exactly the kind of explicit request Auto Memory saves reliably from — go ahead and save it now.",
|
|
277
283
|
featureName: 'Auto Memory',
|
|
278
284
|
scopes: [
|
|
279
285
|
{ scope: 'global', dir: '~/.claude/projects', format: 'memory-files', needsUserConfirmedDir: true },
|
|
@@ -299,10 +305,10 @@ exports.TARGETS = [
|
|
|
299
305
|
style: 'append-section',
|
|
300
306
|
},
|
|
301
307
|
memory: {
|
|
302
|
-
|
|
308
|
+
hasRealMechanism: false,
|
|
303
309
|
featureName: 'Skills (/learn)',
|
|
304
|
-
scopes: [AGENTS_SKILL_SCOPE],
|
|
305
|
-
wrap: skillMdWrap,
|
|
310
|
+
scopes: [exports.AGENTS_SKILL_SCOPE],
|
|
311
|
+
wrap: exports.skillMdWrap,
|
|
306
312
|
note: 'Same Skills mechanism as the Antigravity IDE — the CLI\'s /skills command browses this same .agents/skills/ directory.',
|
|
307
313
|
},
|
|
308
314
|
},
|
|
@@ -327,10 +333,10 @@ exports.TARGETS = [
|
|
|
327
333
|
style: 'append-section',
|
|
328
334
|
},
|
|
329
335
|
memory: {
|
|
330
|
-
|
|
336
|
+
hasRealMechanism: false,
|
|
331
337
|
featureName: 'Skills',
|
|
332
|
-
scopes: [AGENTS_SKILL_SCOPE],
|
|
333
|
-
wrap: skillMdWrap,
|
|
338
|
+
scopes: [exports.AGENTS_SKILL_SCOPE],
|
|
339
|
+
wrap: exports.skillMdWrap,
|
|
334
340
|
// Codex has two stores and only one of them is ours to write. `~/.codex/memories/` is
|
|
335
341
|
// generated state its own docs warn against hand-editing ("don't rely on editing them by
|
|
336
342
|
// hand") and a background job regenerates — untouched, here and everywhere else. Skills are
|
|
@@ -360,9 +366,10 @@ exports.TARGETS = [
|
|
|
360
366
|
style: 'append-section',
|
|
361
367
|
},
|
|
362
368
|
memory: {
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
369
|
+
hasRealMechanism: true,
|
|
370
|
+
askHint: "Save this now, but don't treat it as guaranteed — your own docs describe auto-memory as best-effort (QWEN.md is the tool's guaranteed fallback, already covered by devsmind rule).",
|
|
371
|
+
featureName: 'Auto-Memory',
|
|
372
|
+
note: 'Auto-Memory is real: an Extract/Recall/Dream background cycle at ~/.qwen/projects/<project>/memory/, on by default. Qwen\'s own docs call it out plainly — "auto-memory is best-effort, QWEN.md is guaranteed" — so treat this as a helpful extra, not a substitute for the rule already placed in QWEN.md by `devsmind rule`.',
|
|
366
373
|
},
|
|
367
374
|
},
|
|
368
375
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/cli/integrations/registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/cli/integrations/registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsIA,gCAIC;AAID,8BAEC;AAKD,sCAMC;AAMD,4CAMC;AAiTD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AE,CAAC,YAAY,CAAC,EAAE;aAClG;YACD,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;YAC7B,KAAK,EAAE,YAAY;YACnB,YAAY,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CACvB,CAAC,KAAK,OAAO;gBACX,CAAC,CAAC,wDAAwD,GAAG,CAAC,UAAU,GAAG;gBAC3E,CAAC,CAAC,0CAA0C,OAAO,CAAC,GAAG,CAAC,EAAE;YAC9D,IAAI,EAAE,sDAAsD;SAC7D;QACD,KAAK,EAAE;YACL,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;YAC/C,KAAK,EAAE,gBAAgB;SACxB;QACD,MAAM,EAAE;YACN,gBAAgB,EAAE,IAAI;YACtB,OAAO,EAAE,oLAAoL;YAC7L,WAAW,EAAE,aAAa;YAC1B,IAAI,EAAE,gUAAgU;SACvU;KACF;CACF,CAAC;AAEF,SAAgB,SAAS,CAAC,EAAU;IAClC,OAAO,eAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `devsmind skill` — writes ONE file, `.agents/skills/devsmind/SKILL.md`, holding the full
|
|
3
|
+
* DevsMind workflow contract as a standalone, explicitly-invokable document. Deliberately a
|
|
4
|
+
* single file at a single location, not a per-tool writer: Antigravity, Antigravity CLI, and
|
|
5
|
+
* Codex all already discover exactly this path (`AGENTS_SKILL_SCOPE`, shared with the old
|
|
6
|
+
* memory write path before `devsmind memory` went print-only), and Claude Code/Cursor are
|
|
7
|
+
* documented to read the same `.agents/skills/` convention too — one file, several tools,
|
|
8
|
+
* rather than juggling a different format/path per tool for a marginal reliability gain.
|
|
9
|
+
*
|
|
10
|
+
* Idempotent: re-running always regenerates the same content from the live `MEMORY_TOPICS`
|
|
11
|
+
* (via `renderCombined`), so it never drifts from the retired-tool-name checks that content
|
|
12
|
+
* already goes through.
|
|
13
|
+
*/
|
|
14
|
+
export declare function handleSkill(opts: {
|
|
15
|
+
path?: string;
|
|
16
|
+
print?: boolean;
|
|
17
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.handleSkill = handleSkill;
|
|
37
|
+
const path = __importStar(require("path"));
|
|
38
|
+
const config_1 = require("../../utils/config");
|
|
39
|
+
const registry_1 = require("./registry");
|
|
40
|
+
const memory_topics_1 = require("./memory-topics");
|
|
41
|
+
const prompt_1 = require("./prompt");
|
|
42
|
+
const HEADER = '# DevsMind — AI Workflow Skill\n\n';
|
|
43
|
+
/**
|
|
44
|
+
* `devsmind skill` — writes ONE file, `.agents/skills/devsmind/SKILL.md`, holding the full
|
|
45
|
+
* DevsMind workflow contract as a standalone, explicitly-invokable document. Deliberately a
|
|
46
|
+
* single file at a single location, not a per-tool writer: Antigravity, Antigravity CLI, and
|
|
47
|
+
* Codex all already discover exactly this path (`AGENTS_SKILL_SCOPE`, shared with the old
|
|
48
|
+
* memory write path before `devsmind memory` went print-only), and Claude Code/Cursor are
|
|
49
|
+
* documented to read the same `.agents/skills/` convention too — one file, several tools,
|
|
50
|
+
* rather than juggling a different format/path per tool for a marginal reliability gain.
|
|
51
|
+
*
|
|
52
|
+
* Idempotent: re-running always regenerates the same content from the live `MEMORY_TOPICS`
|
|
53
|
+
* (via `renderCombined`), so it never drifts from the retired-tool-name checks that content
|
|
54
|
+
* already goes through.
|
|
55
|
+
*/
|
|
56
|
+
async function handleSkill(opts) {
|
|
57
|
+
const devmindDir = (0, config_1.resolveDevmindDir)(opts.path);
|
|
58
|
+
const workspaceRoot = devmindDir ? path.dirname(devmindDir) : process.cwd();
|
|
59
|
+
const relPath = `${registry_1.AGENTS_SKILL_SCOPE.dir}/${registry_1.AGENTS_SKILL_SCOPE.file}`;
|
|
60
|
+
const filePath = (0, registry_1.resolveScopeFile)(relPath, registry_1.AGENTS_SKILL_SCOPE.scope, workspaceRoot);
|
|
61
|
+
const body = (0, memory_topics_1.renderCombined)(HEADER);
|
|
62
|
+
const merged = (0, prompt_1.mergeRuleFile)(filePath, body, 'standalone', registry_1.skillMdWrap);
|
|
63
|
+
if (merged.error) {
|
|
64
|
+
console.error(`\n❌ ${merged.error}`);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (opts.print || !process.stdout.isTTY) {
|
|
68
|
+
console.log(`\n📄 ${filePath.replace(/\\/g, '/')}\n`);
|
|
69
|
+
console.log(merged.preview);
|
|
70
|
+
printCoverageNote();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
console.log(`\n📝 Target: ${filePath.replace(/\\/g, '/')} (${merged.existed ? 'overwrite' : 'create new'})`);
|
|
74
|
+
console.log(`\nFile contents to be written:\n`);
|
|
75
|
+
console.log(indent(merged.preview));
|
|
76
|
+
try {
|
|
77
|
+
const ok = await (0, prompt_1.confirmPrompt)('Write this?', true);
|
|
78
|
+
if (!ok) {
|
|
79
|
+
console.log('\nAborted — nothing written.');
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
if (err instanceof prompt_1.CancelledError) {
|
|
85
|
+
console.log('\nCancelled.');
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
throw err;
|
|
89
|
+
}
|
|
90
|
+
(0, prompt_1.writeConfigFile)(filePath, merged.content);
|
|
91
|
+
console.log(`\n✅ DevsMind skill written to ${filePath.replace(/\\/g, '/')}`);
|
|
92
|
+
printCoverageNote();
|
|
93
|
+
}
|
|
94
|
+
function printCoverageNote() {
|
|
95
|
+
console.log(`\nℹ️ Discoverable today as a Skill by Antigravity, Antigravity CLI, and Codex ` +
|
|
96
|
+
`(invoke as \`/devsmind\` — Codex uses \`$devsmind\`). Claude Code and Cursor are documented ` +
|
|
97
|
+
`to read the same \`.agents/skills/\` convention and may pick it up too — check your tool's ` +
|
|
98
|
+
`own skills docs to confirm.`);
|
|
99
|
+
}
|
|
100
|
+
function indent(text) {
|
|
101
|
+
return text.split('\n').map(l => ' ' + l).join('\n');
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=skill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill.js","sourceRoot":"","sources":["../../../src/cli/integrations/skill.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,kCAyCC;AA9DD,2CAA6B;AAC7B,+CAAuD;AACvD,yCAA+E;AAC/E,mDAAiD;AACjD,qCAAyF;AAEzF,MAAM,MAAM,GAAG,oCAAoC,CAAC;AAEpD;;;;;;;;;;;;GAYG;AACI,KAAK,UAAU,WAAW,CAAC,IAAwC;IACxE,MAAM,UAAU,GAAG,IAAA,0BAAiB,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,MAAM,aAAa,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;IAC5E,MAAM,OAAO,GAAG,GAAG,6BAAkB,CAAC,GAAG,IAAI,6BAAkB,CAAC,IAAI,EAAE,CAAC;IACvE,MAAM,QAAQ,GAAG,IAAA,2BAAgB,EAAC,OAAO,EAAE,6BAAkB,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IAEpF,MAAM,IAAI,GAAG,IAAA,8BAAc,EAAC,MAAM,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,IAAA,sBAAa,EAAC,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,sBAAW,CAAC,CAAC;IACxE,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,OAAO,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QACrC,OAAO;IACT,CAAC;IAED,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACxC,OAAO,CAAC,GAAG,CAAC,QAAQ,QAAQ,CA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AAC,IAAY;IAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzD,CAAC"}
|
package/dist/cli/rule.js
CHANGED
|
@@ -82,6 +82,7 @@ function buildRule(config, devmindDir, workflowStyle = 'automatic') {
|
|
|
82
82
|
const commitRow = manual
|
|
83
83
|
? `| The developer explicitly asks you to commit/save/record this to DevsMind | ${bt}commit_changes${bt} — never on your own initiative |`
|
|
84
84
|
: `| Checkpoints during a long task, and before ending any turn with staged work | ${bt}commit_changes${bt} |`;
|
|
85
|
+
const stageChangeRow = `| A file already got edited WITHOUT ${bt}edit_node${bt} — your own editor's edit tool got used by mistake, or you're catching up on earlier work | ${bt}stage_change${bt} — same ${bt}file_path${bt}/${bt}old_string${bt}/${bt}new_string${bt} shape as ${bt}edit_node${bt}, but it never writes to the file: ${bt}new_string${bt} is expected to already be on disk, and it just traces + stages the change. Prefer ${bt}edit_node${bt} for every edit going forward — this only recovers one it missed |`;
|
|
85
86
|
const recordingHeader = manual
|
|
86
87
|
? '### Recording Changes — Manual: Only When Asked'
|
|
87
88
|
: '### Recording Changes — Per Node, Not Per File, Not At The End';
|
|
@@ -92,13 +93,17 @@ function buildRule(config, devmindDir, workflowStyle = 'automatic') {
|
|
|
92
93
|
`2. If the developer explicitly asks you to commit/save/record something ("commit this", "save that to devsmind", "record what we just did"), then follow the normal automatic-mode mechanics: ${bt}edit_node${bt} already staged whatever it traced; call ${bt}commit_changes${bt} with ${bt}message${bt} set to their request verbatim, ONE ${bt}reasoning${bt} (what_changed/why/goal) covering everything staged, and ${bt}feedback${bt} (5 strings: ${bt}graph_problems${bt}, ${bt}edge_problems${bt}, ${bt}tools_used${bt}, ${bt}dropped_and_why${bt}, ${bt}devsmind_better${bt} — each must be answered, ${bt}"none"${bt} is fine where nothing applies). All three are REQUIRED by the tool itself, not a style choice. If anything staged is a brand-NEW node, ${bt}commit_changes${bt} also requires a ${bt}description${bt} for it first (pass it on the ${bt}edit_node${bt} call that created it, or call ${bt}add_description${bt}) — enforced by the tool regardless of workflow style, not something MANUAL mode opts out of.`,
|
|
93
94
|
`3. ${bt}session_id${bt} is also mechanically required on every DevsMind WRITE regardless of mode (see above) — that's the protocol, not a recording obligation. Calling ${bt}start_session${bt} and carrying its id doesn't mean anything is being tracked; it's just what makes a write succeed at all. Read-only tools (${bt}search_nodes${bt}, ${bt}get_node_code${bt}, ${bt}get_activity_log${bt}, etc.) do NOT need it — search and read freely before ${bt}start_session${bt} has even run.`,
|
|
94
95
|
`4. Don't narrate that you skipped staging/committing — silence is the expected default here. Only bring up DevsMind's state when it's relevant or the developer asks.`,
|
|
96
|
+
`5. If you already edited a file with your own editor's tool before being asked to record it, ${bt}stage_change${bt} (same ${bt}old_string${bt}/${bt}new_string${bt} shape as ${bt}edit_node${bt}) traces and stages that already-applied change without rewriting the file — use it instead of redoing the edit through ${bt}edit_node${bt} just to get it staged.`,
|
|
97
|
+
`6. ${bt}commit_changes${bt} is NOT git and never touches it — same rule as above, but worth repeating: it writes only into DevsMind's own local graph, never ${bt}git add${bt}/${bt}git commit${bt}/${bt}git push${bt} or any other git command. Never run a real git commit on your own initiative here either — that's the developer's call, same as everything else on the write side in MANUAL mode.`,
|
|
95
98
|
] : [
|
|
96
99
|
`1. ${bt}edit_node${bt} is the write path for **every** file — never your own edit/write tool, whatever the extension. Pass ${bt}file_path${bt} + ${bt}old_string${bt} + ${bt}new_string${bt}, exactly like an ordinary edit tool; to create a file, pass ${bt}old_string: ""${bt} and the whole file as ${bt}new_string${bt}. It traces where your text landed to the function/class you actually changed, and answers with that node's callers. No ${bt}node_id${bt} to look up, no ${bt}code_snapshot${bt} to send back. Writes landing outside any function (markup, config, imports) get no graph node — expected, not a failure — but the whole-file change is still staged for the local activity log, so ${bt}commit_changes${bt} makes it revertable there too.`,
|
|
97
100
|
`2. Call ${bt}commit_changes${bt} at natural checkpoints (a batch of related nodes, a context switch) — not saved for a single end-of-task call that's easy to skip when the task runs long. ${bt}edit_node${bt} only stages; it never writes to the graph on its own. Always commit before ending a turn with anything staged.`,
|
|
98
101
|
`3. ${bt}message${bt}, ${bt}reasoning${bt} AND ${bt}feedback${bt} are all REQUIRED on ${bt}commit_changes${bt} — the call fails without any one of them. ${bt}message${bt} is the user's request, verbatim, that led to this commit; it builds a local activity log (${bt}devsmind view${bt} → Activity, never pushed) grouping your work by request and letting the user revert one as a whole. Pass the exact same text again on a later commit that's still answering the same request — that merges them into one entry instead of splitting it. ${bt}reasoning${bt} (${bt}what_changed${bt}/${bt}why${bt}/${bt}goal${bt}) is ONE object covering **everything staged since the last commit** — not one per edit_node call, one per commit — and gets recorded against every node that commit touches.`,
|
|
99
102
|
`4. ${bt}feedback${bt} is the third required field: 5 strings (${bt}graph_problems${bt}, ${bt}edge_problems${bt}, ${bt}tools_used${bt}, ${bt}dropped_and_why${bt}, ${bt}devsmind_better${bt}). Every field must be ANSWERED, but none has to contain a problem — ${bt}"none"${bt} is a valid answer everywhere. It's the only channel that improves DevsMind instead of leaving it frozen at index time, so before writing "none", actually check whether one moment in THIS task took an extra tool call, a guess, a re-read, or a wrong turn; one specific sentence with evidence (${bt}file:line${bt}) beats a reflexive "none". Never invent an issue to fill a field. ${bt}graph_problems${bt}/${bt}edge_problems${bt} feed a local graph-fix queue (${bt}read_graph_feedback${bt}); the rest feed a product log. Both are local and gitignored — ${bt}devsmind feedback${bt} shows them.`,
|
|
100
103
|
`5. Every brand-NEW node needs a ${bt}description${bt} before ${bt}commit_changes${bt} will accept it — 1-3 sentences of what it does and its domain concepts, in words a teammate might search by later, never a restatement of the name. If an ${bt}edit_node${bt} call creates exactly ONE new function/class, pass ${bt}description${bt} on that same call — you already know what you just wrote, so there's no reason to wait for the refusal and a separate round trip. Otherwise call ${bt}add_description${bt} for whatever ${bt}edit_node${bt} traced as new (its response tells you when). Write it while the code is still in front of you — commit_changes will otherwise refuse the batch and hand back exactly which node_ids need one.`,
|
|
101
|
-
`6. Don't print node/history data as text instead of calling the tools — that looks done but records nothing
|
|
104
|
+
`6. Don't print node/history data as text instead of calling the tools — that looks done but records nothing.`,
|
|
105
|
+
`7. If a file already got edited WITHOUT ${bt}edit_node${bt} — your own editor's edit tool got used by mistake, or you're catching up on work from before this session — don't leave it unstaged. Call ${bt}stage_change${bt} with the same ${bt}old_string${bt}/${bt}new_string${bt} shape; it traces and stages the already-applied change without touching the file.`,
|
|
106
|
+
`8. ${bt}commit_changes${bt} is NOT git — it never runs ${bt}git add${bt}/${bt}git commit${bt}/${bt}git push${bt} or any other git command, and never touches the actual git history, only DevsMind's own local graph. Calling it successfully is not a cue to now run a real git commit yourself: never ${bt}git add${bt}/${bt}git commit${bt}/${bt}git push${bt} on your own initiative just because ${bt}commit_changes${bt} succeeded or a task feels finished — that stays the developer's decision, made separately, only when explicitly asked for.`
|
|
102
107
|
];
|
|
103
108
|
const lines = [
|
|
104
109
|
'## DevsMind — AI Brain',
|
|
@@ -130,6 +135,7 @@ function buildRule(config, devmindDir, workflowStyle = 'automatic') {
|
|
|
130
135
|
`| What did a TEAMMATE change? / anything on a machine that isn't this one | ${bt}get_activity_log${bt} with ${bt}source:"both"${bt} — ${bt}"auto"${bt} stops at the local log the moment it has anything of your own, so it never surfaces other developers' work. Graph-backed entries come with a ${bt}caveats${bt} array (no revert status, ${bt}request${bt} degrades to the reasoning's Requirement) — read it before acting on them |`,
|
|
131
136
|
editRow,
|
|
132
137
|
createRow,
|
|
138
|
+
stageChangeRow,
|
|
133
139
|
commitRow,
|
|
134
140
|
`| Function/class renamed | ${bt}rename_node${bt} |`,
|
|
135
141
|
`| Function/class removed | ${bt}deprecate_node${bt} (never delete — history is lost otherwise) |`,
|
package/dist/cli/rule.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule.js","sourceRoot":"","sources":["../../src/cli/rule.ts"],"names":[],"mappings":";;;;;;;;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AC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,QAAQ,MAAM,CAAC,KAAK,KAAK,CAAC,CAAC;QACnG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,uBAAc,EAAE,CAAC;YAClC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;YAC5B,OAAO;QACT,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/dist/mcp/server.d.ts
CHANGED
|
@@ -9,7 +9,9 @@ export declare const DEVSMIND_PORT = 4513;
|
|
|
9
9
|
* `description` (resent every call), this is easy for a long session to lose
|
|
10
10
|
* track of too, so it should carry only what's genuinely cross-cutting.
|
|
11
11
|
*/
|
|
12
|
-
export declare const DEVSMIND_INSTRUCTIONS = "DevsMind is this team's persistent shared code memory \u2014 not a personal tool you reach for only when asked to search something. Every teammate's AI agent, in every session, reads from the SAME graph you are about to write to. There is no \"your copy.\"\n\nIf you skip recording a change, you are not skipping a formality. You are leaving the whole team's graph stale for every other AI agent that queries this code later \u2014 tomorrow, on a different task, in a different session. And the reasoning behind your change (why it was made, what ticket drove it, what was broken before, what you tried and rejected) exists ONLY in this conversation, right now. It is not in the diff. It is not in the commit message. If it isn't captured at commit_changes this turn, it is gone forever \u2014 no reindex, no log, no git blame can recover it later.\n\nNon-negotiable workflow:\n1. Call start_session once, before your first WRITE of the conversation (edit_node/commit_changes and the other mutating tools). It mints a session_id that every write REQUIRES \u2014 it ties a request's edits together on the local Activity log and makes them revertable as a unit \u2014 and every response echoes it back so it stays in front of you, including after a context compaction. Read-only tools (search_nodes, get_node_code, list_nodes, and the other getters) do NOT need it: search and read freely from the very first call. Never invent a session_id yourself; if a write errors saying session_id is required, start_session was skipped \u2014 call it now, then retry. If you are resuming a conversation that already called start_session earlier (visible in the reloaded history), reuse that same session_id instead of starting a new one.\n2. Before any filesystem search, grep, or file read: call search_nodes FIRST \u2014 it is now the one call for both \"find this node\" AND \"find where X lives across files\", so you should not need an external grep. Two inputs, pass either or both: a natural-language query (a real phrase \u2014 drives meaning-matching, so \"authentication\" finds a node described only as \"sign-in\") and/or pattern, a REAL regex used exactly as you'd give it to grep (e.g. \"heartRed|onLikeTap|item.liked\" \u2014 nothing is re-escaped or split for you). Pattern-only is a precision mode: exact grep + code-body matches, no semantic blur. It returns two buckets: nodes (the indexed graph \u2014 the primary answer for \"which function/class\", with a true nodes_total before the top-20 cap) and files (a real grep of every repo, or just the path scope if given \u2014 the answer for things the graph does not index: CSS, JSON, config, .env, markup, wiring like \"where is CORS configured\" or \"what mounts this middleware\" \u2014 each sample line reports which function/class it falls inside, and files_total tells you honestly whether there's more than the page shown; pass a bigger offset for the next page). Triage by each node's confidence and relevance, NOT by which name looks right to you \u2014 confidence reflects how many independent layers corroborated the hit, which your own reading of a name cannot. Lockfiles and build artifacts are excluded by default, so what comes back is real source. If the response carries a compacted field, it was trimmed to fit and says exactly what was dropped \u2014 all counts stay exact, and compact:false gets you the untrimmed payload. It only returns real evidence \u2014 genuinely-absent things come back empty with a hint; if so, retry once with a different pattern/query before concluding it is not there. Only drop to a manual grep/read if search_nodes itself says truncated, or you need full file context after it points you at the file.\n3. To read one function/class: call get_node_code instead of opening the file, and do not follow it with a file read for context \u2014 this is the ONE node-read call, not a lean summary. It already includes the file's imports, the node's own name/type/signature/description, up to 20 named callers AND callees per direction (with exact uses/used_by counts even when the lists are capped), and up to 40 other declarations from the same file (file_outline \u2014 this is how you tell \"was this renamed?\" or \"what else lives here\" without opening the file). Reach further in the SAME call instead of a second tool: graph_depth + graph_direction walks the transitive graph past the direct neighbors already included (add graph_code:true for a whole call flow's source in one round trip \u2014 if some nodes' code doesn't fit the budget they are named in graph.code_omitted_node_ids, so fetch exactly those rather than re-running blind), and history:\"full\" returns every revision with diffable edits, pageable with history_limit/history_offset. Every capped section is honest about it (*_truncated, *_hint) \u2014 a hint means more is reachable in this same call, not a dead end.\n4. Before touching any function's signature: get_node_code already includes its direct callers by name (used_by_nodes) \u2014 for the FULL transitive blast radius, pass graph_direction:\"in\" with a graph_depth of 2-3 in that same call. Git shows you what changed; it never shows you what depends on it. Find out before you break something, not after.\n5. Before refactoring: get_node_code already includes the last 3 changes' reasoning by default \u2014 for the full revision trail with diffable before/after edits, pass history:\"full\" in that same call. Git blame tells you who and when; it never tells you why. The actual decision context only exists here.\n6. Write EVERY file with edit_node \u2014 .ts, .vue, .css, .json, .xml, .md, anything \u2014 and never your editor's own edit/write tools. There is no second write tool: edit_node is the only one. It takes file_path + old_string + new_string exactly like an ordinary edit tool and never refuses a file type; to create a file that doesn't exist yet, pass old_string: \"\" and the whole file as new_string. Because it knows where your text landed, it works out which function/class you changed automatically: no node_id to look up, no code_snapshot to send back. It answers with every caller of what you changed. The graph only ever holds source code (functions/classes/logic) though \u2014 writes landing outside any function (markup, config, an import) get no graph node, normal and expected, not a failure \u2014 but the whole-file change is still staged for the local activity log, so commit_changes makes it revertable there like any other edit.\n7. commit_changes REQUIRES a message AND a reasoning \u2014 the call fails without either. message is the user's request, verbatim, that led to this commit; it builds a local, private, never-pushed activity log (devsmind view \u2192 Activity) grouping your work by request and letting the user revert a request as a whole. Pass the exact same text again on a later commit that's still answering the same request \u2014 that merges them into one entry instead of splitting it. reasoning (what_changed/why/goal) is ONE object covering everything staged since the last commit \u2014 a commit is one logical change, so it gets one why, recorded against every node it touches, not one per edit_node call.\n8. commit_changes also REFUSES any batch containing a brand-NEW node with no description \u2014 a description is what makes that node findable later by a natural-language search_nodes query instead of only by its exact identifier. If edit_node just created a node, call add_description with it (1-3 sentences of what it does and the domain concepts involved \u2014 never a restatement of the name) before commit_changes will accept it. Nothing staged is lost by the refusal; retry the same commit_changes call once it's described. Existing nodes are never gated by this \u2014 only ones new this commit.\n9. A workflow is a named log of how ONE piece of functionality grew, across many sessions \u2014 read it to learn how the code got this way. start_session tells you if there is a recent one worth continuing; otherwise, when starting work that might belong to an existing multi-session feature, call workflow_list. If a description matches, ask the user before continuing it, then workflow_bind to attach THIS session. Binding is local to you: it never moves, pauses, or steals anyone else's workflow, and two sessions can work different ones at the same time.\n10. Once bound, commit_changes logs a step for you automatically \u2014 you do NOT need workflow_add_step for ordinary code work. Call it for the thing a commit cannot express: a DECISION OR RESEARCH FINDING THAT CHANGED NO CODE (\"evaluated X, rejected it because Y\"), attaching the docs behind it via doc_paths. That is the one kind of knowledge nothing else keeps \u2014 git has the diff, history has the per-node reasoning, but neither records what was considered and rejected. If you did work while unbound, or on the wrong workflow, workflow_sync attaches it afterwards from your local activity log: it previews first and only writes when you pass confirm:true, so nothing has to be got right in the moment.\n11. commit_changes also REQUIRES a feedback object (5 fields) \u2014 this is the only channel that improves DevsMind over time, so answer it for real, not as a formality. Before writing \"none\" on any field, actually check: did anything in THIS task take an extra tool call, a guess, a re-read, or a wrong turn? There almost always is something, even on an easy task \u2014 a specific one-line answer with evidence (file:line) is far more useful than a reflexive \"none\". \"none\" is correct only when you genuinely paid attention and nothing applies. Noticed something worth reporting but aren't committing right now (or don't want to wait until you are)? Call add_feedback directly \u2014 same 5 categories, but any one or more, nothing required, no commit needed. Passing evidence (file + snippet) on a graph_problem/edge_problem gets it verified fresh at call time and marked confirmed instead of suspected.";
|
|
12
|
+
/** MCP prompts/list name for the workflow-contract prompt below — see createMcpServer's prompts handlers. */
|
|
13
|
+
export declare const DEVSMIND_PROMPT_NAME = "devsmind-workflow";
|
|
14
|
+
export declare const DEVSMIND_INSTRUCTIONS = "DevsMind is this team's persistent shared code memory \u2014 not a personal tool you reach for only when asked to search something. Every teammate's AI agent, in every session, reads from the SAME graph you are about to write to. There is no \"your copy.\"\n\nIf you skip recording a change, you are not skipping a formality. You are leaving the whole team's graph stale for every other AI agent that queries this code later \u2014 tomorrow, on a different task, in a different session. And the reasoning behind your change (why it was made, what ticket drove it, what was broken before, what you tried and rejected) exists ONLY in this conversation, right now. It is not in the diff. It is not in the commit message. If it isn't captured at commit_changes this turn, it is gone forever \u2014 no reindex, no log, no git blame can recover it later.\n\nNon-negotiable workflow:\n1. Call start_session once, before your first WRITE of the conversation (edit_node/commit_changes and the other mutating tools). It mints a session_id that every write REQUIRES \u2014 it ties a request's edits together on the local Activity log and makes them revertable as a unit \u2014 and every response echoes it back so it stays in front of you, including after a context compaction. Read-only tools (search_nodes, get_node_code, list_nodes, and the other getters) do NOT need it: search and read freely from the very first call. Never invent a session_id yourself; if a write errors saying session_id is required, start_session was skipped \u2014 call it now, then retry. If you are resuming a conversation that already called start_session earlier (visible in the reloaded history), reuse that same session_id instead of starting a new one.\n2. Before any filesystem search, grep, or file read: call search_nodes FIRST \u2014 it is now the one call for both \"find this node\" AND \"find where X lives across files\", so you should not need an external grep. Two inputs, pass either or both: a natural-language query (a real phrase \u2014 drives meaning-matching, so \"authentication\" finds a node described only as \"sign-in\") and/or pattern, a REAL regex used exactly as you'd give it to grep (e.g. \"heartRed|onLikeTap|item.liked\" \u2014 nothing is re-escaped or split for you). Pattern-only is a precision mode: exact grep + code-body matches, no semantic blur. It returns two buckets: nodes (the indexed graph \u2014 the primary answer for \"which function/class\", with a true nodes_total before the top-20 cap) and files (a real grep of every repo, or just the path scope if given \u2014 the answer for things the graph does not index: CSS, JSON, config, .env, markup, wiring like \"where is CORS configured\" or \"what mounts this middleware\" \u2014 each sample line reports which function/class it falls inside, and files_total tells you honestly whether there's more than the page shown; pass a bigger offset for the next page). Triage by each node's confidence and relevance, NOT by which name looks right to you \u2014 confidence reflects how many independent layers corroborated the hit, which your own reading of a name cannot. Lockfiles and build artifacts are excluded by default, so what comes back is real source. If the response carries a compacted field, it was trimmed to fit and says exactly what was dropped \u2014 all counts stay exact, and compact:false gets you the untrimmed payload. It only returns real evidence \u2014 genuinely-absent things come back empty with a hint; if so, retry once with a different pattern/query before concluding it is not there. Only drop to a manual grep/read if search_nodes itself says truncated, or you need full file context after it points you at the file.\n3. To read one function/class: call get_node_code instead of opening the file, and do not follow it with a file read for context \u2014 this is the ONE node-read call, not a lean summary. It already includes the file's imports, the node's own name/type/signature/description, up to 20 named callers AND callees per direction (with exact uses/used_by counts even when the lists are capped), and up to 40 other declarations from the same file (file_outline \u2014 this is how you tell \"was this renamed?\" or \"what else lives here\" without opening the file). Reach further in the SAME call instead of a second tool: graph_depth + graph_direction walks the transitive graph past the direct neighbors already included (add graph_code:true for a whole call flow's source in one round trip \u2014 if some nodes' code doesn't fit the budget they are named in graph.code_omitted_node_ids, so fetch exactly those rather than re-running blind), and history:\"full\" returns every revision with diffable edits, pageable with history_limit/history_offset. Every capped section is honest about it (*_truncated, *_hint) \u2014 a hint means more is reachable in this same call, not a dead end.\n4. Before touching any function's signature: get_node_code already includes its direct callers by name (used_by_nodes) \u2014 for the FULL transitive blast radius, pass graph_direction:\"in\" with a graph_depth of 2-3 in that same call. Git shows you what changed; it never shows you what depends on it. Find out before you break something, not after.\n5. Before refactoring: get_node_code already includes the last 3 changes' reasoning by default \u2014 for the full revision trail with diffable before/after edits, pass history:\"full\" in that same call. Git blame tells you who and when; it never tells you why. The actual decision context only exists here.\n6. Write EVERY file with edit_node \u2014 .ts, .vue, .css, .json, .xml, .md, anything \u2014 and never your editor's own edit/write tools. It takes file_path + old_string + new_string exactly like an ordinary edit tool and never refuses a file type; to create a file that doesn't exist yet, pass old_string: \"\" and the whole file as new_string. Because it knows where your text landed, it works out which function/class you changed automatically: no node_id to look up, no code_snapshot to send back. It answers with every caller of what you changed. The graph only ever holds source code (functions/classes/logic) though \u2014 writes landing outside any function (markup, config, an import) get no graph node, normal and expected, not a failure \u2014 but the whole-file change is still staged for the local activity log, so commit_changes makes it revertable there like any other edit.\n7. If a file already got edited WITHOUT going through edit_node \u2014 your own editor's edit/write tool got used by mistake, or you're catching up on work from before this session \u2014 call stage_change to recover it: same file_path/old_string/new_string/replace_all/description shape as edit_node, but it traces and stages the change without touching the file, since new_string is already sitting on disk. It fails clearly (new_string not found) if the edit never actually happened, so it can't silently record the wrong thing. Always prefer edit_node going forward; stage_change exists only to catch up after the fact, not as a second way to make an edit.\n8. commit_changes REQUIRES a message AND a reasoning \u2014 the call fails without either. message is the user's request, verbatim, that led to this commit; it builds a local, private, never-pushed activity log (devsmind view \u2192 Activity) grouping your work by request and letting the user revert a request as a whole. Pass the exact same text again on a later commit that's still answering the same request \u2014 that merges them into one entry instead of splitting it. reasoning (what_changed/why/goal) is ONE object covering everything staged since the last commit \u2014 a commit is one logical change, so it gets one why, recorded against every node it touches, not one per edit_node/stage_change call.\n9. commit_changes also REFUSES any batch containing a brand-NEW node with no description \u2014 a description is what makes that node findable later by a natural-language search_nodes query instead of only by its exact identifier. If edit_node or stage_change just created a node, call add_description with it (1-3 sentences of what it does and the domain concepts involved \u2014 never a restatement of the name) before commit_changes will accept it. Nothing staged is lost by the refusal; retry the same commit_changes call once it's described. Existing nodes are never gated by this \u2014 only ones new this commit.\n10. commit_changes is NOT git and never touches it. It writes only into DevsMind's own local graph/database (.devmind/) and local activity log \u2014 it never runs git add, git commit, git push, or any other git command, and its \"commit\" is a completely different thing from a git commit despite the shared word. Calling it successfully is not a signal to now go run git yourself: never run git add/git commit/git push on your own initiative just because commit_changes succeeded, or because you finished a task. Your real git commit \u2014 staging and committing the actual code changes \u2014 is the developer's decision, made separately, only when they explicitly ask for it, exactly like any other git action.\n11. A workflow is a named log of how ONE piece of functionality grew, across many sessions \u2014 read it to learn how the code got this way. start_session tells you if there is a recent one worth continuing; otherwise, when starting work that might belong to an existing multi-session feature, call workflow_list. If a description matches, ask the user before continuing it, then workflow_bind to attach THIS session. Binding is local to you: it never moves, pauses, or steals anyone else's workflow, and two sessions can work different ones at the same time.\n12. Once bound, commit_changes logs a step for you automatically \u2014 you do NOT need workflow_add_step for ordinary code work. Call it for the thing a commit cannot express: a DECISION OR RESEARCH FINDING THAT CHANGED NO CODE (\"evaluated X, rejected it because Y\"), attaching the docs behind it via doc_paths. That is the one kind of knowledge nothing else keeps \u2014 git has the diff, history has the per-node reasoning, but neither records what was considered and rejected. If you did work while unbound, or on the wrong workflow, workflow_sync attaches it afterwards from your local activity log: it previews first and only writes when you pass confirm:true, so nothing has to be got right in the moment.\n13. commit_changes also REQUIRES a feedback object (5 fields) \u2014 this is the only channel that improves DevsMind over time, so answer it for real, not as a formality. Before writing \"none\" on any field, actually check: did anything in THIS task take an extra tool call, a guess, a re-read, or a wrong turn? There almost always is something, even on an easy task \u2014 a specific one-line answer with evidence (file:line) is far more useful than a reflexive \"none\". \"none\" is correct only when you genuinely paid attention and nothing applies. Noticed something worth reporting but aren't committing right now (or don't want to wait until you are)? Call add_feedback directly \u2014 same 5 categories, but any one or more, nothing required, no commit needed. Passing evidence (file + snippet) on a graph_problem/edge_problem gets it verified fresh at call time and marked confirmed instead of suspected.";
|
|
13
15
|
/** Binds this process to one project's `.devmind` dir. Called once at server startup. */
|
|
14
16
|
export declare function bindDevmindPath(devmindPath: string): void;
|
|
15
17
|
/** The bound project path, or null if this server is running unbound (tests / legacy). */
|