fivocell 1.0.5 → 3.0.0

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 (182) hide show
  1. package/README.md +63 -464
  2. package/bin/cell.js +2 -2
  3. package/dist/behavior-intelligence.d.ts +90 -0
  4. package/dist/behavior-intelligence.d.ts.map +1 -0
  5. package/dist/behavior-intelligence.js +595 -0
  6. package/dist/behavior-intelligence.js.map +1 -0
  7. package/dist/behavioral-tracker.d.ts +90 -0
  8. package/dist/behavioral-tracker.d.ts.map +1 -0
  9. package/dist/behavioral-tracker.js +185 -0
  10. package/dist/behavioral-tracker.js.map +1 -0
  11. package/dist/cli.js +417 -1659
  12. package/dist/cli.js.map +1 -1
  13. package/dist/cloud-sync.d.ts +66 -0
  14. package/dist/cloud-sync.d.ts.map +1 -0
  15. package/dist/cloud-sync.js +328 -0
  16. package/dist/cloud-sync.js.map +1 -0
  17. package/dist/code-scanner.d.ts +51 -0
  18. package/dist/code-scanner.d.ts.map +1 -0
  19. package/dist/code-scanner.js +966 -0
  20. package/dist/code-scanner.js.map +1 -0
  21. package/dist/community-intel.d.ts +34 -0
  22. package/dist/community-intel.d.ts.map +1 -0
  23. package/dist/community-intel.js +148 -0
  24. package/dist/community-intel.js.map +1 -0
  25. package/dist/community-intelligence.d.ts +42 -0
  26. package/dist/community-intelligence.d.ts.map +1 -0
  27. package/dist/community-intelligence.js +160 -0
  28. package/dist/community-intelligence.js.map +1 -0
  29. package/dist/community-v2.d.ts +106 -0
  30. package/dist/community-v2.d.ts.map +1 -0
  31. package/dist/community-v2.js +378 -0
  32. package/dist/community-v2.js.map +1 -0
  33. package/dist/core/__tests__/chapter8-hostile.test.js +1 -1
  34. package/dist/core/__tests__/chapter8-hostile.test.js.map +1 -1
  35. package/dist/core/__tests__/chapter9-hostile.test.js +1 -1
  36. package/dist/core/__tests__/chapter9-hostile.test.js.map +1 -1
  37. package/dist/core/__tests__/complexity-analyzer.test.js +15 -15
  38. package/dist/core/__tests__/team-composer.test.js +2 -1
  39. package/dist/core/__tests__/team-composer.test.js.map +1 -1
  40. package/dist/core/convention-detector.d.ts.map +1 -1
  41. package/dist/core/convention-detector.js +11 -23
  42. package/dist/core/convention-detector.js.map +1 -1
  43. package/dist/core/cost-optimizer.d.ts.map +1 -1
  44. package/dist/core/cost-optimizer.js +13 -25
  45. package/dist/core/cost-optimizer.js.map +1 -1
  46. package/dist/core/database.d.ts +28 -0
  47. package/dist/core/database.d.ts.map +1 -0
  48. package/dist/core/database.js +587 -0
  49. package/dist/core/database.js.map +1 -0
  50. package/dist/core/knowledge-graph.d.ts.map +1 -1
  51. package/dist/core/knowledge-graph.js +9 -24
  52. package/dist/core/knowledge-graph.js.map +1 -1
  53. package/dist/core/logger.d.ts +9 -0
  54. package/dist/core/logger.d.ts.map +1 -0
  55. package/dist/core/logger.js +26 -0
  56. package/dist/core/logger.js.map +1 -0
  57. package/dist/core/playbook-generator.js +48 -48
  58. package/dist/core/privacy-manager.d.ts.map +1 -1
  59. package/dist/core/privacy-manager.js +5 -0
  60. package/dist/core/privacy-manager.js.map +1 -1
  61. package/dist/core/project-dna.d.ts.map +1 -1
  62. package/dist/core/project-dna.js +6 -19
  63. package/dist/core/project-dna.js.map +1 -1
  64. package/dist/core/prompt-builder.d.ts +18 -0
  65. package/dist/core/prompt-builder.d.ts.map +1 -0
  66. package/dist/core/prompt-builder.js +325 -0
  67. package/dist/core/prompt-builder.js.map +1 -0
  68. package/dist/core/session-memory.d.ts +90 -0
  69. package/dist/core/session-memory.d.ts.map +1 -0
  70. package/dist/core/session-memory.js +229 -0
  71. package/dist/core/session-memory.js.map +1 -0
  72. package/dist/core/signal-capture.d.ts +5 -0
  73. package/dist/core/signal-capture.d.ts.map +1 -1
  74. package/dist/core/signal-capture.js +67 -0
  75. package/dist/core/signal-capture.js.map +1 -1
  76. package/dist/core/team-composer.d.ts.map +1 -1
  77. package/dist/core/team-composer.js +16 -6
  78. package/dist/core/team-composer.js.map +1 -1
  79. package/dist/cross-model-memory.d.ts +95 -0
  80. package/dist/cross-model-memory.d.ts.map +1 -0
  81. package/dist/cross-model-memory.js +229 -0
  82. package/dist/cross-model-memory.js.map +1 -0
  83. package/dist/daemon/lifecycle.d.ts +3 -0
  84. package/dist/daemon/lifecycle.d.ts.map +1 -1
  85. package/dist/daemon/lifecycle.js +98 -64
  86. package/dist/daemon/lifecycle.js.map +1 -1
  87. package/dist/daemon/server.d.ts.map +1 -1
  88. package/dist/daemon/server.js +637 -25
  89. package/dist/daemon/server.js.map +1 -1
  90. package/dist/developer-intelligence.d.ts +18 -0
  91. package/dist/developer-intelligence.d.ts.map +1 -0
  92. package/dist/developer-intelligence.js +180 -0
  93. package/dist/developer-intelligence.js.map +1 -0
  94. package/dist/first-run.d.ts +8 -0
  95. package/dist/first-run.d.ts.map +1 -0
  96. package/dist/first-run.js +182 -0
  97. package/dist/first-run.js.map +1 -0
  98. package/dist/focus-report.d.ts +32 -0
  99. package/dist/focus-report.d.ts.map +1 -0
  100. package/dist/focus-report.js +293 -0
  101. package/dist/focus-report.js.map +1 -0
  102. package/dist/ide-intelligence.d.ts +118 -0
  103. package/dist/ide-intelligence.d.ts.map +1 -0
  104. package/dist/ide-intelligence.js +284 -0
  105. package/dist/ide-intelligence.js.map +1 -0
  106. package/dist/index.d.ts +22 -0
  107. package/dist/index.d.ts.map +1 -1
  108. package/dist/index.js +119 -2
  109. package/dist/index.js.map +1 -1
  110. package/dist/insight-generator.d.ts +58 -0
  111. package/dist/insight-generator.d.ts.map +1 -0
  112. package/dist/insight-generator.js +314 -0
  113. package/dist/insight-generator.js.map +1 -0
  114. package/dist/journey-memory.d.ts +75 -0
  115. package/dist/journey-memory.d.ts.map +1 -0
  116. package/dist/journey-memory.js +360 -0
  117. package/dist/journey-memory.js.map +1 -0
  118. package/dist/layers.d.ts +92 -0
  119. package/dist/layers.d.ts.map +1 -0
  120. package/dist/layers.js +226 -0
  121. package/dist/layers.js.map +1 -0
  122. package/dist/mcp-server.d.ts +406 -0
  123. package/dist/mcp-server.d.ts.map +1 -0
  124. package/dist/mcp-server.js +414 -0
  125. package/dist/mcp-server.js.map +1 -0
  126. package/dist/onboarding-scan.d.ts +174 -0
  127. package/dist/onboarding-scan.d.ts.map +1 -0
  128. package/dist/onboarding-scan.js +1039 -0
  129. package/dist/onboarding-scan.js.map +1 -0
  130. package/dist/pc-scanner.d.ts +46 -0
  131. package/dist/pc-scanner.d.ts.map +1 -0
  132. package/dist/pc-scanner.js +488 -0
  133. package/dist/pc-scanner.js.map +1 -0
  134. package/dist/personal-intelligence.d.ts +97 -0
  135. package/dist/personal-intelligence.d.ts.map +1 -0
  136. package/dist/personal-intelligence.js +408 -0
  137. package/dist/personal-intelligence.js.map +1 -0
  138. package/dist/predictive-engine.d.ts +19 -0
  139. package/dist/predictive-engine.d.ts.map +1 -0
  140. package/dist/predictive-engine.js +107 -0
  141. package/dist/predictive-engine.js.map +1 -0
  142. package/dist/predictive-intelligence.d.ts +95 -0
  143. package/dist/predictive-intelligence.d.ts.map +1 -0
  144. package/dist/predictive-intelligence.js +544 -0
  145. package/dist/predictive-intelligence.js.map +1 -0
  146. package/dist/production.d.ts +67 -0
  147. package/dist/production.d.ts.map +1 -0
  148. package/dist/production.js +333 -0
  149. package/dist/production.js.map +1 -0
  150. package/dist/senior-features.d.ts +63 -0
  151. package/dist/senior-features.d.ts.map +1 -0
  152. package/dist/senior-features.js +325 -0
  153. package/dist/senior-features.js.map +1 -0
  154. package/dist/style-pull.d.ts +40 -0
  155. package/dist/style-pull.d.ts.map +1 -0
  156. package/dist/style-pull.js +385 -0
  157. package/dist/style-pull.js.map +1 -0
  158. package/dist/team-collaboration.d.ts +116 -0
  159. package/dist/team-collaboration.d.ts.map +1 -0
  160. package/dist/team-collaboration.js +375 -0
  161. package/dist/team-collaboration.js.map +1 -0
  162. package/dist/team-git.d.ts +47 -0
  163. package/dist/team-git.d.ts.map +1 -0
  164. package/dist/team-git.js +305 -0
  165. package/dist/team-git.js.map +1 -0
  166. package/dist/team-intelligence.d.ts +64 -0
  167. package/dist/team-intelligence.d.ts.map +1 -0
  168. package/dist/team-intelligence.js +289 -0
  169. package/dist/team-intelligence.js.map +1 -0
  170. package/dist/test-watch.d.ts +2 -0
  171. package/dist/test-watch.d.ts.map +1 -0
  172. package/dist/test-watch.js +8 -0
  173. package/dist/test-watch.js.map +1 -0
  174. package/dist/user-intelligence.d.ts +69 -0
  175. package/dist/user-intelligence.d.ts.map +1 -0
  176. package/dist/user-intelligence.js +553 -0
  177. package/dist/user-intelligence.js.map +1 -0
  178. package/dist/work-style.d.ts +49 -0
  179. package/dist/work-style.d.ts.map +1 -0
  180. package/dist/work-style.js +247 -0
  181. package/dist/work-style.js.map +1 -0
  182. package/package.json +3 -2
