deepflow 0.1.89 → 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 +1 -7
- package/bin/install.js +5 -14
- package/bin/install.test.js +697 -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 +17 -9
- package/src/commands/df/verify.md +38 -8
- package/src/skills/auto-cycle/SKILL.md +148 -0
- package/templates/config-template.yaml +2 -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
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: df:report
|
|
3
|
-
description: Generate session cost report with token usage, cache hit ratio, per-task costs, and quota impact
|
|
4
|
-
allowed-tools: [Read, Write, Bash]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# /df:report — Session Cost Report
|
|
8
|
-
|
|
9
|
-
> **DEPRECATED:** Use `/df:dashboard` instead to view deepflow metrics and status.
|
|
10
|
-
|
|
11
|
-
## Orchestrator Role
|
|
12
|
-
|
|
13
|
-
Aggregate token usage data and produce a structured report.
|
|
14
|
-
|
|
15
|
-
**NEVER:** Spawn agents, use Task tool, use AskUserQuestion, run git, EnterPlanMode, ExitPlanMode
|
|
16
|
-
|
|
17
|
-
**ONLY:** Read data files, compute aggregates, write `.deepflow/report.json` and `.deepflow/report.md`
|
|
18
|
-
|
|
19
|
-
## Behavior
|
|
20
|
-
|
|
21
|
-
### 1. LOAD DATA SOURCES
|
|
22
|
-
|
|
23
|
-
Read each source gracefully — missing files yield zero/empty values, never error out.
|
|
24
|
-
|
|
25
|
-
| Source | Path | Shell injection | Key fields |
|
|
26
|
-
|--------|------|-----------------|------------|
|
|
27
|
-
| Token history | `.deepflow/token-history.jsonl` | `` !`cat .deepflow/token-history.jsonl 2>/dev/null \|\| echo ''` `` | `timestamp`, `input_tokens`, `cache_creation_input_tokens`, `cache_read_input_tokens`, `used_percentage`, `model`, `session_id` |
|
|
28
|
-
| Quota history | `~/.claude/quota-history.jsonl` | `` !`tail -5 ~/.claude/quota-history.jsonl 2>/dev/null \|\| echo ''` `` | `timestamp`, `event`, API payload |
|
|
29
|
-
| Task results | `.deepflow/results/T*.yaml` | `` !`ls .deepflow/results/T*.yaml 2>/dev/null \|\| echo ''` `` | `tokens` block: `start_percentage`, `end_percentage`, `delta_percentage`, `input_tokens`, `cache_creation_input_tokens`, `cache_read_input_tokens` |
|
|
30
|
-
| Session metadata | `.deepflow/auto-memory.yaml` | `` !`cat .deepflow/auto-memory.yaml 2>/dev/null \|\| echo ''` `` | session_id, start time (optional) |
|
|
31
|
-
|
|
32
|
-
### 2. COMPUTE AGGREGATES
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
total_input_tokens = sum(input_tokens)
|
|
36
|
-
total_cache_creation = sum(cache_creation_input_tokens)
|
|
37
|
-
total_cache_read = sum(cache_read_input_tokens)
|
|
38
|
-
total_tokens_all = total_input_tokens + total_cache_creation + total_cache_read
|
|
39
|
-
cache_hit_ratio = total_cache_read / total_tokens_all (0 if denominator=0, clamp [0,1], round 4 decimals)
|
|
40
|
-
peak_context_percentage = max(used_percentage)
|
|
41
|
-
model = most recent line's model
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### 3. WRITE `.deepflow/report.json`
|
|
45
|
-
|
|
46
|
-
Structure: `{ version: 1, generated: ISO-8601-UTC, session_summary: {total_input_tokens, total_cache_creation, total_cache_read, cache_hit_ratio, peak_context_percentage, model}, tasks: [{task_id, start_percentage, end_percentage, delta_percentage, input_tokens, cache_creation, cache_read}], quota: {available: bool, ...API fields if available} }`
|
|
47
|
-
|
|
48
|
-
Rules: `version` always 1. `tasks` = `[]` if no results found. `quota.available` = false if missing. All token fields integers >= 0. `cache_hit_ratio` float in [0,1].
|
|
49
|
-
|
|
50
|
-
### 4. WRITE `.deepflow/report.md`
|
|
51
|
-
|
|
52
|
-
Required sections with exact headings:
|
|
53
|
-
|
|
54
|
-
**## Session Summary** — Table: Model, Total Input Tokens, Cache Creation Tokens, Cache Read Tokens, Cache Hit Ratio (with %), Peak Context Usage %.
|
|
55
|
-
|
|
56
|
-
**## Per-Task Costs** — Table: Task, Start %, End %, Delta %, Input Tokens, Cache Creation, Cache Read. Show `_(No task data available)_` if empty.
|
|
57
|
-
|
|
58
|
-
**## Quota Impact** — Quota fields table if `quota.available=true`, else exactly: `Not available (non-macOS or no token)`.
|
|
59
|
-
|
|
60
|
-
### 5. CONFIRM
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
Report generated:
|
|
64
|
-
.deepflow/report.json — machine-readable (version=1)
|
|
65
|
-
.deepflow/report.md — human-readable summary
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
List missing data sources as a note if any were absent.
|
|
69
|
-
|
|
70
|
-
## Rules
|
|
71
|
-
|
|
72
|
-
- Graceful degradation — missing files yield zero/empty, never error
|
|
73
|
-
- No hallucination — only values from actual file contents; 0 for missing fields
|
|
74
|
-
- Idempotent — re-running overwrites both files with fresh data
|
|
75
|
-
- ISO 8601 UTC timestamps for `generated` field
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: df:resume
|
|
3
|
-
description: Synthesize project state into a briefing covering what happened, current decisions, and next steps
|
|
4
|
-
allowed-tools: [Read, Grep, Glob, Bash]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# /df:resume — Session Continuity Briefing
|
|
8
|
-
|
|
9
|
-
## Orchestrator Role
|
|
10
|
-
|
|
11
|
-
Read project state from multiple sources, produce a concise briefing for resuming work. Pure read-only.
|
|
12
|
-
|
|
13
|
-
**NEVER:** Write/create/modify files, run git write ops, use AskUserQuestion, spawn agents, use TaskOutput, EnterPlanMode, ExitPlanMode
|
|
14
|
-
|
|
15
|
-
**ONLY:** Read files (Bash read-only git commands, Read, Glob, Grep), write briefing to stdout
|
|
16
|
-
|
|
17
|
-
## Behavior
|
|
18
|
-
|
|
19
|
-
### 1. GATHER SOURCES (parallel, all reads)
|
|
20
|
-
|
|
21
|
-
| Source | Command/Path | Purpose |
|
|
22
|
-
|--------|-------------|---------|
|
|
23
|
-
| Git timeline | `` !`git log --oneline -20` `` | What changed and when |
|
|
24
|
-
| Decisions | `` !`cat .deepflow/decisions.md 2>/dev/null \|\| echo 'NOT_FOUND'` `` | Live [APPROACH], [PROVISIONAL], [ASSUMPTION] entries |
|
|
25
|
-
| Plan | `` !`cat PLAN.md 2>/dev/null \|\| echo 'NOT_FOUND'` `` | Task status (checked vs unchecked) |
|
|
26
|
-
| Spec headers | `` !`head -20 specs/doing-*.md 2>/dev/null \|\| echo 'NOT_FOUND'` `` | In-flight features |
|
|
27
|
-
| Experiments | `` !`ls .deepflow/experiments/ 2>/dev/null \|\| echo 'NOT_FOUND'` `` | Validated/failed approaches |
|
|
28
|
-
|
|
29
|
-
Token budget: ~2500 tokens input. Skip missing sources silently.
|
|
30
|
-
|
|
31
|
-
### 2. SYNTHESIZE BRIEFING (200-500 words, 3 sections)
|
|
32
|
-
|
|
33
|
-
**## Timeline** — 3-6 sentences: arc of work from git log + spec/PLAN state. What completed, in-flight, notable milestones. Reference dates/commits where informative.
|
|
34
|
-
|
|
35
|
-
**## Live Decisions** — All `[APPROACH]`, `[PROVISIONAL]`, `[ASSUMPTION]` from `.deepflow/decisions.md` as bullets with tag + text + rationale. Show newest entry per topic if contradictions exist. State "No decisions recorded yet." if absent/empty.
|
|
36
|
-
|
|
37
|
-
**## Next Steps** — From PLAN.md: unblocked `- [ ]` tasks first, then blocked tasks with blockers. If no PLAN.md: suggest `/df:plan`.
|
|
38
|
-
|
|
39
|
-
### 3. OUTPUT
|
|
40
|
-
|
|
41
|
-
Print briefing to stdout. No file writes.
|
|
42
|
-
|
|
43
|
-
## Rules
|
|
44
|
-
|
|
45
|
-
- Read sources in a single pass — no re-reads
|
|
46
|
-
- Contradicted decisions: show newest per topic only
|
|
47
|
-
- Token budget: ~2500 input tokens to produce ~500 words output
|