@trac3er/oh-my-god 1.0.2
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 +36 -0
- package/.claude-plugin/plugin.json +23 -0
- package/.claude-plugin/scripts/install.sh +49 -0
- package/.claude-plugin/scripts/uninstall.sh +80 -0
- package/.claude-plugin/scripts/update.sh +84 -0
- package/.mcp.json +20 -0
- package/LICENSE +21 -0
- package/OMG-setup.sh +1093 -0
- package/README.md +335 -0
- package/THIRD_PARTY_NOTICES.md +24 -0
- package/UPSTREAM_DIFF.md +20 -0
- package/agents/__init__.py +1 -0
- package/agents/_model_roles.yaml +26 -0
- package/agents/designer.md +67 -0
- package/agents/explore.md +60 -0
- package/agents/model_roles.py +196 -0
- package/agents/omg-api-builder.md +23 -0
- package/agents/omg-architect-mode.md +43 -0
- package/agents/omg-architect.md +13 -0
- package/agents/omg-backend-engineer.md +43 -0
- package/agents/omg-critic.md +16 -0
- package/agents/omg-database-engineer.md +43 -0
- package/agents/omg-escalation-router.md +17 -0
- package/agents/omg-executor.md +12 -0
- package/agents/omg-frontend-designer.md +42 -0
- package/agents/omg-implement-mode.md +50 -0
- package/agents/omg-infra-engineer.md +43 -0
- package/agents/omg-qa-tester.md +16 -0
- package/agents/omg-research-mode.md +43 -0
- package/agents/omg-security-auditor.md +43 -0
- package/agents/omg-testing-engineer.md +43 -0
- package/agents/plan.md +80 -0
- package/agents/quick_task.md +64 -0
- package/agents/reviewer.md +83 -0
- package/agents/task.md +71 -0
- package/commands/OMG:ccg.md +22 -0
- package/commands/OMG:compat.md +57 -0
- package/commands/OMG:crazy.md +125 -0
- package/commands/OMG:domain-init.md +11 -0
- package/commands/OMG:escalate.md +52 -0
- package/commands/OMG:health-check.md +45 -0
- package/commands/OMG:init.md +134 -0
- package/commands/OMG:mode.md +44 -0
- package/commands/OMG:project-init.md +11 -0
- package/commands/OMG:ralph-start.md +43 -0
- package/commands/OMG:ralph-stop.md +23 -0
- package/commands/OMG:teams.md +39 -0
- package/commands/ai-commit.md +113 -0
- package/commands/ccg.md +9 -0
- package/commands/create-agent.md +183 -0
- package/commands/omc-teams.md +9 -0
- package/commands/session-branch.md +85 -0
- package/commands/session-fork.md +53 -0
- package/commands/session-merge.md +134 -0
- package/commands/theme.md +44 -0
- package/config/lsp_languages.yaml +324 -0
- package/config/themes/catppuccin-frappe.yaml +14 -0
- package/config/themes/catppuccin-latte.yaml +14 -0
- package/config/themes/catppuccin-macchiato.yaml +14 -0
- package/config/themes/catppuccin-mocha.yaml +14 -0
- package/config/themes/dracula.yaml +14 -0
- package/config/themes/gruvbox-dark.yaml +14 -0
- package/config/themes/nord.yaml +14 -0
- package/config/themes/one-dark.yaml +14 -0
- package/config/themes/solarized-dark.yaml +14 -0
- package/config/themes/tokyo-night.yaml +14 -0
- package/control_plane/__init__.py +2 -0
- package/control_plane/openapi.yaml +109 -0
- package/control_plane/server.py +107 -0
- package/control_plane/service.py +148 -0
- package/crates/omg-natives/Cargo.toml +17 -0
- package/crates/omg-natives/src/clipboard.rs +5 -0
- package/crates/omg-natives/src/glob.rs +15 -0
- package/crates/omg-natives/src/grep.rs +15 -0
- package/crates/omg-natives/src/highlight.rs +15 -0
- package/crates/omg-natives/src/html.rs +14 -0
- package/crates/omg-natives/src/image.rs +5 -0
- package/crates/omg-natives/src/keys.rs +5 -0
- package/crates/omg-natives/src/lib.rs +36 -0
- package/crates/omg-natives/src/prof.rs +5 -0
- package/crates/omg-natives/src/ps.rs +5 -0
- package/crates/omg-natives/src/shell.rs +5 -0
- package/crates/omg-natives/src/task.rs +5 -0
- package/crates/omg-natives/src/text.rs +14 -0
- package/hooks/_agent_registry.py +421 -0
- package/hooks/_budget.py +31 -0
- package/hooks/_common.py +476 -0
- package/hooks/_learnings.py +126 -0
- package/hooks/_memory.py +103 -0
- package/hooks/circuit-breaker.py +270 -0
- package/hooks/config-guard.py +163 -0
- package/hooks/context_pressure.py +53 -0
- package/hooks/credential_store.py +801 -0
- package/hooks/fetch-rate-limits.py +212 -0
- package/hooks/firewall.py +48 -0
- package/hooks/hashline-formatter-bridge.py +224 -0
- package/hooks/hashline-injector.py +273 -0
- package/hooks/hashline-validator.py +216 -0
- package/hooks/idle-detector.py +95 -0
- package/hooks/intentgate-keyword-detector.py +188 -0
- package/hooks/magic-keyword-router.py +195 -0
- package/hooks/policy_engine.py +310 -0
- package/hooks/post-tool-failure.py +19 -0
- package/hooks/post-write.py +199 -0
- package/hooks/pre-compact.py +204 -0
- package/hooks/pre-tool-inject.py +98 -0
- package/hooks/prompt-enhancer.py +672 -0
- package/hooks/quality-runner.py +191 -0
- package/hooks/secret-guard.py +47 -0
- package/hooks/session-end-capture.py +137 -0
- package/hooks/session-start.py +275 -0
- package/hooks/shadow_manager.py +297 -0
- package/hooks/state_migration.py +209 -0
- package/hooks/stop-gate.py +7 -0
- package/hooks/stop_dispatcher.py +929 -0
- package/hooks/test-validator.py +138 -0
- package/hooks/todo-state-tracker.py +114 -0
- package/hooks/tool-ledger.py +126 -0
- package/hooks/trust_review.py +524 -0
- package/install.sh +9 -0
- package/omg_natives/__init__.py +186 -0
- package/omg_natives/_bindings.py +165 -0
- package/omg_natives/clipboard.py +36 -0
- package/omg_natives/glob.py +42 -0
- package/omg_natives/grep.py +61 -0
- package/omg_natives/highlight.py +54 -0
- package/omg_natives/html.py +157 -0
- package/omg_natives/image.py +51 -0
- package/omg_natives/keys.py +46 -0
- package/omg_natives/prof.py +39 -0
- package/omg_natives/ps.py +93 -0
- package/omg_natives/shell.py +58 -0
- package/omg_natives/task.py +41 -0
- package/omg_natives/text.py +50 -0
- package/package.json +26 -0
- package/plugins/README.md +82 -0
- package/plugins/advanced/commands/OMG:code-review.md +114 -0
- package/plugins/advanced/commands/OMG:deep-plan.md +221 -0
- package/plugins/advanced/commands/OMG:handoff.md +115 -0
- package/plugins/advanced/commands/OMG:learn.md +110 -0
- package/plugins/advanced/commands/OMG:maintainer.md +31 -0
- package/plugins/advanced/commands/OMG:ralph-start.md +43 -0
- package/plugins/advanced/commands/OMG:ralph-stop.md +23 -0
- package/plugins/advanced/commands/OMG:security-review.md +119 -0
- package/plugins/advanced/commands/OMG:sequential-thinking.md +20 -0
- package/plugins/advanced/commands/OMG:ship.md +46 -0
- package/plugins/advanced/plugin.json +96 -0
- package/plugins/core/plugin.json +82 -0
- package/pytest.ini +5 -0
- package/registry/__init__.py +1 -0
- package/registry/verify_artifact.py +90 -0
- package/rules/contextual/architect-mode.md +9 -0
- package/rules/contextual/big-picture.md +20 -0
- package/rules/contextual/code-hygiene.md +26 -0
- package/rules/contextual/context-management.md +19 -0
- package/rules/contextual/context-minimization.md +32 -0
- package/rules/contextual/ddd-sdd.md +28 -0
- package/rules/contextual/dependency-safety.md +16 -0
- package/rules/contextual/doc-check.md +13 -0
- package/rules/contextual/implement-mode.md +9 -0
- package/rules/contextual/infra-safety.md +14 -0
- package/rules/contextual/outside-in.md +13 -0
- package/rules/contextual/persistent-mode.md +24 -0
- package/rules/contextual/research-mode.md +9 -0
- package/rules/contextual/security-domains.md +25 -0
- package/rules/contextual/vision-detection.md +27 -0
- package/rules/contextual/web-search.md +25 -0
- package/rules/contextual/write-verify.md +23 -0
- package/rules/core/00-truth.md +20 -0
- package/rules/core/01-surgical.md +19 -0
- package/rules/core/02-circuit-breaker.md +22 -0
- package/rules/core/03-ensemble.md +28 -0
- package/rules/core/04-testing.md +30 -0
- package/runtime/__init__.py +32 -0
- package/runtime/adapters/__init__.py +13 -0
- package/runtime/adapters/claude.py +60 -0
- package/runtime/adapters/gpt.py +53 -0
- package/runtime/adapters/local.py +53 -0
- package/runtime/business_workflow.py +220 -0
- package/runtime/compat.py +1299 -0
- package/runtime/custom_agent_loader.py +366 -0
- package/runtime/dispatcher.py +47 -0
- package/runtime/ecosystem.py +371 -0
- package/runtime/legacy_compat.py +7 -0
- package/runtime/omc_compat.py +7 -0
- package/runtime/omc_contract_snapshot.json +916 -0
- package/runtime/omg_compat_contract_snapshot.json +916 -0
- package/runtime/subagent_dispatcher.py +362 -0
- package/runtime/team_router.py +838 -0
- package/scripts/check-omc-contract-snapshot.py +12 -0
- package/scripts/check-omg-compat-contract-snapshot.py +137 -0
- package/scripts/check-omg-standalone-clean.py +102 -0
- package/scripts/legacy_to_omg_migrate.py +29 -0
- package/scripts/migrate-omc.py +464 -0
- package/scripts/omc_to_omg_migrate.py +12 -0
- package/scripts/omg.py +493 -0
- package/scripts/settings-merge.py +224 -0
- package/scripts/verify-no-omc.sh +5 -0
- package/scripts/verify-standalone.sh +21 -0
- package/templates/idea.yml +30 -0
- package/templates/policy.yaml +15 -0
- package/templates/profile.yaml +25 -0
- package/templates/runtime.yaml +12 -0
- package/templates/working-memory.md +17 -0
- package/tools/__init__.py +2 -0
- package/tools/browser_consent.py +289 -0
- package/tools/browser_stealth.py +481 -0
- package/tools/browser_tool.py +448 -0
- package/tools/changelog_generator.py +268 -0
- package/tools/commit_splitter.py +361 -0
- package/tools/config_discovery.py +151 -0
- package/tools/config_merger.py +449 -0
- package/tools/git_inspector.py +298 -0
- package/tools/lsp_client.py +275 -0
- package/tools/lsp_discovery.py +231 -0
- package/tools/lsp_operations.py +392 -0
- package/tools/python_repl.py +656 -0
- package/tools/python_sandbox.py +609 -0
- package/tools/search_providers/__init__.py +77 -0
- package/tools/search_providers/brave.py +115 -0
- package/tools/search_providers/exa.py +116 -0
- package/tools/search_providers/jina.py +104 -0
- package/tools/search_providers/perplexity.py +139 -0
- package/tools/search_providers/synthetic.py +74 -0
- package/tools/session_snapshot.py +736 -0
- package/tools/ssh_manager.py +912 -0
- package/tools/theme_engine.py +294 -0
- package/tools/theme_selector.py +137 -0
- package/tools/web_search.py +622 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Unified initializer — auto-detects: project setup (if no .omg/state), domain scaffolding (if argument given), or health check."
|
|
3
|
+
allowed-tools: Read, Write, Edit, MultiEdit, Bash(mkdir:*), Bash(cat:*), Bash(find:*), Bash(ls:*), Bash(head:*), Bash(grep:*), Bash(tree:*), Bash(node:*), Bash(python*:*), Bash(tee:*), Grep, Glob
|
|
4
|
+
argument-hint: "[optional: domain name like 'payment', or 'check' for health check]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /OMG:init — Unified Project & Domain Initializer
|
|
8
|
+
|
|
9
|
+
## Auto-Detection Logic
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
if argument is a domain name (e.g. "payment", "user-profile"):
|
|
13
|
+
→ DOMAIN INIT (create new domain from existing patterns)
|
|
14
|
+
elif .omg/state directory does not exist:
|
|
15
|
+
→ PROJECT INIT (first-time project setup)
|
|
16
|
+
elif .omg/state/profile.yaml exists:
|
|
17
|
+
→ HEALTH CHECK (verify everything works, offer upgrades)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## MODE A: PROJECT INIT (no .omg/state found)
|
|
23
|
+
|
|
24
|
+
### Step 1: Create .omg/state/profile.yaml (MOST IMPORTANT)
|
|
25
|
+
Detect from code. Ask user for anything undetectable.
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
# .omg/state/profile.yaml — injected every session (keep under 20 lines)
|
|
29
|
+
name: "[from package.json/Cargo.toml/pyproject.toml]"
|
|
30
|
+
description: "[1 sentence]"
|
|
31
|
+
repo: "[from git remote -v]"
|
|
32
|
+
|
|
33
|
+
language: "[detect]"
|
|
34
|
+
framework: "[detect]"
|
|
35
|
+
database: "[detect or ask]"
|
|
36
|
+
infra: "[detect from Dockerfile/terraform/etc]"
|
|
37
|
+
key_deps: "[top 5]"
|
|
38
|
+
|
|
39
|
+
conventions:
|
|
40
|
+
naming: "[detect: camelCase/snake_case]"
|
|
41
|
+
test_cmd: "[detect: npm test/pytest/cargo test]"
|
|
42
|
+
lint_cmd: "[detect: eslint/ruff/clippy]"
|
|
43
|
+
|
|
44
|
+
ai_behavior:
|
|
45
|
+
communication: "[ask user: language preference]"
|
|
46
|
+
when_stuck: "Ask user after 2 failed attempts"
|
|
47
|
+
testing: "User-journey focused, not boilerplate"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Step 2: Create knowledge structure + OMG v1 contract dirs
|
|
51
|
+
```
|
|
52
|
+
mkdir -p .omg/state/ledger .omg/knowledge/decisions .omg/knowledge/patterns .omg/knowledge/rules
|
|
53
|
+
mkdir -p .omg/trust .omg/evidence .omg/shadow .omg/migrations
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Copy OMG v1 templates when missing:
|
|
57
|
+
- `.omg/idea.yml`
|
|
58
|
+
- `.omg/policy.yaml`
|
|
59
|
+
- `.omg/runtime.yaml`
|
|
60
|
+
|
|
61
|
+
### Step 3: Auto-detect quality gate
|
|
62
|
+
```json
|
|
63
|
+
// .omg/state/quality-gate.json — only include commands that exist
|
|
64
|
+
{
|
|
65
|
+
"format": "[detect: prettier/black/gofmt or null]",
|
|
66
|
+
"lint": "[detect: eslint/ruff/clippy or null]",
|
|
67
|
+
"typecheck": "[detect: tsc/mypy or null]",
|
|
68
|
+
"test": "[detect: npm test/pytest/cargo test or null]"
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Step 4: Copy relevant contextual rules
|
|
73
|
+
Based on detected project type, copy relevant rules from templates:
|
|
74
|
+
- Web project → security-domains.md, code-hygiene.md
|
|
75
|
+
- Backend → infra-safety.md, dependency-safety.md
|
|
76
|
+
- DDD project → ddd-sdd.md, outside-in.md
|
|
77
|
+
|
|
78
|
+
### Step 5: Verify
|
|
79
|
+
Run `/OMG:health-check` to confirm setup.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## MODE B: DOMAIN INIT (argument = domain name)
|
|
84
|
+
|
|
85
|
+
### Step 1: Find Reference Pattern
|
|
86
|
+
```bash
|
|
87
|
+
find . -type f -name "*.ts" -o -name "*.py" | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -10
|
|
88
|
+
```
|
|
89
|
+
Read the most complete existing domain. Extract:
|
|
90
|
+
- Directory structure (routes, services, models, tests)
|
|
91
|
+
- Naming conventions, error handling, data flow patterns
|
|
92
|
+
|
|
93
|
+
### Step 2: Define the New Domain
|
|
94
|
+
Ask the user:
|
|
95
|
+
- "What entities does [domain] have?"
|
|
96
|
+
- "What actions can be performed?"
|
|
97
|
+
- "What external services does it talk to?"
|
|
98
|
+
- "What are the business rules?"
|
|
99
|
+
|
|
100
|
+
### Step 3: Generate Domain Structure
|
|
101
|
+
Match the reference pattern EXACTLY. Create:
|
|
102
|
+
```
|
|
103
|
+
src/[domain]/
|
|
104
|
+
├── [domain].model.ts
|
|
105
|
+
├── [domain].service.ts
|
|
106
|
+
├── [domain].repository.ts
|
|
107
|
+
├── [domain].controller.ts (or routes)
|
|
108
|
+
├── [domain].types.ts
|
|
109
|
+
└── __tests__/
|
|
110
|
+
└── [domain].service.test.ts
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Step 4: Document the Pattern
|
|
114
|
+
Save to `.omg/knowledge/patterns/[domain]-pattern.md`
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## MODE C: HEALTH CHECK (already initialized)
|
|
119
|
+
|
|
120
|
+
Run `/OMG:health-check` and additionally:
|
|
121
|
+
- Verify profile.yaml is up-to-date with current project state
|
|
122
|
+
- Check if new contextual rules should be added
|
|
123
|
+
- Offer to update quality-gate.json if tools changed
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## File Write Method
|
|
128
|
+
Use `Write` tool first. If it fails (file exists), fall back to:
|
|
129
|
+
```bash
|
|
130
|
+
cat > .omg/state/profile.yaml << 'EOF'
|
|
131
|
+
[content]
|
|
132
|
+
EOF
|
|
133
|
+
```
|
|
134
|
+
Always READ the file after writing to confirm.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Set cognitive mode (research/architect/implement) for the current session."
|
|
3
|
+
allowed-tools: Read, Write, Edit, Bash
|
|
4
|
+
argument-hint: "[research|architect|implement|clear]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /OMG:mode — Set Cognitive Mode
|
|
8
|
+
|
|
9
|
+
Switch Claude's operating mode for the current session.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/OMG:mode research # Focus on reading, searching, synthesizing
|
|
15
|
+
/OMG:mode architect # Focus on system design, no implementation
|
|
16
|
+
/OMG:mode implement # Focus on coding with TDD and verification
|
|
17
|
+
/OMG:mode clear # Clear current mode (return to default)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## What It Does
|
|
21
|
+
|
|
22
|
+
1. Writes `.omg/state/mode.txt` with the selected mode name
|
|
23
|
+
2. The `prompt-enhancer` hook reads this file and injects `@mode:` context on every subsequent prompt
|
|
24
|
+
3. The corresponding rule file (`rules/contextual/{mode}-mode.md`) activates
|
|
25
|
+
|
|
26
|
+
## Modes
|
|
27
|
+
|
|
28
|
+
| Mode | Focus | When to Use |
|
|
29
|
+
|------|-------|-------------|
|
|
30
|
+
| `research` | Read, search, synthesize | Exploring unfamiliar territory |
|
|
31
|
+
| `architect` | Design, plan, no code | Before starting a complex feature |
|
|
32
|
+
| `implement` | Code, test, verify | Active development sprint |
|
|
33
|
+
|
|
34
|
+
## Example
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
/OMG:mode architect
|
|
38
|
+
→ Sets mode to architect
|
|
39
|
+
→ Every prompt now gets: @mode:ARCHITECT — Map system first. Specs only, no implementation.
|
|
40
|
+
|
|
41
|
+
/OMG:mode clear
|
|
42
|
+
→ Removes .omg/state/mode.txt
|
|
43
|
+
→ Mode injection stops
|
|
44
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Alias for /OMG:init (project setup mode). Use /OMG:init instead."
|
|
3
|
+
allowed-tools: Read, Write, Edit, MultiEdit, Bash(mkdir:*), Bash(cat:*), Bash(find:*), Bash(ls:*), Bash(head:*), Bash(grep:*), Bash(tree:*), Bash(node:*), Bash(python*:*), Bash(tee:*), Grep, Glob
|
|
4
|
+
argument-hint: "[optional: project description]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /OMG:project-init → Redirects to /OMG:init
|
|
8
|
+
|
|
9
|
+
This command is now part of `/OMG:init`. Execute `/OMG:init` (project setup mode).
|
|
10
|
+
|
|
11
|
+
Follow the **MODE A: PROJECT INIT** instructions in /OMG:init.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Start Ralph autonomous loop — continues working until all tasks complete or max iterations reached."
|
|
3
|
+
allowed-tools: Read, Write, Edit, Bash, Grep, Glob
|
|
4
|
+
argument-hint: "[goal description]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /OMG:ralph-start — Start Ralph Autonomous Loop
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
Starts a Ralph loop that autonomously continues working until all tasks in the goal are complete or max iterations reached.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
```
|
|
14
|
+
/OMG:ralph-start [goal description]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## How it Works
|
|
18
|
+
1. Ask the user for a goal description if not provided
|
|
19
|
+
2. Create `.omg/state/ralph-loop.json` with:
|
|
20
|
+
- `active: true`
|
|
21
|
+
- `iteration: 0`
|
|
22
|
+
- `max_iterations: 50`
|
|
23
|
+
- `original_prompt: [goal]`
|
|
24
|
+
- `started_at: [ISO8601 timestamp]`
|
|
25
|
+
- `checklist_path: ".omg/state/_checklist.md"` (if exists)
|
|
26
|
+
3. Confirm: "Ralph loop started. Will continue working on: [goal]"
|
|
27
|
+
|
|
28
|
+
## State File Format
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"active": true,
|
|
32
|
+
"iteration": 0,
|
|
33
|
+
"max_iterations": 50,
|
|
34
|
+
"original_prompt": "fix all failing tests",
|
|
35
|
+
"started_at": "2026-02-28T10:00:00Z",
|
|
36
|
+
"checklist_path": ".omg/state/_checklist.md"
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Stop Condition
|
|
41
|
+
- Reaches max_iterations (50 by default)
|
|
42
|
+
- User runs `/OMG:ralph-stop`
|
|
43
|
+
- User deletes `.omg/state/ralph-loop.json`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Stop Ralph autonomous loop — deactivates the state file."
|
|
3
|
+
allowed-tools: Read, Write, Edit, Bash
|
|
4
|
+
argument-hint: ""
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /OMG:ralph-stop — Stop Ralph Autonomous Loop
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
Stops an active Ralph loop by deactivating the state file.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
```
|
|
14
|
+
/OMG:ralph-stop
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## How it Works
|
|
18
|
+
1. Read `.omg/state/ralph-loop.json`
|
|
19
|
+
2. Set `active: false` in the state file (preserve iteration count for review)
|
|
20
|
+
3. Report: "Ralph loop stopped after N iterations. Gomg was: [original_prompt]"
|
|
21
|
+
|
|
22
|
+
## If No Active Loop
|
|
23
|
+
Report: "No active Ralph loop found. Nothing to stop."
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: OMG internal team routing (standalone). Replaces /omc-teams dependency.
|
|
3
|
+
allowed-tools: Read, Grep, Glob, Bash(git:*), Bash(rg:*), Bash(find:*), Bash(cat:*), Bash(python3:*)
|
|
4
|
+
argument-hint: "[codex|gemini|ccg|auto] 'problem statement'"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /OMG:teams — Standalone Internal Router
|
|
8
|
+
|
|
9
|
+
Use OMG's internal router without requiring OMC.
|
|
10
|
+
|
|
11
|
+
## Input contract
|
|
12
|
+
- target: `auto|codex|gemini|ccg`
|
|
13
|
+
- problem: clear issue statement
|
|
14
|
+
- context: optional constraints
|
|
15
|
+
- files: optional focus paths
|
|
16
|
+
- expected_outcome: optional acceptance target
|
|
17
|
+
|
|
18
|
+
## Execution
|
|
19
|
+
Use internal CLI router:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
OMG_CLI="${OMG_CLI_PATH:-$HOME/.claude/omg-runtime/scripts/omg.py}"
|
|
23
|
+
if [ ! -f "$OMG_CLI" ] && [ -f "scripts/omg.py" ]; then OMG_CLI="scripts/omg.py"; fi
|
|
24
|
+
python3 "$OMG_CLI" teams --target auto --problem "[problem]"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
For explicit target:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
python3 "$OMG_CLI" teams --target codex --problem "[problem]"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Output schema
|
|
34
|
+
`TeamDispatchResult { status, findings[], actions[], evidence{} }`
|
|
35
|
+
|
|
36
|
+
## Full-power sub-agent protocol
|
|
37
|
+
- For non-trivial tasks, launch multiple sub-agents in parallel (`run_in_background=true`) for independent tracks.
|
|
38
|
+
- Collect all task outputs before responding (`background_output` per task id).
|
|
39
|
+
- Run a `sequential-thinking` merge step to produce one dependency-ordered execution plan.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Analyze uncommitted git changes and propose logical atomic commits grouped by concern."
|
|
3
|
+
allowed-tools: Read, Bash(python*:*), Grep, Glob
|
|
4
|
+
argument-hint: "[optional: working directory path]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /OMG:ai-commit — AI Commit Splitter
|
|
8
|
+
|
|
9
|
+
Analyze uncommitted git changes and propose logical atomic commits grouped by concern.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/OMG:ai-commit
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## What It Does
|
|
18
|
+
|
|
19
|
+
1. Reads hunk-level git diffs via `git_hunk()` from `tools/git_inspector.py`
|
|
20
|
+
2. Groups hunks by file type/category (python, javascript, config, docs, tests, etc.)
|
|
21
|
+
3. Separates test files from source code automatically
|
|
22
|
+
4. Generates conventional commit messages: `{type}({scope}): {description}`
|
|
23
|
+
5. Displays a human-readable preview of proposed commits
|
|
24
|
+
|
|
25
|
+
## Feature Flag
|
|
26
|
+
|
|
27
|
+
- **Flag name**: `OMG_AI_COMMIT_ENABLED`
|
|
28
|
+
- **Default**: `False` (disabled)
|
|
29
|
+
- **Enable**: `export OMG_AI_COMMIT_ENABLED=1`
|
|
30
|
+
|
|
31
|
+
Or set in `settings.json`:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"_omg": {
|
|
36
|
+
"features": {
|
|
37
|
+
"ai_commit": true
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Output Example
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
============================================================
|
|
47
|
+
OMG AI Commit Splitter — Proposed Commit Plan
|
|
48
|
+
============================================================
|
|
49
|
+
|
|
50
|
+
Total proposed commits: 3
|
|
51
|
+
|
|
52
|
+
Commit 1: feat(tools): update commit_splitter.py
|
|
53
|
+
──────────────────────────────────────────────────
|
|
54
|
+
• tools/commit_splitter.py
|
|
55
|
+
(2 hunks)
|
|
56
|
+
|
|
57
|
+
Commit 2: test(tests): update 2 test files
|
|
58
|
+
──────────────────────────────────────────────────
|
|
59
|
+
• tests/tools/test_commit_splitter.py
|
|
60
|
+
• tests/tools/test_git_inspector.py
|
|
61
|
+
(4 hunks)
|
|
62
|
+
|
|
63
|
+
Commit 3: docs(commands): update ai-commit.md
|
|
64
|
+
──────────────────────────────────────────────────
|
|
65
|
+
• commands/ai-commit.md
|
|
66
|
+
(1 hunk)
|
|
67
|
+
|
|
68
|
+
============================================================
|
|
69
|
+
NOTE: This is a preview only. No commits were made.
|
|
70
|
+
============================================================
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Commit Type Mapping
|
|
74
|
+
|
|
75
|
+
| Category | Default Type | Description |
|
|
76
|
+
|------------|-------------|--------------------------|
|
|
77
|
+
| python | `feat` | Python source files |
|
|
78
|
+
| javascript | `feat` | JS/TS source files |
|
|
79
|
+
| tests | `test` | Test files (any language) |
|
|
80
|
+
| docs | `docs` | Documentation files |
|
|
81
|
+
| config | `chore` | Configuration files |
|
|
82
|
+
| shell | `chore` | Shell scripts |
|
|
83
|
+
| styles | `style` | CSS/SCSS/LESS files |
|
|
84
|
+
| markup | `feat` | HTML/XML/SVG files |
|
|
85
|
+
| other | `chore` | Unclassified files |
|
|
86
|
+
|
|
87
|
+
## CLI Usage
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# Preview commit plan from terminal
|
|
91
|
+
python3 tools/commit_splitter.py --dry-run
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Safety
|
|
95
|
+
|
|
96
|
+
- **Read-only**: Never executes `git commit` or modifies the working tree
|
|
97
|
+
- **Feature-gated**: Returns empty results when disabled
|
|
98
|
+
- **Non-destructive**: Safe to run at any time
|
|
99
|
+
|
|
100
|
+
## API
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
from tools.commit_splitter import analyze_changes, generate_commit_plan, preview_commit_plan
|
|
104
|
+
|
|
105
|
+
# Get grouped hunks
|
|
106
|
+
groups = analyze_changes(cwd=".")
|
|
107
|
+
|
|
108
|
+
# Get full commit plan with messages
|
|
109
|
+
plan = generate_commit_plan(cwd=".")
|
|
110
|
+
|
|
111
|
+
# Get human-readable preview string
|
|
112
|
+
preview = preview_commit_plan(cwd=".")
|
|
113
|
+
```
|
package/commands/ccg.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Compatibility alias for /OMG:ccg. Use /OMG:ccg instead.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /ccg — Compatibility Alias
|
|
6
|
+
|
|
7
|
+
> **Compatibility alias** — This command is a legacy alias. Use `/OMG:ccg` instead.
|
|
8
|
+
|
|
9
|
+
Redirects to `/OMG:ccg` for tri-track synthesis in standalone mode.
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Wizard command for creating new custom agents in ~/.omg/agents/ or .omg/agents/."
|
|
3
|
+
allowed-tools: Read, Write, Edit, Bash
|
|
4
|
+
argument-hint: "[agent-name]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /OMG:create-agent — Custom Agent Creation Wizard
|
|
8
|
+
|
|
9
|
+
Create a custom agent for your project or user-level configuration.
|
|
10
|
+
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
Enable the custom agents feature:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
export OMG_CUSTOM_AGENTS_ENABLED=1
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Or add to your project's `settings.json`:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"_omg": {
|
|
24
|
+
"features": {
|
|
25
|
+
"CUSTOM_AGENTS": true
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Agent Locations
|
|
32
|
+
|
|
33
|
+
- **User-level**: `~/.omg/agents/<name>.md` — available in all projects
|
|
34
|
+
- **Project-level**: `.omg/agents/<name>.md` — available in this project only
|
|
35
|
+
|
|
36
|
+
Project-level agents override user-level agents with the same name.
|
|
37
|
+
|
|
38
|
+
## Quick Start
|
|
39
|
+
|
|
40
|
+
1. Create the agents directory:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# For project-level agents:
|
|
44
|
+
mkdir -p .omg/agents
|
|
45
|
+
|
|
46
|
+
# For user-level agents:
|
|
47
|
+
mkdir -p ~/.omg/agents
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
2. Create your agent file (e.g., `.omg/agents/my-agent.md`):
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
---
|
|
54
|
+
name: my-agent
|
|
55
|
+
description: Brief description of what this agent does
|
|
56
|
+
model: claude-sonnet-4-5
|
|
57
|
+
tools: Read, Grep, Glob, Edit, Write
|
|
58
|
+
bundled: false
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
# Agent: My Agent
|
|
62
|
+
|
|
63
|
+
## Role
|
|
64
|
+
|
|
65
|
+
Describe the agent's primary role and responsibilities here.
|
|
66
|
+
This should be a clear, concise statement of what the agent does.
|
|
67
|
+
|
|
68
|
+
## Model
|
|
69
|
+
|
|
70
|
+
`default` (claude-sonnet-4-5) — general-purpose model for this agent.
|
|
71
|
+
|
|
72
|
+
Available roles: `smol` (haiku, fast), `default` (sonnet), `slow` (opus, deep reasoning).
|
|
73
|
+
|
|
74
|
+
## Capabilities
|
|
75
|
+
|
|
76
|
+
- List specific capabilities here
|
|
77
|
+
- What tools does this agent use?
|
|
78
|
+
- What domains does it specialize in?
|
|
79
|
+
|
|
80
|
+
## Instructions
|
|
81
|
+
|
|
82
|
+
Detailed behavioral instructions for the agent.
|
|
83
|
+
|
|
84
|
+
**Core rules:**
|
|
85
|
+
- Rule 1
|
|
86
|
+
- Rule 2
|
|
87
|
+
- Rule 3
|
|
88
|
+
|
|
89
|
+
**Strategy:**
|
|
90
|
+
1. Step 1
|
|
91
|
+
2. Step 2
|
|
92
|
+
3. Step 3
|
|
93
|
+
|
|
94
|
+
## Example Prompts
|
|
95
|
+
|
|
96
|
+
- "Example prompt 1"
|
|
97
|
+
- "Example prompt 2"
|
|
98
|
+
- "Example prompt 3"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Required Sections
|
|
102
|
+
|
|
103
|
+
Your agent **must** include these sections to pass validation:
|
|
104
|
+
|
|
105
|
+
| Section | Required | Description |
|
|
106
|
+
|---------|----------|-------------|
|
|
107
|
+
| `# Agent: <name>` | ✅ Yes | Agent header with name |
|
|
108
|
+
| `## Role` | ✅ Yes | Primary role description |
|
|
109
|
+
| `## Model` | Optional | Model preference (smol/default/slow) |
|
|
110
|
+
| `## Capabilities` | Optional | List of capabilities |
|
|
111
|
+
| `## Instructions` | Optional | Behavioral instructions |
|
|
112
|
+
|
|
113
|
+
## Validation
|
|
114
|
+
|
|
115
|
+
Custom agents are validated on load. Invalid agents (missing required sections) are skipped with warnings.
|
|
116
|
+
|
|
117
|
+
To verify your agent is valid:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
export OMG_CUSTOM_AGENTS_ENABLED=1
|
|
121
|
+
python3 -c "
|
|
122
|
+
from runtime.custom_agent_loader import load_custom_agents
|
|
123
|
+
agents = load_custom_agents('.')
|
|
124
|
+
for a in agents:
|
|
125
|
+
status = '✅' if a['validated'] else '❌'
|
|
126
|
+
print(f\"{status} {a['name']} ({a['level']}) — {a['description'][:60]}\")
|
|
127
|
+
if a.get('issues'):
|
|
128
|
+
for issue in a['issues']:
|
|
129
|
+
print(f\" ⚠️ {issue}\")
|
|
130
|
+
"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Examples
|
|
134
|
+
|
|
135
|
+
### Minimal Valid Agent
|
|
136
|
+
|
|
137
|
+
```markdown
|
|
138
|
+
# Agent: Greeter
|
|
139
|
+
|
|
140
|
+
## Role
|
|
141
|
+
|
|
142
|
+
Simple greeting agent that welcomes users.
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Full Agent with All Sections
|
|
146
|
+
|
|
147
|
+
See the template in Quick Start above.
|
|
148
|
+
|
|
149
|
+
### Specialized Domain Agent
|
|
150
|
+
|
|
151
|
+
```markdown
|
|
152
|
+
# Agent: Data Pipeline
|
|
153
|
+
|
|
154
|
+
## Role
|
|
155
|
+
|
|
156
|
+
ETL pipeline specialist. Designs and optimizes data transformation workflows.
|
|
157
|
+
|
|
158
|
+
## Model
|
|
159
|
+
|
|
160
|
+
`slow` (claude-opus-4-5) — deep reasoning for complex pipeline design.
|
|
161
|
+
|
|
162
|
+
## Capabilities
|
|
163
|
+
|
|
164
|
+
- Design ETL pipelines with error handling and retry logic
|
|
165
|
+
- Optimize SQL queries for large datasets
|
|
166
|
+
- Schema migration planning
|
|
167
|
+
- Data quality validation rules
|
|
168
|
+
|
|
169
|
+
## Instructions
|
|
170
|
+
|
|
171
|
+
You are a data engineering specialist.
|
|
172
|
+
|
|
173
|
+
**Core rules:**
|
|
174
|
+
- Always consider idempotency in pipeline design
|
|
175
|
+
- Prefer incremental processing over full reloads
|
|
176
|
+
- Include monitoring and alerting in every pipeline
|
|
177
|
+
|
|
178
|
+
**Strategy:**
|
|
179
|
+
1. Understand the data sources and sinks
|
|
180
|
+
2. Design the transformation logic
|
|
181
|
+
3. Add error handling and retry mechanisms
|
|
182
|
+
4. Plan for monitoring and observability
|
|
183
|
+
```
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Compatibility alias for /OMG:teams. Use /OMG:teams instead.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /omc-teams — Compatibility Alias
|
|
6
|
+
|
|
7
|
+
> **Compatibility alias** — This command is a legacy alias. Use `/OMG:teams` instead.
|
|
8
|
+
|
|
9
|
+
Redirects to `/OMG:teams` for internal team routing in standalone mode.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Create or manage OMG state branches for experimental workflows."
|
|
3
|
+
allowed-tools: Read, Write, Edit, Bash
|
|
4
|
+
argument-hint: "--name <branch-name> [--from <snapshot_id>]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /OMG:branch — Branch OMG State
|
|
8
|
+
|
|
9
|
+
Create a named branch of the current OMG state for experimentation or parallel exploration.
|
|
10
|
+
|
|
11
|
+
## Important
|
|
12
|
+
|
|
13
|
+
Branching is **OMG state only** — it captures and restores `.omg/state/` directory contents. It does **not** fork the conversation, context window, or Claude session. Think of it as a checkpoint you can name and switch between.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
/OMG:branch --name "experiment"
|
|
19
|
+
/OMG:branch --name "refactor-v2" --from 20260302_143000_baseline
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## What It Does
|
|
23
|
+
|
|
24
|
+
1. Creates a snapshot of the current `.omg/state/` directory (or restores a specified snapshot)
|
|
25
|
+
2. Writes branch metadata to `.omg/state/branches/<name>.json`
|
|
26
|
+
3. Updates `.omg/state/current_branch.json` to track the active branch
|
|
27
|
+
|
|
28
|
+
## Branch Metadata
|
|
29
|
+
|
|
30
|
+
Each branch stores:
|
|
31
|
+
|
|
32
|
+
| Field | Description |
|
|
33
|
+
|-------|-------------|
|
|
34
|
+
| `name` | Branch name |
|
|
35
|
+
| `snapshot_id` | Associated snapshot ID |
|
|
36
|
+
| `created_at` | ISO timestamp of creation |
|
|
37
|
+
| `parent_branch` | Branch that was active when this branch was created |
|
|
38
|
+
| `status` | Branch status (`active`) |
|
|
39
|
+
|
|
40
|
+
## Managing Branches
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
# List all branches
|
|
44
|
+
python3 tools/session_snapshot.py branches
|
|
45
|
+
|
|
46
|
+
# Switch to a branch (restores its snapshot)
|
|
47
|
+
python3 tools/session_snapshot.py switch experiment
|
|
48
|
+
|
|
49
|
+
# Create branch from specific snapshot
|
|
50
|
+
python3 tools/session_snapshot.py branch my-branch --from 20260302_143000_baseline
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Feature Flag
|
|
54
|
+
|
|
55
|
+
Branching is gated behind `OMG_BRANCHING_ENABLED` (default: `False`).
|
|
56
|
+
|
|
57
|
+
Enable via environment variable:
|
|
58
|
+
```bash
|
|
59
|
+
export OMG_BRANCHING_ENABLED=true
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Or in `settings.json`:
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"_omg": {
|
|
66
|
+
"features": {
|
|
67
|
+
"BRANCHING": true
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Example Workflow
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
# 1. Create a baseline branch
|
|
77
|
+
/OMG:branch --name "baseline"
|
|
78
|
+
|
|
79
|
+
# 2. Do some experimental work...
|
|
80
|
+
# 3. Create experiment branch to save progress
|
|
81
|
+
/OMG:branch --name "experiment-auth"
|
|
82
|
+
|
|
83
|
+
# 4. Switch back to baseline if experiment didn't work
|
|
84
|
+
python3 tools/session_snapshot.py switch baseline
|
|
85
|
+
```
|