oh-my-copilot 4.13.2 → 4.13.21
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +1 -1
- package/bridge/cli.cjs +2522 -949
- package/bridge/mcp-server.cjs +97 -9
- package/bridge/runtime-cli.cjs +1256 -133
- package/bridge/team.js +1241 -65
- package/dist/__tests__/auto-slash-aliases.test.js +91 -0
- package/dist/__tests__/auto-slash-aliases.test.js.map +1 -1
- package/dist/__tests__/hud/labels.test.d.ts +2 -0
- package/dist/__tests__/hud/labels.test.d.ts.map +1 -0
- package/dist/__tests__/hud/labels.test.js +158 -0
- package/dist/__tests__/hud/labels.test.js.map +1 -0
- package/dist/__tests__/hud/render-rate-limits-priority.test.js +26 -0
- package/dist/__tests__/hud/render-rate-limits-priority.test.js.map +1 -1
- package/dist/__tests__/hud-marketplace-resolution.test.js +34 -0
- package/dist/__tests__/hud-marketplace-resolution.test.js.map +1 -1
- package/dist/__tests__/installer-hud-skip.test.js +6 -0
- package/dist/__tests__/installer-hud-skip.test.js.map +1 -1
- package/dist/__tests__/installer-omc-reference.test.js +1 -1
- package/dist/__tests__/installer-omc-reference.test.js.map +1 -1
- package/dist/__tests__/mnemosyne/detector.test.js +2 -0
- package/dist/__tests__/mnemosyne/detector.test.js.map +1 -1
- package/dist/__tests__/notepad.test.js +2 -2
- package/dist/__tests__/notepad.test.js.map +1 -1
- package/dist/__tests__/pre-tool-enforcer.test.js +84 -1
- package/dist/__tests__/pre-tool-enforcer.test.js.map +1 -1
- package/dist/__tests__/ralph-prd-mandatory.test.js +11 -1
- package/dist/__tests__/ralph-prd-mandatory.test.js.map +1 -1
- package/dist/__tests__/ralph-prd.test.js +40 -2
- package/dist/__tests__/ralph-prd.test.js.map +1 -1
- package/dist/__tests__/skills.test.js +363 -4
- package/dist/__tests__/skills.test.js.map +1 -1
- package/dist/__tests__/state-root-resolution.test.js +56 -6
- package/dist/__tests__/state-root-resolution.test.js.map +1 -1
- package/dist/autoresearch/__tests__/runtime.test.js +225 -28
- package/dist/autoresearch/__tests__/runtime.test.js.map +1 -1
- package/dist/autoresearch/runtime.d.ts.map +1 -1
- package/dist/autoresearch/runtime.js +9 -5
- package/dist/autoresearch/runtime.js.map +1 -1
- package/dist/cli/autoresearch.d.ts +1 -1
- package/dist/cli/autoresearch.d.ts.map +1 -1
- package/dist/cli/autoresearch.js +4 -4
- package/dist/cli/commands/team.d.ts +1 -0
- package/dist/cli/commands/team.d.ts.map +1 -1
- package/dist/cli/commands/team.js +14 -2
- package/dist/cli/commands/team.js.map +1 -1
- package/dist/cli/index.js +3 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/team.d.ts +6 -0
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +23 -1
- package/dist/cli/team.js.map +1 -1
- package/dist/config/__tests__/loader.test.js.map +1 -1
- package/dist/features/boulder-state/constants.d.ts +1 -1
- package/dist/features/boulder-state/constants.d.ts.map +1 -1
- package/dist/features/builtin-skills/skills.d.ts.map +1 -1
- package/dist/features/builtin-skills/skills.js +11 -3
- package/dist/features/builtin-skills/skills.js.map +1 -1
- package/dist/features/builtin-skills/types.d.ts +7 -0
- package/dist/features/builtin-skills/types.d.ts.map +1 -1
- package/dist/features/magic-keywords.d.ts.map +1 -1
- package/dist/features/magic-keywords.js +30 -1
- package/dist/features/magic-keywords.js.map +1 -1
- package/dist/features/rate-limit-wait/tmux-detector.d.ts +4 -4
- package/dist/features/rate-limit-wait/tmux-detector.js +9 -9
- package/dist/features/rate-limit-wait/tmux-detector.js.map +1 -1
- package/dist/hooks/__tests__/bridge-routing.test.js +156 -0
- package/dist/hooks/__tests__/bridge-routing.test.js.map +1 -1
- package/dist/hooks/auto-slash-command/constants.d.ts.map +1 -1
- package/dist/hooks/auto-slash-command/constants.js +1 -0
- package/dist/hooks/auto-slash-command/constants.js.map +1 -1
- package/dist/hooks/auto-slash-command/executor.d.ts.map +1 -1
- package/dist/hooks/auto-slash-command/executor.js +29 -0
- package/dist/hooks/auto-slash-command/executor.js.map +1 -1
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js +184 -1
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/learner/detector.js +1 -1
- package/dist/hooks/mode-registry/__tests__/session-isolation.test.js +16 -0
- package/dist/hooks/mode-registry/__tests__/session-isolation.test.js.map +1 -1
- package/dist/hooks/notepad/index.d.ts +4 -1
- package/dist/hooks/notepad/index.d.ts.map +1 -1
- package/dist/hooks/notepad/index.js +7 -4
- package/dist/hooks/notepad/index.js.map +1 -1
- package/dist/hooks/persistent-mode/__tests__/ralph-verification-flow.test.js +70 -3
- package/dist/hooks/persistent-mode/__tests__/ralph-verification-flow.test.js.map +1 -1
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js +10 -9
- package/dist/hooks/persistent-mode/index.js.map +1 -1
- package/dist/hooks/persistent-mode/stop-hook-blocking.test.js +64 -9
- package/dist/hooks/persistent-mode/stop-hook-blocking.test.js.map +1 -1
- package/dist/hooks/project-memory/__tests__/integration.test.js +117 -3
- package/dist/hooks/project-memory/__tests__/integration.test.js.map +1 -1
- package/dist/hooks/project-memory/__tests__/storage.test.js +11 -11
- package/dist/hooks/project-memory/__tests__/storage.test.js.map +1 -1
- package/dist/hooks/project-memory/index.d.ts.map +1 -1
- package/dist/hooks/project-memory/index.js +24 -12
- package/dist/hooks/project-memory/index.js.map +1 -1
- package/dist/hooks/ralph/index.d.ts +1 -1
- package/dist/hooks/ralph/index.d.ts.map +1 -1
- package/dist/hooks/ralph/index.js +1 -1
- package/dist/hooks/ralph/index.js.map +1 -1
- package/dist/hooks/ralph/loop.d.ts +6 -6
- package/dist/hooks/ralph/loop.d.ts.map +1 -1
- package/dist/hooks/ralph/loop.js +18 -18
- package/dist/hooks/ralph/loop.js.map +1 -1
- package/dist/hooks/ralph/prd.d.ts +23 -12
- package/dist/hooks/ralph/prd.d.ts.map +1 -1
- package/dist/hooks/ralph/prd.js +88 -42
- package/dist/hooks/ralph/prd.js.map +1 -1
- package/dist/hooks/session-end/__tests__/mode-state-cleanup.test.js +20 -0
- package/dist/hooks/session-end/__tests__/mode-state-cleanup.test.js.map +1 -1
- package/dist/hooks/session-end/index.d.ts +9 -0
- package/dist/hooks/session-end/index.d.ts.map +1 -1
- package/dist/hooks/session-end/index.js +67 -0
- package/dist/hooks/session-end/index.js.map +1 -1
- package/dist/hooks/skill-bridge.cjs +6 -5
- package/dist/hooks/skill-state/index.d.ts.map +1 -1
- package/dist/hooks/skill-state/index.js +1 -0
- package/dist/hooks/skill-state/index.js.map +1 -1
- package/dist/hud/__tests__/git-status.test.js +18 -0
- package/dist/hud/__tests__/git-status.test.js.map +1 -1
- package/dist/hud/elements/background.d.ts +3 -3
- package/dist/hud/elements/background.d.ts.map +1 -1
- package/dist/hud/elements/background.js +5 -4
- package/dist/hud/elements/background.js.map +1 -1
- package/dist/hud/elements/call-counts.d.ts +2 -2
- package/dist/hud/elements/call-counts.d.ts.map +1 -1
- package/dist/hud/elements/call-counts.js +7 -6
- package/dist/hud/elements/call-counts.js.map +1 -1
- package/dist/hud/elements/context.d.ts +3 -3
- package/dist/hud/elements/context.d.ts.map +1 -1
- package/dist/hud/elements/context.js +5 -4
- package/dist/hud/elements/context.js.map +1 -1
- package/dist/hud/elements/git.d.ts +2 -1
- package/dist/hud/elements/git.d.ts.map +1 -1
- package/dist/hud/elements/git.js +7 -6
- package/dist/hud/elements/git.js.map +1 -1
- package/dist/hud/elements/ralph.d.ts +2 -2
- package/dist/hud/elements/ralph.d.ts.map +1 -1
- package/dist/hud/elements/ralph.js +3 -2
- package/dist/hud/elements/ralph.js.map +1 -1
- package/dist/hud/elements/thinking.d.ts +2 -2
- package/dist/hud/elements/thinking.d.ts.map +1 -1
- package/dist/hud/elements/thinking.js +3 -2
- package/dist/hud/elements/thinking.js.map +1 -1
- package/dist/hud/elements/token-usage.d.ts +2 -2
- package/dist/hud/elements/token-usage.d.ts.map +1 -1
- package/dist/hud/elements/token-usage.js +3 -2
- package/dist/hud/elements/token-usage.js.map +1 -1
- package/dist/hud/render.d.ts.map +1 -1
- package/dist/hud/render.js +11 -10
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/state.d.ts.map +1 -1
- package/dist/hud/state.js +18 -1
- package/dist/hud/state.js.map +1 -1
- package/dist/hud/types.d.ts +26 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js +58 -0
- package/dist/hud/types.js.map +1 -1
- package/dist/installer/__tests__/hud-cache-wrapper.test.d.ts +2 -0
- package/dist/installer/__tests__/hud-cache-wrapper.test.d.ts.map +1 -0
- package/dist/installer/__tests__/hud-cache-wrapper.test.js +235 -0
- package/dist/installer/__tests__/hud-cache-wrapper.test.js.map +1 -0
- package/dist/installer/__tests__/standalone-hook-reconcile.test.js +2 -0
- package/dist/installer/__tests__/standalone-hook-reconcile.test.js.map +1 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +19 -7
- package/dist/installer/index.js.map +1 -1
- package/dist/lib/__tests__/worktree-paths.test.js +162 -39
- package/dist/lib/__tests__/worktree-paths.test.js.map +1 -1
- package/dist/lib/worktree-paths.d.ts +87 -9
- package/dist/lib/worktree-paths.d.ts.map +1 -1
- package/dist/lib/worktree-paths.js +209 -27
- package/dist/lib/worktree-paths.js.map +1 -1
- package/dist/team/__tests__/auto-merge-restart.test.d.ts +2 -0
- package/dist/team/__tests__/auto-merge-restart.test.d.ts.map +1 -0
- package/dist/team/__tests__/auto-merge-restart.test.js +128 -0
- package/dist/team/__tests__/auto-merge-restart.test.js.map +1 -0
- package/dist/team/__tests__/auto-merge.perf.test.d.ts +2 -0
- package/dist/team/__tests__/auto-merge.perf.test.d.ts.map +1 -0
- package/dist/team/__tests__/auto-merge.perf.test.js +85 -0
- package/dist/team/__tests__/auto-merge.perf.test.js.map +1 -0
- package/dist/team/__tests__/conflict-mailbox.test.d.ts +2 -0
- package/dist/team/__tests__/conflict-mailbox.test.d.ts.map +1 -0
- package/dist/team/__tests__/conflict-mailbox.test.js +238 -0
- package/dist/team/__tests__/conflict-mailbox.test.js.map +1 -0
- package/dist/team/__tests__/helpers/git-fixture.d.ts +72 -0
- package/dist/team/__tests__/helpers/git-fixture.d.ts.map +1 -0
- package/dist/team/__tests__/helpers/git-fixture.js +252 -0
- package/dist/team/__tests__/helpers/git-fixture.js.map +1 -0
- package/dist/team/__tests__/leader-inbox.test.d.ts +2 -0
- package/dist/team/__tests__/leader-inbox.test.d.ts.map +1 -0
- package/dist/team/__tests__/leader-inbox.test.js +152 -0
- package/dist/team/__tests__/leader-inbox.test.js.map +1 -0
- package/dist/team/__tests__/merge-orchestrator.test.d.ts +2 -0
- package/dist/team/__tests__/merge-orchestrator.test.d.ts.map +1 -0
- package/dist/team/__tests__/merge-orchestrator.test.js +779 -0
- package/dist/team/__tests__/merge-orchestrator.test.js.map +1 -0
- package/dist/team/__tests__/rebase-smoke.test.d.ts +2 -0
- package/dist/team/__tests__/rebase-smoke.test.d.ts.map +1 -0
- package/dist/team/__tests__/rebase-smoke.test.js +272 -0
- package/dist/team/__tests__/rebase-smoke.test.js.map +1 -0
- package/dist/team/__tests__/runtime-cli.test.js +9 -1
- package/dist/team/__tests__/runtime-cli.test.js.map +1 -1
- package/dist/team/__tests__/runtime-v2.dispatch.test.js +150 -1
- package/dist/team/__tests__/runtime-v2.dispatch.test.js.map +1 -1
- package/dist/team/__tests__/teardown-invariant.test.d.ts +2 -0
- package/dist/team/__tests__/teardown-invariant.test.d.ts.map +1 -0
- package/dist/team/__tests__/teardown-invariant.test.js +176 -0
- package/dist/team/__tests__/teardown-invariant.test.js.map +1 -0
- package/dist/team/__tests__/worker-commit-cadence.test.d.ts +2 -0
- package/dist/team/__tests__/worker-commit-cadence.test.d.ts.map +1 -0
- package/dist/team/__tests__/worker-commit-cadence.test.js +315 -0
- package/dist/team/__tests__/worker-commit-cadence.test.js.map +1 -0
- package/dist/team/__tests__/worktree-runtime-e2e.test.d.ts +2 -0
- package/dist/team/__tests__/worktree-runtime-e2e.test.d.ts.map +1 -0
- package/dist/team/__tests__/worktree-runtime-e2e.test.js +182 -0
- package/dist/team/__tests__/worktree-runtime-e2e.test.js.map +1 -0
- package/dist/team/conflict-mailbox.d.ts +49 -0
- package/dist/team/conflict-mailbox.d.ts.map +1 -0
- package/dist/team/conflict-mailbox.js +98 -0
- package/dist/team/conflict-mailbox.js.map +1 -0
- package/dist/team/leader-inbox.d.ts +28 -0
- package/dist/team/leader-inbox.d.ts.map +1 -0
- package/dist/team/leader-inbox.js +68 -0
- package/dist/team/leader-inbox.js.map +1 -0
- package/dist/team/merge-coordinator.d.ts +6 -0
- package/dist/team/merge-coordinator.d.ts.map +1 -1
- package/dist/team/merge-coordinator.js +6 -2
- package/dist/team/merge-coordinator.js.map +1 -1
- package/dist/team/merge-orchestrator.d.ts +41 -0
- package/dist/team/merge-orchestrator.d.ts.map +1 -0
- package/dist/team/merge-orchestrator.js +736 -0
- package/dist/team/merge-orchestrator.js.map +1 -0
- package/dist/team/runtime-cli.d.ts +1 -0
- package/dist/team/runtime-cli.d.ts.map +1 -1
- package/dist/team/runtime-cli.js +15 -2
- package/dist/team/runtime-cli.js.map +1 -1
- package/dist/team/runtime-flags.d.ts +5 -0
- package/dist/team/runtime-flags.d.ts.map +1 -0
- package/dist/team/runtime-flags.js +12 -0
- package/dist/team/runtime-flags.js.map +1 -0
- package/dist/team/runtime-v2.d.ts +7 -1
- package/dist/team/runtime-v2.d.ts.map +1 -1
- package/dist/team/runtime-v2.js +185 -8
- package/dist/team/runtime-v2.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts +4 -0
- package/dist/team/worker-bootstrap.d.ts.map +1 -1
- package/dist/team/worker-bootstrap.js +10 -1
- package/dist/team/worker-bootstrap.js.map +1 -1
- package/dist/team/worker-commit-cadence.d.ts +70 -0
- package/dist/team/worker-commit-cadence.d.ts.map +1 -0
- package/dist/team/worker-commit-cadence.js +271 -0
- package/dist/team/worker-commit-cadence.js.map +1 -0
- package/dist/tools/__tests__/memory-tools.test.js +4 -4
- package/dist/tools/__tests__/memory-tools.test.js.map +1 -1
- package/dist/tools/__tests__/state-tools.test.js +13 -1
- package/dist/tools/__tests__/state-tools.test.js.map +1 -1
- package/docs/GETTING-STARTED.md +415 -0
- package/docs/MIGRATION.md +66 -66
- package/docs/REFERENCE.md +21 -4
- package/docs/company-context-interface.md +5 -16
- package/docs/copilot-instructions.md +1 -1
- package/package.json +1 -1
- package/scripts/lib/hud-cache-wrapper.sh +122 -0
- package/scripts/plugin-setup.mjs +10 -1
- package/scripts/post-tool-verifier.mjs +118 -5
- package/scripts/pre-tool-enforcer.mjs +54 -6
- package/scripts/session-start.mjs +171 -3
- package/skills/AGENTS.md +22 -91
- package/skills/ai-slop-cleaner/SKILL.md +118 -120
- package/skills/ask/SKILL.md +6 -8
- package/skills/autopilot/SKILL.md +1 -28
- package/skills/autoresearch/SKILL.md +5 -5
- package/skills/cancel/SKILL.md +13 -13
- package/skills/cccg/SKILL.md +1 -0
- package/skills/configure-notifications/SKILL.md +80 -215
- package/skills/debug/SKILL.md +3 -2
- package/skills/deep-dive/SKILL.md +20 -9
- package/skills/deep-interview/SKILL.md +32 -4
- package/skills/deepinit/SKILL.md +1 -0
- package/skills/external-context/SKILL.md +2 -1
- package/skills/hud/SKILL.md +22 -52
- package/skills/learner/SKILL.md +90 -57
- package/skills/mcp-setup/SKILL.md +45 -60
- package/skills/omc-doctor/SKILL.md +1 -1
- package/skills/omc-reference/SKILL.md +6 -6
- package/skills/omc-setup/SKILL.md +30 -74
- package/skills/omc-setup/phases/01-install-claude-md.md +97 -0
- package/skills/omc-setup/phases/02-configure.md +25 -40
- package/skills/omc-setup/phases/03-integrations.md +100 -69
- package/skills/omc-setup/phases/04-welcome.md +102 -44
- package/skills/omc-teams/SKILL.md +63 -26
- package/skills/plan/SKILL.md +11 -9
- package/skills/ralph/SKILL.md +42 -41
- package/skills/ralplan/SKILL.md +3 -10
- package/skills/release/SKILL.md +168 -57
- package/skills/remember/SKILL.md +2 -1
- package/skills/sciomc/SKILL.md +12 -11
- package/skills/self-improve/SKILL.md +4 -4
- package/skills/setup/SKILL.md +1 -0
- package/skills/skill/SKILL.md +21 -20
- package/skills/skillify/SKILL.md +34 -3
- package/skills/team/SKILL.md +62 -44
- package/skills/ultraqa/SKILL.md +1 -2
- package/skills/ultrawork/SKILL.md +28 -21
- package/skills/verify/SKILL.md +2 -1
- package/skills/writer-memory/SKILL.md +2 -1
- package/templates/hooks/pre-tool-use.mjs +144 -45
|
@@ -1,135 +1,133 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ai-slop-cleaner
|
|
3
|
-
description: Clean AI-generated code slop with a
|
|
3
|
+
description: Clean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode
|
|
4
|
+
level: 3
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
7
|
+
# AI Slop Cleaner
|
|
8
|
+
|
|
9
|
+
Use this skill to clean AI-generated code slop without drifting scope or changing intended behavior. In OMC, this is the bounded cleanup workflow for code that works but feels bloated, repetitive, weakly tested, or over-abstracted.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
Use this skill when:
|
|
14
|
+
- the user explicitly says `deslop`, `anti-slop`, or `AI slop`
|
|
15
|
+
- the request is to clean up or refactor code that feels noisy, repetitive, or overly abstract
|
|
16
|
+
- follow-up implementation left duplicate logic, dead code, wrapper layers, boundary leaks, or weak regression coverage
|
|
17
|
+
- the user wants a reviewer-only anti-slop pass via `--review`
|
|
18
|
+
- the goal is simplification and cleanup, not new feature delivery
|
|
19
|
+
|
|
20
|
+
## When Not to Use
|
|
21
|
+
|
|
22
|
+
Do not use this skill when:
|
|
23
|
+
- the task is mainly a new feature build or product change
|
|
24
|
+
- the user wants a broad redesign instead of an incremental cleanup pass
|
|
25
|
+
- the request is a generic refactor with no simplification or anti-slop intent
|
|
26
|
+
- behavior is too unclear to protect with tests or a concrete verification plan
|
|
27
|
+
|
|
28
|
+
## OMC Execution Posture
|
|
29
|
+
|
|
30
|
+
- Preserve behavior unless the user explicitly asks for behavior changes.
|
|
31
|
+
- Lock behavior with focused regression tests first whenever practical.
|
|
32
|
+
- Write a cleanup plan before editing code.
|
|
33
|
+
- Prefer deletion over addition.
|
|
34
|
+
- Reuse existing utilities and patterns before introducing new ones.
|
|
35
|
+
- Avoid new dependencies unless the user explicitly requests them.
|
|
36
|
+
- Keep diffs small, reversible, and smell-focused.
|
|
37
|
+
- Stay concise and evidence-dense: inspect, edit, verify, and report.
|
|
38
|
+
- Treat new user instructions as local scope updates without dropping earlier non-conflicting constraints.
|
|
39
|
+
|
|
40
|
+
## Scoped File-List Usage
|
|
41
|
+
|
|
42
|
+
This skill can be bounded to an explicit file list or changed-file scope when the caller already knows the safe cleanup surface.
|
|
43
|
+
|
|
44
|
+
- Good fit: `oh-my-copilot:ai-slop-cleaner skills/ralph/SKILL.md skills/ai-slop-cleaner/SKILL.md`
|
|
45
|
+
- Good fit: a Ralph session handing off only the files changed in that session
|
|
46
|
+
- Preserve the same regression-safe workflow even when the scope is a short file list
|
|
47
|
+
- Do not silently expand a changed-file scope into broader cleanup work unless the user explicitly asks for it
|
|
48
|
+
|
|
49
|
+
## Ralph Integration
|
|
50
|
+
|
|
51
|
+
Ralph can invoke this skill as a bounded post-review cleanup pass.
|
|
52
|
+
|
|
53
|
+
- In that workflow, the cleaner runs in standard mode (not `--review`)
|
|
54
|
+
- The cleanup scope is the Ralph session's changed files only
|
|
55
|
+
- After the cleanup pass, Ralph re-runs regression verification before completion
|
|
56
|
+
- `--review` remains the reviewer-only follow-up mode, not the default Ralph integration path
|
|
57
|
+
|
|
58
|
+
## Review Mode (`--review`)
|
|
59
|
+
|
|
60
|
+
`--review` is a reviewer-only pass after cleanup work is drafted. It exists to preserve explicit writer/reviewer separation for anti-slop work.
|
|
32
61
|
|
|
33
62
|
- **Writer pass**: make the cleanup changes with behavior locked by tests.
|
|
34
|
-
- **Reviewer pass
|
|
35
|
-
- The same pass must not both write and self-approve without a separate review step.
|
|
63
|
+
- **Reviewer pass**: inspect the cleanup plan, changed files, and verification evidence.
|
|
64
|
+
- The same pass must not both write and self-approve high-impact cleanup without a separate review step.
|
|
36
65
|
|
|
37
66
|
In review mode:
|
|
38
|
-
1. Do **not**
|
|
39
|
-
2.
|
|
67
|
+
1. Do **not** start by editing files.
|
|
68
|
+
2. Review the cleanup plan, changed files, and regression coverage.
|
|
40
69
|
3. Check specifically for:
|
|
41
70
|
- leftover dead code or unused exports
|
|
42
|
-
- duplicate logic that
|
|
71
|
+
- duplicate logic that should have been consolidated
|
|
43
72
|
- needless wrappers or abstractions that still blur boundaries
|
|
44
73
|
- missing tests or weak verification for preserved behavior
|
|
45
|
-
-
|
|
74
|
+
- cleanup that appears to have changed behavior without intent
|
|
46
75
|
4. Produce a reviewer verdict with required follow-ups.
|
|
47
|
-
5.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
- **
|
|
85
|
-
- **
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
6. **Optional `--review` pass**
|
|
92
|
-
- Run a distinct reviewer pass that checks duplication, dead code, boundary violations, test coverage, and needless abstractions
|
|
93
|
-
- If the reviewer finds issues, address them in a follow-up cleanup pass before closing the task
|
|
94
|
-
|
|
95
|
-
7. **Report outcome**
|
|
96
|
-
- Changed files
|
|
97
|
-
- Simplifications made
|
|
98
|
-
- Behavior locked by tests
|
|
99
|
-
- Remaining risks or slop intentionally left for a later pass
|
|
100
|
-
</Steps>
|
|
101
|
-
|
|
102
|
-
<Examples>
|
|
103
|
-
<Good>
|
|
104
|
-
User: "deslop this module -- too many wrappers, duplicate helpers, and dead code"
|
|
105
|
-
Why good: Explicit anti-slop intent with concrete cleanup smells.
|
|
106
|
-
</Good>
|
|
107
|
-
|
|
108
|
-
<Good>
|
|
109
|
-
User: "cleanup the AI slop in src/auth: remove dead code and tighten boundaries"
|
|
110
|
-
Why good: Cleanup/refactor request is clearly about simplification, not feature work.
|
|
111
|
-
</Good>
|
|
112
|
-
|
|
113
|
-
<Bad>
|
|
114
|
-
User: "refactor auth to support SSO"
|
|
115
|
-
Why bad: This is feature work disguised as refactoring, not anti-slop cleanup.
|
|
116
|
-
</Bad>
|
|
117
|
-
|
|
118
|
-
<Bad>
|
|
119
|
-
User: "clean up formatting"
|
|
120
|
-
Why bad: Formatting-only work does not need the full anti-slop workflow.
|
|
121
|
-
</Bad>
|
|
122
|
-
</Examples>
|
|
123
|
-
|
|
124
|
-
<Final_Report>
|
|
125
|
-
Always end with:
|
|
126
|
-
- **Changed files**
|
|
127
|
-
- **Simplifications**
|
|
128
|
-
- **Verification run**
|
|
129
|
-
- **Remaining risks**
|
|
130
|
-
</Final_Report>
|
|
131
|
-
|
|
132
|
-
<Usage>
|
|
76
|
+
5. Hand needed changes back to a separate writer pass instead of fixing and approving in one step.
|
|
77
|
+
|
|
78
|
+
## Workflow
|
|
79
|
+
|
|
80
|
+
1. **Protect current behavior first**
|
|
81
|
+
- Identify what must stay the same.
|
|
82
|
+
- Add or run the narrowest regression tests needed before editing.
|
|
83
|
+
- If tests cannot come first, record the verification plan explicitly before touching code.
|
|
84
|
+
|
|
85
|
+
2. **Write a cleanup plan before code**
|
|
86
|
+
- Bound the pass to the requested files or feature area.
|
|
87
|
+
- List the concrete smells to remove.
|
|
88
|
+
- Order the work from safest deletion to riskier consolidation.
|
|
89
|
+
|
|
90
|
+
3. **Classify the slop before editing**
|
|
91
|
+
- **Duplication** — repeated logic, copy-paste branches, redundant helpers
|
|
92
|
+
- **Dead code** — unused code, unreachable branches, stale flags, debug leftovers
|
|
93
|
+
- **Needless abstraction** — pass-through wrappers, speculative indirection, single-use helper layers
|
|
94
|
+
- **Boundary violations** — hidden coupling, misplaced responsibilities, wrong-layer imports or side effects
|
|
95
|
+
- **Missing tests** — behavior not locked, weak regression coverage, edge-case gaps
|
|
96
|
+
|
|
97
|
+
4. **Run one smell-focused pass at a time**
|
|
98
|
+
- **Pass 1: Dead code deletion**
|
|
99
|
+
- **Pass 2: Duplicate removal**
|
|
100
|
+
- **Pass 3: Naming and error-handling cleanup**
|
|
101
|
+
- **Pass 4: Test reinforcement**
|
|
102
|
+
- Re-run targeted verification after each pass.
|
|
103
|
+
- Do not bundle unrelated refactors into the same edit set.
|
|
104
|
+
|
|
105
|
+
5. **Run the quality gates**
|
|
106
|
+
- Keep regression tests green.
|
|
107
|
+
- Run the relevant lint, typecheck, and unit/integration tests for the touched area.
|
|
108
|
+
- Run existing static or security checks when available.
|
|
109
|
+
- If a gate fails, fix the issue or back out the risky cleanup instead of forcing it through.
|
|
110
|
+
|
|
111
|
+
6. **Close with an evidence-dense report**
|
|
112
|
+
Always report:
|
|
113
|
+
- **Changed files**
|
|
114
|
+
- **Simplifications**
|
|
115
|
+
- **Behavior lock / verification run**
|
|
116
|
+
- **Remaining risks**
|
|
117
|
+
|
|
118
|
+
## Usage
|
|
119
|
+
|
|
133
120
|
- `/oh-my-copilot:ai-slop-cleaner <target>`
|
|
134
121
|
- `/oh-my-copilot:ai-slop-cleaner <target> --review`
|
|
135
|
-
|
|
122
|
+
- `/oh-my-copilot:ai-slop-cleaner <file-a> <file-b> <file-c>`
|
|
123
|
+
- From Ralph: run the cleaner on the Ralph session's changed files only, then return to Ralph for post-cleanup regression verification
|
|
124
|
+
|
|
125
|
+
## Good Fits
|
|
126
|
+
|
|
127
|
+
**Good:** `deslop this module: too many wrappers, duplicate helpers, and dead code`
|
|
128
|
+
|
|
129
|
+
**Good:** `cleanup the AI slop in src/auth and tighten boundaries without changing behavior`
|
|
130
|
+
|
|
131
|
+
**Bad:** `refactor auth to support SSO`
|
|
132
|
+
|
|
133
|
+
**Bad:** `clean up formatting`
|
package/skills/ask/SKILL.md
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ask
|
|
3
|
-
description: Process-first advisor routing for
|
|
3
|
+
description: Process-first advisor routing for Claude, Codex, or Gemini via `omc ask`, with artifact capture and no raw CLI assembly
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Ask
|
|
7
7
|
|
|
8
|
-
Use OMC's canonical advisor skill to route a prompt through
|
|
8
|
+
Use OMC's canonical advisor skill to route a prompt through the local Claude, Codex, or Gemini CLI and persist the result as an ask artifact.
|
|
9
9
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
/oh-my-copilot:ask <
|
|
13
|
+
/oh-my-copilot:ask <claude|codex|gemini> <question or task>
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Examples:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
/oh-my-copilot:ask copilot "get a fresh perspective on this design decision"
|
|
20
19
|
/oh-my-copilot:ask codex "review this patch from a security perspective"
|
|
21
20
|
/oh-my-copilot:ask gemini "suggest UX improvements for this flow"
|
|
22
21
|
/oh-my-copilot:ask claude "draft an implementation plan for issue #123"
|
|
@@ -27,10 +26,10 @@ Examples:
|
|
|
27
26
|
**Required execution path — always use this command:**
|
|
28
27
|
|
|
29
28
|
```bash
|
|
30
|
-
|
|
29
|
+
omc ask {{ARGUMENTS}}
|
|
31
30
|
```
|
|
32
31
|
|
|
33
|
-
**Do NOT manually construct raw provider CLI commands.** Never run `
|
|
32
|
+
**Do NOT manually construct raw provider CLI commands.** Never run `codex`, `claude`, or `gemini` directly to fulfill this skill. The `omc ask` wrapper handles correct flag selection, artifact persistence, and provider-version compatibility automatically. Manually assembling provider CLI flags will produce incorrect or outdated invocations.
|
|
34
33
|
|
|
35
34
|
## Requirements
|
|
36
35
|
|
|
@@ -38,7 +37,6 @@ omcp ask {{ARGUMENTS}}
|
|
|
38
37
|
- Verify availability with the matching command:
|
|
39
38
|
|
|
40
39
|
```bash
|
|
41
|
-
copilot --version
|
|
42
40
|
claude --version
|
|
43
41
|
codex --version
|
|
44
42
|
gemini --version
|
|
@@ -46,7 +44,7 @@ gemini --version
|
|
|
46
44
|
|
|
47
45
|
## Artifacts
|
|
48
46
|
|
|
49
|
-
`
|
|
47
|
+
`omc ask` writes artifacts to:
|
|
50
48
|
|
|
51
49
|
```text
|
|
52
50
|
.omcp/artifacts/ask/<provider>-<slug>-<timestamp>.md
|
|
@@ -28,20 +28,6 @@ Autopilot takes a brief product idea and autonomously handles the full lifecycle
|
|
|
28
28
|
Most non-trivial software tasks require coordinated phases: understanding requirements, designing a solution, implementing in parallel, testing, and validating quality. Autopilot orchestrates all of these phases automatically so the user can describe what they want and receive working code without managing each step.
|
|
29
29
|
</Why_This_Exists>
|
|
30
30
|
|
|
31
|
-
<Complexity_Gate>
|
|
32
|
-
Before starting Phase 0, classify the task complexity:
|
|
33
|
-
|
|
34
|
-
1. **Heuristic check** (zero-cost): The system's complexity classifier runs pattern matching on your prompt
|
|
35
|
-
2. **AI assessment** (if heuristic inconclusive): Spawn an `explore` agent (haiku) to assess complexity
|
|
36
|
-
|
|
37
|
-
**Routing by complexity:**
|
|
38
|
-
- **SIMPLE** (e.g., "fix typo", "rename variable", "bump version"): Skip Phase 0 and Phase 1 entirely. Jump directly to Phase 2 (Execution) with a minimal plan.
|
|
39
|
-
- **STANDARD** (default): Run the normal autopilot flow (all phases)
|
|
40
|
-
- **COMPLEX** (e.g., auth systems, migrations, distributed architecture): Run all phases AND add Critic review after Phase 0 and Phase 1 for additional quality gates
|
|
41
|
-
|
|
42
|
-
Complexity result is stored in `.omcp/state/sessions/{sessionId}/complexity.json` for downstream phases to reference.
|
|
43
|
-
</Complexity_Gate>
|
|
44
|
-
|
|
45
31
|
<Execution_Policy>
|
|
46
32
|
- Each phase must complete before the next begins
|
|
47
33
|
- Parallel execution is used within phases where possible (Phase 2 and Phase 4)
|
|
@@ -58,27 +44,23 @@ Complexity result is stored in `.omcp/state/sessions/{sessionId}/complexity.json
|
|
|
58
44
|
- **If input is vague** (no file paths, function names, or concrete anchors): Offer redirect to `/deep-interview` for Socratic clarification before expanding
|
|
59
45
|
- **Otherwise**: Analyst (Opus) extracts requirements, Architect (Opus) creates technical specification
|
|
60
46
|
- Output: `.omcp/autopilot/spec.md`
|
|
61
|
-
- **Context capture**: Phase 0 output (spec summary) is captured for injection into Phase 1
|
|
62
47
|
|
|
63
48
|
2. **Phase 1 - Planning**: Create an implementation plan from the spec
|
|
64
49
|
- **If ralplan consensus plan exists**: Skip — already done in the 3-stage pipeline
|
|
65
50
|
- Architect (Opus): Create plan (direct mode, no interview)
|
|
66
51
|
- Critic (Opus): Validate plan
|
|
67
52
|
- Output: `.omcp/plans/autopilot-impl.md`
|
|
68
|
-
- **Context capture**: Phase 1 output (plan summary) is captured for injection into Phase 2
|
|
69
53
|
|
|
70
54
|
3. **Phase 2 - Execution**: Implement the plan using Ralph + Ultrawork
|
|
71
55
|
- Executor (Haiku): Simple tasks
|
|
72
56
|
- Executor (Sonnet): Standard tasks
|
|
73
57
|
- Executor (Opus): Complex tasks
|
|
74
58
|
- Run independent tasks in parallel
|
|
75
|
-
- **Context capture**: Phase 2 output (implementation summary: files changed, decisions made) is captured for injection into Phase 3
|
|
76
59
|
|
|
77
60
|
4. **Phase 3 - QA**: Cycle until all tests pass (UltraQA mode)
|
|
78
61
|
- Build, lint, test, fix failures
|
|
79
62
|
- Repeat up to 5 cycles
|
|
80
63
|
- Stop early if the same error repeats 3 times (indicates a fundamental issue)
|
|
81
|
-
- **Context capture**: Phase 3 output (QA results) is captured for injection into Phase 4
|
|
82
64
|
|
|
83
65
|
5. **Phase 4 - Validation**: Multi-perspective review in parallel
|
|
84
66
|
- Architect: Functional completeness
|
|
@@ -95,7 +77,7 @@ Complexity result is stored in `.omcp/state/sessions/{sessionId}/complexity.json
|
|
|
95
77
|
- Use `Task(subagent_type="oh-my-copilot:architect", ...)` for Phase 4 architecture validation
|
|
96
78
|
- Use `Task(subagent_type="oh-my-copilot:security-reviewer", ...)` for Phase 4 security review
|
|
97
79
|
- Use `Task(subagent_type="oh-my-copilot:code-reviewer", ...)` for Phase 4 quality review
|
|
98
|
-
- Agents form their own analysis first, then spawn
|
|
80
|
+
- Agents form their own analysis first, then spawn Claude Task agents for cross-validation
|
|
99
81
|
- Never block on external tools; proceed with available agents if delegation fails
|
|
100
82
|
</Tool_Usage>
|
|
101
83
|
|
|
@@ -138,15 +120,6 @@ Why bad: This is an exploration/brainstorming request. Respond conversationally
|
|
|
138
120
|
</Final_Checklist>
|
|
139
121
|
|
|
140
122
|
<Advanced>
|
|
141
|
-
## Context Accumulation
|
|
142
|
-
|
|
143
|
-
Autopilot captures key outputs from each phase and injects them into the next phase's agent prompt as a `<prior-phase-context>` block. This ensures downstream agents have context from earlier phases without needing to re-read files.
|
|
144
|
-
|
|
145
|
-
- Phase outputs are truncated to 12KB each
|
|
146
|
-
- Context is session-scoped and cleared on `/cancel`
|
|
147
|
-
- Includes: spec summaries, plan summaries, implementation decisions, QA results
|
|
148
|
-
- Stored in `.omcp/state/sessions/{sessionId}/phase-context.json`
|
|
149
|
-
|
|
150
123
|
## Configuration
|
|
151
124
|
|
|
152
125
|
Optional settings in `.copilot/omg.jsonc` (project) or `~/.config/copilot-omg/config.jsonc` (user):
|
|
@@ -12,14 +12,14 @@ Autoresearch is a stateful skill for bounded, evaluator-driven iterative improve
|
|
|
12
12
|
<Use_When>
|
|
13
13
|
- You already have a mission and evaluator from `/deep-interview --autoresearch`
|
|
14
14
|
- You want persistent single-mission improvement with strict evaluation
|
|
15
|
-
- You need durable experiment logs under `.
|
|
15
|
+
- You need durable experiment logs under `.omcp/autoresearch/`
|
|
16
16
|
- You want a supported path for periodic reruns via Claude Code native cron
|
|
17
17
|
</Use_When>
|
|
18
18
|
|
|
19
19
|
<Do_Not_Use_When>
|
|
20
20
|
- You need evaluator generation at runtime — use `/deep-interview --autoresearch` first
|
|
21
21
|
- You need multiple missions orchestrated together — v1 forbids that
|
|
22
|
-
- You want the deprecated `
|
|
22
|
+
- You want the deprecated `omc autoresearch` CLI flow — it is no longer authoritative
|
|
23
23
|
</Do_Not_Use_When>
|
|
24
24
|
|
|
25
25
|
<Contract>
|
|
@@ -31,7 +31,7 @@ Autoresearch is a stateful skill for bounded, evaluator-driven iterative improve
|
|
|
31
31
|
</Contract>
|
|
32
32
|
|
|
33
33
|
<Required_Artifacts>
|
|
34
|
-
Canonical persistent storage lives under `.
|
|
34
|
+
Canonical persistent storage lives under `.omcp/autoresearch/<mission-slug>/` and/or `.omcp/logs/autoresearch/<run-id>/`.
|
|
35
35
|
|
|
36
36
|
Minimum required artifacts:
|
|
37
37
|
- mission spec
|
|
@@ -41,7 +41,7 @@ Minimum required artifacts:
|
|
|
41
41
|
|
|
42
42
|
Recommended canonical shape:
|
|
43
43
|
```text
|
|
44
|
-
.
|
|
44
|
+
.omcp/autoresearch/<mission-slug>/
|
|
45
45
|
mission.md
|
|
46
46
|
evaluator.json
|
|
47
47
|
runs/<run-id>/
|
|
@@ -83,7 +83,7 @@ If cron is used:
|
|
|
83
83
|
</Cron_Integration>
|
|
84
84
|
|
|
85
85
|
<Execution_Policy>
|
|
86
|
-
- Do not hand execution back to `
|
|
86
|
+
- Do not hand execution back to `omc autoresearch`
|
|
87
87
|
- Do not create multi-mission orchestration
|
|
88
88
|
- Prefer reusing `src/autoresearch/*` runtime/schema helpers where they already match the stricter contract
|
|
89
89
|
- Keep logs useful to humans, not only machines
|
package/skills/cancel/SKILL.md
CHANGED
|
@@ -39,7 +39,7 @@ Or say: "cancelomc", "stopomc"
|
|
|
39
39
|
## Critical: Deferred Tool Handling
|
|
40
40
|
|
|
41
41
|
The state management tools (`state_clear`, `state_read`, `state_write`, `state_list_active`,
|
|
42
|
-
`state_get_status`) may be registered as **deferred tools** by
|
|
42
|
+
`state_get_status`) may be registered as **deferred tools** by Claude Code. Before calling
|
|
43
43
|
any state tool, you MUST first load all of them via `ToolSearch`:
|
|
44
44
|
|
|
45
45
|
```
|
|
@@ -115,10 +115,10 @@ Active modes are still cancelled in dependency order:
|
|
|
115
115
|
5. Swarm (standalone)
|
|
116
116
|
6. Ultrapilot (standalone)
|
|
117
117
|
7. Pipeline (standalone)
|
|
118
|
-
8. Team (
|
|
118
|
+
8. Team (Claude Code native)
|
|
119
119
|
9. OMC Teams (tmux CLI workers)
|
|
120
120
|
10. Plan Consensus (standalone)
|
|
121
|
-
11. Self-Improve (standalone — clear state, clean orphaned worktrees, preserve iteration_state for resume, set status: "user_stopped" in the resolved `<self-improve-root>/state/agent-settings.json`; new runs use `.
|
|
121
|
+
11. Self-Improve (standalone — clear state, clean orphaned worktrees, preserve iteration_state for resume, set status: "user_stopped" in the resolved `<self-improve-root>/state/agent-settings.json`; new runs use `.omcp/self-improve/topics/<topic-slug>/`, with flat `.omcp/self-improve/` retained only for legacy single-track resumes)
|
|
122
122
|
|
|
123
123
|
## Force Clear All
|
|
124
124
|
|
|
@@ -136,7 +136,7 @@ Steps under the hood:
|
|
|
136
136
|
1. `state_list_active` enumerates `.omcp/state/sessions/{sessionId}/…` to find every known session.
|
|
137
137
|
2. `state_clear` runs once per session to drop that session’s files.
|
|
138
138
|
3. A global `state_clear` without `session_id` removes legacy files under `.omcp/state/*.json`, `.omcp/state/swarm*.db`, and compatibility artifacts (see list).
|
|
139
|
-
4. Team artifacts (`~/.
|
|
139
|
+
4. Team artifacts (`~/.claude/teams/*/`, `~/.claude/tasks/*/`, `.omcp/state/team-state.json`) are best-effort cleared as part of the legacy fallback.
|
|
140
140
|
- Cancel for native team does NOT affect omc-teams state, and vice versa.
|
|
141
141
|
|
|
142
142
|
Every `state_clear` command honors the `session_id` argument, so even force mode still uses the session-aware paths first before deleting legacy files.
|
|
@@ -196,7 +196,7 @@ Use force mode to clear every session plus legacy artifacts via `state_clear`. D
|
|
|
196
196
|
|
|
197
197
|
### 3B. Smart Cancellation (default)
|
|
198
198
|
|
|
199
|
-
#### If Team Active (
|
|
199
|
+
#### If Team Active (Claude Code native)
|
|
200
200
|
|
|
201
201
|
Teams are detected by checking for config files in `${COPILOT_CONFIG_DIR:-~/.copilot}/teams/`:
|
|
202
202
|
|
|
@@ -233,7 +233,7 @@ After graceful pass:
|
|
|
233
233
|
|
|
234
234
|
**TeamDelete + Cleanup:**
|
|
235
235
|
```
|
|
236
|
-
1. Call TeamDelete() — removes ~/.
|
|
236
|
+
1. Call TeamDelete() — removes ~/.claude/teams/{name}/ and ~/.claude/tasks/{name}/
|
|
237
237
|
2. Clear team state: state_clear(mode="team")
|
|
238
238
|
3. Check for linked ralph: state_read(mode="ralph") — if linked_team is true:
|
|
239
239
|
a. Clear ralph state: state_clear(mode="ralph")
|
|
@@ -246,7 +246,7 @@ After graceful pass:
|
|
|
246
246
|
|
|
247
247
|
After TeamDelete, verify no agent processes remain:
|
|
248
248
|
```bash
|
|
249
|
-
node "${
|
|
249
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/cleanup-orphans.mjs" --team-name "{team_name}"
|
|
250
250
|
```
|
|
251
251
|
|
|
252
252
|
The orphan scanner:
|
|
@@ -264,7 +264,7 @@ Team "{team_name}" cancelled:
|
|
|
264
264
|
- Unresponsive: K (list names if any)
|
|
265
265
|
- TeamDelete: success/failed
|
|
266
266
|
- Manual cleanup needed: yes/no
|
|
267
|
-
Path: ~/.
|
|
267
|
+
Path: ~/.claude/teams/{name}/ and ~/.claude/tasks/{name}/
|
|
268
268
|
```
|
|
269
269
|
|
|
270
270
|
**Implementation note:** The cancel skill is executed by the LLM, not as a bash script. When you detect an active team:
|
|
@@ -318,7 +318,7 @@ The cancel skill runs as follows:
|
|
|
318
318
|
2. Use `state_list_active` to enumerate known session ids and `state_get_status` to learn the active mode (`autopilot`, `ralph`, `ultrawork`, etc.) for each session.
|
|
319
319
|
3. When operating in default mode, call `state_clear` with that session_id to remove only the session’s files, then run mode-specific cleanup (autopilot → ralph → …) based on the state tool signals.
|
|
320
320
|
4. In force mode, iterate every active session, call `state_clear` per session, then run a global `state_clear` without `session_id` to drop legacy files (`.omcp/state/*.json`, compatibility artifacts) and report success. Swarm remains a shared SQLite/marker mode outside session scoping.
|
|
321
|
-
5. Team artifacts (`~/.
|
|
321
|
+
5. Team artifacts (`~/.claude/teams/*/`, `~/.claude/tasks/*/`, `.omcp/state/team-state.json`) remain best-effort cleanup items invoked during the legacy/global pass.
|
|
322
322
|
6. **Always** clear skill-active state as the final step, regardless of which mode was active or whether `--force` was used:
|
|
323
323
|
```
|
|
324
324
|
state_clear(mode="skill-active", session_id)
|
|
@@ -364,7 +364,7 @@ Mode-specific subsections below describe what extra cleanup each handler perform
|
|
|
364
364
|
- **Safe**: Only clears linked Ultrawork, preserves standalone Ultrawork
|
|
365
365
|
- **Local-only**: Clears state files in `.omcp/state/` directory
|
|
366
366
|
- **Resume-friendly**: Autopilot state is preserved for seamless resume
|
|
367
|
-
- **Team-aware**: Detects native
|
|
367
|
+
- **Team-aware**: Detects native Claude Code teams and performs graceful shutdown
|
|
368
368
|
|
|
369
369
|
## MCP Worker Cleanup
|
|
370
370
|
|
|
@@ -372,7 +372,7 @@ When cancelling modes that may have spawned MCP workers (team bridge daemons), t
|
|
|
372
372
|
|
|
373
373
|
1. **Check for active MCP workers**: Look for heartbeat files at `.omcp/state/team-bridge/{team}/*.heartbeat.json`
|
|
374
374
|
2. **Send shutdown signals**: Write shutdown signal files for each active worker
|
|
375
|
-
3. **Kill tmux sessions**: Run `tmux kill-session -t
|
|
375
|
+
3. **Kill tmux sessions**: Run `tmux kill-session -t omc-team-{team}-{worker}` for each worker
|
|
376
376
|
4. **Clean up heartbeat files**: Remove all heartbeat files for the team
|
|
377
377
|
5. **Clean up shadow registry**: Remove `.omcp/state/team-mcp-workers.json`
|
|
378
378
|
|
|
@@ -382,6 +382,6 @@ When `--force` is used, also clean up:
|
|
|
382
382
|
```bash
|
|
383
383
|
rm -rf .omcp/state/team-bridge/ # Heartbeat files
|
|
384
384
|
rm -f .omcp/state/team-mcp-workers.json # Shadow registry
|
|
385
|
-
# Kill all
|
|
386
|
-
tmux list-sessions -F '#{session_name}' 2>/dev/null | grep '^
|
|
385
|
+
# Kill all omc-team-* tmux sessions
|
|
386
|
+
tmux list-sessions -F '#{session_name}' 2>/dev/null | grep '^omc-team-' | while read s; do tmux kill-session -t "$s" 2>/dev/null; done
|
|
387
387
|
```
|