deepflow 0.1.51 → 0.1.52
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 +10 -0
- package/bin/install.js +70 -0
- package/package.json +1 -1
- package/src/commands/df/execute.md +3 -0
- package/src/commands/df/verify.md +3 -2
package/README.md
CHANGED
|
@@ -130,6 +130,16 @@ Execution happens in an isolated git worktree:
|
|
|
130
130
|
- Resume with `/df:execute --continue`
|
|
131
131
|
- On success, `/df:verify` merges to main and cleans up
|
|
132
132
|
|
|
133
|
+
## LSP Integration
|
|
134
|
+
|
|
135
|
+
deepflow automatically enables Claude Code's LSP tools during install, giving agents access to `goToDefinition`, `findReferences`, and `workspaceSymbol` for precise code navigation instead of grep-based searching.
|
|
136
|
+
|
|
137
|
+
- **Global install:** sets `ENABLE_LSP_TOOL=1` in `~/.claude/settings.json`
|
|
138
|
+
- **Project install:** sets it in `.claude/settings.local.json`
|
|
139
|
+
- **Uninstall:** cleans up automatically
|
|
140
|
+
|
|
141
|
+
Agents prefer LSP tools when available and fall back to Grep/Glob silently. You'll need a language server installed for your language (e.g. `typescript-language-server`, `pyright`, `rust-analyzer`, `gopls`).
|
|
142
|
+
|
|
133
143
|
## Context-Aware Execution
|
|
134
144
|
|
|
135
145
|
Statusline shows context usage. At ≥50%:
|
package/bin/install.js
CHANGED
|
@@ -142,6 +142,11 @@ async function main() {
|
|
|
142
142
|
await configureHooks(CLAUDE_DIR);
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
+
// Configure project settings (project only)
|
|
146
|
+
if (level === 'project') {
|
|
147
|
+
configureProjectSettings(CLAUDE_DIR);
|
|
148
|
+
}
|
|
149
|
+
|
|
145
150
|
console.log('');
|
|
146
151
|
console.log(`${c.green}Installation complete!${c.reset}`);
|
|
147
152
|
console.log('');
|
|
@@ -152,6 +157,7 @@ async function main() {
|
|
|
152
157
|
if (level === 'global') {
|
|
153
158
|
console.log(' hooks/ — statusline, update checker');
|
|
154
159
|
}
|
|
160
|
+
console.log(' env/ — ENABLE_LSP_TOOL (code navigation via goToDefinition, findReferences, workspaceSymbol)');
|
|
155
161
|
console.log('');
|
|
156
162
|
if (level === 'project') {
|
|
157
163
|
console.log(`${c.dim}Note: Statusline is only available with global install.${c.reset}`);
|
|
@@ -208,6 +214,11 @@ async function configureHooks(claudeDir) {
|
|
|
208
214
|
}
|
|
209
215
|
}
|
|
210
216
|
|
|
217
|
+
// Enable LSP tool
|
|
218
|
+
if (!settings.env) settings.env = {};
|
|
219
|
+
settings.env.ENABLE_LSP_TOOL = "1";
|
|
220
|
+
log('LSP tool enabled');
|
|
221
|
+
|
|
211
222
|
// Configure statusline
|
|
212
223
|
if (settings.statusLine) {
|
|
213
224
|
const answer = await ask(
|
|
@@ -258,6 +269,27 @@ async function configureHooks(claudeDir) {
|
|
|
258
269
|
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
|
|
259
270
|
}
|
|
260
271
|
|
|
272
|
+
function configureProjectSettings(claudeDir) {
|
|
273
|
+
const settingsPath = path.join(claudeDir, 'settings.local.json');
|
|
274
|
+
|
|
275
|
+
let settings = {};
|
|
276
|
+
|
|
277
|
+
if (fs.existsSync(settingsPath)) {
|
|
278
|
+
try {
|
|
279
|
+
settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
|
|
280
|
+
} catch (e) {
|
|
281
|
+
settings = {};
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// Enable LSP tool
|
|
286
|
+
if (!settings.env) settings.env = {};
|
|
287
|
+
settings.env.ENABLE_LSP_TOOL = "1";
|
|
288
|
+
|
|
289
|
+
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
|
|
290
|
+
log('LSP tool enabled (project)');
|
|
291
|
+
}
|
|
292
|
+
|
|
261
293
|
function ask(question) {
|
|
262
294
|
const rl = readline.createInterface({
|
|
263
295
|
input: process.stdin,
|
|
@@ -383,6 +415,44 @@ async function uninstall() {
|
|
|
383
415
|
// Fail silently
|
|
384
416
|
}
|
|
385
417
|
}
|
|
418
|
+
|
|
419
|
+
// Remove ENABLE_LSP_TOOL from global settings
|
|
420
|
+
if (fs.existsSync(settingsPath)) {
|
|
421
|
+
try {
|
|
422
|
+
const settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
|
|
423
|
+
if (settings.env?.ENABLE_LSP_TOOL) {
|
|
424
|
+
delete settings.env.ENABLE_LSP_TOOL;
|
|
425
|
+
if (settings.env && Object.keys(settings.env).length === 0) delete settings.env;
|
|
426
|
+
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
|
|
427
|
+
console.log(` ${c.green}✓${c.reset} Removed ENABLE_LSP_TOOL from settings`);
|
|
428
|
+
}
|
|
429
|
+
} catch (e) {
|
|
430
|
+
// Fail silently
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// Remove ENABLE_LSP_TOOL from project settings.local.json
|
|
436
|
+
if (level === 'project') {
|
|
437
|
+
const localSettingsPath = path.join(PROJECT_DIR, 'settings.local.json');
|
|
438
|
+
if (fs.existsSync(localSettingsPath)) {
|
|
439
|
+
try {
|
|
440
|
+
const localSettings = JSON.parse(fs.readFileSync(localSettingsPath, 'utf8'));
|
|
441
|
+
if (localSettings.env?.ENABLE_LSP_TOOL) {
|
|
442
|
+
delete localSettings.env.ENABLE_LSP_TOOL;
|
|
443
|
+
if (localSettings.env && Object.keys(localSettings.env).length === 0) delete localSettings.env;
|
|
444
|
+
if (Object.keys(localSettings).length === 0) {
|
|
445
|
+
fs.unlinkSync(localSettingsPath);
|
|
446
|
+
console.log(` ${c.green}✓${c.reset} Removed settings.local.json (empty after cleanup)`);
|
|
447
|
+
} else {
|
|
448
|
+
fs.writeFileSync(localSettingsPath, JSON.stringify(localSettings, null, 2));
|
|
449
|
+
console.log(` ${c.green}✓${c.reset} Removed ENABLE_LSP_TOOL from settings.local.json`);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
} catch (e) {
|
|
453
|
+
// Fail silently
|
|
454
|
+
}
|
|
455
|
+
}
|
|
386
456
|
}
|
|
387
457
|
|
|
388
458
|
console.log('');
|
package/package.json
CHANGED
|
@@ -328,6 +328,9 @@ Commit format: {commit_type}({spec}): {description}
|
|
|
328
328
|
Result file: {worktree_absolute_path}/.deepflow/results/{task_id}.yaml
|
|
329
329
|
|
|
330
330
|
STOP after writing the result file. Do NOT merge branches, rename spec files, remove worktrees, or run git checkout on main. These are handled by the orchestrator and /df:verify.
|
|
331
|
+
|
|
332
|
+
Navigation: Prefer LSP tools (goToDefinition, findReferences, workspaceSymbol) over Grep/Glob for code navigation. Fall back to Grep/Glob if LSP unavailable.
|
|
333
|
+
If LSP errors, install the language server (TS→typescript-language-server, Python→pyright, Rust→rust-analyzer, Go→gopls) and retry. If still unavailable, use Grep/Glob.
|
|
331
334
|
```
|
|
332
335
|
|
|
333
336
|
**Standard Task (append after preamble):**
|
|
@@ -72,6 +72,7 @@ Run the build command in the worktree:
|
|
|
72
72
|
|
|
73
73
|
Check requirements, acceptance criteria, and quality (stubs/TODOs).
|
|
74
74
|
Mark each: ✓ satisfied | ✗ missing | ⚠ partial
|
|
75
|
+
Prefer LSP tools (goToDefinition, findReferences, workspaceSymbol) when available; fall back to Grep/Glob silently.
|
|
75
76
|
|
|
76
77
|
**L4: Test execution** (if test command detected)
|
|
77
78
|
|
|
@@ -141,9 +142,9 @@ Files: ...
|
|
|
141
142
|
| Level | Check | Method | Runner |
|
|
142
143
|
|-------|-------|--------|--------|
|
|
143
144
|
| L0: Builds | Code compiles/builds | Run build command | Orchestrator (Bash) |
|
|
144
|
-
| L1: Exists | File/function exists | Glob/Grep | Explore agents |
|
|
145
|
+
| L1: Exists | File/function exists | Glob/Grep (prefer workspaceSymbol if available) | Explore agents |
|
|
145
146
|
| L2: Substantive | Real code, not stub | Read + analyze | Explore agents |
|
|
146
|
-
| L3: Wired | Integrated into system | Trace imports/calls | Explore agents |
|
|
147
|
+
| L3: Wired | Integrated into system | Trace imports/calls (prefer findReferences if available) | Explore agents |
|
|
147
148
|
| L4: Tested | Tests pass | Run test command | Orchestrator (Bash) |
|
|
148
149
|
|
|
149
150
|
**Default: L0 through L4.** L0 and L4 skipped ONLY if no build/test command detected (see step 1.5). L0 and L4 run via Bash — Explore agents cannot execute commands.
|