Skip to content

Unique-Divine/jiyuu / ai-skills/mori-graph

mori-graph

Verified

Code graph for cross-repo context. Use Mori, a local code graph and code memory served as MCP server mori-graph (Tree-sitter parsing, LSP-style call resolution), for structural and cross-repo questions; install it from Mori releases with mise, index repos, and link GraphQL clients to gqlgen resolvers across repos. Triggers on who calls this, what does X call, trace a call chain, impact analysis, which client uses this API field or resolver, unused or deprecated API fields, cross-repo links, dead code, graph query syntax, Cypher examples, index a repo, .cbmignore, reindex, cross-repo intelligence, installing or upgrading Mori, and working on the Mori source in jiyuu/mori.

FileKindSize
SKILL.mdskill md4.5 KB
references/graphql.mdmarkdown3.5 KB
references/setup.mdmarkdown3.8 KB
references/tool-source.mdmarkdown2.2 KB

references/tool-source.md

View on GitHub
# Working on Mori Itself

Mori's source is `mori/` in https://github.com/Unique-Divine/jiyuu. It is C
(about half a million lines of its own, plus tests and a TypeScript UI). The
Tree-sitter grammars under `internal/cbm/vendored/grammars/` are generated,
not committed: `just grammars` in `mori/` fetches a pinned archive, and
nobody edits them. `mori/README.md` covers the build, tests, and releases.

## Understand It With Itself

Index the checkout as its own project, excluding the grammars:

```sh
cd ~/jiyuu/mori   # your Jiyuu checkout
echo "/internal/cbm/vendored/" >> .cbmignore
echo /mori/.cbmignore >> "$(git rev-parse --git-path info/exclude)"
codebase-memory-mcp cli --quiet index_repository --repo_path "$PWD"
```

Then ask the graph: "who calls `find_route_handler`", "trace
`emit_graphql_edge`".

## Where GraphQL Support Lives

| File | Role |
| --- | --- |
| `src/discover/language.c` | File extensions per language (`.graphqls`) |
| `internal/cbm/extract_defs.c` | Schema types, fields, return types, `@deprecated` |
| `internal/cbm/extract_calls.c` | Operation text from call arguments and constants |
| `internal/cbm/service_patterns.c` | Client library names; operation parser and field paths |
| `src/pipeline/pass_route_nodes.c` | Server field Routes and gqlgen `HANDLES` |
| `src/pipeline/pass_parallel.c`, `pass_calls.c` | Client `GRAPHQL_CALLS` edges (large and small repos) |
| `src/pipeline/pass_cross_repo.c` | Cross-repo matching (`match_typed_routes`, `find_route_handler`) |
| `src/pipeline/pipeline_incremental.c` | When an edit forces a full rebuild |

## Build and Test

Run these in `mori/`:

```sh
just build     # build/c/codebase-memory-mcp, after fetching the grammars
just test      # the grammar and extraction suites
just test-all  # every suite, about 10,500 tests with sanitizers (over an hour)
scripts/lint.sh
```

- GraphQL client edges in tests need a fixture of more than 50 files to
  exercise the parallel path, and a smaller one for the sequential path.
- Test a dev binary against real repos with a separate cache, so the live
  index and daemon are untouched:
  `CBM_CACHE_DIR=/tmp/cbm-dev CBM_RUNTIME_DIR=/tmp/cbm-dev-rt build/c/codebase-memory-mcp cli ...`
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: 471kUpdated Claude CodeCodexVerifiedInstall
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: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
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 availableStars: 322kUpdated Claude CodeCodexVerifiedInstall