@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,220 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Iterable
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
DEFAULT_WORKFLOW_PATH: tuple[str, ...] = (
|
|
7
|
+
"plan",
|
|
8
|
+
"implement",
|
|
9
|
+
"qa",
|
|
10
|
+
"simulate",
|
|
11
|
+
"final_test",
|
|
12
|
+
"production",
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
_STAGE_ALIASES = {
|
|
16
|
+
"plan": "plan",
|
|
17
|
+
"planning": "plan",
|
|
18
|
+
"implement": "implement",
|
|
19
|
+
"implementation": "implement",
|
|
20
|
+
"build": "implement",
|
|
21
|
+
"qa": "qa",
|
|
22
|
+
"quality": "qa",
|
|
23
|
+
"quality_assurance": "qa",
|
|
24
|
+
"test": "final_test",
|
|
25
|
+
"testing": "final_test",
|
|
26
|
+
"final_test": "final_test",
|
|
27
|
+
"final-testing": "final_test",
|
|
28
|
+
"simulate": "simulate",
|
|
29
|
+
"simulation": "simulate",
|
|
30
|
+
"prod": "production",
|
|
31
|
+
"production": "production",
|
|
32
|
+
"deploy": "production",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _as_string_list(value: Any) -> list[str]:
|
|
37
|
+
if isinstance(value, str):
|
|
38
|
+
text = value.strip()
|
|
39
|
+
return [text] if text else []
|
|
40
|
+
if isinstance(value, Iterable):
|
|
41
|
+
items: list[str] = []
|
|
42
|
+
for raw in value:
|
|
43
|
+
if isinstance(raw, str):
|
|
44
|
+
text = raw.strip()
|
|
45
|
+
if text:
|
|
46
|
+
items.append(text)
|
|
47
|
+
return items
|
|
48
|
+
return []
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _resolve_workflow_path(idea: dict[str, Any]) -> list[str]:
|
|
52
|
+
raw_path = idea.get("workflow") or idea.get("path") or idea.get("delivery_path") or idea.get("workflow_path")
|
|
53
|
+
requested = _as_string_list(raw_path)
|
|
54
|
+
resolved: list[str] = []
|
|
55
|
+
for stage in requested:
|
|
56
|
+
key = _STAGE_ALIASES.get(stage.strip().lower())
|
|
57
|
+
if key and key not in resolved:
|
|
58
|
+
resolved.append(key)
|
|
59
|
+
if not resolved:
|
|
60
|
+
return list(DEFAULT_WORKFLOW_PATH)
|
|
61
|
+
for required in DEFAULT_WORKFLOW_PATH:
|
|
62
|
+
if required not in resolved:
|
|
63
|
+
resolved.append(required)
|
|
64
|
+
return resolved
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def build_business_task_plan(idea: dict[str, Any]) -> dict[str, Any]:
|
|
68
|
+
goal = str(idea.get("goal", "")).strip() or "unspecified-goal"
|
|
69
|
+
constraints = _as_string_list(idea.get("constraints", []))
|
|
70
|
+
acceptance = _as_string_list(idea.get("acceptance", []))
|
|
71
|
+
user_instructions = _as_string_list(idea.get("user_instructions", []))
|
|
72
|
+
workflow_path = _resolve_workflow_path(idea)
|
|
73
|
+
|
|
74
|
+
tasks: list[dict[str, Any]] = []
|
|
75
|
+
task_id = 1
|
|
76
|
+
|
|
77
|
+
if user_instructions:
|
|
78
|
+
for instruction in user_instructions:
|
|
79
|
+
tasks.append(
|
|
80
|
+
{
|
|
81
|
+
"id": f"T{task_id}",
|
|
82
|
+
"stage": "plan",
|
|
83
|
+
"title": "Capture user instruction",
|
|
84
|
+
"detail": instruction,
|
|
85
|
+
"source": "user_instructions",
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
task_id += 1
|
|
89
|
+
|
|
90
|
+
for item in constraints:
|
|
91
|
+
tasks.append(
|
|
92
|
+
{
|
|
93
|
+
"id": f"T{task_id}",
|
|
94
|
+
"stage": "plan",
|
|
95
|
+
"title": "Capture delivery constraint",
|
|
96
|
+
"detail": item,
|
|
97
|
+
"source": "constraints",
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
task_id += 1
|
|
101
|
+
|
|
102
|
+
if "implement" in workflow_path:
|
|
103
|
+
tasks.append(
|
|
104
|
+
{
|
|
105
|
+
"id": f"T{task_id}",
|
|
106
|
+
"stage": "implement",
|
|
107
|
+
"title": "Implement scoped changes",
|
|
108
|
+
"detail": "Apply changes that satisfy user instructions and follow repository patterns.",
|
|
109
|
+
"source": "workflow",
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
task_id += 1
|
|
113
|
+
|
|
114
|
+
if "qa" in workflow_path:
|
|
115
|
+
tasks.append(
|
|
116
|
+
{
|
|
117
|
+
"id": f"T{task_id}",
|
|
118
|
+
"stage": "qa",
|
|
119
|
+
"title": "Run QA checks",
|
|
120
|
+
"detail": "Validate behavior against constraints and acceptance criteria.",
|
|
121
|
+
"source": "workflow",
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
task_id += 1
|
|
125
|
+
|
|
126
|
+
if "simulate" in workflow_path:
|
|
127
|
+
tasks.append(
|
|
128
|
+
{
|
|
129
|
+
"id": f"T{task_id}",
|
|
130
|
+
"stage": "simulate",
|
|
131
|
+
"title": "Simulate delivery scenarios",
|
|
132
|
+
"detail": "Exercise expected paths and edge cases before final testing.",
|
|
133
|
+
"source": "workflow",
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
task_id += 1
|
|
137
|
+
|
|
138
|
+
for item in acceptance:
|
|
139
|
+
tasks.append(
|
|
140
|
+
{
|
|
141
|
+
"id": f"T{task_id}",
|
|
142
|
+
"stage": "final_test",
|
|
143
|
+
"title": "Validate acceptance criterion",
|
|
144
|
+
"detail": item,
|
|
145
|
+
"source": "acceptance",
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
task_id += 1
|
|
149
|
+
|
|
150
|
+
if "production" in workflow_path:
|
|
151
|
+
tasks.append(
|
|
152
|
+
{
|
|
153
|
+
"id": f"T{task_id}",
|
|
154
|
+
"stage": "production",
|
|
155
|
+
"title": "Prepare production handoff",
|
|
156
|
+
"detail": "Confirm release readiness, residual risks, and deployment checks.",
|
|
157
|
+
"source": "workflow",
|
|
158
|
+
}
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
stage_summaries = []
|
|
162
|
+
for stage in workflow_path:
|
|
163
|
+
stage_tasks = [task for task in tasks if task["stage"] == stage]
|
|
164
|
+
stage_summaries.append(
|
|
165
|
+
{
|
|
166
|
+
"stage": stage,
|
|
167
|
+
"task_count": len(stage_tasks),
|
|
168
|
+
"tasks": stage_tasks,
|
|
169
|
+
}
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
return {
|
|
173
|
+
"goal": goal,
|
|
174
|
+
"requested_path": _as_string_list(
|
|
175
|
+
idea.get("workflow") or idea.get("path") or idea.get("delivery_path") or idea.get("workflow_path")
|
|
176
|
+
),
|
|
177
|
+
"resolved_path": workflow_path,
|
|
178
|
+
"constraints": constraints,
|
|
179
|
+
"acceptance": acceptance,
|
|
180
|
+
"user_instructions": user_instructions,
|
|
181
|
+
"stages": stage_summaries,
|
|
182
|
+
"task_count": len(tasks),
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
def build_business_workflow_result(
|
|
187
|
+
*,
|
|
188
|
+
idea: dict[str, Any],
|
|
189
|
+
plan: dict[str, Any],
|
|
190
|
+
execution: dict[str, Any],
|
|
191
|
+
verification: dict[str, Any],
|
|
192
|
+
) -> dict[str, Any]:
|
|
193
|
+
plan_payload = build_business_task_plan(idea)
|
|
194
|
+
checks_value = verification.get("checks") if isinstance(verification, dict) else None
|
|
195
|
+
checks = checks_value if isinstance(checks_value, list) else []
|
|
196
|
+
checks_ok = bool(checks) and all(isinstance(check, dict) and check.get("passed") is True for check in checks)
|
|
197
|
+
|
|
198
|
+
stage_status = {
|
|
199
|
+
"plan": "completed" if plan.get("status") == "planned" else "failed",
|
|
200
|
+
"implement": "completed" if execution.get("status") == "executed" else "failed",
|
|
201
|
+
"qa": "completed" if checks_ok else "failed",
|
|
202
|
+
"simulate": "completed" if checks_ok else "failed",
|
|
203
|
+
"final_test": "completed" if checks_ok else "failed",
|
|
204
|
+
"production": "ready" if checks_ok else "blocked",
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return {
|
|
208
|
+
"goal": plan_payload["goal"],
|
|
209
|
+
"workflow_path": plan_payload["resolved_path"],
|
|
210
|
+
"requested_workflow_path": plan_payload["requested_path"],
|
|
211
|
+
"task_plan": plan_payload,
|
|
212
|
+
"stage_status": [
|
|
213
|
+
{
|
|
214
|
+
"stage": stage,
|
|
215
|
+
"status": stage_status.get(stage, "pending"),
|
|
216
|
+
}
|
|
217
|
+
for stage in plan_payload["resolved_path"]
|
|
218
|
+
],
|
|
219
|
+
"ready_for_production": checks_ok,
|
|
220
|
+
}
|