hermes - 💡(How to fix) Fix Question: is there a convention for how system prompt modules format their headings/sections?

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

I was reading through how the system prompt is assembled and noticed something I wanted to ask about — it seems like different modules use different formatting styles, and I wasn't sure if this was intentional or just hasn't been discussed yet.

I'm not deeply familiar with the codebase so I may be missing context, but I figured I'd lay out what I observed and ask.

Root Cause

I was reading through how the system prompt is assembled and noticed something I wanted to ask about — it seems like different modules use different formatting styles, and I wasn't sure if this was intentional or just hasn't been discussed yet.

I'm not deeply familiar with the codebase so I may be missing context, but I figured I'd lay out what I observed and ask.

Code Example

You are Hermes Agent, an intelligent AI assistant...        ← bare paragraph
If the user asks about configuring...                        ← bare paragraph
You have persistent memory across sessions...                ← bare paragraph
When the user references something...                        ← bare paragraph
After completing a complex task...                           ← bare paragraph
# Tool-use enforcement                                      ← h1
...
## Skills (mandatory)                                       ← h2
...
[context tier: HERMES.md / AGENTS.md / CLAUDE.md]
══════════════════
MEMORY (your personal notes)
══════════════════
...
RAW_BUFFERClick to expand / collapse

Question: is there a convention for how system prompt modules format their headings/sections?

Description

I was reading through how the system prompt is assembled and noticed something I wanted to ask about — it seems like different modules use different formatting styles, and I wasn't sure if this was intentional or just hasn't been discussed yet.

I'm not deeply familiar with the codebase so I may be missing context, but I figured I'd lay out what I observed and ask.

What I found

All references are from agent/prompt_builder.py and tools/memory_tool.py on main.

A few modules use no heading at all — just plain paragraphs:

ModuleLine
DEFAULT_AGENT_IDENTITYL134
HERMES_AGENT_HELP_GUIDANCEL144
MEMORY_GUIDANCEL150
SESSION_SEARCH_GUIDANCEL173
SKILLS_GUIDANCEL179

Some modules use # (level-1 Markdown heading) — all of these are conditionally injected:

ModuleHeadingLine
KANBAN_GUIDANCE# Kanban task execution protocolL188
TOOL_USE_ENFORCEMENT_GUIDANCE# Tool-use enforcementL254
OPENAI_MODEL_EXECUTION_GUIDANCE# Execution disciplineL277
GOOGLE_MODEL_OPERATIONAL_GUIDANCE# Google model operational directivesL339
COMPUTER_USE_GUIDANCE# Computer Use (macOS background control)L362

One module uses ## (level-2 heading):

ModuleHeadingLine
Skills index (build_skills_system_prompt())## Skills (mandatory)L1182

Two modules use ═══ ASCII separators + uppercase labels:

ModuleLabelFile
Memory blockMEMORY (your personal notes)tools/memory_tool.py L403
User profileUSER PROFILE (who the user is)tools/memory_tool.py L401

And all modules are joined by "\n\n".join(...) — no wrapping or boundary markers between them.

What the assembled result looks like

In a normal chat session (Kanban off, Computer Use off, skills tools loaded), the system prompt roughly looks like:

You are Hermes Agent, an intelligent AI assistant...        ← bare paragraph
If the user asks about configuring...                        ← bare paragraph
You have persistent memory across sessions...                ← bare paragraph
When the user references something...                        ← bare paragraph
After completing a complex task...                           ← bare paragraph
# Tool-use enforcement                                      ← h1
...
## Skills (mandatory)                                       ← h2
...
[context tier: HERMES.md / AGENTS.md / CLAUDE.md]
══════════════════
MEMORY (your personal notes)
══════════════════
...

Why I'm asking

I was trying to understand the system prompt's structure and found it a bit hard to follow. The first five modules blend together visually, and different modules seem to use different "visual languages" (Markdown headings vs ASCII separators vs bare text).

I've seen other projects handle this with:

  • Consistent Markdown heading levels across all modules
  • Or XML-style tags wrapping each section (like <guidance>...</guidance>)

But I genuinely don't know if either approach makes sense here, or if there are constraints (prompt caching, token efficiency, etc.) that I'm unaware of.

Just wanted to ask: has there been any discussion about a unified formatting convention for system prompt modules? Or is the current diversity of styles intentional?

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Question: is there a convention for how system prompt modules format their headings/sections?