- Doc discovery scans wrong directory — Reflex was using
cwd(the agent's current working directory) instead ofCLAUDE_PROJECT_DIR(the project root). When the agentcds into subdirectories, docs and skills at the project root were invisible. Now usesCLAUDE_PROJECT_DIRfirst, falling back tocwd.
- OpenClaw plugin (
hooks/openclaw/): Uses thebefore_agent_startplugin hook to inject context viaprependContext, which prepends to the user's prompt string. The agent sees the injection as part of the current message rather than buried in the system prompt. Discovers skills from both.openclaw/skills/and.claude/skills/for cross-tool compatibility. Reads conversation history directly fromevent.messages— no session file parsing needed.
- Binary discovery (
hooks/claude-code/reflex-hook.py): Subprocess hooks don't inherit the interactive shell's PATH, sogo installbinaries in~/go/bin/were invisible. Now checksREFLEX_BINenv var, thenshutil.which(), then common install paths (~/go/bin,~/.local/bin,/opt/homebrew/bin,/usr/local/bin). - Injection wording: Replaced
[Reflex]-prefixed tags with a direct imperative instruction. Docs get a bulleted list under "read these files now"; skills get a plain "use this skill" instruction. - CLI example in README: Updated registry format from old flat
[]RegistryItemarray to current grouped{docs, skills}object.
reflex routeCLI: Framework-agnostic context router. Reads JSON from stdin (messages, registry, session state), calls an OpenAI-compatible LLM, returns{"docs": [...], "skills": [...]}.- Provider-agnostic architecture: Any OpenAI-compatible API works via
~/.config/reflex/config.yaml. Default: Kimi K2.5 (kimi-k2.5-previewatapi.moonshot.ai). - Session state filtering: Items already read/used this session are excluded from routing decisions — no duplicate injections.
- Fast path: If registry is empty after filtering, returns immediately without an API call.
- Claude Code hook (
hooks/claude-code/reflex-hook.py):UserPromptSubmithook that auto-discovers skills from.claude/skills/*/SKILL.mdand docs from any*.mdfile withsummary+read_whenfrontmatter. No registry file to maintain. Callsreflex routeand injectsadditionalContextwith relevant docs and skills.