oh-my-githubcopilot 1.8.1-alpha.f4d898d → 2.0.0-alpha.1cd01f4

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 (59) hide show
  1. package/.claude-plugin/plugin.json +23 -3
  2. package/AGENTS.md +24 -25
  3. package/CHANGELOG.md +49 -336
  4. package/README.md +2 -2
  5. package/agents/code-reviewer.agent.md +5 -0
  6. package/agents/{simplifier.agent.md → code-simplifier.agent.md} +2 -2
  7. package/agents/debugger.agent.md +1 -1
  8. package/agents/document-specialist.agent.md +6 -1
  9. package/agents/{explorer.agent.md → explore.agent.md} +2 -2
  10. package/agents/security-reviewer.agent.md +1 -1
  11. package/agents/test-engineer.agent.md +3 -1
  12. package/bin/omp-statusline.mjs +5 -5
  13. package/bin/omp-statusline.mjs.map +1 -1
  14. package/bin/omp.mjs +759 -20
  15. package/bin/omp.mjs.map +4 -4
  16. package/dist/hooks/delegation-enforcer.mjs +14 -5
  17. package/dist/hooks/delegation-enforcer.mjs.map +2 -2
  18. package/dist/hooks/hud-emitter.mjs +19 -10
  19. package/dist/hooks/hud-emitter.mjs.map +2 -2
  20. package/dist/hooks/keyword-detector.mjs +71 -6
  21. package/dist/hooks/keyword-detector.mjs.map +2 -2
  22. package/dist/hooks/model-router.mjs +16 -7
  23. package/dist/hooks/model-router.mjs.map +2 -2
  24. package/dist/hooks/stop-continuation.mjs +14 -5
  25. package/dist/hooks/stop-continuation.mjs.map +2 -2
  26. package/dist/hooks/token-tracker.mjs +14 -5
  27. package/dist/hooks/token-tracker.mjs.map +2 -2
  28. package/dist/mcp/server.mjs +17 -16
  29. package/dist/mcp/server.mjs.map +2 -2
  30. package/extension/extension.mjs +100 -0
  31. package/package.json +2 -2
  32. package/plugin.json +23 -3
  33. package/skills/build-fix/SKILL.md +35 -0
  34. package/skills/cancel/SKILL.md +33 -0
  35. package/skills/ccg/SKILL.md +37 -0
  36. package/skills/code-review/SKILL.md +33 -0
  37. package/skills/deep-dive/SKILL.md +33 -0
  38. package/skills/deepinit/SKILL.md +33 -0
  39. package/skills/deepsearch/SKILL.md +33 -0
  40. package/skills/design/SKILL.md +37 -0
  41. package/skills/external-context/SKILL.md +33 -0
  42. package/skills/help/SKILL.md +33 -0
  43. package/skills/omp-doctor/SKILL.md +23 -1
  44. package/skills/omp-reference/SKILL.md +20 -24
  45. package/skills/remember/SKILL.md +39 -0
  46. package/skills/research/SKILL.md +1 -1
  47. package/skills/sciomc/SKILL.md +35 -0
  48. package/skills/security-review/SKILL.md +33 -0
  49. package/skills/self-improve/SKILL.md +35 -0
  50. package/skills/ultragoal/SKILL.md +33 -0
  51. package/skills/ultraqa/SKILL.md +33 -0
  52. package/skills/verify/SKILL.md +33 -0
  53. package/skills/visual-verdict/SKILL.md +35 -0
  54. package/skills/web-clone/SKILL.md +35 -0
  55. package/skills/writer-memory/SKILL.md +37 -0
  56. package/agents/orchestrator.agent.md +0 -26
  57. package/agents/researcher.agent.md +0 -18
  58. package/agents/reviewer.agent.md +0 -23
  59. package/agents/tester.agent.md +0 -20
package/bin/omp.mjs CHANGED
@@ -44,7 +44,7 @@ function renderAnsi(state) {
44
44
  const modeStr = mode === "-" ? "-" : `\x1B[36m${mode}${reset()}`;
45
45
  const reqWarning = state.warningActive ? " !!" : "";
46
46
  const reqStr = `req:${state.premiumRequests ?? 0}/${state.premiumRequestsTotal ?? 1500}${reqWarning}`;
47
- return `[OMP v${state.version}] ${modeStr} | ${model} | ${ctxStr} | ${tokenStr} | ${reqStr} | ${age} | tools:${state.toolsUsed?.size || 0}/${state.toolsTotal ?? 13} | skills:${state.skillsUsed?.size || 0}/${state.skillsTotal ?? 25} | agents:${state.cumulativeAgentsUsed}/${state.agentsTotal ?? 23} | ${icon} ${state.status}`;
47
+ return `[OMP v${state.version}] ${modeStr} | ${model} | ${ctxStr} | ${tokenStr} | ${reqStr} | ${age} | tools:${state.toolsUsed?.size || 0}/${state.toolsTotal ?? 13} | skills:${state.skillsUsed?.size || 0}/${state.skillsTotal ?? 25} | agents:${state.cumulativeAgentsUsed}/${state.agentsTotal ?? 19} | ${icon} ${state.status}`;
48
48
  }
