@damian87/omp 0.8.0 → 0.10.0

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 (108) hide show
  1. package/.github/skills/create-skill/SKILL.md +3 -3
  2. package/.github/skills/daily-log/SKILL.md +1 -1
  3. package/.github/skills/jira-ticket/SKILL.md +6 -3
  4. package/.github/skills/omp-autopilot/SKILL.md +1 -1
  5. package/.github/skills/ralph/SKILL.md +6 -4
  6. package/.github/skills/research-codebase/SKILL.md +6 -6
  7. package/.github/skills/research-codebase/reference/agent-prompts.md +8 -8
  8. package/.github/skills/slack/SKILL.md +83 -0
  9. package/.github/skills/team/SKILL.md +5 -3
  10. package/.github/skills/team/scripts/team-launch.sh +11 -5
  11. package/.github/skills/ultraqa/SKILL.md +5 -2
  12. package/.github/skills/ultrawork/SKILL.md +5 -5
  13. package/.github/skills/weighted-consensus/SKILL.md +4 -3
  14. package/README.md +36 -38
  15. package/catalog/capabilities.json +46 -0
  16. package/catalog/skills-general.json +26 -0
  17. package/dist/src/cli.js +58 -5
  18. package/dist/src/cli.js.map +1 -1
  19. package/dist/src/comms/index.d.ts +13 -6
  20. package/dist/src/comms/index.js +65 -10
  21. package/dist/src/comms/index.js.map +1 -1
  22. package/dist/src/copilot/doctor.js +40 -5
  23. package/dist/src/copilot/doctor.js.map +1 -1
  24. package/dist/src/copilot/env-passthrough.d.ts +16 -0
  25. package/dist/src/copilot/env-passthrough.js +28 -0
  26. package/dist/src/copilot/env-passthrough.js.map +1 -0
  27. package/dist/src/copilot/launch.js +9 -1
  28. package/dist/src/copilot/launch.js.map +1 -1
  29. package/dist/src/copilot/trust.d.ts +22 -0
  30. package/dist/src/copilot/trust.js +62 -0
  31. package/dist/src/copilot/trust.js.map +1 -0
  32. package/dist/src/copilot/version.js +10 -0
  33. package/dist/src/copilot/version.js.map +1 -1
  34. package/dist/src/env/init.d.ts +6 -0
  35. package/dist/src/env/init.js +18 -0
  36. package/dist/src/env/init.js.map +1 -1
  37. package/dist/src/gateway/notify.d.ts +35 -0
  38. package/dist/src/gateway/notify.js +261 -0
  39. package/dist/src/gateway/notify.js.map +1 -0
  40. package/dist/src/gateway/target-parser.d.ts +76 -0
  41. package/dist/src/gateway/target-parser.js +105 -0
  42. package/dist/src/gateway/target-parser.js.map +1 -0
  43. package/dist/src/instructions-memory.js +6 -5
  44. package/dist/src/instructions-memory.js.map +1 -1
  45. package/dist/src/schedule/commands.js +1 -0
  46. package/dist/src/schedule/commands.js.map +1 -1
  47. package/dist/src/schedule/runner.d.ts +9 -0
  48. package/dist/src/schedule/runner.js +31 -1
  49. package/dist/src/schedule/runner.js.map +1 -1
  50. package/dist/src/schedule/types.d.ts +9 -0
  51. package/dist/src/team/tmux.d.ts +1 -1
  52. package/dist/src/team/tmux.js +41 -10
  53. package/dist/src/team/tmux.js.map +1 -1
  54. package/docs/plans/copilot-native-hooks.md +119 -0
  55. package/docs/plans/verification-plan.md +104 -0
  56. package/docs/slack-setup.md +33 -0
  57. package/hooks/hooks.json +52 -72
  58. package/package.json +11 -3
  59. package/plugin.json +12 -4
  60. package/scripts/agent-stop.mjs +87 -0
  61. package/scripts/error.mjs +1 -1
  62. package/scripts/lib/hook-output.mjs +32 -3
  63. package/scripts/lib/loop-driver.mjs +44 -0
  64. package/scripts/lib/version-check.mjs +3 -0
  65. package/scripts/post-tool-use.mjs +1 -1
  66. package/scripts/pre-tool-use.mjs +1 -1
  67. package/scripts/prompt-submit.mjs +4 -6
  68. package/scripts/session-end.mjs +1 -1
  69. package/scripts/session-start.mjs +5 -9
  70. package/dist/src/mcp/server.d.ts +0 -10
  71. package/dist/src/mcp/server.js +0 -44
  72. package/dist/src/mcp/server.js.map +0 -1
  73. package/dist/src/mcp/tools/daily-log.d.ts +0 -2
  74. package/dist/src/mcp/tools/daily-log.js +0 -148
  75. package/dist/src/mcp/tools/daily-log.js.map +0 -1
  76. package/dist/src/mcp/tools/index.d.ts +0 -9
  77. package/dist/src/mcp/tools/index.js +0 -15
  78. package/dist/src/mcp/tools/index.js.map +0 -1
  79. package/dist/src/mcp/tools/notepad.d.ts +0 -2
  80. package/dist/src/mcp/tools/notepad.js +0 -135
  81. package/dist/src/mcp/tools/notepad.js.map +0 -1
  82. package/dist/src/mcp/tools/project-memory.d.ts +0 -2
  83. package/dist/src/mcp/tools/project-memory.js +0 -91
  84. package/dist/src/mcp/tools/project-memory.js.map +0 -1
  85. package/dist/src/mcp/tools/shared-memory.d.ts +0 -2
  86. package/dist/src/mcp/tools/shared-memory.js +0 -148
  87. package/dist/src/mcp/tools/shared-memory.js.map +0 -1
  88. package/dist/src/mcp/tools/state.d.ts +0 -2
  89. package/dist/src/mcp/tools/state.js +0 -107
  90. package/dist/src/mcp/tools/state.js.map +0 -1
  91. package/dist/src/mcp/tools/trace.d.ts +0 -10
  92. package/dist/src/mcp/tools/trace.js +0 -102
  93. package/dist/src/mcp/tools/trace.js.map +0 -1
  94. package/dist/src/mcp/types.d.ts +0 -29
  95. package/dist/src/mcp/types.js +0 -7
  96. package/dist/src/mcp/types.js.map +0 -1
  97. package/dist/test/catalog.test.d.ts +0 -1
  98. package/dist/test/catalog.test.js +0 -21
  99. package/dist/test/catalog.test.js.map +0 -1
  100. package/dist/test/jira.test.d.ts +0 -1
  101. package/dist/test/jira.test.js +0 -26
  102. package/dist/test/jira.test.js.map +0 -1
  103. package/dist/test/lint.test.d.ts +0 -1
  104. package/dist/test/lint.test.js +0 -9
  105. package/dist/test/lint.test.js.map +0 -1
  106. package/dist/test/sync.test.d.ts +0 -1
  107. package/dist/test/sync.test.js +0 -15
  108. package/dist/test/sync.test.js.map +0 -1
