jfl 0.2.2 → 0.2.4

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.
Files changed (153) hide show
  1. package/README.md +399 -423
  2. package/clawdbot-plugin/clawdbot.plugin.json +12 -1
  3. package/clawdbot-plugin/index.js +5 -5
  4. package/clawdbot-plugin/index.ts +5 -5
  5. package/dist/commands/context-hub.d.ts +4 -0
  6. package/dist/commands/context-hub.d.ts.map +1 -1
  7. package/dist/commands/context-hub.js +704 -83
  8. package/dist/commands/context-hub.js.map +1 -1
  9. package/dist/commands/digest.d.ts +6 -0
  10. package/dist/commands/digest.d.ts.map +1 -0
  11. package/dist/commands/digest.js +81 -0
  12. package/dist/commands/digest.js.map +1 -0
  13. package/dist/commands/flows.d.ts +7 -0
  14. package/dist/commands/flows.d.ts.map +1 -0
  15. package/dist/commands/flows.js +264 -0
  16. package/dist/commands/flows.js.map +1 -0
  17. package/dist/commands/hooks.d.ts +11 -0
  18. package/dist/commands/hooks.d.ts.map +1 -0
  19. package/dist/commands/hooks.js +303 -0
  20. package/dist/commands/hooks.js.map +1 -0
  21. package/dist/commands/improve.d.ts +11 -0
  22. package/dist/commands/improve.d.ts.map +1 -0
  23. package/dist/commands/improve.js +77 -0
  24. package/dist/commands/improve.js.map +1 -0
  25. package/dist/commands/init.d.ts.map +1 -1
  26. package/dist/commands/init.js +42 -11
  27. package/dist/commands/init.js.map +1 -1
  28. package/dist/commands/peter.d.ts +15 -0
  29. package/dist/commands/peter.d.ts.map +1 -0
  30. package/dist/commands/peter.js +198 -0
  31. package/dist/commands/peter.js.map +1 -0
  32. package/dist/commands/ralph.d.ts +3 -1
  33. package/dist/commands/ralph.d.ts.map +1 -1
  34. package/dist/commands/ralph.js +40 -5
  35. package/dist/commands/ralph.js.map +1 -1
  36. package/dist/commands/scope.d.ts +7 -0
  37. package/dist/commands/scope.d.ts.map +1 -0
  38. package/dist/commands/scope.js +227 -0
  39. package/dist/commands/scope.js.map +1 -0
  40. package/dist/commands/service-validate.js +7 -1
  41. package/dist/commands/service-validate.js.map +1 -1
  42. package/dist/commands/session.d.ts +2 -1
  43. package/dist/commands/session.d.ts.map +1 -1
  44. package/dist/commands/session.js +519 -49
  45. package/dist/commands/session.js.map +1 -1
  46. package/dist/commands/update.d.ts.map +1 -1
  47. package/dist/commands/update.js +25 -6
  48. package/dist/commands/update.js.map +1 -1
  49. package/dist/dashboard/components.d.ts +7 -0
  50. package/dist/dashboard/components.d.ts.map +1 -0
  51. package/dist/dashboard/components.js +163 -0
  52. package/dist/dashboard/components.js.map +1 -0
  53. package/dist/dashboard/index.d.ts +12 -0
  54. package/dist/dashboard/index.d.ts.map +1 -0
  55. package/dist/dashboard/index.js +132 -0
  56. package/dist/dashboard/index.js.map +1 -0
  57. package/dist/dashboard/pages.d.ts +7 -0
  58. package/dist/dashboard/pages.d.ts.map +1 -0
  59. package/dist/dashboard/pages.js +742 -0
  60. package/dist/dashboard/pages.js.map +1 -0
  61. package/dist/dashboard/styles.d.ts +7 -0
  62. package/dist/dashboard/styles.d.ts.map +1 -0
  63. package/dist/dashboard/styles.js +497 -0
  64. package/dist/dashboard/styles.js.map +1 -0
  65. package/dist/index.js +196 -8
  66. package/dist/index.js.map +1 -1
  67. package/dist/lib/flow-engine.d.ts +34 -0
  68. package/dist/lib/flow-engine.d.ts.map +1 -0
  69. package/dist/lib/flow-engine.js +321 -0
  70. package/dist/lib/flow-engine.js.map +1 -0
  71. package/dist/lib/hook-transformer.d.ts +11 -0
  72. package/dist/lib/hook-transformer.d.ts.map +1 -0
  73. package/dist/lib/hook-transformer.js +74 -0
  74. package/dist/lib/hook-transformer.js.map +1 -0
  75. package/dist/lib/map-event-bus.d.ts +50 -0
  76. package/dist/lib/map-event-bus.d.ts.map +1 -0
  77. package/dist/lib/map-event-bus.js +366 -0
  78. package/dist/lib/map-event-bus.js.map +1 -0
  79. package/dist/lib/memory-indexer.d.ts.map +1 -1
  80. package/dist/lib/memory-indexer.js +26 -2
  81. package/dist/lib/memory-indexer.js.map +1 -1
  82. package/dist/lib/model-pricing.d.ts +11 -0
  83. package/dist/lib/model-pricing.d.ts.map +1 -0
  84. package/dist/lib/model-pricing.js +27 -0
  85. package/dist/lib/model-pricing.js.map +1 -0
  86. package/dist/lib/peter-parker-bridge.d.ts +34 -0
  87. package/dist/lib/peter-parker-bridge.d.ts.map +1 -0
  88. package/dist/lib/peter-parker-bridge.js +145 -0
  89. package/dist/lib/peter-parker-bridge.js.map +1 -0
  90. package/dist/lib/peter-parker-config.d.ts +13 -0
  91. package/dist/lib/peter-parker-config.d.ts.map +1 -0
  92. package/dist/lib/peter-parker-config.js +86 -0
  93. package/dist/lib/peter-parker-config.js.map +1 -0
  94. package/dist/lib/service-gtm.d.ts +7 -0
  95. package/dist/lib/service-gtm.d.ts.map +1 -1
  96. package/dist/lib/service-gtm.js.map +1 -1
  97. package/dist/lib/service-utils.d.ts.map +1 -1
  98. package/dist/lib/service-utils.js +33 -17
  99. package/dist/lib/service-utils.js.map +1 -1
  100. package/dist/lib/stratus-client.d.ts +1 -0
  101. package/dist/lib/stratus-client.d.ts.map +1 -1
  102. package/dist/lib/stratus-client.js +33 -2
  103. package/dist/lib/stratus-client.js.map +1 -1
  104. package/dist/lib/stratus-rollout-test.d.ts +10 -0
  105. package/dist/lib/stratus-rollout-test.d.ts.map +1 -0
  106. package/dist/lib/stratus-rollout-test.js +412 -0
  107. package/dist/lib/stratus-rollout-test.js.map +1 -0
  108. package/dist/lib/telemetry-digest.d.ts +10 -0
  109. package/dist/lib/telemetry-digest.d.ts.map +1 -0
  110. package/dist/lib/telemetry-digest.js +359 -0
  111. package/dist/lib/telemetry-digest.js.map +1 -0
  112. package/dist/lib/telemetry.d.ts +35 -0
  113. package/dist/lib/telemetry.d.ts.map +1 -0
  114. package/dist/lib/telemetry.js +320 -0
  115. package/dist/lib/telemetry.js.map +1 -0
  116. package/dist/lib/training-tuples.d.ts +33 -0
  117. package/dist/lib/training-tuples.d.ts.map +1 -0
  118. package/dist/lib/training-tuples.js +273 -0
  119. package/dist/lib/training-tuples.js.map +1 -0
  120. package/dist/mcp/context-hub-mcp.js +139 -22
  121. package/dist/mcp/context-hub-mcp.js.map +1 -1
  122. package/dist/types/flows.d.ts +62 -0
  123. package/dist/types/flows.d.ts.map +1 -0
  124. package/dist/types/flows.js +10 -0
  125. package/dist/types/flows.js.map +1 -0
  126. package/dist/types/map.d.ts +42 -0
  127. package/dist/types/map.d.ts.map +1 -0
  128. package/dist/types/map.js +39 -0
  129. package/dist/types/map.js.map +1 -0
  130. package/dist/types/telemetry-digest.d.ts +73 -0
  131. package/dist/types/telemetry-digest.d.ts.map +1 -0
  132. package/dist/types/telemetry-digest.js +5 -0
  133. package/dist/types/telemetry-digest.js.map +1 -0
  134. package/dist/types/telemetry.d.ts +69 -0
  135. package/dist/types/telemetry.d.ts.map +1 -0
  136. package/dist/types/telemetry.js +5 -0
  137. package/dist/types/telemetry.js.map +1 -0
  138. package/dist/ui/event-dashboard.d.ts +12 -0
  139. package/dist/ui/event-dashboard.d.ts.map +1 -0
  140. package/dist/ui/event-dashboard.js +342 -0
  141. package/dist/ui/event-dashboard.js.map +1 -0
  142. package/dist/utils/jfl-paths.d.ts +1 -0
  143. package/dist/utils/jfl-paths.d.ts.map +1 -1
  144. package/dist/utils/jfl-paths.js +1 -0
  145. package/dist/utils/jfl-paths.js.map +1 -1
  146. package/dist/utils/settings-validator.d.ts +3 -2
  147. package/dist/utils/settings-validator.d.ts.map +1 -1
  148. package/dist/utils/settings-validator.js +25 -6
  149. package/dist/utils/settings-validator.js.map +1 -1
  150. package/package.json +3 -2
  151. package/scripts/session/session-end.sh +10 -0
  152. package/scripts/session/session-init.sh +16 -0
  153. package/scripts/test-map-eventbus.sh +357 -0
