Commit Graph

10 Commits

Author SHA1 Message Date
YeonGyu-Kim 2b4e094982 fix(omo-codex): bundle explorer/librarian/plan agent TOMLs for spawn_agent
The synced Codex skills (refactor, review-work, remove-ai-slops) emit
`spawn_agent(agent_type="explorer"/"librarian"/"plan", ...)` guidance
that sync-skills.mjs injects into every skill containing OpenCode-only
orchestration calls. Only codex-ultrawork-reviewer.toml was bundled, so
Codex had no matching agent role to dispatch.

An older omo-codex release shipped explorer/librarian/plan TOMLs but
without the required top-level `name` field, leaving Codex to warn:

  Ignoring malformed agent role definition: agent role file at
  ~/.codex/agents/<name>.toml must define a non-empty `name`

This commit bundles three correctly-formed TOMLs into
components/ultrawork/agents/. Each has the full schema Codex parses:
`name`, `description`, `nickname_candidates`, `model`,
`model_reasoning_effort`, `service_tier`, `developer_instructions`.
The existing sync-agents.py SessionStart hook installs them via rglob
into CODEX_HOME/agents/.

Models match the original design: explorer + librarian on gpt-5.4-mini
low effort (fast contextual + external research); plan on gpt-5.5
xhigh effort (deep reasoning + interview-style planning).

Tests:
- test/bundled-agents.test.mjs: locks the sync-hook contract by
  running sync-agents.py against a temp CODEX_HOME and verifying each
  TOML lands with the expected name + schema.
- test/aggregate.test.mjs: locks the schema keys on every bundled
  TOML and the spawn_agent contract (every in-scope agent_type
  referenced by a synced skill has a matching bundle).

Follow-up: the sync-skills.mjs compatibility table also references
`spawn_agent(agent_type="worker", ...)`. No worker.toml is present
in CODEX_HOME and Codex does not warn about its absence, suggesting
worker is a built-in Codex role. Confirm and ship worker.toml if not.
2026-05-28 13:58:12 +09:00
YeonGyu-Kim d4ee7ac58e fix(omo-codex): preserve user priority over bundled rules 2026-05-28 13:58:12 +09:00
YeonGyu-Kim ae9bf5771b fixup! feat(omo-codex): add PLUGIN_BUNDLED rule source to codex-rules engine 2026-05-28 13:58:12 +09:00
YeonGyu-Kim 2200e7dc0b feat(omo-codex): bundle Hephaestus craftsman baseline for every Codex session
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-28 13:58:12 +09:00
YeonGyu-Kim 8d2e6bea62 feat(omo-codex): add PLUGIN_BUNDLED rule source to codex-rules engine
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-28 13:58:12 +09:00
YeonGyu-Kim 73e8988f31 feat(omo-codex): enumerate 4 manual-QA channels + forbid tests-alone verification in ultrawork/ultragoal
Promote the four real-usage QA channels (HTTP call, tmux, Browser use, Computer use) into a dedicated top-level `# Manual-QA channels` section in both the Codex ultrawork directive and the ultragoal skill. Each channel ships with the concrete invocation (`curl -i`, `tmux new-session` + `send-keys` + `capture-pane`, Playwright / puppeteer / Chromium, OS-level GUI automation) and the artifact to capture. The Goal section now declares `TESTS ALONE NEVER PROVE DONE` and requires every criterion to build a fresh real-usage scenario and run it through one of the four channels every time. Auxiliary surfaces (CLI stdout / DB diff / parsed config dump) are explicitly demoted: they only satisfy genuinely CLI- or data-shaped criteria, never user-facing behavior.

Bootstrap criterion item 2 and execution step 4 used to repeat the same surface enumeration; they now collapse onto the new channel table (single source of truth, less drift). EXECUTE-AS-SCENARIO in the ultragoal skill follows the same compression. The previous CLEANUP (paired teardown + receipt) + leftover-state stop rule from the prior commit are preserved.

