@askexenow/exe-os 0.9.65 → 0.9.66

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 (105) hide show
  1. package/deploy/stack-manifests/v0.9.json +4 -4
  2. package/dist/bin/backfill-conversations.js +22 -0
  3. package/dist/bin/backfill-responses.js +22 -0
  4. package/dist/bin/backfill-vectors.js +22 -0
  5. package/dist/bin/cleanup-stale-review-tasks.js +22 -0
  6. package/dist/bin/cli.js +2263 -1203
  7. package/dist/bin/exe-agent-config.js +4 -0
  8. package/dist/bin/exe-agent.js +16 -0
  9. package/dist/bin/exe-assign.js +22 -0
  10. package/dist/bin/exe-boot.js +93 -5
  11. package/dist/bin/exe-call.js +16 -0
  12. package/dist/bin/exe-cloud.js +6671 -464
  13. package/dist/bin/exe-dispatch.js +24 -0
  14. package/dist/bin/exe-doctor.js +2845 -1223
  15. package/dist/bin/exe-export-behaviors.js +24 -0
  16. package/dist/bin/exe-forget.js +22 -0
  17. package/dist/bin/exe-gateway.js +24 -0
  18. package/dist/bin/exe-heartbeat.js +23 -0
  19. package/dist/bin/exe-kill.js +22 -0
  20. package/dist/bin/exe-launch-agent.js +24 -0
  21. package/dist/bin/exe-link.js +287 -176
  22. package/dist/bin/exe-new-employee.js +127 -1
  23. package/dist/bin/exe-pending-messages.js +22 -0
  24. package/dist/bin/exe-pending-notifications.js +22 -0
  25. package/dist/bin/exe-pending-reviews.js +22 -0
  26. package/dist/bin/exe-rename.js +22 -0
  27. package/dist/bin/exe-review.js +22 -0
  28. package/dist/bin/exe-search.js +24 -0
  29. package/dist/bin/exe-session-cleanup.js +24 -0
  30. package/dist/bin/exe-settings.js +10 -0
  31. package/dist/bin/exe-start-codex.js +135 -1
  32. package/dist/bin/exe-start-opencode.js +149 -1
  33. package/dist/bin/exe-status.js +22 -0
  34. package/dist/bin/exe-team.js +22 -0
  35. package/dist/bin/git-sweep.js +24 -0
  36. package/dist/bin/graph-backfill.js +22 -0
  37. package/dist/bin/graph-export.js +22 -0
  38. package/dist/bin/install.js +115 -1
  39. package/dist/bin/intercom-check.js +24 -0
  40. package/dist/bin/scan-tasks.js +24 -0
  41. package/dist/bin/setup.js +389 -155
  42. package/dist/bin/shard-migrate.js +22 -0
  43. package/dist/bin/update.js +4 -0
  44. package/dist/gateway/index.js +24 -0
  45. package/dist/hooks/bug-report-worker.js +135 -42
  46. package/dist/hooks/codex-stop-task-finalizer.js +24 -0
  47. package/dist/hooks/commit-complete.js +24 -0
  48. package/dist/hooks/error-recall.js +24 -0
  49. package/dist/hooks/exe-heartbeat-hook.js +4 -0
  50. package/dist/hooks/ingest-worker.js +4 -0
  51. package/dist/hooks/ingest.js +23 -0
  52. package/dist/hooks/instructions-loaded.js +22 -0
  53. package/dist/hooks/notification.js +22 -0
  54. package/dist/hooks/post-compact.js +22 -0
  55. package/dist/hooks/post-tool-combined.js +24 -0
  56. package/dist/hooks/pre-compact.js +260 -109
  57. package/dist/hooks/pre-tool-use.js +22 -0
  58. package/dist/hooks/prompt-submit.js +24 -0
  59. package/dist/hooks/session-end.js +161 -122
  60. package/dist/hooks/session-start.js +142 -0
  61. package/dist/hooks/stop.js +23 -0
  62. package/dist/hooks/subagent-stop.js +22 -0
  63. package/dist/hooks/summary-worker.js +172 -77
  64. package/dist/index.js +24 -0
  65. package/dist/lib/agent-config.js +4 -0
  66. package/dist/lib/cloud-sync.js +27 -4
  67. package/dist/lib/config.js +12 -0
  68. package/dist/lib/consolidation.js +4 -0
  69. package/dist/lib/database.js +4 -0
  70. package/dist/lib/db-daemon-client.js +4 -0
  71. package/dist/lib/db.js +4 -0
  72. package/dist/lib/device-registry.js +4 -0
  73. package/dist/lib/embedder.js +12 -0
  74. package/dist/lib/employee-templates.js +16 -0
  75. package/dist/lib/employees.js +4 -0
  76. package/dist/lib/exe-daemon-client.js +4 -0
  77. package/dist/lib/exe-daemon.js +1058 -453
  78. package/dist/lib/hybrid-search.js +24 -0
  79. package/dist/lib/identity.js +4 -0
  80. package/dist/lib/license.js +4 -0
  81. package/dist/lib/messaging.js +4 -0
  82. package/dist/lib/reminders.js +4 -0
  83. package/dist/lib/schedules.js +22 -0
  84. package/dist/lib/skill-learning.js +12 -0
  85. package/dist/lib/status-brief.js +39 -0
  86. package/dist/lib/store.js +22 -0
  87. package/dist/lib/task-router.js +4 -0
  88. package/dist/lib/tasks.js +12 -0
  89. package/dist/lib/tmux-routing.js +12 -0
  90. package/dist/lib/token-spend.js +4 -0
  91. package/dist/mcp/server.js +1022 -425
  92. package/dist/mcp/tools/complete-reminder.js +4 -0
  93. package/dist/mcp/tools/create-reminder.js +4 -0
  94. package/dist/mcp/tools/create-task.js +12 -0
  95. package/dist/mcp/tools/deactivate-behavior.js +4 -0
  96. package/dist/mcp/tools/list-reminders.js +4 -0
  97. package/dist/mcp/tools/list-tasks.js +4 -0
  98. package/dist/mcp/tools/send-message.js +4 -0
  99. package/dist/mcp/tools/update-task.js +12 -0
  100. package/dist/runtime/index.js +24 -0
  101. package/dist/tui/App.js +24 -0
  102. package/package.json +3 -2
  103. package/src/commands/exe/cloud.md +15 -8
  104. package/src/commands/exe/link.md +7 -6
  105. package/stack.release.json +2 -2
