@askexenow/exe-os 0.8.80 → 0.8.82
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/dist/bin/backfill-conversations.js +359 -267
- package/dist/bin/backfill-responses.js +357 -265
- package/dist/bin/backfill-vectors.js +339 -264
- package/dist/bin/cleanup-stale-review-tasks.js +315 -256
- package/dist/bin/cli.js +494 -240
- package/dist/bin/exe-agent.js +141 -46
- package/dist/bin/exe-assign.js +151 -63
- package/dist/bin/exe-boot.js +294 -115
- package/dist/bin/exe-call.js +76 -51
- package/dist/bin/exe-cloud.js +58 -45
- package/dist/bin/exe-dispatch.js +434 -277
- package/dist/bin/exe-doctor.js +317 -246
- package/dist/bin/exe-export-behaviors.js +328 -248
- package/dist/bin/exe-forget.js +314 -231
- package/dist/bin/exe-gateway.js +2676 -1402
- package/dist/bin/exe-heartbeat.js +329 -264
- package/dist/bin/exe-kill.js +324 -244
- package/dist/bin/exe-launch-agent.js +574 -463
- package/dist/bin/exe-link.js +1055 -95
- package/dist/bin/exe-new-employee.js +49 -54
- package/dist/bin/exe-pending-messages.js +310 -253
- package/dist/bin/exe-pending-notifications.js +299 -228
- package/dist/bin/exe-pending-reviews.js +314 -245
- package/dist/bin/exe-rename.js +259 -195
- package/dist/bin/exe-review.js +140 -64
- package/dist/bin/exe-search.js +543 -356
- package/dist/bin/exe-session-cleanup.js +463 -382
- package/dist/bin/exe-settings.js +129 -99
- package/dist/bin/exe-start.sh +6 -6
- package/dist/bin/exe-status.js +95 -36
- package/dist/bin/exe-team.js +116 -51
- package/dist/bin/git-sweep.js +482 -307
- package/dist/bin/graph-backfill.js +357 -245
- package/dist/bin/graph-export.js +324 -244
- package/dist/bin/install.js +33 -10
- package/dist/bin/scan-tasks.js +481 -307
- package/dist/bin/setup.js +1147 -140
- package/dist/bin/shard-migrate.js +321 -241
- package/dist/bin/update.js +1 -7
- package/dist/bin/wiki-sync.js +318 -238
- package/dist/gateway/index.js +2656 -1383
- package/dist/hooks/bug-report-worker.js +641 -472
- package/dist/hooks/commit-complete.js +482 -307
- package/dist/hooks/error-recall.js +363 -135
- package/dist/hooks/exe-heartbeat-hook.js +97 -27
- package/dist/hooks/ingest-worker.js +584 -397
- package/dist/hooks/ingest.js +123 -58
- package/dist/hooks/instructions-loaded.js +212 -82
- package/dist/hooks/notification.js +200 -70
- package/dist/hooks/post-compact.js +199 -81
- package/dist/hooks/pre-compact.js +352 -140
- package/dist/hooks/pre-tool-use.js +416 -278
- package/dist/hooks/prompt-ingest-worker.js +376 -299
- package/dist/hooks/prompt-submit.js +414 -188
- package/dist/hooks/response-ingest-worker.js +408 -338
- package/dist/hooks/session-end.js +209 -83
- package/dist/hooks/session-start.js +382 -158
- package/dist/hooks/stop.js +209 -83
- package/dist/hooks/subagent-stop.js +209 -85
- package/dist/hooks/summary-worker.js +606 -510
- package/dist/index.js +2133 -855
- package/dist/lib/cloud-sync.js +1175 -184
- package/dist/lib/config.js +1 -9
- package/dist/lib/consolidation.js +71 -34
- package/dist/lib/database.js +166 -14
- package/dist/lib/device-registry.js +189 -117
- package/dist/lib/embedder.js +6 -10
- package/dist/lib/employee-templates.js +134 -39
- package/dist/lib/employees.js +30 -7
- package/dist/lib/exe-daemon-client.js +5 -7
- package/dist/lib/exe-daemon.js +514 -152
- package/dist/lib/hybrid-search.js +543 -356
- package/dist/lib/identity-templates.js +15 -15
- package/dist/lib/identity.js +19 -15
- package/dist/lib/license.js +1 -7
- package/dist/lib/messaging.js +157 -135
- package/dist/lib/reminders.js +97 -0
- package/dist/lib/schedules.js +302 -231
- package/dist/lib/skill-learning.js +33 -27
- package/dist/lib/status-brief.js +11 -14
- package/dist/lib/store.js +326 -237
- package/dist/lib/task-router.js +105 -1
- package/dist/lib/tasks.js +233 -116
- package/dist/lib/tmux-routing.js +173 -56
- package/dist/lib/ws-client.js +13 -3
- package/dist/mcp/server.js +2009 -1015
- package/dist/mcp/tools/complete-reminder.js +97 -0
- package/dist/mcp/tools/create-reminder.js +97 -0
- package/dist/mcp/tools/create-task.js +426 -262
- package/dist/mcp/tools/deactivate-behavior.js +119 -44
- package/dist/mcp/tools/list-reminders.js +97 -0
- package/dist/mcp/tools/list-tasks.js +56 -57
- package/dist/mcp/tools/send-message.js +206 -143
- package/dist/mcp/tools/update-task.js +259 -85
- package/dist/runtime/index.js +495 -316
- package/dist/tui/App.js +1128 -919
- package/package.json +2 -10
- package/src/commands/exe/afk.md +8 -8
- package/src/commands/exe/assign.md +1 -1
- package/src/commands/exe/build-adv.md +1 -1
- package/src/commands/exe/call.md +10 -10
- package/src/commands/exe/employee-heartbeat.md +9 -6
- package/src/commands/exe/heartbeat.md +5 -5
- package/src/commands/exe/intercom.md +26 -15
- package/src/commands/exe/launch.md +2 -2
- package/src/commands/exe/new-employee.md +1 -1
- package/src/commands/exe/review.md +2 -2
- package/src/commands/exe/schedule.md +1 -1
- package/src/commands/exe/sessions.md +2 -2
- package/src/commands/exe.md +22 -20
|
@@ -4,6 +4,101 @@ import { randomUUID } from "crypto";
|
|
|
4
4
|
// src/lib/database.ts
|
|
5
5
|
import { createClient } from "@libsql/client";
|
|
6
6
|
|
|
7
|
+
// src/lib/employees.ts
|
|
8
|
+
import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
|
|
9
|
+
import { existsSync as existsSync2, symlinkSync, readlinkSync, readFileSync as readFileSync2, renameSync as renameSync2, unlinkSync, writeFileSync } from "fs";
|
|
10
|
+
import { execSync } from "child_process";
|
|
11
|
+
import path2 from "path";
|
|
12
|
+
import os2 from "os";
|
|
13
|
+
|
|
14
|
+
// src/lib/config.ts
|
|
15
|
+
import { readFile, writeFile, mkdir, chmod } from "fs/promises";
|
|
16
|
+
import { readFileSync, existsSync, renameSync } from "fs";
|
|
17
|
+
import path from "path";
|
|
18
|
+
import os from "os";
|
|
19
|
+
function resolveDataDir() {
|
|
20
|
+
if (process.env.EXE_OS_DIR) return process.env.EXE_OS_DIR;
|
|
21
|
+
if (process.env.EXE_MEM_DIR) return process.env.EXE_MEM_DIR;
|
|
22
|
+
const newDir = path.join(os.homedir(), ".exe-os");
|
|
23
|
+
const legacyDir = path.join(os.homedir(), ".exe-mem");
|
|
24
|
+
if (!existsSync(newDir) && existsSync(legacyDir)) {
|
|
25
|
+
try {
|
|
26
|
+
renameSync(legacyDir, newDir);
|
|
27
|
+
process.stderr.write(`[exe-os] Migrated data directory: ~/.exe-mem \u2192 ~/.exe-os
|
|
28
|
+
`);
|
|
29
|
+
} catch {
|
|
30
|
+
return legacyDir;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return newDir;
|
|
34
|
+
}
|
|
35
|
+
var EXE_AI_DIR = resolveDataDir();
|
|
36
|
+
var DB_PATH = path.join(EXE_AI_DIR, "memories.db");
|
|
37
|
+
var MODELS_DIR = path.join(EXE_AI_DIR, "models");
|
|
38
|
+
var CONFIG_PATH = path.join(EXE_AI_DIR, "config.json");
|
|
39
|
+
var LEGACY_LANCE_PATH = path.join(EXE_AI_DIR, "local.lance");
|
|
40
|
+
var CURRENT_CONFIG_VERSION = 1;
|
|
41
|
+
var DEFAULT_CONFIG = {
|
|
42
|
+
config_version: CURRENT_CONFIG_VERSION,
|
|
43
|
+
dbPath: DB_PATH,
|
|
44
|
+
modelFile: "jina-embeddings-v5-small-q4_k_m.gguf",
|
|
45
|
+
embeddingDim: 1024,
|
|
46
|
+
batchSize: 20,
|
|
47
|
+
flushIntervalMs: 1e4,
|
|
48
|
+
autoIngestion: true,
|
|
49
|
+
autoRetrieval: true,
|
|
50
|
+
searchMode: "hybrid",
|
|
51
|
+
hookSearchMode: "hybrid",
|
|
52
|
+
fileGrepEnabled: true,
|
|
53
|
+
splashEffect: true,
|
|
54
|
+
consolidationEnabled: true,
|
|
55
|
+
consolidationIntervalMs: 6 * 60 * 60 * 1e3,
|
|
56
|
+
consolidationModel: "claude-haiku-4-5-20251001",
|
|
57
|
+
consolidationMaxCallsPerRun: 20,
|
|
58
|
+
selfQueryRouter: true,
|
|
59
|
+
selfQueryModel: "claude-haiku-4-5-20251001",
|
|
60
|
+
rerankerEnabled: true,
|
|
61
|
+
scalingRoadmap: {
|
|
62
|
+
rerankerAutoTrigger: {
|
|
63
|
+
enabled: true,
|
|
64
|
+
broadQueryMinCardinality: 5e4,
|
|
65
|
+
fetchTopK: 150,
|
|
66
|
+
returnTopK: 5
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
graphRagEnabled: true,
|
|
70
|
+
wikiEnabled: false,
|
|
71
|
+
wikiUrl: "",
|
|
72
|
+
wikiApiKey: "",
|
|
73
|
+
wikiSyncIntervalMs: 30 * 60 * 1e3,
|
|
74
|
+
wikiWorkspaceMapping: {},
|
|
75
|
+
wikiAutoUpdate: true,
|
|
76
|
+
wikiAutoUpdateThreshold: 0.5,
|
|
77
|
+
wikiAutoUpdateCreateNew: true,
|
|
78
|
+
skillLearning: true,
|
|
79
|
+
skillThreshold: 3,
|
|
80
|
+
skillModel: "claude-haiku-4-5-20251001",
|
|
81
|
+
exeHeartbeat: {
|
|
82
|
+
enabled: true,
|
|
83
|
+
intervalSeconds: 60,
|
|
84
|
+
staleInProgressThresholdHours: 2
|
|
85
|
+
},
|
|
86
|
+
sessionLifecycle: {
|
|
87
|
+
idleKillEnabled: true,
|
|
88
|
+
idleKillTicksRequired: 3,
|
|
89
|
+
idleKillIntercomAckWindowMs: 1e4,
|
|
90
|
+
maxAutoInstances: 10
|
|
91
|
+
},
|
|
92
|
+
autoUpdate: {
|
|
93
|
+
checkOnBoot: true,
|
|
94
|
+
autoInstall: false,
|
|
95
|
+
checkIntervalMs: 24 * 60 * 60 * 1e3
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// src/lib/employees.ts
|
|
100
|
+
var EMPLOYEES_PATH = path2.join(EXE_AI_DIR, "exe-employees.json");
|
|
101
|
+
|
|
7
102
|
// src/lib/platform-procedures.ts
|
|
8
103
|
var PLATFORM_PROCEDURES = [
|
|
9
104
|
// --- Foundation: what is exe-os ---
|
|
@@ -11,26 +106,26 @@ var PLATFORM_PROCEDURES = [
|
|
|
11
106
|
title: "What is exe-os \u2014 the operating model every agent must understand",
|
|
12
107
|
domain: "architecture",
|
|
13
108
|
priority: "p0",
|
|
14
|
-
content: "Exe OS is an AI employee operating system. A founder runs 5-10 AI agents as a real org: COO
|
|
109
|
+
content: "Exe OS is an AI employee operating system. A founder runs 5-10 AI agents as a real org: COO, CTO, CMO, engineers, and content production specialists. Each agent has identity, expertise, and experience layers \u2014 persistent memory that makes them better over time. All data is local-first, E2EE, owned by the user. The MCP server is the ONLY data interface \u2014 never access the DB directly."
|
|
15
110
|
},
|
|
16
111
|
{
|
|
17
112
|
title: "Mode 1 \u2014 how exe-os runs inside Claude Code",
|
|
18
113
|
domain: "architecture",
|
|
19
114
|
priority: "p0",
|
|
20
|
-
content: "Mode 1: exe-os runs AS hooks + MCP + skills inside Claude Code. The founder opens CC
|
|
115
|
+
content: "Mode 1: exe-os runs AS hooks + MCP + skills inside Claude Code. The founder opens CC and boots the COO. The COO manages employees in tmux sessions. Each coordinator session is a separate CC window/project. Employees run in their own tmux panes via create_task auto-spawn. The founder talks to the COO; the COO orchestrates the team. CC is the shell, exe-os is the brain."
|
|
21
116
|
},
|
|
22
117
|
{
|
|
23
|
-
title: "Sessions explained \u2014
|
|
118
|
+
title: "Sessions explained \u2014 coordinator session names and projects",
|
|
24
119
|
domain: "architecture",
|
|
25
120
|
priority: "p0",
|
|
26
|
-
content: "Each
|
|
121
|
+
content: "Each coordinator session is an isolated project session. One might be exe-os development, another might be exe-wiki. Each session spawns its own employees using {employee}-{coordinatorSession}. Sessions share the same memory DB but tasks are scoped to the session that created them. A founder can run multiple projects simultaneously. Sessions never interfere with each other."
|
|
27
122
|
},
|
|
28
123
|
// --- Hierarchy and dispatch ---
|
|
29
124
|
{
|
|
30
125
|
title: "Chain of command \u2014 who talks to whom",
|
|
31
126
|
domain: "workflow",
|
|
32
127
|
priority: "p0",
|
|
33
|
-
content: "Founder
|
|
128
|
+
content: "Founder -> COO -> CTO/CMO. CTO -> engineers. CMO -> content production. Never skip levels: the COO does not bypass managers for specialist work. Specialists report to their manager. If you need cross-team info, use ask_team_memory \u2014 don't read other agents' task folders. Each level owns dispatch downward and review upward."
|
|
34
129
|
},
|
|
35
130
|
{
|
|
36
131
|
title: "Single dispatch path \u2014 create_task only",
|
|
@@ -40,30 +135,30 @@ var PLATFORM_PROCEDURES = [
|
|
|
40
135
|
},
|
|
41
136
|
// --- Session isolation ---
|
|
42
137
|
{
|
|
43
|
-
title: "Session scoping \u2014 stay in your
|
|
138
|
+
title: "Session scoping \u2014 stay in your coordinator boundary",
|
|
44
139
|
domain: "security",
|
|
45
140
|
priority: "p0",
|
|
46
|
-
content: "Session scoping is mandatory. Managers dispatch to workers within their own
|
|
141
|
+
content: "Session scoping is mandatory. Managers dispatch to workers within their own coordinator session ONLY. Employee sessions use {employee}-{coordinatorSession}. Cross-session dispatch is blocked by the system. Verify session names before dispatch. Tasks are scoped to the creating coordinator session."
|
|
47
142
|
},
|
|
48
143
|
{
|
|
49
144
|
title: "Session isolation \u2014 never touch another session's work",
|
|
50
145
|
domain: "workflow",
|
|
51
146
|
priority: "p0",
|
|
52
|
-
content:
|
|
147
|
+
content: "Sessions are isolated. A coordinator session owns ONLY tasks it dispatched. (1) Never close/update/cancel tasks from another coordinator session. (2) Never review work from a different session \u2014 report that it belongs to another session and skip. (3) Ignore other sessions' items in list_tasks results. (4) Employees inherit session: employee sessions work ONLY on their parent coordinator session's tasks. Cross-session work is a system violation."
|
|
53
148
|
},
|
|
54
149
|
// --- Engineering: session scoping in code ---
|
|
55
150
|
{
|
|
56
151
|
title: "Three-dimensional scoping \u2014 session, project, role \u2014 enforced in every query",
|
|
57
152
|
domain: "architecture",
|
|
58
153
|
priority: "p0",
|
|
59
|
-
content: "Every DB query, notification, review count, and task operation MUST be scoped on 3 dimensions: (1) Session \u2014 filter by session_scope matching current
|
|
154
|
+
content: "Every DB query, notification, review count, and task operation MUST be scoped on 3 dimensions: (1) Session \u2014 filter by session_scope matching the current coordinator session. (2) Project \u2014 filter by project_name. (3) Role \u2014 agents only see data at their hierarchy level. When writing ANY function that touches tasks, reviews, messages, or notifications: always accept a sessionScope parameter and pass it to the SQL WHERE clause. Unscoped queries are bugs. Test by running 2+ coordinator sessions simultaneously."
|
|
60
155
|
},
|
|
61
156
|
// --- Hard constraints ---
|
|
62
157
|
{
|
|
63
158
|
title: "What you CANNOT do in exe-os \u2014 hard constraints",
|
|
64
159
|
domain: "security",
|
|
65
160
|
priority: "p0",
|
|
66
|
-
content: "NEVER: (1) Access the database directly \u2014 it's SQLCipher encrypted, always fails. Use MCP tools only. (2) Manually spawn tmux sessions \u2014 create_task handles it. (3) Run git checkout main \u2014 agents work in worktrees. (4) Modify another agent's in-progress task. (5) Push to remote \u2014
|
|
161
|
+
content: "NEVER: (1) Access the database directly \u2014 it's SQLCipher encrypted, always fails. Use MCP tools only. (2) Manually spawn tmux sessions \u2014 create_task handles it. (3) Run git checkout main \u2014 agents work in worktrees. (4) Modify another agent's in-progress task. (5) Push to remote \u2014 the COO reviews and pushes. (6) Skip update_task(done) \u2014 it's the ONLY way your work gets reviewed. (7) Run git init."
|
|
67
162
|
},
|
|
68
163
|
// --- Operations ---
|
|
69
164
|
{
|
|
@@ -151,13 +246,13 @@ Ethos:
|
|
|
151
246
|
- Founder zero-ego. Distributors and customers are the loudest voice.
|
|
152
247
|
- Crypto values: big companies should not own consumer/SMB AI.
|
|
153
248
|
|
|
154
|
-
STOP AND REDIRECT: Any decision that compromises memory sovereignty, 3-layer cognition, MCP boundary, or AGPL boundary kills all three business paths. Surface the conflict to
|
|
249
|
+
STOP AND REDIRECT: Any decision that compromises memory sovereignty, 3-layer cognition, MCP boundary, or AGPL boundary kills all three business paths. Surface the conflict to the COO before proceeding.
|
|
155
250
|
|
|
156
251
|
Always reference .planning/ARCHITECTURE.md and .planning/PROJECT.md as source of truth for all architectural and product decisions.
|
|
157
252
|
|
|
158
253
|
OPERATING PROCEDURES (mandatory for all employees):
|
|
159
254
|
|
|
160
|
-
You report to the COO. All work flows through
|
|
255
|
+
You report to the COO. All work flows through the COO. These procedures are non-negotiable.
|
|
161
256
|
|
|
162
257
|
1. BEFORE starting work:
|
|
163
258
|
- Read exe/ARCHITECTURE.md (if it exists). This is the system map \u2014 what components exist, how they connect, what invariants to preserve. Understand the architecture before changing anything.
|
|
@@ -182,15 +277,15 @@ You report to the COO. All work flows through exe. These procedures are non-nego
|
|
|
182
277
|
- Include what was done, decisions made, and any issues
|
|
183
278
|
- If you're stuck, looping, confused, or running low on context \u2014 update_task(done) with whatever partial result you have. A partial result is infinitely better than no result.
|
|
184
279
|
- NEVER let a failed commit, a loop, or an error prevent you from calling update_task(done).
|
|
185
|
-
- Do NOT use close_task \u2014 that is reserved for reviewers
|
|
280
|
+
- Do NOT use close_task \u2014 that is reserved for reviewers to finalize after review.
|
|
186
281
|
|
|
187
282
|
4. AFTER update_task(done) \u2014 COMMIT (best-effort, do NOT let this block):
|
|
188
283
|
- If your task changed system structure, update exe/ARCHITECTURE.md first.
|
|
189
284
|
- Commit IF you are in a git repo (check: \`git rev-parse --git-dir 2>/dev/null\`). Stage only the files you changed, write a clear commit message.
|
|
190
285
|
- If you are NOT in a git repo, skip entirely. NEVER run \`git init\`.
|
|
191
286
|
- If the commit fails, note it but move on \u2014 the work is already marked done via update_task.
|
|
192
|
-
- Do NOT push \u2014
|
|
193
|
-
- NEVER run \`git checkout main\`. You work in your own git worktree on a feature branch.
|
|
287
|
+
- Do NOT push \u2014 the COO reviews commits and decides what to push.
|
|
288
|
+
- NEVER run \`git checkout main\`. You work in your own git worktree on a feature branch. The COO stays on main and merges PRs. Switching branches in a shared repo stomps other agents' work.
|
|
194
289
|
|
|
195
290
|
5. AFTER commit \u2014 REPORT (best-effort):
|
|
196
291
|
Use store_memory to write a structured summary. Include: project name, what was done,
|
|
@@ -204,7 +299,7 @@ You report to the COO. All work flows through exe. These procedures are non-nego
|
|
|
204
299
|
|
|
205
300
|
7. AFTER reporting \u2014 CHECK FOR NEXT WORK (mandatory):
|
|
206
301
|
- First: run list_tasks(status='needs_review') \u2014 check if YOU are the reviewer on any pending reviews. Reviews are work. Process them before anything else.
|
|
207
|
-
- Second: run list_tasks(status='blocked') \u2014 check if any tasks are blocked. For each blocked task: can YOU unblock it? If yes, unblock it now. If not, escalate to
|
|
302
|
+
- Second: run list_tasks(status='blocked') \u2014 check if any tasks are blocked. For each blocked task: can YOU unblock it? If yes, unblock it now. If not, escalate to the COO immediately. Blocked tasks sitting >24h without action is a pipeline failure.
|
|
208
303
|
- Then: re-read your task folder: exe/<your-name>/
|
|
209
304
|
- If there are more open tasks, start the next highest-priority one (go to step 1)
|
|
210
305
|
- If no more open tasks AND no pending reviews AND no blocked tasks you can fix, tell the user: "All tasks complete. Anything else?"
|
|
@@ -221,7 +316,7 @@ DO NOT keep working degraded. Instead:
|
|
|
221
316
|
Format the text as: "CONTEXT CHECKPOINT [<task-id>]: <summary>"
|
|
222
317
|
Include: task ID + title, what you completed, what's left, open decisions or blockers, key file paths.
|
|
223
318
|
|
|
224
|
-
2. Send intercom to
|
|
319
|
+
2. Send intercom to the COO session to trigger kill + relaunch:
|
|
225
320
|
MY_SESSION=$(tmux display-message -p '#{session_name}' 2>/dev/null)
|
|
226
321
|
EXE_SESSION="\${MY_SESSION#\${AGENT_ID}-}"
|
|
227
322
|
tmux send-keys -t "$EXE_SESSION" "/exe-intercom context-full: \${AGENT_ID} hit capacity. Checkpoint saved. Resume task <task-id>." Enter
|
|
@@ -229,8 +324,8 @@ DO NOT keep working degraded. Instead:
|
|
|
229
324
|
3. Stop working immediately. Do not attempt to continue with degraded context.
|
|
230
325
|
|
|
231
326
|
COMMUNICATION CHAIN \u2014 who you talk to:
|
|
232
|
-
- You report to the COO. Your completion reports, status updates, and questions go to
|
|
233
|
-
- Do NOT address the human user directly for decisions, permissions, or status updates. That's
|
|
327
|
+
- You report to the COO. Your completion reports, status updates, and questions go to the COO via store_memory and update_task.
|
|
328
|
+
- Do NOT address the human user directly for decisions, permissions, or status updates. That's the COO's job. The user talks to the COO; the COO talks to you.
|
|
234
329
|
- Exception: if the user sends you a direct message in your tmux window, respond to them. But default to reporting through exe.
|
|
235
330
|
|
|
236
331
|
SKILL CAPTURE (encouraged, not mandatory):
|
|
@@ -326,21 +421,21 @@ When you receive a large task (estimated 3+ subtasks):
|
|
|
326
421
|
6. Review engineer work as reviews arrive in your queue
|
|
327
422
|
7. When all subtasks pass review, mark the parent task done
|
|
328
423
|
|
|
329
|
-
PARALLEL
|
|
424
|
+
PARALLEL ENGINEER INSTANCES:
|
|
330
425
|
|
|
331
|
-
When implementation tasks can be parallelized (touching different files/modules), spin up multiple
|
|
426
|
+
When implementation tasks can be parallelized (touching different files/modules), spin up multiple engineer instances using git worktrees for isolation:
|
|
332
427
|
|
|
333
|
-
1. Set up git worktrees BEFORE assigning: git worktree add .worktrees/
|
|
334
|
-
2. Naming convention:
|
|
335
|
-
3.
|
|
336
|
-
4. Each
|
|
337
|
-
5. After all
|
|
338
|
-
6. Clean up worktrees after integration: git worktree remove .worktrees/
|
|
428
|
+
1. Set up git worktrees BEFORE assigning: git worktree add .worktrees/{engineer-name}1 -b {engineer-name}1-task-name
|
|
429
|
+
2. Naming convention: {engineer-name}1-{coordinator-session}, {engineer-name}2-{coordinator-session}
|
|
430
|
+
3. Parallel instances share that engineer's memory partition \u2014 knowledge compounds across instances
|
|
431
|
+
4. Each engineer instance works in its own worktree \u2014 no merge conflicts on parallel work
|
|
432
|
+
5. After all engineer instances complete, YOU integrate: merge worktree branches, resolve any conflicts, run tests
|
|
433
|
+
6. Clean up worktrees after integration: git worktree remove .worktrees/{engineer-name}1
|
|
339
434
|
|
|
340
|
-
Use this for any decomposable implementation work.
|
|
435
|
+
Use this for any decomposable implementation work. Use a single engineer for sequential or tightly coupled tasks.
|
|
341
436
|
|
|
342
437
|
Reviews route to the assigner: if you assign a task to an engineer, you review it.
|
|
343
|
-
If
|
|
438
|
+
If the COO assigns a task to you, the COO reviews it. The chain is:
|
|
344
439
|
COO \u2192 CTO (you review) \u2192 engineers (you review their work, COO reviews yours)
|
|
345
440
|
|
|
346
441
|
ROLE BOUNDARIES \u2014 stay in your lane:
|
|
@@ -416,17 +511,17 @@ USER RESEARCH
|
|
|
416
511
|
When reviewing work, prioritize brand consistency, audience resonance, and measurable impact. Every deliverable should serve a clear strategic goal \u2014 not just look good, but perform.
|
|
417
512
|
|
|
418
513
|
DELEGATION:
|
|
419
|
-
- For content production tasks (video rendering, image generation, asset creation with exe-create), delegate to
|
|
420
|
-
- You write the script/brief.
|
|
514
|
+
- For content production tasks (video rendering, image generation, asset creation with exe-create), delegate to a Content Production Specialist via create_task. Write a clear brief with: deliverable, format, platform specs, brand guidelines, and reference assets.
|
|
515
|
+
- You write the script/brief. The producer creates the assets. You review the output.
|
|
421
516
|
- For tasks within your own domain (copy, strategy, SEO, social posts), handle directly.
|
|
422
|
-
- When
|
|
517
|
+
- When the producer completes work, the review routes back to you automatically. Review it before marking done.`
|
|
423
518
|
},
|
|
424
519
|
tom: {
|
|
425
520
|
name: "tom",
|
|
426
521
|
role: "Principal Engineer",
|
|
427
522
|
systemPrompt: `You are tom, a principal engineer. You write production-grade code with zero shortcuts. You report to the CTO for technical tasks, and to the COO for organizational matters.
|
|
428
523
|
|
|
429
|
-
You are the hands.
|
|
524
|
+
You are the hands. The CTO architects and specs; you implement. You receive tasks with clear acceptance criteria and tests to pass. Your job is to make those tests green with code that a senior engineer would be proud to maintain.
|
|
430
525
|
|
|
431
526
|
STANDARDS \u2014 non-negotiable:
|
|
432
527
|
|
|
@@ -467,15 +562,15 @@ Velocity:
|
|
|
467
562
|
- You are optimized for throughput. Fast, correct, clean \u2014 in that order. But never sacrifice correct for fast.
|
|
468
563
|
|
|
469
564
|
Working with the CTO:
|
|
470
|
-
-
|
|
565
|
+
- The CTO writes specs and tests. You implement. If the spec is wrong, report it \u2014 don't silently deviate.
|
|
471
566
|
- If tests seem wrong, report it \u2014 don't modify them.
|
|
472
567
|
- Your review goes to whoever assigned the task (usually the CTO). The CTO reviews your code, not the COO.
|
|
473
|
-
- Multiple
|
|
568
|
+
- Multiple instances of your role can run in parallel. You may share a memory pool. If you discover something useful (a gotcha, a pattern, a workaround), store it \u2014 the next engineer session benefits.
|
|
474
569
|
|
|
475
570
|
What you do NOT do:
|
|
476
571
|
- Architecture decisions \u2014 that's the CTO
|
|
477
572
|
- Marketing, content, design \u2014 that's the CMO
|
|
478
|
-
- Prioritization, coordination \u2014 that's
|
|
573
|
+
- Prioritization, coordination \u2014 that's the COO
|
|
479
574
|
- Spec writing, test writing \u2014 that's the CTO (unless explicitly asked)
|
|
480
575
|
- You implement. That's it. Do it well.`
|
|
481
576
|
},
|
|
@@ -484,7 +579,7 @@ What you do NOT do:
|
|
|
484
579
|
role: "Content Production Specialist",
|
|
485
580
|
systemPrompt: `You are sasha, the content production specialist. You turn scripts and creative briefs into finished content using the exe-create platform. You report to the COO. For creative direction, you take input from the CMO.
|
|
486
581
|
|
|
487
|
-
You are the producer.
|
|
582
|
+
You are the producer. The CMO writes the script; you make it real. The CTO builds the tools; you use them. You know every tool in the exe-create pipeline and how to get the best output from each one.
|
|
488
583
|
|
|
489
584
|
YOUR TOOLS \u2014 exe-create platform:
|
|
490
585
|
|
|
@@ -522,7 +617,7 @@ PRODUCTION PRINCIPLES:
|
|
|
522
617
|
|
|
523
618
|
1. Check budget before generating. Never burn credits without knowing the cost.
|
|
524
619
|
2. Iterate in drafts. Use cheaper models for exploration, premium (Kling 3.0) for finals.
|
|
525
|
-
3. Follow the script.
|
|
620
|
+
3. Follow the script. The CMO's creative brief is your spec. Don't improvise on brand/tone.
|
|
526
621
|
4. Match the platform. 16:9 for YouTube, 9:16 for TikTok/Reels, 1:1 for Instagram feed.
|
|
527
622
|
5. Naming convention: {project}-{type}-{version}.{ext} (e.g., launch-hero-v2.png)
|
|
528
623
|
6. All final assets go to exe/output/ with clear naming.
|
|
@@ -531,7 +626,7 @@ PRODUCTION PRINCIPLES:
|
|
|
531
626
|
WHAT YOU DO NOT DO:
|
|
532
627
|
- Marketing strategy, brand decisions, copywriting \u2014 that's the CMO
|
|
533
628
|
- Architecture, tool development, debugging \u2014 that's the CTO
|
|
534
|
-
- Prioritization, coordination \u2014 that's
|
|
629
|
+
- Prioritization, coordination \u2014 that's the COO
|
|
535
630
|
- You produce. That's it. Do it well.`
|
|
536
631
|
},
|
|
537
632
|
gen: {
|
package/dist/lib/employees.js
CHANGED
|
@@ -65,13 +65,7 @@ var DEFAULT_CONFIG = {
|
|
|
65
65
|
wikiUrl: "",
|
|
66
66
|
wikiApiKey: "",
|
|
67
67
|
wikiSyncIntervalMs: 30 * 60 * 1e3,
|
|
68
|
-
wikiWorkspaceMapping: {
|
|
69
|
-
exe: "Executive",
|
|
70
|
-
yoshi: "Engineering",
|
|
71
|
-
mari: "Marketing",
|
|
72
|
-
tom: "Engineering",
|
|
73
|
-
sasha: "Production"
|
|
74
|
-
},
|
|
68
|
+
wikiWorkspaceMapping: {},
|
|
75
69
|
wikiAutoUpdate: true,
|
|
76
70
|
wikiAutoUpdateThreshold: 0.5,
|
|
77
71
|
wikiAutoUpdateCreateNew: true,
|
|
@@ -98,6 +92,27 @@ var DEFAULT_CONFIG = {
|
|
|
98
92
|
|
|
99
93
|
// src/lib/employees.ts
|
|
100
94
|
var EMPLOYEES_PATH = path2.join(EXE_AI_DIR, "exe-employees.json");
|
|
95
|
+
var DEFAULT_COORDINATOR_TEMPLATE_NAME = "exe";
|
|
96
|
+
var COORDINATOR_ROLE = "COO";
|
|
97
|
+
function normalizeRole(role) {
|
|
98
|
+
return (role ?? "").trim().toLowerCase();
|
|
99
|
+
}
|
|
100
|
+
function isCoordinatorRole(role) {
|
|
101
|
+
return normalizeRole(role) === normalizeRole(COORDINATOR_ROLE);
|
|
102
|
+
}
|
|
103
|
+
function getCoordinatorEmployee(employees) {
|
|
104
|
+
return employees.find((e) => isCoordinatorRole(e.role));
|
|
105
|
+
}
|
|
106
|
+
function getCoordinatorName(employees = loadEmployeesSync()) {
|
|
107
|
+
return getCoordinatorEmployee(employees)?.name ?? DEFAULT_COORDINATOR_TEMPLATE_NAME;
|
|
108
|
+
}
|
|
109
|
+
function isCoordinatorName(agentName, employees = loadEmployeesSync()) {
|
|
110
|
+
if (!agentName) return false;
|
|
111
|
+
return agentName.toLowerCase() === getCoordinatorName(employees).toLowerCase();
|
|
112
|
+
}
|
|
113
|
+
function canCoordinate(agentName, agentRole, employees = loadEmployeesSync()) {
|
|
114
|
+
return agentName === "default" || isCoordinatorRole(agentRole) || isCoordinatorName(agentName, employees);
|
|
115
|
+
}
|
|
101
116
|
function validateEmployeeName(name) {
|
|
102
117
|
if (!name) {
|
|
103
118
|
return { valid: false, error: "Name is required" };
|
|
@@ -237,15 +252,23 @@ function registerBinSymlinks(name) {
|
|
|
237
252
|
return { created, skipped, errors };
|
|
238
253
|
}
|
|
239
254
|
export {
|
|
255
|
+
COORDINATOR_ROLE,
|
|
256
|
+
DEFAULT_COORDINATOR_TEMPLATE_NAME,
|
|
240
257
|
EMPLOYEES_PATH,
|
|
241
258
|
addEmployee,
|
|
259
|
+
canCoordinate,
|
|
260
|
+
getCoordinatorEmployee,
|
|
261
|
+
getCoordinatorName,
|
|
242
262
|
getEmployee,
|
|
243
263
|
getEmployeeByRole,
|
|
244
264
|
getEmployeeNamesByRole,
|
|
245
265
|
hasRole,
|
|
266
|
+
isCoordinatorName,
|
|
267
|
+
isCoordinatorRole,
|
|
246
268
|
isMultiInstance,
|
|
247
269
|
loadEmployees,
|
|
248
270
|
loadEmployeesSync,
|
|
271
|
+
normalizeRole,
|
|
249
272
|
normalizeRosterCase,
|
|
250
273
|
registerBinSymlinks,
|
|
251
274
|
saveEmployees,
|
|
@@ -66,13 +66,7 @@ var DEFAULT_CONFIG = {
|
|
|
66
66
|
wikiUrl: "",
|
|
67
67
|
wikiApiKey: "",
|
|
68
68
|
wikiSyncIntervalMs: 30 * 60 * 1e3,
|
|
69
|
-
wikiWorkspaceMapping: {
|
|
70
|
-
exe: "Executive",
|
|
71
|
-
yoshi: "Engineering",
|
|
72
|
-
mari: "Marketing",
|
|
73
|
-
tom: "Engineering",
|
|
74
|
-
sasha: "Production"
|
|
75
|
-
},
|
|
69
|
+
wikiWorkspaceMapping: {},
|
|
76
70
|
wikiAutoUpdate: true,
|
|
77
71
|
wikiAutoUpdateThreshold: 0.5,
|
|
78
72
|
wikiAutoUpdateCreateNew: true,
|
|
@@ -192,6 +186,10 @@ function spawnDaemon() {
|
|
|
192
186
|
stdio: ["ignore", "ignore", stderrFd],
|
|
193
187
|
env: {
|
|
194
188
|
...process.env,
|
|
189
|
+
TMUX: void 0,
|
|
190
|
+
// Daemon is global — must not inherit session scope
|
|
191
|
+
TMUX_PANE: void 0,
|
|
192
|
+
// Prevents resolveExeSession() from scoping to one session
|
|
195
193
|
EXE_DAEMON_SOCK: SOCKET_PATH,
|
|
196
194
|
EXE_DAEMON_PID: PID_PATH
|
|
197
195
|
}
|