G
Graphify
graphify.homes
OpenCode context

OpenCode codebase context with persistent project structure

OpenCode codebase context combines repository instructions, tools, model capabilities, and project files. Graphify adds a durable structural layer so OpenCode can query dependencies, calls, communities, and documentation links without rebuilding the repository map in every session.

Published Updated

Graphify outputs
graph.html
graph.json
GRAPH_REPORT.md

Graphify stores inspectable artifacts so codebase knowledge can be reviewed by humans and reused by AI coding assistants.

OpenCode-style terminal and plugin surfaces connected to a project knowledge graph

Rules

AGENTS.md

Use repository instructions for commands, conventions, and tool policy.

Map

Graphify

Use persistent graph artifacts for dependencies, calls, docs, and architecture.

Extension

Plugin or MCP

Connect graph workflows through the OpenCode installer or a supported MCP configuration.

What is OpenCode codebase context?

OpenCode codebase context is the repository information available to the agent through instructions, files, tool calls, and integrations. A persistent graph makes structural knowledge reusable instead of rediscovered with every prompt.

  • AGENTS.md explains working rules.
  • Source files show implementation.
  • Graph artifacts show relationships.

How does Graphify connect to OpenCode?

Graphify provides an OpenCode installer that writes project guidance and a plugin integration. The graph itself remains in graph.html, graph.json, and GRAPH_REPORT.md for inspection and reuse.

  • Run graphify opencode install.
  • Build the graph for the active repository.
  • Keep graph usage and freshness rules in AGENTS.md.

What context should stay in AGENTS.md?

Keep commands, conventions, protected paths, review requirements, and instructions for using tools. Do not duplicate a 3,000-word architecture inventory that changes with the code.

  • Reference graph.json as the structural source.
  • Require source verification for inferred edges.
  • Refresh after large refactors or generated-code changes.

When does OpenCode benefit most from a graph?

OpenCode benefits most when tasks span multiple modules, the repository is large, or the agent repeatedly searches for callers, dependencies, or design notes. Small single-file edits may not need the graph.

  • Onboarding and architecture questions.
  • Cross-module refactors and migration planning.
  • Dependency and blast-radius review.
  • Connecting code to documentation and rationale.

How should graph queries be verified?

Open the cited files and run related tests before accepting a structural claim. Graph edges can be extracted, inferred, or ambiguous; confidence must influence how much source evidence the review requires.

  • Verify exact symbols and file paths.
  • Check that graph.json matches the current commit.
  • Run tests selected from the affected paths.

Can OpenCode use Graphify through MCP?

Where the OpenCode configuration supports MCP, expose Graphify as an MCP server for structured search, paths, and explanations. The installer/plugin path and MCP path should share the same freshness and verification rules.

  • Use the OpenCode installer for the built-in integration.
  • Use MCP when explicit graph tools are preferred.
  • Document which interface owns each query type.
Working commands

How do the setup commands fit together?

Install the OpenCode integration

Shell
graphify opencode install
FAQ

Frequently asked questions

Does Graphify replace OpenCode's own tools?

No. Graphify adds project structure; OpenCode's file, shell, and editing tools remain necessary for implementation and verification.

Can OpenCode use a graph without MCP?

Yes. The installer/plugin and graph artifacts provide a skill-style workflow, while MCP is an optional structured interface.

Should the graph cover docs and code?

Use mixed inputs when design intent matters. Keep generated or sensitive files out of the corpus when appropriate.

How do teams prevent stale graph answers?

Refresh the graph after structural changes and require agents to verify important source paths before editing.

Key takeaways

What should you remember?

  • OpenCode uses AGENTS.md for rules and Graphify for project relationships.
  • The opencode installer connects the workflow; MCP is available where structured tools are preferred.
  • Verify graph paths against source and tests before acting.
Sources

Where can you verify the details?

Related Graphify guides

Continue through the Graphify topic cluster with pages that explain assistant context, architecture review, documentation, and graph-based codebase understanding.

Turn this concept into a real project graph

Start from the use cases page or upload a project ZIP to build a graph that your team can inspect and reuse.