thetacog-mcp 1.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.
- package/.workflow/bucket-builder.html +823 -0
- package/.workflow/bucket-discoverer.html +928 -0
- package/.workflow/bucket-experimenter.html +802 -0
- package/.workflow/bucket-operator.html +951 -0
- package/.workflow/bucket-strategist.html +970 -0
- package/.workflow/bucket-teacher.html +873 -0
- package/.workflow/cognitive-dashboard-enhanced.html +731 -0
- package/.workflow/cognitive-dashboard.html +296 -0
- package/CHANGELOG.md +44 -0
- package/README.md +181 -0
- package/package.json +57 -0
- package/postinstall.js +80 -0
- package/server.js +1031 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Cognitive Workflow Dashboard</title>
|
|
7
|
+
<style>
|
|
8
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
9
|
+
body {
|
|
10
|
+
font-family: 'SF Mono', 'Monaco', monospace;
|
|
11
|
+
background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
|
|
12
|
+
color: #e2e8f0;
|
|
13
|
+
padding: 40px;
|
|
14
|
+
line-height: 1.6;
|
|
15
|
+
}
|
|
16
|
+
.container {
|
|
17
|
+
max-width: 1400px;
|
|
18
|
+
margin: 0 auto;
|
|
19
|
+
}
|
|
20
|
+
.header {
|
|
21
|
+
text-align: center;
|
|
22
|
+
margin-bottom: 50px;
|
|
23
|
+
}
|
|
24
|
+
h1 {
|
|
25
|
+
font-size: 3em;
|
|
26
|
+
margin-bottom: 20px;
|
|
27
|
+
color: #60a5fa;
|
|
28
|
+
}
|
|
29
|
+
.subtitle {
|
|
30
|
+
font-size: 1.2em;
|
|
31
|
+
color: #94a3b8;
|
|
32
|
+
}
|
|
33
|
+
.stats-overview {
|
|
34
|
+
display: grid;
|
|
35
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
36
|
+
gap: 20px;
|
|
37
|
+
margin-bottom: 50px;
|
|
38
|
+
}
|
|
39
|
+
.overview-card {
|
|
40
|
+
background: rgba(30, 41, 59, 0.8);
|
|
41
|
+
padding: 20px;
|
|
42
|
+
border-radius: 10px;
|
|
43
|
+
text-align: center;
|
|
44
|
+
border: 1px solid #334155;
|
|
45
|
+
}
|
|
46
|
+
.overview-number {
|
|
47
|
+
font-size: 2.5em;
|
|
48
|
+
font-weight: bold;
|
|
49
|
+
color: #60a5fa;
|
|
50
|
+
}
|
|
51
|
+
.overview-label {
|
|
52
|
+
color: #94a3b8;
|
|
53
|
+
margin-top: 5px;
|
|
54
|
+
}
|
|
55
|
+
.bucket-grid {
|
|
56
|
+
display: grid;
|
|
57
|
+
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
|
|
58
|
+
gap: 30px;
|
|
59
|
+
}
|
|
60
|
+
.bucket-card {
|
|
61
|
+
background: rgba(30, 41, 59, 0.8);
|
|
62
|
+
padding: 30px;
|
|
63
|
+
border-radius: 15px;
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
transition: all 0.3s ease;
|
|
66
|
+
border: 2px solid #334155;
|
|
67
|
+
}
|
|
68
|
+
.bucket-card:hover {
|
|
69
|
+
transform: translateY(-5px);
|
|
70
|
+
box-shadow: 0 10px 30px rgba(96, 165, 250, 0.3);
|
|
71
|
+
border-color: #60a5fa;
|
|
72
|
+
}
|
|
73
|
+
.bucket-header {
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
gap: 15px;
|
|
77
|
+
margin-bottom: 20px;
|
|
78
|
+
}
|
|
79
|
+
.bucket-emoji {
|
|
80
|
+
font-size: 2.5em;
|
|
81
|
+
}
|
|
82
|
+
.bucket-header h3 {
|
|
83
|
+
font-size: 1.8em;
|
|
84
|
+
color: #e2e8f0;
|
|
85
|
+
}
|
|
86
|
+
.bucket-stats {
|
|
87
|
+
display: flex;
|
|
88
|
+
gap: 20px;
|
|
89
|
+
margin-bottom: 20px;
|
|
90
|
+
padding: 15px;
|
|
91
|
+
background: rgba(15, 23, 42, 0.5);
|
|
92
|
+
border-radius: 8px;
|
|
93
|
+
}
|
|
94
|
+
.stat {
|
|
95
|
+
flex: 1;
|
|
96
|
+
text-align: center;
|
|
97
|
+
}
|
|
98
|
+
.stat-number {
|
|
99
|
+
font-size: 1.8em;
|
|
100
|
+
font-weight: bold;
|
|
101
|
+
color: #60a5fa;
|
|
102
|
+
}
|
|
103
|
+
.stat-label {
|
|
104
|
+
font-size: 0.9em;
|
|
105
|
+
color: #94a3b8;
|
|
106
|
+
}
|
|
107
|
+
.bucket-description {
|
|
108
|
+
color: #cbd5e1;
|
|
109
|
+
font-style: italic;
|
|
110
|
+
}
|
|
111
|
+
.framework-section {
|
|
112
|
+
margin-top: 60px;
|
|
113
|
+
padding: 40px;
|
|
114
|
+
background: rgba(30, 41, 59, 0.6);
|
|
115
|
+
border-radius: 15px;
|
|
116
|
+
border: 1px solid #334155;
|
|
117
|
+
}
|
|
118
|
+
.framework-section h2 {
|
|
119
|
+
color: #60a5fa;
|
|
120
|
+
margin-bottom: 20px;
|
|
121
|
+
}
|
|
122
|
+
.framework-section p {
|
|
123
|
+
margin-bottom: 15px;
|
|
124
|
+
color: #cbd5e1;
|
|
125
|
+
}
|
|
126
|
+
</style>
|
|
127
|
+
</head>
|
|
128
|
+
<body>
|
|
129
|
+
<div class="container">
|
|
130
|
+
<div class="header">
|
|
131
|
+
<h1>๐ง Cognitive Workflow Dashboard</h1>
|
|
132
|
+
<p class="subtitle">Tool = Identity = Mindset</p>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<div class="stats-overview">
|
|
136
|
+
<div class="overview-card">
|
|
137
|
+
<div class="overview-number">1693</div>
|
|
138
|
+
<div class="overview-label">Total Commits</div>
|
|
139
|
+
</div>
|
|
140
|
+
<div class="overview-card">
|
|
141
|
+
<div class="overview-number">60</div>
|
|
142
|
+
<div class="overview-label">Days Analyzed</div>
|
|
143
|
+
</div>
|
|
144
|
+
<div class="overview-card">
|
|
145
|
+
<div class="overview-number">6</div>
|
|
146
|
+
<div class="overview-label">Cognitive Identities</div>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<div class="bucket-grid">
|
|
151
|
+
|
|
152
|
+
<div class="bucket-card" onclick="window.location='bucket-builder.html'">
|
|
153
|
+
<div class="bucket-header">
|
|
154
|
+
<span class="bucket-emoji">๐๏ธ</span>
|
|
155
|
+
<h3>Builder</h3>
|
|
156
|
+
</div>
|
|
157
|
+
<div class="bucket-stats">
|
|
158
|
+
<div class="stat">
|
|
159
|
+
<div class="stat-number">1486</div>
|
|
160
|
+
<div class="stat-label">commits</div>
|
|
161
|
+
</div>
|
|
162
|
+
<div class="stat">
|
|
163
|
+
<div class="stat-number">88%</div>
|
|
164
|
+
<div class="stat-label">of work</div>
|
|
165
|
+
</div>
|
|
166
|
+
<div class="stat">
|
|
167
|
+
<div class="stat-number">24.77</div>
|
|
168
|
+
<div class="stat-label">per day</div>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
<div class="bucket-description">The factory floor where hands meet keyboard</div>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
<div class="bucket-card" onclick="window.location='bucket-discoverer.html'">
|
|
175
|
+
<div class="bucket-header">
|
|
176
|
+
<span class="bucket-emoji">๐ฌ</span>
|
|
177
|
+
<h3>Discoverer</h3>
|
|
178
|
+
</div>
|
|
179
|
+
<div class="bucket-stats">
|
|
180
|
+
<div class="stat">
|
|
181
|
+
<div class="stat-number">102</div>
|
|
182
|
+
<div class="stat-label">commits</div>
|
|
183
|
+
</div>
|
|
184
|
+
<div class="stat">
|
|
185
|
+
<div class="stat-number">6%</div>
|
|
186
|
+
<div class="stat-label">of work</div>
|
|
187
|
+
</div>
|
|
188
|
+
<div class="stat">
|
|
189
|
+
<div class="stat-number">1.7</div>
|
|
190
|
+
<div class="stat-label">per day</div>
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
<div class="bucket-description">The research vault where foundational knowledge emerges</div>
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
<div class="bucket-card" onclick="window.location='bucket-operator.html'">
|
|
197
|
+
<div class="bucket-header">
|
|
198
|
+
<span class="bucket-emoji">๐ฉ</span>
|
|
199
|
+
<h3>Operator</h3>
|
|
200
|
+
</div>
|
|
201
|
+
<div class="bucket-stats">
|
|
202
|
+
<div class="stat">
|
|
203
|
+
<div class="stat-number">61</div>
|
|
204
|
+
<div class="stat-label">commits</div>
|
|
205
|
+
</div>
|
|
206
|
+
<div class="stat">
|
|
207
|
+
<div class="stat-number">4%</div>
|
|
208
|
+
<div class="stat-label">of work</div>
|
|
209
|
+
</div>
|
|
210
|
+
<div class="stat">
|
|
211
|
+
<div class="stat-number">1.02</div>
|
|
212
|
+
<div class="stat-label">per day</div>
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
<div class="bucket-description">The command center where relationships are managed</div>
|
|
216
|
+
</div>
|
|
217
|
+
|
|
218
|
+
<div class="bucket-card" onclick="window.location='bucket-teacher.html'">
|
|
219
|
+
<div class="bucket-header">
|
|
220
|
+
<span class="bucket-emoji">๐ฃ</span>
|
|
221
|
+
<h3>Teacher</h3>
|
|
222
|
+
</div>
|
|
223
|
+
<div class="bucket-stats">
|
|
224
|
+
<div class="stat">
|
|
225
|
+
<div class="stat-number">31</div>
|
|
226
|
+
<div class="stat-label">commits</div>
|
|
227
|
+
</div>
|
|
228
|
+
<div class="stat">
|
|
229
|
+
<div class="stat-number">2%</div>
|
|
230
|
+
<div class="stat-label">of work</div>
|
|
231
|
+
</div>
|
|
232
|
+
<div class="stat">
|
|
233
|
+
<div class="stat-number">0.52</div>
|
|
234
|
+
<div class="stat-label">per day</div>
|
|
235
|
+
</div>
|
|
236
|
+
</div>
|
|
237
|
+
<div class="bucket-description">The public stage where ideas are broadcast</div>
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
<div class="bucket-card" onclick="window.location='bucket-experimenter.html'">
|
|
241
|
+
<div class="bucket-header">
|
|
242
|
+
<span class="bucket-emoji">๐งช</span>
|
|
243
|
+
<h3>Experimenter</h3>
|
|
244
|
+
</div>
|
|
245
|
+
<div class="bucket-stats">
|
|
246
|
+
<div class="stat">
|
|
247
|
+
<div class="stat-number">9</div>
|
|
248
|
+
<div class="stat-label">commits</div>
|
|
249
|
+
</div>
|
|
250
|
+
<div class="stat">
|
|
251
|
+
<div class="stat-number">1%</div>
|
|
252
|
+
<div class="stat-label">of work</div>
|
|
253
|
+
</div>
|
|
254
|
+
<div class="stat">
|
|
255
|
+
<div class="stat-number">0.15</div>
|
|
256
|
+
<div class="stat-label">per day</div>
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
<div class="bucket-description">The lab where rapid prototypes are born</div>
|
|
260
|
+
</div>
|
|
261
|
+
|
|
262
|
+
<div class="bucket-card" onclick="window.location='bucket-strategist.html'">
|
|
263
|
+
<div class="bucket-header">
|
|
264
|
+
<span class="bucket-emoji">๐บ๏ธ</span>
|
|
265
|
+
<h3>Strategist</h3>
|
|
266
|
+
</div>
|
|
267
|
+
<div class="bucket-stats">
|
|
268
|
+
<div class="stat">
|
|
269
|
+
<div class="stat-number">4</div>
|
|
270
|
+
<div class="stat-label">commits</div>
|
|
271
|
+
</div>
|
|
272
|
+
<div class="stat">
|
|
273
|
+
<div class="stat-number">0%</div>
|
|
274
|
+
<div class="stat-label">of work</div>
|
|
275
|
+
</div>
|
|
276
|
+
<div class="stat">
|
|
277
|
+
<div class="stat-number">0.07</div>
|
|
278
|
+
<div class="stat-label">per day</div>
|
|
279
|
+
</div>
|
|
280
|
+
</div>
|
|
281
|
+
<div class="bucket-description">The war room where patterns are analyzed</div>
|
|
282
|
+
</div>
|
|
283
|
+
|
|
284
|
+
</div>
|
|
285
|
+
|
|
286
|
+
<div class="framework-section">
|
|
287
|
+
<h2>Core Principle: Tool = Identity = Mindset</h2>
|
|
288
|
+
<p>Each terminal isn't just a toolโit's a <strong>cognitive identity you step into</strong>.
|
|
289
|
+
The muscle memory isn't "Kitty = email," it's "Kitty = I am the person who runs the business."</p>
|
|
290
|
+
|
|
291
|
+
<p style="margin-top: 20px;"><strong>The Flywheel Effect:</strong> Each identity's outputs become inputs for other identities.
|
|
292
|
+
Builder creates โ Teacher documents โ Strategist positions โ Operator executes โ Discoverer researches โ Experimenter validates โ repeat.</p>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
</body>
|
|
296
|
+
</html>
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.2.0] - 2026-01-10
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Five new MCP tools:
|
|
9
|
+
- `thetacog-open` - Open room HTML in browser
|
|
10
|
+
- `thetacog-todo` - CRUD for room todos (add, list, update, delete)
|
|
11
|
+
- `thetacog-stream` - Flywheel coordination between rooms
|
|
12
|
+
- `thetacog-export` - Export state to JSON for HTML refresh
|
|
13
|
+
- `thetacog-terminal` - Detect which terminal Claude is running in
|
|
14
|
+
- SQLite tables: `room_todos`, `room_streams`
|
|
15
|
+
- JSON export layer: `~/.thetacog/state.json`
|
|
16
|
+
- Terminal detection via TERM_PROGRAM env var
|
|
17
|
+
|
|
18
|
+
### Architecture
|
|
19
|
+
- SQLite = primary store (fast, 0-1ms writes)
|
|
20
|
+
- JSON = sync layer (HTML reads on tab focus)
|
|
21
|
+
- HTML = display layer (refreshes via visibilitychange event)
|
|
22
|
+
- Same pattern as CRM MCP but for mode management
|
|
23
|
+
|
|
24
|
+
## [0.1.0] - 2026-01-10
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- Initial release
|
|
28
|
+
- Three core MCP tools:
|
|
29
|
+
- `thetacog-detect` - Analyze conversation for room signals
|
|
30
|
+
- `thetacog-status` - Get current room context and identity rules
|
|
31
|
+
- `thetacog-switch` - Switch rooms with context preservation
|
|
32
|
+
- Six room archetypes: Builder, Architect, Operator, Vault, Voice, Laboratory
|
|
33
|
+
- Memory palace anchoring for each room
|
|
34
|
+
- Identity rules per room
|
|
35
|
+
- SQLite optional (works in memory-only mode)
|
|
36
|
+
- Graceful shutdown handlers (SIGINT, SIGTERM, SIGHUP)
|
|
37
|
+
- Install subcommand for easy registration
|
|
38
|
+
- Terminal detection for macOS
|
|
39
|
+
|
|
40
|
+
### Architecture
|
|
41
|
+
- Copied battle-tested patterns from thetacoach-crm-mcp
|
|
42
|
+
- HTML files with embedded JSON = self-contained rooms
|
|
43
|
+
- SQLite = optional session state and switch history
|
|
44
|
+
- Same shutdown pattern as CRM (prevents zombie processes)
|
package/README.md
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# ThetaCog MCP
|
|
2
|
+
|
|
3
|
+
**Mode management, not task management.**
|
|
4
|
+
|
|
5
|
+
A Claude MCP server that detects which cognitive room you should be in and helps you switch contexts with memory palace anchoring.
|
|
6
|
+
|
|
7
|
+
## The Pitch
|
|
8
|
+
|
|
9
|
+
> "We don't use task lists. We have 56 terminals, each one a cognitive room. Command+Space to a room name, and you're in a different mode. The room remembers what you were doing. Join this startup. We work like rockstars."
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g thetacog-mcp
|
|
15
|
+
npx thetacog install
|
|
16
|
+
# Restart Claude Code
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Tools
|
|
20
|
+
|
|
21
|
+
### thetacog-detect
|
|
22
|
+
|
|
23
|
+
Analyze conversation to detect which room you should be in.
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
You: "Actually let's think about the bigger picture"
|
|
27
|
+
|
|
28
|
+
Claude: [calls thetacog-detect]
|
|
29
|
+
โ { room: "architect", confidence: 0.92, signal: "bigger picture" }
|
|
30
|
+
|
|
31
|
+
"That sounds like Architect thinking. Want to switch?"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### thetacog-status
|
|
35
|
+
|
|
36
|
+
Get current room context, identity rules, and memory palace anchor.
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"currentRoom": "builder",
|
|
41
|
+
"emoji": "๐จ",
|
|
42
|
+
"memoryPalace": "Walk to the workshop. Blue light. Tools on the wall.",
|
|
43
|
+
"identityRules": [
|
|
44
|
+
"You are shipping, not theorizing",
|
|
45
|
+
"Done beats right when the demo is Sunday"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### thetacog-switch
|
|
51
|
+
|
|
52
|
+
Switch to a different room with context preservation.
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
Claude: [calls thetacog-switch room="architect"]
|
|
56
|
+
|
|
57
|
+
"Walk up the stairs to the drafting room. Indigo light.
|
|
58
|
+
Unroll the blueprints. See the whole war before you fight it."
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### thetacog-open
|
|
62
|
+
|
|
63
|
+
Open the HTML dashboard for a room in the browser.
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
Claude: [calls thetacog-open room="builder"]
|
|
67
|
+
โ Opens iterm2-builder.html in browser
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### thetacog-todo
|
|
71
|
+
|
|
72
|
+
Manage todos per room. SQLite primary, syncs to JSON for HTML.
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
Claude: [calls thetacog-todo action="add" room="builder" text="Ship Stripe" priority=1]
|
|
76
|
+
Claude: [calls thetacog-todo action="list" room="builder"]
|
|
77
|
+
Claude: [calls thetacog-todo action="update" id=1 done=true]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### thetacog-stream
|
|
81
|
+
|
|
82
|
+
Send messages between rooms (flywheel coordination).
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
Claude: [calls thetacog-stream action="send" from="builder" to="architect" message="Stripe 80% done"]
|
|
86
|
+
Claude: [calls thetacog-stream action="get" to="architect"]
|
|
87
|
+
โ Returns unread input streams
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### thetacog-export
|
|
91
|
+
|
|
92
|
+
Export full state to JSON file. HTML reads on tab focus.
|
|
93
|
+
|
|
94
|
+
### thetacog-terminal
|
|
95
|
+
|
|
96
|
+
Detect which terminal Claude is running in.
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
Claude: [calls thetacog-terminal]
|
|
100
|
+
โ { terminal: "iTerm", room: "builder", html: "iterm2-builder.html" }
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Room Archetypes
|
|
104
|
+
|
|
105
|
+
| Room | Emoji | Color | Tier | Identity |
|
|
106
|
+
|------|-------|-------|------|----------|
|
|
107
|
+
| **Builder** | ๐จ | Blue | Tactical | Ship, don't theorize. Done beats right. |
|
|
108
|
+
| **Architect** | ๐ | Indigo | Strategic | See the whole war before you fight it. |
|
|
109
|
+
| **Operator** | ๐ฉ | Green | Strategic | Close, don't explore. Revenue is the metric. |
|
|
110
|
+
| **Vault** | ๐ | Red | Foundational | Protect the irreversible. Prove, don't ship. |
|
|
111
|
+
| **Voice** | ๐ค | Purple | Tactical | Test messaging. Experiment with variants. |
|
|
112
|
+
| **Laboratory** | ๐งช | Cyan | Tactical | Break things safely. Prototype fast. |
|
|
113
|
+
|
|
114
|
+
## Stakes Tiers
|
|
115
|
+
|
|
116
|
+
- **Tactical** - Fully reversible, immediate horizon (Builder, Voice, Laboratory)
|
|
117
|
+
- **Strategic** - Semi-reversible, 1-year horizon (Architect, Operator)
|
|
118
|
+
- **Foundational** - Irreversible, multi-year horizon (Vault)
|
|
119
|
+
|
|
120
|
+
## Terminal Mapping (macOS)
|
|
121
|
+
|
|
122
|
+
| Terminal | Room |
|
|
123
|
+
|----------|------|
|
|
124
|
+
| iTerm2 | Builder |
|
|
125
|
+
| VS Code | Architect |
|
|
126
|
+
| Kitty | Operator |
|
|
127
|
+
| WezTerm | Vault |
|
|
128
|
+
| Terminal | Voice |
|
|
129
|
+
| Cursor | Laboratory |
|
|
130
|
+
|
|
131
|
+
## Architecture
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
~/.thetacog/
|
|
135
|
+
โโโ thetacog.db # SQLite (primary store - fast for Claude)
|
|
136
|
+
โโโ state.json # JSON export (HTML reads on tab focus)
|
|
137
|
+
โโโ rooms/ # Optional local HTML copies
|
|
138
|
+
|
|
139
|
+
.workflow/rooms/ # Git-tracked HTML files
|
|
140
|
+
โโโ iterm2-builder.html # Each has embedded JSON config
|
|
141
|
+
โโโ vscode-architect.html
|
|
142
|
+
โโโ ...
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Data flow:**
|
|
146
|
+
1. Claude writes to SQLite (fast, 0-1ms)
|
|
147
|
+
2. Every write exports to `state.json`
|
|
148
|
+
3. HTML reads `state.json` on `visibilitychange` (tab focus)
|
|
149
|
+
4. No Node needed - pure browser JS
|
|
150
|
+
|
|
151
|
+
**HTML files ARE the rooms.** SQLite is the source of truth. JSON is the sync layer. HTML refreshes on tab focus.
|
|
152
|
+
|
|
153
|
+
## Target Audience
|
|
154
|
+
|
|
155
|
+
- ADHD founders who task-switch constantly
|
|
156
|
+
- Parallel thinkers who follow intuition
|
|
157
|
+
- Developers with 20+ terminal tabs open
|
|
158
|
+
- Startups that want to "work like rockstars"
|
|
159
|
+
|
|
160
|
+
**Not for:** Task lists, linear thinkers, rigid process
|
|
161
|
+
|
|
162
|
+
## Philosophy
|
|
163
|
+
|
|
164
|
+
Context switching has a cost. But context switching within a well-designed system has almost no cost.
|
|
165
|
+
|
|
166
|
+
When you Command+Space to a room name, you are not losing context. You are loading context. The room has the right tabs open. The room has Claude loaded with context. The room has identity rules visible.
|
|
167
|
+
|
|
168
|
+
You do not switch tasks. You switch rooms. And the room remembers what you were doing there.
|
|
169
|
+
|
|
170
|
+
## Related
|
|
171
|
+
|
|
172
|
+
- [Cognitive Rooms Blog Post](https://thetacoach.biz/blog/cognitive-rooms-flow-architecture)
|
|
173
|
+
- [ThetaCoach CRM MCP](https://www.npmjs.com/package/thetacoach-crm-mcp) - Same architecture for sales battle cards
|
|
174
|
+
|
|
175
|
+
## License
|
|
176
|
+
|
|
177
|
+
MIT
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
*For parallel founders who think in parallel.*
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "thetacog-mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Transform your terminal into a mental palace. Cognitive workspaces with Split View mode switching. Tool = Identity = Mindset.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "server.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"thetacog": "server.js",
|
|
9
|
+
"thetacog-mcp": "server.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"server.js",
|
|
13
|
+
"sqlite-sync.js",
|
|
14
|
+
"postinstall.js",
|
|
15
|
+
"README.md",
|
|
16
|
+
"CHANGELOG.md",
|
|
17
|
+
".workflow/"
|
|
18
|
+
],
|
|
19
|
+
"keywords": [
|
|
20
|
+
"mcp",
|
|
21
|
+
"cognitive-rooms",
|
|
22
|
+
"thetacog",
|
|
23
|
+
"split-view",
|
|
24
|
+
"snap-layouts",
|
|
25
|
+
"mental-palace",
|
|
26
|
+
"flow-state",
|
|
27
|
+
"mode-management",
|
|
28
|
+
"claude",
|
|
29
|
+
"hebbian-learning",
|
|
30
|
+
"parallel-founders"
|
|
31
|
+
],
|
|
32
|
+
"author": "ThetaDriven Inc.",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"private": false,
|
|
35
|
+
"scripts": {
|
|
36
|
+
"postinstall": "node postinstall.js"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
40
|
+
"better-sqlite3": "^9.2.2"
|
|
41
|
+
},
|
|
42
|
+
"optionalDependencies": {
|
|
43
|
+
"@supabase/supabase-js": "^2.39.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/better-sqlite3": "^7.6.8",
|
|
47
|
+
"@types/node": "^20.10.6"
|
|
48
|
+
},
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=18.0.0"
|
|
51
|
+
},
|
|
52
|
+
"repository": {
|
|
53
|
+
"type": "git",
|
|
54
|
+
"url": "https://github.com/wiber/thetadrivencoach.git",
|
|
55
|
+
"directory": "packages/thetacog-mcp"
|
|
56
|
+
}
|
|
57
|
+
}
|
package/postinstall.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ThetaCog MCP - Post-install script
|
|
5
|
+
*
|
|
6
|
+
* Detects available terminals and creates initial room configuration.
|
|
7
|
+
* Copied from CRM MCP pattern but simplified for cognitive rooms.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import fs from 'fs';
|
|
11
|
+
import path from 'path';
|
|
12
|
+
import { fileURLToPath } from 'url';
|
|
13
|
+
|
|
14
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
+
const __dirname = path.dirname(__filename);
|
|
16
|
+
|
|
17
|
+
// Terminal to room mapping (macOS)
|
|
18
|
+
const TERMINALS_MAC = {
|
|
19
|
+
'iTerm.app': { name: 'iTerm', room: 'builder', emoji: '๐จ', color: '#3b82f6' },
|
|
20
|
+
'Visual Studio Code.app': { name: 'VS Code', room: 'architect', emoji: '๐', color: '#4f46e5' },
|
|
21
|
+
'kitty.app': { name: 'Kitty', room: 'operator', emoji: '๐ฉ', color: '#22c55e' },
|
|
22
|
+
'WezTerm.app': { name: 'WezTerm', room: 'vault', emoji: '๐', color: '#ef4444' },
|
|
23
|
+
'Terminal.app': { name: 'Terminal', room: 'voice', emoji: '๐ค', color: '#a855f7' },
|
|
24
|
+
'Cursor.app': { name: 'Cursor', room: 'laboratory', emoji: '๐งช', color: '#06b6d4' },
|
|
25
|
+
'Alacritty.app': { name: 'Alacritty', room: 'performer', emoji: '๐ญ', color: '#f59e0b' }
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
console.log('');
|
|
29
|
+
console.log('๐ง ThetaCog MCP - Post-install');
|
|
30
|
+
console.log(' Mode management, not task management.');
|
|
31
|
+
console.log('');
|
|
32
|
+
|
|
33
|
+
// Detect platform
|
|
34
|
+
const platform = process.platform;
|
|
35
|
+
console.log(`๐ Platform: ${platform}`);
|
|
36
|
+
|
|
37
|
+
if (platform === 'darwin') {
|
|
38
|
+
// macOS: Check /Applications for installed terminals
|
|
39
|
+
console.log('๐ Detecting installed terminals...');
|
|
40
|
+
console.log('');
|
|
41
|
+
|
|
42
|
+
const installed = [];
|
|
43
|
+
const applicationsPath = '/Applications';
|
|
44
|
+
|
|
45
|
+
for (const [app, config] of Object.entries(TERMINALS_MAC)) {
|
|
46
|
+
const appPath = path.join(applicationsPath, app);
|
|
47
|
+
if (fs.existsSync(appPath)) {
|
|
48
|
+
installed.push({ app, ...config });
|
|
49
|
+
console.log(` โ
${config.emoji} ${config.name} โ ${config.room}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (installed.length === 0) {
|
|
54
|
+
console.log(' โ ๏ธ No supported terminals detected');
|
|
55
|
+
console.log(' ๐ฆ Terminal.app is always available as fallback');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
console.log('');
|
|
59
|
+
console.log(` Found ${installed.length} terminals for room mapping`);
|
|
60
|
+
|
|
61
|
+
} else if (platform === 'win32') {
|
|
62
|
+
console.log('๐ช Windows support coming soon');
|
|
63
|
+
console.log(' Currently supports: macOS');
|
|
64
|
+
|
|
65
|
+
} else if (platform === 'linux') {
|
|
66
|
+
console.log('๐ง Linux support coming soon');
|
|
67
|
+
console.log(' Currently supports: macOS');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
console.log('');
|
|
71
|
+
console.log('๐ Next steps:');
|
|
72
|
+
console.log(' 1. Run: npx thetacog install');
|
|
73
|
+
console.log(' 2. Restart Claude Code');
|
|
74
|
+
console.log(' 3. Say: "What room should I be in?"');
|
|
75
|
+
console.log('');
|
|
76
|
+
console.log('๐ Available tools after install:');
|
|
77
|
+
console.log(' - thetacog-detect: Analyze conversation for room signals');
|
|
78
|
+
console.log(' - thetacog-status: Get current room context');
|
|
79
|
+
console.log(' - thetacog-switch: Switch to a different room');
|
|
80
|
+
console.log('');
|