rlaope/oh-my-hermes / skills/omh-routing
omh-routing
Verified[omh] Choosing among OMH skills for a request: router guidance for using oh-my-hermes workflow skills inside Hermes Agent.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.4 KB |
| references/catalog-index.md | markdown | 32.9 KB |
| references/coding-handoff-progress-reporting.md | markdown | 4.8 KB |
| references/evidence-boundaries.md | markdown | 2.6 KB |
| references/harness-registry.md | markdown | 21.4 KB |
| references/human-voice.md | markdown | 7.1 KB |
| references/jev-rail.md | markdown | 6.3 KB |
| references/operator-maintenance.md | markdown | 2.1 KB |
| references/skill-common-rail.md | markdown | 15.5 KB |
| references/structural-code-search.md | markdown | 3.8 KB |
| references/workflow-artifacts.md | markdown | 2.6 KB |
| references/workflow-registry.md | markdown | 33.4 KB |
| references/wrapper-routing.md | markdown | 11.3 KB |
references/structural-code-search.md
View on GitHub# OMH Structural Code Search
Optional playbook for the `ast-grep` structural search tool. The fallback comes
first: if `ast-grep` is not on PATH, use grep/ripgrep exactly as today — every
rule below assumes the binary is already present, and none of them is a reason
to install anything. OMH detects presence only (`omh doctor` / `omh probe`); it
never executes ast-grep, and a prepared command from this playbook is not
execution evidence until an observed result records it.
Figures were measured against ast-grep 0.45.1 on the oh-my-hermes repository's
`src/` tree; reproduce each with the command printed beside it.
## When To Reach For It
- The target is a syntactic shape — a call form, a signature, an assertion
arity — rather than a string. A structural call pattern answers "where is it
called"; grep answers "where is it mentioned".
- The repository is not Python. `omh codegraph` is stdlib-`ast` and
Python-only by construction; ast-grep 0.45.1 lists 28 languages
(`ast-grep run -h | grep -A2 'Supported languages'`) — roughly 23
programming languages plus 5 markup/data formats (Css, Html, Json, Markdown,
Yaml). For TypeScript, Go, or Rust work this is structural search existing
at all, not an optimization.
## Never Body-Capture In A Search
A `$$$BODY` metavariable makes search output catastrophically larger, not
smaller. Measured: `def $NAME($$$A) -> dict[str, object]: $$$BODY` over `src/`
returned 870 matches totalling 1,436,267 bytes of match text, where the
equivalent grep question cost 141 lines / 14,039 bytes. ast-grep is not
automatically cheaper; capture the smallest node that answers the question.
## Locate First, Read Second
Start with paths only:
```sh
ast-grep run -l python -p '<pattern>' --files-with-matches src/
```
The saving is in avoided follow-up reads, not in the search output itself
(measured: grep sent one call-site query to 11 files, the structural pattern
to 10; the file lists differed by only ~30 bytes). Open only the files that
matter.
## Ignore-File Semantics
ast-grep honors `.gitignore` by default; `grep -rn` does not. Measured in an
isolated probe repo: with `build/` gitignored, the default scan returned only
`real.py` while `--no-ignore vcs` also returned `build/stale.py`. Grepping a
repo with a gitignored stale build tree produces hits the default ast-grep
scan never produces — and each stale hit is a wasted follow-up read.
## Precision, Qualified
Measured on `src/`: `grep -rn 'shutil\.which'` found 16 hits;
`ast-grep run -l python -p 'shutil.which($$$A)' src/` found 12. The four
differences are not all noise: three were comments/docstrings, one was a
genuine function-object reference rather than a call. Both "where is it
called" and "where is it mentioned" are legitimate questions; pick the pattern
that matches yours, and do not treat the delta as pure false-positive
elimination.
## Pattern And Flag Footguns
- Prefer `$$$REST` over fixed arity: `self.assertEqual(len($A), $B)` silently
misses the three-argument message form.
- `-r` collides across subcommands on 0.45.1: it means `--rewrite <FIX>` under
`ast-grep run` but `--rule <RULE_FILE>` under `ast-grep scan`. Spell the
long flags.
- Only `-U`/`--update-all` writes; `--rewrite` without it prints a read-only
diff preview.
- Always spell `ast-grep`, never `sg`: some installs alias `sg` to ast-grep,
but on many Linux distributions `sg` is util-linux's switch-group command. The
collision is conditional, so the long name is the only safe spelling.
## Version Scope
Measured against ast-grep 0.45.1. Pattern syntax (`$VAR`, `$$$MULTI`) is
stable; the CLI flag surface has moved across minor versions. If a documented
flag is missing, check `ast-grep --version` before assuming this guidance is
wrong. OMH pins no executor CLI version and never requires one.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |