Skip to content

docs(prompt): align precedence docs with system prompt runtime - #34137

Closed
WadydX wants to merge 1 commit into
NousResearch:mainfrom
WadydX:docs/system-prompt-precedence-34118
Closed

docs(prompt): align precedence docs with system prompt runtime#34137
WadydX wants to merge 1 commit into
NousResearch:mainfrom
WadydX:docs/system-prompt-precedence-34118

Conversation

@WadydX

@WadydX WadydX commented May 28, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR makes the state/preference ordering docs match the actual prompt runtime contract.

What changed

  • website/docs/developer-guide/prompt-assembly.md
    • Replaced the outdated linear list with the current system_prompt.py tier model:
      • stablecontextvolatile
    • Clarified where skills vs memory/profile snapshots live in that model.
    • Clarified that pre_llm_call context is appended to the current user message at API-call time (not written into the cached system prompt).
    • Tightened memory snapshot wording to reflect rebuild behavior.
  • website/docs/developer-guide/architecture.md
    • Updated prompt-system description to reference system_prompt.py + prompt_builder.py and the tiered assembly contract.

Why

Issue #34118 identified ambiguity around precedence between memory, skills, and hook-injected context. The previous developer docs described an ordering that no longer matched runtime behavior.

This PR is docs-only and intentionally avoids changing runtime behavior.

Runtime sources referenced

  • agent/system_prompt.py
    • tier model (stable, context, volatile)
    • final join order (stablecontextvolatile)
  • agent/conversation_loop.py
    • pre_llm_call context injection path (user-message append at API-call time)

Scope / risk

  • Docs-only.
  • No Python/runtime behavior changes.

Closes #34118

- Replace outdated linear ordering in prompt-assembly guide with
  current stable/context/volatile tier contract from system_prompt.py
- Clarify where memory/profile snapshots live versus skills guidance
- Document that pre_llm_call context is user-message injection, not
  cached system-prompt mutation
- Update architecture guide wording to reference system_prompt.py +
  prompt_builder.py tiered assembly

Closes NousResearch#34118
@alt-glitch alt-glitch added type/docs Documentation improvements P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint labels May 29, 2026
@WadydX

WadydX commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by upstream mainline commit b922e3ff93c457e6079aea8637ffdc7a15dc15b8, which already lands this docs change set and closes #34118. Closing this PR to keep the queue clean.

@WadydX WadydX closed this May 29, 2026
@WadydX
WadydX deleted the docs/system-prompt-precedence-34118 branch May 29, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P3 Low — cosmetic, nice to have type/docs Documentation improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Architecture: State Persistence Precedence (Memory vs Skills vs Hooks)

2 participants