Pre-flight
Problem statement
Currently, loading all the SKILL.md and policy files into the system prompt incurs a heavy upfront token tax. The agent receives hundreds of rules for Python ASTs, Git workflows, and formatting, even if the current task only involves writing a simple Markdown file.
Proposed solution
Implement Semantic Policy Injection in the proxy. The system prompt should remain lean. The proxy should detect the agent's intent based on the tool calls it issues, and inject rules "Just-In-Time".
If a git commit tool is called -> Inject safe-git-workflow rules.
If a Python file is opened -> Inject Python AST policies.
Examples or prior art
OpenWolf utilizes a cerebrum.md approach to dynamically feed project-specific conventions to the agent only exactly when relevant.
Alternatives considered
Standard RAG systems querying a documentation vector database, but this risks injecting poorly aligned or hallucinated policy fragments compared to exact, rule-based trigger injection.
Additional context
This requires the proxy to have a robust pattern-matching or intent-detection mechanism on incoming AGENT_API tool requests.
Pre-flight
Problem statement
Currently, loading all the SKILL.md and policy files into the system prompt incurs a heavy upfront token tax. The agent receives hundreds of rules for Python ASTs, Git workflows, and formatting, even if the current task only involves writing a simple Markdown file.
Proposed solution
Implement Semantic Policy Injection in the proxy. The system prompt should remain lean. The proxy should detect the agent's intent based on the tool calls it issues, and inject rules "Just-In-Time".
If a git commit tool is called -> Inject safe-git-workflow rules.
If a Python file is opened -> Inject Python AST policies.
Examples or prior art
OpenWolf utilizes a cerebrum.md approach to dynamically feed project-specific conventions to the agent only exactly when relevant.
Alternatives considered
Standard RAG systems querying a documentation vector database, but this risks injecting poorly aligned or hallucinated policy fragments compared to exact, rule-based trigger injection.
Additional context
This requires the proxy to have a robust pattern-matching or intent-detection mechanism on incoming AGENT_API tool requests.