@askexenow/exe-os 0.9.69 → 0.9.71

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 (79) hide show
  1. package/deploy/stack-manifests/v0.9.json +96 -16
  2. package/dist/bin/agentic-ontology-backfill.js +33 -0
  3. package/dist/bin/agentic-reflection-backfill.js +33 -0
  4. package/dist/bin/agentic-semantic-label.js +33 -0
  5. package/dist/bin/backfill-conversations.js +33 -0
  6. package/dist/bin/backfill-responses.js +33 -0
  7. package/dist/bin/backfill-vectors.js +33 -0
  8. package/dist/bin/bulk-sync-postgres.js +33 -0
  9. package/dist/bin/cleanup-stale-review-tasks.js +33 -0
  10. package/dist/bin/cli.js +1284 -178
  11. package/dist/bin/exe-agent.js +6 -0
  12. package/dist/bin/exe-assign.js +33 -0
  13. package/dist/bin/exe-boot.js +33 -0
  14. package/dist/bin/exe-call.js +6 -0
  15. package/dist/bin/exe-cloud.js +33 -0
  16. package/dist/bin/exe-dispatch.js +33 -0
  17. package/dist/bin/exe-doctor.js +33 -0
  18. package/dist/bin/exe-export-behaviors.js +33 -0
  19. package/dist/bin/exe-forget.js +33 -0
  20. package/dist/bin/exe-gateway.js +178 -110
  21. package/dist/bin/exe-heartbeat.js +33 -0
  22. package/dist/bin/exe-kill.js +33 -0
  23. package/dist/bin/exe-launch-agent.js +33 -0
  24. package/dist/bin/exe-new-employee.js +6 -0
  25. package/dist/bin/exe-pending-messages.js +33 -0
  26. package/dist/bin/exe-pending-notifications.js +33 -0
  27. package/dist/bin/exe-pending-reviews.js +33 -0
  28. package/dist/bin/exe-rename.js +40 -4
  29. package/dist/bin/exe-review.js +33 -0
  30. package/dist/bin/exe-search.js +33 -0
  31. package/dist/bin/exe-session-cleanup.js +33 -0
  32. package/dist/bin/exe-start-codex.js +33 -0
  33. package/dist/bin/exe-start-opencode.js +33 -0
  34. package/dist/bin/exe-status.js +33 -0
  35. package/dist/bin/exe-team.js +33 -0
  36. package/dist/bin/git-sweep.js +33 -0
  37. package/dist/bin/graph-backfill.js +177 -110
  38. package/dist/bin/graph-export.js +33 -0
  39. package/dist/bin/intercom-check.js +33 -0
  40. package/dist/bin/registry-proxy.js +207 -0
  41. package/dist/bin/scan-tasks.js +33 -0
  42. package/dist/bin/setup.js +33 -0
  43. package/dist/bin/shard-migrate.js +33 -0
  44. package/dist/bin/stack-update.js +128 -0
  45. package/dist/gateway/index.js +178 -110
  46. package/dist/hooks/bug-report-worker.js +33 -0
  47. package/dist/hooks/codex-stop-task-finalizer.js +33 -0
  48. package/dist/hooks/commit-complete.js +33 -0
  49. package/dist/hooks/error-recall.js +33 -0
  50. package/dist/hooks/ingest.js +33 -0
  51. package/dist/hooks/instructions-loaded.js +33 -0
  52. package/dist/hooks/notification.js +33 -0
  53. package/dist/hooks/post-compact.js +33 -0
  54. package/dist/hooks/post-tool-combined.js +698 -17
  55. package/dist/hooks/pre-compact.js +33 -0
  56. package/dist/hooks/pre-tool-use.js +33 -0
  57. package/dist/hooks/prompt-submit.js +314 -0
  58. package/dist/hooks/session-end.js +33 -0
  59. package/dist/hooks/session-start.js +33 -0
  60. package/dist/hooks/stop.js +279 -12
  61. package/dist/hooks/subagent-stop.js +33 -0
  62. package/dist/hooks/summary-worker.js +33 -0
  63. package/dist/index.js +178 -110
  64. package/dist/lib/cloud-sync.js +27 -0
  65. package/dist/lib/database.js +27 -0
  66. package/dist/lib/db.js +27 -0
  67. package/dist/lib/device-registry.js +27 -0
  68. package/dist/lib/employee-templates.js +6 -0
  69. package/dist/lib/exe-daemon.js +639 -259
  70. package/dist/lib/hybrid-search.js +33 -0
  71. package/dist/lib/registry-proxy.js +162 -0
  72. package/dist/lib/schedules.js +33 -0
  73. package/dist/lib/store.js +33 -0
  74. package/dist/mcp/server.js +561 -244
  75. package/dist/runtime/index.js +33 -0
  76. package/dist/tui/App.js +33 -0
  77. package/package.json +3 -2
  78. package/stack.release.json +6 -4
  79. package/stack.release.schema.json +89 -18
