deepflow 0.1.89 → 0.1.91
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 +1 -7
- package/bin/install.js +17 -17
- package/bin/install.test.js +697 -0
- package/bin/ratchet.js +327 -0
- package/bin/ratchet.test.js +869 -0
- package/hooks/df-snapshot-guard.js +105 -0
- package/hooks/df-snapshot-guard.test.js +506 -0
- package/package.json +1 -1
- package/src/commands/df/auto-cycle.md +1 -143
- package/src/commands/df/auto.md +1 -1
- package/src/commands/df/execute.md +53 -26
- package/src/commands/df/verify.md +38 -8
- package/src/skills/auto-cycle/SKILL.md +148 -0
- package/templates/config-template.yaml +26 -3
- package/hooks/df-consolidation-check.js +0 -67
- package/src/commands/df/consolidate.md +0 -42
- package/src/commands/df/note.md +0 -73
- package/src/commands/df/report.md +0 -75
- package/src/commands/df/resume.md +0 -47
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** —
|
|
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,8 +183,8 @@ 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:
|
|
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
190
|
console.log(' hooks/ — statusline, update checker, invariant checker, worktree guard');
|
|
@@ -236,12 +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')}"`;
|
|
242
241
|
const dashboardPushCmd = `node "${path.join(claudeDir, 'hooks', 'df-dashboard-push.js')}"`;
|
|
243
242
|
const executionHistoryCmd = `node "${path.join(claudeDir, 'hooks', 'df-execution-history.js')}"`;
|
|
244
243
|
const worktreeGuardCmd = `node "${path.join(claudeDir, 'hooks', 'df-worktree-guard.js')}"`;
|
|
244
|
+
const snapshotGuardCmd = `node "${path.join(claudeDir, 'hooks', 'df-snapshot-guard.js')}"`;
|
|
245
245
|
const invariantCheckCmd = `node "${path.join(claudeDir, 'hooks', 'df-invariant-check.js')}"`;
|
|
246
246
|
|
|
247
247
|
let settings = {};
|
|
@@ -295,7 +295,7 @@ async function configureHooks(claudeDir) {
|
|
|
295
295
|
// Remove any existing deepflow update check / quota logger hooks from SessionStart
|
|
296
296
|
settings.hooks.SessionStart = settings.hooks.SessionStart.filter(hook => {
|
|
297
297
|
const cmd = hook.hooks?.[0]?.command || '';
|
|
298
|
-
return !cmd.includes('df-check-update') && !cmd.includes('df-
|
|
298
|
+
return !cmd.includes('df-check-update') && !cmd.includes('df-quota-logger');
|
|
299
299
|
});
|
|
300
300
|
|
|
301
301
|
// Add update check hook
|
|
@@ -306,14 +306,6 @@ async function configureHooks(claudeDir) {
|
|
|
306
306
|
}]
|
|
307
307
|
});
|
|
308
308
|
|
|
309
|
-
// Add consolidation check hook
|
|
310
|
-
settings.hooks.SessionStart.push({
|
|
311
|
-
hooks: [{
|
|
312
|
-
type: 'command',
|
|
313
|
-
command: consolidationCheckCmd
|
|
314
|
-
}]
|
|
315
|
-
});
|
|
316
|
-
|
|
317
309
|
// Add quota logger to SessionStart
|
|
318
310
|
settings.hooks.SessionStart.push({
|
|
319
311
|
hooks: [{
|
|
@@ -356,10 +348,10 @@ async function configureHooks(claudeDir) {
|
|
|
356
348
|
settings.hooks.PostToolUse = [];
|
|
357
349
|
}
|
|
358
350
|
|
|
359
|
-
// Remove any existing deepflow tool usage / execution history / worktree guard / invariant check hooks from PostToolUse
|
|
351
|
+
// Remove any existing deepflow tool usage / execution history / worktree guard / snapshot guard / invariant check hooks from PostToolUse
|
|
360
352
|
settings.hooks.PostToolUse = settings.hooks.PostToolUse.filter(hook => {
|
|
361
353
|
const cmd = hook.hooks?.[0]?.command || '';
|
|
362
|
-
return !cmd.includes('df-tool-usage') && !cmd.includes('df-execution-history') && !cmd.includes('df-worktree-guard') && !cmd.includes('df-invariant-check');
|
|
354
|
+
return !cmd.includes('df-tool-usage') && !cmd.includes('df-execution-history') && !cmd.includes('df-worktree-guard') && !cmd.includes('df-snapshot-guard') && !cmd.includes('df-invariant-check');
|
|
363
355
|
});
|
|
364
356
|
|
|
365
357
|
// Add tool usage hook
|
|
@@ -386,6 +378,14 @@ async function configureHooks(claudeDir) {
|
|
|
386
378
|
}]
|
|
387
379
|
});
|
|
388
380
|
|
|
381
|
+
// Add snapshot guard hook (blocks Write/Edit to ratchet-baseline files in auto-snapshot.txt)
|
|
382
|
+
settings.hooks.PostToolUse.push({
|
|
383
|
+
hooks: [{
|
|
384
|
+
type: 'command',
|
|
385
|
+
command: snapshotGuardCmd
|
|
386
|
+
}]
|
|
387
|
+
});
|
|
388
|
+
|
|
389
389
|
// Add invariant check hook (exits 1 on hard failures after git commit)
|
|
390
390
|
settings.hooks.PostToolUse.push({
|
|
391
391
|
hooks: [{
|
|
@@ -575,7 +575,7 @@ async function uninstall() {
|
|
|
575
575
|
];
|
|
576
576
|
|
|
577
577
|
if (level === 'global') {
|
|
578
|
-
toRemove.push('hooks/df-statusline.js', 'hooks/df-check-update.js', 'hooks/df-
|
|
578
|
+
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', 'hooks/df-snapshot-guard.js');
|
|
579
579
|
}
|
|
580
580
|
|
|
581
581
|
for (const item of toRemove) {
|
|
@@ -604,7 +604,7 @@ async function uninstall() {
|
|
|
604
604
|
if (settings.hooks?.SessionStart) {
|
|
605
605
|
settings.hooks.SessionStart = settings.hooks.SessionStart.filter(hook => {
|
|
606
606
|
const cmd = hook.hooks?.[0]?.command || '';
|
|
607
|
-
return !cmd.includes('df-check-update') && !cmd.includes('df-
|
|
607
|
+
return !cmd.includes('df-check-update') && !cmd.includes('df-quota-logger');
|
|
608
608
|
});
|
|
609
609
|
if (settings.hooks.SessionStart.length === 0) {
|
|
610
610
|
delete settings.hooks.SessionStart;
|
|
@@ -622,7 +622,7 @@ async function uninstall() {
|
|
|
622
622
|
if (settings.hooks?.PostToolUse) {
|
|
623
623
|
settings.hooks.PostToolUse = settings.hooks.PostToolUse.filter(hook => {
|
|
624
624
|
const cmd = hook.hooks?.[0]?.command || '';
|
|
625
|
-
return !cmd.includes('df-tool-usage') && !cmd.includes('df-execution-history') && !cmd.includes('df-worktree-guard') && !cmd.includes('df-invariant-check');
|
|
625
|
+
return !cmd.includes('df-tool-usage') && !cmd.includes('df-execution-history') && !cmd.includes('df-worktree-guard') && !cmd.includes('df-snapshot-guard') && !cmd.includes('df-invariant-check');
|
|
626
626
|
});
|
|
627
627
|
if (settings.hooks.PostToolUse.length === 0) {
|
|
628
628
|
delete settings.hooks.PostToolUse;
|