deepflow 0.1.88 → 0.1.90

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
@@ -144,11 +144,7 @@ $ git log --oneline
144
144
  | `/df:plan` | Compare specs to code, create tasks |
145
145
  | `/df:execute` | Run tasks with parallel agents |
146
146
  | `/df:verify` | Check specs satisfied (L0-L5), merge to main |
147
- | `/df:note` | Capture decisions ad-hoc from conversation |
148
- | `/df:consolidate` | Deduplicate and clean up decisions.md |
149
- | `/df:resume` | Session continuity briefing |
150
147
  | `/df:update` | Update deepflow to latest |
151
- | `/df:report` | Generate session cost report (tokens, cache, quota) |
152
148
  | `/df:auto` | Autonomous mode (plan → loop → verify, no human needed) |
153
149
 
154
150
  ## File Structure
@@ -165,8 +161,6 @@ your-project/
165
161
  +-- auto-report.md # morning report (autonomous mode)
166
162
  +-- auto-memory.yaml # cross-cycle learning
167
163
  +-- token-history.jsonl # per-render token usage (auto)
168
- +-- report.json # session cost report (/df:report)
169
- +-- report.md # human-readable report (/df:report)
170
164
  +-- experiments/ # spike results (pass/fail)
171
165
  +-- worktrees/ # isolated execution
172
166
  +-- upload/ # one worktree per spec
@@ -178,7 +172,7 @@ your-project/
178
172
  - **LLM judging LLM** — We started with adversarial selection (AI evaluating AI). We discovered gaming. We replaced it with objective metrics. Deepflow's own evolution proved the principle.
179
173
  - **Agents role-playing job titles** — Flat orchestrator + model routing. No PM agent, no QA agent, no Scrum Master agent.
180
174
  - **Automated research before understanding** — Conversation with you first. AI research comes after you've defined the problem.
181
- - **Ceremony** — 6 commands, one flow. Markdown, not schemas. No sprint planning, no story points, no retrospectives.
175
+ - **Ceremony** — 8 commands, one flow. Markdown, not schemas. No sprint planning, no story points, no retrospectives.
182
176
 
183
177
  ## Principles
184
178
 
package/bin/install.js CHANGED
@@ -183,11 +183,11 @@ async function main() {
183
183
  console.log(`${c.green}Installation complete!${c.reset}`);
184
184
  console.log('');
185
185
  console.log(`Installed to ${c.cyan}${CLAUDE_DIR}${c.reset}:`);
186
- console.log(' commands/df/ — /df:discover, /df:debate, /df:spec, /df:plan, /df:execute, /df:verify, /df:auto, /df:note, /df:resume, /df:update, /df:report');
187
- console.log(' skills/ — gap-discovery, atomic-commits, code-completeness, browse-fetch, browse-verify');
186
+ console.log(' commands/df/ — /df:discover, /df:debate, /df:spec, /df:plan, /df:execute, /df:verify, /df:auto, /df:update');
187
+ console.log(' skills/ — gap-discovery, atomic-commits, code-completeness, browse-fetch, browse-verify, auto-cycle');
188
188
  console.log(' agents/ — reasoner (/df:auto — autonomous execution via /loop)');
189
189
  if (level === 'global') {
190
- console.log(' hooks/ — statusline, update checker, invariant checker');
190
+ console.log(' hooks/ — statusline, update checker, invariant checker, worktree guard');
191
191
  }
192
192
  console.log(' hooks/df-spec-* — spec validation (auto-enforced by /df:spec and /df:plan)');
193
193
  console.log(' env/ — ENABLE_LSP_TOOL (code navigation via goToDefinition, findReferences, workspaceSymbol)');
@@ -236,9 +236,12 @@ async function configureHooks(claudeDir) {
236
236
  const settingsPath = path.join(claudeDir, 'settings.json');
237
237
  const statuslineCmd = `node "${path.join(claudeDir, 'hooks', 'df-statusline.js')}"`;
238
238
  const updateCheckCmd = `node "${path.join(claudeDir, 'hooks', 'df-check-update.js')}"`;
239
- const consolidationCheckCmd = `node "${path.join(claudeDir, 'hooks', 'df-consolidation-check.js')}"`;
240
239
  const quotaLoggerCmd = `node "${path.join(claudeDir, 'hooks', 'df-quota-logger.js')}"`;
241
240
  const toolUsageCmd = `node "${path.join(claudeDir, 'hooks', 'df-tool-usage.js')}"`;
241
+ const dashboardPushCmd = `node "${path.join(claudeDir, 'hooks', 'df-dashboard-push.js')}"`;
242
+ const executionHistoryCmd = `node "${path.join(claudeDir, 'hooks', 'df-execution-history.js')}"`;
243
+ const worktreeGuardCmd = `node "${path.join(claudeDir, 'hooks', 'df-worktree-guard.js')}"`;
244
+ const invariantCheckCmd = `node "${path.join(claudeDir, 'hooks', 'df-invariant-check.js')}"`;
242
245
 
243
246
  let settings = {};
244
247
 
@@ -291,7 +294,7 @@ async function configureHooks(claudeDir) {
291
294
  // Remove any existing deepflow update check / quota logger hooks from SessionStart
292
295
  settings.hooks.SessionStart = settings.hooks.SessionStart.filter(hook => {
293
296
  const cmd = hook.hooks?.[0]?.command || '';
294
- return !cmd.includes('df-check-update') && !cmd.includes('df-consolidation-check') && !cmd.includes('df-quota-logger');
297
+ return !cmd.includes('df-check-update') && !cmd.includes('df-quota-logger');
295
298
  });
296
299
 
297
300
  // Add update check hook
@@ -302,14 +305,6 @@ async function configureHooks(claudeDir) {
302
305
  }]
303
306
  });