@@ -2847,6 +2847,33 @@ async function ensureSchema() {
2847
2847
  CREATE INDEX IF NOT EXISTS idx_chat_history_session
2848
2848
  ON chat_history(session_id, id);
2849
2849
  `);
2850
+ await client.executeMultiple(`
2851
+ CREATE TABLE IF NOT EXISTS session_events (
2852
+ id TEXT PRIMARY KEY,
2853
+ agent_id TEXT NOT NULL,
2854
+ agent_role TEXT NOT NULL,
2855
+ session_id TEXT NOT NULL,
2856
+ session_scope TEXT,
2857
+ project_name TEXT NOT NULL,
2858
+ event_index INTEGER NOT NULL,
2859
+ event_type TEXT NOT NULL,
2860
+ tool_name TEXT,
2861
+ tool_use_id TEXT,
2862
+ content TEXT NOT NULL,
2863
+ payload_json TEXT,
2864
+ has_error INTEGER NOT NULL DEFAULT 0,
2865
+ created_at TEXT NOT NULL
2866
+ );
2867
+
2868
+ CREATE INDEX IF NOT EXISTS idx_session_events_agent_time
2869
+ ON session_events(agent_id, created_at DESC);
2870
+
2871
+ CREATE INDEX IF NOT EXISTS idx_session_events_session_index
2872
+ ON session_events(session_id, event_index);
2873
+
2874
+ CREATE INDEX IF NOT EXISTS idx_session_events_scope_agent_time
2875
+ ON session_events(session_scope, agent_id, created_at DESC);
2876
+ `);
2850
2877
  await client.executeMultiple(`
2851
2878
  CREATE TABLE IF NOT EXISTS workspaces (
2852
2879
  id TEXT PRIMARY KEY,
@@ -4535,6 +4562,12 @@ var init_platform_procedures = __esm({
4535
4562
  priority: "p0",
4536
4563
  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."
4537
4564
  },
4565
+ {
4566
+ title: "Code context first for repository orientation",
4567
+ domain: "workflow",
4568
+ priority: "p1",
4569
+ content: "Before broad repo exploration, symbol tracing, blast-radius review, or codebase Q&A, agents should use the consolidated code_context MCP tool instead of manual grep/read loops. Use action=index or stats to refresh/check the index; action=search with query, limit, offset, languages, paths, refresh_index for fresh multi-language code/doc search; action=trace for symbol imports/dependents; action=blast_radius for impact analysis before edits. CLI parity exists via exe-os code-context init|index|status|stats|search|doctor. Keep code_context separate from durable employee memory: promote only validated decisions, procedures, or lessons into store_memory/commit_memory."
4570
+ },
4538
4571
  {
4539
4572
  title: "Commit discipline \u2014 never leave verified work floating",
4540
4573
  domain: "workflow",
@@ -2530,6 +2530,33 @@ async function ensureSchema() {
2530
2530
  CREATE INDEX IF NOT EXISTS idx_chat_history_session
2531
2531
  ON chat_history(session_id, id);
2532
2532
  `);
2533
+ await client.executeMultiple(`
2534
+ CREATE TABLE IF NOT EXISTS session_events (
2535
+ id TEXT PRIMARY KEY,
2536
+ agent_id TEXT NOT NULL,
2537
+ agent_role TEXT NOT NULL,
2538
+ session_id TEXT NOT NULL,
2539
+ session_scope TEXT,
2540
+ project_name TEXT NOT NULL,
2541
+ event_index INTEGER NOT NULL,
2542
+ event_type TEXT NOT NULL,
2543
+ tool_name TEXT,
2544
+ tool_use_id TEXT,
2545
+ content TEXT NOT NULL,
2546
+ payload_json TEXT,
2547
+ has_error INTEGER NOT NULL DEFAULT 0,
2548
+ created_at TEXT NOT NULL
2549
+ );
2550
+
2551
+ CREATE INDEX IF NOT EXISTS idx_session_events_agent_time
2552
+ ON session_events(agent_id, created_at DESC);
2553
+
2554
+ CREATE INDEX IF NOT EXISTS idx_session_events_session_index
2555
+ ON session_events(session_id, event_index);
2556
+
2557
+ CREATE INDEX IF NOT EXISTS idx_session_events_scope_agent_time
2558
+ ON session_events(session_scope, agent_id, created_at DESC);
2559
+ `);
2533
2560
  await client.executeMultiple(`
2534
2561
  CREATE TABLE IF NOT EXISTS workspaces (
2535
2562
  id TEXT PRIMARY KEY,
@@ -4218,6 +4245,12 @@ var init_platform_procedures = __esm({
4218
4245
  priority: "p0",
4219
4246
  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."
4220
4247
  },
4248
+ {
4249
+ title: "Code context first for repository orientation",
4250
+ domain: "workflow",
4251
+ priority: "p1",
4252
+ content: "Before broad repo exploration, symbol tracing, blast-radius review, or codebase Q&A, agents should use the consolidated code_context MCP tool instead of manual grep/read loops. Use action=index or stats to refresh/check the index; action=search with query, limit, offset, languages, paths, refresh_index for fresh multi-language code/doc search; action=trace for symbol imports/dependents; action=blast_radius for impact analysis before edits. CLI parity exists via exe-os code-context init|index|status|stats|search|doctor. Keep code_context separate from durable employee memory: promote only validated decisions, procedures, or lessons into store_memory/commit_memory."
4253
+ },
4221
4254
  {
4222
4255
  title: "Commit discipline \u2014 never leave verified work floating",
4223
4256
  domain: "workflow",
@@ -3025,6 +3025,33 @@ async function ensureSchema() {
3025
3025
  CREATE INDEX IF NOT EXISTS idx_chat_history_session
3026
3026
  ON chat_history(session_id, id);
3027
3027
  `);
3028
+ await client.executeMultiple(`
3029
+ CREATE TABLE IF NOT EXISTS session_events (
3030
+ id TEXT PRIMARY KEY,
3031
+ agent_id TEXT NOT NULL,
3032
+ agent_role TEXT NOT NULL,
3033
+ session_id TEXT NOT NULL,
3034
+ session_scope TEXT,
3035
+ project_name TEXT NOT NULL,
3036
+ event_index INTEGER NOT NULL,
3037
+ event_type TEXT NOT NULL,
3038
+ tool_name TEXT,
3039
+ tool_use_id TEXT,
3040
+ content TEXT NOT NULL,
3041
+ payload_json TEXT,
3042
+ has_error INTEGER NOT NULL DEFAULT 0,
3043
+ created_at TEXT NOT NULL
3044
+ );
3045
+
3046
+ CREATE INDEX IF NOT EXISTS idx_session_events_agent_time
3047
+ ON session_events(agent_id, created_at DESC);
3048
+
3049
+ CREATE INDEX IF NOT EXISTS idx_session_events_session_index
3050
+ ON session_events(session_id, event_index);
3051
+
3052
+ CREATE INDEX IF NOT EXISTS idx_session_events_scope_agent_time
3053
+ ON session_events(session_scope, agent_id, created_at DESC);
3054
+ `);
3028
3055
  await client.executeMultiple(`
3029
3056
  CREATE TABLE IF NOT EXISTS workspaces (
3030
3057
  id TEXT PRIMARY KEY,
@@ -7906,6 +7933,12 @@ var init_platform_procedures = __esm({
7906
7933
  priority: "p0",
7907
7934
  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."
7908
7935
  },
7936
+ {
7937
+ title: "Code context first for repository orientation",
7938
+ domain: "workflow",
7939
+ priority: "p1",
7940
+ content: "Before broad repo exploration, symbol tracing, blast-radius review, or codebase Q&A, agents should use the consolidated code_context MCP tool instead of manual grep/read loops. Use action=index or stats to refresh/check the index; action=search with query, limit, offset, languages, paths, refresh_index for fresh multi-language code/doc search; action=trace for symbol imports/dependents; action=blast_radius for impact analysis before edits. CLI parity exists via exe-os code-context init|index|status|stats|search|doctor. Keep code_context separate from durable employee memory: promote only validated decisions, procedures, or lessons into store_memory/commit_memory."
7941
+ },
7909
7942
  {
7910
7943
  title: "Commit discipline \u2014 never leave verified work floating",
7911
7944
  domain: "workflow",
@@ -2438,6 +2438,33 @@ async function ensureSchema() {
2438
2438
  CREATE INDEX IF NOT EXISTS idx_chat_history_session
2439
2439
  ON chat_history(session_id, id);
2440
2440
  `);
2441
+ await client.executeMultiple(`
2442
+ CREATE TABLE IF NOT EXISTS session_events (
2443
+ id TEXT PRIMARY KEY,
2444
+ agent_id TEXT NOT NULL,
2445
+ agent_role TEXT NOT NULL,
2446
+ session_id TEXT NOT NULL,
2447
+ session_scope TEXT,
2448
+ project_name TEXT NOT NULL,
2449
+ event_index INTEGER NOT NULL,
2450
+ event_type TEXT NOT NULL,
2451
+ tool_name TEXT,
2452
+ tool_use_id TEXT,
2453
+ content TEXT NOT NULL,
2454
+ payload_json TEXT,
2455
+ has_error INTEGER NOT NULL DEFAULT 0,
2456
+ created_at TEXT NOT NULL
2457
+ );
2458
+
2459
+ CREATE INDEX IF NOT EXISTS idx_session_events_agent_time
2460
+ ON session_events(agent_id, created_at DESC);
2461
+
2462
+ CREATE INDEX IF NOT EXISTS idx_session_events_session_index
2463
+ ON session_events(session_id, event_index);
2464
+
2465
+ CREATE INDEX IF NOT EXISTS idx_session_events_scope_agent_time
2466
+ ON session_events(session_scope, agent_id, created_at DESC);
2467
+ `);
2441
2468
  await client.executeMultiple(`
2442
2469
  CREATE TABLE IF NOT EXISTS workspaces (
2443
2470
  id TEXT PRIMARY KEY,
@@ -4126,6 +4153,12 @@ var init_platform_procedures = __esm({
4126
4153
  priority: "p0",
4127
4154
  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."
4128
4155
  },
4156
+ {
4157
+ title: "Code context first for repository orientation",
4158
+ domain: "workflow",
4159
+ priority: "p1",
4160
+ content: "Before broad repo exploration, symbol tracing, blast-radius review, or codebase Q&A, agents should use the consolidated code_context MCP tool instead of manual grep/read loops. Use action=index or stats to refresh/check the index; action=search with query, limit, offset, languages, paths, refresh_index for fresh multi-language code/doc search; action=trace for symbol imports/dependents; action=blast_radius for impact analysis before edits. CLI parity exists via exe-os code-context init|index|status|stats|search|doctor. Keep code_context separate from durable employee memory: promote only validated decisions, procedures, or lessons into store_memory/commit_memory."
4161
+ },
4129
4162
  {
4130
4163
  title: "Commit discipline \u2014 never leave verified work floating",
4131
4164
  domain: "workflow",
@@ -2614,6 +2614,33 @@ async function ensureSchema() {
2614
2614
  CREATE INDEX IF NOT EXISTS idx_chat_history_session
2615
2615
  ON chat_history(session_id, id);
2616
2616
  `);
2617
+ await client.executeMultiple(`
2618
+ CREATE TABLE IF NOT EXISTS session_events (
2619
+ id TEXT PRIMARY KEY,
2620
+ agent_id TEXT NOT NULL,
2621
+ agent_role TEXT NOT NULL,
2622
+ session_id TEXT NOT NULL,
2623
+ session_scope TEXT,
2624
+ project_name TEXT NOT NULL,
2625
+ event_index INTEGER NOT NULL,
2626
+ event_type TEXT NOT NULL,
2627
+ tool_name TEXT,
2628
+ tool_use_id TEXT,
2629
+ content TEXT NOT NULL,
2630
+ payload_json TEXT,
2631
+ has_error INTEGER NOT NULL DEFAULT 0,
2632
+ created_at TEXT NOT NULL
2633
+ );
2634
+
2635
+ CREATE INDEX IF NOT EXISTS idx_session_events_agent_time
2636
+ ON session_events(agent_id, created_at DESC);
2637
+
2638
+ CREATE INDEX IF NOT EXISTS idx_session_events_session_index
2639
+ ON session_events(session_id, event_index);
2640
+
2641
+ CREATE INDEX IF NOT EXISTS idx_session_events_scope_agent_time
2642
+ ON session_events(session_scope, agent_id, created_at DESC);
2643
+ `);
2617
2644
  await client.executeMultiple(`
2618
2645
  CREATE TABLE IF NOT EXISTS workspaces (
2619
2646
  id TEXT PRIMARY KEY,
@@ -4302,6 +4329,12 @@ var init_platform_procedures = __esm({
4302
4329
  priority: "p0",
4303
4330
  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."
4304
4331
  },
4332
+ {
4333
+ title: "Code context first for repository orientation",
4334
+ domain: "workflow",
4335
+ priority: "p1",
4336
+ content: "Before broad repo exploration, symbol tracing, blast-radius review, or codebase Q&A, agents should use the consolidated code_context MCP tool instead of manual grep/read loops. Use action=index or stats to refresh/check the index; action=search with query, limit, offset, languages, paths, refresh_index for fresh multi-language code/doc search; action=trace for symbol imports/dependents; action=blast_radius for impact analysis before edits. CLI parity exists via exe-os code-context init|index|status|stats|search|doctor. Keep code_context separate from durable employee memory: promote only validated decisions, procedures, or lessons into store_memory/commit_memory."
4337
+ },
4305
4338
  {
4306
4339
  title: "Commit discipline \u2014 never leave verified work floating",
4307
4340
  domain: "workflow",
@@ -2439,6 +2439,33 @@ async function ensureSchema() {
2439
2439
  CREATE INDEX IF NOT EXISTS idx_chat_history_session
2440
2440
  ON chat_history(session_id, id);
2441
2441
  `);
2442
+ await client.executeMultiple(`
2443
+ CREATE TABLE IF NOT EXISTS session_events (
2444
+ id TEXT PRIMARY KEY,
2445
+ agent_id TEXT NOT NULL,
2446
+ agent_role TEXT NOT NULL,
2447
+ session_id TEXT NOT NULL,
2448
+ session_scope TEXT,
2449
+ project_name TEXT NOT NULL,
2450
+ event_index INTEGER NOT NULL,
2451
+ event_type TEXT NOT NULL,
2452
+ tool_name TEXT,
2453
+ tool_use_id TEXT,
2454
+ content TEXT NOT NULL,
2455
+ payload_json TEXT,
2456
+ has_error INTEGER NOT NULL DEFAULT 0,
2457
+ created_at TEXT NOT NULL
2458
+ );
2459
+
2460
+ CREATE INDEX IF NOT EXISTS idx_session_events_agent_time
2461
+ ON session_events(agent_id, created_at DESC);
2462
+
2463
+ CREATE INDEX IF NOT EXISTS idx_session_events_session_index
2464
+ ON session_events(session_id, event_index);
2465
+
2466
+ CREATE INDEX IF NOT EXISTS idx_session_events_scope_agent_time
2467
+ ON session_events(session_scope, agent_id, created_at DESC);
2468
+ `);
2442
2469
  await client.executeMultiple(`
2443
2470
  CREATE TABLE IF NOT EXISTS workspaces (
2444
2471
  id TEXT PRIMARY KEY,
@@ -4127,6 +4154,12 @@ var init_platform_procedures = __esm({
4127
4154
  priority: "p0",
4128
4155
  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."
4129
4156
  },
4157
+ {
4158
+ title: "Code context first for repository orientation",
4159
+ domain: "workflow",
4160
+ priority: "p1",
4161
+ content: "Before broad repo exploration, symbol tracing, blast-radius review, or codebase Q&A, agents should use the consolidated code_context MCP tool instead of manual grep/read loops. Use action=index or stats to refresh/check the index; action=search with query, limit, offset, languages, paths, refresh_index for fresh multi-language code/doc search; action=trace for symbol imports/dependents; action=blast_radius for impact analysis before edits. CLI parity exists via exe-os code-context init|index|status|stats|search|doctor. Keep code_context separate from durable employee memory: promote only validated decisions, procedures, or lessons into store_memory/commit_memory."
4162
+ },
4130
4163
  {
4131
4164
  title: "Commit discipline \u2014 never leave verified work floating",
4132
4165
  domain: "workflow",
@@ -2439,6 +2439,33 @@ async function ensureSchema() {
2439
2439
  CREATE INDEX IF NOT EXISTS idx_chat_history_session
2440
2440
  ON chat_history(session_id, id);
2441
2441
  `);
2442
+ await client.executeMultiple(`
2443
+ CREATE TABLE IF NOT EXISTS session_events (
2444
+ id TEXT PRIMARY KEY,
2445
+ agent_id TEXT NOT NULL,
2446
+ agent_role TEXT NOT NULL,
2447
+ session_id TEXT NOT NULL,
2448
+ session_scope TEXT,
2449
+ project_name TEXT NOT NULL,
2450
+ event_index INTEGER NOT NULL,
2451
+ event_type TEXT NOT NULL,
2452
+ tool_name TEXT,
2453
+ tool_use_id TEXT,
2454
+ content TEXT NOT NULL,
2455
+ payload_json TEXT,
2456
+ has_error INTEGER NOT NULL DEFAULT 0,
2457
+ created_at TEXT NOT NULL
2458
+ );
2459
+
2460
+ CREATE INDEX IF NOT EXISTS idx_session_events_agent_time
2461
+ ON session_events(agent_id, created_at DESC);
2462
+
2463
+ CREATE INDEX IF NOT EXISTS idx_session_events_session_index
2464
+ ON session_events(session_id, event_index);
2465
+
2466
+ CREATE INDEX IF NOT EXISTS idx_session_events_scope_agent_time
2467
+ ON session_events(session_scope, agent_id, created_at DESC);
2468
+ `);
2442
2469
  await client.executeMultiple(`
2443
2470
  CREATE TABLE IF NOT EXISTS workspaces (
2444
2471
  id TEXT PRIMARY KEY,
@@ -4127,6 +4154,12 @@ var init_platform_procedures = __esm({
4127
4154
  priority: "p0",
4128
4155
  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."
4129
4156
  },
4157
+ {
4158
+ title: "Code context first for repository orientation",
4159
+ domain: "workflow",
4160
+ priority: "p1",
4161
+ content: "Before broad repo exploration, symbol tracing, blast-radius review, or codebase Q&A, agents should use the consolidated code_context MCP tool instead of manual grep/read loops. Use action=index or stats to refresh/check the index; action=search with query, limit, offset, languages, paths, refresh_index for fresh multi-language code/doc search; action=trace for symbol imports/dependents; action=blast_radius for impact analysis before edits. CLI parity exists via exe-os code-context init|index|status|stats|search|doctor. Keep code_context separate from durable employee memory: promote only validated decisions, procedures, or lessons into store_memory/commit_memory."
4162
+ },
4130
4163
  {
4131
4164
  title: "Commit discipline \u2014 never leave verified work floating",
4132
4165
  domain: "workflow",
@@ -2734,6 +2734,33 @@ async function ensureSchema() {
2734
2734
  CREATE INDEX IF NOT EXISTS idx_chat_history_session
2735
2735
  ON chat_history(session_id, id);
2736
2736
  `);
2737
+ await client.executeMultiple(`
2738
+ CREATE TABLE IF NOT EXISTS session_events (
2739
+ id TEXT PRIMARY KEY,
2740
+ agent_id TEXT NOT NULL,
2741
+ agent_role TEXT NOT NULL,
2742
+ session_id TEXT NOT NULL,
2743
+ session_scope TEXT,
2744
+ project_name TEXT NOT NULL,
2745
+ event_index INTEGER NOT NULL,
2746
+ event_type TEXT NOT NULL,
2747
+ tool_name TEXT,
2748
+ tool_use_id TEXT,
2749
+ content TEXT NOT NULL,
2750
+ payload_json TEXT,
2751
+ has_error INTEGER NOT NULL DEFAULT 0,
2752
+ created_at TEXT NOT NULL
2753
+ );
2754
+
2755
+ CREATE INDEX IF NOT EXISTS idx_session_events_agent_time
2756
+ ON session_events(agent_id, created_at DESC);
2757
+
2758
+ CREATE INDEX IF NOT EXISTS idx_session_events_session_index
2759
+ ON session_events(session_id, event_index);
2760
+
2761
+ CREATE INDEX IF NOT EXISTS idx_session_events_scope_agent_time
2762
+ ON session_events(session_scope, agent_id, created_at DESC);
2763
+ `);
2737
2764
  await client.executeMultiple(`
2738
2765
  CREATE TABLE IF NOT EXISTS workspaces (
2739
2766
  id TEXT PRIMARY KEY,
@@ -4565,6 +4592,12 @@ var init_platform_procedures = __esm({
4565
4592
  priority: "p0",
4566
4593
  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."
4567
4594
  },
4595
+ {
4596
+ title: "Code context first for repository orientation",
4597
+ domain: "workflow",
4598
+ priority: "p1",
4599
+ content: "Before broad repo exploration, symbol tracing, blast-radius review, or codebase Q&A, agents should use the consolidated code_context MCP tool instead of manual grep/read loops. Use action=index or stats to refresh/check the index; action=search with query, limit, offset, languages, paths, refresh_index for fresh multi-language code/doc search; action=trace for symbol imports/dependents; action=blast_radius for impact analysis before edits. CLI parity exists via exe-os code-context init|index|status|stats|search|doctor. Keep code_context separate from durable employee memory: promote only validated decisions, procedures, or lessons into store_memory/commit_memory."
4600
+ },
4568
4601
  {
4569
4602
  title: "Commit discipline \u2014 never leave verified work floating",
4570
4603
  domain: "workflow",