See Exactly What the LLM Sees
Debug snapshots are the single most useful debugging tool in Wolffish. They show you the exact system prompt assembled and sent to the LLM on every turn — no abstraction, no summarization, the literal text.Location
prefrontal.buildContext() on every turn. The timestamp format is YYYYMMDD-HHmmss-SSS (millisecond precision).
Debug snapshots are ephemeral. Old snapshots are automatically cleaned up to prevent disk bloat. If you need to preserve one, copy it out of the
.debug/ directory.What’s Inside
Each debug snapshot contains the complete system prompt assembled for that turn. This includes:- Identity — the soul.md personality and behavior instructions
- User profile — the user.md context about who you are
- Agent instructions — agents.md coordination rules
- Memory fragments — episodes selected by RAS as relevant to this turn
- Skill instructions — SKILL.md bodies for capabilities that matched
- Tool definitions — JSON schemas for available tools
- Conversation history — recent messages within the token budget
- Token budget allocation — how many tokens each section consumed
Reading a Debug Snapshot
The snapshot uses XML tags to delimit each section. Here is an annotated example:What to Look For
Missing capability?
Missing capability?
Check the
<skills> section. If your capability isn’t listed, the issue is in RAS scoring. Look at the triggers field in your SKILL.md frontmatter — the user’s message didn’t match any triggers above the relevance threshold.The comment above each skill shows its relevance score. If your skill isn’t present at all, its score was below the threshold (default 0.3).Wrong or irrelevant memory?
Wrong or irrelevant memory?
Check the
<memory> section. Each fragment shows its relevance score and source episode file. If RAS included irrelevant fragments, either:- The episode content has poor signal (edit the episode file directly)
- The RAS threshold is too low (increase it in config.json)
- The cortex index needs rebuilding (delete
cortex.db, restart Wolffish)
Unexpected behavior?
Unexpected behavior?
Read the
<identity> and <agents> sections carefully. The LLM follows these instructions literally. If behavior is unexpected, the instructions might be ambiguous or contradictory. Edit soul.md or agents.md to clarify.Missing context / truncated history?
Missing context / truncated history?
Check the token budget comment at the top of the snapshot. If you see something like
31500 / 32768 used, the context is nearly full. The <history> section gets truncated first to stay within budget.Solutions: reduce loaded skills, shorten soul.md, or increase the model’s context window in provider settings.Tool not available?
Tool not available?
Check the
<tools> section. If a tool isn’t listed, either:- Its parent capability wasn’t selected by RAS (check
<skills>) - The plugin failed to load (check the event log for
capability.errorevents) - The tool schema is malformed (check
plugin/index.mjsexports)