You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up scoping issue for #89 Direction A. devagentic#240 (R1 classifier) has landed, so the upstream primitive is ready — this issue scopes the hermes-side narrowing work itself.
Background
#89 documented that the default hermes system prompt overwhelms tool-emission on mid-tier coding models (coding-groq, coding-gpt54). Direction A proposed per-intent narrowing — strip identity/SOUL/capabilities/behavior fragments from the system prompt when the classified intent is a tool-call-heavy case where the affected models hit saturation.
devagentic#240 ships a 6-key heuristic classifier ({code, confer, planning, exploration, refinement, generic}) — already merged + deployed. The classifier output is wired into devagentic's R5 dispatch hook but not surfaced to the hermes-side prompt builder. Direction A needs the same classification on the hermes side.
Composition options
Option A1 — port the classifier
Duplicate the heuristic into hermes_cli/intent_classifier.py mirroring devagentic's intent_classifier.py. Cheapest engineering; risks drift between the two copies.
Option A2 — devagentic-side surface
Expose classifyIntent(messages, role) as a devagentic GraphQL query; hermes calls it before assembling the system prompt. Single source of truth; adds a network round-trip per llm_call (latency on the hot path).
Option A3 — operator-supplied intent
Add HERMES_INTENT_OVERRIDE env var the operator sets per worker (e.g., HERMES_INTENT_OVERRIDE=code for a coding-only worker). No classifier on hermes side; narrowing decisions are static per deployment. Cheapest, least general; useful for the polynomial-explorer-style verticals where intent is known a priori.
Recommended order: ship A3 first (single env-knob, no classifier coupling, immediately unblocks deployment-specific narrowing). Defer A1/A2 until a use case shows up that needs dynamic per-turn classification on the hermes side.
Narrowing target — agent/system_prompt.py
The system prompt is assembled into 3 layers (see the module docstring at agent/system_prompt.py:10-20):
New env var HERMES_INTENT_OVERRIDE — operator-side, valid values per devagentic#240's enum: code / confer / planning / exploration / refinement / generic.
build_system_prompt_parts(agent, system_message) opt-in narrowing: when env is set to a known intent, swap to a narrowed stable layer (drop SOUL.md + SKILLS_GUIDANCE + KANBAN + SESSION_SEARCH + MEMORY guidance; keep identity-as-fallback + TOOL_USE_ENFORCEMENT + per-model operational guidance).
Follow-up scoping issue for #89 Direction A. devagentic#240 (R1 classifier) has landed, so the upstream primitive is ready — this issue scopes the hermes-side narrowing work itself.
Background
#89 documented that the default hermes system prompt overwhelms tool-emission on mid-tier coding models (
coding-groq,coding-gpt54). Direction A proposed per-intent narrowing — strip identity/SOUL/capabilities/behavior fragments from the system prompt when the classified intent is a tool-call-heavy case where the affected models hit saturation.devagentic#240 ships a 6-key heuristic classifier (
{code, confer, planning, exploration, refinement, generic}) — already merged + deployed. The classifier output is wired into devagentic's R5 dispatch hook but not surfaced to the hermes-side prompt builder. Direction A needs the same classification on the hermes side.Composition options
Option A1 — port the classifier
Duplicate the heuristic into
hermes_cli/intent_classifier.pymirroring devagentic'sintent_classifier.py. Cheapest engineering; risks drift between the two copies.Option A2 — devagentic-side surface
Expose
classifyIntent(messages, role)as a devagentic GraphQL query; hermes calls it before assembling the system prompt. Single source of truth; adds a network round-trip perllm_call(latency on the hot path).Option A3 — operator-supplied intent
Add
HERMES_INTENT_OVERRIDEenv var the operator sets per worker (e.g.,HERMES_INTENT_OVERRIDE=codefor a coding-only worker). No classifier on hermes side; narrowing decisions are static per deployment. Cheapest, least general; useful for the polynomial-explorer-style verticals where intent is known a priori.Recommended order: ship A3 first (single env-knob, no classifier coupling, immediately unblocks deployment-specific narrowing). Defer A1/A2 until a use case shows up that needs dynamic per-turn classification on the hermes side.
Narrowing target —
agent/system_prompt.pyThe system prompt is assembled into 3 layers (see the module docstring at
agent/system_prompt.py:10-20):stablecontextvolatileSpecific candidates within
stableto narrow whenintent=code:Concrete first-PR scope (Option A3)
HERMES_INTENT_OVERRIDE— operator-side, valid values per devagentic#240's enum:code/confer/planning/exploration/refinement/generic.build_system_prompt_parts(agent, system_message)opt-in narrowing: when env is set to a known intent, swap to a narrowedstablelayer (drop SOUL.md + SKILLS_GUIDANCE + KANBAN + SESSION_SEARCH + MEMORY guidance; keep identity-as-fallback + TOOL_USE_ENFORCEMENT + per-model operational guidance).HERMES_INTENT_OVERRIDE=code, the system prompt is < N tokens (set the bar based on baseline).Acceptance
coding-groq/coding-gpt54empirically emit tool calls with the narrowed prompt (the Research: default Hermes system prompt overwhelms tool-emission on mid-tier coding models #89 symptom).Out of scope
HERMES_TOOLS_SUBSETfeat(env): HERMES_TOOLS_SUBSET — operator-side tool surface narrowing (closes #74) #75/feat(mcp): extend HERMES_TOOLS_SUBSET to filter MCP tools (closes #86) #87).References