oh-my-opencode 4.18.2 → 4.19.1
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/omomomo/SKILL.md +1 -1
- package/.opencode/command/omomomo.md +1 -1
- package/README.ja.md +6 -6
- package/README.ko.md +6 -6
- package/README.md +8 -8
- package/README.ru.md +6 -6
- package/README.zh-cn.md +6 -6
- package/dist/agents/atlas/agent.d.ts +7 -6
- package/dist/agents/gpt-prompt-identity.d.ts +3 -0
- package/dist/agents/sisyphus/gpt-5-5.d.ts +1 -1
- package/dist/agents/sisyphus/gpt-task-system-guide.d.ts +1 -0
- package/dist/agents/sisyphus/index.d.ts +5 -0
- package/dist/agents/sisyphus/kimi-k3.d.ts +19 -0
- package/dist/agents/sisyphus-agent-factory.d.ts +1 -1
- package/dist/agents/sisyphus-junior/agent.d.ts +8 -4
- package/dist/agents/sisyphus-junior/gpt-5-5.d.ts +2 -2
- package/dist/agents/sisyphus-junior/index.d.ts +2 -0
- package/dist/agents/sisyphus-junior/kimi-k3.d.ts +12 -0
- package/dist/agents/types.d.ts +2 -2
- package/dist/cli/index.js +781 -215
- package/dist/cli-node/index.js +781 -215
- package/dist/config/index.d.ts +1 -1
- package/dist/config/schema/agent-overrides.d.ts +48 -48
- package/dist/config/schema/browser-automation.d.ts +1 -0
- package/dist/config/schema/categories.d.ts +6 -6
- package/dist/config/schema/codegraph.d.ts +2 -0
- package/dist/config/schema/commands.d.ts +1 -3
- package/dist/config/schema/default-mode.d.ts +1 -1
- package/dist/config/schema/fallback-models.d.ts +5 -5
- package/dist/config/schema/goal.d.ts +7 -0
- package/dist/config/schema/hooks.d.ts +1 -1
- package/dist/config/schema/oh-my-opencode-config.d.ts +56 -58
- package/dist/config/schema/ralph-loop.d.ts +1 -1
- package/dist/config/schema.d.ts +1 -1
- package/dist/create-hooks.d.ts +1 -1
- package/dist/features/builtin-commands/templates/goal.d.ts +1 -0
- package/dist/features/builtin-commands/templates/stop-continuation.d.ts +1 -1
- package/dist/features/builtin-commands/types.d.ts +1 -1
- package/dist/hooks/auto-slash-command/executor.d.ts +1 -0
- package/dist/hooks/codegraph-bootstrap/hook.d.ts +3 -2
- package/dist/hooks/goal/command-arguments.d.ts +13 -0
- package/dist/hooks/goal/controller.d.ts +26 -0
- package/dist/hooks/goal/index.d.ts +23 -0
- package/dist/hooks/goal/prompt.d.ts +3 -0
- package/dist/hooks/goal/store.d.ts +8 -0
- package/dist/hooks/goal/tools.d.ts +10 -0
- package/dist/hooks/goal/types.d.ts +93 -0
- package/dist/hooks/goal/validation.d.ts +4 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/keyword-detector/hook.d.ts +1 -2
- package/dist/hooks/ralph-loop/types.d.ts +1 -1
- package/dist/hooks/sisyphus-junior-notepad/constants.d.ts +1 -1
- package/dist/hooks/start-work/notepad-scaffold.d.ts +10 -0
- package/dist/index.js +5398 -5109
- package/dist/oh-my-opencode.schema.json +34 -19
- package/dist/plugin/chat-message/loop-commands.d.ts +1 -1
- package/dist/plugin/chat-message/types.d.ts +23 -10
- package/dist/plugin/hooks/create-core-hooks.d.ts +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +3 -2
- package/dist/plugin/hooks/create-transform-hooks.d.ts +0 -2
- package/dist/plugin/stop-continuation.d.ts +2 -2
- package/dist/shared/omo-process-sweep.d.ts +18 -0
- package/dist/shared/system-directive.d.ts +0 -1
- package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.test.ts +87 -0
- package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.ts +35 -5
- package/dist/skills/ulw-plan/SKILL.md +31 -8
- package/dist/skills/ulw-plan/references/full-workflow.md +117 -6
- package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
- package/dist/skills/ulw-research/SKILL.md +3 -3
- package/dist/testing/create-plugin-module.d.ts +1 -0
- package/dist/tools/delegate-task/types.d.ts +0 -1
- package/dist/tui.js +138 -80
- package/package.json +14 -14
- package/packages/git-bash-mcp/dist/cli.js +54 -8
- package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +60 -0
- package/packages/lsp-core/src/lsp/client.ts +14 -1
- package/packages/lsp-core/src/lsp/fixtures/diagnostics-freshness-contract-probe.ts +2 -2
- package/packages/lsp-core/src/mcp.ts +9 -0
- package/packages/lsp-daemon/dist/cli.js +319 -51
- package/packages/lsp-daemon/dist/client.js +136 -48
- package/packages/lsp-daemon/dist/daemon-client.d.ts +0 -10
- package/packages/lsp-daemon/dist/daemon-client.js +4 -34
- package/packages/lsp-daemon/dist/daemon-failure-result.d.ts +3 -0
- package/packages/lsp-daemon/dist/daemon-failure-result.js +38 -0
- package/packages/lsp-daemon/dist/daemon-request-error.d.ts +14 -0
- package/packages/lsp-daemon/dist/daemon-request-error.js +26 -0
- package/packages/lsp-daemon/dist/daemon-server.js +5 -1
- package/packages/lsp-daemon/dist/index.js +137 -48
- package/packages/lsp-daemon/dist/proxy.d.ts +2 -0
- package/packages/lsp-daemon/dist/proxy.js +1 -0
- package/packages/lsp-daemon/dist/version-reap.d.ts +26 -0
- package/packages/lsp-daemon/dist/version-reap.js +182 -0
- package/packages/lsp-tools-mcp/dist/cli.js +61 -10
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +6 -1
- package/packages/lsp-tools-mcp/dist/mcp.js +61 -10
- package/packages/lsp-tools-mcp/dist/tools.js +6 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +416 -25
- 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/bootstrap/src/setup.ts +22 -2
- package/packages/omo-codex/plugin/components/codegraph/AGENTS.md +7 -6
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +638 -267
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +178 -89
- package/packages/omo-codex/plugin/components/codegraph/package.json +2 -2
- package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +3 -1
- package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +3 -1
- package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +98 -32
- package/packages/omo-codex/plugin/components/codegraph/src/mcp-unavailable.ts +5 -0
- package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +15 -6
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker.ts +6 -2
- package/packages/omo-codex/plugin/components/codegraph/src/sweep-cli.ts +1 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook-exclusion.test.ts +1 -1
- package/packages/omo-codex/plugin/components/codegraph/test/hook-store-upgrade.test.ts +148 -0
- package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +31 -2
- package/packages/omo-codex/plugin/components/codegraph/test/package-runtime.test.ts +1 -1
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge-lifecycle.test.ts +65 -1
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +3 -7
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-facade.test.ts +1 -1
- package/packages/omo-codex/plugin/components/codegraph/test/serve-provision.test.ts +57 -3
- package/packages/omo-codex/plugin/components/codegraph/test/serve-unavailable.test.ts +41 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +109 -8
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-node-support.test.ts +2 -2
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-flow.test.ts +43 -0
- 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/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/AGENTS.md +1 -0
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +80 -40
- 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/rules/dist/cli.js +11 -0
- 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/post-compact-budget.ts +11 -0
- package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +60 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/AGENTS.md +8 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.js +147 -60
- 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/src/boulder-reader.ts +3 -71
- package/packages/omo-codex/plugin/components/start-work-continuation/src/plan-checklist.ts +171 -0
- package/packages/omo-codex/plugin/components/start-work-continuation/test/boulder-reader.test.ts +198 -23
- package/packages/omo-codex/plugin/components/start-work-continuation/test/cli.test.ts +4 -3
- package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +6 -5
- package/packages/omo-codex/plugin/components/start-work-continuation/test/fixtures/plan-scaffold.md +15 -0
- 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/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.md +10 -10
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-clone-fidelity-reviewer.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-high.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-medium.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/momus.toml +3 -3
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +1 -1
- 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/ulw-plan/SKILL.md +31 -8
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +117 -6
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
- package/packages/omo-codex/plugin/components/ultrawork/src/codex-hook.ts +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook-trigger-policy.test.ts +42 -0
- package/packages/omo-codex/plugin/components/ulw-loop/README.md +6 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-continuation.d.ts +21 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-continuation.js +64 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +15 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-arg-parser.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +3 -3
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.d.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +85 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.d.ts +0 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.js +13 -33
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +998 -593
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.d.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.js +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.js +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +10 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-batch.d.ts +15 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-batch.js +84 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-mutations.d.ts +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-mutations.js +81 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +7 -59
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +12 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/validation-batch.d.ts +9 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/validation-batch.js +122 -0
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +8 -6
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-continuation.ts +84 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +13 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-arg-parser.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts +3 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-steering.ts +49 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-subcommands.ts +13 -45
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/constants.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/goal-status.ts +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +4 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +20 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-verdicts.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-batch.ts +125 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-mutations.ts +59 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering.ts +6 -58
- package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +12 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/validation-batch.ts +122 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-continuation.test.ts +76 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-checkpoint-continuation.test.ts +111 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-steering-batch.test.ts +67 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-validation-batch.test.ts +57 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/paths.test.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/steering-batch.test.ts +152 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +29 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/validation-batch-checkpoint.test.ts +147 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/validation-batch.test.ts +73 -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 +1 -1
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +1 -1
- 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 +1 -1
- 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/package-lock.json +41 -41
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +32 -28
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/subagent-limit-guard.mjs +17 -45
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/toml-section-editor.mjs +455 -0
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +3 -18
- package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +43 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-no-excuse-rules.ts +35 -5
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +8 -6
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +31 -8
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +117 -6
- package/packages/omo-codex/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +11 -11
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +26 -0
- package/packages/omo-codex/plugin/test/bootstrap-setup.test.mjs +41 -0
- package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +2 -2
- package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +6 -6
- package/packages/omo-codex/plugin/test/multi-agent-v2-regression.test.mjs +3 -3
- package/packages/omo-codex/plugin/test/scaffold-plan.test.mjs +62 -0
- package/packages/omo-codex/plugin/test/subagent-limit-migration.test.mjs +271 -14
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +3 -18
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +0 -5
- package/packages/omo-codex/plugin/test/ulw-plan-review-state-contract.test.mjs +293 -0
- package/packages/omo-codex/scripts/install-config.test.mjs +10 -10
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +401 -22
- package/packages/omo-codex/scripts/install-generated-bundle.test.mjs +39 -2
- package/packages/omo-codex/scripts/install-marketplace-cache.test.mjs +4 -1
- package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.test.ts +87 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.ts +35 -5
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +31 -8
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +117 -6
- package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +46 -10
- package/packages/shared-skills/skills/ulw-research/SKILL.md +3 -3
- package/dist/features/builtin-commands/templates/ralph-loop.d.ts +0 -3
- package/dist/skills/ultraresearch/SKILL.md +0 -10
- package/packages/shared-skills/skills/lcx-contribute-bug-fix/SKILL.md +0 -273
- package/packages/shared-skills/skills/lcx-contribute-bug-fix/agents/openai.yaml +0 -12
- package/packages/shared-skills/skills/lcx-contribute-bug-fix/scripts/create-pr-body.mjs +0 -107
- package/packages/shared-skills/skills/lcx-doctor/SKILL.md +0 -128
- package/packages/shared-skills/skills/lcx-doctor/agents/openai.yaml +0 -11
- package/packages/shared-skills/skills/lcx-report-bug/SKILL.md +0 -268
- package/packages/shared-skills/skills/lcx-report-bug/agents/openai.yaml +0 -11
- package/packages/shared-skills/skills/ultraresearch/SKILL.md +0 -10
- /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-contribute-bug-fix/SKILL.md +0 -0
- /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-contribute-bug-fix/agents/openai.yaml +0 -0
- /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-contribute-bug-fix/scripts/create-pr-body.mjs +0 -0
- /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-doctor/SKILL.md +0 -0
- /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-doctor/agents/openai.yaml +0 -0
- /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-report-bug/SKILL.md +0 -0
- /package/{dist → packages/omo-codex/plugin/components/lcx}/skills/lcx-report-bug/agents/openai.yaml +0 -0
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lcx-contribute-bug-fix
|
|
3
|
-
description: "Contribute a verified bug fix for LazyCodex, lazycodex-ai, omo-codex, bundled Codex skills, or upstream Codex CLI bugs. Opens a fork PR only for upstream openai/codex; LazyCodex-owned defects become a verified-fix issue on code-yeongyu/lazycodex (never a PR — that repo is a generated distribution mirror). Use when the user asks to fix a bug, contribute a bug fix, contribute to fix bug, open a PR for a bug, or debug and PR a LazyCodex/Codex defect."
|
|
4
|
-
metadata:
|
|
5
|
-
short-description: Contribute verified LazyCodex or Codex bug fixes
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# lcx-contribute-bug-fix
|
|
9
|
-
|
|
10
|
-
Use this skill to debug a concrete LazyCodex or Codex defect, implement the smallest correct fix in a fresh temporary workspace, and deliver it. Work in English, keep the body short, and support every claim with runtime or source evidence.
|
|
11
|
-
|
|
12
|
-
Route ownership the same way as `$lcx-report-bug`, but the deliverable differs by target:
|
|
13
|
-
|
|
14
|
-
- `code-yeongyu/lazycodex` for LazyCodex, lazycodex-ai, omo-codex, bundled skills, hooks, MCP wiring, installer behavior, marketplace sync, docs, or packaging. Deliverable: a verified-fix issue with the patch embedded. NEVER open a PR or push a branch against this repo — its contents are regenerated from the source tree on every release, so PRs there cannot be merged and will be closed.
|
|
15
|
-
- `openai/codex` for upstream Codex CLI bugs that reproduce without LazyCodex or come from Codex core behavior. Deliverable: a PR from a fork.
|
|
16
|
-
|
|
17
|
-
## Required Outcome
|
|
18
|
-
|
|
19
|
-
For `openai/codex`, create a fork PR that includes:
|
|
20
|
-
|
|
21
|
-
- a focused branch from a fresh `${TMPDIR:-/tmp}` clone/worktree
|
|
22
|
-
- reproduction logs from before the fix
|
|
23
|
-
- the smallest implementation that fixes the defect
|
|
24
|
-
- verification logs from after the fix
|
|
25
|
-
- apply `lazycodex-generated` when label management is available
|
|
26
|
-
- the required LazyCodex footer tag `Tag: lazycodex-generated`
|
|
27
|
-
- cleanup of temporary worktrees and clones
|
|
28
|
-
|
|
29
|
-
For `code-yeongyu/lazycodex`, create an issue (never a PR) that includes:
|
|
30
|
-
|
|
31
|
-
- reproduction logs from before the fix
|
|
32
|
-
- the root cause with source evidence
|
|
33
|
-
- the verified patch as a unified diff, produced and tested in a fresh `${TMPDIR:-/tmp}` clone/worktree
|
|
34
|
-
- verification logs from after the fix
|
|
35
|
-
- the `lazycodex-generated` label and the footer tag `Tag: lazycodex-generated`
|
|
36
|
-
- cleanup of temporary worktrees and clones
|
|
37
|
-
|
|
38
|
-
## Required Workflow
|
|
39
|
-
|
|
40
|
-
1. Read the user's bug report and identify the affected surface.
|
|
41
|
-
2. Invoke `$omo:debugging` for the investigation. If only unqualified skill names are exposed, invoke `$debugging` and state that it is the OMO debugging skill.
|
|
42
|
-
3. Materialize the latest sources under `LAZYCODEX_SOURCE_ROOT="${LAZYCODEX_SOURCE_ROOT:-${TMPDIR:-/tmp}/lazycodex-sources}"`, then decide the target repository. Sync both checkouts on every run and compare them before choosing. Validate cached checkouts before reuse so an incomplete `.git` directory cannot route the fix to the wrong repo:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
LAZYCODEX_SOURCE_ROOT="${LAZYCODEX_SOURCE_ROOT:-${TMPDIR:-/tmp}/lazycodex-sources}"
|
|
46
|
-
mkdir -p "$LAZYCODEX_SOURCE_ROOT"
|
|
47
|
-
|
|
48
|
-
valid_source_checkout() {
|
|
49
|
-
DEST="$1"
|
|
50
|
-
git -C "$DEST" rev-parse --is-inside-work-tree >/dev/null 2>&1 &&
|
|
51
|
-
git -C "$DEST" config --get remote.origin.url >/dev/null 2>&1
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
recover_corrupt_source_checkout() {
|
|
55
|
-
DEST="$1"
|
|
56
|
-
if [ -e "$DEST" ] && ! valid_source_checkout "$DEST"; then
|
|
57
|
-
QUARANTINED="$DEST.corrupt.$(date +%Y%m%d%H%M%S)"
|
|
58
|
-
mv "$DEST" "$QUARANTINED"
|
|
59
|
-
echo "Moved corrupt source cache $DEST to $QUARANTINED" >&2
|
|
60
|
-
fi
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
sync_latest_source() {
|
|
64
|
-
REPO="$1"; DEST="$2"
|
|
65
|
-
recover_corrupt_source_checkout "$DEST"
|
|
66
|
-
if [ ! -d "$DEST" ]; then
|
|
67
|
-
gh repo clone "$REPO" "$DEST" -- --depth=1 \
|
|
68
|
-
|| git clone --depth=1 "https://github.com/$REPO" "$DEST"
|
|
69
|
-
fi
|
|
70
|
-
if ! valid_source_checkout "$DEST"; then
|
|
71
|
-
echo "Source cache $DEST is not a usable git checkout after clone" >&2
|
|
72
|
-
return 1
|
|
73
|
-
fi
|
|
74
|
-
git -C "$DEST" remote set-url origin "https://github.com/$REPO.git" >/dev/null 2>&1 || true
|
|
75
|
-
DEFAULT_BRANCH="$(git -C "$DEST" remote show origin | sed -n '/HEAD branch/s/.*: //p')"
|
|
76
|
-
if [ -z "$DEFAULT_BRANCH" ]; then
|
|
77
|
-
DEFAULT_BRANCH="$(git -C "$DEST" symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's#^origin/##')"
|
|
78
|
-
fi
|
|
79
|
-
if [ -z "$DEFAULT_BRANCH" ]; then
|
|
80
|
-
echo "Could not determine default branch for $REPO in $DEST" >&2
|
|
81
|
-
return 1
|
|
82
|
-
fi
|
|
83
|
-
git -C "$DEST" fetch --depth=1 origin "$DEFAULT_BRANCH"
|
|
84
|
-
git -C "$DEST" checkout -B "$DEFAULT_BRANCH" FETCH_HEAD
|
|
85
|
-
}
|
|
86
|
-
sync_latest_source code-yeongyu/lazycodex "$LAZYCODEX_SOURCE_ROOT/lazycodex-source"
|
|
87
|
-
sync_latest_source openai/codex "$LAZYCODEX_SOURCE_ROOT/openai-codex-source"
|
|
88
|
-
```
|
|
89
|
-
4. Create a fresh temporary clone and branch under `${TMPDIR:-/tmp}`. Do not modify the user's current repository for the target fix unless the current repository is itself the requested target and the user explicitly asked for local edits.
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
TARGET_REPO="code-yeongyu/lazycodex" # or openai/codex
|
|
93
|
-
WORK_ROOT="$(mktemp -d "${TMPDIR:-/tmp}/lazycodex-fix-XXXXXX")"
|
|
94
|
-
gh repo clone "$TARGET_REPO" "$WORK_ROOT/repo" -- --depth=1
|
|
95
|
-
cd "$WORK_ROOT/repo"
|
|
96
|
-
BASE_BRANCH="$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')"
|
|
97
|
-
git fetch origin "$BASE_BRANCH" --depth=1
|
|
98
|
-
BRANCH_NAME="lazycodex/bug-fix-<short-slug>"
|
|
99
|
-
git worktree add "$WORK_ROOT/worktree" -b "$BRANCH_NAME" "origin/$BASE_BRANCH"
|
|
100
|
-
cd "$WORK_ROOT/worktree"
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
If `gh` cannot clone, use `git clone --depth=1 "https://github.com/$TARGET_REPO" "$WORK_ROOT/repo"` and continue with the same worktree flow.
|
|
104
|
-
|
|
105
|
-
5. Reproduce the bug in the worktree through the real surface. Save exact command output to `${TMPDIR:-/tmp}/lazycodex-fix-<short-slug>-repro.log`.
|
|
106
|
-
6. Write or update a failing regression test before production changes. Confirm it fails for the bug, not for a missing fixture or typo.
|
|
107
|
-
7. Implement the smallest correct fix. Avoid refactors unless the fix cannot be made safely without one.
|
|
108
|
-
8. Run the regression test, adjacent tests, and the smallest real-surface QA command that proves the user-visible behavior changed.
|
|
109
|
-
9. Commit the verified fix in the worktree. Inspect the status first so the delivered diff cannot be empty or stale:
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
git status --short
|
|
113
|
-
git add -A
|
|
114
|
-
git commit -m "fix: <short bug-fix summary>"
|
|
115
|
-
git log --oneline "origin/$BASE_BRANCH..HEAD"
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
10. Build the delivery body for the target:
|
|
119
|
-
- `openai/codex`: generate the PR body with `scripts/create-pr-body.mjs`.
|
|
120
|
-
- `code-yeongyu/lazycodex`: export the verified patch and write the issue body from the Verified-Fix Issue Template below:
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
PATCH_FILE="${TMPDIR:-/tmp}/lazycodex-fix-<short-slug>.patch"
|
|
124
|
-
git diff "origin/$BASE_BRANCH"..HEAD > "$PATCH_FILE"
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
11. Ensure the generated label exists when the target repo allows label management. Keep the footer tag even when label creation is unavailable:
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
LABEL_ARGS=()
|
|
131
|
-
if gh label create lazycodex-generated --repo "$TARGET_REPO" --color "7C3AED" --description "Created by LazyCodex" --force; then
|
|
132
|
-
LABEL_ARGS=(--label lazycodex-generated)
|
|
133
|
-
else
|
|
134
|
-
echo "Label management unavailable for $TARGET_REPO; keeping the footer tag only."
|
|
135
|
-
fi
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
12. Deliver the fix.
|
|
139
|
-
- `code-yeongyu/lazycodex`: create the verified-fix issue. Never push a branch to this repo and never run `gh pr create` against it:
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
ISSUE_BODY="${TMPDIR:-/tmp}/lazycodex-fix-<short-slug>-issue.md"
|
|
143
|
-
gh issue create --repo code-yeongyu/lazycodex --title "<short fix title>" "${LABEL_ARGS[@]}" --body-file "$ISSUE_BODY"
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
- `openai/codex`: fork, push the branch to the fork, and create the PR:
|
|
147
|
-
|
|
148
|
-
```bash
|
|
149
|
-
gh repo fork openai/codex --remote --remote-name fork
|
|
150
|
-
GH_USER="$(gh api user --jq .login)"
|
|
151
|
-
git push -u fork "$BRANCH_NAME"
|
|
152
|
-
gh pr create --repo openai/codex --base "$BASE_BRANCH" --head "$GH_USER:$BRANCH_NAME" --title "<short fix title>" "${LABEL_ARGS[@]}" --body-file "$PR_BODY"
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
13. Clean up:
|
|
156
|
-
|
|
157
|
-
```bash
|
|
158
|
-
cd /
|
|
159
|
-
git -C "$WORK_ROOT/repo" worktree remove "$WORK_ROOT/worktree"
|
|
160
|
-
find "$WORK_ROOT" -mindepth 1 -maxdepth 1 -exec rm -r -- {} +
|
|
161
|
-
rmdir "$WORK_ROOT"
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
Return the PR or issue URL, the reproduction command, the verification command, and the cleanup receipt.
|
|
165
|
-
|
|
166
|
-
## Verified-Fix Issue Template (code-yeongyu/lazycodex)
|
|
167
|
-
|
|
168
|
-
Write the issue body in English. Embed the patch verbatim so a maintainer can apply it to the source tree:
|
|
169
|
-
|
|
170
|
-
````markdown
|
|
171
|
-
## Problem Situation
|
|
172
|
-
[What failed for the user.]
|
|
173
|
-
|
|
174
|
-
## Reproduction Logs
|
|
175
|
-
[Exact failing command and relevant log excerpt.]
|
|
176
|
-
|
|
177
|
-
## Root Cause
|
|
178
|
-
[Confirmed cause with runtime and source evidence.]
|
|
179
|
-
|
|
180
|
-
## Verified Fix
|
|
181
|
-
[What changed and why this is the smallest correct fix.]
|
|
182
|
-
|
|
183
|
-
```diff
|
|
184
|
-
[Contents of $PATCH_FILE.]
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## Verification
|
|
188
|
-
- [RED test output or repro before the fix]
|
|
189
|
-
- [GREEN test output after the fix]
|
|
190
|
-
- [Manual QA command and result]
|
|
191
|
-
|
|
192
|
-
---
|
|
193
|
-
This fix was debugged, implemented, and verified with [LazyCodex](https://github.com/code-yeongyu/lazycodex).
|
|
194
|
-
Tag: lazycodex-generated
|
|
195
|
-
````
|
|
196
|
-
|
|
197
|
-
## PR Body Generator (openai/codex)
|
|
198
|
-
|
|
199
|
-
Use the bundled script to generate the PR body. Create a JSON file with this shape:
|
|
200
|
-
|
|
201
|
-
```json
|
|
202
|
-
{
|
|
203
|
-
"title": "Fix short user-visible failure",
|
|
204
|
-
"targetRepository": "openai/codex",
|
|
205
|
-
"problem": "What is broken for the user.",
|
|
206
|
-
"reproductionLogs": "Exact failing command, log excerpt, or trace.",
|
|
207
|
-
"approach": "What changed and why this is the smallest correct fix.",
|
|
208
|
-
"confidence": "Why the diagnosis and fix are strongly supported.",
|
|
209
|
-
"risks": "Risk level and what could regress.",
|
|
210
|
-
"userVisibleBehaviorChanges": "What changes for the user after the PR.",
|
|
211
|
-
"verification": ["failing test before fix", "passing test after fix", "manual QA command"]
|
|
212
|
-
}
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
Run:
|
|
216
|
-
|
|
217
|
-
```bash
|
|
218
|
-
PR_INPUT="${TMPDIR:-/tmp}/lazycodex-fix-<short-slug>-pr.json"
|
|
219
|
-
PR_BODY="${TMPDIR:-/tmp}/lazycodex-fix-<short-slug>-pr.md"
|
|
220
|
-
node "<skill-root>/scripts/create-pr-body.mjs" "$PR_INPUT" "$PR_BODY"
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
## PR Body Template (openai/codex)
|
|
224
|
-
|
|
225
|
-
The generated body must follow this structure:
|
|
226
|
-
|
|
227
|
-
```markdown
|
|
228
|
-
## Problem Situation
|
|
229
|
-
[What failed for the user.]
|
|
230
|
-
|
|
231
|
-
## Reproduction Logs
|
|
232
|
-
[Exact failing command and relevant log excerpt.]
|
|
233
|
-
|
|
234
|
-
## Approach
|
|
235
|
-
[What changed and why.]
|
|
236
|
-
|
|
237
|
-
## Why I Am Confident
|
|
238
|
-
[Evidence that proves the root cause and fix.]
|
|
239
|
-
|
|
240
|
-
## Risks
|
|
241
|
-
[Risk level and possible regressions.]
|
|
242
|
-
|
|
243
|
-
## User-Visible Behavior Changes
|
|
244
|
-
[What users experience after this PR.]
|
|
245
|
-
|
|
246
|
-
## Verification
|
|
247
|
-
- [RED test output or repro before the fix]
|
|
248
|
-
- [GREEN test output after the fix]
|
|
249
|
-
- [Manual QA command and result]
|
|
250
|
-
|
|
251
|
-
---
|
|
252
|
-
This PR was debugged, implemented, and created with [LazyCodex](https://github.com/code-yeongyu/lazycodex).
|
|
253
|
-
Tag: lazycodex-generated
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
## Stop Conditions
|
|
257
|
-
|
|
258
|
-
Stop and ask one narrow question only when:
|
|
259
|
-
|
|
260
|
-
- the bug cannot be reproduced from available information
|
|
261
|
-
- target repository ownership remains ambiguous after comparing LazyCodex and upstream Codex evidence
|
|
262
|
-
- authentication is missing for creating the issue or pushing and creating the PR
|
|
263
|
-
- the fix requires a product decision rather than a technical correction
|
|
264
|
-
|
|
265
|
-
Do not open:
|
|
266
|
-
|
|
267
|
-
- a PR or pushed branch targeting `code-yeongyu/lazycodex` — deliver the verified-fix issue instead, always
|
|
268
|
-
- a PR or verified-fix issue without a failing-before and passing-after test
|
|
269
|
-
- a PR or verified-fix issue without a real-surface QA command
|
|
270
|
-
- a PR or issue without the `Tag: lazycodex-generated` footer
|
|
271
|
-
- a verified-fix issue without the patch embedded in a `diff` block
|
|
272
|
-
- a vague fix that does not identify the root cause
|
|
273
|
-
- a broad refactor disguised as a bug fix
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "lcx-contribute-bug-fix (omo)"
|
|
3
|
-
short_description: "Contribute verified LazyCodex or Codex bug fixes"
|
|
4
|
-
search_terms:
|
|
5
|
-
- "lcx-contribute-bug-fix"
|
|
6
|
-
- "contribute a bug fix"
|
|
7
|
-
- "contribute to fix bug"
|
|
8
|
-
- "fix bug pr"
|
|
9
|
-
- "lazycodex fix"
|
|
10
|
-
- "omo-codex bug fix"
|
|
11
|
-
- "codex bug fix pr"
|
|
12
|
-
default_prompt: "Use $lcx-contribute-bug-fix to debug this LazyCodex or Codex bug, work from a fresh ${TMPDIR:-/tmp} clone and worktree, implement the smallest verified fix, apply the lazycodex-generated label, deliver it (verified-fix issue on code-yeongyu/lazycodex — never a PR there; fork PR only for openai/codex), and clean up."
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { readFile, writeFile } from "node:fs/promises";
|
|
3
|
-
import { pathToFileURL } from "node:url";
|
|
4
|
-
|
|
5
|
-
const REQUIRED_STRING_FIELDS = [
|
|
6
|
-
"title",
|
|
7
|
-
"targetRepository",
|
|
8
|
-
"problem",
|
|
9
|
-
"reproductionLogs",
|
|
10
|
-
"approach",
|
|
11
|
-
"confidence",
|
|
12
|
-
"risks",
|
|
13
|
-
"userVisibleBehaviorChanges",
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
function requireRecord(value) {
|
|
17
|
-
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
18
|
-
throw new Error("input must be a JSON object");
|
|
19
|
-
}
|
|
20
|
-
return value;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function requireStringField(record, field) {
|
|
24
|
-
const value = record[field];
|
|
25
|
-
if (typeof value !== "string" || value.trim() === "") {
|
|
26
|
-
throw new Error(`${field} must be a non-empty string`);
|
|
27
|
-
}
|
|
28
|
-
return value.trim();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function requireVerification(record) {
|
|
32
|
-
const value = record.verification;
|
|
33
|
-
if (!Array.isArray(value) || value.length === 0) {
|
|
34
|
-
throw new Error("verification must be a non-empty string array");
|
|
35
|
-
}
|
|
36
|
-
return value.map((entry, index) => {
|
|
37
|
-
if (typeof entry !== "string" || entry.trim() === "") {
|
|
38
|
-
throw new Error(`verification[${index}] must be a non-empty string`);
|
|
39
|
-
}
|
|
40
|
-
return entry.trim();
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function parseInput(value) {
|
|
45
|
-
const record = requireRecord(value);
|
|
46
|
-
const strings = Object.fromEntries(REQUIRED_STRING_FIELDS.map((field) => [field, requireStringField(record, field)]));
|
|
47
|
-
return {
|
|
48
|
-
title: strings.title,
|
|
49
|
-
targetRepository: strings.targetRepository,
|
|
50
|
-
problem: strings.problem,
|
|
51
|
-
reproductionLogs: strings.reproductionLogs,
|
|
52
|
-
approach: strings.approach,
|
|
53
|
-
confidence: strings.confidence,
|
|
54
|
-
risks: strings.risks,
|
|
55
|
-
userVisibleBehaviorChanges: strings.userVisibleBehaviorChanges,
|
|
56
|
-
verification: requireVerification(record),
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function bulletList(items) {
|
|
61
|
-
return items.map((item) => `- ${item}`).join("\n");
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export function createLazyCodexBugFixPrBody(value) {
|
|
65
|
-
const input = parseInput(value);
|
|
66
|
-
return `## Problem Situation
|
|
67
|
-
${input.problem}
|
|
68
|
-
|
|
69
|
-
## Reproduction Logs
|
|
70
|
-
${input.reproductionLogs}
|
|
71
|
-
|
|
72
|
-
## Approach
|
|
73
|
-
${input.approach}
|
|
74
|
-
|
|
75
|
-
## Why I Am Confident
|
|
76
|
-
${input.confidence}
|
|
77
|
-
|
|
78
|
-
## Risks
|
|
79
|
-
${input.risks}
|
|
80
|
-
|
|
81
|
-
## User-Visible Behavior Changes
|
|
82
|
-
${input.userVisibleBehaviorChanges}
|
|
83
|
-
|
|
84
|
-
## Verification
|
|
85
|
-
${bulletList(input.verification)}
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
This PR was debugged, implemented, and created with [LazyCodex](https://github.com/code-yeongyu/lazycodex).
|
|
89
|
-
Tag: lazycodex-generated
|
|
90
|
-
`;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
async function main() {
|
|
94
|
-
const [, , inputPath, outputPath] = process.argv;
|
|
95
|
-
if (typeof inputPath !== "string" || inputPath.trim() === "") {
|
|
96
|
-
throw new Error("usage: create-pr-body.mjs <input.json> <output.md>");
|
|
97
|
-
}
|
|
98
|
-
if (typeof outputPath !== "string" || outputPath.trim() === "") {
|
|
99
|
-
throw new Error("usage: create-pr-body.mjs <input.json> <output.md>");
|
|
100
|
-
}
|
|
101
|
-
const parsed = JSON.parse(await readFile(inputPath, "utf8"));
|
|
102
|
-
await writeFile(outputPath, createLazyCodexBugFixPrBody(parsed), "utf8");
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
106
|
-
await main();
|
|
107
|
-
}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lcx-doctor
|
|
3
|
-
description: "Diagnose LazyCodex and Codex CLI installation health against the latest sources. Use whenever the user asks for a doctor or health check, says LazyCodex, lazycodex-ai, omo-codex, or Codex behaves oddly after an install, update, or config change, suspects a stale, drifted, or broken setup, or wants the local install audited and compared with the latest LazyCodex and Codex code."
|
|
4
|
-
metadata:
|
|
5
|
-
short-description: Diagnose LazyCodex/Codex install health against latest sources
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# lcx-doctor
|
|
9
|
-
|
|
10
|
-
You are a LazyCodex install doctor. Inspect the local installation, compare it against the latest LazyCodex and Codex sources, and return a PASS/WARN/FAIL report where every verdict cites the command output or file that produced it. Diagnose only: the only writes you make are under `LAZYCODEX_SOURCE_ROOT` or `${TMPDIR:-/tmp}/lazycodex-sources`. Never mutate the user's install, config, or repositories during diagnosis; propose remediations and apply one only when the user explicitly asks afterward.
|
|
11
|
-
|
|
12
|
-
Use GPT-5.5 style: outcome first, concise, evidence-bound.
|
|
13
|
-
|
|
14
|
-
## Required Workflow
|
|
15
|
-
|
|
16
|
-
1. Materialize the latest sources under `LAZYCODEX_SOURCE_ROOT="${LAZYCODEX_SOURCE_ROOT:-${TMPDIR:-/tmp}/lazycodex-sources}"` first. Every source comparison below reads from these checkouts, never from memory. Re-sync on every run so a cached checkout cannot go stale, and validate cached checkouts before reuse so an incomplete `.git` directory cannot poison diagnosis:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
LAZYCODEX_SOURCE_ROOT="${LAZYCODEX_SOURCE_ROOT:-${TMPDIR:-/tmp}/lazycodex-sources}"
|
|
20
|
-
mkdir -p "$LAZYCODEX_SOURCE_ROOT"
|
|
21
|
-
|
|
22
|
-
valid_source_checkout() {
|
|
23
|
-
DEST="$1"
|
|
24
|
-
git -C "$DEST" rev-parse --is-inside-work-tree >/dev/null 2>&1 &&
|
|
25
|
-
git -C "$DEST" config --get remote.origin.url >/dev/null 2>&1
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
recover_corrupt_source_checkout() {
|
|
29
|
-
DEST="$1"
|
|
30
|
-
if [ -e "$DEST" ] && ! valid_source_checkout "$DEST"; then
|
|
31
|
-
QUARANTINED="$DEST.corrupt.$(date +%Y%m%d%H%M%S)"
|
|
32
|
-
mv "$DEST" "$QUARANTINED"
|
|
33
|
-
echo "Moved corrupt source cache $DEST to $QUARANTINED" >&2
|
|
34
|
-
fi
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
sync_latest_source() {
|
|
38
|
-
REPO="$1"; DEST="$2"
|
|
39
|
-
recover_corrupt_source_checkout "$DEST"
|
|
40
|
-
if [ ! -d "$DEST" ]; then
|
|
41
|
-
gh repo clone "$REPO" "$DEST" -- --depth=1 \
|
|
42
|
-
|| git clone --depth=1 "https://github.com/$REPO" "$DEST"
|
|
43
|
-
fi
|
|
44
|
-
if ! valid_source_checkout "$DEST"; then
|
|
45
|
-
echo "Source cache $DEST is not a usable git checkout after clone" >&2
|
|
46
|
-
return 1
|
|
47
|
-
fi
|
|
48
|
-
git -C "$DEST" remote set-url origin "https://github.com/$REPO.git" >/dev/null 2>&1 || true
|
|
49
|
-
DEFAULT_BRANCH="$(git -C "$DEST" remote show origin | sed -n '/HEAD branch/s/.*: //p')"
|
|
50
|
-
if [ -z "$DEFAULT_BRANCH" ]; then
|
|
51
|
-
DEFAULT_BRANCH="$(git -C "$DEST" symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's#^origin/##')"
|
|
52
|
-
fi
|
|
53
|
-
if [ -z "$DEFAULT_BRANCH" ]; then
|
|
54
|
-
echo "Could not determine default branch for $REPO in $DEST" >&2
|
|
55
|
-
return 1
|
|
56
|
-
fi
|
|
57
|
-
git -C "$DEST" fetch --depth=1 origin "$DEFAULT_BRANCH"
|
|
58
|
-
git -C "$DEST" checkout -B "$DEFAULT_BRANCH" FETCH_HEAD
|
|
59
|
-
}
|
|
60
|
-
sync_latest_source code-yeongyu/lazycodex "$LAZYCODEX_SOURCE_ROOT/lazycodex-source"
|
|
61
|
-
sync_latest_source openai/codex "$LAZYCODEX_SOURCE_ROOT/openai-codex-source"
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
2. Inventory the installed surface. Resolve `CODEX_HOME` (default `~/.codex`), then collect:
|
|
65
|
-
- `codex --version` and how `codex` resolves (`command -v codex`).
|
|
66
|
-
- Installed LazyCodex version: the `version` in the installed plugin manifest, discoverable with `find "${CODEX_HOME:-$HOME/.codex}/plugins" -path '*/.codex-plugin/plugin.json'`. Installed plugins live under `$CODEX_HOME/plugins/cache/<marketplace>/<name>/<version>/`.
|
|
67
|
-
- Latest LazyCodex version from `$LAZYCODEX_SOURCE_ROOT/lazycodex-source` (release tags or the version stamped in the repo) and latest Codex release (`gh release view --repo openai/codex`).
|
|
68
|
-
- OS, install method, and `lazycodex` / `lazycodex-ai` bin links resolving (`command -v`).
|
|
69
|
-
3. Check config and wiring against the latest installer, not against assumptions. Read what the current installer under `$LAZYCODEX_SOURCE_ROOT/lazycodex-source` writes (installer sources live in the omo-codex package, e.g. `scripts/install/`), then verify the local equivalents:
|
|
70
|
-
- `$CODEX_HOME/config.toml` exists and parses; LazyCodex-managed entries match what the latest installer would write.
|
|
71
|
-
- Plugin payload present and non-empty: read `.codex-plugin/plugin.json`; when that manifest declares a `hooks` array, validate every direct hook path declared by the manifest; require `hooks/hooks.json` only when the manifest declares it; do not require retired paths such as `components/workflow-selector` or `hooks/user-prompt-submit-selecting-lazycodex-workflow.json` unless the current manifest declares them.
|
|
72
|
-
- Verify the manifest-declared runtime payload, not a remembered source tree. Current payload includes `skills/`, `.mcp.json`, root CLI runtimes such as `dist/cli/index.js` and `dist/cli-node/index.js`, and every hook/MCP `components/*/dist/*.js` target referenced by installed manifests.
|
|
73
|
-
- Treat install-time materialization rewrites as expected when the rewritten target exists and is non-empty. For example, `.mcp.json` may use plugin-local or absolute installed paths for CodeGraph/MCP runtimes; that is PASS/WARN context, not payload drift. Missing or zero-byte rewritten targets are FAIL.
|
|
74
|
-
- Stale project-local leftovers the installer now removes (e.g. `.codex/hooks.json`, `.codex/skills` in the project) are flagged, not deleted.
|
|
75
|
-
4. Probe the real surface. Do not invoke `lazycodex doctor`; this skill is already running inside that doctor workflow, so calling it would recurse. Instead run non-recursive probes directly: `codex --version`, `command -v codex`, the bin-link checks above, config/plugin payload inspections, and a trivial non-interactive Codex invocation that loads the plugin. Use the configured Codex default model for the runtime probe unless the user explicitly passed a model override to the doctor surface; never force a guessed/rejected model such as `gpt-5.5-codex-mini`. Capture stderr verbatim; a clean exit with warnings is WARN, not PASS.
|
|
76
|
-
5. Compare for drift. Where installed manifest-declared bundled files differ from the same files at the installed version, or the latest source removed or renamed something the local config still references, record it with both paths. Do not report expected materialization differences, such as absolute `.mcp.json` runtime paths, as drift when their targets exist and are non-empty.
|
|
77
|
-
6. Check whether each FAIL is already known: `gh issue list --repo code-yeongyu/lazycodex --search "<short symptom>" --state open` (and `openai/codex` when the failure points upstream). Link matches in the report instead of re-diagnosing from scratch.
|
|
78
|
-
7. If a probe fails and the cause is not explained by config or source comparison, invoke `$omo:debugging` for the investigation. If Codex exposes only unqualified skill names in the current session, invoke `$debugging` and state that it is the OMO debugging skill.
|
|
79
|
-
8. Emit the report.
|
|
80
|
-
|
|
81
|
-
## Doctor Report Template
|
|
82
|
-
|
|
83
|
-
```markdown
|
|
84
|
-
## LazyCodex Doctor Report
|
|
85
|
-
|
|
86
|
-
### Summary
|
|
87
|
-
[One sentence: healthy, degraded, or broken — and the single most important next action.]
|
|
88
|
-
|
|
89
|
-
### Environment
|
|
90
|
-
- LazyCodex installed / latest:
|
|
91
|
-
- Codex CLI installed / latest:
|
|
92
|
-
- CODEX_HOME:
|
|
93
|
-
- OS / install method:
|
|
94
|
-
|
|
95
|
-
### Checks
|
|
96
|
-
| Check | Verdict | Evidence |
|
|
97
|
-
| --- | --- | --- |
|
|
98
|
-
| Versions current | PASS/WARN/FAIL | [command output or file:line] |
|
|
99
|
-
| config.toml integrity | PASS/WARN/FAIL | [evidence] |
|
|
100
|
-
| Plugin payload wiring | PASS/WARN/FAIL | [evidence] |
|
|
101
|
-
| Bin links / aliases | PASS/WARN/FAIL | [evidence] |
|
|
102
|
-
| Runtime probe | PASS/WARN/FAIL | [evidence] |
|
|
103
|
-
| Drift vs latest source | PASS/WARN/FAIL | [evidence, citing `$LAZYCODEX_SOURCE_ROOT/lazycodex-source` or `$LAZYCODEX_SOURCE_ROOT/openai-codex-source` paths] |
|
|
104
|
-
|
|
105
|
-
### Remediations
|
|
106
|
-
1. [Most important fix first: exact command or config edit, and what it resolves.]
|
|
107
|
-
|
|
108
|
-
### Known Issues Matched
|
|
109
|
-
- [issue URL — or "none found"]
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Follow-up Routing
|
|
113
|
-
|
|
114
|
-
- Local misconfiguration or stale install: give the remediation; reinstalling via the standard LazyCodex install command is the default fix for payload drift.
|
|
115
|
-
- Defect in LazyCodex or Codex product code: recommend `$lcx-report-bug` to file it, or `$lcx-contribute-bug-fix` when the user wants a fix PR. Both reuse the source-root checkouts you already synced.
|
|
116
|
-
|
|
117
|
-
## Stop Conditions
|
|
118
|
-
|
|
119
|
-
Ask one narrow question only when a finding requires a destructive decision, such as deleting user-edited config or downgrading a version.
|
|
120
|
-
|
|
121
|
-
Do not:
|
|
122
|
-
|
|
123
|
-
- mutate config, installs, or repositories during diagnosis
|
|
124
|
-
- report a verdict without captured evidence
|
|
125
|
-
- compare against remembered source layout instead of `$LAZYCODEX_SOURCE_ROOT/lazycodex-source` and `$LAZYCODEX_SOURCE_ROOT/openai-codex-source`
|
|
126
|
-
- require retired payload paths that the current `.codex-plugin/plugin.json` does not declare
|
|
127
|
-
- force a runtime-probe model unless the user explicitly passed one
|
|
128
|
-
- declare healthy while any probe output was never captured
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "lcx-doctor (omo)"
|
|
3
|
-
short_description: "Diagnose LazyCodex/Codex install health against latest sources"
|
|
4
|
-
search_terms:
|
|
5
|
-
- "lcx-doctor"
|
|
6
|
-
- "lazycodex doctor"
|
|
7
|
-
- "lazycodex health check"
|
|
8
|
-
- "codex doctor"
|
|
9
|
-
- "lazycodex install broken"
|
|
10
|
-
- "omo-codex diagnose"
|
|
11
|
-
default_prompt: "Use $lcx-doctor to sync the latest LazyCodex and Codex sources under LAZYCODEX_SOURCE_ROOT or ${TMPDIR:-/tmp}/lazycodex-sources, inventory the local installation, compare versions, config, and wiring against the latest sources, probe the real surface, and report PASS/WARN/FAIL findings with evidence and remediations."
|