@@ -35,6 +35,13 @@ export interface ScheduleJob {
35
35
  lastSummary?: string;
36
36
  lastLogPath?: string;
37
37
  active: boolean;
38
+ /**
39
+ * Optional outbound Slack target (`slack:C…`/`slack:G…`/`slack:D…`/`slack:U…`)
40
+ * for end-of-run notification. When set, the runner calls
41
+ * `gateway/notify.notify` with the run summary after each completed run.
42
+ * Notify failures never fail the job — they're logged to stderr only.
43
+ */
44
+ notifyTarget?: string;
38
45
  }
39
46
  /** One line in `results/<id>.jsonl`. "Seen" state lives in the cursor, not here. */
40
47
  export interface ScheduleRunResult {
@@ -57,4 +64,6 @@ export interface ScheduleAddOptions {
57
64
  ttlHours?: number;
58
65
  allowAllTools?: boolean;
59
66
  dryRun?: boolean;
67
+ /** See ScheduleJob.notifyTarget. */
68
+ notifyTarget?: string;
60
69
  }
@@ -20,7 +20,7 @@ export interface TmuxApi {
20
20
  sessionExists(session: string): boolean;
21
21
  listSessions(): string[];
22
22
  }
23
- export declare function makeTmux(runner?: TmuxRunner): TmuxApi;
23
+ export declare function makeTmux(runner?: TmuxRunner, env?: NodeJS.ProcessEnv): TmuxApi;
24
24
  export interface WaitForReadyOptions {
25
25
  /** Max time to wait in ms (default 60 000). */
26
26
  timeoutMs?: number;
@@ -1,4 +1,5 @@
1
1
  import { spawnSync } from "node:child_process";
2
+ import { copilotEnvPassthroughArgs } from "../copilot/env-passthrough.js";
2
3
  export function tmuxExec(args) {
3
4
  const r = spawnSync("tmux", args, { encoding: "utf8" });
4
5
  return {
@@ -10,6 +11,8 @@ export function tmuxExec(args) {
10
11
  const PROMPT_RE = /(?:^|\s)(?:[│┃║▌▐▏▕╎┆┊]\s*)?[›>❯$#%]\s*$/;
11
12
  const ACTIVE_HINTS = [
12
13
  /esc to interrupt/i,
14
+ /esc cancel/i, // Copilot CLI >=1.0.61 working indicator ("◉ Working esc cancel")
15
+ /[◉○◐◑]\s*working/i, // Copilot spinner + "Working"
13
16
  /running\s*[…\.]/,
14
17
  /background terminal/i,
15
18
  /tool call in progress/i,
@@ -34,13 +37,17 @@ export function paneLooksReady(captured) {
34
37
  export function paneHasActiveTask(captured) {
35
38
  return ACTIVE_HINTS.some((re) => re.test(captured));
36
39
  }
37
- export function makeTmux(runner = tmuxExec) {
40
+ export function makeTmux(runner = tmuxExec, env = process.env) {
41
+ // Forward COPILOT_* (BYOK) vars into worker panes; a running tmux server
42
+ // otherwise seeds new panes from its own global env, so workers fall back to
43
+ // GitHub-hosted models instead of the launcher's BYOK provider.
44
+ const envArgs = copilotEnvPassthroughArgs(env);
38
45
  return {
39
46
  newSession(session, cwd) {
40
- return runner(["new-session", "-d", "-P", "-F", "#S:0 #{pane_id}", "-s", session, "-c", cwd]);
47
+ return runner(["new-session", "-d", "-P", "-F", "#S:0 #{pane_id}", "-s", session, "-c", cwd, ...envArgs]);
41
48
  },
42
49
  splitWindow(target, cwd) {
43
- return runner(["split-window", "-h", "-t", target, "-d", "-P", "-F", "#{pane_id}", "-c", cwd]);
50
+ return runner(["split-window", "-h", "-t", target, "-d", "-P", "-F", "#{pane_id}", "-c", cwd, ...envArgs]);
44
51
  },
45
52
  sendKeys(target, ...keys) {
46
53
  return runner(["send-keys", "-t", target, ...keys]);
@@ -102,9 +109,10 @@ export async function waitForReady(api, target, options = {}) {
102
109
  // Ready: the '/ commands' status bar means the CLI input prompt is active
103
110
  if (CLI_READY_RE.test(captured))
104
111
  return true;
105
- // Auto-accept the folder trust dialog (send Enter = accept default)
112
+ // Auto-accept the folder trust dialog (send Enter = accept default).
113
+ // Use the `Enter` key name: Copilot CLI (>=1.0.61) ignores a literal `C-m`.
106
114
  if (!acceptedTrust && TRUST_RE.test(captured)) {
107
- api.sendKeys(target, "C-m");
115
+ api.sendKeys(target, "Enter");
108
116
  acceptedTrust = true;
109
117
  }
110
118
  await sleep(poll);
@@ -112,23 +120,46 @@ export async function waitForReady(api, target, options = {}) {
112
120
  }
113
121
  return false;
114
122
  }
123
+ /**
124
+ * True if `probe` still sits on the active input line (the last prompt-glyph
125
+ * line plus any wrapped continuation). Checks the input region only — not the
126
+ * whole scrollback — so the echo of an already-submitted message is not
127
+ * mistaken for a still-buffered prompt.
128
+ */
129
+ function promptStillBuffered(pane, probe) {
130
+ const lines = pane.split(/\r?\n/);
131
+ let idx = -1;
132
+ for (let i = lines.length - 1; i >= 0; i--) {
133
+ if (lines[i].includes("❯")) {
134
+ idx = i;
135
+ break;
136
+ }
137
+ }
138
+ if (idx === -1)
139
+ return false;
140
+ return lines.slice(idx).join("\n").includes(probe);
141
+ }
115
142
  export async function sendToWorker(api, target, text, options = {}) {
116
143
  const rounds = options.rounds ?? 6;
117
144
  const delayMs = options.delayMs ?? 150;
118
145
  const payload = text.length > 200 ? text.slice(0, 200) : text;
146
+ const probe = payload.slice(-Math.min(20, payload.length));
119
147
  api.sendText(target, payload);
120
148
  for (let i = 0; i < rounds; i++) {
121
- api.sendKeys(target, "C-m");
149
+ // Use the `Enter` key name: Copilot CLI (>=1.0.61) ignores a literal `C-m`,
150
+ // leaving the prompt buffered and unsent.
151
+ api.sendKeys(target, "Enter");
122
152
  await sleep(delayMs);
123
- const captured = api.capturePane(target, 5).stdout;
124
- if (!captured.includes(payload))
153
+ // Submitted once the prompt leaves the input line (the echo in scrollback
154
+ // does not count, so we never retype an already-sent message).
155
+ if (!promptStillBuffered(api.capturePane(target, 5).stdout, probe))
125
156
  return true;
126
157
  }
127
- // adaptive fallback: kill-line then retry once
158
+ // adaptive fallback: kill-line, retype, submit once more
128
159
  api.sendKeys(target, "C-u");
129
160
  await sleep(delayMs);
130
161
  api.sendText(target, payload);
131
- api.sendKeys(target, "C-m");
162
+ api.sendKeys(target, "Enter");
132
163
  return true;
133
164
  }
134
165
  //# sourceMappingURL=tmux.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tmux.js","sourceRoot":"","sources":["../../../src/team/tmux.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAU/C,MAAM,UAAU,QAAQ,CAAC,IAAc;IACrC,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;IACxD,OAAO;QACL,MAAM,EAAE,CAAC,CAAC,MAAM,IAAI,EAAE;QACtB,MAAM,EAAE,CAAC,CAAC,MAAM,IAAI,EAAE;QACtB,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fix/skill-cli-wiring`.
4
+ > Suggested branch: `feat/copilot-native-hooks`.
5
+
6
+ ## Problem
7
+
8
+ omp ships lifecycle hooks (`hooks/hooks.json` + `scripts/*.mjs`) but **none fire in
9
+ Copilot CLI**. Earlier this was attributed to "Copilot doesn't run hooks." That is
10
+ no longer true — Copilot CLI supports hooks; omp's are simply in the **wrong
11
+ schema**, so Copilot loads the file and matches zero events.
12
+
13
+ ### Evidence
14
+ - `node dist/src/cli.js` pane-state probe: omp's `ACTIVE_HINTS` miss Copilot 1.0.61's
15
+ real working indicator (`◉ Working esc cancel`) → busy-gate never fires (separate bug).
16
+ - `hooks/hooks.json` uses Claude Code schema: PascalCase events
17
+ (`SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `SessionEnd`,
18
+ `Error`), `matcher`/`command`/`timeout` keys.
19
+ - Copilot expects camelCase events + `version:1` + `bash`/`timeoutSec` keys, and has
20
+ an event omp doesn't define: **`agentStop`**.
21
+ - Docs: https://docs.github.com/en/copilot/reference/hooks-configuration ,
22
+ https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/use-hooks
23
+
24
+ ## Copilot hook facts (verified from docs)
25
+
26
+ Load order (all merged, all matching entries run): policy → repo `.github/hooks/*.json`
27
+ → user `~/.copilot/hooks/*.json` → inline `.github/copilot/settings.json` (and
28
+ `.claude/settings.json` cross-tool) → user `~/.copilot/settings.json` → **plugin
29
+ `hooks.json` or `hooks/hooks.json` in the plugin install dir**. Cloud agents load
30
+ ONLY `.github/hooks/*.json`.
31
+
32
+ Events + interventional outputs:
33
+ | event | input (key fields) | output that matters |
34
+ |---|---|---|
35
+ | `sessionStart` | `sessionId, cwd, source(startup\|resume\|new), initialPrompt?` | `additionalContext` (injected as user message) |
36
+ | `userPromptSubmitted` | prompt text | output ignored |
37
+ | `preToolUse` | tool name, args (`matcher` supported) | `permissionDecision` allow/deny/ask, `modifiedArgs`, `permissionDecisionReason` (fail-closed) |
38
+ | `postToolUse` | tool, args, result | `modifiedResult`, `additionalContext` |
39
+ | `postToolUseFailure` | tool, args, error | `additionalContext` |
40
+ | `errorOccurred` | error details | output ignored |
41
+ | `agentStop` | `sessionId, cwd, transcriptPath, stopReason:"end_turn"` | `{decision:"block"\|"allow", reason}` — `block` forces another turn, `reason` = next-turn prompt |
42
+
43
+ Hook I/O contract: input JSON on stdin, output JSON on stdout. Hook types:
44
+ `command` (bash/powershell), `http`, `prompt`.
45
+
46
+ ## Design
47
+
48
+ ### Slice 1 — Port the hook manifest to Copilot format
49
+ Rewrite `hooks/hooks.json` to:
50
+ ```json
51
+ {
52
+ "version": 1,
53
+ "hooks": {
54
+ "sessionStart": [{ "type": "command", "bash": "node \"$OMP_PLUGIN_ROOT\"/scripts/session-start.mjs", "timeoutSec": 5 }],
55
+ "userPromptSubmitted": [{ "type": "command", "bash": "node \"$OMP_PLUGIN_ROOT\"/scripts/prompt-submit.mjs", "timeoutSec": 5 }],
56
+ "preToolUse": [{ "type": "command", "bash": "node \"$OMP_PLUGIN_ROOT\"/scripts/pre-tool-use.mjs", "timeoutSec": 5 }],
57
+ "postToolUse": [{ "type": "command", "bash": "node \"$OMP_PLUGIN_ROOT\"/scripts/post-tool-use.mjs", "timeoutSec": 5 }],
58
+ "errorOccurred": [{ "type": "command", "bash": "node \"$OMP_PLUGIN_ROOT\"/scripts/error.mjs", "timeoutSec": 5 }],
59
+ "sessionEnd": [{ "type": "command", "bash": "node \"$OMP_PLUGIN_ROOT\"/scripts/session-end.mjs", "timeoutSec": 5 }],
60
+ "agentStop": [{ "type": "command", "bash": "node \"$OMP_PLUGIN_ROOT\"/scripts/agent-stop.mjs", "timeoutSec": 10 }]
61
+ }
62
+ }
63
+ ```
64
+ Resolve `$OMP_PLUGIN_ROOT` (the plugin install dir). Keep `hooks/hooks.json` path
65
+ (it is a recognized plugin source). Verify event names load via a throwaway diagnostic.
66
+
67
+ ### Slice 2 — Update script I/O contracts to Copilot schema
68
+ Each `scripts/*.mjs` must read Copilot's input JSON from stdin and emit Copilot's
69
+ output JSON to stdout (today they assume Claude shapes / print plain text):
70
+ - `session-start.mjs`: emit `{ "additionalContext": "<memory block>" }` — native
71
+ replacement for the copilot-instructions.md managed block (keep that as fallback).
72
+ - `pre-tool-use.mjs`: emit `{ "permissionDecision": "allow|deny|ask", ... }` only if
73
+ omp wants policy; otherwise no-op (REMEMBER: fail-closed — a crash denies the tool).
74
+ - `post-tool-use.mjs` / `error.mjs` / `session-end.mjs` / `prompt-submit.mjs`: adapt
75
+ fields; note `userPromptSubmitted`/`errorOccurred`/`sessionEnd` outputs are ignored.
76
+
77
+ ### Slice 3 — `agentStop` loop driver (the OMC-style loop)
78
+ New `scripts/agent-stop.mjs`:
79
+ 1. Read input `{ transcriptPath, cwd, ... }`.
80
+ 2. Read loop state `.omp/state/{ralph|ultrawork|ultraqa}.json` (already exists). If no
81
+ loop is active → `{decision:"allow"}` (normal stop).
82
+ 3. If active: tick the state machine (reuse `tickRalph`/equivalent) → check completion:
83
+ - completion sentinel present in transcript (e.g. `RALPH_DONE`) OR PRD/criteria met → `omp ralph cancel`, `{decision:"allow"}`.
84
+ - max iterations reached → `{decision:"allow"}` + note "stopped at cap".
85
+ - else → `{decision:"block", reason:"[RALPH ITERATION n/max] Not done. Continue. Output RALPH_DONE only when all acceptance criteria pass."}`.
86
+ 4. This makes `/ralph`, `/ultrawork`, `/ultraqa` self-drive without pane-scraping.
87
+
88
+ This supersedes the current in-prompt loop wiring from `fix/skill-cli-wiring`
89
+ (those CLI calls remain valid as the state source the hook reads).
90
+
91
+ ### Slice 4 — fix stale `ACTIVE_HINTS` (carry from audit)
92
+ Add Copilot 1.0.61 working markers (`Working esc cancel`, spinner glyphs `◉○◐◑`,
93
+ elapsed timer) so the `commsSend` busy-gate and any fallback pane-state work for
94
+ headless `copilot -p` (which skips hooks). Small; could also land on the fix branch.
95
+
96
+ ### Slice 5 — `omp setup` writes/refreshes hooks
97
+ Ensure `omp setup` installs the Copilot-format hooks (plugin dir is automatic;
98
+ optionally also offer `~/.copilot/hooks/omp.json` for non-plugin installs). `omp doctor`
99
+ should check that the manifest parses as Copilot v1 and that `agentStop` is present.
100
+
101
+ ## Verification plan
102
+ - Static: a diagnostic hook (absolute path, writes a file) fires on `sessionStart` and
103
+ `agentStop` in a real interactive session (the test the old memory used to prove they
104
+ DON'T fire — now expected to PASS).
105
+ - Unit: `agent-stop.mjs` decision logic (active+incomplete → block; complete → allow;
106
+ cap → allow) with a fake transcript + state file.
107
+ - **Live (post-quota, after Jul 1 or Pro):** run `/ralph` on a small task and confirm it
108
+ iterates via `agentStop` re-prompts until the sentinel, then stops. This is the only
109
+ part that needs model quota.
110
+
111
+ ## Risks / open questions
112
+ - `$OMP_PLUGIN_ROOT` resolution inside the bash hook (env availability at hook runtime).
113
+ - `preToolUse` is fail-closed — a buggy omp pre-tool hook would block ALL tools; keep it
114
+ trivially safe or omit until needed.
115
+ - Double memory injection if both `sessionStart` additionalContext AND the
116
+ copilot-instructions.md block are active — pick one as primary, keep the other as fallback.
117
+ - Loop sentinel reliability: model must emit the exact completion token; needs a clear
118
+ contract in the ralph SKILL.md.
119
+ - Cloud agents only load `.github/hooks/` — plugin hooks won't apply there.
@@ -0,0 +1,104 @@
1
+ # Verification Plan — PR #31 (skill audit fixes + Copilot-native hooks)
2
+
3
+ > Purpose: prove every change in PR #31 actually works against a real Copilot CLI
4
+ > session. Split into what is ALREADY verified (no re-run needed) and the DEFERRED
5
+ > live checks that need Copilot model quota (Free tier resets Jul 1; or use Pro).
6
+
7
+ ## Legend
8
+ - ✅ done = already executed and green this cycle (do not redo)
9
+ - ⏳ deferred = needs Copilot model quota; run when available
10
+
11
+ ## Verification log — 2026-06-13 (live, no model quota needed)
12
+ **B1 (hooks fire) EXECUTED and a real bug was found + fixed.**
13
+ - Copilot CLI 1.0.61 DOES load+run plugin hooks (logged `Invalid hooks config … hooks must be an object` on the old Claude-format file; accepted the new v1 format with no error).
14
+ - First live run: every hook fired but failed — `HookExitCodeError: code 1` — because the command used `${OMP_PLUGIN_ROOT:-$OMC_PLUGIN_ROOT}`, which Copilot does NOT set. Captured the hook runtime env: Copilot exposes **`COPILOT_PLUGIN_ROOT`** (and `PLUGIN_ROOT` / `CLAUDE_PLUGIN_ROOT`).
15
+ - Fix (commit e7658d8): manifest now uses `${COPILOT_PLUGIN_ROOT:-…}`.
16
+ - Re-run after fix: `.omp/state/hooks.log` recorded `SessionStart` (correct `directory`), `UserPromptSubmit`, and `errorOccurred` (caught the quota error); **zero new HookExitCodeError**. → B1 PASS.
17
+ - Still ⏳: `agentStop` firing on a *completed* turn + Copilot honoring `{decision:"block"}` re-prompt — the turn quota-errored (→ errorOccurred) instead of completing, so the loop re-prompt is unexercised until quota.
18
+
19
+ ---
20
+
21
+ ## A. Already verified (evidence on record)
22
+
23
+ | Check | How | Result |
24
+ |---|---|---|
25
+ | Build from clean | `rm -rf dist && npm run build` | ✅ |
26
+ | Unit/integration suite | `npx vitest run` | ✅ 508/508 |
27
+ | Type safety | `npx tsc -p tsconfig.json --noEmit` | ✅ clean |
28
+ | Skill lint | `node dist/src/cli.js lint:skills --root .` | ✅ 0 issues |
29
+ | Catalog | `node dist/src/cli.js catalog validate` | ✅ pass |
30
+ | Every hook script emits valid JSON | pipe Copilot payload to each `scripts/*.mjs` | ✅ 7/7 |
31
+ | `preToolUse` safe (no spurious deny) | pipe payload | ✅ allow |
32
+ | `agent-stop` fails OPEN on bad input | `echo '' \| node scripts/agent-stop.mjs` | ✅ allow |
33
+ | `agent-stop` loop math | stdin pipe: 1/3→2/3→allow+clear on sentinel; unit tests | ✅ |
34
+ | `comms send` submits (C-m→Enter) | live `omp comms send … --json` | ✅ ok=True submitted=True |
35
+ | doctor validates manifest | `omp doctor --json` | ✅ "Copilot v1, 7 events (agentStop present)" |
36
+ | Fixed skills reference omp CLI | grep | ✅ ralph/ultrawork/ultraqa/jira |
37
+
38
+ These do NOT need re-running unless code changes.
39
+
40
+ ---
41
+
42
+ ## B. Deferred live verification (needs Copilot model quota)
43
+
44
+ ### Prerequisites
45
+ 1. Quota available (Jul 1 reset, or Copilot Pro). Confirm: a trivial `omp comms ask --text "say OK" --wait` returns a model reply, not `quota_exceeded`.
46
+ 2. Plugin synced to this branch: `rsync -a --delete .github/ ~/.copilot/installed-plugins/oh-my-copilot/oh-my-copilot/.github/` and copy `hooks/`, `plugin.json`, `scripts/` (or reinstall the plugin from this branch).
47
+ 3. Restart Copilot so it loads the new hooks + skills.
48
+
49
+ ### B1 — Hooks actually fire (the claim the old memory said was impossible)
50
+ Install a throwaway diagnostic that writes a file, then start a session.
51
+ - **sessionStart**: file written on boot (past trust prompt). PASS = file exists.
52
+ - **agentStop**: file written when the agent finishes a turn. PASS = file exists.
53
+ - **preToolUse/postToolUse**: file written around a tool call.
54
+ - Acceptance: ≥ sessionStart + agentStop fire. (If none fire, the `${OMP_PLUGIN_ROOT}` env resolution in `hooks/hooks.json` is the suspect — see design doc risk.)
55
+
56
+ ### B2 — Native memory injection (sessionStart)
57
+ - `omp goal set "ship v1"`, start a fresh session, ask the model "what is the repo goal?".
58
+ - Acceptance: model reports the goal from `additionalContext` (not only from copilot-instructions.md). Confirm by temporarily blanking the instructions block and re-testing.
59
+
60
+ ### B3 — agentStop loop driver (headline feature)
61
+ - `omp ralph start "add a --version flag to the omp CLI" --max-iterations 3`.
62
+ - Drive one short task turn; let the agent stop WITHOUT emitting `RALPH_COMPLETE`.
63
+ - Acceptance:
64
+ - agentStop returns `{decision:"block"}` and Copilot takes another turn with the `[RALPH ITERATION n/3]` prompt.
65
+ - `.omp/state/ralph.json` iteration increments each turn.
66
+ - On emitting `RALPH_COMPLETE` (or hitting 3) → `{decision:"allow"}`, loop stops, state cleared.
67
+ - Repeat for `ultraqa` (cycleCount) and `ultrawork`.
68
+
69
+ ### B4 — 23-skill behavioral re-run (audit Gate 2)
70
+ Re-run the existing harness against both models Copilot exposes:
71
+ ```bash
72
+ node .review/driver.mjs --session <copilot-tmux> --model gpt5mini --skills all
73
+ node .review/driver.mjs --session <copilot-tmux> --model haiku45 --skills all
74
+ ```
75
+ Score each transcript 0–3: (a) skill loaded (`● skill(x)`), (b) followed phase/contract, (c) produced contracted output, (d) avoided its own "do not use" anti-pattern.
76
+
77
+ Targeted acceptance for the previously-broken skills:
78
+ | skill | must observe live |
79
+ |---|---|
80
+ | ralph | runs `omp ralph start` before the work loop |
81
+ | ultrawork | runs `omp ultrawork start` |
82
+ | ultraqa | runs `omp ultraqa start` + `omp ultraqa cycle` per cycle |
83
+ | jira-ticket | runs `omp jira render` (dry-run) — does NOT improvise raw REST/create |
84
+ | research-codebase | uses native glob/grep/read (NO `task`/`view`/`explore` tool calls) |
85
+ | caveman | output is actually compressed (the static gate showed plain prose — confirm fixed or file a bug) |
86
+ | grill-me | asks exactly ONE question |
87
+
88
+ ### B5 — `/team` end-to-end
89
+ - `omp team 2:copilot "<small task>" --name vtest`; confirm workers receive prompts (already verified delivery live), DO the task, and the leader aggregates results. Then `omp team shutdown vtest`.
90
+
91
+ ---
92
+
93
+ ## C. Sign-off checklist
94
+ - [ ] B1 sessionStart + agentStop fire
95
+ - [ ] B2 goal visible via hook injection
96
+ - [ ] B3 ralph/ultraqa/ultrawork loops re-prompt and stop correctly
97
+ - [ ] B4 all 5 previously-broken skills exhibit corrected behavior; 23-skill scores recorded to `.review/`
98
+ - [ ] B5 team completes a task end-to-end
99
+ - [ ] Any new defect filed; report appended to `.review/REPORT.md`
100
+
101
+ ## D. Notes
102
+ - Cloud agents only load `.github/hooks/` (not plugin hooks) — B1–B3 target the local CLI.
103
+ - Keep all transcripts under `.review/transcripts/` for reproducibility.
104
+ EOF
@@ -142,3 +142,36 @@ scripts keep running.
142
142
  - One Copilot session at a time (multiple `omp-<digits>` sessions → the bridge reports the
143
143
  ambiguity and asks you to pin `COPILOT_TMUX_SESSION`).
144
144
  - `omp gateway serve` is a long-running foreground process — run it under tmux/systemd to keep it up.
145
+
146
+ ## Outbound notifications (`omp gateway notify` + `/slack`)
147
+
148
+ The v0.8.0 inbound bridge above handles bidirectional chat (DM the bot → reply). For *outbound*
149
+ notifications (cron job results, ad-hoc "ping me when done", `/slack` in-session), you don't
150
+ need the gateway daemon running — outbound is a stateless REST call to `chat.postMessage`.
151
+
152
+ ```bash
153
+ # Default target lives in ~/.omp/.env (set during `omp env init`):
154
+ SLACK_HOME_CHANNEL=C0BOQV5434G # channel ID, or a user ID like U0123ABCD
155
+
156
+ # One-shot send (uses SLACK_HOME_CHANNEL):
157
+ omp gateway notify --text "deploy finished"
158
+
159
+ # Explicit target overrides:
160
+ omp gateway notify --text "hi #releases" --target slack:C0RELEASE9
161
+ omp gateway notify --text "PR review please" --target slack:U0123ABCD # auto-DMs the user
162
+
163
+ # Inside Copilot — same thing via skill:
164
+ /slack the migration just finished cleanly
165
+
166
+ # Cron job posts its result at end-of-run:
167
+ omp schedule add --id pr-watch --cron "*/15 * * * *" --prompt "..." \
168
+ --notify-target slack:U0123ABCD
169
+ ```
170
+
171
+ Accepted target prefixes: `C` (public channel), `G` (private channel), `D` (DM channel),
172
+ `U` (user — we auto-call `conversations.open` to convert to a DM). Append `:<thread_ts>` to
173
+ pin to a thread (or pass `--thread-ts`).
174
+
175
+ Failure codes (`omp gateway notify --json` returns them):
176
+ `MISSING_TOKEN`, `MISSING_TARGET`, `BAD_TARGET`, `BAD_HOME_CHANNEL`, `OPEN_FAILED`,
177
+ `POST_FAILED`, `RATE_LIMITED`, `TIMEOUT`, `NETWORK_ERROR`.
package/hooks/hooks.json CHANGED
@@ -1,74 +1,54 @@
1
1
  {
2
- "SessionStart": [
3
- {
4
- "matcher": "*",
5
- "hooks": [
6
- {
7
- "type": "command",
8
- "command": "node \"${OMP_PLUGIN_ROOT:-$OMC_PLUGIN_ROOT}\"/scripts/session-start.mjs",
9
- "timeout": 5
10
- }
11
- ]
12
- }
13
- ],
14
- "UserPromptSubmit": [
15
- {
16
- "matcher": "*",
17
- "hooks": [
18
- {
19
- "type": "command",
20
- "command": "node \"${OMP_PLUGIN_ROOT:-$OMC_PLUGIN_ROOT}\"/scripts/prompt-submit.mjs",
21
- "timeout": 5
22
- }
23
- ]
24
- }
25
- ],
26
- "PreToolUse": [
27
- {
28
- "matcher": "*",
29
- "hooks": [
30
- {
31
- "type": "command",
32
- "command": "node \"${OMP_PLUGIN_ROOT:-$OMC_PLUGIN_ROOT}\"/scripts/pre-tool-use.mjs",
33
- "timeout": 5
34
- }
35
- ]
36
- }
37
- ],
38
- "PostToolUse": [
39
- {
40
- "matcher": "*",
41
- "hooks": [
42
- {
43
- "type": "command",
44
- "command": "node \"${OMP_PLUGIN_ROOT:-$OMC_PLUGIN_ROOT}\"/scripts/post-tool-use.mjs",
45
- "timeout": 5
46
- }
47
- ]
48
- }
49
- ],
50
- "SessionEnd": [
51
- {
52
- "matcher": "*",
53
- "hooks": [
54
- {
55
- "type": "command",
56
- "command": "node \"${OMP_PLUGIN_ROOT:-$OMC_PLUGIN_ROOT}\"/scripts/session-end.mjs",
57
- "timeout": 5
58
- }
59
- ]
60
- }
61
- ],
62
- "Error": [
63
- {
64
- "matcher": "*",
65
- "hooks": [
66
- {
67
- "type": "command",
68
- "command": "node \"${OMP_PLUGIN_ROOT:-$OMC_PLUGIN_ROOT}\"/scripts/error.mjs",
69
- "timeout": 5
70
- }
71
- ]
72
- }
73
- ]
2
+ "version": 1,
3
+ "hooks": {
4
+ "sessionStart": [
5
+ {
6
+ "type": "command",
7
+ "bash": "node \"${COPILOT_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-${OMP_PLUGIN_ROOT:-$OMC_PLUGIN_ROOT}}}}\"/scripts/session-start.mjs",
8
+ "timeoutSec": 5
9
+ }
10
+ ],
11
+ "userPromptSubmitted": [
12
+ {
13
+ "type": "command",
14
+ "bash": "node \"${COPILOT_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-${OMP_PLUGIN_ROOT:-$OMC_PLUGIN_ROOT}}}}\"/scripts/prompt-submit.mjs",
15
+ "timeoutSec": 5
16
+ }
17
+ ],
18
+ "preToolUse": [
19
+ {
20
+ "type": "command",
21
+ "bash": "node \"${COPILOT_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-${OMP_PLUGIN_ROOT:-$OMC_PLUGIN_ROOT}}}}\"/scripts/pre-tool-use.mjs",
22
+ "timeoutSec": 5
23
+ }
24
+ ],
25
+ "postToolUse": [
26
+ {
27
+ "type": "command",
28
+ "bash": "node \"${COPILOT_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-${OMP_PLUGIN_ROOT:-$OMC_PLUGIN_ROOT}}}}\"/scripts/post-tool-use.mjs",
29
+ "timeoutSec": 5
30
+ }
31
+ ],
32
+ "errorOccurred": [
33
+ {
34
+ "type": "command",
35
+ "bash": "node \"${COPILOT_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-${OMP_PLUGIN_ROOT:-$OMC_PLUGIN_ROOT}}}}\"/scripts/error.mjs",
36
+ "timeoutSec": 5
37
+ }
38
+ ],
39
+ "sessionEnd": [
40
+ {
41
+ "type": "command",
42
+ "bash": "node \"${COPILOT_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-${OMP_PLUGIN_ROOT:-$OMC_PLUGIN_ROOT}}}}\"/scripts/session-end.mjs",
43
+ "timeoutSec": 5
44
+ }
45
+ ],
46
+ "agentStop": [
47
+ {
48
+ "type": "command",
49
+ "bash": "node \"${COPILOT_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-${OMP_PLUGIN_ROOT:-$OMC_PLUGIN_ROOT}}}}\"/scripts/agent-stop.mjs",
50
+ "timeoutSec": 10
51
+ }
52
+ ]
53
+ }
74
54
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@damian87/omp",
3
- "version": "0.8.0",
4
- "description": "GitHub Copilot project skills catalog and Jira handoff tools.",
3
+ "version": "0.10.0",
4
+ "description": "Multi-agent orchestration for GitHub Copilot CLI autonomous loops (Autopilot, Ralph, UltraQA, Ultrawork), parallel tmux agent teams, a weighted-consensus model council, a Slack chat bridge, durable scheduled jobs, and in-session skills + custom agents. Zero learning curve.",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -42,7 +42,15 @@
42
42
  "copilot",
43
43
  "skills",
44
44
  "agents",
45
- "slash-commands"
45
+ "slash-commands",
46
+ "orchestration",
47
+ "multi-agent",
48
+ "ai-agents",
49
+ "tmux",
50
+ "automation",
51
+ "autopilot",
52
+ "slack",
53
+ "cli"
46
54
  ],
47
55
  "license": "MIT",
48
56
  "engines": {
package/plugin.json CHANGED
@@ -1,11 +1,19 @@
1
1
  {
2
2
  "name": "oh-my-copilot",
3
- "description": "Lite slash-skill workflows for GitHub Copilot.",
4
- "version": "0.1.0",
5
- "author": { "name": "Damian Borek", "email": "borekdamian@yahoo.pl" },
3
+ "description": "Multi-agent orchestration skills for GitHub Copilot CLI — autopilot, ralph, ultrawork, ultraqa, team, council, code-review and more as in-session slash skills + custom agents.",
4
+ "version": "0.10.0",
5
+ "author": {
6
+ "name": "Damian Borek",
7
+ "email": "borekdamian@yahoo.pl"
8
+ },
6
9
  "license": "MIT",
7
10
  "repository": "https://github.com/damian87x/oh-my-copilot",
8
- "keywords": ["copilot", "skills", "agents", "slash-commands"],
11
+ "keywords": [
12
+ "copilot",
13
+ "skills",
14
+ "agents",
15
+ "slash-commands"
16
+ ],
9
17
  "skills": ".github/skills/",
10
18
  "agents": ".github/agents/",
11
19
  "instructions": ".github/copilot-instructions.md",