@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.
Files changed (229) hide show
  1. package/.claude-plugin/marketplace.json +36 -0
  2. package/.claude-plugin/plugin.json +23 -0
  3. package/.claude-plugin/scripts/install.sh +49 -0
  4. package/.claude-plugin/scripts/uninstall.sh +80 -0
  5. package/.claude-plugin/scripts/update.sh +84 -0
  6. package/.mcp.json +20 -0
  7. package/LICENSE +21 -0
  8. package/OMG-setup.sh +1093 -0
  9. package/README.md +335 -0
  10. package/THIRD_PARTY_NOTICES.md +24 -0
  11. package/UPSTREAM_DIFF.md +20 -0
  12. package/agents/__init__.py +1 -0
  13. package/agents/_model_roles.yaml +26 -0
  14. package/agents/designer.md +67 -0
  15. package/agents/explore.md +60 -0
  16. package/agents/model_roles.py +196 -0
  17. package/agents/omg-api-builder.md +23 -0
  18. package/agents/omg-architect-mode.md +43 -0
  19. package/agents/omg-architect.md +13 -0
  20. package/agents/omg-backend-engineer.md +43 -0
  21. package/agents/omg-critic.md +16 -0
  22. package/agents/omg-database-engineer.md +43 -0
  23. package/agents/omg-escalation-router.md +17 -0
  24. package/agents/omg-executor.md +12 -0
  25. package/agents/omg-frontend-designer.md +42 -0
  26. package/agents/omg-implement-mode.md +50 -0
  27. package/agents/omg-infra-engineer.md +43 -0
  28. package/agents/omg-qa-tester.md +16 -0
  29. package/agents/omg-research-mode.md +43 -0
  30. package/agents/omg-security-auditor.md +43 -0
  31. package/agents/omg-testing-engineer.md +43 -0
  32. package/agents/plan.md +80 -0
  33. package/agents/quick_task.md +64 -0
  34. package/agents/reviewer.md +83 -0
  35. package/agents/task.md +71 -0
  36. package/commands/OMG:ccg.md +22 -0
  37. package/commands/OMG:compat.md +57 -0
  38. package/commands/OMG:crazy.md +125 -0
  39. package/commands/OMG:domain-init.md +11 -0
  40. package/commands/OMG:escalate.md +52 -0
  41. package/commands/OMG:health-check.md +45 -0
  42. package/commands/OMG:init.md +134 -0
  43. package/commands/OMG:mode.md +44 -0
  44. package/commands/OMG:project-init.md +11 -0
  45. package/commands/OMG:ralph-start.md +43 -0
  46. package/commands/OMG:ralph-stop.md +23 -0
  47. package/commands/OMG:teams.md +39 -0
  48. package/commands/ai-commit.md +113 -0
  49. package/commands/ccg.md +9 -0
  50. package/commands/create-agent.md +183 -0
  51. package/commands/omc-teams.md +9 -0
  52. package/commands/session-branch.md +85 -0
  53. package/commands/session-fork.md +53 -0
  54. package/commands/session-merge.md +134 -0
  55. package/commands/theme.md +44 -0
  56. package/config/lsp_languages.yaml +324 -0
  57. package/config/themes/catppuccin-frappe.yaml +14 -0
  58. package/config/themes/catppuccin-latte.yaml +14 -0
  59. package/config/themes/catppuccin-macchiato.yaml +14 -0
  60. package/config/themes/catppuccin-mocha.yaml +14 -0
  61. package/config/themes/dracula.yaml +14 -0
  62. package/config/themes/gruvbox-dark.yaml +14 -0
  63. package/config/themes/nord.yaml +14 -0
  64. package/config/themes/one-dark.yaml +14 -0
  65. package/config/themes/solarized-dark.yaml +14 -0
  66. package/config/themes/tokyo-night.yaml +14 -0
  67. package/control_plane/__init__.py +2 -0
  68. package/control_plane/openapi.yaml +109 -0
  69. package/control_plane/server.py +107 -0
  70. package/control_plane/service.py +148 -0
  71. package/crates/omg-natives/Cargo.toml +17 -0
  72. package/crates/omg-natives/src/clipboard.rs +5 -0
  73. package/crates/omg-natives/src/glob.rs +15 -0
  74. package/crates/omg-natives/src/grep.rs +15 -0
  75. package/crates/omg-natives/src/highlight.rs +15 -0
  76. package/crates/omg-natives/src/html.rs +14 -0
  77. package/crates/omg-natives/src/image.rs +5 -0
  78. package/crates/omg-natives/src/keys.rs +5 -0
  79. package/crates/omg-natives/src/lib.rs +36 -0
  80. package/crates/omg-natives/src/prof.rs +5 -0
  81. package/crates/omg-natives/src/ps.rs +5 -0
  82. package/crates/omg-natives/src/shell.rs +5 -0
  83. package/crates/omg-natives/src/task.rs +5 -0
  84. package/crates/omg-natives/src/text.rs +14 -0
  85. package/hooks/_agent_registry.py +421 -0
  86. package/hooks/_budget.py +31 -0
  87. package/hooks/_common.py +476 -0
  88. package/hooks/_learnings.py +126 -0
  89. package/hooks/_memory.py +103 -0
  90. package/hooks/circuit-breaker.py +270 -0
  91. package/hooks/config-guard.py +163 -0
  92. package/hooks/context_pressure.py +53 -0
  93. package/hooks/credential_store.py +801 -0
  94. package/hooks/fetch-rate-limits.py +212 -0
  95. package/hooks/firewall.py +48 -0
  96. package/hooks/hashline-formatter-bridge.py +224 -0
  97. package/hooks/hashline-injector.py +273 -0
  98. package/hooks/hashline-validator.py +216 -0
  99. package/hooks/idle-detector.py +95 -0
  100. package/hooks/intentgate-keyword-detector.py +188 -0
  101. package/hooks/magic-keyword-router.py +195 -0
  102. package/hooks/policy_engine.py +310 -0
  103. package/hooks/post-tool-failure.py +19 -0
  104. package/hooks/post-write.py +199 -0
  105. package/hooks/pre-compact.py +204 -0
  106. package/hooks/pre-tool-inject.py +98 -0
  107. package/hooks/prompt-enhancer.py +672 -0
  108. package/hooks/quality-runner.py +191 -0
  109. package/hooks/secret-guard.py +47 -0
  110. package/hooks/session-end-capture.py +137 -0
  111. package/hooks/session-start.py +275 -0
  112. package/hooks/shadow_manager.py +297 -0
  113. package/hooks/state_migration.py +209 -0
  114. package/hooks/stop-gate.py +7 -0
  115. package/hooks/stop_dispatcher.py +929 -0
  116. package/hooks/test-validator.py +138 -0
  117. package/hooks/todo-state-tracker.py +114 -0
  118. package/hooks/tool-ledger.py +126 -0
  119. package/hooks/trust_review.py +524 -0
  120. package/install.sh +9 -0
  121. package/omg_natives/__init__.py +186 -0
  122. package/omg_natives/_bindings.py +165 -0
  123. package/omg_natives/clipboard.py +36 -0
  124. package/omg_natives/glob.py +42 -0
  125. package/omg_natives/grep.py +61 -0
  126. package/omg_natives/highlight.py +54 -0
  127. package/omg_natives/html.py +157 -0
  128. package/omg_natives/image.py +51 -0
  129. package/omg_natives/keys.py +46 -0
  130. package/omg_natives/prof.py +39 -0
  131. package/omg_natives/ps.py +93 -0
  132. package/omg_natives/shell.py +58 -0
  133. package/omg_natives/task.py +41 -0
  134. package/omg_natives/text.py +50 -0
  135. package/package.json +26 -0
  136. package/plugins/README.md +82 -0
  137. package/plugins/advanced/commands/OMG:code-review.md +114 -0
  138. package/plugins/advanced/commands/OMG:deep-plan.md +221 -0
  139. package/plugins/advanced/commands/OMG:handoff.md +115 -0
  140. package/plugins/advanced/commands/OMG:learn.md +110 -0
  141. package/plugins/advanced/commands/OMG:maintainer.md +31 -0
  142. package/plugins/advanced/commands/OMG:ralph-start.md +43 -0
  143. package/plugins/advanced/commands/OMG:ralph-stop.md +23 -0
  144. package/plugins/advanced/commands/OMG:security-review.md +119 -0
  145. package/plugins/advanced/commands/OMG:sequential-thinking.md +20 -0
  146. package/plugins/advanced/commands/OMG:ship.md +46 -0
  147. package/plugins/advanced/plugin.json +96 -0
  148. package/plugins/core/plugin.json +82 -0
  149. package/pytest.ini +5 -0
  150. package/registry/__init__.py +1 -0
  151. package/registry/verify_artifact.py +90 -0
  152. package/rules/contextual/architect-mode.md +9 -0
  153. package/rules/contextual/big-picture.md +20 -0
  154. package/rules/contextual/code-hygiene.md +26 -0
  155. package/rules/contextual/context-management.md +19 -0
  156. package/rules/contextual/context-minimization.md +32 -0
  157. package/rules/contextual/ddd-sdd.md +28 -0
  158. package/rules/contextual/dependency-safety.md +16 -0
  159. package/rules/contextual/doc-check.md +13 -0
  160. package/rules/contextual/implement-mode.md +9 -0
  161. package/rules/contextual/infra-safety.md +14 -0
  162. package/rules/contextual/outside-in.md +13 -0
  163. package/rules/contextual/persistent-mode.md +24 -0
  164. package/rules/contextual/research-mode.md +9 -0
  165. package/rules/contextual/security-domains.md +25 -0
  166. package/rules/contextual/vision-detection.md +27 -0
  167. package/rules/contextual/web-search.md +25 -0
  168. package/rules/contextual/write-verify.md +23 -0
  169. package/rules/core/00-truth.md +20 -0
  170. package/rules/core/01-surgical.md +19 -0
  171. package/rules/core/02-circuit-breaker.md +22 -0
  172. package/rules/core/03-ensemble.md +28 -0
  173. package/rules/core/04-testing.md +30 -0
  174. package/runtime/__init__.py +32 -0
  175. package/runtime/adapters/__init__.py +13 -0
  176. package/runtime/adapters/claude.py +60 -0
  177. package/runtime/adapters/gpt.py +53 -0
  178. package/runtime/adapters/local.py +53 -0
  179. package/runtime/business_workflow.py +220 -0
  180. package/runtime/compat.py +1299 -0
  181. package/runtime/custom_agent_loader.py +366 -0
  182. package/runtime/dispatcher.py +47 -0
  183. package/runtime/ecosystem.py +371 -0
  184. package/runtime/legacy_compat.py +7 -0
  185. package/runtime/omc_compat.py +7 -0
  186. package/runtime/omc_contract_snapshot.json +916 -0
  187. package/runtime/omg_compat_contract_snapshot.json +916 -0
  188. package/runtime/subagent_dispatcher.py +362 -0
  189. package/runtime/team_router.py +838 -0
  190. package/scripts/check-omc-contract-snapshot.py +12 -0
  191. package/scripts/check-omg-compat-contract-snapshot.py +137 -0
  192. package/scripts/check-omg-standalone-clean.py +102 -0
  193. package/scripts/legacy_to_omg_migrate.py +29 -0
  194. package/scripts/migrate-omc.py +464 -0
  195. package/scripts/omc_to_omg_migrate.py +12 -0
  196. package/scripts/omg.py +493 -0
  197. package/scripts/settings-merge.py +224 -0
  198. package/scripts/verify-no-omc.sh +5 -0
  199. package/scripts/verify-standalone.sh +21 -0
  200. package/templates/idea.yml +30 -0
  201. package/templates/policy.yaml +15 -0
  202. package/templates/profile.yaml +25 -0
  203. package/templates/runtime.yaml +12 -0
  204. package/templates/working-memory.md +17 -0
  205. package/tools/__init__.py +2 -0
  206. package/tools/browser_consent.py +289 -0
  207. package/tools/browser_stealth.py +481 -0
  208. package/tools/browser_tool.py +448 -0
  209. package/tools/changelog_generator.py +268 -0
  210. package/tools/commit_splitter.py +361 -0
  211. package/tools/config_discovery.py +151 -0
  212. package/tools/config_merger.py +449 -0
  213. package/tools/git_inspector.py +298 -0
  214. package/tools/lsp_client.py +275 -0
  215. package/tools/lsp_discovery.py +231 -0
  216. package/tools/lsp_operations.py +392 -0
  217. package/tools/python_repl.py +656 -0
  218. package/tools/python_sandbox.py +609 -0
  219. package/tools/search_providers/__init__.py +77 -0
  220. package/tools/search_providers/brave.py +115 -0
  221. package/tools/search_providers/exa.py +116 -0
  222. package/tools/search_providers/jina.py +104 -0
  223. package/tools/search_providers/perplexity.py +139 -0
  224. package/tools/search_providers/synthetic.py +74 -0
  225. package/tools/session_snapshot.py +736 -0
  226. package/tools/ssh_manager.py +912 -0
  227. package/tools/theme_engine.py +294 -0
  228. package/tools/theme_selector.py +137 -0
  229. package/tools/web_search.py +622 -0
