@trac3er/oh-my-god 2.0.0 → 2.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 +8 -8
- package/.claude-plugin/plugin.json +5 -4
- package/.claude-plugin/scripts/uninstall.sh +74 -3
- package/.claude-plugin/scripts/update.sh +78 -3
- package/.coveragerc +26 -0
- package/.mcp.json +4 -4
- package/CHANGELOG.md +14 -0
- package/CODE_OF_CONDUCT.md +27 -0
- package/CONTRIBUTING.md +62 -0
- package/OMG-setup.sh +1201 -355
- package/README.md +77 -56
- package/SECURITY.md +25 -0
- package/agents/__init__.py +1 -0
- package/agents/model_roles.py +196 -0
- package/agents/omg-architect-mode.md +3 -5
- package/agents/omg-backend-engineer.md +3 -5
- package/agents/omg-database-engineer.md +3 -5
- package/agents/omg-frontend-designer.md +4 -5
- package/agents/omg-implement-mode.md +4 -5
- package/agents/omg-infra-engineer.md +3 -5
- package/agents/omg-research-mode.md +4 -6
- package/agents/omg-security-auditor.md +3 -5
- package/agents/omg-testing-engineer.md +3 -5
- package/build/lib/yaml.py +321 -0
- package/commands/OMG:ai-commit.md +101 -14
- package/commands/OMG:arch.md +302 -19
- package/commands/OMG:ccg.md +12 -7
- package/commands/OMG:compat.md +25 -17
- package/commands/OMG:cost.md +173 -13
- package/commands/OMG:crazy.md +1 -1
- package/commands/OMG:create-agent.md +170 -20
- package/commands/OMG:deps.md +235 -17
- package/commands/OMG:domain-init.md +1 -1
- package/commands/OMG:escalate.md +41 -12
- package/commands/OMG:health-check.md +37 -13
- package/commands/OMG:init.md +122 -14
- package/commands/OMG:project-init.md +1 -1
- package/commands/OMG:session-branch.md +76 -9
- package/commands/OMG:session-fork.md +42 -5
- package/commands/OMG:session-merge.md +124 -8
- package/commands/OMG:setup.md +69 -12
- package/commands/OMG:stats.md +215 -14
- package/commands/OMG:teams.md +19 -10
- package/config/lsp_languages.yaml +8 -0
- package/hooks/__init__.py +0 -0
- package/hooks/_agent_registry.py +423 -0
- package/hooks/_analytics.py +291 -0
- package/hooks/_budget.py +31 -0
- package/hooks/_common.py +569 -0
- package/hooks/_compression_optimizer.py +119 -0
- package/hooks/_cost_ledger.py +176 -0
- package/hooks/_learnings.py +126 -0
- package/hooks/_memory.py +103 -0
- package/hooks/_protected_context.py +150 -0
- package/hooks/_token_counter.py +221 -0
- package/hooks/branch_manager.py +236 -0
- package/hooks/budget_governor.py +232 -0
- package/hooks/circuit-breaker.py +270 -0
- package/hooks/compression_feedback.py +254 -0
- package/hooks/config-guard.py +216 -0
- package/hooks/context_pressure.py +53 -0
- package/hooks/credential_store.py +1020 -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 +505 -0
- package/hooks/post-tool-failure.py +19 -0
- package/hooks/post-write.py +219 -0
- package/hooks/post_write.py +46 -0
- package/hooks/pre-compact.py +398 -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/query.py +512 -0
- package/hooks/secret-guard.py +61 -0
- package/hooks/secret_audit.py +144 -0
- package/hooks/session-end-capture.py +137 -0
- package/hooks/session-start.py +277 -0
- package/hooks/setup_wizard.py +582 -0
- package/hooks/shadow_manager.py +297 -0
- package/hooks/state_migration.py +225 -0
- package/hooks/stop-gate.py +7 -0
- package/hooks/stop_dispatcher.py +945 -0
- package/hooks/test-validator.py +361 -0
- package/hooks/test_generator_hook.py +123 -0
- package/hooks/todo-state-tracker.py +114 -0
- package/hooks/tool-ledger.py +149 -0
- package/hooks/trust_review.py +585 -0
- package/hud/omg-hud.mjs +31 -1
- package/lab/__init__.py +1 -0
- package/lab/pipeline.py +75 -0
- package/lab/policies.py +52 -0
- package/package.json +7 -18
- package/plugins/README.md +33 -61
- package/plugins/advanced/commands/OMG:deep-plan.md +3 -3
- package/plugins/advanced/commands/OMG:learn.md +1 -1
- package/plugins/advanced/commands/OMG:security-review.md +3 -3
- package/plugins/advanced/commands/OMG:ship.md +1 -1
- package/plugins/advanced/plugin.json +1 -1
- package/plugins/core/plugin.json +8 -3
- package/plugins/dephealth/__init__.py +0 -0
- package/plugins/dephealth/cve_scanner.py +188 -0
- package/plugins/dephealth/license_checker.py +135 -0
- package/plugins/dephealth/manifest_detector.py +423 -0
- package/plugins/dephealth/vuln_analyzer.py +169 -0
- package/plugins/testgen/__init__.py +0 -0
- package/plugins/testgen/codamosa_engine.py +402 -0
- package/plugins/testgen/edge_case_synthesizer.py +184 -0
- package/plugins/testgen/framework_detector.py +271 -0
- package/plugins/testgen/skeleton_generator.py +219 -0
- package/plugins/viz/__init__.py +0 -0
- package/plugins/viz/ast_parser.py +139 -0
- package/plugins/viz/diagram_generator.py +192 -0
- package/plugins/viz/graph_builder.py +444 -0
- package/plugins/viz/native_parsers.py +259 -0
- package/plugins/viz/regex_parser.py +112 -0
- package/pyproject.toml +81 -0
- package/rules/contextual/write-verify.md +2 -2
- package/rules/core/00-truth.md +1 -1
- package/rules/core/01-surgical.md +1 -1
- package/rules/core/02-circuit-breaker.md +2 -2
- package/rules/core/03-ensemble.md +3 -3
- package/rules/core/04-testing.md +3 -3
- 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/adoption.py +212 -0
- package/runtime/business_workflow.py +220 -0
- package/runtime/cli_provider.py +85 -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/mcp_config_writers.py +115 -0
- package/runtime/mcp_lifecycle.py +153 -0
- package/runtime/mcp_memory_server.py +135 -0
- package/runtime/memory_parsers/__init__.py +0 -0
- package/runtime/memory_parsers/chatgpt_parser.py +257 -0
- package/runtime/memory_parsers/claude_import.py +107 -0
- package/runtime/memory_parsers/export.py +97 -0
- package/runtime/memory_parsers/gemini_import.py +91 -0
- package/runtime/memory_parsers/kimi_import.py +91 -0
- package/runtime/memory_store.py +215 -0
- package/runtime/omc_compat.py +7 -0
- package/runtime/providers/__init__.py +0 -0
- package/runtime/providers/codex_provider.py +112 -0
- package/runtime/providers/gemini_provider.py +128 -0
- package/runtime/providers/kimi_provider.py +151 -0
- package/runtime/providers/opencode_provider.py +144 -0
- package/runtime/subagent_dispatcher.py +362 -0
- package/runtime/team_router.py +1167 -0
- package/runtime/tmux_session_manager.py +169 -0
- package/scripts/check-omg-compat-contract-snapshot.py +137 -0
- package/scripts/check-omg-contract-snapshot.py +12 -0
- package/scripts/check-omg-public-ready.py +193 -0
- package/scripts/check-omg-standalone-clean.py +103 -0
- package/scripts/legacy_to_omg_migrate.py +29 -0
- package/scripts/migrate-legacy.py +464 -0
- package/scripts/omc_to_omg_migrate.py +12 -0
- package/scripts/omg.py +492 -0
- package/scripts/settings-merge.py +283 -0
- package/scripts/verify-standalone.sh +8 -4
- package/settings.json +126 -29
- package/templates/profile.yaml +1 -1
- 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 +347 -0
- package/tools/commit_splitter.py +746 -0
- package/tools/config_discovery.py +151 -0
- package/tools/config_merger.py +449 -0
- package/tools/dashboard_generator.py +300 -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/pr_generator.py +404 -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
- package/yaml.py +321 -0
- package/.claude-plugin/scripts/install.sh +0 -9
- package/bun.lock +0 -23
- package/bunfig.toml +0 -3
- package/hooks/_budget.ts +0 -1
- package/hooks/_common.ts +0 -63
- package/hooks/circuit-breaker.ts +0 -101
- package/hooks/config-guard.ts +0 -4
- package/hooks/firewall.ts +0 -20
- package/hooks/policy_engine.ts +0 -156
- package/hooks/post-tool-failure.ts +0 -22
- package/hooks/post-write.ts +0 -4
- package/hooks/pre-tool-inject.ts +0 -4
- package/hooks/prompt-enhancer.ts +0 -46
- package/hooks/quality-runner.ts +0 -24
- package/hooks/secret-guard.ts +0 -4
- package/hooks/session-end-capture.ts +0 -19
- package/hooks/session-start.ts +0 -19
- package/hooks/shadow_manager.ts +0 -81
- package/hooks/stop-gate.ts +0 -22
- package/hooks/stop_dispatcher.ts +0 -147
- package/hooks/test-generator-hook.ts +0 -4
- package/hooks/tool-ledger.ts +0 -27
- package/hooks/trust_review.ts +0 -175
- package/lab/pipeline.ts +0 -75
- package/lab/policies.ts +0 -68
- package/runtime/common.ts +0 -111
- package/runtime/compat.ts +0 -174
- package/runtime/dispatcher.ts +0 -25
- package/runtime/ecosystem.ts +0 -186
- package/runtime/provider_bootstrap.ts +0 -99
- package/runtime/provider_smoke.ts +0 -34
- package/runtime/release_readiness.ts +0 -186
- package/runtime/team_router.ts +0 -144
- package/scripts/check-omg-compat-contract-snapshot.ts +0 -20
- package/scripts/check-omg-standalone-clean.ts +0 -12
- package/scripts/check-runtime-clean.ts +0 -94
- package/scripts/omg.ts +0 -352
- package/scripts/settings-merge.ts +0 -93
- package/tools/commit_splitter.ts +0 -23
- package/tools/git_inspector.ts +0 -18
- package/tools/session_snapshot.ts +0 -47
- package/trac3er-oh-my-god-2.0.0.tgz +0 -0
- package/tsconfig.json +0 -15
|
@@ -1,33 +1,183 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
3
|
-
allowed-tools: Read, Write, Edit,
|
|
4
|
-
argument-hint: "
|
|
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
5
|
---
|
|
6
6
|
|
|
7
|
-
# /OMG:create-agent
|
|
7
|
+
# /OMG:create-agent — Custom Agent Creation Wizard
|
|
8
8
|
|
|
9
|
-
Create a
|
|
9
|
+
Create a custom agent for your project or user-level configuration.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
- scope boundaries
|
|
13
|
-
- inputs and outputs
|
|
14
|
-
- success criteria
|
|
15
|
-
- any required `.omg/` artifacts
|
|
11
|
+
## Prerequisites
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
Enable the custom agents feature:
|
|
18
14
|
|
|
19
|
-
```
|
|
20
|
-
|
|
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
|
|
21
62
|
|
|
22
63
|
## Role
|
|
23
|
-
- One sentence describing what the agent owns.
|
|
24
64
|
|
|
25
|
-
|
|
26
|
-
|
|
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.
|
|
27
172
|
|
|
28
|
-
|
|
29
|
-
-
|
|
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
|
|
30
177
|
|
|
31
|
-
|
|
32
|
-
|
|
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
|
|
33
183
|
```
|
package/commands/OMG:deps.md
CHANGED
|
@@ -1,30 +1,248 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Scan project dependencies for CVEs, license issues, and outdated packages."
|
|
3
|
-
allowed-tools: Read, Bash(
|
|
3
|
+
allowed-tools: Read, Bash(python*:*), Grep
|
|
4
4
|
argument-hint: "[cves|licenses|outdated]"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# /OMG:deps
|
|
7
|
+
# /OMG:deps — Dependency Health
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Scan project dependencies for CVEs, license compatibility issues, and outdated packages.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Usage
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
```
|
|
14
|
+
/OMG:deps
|
|
15
|
+
/OMG:deps cves
|
|
16
|
+
/OMG:deps licenses
|
|
17
|
+
/OMG:deps outdated
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Sub-Commands
|
|
21
|
+
|
|
22
|
+
### `/OMG:deps` (default)
|
|
23
|
+
|
|
24
|
+
Full dependency health report combining CVE scan, license check, and outdated package detection.
|
|
25
|
+
|
|
26
|
+
Detects manifest files (package.json, requirements.txt, Cargo.toml, go.mod, Gemfile, pyproject.toml), then runs all three checks and prints a unified summary.
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
from plugins.dephealth.manifest_detector import detect_manifests
|
|
30
|
+
from plugins.dephealth.cve_scanner import scan_for_cves
|
|
31
|
+
from plugins.dephealth.license_checker import check_license_compatibility
|
|
32
|
+
from plugins.dephealth.vuln_analyzer import analyze_reachability
|
|
33
|
+
|
|
34
|
+
deps = detect_manifests(".")
|
|
35
|
+
dep_dicts = [{"name": p.name, "version": p.version, "ecosystem": p.ecosystem} for p in deps.packages]
|
|
36
|
+
|
|
37
|
+
# CVE scan
|
|
38
|
+
cve_result = scan_for_cves(dep_dicts, ".")
|
|
39
|
+
reachability = analyze_reachability(cve_result, ".")
|
|
40
|
+
|
|
41
|
+
# License check
|
|
42
|
+
license_result = check_license_compatibility(dep_dicts, ".")
|
|
43
|
+
|
|
44
|
+
# Summary
|
|
45
|
+
print(f"Manifests: {len(deps.manifests)} detected")
|
|
46
|
+
print(f"Packages: {len(deps.packages)} total")
|
|
47
|
+
print(f"CVEs found: {cve_result.get('total_vulns', 0)}")
|
|
48
|
+
print(f" Critical: {cve_result.get('by_severity', {}).get('CRITICAL', 0)}")
|
|
49
|
+
print(f" High: {cve_result.get('by_severity', {}).get('HIGH', 0)}")
|
|
50
|
+
print(f"Reachable: {sum(1 for v in reachability.get('results', []) if v.get('reachability') == 'direct')}")
|
|
51
|
+
print(f"License issues: {license_result.get('issue_count', 0)}")
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### `/OMG:deps cves`
|
|
55
|
+
|
|
56
|
+
CVE scan results only. Queries the OSV batch API for known vulnerabilities in project dependencies.
|
|
57
|
+
|
|
58
|
+
Results include severity classification (CRITICAL/HIGH/MODERATE/LOW) and reachability analysis showing whether vulnerable code paths are actually imported.
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
from plugins.dephealth.manifest_detector import detect_manifests
|
|
62
|
+
from plugins.dephealth.cve_scanner import scan_for_cves
|
|
63
|
+
from plugins.dephealth.vuln_analyzer import analyze_reachability
|
|
64
|
+
|
|
65
|
+
deps = detect_manifests(".")
|
|
66
|
+
dep_dicts = [{"name": p.name, "version": p.version, "ecosystem": p.ecosystem} for p in deps.packages]
|
|
67
|
+
|
|
68
|
+
cve_result = scan_for_cves(dep_dicts, ".")
|
|
69
|
+
reachability = analyze_reachability(cve_result, ".")
|
|
70
|
+
|
|
71
|
+
print(f"Packages scanned: {len(dep_dicts)}")
|
|
72
|
+
print(f"Vulnerabilities: {cve_result.get('total_vulns', 0)}")
|
|
73
|
+
print()
|
|
74
|
+
|
|
75
|
+
for vuln in cve_result.get("vulnerabilities", []):
|
|
76
|
+
reach = next((r for r in reachability.get("results", []) if r.get("cve_id") == vuln.get("id")), {})
|
|
77
|
+
reach_label = reach.get("reachability", "unknown")
|
|
78
|
+
risk = reach.get("risk", "unknown")
|
|
79
|
+
print(f" [{vuln.get('severity', 'UNKNOWN')}] {vuln.get('id')}")
|
|
80
|
+
print(f" Package: {vuln.get('package')}")
|
|
81
|
+
print(f" Fixed in: {vuln.get('fixed_version', 'N/A')}")
|
|
82
|
+
print(f" Reachability: {reach_label}")
|
|
83
|
+
print(f" Risk: {risk}")
|
|
84
|
+
if reach.get("recommendation"):
|
|
85
|
+
print(f" Action: {reach['recommendation']}")
|
|
86
|
+
print()
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### `/OMG:deps licenses`
|
|
90
|
+
|
|
91
|
+
License compatibility report only. Checks each dependency's license against a tiered compatibility model.
|
|
92
|
+
|
|
93
|
+
Tiers: permissive (MIT, Apache-2.0, BSD) > weak-copyleft (LGPL, MPL) > copyleft (GPL, AGPL). Flags packages with copyleft or unknown licenses.
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
from plugins.dephealth.manifest_detector import detect_manifests
|
|
97
|
+
from plugins.dephealth.license_checker import check_license_compatibility
|
|
98
|
+
|
|
99
|
+
deps = detect_manifests(".")
|
|
100
|
+
dep_dicts = [{"name": p.name, "version": p.version, "ecosystem": p.ecosystem} for p in deps.packages]
|
|
101
|
+
|
|
102
|
+
result = check_license_compatibility(dep_dicts, ".")
|
|
103
|
+
|
|
104
|
+
print(f"Packages checked: {len(dep_dicts)}")
|
|
105
|
+
print(f"License issues: {result.get('issue_count', 0)}")
|
|
106
|
+
print()
|
|
107
|
+
|
|
108
|
+
for pkg in result.get("packages", []):
|
|
109
|
+
tier = pkg.get("tier", "unknown")
|
|
110
|
+
marker = "!!" if tier in ("copyleft", "unknown") else " "
|
|
111
|
+
print(f" {marker} {pkg.get('name')}: {pkg.get('license', 'UNKNOWN')} ({tier})")
|
|
112
|
+
|
|
113
|
+
if result.get("issues"):
|
|
114
|
+
print()
|
|
115
|
+
print("Issues:")
|
|
116
|
+
for issue in result["issues"]:
|
|
117
|
+
print(f" - {issue}")
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### `/OMG:deps outdated`
|
|
16
121
|
|
|
17
|
-
|
|
122
|
+
List packages with newer versions available. Compares locked versions against latest published versions.
|
|
18
123
|
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
124
|
+
```python
|
|
125
|
+
from plugins.dephealth.manifest_detector import detect_manifests
|
|
126
|
+
|
|
127
|
+
deps = detect_manifests(".")
|
|
128
|
+
|
|
129
|
+
print(f"Manifests: {len(deps.manifests)}")
|
|
130
|
+
print(f"Packages: {len(deps.packages)}")
|
|
131
|
+
print()
|
|
132
|
+
|
|
133
|
+
print(f"{'Package':<40} {'Current':>12} {'Ecosystem':<12}")
|
|
134
|
+
print("-" * 66)
|
|
135
|
+
for pkg in deps.packages:
|
|
136
|
+
version = pkg.version or "unpinned"
|
|
137
|
+
print(f" {pkg.name:<38} {version:>12} {pkg.ecosystem:<12}")
|
|
138
|
+
|
|
139
|
+
print()
|
|
140
|
+
print("Note: Outdated detection requires network access to registry APIs.")
|
|
141
|
+
print("Packages listed above are from detected manifests.")
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Feature Flag
|
|
145
|
+
|
|
146
|
+
- **Flag name**: `OMG_DEP_HEALTH_ENABLED`
|
|
147
|
+
- **Default**: `False` (disabled)
|
|
148
|
+
- **Enable**: `export OMG_DEP_HEALTH_ENABLED=1`
|
|
149
|
+
|
|
150
|
+
Or set in `settings.json`:
|
|
151
|
+
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"_omg": {
|
|
155
|
+
"features": {
|
|
156
|
+
"DEP_HEALTH": true
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Output Example
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
============================================================
|
|
166
|
+
OMG Dependency Health Report
|
|
167
|
+
============================================================
|
|
168
|
+
|
|
169
|
+
Manifests: 3 detected
|
|
170
|
+
- package.json (npm)
|
|
171
|
+
- requirements.txt (pip)
|
|
172
|
+
- pyproject.toml (pip)
|
|
173
|
+
|
|
174
|
+
Packages: 87 total
|
|
175
|
+
|
|
176
|
+
CVEs found: 4
|
|
177
|
+
Critical: 1
|
|
178
|
+
High: 2
|
|
179
|
+
Moderate: 1
|
|
180
|
+
Low: 0
|
|
181
|
+
|
|
182
|
+
Reachable: 2 of 4 (direct import detected)
|
|
183
|
+
|
|
184
|
+
License issues: 1
|
|
185
|
+
!! node-ipc: UNKNOWN (unknown)
|
|
186
|
+
|
|
187
|
+
============================================================
|
|
188
|
+
|
|
189
|
+
[CRITICAL] GHSA-xxxx-yyyy-zzzz
|
|
190
|
+
Package: lodash@4.17.20
|
|
191
|
+
Fixed in: 4.17.21
|
|
192
|
+
Reachability: direct
|
|
193
|
+
Risk: high
|
|
194
|
+
Action: Upgrade lodash to >=4.17.21
|
|
195
|
+
|
|
196
|
+
[HIGH] GHSA-aaaa-bbbb-cccc
|
|
197
|
+
Package: requests@2.25.0
|
|
198
|
+
Fixed in: 2.31.0
|
|
199
|
+
Reachability: transitive
|
|
200
|
+
Risk: medium
|
|
201
|
+
Action: Upgrade requests to >=2.31.0
|
|
202
|
+
|
|
203
|
+
============================================================
|
|
23
204
|
```
|
|
24
205
|
|
|
25
|
-
|
|
206
|
+
## Supported Manifests
|
|
207
|
+
|
|
208
|
+
| Manifest | Ecosystem | Parser |
|
|
209
|
+
|----------|-----------|--------|
|
|
210
|
+
| `package.json` | npm | JSON dependencies + devDependencies |
|
|
211
|
+
| `requirements.txt` | pip | PEP 508 lines |
|
|
212
|
+
| `pyproject.toml` | pip | `[project.dependencies]` + `[tool.poetry.dependencies]` |
|
|
213
|
+
| `Cargo.toml` | crates.io | `[dependencies]` + `[dev-dependencies]` |
|
|
214
|
+
| `go.mod` | Go | `require` directives |
|
|
215
|
+
| `Gemfile` | RubyGems | `gem` declarations |
|
|
216
|
+
|
|
217
|
+
## Safety
|
|
26
218
|
|
|
27
|
-
- manifest files
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
219
|
+
- **Read-only**: All sub-commands only read manifest files and query external APIs
|
|
220
|
+
- **Feature-gated**: Requires `DEP_HEALTH` flag enabled
|
|
221
|
+
- **No mutations**: Never modifies dependency files, lock files, or project code
|
|
222
|
+
- **Crash-isolated**: All operations exit 0 on failure (graceful error handling)
|
|
223
|
+
- **Cache**: CVE scan results cached to `.omg/state/dephealth/cve-cache.json` (1-hour TTL)
|
|
224
|
+
- **Network**: `/deps cves` requires internet access for OSV API queries
|
|
225
|
+
|
|
226
|
+
## API
|
|
227
|
+
|
|
228
|
+
```python
|
|
229
|
+
from plugins.dephealth.manifest_detector import detect_manifests, DependencyList
|
|
230
|
+
from plugins.dephealth.cve_scanner import scan_for_cves
|
|
231
|
+
from plugins.dephealth.license_checker import check_license_compatibility
|
|
232
|
+
from plugins.dephealth.vuln_analyzer import analyze_reachability
|
|
233
|
+
|
|
234
|
+
# Detect all manifest files and parse dependencies
|
|
235
|
+
deps: DependencyList = detect_manifests(".")
|
|
236
|
+
|
|
237
|
+
# Convert to dicts for scanner/checker APIs
|
|
238
|
+
dep_dicts = [{"name": p.name, "version": p.version, "ecosystem": p.ecosystem} for p in deps.packages]
|
|
239
|
+
|
|
240
|
+
# CVE scan via OSV batch API
|
|
241
|
+
cve_result = scan_for_cves(dep_dicts, ".")
|
|
242
|
+
|
|
243
|
+
# Reachability analysis (import tracing)
|
|
244
|
+
reachability = analyze_reachability(cve_result, ".")
|
|
245
|
+
|
|
246
|
+
# License compatibility check
|
|
247
|
+
license_result = check_license_compatibility(dep_dicts, ".")
|
|
248
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Alias for /OMG:init [domain-name]. 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(
|
|
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
4
|
argument-hint: "[domain name, e.g. 'payment' or 'user-profile']"
|
|
5
5
|
---
|
|
6
6
|
|
package/commands/OMG:escalate.md
CHANGED
|
@@ -1,23 +1,52 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
allowed-tools: Read, Grep, Glob, Bash(git:*), Bash(rg:*), Bash(find:*), Bash(cat:*), Bash(
|
|
4
|
-
argument-hint: "[codex|gemini|ccg|auto] '
|
|
2
|
+
description: Auto-route to Codex or Gemini using OMG standalone internal router.
|
|
3
|
+
allowed-tools: Read, Grep, Glob, Bash(git:*), Bash(rg:*), Bash(find:*), Bash(cat:*), Bash(python3:*)
|
|
4
|
+
argument-hint: "[codex|gemini|ccg|auto] 'task description' or just 'problem'"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# /OMG:escalate
|
|
7
|
+
# /OMG:escalate — Standalone Smart Escalation
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Auto-Routing
|
|
10
|
+
If no model specified:
|
|
11
|
+
- backend/security/debug/performance → `codex`
|
|
12
|
+
- ui/ux/layout/responsive → `gemini`
|
|
13
|
+
- full-stack/architecture/review-all → `ccg`
|
|
14
|
+
|
|
15
|
+
## Context package
|
|
16
|
+
Build from OMG canonical state:
|
|
17
|
+
- `.omg/state/profile.yaml`
|
|
18
|
+
- `.omg/state/ledger/failure-tracker.json`
|
|
19
|
+
- relevant files (`git diff --name-only`)
|
|
20
|
+
|
|
21
|
+
## Runtime entrypoint
|
|
22
|
+
Use the portable runtime installed by `OMG-setup.sh` (`~/.claude/omg-runtime/scripts/omg.py`).
|
|
10
23
|
|
|
11
24
|
```bash
|
|
12
|
-
OMG_CLI="${OMG_CLI_PATH:-$HOME/.claude/omg-runtime/scripts/omg.
|
|
13
|
-
if [ ! -f "$OMG_CLI" ] && [ -f "scripts/omg.
|
|
25
|
+
OMG_CLI="${OMG_CLI_PATH:-$HOME/.claude/omg-runtime/scripts/omg.py}"
|
|
26
|
+
if [ ! -f "$OMG_CLI" ] && [ -f "scripts/omg.py" ]; then OMG_CLI="scripts/omg.py"; fi
|
|
14
27
|
```
|
|
15
28
|
|
|
16
|
-
|
|
29
|
+
## Execute
|
|
30
|
+
```bash
|
|
31
|
+
python3 "$OMG_CLI" teams --target auto --problem "[problem]"
|
|
32
|
+
```
|
|
17
33
|
|
|
34
|
+
Explicit target:
|
|
18
35
|
```bash
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
bun "$OMG_CLI" ccg --problem "[problem]"
|
|
36
|
+
python3 "$OMG_CLI" teams --target codex --problem "[problem]"
|
|
37
|
+
python3 "$OMG_CLI" teams --target gemini --problem "[problem]"
|
|
38
|
+
python3 "$OMG_CLI" ccg --problem "[problem]"
|
|
23
39
|
```
|
|
40
|
+
|
|
41
|
+
## Output
|
|
42
|
+
Returns `TeamDispatchResult` with:
|
|
43
|
+
- findings
|
|
44
|
+
- action plan
|
|
45
|
+
- evidence metadata
|
|
46
|
+
|
|
47
|
+
Evidence now includes provider health details (`cli_health`) with:
|
|
48
|
+
- binary availability
|
|
49
|
+
- auth readiness (`auth status` probe)
|
|
50
|
+
- `live_connection` boolean per provider
|
|
51
|
+
|
|
52
|
+
No external legacy plugin is required.
|
|
@@ -1,21 +1,45 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
3
|
-
allowed-tools: Bash(ls:*), Bash(cat:*), Bash(find:*), Bash(grep:*), Bash(git:*), Bash(which:*), Bash(head:*), Bash(wc:*), Bash(stat:*), Bash(
|
|
4
|
-
argument-hint: "[quick|full]"
|
|
2
|
+
description: Verify project setup, context health, and tool integration
|
|
3
|
+
allowed-tools: Bash(ls:*), Bash(cat:*), Bash(find:*), Bash(grep:*), Bash(git:*), Bash(which:*), Bash(head:*), Bash(wc:*), Bash(stat:*), Bash(npm run:*), Bash(npx:*), Bash(pnpm run:*), Bash(yarn run:*), Bash(pytest:*), Bash(python3:*), Read, Grep, Glob
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# /OMG:health-check
|
|
8
7
|
|
|
9
|
-
Run
|
|
8
|
+
Run all checks silently, report only issues:
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
1. **Profile**: .omg/state/profile.yaml exists and has required fields (name, language, framework)?
|
|
11
|
+
- FAIL if missing. WARN if key fields empty.
|
|
12
|
+
|
|
13
|
+
2. **Knowledge**: .omg/knowledge/ has content? Any decision files older than 30 days?
|
|
14
|
+
- WARN if empty. WARN if stale files (suggest review).
|
|
15
|
+
|
|
16
|
+
3. **Quality Gate**: .omg/state/quality-gate.json exists and configured commands are runnable?
|
|
17
|
+
- Check each command with `which` or `--version` where possible.
|
|
18
|
+
- If execution is restricted, report WARN (not FAIL) with "cannot verify — restricted permissions".
|
|
19
|
+
- If command found but fails: report FAIL with exit code.
|
|
20
|
+
|
|
21
|
+
4. **Secrets**: No .env committed to git? No API keys in tracked files?
|
|
22
|
+
- `git ls-files | grep -i '\.env'` (exclude .env.example/.sample/.template).
|
|
23
|
+
- FAIL if real .env files tracked.
|
|
24
|
+
|
|
25
|
+
5. **Tools**: Hooks installed? OMG team aliases available? MCP servers listed?
|
|
26
|
+
- Check ~/.claude/hooks/.omg-version exists.
|
|
27
|
+
- Check if `~/.claude/commands/OMG:teams.md` and `OMG:ccg.md` exist (WARN if missing, not FAIL).
|
|
28
|
+
- List MCP servers from .mcp.json (informational).
|
|
16
29
|
|
|
17
|
-
|
|
30
|
+
6. **Failures**: Stale failure patterns in failure-tracker.json?
|
|
31
|
+
- WARN if any pattern older than 24h. Suggest `/OMG:handoff` or manual reset.
|
|
18
32
|
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
33
|
+
7. **Context Size**: Estimate total injection from session-start + prompt-enhancer.
|
|
34
|
+
- Sum: profile.yaml lines + working-memory.md lines + handoff.md lines.
|
|
35
|
+
- WARN if >80 lines total.
|
|
36
|
+
|
|
37
|
+
**Report format:**
|
|
38
|
+
```
|
|
39
|
+
PASS [N] | WARN [N] | FAIL [N]
|
|
40
|
+
|
|
41
|
+
FAIL profile: .omg/state/profile.yaml not found → run /OMG:init
|
|
42
|
+
WARN quality: prettier not found → install or remove from quality-gate.json
|
|
43
|
+
PASS secrets: no .env files tracked
|
|
44
|
+
...
|
|
45
|
+
```
|