package/README.md CHANGED
@@ -1,505 +1,104 @@
1
- # FIVO Cell
1
+ # 🧠 FIVO Cell v3.0
2
2
 
3
- <div align="center">
3
+ **Personal Developer Intelligence Layer. You write code. Cell learns.**
4
4
 
5
- **Your coding taste. Learned once. Applied everywhere. Forever free.**
6
-
7
- [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
8
- [![Platform](https://img.shields.io/badge/Platform-Linux%20%7C%20macOS%20%7C%20Windows-lightgrey.svg)](#)
9
- [![Version](https://img.shields.io/badge/Version-1.0.0-purple.svg)](#)
10
-
11
- `🌍 Local-First` • `🆓 Free Forever` • `🔗 5+ AI Surfaces`
5
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue)](LICENSE)
6
+ [![Version](https://img.shields.io/badge/Version-3.0.0-purple)](https://www.npmjs.com/package/fivocell)
7
+ [![Platform](https://img.shields.io/badge/Mac%20%7C%20Windows%20%7C%20Linux-supported-lightgrey)]()
12
8
 
13
9
  ---
14
10
 
15
- </div>
16
-
17
- Every AI tool you use has amnesia. Claude doesn't remember what you taught Cursor. Copilot never learned from the fix you made in Windsurf. You repeat yourself. You reject the same patterns. You waste hours context-switching between tools that share nothing.
18
-
19
- **This is the last time you'll explain yourself to a machine.**
20
-
21
- Cell is a daemon that lives on your machine. It watches how you edit AI-generated code — across every tool — and builds a mathematical model of your taste. Then it injects that taste back into every AI you use.
11
+ ## What Cell Does
22
12
 
23
- **One profile. Every surface. Zero config.**
24
-
25
- ```
26
- ┌──────────┐
27
- │ VS Code │──┐
28
- └──────────┘ │
29
- ┌──────────┐ │ ┌──────────────────┐
30
- │ Cursor │──┤ │ │
31
- └──────────┘ │ │ CELL DAEMON │ Your taste,
32
- ┌──────────┐ ├────►│ (localhost) │──► everywhere.
33
- │ Windsurf │──┤ │ │
34
- └──────────┘ │ │ 0 cloud deps │
35
- ┌──────────┐ │ └──────────────────┘
36
- │ Claude │──┤
37
- └──────────┘ │
38
- ┌──────────┐ │
39
- │ Codex │──┤
40
- └──────────┘ │
41
- ┌──────────┐ │
42
- │ Terminal │──┤
43
- └──────────┘ │
44
- ┌──────────┐ │
45
- │ Copilot │──┘
46
- └──────────┘
47
13
  ```
14
+ $ cell scan
15
+ $ cell status
48
16
 
49
- ---
17
+ 🔮 Predictions:
18
+ ⚠ "15 async functions missing try/catch — 2x repeated"
50
19
 
51
- ## Quick Install
20
+ 🧠 Git Intelligence:
21
+ Best hours: 10:00-11:00 | Most productive: Monday
22
+ Mastered: TypeScript | Learning: JavaScript
52
23
 
53
- ```bash
54
- npm i -g fivocell
55
- cell init
56
- cell daemon start
57
- ```
58
-
59
- **Three commands. Thirty seconds. Done.**
24
+ 📂 Personal:
25
+ ! 15 async functions missing try/catch
26
+ ! 15 empty catch blocks — errors silently swallowed
27
+ ! 127 console.log statements — use structured logger
28
+ ! 34 'any' type usages — use specific types
60
29
 
61
- ```bash
62
- cell status # Verify it's working
30
+ 👥 Team: Git-based sharing. No servers. No ports.
31
+ 🌐 Community: Anonymous patterns + benchmarks.
63
32
  ```
64
33
 
65
- ---
66
-
67
- ## 5-Minute Quickstart
34
+ ## Install
68
35
 
69
36
  ```bash
70
- # 1. Initialize Cell in any project
71
- cd my-project
72
- cell init
73
-
74
- # 2. Start the daemon (background service)
75
- cell daemon start
76
-
77
- # 3. Learn from a code edit
78
- cell learn --file src/app.ts --diff "const x=1 → const x = 1"
79
-
80
- # 4. See your taste profile
37
+ npm i -g fivocell
38
+ cell start
39
+ cell scan
81
40
  cell status
82
-
83
- # 5. Get recommendations
84
- cell community
85
-
86
- # 6. Predict your next action
87
- cell next
88
-
89
- # 7. Check privacy settings
90
- cell privacy
91
- ```
92
-
93
- ---
94
-
95
- ## The 9 Intelligence Chapters
96
-
97
- Cell's brain is organized into 9 intelligence layers. Each layer runs independently and persists to its own JSON file in `~/.fivo/cell/`.
98
-
99
- ### Chapter 2 — Learning Layer
100
-
101
- The foundation. Watches 4 signals from every AI tool:
102
-
103
- | Signal | Trigger | Weight |
104
- |--------|---------|--------|
105
- | **Edit Diff** | You changed what AI wrote | High |
106
- | **Reject** | You deleted AI output entirely | High |
107
- | **Retry** | You asked AI to regenerate | Medium |
108
- | **Accept** | You kept it as-is | Low |
109
-
110
- Includes: Validator, Classifier, ConfidenceEngine, QualityEngine, LifecycleTracker, RelationshipEngine, PatternSearch, RankingEngine.
111
-
112
- ```
113
- Commands: cell init, cell status, cell taste show, cell taste reset, cell learn
114
- ```
115
-
116
- ### Chapter 3 — Outcome Engine
117
-
118
- Tracks what happens AFTER your code ships. 7 event types (deploy, review, test, bug, perf, security, rollback) with 3-factor confidence scoring, 4-value trend analysis, 5-factor health assessment, and 6-category leaderboard.
119
-
120
- ```
121
- No CLI commands — accessed via daemon API at /api/outcomes
122
41
  ```
123
42
 
124
- ### Chapter 4 — Recommendation Engine V2
125
-
126
- 5-factor scoring (pattern strength, recency, contextual relevance, team consensus, outcome validation) with diversity enforcement, evidence-based reasons, and cold-start handling.
127
-
128
- ```
129
- Commands: cell community (community priors feed into recommendations)
130
- ```
131
-
132
- ### Chapter 5 — Project DNA
133
-
134
- Filesystem scanner that profiles any repository in 40-200ms. 10 profiling systems: stack detection, framework detection, style detection, test patterns, dependency patterns, architecture patterns, config patterns, language stats, file tree, git patterns. Fingerprint comparison for similarity scoring.
135
-
136
- ```
137
- No CLI commands — accessed via daemon API at /api/project-dna
138
- ```
139
-
140
- ### Chapter 6 — Knowledge Graph V2
141
-
142
- 11 edge types (imports, calls, extends, implements, defines, uses, configures, tests, documents, deploys, monitors) across 10 subsystems. Path discovery with weighted traversal and influence scoring.
143
-
144
- ```
145
- No CLI commands — accessed via daemon API at /api/knowledge-graph
146
- ```
147
-
148
- ### Chapter 7 — Community Intelligence
149
-
150
- 10 systems: privacy guard (14 allowed fields only), rankings, trends (hour/day/week), clusters, playbooks, benchmarks, reputation, insights. Aggregates patterns from 5000+ simulated developers.
151
-
152
- ```
153
- Commands: cell community, cell community-live, cell community-full
154
- ```
155
-
156
- ### Chapter 8 — Organization Intelligence
157
-
158
- 10 systems: org isolation, team profiles, knowledge silos, bus factor, risk assessment, playbooks, executive insights, benchmarks. Team collaboration tools with voting and conflict resolution.
159
-
160
- ```
161
- Commands: cell push, cell pull, cell vote, cell silos, cell review, cell standup, cell handoff
162
- ```
163
-
164
- ### Chapter 9 — Cross-Layer Intelligence
165
-
166
- 10 systems: unified context builder, 7-dimension intelligence score, evidence fusion engine, knowledge gap detector, opportunity finder, risk analyzer, lifecycle classifier, decision generator, multi-level benchmarker, report generator.
167
-
168
- ```
169
- No CLI commands — accessed via daemon API at /api/cross-layer
170
- ```
171
-
172
- ---
173
-
174
- ## CLI Commands Reference (42 Commands)
175
-
176
- ### Learning & Profile
177
-
178
- | Command | Description |
179
- |---------|-------------|
180
- | `cell init` | Initialize Cell in current project |
181
- | `cell status` | Show taste profile summary |
182
- | `cell taste show` | Display cell.md taste profile |
183
- | `cell taste reset` | Reset all learned patterns |
184
- | `cell learn --file --diff` | Feed a code edit for learning |
185
-
186
- ### Team Collaboration
187
-
188
- | Command | Description |
189
- |---------|-------------|
190
- | `cell push` | Push taste to team directory |
191
- | `cell pull` | Pull team or member taste |
192
- | `cell vote` | Vote on pattern conflict |
193
- | `cell handoff` | Generate teammate handoff summary |
194
- | `cell silos` | Detect knowledge silos |
195
- | `cell review` | Generate PR review summary |
196
- | `cell standup` | Generate daily standup |
197
-
198
- ### Predictions
43
+ ## 7 Commands
199
44
 
200
- | Command | Description |
201
- |---------|-------------|
202
- | `cell next` | Predict next coding action |
203
- | `cell branch` | Pre-generate files from branch name |
204
- | `cell gentests` | Generate test cases for a function |
205
- | `cell errors` | Predict potential errors in code |
206
- | `cell buildcheck` | Predict build failures |
207
- | `cell mergecheck` | Predict merge conflicts |
208
- | `cell scan` | Scan code for security vulnerabilities |
209
- | `cell perf` | Analyze code for performance issues |
45
+ | Command | Does |
46
+ |---------|------|
47
+ | `cell start` | Start daemon + MCP (port 9876) |
48
+ | `cell stop` | Stop daemon cleanly |
49
+ | `cell scan` | Deep scan codebase AST + Git intelligence |
50
+ | `cell status` | Full dashboard: personal, predictions, team, community |
51
+ | `cell team` | Git-based team sharing & knowledge map |
52
+ | `cell community` | Anonymous patterns, benchmarks, trends |
53
+ | `cell help` | Show commands |
210
54
 
211
- ### Community
55
+ ## Cell Knows
212
56
 
213
- | Command | Description |
214
- |---------|-------------|
215
- | `cell community` | Show community prior patterns |
216
- | `cell community-live` | Show live community stats |
217
- | `cell community-full` | Show full community dashboard |
218
-
219
- ### Code Health
220
-
221
- | Command | Description |
222
- |---------|-------------|
223
- | `cell deadcode` | Detect dead code in a file |
224
- | `cell cycles` | Detect circular dependencies |
225
- | `cell dupes` | Detect code duplication |
226
- | `cell complexity` | Analyze code complexity |
227
- | `cell deps` | Check dependency health |
228
-
229
- ### Utilities
230
-
231
- | Command | Description |
232
- |---------|-------------|
233
- | `cell snapshot` | Capture or restore project context |
234
- | `cell sync` | Sync patterns across projects |
235
- | `cell solutions` | Search solution index |
236
- | `cell langswitch` | Get language switch guide |
237
- | `cell resume` | Check for interruption and resume |
238
- | `cell offline` | Check offline queue status |
239
- | `cell abtest` | Run A/B test |
240
- | `cell xdomain` | Cross-domain projections (research) |
241
-
242
- ### Infrastructure
243
-
244
- | Command | Description |
245
- |---------|-------------|
246
- | `cell daemon start` | Start background daemon |
247
- | `cell daemon stop` | Stop background daemon |
248
- | `cell daemon restart` | Restart daemon |
249
- | `cell daemon status` | Check daemon status |
250
- | `cell cloud on` | Enable cloud sync |
251
- | `cell cloud off` | Disable cloud sync |
252
- | `cell cloud status` | Show cloud sync status |
253
- | `cell privacy` | Show privacy settings |
254
-
255
- ---
57
+ - **Code Style**: quotes, semicolons, naming, indentation, function style, async patterns
58
+ - **Blind Spots**: exact counts — "15 async without try/catch", "15 empty catch blocks"
59
+ - **Git Intelligence**: best work hours, most productive day, skill levels, bug history
60
+ - **Predictions**: repeat mistakes, decision regret, complexity traps, energy warnings
61
+ - **Team**: knowledge map, bus factor, shared patterns via git
62
+ - **Community**: anonymous pattern sharing, aggregate benchmarks
63
+ - **$> cell status** shows everything
256
64
 
257
65
  ## MCP Server
258
66
 
259
- Cell includes a Model Context Protocol (MCP) server that exposes the full intelligence engine to any MCP-compatible client (Claude Code, Codex CLI, Cursor, etc.).
260
-
261
- ### 25 Tools
262
-
263
- | Tool | Description |
264
- |------|-------------|
265
- | `cell_learn` | Learn from a code edit |
266
- | `cell_predict_next` | Predict next coding action |
267
- | `cell_predict_errors` | Predict errors in code |
268
- | `cell_predict_build` | Predict build failures |
269
- | `cell_predict_merge` | Predict merge conflicts |
270
- | `cell_scan_security` | Scan for security issues |
271
- | `cell_analyze_perf` | Analyze performance issues |
272
- | `cell_generate_tests` | Generate test cases |
273
- | `cell_generate_branch` | Pre-generate branch files |
274
- | `cell_community_stats` | Get community pattern stats |
275
- | `cell_community_trends` | Get community trends |
276
- | `cell_community_playbooks` | Get community playbooks |
277
- | `cell_outcome_events` | Record outcome events |
278
- | `cell_outcome_health` | Get outcome health score |
279
- | `cell_outcome_leaderboard` | Get outcome leaderboard |
280
- | `cell_project_dna` | Build project DNA profile |
281
- | `cell_knowledge_graph` | Query knowledge graph |
282
- | `cell_knowledge_paths` | Discover knowledge paths |
283
- | `cell_org_profile` | Get organization profile |
284
- | `cell_org_silos` | Detect knowledge silos |
285
- | `cell_org_busfactor` | Compute bus factor |
286
- | `cell_cross_layer_report` | Generate intelligence report |
287
- | `cell_cross_layer_gaps` | Detect knowledge gaps |
288
- | `cell_cross_layer_opportunities` | Find opportunities |
289
- | `cell_cross_layer_risks` | Analyze risks |
290
-
291
- ### 8 Resources
292
-
293
- - `cell://patterns` — All learned patterns
294
- - `cell://profile` — Developer taste profile
295
- - `cell://outcomes` — Outcome event history
296
- - `cell://community/trends` — Community trends
297
- - `cell://community/rankings` — Community rankings
298
- - `cell://org/teams` — Team profiles
299
- - `cell://org/benchmarks` — Organization benchmarks
300
- - `cell://cross-layer/report` — Full intelligence report
301
-
302
- ### Setup
303
-
304
- ```json
305
- {
306
- "mcpServers": {
307
- "cell": {
308
- "command": "node",
309
- "args": ["path/to/packages/mcp-server/dist/server.js"]
310
- }
311
- }
312
- }
313
- ```
314
-
315
- Or via Claude Code:
316
-
317
- ```bash
318
- claude mcp add cell -- node path/to/packages/mcp-server/dist/server.js
319
- ```
320
-
321
- ---
322
-
323
- ## Daemon
324
-
325
- The daemon is a REST API server on port 9876 with WebSocket streaming on port 9878.
326
-
327
- ```bash
328
- # Start
329
- cell daemon start
330
-
331
- # Check status
332
- cell daemon status
67
+ Cell runs an MCP server on `localhost:9876/mcp` with 15 tools:
333
68
 
334
- # Stop
335
- cell daemon stop
336
69
  ```
337
-
338
- 125+ API endpoints across all 9 intelligence layers.
339
-
340
- ---
341
-
342
- ## Extensions
343
-
344
- | Tool | Type | Setup |
345
- |------|------|-------|
346
- | **VS Code** | Extension | `code --install-extension extensions/vscode/fivo-cell-0.2.0.vsix` |
347
- | **Cursor** | Extension | Same .vsix file |
348
- | **Windsurf** | Extension | Same .vsix file |
349
- | **Claude Code** | MCP | `claude mcp add cell -- node packages/mcp-server/dist/server.js` |
350
- | **Codex CLI** | MCP | `codex mcp add cell -- node packages/mcp-server/dist/server.js` |
351
- | **Copilot** | Sync Script | `node extensions/shell/copilot-sync.js` |
352
- | **Terminal** | Shell Hook | `source extensions/shell/install.sh` |
353
-
354
- ---
355
-
356
- ## Team Mode
357
-
358
- Cell supports local-network team collaboration without any cloud dependency.
359
-
70
+ cell_get_dev_profile cell_get_code_patterns cell_deep_scan
71
+ cell_scan_report cell_send_signal cell_get_context
72
+ cell_scan_full_pc cell_behavior_summary cell_log_error
73
+ cell_log_fix cell_log_decision cell_log_context
74
+ cell_log_stuck cell_session_bridge cell_predict
360
75
  ```
361
- Developer A ──┐
362
- ├── Cell Daemon (port 9876)
363
- Developer B ──┘ │
364
- │ LAN
365
- Developer C ──┐ │
366
- ├─────┘
367
- Developer D ──┘
368
- ```
369
-
370
- - `cell push` — Share your taste with the team
371
- - `cell pull` — Pull team taste profile
372
- - `cell vote` — Resolve pattern conflicts democratically
373
- - `cell handoff` — Generate context summaries for teammates
374
- - `cell standup` — Auto-generated daily standups
375
76
 
376
- Up to 10-20 developers can collaborate on a single local network.
377
-
378
- ---
379
-
380
- ## Cloud Sync
381
-
382
- Cloud sync is **ON by default** and shares only anonymous pattern statistics:
383
-
384
- ```
385
- "prefers const over let (87%)"
386
- "uses named exports, not default (83%)"
387
- "vitest over jest (91%)"
388
- ```
389
-
390
- **Your source code never leaves your machine.** No file paths. No project names. No secrets.
391
-
392
- ```bash
393
- cell cloud off # Fully offline mode
394
- cell cloud on # Re-enable sync
395
- cell cloud status # Check current status
396
- ```
397
-
398
- ---
399
-
400
- ## Privacy
401
-
402
- ### Never stored or transmitted
403
-
404
- | Data | Guarantee |
405
- |------|-----------|
406
- | Your source code | Never leaves your machine. Cell only sees diffs. |
407
- | File paths | Never persisted or transmitted. Only file extensions. |
408
- | Git history | Never accessed. |
409
- | API keys / secrets | Detected and warned. Never captured. |
410
- | Identity | No email. No signup. No account. |
411
- | Project names | Obfuscated before any transmission. |
412
-
413
- ### Stored locally only
414
-
415
- | Data | Location |
416
- |------|----------|
417
- | Pattern preferences | `~/.fivo/cell/pattern-store.json` |
418
- | Outcomes | `~/.fivo/cell/outcomes.json` |
419
- | Developer profiles | `~/.fivo/cell/profiles/` |
420
- | Project DNA | `~/.fivo/cell/project-dna.json` |
421
- | Knowledge graph | `~/.fivo/cell/knowledge-graph.json` |
422
- | Community intelligence | `~/.fivo/cell/community-intelligence.json` |
423
- | Organization intelligence | `~/.fivo/cell/org-intelligence.json` |
424
- | Cross-layer intelligence | `~/.fivo/cell/cross-layer-intelligence.json` |
425
- | Session snapshots | `~/.fivo/cell/snapshots/` |
426
-
427
- ---
77
+ Connect from Cursor, Claude Code, Windsurf or any MCP-compatible tool.
428
78
 
429
79
  ## Architecture
430
80
 
431
81
  ```
432
- CLI (42 commands)
433
-
434
- ├──► Daemon (port 9876) ──► REST API (125+ endpoints)
435
- │ │ │
436
- │ ├──► WebSocket (port 9878) ──► Real-time streaming
437
- │ │
438
- │ └──► MCP Server (port 9877) ──► 25 tools, 8 resources
439
-
440
- ├──► Intelligence Engine
441
- │ ├── Learning Layer (Ch2)
442
- │ ├── Outcome Engine (Ch3)
443
- │ ├── Recommendation Engine (Ch4)
444
- │ ├── Project DNA (Ch5)
445
- │ ├── Knowledge Graph (Ch6)
446
- │ ├── Community Intelligence (Ch7)
447
- │ ├── Organization Intelligence (Ch8)
448
- │ └── Cross-Layer Intelligence (Ch9)
449
-
450
- └──► Storage (~/.fivo/cell/)
451
- ├── 30+ JSON stores
452
- ├── Each layer has its own file
453
- └── No database required
454
- ```
455
-
456
- Each intelligence layer:
457
- - Runs independently
458
- - Persists to its own JSON file
459
- - Can be reset without affecting others
460
- - Has 80+ hostile assertions in tests
461
-
462
- ---
463
-
464
- ## Running Tests
465
-
466
- ```bash
467
- # All tests
468
- npx jest --passWithNoTests --no-coverage
82
+ .cell/
83
+ ├── personal/ — profile, style, errors, decisions
84
+ ├── team/ — members, shared patterns, blind spots, knowledge map
85
+ ├── community/ — aggregate patterns, benchmarks, shares
86
+ └── cell.db — SQLite database (all persistent data)
469
87
 
470
- # Specific chapter
471
- npx jest --passWithNoTests --no-coverage src/core/__tests__/chapter9-hostile.test.ts
472
-
473
- # Real-world validation
474
- npx ts-node src/validation/quick-run.ts
88
+ .cell/team/ in git repo — push/pull for team sharing
475
89
  ```
476
90
 
477
- **772 hostile assertions across 9 chapters — all passing.**
478
-
479
- ---
480
-
481
- ## Why Trust Cell
482
-
483
- - **Open Source. Apache 2.0.** Every line is public. Audit it. Fork it. Own it.
484
- - **Local-First. Always.** Zero cloud dependency. If cell.fivo.live disappears tomorrow, your taste doesn't.
485
- - **Free. Permanently.** Cell is supported by our community. You're not the product.
486
- - **Clean uninstall.** `npm uninstall -g fivocell` + `rm -rf ~/.fivo/cell`. Done.
91
+ ## Privacy
487
92
 
488
- ---
93
+ - **100% local** — code never leaves your machine
94
+ - **Apache 2.0** — free forever
95
+ - Community sharing sends only **abstract pattern types** (zero code, zero filenames)
96
+ - Maximum 300 bytes per community payload
489
97
 
490
- ## Links
98
+ ## License
491
99
 
492
- | Resource | URL |
493
- |----------|-----|
494
- | Website | [cell.fivo.live](https://cell.fivo.live) |
495
- | Enterprise | [fivo.live](https://fivo.live) |
496
- | Community | [discord.gg/fivo](https://discord.gg/fivo) |
497
- | NPM | `npm i -g fivocell` |
100
+ Apache 2.0 Free forever. No restrictions for individual use.
498
101
 
499
102
  ---
500
103
 
501
- <div align="center">
502
-
503
- **Your taste. Every tool. Forever free.**
504
-
505
- </div>
104
+ **Cell watches your coding. Learns your habits. Finds your blind spots. Remembers what works.**
package/bin/cell.js CHANGED
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env node
2
- require('../dist/cli.js');
1
+ #!/usr/bin/env node
2
+ require('../dist/cli.js');
@@ -0,0 +1,90 @@
1
+ export interface RepeatMistake {
2
+ pattern: string;
3
+ count: number;
4
+ files: string[];
5
+ dates: string[];
6
+ category: 'syntax' | 'logic' | 'async' | 'null' | 'type' | 'security' | 'import' | 'unknown';
7
+ stillHappening: boolean;
8
+ lastOccurrence: string;
9
+ }
10
+ export interface BlindSpot {
11
+ area: string;
12
+ severity: 'high' | 'medium' | 'low';
13
+ files: string[];
14
+ fileCount: number;
15
+ description: string;
16
+ fix: string;
17
+ }
18
+ export interface ProblemSolvingStyle {
19
+ functionSizes: {
20
+ small: number;
21
+ medium: number;
22
+ large: number;
23
+ xlarge: number;
24
+ };
25
+ fileOrganization: 'many-small-files' | 'few-large-files' | 'balanced';
26
+ comments: {
27
+ filesWithJSDoc: number;
28
+ total: number;
29
+ ratio: number;
30
+ };
31
+ namingStyle: 'descriptive' | 'terse' | 'mixed';
32
+ decompositionStyle: 'top-down' | 'bottom-up' | 'both';
33
+ }
34
+ export interface TimePattern {
35
+ bestHours: string;
36
+ mostProductiveDay: string;
37
+ averageSessionMinutes: number;
38
+ bugIntroductionTimes: string[];
39
+ commitCountByDay: Record<string, number>;
40
+ commitCountByHour: Record<number, number>;
41
+ }
42
+ export interface BugRecord {
43
+ date: string;
44
+ file: string;
45
+ message: string;
46
+ category: string;
47
+ fixCommitDate: string;
48
+ hoursToFix: number;
49
+ wasReverted: boolean;
50
+ }
51
+ export interface DecisionRecord {
52
+ date: string;
53
+ type: 'add' | 'remove' | 'migrate' | 'refactor';
54
+ from?: string;
55
+ to?: string;
56
+ message: string;
57
+ affected: string[];
58
+ }
59
+ export interface TechMastery {
60
+ language: string;
61
+ fileCount: number;
62
+ lineCount: number;
63
+ errorProneFiles: number;
64
+ cleanFiles: number;
65
+ firstUsed: string;
66
+ lastUsed: string;
67
+ assessment: 'mastered' | 'proficient' | 'learning' | 'new';
68
+ }
69
+ export interface IntelligenceReport {
70
+ mistakes: RepeatMistake[];
71
+ blindSpots: BlindSpot[];
72
+ problemSolving: ProblemSolvingStyle;
73
+ timePatterns: TimePattern;
74
+ bugHistory: BugRecord[];
75
+ decisions: DecisionRecord[];
76
+ techMastery: TechMastery[];
77
+ generatedAt: string;
78
+ projectCount: number;
79
+ totalFiles: number;
80
+ }
81
+ export declare function detectRepeatMistakes(rootDir: string): RepeatMistake[];
82
+ export declare function detectBlindSpots(rootDir: string): BlindSpot[];
83
+ export declare function detectProblemSolvingStyle(rootDir: string): ProblemSolvingStyle;
84
+ export declare function detectTimePatterns(rootDir: string): TimePattern;
85
+ export declare function detectBugHistory(rootDir: string): BugRecord[];
86
+ export declare function detectDecisions(rootDir: string): DecisionRecord[];
87
+ export declare function detectTechMastery(rootDir: string): TechMastery[];
88
+ export declare function buildIntelligenceReport(rootDir: string): IntelligenceReport;
89
+ export declare function saveIntelligenceReport(report: IntelligenceReport): string;
90
+ //# sourceMappingURL=behavior-intelligence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"behavior-intelligence.d.ts","sourceRoot":"","sources":["../src/behavior-intelligence.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC7F,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IACpC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAChF,gBAAgB,EAAE,kBAAkB,GAA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