oh-my-opencode 4.16.2 → 4.17.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.
- package/.agents/command/omomomo.md +1 -1
- package/.agents/skills/hyperplan/SKILL.md +3 -3
- package/.agents/skills/omomomo/SKILL.md +1 -1
- package/.agents/skills/pre-publish-review/SKILL.md +3 -0
- package/.opencode/command/omomomo.md +1 -1
- package/.opencode/skills/hyperplan/SKILL.md +3 -3
- package/.opencode/skills/pre-publish-review/SKILL.md +3 -0
- package/README.ja.md +4 -4
- package/README.ko.md +4 -4
- package/README.md +4 -4
- package/README.ru.md +4 -4
- package/README.zh-cn.md +4 -4
- package/dist/agents/hephaestus/agent.d.ts +1 -1
- package/dist/agents/hephaestus/gpt-5-6.d.ts +2 -0
- package/dist/agents/momus-gpt-5-6.d.ts +1 -0
- package/dist/agents/types.d.ts +2 -0
- package/dist/cli/index.js +947 -567
- package/dist/cli-node/index.js +947 -567
- package/dist/features/background-agent/error-classifier.d.ts +5 -0
- package/dist/features/builtin-commands/templates/refactor-sections/intro-and-analysis.d.ts +1 -1
- package/dist/features/builtin-commands/templates/remove-ai-slops.d.ts +1 -1
- package/dist/features/team-mode/test-support/async-test-helpers.d.ts +2 -2
- package/dist/index.js +523 -81
- package/dist/plugin/chat-message/types.d.ts +4 -0
- package/dist/plugin/command-execute-before.d.ts +1 -0
- package/dist/plugin/stop-continuation.d.ts +17 -0
- package/dist/shared/live-server-route.d.ts +1 -1
- package/dist/skills/remove-ai-slops/SKILL.md +2 -2
- package/dist/skills/review-work/SKILL.md +1 -1
- package/dist/skills/start-work/SKILL.md +5 -2
- package/dist/skills/ulw-plan/references/full-workflow.md +1 -1
- package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
- package/dist/skills/ulw-research/SKILL.md +2 -2
- package/dist/skills/visual-qa/SKILL.md +1 -1
- package/dist/tui.js +195 -41
- package/package.json +15 -14
- package/packages/git-bash-mcp/package.json +27 -0
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +3 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +465 -248
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/AGENTS.md +2 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/cli.js +6 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/codex-hook.js +6 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/codex-hook.ts +6 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/cli.test.ts +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/codex-hook.test.ts +67 -2
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +0 -13
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +93 -0
- package/packages/omo-codex/plugin/components/rules/dist/cli.js +43 -24
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/src/codex-hook.ts +2 -1
- package/packages/omo-codex/plugin/components/rules/src/dynamic-target-fingerprints.ts +15 -6
- package/packages/omo-codex/plugin/components/rules/src/rules-engine-factory.ts +7 -2
- package/packages/omo-codex/plugin/components/rules/src/static-injection.ts +2 -2
- package/packages/omo-codex/plugin/components/rules/test/codex-hook.test.ts +32 -0
- package/packages/omo-codex/plugin/components/rules/test/hephaestus-model-variant.test.ts +106 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +1 -79
- package/packages/omo-codex/plugin/components/teammode/AGENTS.md +12 -9
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/SKILL.md +136 -76
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-guide.mjs +94 -23
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-state.mjs +94 -14
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-transport.mjs +55 -0
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team.mjs +72 -18
- package/packages/omo-codex/plugin/components/teammode/test/thread-title-hook.test.ts +23 -0
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/explorer.toml +23 -40
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-clone-fidelity-reviewer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +3 -3
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +7 -7
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-qa-executor.toml +5 -5
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-high.toml +26 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/{lazycodex-executor.toml → lazycodex-worker-low.toml} +7 -5
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-medium.toml +26 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/librarian.toml +20 -48
- package/packages/omo-codex/plugin/components/ultrawork/agents/metis.toml +17 -29
- package/packages/omo-codex/plugin/components/ultrawork/agents/momus.toml +20 -50
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +22 -43
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +55 -28
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +55 -28
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +22 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +0 -68
- package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/README.md +3 -1
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +55 -28
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +6 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.d.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.js +13 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +405 -25
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +12 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.d.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.js +16 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.js +20 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.js +12 -9
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.d.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.js +148 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +209 -0
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +25 -2
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +14 -15
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +29 -27
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +6 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-subcommands.ts +14 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +10 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +12 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/paths.ts +27 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-verdicts.ts +23 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate.ts +16 -9
- package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-guard.ts +138 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +208 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-create-goals.test.ts +12 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +4 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +8 -35
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/quality-gate-builder.ts +24 -13
- package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +5 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/paths.test.ts +43 -8
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate.test.ts +55 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-guard.test.ts +228 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +193 -0
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +18 -0
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +17 -0
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +2 -2
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/model-catalog.json +16 -7
- package/packages/omo-codex/plugin/package-lock.json +13 -13
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/auto-update.mjs +9 -2
- package/packages/omo-codex/plugin/scripts/entry-guard.mjs +26 -0
- package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +3 -1
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/catalog.mjs +16 -7
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +39 -4
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/subagent-limit-guard.mjs +24 -4
- package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +3 -3
- package/packages/omo-codex/plugin/scripts/migrate-omo-sot.mjs +2 -2
- package/packages/omo-codex/plugin/scripts/sync-hook-status-messages.mjs +2 -2
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +14 -6
- package/packages/omo-codex/plugin/scripts/sync-version.mjs +4 -2
- package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +5 -5
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +9 -3
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +6 -3
- package/packages/omo-codex/plugin/skills/teammode/SKILL.md +136 -76
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-guide.mjs +94 -23
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-state.mjs +94 -14
- package/packages/omo-codex/plugin/skills/teammode/scripts/team-transport.mjs +55 -0
- package/packages/omo-codex/plugin/skills/teammode/scripts/team.mjs +72 -18
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +55 -28
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +14 -15
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +29 -27
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +4 -4
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +4 -4
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +116 -10
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +23 -2
- package/packages/omo-codex/plugin/test/aggregate-manifest.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/aggregate-model-catalog.test.mjs +4 -4
- package/packages/omo-codex/plugin/test/aggregate-skills.test.mjs +4 -2
- package/packages/omo-codex/plugin/test/auto-update-restart-notice.test.mjs +33 -0
- package/packages/omo-codex/plugin/test/auto-update.test.mjs +4 -4
- package/packages/omo-codex/plugin/test/component-hook-contract-cases.mjs +2 -2
- package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +4 -101
- package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +160 -23
- package/packages/omo-codex/plugin/test/multi-agent-v2-regression.test.mjs +71 -0
- package/packages/omo-codex/plugin/test/subagent-limit-migration.test.mjs +32 -0
- package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +20 -2
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +1 -1
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +4 -2
- package/packages/omo-codex/plugin/test/teammode-transport.test.mjs +345 -0
- package/packages/omo-codex/plugin/test/ulw-plan-skill-contract.test.mjs +9 -40
- package/packages/omo-codex/plugin/test/ulw-research-skill-contract.test.mjs +4 -277
- package/packages/omo-codex/scripts/install-config-reasoning.test.mjs +5 -5
- package/packages/omo-codex/scripts/install-config.test.mjs +22 -3
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +508 -286
- package/packages/omo-codex/scripts/install-generated-bundle.test.mjs +111 -1
- package/packages/shared-skills/skills/remove-ai-slops/SKILL.md +2 -2
- package/packages/shared-skills/skills/review-work/SKILL.md +1 -1
- package/packages/shared-skills/skills/start-work/SKILL.md +5 -2
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +1 -1
- package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
- package/packages/shared-skills/skills/ulw-research/SKILL.md +2 -2
- package/packages/shared-skills/skills/visual-qa/SKILL.md +1 -1
- package/dist/skills/visual-qa/scripts/skill-prompt-contract.test.ts +0 -296
- package/packages/omo-codex/plugin/components/ulw-loop/test/skill-contract.test.ts +0 -70
- package/packages/omo-codex/plugin/test/ulw-research-epistemic-contract.test.mjs +0 -98
- package/packages/shared-skills/skills/visual-qa/scripts/skill-prompt-contract.test.ts +0 -296
- /package/packages/omo-codex/plugin/components/rules/bundled-rules/{hephaestus.md → hephaestus/gpt-5.5.md} +0 -0
|
@@ -15,15 +15,15 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
|
|
|
15
15
|
| `task(subagent_type="oracle", ...)` for final verification | `multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"lazycodex-gate-reviewer","fork_context":false})` |
|
|
16
16
|
| `task(category="...", ...)` for implementation or QA | `multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})` |
|
|
17
17
|
| `background_output(task_id="...")` | `multi_agent_v1.wait_agent(...)` for mailbox signals |
|
|
18
|
-
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent
|
|
18
|
+
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent` and `multi_agent_v1.wait_agent`; use `multi_agent_v1.send_input` and `multi_agent_v1.close_agent` only when exposed in the active tools list |
|
|
19
19
|
|
|
20
20
|
Role-specific behavior must be described in a self-contained `message`. Use `fork_context: false` to start the child with only the initial prompt (no parent history); use `fork_context: true` only when full parent history is truly required. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. OMO installs these selectable agent roles into `~/.codex/agents/`: `explorer`, `librarian`, `plan`, `momus`, `metis`, `lazycodex-code-reviewer`, `lazycodex-qa-executor`, and `lazycodex-gate-reviewer` - pass the matching name as `agent_type` so the child gets that role's model and instructions. If the spawn tool exposes no `agent_type` parameter, omit it and describe the role inside `message`. If a code block below conflicts with this section, this section wins.
|
|
21
21
|
|
|
22
|
-
Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. `agent_type`
|
|
22
|
+
Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. On the v2 surface `agent_type` may be ABSENT from the spawn schema (verified 2026-07-11: only `fork_turns`/`message`/`task_name`) — when absent, omit it and describe the role inside `message`; installed role TOMLs cannot be selected on that surface. If a code block below conflicts with this section, this section wins.
|
|
23
23
|
|
|
24
24
|
When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.
|
|
25
25
|
|
|
26
|
-
For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent` timeout only means no new mailbox update arrived. Treat a running child as alive. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.
|
|
26
|
+
For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent` timeout only means no new mailbox update arrived; back off between waits (double the timeout up to ~5 minutes) instead of spinning short cycles. Treat a running child as alive. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.
|
|
27
27
|
|
|
28
28
|
export const REFACTOR_TEMPLATE = `# Intelligent Refactor Command
|
|
29
29
|
|
|
@@ -15,15 +15,15 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
|
|
|
15
15
|
| `task(subagent_type="oracle", ...)` for final verification | `multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"lazycodex-gate-reviewer","fork_context":false})` |
|
|
16
16
|
| `task(category="...", ...)` for implementation or QA | `multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})` |
|
|
17
17
|
| `background_output(task_id="...")` | `multi_agent_v1.wait_agent(...)` for mailbox signals |
|
|
18
|
-
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent
|
|
18
|
+
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent` and `multi_agent_v1.wait_agent`; use `multi_agent_v1.send_input` and `multi_agent_v1.close_agent` only when exposed in the active tools list |
|
|
19
19
|
|
|
20
20
|
Role-specific behavior must be described in a self-contained `message`. Use `fork_context: false` to start the child with only the initial prompt (no parent history); use `fork_context: true` only when full parent history is truly required. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. OMO installs these selectable agent roles into `~/.codex/agents/`: `explorer`, `librarian`, `plan`, `momus`, `metis`, `lazycodex-code-reviewer`, `lazycodex-qa-executor`, and `lazycodex-gate-reviewer` - pass the matching name as `agent_type` so the child gets that role's model and instructions. If the spawn tool exposes no `agent_type` parameter, omit it and describe the role inside `message`. If a code block below conflicts with this section, this section wins.
|
|
21
21
|
|
|
22
|
-
Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. `agent_type`
|
|
22
|
+
Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. On the v2 surface `agent_type` may be ABSENT from the spawn schema (verified 2026-07-11: only `fork_turns`/`message`/`task_name`) — when absent, omit it and describe the role inside `message`; installed role TOMLs cannot be selected on that surface. If a code block below conflicts with this section, this section wins.
|
|
23
23
|
|
|
24
24
|
When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.
|
|
25
25
|
|
|
26
|
-
For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent` timeout only means no new mailbox update arrived. Treat a running child as alive. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.
|
|
26
|
+
For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent` timeout only means no new mailbox update arrived; back off between waits (double the timeout up to ~5 minutes) instead of spinning short cycles. Treat a running child as alive. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.
|
|
27
27
|
|
|
28
28
|
# Remove AI Slops Skill
|
|
29
29
|
|
|
@@ -84,7 +84,7 @@ The agent looks for these nine categories. The first three are stylistic, the ne
|
|
|
84
84
|
**Hard rule**: only apply when behavior equivalence is obvious. Do NOT change algorithms with subtle correctness implications. Do NOT micro-optimize hot paths without a benchmark. If in doubt, SKIP.
|
|
85
85
|
|
|
86
86
|
### Behavior coverage
|
|
87
|
-
9. **Missing tests** — behavior present in changed files that is not locked by any regression test. The fix is not to remove code but to ADD the narrowest test that pins the behavior.
|
|
87
|
+
9. **Missing tests** — behavior present in changed files that is not locked by any regression test. The fix is not to remove code but to ADD the narrowest test that pins the behavior. EXCEPTION: a PROSE file (prompt, `SKILL.md`, rule, markdown) has no behavioral seam — do NOT add a text/word-count/phrase pin for it; that guards a diff, not behavior. Cover only a machine-consumed value (parsed field, sentinel a runtime greps, a doc JSON sample through its real validator) or leave it to review.
|
|
88
88
|
|
|
89
89
|
### Structural
|
|
90
90
|
10. **Oversized modules** — any source file exceeding **250 pure LOC** (non-blank, non-comment lines). This is an architectural defect, not a style preference. Measure: `awk '!/^[[:space:]]*$/ && !/^[[:space:]]*(#|\/\/)/' <file> | wc -l`.
|
|
@@ -144,7 +144,7 @@ For each in-scope source file:
|
|
|
144
144
|
|
|
145
145
|
1. Identify the public/observable behavior the file exposes (exported functions, HTTP handlers, CLI commands, classes used elsewhere).
|
|
146
146
|
2. Check whether existing tests cover that behavior. Use `git grep` / project test conventions to find related test files.
|
|
147
|
-
3. **If behavior is uncovered or weakly covered, write the narrowest regression test that pins current behavior BEFORE editing the file.** Tests should pin observable outputs, not implementation details.
|
|
147
|
+
3. **If behavior is uncovered or weakly covered, write the narrowest regression test that pins current behavior BEFORE editing the file.** Tests should pin observable outputs, not implementation details. A PROSE file (prompt/`SKILL.md`/rule/markdown) is exempt — its wording is not behavior; skip the test and rely on review, or assert only a machine-consumed value.
|
|
148
148
|
4. Run the test suite (or at minimum the relevant tests). They must be **green** before any cleanup begins.
|
|
149
149
|
|
|
150
150
|
If you cannot establish a green baseline (e.g., test runner is broken), STOP and report. Do not proceed with cleanup on unverified ground.
|
|
@@ -14,15 +14,15 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
|
|
|
14
14
|
| `task(subagent_type="oracle", ...)` for final verification | `multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"lazycodex-gate-reviewer","fork_context":false})` |
|
|
15
15
|
| `task(category="...", ...)` for implementation or QA | `multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})` |
|
|
16
16
|
| `background_output(task_id="...")` | `multi_agent_v1.wait_agent(...)` for mailbox signals |
|
|
17
|
-
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent
|
|
17
|
+
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent` and `multi_agent_v1.wait_agent`; use `multi_agent_v1.send_input` and `multi_agent_v1.close_agent` only when exposed in the active tools list |
|
|
18
18
|
|
|
19
19
|
Role-specific behavior must be described in a self-contained `message`. Use `fork_context: false` to start the child with only the initial prompt (no parent history); use `fork_context: true` only when full parent history is truly required. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. OMO installs these selectable agent roles into `~/.codex/agents/`: `explorer`, `librarian`, `plan`, `momus`, `metis`, `lazycodex-code-reviewer`, `lazycodex-qa-executor`, and `lazycodex-gate-reviewer` - pass the matching name as `agent_type` so the child gets that role's model and instructions. If the spawn tool exposes no `agent_type` parameter, omit it and describe the role inside `message`. If a code block below conflicts with this section, this section wins.
|
|
20
20
|
|
|
21
|
-
Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. `agent_type`
|
|
21
|
+
Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. On the v2 surface `agent_type` may be ABSENT from the spawn schema (verified 2026-07-11: only `fork_turns`/`message`/`task_name`) — when absent, omit it and describe the role inside `message`; installed role TOMLs cannot be selected on that surface. If a code block below conflicts with this section, this section wins.
|
|
22
22
|
|
|
23
23
|
When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.
|
|
24
24
|
|
|
25
|
-
For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent` timeout only means no new mailbox update arrived. Treat a running child as alive. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.
|
|
25
|
+
For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent` timeout only means no new mailbox update arrived; back off between waits (double the timeout up to ~5 minutes) instead of spinning short cycles. Treat a running child as alive. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.
|
|
26
26
|
|
|
27
27
|
## Codex Subagent Reliability
|
|
28
28
|
|
|
@@ -64,6 +64,12 @@ failed, investigate the underlying uncertainty with the `debugging` skill when
|
|
|
64
64
|
runtime behavior may be wrong, fix with evidence, and rerun the affected lane
|
|
65
65
|
before claiming completion, creating or handing off a PR, or merging.
|
|
66
66
|
|
|
67
|
+
A rejecting lane must name its blockers inline in its final message — each
|
|
68
|
+
blocker cites the violated goal criterion or requirement plus an evidence
|
|
69
|
+
pointer. A bare REJECT/FAIL token without findings is not a verdict; treat it
|
|
70
|
+
as an inconclusive lane (one bounded respawn, then record it inconclusive with
|
|
71
|
+
that reason).
|
|
72
|
+
|
|
67
73
|
When reviewing a PR or branch, collect diff, file contents, and verification
|
|
68
74
|
results from a dedicated review worktree attached to that branch. Never
|
|
69
75
|
checkout, test, or edit the review branch in the main worktree.
|
|
@@ -15,20 +15,23 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
|
|
|
15
15
|
| `task(subagent_type="oracle", ...)` for final verification | `multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"lazycodex-gate-reviewer","fork_context":false})` |
|
|
16
16
|
| `task(category="...", ...)` for implementation or QA | `multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})` |
|
|
17
17
|
| `background_output(task_id="...")` | `multi_agent_v1.wait_agent(...)` for mailbox signals |
|
|
18
|
-
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent
|
|
18
|
+
| `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent` and `multi_agent_v1.wait_agent`; use `multi_agent_v1.send_input` and `multi_agent_v1.close_agent` only when exposed in the active tools list |
|
|
19
19
|
|
|
20
20
|
Role-specific behavior must be described in a self-contained `message`. Use `fork_context: false` to start the child with only the initial prompt (no parent history); use `fork_context: true` only when full parent history is truly required. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. OMO installs these selectable agent roles into `~/.codex/agents/`: `explorer`, `librarian`, `plan`, `momus`, `metis`, `lazycodex-code-reviewer`, `lazycodex-qa-executor`, and `lazycodex-gate-reviewer` - pass the matching name as `agent_type` so the child gets that role's model and instructions. If the spawn tool exposes no `agent_type` parameter, omit it and describe the role inside `message`. If a code block below conflicts with this section, this section wins.
|
|
21
21
|
|
|
22
|
-
Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. `agent_type`
|
|
22
|
+
Codex exposes ONE of two subagent tool surfaces per session; check your own tool list and route accordingly. If `multi_agent_v1.*` tools exist, use the table above as written. If instead a flat `spawn_agent` with a required `task_name` exists (`multi_agent_v2`), rewrite every `multi_agent_v1.*` example: `multi_agent_v1.spawn_agent({...,"fork_context":false})` becomes `spawn_agent({"task_name":"<lowercase_digits_underscores>","message":...,"agent_type":...,"fork_turns":"none"})` (`"all"` only when full parent history is truly required); `send_input` becomes `send_message`; do not call `close_agent`/`resume_agent` (finished agents end on their own; `followup_task` re-tasks one, `interrupt_agent` stops one); `wait_agent` takes only `timeout_ms` and returns on any child mailbox activity. On the v2 surface `agent_type` may be ABSENT from the spawn schema (verified 2026-07-11: only `fork_turns`/`message`/`task_name`) — when absent, omit it and describe the role inside `message`; installed role TOMLs cannot be selected on that surface. If a code block below conflicts with this section, this section wins.
|
|
23
23
|
|
|
24
24
|
When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.
|
|
25
25
|
|
|
26
|
-
For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent` timeout only means no new mailbox update arrived. Treat a running child as alive. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.
|
|
26
|
+
For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent` timeout only means no new mailbox update arrived; back off between waits (double the timeout up to ~5 minutes) instead of spinning short cycles. Treat a running child as alive. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.
|
|
27
27
|
|
|
28
28
|
## ABSOLUTE RULE: YOU ARE AN ORCHESTRATOR — NEVER THE IMPLEMENTER
|
|
29
29
|
|
|
30
30
|
**YOU DO NOT WRITE CODE. YOU DO NOT EDIT PRODUCT FILES. YOU DO NOT RUN QA YOURSELF. EVERY unit of implementation, test, QA, and review work MUST be delegated to a spawned subagent. NO EXCEPTIONS.** Your hands touch only plan selection, `.omo/` state (Boulder, ledger, plan checkboxes), decomposition, dispatch, verdicts, and evidence records. About to edit a product file or run an implementation command yourself? **STOP. SPAWN A WORKER INSTEAD.** Orchestrate at **MAXIMUM PARALLELISM**: every independent unit runs concurrently; only named dependencies serialize.
|
|
31
31
|
|
|
32
|
+
### Delegation by difficulty (Codex tier workers)
|
|
33
|
+
When tier worker agents are installed (Codex), size each implementation lane by difficulty and pass the matching `agent_type` where the spawn schema exposes it: LOW (one-file fix, boilerplate, config/copy) -> `lazycodex-worker-low`; MEDIUM (standard feature, few files, known patterns) -> `lazycodex-worker-medium`; HIGH (new module, cross-module refactor, concurrency/security/migration) -> `lazycodex-worker-high`. Explorer/librarian research lanes keep their own roles. Difficulty (model power) is orthogonal to the LIGHT/HEAVY rigor tier in step 4 — judge each on its own facts. On spawn surfaces without `agent_type` (deployed v2), state the tier inside `message`.
|
|
34
|
+
|
|
32
35
|
## Codex Subagent Reliability
|
|
33
36
|
|
|
34
37
|
Every `multi_agent_v1.spawn_agent` message is a self-contained executable assignment: `TASK: <imperative assignment>`, then `DELIVERABLE`, `SCOPE`, and `VERIFY`, with role instructions inside `message`. Use `fork_context: false` unless full history is truly required; paste only the context the child needs.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: teammode
|
|
3
|
-
description: "Codex-only team orchestration: run a named team of cooperating Codex
|
|
3
|
+
description: "Codex-only team orchestration: run a named team of cooperating Codex workers with durable, script-managed state. MUST USE when the user asks Codex to create, run, coordinate, inspect, archive, or delete a team of agents/threads/sessions, or to work on something as a team in parallel. FIRST inspects the active tool surface and tells the user which transport it selected: native MultiAgentV2 agents (flat spawn_agent with task_name) when available, Codex App threads as the fallback. The main session is always the leader; members are defined by a concrete part, ownership area, or perspective - never a vague job role; a bundled cross-platform script writes the .omo/teams state plus an auto-generated member field manual. Use a team when the work is not perfectly isolated but parallelizing helps; use plain subagents when scope is perfectly isolated or the goal is ambiguous. Triggers: team mode, teammode, make a team, run as a team, team of agents, coordinate threads, parallel Codex threads, archive the team."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Teammode
|
|
7
7
|
|
|
8
|
-
Run a named team of cooperating Codex
|
|
9
|
-
This is a Codex-only workflow. It
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
Run a named team of cooperating Codex workers under one leader, with durable state on disk.
|
|
9
|
+
This is a Codex-only workflow. It never depends on an external terminal runner - it
|
|
10
|
+
coordinates through Codex's own collaboration tools plus a bundled state script, on ONE of
|
|
11
|
+
two transports chosen up front: native MultiAgentV2 agents, or Codex App threads as the
|
|
12
|
+
fallback.
|
|
13
13
|
|
|
14
14
|
## When to use a team (and when to use plain subagents instead)
|
|
15
15
|
|
|
@@ -19,17 +19,43 @@ Use a TEAM when EITHER holds:
|
|
|
19
19
|
- one task still needs exploration, yet its GOAL is already clear - parallel investigation under
|
|
20
20
|
a fixed objective.
|
|
21
21
|
|
|
22
|
-
Use plain subagents (`$ulw` /
|
|
22
|
+
Use plain fire-and-forget subagents (`$ulw` / one-off `spawn_agent` workers) - NOT a team - when
|
|
23
|
+
EITHER holds:
|
|
23
24
|
- the work IS perfectly isolated, so there is no coordination cost worth paying; or
|
|
24
25
|
- the GOAL is still ambiguous, where one mind should resolve direction before any fan-out.
|
|
25
26
|
|
|
26
27
|
A team buys cross-member coordination at a real overhead cost; only spend it when coordination
|
|
27
28
|
is the thing you actually need.
|
|
28
29
|
|
|
30
|
+
## Pick the transport FIRST - then tell the user
|
|
31
|
+
|
|
32
|
+
Before creating any team state, decide which transport this session can run.
|
|
33
|
+
Inspect your active tool list and select:
|
|
34
|
+
|
|
35
|
+
1. **MultiAgentV2 (preferred)** - select when the flat V2 collaboration tools are ALL active:
|
|
36
|
+
flat `spawn_agent` whose schema requires `task_name`, plus `send_message`, `followup_task`,
|
|
37
|
+
`wait_agent`, `list_agents`, and `interrupt_agent`. Members are durable native agents
|
|
38
|
+
addressed by task name / agent path (`/root/<task_name>`). The namespaced
|
|
39
|
+
`multi_agent_v1.*` surface never qualifies as a team transport.
|
|
40
|
+
2. **Codex App threads (fallback)** - select when flat V2 is not available but the
|
|
41
|
+
`codex_app.*` thread tools are (`create_thread`, `read_thread`, `send_message_to_thread`,
|
|
42
|
+
`set_thread_title`, `set_thread_archived`).
|
|
43
|
+
3. **Neither complete set available** - STOP before `init`. Tell the user which tools are
|
|
44
|
+
missing; do not fake a team with partial tooling.
|
|
45
|
+
|
|
46
|
+
Then, BEFORE running `init`, tell the user in one line which transport you selected and why,
|
|
47
|
+
e.g. `Teammode transport: MultiAgentV2 (flat spawn_agent with task_name).` or
|
|
48
|
+
`Teammode transport: Codex App threads (flat V2 tools not present in this session).`
|
|
49
|
+
|
|
50
|
+
Pass that choice to `init` as `--transport multi_agent_v2` or `--transport codex_app`. The
|
|
51
|
+
transport is recorded in `team.json` and is IMMUTABLE for the team's lifetime: a V2 spawn
|
|
52
|
+
failure is a V2 blocker to report, never permission to mix Codex App threads into the same
|
|
53
|
+
team. Never probe by trial-calling tools; read your tool list.
|
|
54
|
+
|
|
29
55
|
## You are the leader - orchestrate, do not implement
|
|
30
56
|
|
|
31
57
|
The main session is ALWAYS the team leader; you orchestrate directly and never spin up a separate
|
|
32
|
-
leader
|
|
58
|
+
leader worker. Your job is orchestration, NOT writing product code: split the work and assign each
|
|
33
59
|
slice, hold live situational awareness of every member, verify and QA what they deliver, relay
|
|
34
60
|
findings between members, instruct and unblock, and synthesize the result. DELEGATE every code edit
|
|
35
61
|
to a member - if you catch yourself editing product files while the team runs, that work was a
|
|
@@ -39,7 +65,7 @@ merge), not the keystrokes.
|
|
|
39
65
|
## Compose by part, ownership, or perspective - not by job title
|
|
40
66
|
|
|
41
67
|
A team is ALWAYS two or more members - never a single-member team. One worker on an isolated
|
|
42
|
-
job is a
|
|
68
|
+
job is a plain subagent, not a team; if you end up with a single member,
|
|
43
69
|
either split off a second distinct slice or drop the team and use a subagent.
|
|
44
70
|
|
|
45
71
|
Compose the team from what you actually KNOW about the work. Ground the split in real knowledge
|
|
@@ -50,8 +76,10 @@ perspective/lens. Assigning a vague role ("backend dev", "release analyst", "the
|
|
|
50
76
|
anti-pattern - it gives the member no real boundary and invites overlap. Each member's `focus`
|
|
51
77
|
names what they own concretely; the `lens` is one of `area`, `ownership`, or `perspective`.
|
|
52
78
|
Give each member a short, distinct `--name` too - its role or what it watches (e.g.
|
|
53
|
-
`app-server-lifecycle`, `mailbox-delivery`) -
|
|
54
|
-
one name for two members.
|
|
79
|
+
`app-server-lifecycle`, `mailbox-delivery`) - it labels the member everywhere; never reuse
|
|
80
|
+
one name for two members. On MultiAgentV2 teams also give each member a unique
|
|
81
|
+
`--task-name` in `lowercase_digits_underscores` form - it becomes the member's permanent
|
|
82
|
+
agent path `/root/<task_name>`.
|
|
55
83
|
|
|
56
84
|
## Run the script - never hand-write team state
|
|
57
85
|
|
|
@@ -60,9 +88,10 @@ the member manual by hand. Run it with `node` (or `bun`); it works on macOS, Lin
|
|
|
60
88
|
Replace `<skill-root>` with this skill's own directory.
|
|
61
89
|
|
|
62
90
|
```
|
|
63
|
-
node "<skill-root>/scripts/team.mjs" init --name "<team>" --session-name "<session>" [--session <
|
|
64
|
-
node "<skill-root>/scripts/team.mjs" add-member --team <session_id> --id A --name "<short role>" --focus "<part/ownership/perspective>" --lens area|ownership|perspective --deliverable "<...>" [--branch <branch>]
|
|
65
|
-
node "<skill-root>/scripts/team.mjs" bind-
|
|
91
|
+
node "<skill-root>/scripts/team.mjs" init --name "<team>" --session-name "<session>" --transport multi_agent_v2|codex_app [--session <leader_thread_id>] [--worktree] [--base-branch dev]
|
|
92
|
+
node "<skill-root>/scripts/team.mjs" add-member --team <session_id> --id A --name "<short role>" [--task-name <v2_task_name>] --focus "<part/ownership/perspective>" --lens area|ownership|perspective --deliverable "<...>" [--branch <branch>]
|
|
93
|
+
node "<skill-root>/scripts/team.mjs" bind-agent --team <session_id> --id A --agent-path /root/<task_name> [--cwd <path>] # multi_agent_v2 teams
|
|
94
|
+
node "<skill-root>/scripts/team.mjs" bind-thread --team <session_id> --id A --thread <thread_id> [--cwd <path>] # codex_app teams
|
|
66
95
|
node "<skill-root>/scripts/team.mjs" member-prompt --team <session_id> --id A
|
|
67
96
|
node "<skill-root>/scripts/team.mjs" set-status --team <session_id> --id A --status reported|blocked|active|archived [--note "<...>"]
|
|
68
97
|
node "<skill-root>/scripts/team.mjs" worktree-add --team <session_id> --id A [--base-branch <branch>]
|
|
@@ -74,70 +103,93 @@ node "<skill-root>/scripts/team.mjs" status --team <session_id>
|
|
|
74
103
|
```
|
|
75
104
|
|
|
76
105
|
`init` creates `.omo/teams/{session_id}/` containing `team.json` (the single durable state file:
|
|
77
|
-
team id, the main-session leader, the member roster, status, worktree config, and a
|
|
78
|
-
log), `guide.md` (the auto-generated member field manual), and `artifacts/` (a shared
|
|
79
|
-
space). `{session_id}` is the leader's Codex session id when you can
|
|
80
|
-
otherwise the script generates a stable handle. Re-running `init` is a
|
|
81
|
-
subcommand rewrites `guide.md`, so the manual always matches the
|
|
106
|
+
team id, transport, the main-session leader, the member roster, status, worktree config, and a
|
|
107
|
+
lifecycle log), `guide.md` (the auto-generated member field manual), and `artifacts/` (a shared
|
|
108
|
+
exchange space). On codex_app teams `{session_id}` is the leader's Codex session id when you can
|
|
109
|
+
pass it via `--session`; otherwise the script generates a stable handle. Re-running `init` is a
|
|
110
|
+
safe no-op. Every mutating subcommand rewrites `guide.md`, so the manual always matches the
|
|
111
|
+
current team.
|
|
82
112
|
|
|
83
113
|
Mutating subcommands take a per-team state lock before reading and rewriting `team.json`. It is
|
|
84
|
-
safe to run independent `add-member`, `bind-thread`, `set-status`, `archive`,
|
|
85
|
-
and worktree mutation commands concurrently against the same team: they
|
|
86
|
-
reads the latest committed state before writing. If a command reports
|
|
87
|
-
do not treat the intended mutation as complete; retry after the named
|
|
88
|
-
`.omo/teams/{session_id}/.team.lock/owner.json` if the previous
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
`
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
3. `bind-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
4.
|
|
108
|
-
`codex
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
safe to run independent `add-member`, `bind-agent`, `bind-thread`, `set-status`, `archive`,
|
|
115
|
+
`delete`, `guide`, and worktree mutation commands concurrently against the same team: they
|
|
116
|
+
serialize and each command reads the latest committed state before writing. If a command reports
|
|
117
|
+
that team state is locked, do not treat the intended mutation as complete; retry after the named
|
|
118
|
+
command finishes, or inspect `.omo/teams/{session_id}/.team.lock/owner.json` if the previous
|
|
119
|
+
command crashed. `bind-agent` refuses codex_app teams and `bind-thread` refuses multi_agent_v2
|
|
120
|
+
teams, and a refused command never changes `team.json`.
|
|
121
|
+
|
|
122
|
+
## Create the team and its members
|
|
123
|
+
|
|
124
|
+
`init` the team, then `add-member` once per member. What happens next depends on the transport.
|
|
125
|
+
|
|
126
|
+
**MultiAgentV2 teams:**
|
|
127
|
+
1. If a member needs an isolated worktree, run `worktree-add` BEFORE spawning it - flat
|
|
128
|
+
`spawn_agent` has no cwd argument, so the path must ride in the bootstrap message.
|
|
129
|
+
2. Spawn each member with flat `spawn_agent`: `task_name` is that member's `--task-name`,
|
|
130
|
+
`message` is the bootstrap printed by `add-member` / `member-prompt`, and
|
|
131
|
+
`fork_turns: "none"` (members read `guide.md` for context; full parent history is not
|
|
132
|
+
their context model). Do not set `agent_type`, `model`, or `reasoning_effort`.
|
|
133
|
+
3. `bind-agent --agent-path` with the canonical task name the spawn returned (normally
|
|
134
|
+
`/root/<task_name>`); binding confirms the runtime identity matches the roster and records
|
|
135
|
+
the member's cwd. Members are durable: they persist as subagent threads, survive idling,
|
|
136
|
+
and are re-tasked with `followup_task` - never respawned under a second name.
|
|
137
|
+
4. Members appear in `list_agents` with their task paths; inspect status there instead of
|
|
138
|
+
deep links (V2 exposes no thread title or `codex://` link surface to you).
|
|
139
|
+
|
|
140
|
+
**Codex App teams:**
|
|
141
|
+
1. Create a durable thread per member with `codex_app.create_thread` - ALWAYS this tool for
|
|
142
|
+
every member - titled `[team name] <member name>`, using THAT member's own name, so no two
|
|
143
|
+
threads share a title. `add-member` prints the exact title to use. If the tool accepts a
|
|
144
|
+
working directory / cwd argument, set it to that member's worktree; otherwise the member's
|
|
145
|
+
manual tells it to `cd` there first. Use `codex_app.set_thread_title` if the title did not
|
|
146
|
+
land at creation. If Codex returns only `pendingWorktreeId`, the worktree-backed thread is
|
|
147
|
+
not ready yet: do not `bind-thread` and do not send the member bootstrap. Wait until Codex
|
|
148
|
+
surfaces a real `threadId`, then set the title, bind that real id with the cwd, and only
|
|
149
|
+
then send the bootstrap.
|
|
150
|
+
2. `bind-thread` to record each thread id (and `--cwd`), then send that member's bootstrap
|
|
151
|
+
trigger as the thread's first message. The trigger is short on purpose: it tells the new
|
|
152
|
+
thread to READ its `guide.md` and `team.json` rather than carrying the whole protocol inline.
|
|
153
|
+
3. Whenever you report, audit, reopen, or hand off a member thread, include the app deep link
|
|
154
|
+
`codex://threads/<thread_id>` next to the raw id - worktree-backed threads are easy to lose
|
|
155
|
+
in the sidebar without it. On a codex_app team, a spawned in-process agent is never a
|
|
156
|
+
member substitute: it cannot carry the team title or be inspected, titled, archived, or
|
|
157
|
+
re-opened with the `codex_app.*` tools this team runs on.
|
|
158
|
+
|
|
159
|
+
On either transport, a member only counts once it is bound (`bind-agent` / `bind-thread`). If
|
|
160
|
+
the selected transport's tools stop working mid-run, STOP and say so (see Stop rules); do not
|
|
161
|
+
quietly switch transports.
|
|
120
162
|
|
|
121
163
|
## Communication
|
|
122
164
|
|
|
123
|
-
Members push to you and to one another
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
165
|
+
Members push to you and to one another; you never poll them as a routine. The address book is
|
|
166
|
+
`team.json`, and the generated manual binds members to the hard rules, so you mainly keep the
|
|
167
|
+
channel open: expect frequent small inbound updates from each member - findings,
|
|
168
|
+
`WORKING:`/`BLOCKED:` markers, peer digests - rather than one final dump, and act on them as
|
|
169
|
+
they arrive.
|
|
170
|
+
|
|
171
|
+
- **MultiAgentV2:** members reach you with `send_message` to `/root` and reach peers by their
|
|
172
|
+
`members[].agentPath`. You reach members the same way; use `followup_task` when you hand an
|
|
173
|
+
idle member NEW work (it wakes the member), `send_message` for context that should not
|
|
174
|
+
interrupt, and `wait_agent` only when you are genuinely blocked on their next update - a
|
|
175
|
+
`wait_agent` timeout only means no new mailbox update arrived, never that a member failed.
|
|
176
|
+
Your own session IS `/root` - members can always reach you; leave `--session` unset.
|
|
177
|
+
- **Codex App:** members push with `codex_app.send_message_to_thread`; you inspect state with
|
|
178
|
+
`codex_app.read_thread`. So members can actually reach you, run `init` with
|
|
179
|
+
`--session <your own thread id>` - that makes `leader.sessionId` in team.json a real,
|
|
180
|
+
messageable thread; without it members cannot report to you and you are stuck polling.
|
|
181
|
+
|
|
182
|
+
All member-to-member and member-to-leader traffic is in English; when the END user addresses a
|
|
183
|
+
member, that member replies in the user's own language. Members hand off files and memos
|
|
184
|
+
through the team `artifacts/` directory and reference them by path.
|
|
132
185
|
|
|
133
186
|
## Let members work - do not rush them
|
|
134
187
|
|
|
135
188
|
Members heartbeat every few tool calls and message you on every finding, blocker, and finished
|
|
136
189
|
slice (their manual binds them to this). So a member that is quiet between heartbeats is **working,
|
|
137
190
|
not stalled** - a stretch of silence is the normal sound of focused work, not a problem to chase.
|
|
138
|
-
Re-reading
|
|
139
|
-
|
|
140
|
-
let them cook.
|
|
191
|
+
Re-reading a calm member's state, or sending "any update?" / "are you done?" / "hurry up" pings,
|
|
192
|
+
interrupts that member and slows the whole team. Trust the heartbeat and let them cook.
|
|
141
193
|
|
|
142
194
|
Message a member only when one of these is true:
|
|
143
195
|
- you have new information, context, or a correction it needs to do its slice right;
|
|
@@ -147,7 +199,9 @@ Message a member only when one of these is true:
|
|
|
147
199
|
then send one specific question, not a barrage.
|
|
148
200
|
|
|
149
201
|
Otherwise stay calm and keep the channel open: read inbound updates as they arrive and act on them.
|
|
150
|
-
A long-running member is alive; a heartbeat you have not received yet is not a failure.
|
|
202
|
+
A long-running member is alive; a heartbeat you have not received yet is not a failure. Fallback only when
|
|
203
|
+
a member is completed without its deliverable, explicitly `BLOCKED:`, or no longer running - then
|
|
204
|
+
unblock, reassign, or re-task that slice instead of waiting on it. Wait for
|
|
151
205
|
every required member's final report before you declare the team done - rushing toward "done" while
|
|
152
206
|
members are still mid-slice just produces half-built work you will have to redo.
|
|
153
207
|
|
|
@@ -162,10 +216,12 @@ its own worktree. To land the work, `integrate --team <id>` merges every member
|
|
|
162
216
|
current branch with a merge commit (never a squash or rebase); resolve any conflict it reports, then
|
|
163
217
|
`worktree-remove` each worktree at cleanup.
|
|
164
218
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
`
|
|
219
|
+
Delivering the path differs by transport: on MultiAgentV2, create the worktree BEFORE spawning
|
|
220
|
+
so the bootstrap carries it, or send it to an already-running member as a `followup_task`; on
|
|
221
|
+
Codex App, send a follow-up message that includes both the worktree path and the member's
|
|
222
|
+
`codex://threads/<thread_id>` link. Either way, run `bind-agent`/`bind-thread` with
|
|
223
|
+
`--cwd <worktree>` (or `--worktree-path`) so `team.json`, `guide.md`, `status`, and
|
|
224
|
+
`member-prompt` all point at the same worktree-backed member.
|
|
169
225
|
|
|
170
226
|
When the member starts inside a worktree, it must verify the assigned cwd exists and contains the
|
|
171
227
|
repository checkout before editing. If the directory is missing, empty, or does not look like a git
|
|
@@ -194,8 +250,11 @@ then delete the team state only after archival evidence is clean or preserved. A
|
|
|
194
250
|
is never disbanded is a leak.
|
|
195
251
|
|
|
196
252
|
- `archive` closes the team: notify each active member, copy anything useful into `artifacts/`,
|
|
197
|
-
then
|
|
198
|
-
|
|
253
|
+
then close each member on its transport. On MultiAgentV2, `interrupt_agent` any member still
|
|
254
|
+
mid-turn and record in the note that V2 exposes no runtime archive operation - the durable
|
|
255
|
+
`team.json` state IS the archive; never claim a V2 agent itself was archived. On Codex App,
|
|
256
|
+
try `codex_app.set_thread_archived` per member thread; treat failures such as
|
|
257
|
+
"Ambiguous Codex thread id" or an id that is ambiguous across hosts as an
|
|
199
258
|
app-thread archival blocker, not as a team-state blocker: record the failure in the team log,
|
|
200
259
|
tell the user which member thread was not proven archived, and continue the team-state archive
|
|
201
260
|
with `archive --note "<blocker>"`. Never pretend a member thread was archived. Do not delete the
|
|
@@ -212,5 +271,6 @@ is never disbanded is a leak.
|
|
|
212
271
|
- Stop and ask before deleting an unarchived team while any member is still active.
|
|
213
272
|
- Member communication stays English unless the user explicitly requests otherwise; user-facing
|
|
214
273
|
replies follow the user's language.
|
|
215
|
-
- Stop if the
|
|
216
|
-
|
|
274
|
+
- Stop if the selected transport's tools (V2 spawn/message/wait/list/interrupt, or Codex App
|
|
275
|
+
create/read/send/title/archive) are unavailable or stop working; say so instead of faking it
|
|
276
|
+
or silently switching transports.
|