304
307
 
305
- // Add consolidation check hook
306
- settings.hooks.SessionStart.push({
307
- hooks: [{
308
- type: 'command',
309
- command: consolidationCheckCmd
310
- }]
311
- });
312
-
313
308
  // Add quota logger to SessionStart
314
309
  settings.hooks.SessionStart.push({
315
310
  hooks: [{
@@ -324,10 +319,10 @@ async function configureHooks(claudeDir) {
324
319
  settings.hooks.SessionEnd = [];
325
320
  }
326
321
 
327
- // Remove any existing quota logger from SessionEnd
322
+ // Remove any existing quota logger / dashboard push from SessionEnd
328
323
  settings.hooks.SessionEnd = settings.hooks.SessionEnd.filter(hook => {
329
324
  const cmd = hook.hooks?.[0]?.command || '';
330
- return !cmd.includes('df-quota-logger');
325
+ return !cmd.includes('df-quota-logger') && !cmd.includes('df-dashboard-push');
331
326
  });
332
327
 
333
328
  // Add quota logger to SessionEnd
@@ -337,17 +332,25 @@ async function configureHooks(claudeDir) {
337
332
  command: quotaLoggerCmd
338
333
  }]
339
334
  });
340
- log('Quota logger configured');
335
+
336
+ // Add dashboard push to SessionEnd (fire-and-forget, skips when dashboard_url unset)
337
+ settings.hooks.SessionEnd.push({
338
+ hooks: [{
339
+ type: 'command',
340
+ command: dashboardPushCmd
341
+ }]
342
+ });
343
+ log('Quota logger + dashboard push configured (SessionEnd)');
341
344
 
342
345
  // Configure PostToolUse hook for tool usage instrumentation
343
346
  if (!settings.hooks.PostToolUse) {
344
347
  settings.hooks.PostToolUse = [];
345
348
  }
346
349
 
347
- // Remove any existing deepflow tool usage hooks from PostToolUse
350
+ // Remove any existing deepflow tool usage / execution history / worktree guard / invariant check hooks from PostToolUse
348
351
  settings.hooks.PostToolUse = settings.hooks.PostToolUse.filter(hook => {
349
352
  const cmd = hook.hooks?.[0]?.command || '';
350
- return !cmd.includes('df-tool-usage');
353
+ return !cmd.includes('df-tool-usage') && !cmd.includes('df-execution-history') && !cmd.includes('df-worktree-guard') && !cmd.includes('df-invariant-check');
351
354
  });
352
355
 
353
356
  // Add tool usage hook
@@ -357,6 +360,30 @@ async function configureHooks(claudeDir) {
357
360
  command: toolUsageCmd
358
361
  }]