package/README.md CHANGED
@@ -2,71 +2,22 @@
2
2
 
3
3
  **The context layer for AI-native teams.**
4
4
 
5
- JFL provides persistent context for AI workflows. Agents can read what happened in previous sessions, understand decisions that were made, and access project knowledge—eliminating the cold-start problem where each AI interaction begins from zero.
5
+ JFL provides persistent context for AI workflows. Agents read what happened in previous sessions, understand decisions made, and access project knowledge eliminating the cold-start problem where each AI interaction begins from zero.
6
6
 
7
7
  Context lives in git as structured files (markdown, JSONL). Any AI tool can integrate via MCP.
8
8
 
9
- **Quick Links:** [GitHub](https://github.com/402goose/jfl-cli) · [npm](https://www.npmjs.com/package/jfl)
9
+ **Quick Links:** [GitHub](https://github.com/402goose/jfl-cli) | [npm](https://www.npmjs.com/package/jfl)
10
10
 
11
11
  ---
12
12
 
13
13
  ## What Problem Does This Solve?
14
14
 
15
- AI agents are stateless by default. Each new session starts from scratch:
15
+ AI agents are stateless. Each session starts from scratch:
16
16
  - Previous decisions aren't remembered
17
17
  - Work from other sessions isn't visible
18
18
  - Context has to be re-explained every time
19
19
 
20
- For multi-session projects or team collaboration with AI, this creates coordination overhead. JFL provides a shared context layer that accumulates over time and is accessible to any AI tool.
21
-
22
- ---
23
-
24
- ## Where JFL Fits
25
-
26
- JFL is a coordination and context layer for AI workflows.
27
-
28
- **What it provides:**
29
- - Persistent memory across sessions (journal entries, decisions, code context)
30
- - Shared context that any AI can read and contribute to
31
- - Git-native storage (markdown, JSONL) that survives model changes
32
-
33
- **What it works with:**
34
- - AI coding tools (Claude Code, Cursor)
35
- - Agent frameworks (CrewAI, AutoGPT)
36
- - Custom AI workflows
37
-
38
- **Architecture:**
39
- JFL runs as a local daemon (Context Hub on port 4242) and integrates via MCP. Your project's context lives in `.jfl/` as structured files. Any AI tool with MCP support can read and update this context.
40
-
41
- **Use cases:**
42
- - Solo developers building with AI (never lose context between sessions)
43
- - Teams coordinating work with AI agents (shared memory across people and agents)
44
- - Multi-session projects (context accumulates, agents get smarter over time)
45
-
46
- ---
47
-
48
- ## What JFL Does
49
-
50
- JFL provides three core systems:
51
-
52
- **Context Hub** — A local daemon (port 4242) that aggregates journal entries, knowledge docs, and code headers. Any AI can query it via MCP to understand what happened across sessions, what decisions were made, and what code does.
53
-
54
- **Synopsis** — Generates work summaries by rolling up journal entries, git commits, and file headers. Answers questions like "what happened this week?" or "what did Alex work on?" with structured reports and time breakdowns.
55
-
56
- **Session Management** — Automatic session isolation for parallel work. Single sessions work directly on your branch for simplicity. Multiple concurrent sessions use isolated worktrees to prevent conflicts. Auto-commit saves work every 2 minutes, and sessions auto-merge when finished.
57
-
58
- ---
59
-
60
- ## How Teams Use It
61
-
62
- **Solo developers:**
63
- Build with AI tools across multiple sessions without re-explaining context. Your project knowledge accumulates—agents get smarter over time, not dumber.
64
-
65
- **Teams with AI agents:**
66
- Multiple people and AI agents can work in parallel. Everyone reads from and writes to the same context layer. No meetings to sync up, no handoff docs that get stale.
67
-
68
- **Works with your existing tools:**
69
- JFL integrates with Claude Code, Cursor, Clawdbot, CrewAI, and any tool that supports MCP. Switch models or tools tomorrow—your context survives because it's git-native.
20
+ JFL provides a shared context layer that accumulates over time and is accessible to any AI tool.
70
21
 
71
22
  ---
72
23
 
@@ -76,527 +27,556 @@ JFL integrates with Claude Code, Cursor, Clawdbot, CrewAI, and any tool that sup
76
27
  npm install -g jfl
77
28
  ```
78
29
 
79
- **Requirements:** Node 18
30
+ **Requirements:** Node >= 18
80
31
 
81
- JFL automatically installs dependencies including Context Hub MCP and x402 payment tools.
32
+ **Also installs:**
33
+ - `jfl-context-hub-mcp` — MCP server binary for Context Hub
34
+ - `jfl-service-registry-mcp` — MCP server binary for Service Registry
82
35
 
83
36
  ---
84
37
 
85
- ## Quick Start (TL;DR)
38
+ ## Quick Start
86
39
 
87
40
  ```bash
88
- # Initialize a GTM workspace
89
- jfl init my-product-gtm
90
-
91
- # Check status
92
- cd my-product-gtm
93
- jfl status
41
+ # Create a GTM workspace
42
+ jfl init -n my-project
94
43
 
95
- # View campaign dashboard
96
- jfl hud
44
+ # Start working
45
+ cd my-project
46
+ claude # Claude Code — hooks fire automatically
97
47
 
98
- # See what happened recently
99
- jfl synopsis 24
100
-
101
- # Start interactive session (auto-updates on first run)
102
- jfl
48
+ # Inside Claude Code:
49
+ /hud # Project dashboard — start here
103
50
  ```
104
51
 
105
- ---
106
-
107
- ## Core Commands
108
-
109
- | Command | Description |
110
- |---------|-------------|
111
- | `jfl` | Interactive session (auto-updates GTM template + npm package) |
112
- | `jfl init [name]` | Initialize new GTM workspace |
113
- | `jfl status` | Show project status and auth |
114
- | `jfl hud` | Campaign dashboard (ship date, phases, pipeline) |
115
- | `jfl synopsis [hours] [author]` | Work summary (journal + commits + code) |
116
- | `jfl update` | Pull latest skills and templates |
117
- | `jfl context-hub [action]` | Manage Context Hub daemon (start/stop/status) |
118
- | `jfl session [action]` | Session management (create/list/end) |
119
- | `jfl repair` | Fix .jfl/config.json if corrupted |
120
-
121
- ### Platform Commands
122
-
123
- | Command | Description |
124
- |---------|-------------|
125
- | `jfl login` | Authenticate to JFL platform |
126
- | `jfl login --x402` | Use x402 Day Pass ($5/day crypto) |
127
- | `jfl wallet` | Show wallet and day pass status |
128
- | `jfl deploy` | Deploy to JFL platform |
129
- | `jfl agents [action]` | Manage parallel agents (list/create/start/stop) |
130
- | `jfl feedback` | Rate your session |
52
+ That's it. SessionStart hooks handle repo sync, session branching, Context Hub startup, and auto-commit. You just work.
131
53
 
132
54
  ---
133
55
 
134
- ## How It Works
135
-
136
- **The system lives in git. Everything is files.**
56
+ ## Architecture
137
57
 
138
- No proprietary database. No lock-in. Your company's knowledge graph is version-controlled and portable.
58
+ JFL workspaces are **context layers**, not code repos. Product code lives in separate service repos that register with the GTM.
139
59
 
140
60
  ```
141
- my-project-gtm/ GTM workspace (strategy, content, brand)
61
+ my-project/ <- GTM workspace (strategy, context, orchestration)
142
62
  ├── .jfl/
143
- │ ├── config.json Project settings
144
- │ ├── journal/ Session journals (JSONL)
145
- └── context-hub.pid ← Context Hub daemon
146
- ├── product/ ← SUBMODULE your-product-repo
147
- ├── knowledge/ ← Strategy docs (VISION, ROADMAP, etc.)
148
- ├── content/ Generated marketing content
149
- ├── suggestions/ Contributor workspaces
150
- ├── .claude/skills/ ← JFL skills
151
- └── CLAUDE.md ← AI instructions
152
-
153
- your-product-repo/ SEPARATE REPO (all code)
63
+ │ ├── config.json <- Project config (team, services, ports)
64
+ │ ├── journal/ <- Session journals (JSONL, one file per session)
65
+ ├── memory.db <- Indexed memory (TF-IDF + embeddings)
66
+ ├── service-events.jsonl <- Event bus file-drop
67
+ │ └── services.json <- Registered services
68
+ ├── knowledge/ <- Strategy docs (VISION, ROADMAP, THESIS, etc.)
69
+ ├── content/ <- Generated content
70
+ ├── suggestions/ <- Per-contributor workspaces
71
+ ├── .claude/
72
+ │ ├── settings.json <- Claude Code hooks (SessionStart, Stop, etc.)
73
+ │ ├── agents/ <- Service agent definitions
74
+ │ └── skills/ <- Slash commands (/hud, /content, etc.)
75
+ ├── scripts/session/ <- Session management (init, sync, cleanup)
76
+ ├── CLAUDE.md <- AI instructions
77
+ └── .mcp.json <- MCP server config (Context Hub)
78
+
79
+ my-api/ <- Service repo (registered in GTM)
154
80
  ├── src/
155
- ├── cli/
156
- └── ...
81
+ ├── .jfl/config.json <- type: "service", gtm_parent: "/path/to/gtm"
82
+ └── .jfl/journal/ <- Service journals (synced to GTM on session end)
157
83
  ```
158
84
 
159
- **When you start a session:**
160
- 1. The agent loads your full context (via Context Hub)
161
- 2. You work (code, content, strategy, whatever)
162
- 3. Decisions and learnings are captured automatically
163
- 4. Session ends, context persists
164
- 5. Next session picks up exactly where you left off
165
-
166
- **Why git-native?**
167
-
168
- All context is stored as markdown and JSONL in your git repository. This means:
169
- - Version controlled (see how context evolved)
170
- - Portable (no vendor lock-in)
171
- - Model-agnostic (switch AI tools without losing context)
172
- - Collaborative (merge and branch like code)
173
-
174
- **It compounds.** The more you use it, the more it knows. Six months in, the agent understands your business better than most employees would.
175
-
176
- **Why GTM workspace is separate from product code:**
85
+ **Why separate?**
177
86
  - Clean separation of concerns
178
- - Product code doesn't get polluted with GTM docs
179
- - Multiple GTMs can reference the same product
180
- - `jfl update` updates GTM toolkit without touching product code
181
- - Team can work on product independently
87
+ - Services work independently
88
+ - Multiple services register to one GTM
89
+ - `jfl update` updates tooling without touching service code
90
+ - Journal entries sync from services to parent GTM
182
91
 
183
92
  ---
184
93
 
185
- ## Clawdbot Integration
94
+ ## Core Systems
186
95
 
187
- JFL ships with a Clawdbot plugin for Telegram-based agents.
96
+ ### Context Hub
188
97
 
189
- ```bash
190
- # Install plugin into Clawdbot
191
- jfl clawdbot setup
98
+ A per-project daemon that aggregates journal entries, knowledge docs, code headers, and events into a unified context layer. Any AI can query it via MCP.
192
99
 
193
- # Check installation status
194
- jfl clawdbot status
100
+ ```bash
101
+ jfl context-hub ensure # Start if not running (idempotent)
102
+ jfl context-hub status # Check health
103
+ jfl context-hub stop # Stop daemon
104
+ jfl context-hub restart # Restart daemon
105
+ jfl context-hub doctor # Diagnose all projects (OK/ZOMBIE/DOWN/STALE)
106
+ jfl context-hub ensure-all # Start for all GTM projects
107
+ jfl context-hub dashboard # Live event + context dashboard
108
+ jfl context-hub install-daemon # Auto-start on boot (launchd/systemd)
109
+ jfl context-hub uninstall-daemon # Remove auto-start
110
+ jfl context-hub query # Query context from CLI
111
+ jfl context-hub serve # Run in foreground (daemon mode)
195
112
  ```
196
113
 
197
- After setup, restart your gateway (`clawdbot gateway`). The plugin is dormant until you activate it:
114
+ **Per-project ports** assigned automatically (or set in `.jfl/config.json` `contextHub.port`).
198
115
 
199
- 1. Send `/jfl` in Telegram
200
- 2. Pick a project (or auto-picks if you have one)
201
- 3. Plugin activates — context injection, decision capture, auto-commit
116
+ **MCP Tools** (available to Claude Code and any MCP client):
202
117
 
203
- **Telegram Commands:**
118
+ | Tool | What It Does |
119
+ |------|-------------|
120
+ | `context_get` | Unified context (journal + knowledge + code headers) |
121
+ | `context_search` | Semantic search across all sources |
122
+ | `context_status` | Daemon health check |
123
+ | `context_sessions` | Activity from other sessions |
124
+ | `memory_search` | Search indexed journal memories |
125
+ | `memory_status` | Memory system statistics |
126
+ | `memory_add` | Add manual memory entry |
204
127
 
205
- | Command | What it does |
206
- |---------|-------------|
207
- | `/jfl` | Activate JFL / show status |
208
- | `/context <query>` | Search project knowledge |
209
- | `/journal <type> <title> \| <summary>` | Write a journal entry |
210
- | `/hud` | Project dashboard |
128
+ **Resilience:** 5-layer system MCP auto-recovery on ECONNREFUSED, health-check-before-ensure hooks, `ensure-all` for batch startup, `doctor` diagnostics, launchd/systemd daemon with keepalive.
211
129
 
212
- **What the plugin does automatically:**
213
- - Injects relevant project context before every AI response
214
- - Captures decisions to the journal after responses
215
- - Auto-commits work periodically
216
- - Manages session branches for isolated work
130
+ ### MAP Event Bus
217
131
 
218
- **Claude also gets tools** (`jfl_context`, `jfl_journal`) it can use proactively without you asking.
132
+ Metrics, Agents, Pipeline an in-process event bus inside Context Hub.
219
133
 
220
- ---
134
+ - **Ring buffer** (1000 events) with JSONL persistence
135
+ - **Service event bridge** — watches `.jfl/service-events.jsonl`, converts to events
136
+ - **Journal bridge** — watches `.jfl/journal/`, emits events on new entries
137
+ - **Pattern-matching subscriptions** (glob support)
138
+ - **Transports:** SSE, WebSocket, HTTP polling
139
+ - **Event types:** `session:started`, `session:ended`, `task:completed`, `journal:entry`, `service:healthy`, `custom`, and more
221
140
 
222
- ## OpenClaw Protocol
141
+ Services emit events by appending to `.jfl/service-events.jsonl` — no auth needed, Context Hub watches the file automatically.
223
142
 
224
- OpenClaw is JFL's runtime-agnostic agent protocol. Any AI agent can become a JFL team member:
143
+ ### Memory System
144
+
145
+ Hybrid search over all journal entries with TF-IDF (40%) + semantic embeddings (60%).
225
146
 
226
147
  ```bash
227
- # Register agent with a GTM workspace
228
- jfl openclaw register -g /path/to/gtm -a my-agent
148
+ jfl memory init # Initialize database
149
+ jfl memory search "pricing" # Search memories
150
+ jfl memory status # Stats and health
151
+ jfl memory index [--force] # Reindex journal entries
152
+ jfl ask "what did we decide about auth?" # Shorthand
153
+ ```
229
154
 
230
- # Start session (creates branch, auto-commit, Context Hub)
231
- jfl openclaw session-start -a my-agent --json
155
+ Auto-indexes every 60 seconds. Boosts recent entries (1.3x), decisions (1.4x), features (1.2x). Works with or without OpenAI embeddings — TF-IDF alone provides solid keyword search.
232
156
 
233
- # Search project context
234
- jfl openclaw context -q "pricing decisions" --json
157
+ ### Session Management
235
158
 
236
- # Write journal entry
237
- jfl openclaw journal --type decision --title "Chose OAuth" --summary "Better for multi-tenant"
159
+ Automatic session isolation for parallel work:
238
160
 
239
- # End session (merge, cleanup)
240
- jfl openclaw session-end --json
161
+ - **Single session:** Works directly on a session branch (no worktree overhead)
162
+ - **Multiple concurrent sessions:** Isolated git worktrees prevent conflicts
163
+ - **Auto-commit:** Saves work every 2 minutes (knowledge, journal, suggestions)
164
+ - **Crash recovery:** Detects uncommitted work in stale sessions, auto-commits on next start
165
+
166
+ ```bash
167
+ # Hooks handle everything automatically. Manual control:
168
+ jfl session create # Create session
169
+ jfl session list # List active sessions
170
+ jfl session end # End and merge
171
+ ./scripts/session/auto-commit.sh start # Background auto-commit
241
172
  ```
242
173
 
243
- All commands support `--json` for programmatic use. See `jfl openclaw --help` for the full command list.
174
+ **SessionStart hook flow:**
175
+ 1. Sync repos (prevent context loss)
176
+ 2. Check for stale sessions, auto-cleanup if > 5
177
+ 3. Recover uncommitted work from crashed sessions
178
+ 4. Create session branch (or worktree if concurrent)
179
+ 5. Start auto-commit
180
+ 6. Health-check Context Hub (start only if down)
244
181
 
245
182
  ---
246
183
 
247
- ## Context Hub
184
+ ## Service Agents
248
185
 
249
- Context Hub is a local daemon (port 4242) that provides unified context to any AI:
186
+ Register external repos as services in your GTM. Each service gets an agent definition, skill wrapper, and journal sync.
250
187
 
251
188
  ```bash
252
- # Start Context Hub
253
- jfl context-hub start
254
-
255
- # Check status
256
- jfl context-hub status
257
-
258
- # Stop daemon
259
- jfl context-hub stop
189
+ # Onboard a service repo
190
+ jfl onboard /path/to/my-api --name my-api --type api
191
+
192
+ # Or create from scratch
193
+ jfl services create
194
+
195
+ # Manage services
196
+ jfl services list # All registered services
197
+ jfl services status my-api # Health check
198
+ jfl services start my-api # Start a service
199
+ jfl services stop my-api # Stop a service
200
+ jfl services validate --fix # Validate and auto-repair
201
+ jfl services sync-agents # Sync peer agent definitions
202
+ jfl services scan # Discover services in directory
203
+ jfl services deps # Show dependency graph
204
+ jfl services # Interactive TUI (no args)
260
205
  ```
261
206
 
262
- **What it aggregates:**
263
- - **Journal entries** — What happened across sessions (`.jfl/journal/*.jsonl`)
264
- - **Knowledge docs** Strategy, vision, roadmap (`knowledge/*.md`)
265
- - **Code headers** `@purpose`, `@spec`, `@decision` tags from files
207
+ **What onboarding creates:**
208
+ - Agent definition (`.claude/agents/service-{name}.md`)
209
+ - Skill wrapper (`.claude/skills/{name}/SKILL.md` + `handler.sh`)
210
+ - Service entry in `.jfl/services.json`
211
+ - Config in service repo (`.jfl/config.json` with `gtm_parent`)
266
212
 
267
- **MCP Integration:**
268
- Context Hub exposes MCP tools that Claude Code and other AIs can use:
269
- - `context_get` Get unified context (journal + knowledge + code)
270
- - `context_search` Semantic search across all sources
271
- - `context_status` Check daemon status
272
- - `context_sessions` — See activity from other sessions
213
+ **Phone-home on session end:** When a service session ends, it syncs to the parent GTM:
214
+ - Journal entries copied to `GTM/.jfl/journal/service-{name}-*.jsonl`
215
+ - Comprehensive sync payload (git stats, health, environment)
216
+ - GTM agent notified via event bus
217
+ - Never blocks session end
273
218
 
274
- Add to your `.mcp.json`:
275
- ```json
276
- {
277
- "jfl-context": {
278
- "command": "jfl-context-hub-mcp"
279
- }
280
- }
219
+ **Invoke from GTM:**
220
+ ```
221
+ /my-api status # Check service health
222
+ /my-api recent # Recent changes
281
223
  ```
282
224
 
283
225
  ---
284
226
 
285
- ## Synopsis - Work Summaries
227
+ ## Commands
286
228
 
287
- Synopsis aggregates journal entries, git commits, and code file headers to answer "what happened?"
229
+ ### Core
288
230
 
289
- ```bash
290
- # Last 24 hours, all authors
291
- jfl synopsis 24
231
+ | Command | Description |
232
+ |---------|-------------|
233
+ | `jfl init -n <name>` | Create new GTM workspace |
234
+ | `jfl status` | Project status and auth |
235
+ | `jfl hud [-c\|--compact]` | Campaign dashboard (ship date, phases, pipeline) |
236
+ | `jfl update [--dry]` | Pull latest skills, scripts, templates (preserves CLAUDE.md, .mcp.json) |
237
+ | `jfl synopsis [hours] [author]` | Work summary (journal + commits + file headers) |
238
+ | `jfl repair` | Fix corrupted .jfl/config.json |
239
+ | `jfl validate-settings [--fix] [--json]` | Validate and repair .claude/settings.json |
240
+ | `jfl preferences [--clear-ai] [--show]` | Manage JFL preferences |
241
+ | `jfl profile [action]` | Manage profile (show, edit, export, import, generate) |
242
+ | `jfl test` | Test onboarding flow (isolated environment) |
243
+
244
+ ### Context Hub
292
245
 
293
- # Last 8 hours
294
- jfl synopsis 8
246
+ | Command | Description |
247
+ |---------|-------------|
248
+ | `jfl context-hub ensure` | Start daemon if not running |
249
+ | `jfl context-hub stop [--purge]` | Stop daemon |
250
+ | `jfl context-hub restart` | Restart daemon |
251
+ | `jfl context-hub status` | Health check |
252
+ | `jfl context-hub doctor [--clean]` | Diagnose all projects |
253
+ | `jfl context-hub ensure-all` | Start for all GTM projects |
254
+ | `jfl context-hub dashboard` | Live event/context dashboard |
255
+ | `jfl context-hub query` | Query context from CLI |
256
+ | `jfl context-hub serve` | Run in foreground (daemon mode) |
257
+ | `jfl context-hub install-daemon` | Auto-start on boot |
258
+ | `jfl context-hub uninstall-daemon` | Remove auto-start |
259
+
260
+ ### Memory
295
261
 
296
- # What did Alex work on in last 48 hours?
297
- jfl synopsis 48 alex
262
+ | Command | Description |
263
+ |---------|-------------|
264
+ | `jfl memory init` | Initialize memory database |
265
+ | `jfl memory search <query> [-t type] [-n max]` | Search indexed memories |
266
+ | `jfl memory status` | Stats and health |
267
+ | `jfl memory index [--force]` | Reindex journal entries |
268
+ | `jfl ask <question> [-t type]` | Shorthand for memory search |
298
269
 
299
- # Filter by git author name
300
- jfl synopsis 24 --author "Andrew"
301
- ```
270
+ ### Services
302
271
 
303
- **Output includes:**
304
- - Summary of features, fixes, decisions
305
- - Time audit breakdown (infra vs features vs docs)
306
- - Per-team-member contributions
307
- - Health checks (too much infra? not enough outreach?)
308
- - Next steps from journal entries
309
- - Incomplete/stubbed items
272
+ | Command | Description |
273
+ |---------|-------------|
274
+ | `jfl onboard <path> [-n name] [-t type]` | Register service in GTM |
275
+ | `jfl services` | Interactive service manager TUI |
276
+ | `jfl services create [--skip-ai]` | Create new service (wizard) |
277
+ | `jfl services list` | List all services |
278
+ | `jfl services status [name]` | Health check |
279
+ | `jfl services start <name>` | Start a service |
280
+ | `jfl services stop <name> [--force]` | Stop a service |
281
+ | `jfl services scan [--path <p>] [--dry-run]` | Discover services in directory |
282
+ | `jfl services deps [validate]` | Show/validate dependency graph |
283
+ | `jfl services validate [--fix] [--json]` | Validate configs, auto-repair |
284
+ | `jfl services sync-agents [--dry-run] [--current]` | Sync peer agent definitions |
285
+ | `jfl service-agent <action> [name]` | Manage MCP agents (init, generate, generate-all, register, unregister, list, clean) |
286
+ | `jfl service-manager <action>` | Service Manager daemon (start, stop, restart, status, serve) |
287
+ | `jfl migrate-services [gtm-path]` | Migrate from references/ to service manager |
288
+
289
+ ### Agent Orchestration
310
290
 
311
- ---
291
+ | Command | Description |
292
+ |---------|-------------|
293
+ | `jfl ralph [args]` | Ralph-tui agent loop orchestrator |
294
+ | `jfl peter [action]` | Peter Parker model-routed orchestrator (setup, run, status) |
295
+ | `jfl orchestrate [name] [--list] [--create <n>]` | Multi-service orchestration workflows |
296
+ | `jfl dashboard` | Interactive service monitoring TUI |
297
+ | `jfl events [-p pattern]` | Live MAP event bus dashboard |
312
298
 
313
- ## Session Management
299
+ ### Platform
314
300
 
315
- Work in isolated git worktrees with automatic commit/merge:
301
+ | Command | Description |
302
+ |---------|-------------|
303
+ | `jfl login [--platform\|--x402\|--solo\|--team\|--free]` | Authenticate |
304
+ | `jfl logout` | Logout from platform |
305
+ | `jfl wallet` | Wallet and day pass status |
306
+ | `jfl deploy [-f]` | Deploy to JFL platform |
307
+ | `jfl agents [action]` | Manage parallel agents (list, create, start, stop, destroy) |
308
+ | `jfl feedback [action]` | Rate session (0-5), view or sync |
316
309
 
317
- ```bash
318
- # Create new session (creates worktree + branch)
319
- jfl session create
310
+ ### Telemetry & Intelligence
311
+
312
+ | Command | Description |
313
+ |---------|-------------|
314
+ | `jfl telemetry status` | Show telemetry status |
315
+ | `jfl telemetry show` | Show queued events |
316
+ | `jfl telemetry digest [--hours N] [--format json] [--platform]` | Cost breakdown, health analysis, suggestions |
317
+ | `jfl telemetry reset` | Reset install ID |
318
+ | `jfl telemetry track --category <c> --event <e>` | Emit event from shell scripts |
319
+ | `jfl improve [--dry-run] [--auto] [--hours N]` | Self-improvement loop: analyze, suggest, create issues |
320
+ | `jfl preferences --no-telemetry` | Opt out of telemetry |
320
321
 
321
- # List active sessions
322
- jfl session list
322
+ **Model cost tracking:** Every Stratus API call emits token counts and estimated cost. Covers claude-opus-4-6, claude-sonnet-4-6, claude-sonnet-4-5, claude-haiku-3-5, gpt-4o.
323
323
 
324
- # End session (merges to main, removes worktree)
325
- jfl session end [session-name]
324
+ **`jfl telemetry digest`** analyzes local events: per-model cost tables, command stats, error rates, hub/memory/session health. Flags issues like high MCP latency, cost concentration, crash rates.
326
325
 
327
- # Auto-commit running in background (every 2 min)
328
- ./scripts/session/auto-commit.sh start
329
- ```
326
+ **`jfl improve`** generates actionable suggestions from the digest. `--dry-run` previews, `--auto` creates GitHub issues tagged `[jfl-improve]`.
330
327
 
331
- **Each session:**
332
- - Isolated git worktree (parallel work without conflicts)
333
- - Auto-commits knowledge/, content/, suggestions/ every 2 minutes
334
- - Auto-merges to main on session end
335
- - Removes worktree and branch when merged
336
- - Writes journal entries (enforced by hooks)
337
-
338
- **SessionStart hook:**
339
- - CD to worktree
340
- - Sync repos (jfl-gtm + product submodule)
341
- - Run doctor check (detect issues)
342
- - Start Context Hub
343
- - Show HUD dashboard
344
-
345
- **Stop hook:**
346
- - Auto-commit uncommitted changes
347
- - Merge to main (with conflict handling)
348
- - Cleanup worktree and branch
349
- - Validate journal entry exists
328
+ ### Voice Input
350
329
 
351
- ---
330
+ Local voice-to-text using Whisper models.
352
331
 
353
- ## Authentication
332
+ | Command | Description |
333
+ |---------|-------------|
334
+ | `jfl voice` | Start voice recording with VAD |
335
+ | `jfl voice setup` | First-time setup wizard |
336
+ | `jfl voice devices` | List audio input devices |
337
+ | `jfl voice test [-d device]` | Test record + transcribe (3s) |
338
+ | `jfl voice recording [-d device] [-t seconds]` | Test recording only |
339
+ | `jfl voice record [-d device]` | Record with VAD |
340
+ | `jfl voice hotkey [-d device] [-m mode]` | Global hotkey listener (macOS) |
341
+ | `jfl voice daemon start\|stop\|status` | Background hotkey daemon (macOS) |
342
+ | `jfl voice model list\|download\|default [name]` | Manage whisper models |
343
+ | `jfl voice help` | Voice command help |
344
+
345
+ ### Skills
354
346
 
355
- **GitHub OAuth:**
356
- ```bash
357
- jfl login
358
- ```
347
+ | Command | Description |
348
+ |---------|-------------|
349
+ | `jfl skills list [-a\|--available] [-c category] [-t tag]` | List installed or available skills |
350
+ | `jfl skills install <skills...>` | Install skill(s) |
351
+ | `jfl skills remove <skills...>` | Remove skill(s) |
352
+ | `jfl skills update [skill] [--dry]` | Update installed skill(s) |
353
+ | `jfl skills search <query>` | Search for skills |
354
+ | `jfl brand [subcommand]` | Brand architect shortcut |
355
+ | `jfl content <type> [topic]` | Content creator shortcut |
359
356
 
360
- **x402 Crypto Wallet ($5/day micropayments):**
361
- ```bash
362
- jfl login --x402
363
- ```
357
+ ### OpenClaw Protocol
364
358
 
365
- Enables:
366
- - Gasless USDC transfers (no ETH needed)
367
- - $5/day Day Pass payments
368
- - httpcat-cli bundled and configured
359
+ Runtime-agnostic agent integration. All commands support `--json`.
369
360
 
370
- View auth status:
371
- ```bash
372
- jfl status
373
- jfl wallet
374
- ```
361
+ | Command | Description |
362
+ |---------|-------------|
363
+ | `jfl openclaw session-start -a <agent>` | Start agent session |
364
+ | `jfl openclaw session-end [-s]` | End session (merge, sync) |
365
+ | `jfl openclaw context [-q query] [-t type]` | Query project context |
366
+ | `jfl openclaw journal --type <t> --title <t> --summary <s>` | Write journal entry |
367
+ | `jfl openclaw heartbeat` | Health pulse (auto-commit, check hub) |
368
+ | `jfl openclaw status` | Agent session state |
369
+ | `jfl openclaw register -g <gtm>` | Register agent with GTM |
370
+ | `jfl openclaw gtm-list` | List registered GTM workspaces |
371
+ | `jfl openclaw gtm-switch <id>` | Switch active GTM workspace |
372
+ | `jfl openclaw gtm-create <name> [-p path]` | Create and register new GTM |
373
+ | `jfl openclaw tag <service> <message>` | Send message to service agent |
374
+
375
+ ### Clawdbot
376
+
377
+ Telegram-based agent with context injection.
375
378
 
376
- ---
379
+ | Command | Description |
380
+ |---------|-------------|
381
+ | `jfl clawdbot setup` | Install JFL plugin into Clawdbot |
382
+ | `jfl clawdbot status` | Plugin installation status |
377
383
 
378
- ## Pricing
384
+ ### GTM
379
385
 
380
- | Plan | Price | What You Get |
381
- |------|-------|--------------|
382
- | **Trial** | $0 | Full toolkit, foundation + brand setup. Use with Claude Code. |
383
- | **Day Pass** | $5/day | Pay only days you use. AI included. Chat in Telegram/Slack/Discord. Pay with USDC (gasless). |
384
- | **Solo** | $49/mo | Just you. AI included. Best if you use it most days. |
385
- | **Team** | $199/mo | Up to 5 seats (+$25/seat after). AI for everyone. Parallel agents. Team analytics. |
386
+ | Command | Description |
387
+ |---------|-------------|
388
+ | `jfl gtm process-service-update [file]` | Process service sync notification (hook) |
386
389
 
387
390
  ---
388
391
 
389
- ## Skills Library
392
+ ## Skills
390
393
 
391
- JFL includes skills for Claude Code:
394
+ Pre-installed slash commands for Claude Code:
392
395
 
393
396
  | Skill | Description |
394
397
  |-------|-------------|
395
- | `/hud` | Campaign dashboard with countdown and tasks |
398
+ | `/hud` | Project dashboard guided workflow, progress tracking |
396
399
  | `/brand-architect` | Generate brand identity (marks, colors, typography) |
397
- | `/web-architect` | Implement assets (SVG, favicon, OG images) |
400
+ | `/web-architect` | Implement brand assets, audit code |
398
401
  | `/content` | Create content (threads, posts, articles, one-pagers) |
399
- | `/x-algorithm` | Optimize tweets for X For You feed |
400
- | `/video` | Founder video scripts (viral short-form) |
401
- | `/startup` | Startup journey guidance (idea to scale) |
402
- | `/agent-browser` | Headless browser automation |
403
- | `/search` | Semantic search across GTM knowledge base |
402
+ | `/founder-video` | Viral short-form video scripts |
403
+ | `/startup` | Startup guidance (idea to scale) |
404
404
  | `/spec` | Multi-agent adversarial spec refinement |
405
- | `/react-best-practices` | React/Next.js performance optimization |
405
+ | `/fly-deploy` | Fly.io deployment management |
406
+ | `/search` | Semantic search across knowledge base |
407
+ | `/end` | End session gracefully (merge, cleanup) |
408
+ | `/ralph-tui` | AI agent loop orchestrator |
409
+ | `/x-algorithm` | X/Twitter For You feed optimization |
410
+ | `/agent-browser` | Headless browser automation |
411
+ | `/react-best-practices` | React/Next.js performance patterns |
406
412
  | `/remotion-best-practices` | Remotion video creation in React |
413
+ | `/geo` | GEO-first SEO analysis for AI search engines |
414
+ | `/geo-audit` | Full website GEO+SEO audit with parallel agents |
407
415
 
408
- Run in Claude Code after `jfl init`.
416
+ ```bash
417
+ # Install more skills
418
+ jfl skills list --available
419
+ jfl skills install geo-audit
420
+ ```
409
421
 
410
422
  ---
411
423
 
412
424
  ## Knowledge Layer
413
425
 
414
- JFL structures your GTM knowledge:
426
+ Strategy docs filled through conversation, not forms:
415
427
 
416
428
  ```
417
429
  knowledge/
418
- ├── VISION.md # What you're building
430
+ ├── VISION.md # What you're building, who it's for
419
431
  ├── NARRATIVE.md # How you tell the story
420
432
  ├── THESIS.md # Why you'll win
421
433
  ├── ROADMAP.md # What ships when
422
434
  ├── BRAND_BRIEF.md # Brand inputs
423
435
  ├── BRAND_DECISIONS.md # Finalized brand choices
424
- ├── VOICE_AND_TONE.md # How the brand speaks
425
- └── TASKS.md # Master task list
426
- ```
427
-
428
- These docs are the source of truth. AIs read them to generate content, make decisions, and maintain consistency.
429
-
430
- ---
431
-
432
- ## Auto-Update
433
-
434
- JFL automatically checks for updates on session start (24-hour cache):
435
-
436
- - **Minor/patch versions** — Auto-updates silently
437
- - **Major versions** — Prompts for approval
438
-
439
- **Skip auto-update:**
440
- ```bash
441
- jfl --no-update
442
- ```
443
-
444
- **Manual update:**
445
- ```bash
446
- jfl update # Pull latest skills and CLAUDE.md
447
- jfl update --dry # Preview changes first
436
+ └── VOICE_AND_TONE.md # How the brand speaks
448
437
  ```
449
438
 
450
- **What gets updated:**
451
- - `.claude/skills/` — Latest skill implementations
452
- - `CLAUDE.md` — Latest AI instructions
453
- - `scripts/` — Session management scripts
454
- - `templates/` — Doc templates
455
-
456
- **What's preserved:**
457
- - `knowledge/` — Your strategy docs
458
- - `content/` — Your generated content
459
- - `product/` — Your product code
460
- - `.jfl/config.json` — Project settings
439
+ **Philosophy:** Vision emerges from doing, not declaring. Start building immediately. Claude captures context into docs as you work.
461
440
 
462
441
  ---
463
442
 
464
443
  ## Journal Protocol
465
444
 
466
- Every session MUST write journal entries. The Stop hook blocks if no entry exists.
445
+ Every session MUST write journal entries. Hooks enforce this.
467
446
 
468
- **Entry format:**
469
447
  ```json
470
448
  {
471
449
  "v": 1,
472
- "ts": "2026-01-28T10:00:00.000Z",
473
- "session": "session-goose-20260128-1014-00cec4",
474
- "type": "feature|fix|decision|milestone|discovery",
475
- "status": "complete|incomplete|blocked",
476
- "title": "Short title",
477
- "summary": "2-3 sentence summary",
478
- "detail": "Full description with context",
479
- "files": ["file1.ts", "file2.ts"],
480
- "incomplete": ["what's not done"],
481
- "next": "what should happen next"
450
+ "ts": "2026-02-27T10:00:00.000Z",
451
+ "session": "session-goose-20260227-1014-abc123",
452
+ "type": "feature",
453
+ "status": "complete",
454
+ "title": "Add service agent onboarding",
455
+ "summary": "Built jfl onboard command that registers service repos in GTM",
456
+ "detail": "Creates agent definition, skill wrapper, services.json entry...",
457
+ "files": ["src/commands/onboard.ts"],
458
+ "incomplete": ["peer sync not wired"],
459
+ "next": "Wire phone-home on session end"
482
460
  }
483
461
  ```
484
462
 
485
- **Write entries when:**
486
- - Feature completed
487
- - Decision made
488
- - Bug fixed
489
- - Milestone reached
490
- - Session ending
463
+ **Write entries when:** Feature completed, decision made, bug fixed, milestone reached, session ending.
491
464
 
492
- Journal entries become searchable via Context Hub and Synopsis.
465
+ Entries become searchable via `jfl memory search` and MCP `memory_search` tool.
493
466
 
494
467
  ---
495
468
 
496
- ## File Headers (Required for Code)
497
-
498
- Every `.ts`, `.tsx`, `.js`, `.jsx` file MUST have a header with `@purpose`:
469
+ ## How It Works
499
470
 
500
- ```typescript
501
- /**
502
- * Component/Module Name
503
- *
504
- * Brief description of what this does.
505
- *
506
- * @purpose One-line description of file's purpose
507
- * @spec Optional: link to spec (e.g., PLATFORM_SPEC.md#sessions)
508
- * @decision Optional: decision slug (e.g., journal/2026-01.md#per-session)
509
- */
471
+ ```
472
+ Session Start During Session Session End
473
+ ───────────── ────────────── ───────────
474
+ SessionStart hook fires You work normally Stop hook fires
475
+ ├─ Sync repos ├─ Code, content, strategy ├─ Warn if no journal
476
+ ├─ Create session branch ├─ Journal entries auto-tracked ├─ Auto-commit changes
477
+ ├─ Recover crashed sessions ├─ Auto-commit every 2 min ├─ Merge to main
478
+ ├─ Health-check Context Hub ├─ Events flow to MAP bus └─ Cleanup branch
479
+ └─ Start auto-commit └─ Memory indexes continuously
480
+
481
+ Context Hub (always running)
482
+ ├─ Serves MCP tools to Claude Code
483
+ ├─ Aggregates journal + knowledge + code
484
+ ├─ Bridges service events from file-drop
485
+ └─ Watches journal/ for live entries
510
486
  ```
511
487
 
512
- Enables:
513
- - Synopsis to extract context from files
514
- - Codebase understanding without reading full files
515
- - Decision traceability
488
+ **Everything is files.** No proprietary database. No lock-in. Context is git-native — version controlled, portable, model-agnostic.
516
489
 
517
490
  ---
518
491
 
519
- ## Contributing to JFL
520
-
521
- ```bash
522
- # Clone via GTM structure
523
- jfl init my-jfl-gtm
524
- # During setup, add: https://github.com/402goose/just-fucking-launch.git
525
-
526
- # Run dev setup
527
- cd my-jfl-gtm/product
528
- ./scripts/dev-setup.sh
529
-
530
- # Work in the CLI submodule
531
- cd cli
532
- npm install
533
- npm run build
534
-
535
- # Link globally for testing
536
- npm link
537
- ```
492
+ ## Auto-Update
538
493
 
539
- ---
494
+ JFL checks for npm updates on session start (24-hour cache):
540
495
 
541
- ## Environment Variables
496
+ - **Minor/patch:** Auto-updates silently
497
+ - **Major:** Prompts for approval
542
498
 
543
499
  ```bash
544
- CRM_SHEET_ID=your-sheet-id # Google Sheets CRM integration
500
+ jfl update # Pull latest skills and scripts
501
+ jfl update --dry # Preview changes first
502
+ jfl --no-update # Skip auto-update check
545
503
  ```
546
504
 
547
- ---
548
-
549
- ## Files You'll Work With
550
-
551
- ```
552
- .jfl/
553
- ├── config.json # Project configuration
554
- ├── journal/ # Session journals (JSONL)
555
- ├── context-hub.pid # Context Hub daemon PID
556
- └── logs/ # Session logs
557
-
558
- knowledge/ # Strategy docs (you fill these)
559
- content/ # Generated content
560
- suggestions/{name}.md # Per-person working space
561
- previews/ # Generated assets
562
- ```
505
+ **What gets updated:** `.claude/skills/`, `scripts/`, `templates/`, `context-hub`
506
+ **What's preserved:** `knowledge/`, `content/`, `suggestions/`, `CLAUDE.md`, `.mcp.json`, `.jfl/config.json`
563
507
 
564
508
  ---
565
509
 
566
- ## Help & Support
510
+ ## Authentication
567
511
 
568
512
  ```bash
569
- jfl help # Show all commands
570
- jfl --version # Show version
513
+ jfl login # Platform Account (recommended)
514
+ jfl login --x402 # x402 Day Pass ($5/day, crypto)
515
+ jfl login --solo # Solo plan ($49/mo)
516
+ jfl login --team # Team plan ($199/mo)
517
+ jfl login --free # Stay on trial
518
+ jfl logout # Logout
519
+ jfl status # Check auth status
520
+ jfl wallet # Wallet and day pass status
571
521
  ```
572
522
 
573
- **Issues & Feedback:**
574
- - GitHub: https://github.com/402goose/jfl-cli/issues
575
- - X: [@taggaoyl](https://x.com/taggaoyl)
576
-
577
523
  ---
578
524
 
579
525
  ## What's New
580
526
 
527
+ **0.2.4**
528
+ - Feat: `jfl telemetry digest` — per-model cost tables, command stats, health analysis, improvement suggestions
529
+ - Feat: `jfl improve` — self-improvement loop with GitHub issue creation (`--auto`)
530
+ - Feat: Model cost tracking on every Stratus API call (token counts, estimated USD, confidence, timing)
531
+ - Feat: Peter Parker agent cost tracking (per-role, per-model cost events)
532
+ - Feat: Model pricing table (claude-opus-4-6, claude-sonnet-4-6, claude-sonnet-4-5, claude-haiku-3-5, gpt-4o)
533
+
534
+ **0.2.3**
535
+ - Fix: Context Hub race condition — SessionStart hook checks health before ensure
536
+ - Fix: `jfl update` no longer clobbers project-specific CLAUDE.md and .mcp.json
537
+ - Fix: `restartCoreServices` checks health before stop+restart cycle
538
+ - Feat: Context Hub dashboard with live event stream
539
+ - Feat: Journal bridge — journal entries appear in MAP event bus in real-time
540
+ - Feat: Auth supports query param tokens for SSE/EventSource connections
541
+
542
+ **0.2.2**
543
+ - Feat: Context Hub always-on — MCP auto-recovery, ensure-all, doctor, launchd daemon
544
+ - Fix: Context Hub survives SIGTERM during daemon startup (5s grace period)
545
+ - Feat: MAP event bus with ring buffer, SSE/WS, pattern matching, file-drop bridging
546
+ - Feat: Per-project Context Hub ports (no more collisions)
547
+
548
+ **0.2.1**
549
+ - Feat: Service agent system — onboard, create, validate, phone-home
550
+ - Feat: Peter Parker model-routed orchestrator (cost/balanced/quality profiles)
551
+ - Feat: Peer agent sync across services
552
+ - Fix: `jfl init` no longer creates nested directories
553
+
581
554
  **0.2.0**
582
- - OpenClaw protocol — runtime-agnostic agent integration (`jfl openclaw`)
583
- - Clawdbot plugin — single install, dormant until /jfl, full lifecycle hooks
584
- - `jfl clawdbot setup` one command to install plugin
585
- - Agent tools (jfl_context, jfl_journal) for proactive AI behavior
586
- - GTM detection via config.json type field (no more false positives on service repos)
555
+ - OpenClaw protocol — runtime-agnostic agent integration
556
+ - Clawdbot plugin — Telegram-based agent with context injection
557
+ - Memory systemTF-IDF + embeddings, hybrid search, auto-indexing
587
558
 
588
559
  **0.1.0**
589
- - Auto-update on session start (checks npm registry, 24h cache)
590
- - Synopsis command (`jfl synopsis [hours] [author]`)
591
- - Improved doctor checks with categorized output
592
- - Fixed auto-merge failure that caused branch pileup
593
- - Context Hub productization improvements
560
+ - Auto-update on session start
561
+ - Synopsis command
562
+ - Context Hub productization
563
+
564
+ ---
565
+
566
+ ## Environment Variables
567
+
568
+ ```bash
569
+ OPENAI_API_KEY=sk-... # Optional: enables semantic embeddings for memory search
570
+ CONTEXT_HUB_PORT=4242 # Override per-project port
571
+ CRM_SHEET_ID=your-sheet-id # Google Sheets CRM integration
572
+ JFL_PLATFORM_URL=... # JFL platform URL (default: jfl.run)
573
+ ```
594
574
 
595
575
  ---
596
576
 
597
577
  ## License
598
578
 
599
- MIT License - see LICENSE file for details.
579
+ MIT License - see LICENSE file.
600
580
 
601
581
  ---
602
582
 
@@ -604,8 +584,4 @@ MIT License - see LICENSE file for details.
604
584
 
605
585
  Built by [@tagga](https://x.com/taggaoyl) (Alec Taggart)
606
586
 
607
- Powered by:
608
- - [Claude](https://claude.ai) (Anthropic)
609
- - [x402](https://402.com) (crypto micropayments)
610
- - Commander.js, Inquirer, Chalk, and more
611
-
587
+ Powered by [Claude](https://claude.ai) (Anthropic), [x402](https://x402.org) (crypto micropayments), Commander.js, sql.js, and more.