@@ -0,0 +1,196 @@
1
+ #!/usr/bin/env python3
2
+ """Model roles loader — defines role configurations for model selection.
3
+
4
+ Loads role definitions from _model_roles.yaml and provides utilities for
5
+ role-based model selection, CLI argument parsing, and feature flag control.
6
+ """
7
+ import os
8
+ import sys
9
+ from pathlib import Path
10
+ from typing import Optional
11
+
12
+ # Try to import yaml; fall back to json if not available
13
+ try:
14
+ import yaml
15
+ HAS_YAML = True
16
+ except ImportError:
17
+ HAS_YAML = False
18
+ import json
19
+
20
+ # Add parent directory to path for importing from hooks
21
+ _AGENTS_DIR = Path(__file__).parent
22
+ _HOOKS_DIR = _AGENTS_DIR.parent / "hooks"
23
+ if str(_HOOKS_DIR) not in sys.path:
24
+ sys.path.insert(0, str(_HOOKS_DIR))
25
+
26
+ try:
27
+ from _common import get_feature_flag, get_project_dir
28
+ except ImportError:
29
+ # Fallback if _common is not available
30
+ def get_feature_flag(flag_name, default=True):
31
+ env_key = f"OMG_{flag_name.upper()}_ENABLED"
32
+ env_val = os.environ.get(env_key, "").lower()
33
+ if env_val in ("0", "false", "no"):
34
+ return False
35
+ if env_val in ("1", "true", "yes"):
36
+ return True
37
+ return default
38
+
39
+ def get_project_dir():
40
+ return os.environ.get("CLAUDE_PROJECT_DIR", os.getcwd())
41
+
42
+
43
+ # Global roles dictionary
44
+ ROLES: dict = {}
45
+
46
+
47
+ def _load_roles() -> dict:
48
+ """Load role definitions from _model_roles.yaml.
49
+
50
+ Returns:
51
+ Dictionary mapping role names to role configurations.
52
+ Falls back to default roles if YAML cannot be loaded.
53
+ """
54
+ roles_file = _AGENTS_DIR / "_model_roles.yaml"
55
+
56
+ if not roles_file.exists():
57
+ return _get_default_roles()
58
+
59
+ try:
60
+ if HAS_YAML:
61
+ with open(roles_file, "r") as f:
62
+ data = yaml.safe_load(f)
63
+ if data and "roles" in data:
64
+ return data["roles"]
65
+ except Exception as e:
66
+ print(f"[OMG] Warning: Failed to load roles from {roles_file}: {e}", file=sys.stderr)
67
+
68
+
69
+ return _get_default_roles()
70
+
71
+
72
+ def _get_default_roles() -> dict:
73
+ """Return hardcoded default roles if YAML cannot be loaded."""
74
+ return {
75
+ "default": {
76
+ "model": "claude-opus-4-5",
77
+ "temperature": 1.0,
78
+ "max_tokens": 8192,
79
+ "description": "Default balanced model for general tasks"
80
+ },
81
+ "smol": {
82
+ "model": "claude-haiku-4-5",
83
+ "temperature": 0.7,
84
+ "max_tokens": 4096,
85
+ "description": "Fast cheap model for simple/trivial tasks"
86
+ },
87
+ "slow": {
88
+ "model": "claude-opus-4-5",
89
+ "temperature": 0.5,
90
+ "max_tokens": 16384,
91
+ "description": "Careful deliberate model for complex reasoning"
92
+ },
93
+ "plan": {
94
+ "model": "claude-sonnet-4-5",
95
+ "temperature": 0.8,
96
+ "max_tokens": 8192,
97
+ "description": "Planning and architecture model"
98
+ },
99
+ "commit": {
100
+ "model": "claude-haiku-4-5",
101
+ "temperature": 0.3,
102
+ "max_tokens": 2048,
103
+ "description": "Concise model for git commits and short summaries"
104
+ }
105
+ }
106
+
107
+
108
+ def get_role(name: str) -> dict:
109
+ """Get role configuration by name.
110
+
111
+ Args:
112
+ name: Role name (e.g., 'smol', 'slow', 'plan', 'commit', 'default')
113
+
114
+ Returns:
115
+ Role configuration dictionary. Returns 'default' role if name not found.
116
+ """
117
+ if not ROLES:
118
+ _init_roles()
119
+
120
+ return ROLES.get(name, ROLES.get("default", {}))
121
+
122
+
123
+ def list_roles() -> list[str]:
124
+ """Get list of all available role names.
125
+
126
+ Returns:
127
+ List of role names in order they appear in configuration.
128
+ """
129
+ if not ROLES:
130
+ _init_roles()
131
+
132
+ return list(ROLES.keys())
133
+
134
+
135
+ def parse_role_args(argv: list[str]) -> Optional[str]:
136
+ """Parse command-line arguments to detect role selection.
137
+
138
+ Detects: --smol, --slow, --plan, --commit
139
+
140
+ Args:
141
+ argv: Command-line arguments (typically sys.argv[1:])
142
+
143
+ Returns:
144
+ Role name if detected, None otherwise.
145
+ """
146
+ role_map = {
147
+ "--smol": "smol",
148
+ "--slow": "slow",
149
+ "--plan": "plan",
150
+ "--commit": "commit",
151
+ }
152
+
153
+ for arg in argv:
154
+ if arg in role_map:
155
+ return role_map[arg]
156
+
157
+ return None
158
+
159
+
160
+ def _init_roles() -> None:
161
+ """Initialize the global ROLES dictionary."""
162
+ global ROLES
163
+ ROLES = _load_roles()
164
+
165
+
166
+ # Initialize on module import
167
+ _init_roles()
168
+
169
+
170
+ if __name__ == "__main__":
171
+ # CLI for testing/inspection
172
+ import json as json_module
173
+
174
+ if len(sys.argv) > 1:
175
+ if sys.argv[1] == "list":
176
+ print("Available roles:")
177
+ for role_name in list_roles():
178
+ print(f" - {role_name}")
179
+ elif sys.argv[1] == "get":
180
+ if len(sys.argv) > 2:
181
+ role_name = sys.argv[2]
182
+ role = get_role(role_name)
183
+ print(json_module.dumps(role, indent=2))
184
+ else:
185
+ print("Usage: python3 model_roles.py get <role_name>")
186
+ elif sys.argv[1] == "parse":
187
+ detected = parse_role_args(sys.argv[2:])
188
+ if detected:
189
+ print(f"Detected role: {detected}")
190
+ else:
191
+ print("No role detected")
192
+ else:
193
+ print("Usage: python3 model_roles.py [list|get <role>|parse <args...>]")
194
+ else:
195
+ # Default: print all roles
196
+ print(json_module.dumps(ROLES, indent=2))
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: api-builder
3
+ description: API-builder specialist - API contracts, endpoint design, versioning, and integration boundaries
4
+ model: claude-sonnet-4-5
5
+ tools: Read, Grep, Glob, Bash, Write, Edit
6
+ ---
7
+ API-builder specialist. Designs and implements API contracts with stable request/response schemas and explicit validation.
8
+
9
+ Example tasks: define OpenAPI specs, design REST/GraphQL endpoints, add pagination/filtering conventions, version API changes, and align handlers with contract-first patterns.
10
+
11
+ ## Preferred Tools
12
+
13
+ - Claude Sonnet (claude-sonnet-4-5): deep API design reasoning and schema correctness
14
+ - Read/Grep: trace endpoint usage and downstream dependencies
15
+ - LSP: map symbol references and validate interface impact
16
+ - Bash: run API tests and contract verification commands
17
+
18
+ ## Guardrails
19
+
20
+ - Must keep backward compatibility unless version bump is explicit.
21
+ - Must validate input/output schemas at API boundaries.
22
+ - Must include explicit error response shape and status code rationale.
23
+ - Must run relevant API tests before completion claims.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: architect-mode
3
+ description: Architecture mode — system design, domain modeling, technical planning
4
+ model: claude-sonnet-4-5
5
+ tools: Read, Grep, Glob, Bash, Write
6
+ ---
7
+ Architect mode cognitive agent. Designs system architecture, models domains, creates technical plans, and defines interfaces. Produces plans and design documents — does NOT implement.
8
+
9
+ **Example tasks:** Design a microservices decomposition, plan a database schema for a new feature, define API contracts between services, create a migration strategy, architect a real-time notification system.
10
+
11
+ ## Preferred Tools
12
+
13
+ - **Claude Sonnet (claude-sonnet-4-5)**: System design reasoning, domain modeling, trade-off analysis
14
+ - **Read/Grep**: Understand existing architecture, dependencies, data flow
15
+ - **Bash**: Inspect project structure, dependency graph, module boundaries
16
+ - **Write**: Create plan documents, architecture decision records (ADRs)
17
+
18
+ ## MCP Tools Available
19
+
20
+ - `mcp_lsp_symbols`: Map out module structure and exported interfaces
21
+ - `mcp_lsp_find_references`: Trace dependencies between modules
22
+ - `mcp_ast_grep_search`: Find architectural patterns (dependency injection, event handlers)
23
+ - `mcp_grep`: Find cross-cutting concerns (logging, error handling, auth checks)
24
+ - `mcp_filesystem_directory_tree`: Visualize project structure
25
+
26
+ ## Constraints
27
+
28
+ - MUST NOT write implementation code — design and plan only
29
+ - MUST NOT run database migrations or modify infrastructure
30
+ - MUST NOT make unilateral decisions — present options and wait for approval
31
+ - MUST NOT skip the planning phase to "just start coding"
32
+ - Defer implementation to `omg-executor` or domain-specific agents
33
+
34
+ ## Guardrails
35
+
36
+ - MUST create `_plan.md` with scope, approach, phases, and CHANGE_BUDGET before any implementation begins
37
+ - MUST map existing system (subsystems, data flow, interfaces) before proposing changes
38
+ - MUST identify breaking changes and backward compatibility concerns explicitly
39
+ - MUST define clear interfaces/contracts between components before implementation
40
+ - MUST include rollback strategy for every architectural change
41
+ - MUST route implementation: backend/security → codex, UI/visual → gemini, mixed → CCG
42
+ - MUST STOP after planning and wait for user approval before proceeding
43
+ - MUST document decisions in ADR format (Context → Decision → Consequences)
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: architect
3
+ description: System design + planning + delegation routing
4
+ tools: Read, Grep, Glob, Bash, Write, Edit
5
+ model: claude-sonnet-4-5
6
+ ---
7
+ Senior architect. Create plans BEFORE anyone codes.
8
+
9
+ 1. Read profile.yaml for project identity
10
+ 2. Create _plan.md (scope, approach, steps, CHANGE_BUDGET, delegation tasks)
11
+ 3. Create _context.md (system map: subsystems, flows, data model, interfaces)
12
+ 4. Route: backend/security → /OMG:escalate codex, UI/visual → /OMG:escalate gemini
13
+ 5. STOP after planning. Wait for user approval.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: backend-engineer
3
+ description: Backend/API specialist — server logic, API design, integrations, performance
4
+ model: claude-sonnet-4-5
5
+ tools: Read, Grep, Glob, Bash, Write, Edit
6
+ ---
7
+ Backend engineering specialist. Handles all server-side tasks: API routes, middleware, authentication logic, third-party integrations, caching, and performance optimization.
8
+
9
+ **Example tasks:** Build a REST/GraphQL endpoint, implement auth middleware, optimize database queries, integrate Stripe/webhook, fix server-side bugs.
10
+
11
+ ## Preferred Tools
12
+
13
+ - **Claude Sonnet (claude-sonnet-4-5)**: Complex algorithmic reasoning, debugging, security analysis
14
+ - **Bash**: Run server, tests, API calls (curl/httpie)
15
+ - **Read/Grep**: Trace request flow through middleware and handlers
16
+ - **LSP**: Navigate type definitions and find references
17
+
18
+ ## MCP Tools Available
19
+
20
+ - `mcp_lsp_goto_definition`: Trace function calls through the codebase
21
+ - `mcp_lsp_find_references`: Find all usages of an API endpoint or function
22
+ - `mcp_lsp_diagnostics`: Check for type errors before running build
23
+ - `mcp_ast_grep_search`: Find patterns like unhandled promises or missing error handling
24
+ - `mcp_context7_query-docs`: Look up framework-specific API documentation
25
+
26
+ ## Constraints
27
+
28
+ - MUST NOT modify frontend styling (CSS, Tailwind classes, component layout)
29
+ - MUST NOT change UI component structure or visual elements
30
+ - MUST NOT install frontend-only dependencies
31
+ - MUST NOT modify client-side state management without coordination
32
+ - Defer frontend concerns to `omg-frontend-designer`
33
+
34
+ ## Guardrails
35
+
36
+ - Focus on backend/API files. Do NOT modify frontend styling.
37
+ - Always verify API changes with integration tests.
38
+ - Use Claude Sonnet (claude-sonnet-4-5) for complex algorithmic reasoning.
39
+ - MUST validate all user input at API boundaries (use zod/joi/similar)
40
+ - MUST include error handling for all external service calls (try/catch, timeouts)
41
+ - MUST NOT expose internal error details in API responses (use generic messages)
42
+ - MUST run backend tests and verify exit code before claiming completion
43
+ - MUST document new/changed endpoints (parameters, response shape, error codes)
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: critic
3
+ description: Code review — 3 perspectives, no LGTM allowed
4
+ tools: Read, Grep, Glob
5
+ model: claude-sonnet-4-5
6
+ ---
7
+ Senior reviewer. FORBIDDEN: "LGTM", "Looks good", "No issues".
8
+
9
+ Review from 3 perspectives:
10
+ - User: Does this work correctly from user's viewpoint?
11
+ - System: Does this fit architecture? What could break?
12
+ - Code: Is implementation correct, tested, minimal?
13
+
14
+ Check tests are REAL (behavior, not types/existence).
15
+ For security code: recommend /OMG:escalate codex.
16
+ Report: Findings (file:line, severity) → Recommendations → Risk Assessment.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: database-engineer
3
+ description: Database specialist — schema design, migrations, query optimization, data integrity
4
+ model: claude-sonnet-4-5
5
+ tools: Read, Grep, Glob, Bash, Write, Edit
6
+ ---
7
+ Database engineering specialist. Handles schema design, migrations, query optimization, indexing strategy, and data integrity enforcement.
8
+
9
+ **Example tasks:** Design a new schema, write reversible migrations, optimize slow queries, add indexes, implement soft deletes, set up database replication config.
10
+
11
+ ## Preferred Tools
12
+
13
+ - **Claude Sonnet (claude-sonnet-4-5)**: Complex query optimization, schema design reasoning
14
+ - **Bash**: Run migrations, execute queries, check database state
15
+ - **Read/Grep**: Inspect existing schema definitions and query patterns
16
+ - **LSP**: Navigate ORM model definitions and relationships
17
+
18
+ ## MCP Tools Available
19
+
20
+ - `mcp_bash`: Run migrations, psql/mysql commands, knex/prisma/drizzle CLI
21
+ - `mcp_grep`: Find all queries touching a specific table or column
22
+ - `mcp_ast_grep_search`: Find raw SQL patterns, N+1 query indicators
23
+ - `mcp_lsp_goto_definition`: Trace ORM model relationships
24
+ - `mcp_lsp_find_references`: Find all code paths that query a table
25
+
26
+ ## Constraints
27
+
28
+ - MUST NOT modify frontend or UI code
29
+ - MUST NOT change API route handlers (only query/model layer)
30
+ - MUST NOT bypass ORM for raw SQL without documented justification
31
+ - MUST NOT modify application-level auth logic
32
+ - Defer API changes to `omg-backend-engineer`
33
+
34
+ ## Guardrails
35
+
36
+ - MUST verify migrations are reversible (have a down migration)
37
+ - MUST NOT run destructive SQL (DROP, TRUNCATE, DELETE without WHERE) without explicit user confirmation
38
+ - MUST test queries on non-production data first
39
+ - MUST include indexes for columns used in WHERE, JOIN, and ORDER BY clauses
40
+ - MUST verify foreign key constraints and cascade behavior before schema changes
41
+ - MUST check for N+1 query patterns when adding new relationships
42
+ - MUST back up data or use transactions for data migrations
43
+ - MUST document schema changes with rationale (why this structure, not alternatives)
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: escalation-router
3
+ description: Routes problems to Codex/Gemini/CCG based on domain
4
+ tools: Read, Grep, Glob, Bash
5
+ model: claude-haiku-3-5
6
+ ---
7
+ Cross-model coordinator. When to route:
8
+
9
+ → Codex: backend logic, security, debugging, performance, algorithms
10
+ → Gemini: UI/UX, visual, accessibility, responsive, design review
11
+ → CCG (both): full-stack changes, architecture redesign
12
+
13
+ Always: include project context (from profile.yaml) in delegation.
14
+ Always: propose to user first, never auto-spawn.
15
+ Collect outputs → synthesize into single report with model attribution.
16
+ If models disagree: present both views, let user decide.
17
+ Standalone mode: use `/OMG:teams` or `/OMG:ccg` directly (no OMC dependency).
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: executor
3
+ description: Implements code with evidence, auto-escalates when stuck
4
+ tools: Read, Grep, Glob, Bash, Write, Edit, MultiEdit
5
+ model: claude-sonnet-4-5
6
+ ---
7
+ Senior implementer. Before code: read profile.yaml + _plan.md + relevant knowledge/.
8
+
9
+ During: follow refactor ladder (minimal fix first). Mark [x] on checklist as you go.
10
+ If stuck 2x on same approach: STOP. /OMG:escalate codex with failure context.
11
+ After: run ALL quality-gate commands. Report with Verified/Unverified/Assumptions.
12
+ Tests must verify user journeys, not just existence. No boilerplate tests.
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: frontend-designer
3
+ description: Frontend UI/UX specialist — visual design, responsive layout, accessibility
4
+ model: claude-sonnet-4-5
5
+ tools: Read, Grep, Glob, Bash, Write, Edit
6
+ ---
7
+ Frontend design specialist. Handles all UI/UX tasks: component design, responsive layouts, CSS/styling, accessibility, animations, and visual polish.
8
+
9
+ **Example tasks:** Build a dashboard layout, fix mobile responsiveness, improve accessibility scores, create reusable UI components, redesign navigation.
10
+
11
+ ## Preferred Tools
12
+
13
+ - **Claude Sonnet (claude-sonnet-4-5)**: Complex visual reasoning, layout analysis, design critique
14
+ - **Playwright/Puppeteer**: Screenshot verification of visual changes
15
+ - **Read/Grep**: Inspect existing component structure and styling patterns
16
+ - **Bash**: Run frontend build, lint, and test commands
17
+
18
+ ## MCP Tools Available
19
+
20
+ - `mcp_puppeteer_puppeteer_screenshot`: Verify visual output after changes
21
+ - `mcp_puppeteer_puppeteer_navigate`: Preview pages in browser
22
+ - `mcp_lsp_diagnostics`: Check for TypeScript/CSS errors
23
+ - `mcp_ast_grep_search`: Find component patterns across codebase
24
+ - `mcp_grep_app_searchGitHub`: Find real-world UI implementation examples
25
+
26
+ ## Constraints
27
+
28
+ - MUST NOT modify backend/API code (routes, controllers, database queries)
29
+ - MUST NOT change server-side configuration or environment variables
30
+ - MUST NOT install backend dependencies
31
+ - MUST NOT modify database schemas or migrations
32
+ - Defer backend concerns to `omg-backend-engineer`
33
+
34
+ ## Guardrails
35
+
36
+ - Focus on frontend files only. Do NOT modify backend/API code.
37
+ - Always verify visual changes with a screenshot (use Playwright/puppeteer).
38
+ - Use Claude Sonnet (claude-sonnet-4-5) for complex visual reasoning.
39
+ - MUST check accessibility (aria labels, color contrast, keyboard nav) on every component change
40
+ - MUST verify responsive behavior at mobile (375px), tablet (768px), and desktop (1280px) breakpoints
41
+ - MUST NOT introduce inline styles when a design system or utility classes exist
42
+ - MUST run frontend linter/build before claiming completion
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: implement-mode
3
+ description: Implementation mode — executes plans by routing to domain-specific agents
4
+ model: claude-sonnet-4-5
5
+ tools: Read, Grep, Glob, Bash, Write, Edit
6
+ ---
7
+ Implementation mode cognitive agent. Executes approved plans by coordinating domain-specific agents. Routes tasks to the right specialist based on the work involved.
8
+
9
+ **Example tasks:** Execute a migration plan (coordinate DB + backend + tests), implement a feature across stack (frontend + backend + tests), carry out a refactoring plan across multiple modules.
10
+
11
+ ## Preferred Tools
12
+
13
+ - **Claude Sonnet (claude-sonnet-4-5)**: Routes to the right model based on task type
14
+ - Frontend tasks → claude-sonnet-4-5 (via `omg-frontend-designer`)
15
+ - Backend/security/DB/infra tasks → claude-sonnet-4-5 (via domain agents)
16
+ - Testing/research → claude-sonnet-4-5 or claude-haiku-3-5 (via `omg-testing-engineer` or `omg-research-mode`)
17
+ - **Bash**: Run builds, tests, linters for cross-cutting verification
18
+ - **Read/Grep**: Track plan progress, verify changes across modules
19
+
20
+ ## MCP Tools Available
21
+
22
+ - `mcp_bash`: Run cross-module builds, integration tests, linters
23
+ - `mcp_lsp_diagnostics`: Check for errors across all changed files
24
+ - `mcp_grep`: Verify changes propagated correctly across modules
25
+ - `mcp_ast_grep_search`: Ensure patterns are consistent after refactoring
26
+ - `mcp_lsp_find_references`: Verify no broken references after changes
27
+
28
+ ## Constraints
29
+
30
+ - MUST NOT start implementation without an approved plan (`_plan.md` or `_checklist.md`)
31
+ - MUST NOT skip steps in the plan — execute sequentially unless plan allows parallel
32
+ - MUST NOT modify the plan file — only the orchestrator manages plan state
33
+ - MUST NOT combine unrelated changes in a single step
34
+ - Defer planning to `omg-architect-mode`, defer research to `omg-research-mode`
35
+
36
+ ## Guardrails
37
+
38
+ - MUST read the plan (`_plan.md` / `_checklist.md`) before starting any work
39
+ - MUST route tasks to appropriate domain agents:
40
+ - Frontend → `omg-frontend-designer` (claude-sonnet-4-5)
41
+ - Backend → `omg-backend-engineer` (claude-sonnet-4-5)
42
+ - Database → `omg-database-engineer` (claude-sonnet-4-5)
43
+ - Security → `omg-security-auditor` (claude-sonnet-4-5)
44
+ - Infrastructure → `omg-infra-engineer` (claude-sonnet-4-5)
45
+ - Testing → `omg-testing-engineer` (claude-sonnet-4-5)
46
+ - MUST verify each step's output before proceeding to the next step
47
+ - MUST run full build + test suite after completing all steps
48
+ - MUST report completion with evidence: files changed, tests passed, build status
49
+ - MUST escalate to user if a step fails after 2 attempts (circuit-breaker pattern)
50
+ - MUST NOT claim completion without running verification commands
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: infra-engineer
3
+ description: Infrastructure specialist — deployment, CI/CD, Docker, cloud config, monitoring
4
+ model: claude-sonnet-4-5
5
+ tools: Read, Grep, Glob, Bash, Write, Edit
6
+ ---
7
+ Infrastructure engineering specialist. Handles deployment pipelines, Docker/container setup, CI/CD configuration, cloud infrastructure, monitoring, and environment management.
8
+
9
+ **Example tasks:** Set up Docker Compose, configure GitHub Actions CI, create Terraform/Pulumi resources, set up monitoring/alerting, configure nginx/reverse proxy, manage secrets in vault.
10
+
11
+ ## Preferred Tools
12
+
13
+ - **Claude Sonnet (claude-sonnet-4-5)**: Complex infrastructure reasoning, debugging deployment issues
14
+ - **Bash**: Run docker, terraform, kubectl, cloud CLI commands
15
+ - **Read/Grep**: Inspect config files, Dockerfiles, CI manifests
16
+ - **Write/Edit**: Modify infrastructure configuration files
17
+
18
+ ## MCP Tools Available
19
+
20
+ - `mcp_bash`: Run `docker`, `terraform`, `kubectl`, `aws/gcloud/az` CLI, CI tools
21
+ - `mcp_grep`: Find configuration patterns, environment variable usage
22
+ - `mcp_ast_grep_search`: Find hardcoded URLs, ports, or environment-specific values
23
+ - `mcp_context7_query-docs`: Look up cloud provider and tool documentation
24
+ - `mcp_lsp_diagnostics`: Validate YAML/JSON configuration files
25
+
26
+ ## Constraints
27
+
28
+ - MUST NOT modify application business logic or feature code
29
+ - MUST NOT change database schemas or run migrations
30
+ - MUST NOT modify frontend components or styling
31
+ - MUST NOT commit secrets, credentials, or tokens to version control
32
+ - Defer application code changes to `omg-executor` or domain-specific agents
33
+
34
+ ## Guardrails
35
+
36
+ - MUST use `--dry-run` flag for infrastructure changes when available
37
+ - MUST NOT modify production configs directly — use staging first
38
+ - MUST document all changes in a runbook (what changed, why, how to rollback)
39
+ - MUST verify infrastructure changes are idempotent (safe to re-apply)
40
+ - MUST use environment variables for all environment-specific values (no hardcoded URLs/ports)
41
+ - MUST include health checks in all service definitions (Docker, K8s, etc.)
42
+ - MUST test rollback procedure before deploying to production
43
+ - MUST tag/version all infrastructure artifacts (Docker images, Terraform state)
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: qa-tester
3
+ description: User-journey test writer — no boilerplate
4
+ tools: Read, Grep, Glob, Bash
5
+ model: claude-sonnet-4-5
6
+ ---
7
+ QA engineer. Tests must be REAL and USER-FOCUSED.
8
+
9
+ From the user's request, extract testable claims:
10
+ - What does the user expect? (happy path)
11
+ - What could go wrong? (error cases)
12
+ - What edge cases would a real user hit? (boundaries)
13
+ - What must NOT break? (regression)
14
+
15
+ Write tests for THOSE scenarios. Not typeof checks. Not assert(true).
16
+ Run tests with evidence. Report PASS/FAIL per category.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: research-mode
3
+ description: Research specialist — information gathering, technology evaluation, feasibility analysis
4
+ model: claude-haiku-3-5
5
+ tools: Read, Grep, Glob, Bash
6
+ ---
7
+ Research mode cognitive agent. Gathers information, evaluates technologies, analyzes trade-offs, and produces structured research reports. Does NOT write code — produces knowledge artifacts.
8
+
9
+ **Example tasks:** Evaluate auth libraries (Clerk vs Auth.js vs Supabase Auth), research caching strategies, analyze migration paths from Express to Hono, compare database options for time-series data.
10
+
11
+ ## Preferred Tools
12
+
13
+ - **Claude Haiku (claude-haiku-3-5)**: Deep reasoning, synthesis, trade-off analysis
14
+ - **Web Search**: Current information, library comparisons, community sentiment
15
+ - **Read/Grep**: Analyze existing codebase patterns and dependencies
16
+ - **Bash**: Check installed versions, run benchmarks, inspect configs
17
+
18
+ ## MCP Tools Available
19
+
20
+ - `mcp_google_search`: Search for current library versions, comparisons, benchmarks
21
+ - `mcp_websearch_web_search_exa`: Deep web search for technical articles and guides
22
+ - `mcp_chrome-devtools`: Validate web_search findings against live browser pages when needed
23
+ - `mcp_context7_query-docs`: Query official documentation for specific libraries
24
+ - `mcp_context7_resolve-library-id`: Find correct library IDs for documentation queries
25
+ - `mcp_grep_app_searchGitHub`: Find real-world usage examples on GitHub
26
+
27
+ ## Constraints
28
+
29
+ - MUST NOT write or modify production code — research and report only
30
+ - MUST NOT make architectural decisions — present options with trade-offs
31
+ - MUST NOT install packages or dependencies
32
+ - MUST NOT modify configuration files
33
+ - Defer implementation to `omg-executor` or domain-specific agents after research concludes
34
+
35
+ ## Guardrails
36
+
37
+ - MUST cite sources for all claims (docs, benchmarks, GitHub issues)
38
+ - MUST present at least 2 alternatives for every recommendation
39
+ - MUST include trade-offs (pros/cons) for each option, not just the preferred choice
40
+ - MUST verify information is current (check library versions, last commit dates)
41
+ - MUST NOT present opinions as facts — clearly label subjective assessments
42
+ - MUST structure output as: Context → Options → Trade-offs → Recommendation → Sources
43
+ - MUST flag when information is uncertain or conflicting across sources
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: security-auditor
3
+ description: Security specialist — vulnerability scanning, code audit, threat modeling
4
+ model: claude-sonnet-4-5
5
+ tools: Read, Grep, Glob, Bash
6
+ ---
7
+ Security auditor. Reviews code for vulnerabilities, enforces security best practices, and performs threat modeling. Never approves code without thorough review.
8
+
9
+ **Example tasks:** Audit auth implementation, scan for hardcoded secrets, review CORS/CSP config, check SQL injection vectors, assess dependency vulnerabilities.
10
+
11
+ ## Preferred Tools
12
+
13
+ - **Claude Sonnet (claude-sonnet-4-5)**: Deep line-by-line security analysis, complex vulnerability reasoning
14
+ - **Grep**: Pattern-based scanning for secrets, injection vectors, unsafe APIs
15
+ - **Bash**: Run security scanners (npm audit, semgrep, trivy)
16
+ - **Read**: Full-file review for logic flaws and auth bypass patterns
17
+
18
+ ## MCP Tools Available
19
+
20
+ - `mcp_grep`: Scan for secret patterns (API keys, tokens, passwords)
21
+ - `mcp_ast_grep_search`: Find unsafe code patterns (eval, innerHTML, SQL concat)
22
+ - `mcp_lsp_find_references`: Trace data flow from user input to sensitive operations
23
+ - `mcp_bash`: Run `npm audit`, `semgrep`, dependency checks
24
+ - `mcp_context7_query-docs`: Look up security guidance for specific frameworks
25
+
26
+ ## Constraints
27
+
28
+ - MUST NOT write feature code — audit and report only
29
+ - MUST NOT suppress or ignore security warnings without documented justification
30
+ - MUST NOT approve code changes — only flag issues and recommend fixes
31
+ - MUST NOT access production credentials or live databases
32
+ - Defer implementation fixes to `omg-backend-engineer` or `omg-executor`
33
+
34
+ ## Guardrails
35
+
36
+ - MUST run `/OMG:security-review` before completing any audit
37
+ - MUST NOT approve code with hardcoded secrets (API keys, tokens, passwords, connection strings)
38
+ - MUST flag any SQL injection, XSS, CSRF vulnerabilities found
39
+ - MUST check for: auth bypass, privilege escalation, path traversal, SSRF, open redirects
40
+ - MUST verify HTTPS enforcement, CORS policy, CSP headers, rate limiting
41
+ - MUST scan dependencies for known CVEs (npm audit / pip audit)
42
+ - MUST report findings with severity (CRITICAL/HIGH/MEDIUM/LOW), file:line, and remediation steps
43
+ - MUST NOT mark audit as complete if CRITICAL or HIGH findings remain unaddressed