359
362
  });
363
+
364
+ // Add execution history hook
365
+ settings.hooks.PostToolUse.push({
366
+ hooks: [{
367
+ type: 'command',
368
+ command: executionHistoryCmd
369
+ }]
370
+ });
371
+
372
+ // Add worktree guard hook (blocks Write/Edit to main-branch files when df/* worktree exists)
373
+ settings.hooks.PostToolUse.push({
374
+ hooks: [{
375
+ type: 'command',
376
+ command: worktreeGuardCmd
377
+ }]
378
+ });
379
+
380
+ // Add invariant check hook (exits 1 on hard failures after git commit)
381
+ settings.hooks.PostToolUse.push({
382
+ hooks: [{
383
+ type: 'command',
384
+ command: invariantCheckCmd
385
+ }]
386
+ });
360
387
  log('PostToolUse hook configured');
361
388
 
362
389
  fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
@@ -539,7 +566,7 @@ async function uninstall() {
539
566
  ];
540
567
 
541
568
  if (level === 'global') {
542
- toRemove.push('hooks/df-statusline.js', 'hooks/df-check-update.js', 'hooks/df-consolidation-check.js', 'hooks/df-invariant-check.js', 'hooks/df-quota-logger.js', 'hooks/df-tool-usage.js');
569
+ toRemove.push('hooks/df-statusline.js', 'hooks/df-check-update.js', 'hooks/df-invariant-check.js', 'hooks/df-quota-logger.js', 'hooks/df-tool-usage.js', 'hooks/df-dashboard-push.js', 'hooks/df-execution-history.js', 'hooks/df-worktree-guard.js');
543
570
  }
544
571
 
545
572
  for (const item of toRemove) {
@@ -568,7 +595,7 @@ async function uninstall() {
568
595
  if (settings.hooks?.SessionStart) {
569
596
  settings.hooks.SessionStart = settings.hooks.SessionStart.filter(hook => {
570
597
  const cmd = hook.hooks?.[0]?.command || '';
571
- return !cmd.includes('df-check-update') && !cmd.includes('df-consolidation-check') && !cmd.includes('df-quota-logger');
598
+ return !cmd.includes('df-check-update') && !cmd.includes('df-quota-logger');
572
599
  });
573
600
  if (settings.hooks.SessionStart.length === 0) {
574
601
  delete settings.hooks.SessionStart;
@@ -577,7 +604,7 @@ async function uninstall() {
577
604
  if (settings.hooks?.SessionEnd) {
578
605
  settings.hooks.SessionEnd = settings.hooks.SessionEnd.filter(hook => {
579
606
  const cmd = hook.hooks?.[0]?.command || '';
580
- return !cmd.includes('df-quota-logger');
607
+ return !cmd.includes('df-quota-logger') && !cmd.includes('df-dashboard-push');
581
608
  });
582
609
  if (settings.hooks.SessionEnd.length === 0) {
583
610
  delete settings.hooks.SessionEnd;
@@ -586,7 +613,7 @@ async function uninstall() {
586
613
  if (settings.hooks?.PostToolUse) {
587
614
  settings.hooks.PostToolUse = settings.hooks.PostToolUse.filter(hook => {
588
615
  const cmd = hook.hooks?.[0]?.command || '';
589
- return !cmd.includes('df-tool-usage');
616
+ return !cmd.includes('df-tool-usage') && !cmd.includes('df-execution-history') && !cmd.includes('df-worktree-guard') && !cmd.includes('df-invariant-check');
590
617
  });
591
618
  if (settings.hooks.PostToolUse.length === 0) {
592
619
  delete settings.hooks.PostToolUse;