Regression tests in `components/ultrawork/hooks/ultrawork-hooks.test.mjs` pin: the `# Manual-QA channels` heading, all four channel labels (`HTTP call`, `tmux`, `Browser use`, `Computer use`), `TESTS ALONE NEVER PROVE DONE`, `every criterion needs its own real-usage scenario`, and `every time`. README + CHANGELOGs document the restructure and the new size (11,005 chars / 232 lines). All 11 ultrawork hook tests + 7 aggregate tests pass. Installed locally via `runCodexInstaller` into `~/.codex/plugins/cache/code-yeongyu-codex-plugins/omo/0.1.0/`; cache hooks emit the new directive end-to-end and the identifier-like `ulw_helper.ts` keyword-boundary check still suppresses.
2026-05-28 13:58:12 +09:00
YeonGyu-Kim e746dcf0d8 feat(omo-codex): mandate manual-QA-as-scenario + paired cleanup in ultrawork/ultragoal
Both the Codex ultrawork directive and the ultragoal skill now force the agent to actually invoke the real user-facing surface (HTTP via `curl -i`, terminal/TUI via `tmux new-session` + `send-keys` + `capture-pane`, GUI via computer-use / Playwright, CLI stdout, DB diff) instead of treating evidence as a free-form artifact list. A paired CLEANUP step requires teardown of every QA-spawned process, tmux session, browser context, container, bound port, temp file/dir, and QA-only env var, with a one-line cleanup receipt recorded next to the artifact path (ultrawork) or embedded in the `--evidence` string (ultragoal). Missing receipt keeps the criterion in_progress / records BLOCKED. New Stop rule: leftover state from QA means NOT done.

Regression tests in `components/ultrawork/hooks/ultrawork-hooks.test.mjs` pin SURFACE-AS-SCENARIO, the concrete `curl -i` / `tmux new-session` / `computer-use / Playwright` invocations, the paired CLEANUP block with cleanup receipt + `tmux kill-session`, and the leftover-state Stop rule so the mandates cannot be silently regressed. README and CHANGELOGs refreshed; stale 5,821-char claim replaced with measured 10,037 chars / 213 lines. All 9 ultrawork hook tests + 7 aggregate tests pass.
2026-05-28 13:58:12 +09:00
YeonGyu-Kim f77338b4a2 refactor(omo-codex): sync telemetry component sources 2026-05-28 13:58:11 +09:00
YeonGyu-Kim bd867019f9 feat(omo-codex): wire Codex SessionStart telemetry for DAU/WAU/MAU
Adds a new Codex plugin component `telemetry` that emits a single
omo_codex_daily_active event (reason: session_start) from every Codex
SessionStart hook, with the same UTC-day deduplication, hashed
installation identifier, and four-flag opt-out as the install-time
event. Previously omo-codex telemetry only fired on install_completed,
so DAU/WAU/MAU under-reported real Codex usage.

- New plugin component packages/omo-codex/plugin/components/telemetry/
  mirrors the rules/comment-checker/lsp pattern: own src/, tsc build,
  vitest tests, package.json (posthog-node dep), hooks/hooks.json.
- src/codex-hook.ts wraps createPluginPostHog().trackActive(..., "session_start")
  with safeShutdown so Codex session startup never blocks on telemetry.
- Plugin root hooks.json + workspaces register the new component
  alongside rules and ultrawork on SessionStart.
- Aggregate test expectations updated to include the telemetry directory.
- cross-package-equivalence.test.ts pins product-identity constants and
  shouldDisablePostHog behavior to stay byte-equivalent between the CLI
  installer (src/telemetry/) and the plugin runtime
  (plugin/components/telemetry/src/), so the two PostHog sources never
  drift on event name, distinct_id base, dedup file path, or opt-out
  flags.
- PostHogActivityReason union in the CLI-side posthog.ts gains
  "session_start" so future CLI paths can emit the same reason without
  a type break.
2026-05-28 13:58:11 +09:00
YeonGyu-Kim 2415f37bc0 vendor: import codex-plugins as packages/omo-codex/{plugin,scripts,marketplace.json,MARKETPLACE.md} 2026-05-28 13:58:11 +09:00