---
name: graphify
description: Query the global Graphify knowledge graph across all RateRight codebases. Read-only triage helper for hermes-coo. Confirmed code-graph value 2026-05-26 (proved hunt→marketplace dead link for $0.011).
agent: hermes-coo
triggers:
  - "/graphify"
  - "graph query"
  - "trace path"
  - "explain node"
  - "what connects"
delivery: inline (no separate notification)
graph_paths:
  global: ~/.graphify/global-graph.json
  per_repo: graphify-test-out/<repo>/graph.json
---

# graphify skill

## Purpose

Quick semantic / structural queries across RateRight codebases without grepping raw files. Confirmed working on 2026-05-26 — proved hunt-pipeline → marketplace-signup has no connecting code edge (the existential RR bug).

## Indexed repos (as of 2026-05-26)

| Repo | Path | Graph file |
|---|---|---|
| rateright-v2 (marketplace) | `C:\Users\mclou\rateright-v2\` | `graphify-test-out/rateright-v2/graph.json` |
| growth-engine src | `C:\Users\mclou\rateright-growth-deploy\src\` | `graphify-test-out/growth-engine-src/graph.json` |
| growth-engine admin | `C:\Users\mclou\rateright-growth-deploy\admin\` | `graphify-test-out/growth-engine-admin/graph.json` |
| hunt scripts | `C:\Users\mclou\rateright-growth-deploy\scripts\hunt\` | `graphify-test-out/hunt/graph.json` |
| campaign scripts | `C:\Users\mclou\rateright-growth-deploy\scripts\campaign\` | `graphify-test-out/campaign/graph.json` |
| (global merged) | all above | `~/.graphify/global-graph.json` |

Update each via `graphify update --path <path>` after meaningful code changes. Daily auto-update recommended via cron — see § Cron below.

## Whitelist commands (do without asking, free, fast)

```
graphify query --graph ~/.graphify/global-graph.json "<question>"
graphify path --graph ~/.graphify/global-graph.json <NodeA> <NodeB>
graphify explain --graph ~/.graphify/global-graph.json <NodeName>
graphify tree --graph ~/.graphify/global-graph.json --output <out.html>
```

These are pure traversal of the local graph file. Zero API cost.

## Greylist commands (confirm with Rocky first, costs API tokens)

```
graphify extract --path <repo>             # full rebuild of one repo
graphify update --path <repo>              # delta rebuild (cheaper)
graphify obsidian <vault-path> <prompt>    # generate Obsidian-formatted export from vault
```

Code-only extract is FREE (tree-sitter local). Vault extract costs LLM tokens. Always check cost.json before reporting completion.

## Blacklist

- Never run `graphify extract` on `HQ-Vault/` without explicit Rocky approval (vault-extract cost not justified per 2026-05-26 trial — "vault is documents not networks")
- Never run on LFCS job folders (per LFCS lane discipline + source-of-truth rule)

## How hermes-coo uses this

### Inbox triage

When an Inbox.md REQ contains a question about code structure ("how does X connect to Y", "what calls Z", "where does authentication happen"):

1. Try `graphify query` first (free, fast)
2. If answer cites concrete nodes/edges → respond inline, log to dispatch-log
3. If query returns sparse/empty → fall back to file grep, but flag the gap (potential dead-link signal)

### Pulse augmentation

When drafting EOD/weekly pulses, run a tracer query against current goal blockers:

```
graphify path --global "scrape" → "signup"
graphify path --global "stripe" → "checkout"
graphify path --global "hunt" → "marketplace"
```

If any path returns "no path found" on a goal-critical link, surface to Outbox.md under `## Surfaced findings`.

## Cron — recommended

```
hermes --profile coo cron create "0 3 * * *" \
  --no-agent \
  --script "graphify update --path C:\Users\mclou\rateright-growth-deploy && graphify update --path C:\Users\mclou\rateright-v2" \
  --name "graphify-nightly-update" \
  --deliver local
```

Nightly delta-update keeps the graph current with any commits in the last 24h. Free (code-only). Logs to `~/.hermes-coo/cron/output/`.

## Failure modes

- **Graph file missing** → fall back to file grep, surface to Outbox.md "graphify graph not found — run `graphify extract --path <repo>`"
- **"No path found" between real-looking nodes** → DO NOT silently assume; flag for review. This is signal, not noise. (2026-05-26 hunt-marketplace was real.)
- **INFERRED edges at <0.6 confidence** → quote the confidence score when explaining; do not present as fact
- **Stale graph (>14d since update)** → run `graphify update` first, then re-query

## Cost track

Logged to `graphify-out/<repo>/cost.json` after every extract/update. Hermes-COO reads this and refuses to re-extract if cumulative cost in current month exceeds `state.json.monthly_cap_usd`.

## Output to vault

For significant findings (e.g. dead links proven in code):
1. Append one-line to `_System/COO/Outbox.md` under `## Surfaced findings`
2. Append one-line to relevant `_Brain/_Log.md`
3. Reference the graph file path so a human can re-verify

## Sources

- Graphify repo: https://github.com/safishamsi/graphify
- Trial verdict: `_System/COO/findings-2026-05-26.md` § "Hermes power-use research"
- Dead-link discovery: `10_RateRight/_Brain/_Log.md` entry 2026-05-26 08:30
