Repository navigation
Closed
Labels
enhancementNew feature or requestepic:code-intelligenceEpic: Code intelligence capabilities across toolspriority:highscope:code-intelCode intelligence — indexing, graph, impact analysis
Description
What problem does this solve?
cora install registers cora mcp in a few agents' MCP config files, installs one skill (cora-review, for reviews) in Claude Code, and documents a Claude Code commit guard. Nothing makes an agent use code intelligence (brain, explore, callers, impact) while it works, and for most agents registering the MCP server is not enough. Research of the current docs of the five agents (Claude Code, Hermes Agent, omp / oh-my-pi, pi, opencode) found:
- MCP tools are hidden by default in four of five agents. Claude Code defers them behind tool search (per-server
alwaysLoad: trueexempts a server), opencode's default Code Mode hides them (codemode: false), pi defaults toexposure: "codemode"("direct"declares them like built-ins), and omp bridges them as deferred tools (unverified). Hermes registers everything unless filtered. - Skills are the weakest lever everywhere: they depend on the model matching the description.
- The deterministic lever is a pre-prompt hook that runs before the model sees the prompt and injects context: Claude Code
UserPromptSubmit(command, stdout oradditionalContext), Hermespre_llm_callshell hook (stdout{"context": ...}, appended to the user message, needs a one-time user consent), pi and omp extensionbefore_agent_start(withpi.execto run a command), opencode plugin hooks (V2session.hook("prompt")or"context", V1chat.message/experimental.chat.system.transform). - MCP server
instructionsare added to the system prompt by omp (capped at 4,000 characters) and opencode (<mcp_instructions>), so one text incora mcphelps every client that reads it. - Hooks run before MCP servers are available (Claude Code
SessionStart), so the hook has to be a plain command, not an MCP call. - Details that bite: opencode docs describe V2 config (
mcp.servers,plugins) while installed copies may be V1; Hermes loads only the first of.hermes.md,AGENTS.md,CLAUDE.md, scans context files for injection phrases and needs hooks approved once (~/.hermes/shell-hooks-allowlist.json); omp user-level foreign skill dirs (~/.claude/skills) are opt-in while~/.agents/skillsis native for omp, pi and opencode; opencode'sexploresub-agent denies every tool but shell and read ones.
Proposed solution
cora hook context: reads the prompt (hook JSON on stdin, or--prompt), finds the project fromcwd, runsbrainin natural-language mode and prints a short block (a handful of symbols with file, line and signature, plus how to dig deeper:cora_brain_search,cora_find_callers,cora_find_impact). It never fails loudly (empty output on any problem), never downloads the model, is bounded in time and size, skips prompts that are not about code, and has formats for each agent (--agent claude|hermes|plain).cora hook sessionprints a one-paragraph reminder for session start.cora mcpserver instructions ininitialize, and sharper tool descriptions.- A
cora-codeskill (when to usebrain,explore,callers,impact,affectedbefore editing) installed in the skill directories the agents read. cora installfor the five agents, idempotent and reversible (--remove), writing: Claude Code (claude mcp add-jsonwithalwaysLoad,UserPromptSubmitandSessionStarthooks merged into~/.claude/settings.json, skill, a managed block in~/.claude/CLAUDE.md), Hermes (mcp_serversandhooks.pre_llm_callin~/.hermes/config.yamlwith a backup, skill, a note about the one-time hook approval), omp and pi (mcp.jsonwith direct exposure, abefore_agent_startextension), opencode (MCP entry for the detected config version withcodemode: false, a plugin with the V1 and V2 entry points,cora_*allowed for sub-agents), and the shared~/.agents/skills/cora-code.cora install --statusshows, per agent, what is installed and what a user still has to do (Hermes hook approval, Claude project MCP approval).- Docs with a table of what was verified against each agent's docs and what could not be.
Alternatives considered
Only a skill and MCP registration (the current state): depends on the model choosing to search. Only instruction-file rules: weaker than a hook and some agents load only one instruction file.
Before submitting
- Research notes with sources for all five agents are kept with the work; unverified facts are listed and tested at runtime where the agent can be installed without an LLM key.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestepic:code-intelligenceEpic: Code intelligence capabilities across toolspriority:highscope:code-intelCode intelligence — indexing, graph, impact analysis
Activity
fix(agents): quote the binary path in hook commands and hint at headl…
fix(agents): dropping a missing hook no longer inserts a null into se…
fix(agents): a file that cannot be read is an error, never an empty file
fix(agents): refuse a settings file whose hooks have the wrong shape …
feat(agents): prompt hooks, MCP instructions and native Claude Code i…
feat(agents): install cora into pi and omp
fix(agents): pi and omp never overwrite a file they cannot read or parse
feat(agents): install cora into Hermes Agent
fix(agents): Hermes never overwrites a config it cannot read
feat(agents): install cora into opencode
fix(agents): opencode never overwrites a file it cannot read or parse
feat(agents): install cora into pi and omp (#756)
feat(agents): install cora into Hermes Agent (#757)
feat(agents): install cora into opencode (#758)
docs: prepare the release documentation for the code model and agent …