@@ -116,6 +116,10 @@ var init_config = __esm({
116
116
  checkOnBoot: true,
117
117
  autoInstall: false,
118
118
  checkIntervalMs: 24 * 60 * 60 * 1e3
119
+ },
120
+ orchestration: {
121
+ phase: "phase_1_coo",
122
+ phaseSetBy: "default"
119
123
  }
120
124
  };
121
125
  }
@@ -100,6 +100,10 @@ var init_config = __esm({
100
100
  checkOnBoot: true,
101
101
  autoInstall: false,
102
102
  checkIntervalMs: 24 * 60 * 60 * 1e3
103
+ },
104
+ orchestration: {
105
+ phase: "phase_1_coo",
106
+ phaseSetBy: "default"
103
107
  }
104
108
  };
105
109
  }
@@ -1325,6 +1329,12 @@ var PLATFORM_PROCEDURES = [
1325
1329
  priority: "p0",
1326
1330
  content: "Founder -> coordinator (the executive agent, internally routed as 'COO') -> CTO/CMO. CTO -> engineers. CMO -> content production. Never skip levels: the coordinator 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."
1327
1331
  },
1332
+ {
1333
+ title: "Customer orchestration maturity \u2014 recommend, never trap",
1334
+ domain: "workflow",
1335
+ priority: "p1",
1336
+ content: "New customers start best in Phase 1: founder \u2194 coordinator/Chief of Staff, building company context. Suggest Phase 2 executives when domain work repeats; suggest Phase 3 parallel execution only when review/permission gates are ready. This is guidance, not a blocker: users may jump phases anytime. Never overwrite their phase, role titles, identities, or custom org design."
1337
+ },
1328
1338
  {
1329
1339
  title: "Single dispatch path \u2014 create_task only",
1330
1340
  domain: "workflow",
@@ -1383,6 +1393,12 @@ var PLATFORM_PROCEDURES = [
1383
1393
  priority: "p0",
1384
1394
  content: "exe-build-adv is MANDATORY for ALL work touching 3+ files. Run /exe-build-adv --auto BEFORE implementation. Pipeline: Spec \u2192 AC \u2192 Tests \u2192 Evaluate \u2192 Fix. No multi-file feature ships without pipeline artifacts. No exceptions \u2014 managers reject work without them."
1385
1395
  },
1396
+ {
1397
+ title: "Commit discipline \u2014 never leave verified work floating",
1398
+ domain: "workflow",
1399
+ priority: "p1",
1400
+ content: "After any code-change batch passes typecheck/tests/build, run git status, summarize changed files, and commit with a clear message before ending the session. If work must remain uncommitted for review/dogfood, explicitly say so, list the files, and state the blocker. Never imply work is complete while verified changes are still floating locally."
1401
+ },
1386
1402
  {
1387
1403
  title: "Desktop and TUI are the same product",
1388
1404
  domain: "architecture",
@@ -124,6 +124,11 @@ function normalizeAutoUpdate(raw) {
124
124
  const userAU = raw.autoUpdate ?? {};
125
125
  raw.autoUpdate = { ...defaultAU, ...userAU };
126
126
  }
127
+ function normalizeOrchestration(raw) {
128
+ const defaultOrg = DEFAULT_CONFIG.orchestration;
129
+ const userOrg = raw.orchestration ?? {};
130
+ raw.orchestration = { ...defaultOrg, ...userOrg };
131
+ }
127
132
  async function loadConfig() {
128
133
  const dir = process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? EXE_AI_DIR;
129
134
  await ensurePrivateDir(dir);
@@ -148,6 +153,7 @@ async function loadConfig() {
148
153
  normalizeScalingRoadmap(migratedCfg);
149
154
  normalizeSessionLifecycle(migratedCfg);
150
155
  normalizeAutoUpdate(migratedCfg);
156
+ normalizeOrchestration(migratedCfg);
151
157
  const config = { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db"), ...migratedCfg };
152
158
  if (config.dbPath.startsWith("~")) {
153
159
  config.dbPath = config.dbPath.replace(/^~/, os.homedir());
@@ -223,6 +229,10 @@ var init_config = __esm({
223
229
  checkOnBoot: true,
224
230
  autoInstall: false,
225
231
  checkIntervalMs: 24 * 60 * 60 * 1e3
232
+ },
233
+ orchestration: {
234
+ phase: "phase_1_coo",
235
+ phaseSetBy: "default"
226
236
  }
227
237
  };
228
238
  CONFIG_MIGRATIONS = [
@@ -3301,6 +3311,12 @@ var init_platform_procedures = __esm({
3301
3311
  priority: "p0",
3302
3312
  content: "Founder -> coordinator (the executive agent, internally routed as 'COO') -> CTO/CMO. CTO -> engineers. CMO -> content production. Never skip levels: the coordinator 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."
3303
3313
  },
3314
+ {
3315
+ title: "Customer orchestration maturity \u2014 recommend, never trap",
3316
+ domain: "workflow",
3317
+ priority: "p1",
3318
+ content: "New customers start best in Phase 1: founder \u2194 coordinator/Chief of Staff, building company context. Suggest Phase 2 executives when domain work repeats; suggest Phase 3 parallel execution only when review/permission gates are ready. This is guidance, not a blocker: users may jump phases anytime. Never overwrite their phase, role titles, identities, or custom org design."
3319
+ },
3304
3320
  {
3305
3321
  title: "Single dispatch path \u2014 create_task only",
3306
3322
  domain: "workflow",
@@ -3359,6 +3375,12 @@ var init_platform_procedures = __esm({
3359
3375
  priority: "p0",
3360
3376
  content: "exe-build-adv is MANDATORY for ALL work touching 3+ files. Run /exe-build-adv --auto BEFORE implementation. Pipeline: Spec \u2192 AC \u2192 Tests \u2192 Evaluate \u2192 Fix. No multi-file feature ships without pipeline artifacts. No exceptions \u2014 managers reject work without them."
3361
3377
  },
3378
+ {
3379
+ title: "Commit discipline \u2014 never leave verified work floating",
3380
+ domain: "workflow",
3381
+ priority: "p1",
3382
+ content: "After any code-change batch passes typecheck/tests/build, run git status, summarize changed files, and commit with a clear message before ending the session. If work must remain uncommitted for review/dogfood, explicitly say so, list the files, and state the blocker. Never imply work is complete while verified changes are still floating locally."
3383
+ },
3362
3384
  {
3363
3385
  title: "Desktop and TUI are the same product",
3364
3386
  domain: "architecture",
@@ -150,6 +150,11 @@ function normalizeAutoUpdate(raw) {
150
150
  const userAU = raw.autoUpdate ?? {};
151
151
  raw.autoUpdate = { ...defaultAU, ...userAU };
152
152
  }
153
+ function normalizeOrchestration(raw) {
154
+ const defaultOrg = DEFAULT_CONFIG.orchestration;
155
+ const userOrg = raw.orchestration ?? {};
156
+ raw.orchestration = { ...defaultOrg, ...userOrg };
157
+ }
153
158
  async function loadConfig() {
154
159
  const dir = process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? EXE_AI_DIR;
155
160
  await ensurePrivateDir(dir);
@@ -174,6 +179,7 @@ async function loadConfig() {
174
179
  normalizeScalingRoadmap(migratedCfg);
175
180
  normalizeSessionLifecycle(migratedCfg);
176
181
  normalizeAutoUpdate(migratedCfg);
182
+ normalizeOrchestration(migratedCfg);
177
183
  const config = { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db"), ...migratedCfg };
178
184
  if (config.dbPath.startsWith("~")) {
179
185
  config.dbPath = config.dbPath.replace(/^~/, os.homedir());
@@ -197,6 +203,7 @@ function loadConfigSync() {
197
203
  normalizeScalingRoadmap(migratedCfg);
198
204
  normalizeSessionLifecycle(migratedCfg);
199
205
  normalizeAutoUpdate(migratedCfg);
206
+ normalizeOrchestration(migratedCfg);
200
207
  return { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db"), ...migratedCfg };
201
208
  } catch {
202
209
  return { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db") };
@@ -218,6 +225,7 @@ async function loadConfigFrom(configPath) {
218
225
  normalizeScalingRoadmap(migratedCfg);
219
226
  normalizeSessionLifecycle(migratedCfg);
220
227
  normalizeAutoUpdate(migratedCfg);
228
+ normalizeOrchestration(migratedCfg);
221
229
  return { ...DEFAULT_CONFIG, ...migratedCfg };
222
230
  } catch {
223
231
  return { ...DEFAULT_CONFIG };
@@ -289,6 +297,10 @@ var init_config = __esm({
289
297
  checkOnBoot: true,
290
298
  autoInstall: false,
291
299
  checkIntervalMs: 24 * 60 * 60 * 1e3
300
+ },
301
+ orchestration: {
302
+ phase: "phase_1_coo",
303
+ phaseSetBy: "default"
292
304
  }
293
305
  };
294
306
  CONFIG_MIGRATIONS = [
@@ -3028,6 +3040,12 @@ var init_platform_procedures = __esm({
3028
3040
  priority: "p0",
3029
3041
  content: "Founder -> coordinator (the executive agent, internally routed as 'COO') -> CTO/CMO. CTO -> engineers. CMO -> content production. Never skip levels: the coordinator 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."
3030
3042
  },
3043
+ {
3044
+ title: "Customer orchestration maturity \u2014 recommend, never trap",
3045
+ domain: "workflow",
3046
+ priority: "p1",
3047
+ content: "New customers start best in Phase 1: founder \u2194 coordinator/Chief of Staff, building company context. Suggest Phase 2 executives when domain work repeats; suggest Phase 3 parallel execution only when review/permission gates are ready. This is guidance, not a blocker: users may jump phases anytime. Never overwrite their phase, role titles, identities, or custom org design."
3048
+ },
3031
3049
  {
3032
3050
  title: "Single dispatch path \u2014 create_task only",
3033
3051
  domain: "workflow",
@@ -3086,6 +3104,12 @@ var init_platform_procedures = __esm({
3086
3104
  priority: "p0",
3087
3105
  content: "exe-build-adv is MANDATORY for ALL work touching 3+ files. Run /exe-build-adv --auto BEFORE implementation. Pipeline: Spec \u2192 AC \u2192 Tests \u2192 Evaluate \u2192 Fix. No multi-file feature ships without pipeline artifacts. No exceptions \u2014 managers reject work without them."
3088
3106
  },
3107
+ {
3108
+ title: "Commit discipline \u2014 never leave verified work floating",
3109
+ domain: "workflow",
3110
+ priority: "p1",
3111
+ content: "After any code-change batch passes typecheck/tests/build, run git status, summarize changed files, and commit with a clear message before ending the session. If work must remain uncommitted for review/dogfood, explicitly say so, list the files, and state the blocker. Never imply work is complete while verified changes are still floating locally."
3112
+ },
3089
3113
  {
3090
3114
  title: "Desktop and TUI are the same product",
3091
3115
  domain: "architecture",
@@ -9020,8 +9044,10 @@ var init_db_backup = __esm({
9020
9044
  // src/lib/cloud-sync.ts
9021
9045
  var cloud_sync_exports = {};
9022
9046
  __export(cloud_sync_exports, {
9047
+ CLOUD_RELINK_REQUIRED_MESSAGE: () => CLOUD_RELINK_REQUIRED_MESSAGE,
9023
9048
  assertSecureEndpoint: () => assertSecureEndpoint,
9024
9049
  buildRosterBlob: () => buildRosterBlob,
9050
+ clearCloudRelinkRequired: () => clearCloudRelinkRequired,
9025
9051
  cloudPull: () => cloudPull,
9026
9052
  cloudPullBehaviors: () => cloudPullBehaviors,
9027
9053
  cloudPullBlob: () => cloudPullBlob,
@@ -9041,6 +9067,7 @@ __export(cloud_sync_exports, {
9041
9067
  cloudPushRoster: () => cloudPushRoster,
9042
9068
  cloudPushTasks: () => cloudPushTasks,
9043
9069
  cloudSync: () => cloudSync,
9070
+ getCloudRelinkRequired: () => getCloudRelinkRequired,
9044
9071
  mergeConfig: () => mergeConfig,
9045
9072
  mergeRosterFromRemote: () => mergeRosterFromRemote,
9046
9073
  pushToPostgres: () => pushToPostgres,
@@ -9274,6 +9301,24 @@ async function cloudPull(sinceVersion, config) {
9274
9301
  return { records: [], maxVersion: sinceVersion };
9275
9302
  }
9276
9303
  }
9304
+ async function getCloudRelinkRequired(client = getClient()) {
9305
+ try {
9306
+ await client.execute("CREATE TABLE IF NOT EXISTS sync_meta (key TEXT PRIMARY KEY, value TEXT NOT NULL)");
9307
+ const relink = await client.execute("SELECT value FROM sync_meta WHERE key = 'cloud_relink_required' LIMIT 1");
9308
+ return String(relink.rows[0]?.value ?? "") === "1";
9309
+ } catch {
9310
+ return false;
9311
+ }
9312
+ }
9313
+ async function clearCloudRelinkRequired(client = getClient()) {
9314
+ await client.execute("CREATE TABLE IF NOT EXISTS sync_meta (key TEXT PRIMARY KEY, value TEXT NOT NULL)");
9315
+ await client.execute("INSERT OR REPLACE INTO sync_meta (key, value) VALUES ('cloud_relink_required', '0')");
9316
+ await client.execute({
9317
+ sql: "INSERT OR REPLACE INTO sync_meta (key, value) VALUES ('cloud_relinked_at', ?)",
9318
+ args: [(/* @__PURE__ */ new Date()).toISOString()]
9319
+ });
9320
+ await client.execute("DELETE FROM sync_meta WHERE key IN ('last_cloud_pull_version', 'last_cloud_push_version')");
9321
+ }
9277
9322
  async function cloudSync(config) {
9278
9323
  if (!isSyncCryptoInitialized()) {
9279
9324
  try {
@@ -9295,10 +9340,7 @@ async function cloudSync(config) {
9295
9340
  throw new Error("[cloud-sync] Database not initialized. Call initStore() before cloudSync().");
9296
9341
  }
9297
9342
  try {
9298
- const relink = await client.execute("SELECT value FROM sync_meta WHERE key = 'cloud_relink_required' LIMIT 1");
9299
- if (String(relink.rows[0]?.value ?? "") === "1") {
9300
- throw new Error("[cloud-sync] Paused after key rotation. Re-link/reupload cloud sync with the new recovery phrase before syncing.");
9301
- }
9343
+ if (await getCloudRelinkRequired(client)) throw new Error(CLOUD_RELINK_REQUIRED_MESSAGE);
9302
9344
  } catch (err) {
9303
9345
  const msg = err instanceof Error ? err.message : String(err);
9304
9346
  if (msg.includes("Paused after key rotation")) throw err;
@@ -10230,7 +10272,7 @@ async function cloudPullDocuments(config) {
10230
10272
  }
10231
10273
  return { pulled };
10232
10274
  }
10233
- var LOCALHOST_PATTERNS, FETCH_TIMEOUT_MS, PUSH_BATCH_SIZE, ROSTER_LOCK_PATH, LOCK_STALE_MS, _pgPromise, _pgFailed, ROSTER_DELETIONS_PATH;
10275
+ var LOCALHOST_PATTERNS, FETCH_TIMEOUT_MS, PUSH_BATCH_SIZE, ROSTER_LOCK_PATH, LOCK_STALE_MS, _pgPromise, _pgFailed, CLOUD_RELINK_REQUIRED_MESSAGE, ROSTER_DELETIONS_PATH;
10234
10276
  var init_cloud_sync = __esm({
10235
10277
  "src/lib/cloud-sync.ts"() {
10236
10278
  "use strict";
@@ -10249,6 +10291,7 @@ var init_cloud_sync = __esm({
10249
10291
  LOCK_STALE_MS = 3e4;
10250
10292
  _pgPromise = null;
10251
10293
  _pgFailed = false;
10294
+ CLOUD_RELINK_REQUIRED_MESSAGE = "[cloud-sync] Paused after key rotation. Run `exe-os cloud relink --dry-run` for the safe relink checklist.";
10252
10295
  ROSTER_DELETIONS_PATH = path25.join(EXE_AI_DIR, "roster-deletions.json");
10253
10296
  }
10254
10297
  });
@@ -10676,6 +10719,8 @@ async function generateStatusBrief(employees, data, _activeAgentIds) {
10676
10719
  }
10677
10720
  const sections = [];
10678
10721
  sections.push([` EXE STATUS BRIEF \u2014 ${dateStr}${sessionTag}`]);
10722
+ const orchestrationLines = buildOrchestrationPhase(data, employees);
10723
+ if (orchestrationLines.length > 0) sections.push(orchestrationLines);
10679
10724
  const reminderLines = buildReminders(data);
10680
10725
  if (reminderLines.length > 0) sections.push(reminderLines);
10681
10726
  const actionLines = buildActionRequired(data);
@@ -10718,6 +10763,11 @@ function buildFirstBootBrief(employees, dateStr, sessionTag) {
10718
10763
  bodyLines.push(` ${emoji} ${emp.name}${role}`);
10719
10764
  }
10720
10765
  bodyLines.push("");
10766
+ bodyLines.push(" \u{1F9ED} Orchestration:");
10767
+ bodyLines.push(" \u2022 Phase 1 \u2014 COO / Chief of Staff mode");
10768
+ bodyLines.push(" \u2022 Recommended start: build company context first");
10769
+ bodyLines.push(" \u2022 You can unlock executives or parallel mode anytime");
10770
+ bodyLines.push("");
10721
10771
  bodyLines.push(" \u{1F4A1} Quick start:");
10722
10772
  bodyLines.push(" \u2022 Run `exe-os backfill-conversations` to import Claude Code history");
10723
10773
  bodyLines.push(" \u2022 Say `/exe` to launch your COO with a full status brief");
@@ -10748,6 +10798,38 @@ function buildReminders(data) {
10748
10798
  }
10749
10799
  return lines;
10750
10800
  }
10801
+ function buildOrchestrationPhase(data, employees) {
10802
+ if (!data.orchestrationPhase) return [];
10803
+ const phase = data.orchestrationPhase;
10804
+ const hasExecutiveBench = employees.some((e) => ["cto", "cmo"].includes(e.role.toLowerCase()));
10805
+ const openWorkCount = data.globalTasks.filter((t) => t.status === "open" || t.status === "in_progress").length;
10806
+ const domainKeywordHits = data.globalTasks.filter(
10807
+ (t) => /\b(api|bug|code|repo|build|deploy|design|brand|copy|content|marketing|legal|finance|sales|crm)\b/i.test(t.title)
10808
+ ).length;
10809
+ const phase1Signal = !hasExecutiveBench && (openWorkCount >= 3 || domainKeywordHits >= 2);
10810
+ if (phase === "phase_2_executives") {
10811
+ return [
10812
+ "\u{1F9ED} ORCHESTRATION",
10813
+ " Phase 2 \u2014 Executive bench",
10814
+ " Focus: COO works with CTO/CMO/domain executives before specialist fan-out",
10815
+ " You can switch phases anytime: exe-os org phase"
10816
+ ];
10817
+ }
10818
+ if (phase === "phase_3_parallel_org") {
10819
+ return [
10820
+ "\u{1F9ED} ORCHESTRATION",
10821
+ " Phase 3 \u2014 Parallel execution org",
10822
+ " Focus: executives can delegate to specialists in parallel with review gates",
10823
+ " You can switch phases anytime: exe-os org phase"
10824
+ ];
10825
+ }
10826
+ return [
10827
+ "\u{1F9ED} ORCHESTRATION",
10828
+ " Phase 1 \u2014 COO / Chief of Staff mode",
10829
+ " Focus: building company context before delegation",
10830
+ phase1Signal ? " Signal: repeated domain work detected. Consider: exe-os org unlock executives" : " Ready later? exe-os org unlock executives"
10831
+ ];
10832
+ }
10751
10833
  function buildActionRequired(data) {
10752
10834
  const lines = [];
10753
10835
  let hasIssues = false;
@@ -11059,6 +11141,12 @@ async function boot(options) {
11059
11141
  plan: licensePlan,
11060
11142
  employeeLimit
11061
11143
  };
11144
+ try {
11145
+ const config = await loadConfig();
11146
+ briefData.orchestrationPhase = config.orchestration?.phase;
11147
+ } catch {
11148
+ briefData.orchestrationPhase = "phase_1_coo";
11149
+ }
11062
11150
  if (!briefOnly) {
11063
11151
  await migrateJsonNotifications();
11064
11152
  await markDoneTaskNotificationsAsRead();
@@ -121,6 +121,10 @@ var init_config = __esm({
121
121
  checkOnBoot: true,
122
122
  autoInstall: false,
123
123
  checkIntervalMs: 24 * 60 * 60 * 1e3
124
+ },
125
+ orchestration: {
126
+ phase: "phase_1_coo",
127
+ phaseSetBy: "default"
124
128
  }
125
129
  };
126
130
  }
@@ -263,6 +267,12 @@ var init_platform_procedures = __esm({
263
267
  priority: "p0",
264
268
  content: "Founder -> coordinator (the executive agent, internally routed as 'COO') -> CTO/CMO. CTO -> engineers. CMO -> content production. Never skip levels: the coordinator 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."
265
269
  },
270
+ {
271
+ title: "Customer orchestration maturity \u2014 recommend, never trap",
272
+ domain: "workflow",
273
+ priority: "p1",
274
+ content: "New customers start best in Phase 1: founder \u2194 coordinator/Chief of Staff, building company context. Suggest Phase 2 executives when domain work repeats; suggest Phase 3 parallel execution only when review/permission gates are ready. This is guidance, not a blocker: users may jump phases anytime. Never overwrite their phase, role titles, identities, or custom org design."
275
+ },
266
276
  {
267
277
  title: "Single dispatch path \u2014 create_task only",
268
278
  domain: "workflow",
@@ -321,6 +331,12 @@ var init_platform_procedures = __esm({
321
331
  priority: "p0",
322
332
  content: "exe-build-adv is MANDATORY for ALL work touching 3+ files. Run /exe-build-adv --auto BEFORE implementation. Pipeline: Spec \u2192 AC \u2192 Tests \u2192 Evaluate \u2192 Fix. No multi-file feature ships without pipeline artifacts. No exceptions \u2014 managers reject work without them."
323
333
  },
334
+ {
335
+ title: "Commit discipline \u2014 never leave verified work floating",
336
+ domain: "workflow",
337
+ priority: "p1",
338
+ content: "After any code-change batch passes typecheck/tests/build, run git status, summarize changed files, and commit with a clear message before ending the session. If work must remain uncommitted for review/dogfood, explicitly say so, list the files, and state the blocker. Never imply work is complete while verified changes are still floating locally."
339
+ },
324
340
  {
325
341
  title: "Desktop and TUI are the same product",
326
342
  domain: "architecture",