@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/index.js
CHANGED
|
@@ -2230,16 +2230,32 @@ var init_tasks_crud = __esm({
|
|
|
2230
2230
|
// src/lib/tasks-review.ts
|
|
2231
2231
|
import path10 from "path";
|
|
2232
2232
|
import { existsSync as existsSync9, readdirSync as readdirSync2, unlinkSync as unlinkSync2 } from "fs";
|
|
2233
|
-
async function countPendingReviews() {
|
|
2233
|
+
async function countPendingReviews(sessionScope) {
|
|
2234
2234
|
const client = getClient();
|
|
2235
|
+
if (sessionScope) {
|
|
2236
|
+
const result2 = await client.execute({
|
|
2237
|
+
sql: "SELECT COUNT(*) as cnt FROM tasks WHERE status = 'needs_review' AND (session_scope = ? OR session_scope IS NULL)",
|
|
2238
|
+
args: [sessionScope]
|
|
2239
|
+
});
|
|
2240
|
+
return Number(result2.rows[0]?.cnt) || 0;
|
|
2241
|
+
}
|
|
2235
2242
|
const result = await client.execute({
|
|
2236
2243
|
sql: "SELECT COUNT(*) as cnt FROM tasks WHERE status = 'needs_review'",
|
|
2237
2244
|
args: []
|
|
2238
2245
|
});
|
|
2239
2246
|
return Number(result.rows[0]?.cnt) || 0;
|
|
2240
2247
|
}
|
|
2241
|
-
async function countNewPendingReviewsSince(sinceIso) {
|
|
2248
|
+
async function countNewPendingReviewsSince(sinceIso, sessionScope) {
|
|
2242
2249
|
const client = getClient();
|
|
2250
|
+
if (sessionScope) {
|
|
2251
|
+
const result2 = await client.execute({
|
|
2252
|
+
sql: `SELECT COUNT(*) as cnt FROM tasks
|
|
2253
|
+
WHERE status = 'needs_review' AND updated_at > ?
|
|
2254
|
+
AND (session_scope = ? OR session_scope IS NULL)`,
|
|
2255
|
+
args: [sinceIso, sessionScope]
|
|
2256
|
+
});
|
|
2257
|
+
return Number(result2.rows[0]?.cnt) || 0;
|
|
2258
|
+
}
|
|
2243
2259
|
const result = await client.execute({
|
|
2244
2260
|
sql: `SELECT COUNT(*) as cnt FROM tasks
|
|
2245
2261
|
WHERE status = 'needs_review' AND updated_at > ?`,
|
|
@@ -4444,6 +4460,103 @@ var init_shard_manager = __esm({
|
|
|
4444
4460
|
}
|
|
4445
4461
|
});
|
|
4446
4462
|
|
|
4463
|
+
// src/lib/platform-procedures.ts
|
|
4464
|
+
var PLATFORM_PROCEDURES, PLATFORM_PROCEDURE_TITLES;
|
|
4465
|
+
var init_platform_procedures = __esm({
|
|
4466
|
+
"src/lib/platform-procedures.ts"() {
|
|
4467
|
+
"use strict";
|
|
4468
|
+
PLATFORM_PROCEDURES = [
|
|
4469
|
+
// --- Foundation: what is exe-os ---
|
|
4470
|
+
{
|
|
4471
|
+
title: "What is exe-os \u2014 the operating model every agent must understand",
|
|
4472
|
+
domain: "architecture",
|
|
4473
|
+
priority: "p0",
|
|
4474
|
+
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."
|
|
4475
|
+
},
|
|
4476
|
+
{
|
|
4477
|
+
title: "Mode 1 \u2014 how exe-os runs inside Claude Code",
|
|
4478
|
+
domain: "architecture",
|
|
4479
|
+
priority: "p0",
|
|
4480
|
+
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."
|
|
4481
|
+
},
|
|
4482
|
+
{
|
|
4483
|
+
title: "Sessions explained \u2014 what exeN means and how projects work",
|
|
4484
|
+
domain: "architecture",
|
|
4485
|
+
priority: "p0",
|
|
4486
|
+
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."
|
|
4487
|
+
},
|
|
4488
|
+
// --- Hierarchy and dispatch ---
|
|
4489
|
+
{
|
|
4490
|
+
title: "Chain of command \u2014 who talks to whom",
|
|
4491
|
+
domain: "workflow",
|
|
4492
|
+
priority: "p0",
|
|
4493
|
+
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."
|
|
4494
|
+
},
|
|
4495
|
+
{
|
|
4496
|
+
title: "Single dispatch path \u2014 create_task only",
|
|
4497
|
+
domain: "workflow",
|
|
4498
|
+
priority: "p0",
|
|
4499
|
+
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."
|
|
4500
|
+
},
|
|
4501
|
+
// --- Session isolation ---
|
|
4502
|
+
{
|
|
4503
|
+
title: "Session scoping \u2014 stay in your exe boundary",
|
|
4504
|
+
domain: "security",
|
|
4505
|
+
priority: "p0",
|
|
4506
|
+
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."
|
|
4507
|
+
},
|
|
4508
|
+
{
|
|
4509
|
+
title: "Session isolation \u2014 never touch another session's work",
|
|
4510
|
+
domain: "workflow",
|
|
4511
|
+
priority: "p0",
|
|
4512
|
+
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.`
|
|
4513
|
+
},
|
|
4514
|
+
// --- Engineering: session scoping in code ---
|
|
4515
|
+
{
|
|
4516
|
+
title: "Three-dimensional scoping \u2014 session, project, role \u2014 enforced in every query",
|
|
4517
|
+
domain: "architecture",
|
|
4518
|
+
priority: "p0",
|
|
4519
|
+
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."
|
|
4520
|
+
},
|
|
4521
|
+
// --- Hard constraints ---
|
|
4522
|
+
{
|
|
4523
|
+
title: "What you CANNOT do in exe-os \u2014 hard constraints",
|
|
4524
|
+
domain: "security",
|
|
4525
|
+
priority: "p0",
|
|
4526
|
+
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."
|
|
4527
|
+
},
|
|
4528
|
+
// --- Operations ---
|
|
4529
|
+
{
|
|
4530
|
+
title: "Managers must supervise deployed workers",
|
|
4531
|
+
domain: "workflow",
|
|
4532
|
+
priority: "p0",
|
|
4533
|
+
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.`
|
|
4534
|
+
},
|
|
4535
|
+
{
|
|
4536
|
+
title: "COO boot health check \u2014 memory, cloud sync, daemon on every launch",
|
|
4537
|
+
domain: "workflow",
|
|
4538
|
+
priority: "p0",
|
|
4539
|
+
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."
|
|
4540
|
+
},
|
|
4541
|
+
{
|
|
4542
|
+
title: "exe-build-adv mandatory for 3+ files",
|
|
4543
|
+
domain: "workflow",
|
|
4544
|
+
priority: "p0",
|
|
4545
|
+
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."
|
|
4546
|
+
},
|
|
4547
|
+
{
|
|
4548
|
+
title: "Desktop and TUI are the same product",
|
|
4549
|
+
domain: "architecture",
|
|
4550
|
+
priority: "p0",
|
|
4551
|
+
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."
|
|
4552
|
+
}
|
|
4553
|
+
];
|
|
4554
|
+
PLATFORM_PROCEDURE_TITLES = new Set(
|
|
4555
|
+
PLATFORM_PROCEDURES.map((p) => p.title)
|
|
4556
|
+
);
|
|
4557
|
+
}
|
|
4558
|
+
});
|
|
4559
|
+
|
|
4447
4560
|
// src/lib/global-procedures.ts
|
|
4448
4561
|
var global_procedures_exports = {};
|
|
4449
4562
|
__export(global_procedures_exports, {
|
|
@@ -4459,22 +4572,25 @@ async function loadGlobalProcedures() {
|
|
|
4459
4572
|
sql: "SELECT * FROM global_procedures WHERE active = 1 ORDER BY priority ASC, created_at ASC",
|
|
4460
4573
|
args: []
|
|
4461
4574
|
});
|
|
4462
|
-
const
|
|
4463
|
-
|
|
4464
|
-
|
|
4575
|
+
const allRows = result.rows;
|
|
4576
|
+
const customerOnly = allRows.filter((p) => !PLATFORM_PROCEDURE_TITLES.has(p.title));
|
|
4577
|
+
if (customerOnly.length > 0) {
|
|
4578
|
+
_customerCache = customerOnly.map((p) => `### ${p.title}
|
|
4465
4579
|
${p.content}`).join("\n\n");
|
|
4466
4580
|
} else {
|
|
4467
|
-
|
|
4581
|
+
_customerCache = "";
|
|
4468
4582
|
}
|
|
4469
4583
|
_cacheLoaded = true;
|
|
4470
|
-
return
|
|
4584
|
+
return customerOnly;
|
|
4471
4585
|
}
|
|
4472
4586
|
function getGlobalProceduresBlock() {
|
|
4473
|
-
|
|
4474
|
-
if (
|
|
4587
|
+
const sections = [];
|
|
4588
|
+
if (_platformCache) sections.push(_platformCache);
|
|
4589
|
+
if (_cacheLoaded && _customerCache) sections.push(_customerCache);
|
|
4590
|
+
if (sections.length === 0) return "";
|
|
4475
4591
|
return `## Organization-Wide Procedures (MANDATORY \u2014 supersedes all other rules)
|
|
4476
4592
|
|
|
4477
|
-
${
|
|
4593
|
+
${sections.join("\n\n")}
|
|
4478
4594
|
`;
|
|
4479
4595
|
}
|
|
4480
4596
|
async function storeGlobalProcedure(input) {
|
|
@@ -4499,13 +4615,16 @@ async function deactivateGlobalProcedure(id) {
|
|
|
4499
4615
|
await loadGlobalProcedures();
|
|
4500
4616
|
return result.rowsAffected > 0;
|
|
4501
4617
|
}
|
|
4502
|
-
var
|
|
4618
|
+
var _customerCache, _cacheLoaded, _platformCache;
|
|
4503
4619
|
var init_global_procedures = __esm({
|
|
4504
4620
|
"src/lib/global-procedures.ts"() {
|
|
4505
4621
|
"use strict";
|
|
4506
4622
|
init_database();
|
|
4507
|
-
|
|
4623
|
+
init_platform_procedures();
|
|
4624
|
+
_customerCache = "";
|
|
4508
4625
|
_cacheLoaded = false;
|
|
4626
|
+
_platformCache = PLATFORM_PROCEDURES.map((p) => `### ${p.title}
|
|
4627
|
+
${p.content}`).join("\n\n");
|
|
4509
4628
|
}
|
|
4510
4629
|
});
|
|
4511
4630
|
|
package/dist/lib/cloud-sync.js
CHANGED
|
@@ -845,9 +845,17 @@ async function cloudPullGlobalProcedures(config) {
|
|
|
845
845
|
if (!remoteProcs || remoteProcs.length === 0) return { pulled: 0 };
|
|
846
846
|
const client = getClient();
|
|
847
847
|
const stmts = remoteProcs.map((p) => ({
|
|
848
|
-
sql: `INSERT
|
|
848
|
+
sql: `INSERT INTO global_procedures
|
|
849
849
|
(id, title, content, priority, domain, active, created_at, updated_at)
|
|
850
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
850
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
|
851
|
+
ON CONFLICT(id) DO UPDATE SET
|
|
852
|
+
title = excluded.title,
|
|
853
|
+
content = excluded.content,
|
|
854
|
+
priority = excluded.priority,
|
|
855
|
+
domain = excluded.domain,
|
|
856
|
+
active = excluded.active,
|
|
857
|
+
updated_at = excluded.updated_at
|
|
858
|
+
WHERE excluded.updated_at > global_procedures.updated_at`,
|
|
851
859
|
args: [
|
|
852
860
|
p.id ?? null,
|
|
853
861
|
p.title ?? null,
|
|
@@ -4,15 +4,110 @@ import { randomUUID } from "crypto";
|
|
|
4
4
|
// src/lib/database.ts
|
|
5
5
|
import { createClient } from "@libsql/client";
|
|
6
6
|
|
|
7
|
+
// src/lib/platform-procedures.ts
|
|
8
|
+
var PLATFORM_PROCEDURES = [
|
|
9
|
+
// --- Foundation: what is exe-os ---
|
|
10
|
+
{
|
|
11
|
+
title: "What is exe-os \u2014 the operating model every agent must understand",
|
|
12
|
+
domain: "architecture",
|
|
13
|
+
priority: "p0",
|
|
14
|
+
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."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
title: "Mode 1 \u2014 how exe-os runs inside Claude Code",
|
|
18
|
+
domain: "architecture",
|
|
19
|
+
priority: "p0",
|
|
20
|
+
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."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: "Sessions explained \u2014 what exeN means and how projects work",
|
|
24
|
+
domain: "architecture",
|
|
25
|
+
priority: "p0",
|
|
26
|
+
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."
|
|
27
|
+
},
|
|
28
|
+
// --- Hierarchy and dispatch ---
|
|
29
|
+
{
|
|
30
|
+
title: "Chain of command \u2014 who talks to whom",
|
|
31
|
+
domain: "workflow",
|
|
32
|
+
priority: "p0",
|
|
33
|
+
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."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: "Single dispatch path \u2014 create_task only",
|
|
37
|
+
domain: "workflow",
|
|
38
|
+
priority: "p0",
|
|
39
|
+
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."
|
|
40
|
+
},
|
|
41
|
+
// --- Session isolation ---
|
|
42
|
+
{
|
|
43
|
+
title: "Session scoping \u2014 stay in your exe boundary",
|
|
44
|
+
domain: "security",
|
|
45
|
+
priority: "p0",
|
|
46
|
+
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."
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: "Session isolation \u2014 never touch another session's work",
|
|
50
|
+
domain: "workflow",
|
|
51
|
+
priority: "p0",
|
|
52
|
+
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.`
|
|
53
|
+
},
|
|
54
|
+
// --- Engineering: session scoping in code ---
|
|
55
|
+
{
|
|
56
|
+
title: "Three-dimensional scoping \u2014 session, project, role \u2014 enforced in every query",
|
|
57
|
+
domain: "architecture",
|
|
58
|
+
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 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."
|
|
60
|
+
},
|
|
61
|
+
// --- Hard constraints ---
|
|
62
|
+
{
|
|
63
|
+
title: "What you CANNOT do in exe-os \u2014 hard constraints",
|
|
64
|
+
domain: "security",
|
|
65
|
+
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 exe reviews and pushes. (6) Skip update_task(done) \u2014 it's the ONLY way your work gets reviewed. (7) Run git init."
|
|
67
|
+
},
|
|
68
|
+
// --- Operations ---
|
|
69
|
+
{
|
|
70
|
+
title: "Managers must supervise deployed workers",
|
|
71
|
+
domain: "workflow",
|
|
72
|
+
priority: "p0",
|
|
73
|
+
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.`
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: "COO boot health check \u2014 memory, cloud sync, daemon on every launch",
|
|
77
|
+
domain: "workflow",
|
|
78
|
+
priority: "p0",
|
|
79
|
+
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."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
title: "exe-build-adv mandatory for 3+ files",
|
|
83
|
+
domain: "workflow",
|
|
84
|
+
priority: "p0",
|
|
85
|
+
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."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
title: "Desktop and TUI are the same product",
|
|
89
|
+
domain: "architecture",
|
|
90
|
+
priority: "p0",
|
|
91
|
+
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."
|
|
92
|
+
}
|
|
93
|
+
];
|
|
94
|
+
var PLATFORM_PROCEDURE_TITLES = new Set(
|
|
95
|
+
PLATFORM_PROCEDURES.map((p) => p.title)
|
|
96
|
+
);
|
|
97
|
+
|
|
7
98
|
// src/lib/global-procedures.ts
|
|
8
|
-
var
|
|
99
|
+
var _customerCache = "";
|
|
9
100
|
var _cacheLoaded = false;
|
|
101
|
+
var _platformCache = PLATFORM_PROCEDURES.map((p) => `### ${p.title}
|
|
102
|
+
${p.content}`).join("\n\n");
|
|
10
103
|
function getGlobalProceduresBlock() {
|
|
11
|
-
|
|
12
|
-
if (
|
|
104
|
+
const sections = [];
|
|
105
|
+
if (_platformCache) sections.push(_platformCache);
|
|
106
|
+
if (_cacheLoaded && _customerCache) sections.push(_customerCache);
|
|
107
|
+
if (sections.length === 0) return "";
|
|
13
108
|
return `## Organization-Wide Procedures (MANDATORY \u2014 supersedes all other rules)
|
|
14
109
|
|
|
15
|
-
${
|
|
110
|
+
${sections.join("\n\n")}
|
|
16
111
|
`;
|
|
17
112
|
}
|
|
18
113
|
|