@askexenow/exe-os 0.8.53 → 0.8.55
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 +113 -10
- package/dist/bin/backfill-responses.js +113 -10
- package/dist/bin/backfill-vectors.js +147 -13
- package/dist/bin/cleanup-stale-review-tasks.js +113 -10
- package/dist/bin/cli.js +337 -211
- package/dist/bin/exe-agent.js +99 -4
- package/dist/bin/exe-assign.js +113 -10
- package/dist/bin/exe-boot.js +276 -85
- package/dist/bin/exe-call.js +107 -5
- package/dist/bin/exe-doctor.js +183 -13
- package/dist/bin/exe-export-behaviors.js +113 -10
- package/dist/bin/exe-forget.js +113 -10
- package/dist/bin/exe-gateway.js +131 -12
- package/dist/bin/exe-heartbeat.js +121 -11
- package/dist/bin/exe-kill.js +113 -10
- package/dist/bin/exe-launch-agent.js +113 -10
- package/dist/bin/exe-link.js +10 -2
- package/dist/bin/exe-new-employee.js +95 -0
- package/dist/bin/exe-pending-messages.js +113 -10
- package/dist/bin/exe-pending-notifications.js +113 -10
- package/dist/bin/exe-pending-reviews.js +122 -11
- package/dist/bin/exe-rename.js +95 -0
- package/dist/bin/exe-review.js +113 -10
- package/dist/bin/exe-search.js +113 -10
- package/dist/bin/exe-session-cleanup.js +131 -12
- package/dist/bin/exe-status.js +113 -10
- package/dist/bin/exe-team.js +113 -10
- package/dist/bin/git-sweep.js +131 -12
- package/dist/bin/graph-backfill.js +113 -10
- package/dist/bin/graph-export.js +113 -10
- package/dist/bin/scan-tasks.js +131 -12
- package/dist/bin/setup.js +107 -5
- package/dist/bin/shard-migrate.js +113 -10
- package/dist/bin/wiki-sync.js +113 -10
- package/dist/gateway/index.js +131 -12
- package/dist/hooks/bug-report-worker.js +131 -12
- package/dist/hooks/commit-complete.js +131 -12
- package/dist/hooks/error-recall.js +113 -10
- package/dist/hooks/ingest-worker.js +131 -12
- package/dist/hooks/instructions-loaded.js +113 -10
- package/dist/hooks/notification.js +113 -10
- package/dist/hooks/post-compact.js +113 -10
- package/dist/hooks/pre-compact.js +131 -12
- package/dist/hooks/pre-tool-use.js +113 -10
- package/dist/hooks/prompt-ingest-worker.js +113 -10
- package/dist/hooks/prompt-submit.js +140 -14
- package/dist/hooks/response-ingest-worker.js +113 -10
- package/dist/hooks/session-end.js +113 -10
- package/dist/hooks/session-start.js +113 -10
- package/dist/hooks/stop.js +113 -10
- package/dist/hooks/subagent-stop.js +113 -10
- package/dist/hooks/summary-worker.js +231 -114
- package/dist/index.js +131 -12
- package/dist/lib/cloud-sync.js +10 -2
- package/dist/lib/employee-templates.js +99 -4
- package/dist/lib/exe-daemon.js +4859 -4706
- package/dist/lib/hybrid-search.js +113 -10
- package/dist/lib/schedules.js +113 -10
- package/dist/lib/store.js +113 -10
- package/dist/lib/tasks.js +18 -2
- package/dist/lib/tmux-routing.js +18 -2
- package/dist/mcp/server.js +214 -28
- package/dist/mcp/tools/create-task.js +18 -2
- package/dist/mcp/tools/list-tasks.js +18 -2
- package/dist/runtime/index.js +131 -12
- package/dist/tui/App.js +337 -211
- package/package.json +2 -2
package/dist/bin/graph-export.js
CHANGED
|
@@ -1354,6 +1354,103 @@ var init_shard_manager = __esm({
|
|
|
1354
1354
|
}
|
|
1355
1355
|
});
|
|
1356
1356
|
|
|
1357
|
+
// src/lib/platform-procedures.ts
|
|
1358
|
+
var PLATFORM_PROCEDURES, PLATFORM_PROCEDURE_TITLES;
|
|
1359
|
+
var init_platform_procedures = __esm({
|
|
1360
|
+
"src/lib/platform-procedures.ts"() {
|
|
1361
|
+
"use strict";
|
|
1362
|
+
PLATFORM_PROCEDURES = [
|
|
1363
|
+
// --- Foundation: what is exe-os ---
|
|
1364
|
+
{
|
|
1365
|
+
title: "What is exe-os \u2014 the operating model every agent must understand",
|
|
1366
|
+
domain: "architecture",
|
|
1367
|
+
priority: "p0",
|
|
1368
|
+
content: "Exe OS is an AI employee operating system. A founder runs 5-10 AI agents as a real org: COO (exe), CTO (yoshi), CMO (mari), engineers (tom), content (sasha). 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."
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
title: "Mode 1 \u2014 how exe-os runs inside Claude Code",
|
|
1372
|
+
domain: "architecture",
|
|
1373
|
+
priority: "p0",
|
|
1374
|
+
content: "Mode 1: exe-os runs AS hooks + MCP + skills inside Claude Code. The founder opens CC, runs /exe to boot the COO. exe manages employees in tmux sessions. Each exeN is a separate CC window/project. Employees (yoshi, tom, mari) run in their own tmux panes via create_task auto-spawn. The founder talks to exe; exe orchestrates the team. CC is the shell, exe-os is the brain."
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
title: "Sessions explained \u2014 what exeN means and how projects work",
|
|
1378
|
+
domain: "architecture",
|
|
1379
|
+
priority: "p0",
|
|
1380
|
+
content: "Each exeN (exe1, exe2, exe3) is an isolated project session. exe1 might be exe-os development, exe2 might be exe-wiki. Each session spawns its own employees: exe1\u2192yoshi-exe1\u2192tom-exe1. 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."
|
|
1381
|
+
},
|
|
1382
|
+
// --- Hierarchy and dispatch ---
|
|
1383
|
+
{
|
|
1384
|
+
title: "Chain of command \u2014 who talks to whom",
|
|
1385
|
+
domain: "workflow",
|
|
1386
|
+
priority: "p0",
|
|
1387
|
+
content: "Founder \u2192 exe (COO) \u2192 yoshi (CTO) / mari (CMO). Yoshi \u2192 tom (engineer). Mari \u2192 sasha (content). Never skip levels: exe never assigns directly to tom. Tom never reports directly to exe. 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."
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
title: "Single dispatch path \u2014 create_task only",
|
|
1391
|
+
domain: "workflow",
|
|
1392
|
+
priority: "p0",
|
|
1393
|
+
content: "create_task is the ONLY way to dispatch work to another agent. No direct ensureEmployee calls, no manual tmux spawns, no send_message for actionable work. create_task \u2192 system auto-spawns \u2192 session correctly named. ONE PATH. No backdoors. No exceptions."
|
|
1394
|
+
},
|
|
1395
|
+
// --- Session isolation ---
|
|
1396
|
+
{
|
|
1397
|
+
title: "Session scoping \u2014 stay in your exe boundary",
|
|
1398
|
+
domain: "security",
|
|
1399
|
+
priority: "p0",
|
|
1400
|
+
content: "Session scoping is mandatory. Managers dispatch to workers within their own exe session ONLY. exe1\u2192yoshi-exe1\u2192tom-exe1. exe2\u2192yoshi-exe2\u2192tom2-exe2. Cross-session dispatch is blocked by the system. Verify session names before dispatch. Tasks are scoped to the creating exe session."
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
title: "Session isolation \u2014 never touch another session's work",
|
|
1404
|
+
domain: "workflow",
|
|
1405
|
+
priority: "p0",
|
|
1406
|
+
content: `Sessions are isolated. exeN owns ONLY tasks it dispatched. (1) Never close/update/cancel tasks from another exe session. (2) Never review work from a different session \u2014 report "belongs to exeN" and skip. (3) Ignore other sessions' items in list_tasks results. (4) Employees inherit session: yoshi-exe1 works ONLY on exe1 tasks. Cross-session work is a system violation.`
|
|
1407
|
+
},
|
|
1408
|
+
// --- Engineering: session scoping in code ---
|
|
1409
|
+
{
|
|
1410
|
+
title: "Three-dimensional scoping \u2014 session, project, role \u2014 enforced in every query",
|
|
1411
|
+
domain: "architecture",
|
|
1412
|
+
priority: "p0",
|
|
1413
|
+
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 exeN. (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+ exe sessions simultaneously."
|
|
1414
|
+
},
|
|
1415
|
+
// --- Hard constraints ---
|
|
1416
|
+
{
|
|
1417
|
+
title: "What you CANNOT do in exe-os \u2014 hard constraints",
|
|
1418
|
+
domain: "security",
|
|
1419
|
+
priority: "p0",
|
|
1420
|
+
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 exe reviews and pushes. (6) Skip update_task(done) \u2014 it's the ONLY way your work gets reviewed. (7) Run git init."
|
|
1421
|
+
},
|
|
1422
|
+
// --- Operations ---
|
|
1423
|
+
{
|
|
1424
|
+
title: "Managers must supervise deployed workers",
|
|
1425
|
+
domain: "workflow",
|
|
1426
|
+
priority: "p0",
|
|
1427
|
+
content: `Every manager (COO/CTO/CMO) who dispatches work to a worker MUST actively monitor them. Check tmux capture-pane every 10 minutes. Verify they're working, not stuck. If idle at prompt with in_progress task \u2192 send intercom. If stuck \u2192 unblock or escalate. "Standing by" without checking is negligence.`
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
title: "COO boot health check \u2014 memory, cloud sync, daemon on every launch",
|
|
1431
|
+
domain: "workflow",
|
|
1432
|
+
priority: "p0",
|
|
1433
|
+
content: "On every /exe boot, COO MUST check system health BEFORE other work: (1) daemon \u2014 is exed PID alive, (2) cloud sync \u2014 grep workers.log for recent cloud-sync errors, (3) memory count \u2014 total in DB, (4) sync delta \u2014 local vs cloud storage_bytes. Report as 4-line status table. If ANY check fails, surface to founder immediately. Do not proceed to tasks until health confirmed."
|
|
1434
|
+
},
|
|
1435
|
+
{
|
|
1436
|
+
title: "exe-build-adv mandatory for 3+ files",
|
|
1437
|
+
domain: "workflow",
|
|
1438
|
+
priority: "p0",
|
|
1439
|
+
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."
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
title: "Desktop and TUI are the same product",
|
|
1443
|
+
domain: "architecture",
|
|
1444
|
+
priority: "p0",
|
|
1445
|
+
content: "Desktop and TUI are the SAME product in different renderers. Same data contracts, same interactions, same acceptance criteria. Desktop tab specs in ARCHITECTURE.md ARE the TUI specs. When building TUI, cross-reference Desktop spec. Different tab names, identical behavior. Never treat them as separate products."
|
|
1446
|
+
}
|
|
1447
|
+
];
|
|
1448
|
+
PLATFORM_PROCEDURE_TITLES = new Set(
|
|
1449
|
+
PLATFORM_PROCEDURES.map((p) => p.title)
|
|
1450
|
+
);
|
|
1451
|
+
}
|
|
1452
|
+
});
|
|
1453
|
+
|
|
1357
1454
|
// src/lib/global-procedures.ts
|
|
1358
1455
|
var global_procedures_exports = {};
|
|
1359
1456
|
__export(global_procedures_exports, {
|
|
@@ -1369,22 +1466,25 @@ async function loadGlobalProcedures() {
|
|
|
1369
1466
|
sql: "SELECT * FROM global_procedures WHERE active = 1 ORDER BY priority ASC, created_at ASC",
|
|
1370
1467
|
args: []
|
|
1371
1468
|
});
|
|
1372
|
-
const
|
|
1373
|
-
|
|
1374
|
-
|
|
1469
|
+
const allRows = result.rows;
|
|
1470
|
+
const customerOnly = allRows.filter((p) => !PLATFORM_PROCEDURE_TITLES.has(p.title));
|
|
1471
|
+
if (customerOnly.length > 0) {
|
|
1472
|
+
_customerCache = customerOnly.map((p) => `### ${p.title}
|
|
1375
1473
|
${p.content}`).join("\n\n");
|
|
1376
1474
|
} else {
|
|
1377
|
-
|
|
1475
|
+
_customerCache = "";
|
|
1378
1476
|
}
|
|
1379
1477
|
_cacheLoaded = true;
|
|
1380
|
-
return
|
|
1478
|
+
return customerOnly;
|
|
1381
1479
|
}
|
|
1382
1480
|
function getGlobalProceduresBlock() {
|
|
1383
|
-
|
|
1384
|
-
if (
|
|
1481
|
+
const sections = [];
|
|
1482
|
+
if (_platformCache) sections.push(_platformCache);
|
|
1483
|
+
if (_cacheLoaded && _customerCache) sections.push(_customerCache);
|
|
1484
|
+
if (sections.length === 0) return "";
|
|
1385
1485
|
return `## Organization-Wide Procedures (MANDATORY \u2014 supersedes all other rules)
|
|
1386
1486
|
|
|
1387
|
-
${
|
|
1487
|
+
${sections.join("\n\n")}
|
|
1388
1488
|
`;
|
|
1389
1489
|
}
|
|
1390
1490
|
async function storeGlobalProcedure(input) {
|
|
@@ -1409,13 +1509,16 @@ async function deactivateGlobalProcedure(id) {
|
|
|
1409
1509
|
await loadGlobalProcedures();
|
|
1410
1510
|
return result.rowsAffected > 0;
|
|
1411
1511
|
}
|
|
1412
|
-
var
|
|
1512
|
+
var _customerCache, _cacheLoaded, _platformCache;
|
|
1413
1513
|
var init_global_procedures = __esm({
|
|
1414
1514
|
"src/lib/global-procedures.ts"() {
|
|
1415
1515
|
"use strict";
|
|
1416
1516
|
init_database();
|
|
1417
|
-
|
|
1517
|
+
init_platform_procedures();
|
|
1518
|
+
_customerCache = "";
|
|
1418
1519
|
_cacheLoaded = false;
|
|
1520
|
+
_platformCache = PLATFORM_PROCEDURES.map((p) => `### ${p.title}
|
|
1521
|
+
${p.content}`).join("\n\n");
|
|
1419
1522
|
}
|
|
1420
1523
|
});
|
|
1421
1524
|
|
package/dist/bin/scan-tasks.js
CHANGED
|
@@ -1493,6 +1493,103 @@ var init_shard_manager = __esm({
|
|
|
1493
1493
|
}
|
|
1494
1494
|
});
|
|
1495
1495
|
|
|
1496
|
+
// src/lib/platform-procedures.ts
|
|
1497
|
+
var PLATFORM_PROCEDURES, PLATFORM_PROCEDURE_TITLES;
|
|
1498
|
+
var init_platform_procedures = __esm({
|
|
1499
|
+
"src/lib/platform-procedures.ts"() {
|
|
1500
|
+
"use strict";
|
|
1501
|
+
PLATFORM_PROCEDURES = [
|
|
1502
|
+
// --- Foundation: what is exe-os ---
|
|
1503
|
+
{
|
|
1504
|
+
title: "What is exe-os \u2014 the operating model every agent must understand",
|
|
1505
|
+
domain: "architecture",
|
|
1506
|
+
priority: "p0",
|
|
1507
|
+
content: "Exe OS is an AI employee operating system. A founder runs 5-10 AI agents as a real org: COO (exe), CTO (yoshi), CMO (mari), engineers (tom), content (sasha). 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."
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
title: "Mode 1 \u2014 how exe-os runs inside Claude Code",
|
|
1511
|
+
domain: "architecture",
|
|
1512
|
+
priority: "p0",
|
|
1513
|
+
content: "Mode 1: exe-os runs AS hooks + MCP + skills inside Claude Code. The founder opens CC, runs /exe to boot the COO. exe manages employees in tmux sessions. Each exeN is a separate CC window/project. Employees (yoshi, tom, mari) run in their own tmux panes via create_task auto-spawn. The founder talks to exe; exe orchestrates the team. CC is the shell, exe-os is the brain."
|
|
1514
|
+
},
|
|
1515
|
+
{
|
|
1516
|
+
title: "Sessions explained \u2014 what exeN means and how projects work",
|
|
1517
|
+
domain: "architecture",
|
|
1518
|
+
priority: "p0",
|
|
1519
|
+
content: "Each exeN (exe1, exe2, exe3) is an isolated project session. exe1 might be exe-os development, exe2 might be exe-wiki. Each session spawns its own employees: exe1\u2192yoshi-exe1\u2192tom-exe1. 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."
|
|
1520
|
+
},
|
|
1521
|
+
// --- Hierarchy and dispatch ---
|
|
1522
|
+
{
|
|
1523
|
+
title: "Chain of command \u2014 who talks to whom",
|
|
1524
|
+
domain: "workflow",
|
|
1525
|
+
priority: "p0",
|
|
1526
|
+
content: "Founder \u2192 exe (COO) \u2192 yoshi (CTO) / mari (CMO). Yoshi \u2192 tom (engineer). Mari \u2192 sasha (content). Never skip levels: exe never assigns directly to tom. Tom never reports directly to exe. 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."
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
title: "Single dispatch path \u2014 create_task only",
|
|
1530
|
+
domain: "workflow",
|
|
1531
|
+
priority: "p0",
|
|
1532
|
+
content: "create_task is the ONLY way to dispatch work to another agent. No direct ensureEmployee calls, no manual tmux spawns, no send_message for actionable work. create_task \u2192 system auto-spawns \u2192 session correctly named. ONE PATH. No backdoors. No exceptions."
|
|
1533
|
+
},
|
|
1534
|
+
// --- Session isolation ---
|
|
1535
|
+
{
|
|
1536
|
+
title: "Session scoping \u2014 stay in your exe boundary",
|
|
1537
|
+
domain: "security",
|
|
1538
|
+
priority: "p0",
|
|
1539
|
+
content: "Session scoping is mandatory. Managers dispatch to workers within their own exe session ONLY. exe1\u2192yoshi-exe1\u2192tom-exe1. exe2\u2192yoshi-exe2\u2192tom2-exe2. Cross-session dispatch is blocked by the system. Verify session names before dispatch. Tasks are scoped to the creating exe session."
|
|
1540
|
+
},
|
|
1541
|
+
{
|
|
1542
|
+
title: "Session isolation \u2014 never touch another session's work",
|
|
1543
|
+
domain: "workflow",
|
|
1544
|
+
priority: "p0",
|
|
1545
|
+
content: `Sessions are isolated. exeN owns ONLY tasks it dispatched. (1) Never close/update/cancel tasks from another exe session. (2) Never review work from a different session \u2014 report "belongs to exeN" and skip. (3) Ignore other sessions' items in list_tasks results. (4) Employees inherit session: yoshi-exe1 works ONLY on exe1 tasks. Cross-session work is a system violation.`
|
|
1546
|
+
},
|
|
1547
|
+
// --- Engineering: session scoping in code ---
|
|
1548
|
+
{
|
|
1549
|
+
title: "Three-dimensional scoping \u2014 session, project, role \u2014 enforced in every query",
|
|
1550
|
+
domain: "architecture",
|
|
1551
|
+
priority: "p0",
|
|
1552
|
+
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 exeN. (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+ exe sessions simultaneously."
|
|
1553
|
+
},
|
|
1554
|
+
// --- Hard constraints ---
|
|
1555
|
+
{
|
|
1556
|
+
title: "What you CANNOT do in exe-os \u2014 hard constraints",
|
|
1557
|
+
domain: "security",
|
|
1558
|
+
priority: "p0",
|
|
1559
|
+
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 exe reviews and pushes. (6) Skip update_task(done) \u2014 it's the ONLY way your work gets reviewed. (7) Run git init."
|
|
1560
|
+
},
|
|
1561
|
+
// --- Operations ---
|
|
1562
|
+
{
|
|
1563
|
+
title: "Managers must supervise deployed workers",
|
|
1564
|
+
domain: "workflow",
|
|
1565
|
+
priority: "p0",
|
|
1566
|
+
content: `Every manager (COO/CTO/CMO) who dispatches work to a worker MUST actively monitor them. Check tmux capture-pane every 10 minutes. Verify they're working, not stuck. If idle at prompt with in_progress task \u2192 send intercom. If stuck \u2192 unblock or escalate. "Standing by" without checking is negligence.`
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
title: "COO boot health check \u2014 memory, cloud sync, daemon on every launch",
|
|
1570
|
+
domain: "workflow",
|
|
1571
|
+
priority: "p0",
|
|
1572
|
+
content: "On every /exe boot, COO MUST check system health BEFORE other work: (1) daemon \u2014 is exed PID alive, (2) cloud sync \u2014 grep workers.log for recent cloud-sync errors, (3) memory count \u2014 total in DB, (4) sync delta \u2014 local vs cloud storage_bytes. Report as 4-line status table. If ANY check fails, surface to founder immediately. Do not proceed to tasks until health confirmed."
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
title: "exe-build-adv mandatory for 3+ files",
|
|
1576
|
+
domain: "workflow",
|
|
1577
|
+
priority: "p0",
|
|
1578
|
+
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."
|
|
1579
|
+
},
|
|
1580
|
+
{
|
|
1581
|
+
title: "Desktop and TUI are the same product",
|
|
1582
|
+
domain: "architecture",
|
|
1583
|
+
priority: "p0",
|
|
1584
|
+
content: "Desktop and TUI are the SAME product in different renderers. Same data contracts, same interactions, same acceptance criteria. Desktop tab specs in ARCHITECTURE.md ARE the TUI specs. When building TUI, cross-reference Desktop spec. Different tab names, identical behavior. Never treat them as separate products."
|
|
1585
|
+
}
|
|
1586
|
+
];
|
|
1587
|
+
PLATFORM_PROCEDURE_TITLES = new Set(
|
|
1588
|
+
PLATFORM_PROCEDURES.map((p) => p.title)
|
|
1589
|
+
);
|
|
1590
|
+
}
|
|
1591
|
+
});
|
|
1592
|
+
|
|
1496
1593
|
// src/lib/global-procedures.ts
|
|
1497
1594
|
var global_procedures_exports = {};
|
|
1498
1595
|
__export(global_procedures_exports, {
|
|
@@ -1508,22 +1605,25 @@ async function loadGlobalProcedures() {
|
|
|
1508
1605
|
sql: "SELECT * FROM global_procedures WHERE active = 1 ORDER BY priority ASC, created_at ASC",
|
|
1509
1606
|
args: []
|
|
1510
1607
|
});
|
|
1511
|
-
const
|
|
1512
|
-
|
|
1513
|
-
|
|
1608
|
+
const allRows = result.rows;
|
|
1609
|
+
const customerOnly = allRows.filter((p) => !PLATFORM_PROCEDURE_TITLES.has(p.title));
|
|
1610
|
+
if (customerOnly.length > 0) {
|
|
1611
|
+
_customerCache = customerOnly.map((p) => `### ${p.title}
|
|
1514
1612
|
${p.content}`).join("\n\n");
|
|
1515
1613
|
} else {
|
|
1516
|
-
|
|
1614
|
+
_customerCache = "";
|
|
1517
1615
|
}
|
|
1518
1616
|
_cacheLoaded = true;
|
|
1519
|
-
return
|
|
1617
|
+
return customerOnly;
|
|
1520
1618
|
}
|
|
1521
1619
|
function getGlobalProceduresBlock() {
|
|
1522
|
-
|
|
1523
|
-
if (
|
|
1620
|
+
const sections = [];
|
|
1621
|
+
if (_platformCache) sections.push(_platformCache);
|
|
1622
|
+
if (_cacheLoaded && _customerCache) sections.push(_customerCache);
|
|
1623
|
+
if (sections.length === 0) return "";
|
|
1524
1624
|
return `## Organization-Wide Procedures (MANDATORY \u2014 supersedes all other rules)
|
|
1525
1625
|
|
|
1526
|
-
${
|
|
1626
|
+
${sections.join("\n\n")}
|
|
1527
1627
|
`;
|
|
1528
1628
|
}
|
|
1529
1629
|
async function storeGlobalProcedure(input) {
|
|
@@ -1548,13 +1648,16 @@ async function deactivateGlobalProcedure(id) {
|
|
|
1548
1648
|
await loadGlobalProcedures();
|
|
1549
1649
|
return result.rowsAffected > 0;
|
|
1550
1650
|
}
|
|
1551
|
-
var
|
|
1651
|
+
var _customerCache, _cacheLoaded, _platformCache;
|
|
1552
1652
|
var init_global_procedures = __esm({
|
|
1553
1653
|
"src/lib/global-procedures.ts"() {
|
|
1554
1654
|
"use strict";
|
|
1555
1655
|
init_database();
|
|
1556
|
-
|
|
1656
|
+
init_platform_procedures();
|
|
1657
|
+
_customerCache = "";
|
|
1557
1658
|
_cacheLoaded = false;
|
|
1659
|
+
_platformCache = PLATFORM_PROCEDURES.map((p) => `### ${p.title}
|
|
1660
|
+
${p.content}`).join("\n\n");
|
|
1558
1661
|
}
|
|
1559
1662
|
});
|
|
1560
1663
|
|
|
@@ -3034,16 +3137,32 @@ var init_tasks_crud = __esm({
|
|
|
3034
3137
|
// src/lib/tasks-review.ts
|
|
3035
3138
|
import path12 from "path";
|
|
3036
3139
|
import { existsSync as existsSync11, readdirSync as readdirSync3, unlinkSync as unlinkSync2 } from "fs";
|
|
3037
|
-
async function countPendingReviews() {
|
|
3140
|
+
async function countPendingReviews(sessionScope) {
|
|
3038
3141
|
const client = getClient();
|
|
3142
|
+
if (sessionScope) {
|
|
3143
|
+
const result2 = await client.execute({
|
|
3144
|
+
sql: "SELECT COUNT(*) as cnt FROM tasks WHERE status = 'needs_review' AND (session_scope = ? OR session_scope IS NULL)",
|
|
3145
|
+
args: [sessionScope]
|
|
3146
|
+
});
|
|
3147
|
+
return Number(result2.rows[0]?.cnt) || 0;
|
|
3148
|
+
}
|
|
3039
3149
|
const result = await client.execute({
|
|
3040
3150
|
sql: "SELECT COUNT(*) as cnt FROM tasks WHERE status = 'needs_review'",
|
|
3041
3151
|
args: []
|
|
3042
3152
|
});
|
|
3043
3153
|
return Number(result.rows[0]?.cnt) || 0;
|
|
3044
3154
|
}
|
|
3045
|
-
async function countNewPendingReviewsSince(sinceIso) {
|
|
3155
|
+
async function countNewPendingReviewsSince(sinceIso, sessionScope) {
|
|
3046
3156
|
const client = getClient();
|
|
3157
|
+
if (sessionScope) {
|
|
3158
|
+
const result2 = await client.execute({
|
|
3159
|
+
sql: `SELECT COUNT(*) as cnt FROM tasks
|
|
3160
|
+
WHERE status = 'needs_review' AND updated_at > ?
|
|
3161
|
+
AND (session_scope = ? OR session_scope IS NULL)`,
|
|
3162
|
+
args: [sinceIso, sessionScope]
|
|
3163
|
+
});
|
|
3164
|
+
return Number(result2.rows[0]?.cnt) || 0;
|
|
3165
|
+
}
|
|
3047
3166
|
const result = await client.execute({
|
|
3048
3167
|
sql: `SELECT COUNT(*) as cnt FROM tasks
|
|
3049
3168
|
WHERE status = 'needs_review' AND updated_at > ?`,
|
package/dist/bin/setup.js
CHANGED
|
@@ -1197,23 +1197,125 @@ var init_database = __esm({
|
|
|
1197
1197
|
}
|
|
1198
1198
|
});
|
|
1199
1199
|
|
|
1200
|
+
// src/lib/platform-procedures.ts
|
|
1201
|
+
var PLATFORM_PROCEDURES, PLATFORM_PROCEDURE_TITLES;
|
|
1202
|
+
var init_platform_procedures = __esm({
|
|
1203
|
+
"src/lib/platform-procedures.ts"() {
|
|
1204
|
+
"use strict";
|
|
1205
|
+
PLATFORM_PROCEDURES = [
|
|
1206
|
+
// --- Foundation: what is exe-os ---
|
|
1207
|
+
{
|
|
1208
|
+
title: "What is exe-os \u2014 the operating model every agent must understand",
|
|
1209
|
+
domain: "architecture",
|
|
1210
|
+
priority: "p0",
|
|
1211
|
+
content: "Exe OS is an AI employee operating system. A founder runs 5-10 AI agents as a real org: COO (exe), CTO (yoshi), CMO (mari), engineers (tom), content (sasha). 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."
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
title: "Mode 1 \u2014 how exe-os runs inside Claude Code",
|
|
1215
|
+
domain: "architecture",
|
|
1216
|
+
priority: "p0",
|
|
1217
|
+
content: "Mode 1: exe-os runs AS hooks + MCP + skills inside Claude Code. The founder opens CC, runs /exe to boot the COO. exe manages employees in tmux sessions. Each exeN is a separate CC window/project. Employees (yoshi, tom, mari) run in their own tmux panes via create_task auto-spawn. The founder talks to exe; exe orchestrates the team. CC is the shell, exe-os is the brain."
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
title: "Sessions explained \u2014 what exeN means and how projects work",
|
|
1221
|
+
domain: "architecture",
|
|
1222
|
+
priority: "p0",
|
|
1223
|
+
content: "Each exeN (exe1, exe2, exe3) is an isolated project session. exe1 might be exe-os development, exe2 might be exe-wiki. Each session spawns its own employees: exe1\u2192yoshi-exe1\u2192tom-exe1. 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."
|
|
1224
|
+
},
|
|
1225
|
+
// --- Hierarchy and dispatch ---
|
|
1226
|
+
{
|
|
1227
|
+
title: "Chain of command \u2014 who talks to whom",
|
|
1228
|
+
domain: "workflow",
|
|
1229
|
+
priority: "p0",
|
|
1230
|
+
content: "Founder \u2192 exe (COO) \u2192 yoshi (CTO) / mari (CMO). Yoshi \u2192 tom (engineer). Mari \u2192 sasha (content). Never skip levels: exe never assigns directly to tom. Tom never reports directly to exe. 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."
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
title: "Single dispatch path \u2014 create_task only",
|
|
1234
|
+
domain: "workflow",
|
|
1235
|
+
priority: "p0",
|
|
1236
|
+
content: "create_task is the ONLY way to dispatch work to another agent. No direct ensureEmployee calls, no manual tmux spawns, no send_message for actionable work. create_task \u2192 system auto-spawns \u2192 session correctly named. ONE PATH. No backdoors. No exceptions."
|
|
1237
|
+
},
|
|
1238
|
+
// --- Session isolation ---
|
|
1239
|
+
{
|
|
1240
|
+
title: "Session scoping \u2014 stay in your exe boundary",
|
|
1241
|
+
domain: "security",
|
|
1242
|
+
priority: "p0",
|
|
1243
|
+
content: "Session scoping is mandatory. Managers dispatch to workers within their own exe session ONLY. exe1\u2192yoshi-exe1\u2192tom-exe1. exe2\u2192yoshi-exe2\u2192tom2-exe2. Cross-session dispatch is blocked by the system. Verify session names before dispatch. Tasks are scoped to the creating exe session."
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
title: "Session isolation \u2014 never touch another session's work",
|
|
1247
|
+
domain: "workflow",
|
|
1248
|
+
priority: "p0",
|
|
1249
|
+
content: `Sessions are isolated. exeN owns ONLY tasks it dispatched. (1) Never close/update/cancel tasks from another exe session. (2) Never review work from a different session \u2014 report "belongs to exeN" and skip. (3) Ignore other sessions' items in list_tasks results. (4) Employees inherit session: yoshi-exe1 works ONLY on exe1 tasks. Cross-session work is a system violation.`
|
|
1250
|
+
},
|
|
1251
|
+
// --- Engineering: session scoping in code ---
|
|
1252
|
+
{
|
|
1253
|
+
title: "Three-dimensional scoping \u2014 session, project, role \u2014 enforced in every query",
|
|
1254
|
+
domain: "architecture",
|
|
1255
|
+
priority: "p0",
|
|
1256
|
+
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 exeN. (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+ exe sessions simultaneously."
|
|
1257
|
+
},
|
|
1258
|
+
// --- Hard constraints ---
|
|
1259
|
+
{
|
|
1260
|
+
title: "What you CANNOT do in exe-os \u2014 hard constraints",
|
|
1261
|
+
domain: "security",
|
|
1262
|
+
priority: "p0",
|
|
1263
|
+
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 exe reviews and pushes. (6) Skip update_task(done) \u2014 it's the ONLY way your work gets reviewed. (7) Run git init."
|
|
1264
|
+
},
|
|
1265
|
+
// --- Operations ---
|
|
1266
|
+
{
|
|
1267
|
+
title: "Managers must supervise deployed workers",
|
|
1268
|
+
domain: "workflow",
|
|
1269
|
+
priority: "p0",
|
|
1270
|
+
content: `Every manager (COO/CTO/CMO) who dispatches work to a worker MUST actively monitor them. Check tmux capture-pane every 10 minutes. Verify they're working, not stuck. If idle at prompt with in_progress task \u2192 send intercom. If stuck \u2192 unblock or escalate. "Standing by" without checking is negligence.`
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
title: "COO boot health check \u2014 memory, cloud sync, daemon on every launch",
|
|
1274
|
+
domain: "workflow",
|
|
1275
|
+
priority: "p0",
|
|
1276
|
+
content: "On every /exe boot, COO MUST check system health BEFORE other work: (1) daemon \u2014 is exed PID alive, (2) cloud sync \u2014 grep workers.log for recent cloud-sync errors, (3) memory count \u2014 total in DB, (4) sync delta \u2014 local vs cloud storage_bytes. Report as 4-line status table. If ANY check fails, surface to founder immediately. Do not proceed to tasks until health confirmed."
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
title: "exe-build-adv mandatory for 3+ files",
|
|
1280
|
+
domain: "workflow",
|
|
1281
|
+
priority: "p0",
|
|
1282
|
+
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."
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
title: "Desktop and TUI are the same product",
|
|
1286
|
+
domain: "architecture",
|
|
1287
|
+
priority: "p0",
|
|
1288
|
+
content: "Desktop and TUI are the SAME product in different renderers. Same data contracts, same interactions, same acceptance criteria. Desktop tab specs in ARCHITECTURE.md ARE the TUI specs. When building TUI, cross-reference Desktop spec. Different tab names, identical behavior. Never treat them as separate products."
|
|
1289
|
+
}
|
|
1290
|
+
];
|
|
1291
|
+
PLATFORM_PROCEDURE_TITLES = new Set(
|
|
1292
|
+
PLATFORM_PROCEDURES.map((p) => p.title)
|
|
1293
|
+
);
|
|
1294
|
+
}
|
|
1295
|
+
});
|
|
1296
|
+
|
|
1200
1297
|
// src/lib/global-procedures.ts
|
|
1201
1298
|
import { randomUUID as randomUUID3 } from "crypto";
|
|
1202
1299
|
function getGlobalProceduresBlock() {
|
|
1203
|
-
|
|
1204
|
-
if (
|
|
1300
|
+
const sections = [];
|
|
1301
|
+
if (_platformCache) sections.push(_platformCache);
|
|
1302
|
+
if (_cacheLoaded && _customerCache) sections.push(_customerCache);
|
|
1303
|
+
if (sections.length === 0) return "";
|
|
1205
1304
|
return `## Organization-Wide Procedures (MANDATORY \u2014 supersedes all other rules)
|
|
1206
1305
|
|
|
1207
|
-
${
|
|
1306
|
+
${sections.join("\n\n")}
|
|
1208
1307
|
`;
|
|
1209
1308
|
}
|
|
1210
|
-
var
|
|
1309
|
+
var _customerCache, _cacheLoaded, _platformCache;
|
|
1211
1310
|
var init_global_procedures = __esm({
|
|
1212
1311
|
"src/lib/global-procedures.ts"() {
|
|
1213
1312
|
"use strict";
|
|
1214
1313
|
init_database();
|
|
1215
|
-
|
|
1314
|
+
init_platform_procedures();
|
|
1315
|
+
_customerCache = "";
|
|
1216
1316
|
_cacheLoaded = false;
|
|
1317
|
+
_platformCache = PLATFORM_PROCEDURES.map((p) => `### ${p.title}
|
|
1318
|
+
${p.content}`).join("\n\n");
|
|
1217
1319
|
}
|
|
1218
1320
|
});
|
|
1219
1321
|
|
|
@@ -1354,6 +1354,103 @@ var init_shard_manager = __esm({
|
|
|
1354
1354
|
}
|
|
1355
1355
|
});
|
|
1356
1356
|
|
|
1357
|
+
// src/lib/platform-procedures.ts
|
|
1358
|
+
var PLATFORM_PROCEDURES, PLATFORM_PROCEDURE_TITLES;
|
|
1359
|
+
var init_platform_procedures = __esm({
|
|
1360
|
+
"src/lib/platform-procedures.ts"() {
|
|
1361
|
+
"use strict";
|
|
1362
|
+
PLATFORM_PROCEDURES = [
|
|
1363
|
+
// --- Foundation: what is exe-os ---
|
|
1364
|
+
{
|
|
1365
|
+
title: "What is exe-os \u2014 the operating model every agent must understand",
|
|
1366
|
+
domain: "architecture",
|
|
1367
|
+
priority: "p0",
|
|
1368
|
+
content: "Exe OS is an AI employee operating system. A founder runs 5-10 AI agents as a real org: COO (exe), CTO (yoshi), CMO (mari), engineers (tom), content (sasha). 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."
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
title: "Mode 1 \u2014 how exe-os runs inside Claude Code",
|
|
1372
|
+
domain: "architecture",
|
|
1373
|
+
priority: "p0",
|
|
1374
|
+
content: "Mode 1: exe-os runs AS hooks + MCP + skills inside Claude Code. The founder opens CC, runs /exe to boot the COO. exe manages employees in tmux sessions. Each exeN is a separate CC window/project. Employees (yoshi, tom, mari) run in their own tmux panes via create_task auto-spawn. The founder talks to exe; exe orchestrates the team. CC is the shell, exe-os is the brain."
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
title: "Sessions explained \u2014 what exeN means and how projects work",
|
|
1378
|
+
domain: "architecture",
|
|
1379
|
+
priority: "p0",
|
|
1380
|
+
content: "Each exeN (exe1, exe2, exe3) is an isolated project session. exe1 might be exe-os development, exe2 might be exe-wiki. Each session spawns its own employees: exe1\u2192yoshi-exe1\u2192tom-exe1. 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."
|
|
1381
|
+
},
|
|
1382
|
+
// --- Hierarchy and dispatch ---
|
|
1383
|
+
{
|
|
1384
|
+
title: "Chain of command \u2014 who talks to whom",
|
|
1385
|
+
domain: "workflow",
|
|
1386
|
+
priority: "p0",
|
|
1387
|
+
content: "Founder \u2192 exe (COO) \u2192 yoshi (CTO) / mari (CMO). Yoshi \u2192 tom (engineer). Mari \u2192 sasha (content). Never skip levels: exe never assigns directly to tom. Tom never reports directly to exe. 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."
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
title: "Single dispatch path \u2014 create_task only",
|
|
1391
|
+
domain: "workflow",
|
|
1392
|
+
priority: "p0",
|
|
1393
|
+
content: "create_task is the ONLY way to dispatch work to another agent. No direct ensureEmployee calls, no manual tmux spawns, no send_message for actionable work. create_task \u2192 system auto-spawns \u2192 session correctly named. ONE PATH. No backdoors. No exceptions."
|
|
1394
|
+
},
|
|
1395
|
+
// --- Session isolation ---
|
|
1396
|
+
{
|
|
1397
|
+
title: "Session scoping \u2014 stay in your exe boundary",
|
|
1398
|
+
domain: "security",
|
|
1399
|
+
priority: "p0",
|
|
1400
|
+
content: "Session scoping is mandatory. Managers dispatch to workers within their own exe session ONLY. exe1\u2192yoshi-exe1\u2192tom-exe1. exe2\u2192yoshi-exe2\u2192tom2-exe2. Cross-session dispatch is blocked by the system. Verify session names before dispatch. Tasks are scoped to the creating exe session."
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
title: "Session isolation \u2014 never touch another session's work",
|
|
1404
|
+
domain: "workflow",
|
|
1405
|
+
priority: "p0",
|
|
1406
|
+
content: `Sessions are isolated. exeN owns ONLY tasks it dispatched. (1) Never close/update/cancel tasks from another exe session. (2) Never review work from a different session \u2014 report "belongs to exeN" and skip. (3) Ignore other sessions' items in list_tasks results. (4) Employees inherit session: yoshi-exe1 works ONLY on exe1 tasks. Cross-session work is a system violation.`
|
|
1407
|
+
},
|
|
1408
|
+
// --- Engineering: session scoping in code ---
|
|
1409
|
+
{
|
|
1410
|
+
title: "Three-dimensional scoping \u2014 session, project, role \u2014 enforced in every query",
|
|
1411
|
+
domain: "architecture",
|
|
1412
|
+
priority: "p0",
|
|
1413
|
+
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 exeN. (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+ exe sessions simultaneously."
|
|
1414
|
+
},
|
|
1415
|
+
// --- Hard constraints ---
|
|
1416
|
+
{
|
|
1417
|
+
title: "What you CANNOT do in exe-os \u2014 hard constraints",
|
|
1418
|
+
domain: "security",
|
|
1419
|
+
priority: "p0",
|
|
1420
|
+
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 exe reviews and pushes. (6) Skip update_task(done) \u2014 it's the ONLY way your work gets reviewed. (7) Run git init."
|
|
1421
|
+
},
|
|
1422
|
+
// --- Operations ---
|
|
1423
|
+
{
|
|
1424
|
+
title: "Managers must supervise deployed workers",
|
|
1425
|
+
domain: "workflow",
|
|
1426
|
+
priority: "p0",
|
|
1427
|
+
content: `Every manager (COO/CTO/CMO) who dispatches work to a worker MUST actively monitor them. Check tmux capture-pane every 10 minutes. Verify they're working, not stuck. If idle at prompt with in_progress task \u2192 send intercom. If stuck \u2192 unblock or escalate. "Standing by" without checking is negligence.`
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
title: "COO boot health check \u2014 memory, cloud sync, daemon on every launch",
|
|
1431
|
+
domain: "workflow",
|
|
1432
|
+
priority: "p0",
|
|
1433
|
+
content: "On every /exe boot, COO MUST check system health BEFORE other work: (1) daemon \u2014 is exed PID alive, (2) cloud sync \u2014 grep workers.log for recent cloud-sync errors, (3) memory count \u2014 total in DB, (4) sync delta \u2014 local vs cloud storage_bytes. Report as 4-line status table. If ANY check fails, surface to founder immediately. Do not proceed to tasks until health confirmed."
|
|
1434
|
+
},
|
|
1435
|
+
{
|
|
1436
|
+
title: "exe-build-adv mandatory for 3+ files",
|
|
1437
|
+
domain: "workflow",
|
|
1438
|
+
priority: "p0",
|
|
1439
|
+
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."
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
title: "Desktop and TUI are the same product",
|
|
1443
|
+
domain: "architecture",
|
|
1444
|
+
priority: "p0",
|
|
1445
|
+
content: "Desktop and TUI are the SAME product in different renderers. Same data contracts, same interactions, same acceptance criteria. Desktop tab specs in ARCHITECTURE.md ARE the TUI specs. When building TUI, cross-reference Desktop spec. Different tab names, identical behavior. Never treat them as separate products."
|
|
1446
|
+
}
|
|
1447
|
+
];
|
|
1448
|
+
PLATFORM_PROCEDURE_TITLES = new Set(
|
|
1449
|
+
PLATFORM_PROCEDURES.map((p) => p.title)
|
|
1450
|
+
);
|
|
1451
|
+
}
|
|
1452
|
+
});
|
|
1453
|
+
|
|
1357
1454
|
// src/lib/global-procedures.ts
|
|
1358
1455
|
var global_procedures_exports = {};
|
|
1359
1456
|
__export(global_procedures_exports, {
|
|
@@ -1369,22 +1466,25 @@ async function loadGlobalProcedures() {
|
|
|
1369
1466
|
sql: "SELECT * FROM global_procedures WHERE active = 1 ORDER BY priority ASC, created_at ASC",
|
|
1370
1467
|
args: []
|
|
1371
1468
|
});
|
|
1372
|
-
const
|
|
1373
|
-
|
|
1374
|
-
|
|
1469
|
+
const allRows = result.rows;
|
|
1470
|
+
const customerOnly = allRows.filter((p) => !PLATFORM_PROCEDURE_TITLES.has(p.title));
|
|
1471
|
+
if (customerOnly.length > 0) {
|
|
1472
|
+
_customerCache = customerOnly.map((p) => `### ${p.title}
|
|
1375
1473
|
${p.content}`).join("\n\n");
|
|
1376
1474
|
} else {
|
|
1377
|
-
|
|
1475
|
+
_customerCache = "";
|
|
1378
1476
|
}
|
|
1379
1477
|
_cacheLoaded = true;
|
|
1380
|
-
return
|
|
1478
|
+
return customerOnly;
|
|
1381
1479
|
}
|
|
1382
1480
|
function getGlobalProceduresBlock() {
|
|
1383
|
-
|
|
1384
|
-
if (
|
|
1481
|
+
const sections = [];
|
|
1482
|
+
if (_platformCache) sections.push(_platformCache);
|
|
1483
|
+
if (_cacheLoaded && _customerCache) sections.push(_customerCache);
|
|
1484
|
+
if (sections.length === 0) return "";
|
|
1385
1485
|
return `## Organization-Wide Procedures (MANDATORY \u2014 supersedes all other rules)
|
|
1386
1486
|
|
|
1387
|
-
${
|
|
1487
|
+
${sections.join("\n\n")}
|
|
1388
1488
|
`;
|
|
1389
1489
|
}
|
|
1390
1490
|
async function storeGlobalProcedure(input) {
|
|
@@ -1409,13 +1509,16 @@ async function deactivateGlobalProcedure(id) {
|
|
|
1409
1509
|
await loadGlobalProcedures();
|
|
1410
1510
|
return result.rowsAffected > 0;
|
|
1411
1511
|
}
|
|
1412
|
-
var
|
|
1512
|
+
var _customerCache, _cacheLoaded, _platformCache;
|
|
1413
1513
|
var init_global_procedures = __esm({
|
|
1414
1514
|
"src/lib/global-procedures.ts"() {
|
|
1415
1515
|
"use strict";
|
|
1416
1516
|
init_database();
|
|
1417
|
-
|
|
1517
|
+
init_platform_procedures();
|
|
1518
|
+
_customerCache = "";
|
|
1418
1519
|
_cacheLoaded = false;
|
|
1520
|
+
_platformCache = PLATFORM_PROCEDURES.map((p) => `### ${p.title}
|
|
1521
|
+
${p.content}`).join("\n\n");
|
|
1419
1522
|
}
|
|
1420
1523
|
});
|
|
1421
1524
|
|