49
49
  function renderPlain(state) {
50
50
  const age = formatAge(state.startedAt);
@@ -54,7 +54,7 @@ function renderPlain(state) {
54
54
  const model = state.activeModel || "sonnet";
55
55
  const reqWarningPlain = state.warningActive ? " !!" : "";
56
56
  const reqStrPlain = `req:${state.premiumRequests ?? 0}/${state.premiumRequestsTotal ?? 1500}${reqWarningPlain}`;
57
- return `[OMP v${state.version}] ${mode} | ${model} | ctx:${ctx}% | tok:~${tokens}/${state.tokensTotal} | ${reqStrPlain} | ${age} | tools:${state.toolsUsed?.size || 0}/${state.toolsTotal ?? 13} | skills:${state.skillsUsed?.size || 0}/${state.skillsTotal ?? 25} | agents:${state.cumulativeAgentsUsed}/${state.agentsTotal ?? 23} | ${state.status}`;
57
+ return `[OMP v${state.version}] ${mode} | ${model} | ctx:${ctx}% | tok:~${tokens}/${state.tokensTotal} | ${reqStrPlain} | ${age} | tools:${state.toolsUsed?.size || 0}/${state.toolsTotal ?? 13} | skills:${state.skillsUsed?.size || 0}/${state.skillsTotal ?? 25} | agents:${state.cumulativeAgentsUsed}/${state.agentsTotal ?? 19} | ${state.status}`;
58
58
  }
59
59
  var STATUS_ICONS;
60
60
  var init_renderer = __esm({
@@ -134,8 +134,8 @@ function deserializeHudState(raw) {
134
134
  toolsUsed,
135
135
  skillsUsed,
136
136
  toolsTotal: typeof value.toolsTotal === "number" ? value.toolsTotal : 13,
137
- skillsTotal: typeof value.skillsTotal === "number" ? value.skillsTotal : 25,
138
- agentsTotal: typeof value.agentsTotal === "number" ? value.agentsTotal : 23,
137
+ skillsTotal: typeof value.skillsTotal === "number" ? value.skillsTotal : 59,
138
+ agentsTotal: typeof value.agentsTotal === "number" ? value.agentsTotal : 19,
139
139
  premiumRequests: typeof value.premiumRequests === "number" ? value.premiumRequests : 0,
140
140
  premiumRequestsTotal: typeof value.premiumRequestsTotal === "number" ? value.premiumRequestsTotal : DEFAULT_PREMIUM_REQUESTS_TOTAL,
141
141
  warningActive: typeof value.warningActive === "boolean" ? value.warningActive : false
@@ -167,8 +167,8 @@ function buildHudState(snapshot, now = Date.now()) {
167
167
  toolsUsed,
168
168
  skillsUsed,
169
169
  toolsTotal: 13,
170
- skillsTotal: 25,
171
- agentsTotal: 23,
170
+ skillsTotal: 59,
171
+ agentsTotal: 19,
172
172
  premiumRequests: snapshot.premium_requests ?? 0,
173
173
  premiumRequestsTotal: snapshot.premium_requests_total ?? DEFAULT_PREMIUM_REQUESTS_TOTAL,
174
174
  warningActive: snapshot.warning_active ?? false
@@ -339,6 +339,122 @@ var init_install = __esm({
339
339
  }
340
340
  });
341
341
 
342
+ // src/cli/doctor.mts
343
+ var doctor_exports = {};
344
+ __export(doctor_exports, {
345
+ AGENT_MIGRATIONS: () => AGENT_MIGRATIONS,
346
+ runDoctor: () => runDoctor,
347
+ scanProjectForStaleAgents: () => scanProjectForStaleAgents,
348
+ scanTextForStaleAgents: () => scanTextForStaleAgents
349
+ });
350
+ import { existsSync, readFileSync as readFileSync3, readdirSync, statSync } from "fs";
351
+ import { join as join5, relative } from "path";
352
+ function scanTextForStaleAgents(text, file) {
353
+ const warnings = [];
354
+ const lines = text.split("\n");
355
+ for (let i = 0; i < lines.length; i++) {
356
+ const line = lines[i];
357
+ for (const match of line.matchAll(STALE_AGENT_PATTERN)) {
358
+ const staleId = match[1];
359
+ warnings.push({
360
+ file,
361
+ line: i + 1,
362
+ staleId: `@${staleId}`,
363
+ replacement: AGENT_MIGRATIONS[staleId],
364
+ text: line.trim()
365
+ });
366
+ }
367
+ }
368
+ return warnings;
369
+ }
370
+ function collectDirFiles(dir, depth) {
371
+ if (depth > MAX_SCAN_DEPTH) return [];
372
+ const files = [];
373
+ let entries;
374
+ try {
375
+ entries = readdirSync(dir);
376
+ } catch {
377
+ return [];
378
+ }
379
+ for (const entry of entries) {
380
+ const fullPath = join5(dir, entry);
381
+ try {
382
+ const stats = statSync(fullPath);
383
+ if (stats.isDirectory()) {
384
+ files.push(...collectDirFiles(fullPath, depth + 1));
385
+ } else if (SCANNABLE_EXTENSIONS.some((ext) => entry.endsWith(ext))) {
386
+ files.push(fullPath);
387
+ }
388
+ } catch {
389
+ }
390
+ }
391
+ return files;
392
+ }
393
+ function scanProjectForStaleAgents(cwd) {
394
+ const targets = [];
395
+ for (const file of SCAN_FILES) {
396
+ const fullPath = join5(cwd, file);
397
+ if (existsSync(fullPath)) targets.push(fullPath);
398
+ }
399
+ for (const dir of SCAN_DIRS) {
400
+ const fullPath = join5(cwd, dir);
401
+ if (existsSync(fullPath)) targets.push(...collectDirFiles(fullPath, 0));
402
+ }
403
+ const warnings = [];
404
+ for (const target of targets) {
405
+ try {
406
+ const text = readFileSync3(target, "utf-8");
407
+ warnings.push(...scanTextForStaleAgents(text, relative(cwd, target)));
408
+ } catch {
409
+ }
410
+ }
411
+ return warnings;
412
+ }
413
+ function runDoctor(cwd = process.cwd()) {
414
+ console.log("OMP Doctor \u2014 agent migration check (2.0)");
415
+ console.log("");
416
+ const warnings = scanProjectForStaleAgents(cwd);
417
+ if (warnings.length === 0) {
418
+ console.log("OK: no stale agent references found.");
419
+ return 0;
420
+ }
421
+ console.log(`WARN: found ${warnings.length} stale agent reference(s):`);
422
+ console.log("");
423
+ for (const warning of warnings) {
424
+ console.log(` ${warning.file}:${warning.line} \u2014 ${warning.staleId} \u2192 ${warning.replacement}`);
425
+ console.log(` ${warning.text}`);
426
+ }
427
+ console.log("");
428
+ console.log("Suggested replacements (OMP 2.0 agent parity):");
429
+ for (const [staleId, replacement] of Object.entries(AGENT_MIGRATIONS)) {
430
+ console.log(` @${staleId} \u2192 ${replacement}`);
431
+ }
432
+ return warnings.length;
433
+ }
434
+ var AGENT_MIGRATIONS, STALE_AGENT_PATTERN, SCAN_FILES, SCAN_DIRS, SCANNABLE_EXTENSIONS, MAX_SCAN_DEPTH;
435
+ var init_doctor = __esm({
436
+ "src/cli/doctor.mts"() {
437
+ "use strict";
438
+ AGENT_MIGRATIONS = {
439
+ explorer: "explore",
440
+ simplifier: "code-simplifier",
441
+ researcher: "document-specialist",
442
+ reviewer: "code-reviewer",
443
+ tester: "test-engineer",
444
+ orchestrator: "top-level orchestration role (no longer a delegatable agent)"
445
+ };
446
+ STALE_AGENT_PATTERN = /(?<![\w-])@(explorer|simplifier|researcher|reviewer|tester|orchestrator)(?![\w-])/g;
447
+ SCAN_FILES = [
448
+ ".github/copilot-instructions.md",
449
+ ".copilot/copilot-instructions.md",
450
+ "AGENTS.md"
451
+ ];
452
+ SCAN_DIRS = [".omg", ".omp"];
453
+ SCANNABLE_EXTENSIONS = [".md", ".json", ".yml", ".yaml", ".txt"];
454
+ MAX_SCAN_DEPTH = 3;
455
+ }
456
+ });
457
+
342
458
  // src/hooks/runner.mts
343
459
  var runner_exports = {};
344
460
  __export(runner_exports, {
@@ -347,13 +463,22 @@ __export(runner_exports, {
347
463
  });
348
464
  import { appendFileSync, mkdirSync as mkdirSync2 } from "fs";
349
465
  import { homedir as homedir5 } from "os";
350
- import { join as join5 } from "path";
466
+ import { join as join6 } from "path";
351
467
  async function readStdin() {
352
- const chunks = [];
353
- for await (const chunk of process.stdin) {
354
- chunks.push(String(chunk));
355
- }
356
- return chunks.join("");
468
+ const readStdinActual = async () => {
469
+ const chunks = [];
470
+ for await (const chunk of process.stdin) {
471
+ chunks.push(String(chunk));
472
+ }
473
+ return chunks.join("");
474
+ };
475
+ const stdinTimeout = new Promise(
476
+ (resolve) => setTimeout(
477
+ () => resolve(""),
478
+ parseInt(process.env.OMP_HOOK_STDIN_TIMEOUT_MS ?? "500") || 500
479
+ )
480
+ );
481
+ return Promise.race([readStdinActual(), stdinTimeout]);
357
482
  }
358
483
  function logHookFailure(hook, reason) {
359
484
  try {
@@ -362,10 +487,10 @@ function logHookFailure(hook, reason) {
362
487
  } catch {
363
488
  }
364
489
  try {
365
- const logsDir = join5(homedir5(), ".omp", "logs");
490
+ const logsDir = join6(homedir5(), ".omp", "logs");
366
491
  mkdirSync2(logsDir, { recursive: true });
367
492
  const record = JSON.stringify({ ts: (/* @__PURE__ */ new Date()).toISOString(), hook, reason });
368
- appendFileSync(join5(logsDir, "hook-failures.jsonl"), record + "\n", "utf-8");
493
+ appendFileSync(join6(logsDir, "hook-failures.jsonl"), record + "\n", "utf-8");
369
494
  } catch {
370
495
  }
371
496
  }
@@ -595,7 +720,63 @@ var init_keyword_detector = __esm({
595
720
  "/omp:notifications": "notifications",
596
721
  "session:": "session",
597
722
  "/session": "session",
598
- "/omp:session": "session"
723
+ "/omp:session": "session",
724
+ "verify:": "verify",
725
+ "/verify": "verify",
726
+ "/omp:verify": "verify",
727
+ "cancel:": "cancel",
728
+ "/omp:cancel": "cancel",
729
+ "help:": "help",
730
+ "/omp:help": "help",
731
+ "code-review:": "code-review",
732
+ "/code-review": "code-review",
733
+ "/omp:code-review": "code-review",
734
+ "security-review:": "security-review",
735
+ "/security-review": "security-review",
736
+ "/omp:security-review": "security-review",
737
+ "ultraqa:": "ultraqa",
738
+ "/ultraqa": "ultraqa",
739
+ "/omp:ultraqa": "ultraqa",
740
+ "ultragoal:": "ultragoal",
741
+ "/ultragoal": "ultragoal",
742
+ "/omp:ultragoal": "ultragoal",
743
+ "deep-dive:": "deep-dive",
744
+ "/deep-dive": "deep-dive",
745
+ "/omp:deep-dive": "deep-dive",
746
+ "external-context:": "external-context",
747
+ "/external-context": "external-context",
748
+ "/omp:external-context": "external-context",
749
+ "deepsearch:": "deepsearch",
750
+ "/deepsearch": "deepsearch",
751
+ "/omp:deepsearch": "deepsearch",
752
+ "sciomc:": "sciomc",
753
+ "/sciomc": "sciomc",
754
+ "/omp:sciomc": "sciomc",
755
+ "remember:": "remember",
756
+ "/omp:remember": "remember",
757
+ "writer-memory:": "writer-memory",
758
+ "/writer-memory": "writer-memory",
759
+ "/omp:writer-memory": "writer-memory",
760
+ "deepinit:": "deepinit",
761
+ "/deepinit": "deepinit",
762
+ "/omp:deepinit": "deepinit",
763
+ "self-improve:": "self-improve",
764
+ "/self-improve": "self-improve",
765
+ "/omp:self-improve": "self-improve",
766
+ "visual-verdict:": "visual-verdict",
767
+ "/visual-verdict": "visual-verdict",
768
+ "/omp:visual-verdict": "visual-verdict",
769
+ "ccg:": "ccg",
770
+ "/ccg": "ccg",
771
+ "/omp:ccg": "ccg",
772
+ "build-fix:": "build-fix",
773
+ "/build-fix": "build-fix",
774
+ "/omp:build-fix": "build-fix",
775
+ "design:": "design",
776
+ "/omp:design": "design",
777
+ "web-clone:": "web-clone",
778
+ "/web-clone": "web-clone",
779
+ "/omp:web-clone": "web-clone"
599
780
  };
600
781
  KEYWORD_ENTRIES = Object.entries(KEYWORD_MAP).sort(([a], [b]) => b.length - a.length);
601
782
  CANONICAL_COMMAND_MAP = {
@@ -609,6 +790,345 @@ var init_keyword_detector = __esm({
609
790
  }
610
791
  });
611
792
 
793
+ // src/extension/commands.mts
794
+ function buildActivationInstruction(skillId, args) {
795
+ const trimmed = args.trim();
796
+ return `Activate the OMP skill "${skillId}" with args: ${trimmed.length > 0 ? trimmed : "(none)"}`;
797
+ }
798
+ function buildCommands(registry) {
799
+ const commands = [];
800
+ for (const entry of registry) {
801
+ commands.push({
802
+ name: entry.id,
803
+ description: entry.description,
804
+ handler: (args) => buildActivationInstruction(entry.id, args)
805
+ });
806
+ for (const alias of entry.aliases ?? []) {
807
+ commands.push({
808
+ name: alias,
809
+ description: `Alias for /${entry.id} \u2014 ${entry.description}`,
810
+ handler: (args) => buildActivationInstruction(entry.id, args)
811
+ });
812
+ }
813
+ }
814
+ return commands;
815
+ }
816
+ var init_commands = __esm({
817
+ "src/extension/commands.mts"() {
818
+ "use strict";
819
+ }
820
+ });
821
+
822
+ // src/extension/registry.mts
823
+ var registry_exports = {};
824
+ __export(registry_exports, {
825
+ SKILL_REGISTRY: () => SKILL_REGISTRY,
826
+ getCommandDefinitions: () => getCommandDefinitions
827
+ });
828
+ function getCommandDefinitions() {
829
+ return buildCommands(SKILL_REGISTRY);
830
+ }
831
+ var SKILL_REGISTRY;
832
+ var init_registry = __esm({
833
+ "src/extension/registry.mts"() {
834
+ "use strict";
835
+ init_commands();
836
+ SKILL_REGISTRY = [
837
+ {
838
+ id: "autopilot",
839
+ description: "Autonomous end-to-end execution from idea to working code",
840
+ keywords: ["autopilot:"]
841
+ },
842
+ {
843
+ id: "ralph",
844
+ description: "Persistence loop with architect verification gate",
845
+ keywords: ["ralph:"]
846
+ },
847
+ {
848
+ id: "ultrawork",
849
+ description: "Parallel multi-agent high-throughput implementation",
850
+ aliases: ["ulw"],
851
+ keywords: ["ulw:", "ultrawork:"]
852
+ },
853
+ {
854
+ id: "team",
855
+ description: "Coordinated N-agent team with staged pipeline",
856
+ keywords: ["team:"]
857
+ },
858
+ {
859
+ id: "ecomode",
860
+ description: "Cost-optimized execution with low-cost model tier",
861
+ aliases: ["eco"],
862
+ keywords: ["eco:", "ecomode:"]
863
+ },
864
+ {
865
+ id: "swarm",
866
+ description: "Parallel agent swarm for independent subtasks",
867
+ keywords: ["swarm:"]
868
+ },
869
+ {
870
+ id: "pipeline",
871
+ description: "Sequential stage-based execution pipeline",
872
+ keywords: ["pipeline:"]
873
+ },
874
+ {
875
+ id: "deep-interview",
876
+ description: "Socratic deep requirements interview with ambiguity gating",
877
+ aliases: ["di"],
878
+ keywords: ["deep interview:"]
879
+ },
880
+ {
881
+ id: "omp-plan",
882
+ description: "Strategic planning with interview, direct, consensus, and review modes",
883
+ aliases: ["plan"],
884
+ keywords: ["plan:"]
885
+ },
886
+ {
887
+ id: "omp-setup",
888
+ description: "OMP onboarding and configuration wizard",
889
+ keywords: ["setup:"]
890
+ },
891
+ {
892
+ id: "hud",
893
+ description: "Display current HUD session state",
894
+ keywords: ["hud:"]
895
+ },
896
+ {
897
+ id: "wiki",
898
+ description: "Project wiki operations and management",
899
+ keywords: ["wiki:"]
900
+ },
901
+ {
902
+ id: "learner",
903
+ description: "Structured learning and knowledge sessions",
904
+ keywords: ["learner:"]
905
+ },
906
+ {
907
+ id: "note",
908
+ description: "Session notes and context management",
909
+ keywords: ["note:"]
910
+ },
911
+ {
912
+ id: "trace",
913
+ description: "Execution tracing and debugging",
914
+ keywords: ["trace:"]
915
+ },
916
+ {
917
+ id: "release",
918
+ description: "Guided release workflow and automation",
919
+ keywords: ["release:"]
920
+ },
921
+ {
922
+ id: "configure-notifications",
923
+ description: "Configure session notification settings",
924
+ keywords: ["configure-notifications:"]
925
+ },
926
+ {
927
+ id: "psm",
928
+ description: "Plugin State Manager operations",
929
+ keywords: ["psm:"]
930
+ },
931
+ {
932
+ id: "swe-bench",
933
+ description: "SWE-bench evaluation harness runner",
934
+ keywords: ["swe-bench:"]
935
+ },
936
+ {
937
+ id: "mcp-setup",
938
+ description: "MCP server configuration wizard",
939
+ keywords: ["mcp:", "mcp-setup:"]
940
+ },
941
+ {
942
+ id: "setup",
943
+ description: "OMP setup and onboarding wizard"
944
+ },
945
+ {
946
+ id: "graphify",
947
+ description: "Convert any input to a knowledge graph",
948
+ keywords: ["graphify:"]
949
+ },
950
+ {
951
+ id: "graphwiki",
952
+ description: "GraphWiki CLI operations: query, lint, build",
953
+ keywords: ["graphwiki:"]
954
+ },
955
+ {
956
+ id: "graph-provider",
957
+ description: "Manage and configure the active graph provider",
958
+ keywords: ["graph:"]
959
+ },
960
+ {
961
+ id: "spending",
962
+ description: "Track and reset premium request usage",
963
+ keywords: ["spending:"]
964
+ },
965
+ {
966
+ id: "ralplan",
967
+ description: "Consensus planning gate for vague ralph/autopilot/team requests"
968
+ },
969
+ {
970
+ id: "research",
971
+ description: "Research and investigation workflows (investigate, deep dive)",
972
+ keywords: ["autoresearch:"]
973
+ },
974
+ {
975
+ id: "omp-doctor",
976
+ description: "Diagnose and fix oh-my-githubcopilot installation issues"
977
+ },
978
+ {
979
+ id: "omp-reference",
980
+ description: "OMP agent catalog, tools, routing, commit protocol, and skills registry"
981
+ },
982
+ {
983
+ id: "ai-slop-cleaner",
984
+ description: "Clean AI-generated code slop with a regression-safe, deletion-first workflow",
985
+ keywords: ["deslop", "anti-slop"]
986
+ },
987
+ {
988
+ id: "tdd",
989
+ description: "Test-Driven Development with Red-Green-Refactor cycle",
990
+ keywords: ["tdd:"]
991
+ },
992
+ {
993
+ id: "improve-codebase-architecture",
994
+ description: "Deep exploration and architectural improvement via friction detection"
995
+ },
996
+ {
997
+ id: "skillify",
998
+ description: "Turn a repeatable session workflow into a reusable OMP skill draft"
999
+ },
1000
+ {
1001
+ id: "interview",
1002
+ description: "Socratic interview and ambiguity scoring",
1003
+ keywords: ["interview:"]
1004
+ },
1005
+ {
1006
+ id: "graph-context",
1007
+ description: "Load codebase context from the knowledge graph instead of raw files"
1008
+ },
1009
+ {
1010
+ id: "interactive-menu",
1011
+ description: "Numbered-choice selection pattern for OMP's conversational TUI"
1012
+ },
1013
+ {
1014
+ id: "notifications",
1015
+ description: "Send and manage runtime notifications (Telegram, Discord, Slack, Email)",
1016
+ keywords: ["notifications:"]
1017
+ },
1018
+ {
1019
+ id: "doctor",
1020
+ description: "Diagnose and fix common issues",
1021
+ keywords: ["doctor:"]
1022
+ },
1023
+ {
1024
+ id: "session",
1025
+ description: "Worktree and tmux session management",
1026
+ keywords: ["session:"]
1027
+ },
1028
+ {
1029
+ id: "verify",
1030
+ description: "Evidence-based completion check via verifier agent",
1031
+ keywords: ["verify:"]
1032
+ },
1033
+ {
1034
+ id: "cancel",
1035
+ description: "Ends active execution modes and clears .omp/state/",
1036
+ keywords: ["cancel:"]
1037
+ },
1038
+ {
1039
+ id: "help",
1040
+ description: "Command and skill discovery; prints the full skill catalog",
1041
+ keywords: ["help:"]
1042
+ },
1043
+ {
1044
+ id: "code-review",
1045
+ description: "Trigger the code-reviewer agent lane for structured code review",
1046
+ keywords: ["code-review:"]
1047
+ },
1048
+ {
1049
+ id: "security-review",
1050
+ description: "Trigger the security-reviewer agent lane for security analysis",
1051
+ keywords: ["security-review:"]
1052
+ },
1053
+ {
1054
+ id: "ultraqa",
1055
+ description: "QA cycle loop with qa-tester agent; runs until all checks pass",
1056
+ keywords: ["ultraqa:"]
1057
+ },
1058
+ {
1059
+ id: "ultragoal",
1060
+ description: "Durable goal ledger in .omp/ultragoal/ with fail-closed checkpoints",
1061
+ keywords: ["ultragoal:"]
1062
+ },
1063
+ {
1064
+ id: "deep-dive",
1065
+ description: "Trace\u2192deep-interview pipeline for deep investigation",
1066
+ keywords: ["deep-dive:"]
1067
+ },
1068
+ {
1069
+ id: "external-context",
1070
+ description: "Load external docs/URLs into session context",
1071
+ keywords: ["external-context:"]
1072
+ },
1073
+ {
1074
+ id: "deepsearch",
1075
+ description: "Multi-source deep search across codebase and web",
1076
+ keywords: ["deepsearch:"]
1077
+ },
1078
+ {
1079
+ id: "sciomc",
1080
+ description: "Scientific/analytical reasoning workflow \u2014 hypothesis\u2192experiment\u2192conclusion",
1081
+ keywords: ["sciomc:"]
1082
+ },
1083
+ {
1084
+ id: "remember",
1085
+ description: "Persist key facts/decisions to .omp/memory/",
1086
+ keywords: ["remember:"]
1087
+ },
1088
+ {
1089
+ id: "writer-memory",
1090
+ description: "Writing style memory \u2014 stores voice/tone preferences",
1091
+ keywords: ["writer-memory:"]
1092
+ },
1093
+ {
1094
+ id: "deepinit",
1095
+ description: "Deep project initialization \u2014 full codebase onboarding",
1096
+ keywords: ["deepinit:"]
1097
+ },
1098
+ {
1099
+ id: "self-improve",
1100
+ description: "OMP self-improvement \u2014 analyse own skills/agents and propose improvements",
1101
+ keywords: ["self-improve:"]
1102
+ },
1103
+ {
1104
+ id: "visual-verdict",
1105
+ description: "Visual diff/screenshot comparison verdict",
1106
+ keywords: ["visual-verdict:"]
1107
+ },
1108
+ {
1109
+ id: "ccg",
1110
+ description: "Concurrent code generation via multi-model picker",
1111
+ keywords: ["ccg:"]
1112
+ },
1113
+ {
1114
+ id: "build-fix",
1115
+ description: "Diagnose and fix build/CI failures automatically",
1116
+ keywords: ["build-fix:"]
1117
+ },
1118
+ {
1119
+ id: "design",
1120
+ description: "UI/UX design and frontend component generation",
1121
+ keywords: ["design:"]
1122
+ },
1123
+ {
1124
+ id: "web-clone",
1125
+ description: "Clone and adapt a web page/design to the codebase",
1126
+ keywords: ["web-clone:"]
1127
+ }
1128
+ ];
1129
+ }
1130
+ });
1131
+
612
1132
  // src/index.mts
613
1133
  import { parseArgs } from "util";
614
1134
  import { createRequire } from "module";
@@ -811,6 +1331,72 @@ async function main() {
811
1331
  await runInstall2();
812
1332
  break;
813
1333
  }
1334
+ case "doctor": {
1335
+ const { runDoctor: runDoctor2 } = await Promise.resolve().then(() => (init_doctor(), doctor_exports));
1336
+ const warnings = runDoctor2(process.cwd());
1337
+ process.exitCode = warnings > 0 ? 1 : 0;
1338
+ break;
1339
+ }
1340
+ case "verify":
1341
+ console.log("OMP verify: use /verify or /oh-my-githubcopilot:verify in GitHub Copilot CLI to trigger @verifier evidence-based completion check.");
1342
+ break;
1343
+ case "cancel":
1344
+ await runCancel();
1345
+ break;
1346
+ case "help":
1347
+ await runHelp();
1348
+ break;
1349
+ case "code-review":
1350
+ console.log("OMP code-review: use /code-review or /oh-my-githubcopilot:code-review in GitHub Copilot CLI to trigger @code-reviewer agent.");
1351
+ break;
1352
+ case "security-review":
1353
+ console.log("OMP security-review: use /security-review or /oh-my-githubcopilot:security-review in GitHub Copilot CLI to trigger @security-reviewer agent.");
1354
+ break;
1355
+ case "ultraqa":
1356
+ console.log("OMP ultraqa: use /ultraqa or /oh-my-githubcopilot:ultraqa in GitHub Copilot CLI to start a QA cycle with @qa-tester agent.");
1357
+ break;
1358
+ case "ultragoal":
1359
+ await runUltragoal(positionals.slice(1));
1360
+ break;
1361
+ case "deep-dive":
1362
+ console.log("OMP deep-dive: use /deep-dive or /oh-my-githubcopilot:deep-dive in GitHub Copilot CLI to run the trace\u2192deep-interview investigation pipeline.");
1363
+ break;
1364
+ case "external-context":
1365
+ await runExternalContext(positionals.slice(1));
1366
+ break;
1367
+ case "deepsearch":
1368
+ console.log("OMP deepsearch: use /deepsearch or /oh-my-githubcopilot:deepsearch in GitHub Copilot CLI to run multi-source deep search.");
1369
+ break;
1370
+ case "sciomc":
1371
+ console.log("OMP sciomc: use /sciomc or /oh-my-githubcopilot:sciomc in GitHub Copilot CLI to run the scientific hypothesis\u2192experiment\u2192conclusion reasoning workflow.");
1372
+ break;
1373
+ case "remember":
1374
+ await runRemember(positionals.slice(1));
1375
+ break;
1376
+ case "writer-memory":
1377
+ await runWriterMemory(positionals.slice(1));
1378
+ break;
1379
+ case "deepinit":
1380
+ console.log("OMP deepinit: use /deepinit or /oh-my-githubcopilot:deepinit in GitHub Copilot CLI to run deep project initialization.");
1381
+ break;
1382
+ case "self-improve":
1383
+ console.log("OMP self-improve: use /self-improve in Copilot CLI to analyse OMP skills/agents and propose improvements.");
1384
+ break;
1385
+ case "visual-verdict":
1386
+ console.log("OMP visual-verdict: use /visual-verdict in Copilot CLI to compare visual diffs or screenshots.");
1387
+ break;
1388
+ case "ccg":
1389
+ console.log("OMP ccg: use /ccg in Copilot CLI to run concurrent code generation via multi-model picker.");
1390
+ break;
1391
+ case "build-fix":
1392
+ console.log("OMP build-fix: use /build-fix in Copilot CLI to diagnose and fix build/CI failures automatically.");
1393
+ break;
1394
+ case "design":
1395
+ console.log("OMP design: use /omp:design in Copilot CLI to generate UI/UX designs and frontend components.");
1396
+ break;
1397
+ case "web-clone":
1398
+ console.log("OMP web-clone: use /web-clone in Copilot CLI to clone and adapt a web page/design to your codebase.");
1399
+ break;
814
1400
  default:
815
1401
  console.error(`Unknown subcommand: ${resolvedSubcommand}`);
816
1402
  printUsage(true);
@@ -819,15 +1405,15 @@ async function main() {
819
1405
  }
820
1406
  function printUsage(stderr = false) {
821
1407
  const output = stderr ? console.error : console.log;
822
- output("Usage: omp [hud|install|version|psm|bench|hook] [--watch]");
1408
+ output("Usage: omp [hud|install|doctor|version|psm|bench|hook|verify|cancel|help|code-review|security-review|ultraqa|ultragoal|deep-dive|external-context|deepsearch|sciomc|remember|writer-memory|deepinit|self-improve|visual-verdict|ccg|build-fix|design|web-clone] [--watch]");
823
1409
  }
824
1410
  async function printHud() {
825
1411
  try {
826
- const { readFileSync: readFileSync3 } = await import("fs");
827
- const { join: join6 } = await import("path");
1412
+ const { readFileSync: readFileSync4 } = await import("fs");
1413
+ const { join: join7 } = await import("path");
828
1414
  const { homedir: homedir6 } = await import("os");
829
- const hudPath = join6(homedir6(), ".omp", "hud.line");
830
- const line = readFileSync3(hudPath, "utf-8").trim();
1415
+ const hudPath = join7(homedir6(), ".omp", "hud.line");
1416
+ const line = readFileSync4(hudPath, "utf-8").trim();
831
1417
  console.log(line);
832
1418
  } catch {
833
1419
  console.log(`OMP v${PKG_VERSION} | hud: no active session`);
@@ -854,6 +1440,159 @@ async function runBench(_args) {
854
1440
  console.log("SWE-bench requires Node.js subprocess with Python evaluation harness.");
855
1441
  console.log("Usage: /omp:swe-bench --suite lite --compare baseline");
856
1442
  }
1443
+ async function runCancel() {
1444
+ try {
1445
+ const { rmSync, existsSync: existsSync2 } = await import("fs");
1446
+ const { join: join7 } = await import("path");
1447
+ const statePath = join7(process.cwd(), ".omp", "state");
1448
+ if (existsSync2(statePath)) {
1449
+ rmSync(statePath, { recursive: true, force: true });
1450
+ console.log("OMP: active session cancelled. .omp/state/ cleared.");
1451
+ } else {
1452
+ console.log("OMP: no active session state found. Nothing to cancel.");
1453
+ }
1454
+ } catch (err) {
1455
+ console.error("OMP cancel failed:", err);
1456
+ process.exitCode = 1;
1457
+ }
1458
+ }
1459
+ async function runHelp() {
1460
+ try {
1461
+ const { SKILL_REGISTRY: SKILL_REGISTRY2 } = await Promise.resolve().then(() => (init_registry(), registry_exports));
1462
+ console.log("OMP Skills Catalog\n");
1463
+ console.log(" ID Description");
1464
+ console.log(" " + "-".repeat(70));
1465
+ for (const skill of SKILL_REGISTRY2) {
1466
+ const id = skill.id.padEnd(30);
1467
+ console.log(` ${id} ${skill.description}`);
1468
+ }
1469
+ console.log(`
1470
+ Total: ${SKILL_REGISTRY2.length} skills`);
1471
+ console.log("\nUsage: /omp:<skill-id> [args]");
1472
+ } catch (err) {
1473
+ console.error("OMP help failed:", err);
1474
+ process.exitCode = 1;
1475
+ }
1476
+ }
1477
+ async function runUltragoal(args) {
1478
+ try {
1479
+ const { mkdirSync: mkdirSync3, readFileSync: readFileSync4, writeFileSync: writeFileSync2, existsSync: existsSync2 } = await import("fs");
1480
+ const { join: join7 } = await import("path");
1481
+ const goalDir = join7(process.cwd(), ".omp", "ultragoal");
1482
+ const goalsPath = join7(goalDir, "goals.json");
1483
+ mkdirSync3(goalDir, { recursive: true });
1484
+ let goals = [];
1485
+ if (existsSync2(goalsPath)) {
1486
+ const parsed = JSON.parse(readFileSync4(goalsPath, "utf-8"));
1487
+ if (Array.isArray(parsed)) {
1488
+ goals = parsed;
1489
+ } else {
1490
+ console.error("OMP UltraGoal: goals.json is corrupted (not an array). Resetting to empty.");
1491
+ goals = [];
1492
+ }
1493
+ }
1494
+ if (args.length > 0) {
1495
+ const nextId = goals.length === 0 ? 1 : Math.max(...goals.map((g) => g.id)) + 1;
1496
+ const newGoal = { id: nextId, goal: args.join(" "), status: "active", createdAt: (/* @__PURE__ */ new Date()).toISOString() };
1497
+ goals.push(newGoal);
1498
+ const tmpPath = goalsPath + ".tmp";
1499
+ writeFileSync2(tmpPath, JSON.stringify(goals, null, 2));
1500
+ const { renameSync: renameSync2 } = await import("fs");
1501
+ renameSync2(tmpPath, goalsPath);
1502
+ console.log(`OMP UltraGoal: added goal #${newGoal.id}: "${newGoal.goal}"`);
1503
+ } else {
1504
+ if (goals.length === 0) {
1505
+ console.log("OMP UltraGoal: no goals set. Use: omp ultragoal <goal description>");
1506
+ } else {
1507
+ console.log("OMP UltraGoal \u2014 Current Goals:\n");
1508
+ for (const g of goals) {
1509
+ console.log(` #${g.id} [${g.status}] ${g.goal}`);
1510
+ }
1511
+ }
1512
+ }
1513
+ } catch (err) {
1514
+ console.error("OMP ultragoal failed:", err);
1515
+ process.exitCode = 1;
1516
+ }
1517
+ }
1518
+ async function runExternalContext(args) {
1519
+ if (args.length === 0) {
1520
+ console.log("OMP external-context: use /external-context <url-or-path> or /oh-my-githubcopilot:external-context in GitHub Copilot CLI to load external docs into session context.");
1521
+ return;
1522
+ }
1523
+ const target = args.join(" ");
1524
+ console.log(`External context loaded: ${target}. Use /external-context ${target} in Copilot CLI to load into session.`);
1525
+ }
1526
+ async function runRemember(args) {
1527
+ try {
1528
+ const { mkdirSync: mkdirSync3, readdirSync: readdirSync2, writeFileSync: writeFileSync2, existsSync: existsSync2 } = await import("fs");
1529
+ const { join: join7 } = await import("path");
1530
+ const memoryDir = join7(process.cwd(), ".omp", "memory");
1531
+ mkdirSync3(memoryDir, { recursive: true });
1532
+ if (args.length === 0) {
1533
+ if (!existsSync2(memoryDir)) {
1534
+ console.log("OMP Remember: no memories found. Use: omp remember <text>");
1535
+ return;
1536
+ }
1537
+ const files = readdirSync2(memoryDir).filter((f) => f.endsWith(".md")).sort();
1538
+ if (files.length === 0) {
1539
+ console.log("OMP Remember: no memories found. Use: omp remember <text>");
1540
+ } else {
1541
+ console.log("OMP Remember \u2014 Stored Memories:\n");
1542
+ for (const file of files) {
1543
+ console.log(` ${file}`);
1544
+ }
1545
+ console.log(`
1546
+ Total: ${files.length} memor${files.length === 1 ? "y" : "ies"}`);
1547
+ }
1548
+ return;
1549
+ }
1550
+ const text = args.join(" ");
1551
+ const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
1552
+ const fileName = `${timestamp}.md`;
1553
+ const filePath = join7(memoryDir, fileName);
1554
+ const tmpPath = filePath + ".tmp";
1555
+ const content = `# Memory: ${(/* @__PURE__ */ new Date()).toISOString()}
1556
+
1557
+ ${text}
1558
+ `;
1559
+ writeFileSync2(tmpPath, content, "utf-8");
1560
+ const { renameSync: renameSync2 } = await import("fs");
1561
+ renameSync2(tmpPath, filePath);
1562
+ console.log(`OMP Remember: saved memory to .omp/memory/${fileName}`);
1563
+ } catch (err) {
1564
+ console.error("OMP remember failed:", err);
1565
+ process.exitCode = 1;
1566
+ }
1567
+ }
1568
+ async function runWriterMemory(args) {
1569
+ try {
1570
+ const { mkdirSync: mkdirSync3, readFileSync: readFileSync4, appendFileSync: appendFileSync2, existsSync: existsSync2 } = await import("fs");
1571
+ const { join: join7, dirname: dirname4 } = await import("path");
1572
+ const filePath = join7(process.cwd(), ".omp", "writer-memory.md");
1573
+ mkdirSync3(dirname4(filePath), { recursive: true });
1574
+ if (args.length === 0) {
1575
+ if (!existsSync2(filePath)) {
1576
+ console.log("OMP Writer Memory: no style notes found. Use: omp writer-memory <style-note>");
1577
+ return;
1578
+ }
1579
+ const content = readFileSync4(filePath, "utf-8");
1580
+ console.log(content);
1581
+ return;
1582
+ }
1583
+ const note = args.join(" ");
1584
+ const entry = `
1585
+ ## ${(/* @__PURE__ */ new Date()).toISOString()}
1586
+
1587
+ ${note}
1588
+ `;
1589
+ appendFileSync2(filePath, entry, "utf-8");
1590
+ console.log(`OMP Writer Memory: appended style note to .omp/writer-memory.md`);
1591
+ } catch (err) {
1592
+ console.error("OMP writer-memory failed:", err);
1593
+ process.exitCode = 1;
1594
+ }
1595
+ }
857
1596
  main().catch((err) => {
858
1597
  console.error(err);
859
1598
  process.exit(1);